From 1568defda69c12c3fd581e36bc3c5c9a9a588fc2 Mon Sep 17 00:00:00 2001 From: shen_yan_pu <1975145892@qq.com> Date: Tue, 17 Aug 2021 15:54:49 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=A0=87=E5=87=86=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=B5=81=E7=A8=8B=E4=B8=8A=E4=BC=A0=E4=B8=8E?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzqdfb/step1-1.vue | 81 ++++--- .../pages/creatProcess/bzqdfb/step1-3.vue | 80 ++++--- .../pages/creatProcess/bzqdfb/step1.vue | 203 +++++++++--------- .../pages/creatProcess/bzqdfb/step2.vue | 8 +- .../pages/creatProcess/bzqdfb/step3.vue | 87 +++++--- .../pages/creatProcess/bzqdfb/step4.vue | 8 +- .../pages/creatProcess/wfhxzg/step4.vue | 1 - 7 files changed, 256 insertions(+), 212 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1-1.vue b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1-1.vue index 161d06192..ab09a65c8 100644 --- a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1-1.vue @@ -1064,6 +1064,7 @@ export default { //保存事件 handleSave() { this.saveLoading = true; + this.listForm.fileName = this.fileInfoList let _formData = new FormData(); _formData.append("id", this.bpnId || ""); _formData.append("createUser", this.$store.getters.userInfo.userId); @@ -1089,6 +1090,7 @@ export default { this.$message.warning("标准不能为空"); } else { this.listForm.commentText = this.commentText + this.listForm.fileName = this.fileInfoList var json = Object.assign(this.listForm, this.roleForm); this.$refs["qdfbForm"].validate((valid) => { if (valid) { @@ -1126,14 +1128,11 @@ export default { }, // 删除上传的文件 delFileInfo(file, fileList) { - let middle = []; - let files = []; - fileList.forEach(item => { - middle.push(item.name); - files.push(item.response.data.id); - }); - this.fileListName = middle; - this.fileIds = files; + this.fileInfoList.forEach((item, index) => { + if (item.name === file.name || item.id === file.id ) { + this.fileInfoList.splice(index,1) + } + }) }, fileUpload() { this.fileMadel = true; @@ -1141,24 +1140,7 @@ export default { // 上传文件成功回调 uploadBackSuccess(res, file, fileList) { if (res.ok) { - let middle = []; - fileList.forEach(item => { - middle.push(item.name); - }); - this.fileListName = middle; - this.fileIds.push(file.response.data.id); - // this.listForm.fileName = this.fileListName.join(','); - // this.listForm.fileId = this.fileIds.join(','); - // if (this.listForm.fileName === null || this.listForm.fileName === undefined) { - // this.listForm.fileName = this.fileListName.join(","); - // } else { - // this.listForm.fileName = this.listForm.fileName + "," + this.fileListName.join(","); - // } - // if (this.listForm.fileId === null || this.listForm.fileId === undefined) { - // this.listForm.fileId = this.fileIds.join(","); - // } else { - // this.listForm.fileId = this.listForm.fileId + "," + this.fileIds.join(","); - // } + this.fileInfoList.push(res.data) this.$message.success("上传成功"); } else { this.$message.error(res.message); @@ -1290,26 +1272,39 @@ export default { //选择清单确定事件 OkDrawer() { if (this.selectedList.length === 1) { - let deposit = new Map(); - this.sarAccessListDatas.forEach(item => { - deposit.set(item.id, item); - }); - let bringData = []; - for (let i = 0; i < this.selectedList.length; i++) { - bringData.push(deposit.get(this.selectedList[i])); + this.listForm.standId = this.selectedList[0].id; + this.listForm.listName = this.selectedList[0].detailedListName; + this.listForm.descriptionList = this.selectedList[0].remark; + // 将查询出的文件名字和id组合成数组 + if(this.selectedList[0].fileName !== null) { + let textName = this.selectedList[0].fileName.split(',').map(item => { + return { + name: item + } + }) + let textId = this.selectedList[0].fileIds.split(',').map(item => { + return { + id: item + } + }) + textName.forEach(item => { + this.$set(item, 'id', '') + }) + for (let i = 0; i< textName.length; i++) { + textName[i].id = textId[i].id + } + this.fileInfoList = textName + } else { + this.fileInfoList = [] } - this.listForm.standId = bringData[0].id; - this.listForm.listName = bringData[0].detailedListName; - this.listForm.descriptionList = bringData[0].remark; - this.listForm.fileId = bringData[0].fileIds; - this.listForm.fileName = bringData[0].fileName; this.ListModel = false; + this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", - { id: bringData[0].id, page: this.page, Size: this.pageSize }, { + { id: this.selectedList[0].id, page: this.page, Size: this.pageSize }, { _this: this }, res => { - if (res.data.records == null) { - res.data.records = []; + if (res.data === null) { + this.dataList = []; } this.dataList = res.data.records; this.dataList.forEach(item => { @@ -1321,7 +1316,7 @@ export default { this.$set(item, "ZCCSSRQ", item.zccssrqgj); } }) - this.listForm.dataList = res.data; + this.listForm.dataList = res.data.records; let formId = []; this.dataList.map(item => { formId.push(item.id); @@ -1339,7 +1334,7 @@ export default { selectListChange(data) { this.selectedList = []; for (let i = 0; i < data.length; i++) { - this.selectedList.push(data[i].id); + this.selectedList.push(data[0]); } }, //标准表格选择框改变 diff --git a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1-3.vue b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1-3.vue index 29e3b1b73..3c0173b7e 100644 --- a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1-3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1-3.vue @@ -37,26 +37,21 @@ > -
-

{{ item.name }} - - -

-
-
- 暂无数据 -
+ + + 点击上传 + +
@@ -479,7 +474,7 @@ export default { this.dataList = mes.form.dataList; this.commentText = mes.commentText; this.prcNum = mes.prcNum - this.fileIds = mes.form.fileId; + this.fileInfoList = mes.form.fileName; this.getFileInfo(); this.processTable(); }); @@ -652,13 +647,16 @@ export default { }, // 删除上传的文件 delFileInfo (file, fileList) { - this.fileInfoList = fileList + this.fileInfoList.forEach((item, index) => { + if (item.name === file.name || item.id === file.id ) { + this.fileInfoList.splice(index,1) + } + }) }, // 上传文件成功回调 uploadBackSuccess (res, file, fileList) { if (res.ok) { - this.fileInfoList = fileList - this.fileInfoList[this.fileInfoList.length - 1].id = res.data.id + this.fileInfoList.push(res.data) this.$message.success('上传成功') } else { this.$message.error(res.message) @@ -666,8 +664,38 @@ export default { } }, //上传之前的钩子 - beforeUpload () { - + //上传之前的钩子 + 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; + }, + handleOnPreview(file) { + let attId = file.id + if (attId != null && attId !== "") { + window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId; + } }, //保存事件 handleSave() { diff --git a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue index 29e7e318c..1ff1baf56 100644 --- a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue @@ -50,23 +50,20 @@
-

