From ae3a2a12c4489ef129424e977e16fb12294f7e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Thu, 24 Feb 2022 16:10:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=81=E6=A0=87=E5=88=B6=E4=BF=AE?= =?UTF-8?q?=E8=AE=A2=E7=AB=8B=E9=A1=B9=E8=AE=A1=E5=88=92=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home2/components/todoList/index.vue | 24 +- .../pages/creatProcess/qbzxdlx/step1.vue | 785 +++++--- .../pages/creatProcess/qbzxdlx/step2.vue | 1618 ++++++++++++++--- .../tabComponents/processCenter/index.vue | 14 + 4 files changed, 1941 insertions(+), 500 deletions(-) diff --git a/src/pages/home2/components/todoList/index.vue b/src/pages/home2/components/todoList/index.vue index 122aef03c..458b47999 100644 --- a/src/pages/home2/components/todoList/index.vue +++ b/src/pages/home2/components/todoList/index.vue @@ -1665,7 +1665,7 @@ export default { }else if(row.taskInfo === '企标制修订计划整改') { this.$router.push({ name: 'qbzxdjhgkStep1', - query:{ + query: { taskIds: row.taskIds, prcId: row.prcId, prcNum: row.prcNum, @@ -1674,11 +1674,25 @@ export default { } }) } - break - case 'laws2': - if (row.taskInfo === '责任对接人进行任务下发') { + break; + case "26": + if (row.taskInfo === "立项确认") { this.$router.push({ - name: 'zczqyjStep2', + name: "qbzxdlxStep2", + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }); + } + break; + case "laws2": + if (row.taskInfo === "责任对接人进行任务下发") { + this.$router.push({ + name: "zczqyjStep2", query: { taskIds: row.taskIds, prcId: row.prcId, diff --git a/src/pages/processCenter/pages/creatProcess/qbzxdlx/step1.vue b/src/pages/processCenter/pages/creatProcess/qbzxdlx/step1.vue index 32e0b76fc..d6c4eb3a0 100644 --- a/src/pages/processCenter/pages/creatProcess/qbzxdlx/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbzxdlx/step1.vue @@ -13,75 +13,77 @@ -
- - + + + + + - - - - 点击上传 - - - - -
- 新增 - 上传 - 模板下载 - 删除 + +
+ + + 点击上传 + +
- - - - - - - - - - - - - -
+ + + +
+
+ 新增 + 导入 + 模板下载 + 批量删除 +
+ + + + + + + + + + + + + + + +
@@ -121,7 +123,7 @@

责任工程师

- +
@@ -140,45 +142,78 @@ :wrapper-closable="false" custom-class="demo-drawer" > - - - + + + + + + - - + + - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + v-model="addQblxData.draftTime" + value-format="yyyy-MM-dd" + type="date" + placeholder="请选择计划标准初稿完成时间"> - + + v-model="addQblxData.releaseTime" + value-format="yyyy-MM-dd" + type="date" + placeholder="请选择计划标准发布时间"> - + + value-format="yyyy-MM-dd" + type="date" + placeholder="请选择立项完成时间"> @@ -187,7 +222,86 @@ 确认
- + + +
+
+
+
+ + + + + + + 查询 + + + + 清空 + + + +
+ + > + + + + + + + +
+ +
+
+ +
+ + + + @@ -211,21 +345,45 @@ import ProcessHeader from '../../components/ProcessHeader' import ProcessFooter from '../../components/ProcessFooter' import ProcessTitle from '../../components/ProcessTitle' +import MechanismTree from "@/components/mechanismTree"; import {completeTask, saveTaskFirst, taskDel, processBack, queryTaskFirst} from '@/api/process.js' export default { components: { ProcessHeader, ProcessFooter, + MechanismTree, ProcessTitle }, name: "qbzxdlxStep1", data() { return { + uploadFileListPath: "api/att/attFile/upload", // 上传的地址 + fileInfoList: [], // 上传的附件 + fileIds: [], // 上传的附件 + fileListName: [], //上传的附件名称 + standSortOptions: [], //企标类别下拉框 + nodeListZRBM: [], + workData: [], //工作组数据 + workChangeList: [], + modalshowflagZRBM: false, + modalshowflag2: false, + modalshowflag3: false, + workModel: false, + workSearch: { + workGroupName: "", + }, + total: 0, + page: 1, + pageSize: this.$store.getters.userInfo.configContent, + roleType: '', + drawerTitle: '', + drawerTitle2: '', + listIndex: 0, active: '1', qblx_pageData: { projectTarget: '', - qblxFile: [], + processName: '', qblxData: [], }, commentText: '', @@ -242,7 +400,6 @@ export default { acceptShow: false, // 上传所储存文件数组 fillFileList: [], - // 新增弹框 qblxTitle: '', btnType: '', @@ -257,16 +414,43 @@ export default { endTime: '', }, addRule: { - dutyPeople: [{required: true, message: '请选择责任人', trigger: ['blur', 'change']}] + // unit: [ + // { required: true, message: "请选择起草单位", trigger: "change" } + // ], + // bussSort: [ + // { required: true, message: "请选择企标类别", trigger: "blur" } + // ], + // esName: [ + // { required: true, message: "请输入企标名称", trigger: "blur" } + // ], + // reviseStatus: [ + // { required: true, message: "请选择制修订类型", trigger: "blur" } + // ], + // resPersonName: [ + // { required: true, message: "请输入评审责任人", trigger: "blur" } + // ], + // wgLeaderName: [ + // { required: true, message: "请输入工作组组长", trigger: "blur" } + // ], + // unitName: [ + // { required: true, message: "请选择起草责任单位", trigger: "blur" } + // ], + // draftTime: [ + // { required: true, message: "请输入计划标准初稿完成时间", trigger: "blur" } + // ], + // releaseTime: [ + // {required: true, message: '请输入计划标准发布时间', trigger: 'blur'}, + // ], + // drafterName: [ + // {required: true, message: '请选择起草人', trigger: 'change'}, + // ], }, - isSubmit: false, saveLoading: false, - // 选人组件 modalshowflag: false, nodeList: [], - + nodeList2: [], taskID: '', bpnId: '', @@ -286,8 +470,155 @@ export default { if (this.bpnId !== undefined) { this.getData() } + this.getWorkData() + //查询下拉框数据 + this.$http.get('sys/dictype/getDicTypeListCode', '',{ + _this: this + }, res => { + res.data.BUSSSTANDCLASS.forEach(item => { + if(item.label){ + this.standSortOptions.push(item) //企标类别 + } + }) + }) }, methods: { + getWorkBtn(){ + this.page = 1 + this.getWorkData() + }, + clearSearch(){ + this.workSearch.workGroupName = '' + this.getWorkData() + }, + pageChange(page){ + this.page = page + this.getWorkData() + }, + pageSizeChange(pageSize){ + this.pageSize = pageSize + this.getWorkData() + }, + workChange(data) { + this.workChangeList = data + }, + OkWork(){ + if(this.workChangeList.length > 1 ){ + this.$message.warning('您只能选择一条数据进行带入') + }else if(this.workChangeList.length < 1 ){ + this.$message.warning('请至少选择一条数据') + }else{ + this.$set(this.addQblxData, 'wgLeader', this.workChangeList[0].workLeaderId) + this.$set(this.addQblxData, 'wgLeaderName', this.workChangeList[0].workLeader) + if(this.addQblxData.wgLeaderName){ + this.$refs.qblx_pageData.validateField('wgLeaderName') + } + this.workModel = false + } + }, + getWorkData() { + this.$http.get("workGroup/work-group", { + pageSize: this.pageSize, + page: this.page, + workGroupName: this.workSearch.workGroupName + }, { + _this: this + }, res => { + this.workData = res.data.records; + this.total = res.data.total; + }, e => { + }); + }, + choiceLeader(){ + this.workModel = true + }, + choiceZRBM(type, title, id) { + this.nodeListZRBM = [] + this.nodeListZRBM.push(id) + this.drawerTitle = title + this.modalshowflagZRBM = true + }, + drawerCheckZRBM(data) { + let idList = '' + let nameList = '' + data.forEach(item => { + if (nameList.length) { + nameList += ',' + idList += ',' + } + idList += item.id + nameList += item.name + }) + this.$set(this.addQblxData, 'unit', idList) + this.$set(this.addQblxData, 'unitName', nameList) + if(this.addQblxData.unit){ + this.$refs.qblx_pageData.validateField('unit') + } + if(this.addQblxData.unitName){ + this.$refs.qblx_pageData.validateField('unitName') + } + }, + choiceZRRS(type) { + this.roleType = type + if(type === '1' ){ + this.drawerTitle2 = '请选择起草人' + this.nodeList2 = []; + if (this.addQblxData.drafter !== undefined) { + this.nodeList2 = this.addQblxData.drafter.split(","); + } + }else if(type === '2'){ + this.drawerTitle2 = '请选择评审责任人' + this.nodeList2 = []; + if (this.addQblxData.resPerson !== undefined) { + this.nodeList2 = this.addQblxData.resPerson.split(","); + } + } + this.modalshowflag2 = true; + }, + checkedRole(data) { + this.$set(this.addQblxData, 'wgLeader', data[0].id) + this.$set(this.addQblxData, 'wgLeaderName', data[0].name) + if(this.addQblxData.wgLeaderName){ + this.$refs.qblx_pageData.validateField('wgLeaderName') + } + this.modalshowflag = false; + }, + checkedRole2(data) { + console.log(data); + let idList = "", nameList = "" + let unitList = "", unitNameList = "" + data.forEach(item => { + if (nameList.length) { + nameList += ","; + idList += ","; + unitList += ","; + unitNameList += ","; + } + idList += item.id; + nameList += item.name; + unitList += item.institutionId + unitNameList += item.institutionName + }); + if(this.roleType === '1'){ + this.$set(this.addQblxData, 'drafter', idList) + this.$set(this.addQblxData, 'drafterName', nameList) + this.$set(this.addQblxData, 'unit', unitList) + this.$set(this.addQblxData, 'unitName', unitNameList) + }else if(this.roleType === '2'){ + this.$set(this.addQblxData, 'resPerson', idList) + this.$set(this.addQblxData, 'resPersonName', nameList) + } + // === '0' false null undefined都属于false类变量 如果里面有值可以直接判断 + if(this.addQblxData.drafterName){ + this.$refs.qblx_pageData.validateField('drafterName'); + } + if(this.addQblxData.unitName){ + this.$refs.qblx_pageData.validateField('unitName'); + } + if(this.addQblxData.resPersonName){ + this.$refs.qblx_pageData.validateField('resPersonName'); + } + }, // 右上标签页面切换 handleTabs(name) { this.active = name @@ -304,67 +635,50 @@ export default { }); }, - // 文件上传成功 - handleOnsuccess(res, file, fileList) { - if (res.ok) { - if (this.fillFileList.length !== 0) { - this.newDataList = this.fillFileList - this.newDataList.push({ - id: res.data.attId, - name: res.data.name - }) - } else { - this.newDataList.push({ - id: res.data.attId, - name: res.data.name - }) - } - this.qblx_pageData.qblxFile = this.newDataList - this.$message({ - showClose: true, - message: res.message, - type: 'success' - }) - this.fileMadel = false - } - }, - // 文件上传限制条件 - handleBeforeUpload(file) { - var filename = file.name - var index1 = filename.lastIndexOf('.') - var index2 = filename.length - var fileSuffix = filename.substring(index1, index2) - // const fileSuffix = file.name.split('.')[1] // 后缀名 - // 判断上传文件格式 - if (fileSuffix === '.ZIP' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.zip' || fileSuffix === '.xls' || fileSuffix === '.xlsx' || fileSuffix === '.pdf' || fileSuffix === '.PDF') { - return true - } else { - this.spinShow = false - this.$message.error('文件' + file.name + '格式不正确,请上传ZIP/DOCX/PDF或XLS文件') - return false - } - // 判断文件上传大小 - // eslint-disable-next-line no-unreachable - if (file.size / 1024 / 1024 <= 200) { - return true - } else { - this.$message.error('文件' + file.name + '大小不超过200M') - return false - } - return true - }, - // 移除上传的文件 - handleBeforeRemove(file, fileList) { - this.fillFileList.forEach((item, index) => { - if (item.name === file.name || item.id === file.id) { - this.fillFileList.splice(index, 1) + // 删除上传的文件 + delFileInfo(file, fileList) { + this.fileInfoList.forEach((item, index) => { + if (item.name === file.name || item.id === file.id ) { + this.fileInfoList.splice(index,1) } }) - this.qblx_pageData.qblxFile = this.fillFileList }, - // 限制上传 - handleExceed(files, fileList) { - this.$message.error(`最多上传1个文件`) + // 上传文件成功回调 + uploadBackSuccess(res, file, fileList) { + if (res.ok) { + this.fileInfoList.push(res.data) + this.$message.success("上传成功"); + } else { + this.$message.error(res.message); + fileList.pop(); + } + }, + // 相关附件 上传之前钩子 + beforeUpload(file) { + var filename = file.name; + // this.listForm.fileName = this.listForm.fileName + ',' + file.name + var index1 = filename.lastIndexOf("."); + var index2 = filename.length; + var fileSuffix = filename.substring(index1, index2); + //把后缀转大写 + if (fileSuffix !== undefined && fileSuffix !== null) { + fileSuffix = fileSuffix.toUpperCase(); + } + // 判断上传文件格式 + if (fileSuffix === ".PDF" || fileSuffix === ".DOC" || fileSuffix === ".DOCX" || fileSuffix === ".PPT" + || fileSuffix === ".PPTX" || fileSuffix === ".XLS" || fileSuffix === ".XLSX" + || fileSuffix === ".PNG" || fileSuffix === ".JPG" || fileSuffix === ".JPEG") { + return true; + } else { + this.$message.error("文件" + file.name + "格式不正确,请上传pdf、doc、docx、ppt、pptx、xls、xlsx、png、jpg、jpeg等文件"); + return false; + } + // 判断文件上传大小 + if (file.size / 1024 / 1024 > 300) { + this.$message.warning("文件" + file.name + "大小不能超过300M"); + return false; + } + return true; }, // 表格勾选事件 @@ -377,12 +691,17 @@ export default { this.nodeList = [] this.nodeList.push(id) this.type = type - this.modalshowflag = true + this.modalshowflag3 = true }, // 选人组件确认 drawerCheck(data) { - this.addQblxData.dutyPeopleId = data[0].id - this.addQblxData.dutyPeople = data[0].name + if(this.type === '1' ){ + this.addQblxData.dutyPeopleId = data[0].id + this.addQblxData.dutyPeople = data[0].name + }else{ + this.roleForm.dockUser = data[0].id + this.roleForm.dockUserName = data[0].name + } this.modalshowflag = false }, @@ -400,7 +719,16 @@ export default { this.qblx_pageData.qblxData.push(this.addQblxData) } this.addQblxData = {} - this.qblxModel = false + this.qblxModel = false + this.addQblxData = { + esName: '', + dutyUnit: '', + dutyPeopleId: '', + dutyPeople: '', + firstDraftTime: '', + planTime: '', + endTime : '' + } } }) }, @@ -456,8 +784,10 @@ export default { } }, - /** 数据上传到列表 */ - uploadQblx() {}, + /** 数据导入到列表 */ + uploadQblx() { + + }, /** 模板下载 */ qblxTemplate() {}, @@ -482,70 +812,79 @@ export default { this.saveLoading = false }) }, - - // 提交按钮 - handleSubmit() { - let json = { - prcCreateUser: this.$store.getters.userInfo.userId, - prcCreateUserName: this.$store.getters.userInfo.userName, - qblx_pageData: this.qblx_pageData, - commentText: this.commentText - } - this.$refs['qblx_pageData'].validate((valid) => { - if (valid) { - this.$refs['roleForm'].validate((valid) => { - if (valid) { - this.isSubmit = true - let paramsInfo = new FormData() - // paramsInfo.append('id', this.bpnId || '') - paramsInfo.append('createUser', this.$store.getters.userInfo.userId) - paramsInfo.append('createUserName', this.$store.getters.userInfo.userName) - paramsInfo.append('type', '26') - paramsInfo.append('json', JSON.stringify({json})) - processBack(paramsInfo).then(res => { - this.taskID = res.data - const params = new FormData(); - this.qblx_pageData.qblxData.forEach((item, index) => { - let newJson = { - prcCreateUser: this.$store.getters.userInfo.userId, - prcCreateUserName: this.$store.getters.userInfo.userName, - qblx_pageData: { - projectTarget: this.qblx_pageData.projectTarget, - qblxFile: this.qblx_pageData.qblxFile, - qblxData: item, - }, - commentText: this.commentText - } - params.set('json', JSON.stringify(newJson)) - params.set('userId', this.$store.getters.userInfo.userId) - params.set('taskId', this.taskID) - completeTask(params).then(res => { - if (res.success === true) { - if (index === this.qblx_pageData.qblxData.length) { - this.$message.success('提交成功') - if (this.bpnId !== '') { - let taskId = { - id: this.bpnId - } - taskDel(taskId).then(res => { - return res - }) - } - this.$router.push("/processCenter"); - } - } - this.isSubmit = false - }) - }) - }) - } else { - this.$message.warning('请完成流程信息的人员选择') - } + listSubmit (item) { + return new Promise((resolve, reject) => { + let newForm = Object.assign(this.roleForm, item,this.qblx_pageData); + this.$http.post('lawss/activiti/startProcessRollBack',{ + createUser: this.$store.getters.userInfo.userId, + createUserName: this.$store.getters.userInfo.userName, + type: '26', + json: JSON.stringify({ + form: newForm, + roleForm: this.roleForm, + commentText: this.commentText }) - } + },{ + _this: this + },res => { + if(res.ok){ + this.$http.post("lawss/activiti/completeTask", { + taskIds: res.data, + userId: this.$store.getters.userInfo.userId, + json: JSON.stringify(newForm) + }, { + _this: this + }, res => { + if (res.success) { + resolve() + this.$message.success(res.message); + if (this.bpnId !== '') { + let taskId = { + id: this.bpnId + } + taskDel(taskId).then(res=>{ + // return res + }) + } + // this.$router.push("/processCenter"); + } + }); + } + }) }) }, - + //流程提交事件 + handleSubmit() { + let jsonData = this.qblx_pageData.qblxData + this.qblx_pageData.qblxFile = this.fileInfoList + this.qblx_pageData.commentText = this.commentText; + this.$refs["qblx_pageData"].validate((valid) => { + if (valid) { + this.$refs["roleForm"].validate(async (valid) => { + if (valid) { + this.isSubmit = true + let finishCount = 0; + while (finishCount < jsonData.length) { + await this.listSubmit(jsonData[finishCount]) + .then(() => { + finishCount++ + }).catch(e => { + }) + } + if (finishCount === jsonData.length) { + this.isSubmit = false + this.$router.push("/processCenter"); + } + this.isSubmit = false + } else { + return this.$message.warning("请完善人员信息"); + } + }); + } else { + return this.$message.warning("请完善基础信息"); + } + }); + }, } } @@ -569,6 +908,7 @@ export default { /deep/ .el-drawer__container { .prc-content-border { + height: 100%; border: none; padding: 0 20px 0; } @@ -614,7 +954,7 @@ export default { .tableButton { position: absolute; - right: 0; + left: 0; top: 0; } } @@ -650,7 +990,6 @@ export default { border: 0; } } - } diff --git a/src/pages/processCenter/pages/creatProcess/qbzxdlx/step2.vue b/src/pages/processCenter/pages/creatProcess/qbzxdlx/step2.vue index 08840effb..6300cfc6c 100644 --- a/src/pages/processCenter/pages/creatProcess/qbzxdlx/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/qbzxdlx/step2.vue @@ -1,224 +1,872 @@ diff --git a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue index c30037169..4e8c42ae4 100644 --- a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue +++ b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue @@ -1330,6 +1330,20 @@ export default { }) } break + case "26": + if (row.taskInfo === "立项确认") { + this.$router.push({ + name: "qbzxdlxStep2", + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }); + } + break; case 'laws2': if (row.taskInfo === '责任对接人进行任务下发') { this.$router.push({ From cb633bea9e1e12369b8d59fca0dd21adc87b7f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Thu, 24 Feb 2022 16:24:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AF=84=E4=BC=B0=E6=B5=81=E7=A8=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/processCenter/pages/creatProcess/xmpg/step1.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue b/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue index f234e079a..984da41a7 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue @@ -99,6 +99,7 @@