diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 6a84b6a65..1b4edb51a 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -2254,3 +2254,10 @@ li{ .alert-level-P3{ background: #f7ba78; } +.required-marker { + label:before{ + content: '*'; + color: #F56C6C; + margin-right: 4px; + } +} diff --git a/nezha-fronted/src/components/common/alert/alertMessageTable.vue b/nezha-fronted/src/components/common/alert/alertMessageTable.vue index 592b0360b..163987ad4 100644 --- a/nezha-fronted/src/components/common/alert/alertMessageTable.vue +++ b/nezha-fronted/src/components/common/alert/alertMessageTable.vue @@ -3,11 +3,6 @@ + @@ -49,7 +50,14 @@ ref="endpointTable" style="width: 100%;" @sort-change="tableDataSort" + @selection-change="(selection)=>{this.batchDeleteObjs=selection}" > + + + {{dateFormat(scope.row.lastUpdate)}} @@ -133,10 +142,12 @@ + + diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js index 51cb522bb..309e80dbb 100644 --- a/nezha-fronted/src/components/common/language/cn.js +++ b/nezha-fronted/src/components/common/language/cn.js @@ -374,6 +374,7 @@ const cn = { }, tip: { confirmDelete: "确认删除吗?", + confirmBatchDelete:'确定删除这{0}条数据吗?', assetConfirmDelete: "关联的Endpoint和告警将会被删除,确认删除吗?", yes: "是", no: "否", diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 261ccab5b..a22023b9b 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -377,6 +377,7 @@ const en = { }, tip: { confirmDelete: "Are you sure you want to delete?", //Are you sure you want to delete? + confirmBatchDelete:'Are you sure to delete these {0} pieces of data', assetConfirmDelete: 'Related endpoints and alerts will be removed, are you sure you want to delete this asset?',//Related endpoints and alerts will be removed, are you sure you want to delete this asset? yes: 'Yes', //"是" no: "No",//No diff --git a/nezha-fronted/src/components/common/rightBox/assetBox.vue b/nezha-fronted/src/components/common/rightBox/assetBox.vue index f7c949bee..a760fc006 100644 --- a/nezha-fronted/src/components/common/rightBox/assetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/assetBox.vue @@ -75,7 +75,7 @@ - + diff --git a/nezha-fronted/src/components/page/alert/config.vue b/nezha-fronted/src/components/page/alert/config.vue index dff5a90cd..f7044522f 100644 --- a/nezha-fronted/src/components/page/alert/config.vue +++ b/nezha-fronted/src/components/page/alert/config.vue @@ -48,6 +48,7 @@ + @@ -75,7 +76,14 @@ style="width: 100%;" @sort-change="tableDataSort" @row-dblclick="detail" + @selection-change="(selection)=>{this.batchDeleteObjs=selection}" > + + +
@@ -102,6 +105,7 @@ import alertRuleInfo from '../../common/alert/alertRuleInfo' import alertLabel from '../../common/alert/alertLabel' import alertMessageTable from '../../common/alert/alertMessageTable.vue' + import deleteButton from "../../common/deleteButton"; export default { name: "alertList", components: { @@ -111,6 +115,7 @@ 'alertLabel':alertLabel, 'alertMessageTable':alertMessageTable, 'pick-time':pickTime, + 'delete-button':deleteButton, }, data() { return { @@ -140,7 +145,7 @@ //导出相关 importBox: {show: false, title:this.$t('overall.exportExcel')}, deleteBox: {show: false, ids: "", remark: '', state: 2}, - + batchDeleteObjs:[], //详情相关 graphShow: false, chartDatas: [], @@ -411,6 +416,12 @@ this.$refs['assetEditUnit'].tabView = false } }, + openDelMessageBox:function(){ + if(this.batchDeleteObjs.length<1) return; + if(this.$refs.alertMessageTable){ + this.$refs.alertMessageTable.toDeleteMessage(false); + } + }, toDeleteMessage(obj) { if (obj) { this.deleteBox.ids = obj.id + ""; diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index b964afa10..fe15a85e0 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -10,13 +10,14 @@ export-url="/asset/export" import-url="/asset/import" :params="searchLabel" - @afterImport="getTableData" + @afterImport="afterTableListChange" > +
@@ -44,7 +45,14 @@ :cell-class-name="messageStyle" @sort-change="tableDataSort" @row-dblclick="detail" + @selection-change="(selection)=>{this.batchDeleteObjs=selection}" > + + + @@ -42,7 +43,15 @@ v-loading="tools.loading" v-scrollBar:el-table="'large'" style="width: 100%;" - @sort-change="tableDataSort"> + @sort-change="tableDataSort" + @selection-change="(selection)=>{this.batchDeleteObjs=selection}" + > + +