- {{ listForm.fileName }} - - - 点击上传 - - -

+ + + 点击上传 + +
@@ -108,7 +105,8 @@ label="标准号"> @@ -705,7 +710,7 @@ import ProcessHeader from "../../components/ProcessHeader"; import ProcessFooter from "../../components/ProcessFooter"; import ProcessTitle from "../../components/ProcessTitle"; -import { saveTaskFirst } from "api/process"; +import {saveTaskFirst} from "api/process"; import seeDatalis from "@/pages/localTool/standContrast/pages/seeDatalis"; export default { @@ -755,21 +760,21 @@ export default { }, formRules: { listType: [ - { required: true, message: "请选择清单类型", trigger: "change" } + {required: true, message: "请选择清单类型", trigger: "change"} ], listName: [ - { required: true, message: "请填写清单名称", trigger: "change" } + {required: true, message: "请填写清单名称", trigger: "change"} ] }, roleFormRules: { dockUserName: [ - { required: true, message: "请选择会签责任人", trigger: "change" } + {required: true, message: "请选择会签责任人", trigger: "change"} ], ministerUserName: [ - { required: true, message: "请选择修订责任人", trigger: "change" } + {required: true, message: "请选择修订责任人", trigger: "change"} ], directorUserName: [ - { required: true, message: "请选择审批责任人", trigger: "change" } + {required: true, message: "请选择审批责任人", trigger: "change"} ] }, dataList: [],//清单里的标准数据 @@ -913,14 +918,14 @@ export default { _this: this }, res => { this.sarAccessListDatas = res.data.records; - this.sarAccessListDatas.forEach(item =>{ + this.sarAccessListDatas.forEach(item => { // 适用车型转换 if (item.carType !== null) { let k = (item.carType || "").split(',') for (let i in this.energyKindOptions) { - for (let m = 0; m< k.length; m++) { + for (let m = 0; m < k.length; m++) { if (this.energyKindOptions[i].value === k[m]) { - k[m] = this.energyKindOptions[i].label + k[m] = this.energyKindOptions[i].label } item.carType = k.join(',') } @@ -984,12 +989,12 @@ export default { }, res => { this.standardData = res.data.list; this.standardData.forEach(item => { - if(item.attrInfoMap === null){ - this.$set(item, "ZCCSSRQ", ''); - this.$set(item, "XCXSSRQ", ''); - }else{ - this.$set(item, "ZCCSSRQ", item.attrInfoMap.ZCCSSRQ); - this.$set(item, "XCXSSRQ", item.attrInfoMap.XCXSSRQ); + if (item.attrInfoMap === null) { + this.$set(item, "ZCCSSRQ", ''); + this.$set(item, "XCXSSRQ", ''); + } else { + this.$set(item, "ZCCSSRQ", item.attrInfoMap.ZCCSSRQ); + this.$set(item, "XCXSSRQ", item.attrInfoMap.XCXSSRQ); } }) this.totalNo = res.data.count; @@ -1036,6 +1041,7 @@ export default { //保存事件 handleSave() { this.saveLoading = true; + this.listForm.fileName = this.fileInfoList let _formData = new FormData(); _formData.append("id", this.bpnId || ""); _formData.append("createUser", this.$store.getters.userInfo.userId); @@ -1061,13 +1067,14 @@ export default { this.$message.warning("标准不能为空"); } else { this.listForm.commentText = this.commentText + this.listForm.fileName = this.fileInfoList var json = Object.assign(this.listForm, this.roleForm); this.$refs["qdfbForm"].validate((valid) => { if (valid) { this.$refs["Form"].validate((valid) => { if (valid) { this.isSubmit = true - this.$http.get("lawss/activiti/startProcess", { type: "4" }, { + this.$http.get("lawss/activiti/startProcess", {type: "4"}, { _this: this }, res => { if (res.ok) { @@ -1098,14 +1105,11 @@ export default { }, // 删除上传的文件 delFileInfo(file, fileList) { - let middle = []; - let files = []; - fileList.forEach(item => { - middle.push(item.name); - files.push(item.response.data.id); - }); - this.fileListName = middle; - this.fileIds = files; + this.fileInfoList.forEach((item, index) => { + if (item.name === file.name || item.id === file.id ) { + this.fileInfoList.splice(index,1) + } + }) }, fileUpload() { this.fileMadel = true; @@ -1113,24 +1117,7 @@ export default { // 上传文件成功回调 uploadBackSuccess(res, file, fileList) { if (res.ok) { - let middle = []; - fileList.forEach(item => { - middle.push(item.name); - }); - this.fileListName = middle; - this.fileIds.push(file.response.data.id); - // this.listForm.fileName = this.fileListName.join(','); - // this.listForm.fileId = this.fileIds.join(','); - if (this.listForm.fileName === null || this.listForm.fileName === undefined || this.listForm.fileName === '') { - this.listForm.fileName = this.fileListName.join(","); - } else { - this.listForm.fileName = this.listForm.fileName + "," + this.fileListName.join(","); - } - if (this.listForm.fileId === null || this.listForm.fileId === undefined || this.listForm.fileName === '') { - this.listForm.fileId = this.fileIds.join(","); - } else { - this.listForm.fileId = this.listForm.fileId + "," + this.fileIds.join(","); - } + this.fileInfoList.push(res.data) this.$message.success("上传成功"); } else { this.$message.error(res.message); @@ -1262,30 +1249,39 @@ export default { //选择清单确定事件 OkDrawer() { if (this.selectedList.length === 1) { - let deposit = new Map(); - this.sarAccessListDatas.forEach(item => { - deposit.set(item.id, item); - }); - let bringData = []; - for (let i = 0; i < this.selectedList.length; i++) { - bringData.push(deposit.get(this.selectedList[i])); - } - this.listForm.standId = bringData[0].id; - this.listForm.listName = bringData[0].detailedListName; - this.listForm.descriptionList = bringData[0].remark; - this.listForm.fileId = bringData[0].fileIds; - if(bringData[0].fileName === null ){ - this.listForm.fileName = '' + this.listForm.standId = this.selectedList[0].id; + this.listForm.listName = this.selectedList[0].detailedListName; + this.listForm.descriptionList = this.selectedList[0].remark; + // 将查询出的文件名字和id组合成数组 + if(this.selectedList[0].fileName !== null) { + let textName = this.selectedList[0].fileName.split(',').map(item => { + return { + name: item + } + }) + let textId = this.selectedList[0].fileIds.split(',').map(item => { + return { + id: item + } + }) + textName.forEach(item => { + this.$set(item, 'id', '') + }) + for (let i = 0; i< textName.length; i++) { + textName[i].id = textId[i].id + } + this.fileInfoList = textName } else { - this.listForm.fileName = bringData[0].fileName; + this.fileInfoList = [] } this.ListModel = false; + this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", - { id: bringData[0].id, page: this.page, Size: this.pageSize }, { + { id: this.selectedList[0].id, page: this.page, Size: this.pageSize }, { _this: this }, res => { - if (res.data.records == null) { - res.data.records = []; + if (res.data === null) { + this.dataList = []; } this.dataList = res.data.records; this.dataList.forEach(item => { @@ -1315,7 +1311,7 @@ export default { selectListChange(data) { this.selectedList = []; for (let i = 0; i < data.length; i++) { - this.selectedList.push(data[i].id); + this.selectedList.push(data[0]); } }, //标准表格选择框改变 @@ -1349,7 +1345,6 @@ export default { }); }, pageChange(page) { - console.log(page); this.page = page; this.selectionList(); }, diff --git a/src/pages/processCenter/pages/creatProcess/bzqdfb/step2.vue b/src/pages/processCenter/pages/creatProcess/bzqdfb/step2.vue index e53ece967..83d65f7c4 100644 --- a/src/pages/processCenter/pages/creatProcess/bzqdfb/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzqdfb/step2.vue @@ -315,7 +315,6 @@ export default { taskIds: this.taskIds, pId: this.pId }).then(res => { - console.log(res.mesg); if (res) { const processForm = JSON.parse(res.mesg); this.getFormFieldList(processForm); @@ -330,15 +329,16 @@ export default { getFormFieldList(item) { this.$nextTick(() => { this.listForm = JSON.parse(JSON.stringify(item)); - console.log(this.listForm.fileName); this.listForm.prcNum = this.prcNum; this.listForm.prcName = this.prcName; this.listForm["id"] = item.id; this.dataList = item.dataList; this.listForm.jlUserId = item.jlUserId; this.listForm.zrUserId = item.zrUserId; - this.fileIds = item.fileId; - this.getFileInfo(); + item.fileName.forEach(itemId => { + this.fileIds = itemId.id + this.getFileInfo(); + }); }); }, // 请求上传的文件信息 diff --git a/src/pages/processCenter/pages/creatProcess/bzqdfb/step3.vue b/src/pages/processCenter/pages/creatProcess/bzqdfb/step3.vue index 04d2e535d..b6bb64a81 100644 --- a/src/pages/processCenter/pages/creatProcess/bzqdfb/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzqdfb/step3.vue @@ -52,26 +52,21 @@ > -
-

{{ item.name }} - - -

-
-
- 暂无数据 -
+ + + 点击上传 + +
@@ -611,7 +606,7 @@ export default { } }, // 请求上传的文件信息 - getFileInfo() { + /* getFileInfo() { this.$http.get("att/attFile/getMultiFileInfos", { fileIds: this.fileIds }, { @@ -630,7 +625,7 @@ export default { }); }, e => { }); - }, + },*/ /** * @Description: 点击下载 */ @@ -655,13 +650,16 @@ export default { }, // 删除上传的文件 delFileInfo (file, fileList) { - this.fileInfoList = fileList + this.fileInfoList.forEach((item, index) => { + if (item.name === file.name || item.id === file.id ) { + this.fileInfoList.splice(index,1) + } + }) }, // 上传文件成功回调 uploadBackSuccess (res, file, fileList) { if (res.ok) { - this.fileInfoList = fileList - this.fileInfoList[this.fileInfoList.length - 1].id = res.data.id + this.fileInfoList.push(res.data) this.$message.success('上传成功') } else { this.$message.error(res.message) @@ -669,8 +667,37 @@ export default { } }, //上传之前的钩子 - beforeUpload () { - + 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; + }, + handleOnPreview(file) { + let attId = file.id + if (attId != null && attId !== "") { + window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId; + } }, getData() { return new Promise((resolve, reject) => { @@ -701,14 +728,12 @@ export default { this.listForm.applyUpdUserId = item.applyUpdUserId this.listForm.jlUserId = item.jlUserId this.listForm.zrUserId = item.zrUserId - this.fileIds = item.fileId; - this.getFileInfo(); + this.fileInfoList = item.fileName } else { this.listForm = item.form this.dataList = item.form.dataList this.listForm.dataList = item.form.dataList - this.fileIds = item.form.fileId; - this.getFileInfo(); + this.fileInfoList = item.form.fileName } }) }, diff --git a/src/pages/processCenter/pages/creatProcess/bzqdfb/step4.vue b/src/pages/processCenter/pages/creatProcess/bzqdfb/step4.vue index f1966e1a7..ca068a8c6 100644 --- a/src/pages/processCenter/pages/creatProcess/bzqdfb/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzqdfb/step4.vue @@ -375,13 +375,15 @@ export default { this.listForm.prcName = this.prcName; this.listForm["id"] = item.id; this.listForm.dataList = item.dataList; + console.log(item.dataList) this.dataList = item.dataList; this.listForm.applyUpdUserId = item.applyUpdUserId; this.listForm.jlUserId = item.jlUserId; this.listForm.zrUserId = item.zrUserId; - this.fileIds = item.fileId; - console.log(this.fileIds); - this.getFileInfo(); + item.fileName.forEach(itemId => { + this.fileIds = itemId.id + this.getFileInfo(); + }) }); }, // 请求上传的文件信息 diff --git a/src/pages/processCenter/pages/creatProcess/wfhxzg/step4.vue b/src/pages/processCenter/pages/creatProcess/wfhxzg/step4.vue index 0bce9bc75..ffb4d7f5c 100644 --- a/src/pages/processCenter/pages/creatProcess/wfhxzg/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/wfhxzg/step4.vue @@ -385,7 +385,6 @@ export default { this.fileData = fileList this.fileTextList.forEach((item, index) => { if (item.name === file.name || item.id === file.id ) { - console.log() this.fileTextList.splice(index,1) } }) From 9a8bf90afbfbb6371162ee315fd25c0c18122b7a Mon Sep 17 00:00:00 2001 From: shen_yan_pu <1975145892@qq.com> Date: Tue, 17 Aug 2021 16:09:24 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=A0=87=E5=87=86=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8E=BB=E9=99=A4=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzqdfb/step4.vue | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzqdfb/step4.vue b/src/pages/processCenter/pages/creatProcess/bzqdfb/step4.vue index ca068a8c6..2cbe932a9 100644 --- a/src/pages/processCenter/pages/creatProcess/bzqdfb/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzqdfb/step4.vue @@ -37,27 +37,6 @@ clearable > - - - - - - - - - - - - - - - - - - - - -

