From 4a01b0cf756aa16c4c3a8b2e5cdfd8db8c8c66ed Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期六, 11 五月 2024 21:48:35 +0800
Subject: [PATCH] 1

---
 src/layout/index.vue                         |    2 +-
 src/views/notification/editconfiguration.vue |   33 ++++++++++++---------------------
 2 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/src/layout/index.vue b/src/layout/index.vue
index f34284f..e60cd99 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -296,7 +296,7 @@
 				if(foundRoute.name != "鏁板瓧鐪嬫澘") {
 					this.$router.push({path: key});
 				}else {
-					window.open(key + `?token= + ${TOKEN}`,'_blank');
+					window.open(key + `?token=${TOKEN}`,'_blank');
 				}
 			},
 			openSetting(){
diff --git a/src/views/notification/editconfiguration.vue b/src/views/notification/editconfiguration.vue
index b069299..7724785 100644
--- a/src/views/notification/editconfiguration.vue
+++ b/src/views/notification/editconfiguration.vue
@@ -99,21 +99,19 @@
 			//琛ㄥ崟鎻愪氦鏂规硶
 			businessSubmit(){
 				var obj = Object.assign({},this.addBusinessForm);
-				obj.notifyType = obj.notifyType;
-				obj.id = obj.notifyTemplateId;
-				obj.business = obj.businessKey;
-				obj.name = obj.notifyTemplateName;
-				obj.provider = obj.providerType;
-				obj.type = obj.notifyType;
-				var template = JSON.parse(obj.template);
-				for(var key in template) {
-					template[key] = obj[key];
+				console.log(this.addBusinessForm);
+				var obj = {
+					configuration: {appKey: "3aa", appSecret: "4a"}
+					id: "1001"
+					name: "榛樿"
+					provider: "dingTalkMessage"
+					type: "dingTalk"
 				}
-				obj.template = JSON.stringify(template);
+				return;
 				this.$refs.dialogForm.validate(async (valid) => {
 					if (valid) {
 						this.isSaveing = true;
-						this.$HTTP.put("/api/blade-notify/business-notify/modify",obj).then(res=> {
+						this.$HTTP.put("/api/blade-notify/notifier/config",obj).then(res=> {
 							this.isSaveing = false;
 							if(res.code == 200) {
 								this.$emit('success', this.addBusinessForm, this.mode);
@@ -166,18 +164,11 @@
 					})
 				})
 				console.log(data.configuration,data)
-				// for(var key in res.data.configEntity.configuration) {
-				// 	res.data.configEntity.configuration['name'] = key;
-				// 	res.data.configEntity.configuration['value'] = res.data.configEntity.configuration[key];
-				// 	res.data.configEntity.configuration['type'] = res.data.id;
-				// }
 				//鍙互鍜屼笂闈竴鏍峰崟涓敞鍏ワ紝涔熷彲浠ュ儚涓嬮潰涓�鏍风洿鎺ュ悎骞惰繘鍘�
 				Object.assign(this.addBusinessForm,data);
-
-				// this.$nextTick(()=> {
-				// 	this.serviceproviders = this.addBusinessForm.providerInfos[0].id;
-				// })
-				// console.log(this.addBusinessForm)
+				this.$nextTick(()=> {
+					this.serviceproviders = this.addBusinessForm.providerInfos[0].id;
+				})
 			}
 		},
 		components: {

--
Gitblit v1.9.3