@@ -178,6 +180,7 @@ import {
selectById,
selectRoleMenuByCaseId,
getMenuPermsByUser,
+ videoUpload
} from "@/api/room";
import { getWidth, getHeight, getWidthPhone, getModile } from "@/utils/utils";
import roomFooter from "./components/roomFooter.vue";
@@ -314,10 +317,12 @@ export default {
this.sharFlag = true;
this.videoList = "videoList";
this.screenShareFlag = false;
- if(this.userList.length >= 1){
+ if (this.userList.length > 1) {
this.videoClass = "videoItem1";
- }else{
+ } else if (this.userList.length < 1) {
this.videoClass = "videoItem";
+ } else if (this.userList.length == 1) {
+ this.videoClass = "videoItem3";
}
},
/**获取当前用户操作权限 */
@@ -373,15 +378,47 @@ export default {
this.$refs.upload3.clearFiles();
this.selectByIdFn(this.caseId);
},
+ upload3(param){
+ const formData = new FormData()
+ formData.append('file', param.file);
+ formData.append('annexType', 7);
+ formData.append('officeFlag', 1);
+ formData.append('caseId', this.caseId);
+ videoUpload(formData).then(res=>{
+ console.log('上传图片成功')
+ })
+ // axios.post(url, formData).then(response => {
+ // //根据返回值进行判断是否上传成功
+ // if(response.data.flag){
+ // //上传成功
+ // console.log('上传图片成功')
+ // }else{
+ // //上传失败
+ // console.log('图片上传失败')
+ // }
+ // }).catch(response => {
+ // console.log('异常处理')
+ // })
+ },
preview(item, flag) {
if (item.onlyOfficeFileId) {
- this.$router.push({
- path: "/onlyoffice",
- query: { id: item.onlyOfficeFileId, flag: flag },
- });
+ // this.$router.push({
+ // path: "/onlyoffice",
+ // query: { id: item.onlyOfficeFileId, flag: flag },
+ // });
+ let flag = 1;
+ if(this.editFlag){
+ flag = 1
+ }else{
+ flag = 0
+ }
+ window.open(
+ `http://121.40.189.20:8002/onlyoffice?id=${item.onlyOfficeFileId}&flag=${flag}`,
+ "_black"
+ );
} else {
window.open(
- "https://api.xayunmei.com/tiaojieapi" + item.annexPath,
+ "http://121.40.189.20:6001" + item.annexPath,
"_black"
);
}
@@ -536,7 +573,7 @@ export default {
this.userList.splice(deleteIndex, 1);
}
if (this.modileFlag) {
- this.userHeight = getHeight(this.userList);
+ // this.userHeight = getHeight(this.userList);
} else {
this.userClassPhone = getWidthPhone(this.userList);
}
@@ -575,11 +612,24 @@ export default {
return this.$refs.myQuillEditor.quill;
},
},
+ watch: {
+ userList(value) {
+ if (value.length == 1) {
+ this.videoClass = "videoItem3";
+ } else if (value.length > 1) {
+ this.videoClass = "videoItem1";
+ } else if (value.length < 1) {
+ this.videoClass = "videoItem";
+ }
+ },
+ },
async mounted() {
if (this.userList.length == 1) {
- this.videoClass = "videoItem";
+ this.videoClass = "videoItem3";
} else if (this.userList.length > 1) {
this.videoClass = "videoItem1";
+ } else if (this.userList.length < 1) {
+ this.videoClass = "videoItem";
}
// 判断设备类型
this.modileFlag = getModile();
@@ -722,6 +772,12 @@ export default {
background: red;
border-radius: 20px;
}
+.videoItem3 {
+ width: 48%;
+ height: 100%;
+ background: red;
+ border-radius: 20px;
+}
.videoItem2 {
width: 90%;
height: 25%;
diff --git a/src/views/testRoom.vue b/src/views/testRoom.vue
index 5ada3469..74f0c1ae 100644
--- a/src/views/testRoom.vue
+++ b/src/views/testRoom.vue
@@ -71,7 +71,7 @@