From bb4fc2616100401a06318b028c7d2f89cf1e4500 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, 19 Aug 2021 18:04:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzqdfb/step1.vue | 1 + .../pages/details.vue | 123 +++++++++--------- src/sysConfig/index.js | 6 +- 3 files changed, 68 insertions(+), 62 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue index 7bc613d02..8864b3131 100644 --- a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue @@ -1224,6 +1224,7 @@ export default { }, //添加标准确定事件 okStand() { + this.getStandData(); if (this.standList.length < 1) { this.$message.warning("请选择需要添加进清单的数据"); } else { diff --git a/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/details.vue b/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/details.vue index 879ff25bd..b76465bb6 100644 --- a/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/details.vue +++ b/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/details.vue @@ -700,67 +700,72 @@ export default { 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; + // this.detailedListModel = false + // this.standModel = false + // okStand(){ + // console.log(this.dataList); + // if(this.standList.length < 1){ + // this.$message.warning('请至少选择一条数据进行添加') + // }else{ + // this.standList.map(item => { + // let addIndex; + // addIndex = this.dataList.findIndex(items => { + // return items.standId == item.id + // }) + // console.log(addIndex); + // if(addIndex > -1){ + // this.$message.warning('请勿重复添加数据') + // }else{ + // this.dataList.push(item) + // } + // }) + // // } // }, + 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 diff --git a/src/sysConfig/index.js b/src/sysConfig/index.js index efe1b4c11..d3cd25a02 100644 --- a/src/sysConfig/index.js +++ b/src/sysConfig/index.js @@ -4,10 +4,10 @@ * @date: 2018-09-04 17:47:46 */ // 服务器地址 -// const devIp = '10.96.10.171' -// const devInterfacePORT = '9999' -const devIp = '10.96.170.156' +const devIp = '10.96.10.171' const devInterfacePORT = '9999' +// const devIp = '10.5.103.101' +// const devInterfacePORT = '9999' // 云端端口号 const DEV_CLOUD_RES_INTERFACE_PORT = '7777' const simpleFilePath = 'att/attFile/upload'