gtsoft-snail-job-server/x-retry-server/src/main/resources/admin/js/chunk-6a1dbb17.5f15db12.js
byteblogs168 8d59acd33e 0.0.2.0
修复进入系统404问题
2023-01-14 21:02:27 +08:00

1 line
23 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6a1dbb17"],{"32f0":function(e,t,n){},"432b":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n("5530"),r=n("5880"),i={computed:Object(a["a"])(Object(a["a"])({},Object(r["mapState"])({layout:function(e){return e.app.layout},navTheme:function(e){return e.app.theme},primaryColor:function(e){return e.app.color},colorWeak:function(e){return e.app.weak},fixedHeader:function(e){return e.app.fixedHeader},fixedSidebar:function(e){return e.app.fixedSidebar},contentWidth:function(e){return e.app.contentWidth},autoHideHeader:function(e){return e.app.autoHideHeader},isMobile:function(e){return e.app.isMobile},sideCollapsed:function(e){return e.app.sideCollapsed},multiTab:function(e){return e.app.multiTab}})),{},{isTopMenu:function(){return"topmenu"===this.layout}}),methods:{isSideMenu:function(){return!this.isTopMenu}}}},"46bd":function(e,t,n){"use strict";n("32f0")},"88bc":function(e,t,n){(function(t){var n=1/0,a=9007199254740991,r="[object Arguments]",i="[object Function]",o="[object GeneratorFunction]",s="[object Symbol]",c="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=c||u||Function("return this")();function d(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function f(e,t){var n=-1,a=e?e.length:0,r=Array(a);while(++n<a)r[n]=t(e[n],n,e);return r}function p(e,t){var n=-1,a=t.length,r=e.length;while(++n<a)e[r+n]=t[n];return e}var m=Object.prototype,y=m.hasOwnProperty,h=m.toString,v=l.Symbol,g=m.propertyIsEnumerable,b=v?v.isConcatSpreadable:void 0,k=Math.max;function S(e,t,n,a,r){var i=-1,o=e.length;n||(n=C),r||(r=[]);while(++i<o){var s=e[i];t>0&&n(s)?t>1?S(s,t-1,n,a,r):p(r,s):a||(r[r.length]=s)}return r}function w(e,t){return e=Object(e),_(e,t,(function(t,n){return n in e}))}function _(e,t,n){var a=-1,r=t.length,i={};while(++a<r){var o=t[a],s=e[o];n(s,o)&&(i[o]=s)}return i}function x(e,t){return t=k(void 0===t?e.length-1:t,0),function(){var n=arguments,a=-1,r=k(n.length-t,0),i=Array(r);while(++a<r)i[a]=n[t+a];a=-1;var o=Array(t+1);while(++a<t)o[a]=n[a];return o[t]=i,d(e,this,o)}}function C(e){return T(e)||O(e)||!!(b&&e&&e[b])}function N(e){if("string"==typeof e||A(e))return e;var t=e+"";return"0"==t&&1/e==-n?"-0":t}function O(e){return I(e)&&y.call(e,"callee")&&(!g.call(e,"callee")||h.call(e)==r)}var T=Array.isArray;function j(e){return null!=e&&D(e.length)&&!R(e)}function I(e){return q(e)&&j(e)}function R(e){var t=L(e)?h.call(e):"";return t==i||t==o}function D(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function L(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return!!e&&"object"==typeof e}function A(e){return"symbol"==typeof e||q(e)&&h.call(e)==s}var $=x((function(e,t){return null==e?{}:w(e,f(S(t,1),N))}));e.exports=$}).call(this,n("c8ba"))},e941:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("page-header-wrapper",{attrs:{content:"配置组、场景、通知配置"}},[n("a-card",{staticClass:"card",attrs:{title:"组配置",bordered:!1}},[n("group-form",{ref:"groupConfig",attrs:{showSubmit:!1}})],1),n("a-card",{staticClass:"card",attrs:{title:"通知配置",bordered:!1}},[n("notify-list",{ref:"notify"})],1),n("a-card",{staticClass:"card",attrs:{title:"场景配置",bordered:!1}},[n("scene-list",{ref:"scene"})],1),n("footer-tool-bar",{attrs:{"is-mobile":e.isMobile,collapsed:e.sideCollapsed}},[n("span",{staticClass:"popover-wrapper"},[n("a-popover",{attrs:{title:"表单校验信息",overlayClassName:"antd-pro-pages-forms-style-errorPopover",trigger:"click",getPopupContainer:function(e){return e.parentNode}}},[n("template",{slot:"content"},e._l(e.errors,(function(t){return n("li",{key:t.key,staticClass:"antd-pro-pages-forms-style-errorListItem",on:{click:function(n){return e.scrollToField(t.key)}}},[n("a-icon",{staticClass:"antd-pro-pages-forms-style-errorIcon",attrs:{type:"cross-circle-o"}}),n("div",{},[e._v(e._s(t.message))]),n("div",{staticClass:"antd-pro-pages-forms-style-errorField"},[e._v(e._s(t.fieldLabel))])],1)})),0),e.errors.length>0?n("span",{staticClass:"antd-pro-pages-forms-style-errorIcon"},[n("a-icon",{attrs:{type:"exclamation-circle"}}),e._v(e._s(e.errors.length)+" ")],1):e._e()],2)],1),n("a-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.validate}},[e._v("提交")])],1)],1)},r=[],i=n("5530"),o=(n("d3b7"),n("d81d"),n("4de4"),n("b64b"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-form",{staticClass:"form",attrs:{form:e.form},on:{submit:e.handleSubmit}},[n("a-row",{staticClass:"form-row",attrs:{gutter:16}},[n("a-col",{attrs:{lg:6,md:12,sm:24}},[n("a-form-item",{attrs:{label:"组名称"}},[n("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["id"],expression:"[\n 'id',\n ]"}],attrs:{placeholder:"请输入组名称",hidden:""}}),n("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["groupName",{rules:[{required:!0,message:"请输入组名称",whitespace:!0}]}],expression:"[\n 'groupName',\n {rules: [{ required: true, message: '请输入组名称', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入组名称"}})],1)],1),n("a-col",{attrs:{lg:6,md:12,sm:24}},[n("a-form-item",{attrs:{label:"状态"}},[n("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["groupStatus",{rules:[{required:!0,message:"请选择状态类型"}]}],expression:"[\n 'groupStatus',\n {rules: [{ required: true, message: '请选择状态类型'}]}\n ]"}],attrs:{placeholder:"请选择状态"}},[n("a-select-option",{attrs:{value:"0"}},[e._v("停用")]),n("a-select-option",{attrs:{value:"1"}},[e._v("启动")])],1)],1)],1),n("a-col",{attrs:{lg:6,md:12,sm:24}},[n("a-form-item",{attrs:{label:"路由策略"}},[n("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["routeKey",{rules:[{required:!0,message:"请选择路由策略"}]}],expression:"[\n 'routeKey',\n {rules: [{ required: true, message: '请选择路由策略'}]}\n ]"}],attrs:{placeholder:"请选择路由策略"}},e._l(e.routeKey,(function(t,a){return n("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(t))])})),1)],1)],1),n("a-col",{attrs:{lg:6,md:12,sm:24}},[n("a-form-item",{attrs:{label:"描述"}},[n("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["description",{rules:[{required:!0,message:"请输入描述",whitespace:!0}]}],expression:"[\n 'description',\n {rules: [{ required: true, message: '请输入描述', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入描述"}})],1)],1),n("a-col",{attrs:{lg:3,md:6,sm:12}},[n("a-form-item",{attrs:{label:"指定分区"}},[n("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["groupPartition"],expression:"[\n 'groupPartition'\n ]"}],attrs:{id:"inputNumber",placeholder:"分区",min:1,max:10}})],1)],1)],1),e.showSubmit?n("a-form-item",[n("a-button",{attrs:{htmlType:"submit"}},[e._v("Submit")])],1):e._e()],1)}),s=[],c=(n("ac1f"),n("25f0"),n("0fea")),u=n("88bc"),l=n.n(u),d={name:"GroupForm",props:{showSubmit:{type:Boolean,default:!1}},data:function(){return{form:this.$form.createForm(this),routeKey:{1:"一致性hash算法",2:"随机算法",3:"最近最久未使用算法"}}},mounted:function(){var e=this;this.$nextTick((function(){var t=e.$route.query.groupName;t&&Object(c["f"])(t).then((function(t){e.loadEditInfo(t.data)}))}))},methods:{handleSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields((function(e,n){e||t.$notification["error"]({message:"Received values of form:",description:n})}))},validate:function(e,t,n){var a=/^user-(.*)$/;a.test(t)||n(new Error("需要以 user- 开头")),n()},loadEditInfo:function(e){var t=this.form;new Promise((function(e){setTimeout(e,1500)})).then((function(){var n=l()(e,["id","groupName","routeKey","groupStatus","description","groupPartition"]);n.groupStatus=n.groupStatus.toString(),n.routeKey=n.routeKey.toString(),t.setFieldsValue(n)}))}}},f=d,p=n("2877"),m=Object(p["a"])(f,o,s,!1,null,"296629aa",null),y=m.exports,h=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[[n("a-col",{attrs:{md:8,sm:24}},[n("a-form-item",{attrs:{label:"场景名称"}},[n("a-input",{attrs:{placeholder:"请输入场景名称",allowClear:""},model:{value:e.queryParam.sceneName,callback:function(t){e.$set(e.queryParam,"sceneName",t)},expression:"queryParam.sceneName"}})],1)],1)],n("a-col",{attrs:{md:e.advanced?24:8,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons",style:e.advanced&&{float:"right",overflow:"hidden"}||{}},[n("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.queryChange()}}},[e._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:function(){return e.queryParam={}}}},[e._v("重置")])],1)])],2)],1)],1),n("a-table",{attrs:{columns:e.sceneColumns,"row-key":function(e){return e.key},dataSource:e.data,pagination:e.pagination,loading:e.memberLoading},on:{change:e.handleTableChange},scopedSlots:e._u([e._l(["sceneName","description"],(function(t,a){return{key:t,fn:function(a,r){return[r.editable?n("a-input",{key:t,staticStyle:{margin:"-5px 0"},attrs:{value:a,placeholder:e.sceneColumns.find((function(e){return e.key===t})).title},on:{change:function(n){return e.handleChange(n.target.value,r.key,t)}}}):[e._v(e._s(a))]]}}})),{key:"sceneStatus",fn:function(t,a){return[a.editable?n("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:"场景状态",value:0===t?"1":t},on:{change:function(t){return e.handleChange(t,a.key,"sceneStatus")}}},[n("a-select-option",{attrs:{value:"0"}},[e._v("停用")]),n("a-select-option",{attrs:{value:"1"}},[e._v("启用")])],1):[e._v(e._s(e.sceneStatus[t]))]]}},{key:"backOff",fn:function(t,a){return[a.editable?n("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:"退避策略",value:0===t?null:t},on:{change:function(t){return e.handleChange(t,a.key,"backOff")}}},[n("a-select-option",{attrs:{value:"1"}},[e._v("延迟等级")]),n("a-select-option",{attrs:{value:"2"}},[e._v("固定定时间")]),n("a-select-option",{attrs:{value:"3"}},[e._v("CRON表达式")]),n("a-select-option",{attrs:{value:"4"}},[e._v("随机等待")])],1):[e._v(e._s(e.backOffLabels[t]))]]}},{key:"maxRetryCount",fn:function(t,a){return[a.editable?n("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,max:99999,value:t,placeholder:"最大重试次数"},on:{change:function(t){return e.handleChange(t,a.key,"maxRetryCount")}}}):[e._v(e._s(t))]]}},{key:"triggerInterval",fn:function(t,a){return[a.editable?n("a-input",{staticStyle:{margin:"-5px 0"},attrs:{placeholder:"间隔时间",value:t,disabled:"1"===e.data.find((function(e){return e.key===a.key})).backOff},on:{change:function(t){return e.handleChange(t.target.value,a.key,"triggerInterval")}}}):[e._v(e._s(t))]]}},{key:"operation",fn:function(t,a){return[a.editable?[a.isNew?n("span",[n("a",{on:{click:function(t){return e.saveRow(a)}}},[e._v("添加")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"是否要删除此行?"},on:{confirm:function(t){return e.remove(a.key)}}},[n("a",[e._v("删除")])])],1):n("span",[n("a",{on:{click:function(t){return e.saveRow(a)}}},[e._v("保存")]),n("a-divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(t){return e.cancel(a.key)}}},[e._v("取消")])],1)]:n("span",[n("a",{on:{click:function(t){return e.toggle(a.key)}}},[e._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"是否要删除此行?"},on:{confirm:function(t){return e.remove(a.key)}}},[n("a",[e._v("删除")])])],1)]}}],null,!0)}),n("a-button",{staticStyle:{width:"100%","margin-top":"16px","margin-bottom":"8px"},attrs:{type:"dashed",icon:"plus"},on:{click:e.newMember}},[e._v("新增成员")])],1)},v=[],g=n("6b75");function b(e){if(Array.isArray(e))return Object(g["a"])(e)}n("a4d3"),n("e01a"),n("d28b"),n("3ca3"),n("ddb0"),n("a630");function k(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}var S=n("06c5");function w(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e){return b(e)||k(e)||Object(S["a"])(e)||w()}n("7db0"),n("159b");var x=n("2af9"),C={name:"SceneList",components:{STable:x["j"]},data:function(){return{sceneColumns:[{title:"场景名称",dataIndex:"sceneName",key:"sceneName",width:"15%",scopedSlots:{customRender:"sceneName"}},{title:"场景状态",dataIndex:"sceneStatus",key:"sceneStatus",width:"12%",scopedSlots:{customRender:"sceneStatus"}},{title:"退避策略",dataIndex:"backOff",key:"backOff",width:"12%",scopedSlots:{customRender:"backOff"}},{title:"最大重试次数",dataIndex:"maxRetryCount",key:"maxRetryCount",width:"12%",scopedSlots:{customRender:"maxRetryCount"}},{title:"间隔时间",dataIndex:"triggerInterval",key:"triggerInterval",width:"12%",scopedSlots:{customRender:"triggerInterval"}},{title:"描述",dataIndex:"description",key:"description",width:"25%",scopedSlots:{customRender:"description"}},{title:"操作",key:"action",scopedSlots:{customRender:"operation"}}],data:[],formData:[],loading:!1,advanced:!1,memberLoading:!1,triggerIntervalDisabled:!1,max:21,pagination:{},backOffLabels:{1:"延迟等级",2:"固定定时间",3:"CRON表达式",4:"随机等待"},sceneStatus:{0:"停用",1:"启用"},queryParam:{}}},created:function(){var e=this.$route.query.groupName;e&&this.fetch({groupName:e,size:6,page:1})},methods:{handleTableChange:function(e,t,n){var a=Object(i["a"])({},this.pagination);a.current=e.current,this.pagination=a,this.fetch(Object(i["a"])({groupName:this.$route.query.groupName,size:e.pageSize,page:e.current,sortField:n.field,sortOrder:n.order},t))},queryChange:function(){this.fetch({groupName:this.$route.query.groupName,size:6,page:1,sceneName:this.queryParam.sceneName})},fetch:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.loading=!0,Object(c["q"])(t).then((function(t){e.data=[],t.data.map((function(t){e.loading=!1;var n=t.id,a=t.sceneName,r=t.sceneStatus,i=t.maxRetryCount,o=t.backOff,s=t.triggerInterval,c=t.description;e.data.push({key:n,sceneName:a,sceneStatus:r.toString(),maxRetryCount:i,backOff:o.toString(),triggerInterval:s,description:c,editable:!1,isNew:!1})}));var n=Object(i["a"])({},e.pagination);n.pageSize=t.size,n.current=t.page,n.total=t.total,e.pagination=n}))},remove:function(e){var t=this.data.find((function(t){return t.key===e})),n=t.key,a=t.sceneName,r=t.sceneStatus,i=t.maxRetryCount,o=t.backOff,s=t.triggerInterval,c=t.description;this.formData.push({key:n,sceneName:a,sceneStatus:r,maxRetryCount:i,backOff:o,triggerInterval:s,description:c,isDeleted:1});var u=this.data.filter((function(t){return t.key!==e}));this.data=u},saveRow:function(e){var t=this;this.memberLoading=!0;var n=e.key,a=e.sceneName,r=e.sceneStatus,i=e.maxRetryCount,o=e.backOff,s=e.triggerInterval,c=e.description;if(!a||!r||!i||!o||"1"!==o&&!s)return this.memberLoading=!1,void this.$message.error("请填写完整成员信息。");var u=this.formData.find((function(e){return n===e.key}));u||this.formData.push({key:n,sceneName:a,sceneStatus:r,maxRetryCount:i,backOff:o,triggerInterval:s,description:c,isDeleted:0}),new Promise((function(e){setTimeout((function(){e({loop:!1})}),200)})).then((function(){var e=t.data.find((function(e){return e.key===n}));e.editable=!1,e.isNew=!1,t.memberLoading=!1}))},toggle:function(e){var t=this.data.find((function(t){return t.key===e}));t._originalData=Object(i["a"])({},t),t.editable=!t.editable},getRowByKey:function(e,t){var n=this.data;return(t||n).find((function(t){return t.key===e}))},cancel:function(e){var t=this.data.find((function(t){return t.key===e}));Object.keys(t).forEach((function(e){t[e]=t._originalData[e]})),t._originalData=void 0},handleChange:function(e,t,n){if("backOff"===n)switch(e){case"1":this.triggerIntervalDisabled=!0,this.max=21;break;default:this.triggerIntervalDisabled=!1,this.max=99999}var a=_(this.data),r=a.find((function(e){return t===e.key}));r&&(r[n]=e,this.data=a)},newMember:function(){var e=this.data.length;this.data.unshift({key:0===e?"1":(parseInt(this.data[e-1].key)+1).toString(),sceneName:"",sceneStatus:"1",maxRetryCount:null,backOff:"1",triggerInterval:"",description:"",editable:!0,isNew:!0})}}},N=C,O=Object(p["a"])(N,h,v,!1,null,"30281bcd",null),T=O.exports,j=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("a-table",{attrs:{columns:e.notifyColumns,dataSource:e.data,pagination:!1,loading:e.memberLoading},scopedSlots:e._u([e._l(["notifyAddress","description"],(function(t,a){return{key:t,fn:function(a,r){return[r.editable?n("a-input",{key:t,staticStyle:{margin:"-5px 0"},attrs:{value:a,placeholder:e.notifyColumns.find((function(e){return e.key===t})).title},on:{change:function(n){return e.handleChange(n.target.value,r.key,t)}}}):[e._v(e._s(a))]]}}})),{key:"notifyScene",fn:function(t,a){return[a.editable?n("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:"通知场景",value:t},on:{change:function(t){return e.handleChange(t,a.key,"notifyScene")}}},e._l(e.notifyScene,(function(t,a){return n("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(t))])})),1):[e._v(e._s(e.notifyScene[t]))]]}},{key:"notifyType",fn:function(t,a){return[a.editable?n("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:"通知类型",value:t},on:{change:function(t){return e.handleChange(t,a.key,"notifyType")}}},e._l(e.notifyType,(function(t,a){return n("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(t))])})),1):[e._v(e._s(e.notifyType[t]))]]}},{key:"notifyThreshold",fn:function(t,a){return[a.editable?n("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,max:999999,value:t,disabled:e.notifyThresholdDisabled.includes(e.data.find((function(e){return e.key===a.key})).notifyScene),placeholder:"通知阈值"},on:{change:function(t){return e.handleChange(t,a.key,"notifyThreshold")}}}):[e._v(e._s(t))]]}},{key:"operation",fn:function(t,a){return[a.editable?[a.isNew?n("span",[n("a",{on:{click:function(t){return e.saveRow(a)}}},[e._v("添加")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"是否要删除此行?"},on:{confirm:function(t){return e.remove(a.key)}}},[n("a",[e._v("删除")])])],1):n("span",[n("a",{on:{click:function(t){return e.saveRow(a)}}},[e._v("保存")]),n("a-divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(t){return e.cancel(a.key)}}},[e._v("取消")])],1)]:n("span",[n("a",{on:{click:function(t){return e.toggle(a.key)}}},[e._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"是否要删除此行?"},on:{confirm:function(t){return e.remove(a.key)}}},[n("a",[e._v("删除")])])],1)]}}],null,!0)}),n("a-button",{staticStyle:{width:"100%","margin-top":"16px","margin-bottom":"8px"},attrs:{type:"dashed",icon:"plus"},on:{click:e.newMember}},[e._v("新增成员")])],1)},I=[],R=(n("caad"),n("2532"),{name:"NotifyList",data:function(){return{notifyColumns:[{title:"通知类型",dataIndex:"notifyType",key:"notifyType",width:"12%",scopedSlots:{customRender:"notifyType"}},{title:"通知场景",dataIndex:"notifyScene",key:"notifyScene",width:"15%",scopedSlots:{customRender:"notifyScene"}},{title:"通知阈值",dataIndex:"notifyThreshold",key:"notifyThreshold",width:"12%",scopedSlots:{customRender:"notifyThreshold"}},{title:"通知地址",dataIndex:"notifyAddress",key:"notifyAddress",width:"25%",scopedSlots:{customRender:"notifyAddress"}},{title:"描述",dataIndex:"description",key:"description",width:"25%",scopedSlots:{customRender:"description"}},{title:"操作",key:"action",scopedSlots:{customRender:"operation"}}],data:[],formData:[],loading:!1,memberLoading:!1,notifyScene:{1:"重试数量超过阈值",2:"重试失败数量超过阈值",3:"客户端上报失败",4:"客户端组件异常"},notifyType:{1:"钉钉通知",2:"邮箱通知",3:"企业微信"},notifyThresholdDisabled:["3","4"]}},created:function(){var e=this,t=this.$route.query.groupName;t&&Object(c["i"])({groupName:t}).then((function(t){t.data.map((function(t){var n=t.id,a=t.notifyType,r=t.notifyThreshold,i=t.notifyScene,o=t.description,s=t.notifyAddress;e.data.push({key:n,notifyType:a.toString(),notifyThreshold:r,notifyScene:i.toString(),description:o,notifyAddress:s,editable:!1,isNew:!1})}))}))},methods:{remove:function(e){var t=this.data.find((function(t){return e===t.key})),n=t.key,a=t.notifyType,r=t.notifyThreshold,i=t.notifyAddress,o=t.notifyScene,s=t.description;this.formData.push({key:n,notifyType:a,notifyThreshold:r,notifyScene:o,notifyAddress:i,description:s,isDeleted:1});var c=this.data.filter((function(e){return e.key!==n}));this.data=c},saveRow:function(e){var t=this;this.memberLoading=!0;var n=e.key,a=e.notifyType,r=e.notifyThreshold,i=e.notifyAddress,o=e.notifyScene,s=e.description;if(!a||!o||!i||!s||!this.notifyThresholdDisabled.includes(o)&&!r)return this.memberLoading=!1,void this.$message.error("请填写完整成员信息。");var c=this.formData.find((function(e){return n===e.key}));c||this.formData.push({key:n,notifyType:a,notifyThreshold:r,notifyScene:o,notifyAddress:i,description:s,isDeleted:0}),new Promise((function(e){setTimeout((function(){e({loop:!1})}),100)})).then((function(){var e=t.data.find((function(e){return e.key===n}));e.editable=!1,e.isNew=!1,t.memberLoading=!1}))},toggle:function(e){var t=this.data.find((function(t){return t.key===e}));t._originalData=Object(i["a"])({},t),t.editable=!t.editable},getRowByKey:function(e,t){var n=this.data;return(t||n).find((function(t){return t.key===e}))},cancel:function(e){var t=this.data.find((function(t){return t.key===e}));Object.keys(t).forEach((function(e){t[e]=t._originalData[e]})),t._originalData=void 0},handleChange:function(e,t,n){var a=_(this.data),r=a.find((function(e){return t===e.key}));r&&(r[n]=e,this.data=a)},newMember:function(){var e=this.data.length;this.data.push({key:0===e?"1":(parseInt(this.data[e-1].key)+1).toString(),notifyType:"1",notifyScene:"1",notifyThreshold:null,notifyAddress:"",description:"",editable:!0,isNew:!0})}}}),D=R,L=Object(p["a"])(D,j,I,!1,null,"311caa31",null),q=L.exports,A=n("5a70"),$=n("432b"),F={groupName:"组名称",groupStatus:"组状态",description:"描述"},P={name:"AdvancedForm",mixins:[$["a"]],components:{FooterToolBar:A["a"],GroupForm:y,SceneList:T,NotifyList:q},data:function(){return{loading:!1,memberLoading:!1,errors:[]}},methods:{handleSubmit:function(e){e.preventDefault()},validate:function(){var e=this,t=this.$refs,n=t.groupConfig,a=t.scene,r=t.notify,o=this.$notification,s=new Promise((function(e,t){n.form.validateFields((function(n,a){n?t(n):e(a)}))}));this.errors=[],s.then((function(e){e["id"]||(e["id"]=0),e["sceneList"]=a.formData,e["notifyList"]=r.formData,Object(c["v"])(e).then((function(e){0===e.status?o["error"]({message:e.message}):o["success"]({message:e.message})}))})).catch((function(){var t=Object.assign({},n.form.getFieldsError()),a=Object(i["a"])({},t);e.errorList(a)}))},errorList:function(e){e&&0!==e.length&&(this.errors=Object.keys(e).filter((function(t){return e[t]})).map((function(t){return{key:t,message:e[t][0],fieldLabel:F[t]}})))},scrollToField:function(e){var t=document.querySelector('label[for="'.concat(e,'"]'));t&&t.scrollIntoView(!0)}}},E=P,M=(n("46bd"),Object(p["a"])(E,a,r,!1,null,"2f27469c",null));t["default"]=M.exports}}]);