From 775847029a81034cf2aa56ca434150d41c615027 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 11 Aug 2020 09:21:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=BF=90=E8=A1=8C=E5=9B=BE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=BF=E7=9C=9F=E6=95=B0=E6=8D=AE=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=EF=BC=88=E6=8E=A5=E5=8F=A3=E6=9C=AA=E5=8A=A0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/publish/runPlanTemplate/index.vue | 24 ++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/views/publish/runPlanTemplate/index.vue b/src/views/publish/runPlanTemplate/index.vue index 72c95637d..44eac6e83 100644 --- a/src/views/publish/runPlanTemplate/index.vue +++ b/src/views/publish/runPlanTemplate/index.vue @@ -65,7 +65,7 @@ export default { { type: 'button', title: this.$t('global.operate'), - width: '450', + width: '550', hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; }, buttons: [ { @@ -83,6 +83,11 @@ export default { handleClick: this.handleView, type: '' }, + { + name: '仿真数据校验', + handleClick: this.handleCheck, + type: '' + }, { name: this.$t('global.delete'), handleClick: this.handleDelete, @@ -177,6 +182,23 @@ export default { }, reloadTable() { this.queryList.reload(); + }, + handleCheck() { + + }, + tableToExcel(data) { + const filterVal = ['index']; + const arr = []; + data.forEach(item => { + arr.push({ index: item }); + }); + const dataList = this.formatJson(filterVal, arr); + import('@/utils/Export2Excel').then(excel => { + excel.export_json_to_excel([this.$t('tip.dataQuestion')], dataList, this.$t('tip.dataList')); + }); + }, + formatJson(filterVal, jsonData) { + return jsonData.map(v => filterVal.map(j => v[j])); } } };