模板运行图添加仿真数据校验(接口未加)

This commit is contained in:
fan 2020-08-11 09:21:31 +08:00
parent 870ee5130f
commit 775847029a

View File

@ -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]));
}
}
};