diff --git a/src/pages/processCenter/pages/creatProcess/zcrk/step1.vue b/src/pages/processCenter/pages/creatProcess/zcrk/step1.vue index 65862a3d8..70541b6bd 100644 --- a/src/pages/processCenter/pages/creatProcess/zcrk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/zcrk/step1.vue @@ -1426,6 +1426,12 @@ let mes = JSON.parse(res.mes) mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD')) this.form = mes.form + this.form['lawsSyqy'] = this.filterObj(this.form['lawsSyqy']) + this.form['lawsSycx'] = this.filterObj(this.form['lawsSycx']) + this.form['lawsLabel'] = this.filterObj(this.form['lawsLabel']) + this.form['YYRZLAWS'] = this.filterObj(this.form['YYRZLAWS']) + this.form['NYLXLAWS'] = this.filterObj(this.form['NYLXLAWS']) + this.form['TGRLAWS'] = this.filterObj(this.form['TGRLAWS']) this.roleForm = mes.roleForm this.commentText = mes.commentText }) @@ -1537,8 +1543,6 @@ this.form['id'] = bringData.id this.standardDrawer = false this.verifySarStandard = true - this.busVsFunc() - this.modelFunc() this.$forceUpdate() } // 遍历对象初始化文件信息 @@ -1974,23 +1978,29 @@ // this.fileList = fileList.splice(0, 1) // } if (response.ok) { - - switch (this.fileType){ - case 'ZCWBLAWS': - this.ZCWBLAWSFileList = fileList - break; - case 'GCWBLAWS' : - this.GCWBLAWSFileList = fileList - break; - case 'JDWJLAWS': - this.JDWJLAWSFileList = fileList - break; - case 'GLWJLAWS': - this.GLWJLAWSFileList = fileList - break; - default : ; - } - this.$message({ + const fileObj = {} + fileObj.id = file.response.data.id + fileObj.name = file.response.data.name + switch (this.fileType){ + case 'ZCWBLAWS': + this.ZCWBLAWSFileList = this.ZCWBLAWSFileList.filter ( item => item.response === undefined); + this.ZCWBLAWSFileList.push(fileObj) + break; + case 'GCWBLAWS' : + this.GCWBLAWSFileList = this.GCWBLAWSFileList.filter ( item => item.response === undefined); + this.GCWBLAWSFileList.push(fileObj) + break; + case 'JDWJLAWS': + this.JDWJLAWSFileList = this.JDWJLAWSFileList.filter ( item => item.response === undefined); + this.JDWJLAWSFileList.push(fileObj) + break; + case 'GLWJLAWS': + this.GLWJLAWSFileList = this.GLWJLAWSFileList.filter ( item => item.response === undefined); + this.GLWJLAWSFileList.push(fileObj) + break; + default : ; + } + this.$message({ showClose: true, message: response.message, type: 'success' @@ -2154,6 +2164,7 @@ // } this.saveLoading = true + this.fileInfoHandle() let _formData = new FormData() // _formData.append('id', this.bpnId) _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2181,19 +2192,18 @@ }) }, fileInfoHandle(){ + //拼接文件名和id 提交到流程Activity + this.form.ZCWBLAWS=this.ZCWBLAWSFileList.map(item => item.id).join(",") + this.form.ZCWBLAWSName=this.ZCWBLAWSFileList.map(item => item.name).join(",") - //拼接文件名和id 提交到流程Activity - this.form.ZCWBLAWS=this.ZCWBLAWSFileList.map(item => item.response.data.id).join(",") - this.form.ZCWBLAWSName=this.ZCWBLAWSFileList.map(item => item.name).join(",") + this.form.GCWBLAWS=this.GCWBLAWSFileList.map(item => item.id).join(",") + this.form.GCWBLAWSName=this.GCWBLAWSFileList.map(item => item.name).join(",") - this.form.GCWBLAWS=this.GCWBLAWSFileList.map(item => item.response.data.id).join(",") - this.form.GCWBLAWSName=this.GCWBLAWSFileList.map(item => item.name).join(",") + this.form.JDWJLAWS=this.JDWJLAWSFileList.map(item => item.id).join(",") + this.form.JDWJLAWSName=this.JDWJLAWSFileList.map(item => item.name).join(",") - this.form.JDWJLAWS=this.JDWJLAWSFileList.map(item => item.response.data.id).join(",") - this.form.JDWJLAWSName=this.JDWJLAWSFileList.map(item => item.name).join(",") - - this.form.GLWJLAWS=this.GLWJLAWSFileList.map(item => item.response.data.id).join(",") - this.form.GLWJLAWSName=this.GLWJLAWSFileList.map(item => item.name).join(",") + this.form.GLWJLAWS=this.GLWJLAWSFileList.map(item => item.id).join(",") + this.form.GLWJLAWSName=this.GLWJLAWSFileList.map(item => item.name).join(",") }, handleSubmit() { @@ -2302,10 +2312,7 @@ this.YYRZLAWSOptions = res.data.YYRZLAWS this.ZRBMLAWSOptions = res.data.ZRBMLAWS this.ZRGCSLAWSOptions = res.data.ZRGCSLAWS - this.setMap(this.standStateOptions) }) - this.busVsFunc() - this.modelFunc() } } diff --git a/src/pages/processCenter/pages/creatProcess/zcrk/step2.vue b/src/pages/processCenter/pages/creatProcess/zcrk/step2.vue index ed526ee4f..87b86986c 100644 --- a/src/pages/processCenter/pages/creatProcess/zcrk/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/zcrk/step2.vue @@ -260,7 +260,7 @@
- +
{{value.name}} @@ -279,7 +279,7 @@ - +
{{value.name}}
@@ -1089,7 +1089,7 @@ _this: this }, res => { if (res.success) { - if(this.formTongGuo.approvalOpinion === '1'){ + if(this.formTongGuo.approvalOpinion === 1){ this.$message.warning("驳回成功") this.isSubmit = false // 流程提交之后,应该流转至待办任务页面 diff --git a/src/pages/processCenter/pages/creatProcess/zcrk/step3.vue b/src/pages/processCenter/pages/creatProcess/zcrk/step3.vue index 78f953844..6cd9109c4 100644 --- a/src/pages/processCenter/pages/creatProcess/zcrk/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/zcrk/step3.vue @@ -130,14 +130,14 @@ clearable >
- - - 根据编号、名称、文本状态查询 - - + + + + + + + + -
- - - - 查看已上传的文件 - -
-
- - - 点击上传 - -
+
+
+
{{ item.name }}
+
+
+ + + +
+
-
- - - - 查看已上传的文件 - -
-
- - - 点击上传 - -
+
+
+
{{ item.name }}
+
+
+ + + +
+
@@ -328,27 +314,20 @@ v-model="form.GCWBLAWSName" clearable > -
- - - - 查看已上传的文件 - -
-
- - - 点击上传 - +
+
+
{{ item.name }}
+
+
+ + + +
@@ -505,27 +484,20 @@ v-model="form.GLWJLAWSName" clearable > -
- - - - 查看已上传文件 - - -
-
- - - 点击上传 - +
+
+
{{ item.name }}
+
+
+ + + +
@@ -635,6 +607,7 @@ accept=".pdf, .PDF, .ppt, .PPT, .pptx,.PPTX, .doc, .DOC, .docx, .DOCX, .xls, .xlsx" :before-upload="beginImportFile" :on-success="importFileSuccess" + :on-preview="handleFilePreview" :on-remove="removeOneFile" :show-file-list="true" > @@ -1445,8 +1418,24 @@ this.form.prcNum = this.prcNum this.form.prcName = this.prcName this.form['id'] = item.id + this.form['lawsSyqy'] = this.filterObj(this.form['lawsSyqy']) + this.form['lawsSycx'] = this.filterObj(this.form['lawsSycx']) + this.form['lawsLabel'] = this.filterObj(this.form['lawsLabel']) + this.form['YYRZLAWS'] = this.filterObj(this.form['YYRZLAWS']) + this.form['NYLXLAWS'] = this.filterObj(this.form['NYLXLAWS']) + this.form['TGRLAWS'] = this.filterObj(this.form['TGRLAWS']) }) }, + filterObj(obj){ + if(obj && obj !== ''){ + if(obj instanceof Array){ + return obj; + }else { + return obj.split(",") + } + } + return ""; + }, getData() { if(this.taskIds && this.pId){ return new Promise((resolve, reject) => { @@ -1475,6 +1464,17 @@ }) } }, + assemble(ids,names){ + let list= new Array(); + if(ids && ids !== '' && names && names !== ''){ + let idArray=ids.split(','); + let nameArray=names.split(','); + for(let i=0; i { Promise.all([this.getTaskId()]).then((value) => { @@ -1482,6 +1482,12 @@ let mes = JSON.parse(value[0].mes) mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD')) this.form = mes.form + this.form['lawsSyqy'] = this.filterObj(this.form['lawsSyqy']) + this.form['lawsSycx'] = this.filterObj(this.form['lawsSycx']) + this.form['lawsLabel'] = this.filterObj(this.form['lawsLabel']) + this.form['YYRZLAWS'] = this.filterObj(this.form['YYRZLAWS']) + this.form['NYLXLAWS'] = this.filterObj(this.form['NYLXLAWS']) + this.form['TGRLAWS'] = this.filterObj(this.form['TGRLAWS']) this.taskIds = mes.taskIds; this.pId = mes.pId; this.userId = mes.userId; @@ -2102,19 +2108,25 @@ // this.fileList = fileList.splice(0, 1) // } if (response.ok) { - + const fileObj = {} + fileObj.id = file.response.data.id + fileObj.name = file.response.data.name switch (this.fileType){ case 'ZCWBLAWS': - this.ZCWBLAWSFileList = fileList + this.ZCWBLAWSFileList = this.ZCWBLAWSFileList.filter ( item => item.response === undefined); + this.ZCWBLAWSFileList.push(fileObj) break; case 'GCWBLAWS' : - this.GCWBLAWSFileList = fileList + this.GCWBLAWSFileList = this.GCWBLAWSFileList.filter ( item => item.response === undefined); + this.GCWBLAWSFileList.push(fileObj) break; case 'JDWJLAWS': - this.JDWJLAWSFileList = fileList + this.JDWJLAWSFileList = this.JDWJLAWSFileList.filter ( item => item.response === undefined); + this.JDWJLAWSFileList.push(fileObj) break; case 'GLWJLAWS': - this.GLWJLAWSFileList = fileList + this.GLWJLAWSFileList = this.GLWJLAWSFileList.filter ( item => item.response === undefined); + this.GLWJLAWSFileList.push(fileObj) break; default : ; } @@ -2125,6 +2137,25 @@ }) } }, + // 文件预览及下载 + handleFilePreview(file) { + let attId = "" + if(file && file.id){ + attId = file.id + }else { + attId = file.response.data.id + } + + if (this.preview) { + if (attId) { + window.location.href = '/api/att/attFile/downloadFileForSarNew?fileId=' + attId + } else { + this.$message.warning('文件不存在,下载失败') + } + } else { + this.$preview(attId) + } + }, fileUpload (type) { this.fileType = ''; // this.fileMadel = true;//此句应在最后执行,否则会有先显示没变换的的文件列表,在显示变换了的文件列表 @@ -2254,6 +2285,8 @@ // } this.saveLoading = true + this.isSubmit = true + this.fileInfoHandle() let _formData = new FormData() // _formData.append('id', this.bpnId) _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2278,27 +2311,29 @@ commentText: this.commentText })) saveTaskFirst(_formData).then(res => { + this.isSubmit = false this.saveLoading = false this.$message.success('保存成功') this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) // this.bpnId = res.result }).catch(e => { + this.isSubmit = false this.saveLoading = false - }) + }) }, fileInfoHandle(){ //拼接文件名和id 提交到流程Activity - this.form.ZCWBLAWS=this.ZCWBLAWSFileList.map(item => item.response.data.id).join(",") + this.form.ZCWBLAWS=this.ZCWBLAWSFileList.map(item => item.id).join(",") this.form.ZCWBLAWSName=this.ZCWBLAWSFileList.map(item => item.name).join(",") - this.form.GCWBLAWS=this.GCWBLAWSFileList.map(item => item.response.data.id).join(",") + this.form.GCWBLAWS=this.GCWBLAWSFileList.map(item => item.id).join(",") this.form.GCWBLAWSName=this.GCWBLAWSFileList.map(item => item.name).join(",") - this.form.JDWJLAWS=this.JDWJLAWSFileList.map(item => item.response.data.id).join(",") + this.form.JDWJLAWS=this.JDWJLAWSFileList.map(item => item.id).join(",") this.form.JDWJLAWSName=this.JDWJLAWSFileList.map(item => item.name).join(",") - this.form.GLWJLAWS=this.GLWJLAWSFileList.map(item => item.response.data.id).join(",") + this.form.GLWJLAWS=this.GLWJLAWSFileList.map(item => item.id).join(",") this.form.GLWJLAWSName=this.GLWJLAWSFileList.map(item => item.name).join(",") }, @@ -2308,6 +2343,7 @@ if (valid) { this.fileInfoHandle() this.isSubmit = true + this.saveLoading = true this.form.country=this.countryArr; var json = Object.assign(this.form, this.roleForm) json.zrUserId = this.form.zrUserId @@ -2327,6 +2363,7 @@ if (res.success) { this.$message.success(res.message) this.isSubmit = false + this.saveLoading = false // 流程提交之后,应该流转至待办任务页面 this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) } @@ -2398,10 +2435,7 @@ this.YYRZLAWSOptions = res.data.YYRZLAWS this.ZRBMLAWSOptions = res.data.ZRBMLAWS this.ZRGCSLAWSOptions = res.data.ZRGCSLAWS - this.setMap(this.standStateOptions) }) - this.busVsFunc() - this.modelFunc() } }