1
lzhe
2024-05-11 4a01b0cf756aa16c4c3a8b2e5cdfd8db8c8c66ed
1
已修改2个文件
35 ■■■■■ 文件已修改
src/layout/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/notification/editconfiguration.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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(){
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: {