From 37d07cf2071e89c84778746468a1439497832c78 Mon Sep 17 00:00:00 2001 From: xiaobai <857694115@qq.com> Date: Tue, 17 Aug 2021 21:03:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=B8=E5=85=B3=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ysjl/5000/dj/jdgy-cl/index.vue | 40 +++++++------- src/views/ysjl/5000/dj/lygg-cl/index.vue | 69 ++++++++++++++---------- 2 files changed, 62 insertions(+), 47 deletions(-) diff --git a/src/views/ysjl/5000/dj/jdgy-cl/index.vue b/src/views/ysjl/5000/dj/jdgy-cl/index.vue index f8759a5..5379139 100644 --- a/src/views/ysjl/5000/dj/jdgy-cl/index.vue +++ b/src/views/ysjl/5000/dj/jdgy-cl/index.vue @@ -333,6 +333,7 @@ + @@ -376,7 +377,6 @@ export default { edit: false, sybjSData: [], tableData: [], - users: [], checkedTab: 'first', ysjlId: this.$route.query.id, // 表格合并相关 @@ -387,9 +387,28 @@ export default { getValue(row) { // 该列用于比较的值的获取方法 return row.jianyanxiang } + }, + { + name: 'jianyanmu', // 参与计算的列名,必须和el-table-column prop=''值一致 + getValue(row) { // 该列用于比较的值的获取方法 + return row.jianyanmu + } } ], - departmemtArr: [] + rows: [ + { + name: 'jianyanxiang', + getValue(row) { + return row.jianyanxiang + } + }, + { + name: 'jianyanneirong', + getValue(row) { + return row.jianyanneirong + } + } + ] } }, computed: { @@ -418,18 +437,11 @@ export default { this.getYsjl(this.$route.query.id) this.getJyxm(1) } - this.getUserList() - this.getDepartmentArr() }, beforeDestroy() { window.removeEventListener('beforeunload', this.beforeunloadHandler, false) }, methods: { - getDepartmentArr() { - getDepartmentTreeList().then(res => { - this.departmemtArr = res - }) - }, /** * 签名方法 * @param data @@ -583,15 +595,7 @@ export default { }) }) } - this.tableJs.getData(this.cols, undefined, this.sybjSData) - }) - }, - getUserList() { - this.api({ - url: '/user/all', - method: 'get' - }).then(data => { - this.users = data + this.tableJs.getData(this.cols, this.rows, this.sybjSData) }) }, saveYsjl: function(operation) { diff --git a/src/views/ysjl/5000/dj/lygg-cl/index.vue b/src/views/ysjl/5000/dj/lygg-cl/index.vue index ac2725c..80b390c 100644 --- a/src/views/ysjl/5000/dj/lygg-cl/index.vue +++ b/src/views/ysjl/5000/dj/lygg-cl/index.vue @@ -164,6 +164,20 @@ + + + + + + 首次检验 + + + 定期检验 + + + + +
设备技术参数 @@ -329,6 +343,7 @@ + @@ -373,7 +388,6 @@ export default { edit: false, sybjSData: [], tableData: [], - users: [], checkedTab: 'first', ysjlId: this.$route.query.id, // 表格合并相关 @@ -384,9 +398,28 @@ export default { getValue(row) { // 该列用于比较的值的获取方法 return row.jianyanxiang } + }, + { + name: 'jianyanmu', // 参与计算的列名,必须和el-table-column prop=''值一致 + getValue(row) { // 该列用于比较的值的获取方法 + return row.jianyanmu + } } ], - departmemtArr: [] + rows: [ + { + name: 'jianyanxiang', + getValue(row) { + return row.jianyanxiang + } + }, + { + name: 'jianyanneirong', + getValue(row) { + return row.jianyanneirong + } + } + ] } }, computed: { @@ -415,18 +448,11 @@ export default { this.getYsjl(this.$route.query.id) this.getJyxm(1) } - this.getUserList() - this.getDepartmentArr() }, beforeDestroy() { window.removeEventListener('beforeunload', this.beforeunloadHandler, false) }, methods: { - getDepartmentArr() { - getDepartmentTreeList().then(res => { - this.departmemtArr = res - }) - }, /** * 签名方法 * @param data @@ -520,16 +546,9 @@ export default { this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima) }) }, - getParam(ysjlId, sbzldm) { - // 根据原始记录id查询参数 - this.api({ - url: '/ysjl/getParamByYsjlId', - method: 'get', - params: { - ysjlId: ysjlId, - sbzldm: sbzldm - } - }).then(data => { + getParam() { + const id = this.ysjlId || this.$route.query.templateId + this.ysjlService.getParam(id, this.$route.query.sbzldm).then((data) => { this.param = data }) }, @@ -539,7 +558,7 @@ export default { .getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort) .then((data) => { this.sybjSData = data - this.tableJs.getData(this.cols, undefined, this.sybjSData) + this.tableJs.getData(this.cols, this.rows, this.sybjSData) }) } else { this.jyxmService @@ -549,18 +568,10 @@ export default { row.dicJyxmId = row.id }) this.sybjSData = data - this.tableJs.getData(this.cols, undefined, this.sybjSData) + this.tableJs.getData(this.cols, this.rows, this.sybjSData) }) } }, - getUserList() { - this.api({ - url: '/user/all', - method: 'get' - }).then(data => { - this.users = data - }) - }, saveYsjl: function(operation) { if (operation === 'add') { if (this.jlbh3.trim() === '') {