'视频会议文件编辑'

This commit is contained in:
gyj
2024-04-15 09:40:00 +08:00
parent a551f33a6e
commit a2b625937e
4 changed files with 142 additions and 68 deletions
+72 -6
View File
@@ -79,6 +79,22 @@
>被申请人上传证据</el-button
>
</el-upload>
<el-upload
v-if="editFlag"
ref="upload3"
:limit="1"
action="https://api.xayunmei.com/tiaojieapi/video/upload"
:headers="headers3"
:data="filedata3"
:on-change="beforeUpload3"
:on-success="handlSuccess3"
:file-list="fileList3"
accept=".doc,.docx"
>
<el-button slot="trigger" size="small" type="primary"
>上传调解书</el-button
>
</el-upload>
</div>
<div class="list">
<div class="applicant" v-if="applicantFile.length > 0">
@@ -87,7 +103,7 @@
style="color: #104fad; cursor: pointer"
v-for="(item, index) in applicantFile"
:key="index"
@click="preview(item)"
@click="preview(item,0)"
>
{{ item.annexName }}
</div>
@@ -98,7 +114,18 @@
style="color: #104fad; cursor: pointer"
v-for="(item, index) in resFile"
:key="index"
@click="preview(item)"
@click="preview(item,0)"
>
{{ item.annexName }}
</div>
</div>
<div class="mediate" v-if="mediateFile.length > 0">
<div>调解书</div>
<div
style="color: #104fad; cursor: pointer"
v-for="(item, index) in mediateFile"
:key="index"
@click="preview(item,1)"
>
{{ item.annexName }}
</div>
@@ -131,6 +158,7 @@ import {
htmlToPDF,
selectById,
selectRoleMenuByCaseId,
getMenuPermsByUser,
} from "@/api/room";
import { getWidth, getHeight, getWidthPhone, getModile } from "@/utils/utils";
import roomFooter from "./components/roomFooter.vue";
@@ -175,6 +203,7 @@ export default {
token: "",
applicantFile: [],
resFile: [],
mediateFile:[],
headers: {
// Authorization: "Bearer " + token,
Authorization: "",
@@ -195,9 +224,27 @@ export default {
caseId: null,
},
fileList1: [],
headers3: {
// Authorization: "Bearer " + token,
Authorization: "",
},
filedata3: {
annexType: 7,
officeFlag: 0,
caseId: null,
},
fileList3: [],
editFlag: false,
};
},
methods: {
/**获取当前用户操作权限 */
getMenuPermsByUserFn() {
getMenuPermsByUser().then((res) => {
// console.log(res.perms, "KKKKKKKKKKKKKKKKKKKKKKKKKKKKKK");
this.editFlag = res.perms.includes("caseManagement:list:editOffice");
});
},
beforeUpload(file, fileList) {
this.fileList = fileList;
if (file.name.indexOf("docx") == -1) {
@@ -232,11 +279,24 @@ export default {
this.$refs.upload1.clearFiles();
this.selectByIdFn(this.caseId);
},
preview(item) {
beforeUpload3(file, fileList) {
this.fileList3 = fileList;
this.filedata3.officeFlag = 1;
},
// 文件上传成功
handlSuccess3(res, file) {
this.$message({
message: "上传成功",
type: "success",
});
this.$refs.upload3.clearFiles();
this.selectByIdFn(this.caseId);
},
preview(item,flag) {
if (item.onlyOfficeFileId) {
this.$router.push({
path: "/onlyoffice",
query: { id: item.onlyOfficeFileId },
query: { id: item.onlyOfficeFileId,flag:flag },
});
} else {
window.open(
@@ -290,18 +350,22 @@ export default {
this.selectByIdFn(this.caseId);
}, 8000);
this.selectRoleMenuByCaseIdFn(this.caseId);
this.getMenuPermsByUserFn();
},
/** 获取证据列表 */
selectByIdFn(id) {
selectById(id).then((res) => {
this.applicantFile = [];
this.resFile = [];
this.mediateFile = [];
let fileList = res.data.caseAttachList;
fileList.forEach((item) => {
if (item.annexType == 2) {
this.applicantFile.push(item);
} else if (item.annexType == 12) {
this.resFile.push(item);
}else if (item.annexType == 7){
this.mediateFile.push(item)
}
});
});
@@ -423,7 +487,6 @@ export default {
/**获取申请人被申请人权限 */
selectRoleMenuByCaseIdFn(caseId) {
selectRoleMenuByCaseId(caseId).then((res) => {
console.log(res, "LLLLLLLLLLLLLLLLLLLLLLLLLL");
if (res.appFlag && res.appFlag == "1") {
this.appFlag = true;
this.resFlag = false;
@@ -451,8 +514,10 @@ export default {
this.token = this.$route.query.token;
this.headers.Authorization = "Bearer " + this.token;
this.headers1.Authorization = "Bearer " + this.token;
this.headers3.Authorization = "Bearer " + this.token;
this.filedata.caseId = this.caseId;
this.filedata1.caseId = this.caseId;
this.filedata3.caseId = this.caseId;
window.sessionStorage.setItem("token", this.token);
window.sessionStorage.setItem("userId", this.id);
this.secretaryRoleByUserIdFn(this.id, this.caseId);
@@ -675,7 +740,8 @@ export default {
flex-wrap: wrap;
}
.applicant,
.res {
.res,
.mediate {
width: 100%;
margin-left: 20px;
margin-bottom: 10px;