fix:pc端作业审批添加图片

This commit is contained in:
shijing 2024-08-19 15:18:27 +08:00
parent 0dd28c95c5
commit 9c76501511
1 changed files with 28 additions and 3 deletions

View File

@ -245,6 +245,9 @@
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="审批图片" v-if="audit_imgs_show" required>
<sc-upload-multiple v-model="fileurl" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
</el-form-item>
<el-form-item label="处理意见">
<el-input
v-model="form.suggestion"
@ -510,11 +513,13 @@ export default {
employeeLists: [],
operationBtn: [],
routepackes: [],
fileurl:[],
form: {
suggestion: "",
close_note: "",
close_dos: [],
},
audit_imgs:[],
addForm: {
suggestion: "",
toadd_user: "",
@ -529,6 +534,7 @@ export default {
showLimited: false,
limitedDeliver: false,
limitedUserSelect: false,
audit_imgs_show:false,
purpose_: {
10: "参观",
20: "拜访",
@ -594,6 +600,12 @@ export default {
this.getBtns();
},
methods: {
imagesDel(index){
this.audit_imgs.splice(index,1)
},
imagesChange(data){
this.audit_imgs = data;
},
itemDetailEdtil() {
let itemDetail = this.itemDetail;
if (this.cateType === "opl") {
@ -715,10 +727,20 @@ export default {
},
//
getBtns() {
this.$API.wf.ticket.ticketTransitions
.req(this.ticketId)
let that = this;
that.audit_imgs_show = false;
that.$API.wf.ticket.ticketTransitions
.req(that.ticketId)
.then((res) => {
this.operationBtn = res;
that.operationBtn = res;
if(res.length>0){
for (let i = 0; i < res.length; i++) {
if(res[i].on_submit_func=="apps.opm.services.check_opl_audit_imgs"){
that.audit_imgs_show = true;
}
}
}
});
},
//访
@ -822,6 +844,9 @@ export default {
params.ticket_data.close_note = this.form.close_note;
params.ticket_data.close_dos = this.form.close_dos;
}
if(this.audit_imgs_show){
params.ticket_data.audit_imgs = this.audit_imgs;
}
this.$API.wf.ticket.ticketHandle
.req(this.ticketId, params)
.then((res) => {