mirror of
https://gitee.com/raoxy/kongx.git
synced 2025-07-10 00:00:02 +08:00
1 line
241 KiB
JavaScript
1 line
241 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e7d39db6","views","chunk-569fe953","chunk-36d68c6a","chunk-2d0e4caf"],{"0095":function(e,t,a){},"00b3":function(e,t,a){"use strict";var n=a("9d5c"),i=a.n(n);i.a},"04c3":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",["view"!=e.mode?a("avue-form",{attrs:{option:e.targetColumn},on:{submit:e.handleTargetSave},model:{value:e.targetForm,callback:function(t){e.targetForm=t},expression:"targetForm"}}):e._e(),a("avue-crud",{attrs:{option:e.targetOption,data:e.targetData},on:{"row-del":e.handleTargetDel},scopedSlots:e._u([{key:"health",fn:function(e){var t=e.row;return[a("img",{staticClass:"image",staticStyle:{width:"20px",height:"20px"},attrs:{src:"/svg/"+t.health.toLowerCase()+".svg",title:t.health}})]}},{key:"menu",fn:function(t){return[a("el-button",{attrs:{icon:"el-icon-delete",size:"small",plain:"",type:"danger"},on:{click:function(a){return e.handleTargetDel(t.row,t.$index)}}},[e._v("删除")])]}}])},[a("template",{slot:"empty"},[e._v("暂无服务代理,请添加服务代理")])],2)],1)},i=[],s=a("cebc"),r=a("5880"),o=a("fef3"),l=a("2ed6"),c={name:"targets",data:function(){return{targetOption:o["n"],targetColumn:o["m"],targetForm:{},targetData:[],grade:{box:!0}}},props:{upstream:{type:Object,required:!1},mode:{required:!0},client:{type:Object,required:!0,id:-1}},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission","isDevProfile","isProdProfile","systemProfile"])),mounted:function(){var e=this,t=setInterval(function(){e.handleList(e.upstream)},1e5);this.$once("hook:beforeDestroy",function(){clearInterval(t)})},created:function(){this.handleList(this.upstream),this.initOptions()},methods:{initOptions:function(){this.targetOption["menu"]="view"!=this.mode},toEditTarget:function(e,t){this.targetForm=e},handleList:function(e){var t=this;this.tableLoading=!0,e.id&&(this.client=this.client||{},Object(l["c"])(e,this.client).then(function(e){t.targetData=e.data.data}))},handleTargetSave:function(e,t){var a=this;this.targetForm=e,this.targetForm.upstream={id:this.upstream.id},delete this.targetForm.id,Object(l["a"])(e).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.$successInfo("新增成功"),a.handleList(a.upstream),a.targetForm={},a.targetForm.upstream={id:a.upstream.id}),t()})},handleTargetDel:function(e,t){var a=this,n="";this.isProdProfile&&(n="当前为生产环境,请谨慎操作! "),this.$confirm(n+"是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(l["d"])({upstream:a.upstream,id:e.id}).then(function(e){var t=e.data;0!=t.status?a.$errorInfo(t.errmsg):(a.handleList(a.upstream),a.targetForm={},a.targetForm.upstream={id:a.upstream.id},a.$successInfo("删除成功"))})}).catch(function(){})}}},u=c,d=a("2877"),p=Object(d["a"])(u,n,i,!1,null,null,null);t["default"]=p.exports},"068d":function(e,t,a){"use strict";var n=a("0095"),i=a.n(n);i.a},"08bb":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-tabs",{ref:"upstreamTabs",on:{"tab-click":e.checkUpstream}},[a("el-tab-pane",[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-info"}),e._v(" 基本信息 ")]),a("avue-form",{ref:"form",attrs:{option:e.upstreamColumn},on:{submit:e.handleSave},model:{value:e.upstream,callback:function(t){e.upstream=t},expression:"upstream"}},["view"!=e.mode?a("template",{slot:"menuForm"},[a("el-button",{staticClass:"el-icon-check",attrs:{type:"primary"},on:{click:e.handlerSubmit}},[e._v("提 交")]),a("el-button",{staticClass:"el-icon-delete",on:{click:e.handleEmpty}},[e._v("清 空")])],1):e._e()],2)],1),"add"!=e.mode?a("el-tab-pane",{attrs:{label:"代理列表"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-success"}),e._v(" Targets ")]),a("targets",{ref:"targets",attrs:{upstream:e.upstream,mode:e.mode}})],1):e._e(),"add"!=e.mode?a("el-tab-pane",{attrs:{label:"设置健康检查",lazy:""}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-warning"}),e._v(" 健康检查(ACTIVE)\n ")]),a("health-check",{attrs:{upstream:e.upstream,mode:e.mode}})],1):e._e()],1)],1)},i=[],s=(a("ac6a"),a("cebc")),r=a("5880"),o=a("fef3"),l=a("04c3"),c=a("ba9e"),u=a("2ed6"),d={components:{targets:l["default"],healthCheck:c["default"]},name:"upholdUpstream",data:function(){return{upstreamColumn:o["o"]}},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission","systemProfile"])),props:{upstream:{type:Object,required:!1},mode:{required:!1}},created:function(){this.initOptions()},methods:{initOptions:function(){var e=this;this.upstreamColumn.column.forEach(function(t){t["disabled"]="view"==e.mode})},handlerSubmit:function(){this.$refs.form.submit()},handleSave:function(e,t){var a=this;"edit"!=this.mode&&Object(u["f"])(e).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.upstream=n.data,a.$successInfo("新增成功"),a.callback()),t()}),"edit"==this.mode&&Object(u["g"])(e).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.upstream=n.data,a.$successInfo("修改成功"),a.callback()),t()})},callback:function(){this.$emit("callback",this.upstream)}}},p=d,h=a("2877"),m=Object(h["a"])(p,n,i,!1,null,null,null);t["default"]=m.exports},"0b18":function(e,t,a){},"0c22":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("basic-container",[a("div",[a("el-row",{staticStyle:{"margin-bottom":"5px","margin-left":"5px","margin-right":"5px"}},[a("el-col",{attrs:{span:"2"}},[e.permission.usergroup_add?a("el-button",{attrs:{size:"small",icon:"el-icon-plus",type:"primary"},on:{click:e.toAdd}},[e._v("新建用户组")]):e._e()],1),a("el-col",{attrs:{span:"22"}},[a("el-input",{staticClass:"input-with-select",attrs:{size:"small",placeholder:"请输入用户组名称",maxlength:"20",clearable:""},model:{value:e.searchForm,callback:function(t){e.searchForm=t},expression:"searchForm"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},slot:"append"})],1)],1)],1)],1),a("avue-crud",{ref:"crud",staticStyle:{cursor:"pointer"},attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading,page:e.page},on:{"row-save":e.handleSave,"row-update":e.handleUpdate,"refresh-change":e.handlerefreshChange,"current-change":e.handleCurrentChange,"size-change":e.handleCurrentSize,"search-change":e.handleSearchChange},scopedSlots:e._u([{key:"messageContent",fn:function(e){var t=e.row;return[a("item-tags",{attrs:{tags:t.messageContent,column:"messageContent",mode:"view"}})]}},{key:"menu",fn:function(t){return[e.permission.usergroup_update?a("el-button",{attrs:{size:"mini",icon:"el-icon-edit",plain:"",type:"primary"},on:{click:function(a){return e.toEdit(t)}}},[e._v("编辑")]):e._e(),e.permission.usergroup_config?a("el-button",{attrs:{size:"mini",plain:"",type:"success"},on:{click:function(a){return e.toConfigMenu(t.row,t.index)}}},[e._v("配置")]):e._e(),e.permission.usergroup_config?a("el-button",{attrs:{size:"mini",icon:"el-icon-view",plain:""},on:{click:function(a){return e.toConfigViewMenu(t.row,t.index)}}},[e._v("查看")]):e._e()]}}]),model:{value:e.objData,callback:function(t){e.objData=t},expression:"objData"}}),e.configMenuBox?a("el-drawer",{attrs:{title:"为用户组设置用户及角色",size:"40%",visible:e.configMenuBox},on:{"update:visible":function(t){e.configMenuBox=t}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"99%"}},[a("setting-group",{attrs:{userGroup:e.userGroup,mode:e.mode},on:{callback:e.handleList}})],1)]):e._e()],1)},i=[],s=a("5176"),r=a.n(s),o=a("cebc"),l=a("5880"),c=a("ca05"),u=a("3523"),d=a("ca60"),p=a("1686"),h={name:"syncLog",components:{ItemTags:d["default"],settingGroup:p["default"]},data:function(){return{objData:{},tableSearch:{},tableOption:c["f"],tableData:[],tablePage:1,tableSize:10,tableLoading:!1,currentRule:{},systemRole:{},mode:"add",form:{},configMenuBox:!1,searchForm:null,users:null,userGroup:{},userLists:[],options:[],page:{total:0,currentPage:1,pageSize:10}}},created:function(){this.handleList(),this.init()},computed:Object(o["a"])({},Object(l["mapGetters"])(["permission","userInfo"])),props:{logType:{required:!0}},watch:{searchForm:function(e){this.page.currentPage=1,this.handleList()},users:function(e){this.page.currentPage=1,this.handleList()}},methods:{toConfigViewMenu:function(e,t){this.configMenuBox=!0,this.mode="view",this.userGroup=e},toConfigMenu:function(e,t){this.configMenuBox=!0,this.mode="add",this.userGroup=e},toAdd:function(){this.$refs.crud.rowAdd()},toEdit:function(e){this.$refs.crud.rowEdit(e.row,e.index)},init:function(){},handleRowClick:function(e){this.currentRule=e},handlerTrace:function(){var e=this;this.$refs["form"].validate(function(t){t&&(e.handlerTraceDetail=!0)})},handlerefreshChange:function(e){this.handleList(this.tableSearch)},handleCurrentChange:function(e){this.tablePage=e,this.handlerefreshChange()},handleCurrentSize:function(e){this.tableSize=e,this.handlerefreshChange()},handleSearchChange:function(e){this.tableSearch=e,this.handleList(this.tableSearch)},handleSave:function(e,t){var a=this;Object(u["f"])(e).then(function(e){var n=e.data;0!==n.status?a.$message({showClose:!0,message:n.errmsg,type:"warning"}):(a.tablePage=1,a.handleList(),a.$message({showClose:!0,message:"新增成功",type:"success"})),t()})},handleUpdate:function(e,t,a){var n=this;Object(u["j"])(e).then(function(e){var t=e.data;0!==t.status?n.$message({showClose:!0,message:t.errmsg,type:"warning"}):(n.tablePage=1,n.handleList(),n.$message({showClose:!0,message:"修改成功",type:"success"}))}),a()},handleList:function(e){var t=this;this.tableLoading=!0,this.alertRuleBox=!1,this.form={name:this.searchForm},Object(u["d"])(r()({},this.form,{start:this.tablePage,limit:this.tableSize})).then(function(e){var a=e.data.data;t.tableData=a.items,t.page={total:a.totalCount,currentPage:t.tablePage,pageSize:t.tableSize},t.tableLoading=!1})}}},m=h,f=(a("2a7b"),a("2877")),g=Object(f["a"])(m,n,i,!1,null,null,null);t["default"]=g.exports},"0e36":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("basic-container",[a("list-configs",{attrs:{logType:0}})],1)},i=[],s=a("2d86"),r={name:"syncLog",components:{listConfigs:s["default"]},data:function(){return{objData:{},logs:[{label:"网关同步日志",value:0},{label:"热配同步日志",value:1}]}},created:function(){},methods:{}},o=r,l=(a("4ffa"),a("2877")),c=Object(l["a"])(o,n,i,!1,null,null,null);t["default"]=c.exports},"0ebf":function(e,t,a){"use strict";var n=a("3515"),i=a.n(n);i.a},"0fee":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("el-alert",{attrs:{title:"以下为环境列表,请激活您要工作的环境",type:"info","show-icon":""}}),a("avue-crud",{ref:"crud",attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading},on:{"refresh-change":e.handlerefreshChange},scopedSlots:e._u([{key:"id",fn:function(t){var n=t.row;return[e.kongClient.id!=n.id?a("el-button",{attrs:{type:"info",size:"mini",plain:""},on:{click:function(t){return e.handActiveClient(n)}}},[e._v("激活")]):e._e(),e.kongClient.id==n.id?a("el-button",{attrs:{type:"success",size:"mini"}},[e._v("已激活")]):e._e()]}},{key:"menuLeft",fn:function(t){return[(e.permission.client_add,e._e())]}},{key:"menu",fn:function(t){return[e.permission.client_update?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",type:"primary",plain:""},on:{click:function(a){return e.toEditClient(t.row,t.$index)}}},[e._v("编辑")]):e._e(),e.permission.client_delete?a("el-button",{attrs:{icon:"el-icon-delete",size:"small",type:"danger",plain:""},on:{click:function(a){return e.handlerDelete(t.row,t.$index)}}},[e._v("删除")]):e._e()]}}])})],1),e.grade.box?a("el-dialog",{attrs:{title:"新增Kong连接",width:"70%",visible:e.grade.box},on:{"update:visible":function(t){return e.$set(e.grade,"box",t)}}},[a("avue-form",{attrs:{option:e.clientColumn},on:{submit:e.handleClient},model:{value:e.clientForm,callback:function(t){e.clientForm=t},expression:"clientForm"}})],1):e._e()],1)},i=[],s=a("5176"),r=a.n(s),o=(a("7f7f"),a("cebc")),l=a("5880"),c=a("af62"),u=a("5640"),d={name:"client",components:{},data:function(){return{tableOption:u["b"],clientColumn:u["a"],cardoption:{addBtn:!1,span:6,props:{img:"/img/plugins/kong.svg",title:"name",info:"url"}},tableData:[],tableLoading:!1,clientForm:{},activeClient:{id:-1},grade:{box:!1}}},created:function(){this.handleList(),this.initOptions()},watch:{},mounted:function(){},computed:Object(o["a"])({},Object(l["mapGetters"])(["permission","userInfo","kongClient"])),props:[],methods:{initOptions:function(){this.tableOption["menu"]=!1},findActiveKongclient:function(){var e=this;this.$store.dispatch("FindActiveClient",this.userInfo).then(function(t){e.activeClient=t})},handActiveClient:function(e){var t=this;Object(c["h"])(this.userInfo.name,e).then(function(e){t.findActiveKongclient()})},toEditClient:function(e,t){this.grade.box=!0,this.clientForm=e},handlerefreshChange:function(e){this.handleList(this.tableSearch)},handleList:function(e){var t=this;this.tableLoading=!0,Object(c["c"])(r()({})).then(function(e){var a=e.data;t.tableData=a.data,console.log(t.tableData),t.tableLoading=!1})},handleClient:function(e,t){var a=this;this.clientForm&&this.clientForm.id?Object(c["i"])(this.clientForm).then(function(e){var n=e.data;0==n.status?(a.$successInfo("修改成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("修改失败"),t()}):Object(c["a"])(this.clientForm).then(function(e){var n=e.data;0==n.status?(a.$successInfo("新增成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("新增失败"),t()})},handlerDelete:function(e){var t=this;this.$confirm("是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(c["g"])(e).then(function(e){var a=e.data;0==a.status?(t.$successInfo("删除成功"),t.handleList()):t.$errorInfo("删除失败")})})}}},p=d,h=(a("4d0b"),a("2877")),m=Object(h["a"])(p,n,i,!1,null,"b8f9d05c",null);t["default"]=m.exports},"109b":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"config-list"},[a("el-radio-group",{model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_EVERY",disabled:e.disabled}},[e._v("每秒")])],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_RANGE",disabled:e.disabled}},[e._v("区间")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.start,callback:function(t){e.$set(e.valueRange,"start",t)},expression:"valueRange.start"}}),e._v("秒\n 至\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.end,callback:function(t){e.$set(e.valueRange,"end",t)},expression:"valueRange.end"}}),e._v("秒\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_LOOP",disabled:e.disabled}},[e._v("循环")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.start,callback:function(t){e.$set(e.valueLoop,"start",t)},expression:"valueLoop.start"}}),e._v("秒开始,间隔\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.interval,callback:function(t){e.$set(e.valueLoop,"interval",t)},expression:"valueLoop.interval"}}),e._v("秒\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_SPECIFY",disabled:e.disabled}},[e._v("指定")]),a("div",{staticClass:"list"},[a("el-checkbox-group",{model:{value:e.valueList,callback:function(t){e.valueList=t},expression:"valueList"}},e._l(e.maxValue+1,function(t){return a("el-checkbox",{key:"key-"+(t-1),staticClass:"list-check-item",attrs:{label:t-1,disabled:e.type!=e.TYPE_SPECIFY||e.disabled}})}),1)],1)],1)])],1)},i=[],s=a("4b3a"),r={name:"second",mixins:[s["a"]],data:function(){return{}},watch:{value_c:function(e,t){this.$emit("change",e)}},created:function(){this.DEFAULT_VALUE="*",this.minValue=0,this.maxValue=59,this.valueRange.start=0,this.valueRange.end=59,this.valueLoop.start=0,this.valueLoop.interval=1,this.parseProp(this.prop)}},o=r,l=(a("0ebf"),a("2877")),c=Object(l["a"])(o,n,i,!1,null,"472e02ba",null);t["default"]=c.exports},"143c":function(e,t,a){},"154c":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("avue-form",{ref:"form",attrs:{option:e.formColumns},on:{submit:e.handleEntity},model:{value:e.upholdEntity,callback:function(t){e.upholdEntity=t},expression:"upholdEntity"}},[a("template",{slot:"tags"},[a("item-tags",{attrs:{tags:e.upholdEntity.tags,name:"tags",column:"tags",mode:e.mode},on:{sendTag:e.bindTags}})],1),"view"!=e.mode?a("template",{slot:"menuForm"},[a("el-button",{staticClass:"el-icon-check",attrs:{type:"primary"},on:{click:e.handlerSubmit}},[e._v("提 交")])],1):e._e()],2)],1)},i=[],s=(a("ac6a"),a("5176")),r=a.n(s),o=a("fef3"),l=a("3ac9"),c=a("ca60"),u={name:"Route",components:{ItemTags:c["default"]},data:function(){return{formColumns:o["b"],upholdEntity:this.entity,db_type:"",charsets:[]}},props:{entity:{type:Object,required:!1},mode:{required:!1}},created:function(){this.initOptions(),this.init()},methods:{init:function(){},bindTags:function(e){this.upholdEntity=r()(this.upholdEntity,e)},initOptions:function(){var e=this;this.formColumns.column.forEach(function(t){t["disabled"]="view"==e.mode})},handlerSubmit:function(){this.$refs.form.submit()},handleEntity:function(e,t){"edit"==this.mode&&this.handleEntityUpdate(e,t),"add"==this.mode&&this.handleEntitySave(e,t)},handleEntityUpdate:function(e,t){var a=this;Object(l["c"])(this.upholdEntity).then(function(e){var n=e.data;0!=n.status?a.$message.error(n.errmsg):(a.$message.success("修改成功"),a.callback()),t()}).catch(function(e){a.$message.error("更新失败"),t()})},handleEntitySave:function(e,t){var a=this;Object(l["b"])(this.upholdEntity).then(function(e){var n=e.data;0!=n.status?a.$message.error(n.errmsg):(a.$message.success("新增成功"),a.callback()),t()}).catch(function(e){a.$message.error("新增失败,错误信息:"+e),t()})},callback:function(){this.$emit("callback",{})}}},d=u,p=a("2877"),h=Object(p["a"])(d,n,i,!1,null,null,null);t["default"]=h.exports},"15c5":function(e,t,a){},1686:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"avue-data-cardText"},[a("div",[a("el-tabs",[a("el-tab-pane",[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"icon-quanxian"}),e._v("\n 设置角色\n ")]),a("el-alert",{attrs:{title:"未设置角色的环境,则默认角色为普通用户(可查看网关、服务降级、作业管理、告警记录及审计日志等功能)",type:"success","show-icon":""}}),a("div",{staticStyle:{"margin-top":"20px"}},[a("query-env",{attrs:{userGroup:e.userGroup,option:{envs:e.envs,roleList:e.roleList,data:[]},mode:e.mode}})],1)],1),a("el-tab-pane",[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-user"}),e._v("\n 设置用户\n ")]),a("el-form",[a("el-form-item",[a("div",{staticClass:"item",staticStyle:{"margin-top":"20px"}},[a("setting-user",{attrs:{userGroup:e.userGroup,data:e.userInfos,mode:e.mode}})],1)])],1)],1)],1)],1)])},i=[],s=(a("ac6a"),a("af62")),r=a("8d55"),o=a("e59a"),l=a("f1e7"),c=a("f777"),u={name:"message-template",components:{settingUser:o["default"],settingRole:l["default"],queryEnv:c["default"]},data:function(){return{activeNames:[],userList:[],envs:[],roleList:[],userInfos:[],profiles:[]}},computed:{data:function(){return this.option.data||[]}},created:function(){this.init()},props:{mode:{},userGroup:{}},methods:{init:function(){var e=this;Object(s["f"])().then(function(t){e.envs=t.data,_.forEach(e.envs,function(t){_.forEach(t.groups,function(t){e.profiles.push(t)})})}),Object(r["b"])().then(function(t){e.roleList=t.data.data.items})},handlerClose:function(){this.callback()},callback:function(){this.$emit("callback",{})},getUsers:function(){return _.map(this.userList||[],function(e){return e.userId})}}},d=u,p=a("2877"),h=Object(p["a"])(d,n,i,!1,null,null,null);t["default"]=h.exports},"17d3":function(e,t,a){},"1d56":function(e,t,a){"use strict";var n=a("a17a"),i=a.n(n);i.a},2006:function(e,t,a){},2256:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("avue-form",{attrs:{option:e.envColumn},on:{submit:e.handleClient},model:{value:e.client,callback:function(t){e.client=t},expression:"client"}})],1)},i=[],s=a("5640"),r=a("af62"),o={name:"upholdEnv",components:{},data:function(){return{envColumn:s["e"]}},props:{client:{type:Object,required:!0}},created:function(){this.findByProfile()},methods:{findByProfile:function(){var e=this;Object(r["e"])(this.client.profileCode).then(function(t){e.client=t.data.data})},handleClient:function(e,t){var a=this;this.client&&this.client.id?Object(r["i"])(this.client).then(function(e){var t=e.data;0==t.status?(a.$successInfo("更新成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("更新失败")}):Object(r["a"])(this.client).then(function(e){var t=e.data;0==t.status?(a.$successInfo("更新成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("更新失败")}),setTimeout(function(){t()},1e3)}}},l=o,c=a("2877"),u=Object(c["a"])(l,n,i,!1,null,null,null);t["default"]=u.exports},"240c":function(e,t,a){},2775:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-tabs",{attrs:{"tab-position":"top"}},e._l(e.syncConfig.clients,function(t){return a("el-tab-pane",{key:t,attrs:{label:t.profile}},[a("el-row",{staticStyle:{"margin-top":"12px"},attrs:{gutter:5}},[a("el-tabs",{attrs:{"tab-position":"left"}},e._l(e.syncConfig.services,function(n){return a("el-tab-pane",{key:n.id,attrs:{label:n.name}},[a("el-col",{attrs:{span:"12"}},[a("div",{staticClass:"grid-content bg-purple"},[a("span",{staticStyle:{"margin-left":"10px"}},[a("strong",[e._v("待同步的服务信息")])]),a("targets",{attrs:{mode:"view",upstream:{id:n.host}}}),a("div",{staticStyle:{"margin-top":"5px"}},[a("query-routes",{attrs:{service:n,mode:"view"}})],1),a("div",{staticStyle:{"margin-top":"5px"}},[a("service-plugins",{attrs:{service:n}})],1)],1)]),a("el-col",{attrs:{span:"12"}},[a("div",{staticClass:"grid-content bg-purple-exists"},[a("span",{staticStyle:{"margin-left":"10px"}},[a("strong",[e._v("已存在的服务信息")])]),a("targets",{attrs:{mode:"view",upstream:{id:n.host},client:t}}),a("div",{staticStyle:{"margin-top":"5px","overflow-y":"auto","overflow-x":"auto",height:"100%"}},[a("query-routes",{attrs:{service:n,mode:"view",client:t}})],1),a("div",{staticStyle:{"margin-top":"5px"}},[a("service-plugins",{key:t.url,attrs:{service:n,client:t}})],1)],1)])],1)}),1)],1)],1)}),1)],1)},i=[],s=a("537a"),r=a("04c3"),o=a("8b12"),l={components:{servicePlugins:s["default"],queryRoutes:o["default"],targets:r["default"]},data:function(){return{diffColumn:{emptyBtn:!1,submitBtn:!1,column:[{label:"SERVICES",prop:"services",formslot:!0},{label:"CLIENTS",prop:"clients",formslot:!0}]}}},created:function(){console.log(this.syncConfig)},props:{syncConfig:{type:Object,required:!0}}},c=l,u=(a("5311"),a("2877")),d=Object(u["a"])(c,n,i,!1,null,null,null);t["default"]=d.exports},"27a8":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("search-banner",{ref:"routeSearch",attrs:{span:"22",placeholder:"请输入upstream名称",handleList:e.handleList,searchProps:e.searchProps,page:e.page},on:{"search-change":e.searchChange}},[a("template",{slot:"menu"},[e.permission.upstream_add||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-plus",size:"small",type:"primary"},on:{click:function(t){return e.handleGrade({})}}},[e._v("新增")]):e._e()],1)],2),a("avue-crud",{attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading,page:e.page},on:{"row-click":e.handleRowClick,"row-save":e.handleSave,"row-del":e.handleDel,"refresh-change":e.handlerefreshChange,"current-change":e.handleCurrentChange,"size-change":e.handleCurrentSize,"search-change":e.handleSearchChange},scopedSlots:e._u([{key:"expand",fn:function(e){var t=e.row;return[a("el-form",{staticStyle:{"margin-left":"10px"},attrs:{"label-width":"80px"}},[a("el-form-item",{attrs:{label:"代理列表"}},[a("targets",{ref:"targets",attrs:{upstream:t,mode:"view"}})],1)],1)]}},{key:"name",fn:function(t){var n=t.row;return[a("el-link",{attrs:{underline:!1,type:"success"},on:{click:function(t){return e.toDetail(n)}}},[e._v(e._s(n.name))])]}},{key:"menu",fn:function(t){return[e.permission.upstream_update||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"primary"},on:{click:function(a){return e.handleGrade(t.row,t.$index)}}},[e._v("编辑")]):e._e(),e.permission.upstream_update||e.isDevProfile||e.isProdProfile?e._e():a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"primary"},on:{click:function(a){return e.handleTargetsGrade(t.row,t.$index)}}},[e._v("编辑代理列表")]),e.permission.upstream_delete||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-delete",size:"small",plain:"",type:"danger"},on:{click:function(a){return e.handleDel(t.row,t.$index)}}},[e._v("删除")]):e._e()]}}])}),e.grade.box?a("el-drawer",{attrs:{title:"上游代理(UPSTREAM)",size:"50%",visible:e.grade.box,direction:e.direction},on:{"update:visible":function(t){return e.$set(e.grade,"box",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("uphold-upstream",{attrs:{upstream:e.form,mode:e.mode},on:{callback:e.callback}})],1)]):e._e(),e.grade.targetBox?a("el-drawer",{attrs:{title:"编辑代理列表",size:"50%",visible:e.grade.targetBox},on:{"update:visible":function(t){return e.$set(e.grade,"targetBox",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("uphold-targets",{attrs:{upstream:e.form,mode:e.mode},on:{callback:e.callback}})],1)]):e._e(),e.grade.drawerDetail?a("el-drawer",{attrs:{size:"45%",title:"'"+e.form.name+"' 详情",visible:e.grade.drawerDetail,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){return e.$set(e.grade,"drawerDetail",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("uphold-upstream",{attrs:{upstream:e.form,mode:"view"}})],1)]):e._e()],1)],1)},i=[],s=a("5176"),r=a.n(s),o=a("cebc"),l=a("fef3"),c=a("5880"),u=a("04c3"),d=a("ba9e"),p=a("08bb"),h=a("f337"),m=a("848d"),f=a("2ed6"),g={components:{targets:u["default"],searchBanner:m["default"],healthCheck:d["default"],upholdUpstream:p["default"],upholdTargets:h["default"]},name:"strategy",data:function(){return{tableSearch:{},tableOption:l["p"],upstreamColumn:l["o"],searchProps:[{name:"name"}],form:{},tableData:[],tablePage:1,tableSize:10,tableLoading:!1,page:{total:0,currentPage:1,pageSize:10},mode:"add",grade:{box:!1,targetBox:!1,updateUpstream:!1,drawerDetail:!1}}},computed:Object(o["a"])({},Object(c["mapGetters"])(["permission","isDevProfile","isProdProfile","systemProfile"])),props:{},created:function(){var e=this;-1==this.systemProfile.id?this.$nextTick(function(t){e.$router.push("/wel/index")}):this.initOptions()},methods:{initOptions:function(){this.isDevProfile||!this.isProdProfile?this.tableOption["menu"]=!0:this.permission.upstream_update||(this.tableOption["menu"]=!1)},toDetail:function(e){this.form=e,this.grade.drawerDetail=!0,this.grade.updateUpstream=!0},handleGrade:function(e,t){e&&e.id?(this.form=e,this.mode="edit"):(this.form={},this.mode="add"),this.grade.box=!0},handleTargetsGrade:function(e,t){e&&e.id?(this.form=e,this.mode="edit"):(this.form={},this.mode="add"),this.grade.targetBox=!0},callback:function(e){this.form=e,this.mode="edit",this.reloadDataList()},handleCurrentChange:function(e){this.tablePage=e,this.refreshTableList(!0)},handleCurrentSize:function(e){this.tableSize=e,this.refreshTableList(!1)},handleList:function(e){var t=this;return this.tableLoading=!0,Object(f["b"])(r()({},e)).then(function(e){var a=e.data;return t.tableLoading=!1,a.data||[]})},refreshTableList:function(e){this.initPage(e),this.$refs.routeSearch.refresh(this.page,e)},initPage:function(e){e||(this.tablePage=1),this.page.currentPage=this.tablePage,this.page.pageSize=this.tableSize},searchChange:function(e){this.tableData=e.data},reloadDataList:function(){this.initPage(!1),this.$refs.routeSearch.loadData()},handleSave:function(e,t){var a=this;upstreamSave(e).then(function(e){t(),a.form=e.data,a.grade.updateUpstream=!0,a.reloadDataList()})},handleRowClick:function(e,t,a){this.type&&this.$emit("selectionData",e)},handleDel:function(e,t){var a=this,n="";this.isProdProfile&&(n="当前为生产环境,请谨慎操作! "),this.$confirm(n+"是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(f["e"])({id:e.id}).then(function(e){var t=e.data;0!=t.status?a.$errorInfo(t.errmsg):(a.reloadDataList(),a.$successInfo("删除成功"))})}).catch(function(){})}}},b=g,v=a("2877"),y=Object(v["a"])(b,n,i,!1,null,null,null);t["default"]=y.exports},2810:function(e,t,a){"use strict";var n=a("85e3"),i=a.n(n);i.a},"2a7b":function(e,t,a){"use strict";var n=a("6aa8"),i=a.n(n);i.a},"2ab7":function(e,t,a){},"2bdd":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-tabs",{ref:"upstreamTabs"},[a("el-tab-pane",[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-info"}),e._v(" 基本信息\n ")]),a("avue-form",{ref:"form",attrs:{option:e.serviceColumn},on:{submit:e.handleSave},model:{value:e.service,callback:function(t){e.service=t},expression:"service"}},["view"!=e.mode?a("template",{slot:"menuForm"},[a("el-button",{staticClass:"el-icon-check",attrs:{type:"primary"},on:{click:e.handlerSubmit}},[e._v("提 交")]),a("el-button",{staticClass:"el-icon-delete",on:{click:e.handleEmpty}},[e._v("清 空")])],1):e._e()],2),a("el-form",{staticStyle:{"margin-left":"10px"},attrs:{"label-width":"80px","label-position":"left"}},[a("el-form-item",{attrs:{label:"代理列表"}},[a("targets",{attrs:{mode:"view",upstream:{id:e.service.host}}})],1),"view"==e.mode?a("el-form-item",{attrs:{label:"路由列表"}},[a("query-routes",{attrs:{service:e.service,mode:"view"}})],1):e._e(),"view"==e.mode?a("el-form-item",{attrs:{label:"插件列表"}},[a("service-plugins",{attrs:{service:e.service}})],1):e._e()],1)],1),"add"!=e.mode?a("el-tab-pane",{ref:"targetTab",attrs:{label:"服务路由"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-success"}),e._v(" 服务路由\n ")]),a("query-routes",{attrs:{service:e.service,mode:e.mode}})],1):e._e(),"add"!=e.mode?a("el-tab-pane",{ref:"pluginTab",attrs:{label:"服务插件"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-warning"}),e._v(" 服务插件(应用于服务)\n ")]),a("query-plugins",{attrs:{service:e.service,mode:e.mode}})],1):e._e()],1)},i=[],s=(a("ac6a"),a("3dba")),r=a("fef3"),o=a("3aa7"),l=a("8b12"),c=a("04c3"),u=a("537a"),d={components:{queryPlugins:o["default"],queryRoutes:l["default"],servicePlugins:u["default"],targets:c["default"]},name:"upholdService",data:function(){return{serviceColumn:r["i"]}},props:{service:{type:Object,required:!1},mode:{required:!1}},created:function(){this.initOptions()},methods:{initOptions:function(){var e=this;this.serviceColumn.column.forEach(function(t){t["disabled"]="view"==e.mode})},handlerSubmit:function(){this.$refs.form.submit()},handleSave:function(e,t){var a=this;"add"==this.mode&&Object(s["d"])(e).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.service=n.data,a.$successInfo("新增成功"),a.callback()),t()}),"edit"==this.mode&&Object(s["e"])(e).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.service=n.data,a.$successInfo("修改成功"),a.callback()),t()})},callback:function(){this.$emit("callback",this.service)}}},p=d,h=a("2877"),m=Object(h["a"])(p,n,i,!1,null,null,null);t["default"]=m.exports},"2d86":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("avue-crud",{attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading,page:e.page},on:{"row-save":e.handleSave,"row-update":e.handleUpdate,"refresh-change":e.handlerefreshChange,"current-change":e.handleCurrentChange,"size-change":e.handleCurrentSize,"search-change":e.handleSearchChange},scopedSlots:e._u([{key:"expand",fn:function(t){var n=t.row;return[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.expandTableData}},[a("el-table-column",{attrs:{label:"目标环境列表"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},e._l(n.clients,function(t){return a("el-tag",{key:t,attrs:{"disable-transitions":!1},on:{close:function(a){return e.handleClose(t)}}},[e._v(e._s(t.profile)+"("+e._s(t.url)+")")])}),1)]}}],null,!0)}),a("el-table-column",{attrs:{label:"同步对象列表"}},[0==e.logType?a("item-tags",{attrs:{tags:n.services,column:"name",mode:"view"}}):e._e(),1==e.logType?a("item-tags",{attrs:{tags:n.services,column:"paramKey",mode:"view"}}):e._e()],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.expandTableData}},[0==e.logType?a("el-table-column",{attrs:{label:"同步日志"}},[a("sync-logs",{attrs:{syncConfig:n}})],1):e._e()],1)]}},{key:"src_client",fn:function(t){var n=t.row;return["success"==n.status?a("el-link",{attrs:{underline:!1,type:"success"},on:{click:function(t){return e.handlesyncLog(n)}}},[e._v(e._s(n.src_client&&n.src_client.url))]):e._e(),"running"==n.status?a("el-link",{attrs:{underline:!1,type:"warning"},on:{click:function(t){return e.handlesyncLog(n)}}},[e._v(e._s(n.src_client&&n.src_client.url))]):e._e(),"failure"==n.status?a("el-link",{attrs:{underline:!1,type:"danger"},on:{click:function(t){return e.handlesyncLog(n)}}},[e._v(e._s(n.src_client&&n.src_client.url))]):e._e()]}},{key:"clients",fn:function(e){var t=e.row;return[a("item-tags",{attrs:{tags:t.clients,column:"profile",mode:"view"}})]}},{key:"services",fn:function(t){var n=t.row;return[0==e.logType?a("item-tags",{attrs:{tags:n.services,column:"name",mode:"view"}}):e._e(),1==e.logType?a("item-tags",{attrs:{tags:n.services,column:"paramKey",mode:"view"}}):e._e()]}}]),model:{value:e.objData,callback:function(t){e.objData=t},expression:"objData"}}),a("el-drawer",{attrs:{title:"同步日志",size:"45%",visible:e.drawer,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){e.drawer=t}}},[a("div",{staticStyle:{"overflow-y":"auto",height:"90%"}},[a("el-timeline",e._l(e.logData,function(t,n){return a("el-timeline-item",{key:n,attrs:{size:0==n?"large":"normal",color:"success"==t.status?"#0bbd87":"red",timestamp:e._f("parseTime")(t.create_at)}},[e._v(e._s(n+1)+". "+e._s(t.comment))])}),1),a("json-viewer",{attrs:{value:e.currnetSyncConfig,"expand-depth":5,copyable:"",sort:""}})],1)])],1)},i=[],s=a("5176"),r=a.n(s),o=a("5640"),l=a("78ba"),c=a("ca60"),u=a("88e6"),d={name:"syncLog",components:{ItemTags:c["default"],syncLogs:u["default"]},data:function(){return{objData:{},tableSearch:{},tableOption:o["h"],logOption:o["f"],tableData:[],expandTableData:[{}],currnetSyncConfig:{},logData:[],tablePage:1,tableSize:10,tableLoading:!1,options:[],page:{total:0,currentPage:1,pageSize:10},drawer:!1}},created:function(){this.handleList()},props:{logType:{required:!0}},methods:{handlesyncLog:function(e){var t=this;this.drawer=!0,this.currnetSyncConfig=e,Object(l["b"])(e.syncNo).then(function(e){t.logData=e.data.data})},handlerefreshChange:function(e){this.handleList(this.tableSearch)},handleCurrentChange:function(e){this.tablePage=e,this.handlerefreshChange()},handleCurrentSize:function(e){this.tableSize=e,this.handlerefreshChange()},handleSearchChange:function(e){this.tableSearch=e,this.handleList(this.tableSearch)},handleList:function(e){var t=this;this.tableLoading=!0,Object(l["a"])(r()({},e,{start:this.tablePage,limit:this.tableSize,logType:this.logType})).then(function(e){var a=e.data.data;t.tableData=a.items,console.log(a),t.page={total:a.totalCount,currentPage:t.tablePage,pageSize:t.tableSize},t.tableLoading=!1})}}},p=d,h=(a("c9b6"),a("2877")),m=Object(h["a"])(p,n,i,!1,null,null,null);t["default"]=m.exports},"2e8b":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-popover",{attrs:{placement:e.placement,title:"路由Hosts更新为"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("div",{staticStyle:{"margin-top":"20px"}},[a("item-tags",{attrs:{tags:this.routeParms.hosts,name:"路由Hosts",column:"hosts",mode:"edit"},on:{sendTag:e.bindTags}})],1),a("el-button",{attrs:{slot:"reference",icon:"el-icon-refresh",size:"small",type:"success"},on:{click:e.findConfigByKey},slot:"reference"},[e._v("批量更新HOSTS")]),a("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){e.visible=!1}}},[e._v("取消")]),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.batchUpdateRouteHosts}},[e._v("确定")])],1)],1)},i=[],s=a("ce4a"),r=a("ca60"),o=a("ceee"),l={name:"routing",components:{ItemTags:r["default"]},data:function(){return{visible:!1,routeParms:{hosts:[],service:this.service}}},props:{service:{required:!1},placement:{default:"bottom-start",required:!1}},created:function(){this.findConfigByKey()},methods:{findConfigByKey:function(){var e=this;Object(s["c"])("default_domains").then(function(t){var a=t.data.data,n=JSON.parse(a.configValue);e.routeParms["hosts"]=n})},batchUpdateRouteHosts:function(){var e=this;Object(o["g"])(this.routeParms).then(function(t){var a=t.data;0!=a.status?e.$errorInfo(a.errmsg):(e.targetData=t.data.data,0===a.errmsg.trim().length?e.$successInfo("更新成功"):e.$successInfo("部分路由paths为空,不能再更新Hosts为空,路由列表为:"+a.errmsg),e.callback())})},callback:function(){this.$emit("callback",{})}}},c=l,u=a("2877"),d=Object(u["a"])(c,n,i,!1,null,null,null);t["default"]=d.exports},"2ed6":function(e,t,a){"use strict";a.d(t,"b",function(){return s}),a.d(t,"f",function(){return r}),a.d(t,"g",function(){return o}),a.d(t,"e",function(){return l}),a.d(t,"c",function(){return c}),a.d(t,"a",function(){return u}),a.d(t,"d",function(){return d});var n=a("b5c6"),i=a("074d"),s=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/upstreams",method:"get"})},r=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/upstreams",method:"post",data:e})},o=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/upstreams/"+e.id,method:"post",data:e})},l=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/upstreams/"+e.id,method:"delete"})},c=function(e,t){return Object(n["a"])({url:i["a"].path+"/kong/api/upstreams/"+e.id+"/targets/health",method:"post",data:t})},u=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/upstreams/"+e.upstream.id+"/targets",method:"post",data:e})},d=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/upstreams/"+e.upstream.id+"/targets/"+e.id,method:"delete"})}},"2f92":function(e,t,a){},"2fa5":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e._l(e.dynamicTags,function(t){return a("el-tag",{key:t,attrs:{closable:!!e.permission.user_authority,"disable-transitions":!1},on:{close:function(a){return e.handleClose(t)}}},[e._v(e._s(t.name)+"\n ")])}),e.inputVisible?a("el-autocomplete",{ref:"saveTagInput",staticStyle:{"margin-left":"10px"},attrs:{"popper-class":"my-autocomplete","fetch-suggestions":e.remoteMethod,placeholder:"请输入用户组进行检索"},on:{select:e.handleSelect},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item;return[a("div",{staticClass:"name"},[e._v(e._s(n.name))]),a("span",{staticClass:"addr"},[e._v(e._s(n.mobile))])]}}],null,!1,3326133321),model:{value:e.state,callback:function(t){e.state=t},expression:"state"}},[a("i",{staticClass:"el-icon-edit el-input__icon",attrs:{slot:"suffix"},slot:"suffix"})]):a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.permission.user_authority,expression:"permission.user_authority"}],staticClass:"button-new-tag el-icon-plus",attrs:{size:"small"},on:{click:e.showInput}})],2)},i=[],s=(a("ac6a"),a("7f7f"),a("20d6"),a("cebc")),r=a("5880"),o=a("3523"),l={data:function(){return{dynamicTags:this.userInfo.userGroupList,loading:!1,options:[],state:null,selected:!1,userLists:[],inputVisible:!1,inputValue:""}},created:function(){this.init()},props:{mode:{},userIds:{},userInfo:{},userGroupList:{}},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission"])),methods:{init:function(){this.userLists=this.userGroupList,this.options=this.userLists,this.permission.user_authority||(this.mode="view")},handlerBlur:function(){console.log("this.selected:",this.selected),this.selected||(this.selected=!1,this.inputVisible=!1)},handleSelect:function(e){var t=this,a=_.findIndex(this.dynamicTags,function(t){return e.id==t.id});-1==a?Object(o["g"])(e.id,this.getUserId()).then(function(a){0==a.data.status?(t.dynamicTags.push(e),t.inputVisible=!1,t.selected=!0,t.callback(),t.$successInfo("设置用户组成功")):t.$errorInfo(a.data.errmsg)}):this.$errorInfo(e.name+" 已经设置过了")},handleClose:function(e){var t=this;Object(o["a"])(e.id,this.getUserId()).then(function(a){0==a.data.status?(t.dynamicTags.splice(t.dynamicTags.indexOf(e),1),t.callback(),t.$successInfo("删除用户成功")):t.$errorInfo(a.data.errmsg)})},getUserId:function(){var e=[];return _.forEach(this.userIds,function(t){e.push(t.userId)}),e},remoteMethod:function(e,t){this.options=""!==e?this.userLists.filter(function(t){return t.name.indexOf(e)>-1}):this.userLists,t(this.options)},showInput:function(){var e=this;this.inputVisible=!0,this.selected=!1,this.$nextTick(function(t){e.$refs.saveTagInput.$refs.input.focus()})},callback:function(){this.$emit("callback",{})}}},c=l,u=(a("a8c1"),a("2877")),d=Object(u["a"])(c,n,i,!1,null,null,null);t["default"]=d.exports},"2fc5":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("basic-container",{},[a("el-row",{attrs:{gutter:20}},[a("el-col",[a("div",{staticStyle:{"margin-left":"12px"}},[a("el-row",{attrs:{gutter:20}},[a("el-row",[a("el-col",[a("el-alert",{attrs:{span:"20",type:"info","show-icon":"",effect:"dark",description:"控制台方便查看网关运行的访问日志,可查询日志:access.log,error.log,kong.jlog等"}})],1)],1),a("iframe",{staticStyle:{width:"100%",height:"700px"},attrs:{src:e.kongClient.url.replace("8001","8900/log"),scrolling:"yes",frameborder:"0"}})],1)],1)])],1)],1)},i=[],s=a("cebc"),r=a("5880"),o={name:"kongshell",data:function(){return{envs:[]}},created:function(){},watch:{},mounted:function(){},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission","userInfo","kongClient"])),props:[],methods:{}},l=o,c=(a("48c2"),a("c83a"),a("2877")),u=Object(c["a"])(l,n,i,!1,null,"74f1c94a",null);t["default"]=u.exports},3086:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("avue-tabs",{attrs:{option:e.option,data:e.data,page:e.page},on:{change:e.handleChange,submit:e.handleSubmit,"selection-change":e.selectionChange},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}},[a("template",{slot:"before"},[a("el-button",{attrs:{size:"small"},on:{click:e.handleDel}},[e._v("全部已读")]),a("el-button",{attrs:{size:"small"},on:{click:e.handleDel}},[e._v("标记已读")]),a("el-button",{attrs:{size:"small"},on:{click:e.handleDel}},[e._v("删除")])],1)],2)],1)],1)},i=[],s={column:[{label:"全部信息",prop:"all",type:"crud",option:{selection:!0,addBtn:!1,menu:!1,header:!1,column:[{width:500,label:"标题内容",prop:"title"},{label:"时间",prop:"date"}]}},{label:"通知",prop:"msg",type:"crud",option:{selection:!0,addBtn:!1,menu:!1,header:!1,column:[{width:500,label:"标题内容",prop:"title"},{label:"时间",prop:"date"}]}},{label:"私信",prop:"one",type:"crud",option:{selection:!0,addBtn:!1,menu:!1,header:!1,column:[{width:500,label:"标题内容",prop:"title"},{label:"时间",prop:"date"}]}}]},r=a("c54a"),o={data:function(){return{form:{},type:"message",option:s,checkList:[],page:{currentPage:1,total:100,pageSize:10},data:[]}},created:function(){this.handleWitch()},methods:{handleSubmit:function(){this.$message({message:this.form,type:"success"})},handleWitch:function(){"all"===this.type?this.data=[{title:"你好新朋友,感谢使用 avue-cli",date:"2018-11-23"},{title:"smallwei发来一条私信",date:"2018-11-23"}]:"msg"===this.type&&(this.data=[{title:"smallwei发来一条私信",date:"2018-11-23"},{title:"smallwei发来一条私信",date:"2018-11-23"}])},selectionChange:function(e){this.checkList=e},handleDel:function(){Object(r["c"])(this.checkList)?this.$message.warning("请选择至少一条数据"):this.$message.success("操作成功")},handleChange:function(e){this.type=e.prop,this.handleWitch()}}},l=o,c=a("2877"),u=Object(c["a"])(l,n,i,!1,null,null,null);t["default"]=u.exports},3515:function(e,t,a){},3523:function(e,t,a){"use strict";a.d(t,"f",function(){return s}),a.d(t,"j",function(){return r}),a.d(t,"d",function(){return o}),a.d(t,"i",function(){return l}),a.d(t,"g",function(){return c}),a.d(t,"c",function(){return u}),a.d(t,"a",function(){return d}),a.d(t,"h",function(){return p}),a.d(t,"b",function(){return h}),a.d(t,"e",function(){return m});var n=a("b5c6"),i=a("074d"),s=function(e){return Object(n["a"])({url:i["a"].path+"/system/user/group",method:"post",data:e})},r=function(e){return Object(n["a"])({url:i["a"].path+"/system/user/group/"+e.id,method:"post",data:e})},o=function(e){return Object(n["a"])({url:i["a"].path+"/system/user/group/page",method:"get",params:e})},l=function(e,t){return Object(n["a"])({url:i["a"].path+"/system/user/group/"+e+"/user/"+t,method:"post"})},c=function(e,t){return Object(n["a"])({url:i["a"].path+"/system/user/group/"+e+"/user/",method:"post",data:t})},u=function(e,t){return Object(n["a"])({url:i["a"].path+"/system/user/group/"+e+"/user/"+t,method:"delete"})},d=function(e,t){return Object(n["a"])({url:i["a"].path+"/system/user/group/"+e+"/user/",method:"delete",data:t})},p=function(e,t,a){return Object(n["a"])({url:i["a"].path+"/system/user/group/"+e+"/role/"+t,method:"post",data:a})},h=function(e,t,a){return Object(n["a"])({url:i["a"].path+"/system/user/group/"+e+"/drole/"+t,method:"post",data:a})},m=function(){return Object(n["a"])({url:i["a"].path+"/system/user/group/list",method:"get"})}},"354b":function(e,t,a){"use strict";var n=a("6b6b"),i=a.n(n);i.a},3716:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("el-tabs",[a("el-tab-pane",[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-date"}),e._v("\n 全部参数\n ")]),a("avue-crud",{ref:"crud",attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading},on:{"refresh-change":e.handlerefreshChange},scopedSlots:e._u([{key:"menuLeft",fn:function(t){return[e.permission.params_add?a("el-button",{attrs:{icon:"el-icon-plus",size:"small",type:"primary"},on:{click:function(a){return e.toEditClient(t.row,t.$index)}}},[e._v("新 增")]):e._e()]}},{key:"menu",fn:function(t){return[e.permission.params_update?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",type:"primary",plain:""},on:{click:function(a){return e.toEditClient(t.row,t.$index)}}},[e._v("编辑")]):e._e()]}},{key:"expand",fn:function(e){var t=e.row;return[a("json-viewer",{attrs:{value:t.configValue}})]}}])})],1),e._l(e.configTypes,function(t){return a("el-tab-pane",{key:t,attrs:{index:t.label}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-date"}),e._v("\n "+e._s(t.label)+"\n ")]),a("avue-crud",{ref:"crud",refInFor:!0,attrs:{option:e.tableOption,data:t.data,"table-loading":e.tableLoading},on:{"refresh-change":e.handlerefreshChange},scopedSlots:e._u([{key:"menuLeft",fn:function(t){return[e.permission.params_add?a("el-button",{attrs:{icon:"el-icon-plus",size:"small",type:"primary"},on:{click:function(a){return e.toEditClient(t.row,t.$index)}}},[e._v("新 增")]):e._e()]}},{key:"menu",fn:function(t){return[e.permission.params_update?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",type:"primary",plain:""},on:{click:function(a){return e.toEditClient(t.row,t.$index)}}},[e._v("编辑")]):e._e()]}},{key:"expand",fn:function(e){var t=e.row;return[a("json-viewer",{attrs:{value:t.configValue}})]}}],null,!0)})],1)})],2)],1),e.grade.box?a("el-dialog",{attrs:{title:"系统参数",width:"70%",visible:e.grade.box},on:{"update:visible":function(t){return e.$set(e.grade,"box",t)}}},[a("avue-form",{attrs:{option:e.configColumn},on:{submit:e.handleClient},model:{value:e.clientForm,callback:function(t){e.clientForm=t},expression:"clientForm"}})],1):e._e()],1)},i=[],s=a("5176"),r=a.n(s),o=(a("ac6a"),a("cebc")),l=a("5880"),c=a("ce4a"),u=a("5640"),d={name:"serverConfig",comments:{},data:function(){return{tableOption:u["d"],configColumn:u["c"],tableData:[],tableLoading:!1,clientForm:{},configTypes:[],grade:{box:!1}}},created:function(){this.handleList(),this.initOptions()},mounted:function(){},computed:Object(o["a"])({},Object(l["mapGetters"])(["permission"])),methods:{initOptions:function(){this.permission.params_update||(this.tableOption["menu"]=!1)},findConfigType:function(){var e=this;Object(c["d"])().then(function(t){var a=t.data;e.configTypes=a,e.initConfigData()})},initConfigData:function(){var e=this;_.forEach(this.configTypes,function(t){var a=[];_.forEach(e.tableData,function(e){e.configType==t.value&&a.push(e)}),t["data"]=a})},toEditClient:function(e,t){this.grade.box=!0,this.clientForm=e},handlerefreshChange:function(e){this.handleList(this.tableSearch)},handleList:function(e){var t=this;this.tableLoading=!0,Object(c["b"])(r()({})).then(function(e){var a=e.data;t.tableData=a.data,t.tableLoading=!1,t.findConfigType()})},handleClient:function(e,t){var a=this;this.clientForm&&this.clientForm.id?Object(c["e"])(this.clientForm).then(function(e){var n=e.data;0==n.status?(a.$successInfo("修改成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("修改失败"),t()}):Object(c["a"])(this.clientForm).then(function(e){var n=e.data;0==n.status?(a.$successInfo("新增成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("新增失败"),t()})}}},p=d,h=a("2877"),m=Object(h["a"])(p,n,i,!1,null,null,null);t["default"]=m.exports},"3aa7":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("avue-crud",{attrs:{option:e.queryPluginsOption,data:e.routeData},on:{"row-del":e.handleTargetDel},scopedSlots:e._u([{key:"menuRight",fn:function(t){return["edit"==e.mode?a("el-button",{attrs:{icon:"el-icon-plus",size:"small",type:"primary"},on:{click:function(a){return e.toAddPlugin(t.row,t.$index)}}},[e._v("新增插件")]):e._e()]}},{key:"menu",fn:function(t){return[a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"primary"},on:{click:function(a){return e.toEditPlugin(t.row,t.$index)}}},[e._v("编辑")]),a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"danger"},on:{click:function(a){return e.handleTargetDel(t.row,t.$index)}}},[e._v("删除")])]}}])},[a("template",{slot:"empty"},[e._v("暂无数据,请添加")])],2),e.grade.addPluginBox?a("el-dialog",{attrs:{title:"新增插件",width:"70%",visible:e.grade.addPluginBox,"append-to-body":""},on:{"update:visible":function(t){return e.$set(e.grade,"addPluginBox",t)}}},[e.grade.addPluginBox?a("list-plugin",{attrs:{route:e.route,service:e.service},on:{callback:e.pluginCallback}}):e._e()],1):e._e(),e.grade.editPluginBox?a("el-dialog",{attrs:{title:"编辑插件",width:"70%",visible:e.grade.editPluginBox,"append-to-body":""},on:{"update:visible":function(t){return e.$set(e.grade,"editPluginBox",t)}}},[e.grade.editPluginBox?a("uphold-plugin",{attrs:{plugin:e.pluginForm,edit:"edit",fields:e.fields},on:{callback:e.pluginCallback}}):e._e()],1):e._e()],1)},i=[],s=(a("7f7f"),a("cebc")),r=a("5880"),o=a("fef3"),l=a("468b"),c=a("ca60"),u=a("ecc3"),d=a("7e8d"),p={name:"QueryPlugins",components:{ItemTags:c["default"],upholdPlugin:u["default"],listPlugin:d["default"]},data:function(){return{queryPluginsOption:o["f"],routeData:[],pluginForm:{service:this.service,route:this.route},activeNames:"listRoute",hiddenAddRoute:!0,pluginUpdate:!1,grade:{editPluginBox:!1,addPluginBox:!1}}},props:{service:{type:Object,required:!1},route:{type:Object,required:!1},mode:{required:!1}},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission","isDevProfile","isProdProfile","systemProfile"])),mounted:function(){this.handleList(),this.initOption()},methods:{initOption:function(){this.queryPluginsOption["menu"]="edit"==this.mode},toEditPlugin:function(e,t){var a=this;this.pluginForm=e,Object(l["d"])(this.pluginForm.name).then(function(e){var t=e.data;a.fields=t.fields||[],a.grade.editPluginBox=!0,a.grade.addPluginBox=!1})},toAddPlugin:function(e,t){this.grade.editPluginBox=!1,this.grade.addPluginBox=!0},bindTags:function(){},pluginCallback:function(){this.handleList(),this.grade.editPluginBox=!1,this.grade.addPluginBox=!1},handleList:function(){this.tableLoading=!0,this.route&&(this.pluginForm.route={id:this.route.id},this.queryListByRoute(this.route)),this.service&&(this.pluginForm.service={id:this.service.id},this.queryListByService(this.service))},queryListByRoute:function(e){var t=this;Object(l["b"])(this.pluginForm).then(function(e){t.routeData=e.data.data})},queryListByService:function(e){var t=this;Object(l["c"])(this.pluginForm).then(function(e){t.routeData=e.data.data})},handleTargetDel:function(e,t){var a=this,n="";this.isProdProfile&&(n="当前为生产环境,请谨慎操作! "),this.$confirm(n+"是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(l["g"])({id:e.id}).then(function(e){var t=e.data;0!=t.status?a.$errorInfo(t.errmsg):(a.handleList(),a.$successInfo("删除成功"))})}).catch(function(){})}}},h=p,m=(a("1d56"),a("2877")),f=Object(m["a"])(h,n,i,!1,null,null,null);t["default"]=f.exports},"3ac9":function(e,t,a){"use strict";a.d(t,"d",function(){return s}),a.d(t,"b",function(){return r}),a.d(t,"c",function(){return o}),a.d(t,"a",function(){return l});var n=a("b5c6"),i=a("074d"),s=function(){return Object(n["a"])({url:i["a"].path+"/kong/api/consumers",method:"get"})},r=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/consumers",method:"post",data:e})},o=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/consumers/"+e.id,method:"post",data:e})},l=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/consumers/"+e.id,method:"delete"})}},"3dba":function(e,t,a){"use strict";a.d(t,"a",function(){return s}),a.d(t,"b",function(){return r}),a.d(t,"d",function(){return o}),a.d(t,"e",function(){return l}),a.d(t,"c",function(){return c}),a.d(t,"f",function(){return u});var n=a("b5c6"),i=a("074d"),s=function(){return Object(n["a"])({url:i["a"].path+"/kong/api/services",method:"get"})},r=function(e,t){return Object(n["a"])({url:i["a"].path+"/kong/api/services/"+e.id+"/list/plugins",method:"post",data:t})},o=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/services",method:"post",data:e})},l=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/services/"+e.id,method:"post",data:e})},c=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/services/"+e.id,method:"delete"})},u=function(e){return Object(n["a"])({url:i["a"].path+"/kong/sync/configs/",method:"post",data:e})}},"3eb2":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[e._v("404错误页面")])]),a("div",{staticClass:"error-box"},[a("errorPage404",{staticClass:"error-page"}),a("span",{staticClass:"error-text"},[e._v("/404当访问的页面不存在时会跳转到404页面,您可以在浏览器地址栏中修改url为一个不存在的路径,体验一下效果")])],1)]),a("basic-container",[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[e._v("403错误页面")])]),a("div",{staticClass:"error-box"},[a("errorPage403",{staticClass:"error-page"}),a("span",{staticClass:"error-text"},[e._v("/403在当前登录用户不具有执行当前操作的权限时跳转到该页面,您可以在ajax请求方法中判断返回的状态码为403时跳转到该页面")])],1)]),a("basic-container",[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[e._v("500错误页面")])]),a("div",{staticClass:"error-box"},[a("errorPage500",{staticClass:"error-page"}),a("span",{staticClass:"error-text"},[e._v("/500当请求之后出现服务端错误时跳转到该页面,您可以在ajax请求方法中判断返回的状态码为500时跳转到该页面")])],1)])],1)},i=[],s=a("a5fa"),r=a("a8d0"),o=a("611b"),l={name:"errPage",data:function(){return{}},created:function(){},mounted:function(){},computed:{},props:[],methods:{},components:{errorPage404:s["default"],errorPage403:r["default"],errorPage500:o["default"]}},c=l,u=(a("c379"),a("2877")),d=Object(u["a"])(c,n,i,!1,null,"794ca73a",null);t["default"]=d.exports},"405d":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("el-card",{staticClass:"box-card",attrs:{shadow:"always"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[a("h3",[a("strong",[e._v("CONNECTIONS【"+e._s(e.kongClient.url)+"】")])])])]),a("avue-data-display",{attrs:{option:e.easyDataOption}})],1)],1),a("el-row",[a("el-col",{attrs:{span:8}},[a("basic-container",{attrs:{height:"160"}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[a("h3",[a("strong",[e._v("NODE INFO")])])])]),a("avue-crud",{attrs:{option:e.nodeOption,data:e.nodeData}})],1)],1)],1),a("el-col",{attrs:{span:8}},[a("basic-container",[a("el-card",{attrs:{shadow:"always"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[a("h3",[a("strong",[e._v("CONFIG INFO")])])])]),a("avue-crud",{attrs:{option:e.nodeOption,data:e.configData}})],1)],1)],1),a("el-col",{attrs:{span:8}},[a("basic-container",[a("el-card",{attrs:{shadow:"always"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("h3",[a("span",[a("strong",[e._v("DATASTORE INFO")])]),e.reachable?a("div",{staticStyle:{float:"right",padding:"0px 0",color:"green","font-size":"14px"}},[a("strong",[e._v("Reachable")])]):a("div",{staticStyle:{float:"right",padding:"0px 0",color:"red","font-size":"14px"}},[a("strong",[e._v("Unreachable")])])])]),a("avue-crud",{attrs:{option:e.nodeOption,data:e.dbData},model:{value:e.obj,callback:function(t){e.obj=t},expression:"obj"}})],1)],1)],1)],1),a("basic-container",[a("el-card",[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[a("h3",[a("strong",[e._v("PLUGINS")])])])]),a("div",{staticClass:"tag-group"},e._l(e.plugins,function(t){return a("el-tag",{key:t.name,staticStyle:{"margin-top":"5px"},attrs:{"disable-transitions":!1,type:t.type,effect:"dark"}},[a("strong",[e._v(e._s(t.name))])])}),1)])],1)],1)},i=[],s=(a("ac6a"),a("cebc")),r=a("a573"),o=a("5880"),l={data:function(){return{total_requests:0,reachable:!1,plugins:[],nodeData:[],configData:[],obj:{},dbData:[],nodeOption:{border:!1,header:!1,simplePage:!0,showHeader:!1,addBtn:!1,delBtn:!1,editBtn:!1,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,menuAlign:"right",menu:!1,menuWidth:180,align:"center",column:[{label:"名称",prop:"name"},{label:"值",prop:"value",width:230,align:"left"}]},easyDataOption:{span:4,data:[{click:function(e){},title:"ACTIVE",count:0,icon:"icon-yonghuguanli",color:"rgb(49, 180, 141)"},{title:"READING",count:0,icon:"icon-shujuzhanshi2",color:"rgb(56, 161, 242)"},{title:"WRITING",count:0,icon:"icon-jiaoseguanli",color:"rgb(117, 56, 199)"},{title:"WAITING",count:0,icon:"icon-jiaoseguanli",color:"rgb(117, 56, 199)"},{title:"ACCEPTED",count:0,icon:"icon-jiaoseguanli",color:"rgb(117, 56, 199)"},{title:"HANDLED",count:0,icon:"icon-jiaoseguanli",color:"rgb(117, 56, 199)"}]}}},computed:Object(s["a"])({},Object(o["mapGetters"])(["userInfo","kongClient"])),created:function(){this.findActiveKongclient()},mounted:function(){var e=this,t=setInterval(function(){e.queryInfo()},5e3);this.$once("hook:beforeDestroy",function(){clearInterval(t)})},watch:{kongClient:function(e){this.queryInfo(),this.queryStatus()}},methods:{findActiveKongclient:function(){this.$store.dispatch("FindActiveClient",this.userInfo).then(function(e){})},queryStatus:function(){var e=this;Object(r["b"])().then(function(t){var a=t.data,n=a["server"];e.reachable=a.database.reachable,e.easyDataOption.data.forEach(function(e){var t="connections_"+e.title.toLowerCase();e["count"]=n[t]}),e.total_requests=n["total_requests"]})},queryInfo:function(){var e=this;Object(r["a"])().then(function(t){var a=t.data,n=a.plugins;if(a&&n){e.nodeData=[],e.plugins=[],e.dbData=[],e.configData=[],e.nodeData.push({name:"HostName",value:a.hostname}),e.nodeData.push({name:"Tag Line",value:a.tagline}),e.nodeData.push({name:" Version",value:a.version}),e.nodeData.push({name:"Lua version",value:a.lua_version}),e.nodeData.push({name:"Admin Listen",value:a.configuration.admin_listen});var i=a.configuration;for(var s in e.configData.push({name:"Config path",value:i.nginx_kong_conf}),e.configData.push({name:"Log level",value:i.log_level}),e.configData.push({name:"Keepalive",value:i.upstream_keepalive}),e.configData.push({name:"Access log",value:i.proxy_access_log}),e.configData.push({name:"Error log",value:i.proxy_error_log}),e.dbData.push({name:"DBMS",value:i.database}),e.dbData.push({name:"Host",value:i.pg_host}),e.dbData.push({name:"Database",value:i.pg_database}),e.dbData.push({name:"User",value:i.pg_user}),e.dbData.push({name:"Port",value:i.pg_port}),n.available_on_server){var r="info";n.enabled_in_cluster.forEach(function(e){if(e!==s)return"info";r="success"}),e.plugins.push({name:s,type:r})}}})}}},c=l,u=(a("73dc"),a("2877")),d=Object(u["a"])(c,n,i,!1,null,null,null);t["default"]=d.exports},"442f":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("el-alert",{attrs:{title:"设置系统环境相关配置请前往环境管理,或联系管理员",type:"info","show-icon":""}}),a("avue-crud",{ref:"crud",attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading},on:{"refresh-change":e.handlerefreshChange},scopedSlots:e._u([{key:"id",fn:function(t){var n=t.row;return[e.activeClient.id!=n.id?a("el-button",{attrs:{type:"info",size:"mini",plain:""},on:{click:function(t){return e.handActiveClient(n)}}},[e._v("激活")]):e._e(),e.activeClient.id==n.id?a("el-button",{attrs:{type:"success",size:"mini"}},[e._v("已激活")]):e._e()]}},{key:"menuLeft",fn:function(t){return[(e.permission.client_add,e._e())]}},{key:"menu",fn:function(t){return[e.permission.client_update?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",type:"primary",plain:""},on:{click:function(a){return e.toEditClient(t.row,t.$index)}}},[e._v("编辑")]):e._e(),e.permission.client_delete?a("el-button",{attrs:{icon:"el-icon-delete",size:"small",type:"danger",plain:""},on:{click:function(a){return e.handlerDelete(t.row,t.$index)}}},[e._v("删除")]):e._e()]}}])})],1),e.grade.box?a("el-dialog",{attrs:{title:"新增Kong连接",width:"70%",visible:e.grade.box},on:{"update:visible":function(t){return e.$set(e.grade,"box",t)}}},[a("avue-form",{attrs:{option:e.clientColumn},on:{submit:e.handleClient},model:{value:e.clientForm,callback:function(t){e.clientForm=t},expression:"clientForm"}})],1):e._e()],1)},i=[],s=a("5176"),r=a.n(s),o=(a("7f7f"),a("cebc")),l=a("5880"),c=a("af62"),u=a("5640"),d={name:"client",components:{},data:function(){return{tableOption:u["b"],clientColumn:u["a"],tableData:[],tableLoading:!1,clientForm:{},activeClient:{id:-1},grade:{box:!1}}},created:function(){this.findActiveKongclient(),this.handleList(),this.initOptions(),this.$notify({title:"提示",type:"warning",message:"请激活当前使用环境!!!",offset:100})},watch:{},mounted:function(){},computed:Object(o["a"])({},Object(l["mapGetters"])(["permission","userInfo"])),props:[],methods:{initOptions:function(){this.tableOption["menu"]=!1},findActiveKongclient:function(){var e=this;this.$store.dispatch("FindActiveClient",this.userInfo).then(function(t){e.activeClient=t})},handActiveClient:function(e){var t=this;Object(c["h"])(this.userInfo.name,e).then(function(e){window.location.href.indexOf("#/wel/index")>0?window.location.reload():t.$nextTick(function(e){t.$router.push("/wel/index")})})},toEditClient:function(e,t){this.grade.box=!0,this.clientForm=e},handlerefreshChange:function(e){this.handleList(this.tableSearch)},handleList:function(e){var t=this;this.tableLoading=!0,Object(c["c"])(r()({})).then(function(e){var a=e.data.data;t.tableData=a,t.tableLoading=!1})},handleClient:function(e,t){var a=this;this.clientForm&&this.clientForm.id?Object(c["i"])(this.clientForm).then(function(e){var n=e.data;0==n.status?(a.$successInfo("修改成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("修改失败"),t()}):Object(c["a"])(this.clientForm).then(function(e){var n=e.data;0==n.status?(a.$successInfo("新增成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("新增失败"),t()})},handlerDelete:function(e){var t=this;this.$confirm("是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(c["g"])(e).then(function(e){var a=e.data;0==a.status?(t.$successInfo("删除成功"),t.handleList()):t.$errorInfo("删除失败")})})}}},p=d,h=(a("2810"),a("2877")),m=Object(h["a"])(p,n,i,!1,null,"2f33f763",null);t["default"]=m.exports},4451:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticClass:"easy-cron"},[a("div",{staticClass:"content"},[a("div",{staticClass:"left"},[a("el-tabs",{attrs:{size:"small"},model:{value:e.curtab,callback:function(t){e.curtab=t},expression:"curtab"}},[e.hideSecond?e._e():a("el-tab-pane",{attrs:{label:"秒",name:"second"}},[a("second-ui",{attrs:{disabled:e.disabled},model:{value:e.second,callback:function(t){e.second=t},expression:"second"}})],1),a("el-tab-pane",{attrs:{label:"分",name:"minute"}},[a("minute-ui",{attrs:{disabled:e.disabled},model:{value:e.minute,callback:function(t){e.minute=t},expression:"minute"}})],1),a("el-tab-pane",{attrs:{label:"时",name:"hour"}},[a("hour-ui",{attrs:{disabled:e.disabled},model:{value:e.hour,callback:function(t){e.hour=t},expression:"hour"}})],1),a("el-tab-pane",{attrs:{label:"日",name:"day"}},[a("day-ui",{attrs:{week:e.week,disabled:e.disabled},model:{value:e.day,callback:function(t){e.day=t},expression:"day"}})],1),a("el-tab-pane",{attrs:{label:"月",name:"month"}},[a("month-ui",{attrs:{disabled:e.disabled},model:{value:e.month,callback:function(t){e.month=t},expression:"month"}})],1),a("el-tab-pane",{attrs:{label:"周",name:"week"}},[a("week-ui",{attrs:{day:e.day,disabled:e.disabled},model:{value:e.week,callback:function(t){e.week=t},expression:"week"}})],1),e.hideYear||e.hideSecond?e._e():a("el-tab-pane",{attrs:{label:"年",name:"year"}},[a("year-ui",{attrs:{disabled:e.disabled},model:{value:e.year,callback:function(t){e.year=t},expression:"year"}})],1)],1)],1),a("div",{staticClass:"right"},[a("div",{staticClass:"field-list"},[a("el-table",{attrs:{stripe:"",columns:e.columns,data:e.tableData,"show-header":!1,size:"small"}})],1),a("div",{staticClass:"exe-pre"},[a("div",{staticClass:"exe-pre-panel"},[a("label",{staticClass:"p-left"},[e._v("执行时间")]),a("el-date-picker",{staticClass:"p-right",attrs:{type:"datetime",placeholder:"选择执行开始时间"},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}})],1),a("div",{staticClass:"exe-pre-panel"},[a("el-tooltip",{staticClass:"p-left",attrs:{content:"执行预览解析不含年参数"}},[a("label",[e._v("执行预览")])]),a("el-input",{staticClass:"p-right",attrs:{type:"textarea",value:e.preTimeList,rows:4,readonly:""}})],1)])])])])},i=[],s=(a("28a5"),a("c5f6"),a("109b")),r=a("f6e9"),o=a("9fee"),l=a("84bc"),c=a("b355"),u=a("68c6"),d=a("7141"),p=a("f8d8"),h=a.n(p),m=(a("6b54"),a("a481"),function(e,t){if(!e)return"";var a=t||"yyyy-MM-dd";e=new Date(e);var n={M:e.getMonth()+1,d:e.getDate(),h:e.getHours(),m:e.getMinutes(),s:e.getSeconds(),q:Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};return a=a.replace(/([yMdhmsqS])+/g,function(t,a){var i=n[a];return void 0!==i?(t.length>1&&(i="0".concat(i),i=i.substr(i.length-2)),i):"y"===a?e.getFullYear().toString().substr(4-t.length):t}),a}),f=m,g=a("b012"),b={name:"easy-cron",comments:{SecondUi:s["default"],MinuteUi:r["default"],HourUi:o["default"],DayUi:l["default"],WeekUi:c["default"],MonthUi:u["default"],YearUi:d["default"]},model:{prop:"cronValue",event:"change"},props:{cronValue:{type:String,default:""},disabled:{type:Boolean,default:!1},exeStartTime:{type:[Number,String,Object],default:0},hideSecond:{type:Boolean,default:!1},hideYear:{type:Boolean,default:!1},remote:{type:Function,default:null}},data:function(){return{curtab:this.hideSecond?"minute":"second",second:"*",minute:"*",hour:"*",day:"*",month:"*",week:"?",year:"*",startTime:new Date,preTimeList:"执行预览,会忽略年份参数",columns:[{title:" ",width:"80",key:"name"},{title:" ",key:"value"}]}},computed:{tableData:function(){var e=this.hideSecond?[]:[{name:"秒",value:this.second}];return e=e.concat([{name:"分",value:this.minute},{name:"时",value:this.hour},{name:"日",value:this.day},{name:"月",value:this.month},{name:"周",value:this.week}]),this.hideSecond||this.hideYear?e.concat({name:"表达式",value:this.cronValue_c}):e.concat({name:"年",value:this.year},{name:"表达式",value:this.cronValue_c},{name:"表达式(不含年)",value:this.cronValue_c2})},cronValue_c:function(){var e=[];return this.hideSecond||e.push(this.second?this.second:"*"),e.push(this.minute?this.minute:"*"),e.push(this.hour?this.hour:"*"),e.push(this.day?this.day:"*"),e.push(this.month?this.month:"*"),e.push(this.week?this.week:"?"),this.hideYear||this.hideSecond||e.push(this.year?this.year:"*"),e.join(" ")},cronValue_c2:function(){var e=this.cronValue_c;if(this.hideYear||this.hideSecond)return e;var t=e.split(" ");return t.slice(0,t.length-1).join(" ")}},watch:{cronValue:function(e,t){e!==this.cronValue_c&&this.formatValue()},cronValue_c:function(e,t){this.calTriggerList(),this.$emit("change",e)},exeStartTime:function(e,t){this.calStartTime()},startTime:function(e,t){this.calTriggerList()}},methods:{formatValue:function(){if(this.cronValue){var e=this.cronValue.split(" ").filter(function(e){return!!e});if(e&&!(e.length<=0)){var t=0;this.hideSecond||(this.second=e[t++]),e.length>t&&(this.minute=e[t++]),e.length>t&&(this.hour=e[t++]),e.length>t&&(this.day=e[t++]),e.length>t&&(this.month=e[t++]),e.length>t&&(this.week=e[t++]),e.length>t&&(this.year=e[t])}}},calTriggerList:Object(g["debounce"])(function(){this.calTriggerListInner()},500),calTriggerListInner:function(){var e=this;if(this.remote)this.remote(this.cronValue_c2,+this.startTime,function(t){e.preTimeList=t});else{for(var t=this.cronValue_c2,a="yyyy-MM-dd hh:mm:ss",n={currentDate:f(this.startTime,a)},i=h.a.parseExpression(t,n),s=[],r=0;r<5;r++)s.push(f(new Date(i.next()),a));this.preTimeList=s.length>0?s.join("\n"):"无执行时间"}},calStartTime:function(){if(this.exeStartTime)try{this.startTime=new Date(this.exeStartTime)}catch(e){this.startTime=new Date}else this.startTime=new Date}},components:{SecondUi:s["default"],MinuteUi:r["default"],HourUi:o["default"],DayUi:l["default"],WeekUi:c["default"],MonthUi:u["default"],YearUi:d["default"]},created:function(){var e=this;this.formatValue(),this.calStartTime(),this.$nextTick(function(){e.calTriggerListInner()})}},v=b,y=(a("722ff"),a("2877")),_=Object(y["a"])(v,n,i,!1,null,"686e23aa",null);t["default"]=_.exports},"451d":function(e,t,a){"use strict";var n=a("8599"),i=a.n(n);i.a},4658:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("search-banner",{ref:"routeSearch",attrs:{placeholder:"请输入USERNAME、TAGS",handleList:e.handleList,span:21,searchProps:e.searchProps,page:e.page},on:{"search-change":e.searchChange}},[a("template",{slot:"menu"},[e.permission.service_add||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-plus",size:"small",type:"primary"},on:{click:function(t){return e.handleGrade({})}}},[e._v("新增")]):e._e()],1)],2),a("avue-crud",{attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading,page:e.page},on:{"row-click":e.handleRowClick,"row-save":e.handleSave,"row-del":e.handleDel,"refresh-change":e.handlerefreshChange,"current-change":e.handleCurrentChange,"size-change":e.handleCurrentSize,"search-change":e.handleSearchChange},scopedSlots:e._u([{key:"username",fn:function(t){var n=t.row;return[a("el-link",{attrs:{underline:!1,type:"success"},on:{click:function(t){return e.toDetail(n)}}},[e._v(e._s(n.username))])]}},{key:"tags",fn:function(t){var n=t.row;return[a("item-tags",{attrs:{tags:n.tags,name:"tags",column:"tags",mode:"view"},on:{sendTag:e.bindTags}})]}},{key:"menu",fn:function(t){return[e.permission.service_update||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"primary"},on:{click:function(a){return e.handleGrade(t.row,t.$index)}}},[e._v("编辑")]):e._e(),e.permission.service_delete||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-delete",size:"small",plain:"",type:"danger"},on:{click:function(a){return e.handleDel(t.row,t.$index)}}},[e._v("删除")]):e._e()]}}])}),e.grade.box?a("el-drawer",{attrs:{title:"CONSUMERS",size:"50%",visible:e.grade.box},on:{"update:visible":function(t){return e.$set(e.grade,"box",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("upload-consumer",{attrs:{entity:e.form,mode:e.mode},on:{callback:e.callback}})],1)]):e._e(),e.grade.drawerDetail?a("el-drawer",{attrs:{size:"50%",title:"'"+e.form.username+"' 详情",visible:e.grade.drawerDetail,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){return e.$set(e.grade,"drawerDetail",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",width:"100%",height:"90%"}},[a("upload-consumer",{attrs:{entity:e.form,mode:e.mode},on:{callback:e.callback}})],1)]):e._e()],1)],1)},i=[],s=a("5176"),r=a.n(s),o=a("cebc"),l=a("fef3"),c=a("5880"),u=a("154c"),d=a("848d"),p=a("3ac9"),h=a("ca60"),m={name:"strategy",components:{ItemTags:h["default"],searchBanner:d["default"],uploadConsumer:u["default"]},data:function(){return{tableSearch:{},tableOption:l["c"],searchProps:[{name:"username"},{name:"tags",type:"array"}],tableData:[],tablePage:1,tableSize:10,tableLoading:!1,form:{},page:{total:0,currentPage:1,pageSize:10},grade:{box:!1,drawerDetail:!1},mode:"add"}},computed:Object(o["a"])({},Object(c["mapGetters"])(["permission","isDevProfile","isProdProfile","systemProfile"])),props:{type:{type:String,required:!1}},created:function(){var e=this;-1==this.systemProfile.id?this.$nextTick(function(t){e.$router.push("/wel/index")}):this.initOptions()},methods:{initOptions:function(){this.isDevProfile?this.tableOption["menu"]=!0:this.permission.service_update||(this.tableOption["menu"]=!1)},toDetail:function(e){this.form=e,this.grade.drawerDetail=!0,this.mode="view"},callback:function(e){this.form=e,this.mode="edit",this.reloadDataList()},handlerSyncBox:function(){this.grade.syncBox=!0},handleGrade:function(e,t){this.grade.box=!0,e&&e.id?(this.form=e,this.mode="edit"):(this.form={},this.mode="add")},handleCurrentChange:function(e){this.tablePage=e,this.refreshTableList(!0)},handleCurrentSize:function(e){this.tableSize=e,this.refreshTableList(!1)},handleList:function(e){var t=this;return this.tableLoading=!0,this.grade.box=!1,Object(p["d"])(r()({},e)).then(function(e){var a=e.data;return t.tableLoading=!1,a.data||[]})},refreshTableList:function(e){this.initPage(e),this.$refs.routeSearch.refresh(this.page,e)},initPage:function(e){e||(this.tablePage=1),this.page.currentPage=this.tablePage,this.page.pageSize=this.tableSize},searchChange:function(e){this.tableData=e.data},reloadDataList:function(){this.initPage(!1),this.$refs.routeSearch.loadData()},handleRowClick:function(e,t,a){this.type&&this.$emit("selectionData",e)},handleDel:function(e,t){var a=this,n="";this.isProdProfile&&(n="当前为生产环境,请谨慎操作! "),this.$confirm(n+"是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(p["a"])({id:e.id}).then(function(e){var t=e.data;0!=t.status?a.$errorInfo(t.errmsg):(a.reloadDataList(),a.$successInfo("删除成功"))})}).catch(function(){})}}},f=m,g=a("2877"),b=Object(g["a"])(f,n,i,!1,null,null,null);t["default"]=b.exports},"468b":function(e,t,a){"use strict";a.d(t,"a",function(){return r}),a.d(t,"b",function(){return o}),a.d(t,"c",function(){return l}),a.d(t,"d",function(){return c}),a.d(t,"e",function(){return u}),a.d(t,"f",function(){return d}),a.d(t,"g",function(){return p});var n=a("b5c6"),i=a("074d"),s=i["a"].path+"/kong/api/",r=function(e){return Object(n["a"])({url:s+"plugins",method:"get"})},o=function(e){return Object(n["a"])({url:s+"routes/"+e.route.id+"/plugins",method:"get"})},l=function(e){return Object(n["a"])({url:s+"/services/"+e.service.id+"/plugins",method:"get"})},c=function(e){return Object(n["a"])({url:s+"/plugins/schema/"+e,method:"get"})},u=function(e){return Object(n["a"])({url:s+"/plugins",method:"post",data:e})},d=function(e){return Object(n["a"])({url:s+"/plugins/"+e.id,method:"post",data:e})},p=function(e){return Object(n["a"])({url:s+"/plugins/"+e.id,method:"delete"})}},"46dc":function(e,t,a){},4703:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-divider"),a("span",["add"==e.mode&&e.permission.role_config?a("el-button",{staticClass:"el-icon-refresh",attrs:{type:"primary",size:"small"},on:{click:e.handleGradeUpdate}},[e._v("修改角色权限")]):e._e()],1),a("el-tree",{ref:"menuTree",attrs:{data:e.menuAll,"show-checkbox":"","highlight-current":"",props:e.menuOption,"default-expand-all":"",accordion:"","node-key":"id","default-expanded-keys":[-1]},on:{"check-change":e.handleGradeCheckChange}})],1)},i=[],s=a("cebc"),r=a("5880"),o=a("ca05"),l=a("ef70"),c=a("8d55"),u={name:"menu",data:function(){return{filterText:"",menuAll:[],menuOption:o["c"]}},props:{systemRole:{},mode:{}},created:function(){this.loadAllMenu()},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission"])),methods:{loadAllMenu:function(){var e=this;Object(l["c"])().then(function(t){var a=t.data;return e.menuAll=a.data,{}}).then(function(){Object(c["c"])(e.systemRole).then(function(t){var a=t.data;e.$refs.menuTree.setCheckedKeys(a.data,!1)})})},handleGradeUpdate:function(){var e=this,t=this.$refs.menuTree.getCheckedNodes(),a=this.$refs.menuTree.getHalfCheckedNodes();Object(c["f"])({systemRole:this.systemRole,items:t,halfItems:a}).then(function(t){0!=t.data.status?e.$successInfo(t.data.errmsg):e.$successInfo("更新成功")})}}},d=u,p=a("2877"),h=Object(p["a"])(d,n,i,!1,null,null,null);t["default"]=h.exports},4819:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-divider"),a("avue-form",{ref:"form",attrs:{option:e.formColumns},on:{submit:e.handleEntity},model:{value:e.upholdEntity,callback:function(t){e.upholdEntity=t},expression:"upholdEntity"}},["view"!=e.mode?a("template",{slot:"menuForm"},[a("el-button",{staticClass:"el-icon-check",attrs:{type:"primary"},on:{click:e.handlerSubmit}},[e._v("提 交")])],1):e._e()],2)],1)},i=[],s=(a("ac6a"),a("5176")),r=a.n(s),o=a("ca05"),l=a("e17e"),c=a("ca60"),u={name:"UpholdUser",components:{ItemTags:c["default"]},data:function(){return{formColumns:o["e"],upholdEntity:this.entity}},props:{entity:{type:Object,required:!1},mode:{required:!1}},created:function(){this.initOptions()},methods:{bindTags:function(e){this.upholdEntity=r()(this.upholdEntity,e)},initOptions:function(){var e=this;this.formColumns.column.forEach(function(t){t["disabled"]="view"==e.mode})},handlerSubmit:function(){this.$refs.form.submit()},handleEntity:function(e,t){"edit"==this.mode&&this.handleEntityUpdate(e,t),"add"==this.mode&&this.handleEntitySave(e,t)},handleEntityUpdate:function(e,t){var a=this;Object(l["f"])(this.upholdEntity).then(function(e){var n=e.data;0!=n.status?a.$message.error(n.errmsg):(a.$message.success("修改成功"),a.callback()),t()}).catch(function(e){a.$message.error("更新失败"),t()})},handleEntitySave:function(e,t){var a=this;Object(l["e"])(this.upholdEntity).then(function(e){var n=e.data;0!=n.status?a.$message.error(n.errmsg):(a.$message.success("新增成功"),a.callback()),t()}).catch(function(e){a.$message.error("新增失败,错误信息:"+e),t()})},callback:function(){this.$emit("callback",{})}}},d=u,p=a("2877"),h=Object(p["a"])(d,n,i,!1,null,null,null);t["default"]=h.exports},"48c2":function(e,t,a){"use strict";var n=a("71f9"),i=a.n(n);i.a},"4b3a":function(e,t,a){"use strict";var n=a("e814"),i=a.n(n),s=(a("28a5"),"TYPE_NOT_SET"),r="TYPE_EVERY",o="TYPE_RANGE",l="TYPE_LOOP",c="TYPE_WORK",u="TYPE_LAST",d="TYPE_SPECIFY",p="?";t["a"]={model:{prop:"prop",event:"change"},props:{prop:{type:String,default:p},disabled:{type:Boolean,default:!1}},data:function(){var e=r;return{DEFAULT_VALUE:p,type:e,TYPE_NOT_SET:s,TYPE_EVERY:r,TYPE_RANGE:o,TYPE_LOOP:l,TYPE_WORK:c,TYPE_LAST:u,TYPE_SPECIFY:d,valueRange:{start:0,end:0},valueLoop:{start:0,interval:1},valueWeek:{start:0,end:0},valueList:[],valueWork:1,maxValue:0,minValue:0}},watch:{prop:function(e,t){e!==this.value_c&&this.parseProp(e)}},computed:{value_c:function(){var e=[];switch(this.type){case s:e.push("?");break;case r:e.push("*");break;case o:e.push("".concat(this.valueRange.start,"-").concat(this.valueRange.end));break;case l:e.push("".concat(this.valueLoop.start,"/").concat(this.valueLoop.interval));break;case c:e.push("".concat(this.valueWork,"W"));break;case u:e.push("L");break;case d:e.push(this.valueList.join(","));break;default:e.push(this.DEFAULT_VALUE);break}return e.length>0?e.join(""):this.DEFAULT_VALUE}},methods:{parseProp:function(e){if(e!==this.value_c){"function"===typeof this.preProcessProp&&(e=this.preProcessProp(e));try{if(e&&e!==this.DEFAULT_VALUE)if(e.indexOf("?")>=0)this.type=s;else if(e.indexOf("-")>=0){this.type=o;var t=e.split("-");t.length>=2&&(this.valueRange.start=i()(t[0]),this.valueRange.end=i()(t[1]))}else if(e.indexOf("/")>=0){this.type=l;var a=e.split("/");a.length>=2&&(this.valueLoop.start="*"===e[0]?0:i()(a[0]),this.valueLoop.interval=i()(a[1]))}else if(e.indexOf("W")>=0){this.type=c;var n=e.split("W");n[0]||isNaN(n[0])||(this.valueWork=i()(n[0]))}else if(e.indexOf("L")>=0){this.type=u;var p=e.split("L");this.valueLast=i()(p[0])}else e.indexOf(",")>=0||!isNaN(e)?(this.type=d,this.valueList=e.split(",").map(function(e){return i()(e)})):this.type=r;else this.type=r}catch(h){this.type=r}}}}}},"4d0b":function(e,t,a){"use strict";var n=a("7367"),i=a.n(n);i.a},"4ffa":function(e,t,a){"use strict";var n=a("d9f2"),i=a.n(n);i.a},5311:function(e,t,a){"use strict";var n=a("15c5"),i=a.n(n);i.a},5343:function(e,t,a){"use strict";a.d(t,"a",function(){return s});var n=a("b5c6"),i=a("074d"),s=function(e){return Object(n["a"])({url:i["a"].path+"/operating/logs/",method:"get",params:e})}},"537a":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("avue-crud",{attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading},scopedSlots:e._u([{key:"enabled",fn:function(t){var n=t.row;return[a("el-button",{directives:[{name:"show",rawName:"v-show",value:n.enabled,expression:"row.enabled"}],attrs:{plain:"",size:"mini",type:"success",disabled:""}},[e._v("启用")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:!n.enabled,expression:"!row.enabled"}],attrs:{plain:"",size:"mini",type:"danger",disabled:""}},[e._v("未启用")])]}},{key:"name",fn:function(t){var a=t.row;return[e._v(e._s(a.name))]}},{key:"menu",fn:function(t){return[e.permission.plugin_update?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"primary"},on:{click:function(a){return e.toEditPlugin(t.row,t.$index)}}},[e._v("编辑")]):e._e(),e.permission.plugin_delete?a("el-button",{attrs:{icon:"el-icon-delete",size:"small",plain:"",type:"danger"},on:{click:function(a){return e.handleDel(t.row,t.$index)}}},[e._v("删除")]):e._e()]}}])}),e.grade.drawerDetail?a("el-drawer",{attrs:{size:"45%",title:"'"+e.plugin.name+"' 详情",visible:e.grade.drawerDetail,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){return e.$set(e.grade,"drawerDetail",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"100%"}},[a("pre",[e._v(e._s(e.plugin)+"}")])])]):e._e()],1)},i=[],s=a("cebc"),r=a("fef3"),o=a("5880"),l=a("3dba"),c={name:"plugin",data:function(){return{tableSearch:{},tableOption:r["k"],items:[],tmp_items:[],plugins:[],plugin:{},tableData:[],tablePage:1,tableSize:10,tableLoading:!1,page:{total:0,currentPage:1,pageSize:10},grade:{drawerDetail:!1}}},computed:Object(s["a"])({},Object(o["mapGetters"])(["permission"])),props:{service:{type:String,required:!1},client:{required:!1}},created:function(){this.handleList(),this.initOptions()},methods:{initOptions:function(){},handleList:function(e){var t=this;this.tableLoading=!0,this.client=this.client||{},Object(l["b"])(this.service,this.client).then(function(e){var a=e.data;0!=a.status?t.$errorInfo(a.errmsg):t.tableData=a.data,t.tableLoading=!1})}}},u=c,d=a("2877"),p=Object(d["a"])(u,n,i,!1,null,null,null);t["default"]=p.exports},5640:function(e,t,a){"use strict";a.d(t,"e",function(){return r}),a.d(t,"a",function(){return o}),a.d(t,"b",function(){return l}),a.d(t,"h",function(){return c}),a.d(t,"f",function(){return u}),a.d(t,"c",function(){return d}),a.d(t,"d",function(){return p}),a.d(t,"i",function(){return h}),a.d(t,"g",function(){return m});var n,i=a("bd86"),s=(a("e349"),a("c54a"),a("074d")),r={card:!0,size:"small",emptyBtn:!1,group:[{label:"网关配置",column:[{label:"Kong Admin URL",row:!0,span:24,labelWidth:140,value:"http://localhost:8001/",prop:"url",tip:"请填写kong的管理URL,如:http://localhost:8001/",rules:[{required:!0,message:"请填写URL,如:http://localhost:8001/",trigger:"blur"}]}]},{label:"环境信息",column:[{label:"名称",prop:"name",span:24,labelWidth:140,width:150,rules:[{required:!0,message:"请填写名称",trigger:"blur"}]},{label:"环境编码",prop:"profileCode",span:24,labelWidth:140,width:150,rules:[{required:!0,message:"请填写环境编码",trigger:"blur"}]},{label:"所属环境",prop:"env",span:24,labelWidth:140,width:150,disabled:!0},{label:"部署类型",prop:"deployType",span:24,labelWidth:140,width:150,disabled:!0},{label:"简称",prop:"ab",span:24,labelWidth:140,width:150,disabled:!0}]}]},o={column:[{label:"名称",prop:"name",span:24,labelWidth:140,width:150,rules:[{required:!0,message:"请填写名称",trigger:"blur"}]},{label:"Kong Admin URL",row:!0,span:24,labelWidth:140,prop:"url",tip:"请填写kong的管理URL,如:http://localhost:8001/",rules:[{required:!0,message:"请填写URL,如:http://localhost:8001/",trigger:"blur"}]},{label:"所属环境",labelWidth:140,prop:"profile",type:"select",group:!0,dicUrl:s["a"].path+"/system/envs/"}]},l=(n={maxHeight:600,labelWidth:120,simplePage:!0,index:!0,border:!0,menuBtn:!0,addBtn:!1},Object(i["a"])(n,"simplePage",!0),Object(i["a"])(n,"delBtn",!1),Object(i["a"])(n,"editBtn",!1),Object(i["a"])(n,"refreshBtn",!1),Object(i["a"])(n,"columnBtn",!1),Object(i["a"])(n,"menuAlign","center"),Object(i["a"])(n,"align","center"),Object(i["a"])(n,"searchSize","mini"),Object(i["a"])(n,"column",[{label:"是否激活",prop:"id",slot:!0,width:80},{label:"名称",prop:"name",sortable:!0,width:150},{label:"URL",prop:"url"},{label:"PROFILE",prop:"profile",type:"select",group:!0,dicUrl:s["a"].path+"/system/envs/"},{label:"创建日期",prop:"create_at",width:"180",sortable:!0,type:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return t}}]),n),c={maxHeight:900,expand:!0,labelWidth:120,index:!0,border:!0,menuBtn:!0,addBtn:!1,delBtn:!1,editBtn:!1,refreshBtn:!1,columnBtn:!1,menuAlign:"center",align:"center",searchSize:"mini",menu:!1,column:[{label:"源环境",prop:"src_client",slot:!0,width:"280"},{label:"目标环境",prop:"clients",overHidden:!0,slot:!0},{label:"数据类型",prop:"dataType"},{label:"同步策略",prop:"policy"},{label:"同步时间",prop:"create_at",width:"180",sortable:!0,type:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return t}},{label:"同步状态",prop:"status"},{label:"备注",span:24,labelWidth:140,overHidden:!0,type:"textarea",prop:"comment"},{label:"操作人",prop:"creator",width:100}]},u={maxHeight:600,labelWidth:120,menuBtn:!0,addBtn:!1,delBtn:!1,viewBtn:!0,editBtn:!1,menuAlign:"center",align:"center",menu:!1,columnBtn:!1,refreshBtn:!1,column:[{label:"同步时间",prop:"create_at",width:"160",sortable:!0,type:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return t}},{label:"同步消息",prop:"comment",align:"left",width:400}]},d={column:[{label:"KEY",prop:"configKey",span:24,labelWidth:140,width:150,rules:[{required:!0,message:"请填写key",trigger:"blur"}]},{label:"VALUE",row:!0,span:24,labelWidth:140,type:"textarea",prop:"configValue",rules:[{required:!0,message:"请填写key值",trigger:"blur"}]},{label:"参数类型",row:!0,span:24,labelWidth:140,type:"select",prop:"configType",dicUrl:s["a"].path+"/system/envs/configTypes",rules:[{required:!0,message:"请选择参数类型",trigger:"blur"}]},{label:"备注",span:24,labelWidth:140,type:"textarea",prop:"comment"}]},p={maxHeight:600,expand:!0,labelWidth:120,simplePage:!0,index:!0,border:!0,menuBtn:!0,addBtn:!1,delBtn:!1,editBtn:!1,menuAlign:"center",align:"center",searchSize:"mini",column:[{label:"KEY",prop:"configKey",align:"left",width:240},{label:"VALUE",prop:"configValue",overHidden:!0},{label:"备注",width:240,prop:"comment"},{label:"创建日期",prop:"create_at",width:"180",sortable:!0,type:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return t}}]},h={card:!0,group:[{icon:"el-icon-info",label:"同步配置信息",column:[{label:"源环境",type:"select",labelWidth:150,span:24,formslot:!0,prop:"src_client"},{label:"目标环境",prop:"clients",labelWidth:150,formslot:!0},{label:"待同步的服务列表",prop:"services",span:24,labelWidth:150,formslot:!0}]},{label:"同步信息",column:[]}]},m={maxHeight:600,labelWidth:120,index:!0,border:!0,menuBtn:!1,addBtn:!1,delBtn:!1,editBtn:!1,menu:!1,simplePage:!0,refreshBtn:!1,columnBtn:!1,menuAlign:"center",align:"center",searchSize:"mini",column:[{label:"操作时间",prop:"create_at",width:"180",sortable:!0,type:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return t}},{label:"操作者",prop:"creator",width:100},{label:"操作记录",prop:"remark",align:"left"},{label:"操作环境",prop:"profile",width:100},{label:"执行操作",prop:"operation",width:150,type:"select",dicData:[{label:"登录",value:"login"},{label:"登出",value:"logout"},{label:"同步",value:"sync"},{label:"新增",value:"add"},{label:"修改",value:"update"},{label:"删除",value:"delete"},{label:"执行降级",value:"demote_config"},{label:"降级回滚",value:"rollback_config"},{label:"Arthas调试",value:"arthas_attach"},{label:"启动",value:"job_startup"},{label:"暂停",value:"job_pause"}]},{label:"操作对象",prop:"target",width:150,dicData:[{label:"全局插件",value:"global_plugin"},{label:"路由插件",value:"route_plugin"},{label:"服务插件",value:"service_plugin"},{label:"路由",value:"route"},{label:"服务",value:"service"},{label:"上游服务",value:"upstream"},{label:"上游代理",value:"targets"},{label:"系统",value:"system"},{label:"作业",value:"monitor_job"},{label:"作业任务",value:"monitor_job_task"},{label:"网关服务",value:"sync_service"},{label:"系统参数",value:"server_config"},{label:"系统环境",value:"system_profile"},{label:"降级参数",value:"demote_app_params"},{label:"热配参数",value:"sync_app_params"},{label:"服务进程",value:"service_progress"}]}]}},"575d":function(e,t,a){"use strict";var n=a("9fc0"),i=a.n(n);i.a},"577f":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"margin-left":"15px"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[a("strong",[e._v(e._s(e.dateStr))])]),e.nextLogTag?a("el-button",{staticStyle:{float:"right",padding:"6px 10px"},attrs:{type:"text"},on:{click:function(t){return e.nextOrpre(e.nextLogTag)}}},[e._v("下一天")]):e._e(),e.preLogTag?a("el-button",{staticStyle:{float:"right",padding:"6px 10px"},attrs:{type:"primary"},on:{click:function(t){return e.nextOrpre(e.preLogTag)}}},[e._v("上一天")]):e._e(),e.nextLogTag||e.preLogTag?a("el-button",{staticStyle:{float:"right",padding:"6px 10px"},attrs:{type:"text"},on:{click:function(t){return e.reset(e.nextLogTag||e.preLogTag)}}},[e._v("返回")]):e._e()],1),a("el-divider"),e.listView?e._e():a("el-timeline",e._l(e.logData,function(t,n){return a("el-timeline-item",{key:n,attrs:{placement:"top",size:0==n?"large":"normal",color:(t.status,"#0bbd87")}},[a("el-card",{staticStyle:{cursor:"pointer"},attrs:{shadow:"hover"}},[a("el-popover",{attrs:{placement:"top-start",title:"日志内容",width:"600",trigger:"click",effect:"dark"}},[a("div",{staticStyle:{"overflow-y":"auto",height:"90%"}},[a("json-viewer",{attrs:{value:JSON.parse(t.content),"expand-depth":5,copyable:"",sort:""}})],1),a("div",{attrs:{slot:"reference"},slot:"reference"},[e._v(e._s(e._f("parseTime")(t.create_at,"{h}:{i}:{s}"))+"- "+e._s(t.remark))])])],1)],1)}),1),e.listView?a("avue-crud",{staticStyle:{cursor:"pointer"},attrs:{option:e.operationLogOption,data:e.logData,"table-loading":e.tableLoading,page:e.page},on:{"current-change":e.handleCurrentChange,"row-click":e.handleRowClick,"size-change":e.handleCurrentSize,"search-change":e.handleSearchChange},model:{value:e.objData,callback:function(t){e.objData=t},expression:"objData"}}):e._e(),e.drawerDetail?a("el-drawer",{attrs:{size:"35%",title:"操作对象内容",visible:e.drawerDetail,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){e.drawerDetail=t}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("json-viewer",{attrs:{value:JSON.parse(e.currentLog.content),"expand-depth":1,copyable:"",sort:""}})],1)]):e._e()],1)},i=[],s=a("5640"),r=a("5343"),o={data:function(){return{operationLogOption:s["g"],dateStr:"",preLogTag:null,nextLogTag:null,logData:[],currentLog:{content:"{}"},drawerDetail:!1,currentLogTag:null}},props:{logTag:{type:Object,required:!0},keyword:{required:!0},listView:{required:!0}},created:function(){this.findSyncLog()},watch:{logTag:function(e){this.findSyncLog()},keyword:function(e){this.findSyncLog()}},methods:{handleRowClick:function(e){this.currentLog=e,this.drawerDetail=!0},findSyncLog:function(){this.nextOrpre(this.logTag)},reset:function(e){e.value=e.begin,this.nextOrpre(e)},nextOrpre:function(e){var t=this;e["keyword"]=this.keyword,Object(r["a"])(e).then(function(e){var a=e.data.data;t.dateStr=a.dateStr,t.preLogTag=a.logTags.pre,t.nextLogTag=a.logTags.next,t.logData=a.logs,t.currentLogTag=a.logParams})}}},l=o,c=(a("b377"),a("2877")),u=Object(c["a"])(l,n,i,!1,null,null,null);t["default"]=u.exports},5791:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("avue-form",{ref:"form",attrs:{option:e.options},on:{submit:e.handleUpholdEntity},model:{value:e.systemFunction,callback:function(t){e.systemFunction=t},expression:"systemFunction"}},[a("template",{slot:"visitView"},[a("el-form-item",[a("el-input",{attrs:{placeholder:"例如:views/admin/user/index"},model:{value:e.systemFunction.visitView,callback:function(t){e.$set(e.systemFunction,"visitView",t)},expression:"systemFunction.visitView"}})],1)],1),a("template",{slot:"useYn"},[a("el-form-item",[a("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#ff4949",value:"systemFunction.useYn","active-value":"y","inactive-value":"n"},model:{value:e.systemFunction.useYn,callback:function(t){e.$set(e.systemFunction,"useYn",t)},expression:"systemFunction.useYn"}})],1)],1),a("template",{slot:"sortOrder"},[a("el-form-item",[a("el-input-number",{attrs:{min:1},model:{value:e.systemFunction.sortOrder,callback:function(t){e.$set(e.systemFunction,"sortOrder",t)},expression:"systemFunction.sortOrder"}})],1)],1),"view"!=e.mode?a("template",{slot:"menuForm"},[e.permission.menu_update?a("el-button",{staticClass:"el-icon-check",attrs:{type:"primary"},on:{click:e.handlerSubmit}},[e._v("提 交")]):e._e()],1):e._e()],2)],1)},i=[],s=(a("ac6a"),a("cebc")),r=a("5880"),o=a("ca05"),l=a("ef70"),c={name:"Route",data:function(){return{formColumns:o["a"],parentId:"-1",childMenuBox:!1}},props:{systemFunction:{type:Object,required:!1},mode:{required:!1},options:{}},created:function(){this.initOptions()},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission"])),methods:{initOptions:function(){var e=this;this.options.column.forEach(function(t){t["disabled"]="view"==e.mode})},toAddChildMenu:function(e){this.parentId=e,this.mode="add",this.childMenuBox=!0},handlerSubmit:function(){this.$refs.form.submit()},handleUpholdEntity:function(e,t){"edit"==this.mode&&this.handleUpholdEntityUpdate(e,t),"add"==this.mode&&this.handleUpholdEntitySave(e,t)},handleUpholdEntityUpdate:function(e,t){var a=this;Object(l["d"])(this.systemFunction).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.$successInfo("修改成功"),a.callback()),t()}).catch(function(e){a.$errorInfo("更新失败"),t()})},handleUpholdEntitySave:function(e,t){var a=this;Object(l["a"])(this.systemFunction).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.$successInfo("新增成功"),a.callback()),t()}).catch(function(e){a.$errorInfo("新增失败,错误信息:"+e),t()})},callback:function(){this.$emit("callback",{})}}},u=c,d=a("2877"),p=Object(d["a"])(u,n,i,!1,null,null,null);t["default"]=p.exports},"5c8e":function(e,t,a){},6229:function(e,t,a){"use strict";var n=a("7dd5"),i=a.n(n);i.a},6383:function(e,t,a){},"63d8":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("basic-container",[a("el-row",{staticStyle:{"margin-top":"0px"}},[a("el-col",{attrs:{span:"10"}},[e._l(e.logTags,function(t){return a("el-tag",{key:t,staticStyle:{"margin-left":"7px","margin-bottom":"5px",cursor:"pointer"},attrs:{type:t.type,effect:"dark"},on:{click:function(a){return e.changeTag(t)}}},[e._v(e._s(t.name))])}),a("el-popover",{attrs:{placement:"bottom-start"}},[a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":e.pickerOptions},model:{value:e.daterange,callback:function(t){e.daterange=t},expression:"daterange"}}),a("el-tag",{staticStyle:{"margin-left":"7px","margin-bottom":"5px",cursor:"pointer"},attrs:{slot:"reference",effect:"dark",type:e.autoLogTag.type},slot:"reference"},[e._v(e._s(e.autoLogTag.name))])],1)],2),a("el-col",{attrs:{span:"13"}},[a("el-input",{attrs:{"prefix-icon":"el-icon-search",placeholder:"请输入姓名或其它关键词"},on:{input:e.filterServiceData},model:{value:e.searchForm,callback:function(t){e.searchForm=t},expression:"searchForm"}})],1),a("el-col",{attrs:{span:"1"}},[e.listView?e._e():a("i",{staticClass:"el-icon-s-grid",staticStyle:{"margin-left":"12px","margin-top":"10px","font-size":"25px",cursor:"pointer"},attrs:{title:"视图切换"},on:{click:function(t){return e.changeView()}}}),e.listView?a("i",{staticClass:"el-icon-s-grid",staticStyle:{"margin-left":"12px","margin-top":"10px","font-size":"25px",cursor:"pointer",color:"green"},attrs:{title:"视图切换"},on:{click:function(t){return e.changeView()}}}):e._e()])],1),a("log",{ref:"logViewer",attrs:{logTag:e.logTag,listView:e.listView,keyword:e.searchForm}})],1)},i=[],s=(a("ac6a"),a("e814")),r=a.n(s),o=(a("5343"),a("577f")),l={components:{log:o["default"]},data:function(){var e=this;return{logData:[],searchForm:null,daterange:null,logTag:{name:"今 天",value:0,label:"today",type:"success"},autoLogTag:{name:"自定义",value:0,label:"auto",type:"info"},logTags:[{name:"所 有",value:0,label:"all",type:"info"},{name:"今 天",value:0,label:"today",type:"success"},{name:"昨 天",value:1,label:"yesterday",type:"info"},{name:"近7天",value:0,label:"recent7",type:"info"},{name:"上 周",value:0,label:"preweek",type:"info"},{name:"本 周",value:0,label:"thisweek",type:"info"},{name:"上 月",value:0,label:"premonth",type:"info"},{name:"本 月",value:0,label:"thismonth",type:"info"}],listView:!0,pickerOptions:{onPick:function(t){if(t.minDate&&t.maxDate){e.logTag=null,e.autoLogTag.type="success";var a=new Date;e.autoLogTag.value=e.getDaysBetween(t.maxDate,a),e.autoLogTag.value<0&&(e.autoLogTag.value=e.autoLogTag.value-1),e.autoLogTag.begin=e.autoLogTag.value,e.autoLogTag.end=e.getDaysBetween(t.minDate,a),e.autoLogTag.end>=0&&(e.autoLogTag.end=e.getDaysBetween(t.minDate,a)+1),e.changeTag(e.autoLogTag),e.$refs.logViewer.nextOrpre(e.autoLogTag)}}}}},created:function(){},methods:{getDaysBetween:function(e,t){var a=Date.parse(e),n=Date.parse(t),i=r()((n-a)/864e5);return i},changeView:function(){this.listView=!this.listView},changeTag:function(e){this.logTag=e,"auto"!==e.label&&(this.autoLogTag.type="info"),this.logTags.forEach(function(t){t.label==e.label?t.type="success":t.type="info"})}}},c=l,u=a("2877"),d=Object(u["a"])(c,n,i,!1,null,null,null);t["default"]=d.exports},"68c6":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"config-list"},[a("el-radio-group",{model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_EVERY",disabled:e.disabled}},[e._v("每月")])],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_RANGE",disabled:e.disabled}},[e._v("区间")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.start,callback:function(t){e.$set(e.valueRange,"start",t)},expression:"valueRange.start"}}),e._v("月\n 至\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.end,callback:function(t){e.$set(e.valueRange,"end",t)},expression:"valueRange.end"}}),e._v("月\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_LOOP",disabled:e.disabled}},[e._v("循环")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.start,callback:function(t){e.$set(e.valueLoop,"start",t)},expression:"valueLoop.start"}}),e._v("月开始,间隔\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.interval,callback:function(t){e.$set(e.valueLoop,"interval",t)},expression:"valueLoop.interval"}}),e._v("月\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_SPECIFY",disabled:e.disabled}},[e._v("指定")]),a("div",{staticClass:"list"},[a("el-checkbox-group",{model:{value:e.valueList,callback:function(t){e.valueList=t},expression:"valueList"}},e._l(e.maxValue,function(t){return a("el-checkbox",{key:"key-"+t,staticClass:"list-check-item",attrs:{label:t,disabled:e.type!=e.TYPE_SPECIFY||e.disabled}})}),1)],1)],1)])],1)},i=[],s=a("4b3a"),r={name:"month",mixins:[s["a"]],data:function(){return{}},watch:{value_c:function(e,t){this.$emit("change",e)}},created:function(){this.DEFAULT_VALUE="*",this.minValue=1,this.maxValue=12,this.valueRange.start=1,this.valueRange.end=12,this.valueLoop.start=1,this.valueLoop.interval=1,this.parseProp(this.prop)}},o=r,l=(a("cce4"),a("2877")),c=Object(l["a"])(o,n,i,!1,null,"5d6a7505",null);t["default"]=c.exports},"68c7":function(e,t,a){"use strict";var n=a("e527"),i=a.n(n);i.a},"692e":function(e,t,a){var n={"./App.vue":"3dfd","./components/InnerBreadcrumb.vue":"82c1","./components/ItemTags.vue":"ca60","./components/basic-container/main.vue":"dc8a","./components/easy-cron/index.vue":"4451","./components/easy-cron/input-cron.vue":"b5d7","./components/easy-cron/tabs/day.vue":"84bc","./components/easy-cron/tabs/hour.vue":"9fee","./components/easy-cron/tabs/minute.vue":"f6e9","./components/easy-cron/tabs/month.vue":"68c6","./components/easy-cron/tabs/second.vue":"109b","./components/easy-cron/tabs/week.vue":"b355","./components/easy-cron/tabs/year.vue":"7141","./components/error-page/403.vue":"a8d0","./components/error-page/404.vue":"a5fa","./components/error-page/500.vue":"611b","./components/iframe/main.vue":"c1a1","./components/searchBanner.vue":"848d","./page/client-info.vue":"442f","./page/inHome.vue":"405d","./page/index/index.vue":"9cc4","./page/index/layout.vue":"9277","./page/index/logo.vue":"7d3a","./page/index/sidebar/index.vue":"20bf","./page/index/sidebar/sidebarItem.vue":"7505","./page/index/tags.vue":"5ddc","./page/index/top/index.vue":"195f","./page/index/top/top-breadcrumb.vue":"4cd2","./page/index/top/top-color.vue":"44b2","./page/index/top/top-lock.vue":"14cd","./page/index/top/top-logs.vue":"0f22","./page/index/top/top-menu.vue":"286c","./page/index/top/top-msg.vue":"709a","./page/index/top/top-search.vue":"9812","./page/index/top/top-setting.vue":"bd51","./page/index/top/top-theme.vue":"107f","./page/index/top/transfer-client.vue":"c60b","./page/lock/index.vue":"15c5e","./page/login/index.vue":"5596","./page/login/userlogin.vue":"7c05","./page/logs/error.vue":"7cc5","./page/logs/index.vue":"08ae","./page/logs/page.vue":"3eb2","./page/wel.vue":"696f","./views/admin/menu/index.vue":"97a1","./views/admin/menu/upholdChildMenu.vue":"5791","./views/admin/menu/upholdMenu.vue":"78ad","./views/admin/role/index.vue":"a5f6","./views/admin/role/upholdRole.vue":"4703","./views/admin/user/index.vue":"e378","./views/admin/user/settingUserGroup.vue":"2fa5","./views/admin/user/upholdUser.vue":"4819","./views/admin/usergroup/index.vue":"0c22","./views/admin/usergroup/queryEnv.vue":"f777","./views/admin/usergroup/settingGroup.vue":"1686","./views/admin/usergroup/settingRole.vue":"f1e7","./views/admin/usergroup/settingUser.vue":"e59a","./views/gateway/consumer/index.vue":"4658","./views/gateway/consumer/upload-consumer.vue":"154c","./views/gateway/log/index.vue":"8899","./views/gateway/plugin/index.vue":"aab4","./views/gateway/plugin/listPlugin.vue":"7e8d","./views/gateway/plugin/queryPlugins.vue":"3aa7","./views/gateway/plugin/upholdPlugins.vue":"ecc3","./views/gateway/routing/index.vue":"c541","./views/gateway/routing/queryRoutes.vue":"8b12","./views/gateway/routing/updateHosts.vue":"2e8b","./views/gateway/routing/upholdRoute.vue":"e8cd","./views/gateway/routing/viewRoute.vue":"f9fd","./views/gateway/service/index.vue":"a633","./views/gateway/service/servicePlugins.vue":"537a","./views/gateway/service/syncDiff.vue":"2775","./views/gateway/service/syncService.vue":"fe19","./views/gateway/service/uploadService.vue":"2bdd","./views/gateway/shell/index.vue":"2fc5","./views/gateway/upstream/healthCheck.vue":"ba9e","./views/gateway/upstream/index.vue":"27a8","./views/gateway/upstream/targets.vue":"04c3","./views/gateway/upstream/upholdTargets.vue":"f337","./views/gateway/upstream/upholdUpstream.vue":"08bb","./views/info/index.vue":"e37e","./views/info/message.vue":"3086","./views/operating/developers/index.vue":"3716","./views/operating/env/index.vue":"8b5b","./views/operating/env/upholdEnv.vue":"2256","./views/operating/log/index.vue":"63d8","./views/operating/log/log.vue":"577f","./views/operating/synclog/index.vue":"0e36","./views/operating/synclog/listConfigs.vue":"2d86","./views/operating/synclog/logDetail.vue":"ca50","./views/operating/synclog/syncLogs.vue":"88e6","./views/operating/system/index.vue":"0fee"};function i(e){var t=s(e);return a(t)}function s(e){var t=n[e];if(!(t+1)){var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}return t}i.keys=function(){return Object.keys(n)},i.resolve=s,e.exports=i,i.id="692e"},"696f":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.kongClient&&-1!=e.kongClient.id?a("in-home"):a("client-info")],1)},i=[],s=a("cebc"),r=(a("af62"),a("5880")),o={name:"wel",components:{InHome:function(){return a.e("chunk-36d68c6a").then(a.bind(null,"405d"))},clientInfo:function(){return a.e("chunk-569fe953").then(a.bind(null,"442f"))}},data:function(){return{}},computed:Object(s["a"])({},Object(r["mapGetters"])(["userInfo","kongClient"])),created:function(){this.findActiveKongclient()},methods:{findActiveKongclient:function(){this.$store.dispatch("FindActiveClient",this.userInfo).then(function(e){})}}},l=o,c=a("2877"),u=Object(c["a"])(l,n,i,!1,null,null,null);t["default"]=u.exports},"6aa8":function(e,t,a){},"6b6b":function(e,t,a){},"6bae":function(e,t,a){"use strict";var n=a("240c"),i=a.n(n);i.a},"6d94":function(e,t,a){},7141:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"config-list"},[a("el-radio-group",{model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_EVERY",disabled:e.disabled}},[e._v("每年")])],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_RANGE",disabled:e.disabled}},[e._v("区间")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,min:0,precision:0},model:{value:e.valueRange.start,callback:function(t){e.$set(e.valueRange,"start",t)},expression:"valueRange.start"}}),e._v("年\n 至\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,min:1,precision:0},model:{value:e.valueRange.end,callback:function(t){e.$set(e.valueRange,"end",t)},expression:"valueRange.end"}}),e._v("年\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_LOOP",disabled:e.disabled}},[e._v("循环")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,min:0,precision:0},model:{value:e.valueLoop.start,callback:function(t){e.$set(e.valueLoop,"start",t)},expression:"valueLoop.start"}}),e._v("年开始,间隔\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,min:1,precision:0},model:{value:e.valueLoop.interval,callback:function(t){e.$set(e.valueLoop,"interval",t)},expression:"valueLoop.interval"}}),e._v("年\n ")],1)])],1)},i=[],s=a("4b3a"),r={name:"year",mixins:[s["a"]],data:function(){return{}},watch:{value_c:function(e,t){this.$emit("change",e)}},created:function(){var e=(new Date).getFullYear();this.DEFAULT_VALUE="*",this.minValue=0,this.maxValue=0,this.valueRange.start=e,this.valueRange.end=e+100,this.valueLoop.start=e,this.valueLoop.interval=1,this.parseProp(this.prop)}},o=r,l=(a("8a0f"),a("2877")),c=Object(l["a"])(o,n,i,!1,null,"411de867",null);t["default"]=c.exports},"71f9":function(e,t,a){},"722ff":function(e,t,a){"use strict";var n=a("8ab6"),i=a.n(n);i.a},7367:function(e,t,a){},"73dc":function(e,t,a){"use strict";var n=a("dfc5"),i=a.n(n);i.a},"78ad":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-row",{staticStyle:{"margin-bottom":"5px","margin-left":"25px","margin-right":"5px"}},[a("el-col",{attrs:{span:"12"}},[a("el-button-group",[e.permission.menu_add?a("el-button",{attrs:{size:"small",icon:"el-icon-plus",type:"primary"},on:{click:function(t){return e.toAddChildMenu(-1,"新建一级菜单","menu")}}},[e._v("新建一级菜单")]):e._e(),e.systemFunction.id&&"menu"==e.systemFunction.menuType&&e.permission.menu_add?a("el-button",{attrs:{size:"small",icon:"el-icon-plus",type:"primary"},on:{click:function(t){return e.toAddChildMenu(e.systemFunction.id,"新建'"+e.systemFunction.name+"'子菜单","menu")}}},[e._v("新建子菜单")]):e._e(),e.systemFunction.id&&"menu"==e.systemFunction.menuType&&e.permission.menu_add?a("el-button",{attrs:{size:"small",icon:"el-icon-plus",type:"success"},on:{click:function(t){return e.toAddChildMenu(e.systemFunction.id,"新建'"+e.systemFunction.name+"'功能点","point")}}},[e._v("新建功能点")]):e._e()],1)],1)],1),a("avue-form",{ref:"form",attrs:{option:e.formColumns},on:{submit:e.handleUpholdEntity},model:{value:e.systemFunction,callback:function(t){e.systemFunction=t},expression:"systemFunction"}},[a("template",{slot:"visitView"},[a("el-form-item",[a("el-input",{attrs:{placeholder:"例如:views/admin/user/index"},model:{value:e.systemFunction.visitView,callback:function(t){e.$set(e.systemFunction,"visitView",t)},expression:"systemFunction.visitView"}})],1)],1),a("template",{slot:"useYn"},[a("el-form-item",[a("el-switch",{attrs:{disabled:e.formGrade,"active-color":"#13ce66","inactive-color":"#ff4949",value:"systemFunction.useYn","active-value":"y","inactive-value":"n"},model:{value:e.systemFunction.useYn,callback:function(t){e.$set(e.systemFunction,"useYn",t)},expression:"systemFunction.useYn"}})],1)],1),a("template",{slot:"sortOrder"},[a("el-form-item",[a("el-input-number",{attrs:{min:1,disabled:e.formGrade},model:{value:e.systemFunction.sortOrder,callback:function(t){e.$set(e.systemFunction,"sortOrder",t)},expression:"systemFunction.sortOrder"}})],1)],1),"view"!=e.mode?a("template",{slot:"menuForm"},[e.permission.menu_update?a("el-button",{staticClass:"el-icon-check",attrs:{type:"primary"},on:{click:e.handlerSubmit}},[e._v("保 存")]):e._e()],1):e._e()],2),e.childMenuBox?a("el-drawer",{attrs:{title:e.tipTitle,size:"50%",visible:e.childMenuBox},on:{"update:visible":function(t){e.childMenuBox=t}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("uphold-child-menu",{attrs:{systemFunction:{parentId:e.parentId,useYn:"y",sortOrder:999,menuType:e.menuType},mode:"add",options:e.childOptions},on:{callback:e.callback}})],1)]):e._e()],1)},i=[],s=(a("ac6a"),a("cebc")),r=a("5880"),o=a("ca05"),l=a("ef70"),c=a("5791"),u={name:"Route",components:{upholdChildMenu:c["default"]},data:function(){return{formColumns:o["a"],childOptions:o["a"],tipTitle:"新建子菜单",parentId:"-1",menuType:"menu",childMenuBox:!1}},props:{systemFunction:{type:Object,required:!1},mode:{required:!1}},created:function(){this.initOptions()},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission"])),methods:{initOptions:function(){var e=this;this.formColumns.column.forEach(function(t){t["disabled"]="view"==e.mode})},toAddChildMenu:function(e,t,a){this.parentId=e,this.mode="add",this.menuType=a,this.childOptions="menu"==this.menuType?o["a"]:o["b"],this.tipTitle=t,this.childMenuBox=!0},handlerSubmit:function(){this.$refs.form.submit()},handleUpholdEntity:function(e,t){"edit"==this.mode&&this.handleUpholdEntityUpdate(e,t),"add"==this.mode&&this.handleUpholdEntitySave(e,t)},handleUpholdEntityUpdate:function(e,t){var a=this;Object(l["d"])(this.systemFunction).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.$successInfo("修改成功"),a.callback()),t()}).catch(function(e){a.$errorInfo("更新失败"),t()})},handleUpholdEntitySave:function(e,t){var a=this;Object(l["a"])(this.systemFunction).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.$successInfo("新增成功"),a.callback()),t()}).catch(function(e){a.$errorInfo("新增失败,错误信息:"+e),t()})},callback:function(){this.childMenuBox=!1,this.$emit("callback",{})}}},d=u,p=a("2877"),h=Object(p["a"])(d,n,i,!1,null,null,null);t["default"]=h.exports},"78ba":function(e,t,a){"use strict";a.d(t,"a",function(){return s}),a.d(t,"b",function(){return r}),a.d(t,"d",function(){return o}),a.d(t,"c",function(){return l});var n=a("b5c6"),i=a("074d"),s=function(e){return Object(n["a"])({url:i["a"].path+"/kong/sync/configs/",method:"get",params:e})},r=function(e){return Object(n["a"])({url:i["a"].path+"/kong/sync/configs/"+e+"/logs",method:"get"})},o=function(e){return Object(n["a"])({url:i["a"].path+"/kong/sync/configs/"+e+"/config",method:"get"})},l=function(e){return Object(n["a"])({url:i["a"].path+"/kong/sync/configs/logs",method:"get",params:e})}},"7b08":function(e,t,a){},"7cc5":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("basic-container",[a("p",[e._v("请打开浏览器控制台,然后点击下面的按钮")]),a("el-button",{attrs:{type:"danger"},on:{click:e.handleNewError}},[e._v("触发一个错误")])],1)},s=[],r={methods:{handleNewError:function(){console.log(a)}}},o=r,l=n("2877"),c=Object(l["a"])(o,i,s,!1,null,null,null);t["default"]=c.exports},"7dd5":function(e,t,a){},"7e8d":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-tabs",{attrs:{type:"border-card","tab-position":e.tabPosition}},e._l(e.pluginGroupOption.column,function(t){return a("el-tab-pane",{key:t.label,attrs:{lazy:"",label:t.label}},[a("avue-card",{attrs:{option:e.cardoption,data:t.option.column},on:{"row-click":e.tip,"row-add":e.tip},scopedSlots:e._u([{key:"menu",fn:function(t){return[a("span",{attrs:{type:"primary"},on:{click:function(a){return e.toAddPlugin(t.row.name)}}},[e._v("新增插件")])]}}],null,!0)})],1)}),1),a("el-dialog",{attrs:{title:"新增插件",width:"70%",visible:e.grade.pluginBox,"append-to-body":""},on:{"update:visible":function(t){return e.$set(e.grade,"pluginBox",t)}}},[e.grade.pluginBox?a("uphold-plugins",{key:e.plugin.name,attrs:{plugin:e.plugin,fields:e.fields,edit:"add"},on:{callback:e.callback}}):e._e()],1)],1)},i=[],s=(a("7f7f"),a("ac6a"),a("cebc")),r=a("5880"),o=a("468b"),l={column:[{label:"鉴权认证",description:"Protect your services with an authentication layer",icon:"mdi-account-outline",hasConsumerPlugins:!1,option:{column:[{name:"basic-auth",description:"Add Basic Authentication to your APIs",img:"/img/plugins/basic-auth.png"},{name:"key-auth",description:"Add a key authentication to your APIs",img:"/img/plugins/key-auth.png"},{name:"oauth2",description:"Add an OAuth 2.0 authentication to your APIs",img:"/img/plugins/oauth2.png"},{name:"hmac-auth",description:"Add HMAC Authentication to your APIs",img:"/img/plugins/hmac-auth.png"},{name:"jwt",description:"Verify and authenticate JSON Web Tokens",img:"/img/plugins/jwt.png"},{name:"ldap-auth",description:"Integrate Kong with a LDAP server",img:"/img/plugins/ldap-auth.png"}]}},{label:"访问安全",icon:"mdi-security",hasConsumerPlugins:!0,description:"Protect your services with additional security layers",option:{column:[{name:"acl",hideIfNotInConsumerContext:!0,description:"Control which consumers can access APIs",img:"/img/plugins/acl.png"},{name:"cors",hideIfNotInConsumerContext:!0,description:"Allow developers to make requests from the browser",img:"/img/plugins/cors.png"},{name:"ip-restriction",description:"Whitelist or blacklist IPs that can make requests",img:"/img/plugins/ip-restriction.png"},{name:"bot-detection",hideIfNotInConsumerContext:!0,description:"Detects and blocks bots or custom clients",img:"/img/plugins/bot-detection.png"}]}},{label:"请求控制",icon:"mdi-traffic-light",hasConsumerPlugins:!0,description:"Manage, throttle and restrict inbound and outbound API traffic",option:{column:[{name:"rate-limiting",description:"Rate-limit how many HTTP requests a developer can make",img:"/img/plugins/rate-limiting.png"},{name:"response-ratelimiting",description:"Rate-Limiting based on a custom response header value",img:"/img/plugins/response-ratelimiting.png"},{name:"request-size-limiting",description:"Block requests with bodies greater than a specific size",img:"/img/plugins/request-size-limiting.png"},{name:"request-termination",description:"This plugin terminates incoming requests with a specified status code and message. This allows to (temporarily) block an API or Consumer.",img:"/img/plugins/request-termination.png"}]}},{label:"Serverless",description:"Invoke serverless functions in combination with other plugins:",icon:"mdi-cloud-sync",hasConsumerPlugins:!0,option:{column:[{name:"aws-lambda",description:"Invoke an AWS Lambda function from Kong. It can be used in combination with other request plugins to secure, manage or extend the function.",img:"/img/plugins/aws-lambda.png"},{name:"pre-function",hideIfNotInConsumerContext:!0,description:"Dynamically run Lua code from Kong during access phase.",img:"/img/plugins/kong.svg"},{name:"post-function",hideIfNotInConsumerContext:!0,description:"Dynamically run Lua code from Kong during access phase.",img:"/img/plugins/kong.svg"},{name:"azure-functions",description:"This plugin invokes Azure Functions. It can be used in combination with other request plugins to secure, manage or extend the function",img:"/img/plugins/azure-functions.png"}]}},{label:"分析监控",hasConsumerPlugins:!0,icon:"mdi-chart-bar",description:"Visualize, inspect and monitor APIs and microservices traffic",option:{column:[{name:"galileo",description:"Business Intelligence Platform for APIs",img:"/img/plugins/galileo.png"},{name:"datadog",description:"Visualize API metrics on Datadog",img:"/img/plugins/datadog.png"},{name:"runscope",description:"API Performance Testing and Monitoring",img:"/img/plugins/runscope.png"},{name:"prometheus",description:"Expose metrics related to Kong and proxied upstream services in Prometheus exposition format",img:"/img/plugins/prometheus.png"},{name:"zipkin",description:"Propagate Zipkin distributed tracing spans, and report spans to a Zipkin server.",img:"/img/plugins/zipkin.png"}]}},{label:"处理转换",hasConsumerPlugins:!0,icon:"mdi-nfc-tap",description:"Transform request and responses on the fly on Kong",option:{column:[{name:"request-transformer",description:"Modify the request before hitting the upstream server",img:"/img/plugins/request-transformer.png"},{name:"response-transformer",description:"Modify the upstream response before returning it to the client",img:"/img/plugins/response-transformer.png"},{name:"correlation-id",description:"Correlate requests and responses using a unique ID",img:"/img/plugins/correlation-id.png"}]}},{label:"访问日志",hasConsumerPlugins:!0,icon:"mdi-content-paste",description:"Log requests and response data using the best transport for your infrastructure",option:{column:[{name:"tcp-log",description:"Send request and response logs to a TCP server",img:"/img/plugins/tcp-log.png"},{name:"udp-log",description:"Send request and response logs to an UDP server",img:"/img/plugins/udp-log.png"},{name:"http-log",description:"Send request and response logs to an HTTP server",img:"/img/plugins/http-log.png"},{name:"file-log",description:"Append request and response data to a log file on disk",img:"/img/plugins/file-log.png"},{name:"syslog",description:"Send request and response logs to Syslog",img:"/img/plugins/syslog.png"},{name:"statsd",description:"Send request and response logs to StatsD",img:"/img/plugins/statsd.png"},{name:"loggly",description:"Send request and response logs to Loggly",img:"/img/plugins/loggly.png"}]}}]},c=a("a573"),u=a("ecc3"),d={components:{upholdPlugins:u["default"]},data:function(){return{svgimage:'this.src="/img/plugins/kong.svg"',pluginGroupOption:l,fields:[],grade:{pluginBox:!1},cardoption:{addBtn:!1,span:8,props:{img:"img",title:"name",info:"description"}},plugin:{name:"",config:{}}}},created:function(){this.route&&(this.plugin["route"]={id:this.route.id}),this.service&&(this.plugin["service"]={id:this.service.id})},mounted:function(){this.initOptions()},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission","isDevProfile","isProdProfile","systemProfile"])),props:{tabPosition:{required:!1},service:{required:!1},route:{required:!1}},methods:{initOptions:function(){var e=this;Object(c["a"])().then(function(t){var a=[],n=t.data,i=n.plugins;for(var s in i.available_on_server){var r=!1;e.pluginGroupOption.column.forEach(function(e){e.option.column.forEach(function(e){s==e["name"]&&(r=!0)})}),r||a.push({name:s,description:s,img:"/img/plugins/kong.svg"})}return a}).then(function(t){var a={label:"自定义",description:"Custom Plugins",icon:"mdi-account-box-outline",hasConsumerPlugins:!0,option:{column:[]}};t.length>0&&(a.option.column=t,e.pluginGroupOption.column.push(a))})},toAddPlugin:function(e){var t=this;this.plugin={name:"",config:{},service:this.service,route:this.route},this.plugin.name=e,Object(o["d"])(this.plugin.name).then(function(e){var a=e.data;t.fields=a.fields||[],t.grade.pluginBox=!0})},callback:function(){this.$emit("callback",{})}}},p=d,h=(a("068d"),a("2877")),m=Object(h["a"])(p,n,i,!1,null,null,null);t["default"]=m.exports},"81c1":function(e,t,a){},"81fd":function(e,t,a){},"82b1":function(e,t,a){},"82c1":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.showInRoot||e.value!=e.root,expression:"showInRoot || value!=root"}],staticClass:"inner-breadcrumb",staticStyle:{height:"1px",padding:"0 12px 10px"}},[a("el-breadcrumb",{staticClass:"breadcrumb",staticStyle:{float:"left"},attrs:{separator:"/"}},e._l(e.pathArr,function(t,n){return a("el-breadcrumb-item",{key:n},[t.disable&&n<e.pathArr.length-1?a("span",{staticClass:"disable",class:{last:n==e.pathArr.length-1}},[e._v(e._s(e.parse(t.label)))]):a("a",{class:{last:n==e.pathArr.length-1},attrs:{href:"javascript:;"},on:{click:function(a){return e.change(t.key,t.disable)}}},[e._v(e._s(e.parse(t.label)))])])}),1),e.showBack&&e.pathArr.length>1?a("el-button",{staticStyle:{float:"right",padding:"0"},attrs:{type:"text"},on:{click:e.back}},[e._v("返回上一级")]):e._e()],1)},i=[],s=(a("a481"),{name:"InnerBreadcrumb",props:{value:{type:String},path:{type:Object,required:!0,default:{label:"一级页面",key:"1",children:[{key:"2A",label:"二级页面A"},{key:"2B",label:"二级页面B",disable:!0,children:[{key:"3",label:"三级页面"}]}]}},showBack:{type:Boolean,default:!1},showInRoot:{type:Boolean,default:!1},labelArgs:{type:Object,default:{}}},data:function(){return{pathMap:null,root:null,pathArr:[]}},watch:{value:function(e){this.buildPath(e)}},methods:{init:function(){var e=this.path;this.root=e.key;var t={},a=function e(a,n){if(a.parentKey=n,t[a.key]=a,a.children&&a.children.length)for(var i=0;i<a.children.length;i++){var s=a.children[i];e(s,a.key)}};a(e),this.pathMap=t},buildPath:function(e){if(e){var t=this.pathMap[e];if(t){var a=[];while(t)a.push(t),t=this.pathMap[t.parentKey];a.reverse(),this.pathArr=a}}},parse:function(e){var t,a=/\{[^\}]+\}/g,n=e;while(null!=(t=a.exec(e))){var i=t[0].substr(1,t[0].length-2),s=this.labelArgs[i];s&&(n=n.replace(t[0],s))}return n},change:function(e,t){t||this.$emit("input",e)},back:function(){if(this.pathArr&&this.pathArr.length>1)for(var e=this.pathArr.length-2;e>=0;e--){var t=this.pathArr[e];if(!t.disable)return void this.change(t.key)}console.warn("InnerBreadcrumb 没有非disalbe的上级路径")}},created:function(){},mounted:function(){this.init(),this.buildPath(this.value)}}),r=s,o=(a("354b"),a("2877")),l=Object(o["a"])(r,n,i,!1,null,null,null);t["default"]=l.exports},"848d":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-row",{staticStyle:{"margin-bottom":"5px","margin-left":"5px","margin-right":"5px"}},[a("el-col",{attrs:{span:24-e.span}},[e._t("menu")],2),a("el-col",{attrs:{span:e.span}},[a("el-input",{staticClass:"input-with-select",attrs:{clearable:"",size:"small",placeholder:e.placeholder},model:{value:e.searchForm,callback:function(t){e.searchForm=t},expression:"searchForm"}},[a("span",{staticStyle:{cursor:"pointer"},attrs:{slot:"append",type:"primary",plain:"",size:"small"},on:{click:e.loadData},slot:"append"},[a("i",{staticClass:"el-icon-search"}),e._v("\n 搜 索\n ")])])],1)],1)],1)},i=[],s=(a("7f7f"),a("6762"),a("2fdb"),a("cebc")),r=a("5880"),o={name:"searchBanner",data:function(){return{showItems:[],cacheItems:[],searchForm:null}},props:{handleList:{type:Function,default:null},placeholder:{required:!0},data:{required:!1},searchProps:{required:!1},page:{required:!0},span:{default:12},refreshBtn:{default:!0}},created:function(){var e=this;-1==this.systemProfile.id?this.$nextTick(function(t){e.$router.push("/wel/index")}):this.loadData()},computed:Object(s["a"])({},Object(r["mapGetters"])(["systemProfile"])),watch:{searchForm:function(e){this.page.currentPage=1,this.refresh(this.page,!1)}},methods:{loadData:function(){var e=this;this.searchForm=null,this.handleList().then(function(t){e.cacheItems=t||[],e.showItems=e.cacheItems,e.init()})},init:function(){this.page.currentPage=1,this.refresh(this.page,!1)},refresh:function(e,t){var a=this;this.searchForm&&""!==this.searchForm.trim()?this.showItems=this.cacheItems.filter(function(e){return a._filter(e)}):this.showItems=this.cacheItems,this.callback(this._slice(),t)},_slice:function(){this.page.total=this.showItems.length;var e=this.showItems.slice((this.page.currentPage-1)*this.page.pageSize,this.page.currentPage*this.page.pageSize);return e},callback:function(e,t){var a={data:e,total:this.showItems.length,refresh:t};this.$emit("search-change",a)},_filterArray:function(e,t){if(!t)return!1;for(var a=!1,n=0;n<t.length;n++){var i=t[n];if(a=i&&i.includes(this.searchForm.trim()),a)break}return a},_filter:function(e){for(var t=!1,a=0;a<this.searchProps.length;a++){var n=this.searchProps[a],i=n.name,s=n.type||"string",r=e[i];switch(s){case"string":t=r&&r.includes(this.searchForm.trim());break;case"array":t=this._filterArray(n,r);break;case"object":var o=n.childName;r=r&&r[o],t=r&&r.includes(this.searchForm.trim());break}if(t)break}return t}}},l=o,c=(a("893d"),a("2877")),u=Object(c["a"])(l,n,i,!1,null,null,null);t["default"]=u.exports},"84bc":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"config-list"},[a("el-radio-group",{model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("div",{staticClass:"item"},[a("Radio",{staticClass:"choice",attrs:{label:"TYPE_NOT_SET",disabled:e.disableChoice}},[e._v("不设置")]),a("span",{staticClass:"tip-info"},[e._v("日和周只能设置其中之一")])],1),a("div",{staticClass:"item"},[a("Radio",{staticClass:"choice",attrs:{label:"TYPE_EVERY",disabled:e.disableChoice}},[e._v("每日")])],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_RANGE",disabled:e.disableChoice}},[e._v("区间")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disableChoice,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.start,callback:function(t){e.$set(e.valueRange,"start",t)},expression:"valueRange.start"}}),e._v("日\n 至\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disableChoice,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.end,callback:function(t){e.$set(e.valueRange,"end",t)},expression:"valueRange.end"}}),e._v("日\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_LOOP",disabled:e.disableChoice}},[e._v("循环")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disableChoice,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.start,callback:function(t){e.$set(e.valueLoop,"start",t)},expression:"valueLoop.start"}}),e._v("日开始,间隔\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disableChoice,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.interval,callback:function(t){e.$set(e.valueLoop,"interval",t)},expression:"valueLoop.interval"}}),e._v("日\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_WORK",disabled:e.disableChoice}},[e._v("工作日")]),e._v("本月\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_WORK||e.disableChoice,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueWork,callback:function(t){e.valueWork=t},expression:"valueWork"}}),e._v("日,最近的工作日\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_LAST",disabled:e.disableChoice}},[e._v("最后一日")])],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_SPECIFY",disabled:e.disableChoice}},[e._v("指定")]),a("div",{staticClass:"list"},[a("el-checkbox-group",{model:{value:e.valueList,callback:function(t){e.valueList=t},expression:"valueList"}},e._l(e.maxValue,function(t){return a("el-checkbox",{key:"key-"+t,staticClass:"list-check-item",attrs:{label:t,disabled:e.type!=e.TYPE_SPECIFY||e.disableChoice}})}),1)],1)],1)])],1)},i=[],s=a("4b3a"),r={name:"day",mixins:[s["a"]],props:{week:{type:String,default:"?"}},data:function(){return{}},computed:{disableChoice:function(){return this.week&&"?"!==this.week||this.disabled}},watch:{value_c:function(e,t){this.updateValue()},week:function(e,t){this.updateValue()}},methods:{updateValue:function(){this.$emit("change",this.disableChoice?"?":this.value_c)}},created:function(){this.DEFAULT_VALUE="*",this.minValue=1,this.maxValue=31,this.valueRange.start=1,this.valueRange.end=31,this.valueLoop.start=1,this.valueLoop.interval=1,this.parseProp(this.prop)}},o=r,l=(a("00b3"),a("2877")),c=Object(l["a"])(o,n,i,!1,null,"38098e06",null);t["default"]=c.exports},8599:function(e,t,a){},"85e3":function(e,t,a){},8752:function(e,t,a){},8899:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("basic-container",{},[a("el-row",{attrs:{gutter:20}},[a("el-col",[a("div",{staticStyle:{"margin-left":"12px"}},[a("el-row",{attrs:{gutter:20}},[a("el-row",[a("el-col",[a("el-alert",{attrs:{span:"20",type:"info","show-icon":"",effect:"dark",description:"日志控制台方便查看网关运行的访问日志,灵活性高,可查询日志:access.log,error.log,kong.jlog等"}})],1)],1),a("iframe",{staticStyle:{width:"100%",height:"700px"},attrs:{src:e.kongClient.url.replace("8001","8900/log"),scrolling:"yes",frameborder:"0"}})],1)],1)])],1)],1)},i=[],s=a("cebc"),r=a("5880"),o={name:"kongshell",data:function(){return{envs:[]}},created:function(){},watch:{},mounted:function(){},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission","userInfo","kongClient"])),props:[],methods:{}},l=o,c=(a("451d"),a("b874"),a("2877")),u=Object(c["a"])(l,n,i,!1,null,"4ac4792d",null);t["default"]=u.exports},"88e6":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-tabs",{attrs:{"tab-position":"top"}},e._l(e.syncConfig.clients,function(t){return a("el-tab-pane",{key:t,attrs:{label:t.profile}},[a("el-row",{staticStyle:{"margin-top":"12px"},attrs:{gutter:5}},[a("el-tabs",{attrs:{"tab-position":"left"}},e._l(e.syncConfig.services,function(n){return a("el-tab-pane",{key:n.id,attrs:{label:n.name}},[a("el-col",[a("div",{staticClass:"grid-content bg-purple"},[a("span",{staticStyle:{"margin-left":"10px"}},[a("strong",[e._v("日志列表")])]),a("div",{staticStyle:{"overflow-y":"auto",height:"100%"}},[a("log-detail",{attrs:{syncConfig:e.syncConfig,service:n,client:t}})],1)])])],1)}),1)],1)],1)}),1)],1)},i=[],s=a("ca50"),r={components:{logDetail:s["default"]},data:function(){return{logData:[]}},props:{syncConfig:{type:Object,required:!0}},methods:{}},o=r,l=a("2877"),c=Object(l["a"])(o,n,i,!1,null,null,null);t["default"]=c.exports},"893d":function(e,t,a){"use strict";var n=a("81c1"),i=a.n(n);i.a},"8a0f":function(e,t,a){"use strict";var n=a("2f92"),i=a.n(n);i.a},"8ab6":function(e,t,a){},"8b12":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("avue-crud",{attrs:{option:e.routingOption,data:e.routeData},on:{"row-del":e.handleTargetDel,"expand-change":e.expandChanges},scopedSlots:e._u([{key:"expand",fn:function(t){var n=t.row;return[a("el-form",{staticStyle:{"margin-left":"10px"},attrs:{"label-width":"80px"}},[n.hosts&&n.hosts.length>0?a("el-form-item",{attrs:{label:"Host"}},[a("item-tags",{attrs:{tags:n.hosts,name:"匹配路径",column:"paths",mode:"view"}})],1):e._e(),a("el-form-item",{attrs:{label:"路由PATH"}},[a("item-tags",{attrs:{tags:n.paths,name:"匹配路径",column:"paths",mode:"view"}})],1),a("el-form-item",{attrs:{label:"插件列表"}},[a("query-plugins",{attrs:{route:n,mode:"view"}})],1)],1)]}},{key:"hosts",fn:function(t){var n=t.row;return e._l(n.hosts,function(t){return a("el-tag",{key:t,attrs:{"disable-transitions":!1},on:{close:function(a){return e.handleClose(t)}}},[e._v(e._s(t))])})}},{key:"paths",fn:function(t){var n=t.row;return e._l(n.paths,function(t){return a("el-tag",{key:t,attrs:{"disable-transitions":!1},on:{close:function(a){return e.handleClose(t)}}},[e._v(e._s(t))])})}},{key:"menuRight",fn:function(t){return"view"!=e.mode?[a("el-button",{attrs:{icon:"el-icon-plus",size:"small",type:"primary"},on:{click:function(a){return e.toAddRoute(t.row,t.$index)}}},[e._v("新增路由")]),a("update-hosts",{attrs:{placement:"bottom-end",service:{id:e.service.id}},on:{callback:e.pluginCallback}})]:void 0}},{key:"menu",fn:function(t){return[a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"primary"},on:{click:function(a){return e.toEditRoute(t.row,t.$index)}}},[e._v("编辑")]),a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"danger"},on:{click:function(a){return e.handleTargetDel(t.row,t.$index)}}},[e._v("删除")])]}}],null,!0)},[a("template",{slot:"empty"},[e._v("暂无服务路由,请添加")])],2),e.grade.addPluginBox?a("el-dialog",{attrs:{title:"新增路由",width:"70%",visible:e.grade.addPluginBox,"append-to-body":""},on:{"update:visible":function(t){return e.$set(e.grade,"addPluginBox",t)}}},[a("uphold-route",{attrs:{route:e.routeForm,mode:"add"},on:{callback:e.pluginCallback}})],1):e._e(),e.grade.editPluginBox?a("el-dialog",{attrs:{title:"编辑路由",width:"70%",visible:e.grade.editPluginBox,"append-to-body":""},on:{"update:visible":function(t){return e.$set(e.grade,"editPluginBox",t)}}},[a("uphold-route",{attrs:{route:e.routeForm,mode:e.mode},on:{callback:e.pluginCallback}})],1):e._e()],1)},i=[],s=a("cebc"),r=a("5880"),o=a("fef3"),l=a("ceee"),c=a("3aa7"),u=a("ca60"),d=a("e8cd"),p=a("2e8b"),h={name:"QueryRoutes",components:{ItemTags:u["default"],upholdRoute:d["default"],queryPlugins:c["default"],updateHosts:p["default"]},data:function(){return{routingOption:o["l"],routeData:[],routeForm:{service:{id:this.service.id}},grade:{editPluginBox:!1,addPluginBox:!1}}},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission","isProdProfile","systemProfile"])),props:{service:{type:Object,required:!1},client:{required:!1},mode:{required:!1}},created:function(){this.handleList(),this.initOption()},methods:{initOption:function(){this.routingOption["menu"]="edit"==this.mode},toEditRoute:function(e,t){this.grade.editPluginBox=!0,this.grade.addPluginBox=!1,this.routeForm=e},toAddRoute:function(e,t){this.grade.editPluginBox=!1,this.grade.addPluginBox=!0,this.routeForm={service:{id:this.service.id}}},bindTags:function(){},expandChanges:function(e,t){t.length?(this.routingOption.expandRowKeys=[],e&&this.routingOption.expandRowKeys.push(e.id)):this.routingOption.expandRowKeys=[]},pluginCallback:function(){this.handleList(),this.grade.editPluginBox=!1,this.grade.addPluginBox=!1},handleList:function(e){var t=this;this.tableLoading=!0,this.client=this.client||{},Object(l["b"])(this.service,this.client).then(function(e){t.routeData=e.data.data})},handleTargetDel:function(e,t){var a=this,n="";this.isProdProfile&&(n="当前为生产环境,请谨慎操作! "),this.$confirm(n+"是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(l["d"])({id:e.id}).then(function(e){var t=e.data;0!=t.status?a.$errorInfo(t.errmsg):(a.$successInfo("删除成功"),a.handleList())})}).catch(function(){})}}},m=h,f=a("2877"),g=Object(f["a"])(m,n,i,!1,null,null,null);t["default"]=g.exports},"8b5b":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("el-tabs",e._l(e.envs,function(t){return a("el-tab-pane",{key:t,attrs:{index:t.label}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"icon-env"}),e._v("\n "+e._s(t.label)+"\n ")]),a("el-tabs",{attrs:{type:"border-card","tab-position":"left"}},e._l(t.groups,function(n){return a("el-tab-pane",{key:n},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(n.profileCode))]),a("uphold-env",{attrs:{client:{name:n.label,deployType:t.deployType,profileCode:n.profileCode,profile:n.profile,env:t.env,ab:n.value}}})],1)}),1)],1)}),1)],1)],1)},i=[],s=a("5176"),r=a.n(s),o=(a("7f7f"),a("cebc")),l=a("5880"),c=a("af62"),u=a("5640"),d=a("2256"),p={name:"client",components:{upholdEnv:d["default"]},data:function(){return{tableOption:u["b"],clientColumn:u["a"],isCollapse:!1,tableData:[],tableLoading:!1,clientForm:{},envs:[]}},created:function(){this.handleList(),this.findAllEnvs(),this.findActiveKongclient(),this.initOptions()},watch:{},mounted:function(){},computed:Object(o["a"])({},Object(l["mapGetters"])(["permission","userInfo"])),props:[],methods:{findAllEnvs:function(){var e=this;Object(c["f"])().then(function(t){e.envs=t.data})},initOptions:function(){this.permission.client_update||(this.tableOption["menu"]=!1)},findActiveKongclient:function(){var e=this;this.$store.dispatch("FindActiveClient",this.userInfo).then(function(t){e.activeClient=t})},handActiveClient:function(e){Object(c["h"])(this.userInfo.name,e).then(function(e){window.location.href.indexOf("#/wel/index")>0?window.location.reload():window.location="#/wel/index"})},toEditClient:function(e,t){this.grade.box=!0,this.clientForm=e},handlerefreshChange:function(e){this.handleList(this.tableSearch)},handleList:function(e){var t=this;this.tableLoading=!0,Object(c["c"])(r()({})).then(function(e){var a=e.data;t.tableData=a,t.tableLoading=!1})},handleClient:function(e,t){var a=this;this.clientForm&&this.clientForm.id?Object(c["i"])(this.clientForm).then(function(e){var n=e.data;0==n.status?(a.$successInfo("修改成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("修改失败"),t()}):Object(c["a"])(this.clientForm).then(function(e){var n=e.data;0==n.status?(a.$successInfo("新增成功"),a.handleList(),a.grade.box=!1):a.$errorInfo("新增失败"),t()})},handlerDelete:function(e){var t=this;this.$confirm("是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(c["g"])(e).then(function(e){var a=e.data;0==a.status?(t.$successInfo("删除成功"),t.handleList()):t.$errorInfo("删除失败")})})}}},h=p,m=(a("a154"),a("df9f"),a("2877")),f=Object(m["a"])(h,n,i,!1,null,"8fc10c56",null);t["default"]=f.exports},"8d55":function(e,t,a){"use strict";a.d(t,"d",function(){return s}),a.d(t,"e",function(){return r}),a.d(t,"a",function(){return o}),a.d(t,"b",function(){return l}),a.d(t,"f",function(){return c}),a.d(t,"c",function(){return u});var n=a("b5c6"),i=a("074d"),s=function(e){return Object(n["a"])({url:i["a"].path+"/system/role",method:"post",data:e})},r=function(e){return Object(n["a"])({url:i["a"].path+"/system/role/"+e.id,method:"post",data:e})},o=function(e){return Object(n["a"])({url:i["a"].path+"/system/role/page",method:"get",params:e})},l=function(){return Object(n["a"])({url:i["a"].path+"/system/role/page",method:"get",params:{start:0,limit:1e3}})},c=function(e){return Object(n["a"])({url:i["a"].path+"/system/role/updateRoleMenu",method:"post",data:e})},u=function(e){return Object(n["a"])({url:i["a"].path+"/system/role/"+e.id+"/menu",method:"post"})}},"8f81":function(e,t,a){"use strict";var n=a("6383"),i=a.n(n);i.a},9277:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("router-view")},i=[],s=a("2877"),r={},o=Object(s["a"])(r,n,i,!1,null,null,null);t["default"]=o.exports},"97a1":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("basic-container",[a("el-container",[a("el-aside",{attrs:{width:"300px"}},[a("el-input",{attrs:{placeholder:"输入关键字进行过滤"},model:{value:e.filterText,callback:function(t){e.filterText=t},expression:"filterText"}}),a("el-tree",{ref:"menuTree",attrs:{data:e.menuAll,props:e.menuOption,"node-key":"id",accordion:"","highlight-current":"","expand-on-click-node":!1,"default-expanded-keys":e.keys,"filter-node-method":e.filterNode},on:{"node-click":e.handleNodeClick}})],1),a("el-main",["menu"==e.systemFunction.menuType?a("uphold-menu",{attrs:{systemFunction:e.systemFunction,mode:e.mode},on:{callback:e.loadAllMenu}}):e._e(),"point"==e.systemFunction.menuType?a("uphold-child-menu",{attrs:{systemFunction:e.systemFunction,mode:"edit",options:e.functionPointColumn},on:{callback:e.loadAllMenu}}):e._e()],1)],1)],1)},i=[],s=(a("7f7f"),a("cebc")),r=a("5880"),o=a("ef70"),l=(a("c54a"),a("ca05")),c=a("e349"),u=a("78ad"),d=a("5791"),p={name:"menu",components:{upholdMenu:u["default"],upholdChildMenu:d["default"]},data:function(){return{filterText:"",functionPointColumn:l["b"],menuAll:[],obj:{},keys:[-1],systemFunction:{parentId:-1,useYn:"y",sortOrder:999,menuType:"menu"},menuOption:l["c"],USERTYPE:c["a"].USERTYPE,mode:"add"}},watch:{filterText:function(e){this.$refs.menuTree.filter(e)}},created:function(){this.loadAllMenu()},mounted:function(){},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission"])),methods:{loadAllMenu:function(){var e=this;Object(o["b"])().then(function(t){var a=t.data;e.form={},e.formStatus="",e.menuAll=a.data})},filterNode:function(e,t){return!e||-1!==t.name.indexOf(e)},handleNodeClick:function(e){this.currentType=e.type,this.mode="edit",this.systemFunction={parentId:-1,useYn:"y"},this.systemFunction=_.assign({},e),this.keys=[this.systemFunction.id]}}},h=p,m=(a("f5f5"),a("2877")),f=Object(m["a"])(h,n,i,!1,null,"d06a673e",null);t["default"]=f.exports},"9d0c":function(e,t,a){"use strict";var n=a("5c8e"),i=a.n(n);i.a},"9d5c":function(e,t,a){},"9f79":function(e,t,a){},"9fc0":function(e,t,a){},"9fee":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"config-list"},[a("el-radio-group",{model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_EVERY",disabled:e.disabled}},[e._v("每时")])],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_RANGE",disabled:e.disabled}},[e._v("区间")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.start,callback:function(t){e.$set(e.valueRange,"start",t)},expression:"valueRange.start"}}),e._v("时\n 至\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.end,callback:function(t){e.$set(e.valueRange,"end",t)},expression:"valueRange.end"}}),e._v("时\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_LOOP",disabled:e.disabled}},[e._v("循环")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.start,callback:function(t){e.$set(e.valueLoop,"start",t)},expression:"valueLoop.start"}}),e._v("时开始,间隔\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.interval,callback:function(t){e.$set(e.valueLoop,"interval",t)},expression:"valueLoop.interval"}}),e._v("时\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_SPECIFY",disabled:e.disabled}},[e._v("指定")]),a("div",{staticClass:"list"},[a("el-checkbox-group",{model:{value:e.valueList,callback:function(t){e.valueList=t},expression:"valueList"}},e._l(e.maxValue+1,function(t){return a("el-checkbox",{key:"key-"+(t-1),staticClass:"list-check-item",attrs:{label:t-1,disabled:e.type!=e.TYPE_SPECIFY||e.disabled}})}),1)],1)],1)])],1)},i=[],s=a("4b3a"),r={name:"minute",mixins:[s["a"]],data:function(){return{}},watch:{value_c:function(e,t){this.$emit("change",e)}},created:function(){this.DEFAULT_VALUE="*",this.minValue=0,this.maxValue=23,this.valueRange.start=0,this.valueRange.end=23,this.valueLoop.start=0,this.valueLoop.interval=1,this.parseProp(this.prop)}},o=r,l=(a("adc9"),a("2877")),c=Object(l["a"])(o,n,i,!1,null,"c0640844",null);t["default"]=c.exports},a03a:function(e,t,a){},a154:function(e,t,a){"use strict";var n=a("a03a"),i=a.n(n);i.a},a17a:function(e,t,a){},a495:function(e,t,a){"use strict";var n=a("17d3"),i=a.n(n);i.a},a573:function(e,t,a){"use strict";a.d(t,"a",function(){return s}),a.d(t,"b",function(){return r});var n=a("b5c6"),i=a("074d"),s=function(){return Object(n["a"])({url:i["a"].path+"/kong/api/info",method:"get"})},r=function(){return Object(n["a"])({url:i["a"].path+"/kong/api/status",method:"get"})}},a5f6:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("basic-container",[a("div",[a("el-row",{staticStyle:{"margin-bottom":"5px","margin-left":"5px","margin-right":"5px"}},[a("el-col",{attrs:{span:"2"}},[e.permission.role_add?a("el-button",{attrs:{size:"small",icon:"el-icon-plus",type:"primary"},on:{click:e.toAdd}},[e._v("新建角色")]):e._e()],1),a("el-col",{attrs:{span:"22"}},[a("el-input",{staticClass:"input-with-select",attrs:{size:"small",placeholder:"请输入角色名称",maxlength:"20",clearable:""},model:{value:e.searchForm,callback:function(t){e.searchForm=t},expression:"searchForm"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},slot:"append"})],1)],1)],1)],1),a("avue-crud",{ref:"crud",staticStyle:{cursor:"pointer"},attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading,page:e.page},on:{"row-save":e.handleSave,"row-update":e.handleUpdate,"refresh-change":e.handlerefreshChange,"current-change":e.handleCurrentChange,"size-change":e.handleCurrentSize,"search-change":e.handleSearchChange},scopedSlots:e._u([{key:"messageContent",fn:function(e){var t=e.row;return[a("item-tags",{attrs:{tags:t.messageContent,column:"messageContent",mode:"view"}})]}},{key:"menu",fn:function(t){return[e.permission.role_update?a("el-button",{attrs:{size:"mini",icon:"el-icon-edit",plain:"",type:"primary"},on:{click:function(a){return e.toEdit(t)}}},[e._v("编辑")]):e._e(),e.permission.role_config?a("el-button",{attrs:{size:"mini",plain:"",type:"success"},on:{click:function(a){return e.toConfigMenu(t.row,t.index)}}},[e._v("配置权限")]):e._e(),e.permission.role_config?a("el-button",{attrs:{size:"mini",icon:"el-icon-view",plain:""},on:{click:function(a){return e.toConfigViewMenu(t.row,t.index)}}},[e._v("查看")]):e._e()]}}]),model:{value:e.objData,callback:function(t){e.objData=t},expression:"objData"}}),e.configMenuBox?a("el-drawer",{attrs:{title:"配置角色权限",size:"40%",visible:e.configMenuBox},on:{"update:visible":function(t){e.configMenuBox=t}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"99%"}},[a("uphold-role",{attrs:{systemRole:e.systemRole,mode:e.mode},on:{callback:e.handleList}})],1)]):e._e()],1)},i=[],s=a("5176"),r=a.n(s),o=a("cebc"),l=a("5880"),c=a("ca05"),u=a("8d55"),d=a("ca60"),p=a("4703"),h={name:"syncLog",components:{ItemTags:d["default"],upholdRole:p["default"]},data:function(){return{objData:{},tableSearch:{},tableOption:c["d"],tableData:[],tablePage:1,tableSize:10,tableLoading:!1,currentRule:{},systemRole:{},mode:"add",form:{},configMenuBox:!1,searchForm:null,users:null,userLists:[],options:[],templates:{span:8,data:[]},page:{total:0,currentPage:1,pageSize:10}}},created:function(){this.handleList(),this.init()},computed:Object(o["a"])({},Object(l["mapGetters"])(["permission"])),props:{logType:{required:!0}},watch:{searchForm:function(e){this.page.currentPage=1,this.handleList()},users:function(e){this.page.currentPage=1,this.handleList()}},methods:{toConfigViewMenu:function(e,t){this.configMenuBox=!0,this.mode="view",this.systemRole=e},toConfigMenu:function(e,t){this.configMenuBox=!0,this.mode="add",this.systemRole=e},toAdd:function(){this.$refs.crud.rowAdd()},toEdit:function(e){this.$refs.crud.rowEdit(e.row,e.index)},init:function(){},handleRowClick:function(e){this.currentRule=e},handlerTrace:function(){var e=this;this.$refs["form"].validate(function(t){t&&(e.handlerTraceDetail=!0)})},handlerefreshChange:function(e){this.handleList(this.tableSearch)},handleCurrentChange:function(e){this.tablePage=e,this.handlerefreshChange()},handleCurrentSize:function(e){this.tableSize=e,this.handlerefreshChange()},handleSearchChange:function(e){this.tableSearch=e,this.handleList(this.tableSearch)},handleSave:function(e,t){var a=this;Object(u["d"])(e).then(function(e){var n=e.data;0!==n.status?a.$message({showClose:!0,message:n.errmsg,type:"warning"}):(a.tablePage=1,a.handleList(),a.$message({showClose:!0,message:"新增成功",type:"success"})),t()})},handleUpdate:function(e,t,a){var n=this;Object(u["e"])(e).then(function(e){var t=e.data;0!==t.status?n.$message({showClose:!0,message:t.errmsg,type:"warning"}):(n.tablePage=1,n.handleList(),n.$message({showClose:!0,message:"修改成功",type:"success"}))}),a()},handleList:function(e){var t=this;this.tableLoading=!0,this.alertRuleBox=!1,this.form={name:this.searchForm},Object(u["a"])(r()({},this.form,{start:this.tablePage,limit:this.tableSize})).then(function(e){var a=e.data.data;t.templates.data=a.items,t.tableData=a.items,t.page={total:a.totalCount,currentPage:t.tablePage,pageSize:t.tableSize},t.tableLoading=!1})}}},m=h,f=(a("68c7"),a("2877")),g=Object(f["a"])(m,n,i,!1,null,null,null);t["default"]=g.exports},a633:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("search-banner",{ref:"routeSearch",attrs:{placeholder:"请输入Name、Upstream Name或Host",handleList:e.handleList,span:20,searchProps:e.searchProps,page:e.page},on:{"search-change":e.searchChange}},[a("template",{slot:"menu"},[e.permission.service_add||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-plus",size:"small",type:"primary"},on:{click:function(t){return e.handleGrade({})}}},[e._v("新增")]):e._e(),e.permission.service_sync?a("el-button",{attrs:{icon:"el-icon-refresh",size:"small",type:"success"},on:{click:e.handlerSyncBox}},[e._v("同步Services")]):e._e()],1)],2),a("avue-crud",{attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading,page:e.page},on:{"row-click":e.handleRowClick,"row-save":e.handleSave,"row-del":e.handleDel,"refresh-change":e.handlerefreshChange,"current-change":e.handleCurrentChange,"size-change":e.handleCurrentSize,"search-change":e.handleSearchChange},scopedSlots:e._u([{key:"expand",fn:function(e){var t=e.row;return[a("el-form",{staticStyle:{"margin-left":"10px"},attrs:{"label-width":"80px","label-position":"top"}},[a("el-form-item",{attrs:{label:"代理列表"}},[a("targets",{attrs:{mode:"view",upstream:{id:t.host}}})],1),a("el-form-item",{attrs:{label:"路由列表"}},[a("query-routes",{attrs:{service:t,mode:"view"}})],1),a("el-form-item",{attrs:{label:"插件列表"}},[a("service-plugins",{attrs:{service:t}})],1)],1)]}},{key:"name",fn:function(t){var n=t.row;return[a("el-link",{attrs:{underline:!1,type:"success"},on:{click:function(t){return e.toDetail(n)}}},[e._v(e._s(n.name))])]}},{key:"menu",fn:function(t){return[e.permission.service_update||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"primary"},on:{click:function(a){return e.handleGrade(t.row,t.$index)}}},[e._v("编辑")]):e._e(),e.permission.service_delete||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-delete",size:"small",plain:"",type:"danger"},on:{click:function(a){return e.handleDel(t.row,t.$index)}}},[e._v("删除")]):e._e()]}}])}),e.grade.box?a("el-drawer",{attrs:{title:"服务管理",size:"50%",visible:e.grade.box},on:{"update:visible":function(t){return e.$set(e.grade,"box",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("upload-service",{attrs:{service:e.form,mode:e.mode},on:{callback:e.callback}})],1)]):e._e(),e.grade.syncBox?a("el-drawer",{attrs:{size:"100%",title:e.同步服务配置,visible:e.grade.syncBox,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){return e.$set(e.grade,"syncBox",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("sync-service")],1)]):e._e(),e.grade.drawerDetail?a("el-drawer",{attrs:{size:"100%",title:"'"+e.form.name+"' 详情",visible:e.grade.drawerDetail,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){return e.$set(e.grade,"drawerDetail",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",width:"100%",height:"90%"}},[a("upload-service",{attrs:{service:e.form,mode:e.mode},on:{callback:e.callback}})],1)]):e._e()],1)],1)},i=[],s=a("5176"),r=a.n(s),o=a("cebc"),l=a("fef3"),c=a("5880"),u=a("fe19"),d=a("2bdd"),p=a("537a"),h=a("848d"),m=a("8b12"),f=a("04c3"),g=a("3dba"),b={name:"strategy",components:{syncService:u["default"],searchBanner:h["default"],uploadService:d["default"],servicePlugins:p["default"],queryRoutes:m["default"],targets:f["default"]},data:function(){return{tableSearch:{},tableOption:l["j"],serviceColumn:l["i"],searchProps:[{name:"name"},{name:"host"}],tableData:[],tablePage:1,tableSize:10,tableLoading:!1,form:{},page:{total:0,currentPage:1,pageSize:10},grade:{box:!1,syncBox:!1,drawerDetail:!1},mode:"add"}},computed:Object(o["a"])({},Object(c["mapGetters"])(["permission","isDevProfile","isProdProfile","systemProfile"])),props:{type:{type:String,required:!1}},created:function(){var e=this;-1==this.systemProfile.id?this.$nextTick(function(t){e.$router.push("/wel/index")}):this.initOptions()},methods:{initOptions:function(){this.isDevProfile?this.tableOption["menu"]=!0:this.permission.service_update||(this.tableOption["menu"]=!1)},toDetail:function(e){this.form=e,this.grade.drawerDetail=!0,this.mode="view"},callback:function(e){this.form=e,this.mode="edit",this.reloadDataList()},handlerSyncBox:function(){this.grade.syncBox=!0},handleGrade:function(e,t){this.grade.box=!0,e&&e.id?(this.form=e,this.mode="edit"):(this.form={},this.mode="add")},handleCurrentChange:function(e){this.tablePage=e,this.refreshTableList(!0)},handleCurrentSize:function(e){this.tableSize=e,this.refreshTableList(!1)},handleList:function(e){var t=this;return this.tableLoading=!0,Object(g["a"])(r()({},e)).then(function(e){var a=e.data;return t.tableLoading=!1,a.data||[]})},refreshTableList:function(e){this.initPage(e),this.$refs.routeSearch.refresh(this.page,e)},initPage:function(e){e||(this.tablePage=1),this.page.currentPage=this.tablePage,this.page.pageSize=this.tableSize},searchChange:function(e){this.tableData=e.data},reloadDataList:function(){this.initPage(!1),this.$refs.routeSearch.loadData()},handleRowClick:function(e,t,a){this.type&&this.$emit("selectionData",e)},handleDel:function(e,t){var a=this,n="";this.isProdProfile&&(n="当前为生产环境,请谨慎操作! "),this.$confirm(n+"是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(g["c"])({id:e.id}).then(function(e){var t=e.data;0!=t.status?a.$errorInfo(t.errmsg):(a.reloadDataList(),a.$successInfo("删除成功"))})}).catch(function(){})}}},v=b,y=a("2877"),_=Object(y["a"])(v,n,i,!1,null,null,null);t["default"]=_.exports},a8c1:function(e,t,a){"use strict";var n=a("d6b3"),i=a.n(n);i.a},aab4:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("search-banner",{ref:"routeSearch",attrs:{span:21,placeholder:"请输入插件名称、服务名称或路由名称",handleList:e.handleList,searchProps:e.searchProps,page:e.page},on:{"search-change":e.searchChange}},[a("template",{slot:"menu"},[e.permission.plugin_add||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-plus",size:"small",type:"primary"},on:{click:function(t){return e.handleGrade({})}}},[e._v("新增全局插件")]):e._e()],1)],2),a("avue-crud",{attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading,page:e.page},on:{"row-click":e.handleRowClick,"row-save":e.handleSave,"row-del":e.handleDel,"current-change":e.handleCurrentChange,"size-change":e.handleCurrentSize},scopedSlots:e._u([{key:"menuLeft",fn:function(e){}},{key:"enabled",fn:function(t){var n=t.row;return[e.permission.plugin_update?a("el-button",{directives:[{name:"show",rawName:"v-show",value:n.enabled,expression:"row.enabled"}],attrs:{plain:"",size:"mini",type:"success"},on:{click:function(t){return e.handlerPluginUpdate(n,!1)}}},[e._v("启用")]):e._e(),e.permission.plugin_update?a("el-button",{directives:[{name:"show",rawName:"v-show",value:!n.enabled,expression:"!row.enabled"}],attrs:{plain:"",size:"mini",type:"danger"},on:{click:function(t){return e.handlerPluginUpdate(n,!0)}}},[e._v("未启用")]):e._e(),e.permission.plugin_update?e._e():a("el-button",{directives:[{name:"show",rawName:"v-show",value:n.enabled,expression:"row.enabled"}],attrs:{plain:"",size:"mini",type:"success",disabled:""}},[e._v("启用")]),e.permission.plugin_update?e._e():a("el-button",{directives:[{name:"show",rawName:"v-show",value:!n.enabled,expression:"!row.enabled"}],attrs:{plain:"",size:"mini",type:"danger",disabled:""}},[e._v("未启用")])]}},{key:"name",fn:function(t){var n=t.row;return[a("el-link",{attrs:{underline:!1,type:"success"},on:{click:function(t){return e.toDetailPlugin(n)}}},[e._v(e._s(n.name))])]}},{key:"menu",fn:function(t){return[e.permission.plugin_update||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"primary"},on:{click:function(a){return e.toEditPlugin(t.row,t.$index)}}},[e._v("编辑")]):e._e(),e.permission.plugin_delete||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-delete",size:"small",plain:"",type:"danger"},on:{click:function(a){return e.handleDel(t.row,t.$index)}}},[e._v("删除")]):e._e()]}}])}),e.grade.pluginBox?a("el-dialog",{attrs:{title:"编辑插件",width:"70%",visible:e.grade.pluginBox},on:{"update:visible":function(t){return e.$set(e.grade,"pluginBox",t)}}},[a("uphold-plugin",{attrs:{plugin:e.plugin,edit:"edit",fields:e.fields},on:{callback:e.refreshList}})],1):e._e(),e.grade.box?a("el-dialog",{attrs:{title:"新增全局插件",width:"70%",visible:e.grade.box},on:{"update:visible":function(t){return e.$set(e.grade,"box",t)}}},[a("list-plugin",{on:{callback:e.reloadDataList}})],1):e._e(),e.grade.drawerDetail?a("el-drawer",{attrs:{size:"45%",title:"'"+e.plugin.name+"' 详情",visible:e.grade.drawerDetail,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){return e.$set(e.grade,"drawerDetail",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("json-viewer",{attrs:{value:e.plugin,"expand-depth":5,copyable:"",sort:""}})],1)]):e._e()],1)],1)},i=[],s=a("5176"),r=a.n(s),o=(a("7f7f"),a("cebc")),l=a("fef3"),c=a("5880"),u=a("468b"),d=a("a573"),p=a("7e8d"),h=a("848d"),m=a("ecc3"),f={name:"plugin",components:{listPlugin:p["default"],searchBanner:h["default"],upholdPlugin:m["default"]},data:function(){return{tableSearch:{},tableOption:l["e"],searchProps:[{name:"name"},{name:"applyObject",type:"object",childName:"name"}],plugins:[],fields:[],plugin:{},tableData:[],tablePage:1,tableSize:10,tableLoading:!1,page:{total:0,currentPage:1,pageSize:10},grade:{box:!1,pluginBox:!1,drawerDetail:!1}}},computed:Object(o["a"])({},Object(c["mapGetters"])(["permission","isDevProfile","isProdProfile","systemProfile"])),props:{type:{type:String,required:!1}},created:function(){var e=this;-1==this.systemProfile.id?this.$nextTick(function(t){e.$router.push("/wel/index")}):(this.queryInfo(),this.initOptions())},methods:{initOptions:function(){this.isDevProfile?this.tableOption["menu"]=!0:this.permission.plugin_update||(this.tableOption["menu"]=!1)},handlerPluginUpdate:function(e,t){var a=this;e.enabled=t,Object(u["f"])(e).then(function(e){a.handleList(a.tableSearch)})},toDetailPlugin:function(e,t){this.grade.drawerDetail=!0,this.plugin=e},toEditPlugin:function(e,t){var a=this;this.plugin=e,Object(u["d"])(this.plugin.name).then(function(e){var t=e.data;a.fields=t.fields||[],a.grade.pluginBox=!0})},handleGrade:function(e,t){this.grade.box=!0},refreshList:function(){this.grade.box=!1,this.grade.pluginBox=!1,this.initPage(!0),this.$refs.routeSearch.refresh(this.page,!0)},queryInfo:function(){var e=this;Object(d["a"])().then(function(t){var a=t.data,n=a.plugins;e.plugins=n.available_on_server})},handleCurrentChange:function(e){this.tablePage=e,this.refreshTableList(!0)},handleCurrentSize:function(e){this.tableSize=e,this.refreshTableList(!1)},handleList:function(e){var t=this;return this.tableLoading=!0,Object(u["a"])(r()({},e)).then(function(e){var a=e.data;return t.tableLoading=!1,a.data||[]})},refreshTableList:function(e){this.initPage(e),this.$refs.routeSearch.refresh(this.page,e)},initPage:function(e){e||(this.tablePage=1),this.page.currentPage=this.tablePage,this.page.pageSize=this.tableSize},searchChange:function(e){this.tableData=e.data},reloadDataList:function(){this.initPage(!1),this.$refs.routeSearch.loadData()},handleSave:function(e,t,a){var n=this;strategySave(e).then(function(e){t();var a=e.data.data;a.retBool?n.$successInfo("添加成功"):n.$errorInfo(a.message),console.log("d"),n.reloadDataList()})},handleRowClick:function(e,t,a){this.type&&this.$emit("selectionData",e)},handleDel:function(e,t){var a=this,n="";this.isProdProfile&&(n="当前为生产环境,请谨慎操作! "),this.$confirm(n+"是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u["g"])({id:e.id}).then(function(e){var t=e.data;0!=t.status?a.$errorInfo(t.errmsg):(a.$successInfo("删除成功"),a.reloadDataList())})}).catch(function(){})}}},g=f,b=(a("8f81"),a("2877")),v=Object(b["a"])(g,n,i,!1,null,null,null);t["default"]=v.exports},ac57:function(e,t,a){},adc9:function(e,t,a){"use strict";var n=a("e255"),i=a.n(n);i.a},b012:function(e,t){function a(e,t,a){var n,i,s,r,o;function l(){var c=Date.now()-r;c<t&&c>=0?n=setTimeout(l,t-c):(n=null,a||(o=e.apply(s,i),s=i=null))}null==t&&(t=100);var c=function(){s=this,i=arguments,r=Date.now();var c=a&&!n;return n||(n=setTimeout(l,t)),c&&(o=e.apply(s,i),s=i=null),o};return c.clear=function(){n&&(clearTimeout(n),n=null)},c.flush=function(){n&&(o=e.apply(s,i),s=i=null,clearTimeout(n),n=null)},c}a.debounce=a,e.exports=a},b355:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"config-list"},[a("el-radio-group",{model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_NOT_SET",disabled:e.disableChoice}},[e._v("不设置")]),a("span",{staticClass:"tip-info"},[e._v("日和周只能设置其中之一")])],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_RANGE",disabled:e.disableChoice}},[e._v("区间")]),e._v("从\n "),a("el-select",{staticClass:"w80",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disableChoice},model:{value:e.valueRange.start,callback:function(t){e.$set(e.valueRange,"start",t)},expression:"valueRange.start"}},e._l(e.WEEK_MAP,function(t,n){return a("el-option",{key:"week-pre-Lf13-"+t,attrs:{value:t}},[e._v(e._s(n))])}),1),e._v("至\n "),a("el-select",{staticClass:"w80",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disableChoice},model:{value:e.valueRange.end,callback:function(t){e.$set(e.valueRange,"end",t)},expression:"valueRange.end"}},e._l(e.WEEK_MAP,function(t,n){return a("el-option",{key:"week-next-1fas-"+t,attrs:{value:t}},[e._v(e._s(n))])}),1)],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_LOOP",disabled:e.disableChoice}},[e._v("循环")]),e._v("从\n "),a("el-select",{staticClass:"w80",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disableChoice},model:{value:e.valueLoop.start,callback:function(t){e.$set(e.valueLoop,"start",t)},expression:"valueLoop.start"}},e._l(e.WEEK_MAP,function(t,n){return a("el-option",{key:"week-pre-Lf13-"+t,attrs:{value:t}},[e._v(e._s(n))])}),1),e._v("开始,间隔\n "),a("InputNumber",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disableChoice,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.interval,callback:function(t){e.$set(e.valueLoop,"interval",t)},expression:"valueLoop.interval"}}),e._v("天\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_SPECIFY",disabled:e.disableChoice}},[e._v("指定")]),a("div",{staticClass:"list"},[a("el-checkbox-group",{model:{value:e.valueList,callback:function(t){e.valueList=t},expression:"valueList"}},e._l(e.WEEK_MAP,function(t,n){return a("el-checkbox",{key:"key-01jfs-"+t,staticClass:"list-check-item",attrs:{label:t,disabled:e.type!=e.TYPE_SPECIFY||e.disableChoice}},[a("span",[e._v(e._s(n))])])}),1)],1)],1)])],1)},i=[],s=a("4b3a"),r=(a("3b2b"),a("a481"),a("a4bb")),o=a.n(r),l=(a("ac6a"),{SUN:"0",MON:"1",TUE:"2",WED:"3",THU:"4",FRI:"5",SAT:"6"}),c=function(e){return e&&(o()(l).forEach(function(t){e=e.replace(new RegExp(t,"g"),l[t])}),e=e.replace(new RegExp("7","g"),"0")),e},u={"周日":0,"周一":1,"周二":2,"周三":3,"周四":4,"周五":5,"周六":6},d={name:"week",mixins:[s["a"]],props:{day:{type:String,default:"*"}},data:function(){return{WEEK_MAP:u,WEEK_MAP_EN:l}},computed:{disableChoice:function(){return this.day&&"?"!==this.day||this.disabled}},watch:{value_c:function(e,t){this.updateValue()},day:function(e){this.updateValue()}},methods:{updateValue:function(){this.$emit("change",this.disableChoice?"?":this.value_c)},preProcessProp:function(e){return c(e)}},created:function(){this.DEFAULT_VALUE="*",this.minValue=0,this.maxValue=6,this.valueRange.start=0,this.valueRange.end=6,this.valueLoop.start=2,this.valueLoop.interval=1,this.parseProp(this.prop)}},p=d,h=(a("6229"),a("2877")),m=Object(h["a"])(p,n,i,!1,null,"5ad3b3fb",null);t["default"]=m.exports},b377:function(e,t,a){"use strict";var n=a("9f79"),i=a.n(n);i.a},b5d7:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"input-cron"},[a("el-input",{staticStyle:{width:"auto"},attrs:{placeholder:e.placeholder,disabled:e.disabled},model:{value:e.editCronValue,callback:function(t){e.editCronValue=t},expression:"editCronValue"}},[a("a",{staticClass:"config-btn",attrs:{slot:"append",disabled:e.disabled},on:{click:e.showConfigDlg},slot:"append"},[a("Icon",{staticStyle:{"margin-right":"5px"},attrs:{type:"ios-calendar-outline"}}),e._v("配置\n ")],1)]),a("el-modal",{attrs:{title:"配置Cron表达式",closable:!0,width:""+(e.width+50),"footer-hide":!0},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[a("div",[a("easy-cron",{style:"width: "+e.width+"px",attrs:{exeStartTime:e.exeStartTime,hideYear:e.hideYear,remote:e.remote,hideSecond:e.hideSecond},model:{value:e.editCronValue,callback:function(t){e.editCronValue=t},expression:"editCronValue"}})],1)])],1)},i=[],s=(a("c5f6"),a("4451")),r={name:"input-cron",model:{prop:"cronValue",event:"change"},props:{cronValue:{type:String,default:""},width:{type:Number,default:700},placeholder:{type:String,default:"请输入cron表达式"},disabled:{type:Boolean,default:!1},exeStartTime:{type:[Number,String,Object],default:0},hideSecond:{type:Boolean,default:!1},hideYear:{type:Boolean,default:!1},remote:{type:Function,default:null}},data:function(){return{editCronValue:this.cronValue,show:!1}},watch:{cronValue:function(e,t){e!==this.editCronValue&&(this.editCronValue=e)},editCronValue:function(e,t){this.$emit("change",e)}},methods:{showConfigDlg:function(){this.disabled||(this.show=!0)}},components:{EasyCron:s["default"]}},o=r,l=(a("e928"),a("2877")),c=Object(l["a"])(o,n,i,!1,null,"97623ad2",null);t["default"]=c.exports},b874:function(e,t,a){"use strict";var n=a("82b1"),i=a.n(n);i.a},b9cf:function(e,t,a){},ba9e:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-collapse",{model:{value:e.activeNames,callback:function(t){e.activeNames=t},expression:"activeNames"}},[a("avue-form",{ref:"form",attrs:{option:e.activeHealthCheckOption},on:{submit:e.handleUpstreamUpdate},scopedSlots:e._u([{key:"fail_http_statuses",fn:function(t){return[e._v("\n "+e._s(t)+"\n "),a("item-tags",{attrs:{tags:e.activeHealthForm.fail_http_statuses,name:"",column:"fail_http_statuses",mode:e.mode},on:{sendTag:e.bindTags}})]}},{key:"http_statuses",fn:function(t){return[e._v("\n "+e._s(t)+"\n "),a("item-tags",{attrs:{tags:e.activeHealthForm.http_statuses,name:"",column:"http_statuses",mode:e.mode},on:{sendTag:e.bindTags}})]}}]),model:{value:e.activeHealthForm,callback:function(t){e.activeHealthForm=t},expression:"activeHealthForm"}},["view"!=e.mode?a("template",{slot:"menuForm"},[a("el-button",{staticClass:"el-icon-check",attrs:{type:"primary"},on:{click:e.handlerSubmit}},[e._v("提 交")]),a("el-button",{staticClass:"el-icon-delete",on:{click:e.handleEmpty}},[e._v("清 空")])],1):e._e()],2)],1)],1)},i=[],s=a("5176"),r=a.n(s),o=(a("ac6a"),a("fef3")),l=a("2ed6"),c=a("ca60"),u={name:"healthCheck",components:{ItemTags:c["default"]},data:function(){return{activeHealthCheckOption:o["a"],passiveHealthCheckOption:o["d"],targetColumn:o["m"],activeHealthForm:{http_statuses:["200","304"],fail_http_statuses:["429","404","500","501","502","503","504","505"]},passiveHealthForm:{},activeNames:"active",grade:{box:!0}}},props:{upstream:{type:Object,required:!1},mode:{required:!0}},created:function(){console.log(this.upstream),this.initform(this.upstream),this.initOptions()},methods:{initOptions:function(){var e=this;this.activeHealthCheckOption.group.forEach(function(t){t.column.forEach(function(t){t["disabled"]="view"==e.mode})})},bindTags:function(e){this.activeHealthForm=r()(this.activeHealthForm,e)},handlerSubmit:function(){this.$refs.form.submit()},initform:function(e){if(e.healthchecks){var t=_.cloneDeep(e.healthchecks.active);_.cloneDeep(e.healthchecks.passive);this.activeHealthForm=t,this.activeHealthForm.http_statuses=t.healthy.http_statuses,this.activeHealthForm.successes=t.healthy.successes,this.activeHealthForm.fail_http_statuses=t.unhealthy.http_statuses,this.activeHealthForm.http_failures=t.unhealthy.http_failures,this.activeHealthForm.tcp_failures=t.unhealthy.tcp_failures,this.activeHealthForm.timeouts=t.unhealthy.timeouts,this.activeHealthForm.interval=t.unhealthy.interval,this.activeHealthForm.healthy_interval=t.healthy.interval}},handleUpstreamUpdate:function(e,t){var a=this;this.upstream.healthchecks.active.healthy.http_statuses=this.activeHealthForm.http_statuses,this.upstream.healthchecks.active.healthy.successes=this.activeHealthForm.successes,this.upstream.healthchecks.active.healthy.interval=this.activeHealthForm.healthy_interval,this.upstream.healthchecks.active.unhealthy.http_statuses=this.activeHealthForm.fail_http_statuses,this.upstream.healthchecks.active.unhealthy.http_failures=this.activeHealthForm.http_failures,this.upstream.healthchecks.active.unhealthy.tcp_failures=this.activeHealthForm.tcp_failures,this.upstream.healthchecks.active.unhealthy.timeouts=this.activeHealthForm.timeouts,this.upstream.healthchecks.active.unhealthy.interval=this.activeHealthForm.interval,this.upstream.healthchecks.active.type=this.activeHealthForm.type,this.upstream.healthchecks.active.http_path=this.activeHealthForm.http_path,this.upstream.healthchecks.active.timeout=this.activeHealthForm.timeout,this.upstream.healthchecks.active.https_sni=this.activeHealthForm.https_sni,this.upstream.healthchecks.active.concurrency=this.activeHealthForm.concurrency,this.upstream.healthchecks.active.https_verify_certificate=this.activeHealthForm.https_verify_certificate,Object(l["g"])(this.upstream).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):a.$successInfo("修改成功"),t()})}}},d=u,p=a("2877"),h=Object(p["a"])(d,n,i,!1,null,null,null);t["default"]=h.exports},c379:function(e,t,a){"use strict";var n=a("46dc"),i=a.n(n);i.a},c541:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("search-banner",{ref:"routeSearch",attrs:{span:21,placeholder:"请输入NAME、PATHS或HOSTS",handleList:e.handleList,searchProps:e.searchProps,page:e.page},on:{"search-change":e.searchChange}},[a("template",{slot:"menu"},[e.permission.route_update||e.isDevProfile?a("update-hosts",{on:{callback:e.reloadDataList}}):e._e()],1)],2),a("avue-crud",{attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading,page:e.page},on:{"row-click":e.handleRowClick,"row-save":e.handleSave,"row-del":e.handleDel,"refresh-change":e.handlerefreshChange,"current-change":e.handleCurrentChange,"size-change":e.handleCurrentSize,"search-change":e.handleSearchChange,"expand-change":e.expandChanges},scopedSlots:e._u([{key:"expand",fn:function(e){var t=e.row;return[a("el-form",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"},attrs:{"label-width":"80px"}},[a("el-form-item",{attrs:{label:"PATHS"}},[a("item-tags",{attrs:{tags:t.paths,name:"匹配路径",column:"paths",mode:"view"}})],1),a("el-form-item",{attrs:{label:"插件"}},[a("query-plugins",{attrs:{route:t,mode:"view"}})],1)],1)]}},{key:"name",fn:function(t){var n=t.row;return[a("el-link",{attrs:{underline:!1,type:"success"},on:{click:function(t){return e.toDetail(n)}}},[e._v(e._s(n.name))])]}},{key:"service",fn:function(t){var n=t.row;return[a("el-link",{attrs:{underline:!1,type:"success"},on:{click:function(t){return e.toServiceDetail(n)}}},[e._v(e._s(n.serviceName))])]}},{key:"hosts",fn:function(e){var t=e.row;return[a("item-tags",{attrs:{tags:t.hosts,column:"hosts",mode:"view"}})]}},{key:"paths",fn:function(e){var t=e.row;return[a("item-tags",{attrs:{tags:t.paths,column:"paths",mode:"view"}})]}},{key:"menuLeft",fn:function(e){e.row}},{key:"menu",fn:function(t){return[e.permission.route_update||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-edit",size:"small",plain:"",type:"primary"},on:{click:function(a){return e.handleGrade(t.row,t.$index)}}},[e._v("编辑")]):e._e(),e.permission.route_delete||e.isDevProfile?a("el-button",{attrs:{icon:"el-icon-delete",size:"small",plain:"",type:"danger"},on:{click:function(a){return e.handleDel(t.row,t.$index)}}},[e._v("删除")]):e._e()]}}])}),e.grade.box?a("el-dialog",{attrs:{title:"路由管理",width:"70%",visible:e.grade.box},on:{"update:visible":function(t){return e.$set(e.grade,"box",t)}}},[a("uphold-route",{attrs:{route:e.form,mode:"edit"},on:{callback:e.reloadDataList}})],1):e._e(),e.grade.drawerDetail?a("el-drawer",{attrs:{size:"45%",title:"'"+e.form.name+"' 详情",visible:e.grade.drawerDetail,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){return e.$set(e.grade,"drawerDetail",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("uphold-route",{attrs:{route:e.form,mode:"view"}})],1)]):e._e(),e.grade.drawerServiceDetail?a("el-drawer",{attrs:{size:"100%",title:"'"+e.form.serviceName+"'服务的详情",visible:e.grade.drawerServiceDetail,direction:e.direction,"before-close":e.handleClose},on:{"update:visible":function(t){return e.$set(e.grade,"drawerServiceDetail",t)}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("upload-service",{attrs:{service:{id:e.form.service.id,name:e.form.serviceName},mode:"view"}})],1)]):e._e()],1)],1)},i=[],s=a("5176"),r=a.n(s),o=(a("7f7f"),a("ac6a"),a("cebc")),l=a("fef3"),c=a("5880"),u=a("ceee"),d=a("e8cd"),p=a("2e8b"),h=a("848d"),m=a("3aa7"),f=a("ca60"),g=a("2bdd"),b={name:"routing",components:{upholdRoute:d["default"],searchBanner:h["default"],ItemTags:f["default"],queryPlugins:m["default"],uploadService:g["default"],updateHosts:p["default"]},data:function(){return{tableSearch:{},tableOption:l["h"],service_items:[],searchProps:[{name:"name"},{name:"paths",type:"array"},{name:"hosts",type:"array"},{name:"serviceName"}],tableData:[],tablePage:1,tableSize:10,tableLoading:!1,form:{},page:{total:0,currentPage:1,pageSize:10},grade:{box:!1,drawerDetail:!1,drawerServiceDetail:!1}}},computed:Object(o["a"])({},Object(c["mapGetters"])(["permission","isDevProfile","isProdProfile","systemProfile"])),props:{type:{type:String,required:!1}},filters:{sname:function(e,t){var a=e;return t.forEach(function(t){if(t.id==e)return a=t.name,a}),a}},created:function(){var e=this;-1==this.systemProfile.id?this.$nextTick(function(t){e.$router.push("/wel/index")}):(this.handleServiceList(),this.initOptions())},methods:{initOptions:function(){this.isDevProfile?this.tableOption["menu"]=!0:this.permission.route_update||(this.tableOption["menu"]=!1)},toDetail:function(e){this.form=e,this.grade.drawerDetail=!0},toServiceDetail:function(e){this.form=e,this.grade.drawerServiceDetail=!0},handleServiceList:function(){var e=this;Object(u["c"])(r()({},this.form)).then(function(t){var a=t.data;e.service_items=a.data})},handleGrade:function(e,t){e&&e.id?this.form=e:this.form={},this.grade.box=!0},expandChanges:function(e,t){},handleCurrentChange:function(e){this.tablePage=e,this.refreshTableList(!0)},handleCurrentSize:function(e){this.tableSize=e,this.refreshTableList(!1)},handleList:function(e){var t=this;return this.tableLoading=!0,Object(u["a"])(r()({},e)).then(function(e){var a=e.data,n=a.data;return n.forEach(function(e){t.service_items.forEach(function(t){e.service.id==t.id&&(e["serviceName"]=t.name)})}),t.tableLoading=!1,n})},refreshTableList:function(e){this.initPage(e),this.$refs.routeSearch.refresh(this.page,e)},initPage:function(e){e||(this.tablePage=1),this.page.currentPage=this.tablePage,this.page.pageSize=this.tableSize},searchChange:function(e){this.tableData=e.data},reloadDataList:function(){this.initPage(!1),this.$refs.routeSearch.loadData()},handleRowClick:function(e,t,a){this.type&&this.$emit("selectionData",e)},handleDel:function(e,t){var a=this,n="";this.isProdProfile&&(n="当前为生产环境,请谨慎操作! "),this.$confirm(n+"是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u["d"])({id:e.id}).then(function(e){var t=e.data;0!=t.status?a.$errorInfo(t.errmsg):(a.$successInfo("删除成功"),a.reloadDataList())})}).catch(function(){})}}},v=b,y=(a("ebdc"),a("2877")),_=Object(y["a"])(v,n,i,!1,null,null,null);t["default"]=_.exports},c83a:function(e,t,a){"use strict";var n=a("81fd"),i=a.n(n);i.a},c980:function(e,t,a){"use strict";var n=a("0b18"),i=a.n(n);i.a},c9b6:function(e,t,a){"use strict";var n=a("2ab7"),i=a.n(n);i.a},ca05:function(e,t,a){"use strict";a.d(t,"g",function(){return i}),a.d(t,"f",function(){return s}),a.d(t,"d",function(){return r}),a.d(t,"b",function(){return o}),a.d(t,"e",function(){return l}),a.d(t,"a",function(){return c}),a.d(t,"c",function(){return u});var n=a("e349"),i=(a("074d"),{maxHeight:900,labelWidth:120,index:!0,border:!0,menuBtn:!0,selection:!0,addBtn:!1,delBtn:!1,editBtn:!1,refreshBtn:!1,columnBtn:!1,menuAlign:"left",align:"center",searchSize:"mini",menuWidth:180,column:[{label:"用户账号",prop:"userId",width:"150",fixed:!0,editDisabled:!0,rules:[{required:!0,message:"请输入用户账号",trigger:"blur"}]},{label:"用户名",prop:"name",width:"120",fixed:!0,rules:[{required:!0,message:"请输入用户名",trigger:"blur"}]},{label:"邮箱",prop:"email",width:"200",rules:[{required:!0,message:"请输入邮箱",trigger:"blur"}]},{label:"手机号",prop:"mobile",width:"120",formatter:function(e,t,a,n){if(t&&11==t.length){var i=t.substr(0,3)+"****"+t.substr(7);return i}return t}},{label:"所属用户组",prop:"userGroupList",align:"left",slot:!0},{label:"注册时间",prop:"create_at",sortable:!0,type:"datetime",width:160,format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return t}}]}),s={maxHeight:900,labelWidth:120,index:!0,border:!0,menuBtn:!0,addBtn:!1,delBtn:!1,editBtn:!1,refreshBtn:!1,columnBtn:!1,menuAlign:"left",align:"center",searchSize:"mini",menu:!0,menuWidth:260,column:[{label:"用户组名称",prop:"name",width:"150",span:24,fixed:!0,rules:[{required:!0,message:"请输入用户组名称",trigger:"blur"}]},{label:"是否有效",prop:"useYn",type:"switch",value:"y",span:24,dicData:n["a"].USE_YN,rules:[{required:!0,message:"请选择",trigger:"blur"}]},{span:24,label:"备注",prop:"remark",type:"textarea"},{label:"创建时间",prop:"create_at",addDisplay:!1,editDisplay:!1,format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",type:"date"}]},r={maxHeight:900,labelWidth:120,index:!0,border:!0,menuBtn:!0,addBtn:!1,delBtn:!1,editBtn:!1,refreshBtn:!1,columnBtn:!1,menuAlign:"left",align:"center",searchSize:"mini",menu:!0,menuWidth:300,column:[{label:"角色名称",prop:"name",width:"150",span:24,fixed:!0,rules:[{required:!0,message:"请输入角色名称",trigger:"blur"}]},{label:"角色编码",prop:"code",span:24,width:"120",editDisabled:!0,rules:[{required:!0,message:"请输入角色编码",trigger:"blur"}]},{label:"角色类型",prop:"roleType",type:"radio",value:"menu",span:24,width:"120",dicData:n["a"].ROLE_TYPE,rules:[{required:!0,message:"请选择角色类型",trigger:"blur"}]},{label:"是否有效",prop:"useYn",type:"switch",value:"y",span:24,width:"80",dicData:n["a"].USE_YN,rules:[{required:!0,message:"请选择",trigger:"blur"}]},{span:24,label:"备注",prop:"remark",type:"textarea"},{label:"创建时间",prop:"create_at",width:"140",addDisplay:!1,editDisplay:!1,format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",type:"date"}]},o={emptyBtn:!1,submitBtn:!1,column:[{label:"父节点ID",prop:"parentId",readonly:!0,disabled:!0,span:24,labelWidth:100},{label:"功能点名称",prop:"name",span:24,labelWidth:100,rules:[{required:!0,message:"请输入菜单名称",trigger:"blur"}]},{label:"功能点编码",prop:"code",span:24,width:80,labelWidth:100},{label:"是否可用",prop:"useYn",type:"switch",formslot:!0,value:"y",span:24,dicData:n["a"].USE_YN,width:80,labelWidth:100},{label:"显示顺序",prop:"sortOrder",type:"number",formslot:!0,span:24,width:80,labelWidth:100}]},l={emptyBtn:!1,submitBtn:!1,column:[{label:"用户名",prop:"userId",span:24,labelWidth:100,rules:[{required:!0,message:"请输入用户名",trigger:"blur"}]},{label:"姓名",prop:"name",span:24,width:80,labelWidth:100},{label:"手机号",prop:"mobile",span:24,width:80,labelWidth:100},{label:"邮箱",prop:"email",span:24,width:80,labelWidth:100}]},c={emptyBtn:!1,submitBtn:!1,column:[{label:"父节点ID",prop:"parentId",readonly:!0,disabled:!0,span:24,width:120},{label:"菜单名称",prop:"name",span:24,width:80,rules:[{required:!0,message:"请输入菜单名称",trigger:"blur"}]},{label:"菜单视图",prop:"visitView",formslot:!0,span:24,width:80},{label:"访问路径",prop:"visitPath",span:24,width:80,placeholder:"例如:/role"},{label:"菜单图标",prop:"menuIcon",span:24,width:80},{label:"是否可用",prop:"useYn",type:"switch",formslot:!0,value:"y",span:24,dicData:n["a"].USE_YN,width:80},{label:"显示顺序",prop:"sortOrder",type:"number",formslot:!0,span:24,width:80}]},u={children:"children",label:"name",id:"id"}},ca07:function(e,t,a){},ca50:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-timeline",e._l(e.logData,function(t,n){return a("el-timeline-item",{key:n,attrs:{size:0==n?"large":"normal",color:"success"==t.status?"#0bbd87":"red",timestamp:e._f("parseTime")(t.create_at)}},[e._v(e._s(n+1)+". "+e._s(t.comment))])}),1)],1)},i=[],s=(a("7f7f"),a("78ba")),r={data:function(){return{logData:[]}},props:{syncConfig:{type:Object,required:!0},service:{type:Object,required:!0},client:{type:Object,required:!0}},created:function(){this.findSyncLog()},methods:{findSyncLog:function(){var e=this;Object(s["c"])({syncNo:this.syncConfig.syncNo,service:this.service.name,dest_client:this.client.url}).then(function(t){e.logData=t.data.data})}}},o=r,l=a("2877"),c=Object(l["a"])(o,n,i,!1,null,null,null);t["default"]=c.exports},ca60:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",["edit"==e.mode||"add"==e.mode?[e._l(e.tags,function(t){return a("el-tag",{key:t,attrs:{closable:"","disable-transitions":!1},on:{close:function(a){return e.handleClose(t)}}},[e._v(e._s(t))])}),a("el-input",{ref:"saveTagInput",staticClass:"input-new-tag",attrs:{placeholder:"新增"+e.name+",支持批量添加,请以逗号、分号或空格分隔即可"},on:{blur:e.handleInputConfirm},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleInputConfirm(t)}},model:{value:e.inputValue,callback:function(t){e.inputValue=t},expression:"inputValue"}})]:e._e(),"view"==e.mode?e._l(e.tags,function(t){return a("el-tag",{key:t,attrs:{"disable-transitions":!1},on:{close:function(a){return e.handleClose(t)}}},[e._v(e._s(t.constructor==Object?t[e.column]:t))])}):e._e()],2)},i=[],s=(a("ac6a"),a("28a5"),a("a481"),{name:"ItemTags",data:function(){return{inputValue:"",inputVisible:!1}},props:{name:{required:!0},column:{required:!1},mode:{required:!1},tags:{type:Array,required:!0}},created:function(){this.tags||(this.tags=[])},methods:{handleClose:function(e){this.tags.splice(this.tags.indexOf(e),1),this.sendTag()},showInput:function(){var e=this;this.inputVisible=!0,this.$nextTick(function(t){e.$refs.saveTagInput.$refs.input.focus()})},handleInputConfirm:function(){var e=this,t=this.inputValue;if(this.tags||(this.tags=[]),t){t=t.replace(/;/g,","),t=t.replace(/ /g,",");var a=t.split(",");a.forEach(function(t){t.trim()&&e.tags.push(t.trim())})}this.inputVisible=!1,this.inputValue="",this.sendTag()},sendTag:function(){var e={};e[this.column]=this.tags,this.$emit("sendTag",e)}}}),r=s,o=(a("6bae"),a("2877")),l=Object(o["a"])(r,n,i,!1,null,null,null);t["default"]=l.exports},cce4:function(e,t,a){"use strict";var n=a("ca07"),i=a.n(n);i.a},cd05:function(e,t,a){"use strict";var n=a("b9cf"),i=a.n(n);i.a},ce4a:function(e,t,a){"use strict";a.d(t,"b",function(){return s}),a.d(t,"a",function(){return r}),a.d(t,"e",function(){return o}),a.d(t,"c",function(){return l}),a.d(t,"d",function(){return c});var n=a("b5c6"),i=a("074d"),s=function(){return Object(n["a"])({url:i["a"].path+"/system/server/configs",method:"get"})},r=function(e){return Object(n["a"])({url:i["a"].path+"/system/server/configs",method:"post",data:e})},o=function(e){return Object(n["a"])({url:i["a"].path+"/system/server/configs/"+e.id,method:"post",data:e})},l=function(e){return Object(n["a"])({url:i["a"].path+"/system/server/configs/"+e,method:"get"})},c=function(){return Object(n["a"])({url:i["a"].path+"/system/envs/configTypes",method:"get"})}},ceee:function(e,t,a){"use strict";a.d(t,"a",function(){return s}),a.d(t,"c",function(){return r}),a.d(t,"e",function(){return o}),a.d(t,"f",function(){return l}),a.d(t,"d",function(){return c}),a.d(t,"b",function(){return u}),a.d(t,"g",function(){return d});a("7f7f");var n=a("b5c6"),i=a("074d"),s=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/routes",method:"get"})},r=function(){return Object(n["a"])({url:i["a"].path+"/kong/api/services",method:"get"})},o=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/services/"+e.service.id+"/routes",method:"post",data:e})},l=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/routes/"+e.id,method:"post",data:e})},c=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/routes/"+e.id,method:"delete"})},u=function(e,t){return Object(n["a"])({url:i["a"].path+"/kong/api/services/"+e.name+"/routes/list",method:"post",data:t})},d=function(e){return Object(n["a"])({url:i["a"].path+"/kong/api/routes/hosts",method:"post",data:e})}},d6b3:function(e,t,a){},d793:function(e,t,a){"use strict";var n=a("7b08"),i=a.n(n);i.a},d9f2:function(e,t,a){},df9f:function(e,t,a){"use strict";var n=a("6d94"),i=a.n(n);i.a},dfc5:function(e,t,a){},e17e:function(e,t,a){"use strict";a.d(t,"e",function(){return s}),a.d(t,"f",function(){return r}),a.d(t,"d",function(){return o}),a.d(t,"c",function(){return l}),a.d(t,"g",function(){return c}),a.d(t,"a",function(){return u}),a.d(t,"b",function(){return d});var n=a("b5c6"),i=a("074d"),s=function(e){return Object(n["a"])({url:i["a"].path+"/system/user",method:"post",data:e})},r=function(e){return Object(n["a"])({url:i["a"].path+"/system/user/"+e.userId,method:"post",data:e})},o=function(e){return Object(n["a"])({url:i["a"].path+"/system/user/reset/"+e+"/",method:"post"})},l=function(e){return Object(n["a"])({url:i["a"].path+"/system/user/modifypwd/",method:"post",data:e})},c=function(e){return Object(n["a"])({url:i["a"].path+"/system/user/updateUserRole",method:"post",data:e})},u=function(e){return Object(n["a"])({url:i["a"].path+"/system/user/page",method:"get",params:e})},d=function(e){return Object(n["a"])({url:i["a"].path+"/system/user/list",method:"get",params:e})}},e255:function(e,t,a){},e378:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("basic-container",[a("div",[a("el-row",{staticStyle:{"margin-bottom":"5px","margin-left":"5px","margin-right":"5px"}},[a("el-col",{attrs:{span:"2"}},[a("el-button",{attrs:{size:"small",icon:"el-icon-plus",type:"primary"},on:{click:e.toAdd}},[e._v("新增用户")])],1),a("el-col",{attrs:{span:"2"}},[a("el-popover",{attrs:{placement:"right-start",title:"用户组"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("setting-user-group",{attrs:{userInfo:{userGroupList:[]},userIds:e.checkedUsers,mode:e.mode,userGroupList:e.userGroupList},on:{callback:e.handleList}}),e.permission.user_authority?a("el-button",{attrs:{slot:"reference",size:"small",icon:"el-icon-plus",type:"primary"},slot:"reference"},[e._v("批量授权")]):e._e()],1)],1),a("el-col",{attrs:{span:e.permission.user_authority?20:24}},[a("el-input",{staticClass:"input-with-select",attrs:{size:"small",placeholder:"请输入用户名或姓名",maxlength:"20",clearable:""},model:{value:e.searchForm,callback:function(t){e.searchForm=t},expression:"searchForm"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},slot:"append"})],1)],1)],1)],1),a("avue-crud",{staticStyle:{cursor:"pointer"},attrs:{option:e.tableOption,data:e.tableData,"table-loading":e.tableLoading,page:e.page},on:{"row-save":e.handleSave,"row-update":e.handleUpdate,"refresh-change":e.handlerefreshChange,"current-change":e.handleCurrentChange,"size-change":e.handleCurrentSize,"search-change":e.handleSearchChange,"selection-change":e.selectionChange},scopedSlots:e._u([{key:"userGroupList",fn:function(t){var n=t.row;return[a("setting-user-group",{key:n.userId,attrs:{userInfo:n,userIds:[n],mode:e.mode,userGroupList:e.userGroupList},on:{callback:e.handleList}})]}},{key:"menu",fn:function(t){return[a("el-button",{attrs:{size:"mini",icon:"el-icon-edit",plain:"",type:"primary"},on:{click:function(a){return e.toEdit(t.row,t.index)}}},[e._v("编辑")]),a("el-button",{attrs:{size:"mini",icon:"el-icon-refresh",plain:"",type:"primary"},on:{click:function(a){return e.toResetpwd(t.row,t.index)}}},[e._v("重置")])]}}]),model:{value:e.objData,callback:function(t){e.objData=t},expression:"objData"}}),e.upholdBox?a("el-drawer",{attrs:{title:"add"==e.mode?"新增用户":"编辑用户",size:"50%",visible:e.upholdBox,direction:e.direction},on:{"update:visible":function(t){e.upholdBox=t}}},[a("div",{staticStyle:{"margin-left":"10px","overflow-y":"auto","overflow-x":"auto",height:"90%"}},[a("uphold-user",{attrs:{entity:e.upholdEntity,mode:e.mode},on:{callback:e.handleList}})],1)]):e._e()],1)},i=[],s=a("5176"),r=a.n(s),o=a("cebc"),l=a("5880"),c=a("ca05"),u=a("e17e"),d=a("3523"),p=a("ca60"),h=a("2fa5"),m=a("4819"),f={name:"syncLog",components:{ItemTags:p["default"],SettingUserGroup:h["default"],upholdUser:m["default"]},data:function(){return{tableOption:c["g"],tableData:[],tablePage:1,tableSize:10,tableLoading:!1,searchForm:null,checkedRoles:[],userGroupList:[],visible:!1,checkedUsers:[],userInfo:{},upholdEntity:{},mode:"add",upholdBox:!1,page:{total:0,currentPage:1,pageSize:10}}},created:function(){this.handleList(),this.init()},mounted:function(){},watch:{searchForm:function(e){this.page.currentPage=1,this.handleList()}},computed:Object(o["a"])({},Object(l["mapGetters"])(["permission"])),methods:{init:function(){var e=this;Object(d["e"])().then(function(t){e.userGroupList=t.data})},toAdd:function(){this.upholdEntity={},this.mode="add",this.upholdBox=!0},toEdit:function(e){this.upholdEntity=e,this.mode="edit",this.upholdBox=!0},toSingleRole:function(e,t){this.checkedUsers=[e],this.userInfo=e,this.configMenuBox=!0},selectionChange:function(e){this.checkedUsers=e},updateUserRole:function(){var e=this;this.checkedUsers&&0==this.checkedUsers.length||0==this.checkedRoles.length?this.$errorInfo("请选择需要授权的用户或角色列表"):Object(u["g"])({userInfos:this.checkedUsers,systemRoles:this.checkedRoles}).then(function(t){0!=t.data.status?e.$errorInfo(t.data.errmsg):(e.$successInfo("更新成功"),e.visible=!1,e.checkedRoles=[])})},handlerefreshChange:function(e){this.handleList(this.tableSearch)},handleCurrentChange:function(e){this.tablePage=e,this.handlerefreshChange()},handleCurrentSize:function(e){this.tableSize=e,this.handlerefreshChange()},handleSearchChange:function(e){this.tableSearch=e,this.handleList(this.tableSearch)},toResetpwd:function(e){var t=this;this.$confirm("确定重置用户密码为123456,是否确认?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u["d"])(e.userId).then(function(e){var a=e.data;0!=a.status?t.$message.error(a.msg):(t.handleList(),t.$message.success("重置成功"))})})},handleList:function(e){var t=this;this.tableLoading=!0,this.upholdBox=!1,this.form={name:this.searchForm&&this.searchForm.trim()},Object(u["a"])(r()({},this.form,{start:this.tablePage,limit:this.tableSize})).then(function(e){var a=e.data.data;t.tableData=a.items,t.page={total:a.totalCount,currentPage:t.tablePage,pageSize:t.tableSize},t.tableLoading=!1})}}},g=f,b=a("2877"),v=Object(b["a"])(g,n,i,!1,null,null,null);t["default"]=v.exports},e37e:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("avue-tabs",{attrs:{option:e.option},on:{change:e.handleChange,submit:e.handleSubmit},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}})],1)],1)},i=[],s=a("cebc"),r={column:[{label:"个人信息",prop:"info",option:{submitText:"修改",column:[{label:"用户名",span:12,disabled:!0,row:!0,prop:"userId"},{label:"姓名",row:!0,prop:"name"},{label:"手机号",span:12,row:!0,prop:"mobile"},{label:"邮箱",prop:"email",row:!0}]}},{label:"修改密码",prop:"password",option:{submitText:"修改",column:[{label:"原密码",span:12,row:!0,type:"password",prop:"oldpassword"},{label:"新密码",span:12,row:!0,type:"password",prop:"newpassword"},{label:"确认密码",span:12,row:!0,type:"password",prop:"newpasswords"}]}}]},o=a("5880"),l=a("e17e"),c=a("0e0b"),u={data:function(){return{type:"info",option:r,form:{}}},created:function(){this.handleWitch()},computed:Object(s["a"])({},Object(o["mapGetters"])(["permission","userInfo"])),methods:{handleSubmit:function(){"info"==this.type&&this.handleEntityUpdate(),"password"==this.type&&this.handlerModifyPwd()},handlerModifyPwd:function(){var e=this,t=Object(c["c"])({data:this.form,type:"Base64",key:"avue",param:["oldpassword","newpassword"]});Object(l["c"])({userId:this.userInfo.userId,oldpassword:t.oldpassword,newpassword:t.newpassword}).then(function(t){var a=t.data;0!=a.status?e.$message.error(a.errmsg):(e.$message.success("修改成功,退出后重新登录"),e.$store.dispatch("LogOut").then(function(){e.$router.push({path:"/login"})}))})},handleEntityUpdate:function(){var e=this;Object(l["f"])(this.form).then(function(t){var a=t.data;0!=a.status?e.$message.error(a.errmsg):(e.$store.dispatch("GetUserInfo").then(function(){}),e.$message.success("修改成功"))}).catch(function(t){e.$message.error("更新失败")})},handleWitch:function(){"info"===this.type?this.form=_.cloneDeep(this.userInfo):"password"===this.type&&(this.form=_.cloneDeep({}))},handleChange:function(e){this.type=e.prop,this.handleWitch()}}},d=u,p=a("2877"),h=Object(p["a"])(d,n,i,!1,null,null,null);t["default"]=h.exports},e527:function(e,t,a){},e59a:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e._l(e.dynamicTags,function(t){return a("el-tag",{key:t,attrs:{closable:"view"!=e.mode,"disable-transitions":!1},on:{close:function(a){return e.handleClose(t)}}},[e._v(e._s(t.name))])}),e.inputVisible?a("el-autocomplete",{ref:"saveTagInput",staticStyle:{"margin-left":"10px"},attrs:{"popper-class":"my-autocomplete","fetch-suggestions":e.remoteMethod,placeholder:"请输入姓名进行检索"},on:{select:e.handleSelect},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item;return[a("div",{staticClass:"name"},[e._v(e._s(n.name))]),a("span",{staticClass:"addr"},[e._v(e._s(n.mobile))])]}}],null,!1,3326133321),model:{value:e.state,callback:function(t){e.state=t},expression:"state"}},[a("i",{staticClass:"el-icon-edit el-input__icon",attrs:{slot:"suffix"},slot:"suffix"})]):a("el-button",{directives:[{name:"show",rawName:"v-show",value:"add"==e.mode,expression:"mode=='add'"}],staticClass:"button-new-tag el-icon-plus",attrs:{size:"small"},on:{click:e.showInput}},[e._v("新增用户")])],2)},i=[],s=(a("7f7f"),a("20d6"),a("cebc")),r=a("5880"),o=a("e17e"),l=a("3523"),c={data:function(){return{dynamicTags:this.userGroup.userList,loading:!1,options:[],state:null,userLists:[],inputVisible:!1,inputValue:""}},created:function(){this.init()},props:{mode:{},userGroup:{}},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission"])),methods:{init:function(){var e=this;Object(o["b"])().then(function(t){e.userLists=t.data.data,e.options=e.userLists}),this.permission.usergroup_config||(this.mode="view")},handleSelect:function(e){var t=this,a=_.findIndex(this.dynamicTags,function(t){return e.userId==t.userId});-1==a?Object(l["i"])(this.userGroup.id,e.userId).then(function(a){0==a.data.status?(t.dynamicTags.push(e),t.$successInfo("新增用户成功")):t.$errorInfo(a.data.errmsg)}):this.$errorInfo(e.name+" 已经设置过了")},handleClose:function(e){var t=this;Object(l["c"])(this.userGroup.id,e.userId).then(function(a){0==a.data.status?(t.dynamicTags.splice(t.dynamicTags.indexOf(e),1),t.$successInfo("删除用户成功")):t.$errorInfo(a.data.errmsg)})},remoteMethod:function(e,t){this.options=""!==e?this.userLists.filter(function(t){return t.name.indexOf(e)>-1}):this.userLists,t(this.options)},showInput:function(){var e=this;this.inputVisible=!0,this.$nextTick(function(t){e.$refs.saveTagInput.$refs.input.focus()})}}},u=c,d=(a("9d0c"),a("2877")),p=Object(d["a"])(u,n,i,!1,null,null,null);t["default"]=p.exports},e8cd:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-tabs",{ref:"upstreamTabs",attrs:{"tab-position":e.tabPosition}},[a("el-tab-pane",{ref:"targetTab",attrs:{label:"基本信息"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-info"}),e._v(" 基本信息\n ")]),a("avue-form",{ref:"routeForm",attrs:{option:e.routeColumn},on:{submit:e.handleRoute},model:{value:e.targetForm,callback:function(t){e.targetForm=t},expression:"targetForm"}},[a("template",{slot:"hosts"},[a("item-tags",{attrs:{tags:e.targetForm.hosts,name:"主机",column:"hosts",mode:e.mode},on:{sendTag:e.bindTags}})],1),a("template",{slot:"paths"},[a("item-tags",{attrs:{tags:e.targetForm.paths,name:"匹配路由",column:"paths",mode:e.mode},on:{sendTag:e.bindTags}})],1),a("template",{slot:"methods"},[a("item-tags",{attrs:{tags:e.targetForm.methods,name:"请求方法",column:"methods",mode:e.mode},on:{sendTag:e.bindTags}})],1),"view"!=e.mode?a("template",{slot:"menuForm"},[a("el-button",{staticClass:"el-icon-check",attrs:{type:"primary"},on:{click:e.handlerSubmit}},[e._v("提 交")]),a("el-button",{staticClass:"el-icon-delete",on:{click:e.handleEmpty}},[e._v("清 空")])],1):e._e()],2)],1),"add"!=e.mode?a("el-tab-pane",{ref:"targetTab",attrs:{label:" 路由插件"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-success"}),e._v("\n 路由插件\n ")]),a("query-plugins",{attrs:{route:e.route,mode:e.mode}})],1):e._e()],1)],1)},i=[],s=a("5176"),r=a.n(s),o=(a("ac6a"),a("fef3")),l=a("ceee"),c=a("ca60"),u=a("7e8d"),d=a("3aa7"),p={name:"Route",components:{ItemTags:c["default"],listPlugin:u["default"],queryPlugins:d["default"]},data:function(){return{routeColumn:o["g"],tabPosition:"top",targetForm:{paths:[],hosts:[],methods:[]},routeData:[]}},props:{route:{type:Object,required:!1},mode:{required:!1}},created:function(){this.initOptions(),this.targetForm=_.cloneDeep(this.route),delete this.targetForm["serviceName"]},methods:{initOptions:function(){var e=this;this.routeColumn.column.forEach(function(t){t["disabled"]="view"==e.mode})},bindTags:function(e){this.targetForm=r()(this.targetForm,e)},handlerSubmit:function(){this.$refs.routeForm.submit()},handleRoute:function(e,t){"edit"==this.mode&&this.handleRouteUpdate(e,t),"add"==this.mode&&this.handleRouteSave(e,t)},handleRouteUpdate:function(e,t){var a=this;this.targetForm=r()(this.targetForm,e),Object(l["f"])(e).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.targetData=e.data.data,a.$successInfo("修改成功"),a.callback()),t()}).catch(function(e){a.$errorInfo("更新失败"),t()})},handleRouteSave:function(e,t){var a=this;this.targetForm=r()(this.targetForm,e),Object(l["e"])(e).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.targetData=e.data.data,a.$successInfo("新增成功"),a.callback()),t()}).catch(function(e){a.$errorInfo("新增失败,错误信息:",e),t()})},callback:function(){this.$emit("callback",{})}}},h=p,m=a("2877"),f=Object(m["a"])(h,n,i,!1,null,null,null);t["default"]=f.exports},e928:function(e,t,a){"use strict";var n=a("143c"),i=a.n(n);i.a},ebdc:function(e,t,a){"use strict";var n=a("8752"),i=a.n(n);i.a},ecc3:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticStyle:{"margin-bottom":"10px"}},[a("el-col",{attrs:{span:"5"}}),e._v("启用:\n "),a("el-switch",{model:{value:e.plugin.enabled,callback:function(t){e.$set(e.plugin,"enabled",t)},expression:"plugin.enabled"}})],1),a("avue-form",{attrs:{option:e.pluginColumn},on:{submit:e.handlePlugin},model:{value:e.pluginForm,callback:function(t){e.pluginForm=t},expression:"pluginForm"}},[e._l(e.slotColumns,function(t){return a("template",{slot:t.slot},[a("el-col",{key:t.slot},e._l(t.option.column,function(e){return a("el-form-item",{key:e.label,attrs:{label:e.label,size:"small"}},[a("el-input",{attrs:{value:e.label}})],1)}),1)],1)}),e._l(e.tagsColumn,function(t){return a("template",{slot:t.slot},[a("item-tags",{key:t.name,attrs:{mode:"edit",tags:e.pluginForm[t.column],name:t.name,column:t.column},on:{sendTag:e.bindTags}})],1)})],2)],1)},i=[],s=(a("a481"),a("ac6a"),a("5176")),r=a.n(s),o=(a("fef3"),a("468b")),l=a("ca60"),c={name:"plugin",components:{ItemTags:l["default"]},data:function(){return{pluginColumn:{column:[]},pluginForm:{enabled:!0},slotColumns:[],tagsColumn:[],config:{}}},props:{plugin:{type:Object,required:!0,config:{}},edit:{required:!1},fields:{type:Object}},created:function(){this.pluginForm=this.plugin["config"]||{},this.querySchema()},methods:{bindTags:function(e){this.config=r()(this.config,e)},querySchema:function(){var e=this;if(this.fields.forEach(function(t){for(var a in t){var n=e.createColumn(a,t[a]);e.pluginColumn.column.push(n)}}),this.slotColumns.length>0){var t,a={group:[],card:!0},n={label:"基本信息",column:[]},i=[];this.pluginColumn.column.forEach(function(t){var a=!1;e.slotColumns.forEach(function(n){if(n.slot==t.prop){a=!0;var s=[];n.option.column.forEach(function(t){t.prop=n.slot+"_"+t.prop,"array"==t["type"]&&e.createTagColumn(t.prop),s.push(t);var a=t.prop.replace(n.slot+"_","");console.log("itemColumn",t,t.prop,",slotColumn.slot",n.slot),e.plugin.config[n.slot]?e.pluginForm[t.prop]=e.plugin.config[n.slot][a]:"array"==t["type"]?e.pluginForm[t.prop]=[]:e.pluginForm[t.prop]=t.value}),i.push({label:n.slot,column:s})}}),a||n.column.push(t)}),a.group.push(n),(t=a.group).push.apply(t,i),this.pluginColumn=a}},createTagColumn:function(e){var t={};t.slot=e,t.tags=this.plugin.config[e]||[],t.column=e,t.name=e,this.tagsColumn.push(t)},createColumn:function(e,t,a){var n=this,i={label:e,span:24,prop:e,labelWidth:220,rules:[],value:null};i.value=t["default"];var s=t["fields"];if(s){i.formslot=!0;var r={option:{column:[]},slot:""};r.slot=e,r.form={},s.forEach(function(e){for(var t in e)r.option.column.push(n.createColumn(t,e[t],!0))}),this.slotColumns.push(r)}else if("array"==t["type"])i.type="array",i.formslot=!0,this.createTagColumn(e);else{var o=t["type"];if(o&&""!=o.trim()&&(o=this.getType(o)),t["required"]&&i["rules"].push({required:t["required"],message:"请填写"+e,trigger:"blur"}),t["default"]&&!a&&(this.pluginForm[e]=t["default"]),i.type=o,t["one_of"]){i.type="select";var l=[];t["one_of"].forEach(function(e){l.push({label:e,value:e})}),i.dicData=l}}return i},getType:function(e){switch(e){case"boolean":return"switch";case"integer":return"number";case"number":return"number";case"array":return"Array"}return"string"},handlePlugin:function(e,t){var a=this,n={};for(var i in this.pluginForm){var s=this.pluginForm[i];-1==i.indexOf("$")&&"enabled"!=i&&""!=s&&(n[i]=s)}console.log(n),this.pluginForm=n,this.plugin.config=r()(this.pluginForm,this.config),this.slotColumns.forEach(function(e){e.slot;e.option.column.forEach(function(t){var n=a.plugin.config[t.prop];if(""===n||n){delete a.plugin.config[t.prop];var i=a.plugin.config[e.slot]||{},s=t.prop.replace(e.slot+"_","");i[s]=""===n?null:n,a.plugin.config[e.slot]=i}})}),"edit"==this.edit?Object(o["f"])(this.plugin).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.plugin=n.data,a.$successInfo("修改成功"),a.callback()),t()}):"add"==this.edit&&(this.plugin["enabled"]=!0,Object(o["e"])(this.plugin).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.plugin=n.data,a.edit=!0,a.$successInfo("新增成功"),a.callback()),t()}))},callback:function(){this.$emit("callback",{})}}},u=c,d=(a("d793"),a("2877")),p=Object(d["a"])(u,n,i,!1,null,null,null);t["default"]=p.exports},ee4f:function(e,t,a){"use strict";var n=a("ac57"),i=a.n(n);i.a},ef70:function(e,t,a){"use strict";a.d(t,"b",function(){return s}),a.d(t,"c",function(){return r}),a.d(t,"a",function(){return o}),a.d(t,"d",function(){return l});var n=a("b5c6"),i=a("074d"),s=function(){return Object(n["a"])({url:i["a"].path+"/system/function/tree",method:"get"})},r=function(){return Object(n["a"])({url:i["a"].path+"/system/function/menu/role",method:"get"})},o=function(e){return Object(n["a"])({url:i["a"].path+"/system/function",method:"post",data:e})},l=function(e){return Object(n["a"])({url:i["a"].path+"/system/function/"+e.id,method:"post",data:e})}},f1e7:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e._l(e.dynamicTags,function(t){return a("el-tag",{key:t,attrs:{closable:"view"!=e.mode,"disable-transitions":!1},on:{close:function(a){return e.handleClose(t)}}},[e._v(e._s(t.name))])}),e.inputVisible?a("el-autocomplete",{ref:"saveTagInput",staticStyle:{"margin-left":"10px"},attrs:{"popper-class":"my-autocomplete","fetch-suggestions":e.remoteMethod,placeholder:"请输入角色名称检索"},on:{select:e.handleSelect},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item;return[a("div",{staticClass:"name"},[e._v(e._s(n.name))]),a("span",{staticClass:"addr"},[e._v(e._s(n.mobile))])]}}],null,!1,3326133321),model:{value:e.state,callback:function(t){e.state=t},expression:"state"}},[a("i",{staticClass:"el-icon-edit el-input__icon",attrs:{slot:"suffix"},slot:"suffix"})]):a("el-button",{directives:[{name:"show",rawName:"v-show",value:"add"==e.mode,expression:"mode=='add'"}],staticClass:"button-new-tag el-icon-plus",attrs:{size:"small"},on:{click:e.showInput}},[e._v("新增角色")])],2)},i=[],s=(a("7f7f"),a("20d6"),a("ac6a"),a("cebc")),r=a("5880"),o=(a("8d55"),a("3523")),l={data:function(){return{dynamicTags:[],loading:!1,options:[],state:null,inputVisible:!1,inputValue:""}},created:function(){this.init()},props:{option:{},mode:{},userGroup:{}},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission"])),methods:{init:function(){var e=this,t=this.option.profiles[0];this.permission.usergroup_config||(this.mode="view"),_.forEach(this.userGroup.profileRoles,function(a){a.profile==t.label&&(e.dynamicTags=a.roleList)})},handleSelect:function(e){var t=this,a=_.findIndex(this.dynamicTags,function(t){return e.id==t.id});-1==a?Object(o["h"])(this.userGroup.id,e.id,this.option.profiles).then(function(a){0==a.data.status?(t.dynamicTags.push(e),t.$successInfo("新增角色成功")):t.$errorInfo(a.data.errmsg)}):this.$errorInfo(e.name+" 已经设置过了")},handleClose:function(e){var t=this;Object(o["b"])(this.userGroup.id,e.id,this.option.profiles).then(function(a){0==a.data.status?(t.dynamicTags.splice(t.dynamicTags.indexOf(e),1),t.$successInfo("删除角色成功")):t.$errorInfo(a.data.errmsg)})},remoteMethod:function(e,t){this.options=""!==e?this.option.roleList.filter(function(t){return t.name.indexOf(e)>-1}):this.option.roleList,t(this.options)},showInput:function(){var e=this;this.inputVisible=!0,this.$nextTick(function(t){e.$refs.saveTagInput.$refs.input.focus()})}}},c=l,u=(a("cd05"),a("2877")),d=Object(u["a"])(c,n,i,!1,null,null,null);t["default"]=d.exports},f337:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("span",[a("strong",[e._v("注册中心地址:"+e._s(e.systemProfile.consul_url))])]),a("el-tabs",{ref:"upstreamTabs",attrs:{value:"targets"},on:{"tab-click":e.checkUpstream}},[a("el-tab-pane",[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-info"}),e._v(" 基本信息\n ")]),a("avue-form",{ref:"form",attrs:{option:e.upstreamColumn},on:{submit:e.handleSave},model:{value:e.upstream,callback:function(t){e.upstream=t},expression:"upstream"}})],1),"add"!=e.mode?a("el-tab-pane",{attrs:{label:"代理列表",name:"targets"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-success"}),e._v(" 代理列表\n ")]),a("targets",{ref:"targets",attrs:{upstream:e.upstreamEntity,mode:"edit"}})],1):e._e(),"add"!=e.mode?a("el-tab-pane",{attrs:{label:"设置健康检查"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-warning"}),e._v(" 健康检查(主动)\n ")]),a("health-check",{attrs:{upstream:e.upstreamEntity,mode:"view"}})],1):e._e()],1)],1)},i=[],s=(a("ac6a"),a("cebc")),r=a("5880"),o=a("fef3"),l=a("04c3"),c=a("ba9e"),u=a("2ed6"),d={components:{targets:l["default"],healthCheck:c["default"]},name:"upholdUpstream",data:function(){return{upstreamColumn:o["o"],upstreamEntity:_.cloneDeep(this.upstream)}},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission","systemProfile"])),props:{upstream:{type:Object,required:!1},mode:{required:!1}},created:function(){this.initOptions()},methods:{initOptions:function(){this.upstreamColumn.column.forEach(function(e){e["disabled"]=!0})},handlerSubmit:function(){this.$refs.form.submit()},handleSave:function(e,t){var a=this;"edit"!=this.mode&&Object(u["f"])(e).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.upstream=n.data,a.$successInfo("新增成功"),a.callback()),t()}),"edit"==this.mode&&Object(u["g"])(e).then(function(e){var n=e.data;0!=n.status?a.$errorInfo(n.errmsg):(a.upstream=n.data,a.$successInfo("修改成功"),a.callback()),t()})},callback:function(){this.$emit("callback",this.upstream)}}},p=d,h=a("2877"),m=Object(h["a"])(p,n,i,!1,null,null,null);t["default"]=m.exports},f5f5:function(e,t,a){"use strict";var n=a("2006"),i=a.n(n);i.a},f6e9:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"config-list"},[a("el-radio-group",{model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_EVERY",disabled:e.disabled}},[e._v("每分")])],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_RANGE",disabled:e.disabled}},[e._v("区间")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.start,callback:function(t){e.$set(e.valueRange,"start",t)},expression:"valueRange.start"}}),e._v("分\n 至\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_RANGE||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueRange.end,callback:function(t){e.$set(e.valueRange,"end",t)},expression:"valueRange.end"}}),e._v("分\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_LOOP",disabled:e.disabled}},[e._v("循环")]),e._v("从\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.start,callback:function(t){e.$set(e.valueLoop,"start",t)},expression:"valueLoop.start"}}),e._v("分开始,间隔\n "),a("el-input-number",{staticClass:"w60",attrs:{disabled:e.type!=e.TYPE_LOOP||e.disabled,max:e.maxValue,min:e.minValue,precision:0},model:{value:e.valueLoop.interval,callback:function(t){e.$set(e.valueLoop,"interval",t)},expression:"valueLoop.interval"}}),e._v("分\n ")],1),a("div",{staticClass:"item"},[a("el-radio",{staticClass:"choice",attrs:{label:"TYPE_SPECIFY",disabled:e.disabled}},[e._v("指定")]),a("div",{staticClass:"list"},[a("el-checkbox-group",{model:{value:e.valueList,callback:function(t){e.valueList=t},expression:"valueList"}},e._l(e.maxValue+1,function(t){return a("el-checkbox",{key:"key-"+(t-1),staticClass:"list-check-item",attrs:{label:t-1,disabled:e.type!=e.TYPE_SPECIFY||e.disabled}})}),1)],1)],1)])],1)},i=[],s=a("4b3a"),r={name:"minute",mixins:[s["a"]],data:function(){return{}},watch:{value_c:function(e,t){this.$emit("change",e)}},created:function(){this.DEFAULT_VALUE="*",this.minValue=0,this.maxValue=59,this.valueRange.start=0,this.valueRange.end=59,this.valueLoop.start=0,this.valueLoop.interval=1,this.parseProp(this.prop)}},o=r,l=(a("a495"),a("2877")),c=Object(l["a"])(o,n,i,!1,null,"039eabc4",null);t["default"]=c.exports},f777:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("basic-container",[a("el-tabs",e._l(e.option.envs,function(t){return a("el-tab-pane",{key:t,attrs:{index:t.label}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i"),e._v("\n "+e._s(t.label)+"\n ")]),a("el-tabs",{attrs:{type:"border-card","tab-position":"left"}},e._l(t.groups,function(t){return a("el-tab-pane",{key:t,attrs:{lazy:""}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(t.label))]),a("uphold-env",{attrs:{userGroup:e.userGroup,option:{profiles:[t],roleList:e.option.roleList,data:[]},mode:e.mode}})],1)}),1)],1)}),1)],1)],1)},i=[],s=a("cebc"),r=a("5880"),o=(a("af62"),a("5640"),a("f1e7")),l={name:"client",components:{upholdEnv:o["default"]},data:function(){return{}},created:function(){},watch:{},mounted:function(){},computed:Object(s["a"])({},Object(r["mapGetters"])(["permission","userInfo"])),props:{userGroup:{},mode:{},option:{}},methods:{findAllEnvs:function(){}}},c=l,u=(a("c980"),a("ee4f"),a("2877")),d=Object(u["a"])(c,n,i,!1,null,"d8caa636",null);t["default"]=d.exports},f9fd:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-form",{staticStyle:{"margin-left":"10px"},attrs:{"label-width":"80px"}},[e.route.hosts&&e.route.hosts.length>0?a("el-form-item",{attrs:{label:"Host"}},[a("item-tags",{attrs:{tags:e.route.hosts,name:"匹配路径",column:"paths",mode:"view"}})],1):e._e(),a("el-form-item",{attrs:{label:"路由PATH"}},[a("item-tags",{attrs:{tags:e.route.paths,name:"匹配路径",column:"paths",mode:"view"}})],1),a("el-form-item",{attrs:{label:"插件列表"}},[a("query-plugins",{attrs:{route:e.route,mode:"view"}})],1)],1)},i=[],s=a("3aa7"),r=a("ca60"),o={name:"viewRoute",data:function(){},components:{ItemTags:r["default"],queryPlugins:s["default"]},props:{route:{type:Object,required:!1}},created:function(){}},l=o,c=a("2877"),u=Object(c["a"])(l,n,i,!1,null,null,null);t["default"]=u.exports},fe19:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-steps",{staticStyle:{"margin-top":"20px"},attrs:{active:e.step,"finish-status":"success",simple:""}},[a("el-step",{attrs:{title:"选择同步的服务"}}),a("el-step",{attrs:{title:"选择同步的环境"}}),a("el-step",{attrs:{title:"确认后,开始同步"}})],1),a("div",{directives:[{name:"show",rawName:"v-show",value:0==e.step,expression:"step==0"}]},[a("el-row",{staticStyle:{"margin-top":"12px"}},[a("el-col",{attrs:{span:"22"}},[a("el-input",{attrs:{"prefix-icon":"el-icon-search",placeholder:"请输入服务名称或Host"},on:{input:e.filterServiceData},model:{value:e.searchForm,callback:function(t){e.searchForm=t},expression:"searchForm"}})],1),a("el-col",{attrs:{span:"2"}},[a("el-button",{staticStyle:{"margin-left":"12px"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.next(1)}}},[e._v("下一步")])],1)],1),a("avue-crud",{key:"service",ref:"serviceCrud",attrs:{option:e.serviceOption,data:e.serviceData,"table-loading":e.tableLoading},on:{"row-click":e.handleServiceRowClick,"selection-change":e.selectionChange,"search-change":e.handleServiceSearchChange}})],1),a("div",{directives:[{name:"show",rawName:"v-show",value:1==e.step,expression:"step==1"}]},[a("el-row",{staticStyle:{"margin-top":"12px"}},[a("el-col",{attrs:{span:"22"}},[a("el-button",{staticStyle:{"margin-left":"12px"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.previous(0)}}},[e._v("上一步")])],1),a("el-col",{attrs:{span:"2"}},[a("el-button",{staticStyle:{"margin-left":"12px"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.next(2)}}},[e._v("下一步")])],1)],1),a("avue-crud",{key:"client",ref:"clientCrud",attrs:{option:e.clientsOption,data:e.clientData,"table-loading":e.tableLoading},on:{"selection-change":e.selectionClientChange,"row-click":e.handleClientRowClick}})],1),a("div",{directives:[{name:"show",rawName:"v-show",value:2==e.step,expression:"step==2"}]},[a("el-row",{staticStyle:{"margin-top":"12px"}},[a("el-col",{attrs:{span:"22"}},[a("el-button",{staticStyle:{"margin-left":"12px"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.previous(1)}}},[e._v("上一步")])],1),a("el-col",{attrs:{span:"2"}})],1),a("el-row",{staticStyle:{"margin-top":"12px"}},[a("el-card",[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[a("i",{staticClass:"el-icon-info"}),a("strong",[e._v("同步信息(请确认后,点击'开始同步')")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"ready"==e.syncForm.status,expression:"syncForm.status=='ready'"}],staticStyle:{"margin-left":"12px","margin-bottom":"12px"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.next(3)}}},[e._v("开始同步")]),a("el-button",{staticStyle:{"margin-left":"12px","margin-bottom":"12px"},attrs:{type:"success",size:"mini"},on:{click:e.emitSyncDiff}},[e._v("同步差异比对")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"running"==e.syncForm.status,expression:"syncForm.status=='running'"}],staticStyle:{"margin-left":"12px","margin-bottom":"12px"},attrs:{disabled:"",type:"info",size:"mini"}},[e._v("同步进行中...")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"success"==e.syncForm.status,expression:"syncForm.status=='success'"}],staticStyle:{"margin-left":"12px","margin-bottom":"12px"},attrs:{disabled:"",type:"success",size:"mini"}},[e._v("同步成功")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"failure"==e.syncForm.status,expression:"syncForm.status=='failure'"}],staticStyle:{"margin-left":"12px","margin-bottom":"12px"},attrs:{disabled:"",type:"danger",size:"mini"}},[e._v("同步失败")])],1)]),a("div",[e._v("\n 同步的目标环境:\n "),e._l(e.syncForm.clients,function(t){return a("el-tag",{key:t,attrs:{"disable-transitions":!1,closable:""},on:{close:function(a){return e.handleClientRowClick(t)}}},[e._v(e._s(t.url))])})],2),a("div",{staticStyle:{"margin-top":"12px"}},[e._v("\n 同步的服务列表:\n "),e._l(e.syncForm.services,function(t){return a("el-tag",{key:t,attrs:{"disable-transitions":!1,closable:""},on:{close:function(a){return e.handleServiceRowClick(t)}}},[e._v(e._s(t.name))])})],2),a("div",[e._v("\n 数据类型:\n "),a("el-radio-group",{model:{value:e.syncForm.dataType,callback:function(t){e.$set(e.syncForm,"dataType",t)},expression:"syncForm.dataType"}},[a("el-radio",{attrs:{label:"services"}},[e._v("同步服务")]),a("el-radio",{attrs:{label:"routes"}},[e._v("同步路由")]),a("el-radio",{attrs:{label:"plugins"}},[e._v("同步插件")]),a("el-radio",{attrs:{label:"upstreams"}},[e._v("同步上游代理")])],1)],1),a("div",[e._v("\n 同步策略:\n "),a("el-radio-group",{model:{value:e.syncForm.policy,callback:function(t){e.$set(e.syncForm,"policy",t)},expression:"syncForm.policy"}},[a("el-radio",{attrs:{label:"create_update"}},[e._v("更新同步(存在就更新,不存在就新增)")]),a("el-radio",{attrs:{label:"over_ridden",disabled:""}},[e._v("覆盖同步")])],1)],1)])],1),e.showDiff?a("el-row",{staticStyle:{"margin-top":"12px"}},[a("el-card",[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[a("strong",[e._v("同步差异比对")])])]),a("div",[a("sync-diff",{attrs:{syncConfig:e.syncForm}})],1)])],1):e._e(),a("el-row",{staticStyle:{"margin-top":"12px"}},[a("el-card",[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[a("strong",[e._v("同步日志")])])]),a("div",{staticStyle:{"margin-top":"12px"}},[a("el-timeline",e._l(e.logData,function(t,n){return a("el-timeline-item",{key:n,attrs:{size:0==n?"large":"normal",color:"success"==t.status?"#0bbd87":"red",timestamp:e._f("parseTime")(t.create_at)}},[e._v(e._s(n+1)+". "+e._s(t.comment))])}),1)],1)])],1)],1)],1)},i=[],s=a("5176"),r=a.n(s),o=(a("7f7f"),a("6762"),a("2fdb"),a("cebc")),l=a("3dba"),c=a("af62"),u=a("5640"),d=a("78ba"),p=a("2775"),h=a("5880"),m={name:"syncService",components:{syncDiff:p["default"]},data:function(){return{serviceOption:{maxHeight:600,index:!0,selection:!0,simplePage:!0,border:!0,menu:!1,labelWidth:120,searchBtn:!1,addBtn:!1,editBtn:!1,delBtn:!1,columnBtn:!1,rowKey:"id",refreshBtn:!1,reserveSelection:!0,selectable:function(e,t){return!0},stripe:!0,menuAlign:"center",align:"center",searchSize:"mini",column:[{label:"服务名称",prop:"name",searchSpan:18,search:!1,searchFilterable:!0,searchMmultiple:!0,searchFilterMethod:function(e,t,a){console.log(e,",",t,",",a)}},{label:"HOST OR UPSTREAM",prop:"host"},{label:"创建日期",prop:"created_at",sortable:!0,type:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return 1e3*t}}]},clientsOption:{maxHeight:600,index:!0,simplePage:!0,selection:!0,border:!0,menu:!1,labelWidth:120,searchBtn:!1,addBtn:!1,editBtn:!1,delBtn:!1,columnBtn:!1,rowKey:"id",refreshBtn:!1,reserveSelection:!0,selectable:function(e,t){return!0},stripe:!0,menuAlign:"center",align:"center",searchSize:"mini",column:[{label:"服务名称",prop:"name",width:120},{label:"URL",prop:"url"},{label:"环境",prop:"profile",width:120},{label:"创建日期",prop:"create_at",sortable:!0,type:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss"}]},syncLogGroupOption:u["i"],serviceData:[],serviceItems:[],clientData:[],searchForm:"",syncForm:{services:[],clients:[],status:"ready",dataType:"services",policy:"create_update"},logData:[],step:0,syncConfigTimer:null,showDiff:!1,try_times:-1}},computed:Object(o["a"])({},Object(h["mapGetters"])(["permission","isProdProfile","systemProfile"])),created:function(){this.handleServiceSearchChange()},methods:{emitSyncDiff:function(){this.showDiff=!this.showDiff},filterServiceData:function(e){var t=e.trim();this.serviceData=""!=t?this.serviceItems.filter(function(e){return e.name.includes(t)||e.host.includes(t)}):this.serviceItems},handleServiceSearchChange:function(){var e=this;this.tableLoading=!0,Object(l["a"])(r()({})).then(function(t){var a=t.data;e.serviceItems=a.data,e.serviceData=e.serviceItems,e.tableLoading=!1})},selectionChange:function(e){this.syncForm.services=e},selectionClientChange:function(e){this.syncForm.clients=e},handleServiceRowClick:function(e){this.$refs.serviceCrud.toggleSelection([e])},handleClientRowClick:function(e){this.$refs.clientCrud.toggleSelection([e])},next:function(e){var t=this;switch(e){case 0:break;case 1:if(this.syncForm.services&&0==this.syncForm.services.length)return void this.$errorInfo("请先选择需要同步的服务");Object(c["d"])().then(function(e){for(var a=e.data.data,n=0;n<a.length;n++)a[n]&&"prod"!==a[n].profile&&t.clientData.push(a[n])});break;case 2:if(this.syncForm.clients&&0==this.syncForm.clients.length)return void this.$errorInfo("请先选择需要同步的环境");break;case 3:return this.syncForm.services&&0==this.syncForm.services.length?void this.$errorInfo("请先选择需要同步的服务"):this.syncForm.clients&&0==this.syncForm.clients.length?void this.$errorInfo("请先选择需要同步的环境"):(this.syncForm.status="running",void Object(l["f"])(this.syncForm).then(function(e){return t.syncForm=e.data.data,t.syncForm["syncNo"]}).then(function(e){t.syncConfigTimer=setInterval(function(){t.findSyncConfig()},1e3),t.$once("hook:beforeDestroy",function(){clearInterval(t.syncConfigTimer)})}))}this.step=e},findSyncConfig:function(){"running"==this.syncForm.status?this.doquery():(this.try_times=this.try_times+1,3==this.try_times?clearInterval(this.syncConfigTimer):this.doquery())},doquery:function(){var e=this;Object(d["d"])(this.syncForm["syncNo"]).then(function(t){return e.syncForm=t.data.data,e.syncForm["syncNo"]}).then(function(t){Object(d["b"])(t).then(function(t){e.logData=t.data.data})})},previous:function(e){this.step=e}}},f=m,g=(a("575d"),a("2877")),b=Object(g["a"])(f,n,i,!1,null,null,null);t["default"]=b.exports},fef3:function(e,t,a){"use strict";a.d(t,"h",function(){return s}),a.d(t,"l",function(){return r}),a.d(t,"g",function(){return o}),a.d(t,"p",function(){return l}),a.d(t,"o",function(){return c}),a.d(t,"a",function(){return u}),a.d(t,"d",function(){return d}),a.d(t,"i",function(){return p}),a.d(t,"j",function(){return h}),a.d(t,"e",function(){return m}),a.d(t,"k",function(){return f}),a.d(t,"f",function(){return g}),a.d(t,"n",function(){return b}),a.d(t,"m",function(){return v}),a.d(t,"c",function(){return y}),a.d(t,"b",function(){return _});a("7f7f");var n=a("e349"),i=a("c54a"),s=(a("4360"),a("074d"),{maxHeight:600,expand:!0,expandRowKeys:[],index:!0,border:!0,menuBtn:!0,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,addBtn:!1,editBtn:!1,delBtn:!1,align:"center",column:[{label:"NAME",prop:"name",align:"left",slot:!0,width:200},{label:"SERVICE",prop:"service",align:"left",sortable:!0,slot:!0,width:200},{label:"HOSTS",prop:"hosts",overHidden:!0,align:"left",sortable:!0,slot:!0},{label:"PATHS",prop:"paths",overHidden:!0,align:"left",slot:!0,sortable:!0},{label:"CREATED",prop:"created_at",sortable:!0,type:"datetime",width:160,format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return 1e3*t}}]}),r={maxHeight:600,expandRowKeys:[],expand:!0,rowkey:"id",dialogDrag:!0,border:!0,addBtn:!1,delBtn:!1,simplePage:!0,editBtn:!1,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,menuAlign:"right",menuWidth:180,align:"center",column:[{label:"路由名称",prop:"name"},{label:"HOSTS",prop:"hosts",overHidden:!0,slot:!0},{label:"PATHS",prop:"paths",overHidden:!0,align:"left",slot:!0}]},o={emptyBtn:!1,submitBtn:!1,column:[{label:"路由名称",span:24,prop:"name",rules:[{required:!0,message:"请填写路由名称",trigger:"blur"}]},{label:"主机列表",span:24,formslot:!0,prop:"hosts",type:"select",tip:"路由匹配主机名或域名【主机和路由path,可以只填一个,或者两个都填】,主机可以填多个,如:www.baidu.com,www.sina.com"},{label:"路由PATH",span:24,formslot:!0,prop:"paths",type:"select",placeholder:"路由匹配路径【主机和路由path,可以只填一个,或者两个都填】,匹配路径可以填多个,如:/path1,/paths2/xx.do"},{label:"是否截断Path",labelWidth:120,span:8,prop:"strip_path",type:"switch"},{label:"正则优先级",span:8,prop:"regex_priority",type:"number",value:0,tip:"当多个路由同时使用正则表达式匹配某个给定请求时,用来选择哪个路由解析该请求的数字。当两个路由匹配路径并且具有相同的regex_优先级时,将使用较旧的路由(最低创建位置)。注意,非regex路由的优先级不同(较长的非regex路由在较短的路由之前匹配)。默认为0。"},{label:"保留主机",span:8,prop:"preserve_host",type:"switch"},{label:"请求方法",row:!0,formslot:!0,prop:"methods",type:"array"},{label:"请求协议",prop:"protocols",multiple:!0,type:"select",dicData:n["a"].PROTOCOLS}]},l={maxHeight:600,expand:!0,index:!0,border:!0,menuBtn:!0,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,addBtn:!1,editBtn:!1,delBtn:!1,menuAlign:"center",align:"center",searchSize:"mini",column:[{label:"NAME",prop:"name",align:"left",slot:!0},{label:"SLOT",rules:[{validator:i["a"],trigger:"blur"}],prop:"slots"},{label:"CREATED",prop:"created_at",sortable:!0,width:160,type:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return 1e3*t}}]},c={emptyBtn:!1,submitBtn:!1,column:[{label:"Name",prop:"name",labelWidth:120,span:16,tip:"Upstream名称只允许为英文字符,该名称不可重复,该名称会用在service中的host字段中",rules:[{required:!0,message:"请填写upstream名称",trigger:"blur"}]},{label:"Slot",span:8,prop:"slots",value:"1000",type:"number"},{label:"Hash on",labelWidth:120,prop:"hash_on",type:"select",dicData:n["a"].HASH_ON_TYPE,change:function(){}},{label:"Hash Fallback",labelWidth:120,prop:"hash_fallback",type:"select",dicData:n["a"].HASH_ON_FALLBACK_TYPE},{label:"Hash on header",labelWidth:120,prop:"hash_on_header",type:"input"},{label:"Fallback header",labelWidth:120,prop:"hash_fallback_header",type:"input"},{label:"Hash on cookie",labelWidth:120,prop:"hash_on_cookie",type:"input"},{label:"Cookie path",labelWidth:120,prop:"hash_on_cookie_path",type:"input"}]},u={card:!0,emptyBtn:!1,submitBtn:!1,group:[{label:"基本配置",column:[{label:"请求协议",type:"select",labelWidth:110,prop:"type",dicData:n["a"].PROTOCOLS_HEALTHCHECK},{label:"请求路径",prop:"http_path",labelWidth:110,value:"/"},{label:"请求超时",prop:"timeout",labelWidth:110,value:1},{label:"https_sni",labelWidth:110,prop:"https_sni"},{label:"并发数",prop:"concurrency",labelWidth:110,value:10},{label:"是否验证https证书",labelWidth:140,prop:"https_verify_certificate",type:"switch"}]},{label:"非健康(Unhealthy)",column:[{label:"错误状态码",prop:"fail_http_statuses",labelWidth:110,formslot:!0,type:"select",value:["429","404","500","501","502","503","504","505"]},{label:"间隔时长",type:"number",labelWidth:110,prop:"interval",value:0},{label:"HTTP失败次数",type:"number",labelWidth:110,prop:"http_failures",value:0},{label:"TCP失败次数",type:"number",labelWidth:110,prop:"tcp_failures",value:0},{label:"超时时长",type:"number",labelWidth:110,prop:"timeouts",value:0}]},{label:"健康(Healthy)",column:[{label:"正常状态码",labelWidth:110,prop:"http_statuses",type:"select",formslot:!0,value:["200","304"]},{label:"间隔时长",type:"number",labelWidth:110,prop:"healthy_interval",value:0},{label:"请求成功次数",labelWidth:110,prop:"successes",type:"number",value:0}]}]},d={column:[{label:"内容1",prop:"text1"}]},p={emptyBtn:!1,submitBtn:!1,column:[{label:"服务名称",span:24,prop:"name",tip:"服务名称,只允许英文或数字",rules:[{required:!0,message:"请填写服务名称",trigger:"blur"}]},{label:"主机",span:12,prop:"host",type:"string",tip:"访问上游服务(Upstream)的名称或主机",rules:[{required:!0,message:"请填写主机",trigger:"blur"}]},{label:"请求协议",span:12,prop:"protocol",type:"select",dicData:n["a"].PROTOCOLS,value:"http"},{label:"端口号",span:12,type:"number",value:80,prop:"port",tip:"上游服务代理的默认端口号为80"},{label:"Path",span:12,value:"/",prop:"path",tip:"默认为/,用于为请求上游服务"},{label:"重试次数",span:12,prop:"retries",type:"number",value:5,tip:"默认重试次数为5次"},{label:"连接超时",span:12,prop:"connect_timeout",type:"number",value:6e4,tip:"连接上游服务的超时时长,默认值为60,000毫秒"},{label:"写超时",span:12,prop:"write_timeout",type:"number",value:6e4,tip:"写超时时长,默认值为60,000毫秒"},{label:"读超时",span:12,prop:"read_timeout",type:"number",value:6e4,tip:"读超时时长,默认值为60,000毫秒"},{label:"标签",span:24,prop:"tags",type:"string"}]},h={maxHeight:600,index:!0,border:!0,menuBtn:!0,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,addBtn:!1,editBtn:!1,delBtn:!1,menuAlign:"center",align:"center",searchSize:"mini",dicData:n["a"],column:[{label:"NAME",prop:"name",align:"left",slot:!0,width:200},{label:"HOST OR UPSTREAM",prop:"host"},{label:"URL",prop:"path",overHidden:!0,formatter:function(e,t,a,n){return e.protocol+"://"+e.host+":"+e.port+(e.path||"/")}},{label:"CREATED",prop:"created_at",sortable:!0,type:"datetime",width:160,format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return 1e3*t}}]},m={maxHeight:600,labelWidth:120,menuAlign:"center",index:!0,border:!0,menuBtn:!0,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,addBtn:!1,editBtn:!1,delBtn:!1,align:"center",searchSize:"mini",column:[{label:"",width:100,type:"switch",cell:!0,slot:!0,prop:"enabled",displayAs:"switch"},{label:"NAME",prop:"name",width:150,slot:!0},{label:"SCOPE",prop:"scope",width:100},{label:"APPLY TO",prop:"applyObject",formatter:function(e,t,a,n){return t?t.name:""}},{label:"CREATED",prop:"created_at",sortable:!0,type:"datetime",width:160,format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return 1e3*t}}]},f={maxHeight:600,labelWidth:120,menuAlign:"center",index:!0,border:!0,menu:!1,simplePage:!0,menuBtn:!0,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,addBtn:!1,editBtn:!1,delBtn:!1,align:"center",searchSize:"mini",column:[{label:"",width:100,type:"switch",cell:!0,slot:!0,prop:"enabled",displayAs:"switch"},{label:"插件名称",prop:"name",width:150,slot:!0},{label:"范围",prop:"scope",width:100},{label:"应用于",prop:"applyObject",formatter:function(e,t,a,n){return t?t.name:""}}]},g={maxHeight:600,index:!0,border:!0,labelWidth:120,menuAlign:"center",simplePage:!0,addBtn:!1,delBtn:!1,editBtn:!1,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,column:[{label:"是否启用",width:100,type:"switch",cell:!0,prop:"enabled",displayAs:"switch"},{label:"插件名称",prop:"name",width:150},{label:"创建日期",prop:"created_at",sortable:!0,type:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return 1e3*t}}]},b={index:!0,border:!0,labelWidth:120,addBtn:!1,delBtn:!1,editBtn:!1,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,simplePage:!0,align:"center",searchSize:"mini",column:[{label:"健康",prop:"health",width:60,slot:!0},{label:"主机/端口",width:300,prop:"target",tip:"默认端口号为8000",placeholder:"默认端口号为8000"},{label:"权重",prop:"weight",value:100,type:"number",width:100,tip:"0-1000,默认值为100",placeholder:"取值范围:0-1000,默认值为100,当dns解析为一样时,权重将被覆盖"},{label:"创建日期",prop:"created_at",type:"date",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return 1e3*t}}]},v={column:[{label:"主机/端口",width:300,cell:!0,span:18,prop:"target",tip:"默认端口号为8000",placeholder:"默认端口号为8000",rules:[{required:!0,message:"请填写host/port",trigger:"blur"}]},{label:"权重",prop:"weight",value:100,type:"number",cell:!0,span:6,width:100,tip:"0-1000,默认值为100",placeholder:"取值范围:0-1000,默认值为100,当dns解析为一样时,权重将被覆盖"}]},y={index:!0,border:!0,labelWidth:120,addBtn:!1,delBtn:!1,editBtn:!1,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,simplePage:!0,align:"center",searchSize:"mini",column:[{label:"USERNAME",prop:"username",slot:!0},{label:"CUSTOM_ID",prop:"custom_id"},{label:"TAGS",prop:"tags",type:"select",slot:!0,width:240},{label:"CREATED",prop:"created_at",type:"date",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",formatter:function(e,t,a,n){return 1e3*t}}]},_={emptyBtn:!1,submitBtn:!1,column:[{label:"USERNAME",labelWidth:100,span:24,prop:"username"},{label:"CUSTOM_ID",prop:"custom_id",span:24,labelWidth:100},{label:"TAGS",prop:"tags",span:24,formslot:!0,labelWidth:100}]}}}]); |