From 8261c004cc4a8351b42c34438a2b4b62c065d991 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期日, 16 六月 2024 15:08:42 +0800
Subject: [PATCH] update
---
src/views/notification/configuration.vue | 58 +++++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 43 insertions(+), 15 deletions(-)
diff --git a/src/views/notification/configuration.vue b/src/views/notification/configuration.vue
index a88e523..c2b5b45 100644
--- a/src/views/notification/configuration.vue
+++ b/src/views/notification/configuration.vue
@@ -9,13 +9,13 @@
<template>
<div class="aposcope-main">
<div class="debugging">
- <el-button type="primary" plain style="width: 80px;">璋冭瘯</el-button>
+ <el-button type="primary" plain style="width: 80px;" @click="debugerBtn">璋冭瘯</el-button>
</div>
<div class="conList" v-for="item in tableData">
<div class="conTop">
<span class="titile">{{item.name}}</span>
</div>
- <div class="conBottom" v-if="item.isBindBusiness">
+ <div class="conBottom" v-if="item.configEntity != null">
<div class="first">
<div>{{item.id == "internalMessage"?"绔欏唴淇¢厤缃�":"閰嶇疆鍚嶇О"}}</div>
</div>
@@ -23,16 +23,17 @@
<div>{{item.pname}}</div>
</div>
<div class="thrid" v-if="item.id != 'internalMessage'">
- <span @click="table_edit(item, index)"><el-icon><EditPen /></el-icon>缂栬緫</span>
- <span><el-icon><Delete /></el-icon>鍒犻櫎</span>
+ <span @click="table_edit(item, index ,2)"><el-icon><EditPen /></el-icon>缂栬緫</span>
+ <span @click="table_del(item,index)"><el-icon><Delete /></el-icon>鍒犻櫎</span>
</div>
</div>
- <div class="conBottom" v-if="!item.isBindBusiness">
- <el-button type="primary" plain style="margin-left: 20px;" @click="addallocation">鏂板閰嶇疆</el-button>
+ <div class="conBottom" v-if="item.configEntity == null">
+ <el-button type="primary" plain style="margin-left: 20px;" @click="table_edit(item, index ,1)">鏂板閰嶇疆</el-button>
</div>
</div>
</div>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="addconfigSuccess" @closed="dialog.save=false"></save-dialog>
+ <save-debug v-if="dialog.debugging" ref="saveDebugging" @success="adddebugSuccess" @closed="dialog.debugging=false"></save-debug>
</template>
<script>
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
@@ -41,12 +42,14 @@
icons.push(key)
}
import saveDialog from './editconfiguration'
+ import saveDebug from './sendDebug'
export default {
name: "configuration",
data(){
return {
dialog: {
- save: false
+ save: false,
+ debugging: false
},
tableData: []
}
@@ -58,19 +61,31 @@
this.getConfiguration();
},
components: {
- ...ElementPlusIconsVue,saveDialog
+ ...ElementPlusIconsVue,saveDialog,saveDebug
},
methods: {
- addallocation() {
- ///api/blade-notify/notifier/config/sms/aliyunSms/metadata
+ table_del(item,index) {
+ this.$confirm(`纭畾灏嗛�夋嫨鏁版嵁鍒犻櫎?`, '', {
+ type: 'warning'
+ }).then(() => {
+ this.$HTTP.delete(`/api/blade-notify/notifier/config/${item.configEntity.id}`).then(res=> {
+ if(res.code == 200) {
+ this.getConfiguration();
+ }else {
+ this.$message.error(res.msg);
+ }
+ })
+ }).catch(() => {
+
+ })
},
- table_edit(row){
+ table_edit(row,index,type){
if(row.name == "閽夐拤") {
var url = `/api/blade-notify/notifier/config/dingTalk/dingTalkMessage/metadata`;
}else if(row.name == "浼佷笟寰俊") {
var url = `/api/blade-notify/notifier/config/weiXinQY/qyTextMessage/metadata`;
- }else if(row.name == "绔欏唴淇�") {
- //var url = `/api/blade-notify/notifier/template/internalMessage/systemDefault/config/metadata`;
+ }else if(row.name == "鐭俊") {
+ var url = `/api/blade-notify/notifier/config/sms/aliyunSms/metadata`;
}else if(row.name == "閭欢") {
var url = `/api/blade-notify/notifier/config/email/embedded/metadata`;
}
@@ -80,9 +95,19 @@
this.dialog.save = true;
this.$nextTick(() => {
var obj = Object.assign(res.data,row);
- this.$refs.saveDialog.open('edit').setData(obj);
+ if(type == 1) {
+ this.$refs.saveDialog.open('add',obj);
+ }else if(type == 2) { //缂栬緫
+ this.$refs.saveDialog.open('edit',{}).setData(obj);
+ }
})
}
+ })
+ },
+ debugerBtn() {
+ this.dialog.debugging = true;
+ this.$nextTick(() => {
+ this.$refs.saveDebugging.open(this.tableData);
})
},
getConfiguration() {
@@ -100,7 +125,10 @@
})
},
addconfigSuccess() {
- this.getbusiness();
+ this.getConfiguration();
+ },
+ adddebugSuccess() {
+
}
}
}
--
Gitblit v1.9.3