From 0f4bae13b1212609d75d44ba6c91bb242bd41b25 Mon Sep 17 00:00:00 2001 From: zichen1019 <1510748736@qq.com> Date: Wed, 11 Aug 2021 18:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B=E6=AC=A1=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E6=97=A5=E6=9C=9F=E7=9A=84=E8=8E=B7=E5=8F=96=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BD=BF=E7=94=A8=E7=9A=84=E4=B8=BB=E8=A6=81?= =?UTF-8?q?=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ysjl/1000/common/sz/gyscl.vue | 45 ++++++++++--------------- src/views/ysjl/1000/dj/wb/gywb.vue | 6 ++-- 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/src/views/ysjl/1000/common/sz/gyscl.vue b/src/views/ysjl/1000/common/sz/gyscl.vue index b8c3662..b40ddca 100644 --- a/src/views/ysjl/1000/common/sz/gyscl.vue +++ b/src/views/ysjl/1000/common/sz/gyscl.vue @@ -278,34 +278,24 @@
使用的主要设备 - + - + - + - + - - - - - - @@ -463,10 +453,10 @@ export default { checkedTab: 'first', jyxmData: [], yqsbData: [ - { C1: '☑', C2: '05-30-01', C3: '多功能电位滴定仪', C4: '☑', C5: '05-26-01', C6: '锅炉用水多离子测定仪' }, - { C1: '☑', C2: '05-07-06', C3: '台式电导率分析仪', C4: '☑', C5: 'JS-25-01', C6: '碱式滴定管' }, - { C1: '☑', C2: '010233100054', C3: 'PH计', C4: '☑', C5: 'SS-25-05', C6: '酸式滴定管' }, - { C1: '☑', C2: '05-13-03', C3: '台式浊度分析仪', C4: '☑', C5: '05-04-04', C6: '电子天平' } + { 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: '电子天平' } ], // 表格合并相关 // 参与列合并的字段,在这里增加即可 @@ -544,6 +534,7 @@ export default { }).then(data => { this.ysjl = data.ysjl this.param = (data.param !== null && data.param !== undefined) ? data.param : {} + this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') this.getXcjyrq() this.ysjl.jilubianhao = this.jilubianhao this.ysjl.baogaobianhao = null // 避免从设备中取值导致信息错误 @@ -563,7 +554,7 @@ export default { }, getYsjl(id) { this.api({ - url: '/ysjl/getYsjlById', + url: '/ysjl', method: 'get', params: { ysjlId: id @@ -608,7 +599,7 @@ export default { url: '/jyxm/getCyJyxm', method: 'get', params: { - templateId: this.ysjl.modelId, + templateId: this.ysjl.templateId, order: sort } }).then(data => { @@ -867,9 +858,9 @@ export default { }) }, getXcjyrq() { - var dateTemp = this.ysjl.jianyanjieshuriqi.split('-') - const xcjyrq = new Date((Number(dateTemp[0]) + 1) + '-' + dateTemp[1] + '-' + dateTemp[2]) - this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1) + const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi) + xcjyrq.setFullYear(xcjyrq.getFullYear() + 1, xcjyrq.getMonth(), xcjyrq.getDate() - 1) + this.ysjl.xiacijianyanriqi = this.formatter.dateFormat('YYYY-MM-dd', xcjyrq) }, setRounding(index) { if (isNaN(this.jyxmData[index].c1) || isNaN(this.jyxmData[index].c2)) { diff --git a/src/views/ysjl/1000/dj/wb/gywb.vue b/src/views/ysjl/1000/dj/wb/gywb.vue index 9543598..b8d6955 100644 --- a/src/views/ysjl/1000/dj/wb/gywb.vue +++ b/src/views/ysjl/1000/dj/wb/gywb.vue @@ -687,9 +687,9 @@ export default { }) }, getXcjyrq() { - var dateTemp = this.ysjl.jianyanjieshuriqi.split('-') - const xcjyrq = new Date((Number(dateTemp[0]) + 1) + '-' + dateTemp[1] + '-' + dateTemp[2]) - this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1) + const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi) + xcjyrq.setFullYear(xcjyrq.getFullYear() + 1, xcjyrq.getMonth(), xcjyrq.getDate() - 1) + this.ysjl.xiacijianyanriqi = this.formatter.dateFormat('YYYY-MM-dd', xcjyrq) }, // F5刷新监听 beforeunloadHandler(e) {