(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e3c45b54"],{"13d5":function(e,t,a){"use strict";var n=a("23e7"),r=a("d58f").left,c=a("a640"),u=a("2d00"),s=a("605d"),i=!s&&u>79&&u<83,o=i||!c("reduce");n({target:"Array",proto:!0,forced:o},{reduce:function(e){var t=arguments.length;return r(this,e,t,t>1?arguments[1]:void 0)}})},"145c":function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"j",(function(){return u})),a.d(t,"k",(function(){return s})),a.d(t,"i",(function(){return i})),a.d(t,"d",(function(){return o})),a.d(t,"b",(function(){return l})),a.d(t,"l",(function(){return d})),a.d(t,"e",(function(){return p})),a.d(t,"g",(function(){return m})),a.d(t,"h",(function(){return f})),a.d(t,"c",(function(){return h})),a.d(t,"f",(function(){return b}));var n=a("b775"),r=a("2f73");function c(e){let t=r["a"].state.accountID;return Object(n["b"])(`accounts/${t}/domains`,{method:"POST",serverType:"CDN",...e})}function u(e){return Object(n["b"])("supplier",{method:"GET",...e})}function s(){let e=r["a"].state.accountID;return Object(n["b"])("usersuppliers/"+e,{method:"GET"})}function i(e){let t=r["a"].state.accountID;return Object(n["b"])(`accounts/${t}/node`,{method:"GET",...e})}function o(e){let t=r["a"].state.accountID;return Object(n["b"])(`accounts/${t}/domain/${e}`,{method:"GET"})}function l(e){let t=r["a"].state.accountID;return Object(n["b"])(`accounts/${t}/domains/${e}`,{method:"DELETE"})}function d({id:e,...t}=params){let a=r["a"].state.accountID;return Object(n["b"])(`accounts/${a}/domains/${e}`,{method:"PUT",...t})}function p({id:e}=params){let t=r["a"].state.accountID;return Object(n["b"])(`accounts/${t}/domains/${e}/retry`,{method:"POST"})}function m(e){let t=r["a"].state.accountID;return Object(n["b"])(`accounts/${t}/domains`,{method:"GET",...e})}function f(e){let t=r["a"].state.accountID;return Object(n["b"])(`accounts/${t}/domainsIncludeDeleted`,{method:"GET",...e})}function h(e,t){let a=r["a"].state.accountID;return Object(n["b"])(`accounts/${a}/domains/${e}/argo`,{method:"PUT",enable:t})}function b(e){let t=r["a"].state.accountID;return Object(n["b"])(`accounts/${t}/allDomains`,{method:"GET",...e})}},"19df":function(e){e.exports=JSON.parse('{"area":["默认","电信","联通","移动","教育网","铁通","百度","谷歌","有道","必应","搜狗","奇虎","搜索引擎","境内","境外","安道尔","阿联酋","阿富汗","安提瓜和巴布达","安圭拉","阿尔巴尼亚","亚美尼亚","荷属安德列斯","安哥拉","阿根廷","东萨摩亚","奥地利","澳大利亚","阿鲁巴","奥兰群岛","阿塞拜疆","波黑","巴巴多斯","孟加拉","比利时","布基纳法索","保加利亚","巴林","布隆迪","贝宁","圣巴泰勒米岛","百慕大","文莱达鲁萨兰","玻利维亚","荷兰加勒比区","巴西","巴哈马","不丹","布韦岛","博茨瓦纳","白俄罗斯","伯里兹","加拿大","可可斯群岛","刚果(金)","中非","刚果(布)","瑞士","象牙海岸","库克群岛","智利","喀麦隆","中国","哥伦比亚","哥斯达黎加","捷克斯洛伐克","古巴","佛得角","库拉索","圣诞岛","塞普路斯","捷克","德国","吉布提","丹麦","多米尼加共和国","多米尼加联邦","阿尔及利亚","厄瓜多尔","爱沙尼亚","埃及","西撒哈拉","厄立特里亚","西班牙","埃塞俄比亚","芬兰","斐济","福兰克群岛","米克罗尼西亚","法罗群岛","法国","加蓬","英国","格林纳达","格鲁吉亚","法属圭亚那","根西岛","加纳","直布罗陀","格陵兰岛","冈比亚","几内亚","法属德洛普群岛","赤道几内亚","希腊","南乔治亚岛和南桑威奇群岛","危地马拉","关岛","几内亚比绍","圭亚那","赫德和麦克唐纳群岛","洪都拉斯","克罗地亚","海地","匈牙利","印度尼西亚","爱尔兰","以色列","马恩岛","印度","英属印度洋领地","伊拉克","伊朗","冰岛","意大利","泽西岛","牙买加","约旦","日本","肯尼亚","吉尔吉斯斯坦","柬埔寨","基里巴斯","科摩罗","圣基茨和尼维斯","朝鲜","韩国","科威特","开曼群岛","哈萨克斯坦","老挝","黎巴嫩","圣卢西亚","列支顿士登","斯里兰卡","利比里亚","莱索托","立陶宛","卢森堡","拉托维亚","利比亚","摩洛哥","摩纳哥","摩尔多瓦","黑山","法属圣马丁","马达加斯加","马绍尔群岛","马其顿","马里","缅甸","蒙古","北马里亚纳群岛","法属马提尼克群岛","毛里塔尼亚","蒙塞拉特岛","马耳他","毛里求斯","马尔代夫","马拉维","墨西哥","马来西亚","莫桑比克","纳米比亚","新卡里多尼亚","尼日尔","诺福克岛","尼日利亚","尼加拉瓜","荷兰","挪威","尼泊尔","瑙鲁","纽爱","新西兰","阿曼","巴拿马","秘鲁","法属玻里尼西亚","巴布亚新几内亚","菲律宾","巴基斯坦","波兰","圣皮艾尔和密克隆群岛","皮特克恩岛","波多黎各","巴勒斯坦","葡萄牙","帕劳","巴拉圭","卡塔尔","法属尼留旺岛","罗马尼亚","塞尔维亚","俄罗斯","卢旺达","沙特阿拉伯","所罗门群岛","塞舌尔","苏丹","瑞典","新加坡","圣赫勒拿","斯罗文尼亚","斯瓦尔巴特和扬马延岛","斯洛伐克","塞拉利昂","圣马力诺","塞内加尔","索马里","苏里南","南苏丹","圣多美和普林西比","萨尔瓦多","荷属圣马丁","叙利亚","斯威士兰","特克斯和凯科斯群岛","乍得","法国南部领地","多哥","泰国","塔吉克斯坦","托克劳群岛","东帝汶","土库曼斯坦","突尼斯","汤加","土尔其","特立尼达和多巴哥","图瓦卢","坦桑尼亚","乌克兰","乌干达","美国海外领地","美国","乌拉圭","乌兹别克斯坦","梵蒂岗","圣文森特和格陵纳丁斯","委内瑞拉","英属维京群岛","美属维京群岛","越南","瓦努阿鲁","瓦里斯和福图纳群岛","西萨摩亚","也门","马约特","南非","赞比亚","津巴布韦","科索沃"]}')},2396:function(e,t,a){"use strict";var n=function(){var e=this,t=e._self._c;return t("div",[t("section",{staticClass:"breadcrumb"},[t("el-breadcrumb",{attrs:{separator:"/"}},[e.skeleton?t("el-skeleton-item",{staticStyle:{width:"4rem","margin-left":"15px"},attrs:{variant:"h1"}}):e.showCdn&&"/control-overview"!==e.$route.path?t("el-breadcrumb-item",[e._v(" "+e._s(e.title?e.title:e.$t("CDN."+e.$route.name))+" ")]):e.showSms&&"/control-overview"!==e.$route.path?t("el-breadcrumb-item",[e._v(" "+e._s(e.title?e.title:e.$t("SMS."+e.$route.name))+" ")]):e._e()],1)],1),t("section",{staticClass:"content"},[t("div",[e._t("pageContent")],2),t("div",{staticClass:"copyright"},[e._v("版权所有@上海云曾科技有限公司")])])])},r=[],c={name:"pageMain",props:{title:String,skeleton:Boolean},mounted(){},computed:{enableCdn(){return this.$store.state.enableCdn},enableSms(){return this.$store.state.enableSms},showCdn(){return this.$store.state.showCdn},showSms(){return this.$store.state.showSms}}},u=c,s=(a("dc55"),a("fb5b"),a("2877")),i=Object(s["a"])(u,n,r,!1,null,"04daf3cc",null);t["a"]=i.exports},"34a6":function(e,t,a){"use strict";a.d(t,"e",(function(){return c})),a.d(t,"a",(function(){return u})),a.d(t,"h",(function(){return s})),a.d(t,"c",(function(){return i})),a.d(t,"g",(function(){return o})),a.d(t,"f",(function(){return l})),a.d(t,"b",(function(){return d})),a.d(t,"i",(function(){return p})),a.d(t,"d",(function(){return m}));var n=a("b775"),r=a("2f73");async function c(e){const t=await Object(n["b"])("schedule",{method:"GET",filter:e.filter,flags:"",currentPage:e.currentPage,perPage:e.perPage,sort:""});return t.list=t.list.map(e=>{const t=JSON.parse(e.param);return{...e,param:t}}),t}function u(e){const{param:t}=e;return Object(n["b"])("schedule",{method:"POST",...e,param:JSON.stringify(t)})}function s(e){const{param:t}=e;return Object(n["b"])("schedule/"+e.id,{method:"PUT",...e,param:JSON.stringify(t)})}function i(e){return Object(n["b"])("schedule/"+e,{method:"DELETE"})}async function o(e){e.accountId=r["a"].state.accountID;const t=await Object(n["b"])("userschedule/query",{method:"POST",...e});return t.list=t.list.map(e=>{const t=JSON.parse(e.param);return{...e,param:t}}),t}async function l(){let e=r["a"].state.accountID;const t=await Object(n["b"])("userschedule/"+e,{method:"GET"});return t.map(e=>{const t=JSON.parse(e.param);return{...e,param:t}})}function d(e){e.accountId=r["a"].state.accountID;const{param:t}=e;return Object(n["b"])("userschedule/create",{method:"POST",...e,param:JSON.stringify(t)})}function p(e){e.accountId=r["a"].state.accountID;const{param:t}=e;return Object(n["b"])("userschedule/"+e.id,{method:"PUT",...e,param:JSON.stringify(t)})}function m(e){let t=r["a"].state.accountID;return Object(n["b"])(`userschedule/${t}/${e}`,{method:"DELETE"})}},"605d":function(e,t,a){(function(t){var n=a("c6b6");e.exports="undefined"!=typeof t&&"process"==n(t)}).call(this,a("4362"))},"74c6":function(e,t,a){"use strict";a.r(t);a("13d5");var n=function(){var e=this,t=e._self._c;return t("pageMain",{scopedSlots:e._u([{key:"pageContent",fn:function(){return[t("div",{staticClass:"pageContent v2card main-card detail-card",staticStyle:{"text-align":"left"}},[t("el-form",{ref:"updateSchedulesForm",staticStyle:{"min-width":"350px"},attrs:{rules:e.updateScheduleRules,model:e.updateScheduleInfo,"label-position":"top","label-width":"120px"}},[t("el-form-item",{attrs:{label:e.$t("ScheduleManage.策略名称："),prop:"name"}},[t("el-input",{staticStyle:{"max-width":"400px"},attrs:{clearable:""},model:{value:e.updateScheduleInfo.name,callback:function(t){e.$set(e.updateScheduleInfo,"name",t)},expression:"updateScheduleInfo.name"}})],1),t("el-form-item",{attrs:{prop:"description"}},[t("label",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("ScheduleManage.描述：")))]),t("el-input",{staticClass:"input-des",staticStyle:{"max-width":"400px"},attrs:{type:"textarea",resize:"none"},model:{value:e.updateScheduleInfo.description,callback:function(t){e.$set(e.updateScheduleInfo,"description",t)},expression:"updateScheduleInfo.description"}})],1),t("el-divider"),e._l(e.updateScheduleInfo.param,(function(a,n){return t("div",{key:a.id,staticStyle:{"max-width":"1300px"}},[t("el-row",[t("el-col",{attrs:{lg:7,md:12,sm:12,xs:24}},[t("el-form-item",{attrs:{label:e.$t("ScheduleManage.地区")+(n+1)+"：",prop:"param."+n+".area",rules:{required:!0,message:e.$t("ScheduleManage.请选择一个地区"),trigger:"change"}}},[t("el-select",{staticStyle:{"max-width":"400px"},attrs:{placeholder:e.$t("ScheduleManage.请选择地区"),filterable:e.areaList.length>=7,clearable:""},model:{value:a.area,callback:function(t){e.$set(a,"area",t)},expression:"item.area"}},e._l(e.areaList,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)],1),t("el-col",{attrs:{lg:7,md:12,sm:12,xs:24}},[t("el-form-item",{attrs:{label:e.$t("ScheduleManage.权重")+(n+1)+"：",prop:"param."+n+".weight",rules:[{required:!0,message:e.$t("ScheduleManage.请输入权重"),trigger:"blur"}]}},[t("el-input",{staticClass:"WeightPercentage",attrs:{type:"number"},model:{value:a.weight,callback:function(t){e.$set(a,"weight",t)},expression:"item.weight"}},[t("span",{attrs:{slot:"append"},slot:"append"},[e._v(e._s((100*Number(a.weight)/Math.max(e.updateScheduleInfo.param.filter(e=>e.area===a.area).map(e=>Number(e.weight)).reduce((e,t)=>e+t,0),1)).toFixed(2)+"%"))])])],1)],1),t("el-col",{attrs:{lg:7,md:12,sm:12,xs:24}},[t("el-form-item",{attrs:{label:e.$t("ScheduleManage.供应商")+(n+1)+"：",prop:"param."+n+".supplierId",rules:{required:!0,message:e.$t("ScheduleManage.请选择一个供应商"),trigger:"change"}}},[t("el-select",{attrs:{placeholder:e.$t("ScheduleManage.请选择供应商"),clearable:""},model:{value:a.supplierId,callback:function(t){e.$set(a,"supplierId",t)},expression:"item.supplierId"}},e._l(e.supplierList,(function(e){return t("el-option",{key:e.supplierId,attrs:{label:e.supplierName,value:e.supplierId}})})),1)],1)],1),t("el-col",{attrs:{lg:3,md:12,sm:12,xs:24}},[t("el-form-item",{staticStyle:{"margin-top":"50px"},attrs:{"label-width":"30px"}},[t("el-button",{attrs:{icon:"el-icon-plus",type:"text"},on:{click:function(t){return e.addOneSchedule(e.updateScheduleInfo.param,n)}}}),t("el-button",{attrs:{icon:"el-icon-delete",type:"text"},on:{click:function(t){return e.deleteOneSchedule(e.updateScheduleInfo.param,n)}}})],1)],1)],1)],1)}))],2),t("div",{staticStyle:{"max-width":"1285px"}},[t("span",{staticClass:"dialog-footer"},[t("el-button",{staticClass:"add-btn uniform-width",attrs:{size:"small",loading:e.waiting},on:{click:e.updateUserSchedule}},[e._v(e._s(e.$t("ScheduleManage.确 定")))]),t("el-button",{staticClass:"cancel-button uniform-width",attrs:{size:"small"},on:{click:function(t){return e.$router.back()}}},[e._v(e._s(e.$t("ScheduleManage.取 消")))])],1)])],1)]},proxy:!0}])})},r=[],c=a("2396"),u=a("34a6"),s=a("19df"),i=a("145c"),o={name:"updateScheduleUser",components:{pageMain:c["a"]},data(){return{waiting:!1,areaList:[],supplierList:[],updateScheduleInfo:{},updateScheduleRules:{name:[{required:!0,message:this.$t("ScheduleManage.调度策略名称不可为空"),trigger:"blur"},{max:20,message:this.$t("ScheduleManage.调度策略名称最长为20字符"),trigger:"change"}]}}},methods:{addOneSchedule(e,t){e.splice(t+1,0,{area:"",weight:0,supplierId:""})},deleteOneSchedule(e,t){1!==e.length?e.splice(t,1):this.$message({message:this.$t("ScheduleManage.不能将供应商信息全部删除"),type:"info"})},updateUserSchedule(){this.$refs.updateSchedulesForm.validate(e=>{if(!e)return this.$message({type:"error",message:this.$t("ScheduleManage.参数输入错误！")}),!1;this.waiting=!0,u["i"](this.updateScheduleInfo).then(e=>{this.$router.go(-1),this.$message.success(this.$t("ScheduleManage.修改成功"))}).catch(()=>{}).finally(()=>{this.waiting=!1})})}},mounted(){this.areaList=s["area"],this.updateScheduleInfo=this.$route.params.row,i["k"]().then(e=>{this.supplierList=e.map(e=>({...e,supplierId:e.supplierId.toString()}))})}},l=o,d=(a("82a8"),a("2877")),p=Object(d["a"])(l,n,r,!1,null,"647e1fe8",null);t["default"]=p.exports},"780e":function(e,t,a){},"82a8":function(e,t,a){"use strict";a("87bf")},"87bf":function(e,t,a){},a640:function(e,t,a){"use strict";var n=a("d039");e.exports=function(e,t){var a=[][e];return!!a&&n((function(){a.call(null,t||function(){return 1},1)}))}},d4a7:function(e,t,a){},d58f:function(e,t,a){var n=a("59ed"),r=a("7b0b"),c=a("44ad"),u=a("07fa"),s=TypeError,i=function(e){return function(t,a,i,o){n(a);var l=r(t),d=c(l),p=u(l),m=e?p-1:0,f=e?-1:1;if(i<2)while(1){if(m in d){o=d[m],m+=f;break}if(m+=f,e?m<0:p<=m)throw s("Reduce of empty array with no initial value")}for(;e?m>=0:p>m;m+=f)m in d&&(o=a(o,d[m],m,l));return o}};e.exports={left:i(!1),right:i(!0)}},dc55:function(e,t,a){"use strict";a("780e")},fb5b:function(e,t,a){"use strict";a("d4a7")}}]);