From 4ac0492c110ba0fd3d5a84119ed6974010872597 Mon Sep 17 00:00:00 2001 From: wenzhijie Date: Mon, 22 Aug 2022 12:16:23 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2134=20style:=20Task=20asset=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=88=A0=E9=99=A4=20=E9=A1=B5=E9=9D=A2=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/mixin/dataList.js | 113 +- .../src/components/page/asset/asset.vue | 12 +- nezha-fronted/yarn.lock | 13092 ++++++++++++++++ 3 files changed, 13213 insertions(+), 4 deletions(-) create mode 100644 nezha-fronted/yarn.lock diff --git a/nezha-fronted/src/components/common/mixin/dataList.js b/nezha-fronted/src/components/common/mixin/dataList.js index 7c2cfb86c..79a2844c2 100644 --- a/nezha-fronted/src/components/common/mixin/dataList.js +++ b/nezha-fronted/src/components/common/mixin/dataList.js @@ -228,7 +228,7 @@ export default { this.ForceDeleteShow = true }, // Dialog 关闭的回调 - handleClose () { + handleClose (row) { // this.dialogVisible = false // this.showOne = true // this.showTwo = false @@ -246,6 +246,7 @@ export default { this.batchDeleteObjs = [] this.idStr = [] this.getTableData() + bus.$emit('delTableRow', [row.id]) } else { this.$message.error(response.msg) } @@ -1104,7 +1105,117 @@ export default { jsonKey: 'valnum' } } + } else if (path === 'recordRule') { + searchKeys = { + // key: path 键 + // value: vue set 参数 + pageNo: { target: this.pageObj, propertyName: 'pageNo', type: 'number' }, + pageSize: { target: this.pageObj, propertyName: 'pageSize', type: 'number' }, + orderBy: { target: this.$data, propertyName: 'orderBy', type: 'string' }, + ids: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'ids', + type: 'string', + defaultJson: { + disabled: false, + label: 'ids', + name: 'ID', + type: 'input', + val: '' + }, + jsonKey: 'val' + }, + state: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'state', + type: 'Number', + defaultJson: { + disabled: false, + label: 'recordState', + name: 'State', + readonly: true, + type: 'select', + val: '' + }, + jsonKey: 'val' + }, + name: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'name', + type: 'string', + defaultJson: { + disabled: false, + id: 'name', + label: 'name', + name: 'Name', + type: 'input', + val: '' + }, + jsonKey: 'val' + }, + type: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'type', + type: 'Number', + defaultJson: { + disabled: false, + label: 'recordType', + name: 'Type', + readonly: true, + type: 'select', + val: '' + }, + jsonKey: 'val' + }, + expr: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'expr', + type: 'string', + defaultJson: { + disabled: false, + label: 'expr', + name: 'Expression', + type: 'input', + val: '' + }, + jsonKey: 'val' + }, + starrd: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'starrd', + type: 'Number', + defaultJson: { + disabled: false, + label: 'starrd', + name: 'Starrd', + type: 'select', + val: '' + }, + jsonKey: 'val' + }, + buildIn: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'buildIn', + type: 'Number', + defaultJson: { + disabled: false, + label: 'buildIn', + name: 'buildIn', + type: 'select', + val: '' + }, + jsonKey: 'val' + } + } } + this.initQueryFromPath(searchKeys) }, mounted () { diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index 276b1b4d9..2c4fe6eaf 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -215,6 +215,7 @@ :data="batchDeleteObjs" tooltip-effect="dark" style="width: 100%" + :tree-props="{children: 'children', hasChildren: 'hasChildren'}" :row-key="(row) => {return row.id}" @selection-change="batchDeleteselectionChange" @showBottomBox="(targetTab, object) => { $refs.dataList.showBottomBox(targetTab, object) }" @@ -230,13 +231,13 @@ + width="150">