feat: alert-rule的导入、导入撤销、导出、模板下载
This commit is contained in:
@@ -133,6 +133,8 @@
|
|||||||
url = "/asset/cancelImport";
|
url = "/asset/cancelImport";
|
||||||
} else if (this.importUrl.indexOf("endpoint") > -1) {
|
} else if (this.importUrl.indexOf("endpoint") > -1) {
|
||||||
url = "/endpoint/cancelImport";
|
url = "/endpoint/cancelImport";
|
||||||
|
} else if (this.importUrl.indexOf("rule") > -1) {
|
||||||
|
url = "/alert/rule/cancelImport";
|
||||||
}
|
}
|
||||||
this.$delete(url + '?seq='+this.importResult.seq).then(response=>{
|
this.$delete(url + '?seq='+this.importResult.seq).then(response=>{
|
||||||
if(response.code == 200 ){
|
if(response.code == 200 ){
|
||||||
@@ -182,9 +184,9 @@
|
|||||||
let url=null;
|
let url=null;
|
||||||
if (this.importUrl.indexOf("asset") > -1) {
|
if (this.importUrl.indexOf("asset") > -1) {
|
||||||
url = "/asset/template";
|
url = "/asset/template";
|
||||||
} /*else if (this.importUrl.indexOf("endpoint") > -1) {
|
} else if (this.importUrl.indexOf("rule") > -1) {
|
||||||
url = "/endpoint/template";
|
url = "/alert/rule/template";
|
||||||
}*/
|
}
|
||||||
|
|
||||||
let param={language:language}
|
let param={language:language}
|
||||||
if(!url){
|
if(!url){
|
||||||
|
|||||||
@@ -12,10 +12,21 @@
|
|||||||
<div class="top-tool-search float-right">
|
<div class="top-tool-search float-right">
|
||||||
<search-input :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
<search-input :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<button id="alert-add" @click="add" :title="$t('overall.createAlertRule')"
|
<export-excel
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20">
|
export-file-name="AlertRule"
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
export-url="/alert/rule/export"
|
||||||
</button>
|
import-url="/alert/rule/import"
|
||||||
|
:params="searchLabel"
|
||||||
|
@afterImport="getTableData"
|
||||||
|
class="margin-l-20"
|
||||||
|
>
|
||||||
|
<template slot="optionZone">
|
||||||
|
<button id="alert-add" @click="add" :title="$t('overall.createAlertRule')"
|
||||||
|
class="nz-btn nz-btn-size-normal nz-btn-style-light">
|
||||||
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
</export-excel>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -107,9 +118,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import bus from '../../../libs/bus';
|
import bus from '../../../libs/bus';
|
||||||
|
import exportXLSX from "../../common/exportXLSX";
|
||||||
import chartDataFormat from "../../charts/chartDataFormat";
|
import chartDataFormat from "../../charts/chartDataFormat";
|
||||||
export default {
|
export default {
|
||||||
name: "alert-config",
|
name: "alert-config",
|
||||||
|
components: {
|
||||||
|
'export-excel': exportXLSX,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//侧滑
|
//侧滑
|
||||||
|
|||||||
Reference in New Issue
Block a user