Date: Tue, 17 Aug 2021 16:09:38 +0800 Subject: [PATCH 3/4] commit --- src/pages/processCenter/pages/creatProcess/xmpg2/step5.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/processCenter/pages/creatProcess/xmpg2/step5.vue b/src/pages/processCenter/pages/creatProcess/xmpg2/step5.vue index 421f5c544..4eb490482 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg2/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg2/step5.vue @@ -349,7 +349,7 @@ export default { let aa = { key: item.standId, id: item.id, - standId: item.itemsNum, + standId: item.id, itemsNum: item.itemsNum, itemsName: item.itemsName, workPeople: "请选择责任人" From 8d22b39cebc52a6da63a04806af712ba86e6a8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Tue, 17 Aug 2021 16:12:58 +0800 Subject: [PATCH 4/4] commit --- .../pages/creatProcess/xmpg2/step1-1.vue | 1 + .../pages/creatProcess/xmpg2/step1.vue | 1 + .../pages/creatProcess/xmpg2/step4.vue | 2 +- .../pages/details.vue | 124 +++++++++++------- 4 files changed, 77 insertions(+), 51 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/xmpg2/step1-1.vue b/src/pages/processCenter/pages/creatProcess/xmpg2/step1-1.vue index 8359b012e..690d3e50f 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg2/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg2/step1-1.vue @@ -480,6 +480,7 @@ export default { this.projectId = this.selectedList[0].id; this.listForm.projectNumber = this.selectedList[0].projectNumber; this.listForm.projectName = this.selectedList[0].projectName; + this.listForm.productLine = this.selectedList[0].productLine; this.getStandData(); this.projectModel = false; } diff --git a/src/pages/processCenter/pages/creatProcess/xmpg2/step1.vue b/src/pages/processCenter/pages/creatProcess/xmpg2/step1.vue index f5c6021b1..65545af80 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg2/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg2/step1.vue @@ -478,6 +478,7 @@ export default { this.projectId = this.selectedList[0].id; this.listForm.projectNumber = this.selectedList[0].projectNumber; this.listForm.projectName = this.selectedList[0].projectName; + this.listForm.productLine = this.selectedList[0].productLine; this.getStandData(); this.projectModel = false; } diff --git a/src/pages/processCenter/pages/creatProcess/xmpg2/step4.vue b/src/pages/processCenter/pages/creatProcess/xmpg2/step4.vue index cefaecdc1..583ed86e1 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg2/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg2/step4.vue @@ -335,7 +335,6 @@ export default { taskIds: this.taskIds, pId: this.pId }).then(res => { - console.log(res.mesg); if (res) { const processForm = JSON.parse(res.mesg); this.getFormFieldList(processForm); @@ -394,6 +393,7 @@ export default { this.isSubmit = true; this.listForm.commentText = this.commentText; const json = JSON.stringify(this.listForm); + console.log(json); this.$http.post("lawss/activiti/completeTask", { taskIds: this.taskIds, userId: this.userId, diff --git a/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/details.vue b/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/details.vue index c56b05480..879ff25bd 100644 --- a/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/details.vue +++ b/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/details.vue @@ -76,10 +76,14 @@ width="260px" > - - { - if (res.ok) { - // this.$message.success(res.message) - this.getDataList() - } - }, e => { - }); - } - this.standList = [] - this.standList1 = [] - _this.standModel = false; - } + okStand(){ + if(this.standList.length > 0){ + this.standList.forEach(item => { + let addIndex + addIndex = this.dataList.findIndex(items => { + return items.standId === item.id + }) + if(addIndex > -1){ + this.$message.warning('请勿重复添加数据') + }else{ + this.dataList.push(item) + } + }) + }else{ + this.$message.warning('请至少选择一条数据进行添加') + } }, + // okStand() { + // let _this = this; + // if (this.standList.length < 1) { + // _this.$message.warning("请选择标准"); + // } else { + // for (let i = 0; i < this.dataList.length; i++) { + // let newStand = false; + // for (let j = 0; j < this.standList.length; j++) { + // if (this.standList[j].id == this.dataList[i].standId) { + // newStand = true; + // this.standList.splice(j, 1) + // j-- + // } + // } + // if (newStand) { + // _this.$message.warning("请勿重复添加数据"); + // } else { + // // _this.dataList.push(item); + // } + // } + // this.standardData = [] + // _this.standModel = false; + // for (var i = 0; i < this.standList.length; i++) { + // this.standList1.push({ + // standId: this.standList[i].id, + // projectId: this.localProEO.id + // }) + // } + // if (this.standList1 != '') { + // this.$http.postData("sarStandProjectLibrary/batchInsert", this.standList1, { + // _this: this + // }, res => { + // if (res.ok) { + // // this.$message.success(res.message) + // this.getDataList() + // } + // }, e => { + // }); + // } + // this.standList = [] + // this.standList1 = [] + // _this.standModel = false; + // } + // }, //获取标准 getStandrd(data){ this.detailedId = data.id @@ -763,6 +779,14 @@ export default { this.standModel = true; } this.standardData = res.data.records + this.standardData.forEach(item => { + if(item.zccssrqgj === '-'){ + item.zccssrqgj = '' + } + if(item.xcxssrqgj === '-'){ + item.xcxssrq = '' + } + }) this.totalDo = res.data.total this.standModel = true; })