gtsoft-snail-job-server/easy-retry-server/easy-retry-server-starter/src/main/resources/admin/js/chunk-8f4d4a1a.208e78e3.js
2024-03-29 17:16:18 +08:00

1 line
29 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8f4d4a1a"],{"38b7":function(e,t){var r={jobStatusEnum:{0:{name:"关闭",color:"#9c1f1f"},1:{name:"开启",color:"#f5a22d"}},taskType:{1:{name:"集群模式",color:"#d06892"},2:{name:"广播模式",color:"#f5a22d"},3:{name:"分片模式",color:"#e1f52d"}},triggerType:{2:{name:"固定时间",color:"#f5a22d"},3:{name:"CRON表达式",color:"#d06892"},99:{name:"工作流",color:"#76f52d"}},blockStrategy:{1:{name:"丢弃策略",color:"#d06892"},2:{name:"覆盖",color:"#f5a22d"},3:{name:"并行",color:"#e1f52d"}},executorType:{1:{name:"Java",color:"#d06892"}},routeKey:{4:{name:"轮询",color:"#8f68d2"},1:{name:"一致性Hash",color:"#d06892"},2:{name:"随机",color:"#f5a22d"},3:{name:"LRU",color:"#e1f52d"}},taskBatchStatus:{1:{name:"待处理",color:"#64a6ea"},2:{name:"运行中",color:"#1b7ee5"},3:{name:"成功",color:"#087da1"},4:{name:"失败",color:"#f52d80"},5:{name:"停止",color:"#ac2df5"},6:{name:"取消",color:"#f5732d"}},operationReason:{0:{name:""},1:{name:"执行超时",color:"#64a6ea"},2:{name:"无客户端节点",color:"#1b7ee5"},3:{name:"任务已关闭",color:"#087da1"},4:{name:"任务丢弃",color:"#3a2f81"},5:{name:"任务被覆盖",color:"#c2238a"},6:{name:"无可执行任务项",color:"#23c28a"},7:{name:"任务执行期间发生非预期异常",color:"#bdc223"},8:{name:"手动停止",color:"#23c28a"}},taskStatus:{2:{name:"运行中",color:"#1b7ee5"},3:{name:"成功",color:"#087da1"},4:{name:"失败",color:"#f52d80"},5:{name:"停止",color:"#ac2df5"}},notifyScene:{1:{name:"任务执行失败",color:"#d06892"}},notifyType:{1:{name:"钉钉通知",color:"#64a6ea"},2:{name:"邮箱通知",color:"#1b7ee5"},3:{name:"企业微信",color:"#0082EF"},4:{name:"飞书",color:"#087da1"}},notifyStatus:{0:{name:"停用",color:"#9c1f1f"},1:{name:"启用",color:"#f5a22d"}},rateLimiterStatus:{0:{name:"未启用",color:"#9c1f1f"},1:{name:"启用",color:"#f5a22d"}},workflowStatus:{0:{name:"关闭",color:"#9c1f1f"},1:{name:"开启",color:"#f5a22d"}}};e.exports=r},"3b7a":function(e,t,r){"use strict";r.d(t,"m",(function(){return i})),r.d(t,"A",(function(){return n})),r.d(t,"q",(function(){return s})),r.d(t,"t",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"x",(function(){return c})),r.d(t,"y",(function(){return f})),r.d(t,"z",(function(){return m})),r.d(t,"s",(function(){return d})),r.d(t,"p",(function(){return p})),r.d(t,"j",(function(){return h})),r.d(t,"r",(function(){return b})),r.d(t,"a",(function(){return y})),r.d(t,"w",(function(){return g})),r.d(t,"i",(function(){return v})),r.d(t,"l",(function(){return w})),r.d(t,"h",(function(){return j})),r.d(t,"g",(function(){return S})),r.d(t,"f",(function(){return L})),r.d(t,"d",(function(){return T})),r.d(t,"c",(function(){return N})),r.d(t,"n",(function(){return k})),r.d(t,"u",(function(){return V})),r.d(t,"k",(function(){return _})),r.d(t,"e",(function(){return x})),r.d(t,"o",(function(){return O})),r.d(t,"v",(function(){return q}));r("f1e1");var a=r("b775"),o={jobPageList:"/job/page/list",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",retry:"/job/batch/retry",jobNotifyConfigPageList:"/job/notify/config/page/list",jobNotifyConfigDetail:"/job/notify/config",saveJobNotify:"/job/notify/config",updateJobNotify:"/job/notify/config",jobTaskList:"/job/task/list",jobLogList:"/job/log/list",workflowListPage:"/workflow/page/list",saveWorkflow:"/workflow",updateWorkflow:"/workflow",workflowDetail:"/workflow",workflowBatchListPage:"/workflow/batch/page/list",workflowBatchDetail:"/workflow/batch",updateStatus:"/workflow/update/status",delWorkflow:"/workflow",triggerWorkflow:"/workflow/trigger",stopWorkflowBatch:"/workflow/batch/stop",workflowNameList:"/workflow/workflow-name/list"};function i(e){return Object(a["b"])({url:"".concat(o.retry,"/").concat(e),method:"post"})}function n(e){return Object(a["b"])({url:o.workflowNameList,method:"get",params:e})}function s(e){return Object(a["b"])({url:"".concat(o.stopWorkflowBatch,"/").concat(e),method:"post"})}function l(e){return Object(a["b"])({url:"".concat(o.triggerWorkflow,"/").concat(e),method:"post"})}function u(e){return Object(a["b"])({url:"".concat(o.delWorkflow,"/").concat(e),method:"delete"})}function c(e){return Object(a["b"])({url:"".concat(o.updateStatus,"/").concat(e),method:"put"})}function f(e){return Object(a["b"])({url:o.workflowBatchListPage,method:"get",params:e})}function m(e){return Object(a["b"])({url:o.workflowListPage,method:"get",params:e})}function d(e){return Object(a["b"])({url:"".concat(o.triggerJob,"/").concat(e),method:"post"})}function p(e){return Object(a["b"])({url:o.stop+e,method:"post"})}function h(e){return Object(a["b"])({url:o.jobNameList,method:"get",params:e})}function b(e){return Object(a["b"])({url:o.timeByCron,method:"get",params:e})}function y(e){return Object(a["b"])({url:"".concat(o.delJob,"/").concat(e),method:"delete"})}function g(e){return Object(a["b"])({url:o.updateJobStatus,method:"put",data:e})}function v(e){return Object(a["b"])({url:o.jobLogList,method:"get",params:e})}function w(e){return Object(a["b"])({url:o.jobTaskList,method:"get",params:e})}function j(e){return Object(a["b"])({url:o.jobBatchList,method:"get",params:e})}function S(e){return Object(a["b"])({url:"".concat(o.jobBatchDetail,"/").concat(e),method:"get"})}function L(e){return Object(a["b"])({url:o.jobPageList,method:"get",params:e})}function T(e){return Object(a["b"])({url:o.jobList,method:"get",params:e})}function N(e){return Object(a["b"])({url:"".concat(o.jobDetail,"/").concat(e),method:"get"})}function k(e){return Object(a["b"])({url:o.saveJob,method:"post",data:e})}function V(e){return Object(a["b"])({url:o.updateJob,method:"put",data:e})}function _(e){return Object(a["b"])({url:o.jobNotifyConfigPageList,method:"get",params:e})}function x(e){return Object(a["b"])({url:"".concat(o.jobNotifyConfigDetail,"/").concat(e),method:"get"})}function O(e){return Object(a["b"])({url:o.saveJobNotify,method:"post",data:e})}function q(e){return Object(a["b"])({url:o.updateJobNotify,method:"put",data:e})}},"6fb7":function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("a-modal",{attrs:{visible:e.visible,title:"Cron表达式",width:"650px"},on:{ok:e.handleOk,cancel:e.handlerCancel}},[r("cron-input",{attrs:{item:e.cronItem},on:{change:e.showFive},model:{value:e.cron,callback:function(t){e.cron=t},expression:"cron"}}),r("a-input",{attrs:{placeholder:"请输入cron表达式"},model:{value:e.cron,callback:function(t){e.cron=t},expression:"cron"}}),r("div",{staticStyle:{margin:"20px 0","border-left":"#f5222d 5px solid","font-size":"medium","font-weight":"bold"}},[e._v("    近5次的运行时间: ")]),e._l(e.list,(function(t,a){return r("div",{key:t,staticStyle:{"margin-top":"10px"}},[e._v(" 第"+e._s(a+1)+"次: "+e._s(t))])}))],2)],1)},o=[],i=r("3b7a"),n={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["r"])({cron:e}).then((function(e){t.list=e.data}))}}},s=n,l=(r("ac4c"),r("f7c6")),u=Object(l["a"])(s,a,o,!1,null,null,null);t["a"]=u.exports},ac4c:function(e,t,r){"use strict";r("e6cb")},c959:function(e,t,r){(function(t){var r=1/0,a=9007199254740991,o="[object Arguments]",i="[object Function]",n="[object GeneratorFunction]",s="[object Symbol]",l="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||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 m(e,t){var r=-1,a=e?e.length:0,o=Array(a);while(++r<a)o[r]=t(e[r],r,e);return o}function d(e,t){var r=-1,a=t.length,o=e.length;while(++r<a)e[o+r]=t[r];return e}var p=Object.prototype,h=p.hasOwnProperty,b=p.toString,y=c.Symbol,g=p.propertyIsEnumerable,v=y?y.isConcatSpreadable:void 0,w=Math.max;function j(e,t,r,a,o){var i=-1,n=e.length;r||(r=N),o||(o=[]);while(++i<n){var s=e[i];t>0&&r(s)?t>1?j(s,t-1,r,a,o):d(o,s):a||(o[o.length]=s)}return o}function S(e,t){return e=Object(e),L(e,t,(function(t,r){return r in e}))}function L(e,t,r){var a=-1,o=t.length,i={};while(++a<o){var n=t[a],s=e[n];r(s,n)&&(i[n]=s)}return i}function T(e,t){return t=w(void 0===t?e.length-1:t,0),function(){var r=arguments,a=-1,o=w(r.length-t,0),i=Array(o);while(++a<o)i[a]=r[t+a];a=-1;var n=Array(t+1);while(++a<t)n[a]=r[a];return n[t]=i,f(e,this,n)}}function N(e){return _(e)||V(e)||!!(v&&e&&e[v])}function k(e){if("string"==typeof e||U(e))return e;var t=e+"";return"0"==t&&1/e==-r?"-0":t}function V(e){return O(e)&&h.call(e,"callee")&&(!g.call(e,"callee")||b.call(e)==o)}var _=Array.isArray;function x(e){return null!=e&&F(e.length)&&!q(e)}function O(e){return D(e)&&x(e)}function q(e){var t=A(e)?b.call(e):"";return t==i||t==n}function F(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function A(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function D(e){return!!e&&"object"==typeof e}function U(e){return"symbol"==typeof e||D(e)&&b.call(e)==s}var C=T((function(e,t){return null==e?{}:S(e,m(j(t,1),k))}));e.exports=C}).call(this,r("d8fc"))},e6cb:function(e,t,r){},eeb3:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("page-header-wrapper",{staticStyle:{margin:"-24px -1px 0"},attrs:{content:"场景配置"},on:{back:function(){return e.$router.go(-1)}}},[r("div")]),r("a-card",{attrs:{"body-style":{padding:"24px 32px"},bordered:!1,loading:e.loading}},[r("a-form",{staticClass:"form-row",staticStyle:{width:"40%",margin:"auto"},attrs:{form:e.form,layout:"vertical"},on:{submit:e.handleSubmit}},[r("a-row",{staticClass:"form-row",attrs:{gutter:16}},[r("a-col",{attrs:{lg:18,md:12,sm:24}},[r("a-form-item",[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["id"],expression:"['id']"}],attrs:{hidden:""}})],1),r("a-form-item",[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("通知场景 "),r("a",{attrs:{href:e.officialWebsite+"/pages/571499/",target:"_blank"}},[r("a-icon",{attrs:{type:"question-circle-o"}})],1)]),r("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(t,a){return r("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(t.name))])})),1)],1)],1),r("a-col",{attrs:{lg:6,md:12,sm:24}},[r("a-form-item",[r("a-input",{attrs:{hidden:""}})],1),r("a-form-item",{attrs:{label:"通知阈值"}},[e.notifyThresholdDisabled.includes(this.notifySceneValue)?r("a-input",{attrs:{disabled:""}}):r("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),r("a-row",{staticClass:"form-row",attrs:{gutter:16}},[r("a-col",{attrs:{lg:18,md:12,sm:24}},[r("a-form-item",{attrs:{label:"组"}},[r("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(t){return r("a-select-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1)],1),r("a-col",{attrs:{lg:6,md:12,sm:24}},[r("a-form-item",{attrs:{label:"任务"}},[r("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["jobId",{rules:[{required:!0,message:"请选择任务"}]}],expression:"['jobId', { rules: [{ required: true, message: '请选择任务' }] }]"}],attrs:{disabled:e.sceneNameDisabled.includes(this.notifySceneValue),placeholder:"请选择任务"}},e._l(e.jobList,(function(t){return r("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(e._s(t.jobName))])})),1)],1)],1)],1),r("a-row",{staticClass:"form-row",attrs:{gutter:16}},[r("a-col",{attrs:{lg:8,md:12,sm:12}},[r("a-form-item",[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("通知类型  "),r("a",{attrs:{href:e.officialWebsite+"/pages/6dbf43/",target:"_blank"}},[r("a-icon",{attrs:{type:"question-circle-o"}})],1)]),r("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(t,a){return r("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(t.name))])})),1)],1)],1),r("a-col",{attrs:{lg:16,md:12,sm:12}},[r("a-form-item",{attrs:{label:"配置属性"}},[r("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),r("a-row",{staticClass:"form-row",attrs:{gutter:16}},[r("a-col",{attrs:{lg:8,md:12,sm:24}},[r("a-form-item",{attrs:{label:"限流状态"}},[r("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(t,a){return r("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(t.name))])})),1)],1)],1),r("a-col",{attrs:{lg:8,md:12,sm:24}},[r("a-form-item",{attrs:{label:"每秒限流阈值"}},[r("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),r("a-col",{attrs:{lg:8,md:12,sm:24}},[r("a-form-item",{attrs:{label:"状态"}},[r("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(t,a){return r("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(t.name))])})),1)],1)],1)],1),r("a-row",{staticClass:"form-row",attrs:{gutter:16}},[r("a-col",{attrs:{lg:24,md:24,sm:24}},[r("a-form-item",{attrs:{label:"描述"}},[r("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),r("a-form-item",{staticStyle:{"text-align":"center"},attrs:{wrapperCol:{span:24}}},[r("a-button",{attrs:{htmlType:"submit",type:"primary"}},[e._v("提交")])],1)],1)],1),r("a-modal",{attrs:{visible:e.visible,title:"添加配置",width:"1000px"},on:{ok:e.handleOk,cancel:e.handlerCancel}},[r("a-form",e._b({attrs:{form:e.notifyAttributeForm,"body-style":{padding:"0px 0px"}},on:{submit:e.handleSubmit}},"a-form",e.formItemLayout,!1),["1"===this.tempNotifyTypeValue?r("a-form-item",{attrs:{label:"钉钉URL"}},[r("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.tempNotifyTypeValue?r("a-form-item",[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("被@人手机号或钉钉号 ")]),"1"===this.tempNotifyTypeValue?r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ats",{rules:[{required:!1,message:"请输入被@人手机号或钉钉号",whitespace:!0}]}],expression:"[\n 'ats',\n {rules: [{ required: false, message: '请输入被@人手机号或钉钉号', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入被@人手机号或钉钉号",type:"textarea"}}):e._e()],1):e._e(),"3"===this.tempNotifyTypeValue?r("a-form-item",{attrs:{label:"企业微信URL"}},[r("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(),"3"===this.tempNotifyTypeValue?r("a-form-item",[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("被@人企业微信用户id ")]),"3"===this.tempNotifyTypeValue?r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ats",{rules:[{required:!1,message:"请输入被@人企业微信用户id",whitespace:!0}]}],expression:"[\n 'ats',\n {rules: [{ required: false, message: '请输入被@人企业微信用户id', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入被@人企业微信用户id",type:"textarea"}}):e._e()],1):e._e(),"4"===this.tempNotifyTypeValue?r("a-form-item",{attrs:{label:"飞书URL"}},[r("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.tempNotifyTypeValue?r("a-form-item",[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("被@负责人用户id")]),"4"===this.tempNotifyTypeValue?r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ats",{rules:[{required:!1,message:"请输入被@人open_id",whitespace:!0}]}],expression:"[\n 'ats',\n {rules: [{ required: false, message: '请输入被@人open_id', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入被@人open_id",type:"textarea"}}):e._e()],1):e._e(),"2"===this.tempNotifyTypeValue?r("a-form-item",{attrs:{label:"用户名"}},["2"===this.tempNotifyTypeValue?r("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.tempNotifyTypeValue?r("a-form-item",{attrs:{label:"密码"}},["2"===this.tempNotifyTypeValue?r("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:"请输入密码",type:"password"}}):e._e()],1):e._e(),"2"===this.tempNotifyTypeValue?r("a-form-item",{attrs:{label:"SMTP地址"}},["2"===this.tempNotifyTypeValue?r("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.tempNotifyTypeValue?r("a-form-item",{attrs:{label:"SMTP端口"}},["2"===this.tempNotifyTypeValue?r("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.tempNotifyTypeValue?r("a-form-item",{attrs:{label:"发件人"}},["2"===this.tempNotifyTypeValue?r("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.tempNotifyTypeValue?r("a-form-item",{attrs:{label:"收件人"}},["2"===this.tempNotifyTypeValue?r("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(),r("a-form-item",{attrs:{"wrapper-col":{xs:{span:24,offset:0},sm:{span:16,offset:8},lg:{span:7}}}})],1)],1)],1)},o=[],i=r("fb07"),n=(r("833b"),r("1d17"),r("4c87"),r("98da"),r("f764"),r("5662"),r("3dec"),r("1c6f"),r("4656"),r("0fea")),s=r("c959"),l=r.n(s),u=r("6fb7"),c=r("ca00"),f=r("3b7a"),m=r("38b7"),d={name:"NotifyFrom",props:{},comments:{CronModal:u["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(c["a"])(),formItemLayoutWithOutLabel:{wrapperCol:{xs:{span:24,offset:0},sm:{span:20,offset:4}}},formType:"create",groupNameList:[],jobList:[],notifySceneList:m.notifyScene,notifyTypeList:m.notifyType,notifyStatusList:m.notifyStatus,rateLimiterStatusList:m.rateLimiterStatus,loading:!1,visible:!1,count:0,notifyTypeValue:"1",tempNotifyTypeValue:"1",notifyAttribute:"",notifyThresholdDisabled:["1"],sceneNameDisabled:["3","4"],rateLimiterStatusDisabled:["1"],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(n["j"])().then((function(t){e.groupNameList=t.data})),this.$nextTick((function(){var t=e.$route.query.id;t&&(e.loading=!0,Object(f["e"])(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&&e.ats.replace(/\s+/g,"").split(",")),JSON.stringify(e)},handleChange:function(e){this.tempNotifyTypeValue=e,this.form.setFieldsValue({notifyAttribute:""})},changeGroup:function(e){var t=this;Object(f["d"])({groupName:e}).then((function(e){t.jobList=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;this.notifyAttributeForm.resetFields(),new Promise((function(e){setTimeout(e,100)})).then((function(){if("edit"===e.formType&&e.tempNotifyTypeValue===e.notifyTypeValue){var t=l()(JSON.parse(e.notifyAttribute),["webhookUrl","ats","user","pass","host","port","from","tos"]);e.notifyAttributeForm.getFieldDecorator("webhookUrl",{initialValue:t.webhookUrl,preserve:!0}),t.ats&&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})}else e.notifyAttributeForm.getFieldDecorator("webhookUrl",{initialValue:"",preserve:!0}),e.notifyAttributeForm.getFieldDecorator("ats",{initialValue:"",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 a=e.form,o=l()(r,["webhookUrl","ats","user","pass","host","port","from","tos"]);e.notifyAttribute=e.buildNotifyAttribute(o),a.setFieldsValue({notifyAttribute:e.parseJson(o)}),e.notifyTypeValue=e.tempNotifyTypeValue,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(f["o"])(r).then((function(e){t.$message.success("任务新增完成"),t.form.resetFields(),t.$router.go(-1)})):Object(f["v"])(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(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.changeGroup(e.groupName);case 2:r();case 3:case"end":return a.stop()}}),a)}))),100)})).then((function(){var a=l()(e,["id","notifyAttribute","groupName","jobId","notifyStatus","notifyScene","notifyThreshold","notifyType","description","rateLimiterStatus","rateLimiterThreshold"]);a.notifyStatus=a.notifyStatus.toString(),a.notifyScene=a.notifyScene.toString(),a.notifyType=a.notifyType.toString(),a.notifyThreshold=a.notifyThreshold.toString(),a.rateLimiterStatus=a.rateLimiterStatus.toString(),a.rateLimiterThreshold=a.rateLimiterThreshold.toString(),t.notifyTypeValue=a.notifyType,t.tempNotifyTypeValue=a.notifyType,t.notifyAttribute=a.notifyAttribute,t.notifySceneValue=a.notifyScene,t.rateLimiterStatusValue=a.rateLimiterStatus,a.notifyAttribute=t.parseJson(JSON.parse(a.notifyAttribute)),r.setFieldsValue(a)}))},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"]+";":"3"===this.notifyTypeValue?t="企业微信Url:"+e["webhookUrl"]+";被@人企业微信用户id:"+e["ats"]+";":"4"===this.notifyTypeValue&&(t="飞书Url:"+e["webhookUrl"]+";被@人用户id:"+e["ats"]+";"),t}}},p=d,h=r("f7c6"),b=Object(h["a"])(p,a,o,!1,null,null,null);t["default"]=b.exports},fb07:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));r("3dec");function a(e,t,r,a,o,i,n){try{var s=e[i](n),l=s.value}catch(u){return void r(u)}s.done?t(l):Promise.resolve(l).then(a,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var n=e.apply(t,r);function s(e){a(n,o,i,s,l,"next",e)}function l(e){a(n,o,i,s,l,"throw",e)}s(void 0)}))}}}}]);