From 2d26a801875edf68c8d265a1344f9641d5f96ccc Mon Sep 17 00:00:00 2001 From: zichen1019 <1510748736@qq.com> Date: Thu, 12 Aug 2021 13:48:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ysjl/1000/common/sz/gyscl.vue | 65 ++++++++++++------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/src/views/ysjl/1000/common/sz/gyscl.vue b/src/views/ysjl/1000/common/sz/gyscl.vue index df5d87f..65f63c8 100644 --- a/src/views/ysjl/1000/common/sz/gyscl.vue +++ b/src/views/ysjl/1000/common/sz/gyscl.vue @@ -23,7 +23,7 @@
基本信息 - + - @@ -278,24 +278,24 @@
使用的主要设备 - + - + - + - + @@ -453,10 +453,10 @@ export default { checkedTab: 'first', jyxmData: [], yqsbData: [ - { C1: '05-30-01', C2: '多功能电位滴定仪', C3: '05-26-01', C4: '锅炉用水多离子测定仪' }, - { C1: '05-07-06', C2: '台式电导率分析仪', C3: 'JS-25-01', C4: '碱式滴定管' }, - { C1: '010233100054', C2: 'PH计', C3: 'SS-25-05', C4: '酸式滴定管' }, - { C1: '05-13-03', C2: '台式浊度分析仪', C3: '05-04-04', C4: '电子天平' } + { D4: '05-30-01', D3: '多功能电位滴定仪', D2: '05-26-01', D1: '锅炉用水多离子测定仪' }, + { D4: '05-07-06', D3: '台式电导率分析仪', D2: 'JS-25-01', D1: '碱式滴定管' }, + { D4: '010233100054', D3: 'PH计', D2: 'SS-25-05', D1: '酸式滴定管' }, + { D4: '05-13-03', D3: '台式浊度分析仪', D2: '05-04-04', D1: '电子天平' } ], // 表格合并相关 // 参与列合并的字段,在这里增加即可 @@ -490,13 +490,11 @@ export default { }, computed: { jilubianhao: function() { - let bianhao - if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') { - return this.jlbh1 + this.jlbh2 + '-' + this.jlbh3 + if (this.ysjl.jilubianhao) { + return this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id) } else { - bianhao = this.ysjl.jilubianhao + return this.jlbh1 + this.jlbh2 + '-' + this.jlbh3 } - return this.judgeRepeat(bianhao, this.ysjl.id) } }, watch: { @@ -513,8 +511,7 @@ export default { this.initYsjl() } else { this.getYsjl(this.ysjlId) - this.getFbjyxm(this.ysjlId) - this.getJyxmByYsjl(this.ysjlId) + this.getJyxmInfoByYsjl() } }, methods: { @@ -560,7 +557,7 @@ export default { ysjlId: id } }).then(data => { - this.ysjl = data.ysjl + this.ysjl = data if (this.ysjl.jianyanrenyuan) { this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) } @@ -569,6 +566,7 @@ export default { } this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id) this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima) + this.getJyxmByYsjl() }) }, getParam(ysjlId, sbzldm) { @@ -625,30 +623,32 @@ export default { this.tableJs.getData(this.cols, this.rows, this.jyxmData) }) }, - // 查询仪器设备 - getFbjyxm(id) { + /** + * 查询仪器设备 + */ + getJyxmInfoByYsjl() { this.api({ url: '/jyxm/getJyxmInfoByYsjl', method: 'get', params: { - ysjlId: id, - type: 'fbjyxm' + ysjlId: this.ysjlId } }).then(data => { - this.yqsbData = JSON.parse(data) + this.yqsbData = JSON.parse(data.fbjyxm)[0] }) }, - getJyxmByYsjl(id) { + getJyxmByYsjl() { this.api({ url: '/jyxm/getCyJyxmByYsjl', method: 'get', params: { - ysjlId: id, + ysjlId: this.ysjlId, + templateId: this.ysjl.templateId, isReport: false, order: 1 } }).then(data => { - this.jyxmData = JSON.parse(JSON.stringify(data)) + this.jyxmData = data this.tableJs.getData(this.cols, this.rows, this.jyxmData) }) }, @@ -723,9 +723,8 @@ export default { } else { this.$refs['param'].validate(valid => { if (valid) { - const tableData = [] // 检验项目存储 - tableData.push(this.getProp(operation)) - const jyxm = JSON.stringify([tableData]) + // 检验项目存储 + const jyxm = JSON.stringify([this.getProp(operation)]) this.api({ url: '/ysjl', method: type, @@ -734,7 +733,7 @@ export default { param: this.param, cyJyxm: { jyxm: jyxm, - fbjyxm: JSON.stringify(this.yqsbData), + fbjyxm: JSON.stringify([this.yqsbData]), bgjyxm: jyxm }, flag: operation