From 5660da0329e7c80a0f054cf7ed8adadaf16e3ce9 Mon Sep 17 00:00:00 2001 From: super_liu <396572590@qq.com> Date: Fri, 24 Dec 2021 17:45:36 +0800 Subject: [PATCH] feat: There is no way the,buss process --- .../pages/components/ProcessFooter.vue | 35 ++ .../pages/creatProcess/bzrk/step1.vue | 32 +- .../pages/creatProcess/qbrk/step1.vue | 591 +++++++++--------- .../pages/creatProcess/qbrk/step2.vue | 168 ++--- 4 files changed, 431 insertions(+), 395 deletions(-) diff --git a/src/pages/processCenter/pages/components/ProcessFooter.vue b/src/pages/processCenter/pages/components/ProcessFooter.vue index 8b1a745ce..3da84e3d5 100644 --- a/src/pages/processCenter/pages/components/ProcessFooter.vue +++ b/src/pages/processCenter/pages/components/ProcessFooter.vue @@ -4,6 +4,25 @@
+ 文件上传 + + + 查看文件 + { - console.log(res) - if(res){ - const editFileInfo = res - console.log(editFileInfo) - if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ - window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) - }else { - const nowTime = new Date().getTime() - // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); - window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) - } - // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) - } - // switch (res.convertState) { - // case 'ERROR': - // this.$message.warning('文档转换失败') - // break - // case 'LODING': - // this.$message.info('文档转换中,请稍后查看') - // break - // case 'SUCCESS': - // const { convertFileInfo } = res - // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id)) - // break - // } - }).catch(e => { - console.log(e) - this.$message.warning('文件不存在,预览失败') - }) + this.$preview(attId) }, // choiceZRRS () { // if (this.userType === 'zrUserId') { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue index 512a3286c..1d1d40c96 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue @@ -6,7 +6,7 @@
基础信息
-
模块信息
+
人员信息
@@ -137,28 +137,21 @@ v-model="form.FBGBUSSName" clearable > -
- - - - 查看已上传的文件 - -
-
- - - 点击上传 - -
+
+
+
{{ item.name }}
+
+
+ + + +
+
-
- - - - 查看已上传的文件 - -
-
- - - 点击上传 - -
+
+
+
{{ item.name }}
+
+
+ + + +
+
@@ -199,27 +185,20 @@ v-model="form.BZSMBUSSName" clearable > -
- - - - 查看已上传的文件 - -
-
- - - 点击上传 - +
+
+
{{ item.name }}
+
+
+ + + +
@@ -229,27 +208,20 @@ v-model="form.QTWJBUSSName" clearable > -
- - - - 查看已上传的文件 - -
-
- - - 点击上传 - +
+
+
{{ item.name }}
+
+
+ + + +
@@ -263,15 +235,12 @@ - - - + + - - - + + @@ -366,49 +332,42 @@ v-model="form.GLWJBUSSName" clearable > -
- - - - 查看已上传文件 - - -
-
- - - 点击上传 - +
+
+
{{ item.name }}
+
+
+ + + +
- - - {{'手动查找'}} - + + + + + + + + + + + + + + @@ -417,85 +376,85 @@
-
- - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - - - - - - - - - + + + +

其他起草人

+
+ +
+
+
+

主起草人汇总修订人

- +
@@ -573,12 +532,12 @@
- + -

技术委员会负责刃/起草中心主任

+

技术委员会负责人/起草中心主任

- +
@@ -776,7 +735,7 @@
取消
+ { + // if (item.hasChild === '0') { + if (nameList.length > 0) { + nameList += ',' + idList += ',' + } + idList += item.id + nameList += item.name + // } + }) + this.form.QCDW = nameList + this.form.QCDWID = idList + + }, popoverHideBusVs (checkedIds, checkedData,isShow,isLoadChild,topId) { if(checkedData) { if(checkedData.length > 0){ @@ -2446,6 +2464,9 @@ fileInfoHandle(){ //拼接文件名和id 提交到流程Activity + this.form.footFile=this.footFileList.map(item => item.response.data.id).join(",") + this.form.footFileName=this.footFileList.map(item => item.name).join(",") + this.form.FBGBUSS=this.FBGBUSSFileList.map(item => item.response.data.id).join(",") this.form.FBGBUSSName=this.FBGBUSSFileList.map(item => item.name).join(",") @@ -2531,54 +2552,54 @@ // this.form.country=this.countryArr; // test this.isSubmit = false - this.changeTree(this.form.modelData) + // this.changeTree(this.form.modelData) this.$refs['form'].validate((valid) => { if (valid) { - if(this.form.modelData === undefined || this.form.modelData.length === 0){ - this.$message.warning('请检查模块信息是否填写完整') - }else if( this.modelDataNameVerify !== undefined && this.modelDataNameVerify.length > 0){ - this.$message.warning('请检查模块信息模块名称是否填写完整') - }else if( this.modelDataZrUserVerify !== undefined && this.modelDataZrUserVerify.length > 0){ - this.$message.warning('请检查模块信息责任人是否填写完整') - }else { - this.$refs['userForm'].validate((valid) => { - if (valid) { - this.fileInfoHandle() - this.isSubmit = true - this.form.country=this.countryArr; - this.form.standCode = this.form.standSort + ' ' + this.form.standNumber + ( this.form.standYear === '' ? '' : '-' + this.form.standYear) +' X' - var json = Object.assign(this.form, this.roleForm) - json.zrUserId = this.form.zrUserId - json.jlUserId = this.form.jlUserId - json.commentText = this.commentText - json.applyUpdUserId = this.form.applyUpdUserId - json.prcCreateUser = this.form.prcCreateUser - json.prcCreateUserName = this.form.prcCreateUserName - this.$http.get('lawss/activiti/startProcess', {type: 'buss1'}, { - _this: this - }, res => { - if (res.ok) { - this.$http.post('lawss/activiti/completeTask', { - taskIds: res.data, - userId : this.$store.getters.userInfo.userId, - json: JSON.stringify(json) - }, { - _this: this - }, res => { - if (res.success) { - this.$message.success(res.message) - this.isSubmit = false - // 流程提交之后,应该流转至待办任务页面 - this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) - } - }) - } - }) - }else { - this.$message.warning('请检查人员信息表单是否填写完整') - } - }) - } + // if(this.form.modelData === undefined || this.form.modelData.length === 0){ + // this.$message.warning('请检查模块信息是否填写完整') + // }else if( this.modelDataNameVerify !== undefined && this.modelDataNameVerify.length > 0){ + // this.$message.warning('请检查模块信息模块名称是否填写完整') + // }else if( this.modelDataZrUserVerify !== undefined && this.modelDataZrUserVerify.length > 0){ + // this.$message.warning('请检查模块信息责任人是否填写完整') + // }else { + // } + this.$refs['userForm'].validate((valid) => { + if (valid) { + this.fileInfoHandle() + this.isSubmit = true + this.form.country=this.countryArr; + this.form.standCode = this.form.standSort + ' ' + this.form.standNumber + ( this.form.standYear === '' ? '' : '-' + this.form.standYear) +' X' + var json = Object.assign(this.form, this.roleForm) + json.zrUserId = this.form.zrUserId + json.jlUserId = this.form.jlUserId + json.commentText = this.commentText + json.applyUpdUserId = this.form.applyUpdUserId + json.prcCreateUser = this.form.prcCreateUser + json.prcCreateUserName = this.form.prcCreateUserName + this.$http.get('lawss/activiti/startProcess', {type: 'buss1'}, { + _this: this + }, res => { + if (res.ok) { + this.$http.post('lawss/activiti/completeTask', { + taskIds: res.data, + userId : this.$store.getters.userInfo.userId, + json: JSON.stringify(json) + }, { + _this: this + }, res => { + if (res.success) { + this.$message.success(res.message) + this.isSubmit = false + // 流程提交之后,应该流转至待办任务页面 + this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) + } + }) + } + }) + }else { + this.$message.warning('请检查人员信息表单是否填写完整') + } + }) } else { this.$message.warning('请检查基础信息表单是否填写完整') } diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step2.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step2.vue index c90b7edac..bf89dfc00 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step2.vue @@ -158,14 +158,7 @@ - - - + - - - + @@ -241,7 +227,7 @@ > -
+
{{value.name}}
@@ -455,10 +441,12 @@ v-show="verifySarStandard" show-save show-submit - show-edit + :uploadFile="uploadFileStatus" + :uploadedFile="!uploadFileStatus" :submitLoading="isSubmit" :saveLoading="saveLoading" - @onLineEdit="handleOnLineEdit" + @uploadFile="handleUploadFile" + @uploadedFile="handleUploadedFile" @save="handleSave" @submit="handleSubmit" > @@ -887,6 +875,7 @@ prcName: this.$route.query.prcName, detailData: [], fileList: [], + footFileList: [], FBGBUSSFileList: [], BZSMBUSSFileList: [], LSBBBUSSFileList: [], @@ -971,6 +960,7 @@ ListModel: false, // 新增编辑抽屉开关 active: '1', // 默认显示 isSubmit: false, + uploadFileStatus: true, saveLoading: false, defaultProps: { children: 'children', @@ -1027,6 +1017,8 @@ modelData:[], modelDataNameVerify:[], modelDataZrUserVerify:[], + footFile:'', + footFileName:'', // 基础信息 country:[], // 基础信息 @@ -1169,7 +1161,7 @@ { required: true, message: '请选择文本状态', trigger: 'change' } ], issueTime: [ - { required: true, message: '请选择企标发布日期', trigger: 'change' } + { required: false, message: '请选择企标发布日期', trigger: 'change' } ], FBGBUSSName: [ { required: true, message: '请上传发布稿',validator: validateFBGBUSS, trigger: 'blur' } @@ -1468,6 +1460,7 @@ 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.footFileList=this.assemble(this.form.footFile,this.form.footFileName); this.FBGBUSSFileList=this.assemble(this.form.FBGBUSS,this.form.FBGBUSSName); this.BZSMBUSSFileList=this.assemble(this.form.BZSMBUSS,this.form.BZSMBUSSName); this.LSBBBUSSFileList=this.assemble(this.form.LSBBBUSS,this.form.LSBBBUSSName); @@ -2071,22 +2064,7 @@ this.$message.warning('文件不存在,下载失败') } } else { - this.getBusStandFileByAttId(attId) - .then(res => { - if(res){ - const editFileInfo = res - if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ - window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) - }else { - const nowTime = new Date().getTime() - // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); - window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) - } - } - }).catch(e => { - console.log(e) - this.$message.warning('文件不存在,预览失败') - }) + this.$preview(attId) } }, // 导入标准数据成功后执行 @@ -2113,6 +2091,10 @@ case 'GLWJBUSS': this.GLWJBUSSFileList = fileList break; + case 'footFile': + this.footFileList = fileList + this.uploadFileStatus = this.footFileList !== undefined ? (this.footFileList.length <= 0) : true + break; default : ; } this.$message({ @@ -2148,6 +2130,9 @@ case 'GLWJBUSS': this.fileList=this.GLWJBUSSFileList break; + case 'footFile': + this.fileList=this.footFileList + break; default : ; } this.fileMadel = true; @@ -2171,6 +2156,10 @@ case 'GLWJBUSS': this.GLWJBUSSFileList = fileList break; + case 'footFile': + this.footFileList = fileList + this.uploadFileStatus = this.footFileList !== undefined ? (this.footFileList.length <= 0) : true + break; default : ; } }, @@ -2282,6 +2271,17 @@ }) }) }, + handleUploadFile(){ + this.fileType = ''; + this.fileType = 'footFile'; + + this.fileList=this.footFileList + + this.fileMadel = true; + }, + handleUploadedFile(){ + this.fileMadel = true + }, // 在线编辑 handleOnLineEdit(){ this.isSubmit = true @@ -2335,6 +2335,9 @@ fileInfoHandle(){ //拼接文件名和id 提交到流程Activity + this.form.footFile=this.footFileList.map(item => item.response.data.id).join(",") + this.form.footFileName=this.footFileList.map(item => item.name).join(",") + this.form.FBGBUSS=this.FBGBUSSFileList.map(item => item.response.data.id).join(",") this.form.FBGBUSSName=this.FBGBUSSFileList.map(item => item.name).join(",") @@ -2438,50 +2441,54 @@ // } this.$refs['formTongGuo'].validate((valid) => { if (valid) { - this.processModelHisOne(this.pId,this.taskIds) - .then(res => { - if(res){ - const editFileInfo = res - if(editFileInfo && editFileInfo.editStatus === '1'){ - this.isSubmit = true - this.saveLoading = true - this.form.commentText = this.formTongGuo.commentText - this.form.approvalOpinion = this.formTongGuo.approvalOpinion - const json = JSON.stringify(this.form); - this.$http.post('lawss/activiti/completeTask', { - taskIds: this.taskIds, - userId : this.userId, - json: json - }, { - _this: this - }, res => { - if (res.success) { - this.$message.success(res.message) - // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false - this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) - // if(this.formTongGuo.approvalOpinion === '1'){ - // this.$message.warning("驳回成功") - // this.isSubmit = false - // // 流程提交之后,应该流转至待办任务页面 - // this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) - // }else{ - // this.processCreateLaws(json) - // } - }else { - this.$message.success(res.message) - } - }) - }else { - this.$message.warning('请先在线编辑,再提交流程') - } - + if(this.footFileList !== undefined && this.footFileList.length > 0){ + this.isSubmit = true + this.saveLoading = true + this.form.commentText = this.formTongGuo.commentText + this.form.approvalOpinion = this.formTongGuo.approvalOpinion + const json = JSON.stringify(this.form); + this.$http.post('lawss/activiti/completeTask', { + taskIds: this.taskIds, + userId : this.userId, + json: json + }, { + _this: this + }, res => { + if (res.success) { + this.$message.success(res.message) + // 流程提交之后,应该流转至待办任务页面 + this.isSubmit = false + this.saveLoading = false + this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) + // if(this.formTongGuo.approvalOpinion === '1'){ + // this.$message.warning("驳回成功") + // this.isSubmit = false + // // 流程提交之后,应该流转至待办任务页面 + // this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) + // }else{ + // this.processCreateLaws(json) + // } + }else { + this.$message.success(res.message) } - }).catch(e => { - console.log(e) - // this.$message.warning('文件不存在,预览失败') - }) + }) + }else { + this.$message.warning('请先上传文件,再提交流程') + } + // this.processModelHisOne(this.pId,this.taskIds) + // .then(res => { + // if(res){ + // const editFileInfo = res + // if(editFileInfo && editFileInfo.editStatus === '1'){ + // }else { + // this.$message.warning('请先在线编辑,再提交流程') + // } + // + // } + // }).catch(e => { + // console.log(e) + // // this.$message.warning('文件不存在,预览失败') + // }) }}) }, busVsFunc(){ @@ -2547,11 +2554,13 @@ } this.getFormFieldList(processForm) + this.footFileList=this.assemble(processForm.footFile,processForm.footFileName); this.FBGBUSSFileList=this.assemble(processForm.FBGBUSS,processForm.FBGBUSSName); this.BZSMBUSSFileList=this.assemble(processForm.BZSMBUSS,processForm.BZSMBUSSName); this.LSBBBUSSFileList=this.assemble(processForm.LSBBBUSS,processForm.LSBBBUSSName); this.QTWJBUSSFileList=this.assemble(processForm.QTWJBUSS,processForm.QTWJBUSSName); this.GLWJBUSSFileList=this.assemble(processForm.GLWJBUSS,processForm.GLWJBUSSName); + this.uploadFileStatus = this.footFileList !== undefined ? (this.footFileList.length <= 0) : true } }).catch(e => { }) @@ -2590,6 +2599,7 @@ }, }, mounted () { + this.getTaskId() this.getData() this.processTable() this.$http.get('sys/dictype/getDicTypeListCode', '', {