3 lines
32 KiB
JavaScript
3 lines
32 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-198954bd"],{"0242c":function(e,t,r){"use strict";var n=function(){var e=this,t=e._self._c;return t("div",[t("a-modal",{attrs:{visible:e.visible,title:"Cron表达式",width:"650px"},on:{ok:e.handleOk,cancel:e.handlerCancel}},[t("cron-input",{attrs:{item:e.cronItem},on:{change:e.showFive},model:{value:e.cron,callback:function(t){e.cron=t},expression:"cron"}}),t("a-input",{attrs:{placeholder:"请输入cron表达式"},model:{value:e.cron,callback:function(t){e.cron=t},expression:"cron"}}),t("div",{staticStyle:{margin:"20px 0","border-left":"#f5222d 5px solid","font-size":"medium","font-weight":"bold"}},[e._v(" 近5次的运行时间: ")]),e._l(e.list,(function(r,n){return t("div",{key:r,staticStyle:{"margin-top":"10px"}},[e._v(" 第"+e._s(n+1)+"次: "+e._s(r))])}))],2)],1)},a=[],i=r("3b7a"),o={name:"CronModal",data:function(){return{visible:!1,cronItem:["second","minute","hour","day","month","week","year"],cron:"",list:[]}},methods:{handleOk:function(){this.visible=!1,this.$emit("getCron",this.cron)},handlerCancel:function(){this.visible=!1},isShow:function(e){this.cron=e,this.visible=!0},showFive:function(e){var t=this;this.cron=e,Object(i["k"])({cron:e}).then((function(e){t.list=e.data}))}}},s=o,u=(r("ae4b"),r("2877")),l=Object(u["a"])(s,n,a,!1,null,null,null);t["a"]=l.exports},"12b3":function(e,t){var r={sceneStatus:{0:{name:"停用",color:"#9c1f1f"},1:{name:"启用",color:"#f5a22d"}},backOffLabels:{1:{name:"延迟等级",color:"#d06892"},2:{name:"固定时间",color:"#f5a22d"},3:{name:"CRON表达式",color:"#e1f52d"},4:{name:"随机等待",color:"#a127f3"}},triggerInterval:{1:{name:"CRON表达式",color:"#d06892"},2:{name:"固定时间",color:"#f5a22d"}},notifyScene:{1:{name:"场景重试数量超过阈值",color:"#d06892"},2:{name:"场景重试失败数量超过阈值",color:"#f5a22d"},3:{name:"客户端上报失败",color:"#e1f52d"},4:{name:"客户端组件异常",color:"#a127f3"},5:{name:"任务重试数量超过阈值",color:"#f5a22d"},6:{name:"任务失败进入死信队列",color:"#f5a22d"}},routeKey:{4:{name:"轮询",color:"#8f68d2"},1:{name:"一致性Hash",color:"#d06892"},2:{name:"随机",color:"#f5a22d"},3:{name:"LRU",color:"#e1f52d"}},notifyType:{1:{name:"钉钉通知",color:"#64a6ea"},2:{name:"邮箱通知",color:"#1b7ee5"},4:{name:"飞书",color:"#087da1"}},rateLimiterStatus:{0:{name:"未启用",color:"#9c1f1f"},1:{name:"启用",color:"#f5a22d"}},notifyStatus:{0:{name:"停用",color:"#9c1f1f"},1:{name:"启用",color:"#f5a22d"}},idGenMode:{1:{name:"号段模式",color:"#1b7ee5"},2:{name:"雪花算法",color:"#087da1"}},groupStatus:{0:{name:"停用",color:"#9c1f1f"},1:{name:"启用",color:"#f5a22d"}},initScene:{0:{name:"否",color:"#9c1f1f"},1:{name:"是",color:"#f5a22d"}}};e.exports=r},"1da1":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));r("d3b7");function n(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,i){var o=e.apply(t,r);function s(e){n(o,a,i,s,u,"next",e)}function u(e){n(o,a,i,s,u,"throw",e)}s(void 0)}))}}},"398e":function(e,t,r){"use strict";r.r(t);r("b0c0"),r("caad"),r("2532");var n=function(){var e=this,t=e._self._c;return t("div",[t("page-header-wrapper",{staticStyle:{margin:"-24px -1px 0"},attrs:{content:"场景配置"},on:{back:function(){return e.$router.go(-1)}}},[t("div")]),t("a-card",{attrs:{"body-style":{padding:"24px 32px"},bordered:!1,loading:e.loading}},[t("a-form",{staticClass:"form-row",staticStyle:{width:"40%",margin:"auto"},attrs:{form:e.form,layout:"vertical"},on:{submit:e.handleSubmit}},[t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:18,md:12,sm:24}},[t("a-form-item",[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["id"],expression:"['id']"}],attrs:{hidden:""}})],1),t("a-form-item",{attrs:{label:"通知场景"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["notifyScene",{initialValue:"1",rules:[{required:!0,message:"请选通知场景"}]}],expression:"[\n 'notifyScene',\n {\n initialValue: '1',\n rules: [{ required: true, message: '请选通知场景'}]\n }\n ]"}],staticStyle:{width:"100%"},attrs:{placeholder:"通知场景"},on:{change:e.changeNotifyScene}},e._l(e.notifySceneList,(function(r,n){return t("a-select-option",{key:n,attrs:{value:n}},[e._v(e._s(r.name))])})),1)],1)],1),t("a-col",{attrs:{lg:6,md:12,sm:24}},[t("a-form-item",[t("a-input",{attrs:{hidden:""}})],1),t("a-form-item",{attrs:{label:"通知阈值"}},[e.notifyThresholdDisabled.includes(this.notifySceneValue)?t("a-input",{attrs:{disabled:""}}):t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["notifyThreshold",{initialValue:"16",rules:[{required:!e.notifyThresholdDisabled.includes(this.notifySceneValue),message:"请输入通知阈值"}]}],expression:"[\n 'notifyThreshold',\n {\n initialValue: '16',\n rules: [{ required: !notifyThresholdDisabled.includes(this.notifySceneValue), message: '请输入通知阈值'}]\n }\n ]"}],staticStyle:{width:"-webkit-fill-available"},attrs:{id:"inputNumber",min:1}})],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:18,md:12,sm:24}},[t("a-form-item",{attrs:{label:"组"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["groupName",{rules:[{required:!0,message:"请选择组"}]}],expression:"['groupName', { rules: [{ required: true, message: '请选择组' }] }]"}],attrs:{placeholder:"请选择组"},on:{change:function(t){return e.changeGroup(t)}}},e._l(e.groupNameList,(function(r){return t("a-select-option",{key:r,attrs:{value:r}},[e._v(e._s(r))])})),1)],1)],1),t("a-col",{attrs:{lg:6,md:12,sm:24}},[t("a-form-item",{attrs:{label:"场景"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["sceneName",{rules:[{required:!e.sceneNameDisabled.includes(this.notifySceneValue),message:"请选择场景"}]}],expression:"['sceneName', { rules: [{ required: !sceneNameDisabled.includes(this.notifySceneValue), message: '请选择场景' }] }]"}],attrs:{disabled:e.sceneNameDisabled.includes(this.notifySceneValue),placeholder:"请选择场景"}},e._l(e.sceneList,(function(r){return t("a-select-option",{key:r.sceneName,attrs:{value:r.sceneName}},[e._v(e._s(r.sceneName))])})),1)],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:8,md:12,sm:12}},[t("a-form-item",{attrs:{label:"通知类型"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["notifyType",{initialValue:"1",rules:[{required:!0,message:"请选择通知类型"}]}],expression:"[\n 'notifyType',\n {\n initialValue: '1',\n rules: [{ required: true, message: '请选择通知类型'}]\n }\n ]"}],staticStyle:{width:"100%"},attrs:{placeholder:"通知类型"},on:{change:e.handleChange}},e._l(e.notifyTypeList,(function(r,n){return t("a-select-option",{key:n,attrs:{value:n}},[e._v(e._s(r.name))])})),1)],1)],1),t("a-col",{attrs:{lg:16,md:12,sm:12}},[t("a-form-item",{attrs:{label:"配置属性"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["notifyAttribute",{rules:[{required:!0,message:"请输入配置属性",whitespace:!0}]}],expression:"[\n 'notifyAttribute',\n {rules: [{ required: true, message: '请输入配置属性', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入配置属性"},on:{click:e.handleBlur}})],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:8,md:12,sm:24}},[t("a-form-item",{attrs:{label:"限流状态"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["rateLimiterStatus",{initialValue:"0",rules:[{required:!0,message:"请选择限流状态"}]}],expression:"['rateLimiterStatus',{initialValue: '0', rules: [{ required: true, message: '请选择限流状态'}]}]"}],attrs:{disabled:e.rateLimiterStatusDisabled.includes(this.notifySceneValue),placeholder:"请选择限流状态"},on:{change:e.changeRateLimiterStatus}},e._l(e.rateLimiterStatusList,(function(r,n){return t("a-select-option",{key:n,attrs:{value:n}},[e._v(e._s(r.name))])})),1)],1)],1),t("a-col",{attrs:{lg:8,md:12,sm:24}},[t("a-form-item",{attrs:{label:"每秒限流阈值"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["rateLimiterThreshold",{initialValue:"100",rules:[{required:!e.rateLimiterThresholdDisabled.includes(this.rateLimiterStatusValue),message:"请输入通知阈值"}]}],expression:"['rateLimiterThreshold',{initialValue: '100',rules: [{ required: !rateLimiterThresholdDisabled.includes(this.rateLimiterStatusValue), message: '请输入通知阈值' }]}]"}],staticStyle:{width:"-webkit-fill-available"},attrs:{disabled:e.rateLimiterThresholdDisabled.includes(this.rateLimiterStatusValue),id:"inputNumber",min:1}})],1)],1),t("a-col",{attrs:{lg:8,md:12,sm:24}},[t("a-form-item",{attrs:{label:"状态"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["notifyStatus",{initialValue:"1",rules:[{required:!0,message:"请选择状态"}]}],expression:"[\n 'notifyStatus',\n {\n initialValue: '1',\n rules: [{ required: true, message: '请选择状态'}]\n }\n ]"}],attrs:{placeholder:"请选择状态"}},e._l(e.notifyStatusList,(function(r,n){return t("a-select-option",{key:n,attrs:{value:n}},[e._v(e._s(r.name))])})),1)],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:24,md:24,sm:24}},[t("a-form-item",{attrs:{label:"描述"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["description",{rules:[{required:!1,max:256,message:"最多支持256个字符!"}]}],expression:"[\n 'description',\n {rules: [{required: false, max: 256, message: '最多支持256个字符!'}]}\n ]"}],attrs:{placeholder:"请输入描述",type:"textarea"}})],1)],1)],1),t("a-form-item",{staticStyle:{"text-align":"center"},attrs:{wrapperCol:{span:24}}},[t("a-button",{attrs:{htmlType:"submit",type:"primary"}},[e._v("提交")])],1)],1)],1),t("a-modal",{attrs:{visible:e.visible,title:"添加配置",width:"1000px"},on:{ok:e.handleOk,cancel:e.handlerCancel}},[t("a-form",e._b({attrs:{form:e.notifyAttributeForm,"body-style":{padding:"0px 0px"}},on:{submit:e.handleSubmit}},"a-form",e.formItemLayout,!1),["1"===this.notifyTypeValue?t("a-form-item",{attrs:{label:"钉钉URL"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhookUrl",{rules:[{required:!0,message:"请输入钉钉URL",whitespace:!0}]}],expression:"[\n 'webhookUrl',\n {rules: [{ required: true, message: '请输入钉钉URL', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入钉钉URL"}})],1):e._e(),"1"===this.notifyTypeValue?t("a-form-item",[t("span",{attrs:{slot:"label"},slot:"label"},[e._v("被@人手机号 "),t("a",{attrs:{href:e.officialWebsite+"/pages/32e4a0/#被@人手机号是何物",target:"_blank"}},[t("a-icon",{attrs:{type:"question-circle-o"}})],1)]),"1"===this.notifyTypeValue?t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ats",{rules:[{required:!0,message:"请输入被@人手机号",whitespace:!0}]}],expression:"[\n 'ats',\n {rules: [{ required: true, message: '请输入被@人手机号', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入被@负责人手机号",type:"textarea"}}):e._e()],1):e._e(),"4"===this.notifyTypeValue?t("a-form-item",{attrs:{label:"飞书URL"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhookUrl",{rules:[{required:!0,message:"请输入飞书URL",whitespace:!0}]}],expression:"[\n 'webhookUrl',\n {rules: [{ required: true, message: '请输入飞书URL', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入飞书URL"}})],1):e._e(),"4"===this.notifyTypeValue?t("a-form-item",[t("span",{attrs:{slot:"label"},slot:"label"},[e._v("被@负责人用户id "),t("a",{attrs:{href:e.officialWebsite+"/pages/32e4a0/#被@人open_id是何物",target:"_blank"}},[t("a-icon",{attrs:{type:"question-circle-o"}})],1)]),"4"===this.notifyTypeValue?t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ats",{rules:[{required:!0,message:"请输入被@人open_id",whitespace:!0}]}],expression:"[\n 'ats',\n {rules: [{ required: true, message: '请输入被@人open_id', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入被@人open_id",type:"textarea"}}):e._e()],1):e._e(),"2"===this.notifyTypeValue?t("a-form-item",{attrs:{label:"用户名"}},["2"===this.notifyTypeValue?t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["user",{rules:[{required:!0,message:"请输入用户名",whitespace:!0}]}],expression:"[\n 'user',\n {rules: [{ required: true, message: '请输入用户名', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入用户名"}}):e._e()],1):e._e(),"2"===this.notifyTypeValue?t("a-form-item",{attrs:{label:"密码"}},["2"===this.notifyTypeValue?t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["pass",{rules:[{required:!0,message:"请输入密码",whitespace:!0}]}],expression:"[\n 'pass',\n {rules: [{ required: true, message: '请输入密码', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入密码"}}):e._e()],1):e._e(),"2"===this.notifyTypeValue?t("a-form-item",{attrs:{label:"SMTP地址"}},["2"===this.notifyTypeValue?t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["host",{rules:[{required:!0,message:"请输入邮件服务器的SMTP地址",whitespace:!0}]}],expression:"[\n 'host',\n {rules: [{ required: true, message: '请输入邮件服务器的SMTP地址', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入邮件服务器的SMTP地址"}}):e._e()],1):e._e(),"2"===this.notifyTypeValue?t("a-form-item",{attrs:{label:"SMTP端口"}},["2"===this.notifyTypeValue?t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["port",{rules:[{required:!0,message:"请输入邮件服务器的SMTP端口",whitespace:!0}]}],expression:"[\n 'port',\n {rules: [{ required: true, message: '请输入邮件服务器的SMTP端口', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入邮件服务器的SMTP端口"}}):e._e()],1):e._e(),"2"===this.notifyTypeValue?t("a-form-item",{attrs:{label:"发件人"}},["2"===this.notifyTypeValue?t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["from",{rules:[{required:!0,message:"请输入发件人",whitespace:!0}]}],expression:"[\n 'from',\n {rules: [{ required: true, message: '请输入发件人', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入发件人"}}):e._e()],1):e._e(),"2"===this.notifyTypeValue?t("a-form-item",{attrs:{label:"收件人"}},["2"===this.notifyTypeValue?t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["tos",{rules:[{required:!0,message:"请输入收件人",whitespace:!0}]}],expression:"[\n 'tos',\n {rules: [{ required: true, message: '请输入收件人', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入收件人"}}):e._e()],1):e._e(),t("a-form-item",{attrs:{"wrapper-col":{xs:{span:24,offset:0},sm:{span:16,offset:8},lg:{span:7}}}})],1)],1)],1)},a=[],i=r("c7eb"),o=r("1da1"),s=(r("ac1f"),r("5319"),r("d3b7"),r("b64b"),r("a15b"),r("25f0"),r("0fea")),u=r("e941"),l=r("88bc"),c=r.n(l),f=r("0242c"),d=r("ca00"),m=r("12b3"),h={name:"NotifyFrom",props:{},comments:{CronModal:f["a"]},data:function(){return{form:this.$form.createForm(this),formItemLayout:{labelCol:{lg:{span:7},sm:{span:7}},wrapperCol:{lg:{span:10},sm:{span:17}}},officialWebsite:Object(d["a"])(),formItemLayoutWithOutLabel:{wrapperCol:{xs:{span:24,offset:0},sm:{span:20,offset:4}}},formType:"create",groupNameList:[],sceneList:[],notifySceneList:m.notifyScene,notifyTypeList:m.notifyType,notifyStatusList:m.notifyStatus,rateLimiterStatusList:m.rateLimiterStatus,loading:!1,visible:!1,count:0,notifyTypeValue:"1",notifyAttribute:"",notifyThresholdDisabled:["3","4","6"],sceneNameDisabled:["3","4"],rateLimiterStatusDisabled:["1","2","3","4"],rateLimiterThresholdDisabled:["0"],notifySceneValue:"1",rateLimiterStatusValue:"0",defaultRateLimiterStatusValue:"0",defaultRateLimiterThreshold:"100"}},beforeCreate:function(){this.notifyAttributeForm=this.$form.createForm(this,{name:"notify_attribute_form_item"})},mounted:function(){var e=this;Object(s["m"])().then((function(t){e.groupNameList=t.data})),this.$nextTick((function(){var t=e.$route.query.id;t&&(e.loading=!0,Object(u["a"])(t).then((function(t){e.loadEditInfo(t.data),e.loading=!1})))}))},methods:{resetFiled:function(){this.form.resetFields()},buildNotifyAttribute:function(e){return e.ats=e.ats&&e.ats.replace(/\s+/g,"").split(","),JSON.stringify(e)},handleChange:function(e){this.notifyTypeValue=e},changeGroup:function(e){var t=this;Object(s["A"])({groupName:e}).then((function(e){t.sceneList=e.data}))},changeRateLimiterStatus:function(e){this.rateLimiterStatusValue=e},changeNotifyScene:function(e){this.notifySceneValue=e;var t=this.form;this.sceneNameDisabled.includes(e)&&t.setFieldsValue({sceneName:""}),this.rateLimiterStatusDisabled.includes(e)&&(t.setFieldsValue({rateLimiterStatus:this.defaultRateLimiterStatusValue,rateLimiterThreshold:this.defaultRateLimiterThreshold}),this.changeRateLimiterStatus(this.defaultRateLimiterStatusValue))},handleBlur:function(){var e=this;new Promise((function(e){setTimeout(e,100)})).then((function(){if("edit"===e.formType){var t=c()(JSON.parse(e.notifyAttribute),["webhookUrl","ats","user","pass","host","port","from","tos"]);e.notifyAttributeForm.getFieldDecorator("webhookUrl",{initialValue:t.webhookUrl,preserve:!0}),e.notifyAttributeForm.getFieldDecorator("ats",{initialValue:t.ats.join(","),preserve:!0}),e.notifyAttributeForm.getFieldDecorator("user",{initialValue:t.user,preserve:!0}),e.notifyAttributeForm.getFieldDecorator("pass",{initialValue:t.pass,preserve:!0}),e.notifyAttributeForm.getFieldDecorator("host",{initialValue:t.host,preserve:!0}),e.notifyAttributeForm.getFieldDecorator("port",{initialValue:t.port,preserve:!0}),e.notifyAttributeForm.getFieldDecorator("from",{initialValue:t.from,preserve:!0}),e.notifyAttributeForm.getFieldDecorator("tos",{initialValue:t.tos,preserve:!0})}e.visible=!e.visible}))},handlerCancel:function(){this.visible=!1},handleOk:function(){var e=this;this.notifyAttributeForm.validateFields((function(t,r){if(!t){var n=e.form,a=c()(r,["webhookUrl","ats","user","pass","host","port","from","tos"]);e.notifyAttribute=e.buildNotifyAttribute(a),n.setFieldsValue({notifyAttribute:e.parseJson(a)}),e.visible=!1}}))},handleSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields((function(e,r){e||(r["notifyAttribute"]=t.notifyAttribute,"create"===t.formType?Object(u["c"])(r).then((function(e){t.$message.success("任务新增完成"),t.form.resetFields(),t.$router.go(-1)})):Object(u["e"])(r).then((function(e){t.$message.success("任务更新完成"),t.form.resetFields(),t.$router.go(-1)})))}))},loadEditInfo:function(e){var t=this;this.formType="edit";var r=this.form;new Promise((function(r){setTimeout(Object(o["a"])(Object(i["a"])().mark((function n(){return Object(i["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.changeGroup(e.groupName);case 2:r();case 3:case"end":return n.stop()}}),n)}))),100)})).then((function(){var n=c()(e,["id","notifyAttribute","groupName","sceneName","notifyStatus","notifyScene","notifyThreshold","notifyType","description","rateLimiterStatus","rateLimiterThreshold"]);n.notifyStatus=n.notifyStatus.toString(),n.notifyScene=n.notifyScene.toString(),n.notifyType=n.notifyType.toString(),n.notifyThreshold=n.notifyThreshold.toString(),n.rateLimiterStatus=n.rateLimiterStatus.toString(),n.rateLimiterThreshold=n.rateLimiterThreshold.toString(),t.notifyTypeValue=n.notifyType,t.notifyAttribute=n.notifyAttribute,t.notifySceneValue=n.notifyScene,t.rateLimiterStatusValue=n.rateLimiterStatus,n.notifyAttribute=t.parseJson(JSON.parse(n.notifyAttribute)),r.setFieldsValue(n)}))},parseJson:function(e){if(!e)return null;var t="用户名:"+e["user"]+";密码:"+e["pass"]+";SMTP地址:"+e["host"]+";SMTP端口:"+e["port"]+";发件人:"+e["from"]+";收件人:"+e["tos"]+";";return"1"===this.notifyTypeValue?t="钉钉Url:"+e["webhookUrl"]+";被@负责人手机号:"+e["ats"]+";":"4"===this.notifyTypeValue&&(t="飞书Url:"+e["webhookUrl"]+";被@负责人用户id:"+e["ats"]+";"),t}}},p=h,b=r("2877"),y=Object(b["a"])(p,n,a,!1,null,null,null);t["default"]=y.exports},"3b7a":function(e,t,r){"use strict";r.d(t,"l",(function(){return i})),r.d(t,"j",(function(){return o})),r.d(t,"g",(function(){return s})),r.d(t,"k",(function(){return u})),r.d(t,"a",(function(){return l})),r.d(t,"n",(function(){return c})),r.d(t,"f",(function(){return f})),r.d(t,"h",(function(){return d})),r.d(t,"e",(function(){return m})),r.d(t,"d",(function(){return h})),r.d(t,"c",(function(){return p})),r.d(t,"b",(function(){return b})),r.d(t,"i",(function(){return y})),r.d(t,"m",(function(){return v}));var n=r("b775"),a={jobList:"/job/list",jobDetail:"/job/",saveJob:"/job/",updateJob:"/job/",updateJobStatus:"/job/status",delJob:"/job/",timeByCron:"/job/cron",jobNameList:"/job/job-name/list",triggerJob:"/job/trigger/",jobBatchList:"/job/batch/list",jobBatchDetail:"/job/batch/",stop:"/job/batch/stop/",jobTaskList:"/job/task/list",jobLogList:"/job/log/list"};function i(e){return Object(n["b"])({url:a.triggerJob+e,method:"post"})}function o(e){return Object(n["b"])({url:a.stop+e,method:"post"})}function s(e){return Object(n["b"])({url:a.jobNameList,method:"get",params:e})}function u(e){return Object(n["b"])({url:a.timeByCron,method:"get",params:e})}function l(e){return Object(n["b"])({url:a.delJob+e,method:"delete"})}function c(e){return Object(n["b"])({url:a.updateJobStatus,method:"put",data:e})}function f(e){return Object(n["b"])({url:a.jobLogList,method:"get",params:e})}function d(e){return Object(n["b"])({url:a.jobTaskList,method:"get",params:e})}function m(e){return Object(n["b"])({url:a.jobBatchList,method:"get",params:e})}function h(e){return Object(n["b"])({url:a.jobBatchDetail+e,method:"get"})}function p(e){return Object(n["b"])({url:a.jobList,method:"get",params:e})}function b(e){return Object(n["b"])({url:a.jobDetail+e,method:"get"})}function y(e){return Object(n["b"])({url:a.saveJob,method:"post",data:e})}function v(e){return Object(n["b"])({url:a.updateJob,method:"put",data:e})}},"5d3b":function(e,t,r){},"88bc":function(e,t,r){(function(t){var r=1/0,n=9007199254740991,a="[object Arguments]",i="[object Function]",o="[object GeneratorFunction]",s="[object Symbol]",u="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")();function f(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function d(e,t){var r=-1,n=e?e.length:0,a=Array(n);while(++r<n)a[r]=t(e[r],r,e);return a}function m(e,t){var r=-1,n=t.length,a=e.length;while(++r<n)e[a+r]=t[r];return e}var h=Object.prototype,p=h.hasOwnProperty,b=h.toString,y=c.Symbol,v=h.propertyIsEnumerable,g=y?y.isConcatSpreadable:void 0,w=Math.max;function L(e,t,r,n,a){var i=-1,o=e.length;r||(r=x),a||(a=[]);while(++i<o){var s=e[i];t>0&&r(s)?t>1?L(s,t-1,r,n,a):m(a,s):n||(a[a.length]=s)}return a}function S(e,t){return e=Object(e),j(e,t,(function(t,r){return r in e}))}function j(e,t,r){var n=-1,a=t.length,i={};while(++n<a){var o=t[n],s=e[o];r(s,o)&&(i[o]=s)}return i}function T(e,t){return t=w(void 0===t?e.length-1:t,0),function(){var r=arguments,n=-1,a=w(r.length-t,0),i=Array(a);while(++n<a)i[n]=r[t+n];n=-1;var o=Array(t+1);while(++n<t)o[n]=r[n];return o[t]=i,f(e,this,o)}}function x(e){return V(e)||N(e)||!!(g&&e&&e[g])}function _(e){if("string"==typeof e||C(e))return e;var t=e+"";return"0"==t&&1/e==-r?"-0":t}function N(e){return k(e)&&p.call(e,"callee")&&(!v.call(e,"callee")||b.call(e)==a)}var V=Array.isArray;function O(e){return null!=e&&F(e.length)&&!q(e)}function k(e){return D(e)&&O(e)}function q(e){var t=A(e)?b.call(e):"";return t==i||t==o}function F(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function A(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function D(e){return!!e&&"object"==typeof e}function C(e){return"symbol"==typeof e||D(e)&&b.call(e)==s}var E=T((function(e,t){return null==e?{}:S(e,d(L(t,1),_))}));e.exports=E}).call(this,r("c8ba"))},ae4b:function(e,t,r){"use strict";r("5d3b")},c7eb:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var n=r("53ca");function a(){
|
||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var a=t&&t.prototype instanceof h?t:h,o=Object.create(a.prototype),s=new N(n||[]);return i(o,"_invoke",{value:j(e,r,s)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=f;var m={};function h(){}function p(){}function b(){}var y={};c(y,s,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(V([])));g&&g!==t&&r.call(g,s)&&(y=g);var w=b.prototype=h.prototype=Object.create(y);function L(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function a(i,o,s,u){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==Object(n["a"])(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){a("next",e,s,u)}),(function(e){a("throw",e,s,u)})):t.resolve(f).then((function(e){c.value=e,s(c)}),(function(e){return a("throw",e,s,u)}))}u(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){a(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function j(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return O()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=T(o,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function T(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator["return"]&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=d(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,m;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,m):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function V(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=b,i(w,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:p,configurable:!0}),p.displayName=c(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},L(S.prototype),c(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new S(f(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},L(w),c(w,l,"Generator"),c(w,s,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=V,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;_(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:V(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),m}},e}},e941:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"e",(function(){return s})),r.d(t,"b",(function(){return u})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return c}));var n=r("b775"),a=(r("0fea"),{scenePageList:"/scene-config/page/list",sceneList:"/scene-config/list",sceneDetail:"/scene-config/",saveScene:"/scene-config",updateScene:"/scene-config",notifyConfigList:"/notify-config/list",notifyConfigDetail:"/notify-config/",saveNotify:"/notify-config/",updateNotify:"/notify-config/"});function i(e){return Object(n["b"])({url:a.notifyConfigDetail+e,method:"get"})}function o(e){return Object(n["b"])({url:a.saveNotify,method:"post",data:e})}function s(e){return Object(n["b"])({url:a.updateNotify,method:"put",data:e})}function u(e){return Object(n["b"])({url:a.sceneDetail+e,method:"get"})}function l(e){return Object(n["b"])({url:a.saveScene,method:"post",data:e})}function c(e){return Object(n["b"])({url:a.updateScene,method:"put",data:e})}}}]); |