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">