(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e6a4a09c"],{"360c":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"route-container"},[t("div",{staticClass:"left-tree"},[t("el-card",{staticClass:"list-selector"},[t("ul",{staticClass:"list-selector-list"},[t("li",{class:{selected:""===e.searchForm.appId},on:{click:function(t){return e.handleApp("")}}},[e._v(" "+e._s(e.$t("common.all"))+" ")]),e._l(e.apps,(function(a){return t("li",{key:a.appId,class:{selected:e.searchForm.appId===a.appId},on:{click:function(t){return e.handleApp(a.appId)}}},[e._v(" "+e._s(a.name)+" ")])}))],2)])],1),t("div",{staticClass:"menu-list-wrapper"},[t("el-card",[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("serviceRegisterManage.queryCondition")))])]),t("el-form",{staticClass:"demo-form-inline text-left",attrs:{inline:!0}},[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("serviceRegisterManage.serviceCode"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch.apply(null,arguments)}},model:{value:e.searchForm.serviceCode,callback:function(t){e.$set(e.searchForm,"serviceCode",t)},expression:"searchForm.serviceCode"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("serviceRegisterManage.serviceName"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch.apply(null,arguments)}},model:{value:e.searchForm.serviceName,callback:function(t){e.$set(e.searchForm,"serviceName",t)},expression:"searchForm.serviceName"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(e._s(e.$t("common.search")))])],1)],1)],1),t("el-card",{staticStyle:{"margin-top":"20px"}},[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("serviceRegisterManage.serviceBinding")))]),e.searchForm.appId?t("el-button",{attrs:{type:"primary"},on:{click:e.handleAdd}},[e._v(" "+e._s(e.$t("common.register"))+" ")]):e._e()],1),t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,border:""}},[t("el-table-column",{attrs:{prop:"appId",label:e.$t("serviceRegisterManage.appId")}}),t("el-table-column",{attrs:{prop:"appName",label:e.$t("serviceRegisterManage.appName")}}),t("el-table-column",{attrs:{prop:"serviceId",label:e.$t("serviceRegisterManage.serviceId")}}),t("el-table-column",{attrs:{prop:"serviceName",label:e.$t("serviceRegisterManage.serviceName")}}),t("el-table-column",{attrs:{prop:"serviceCode",label:e.$t("serviceRegisterManage.serviceCode")}}),t("el-table-column",{attrs:{prop:"orderTypeCd",label:e.$t("serviceRegisterManage.orderType")}}),t("el-table-column",{attrs:{label:e.$t("common.operation"),width:"200",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.handleDelete(a.row)}}},[e._v(e._s(e.$t("common.delete")))])]}}])})],1),t("el-pagination",{attrs:{"current-page":e.page.current,"page-sizes":[10,20,30,50],"page-size":e.page.size,total:e.page.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1),t("DelRoute",{attrs:{visible:e.delVisible,"route-id":e.currentRow.id},on:{"update:visible":function(t){e.delVisible=t},success:e.handleSuccess}})],1)},r=[],i=a("4ce1"),n=a("7220"),l=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("common.delete"),visible:e.dialogVisible,width:"400px"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticClass:"del-dialog-content"},[t("i",{staticClass:"el-icon-warning"}),t("span",[e._v(e._s(e.$t("common.confirmDelete")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleConfirm}},[e._v(e._s(e.$t("common.confirm")))])],1)])},c=[],o={name:"DelRoute",props:{visible:{type:Boolean,default:!1},routeId:{type:String,default:""}},data(){return{dialogVisible:!1}},watch:{visible:{handler(e){this.dialogVisible=e},immediate:!0},dialogVisible(e){this.$emit("update:visible",e)}},methods:{handleClose(){this.dialogVisible=!1},async handleConfirm(){try{await Object(i["b"])(this.routeId),this.$message.success(this.$t("route.delete.success")),this.handleClose(),this.$emit("success")}catch(e){console.error("删除失败:",e)}}}},d=o,p=(a("9c4a"),a("2877")),u=Object(p["a"])(d,l,c,!1,null,"3bbe0480",null),h=u.exports,m={name:"routeList",components:{DelRoute:h},data(){return{loading:!1,apps:[],searchForm:{appId:"",serviceName:"",serviceCode:""},tableData:[],page:{current:1,size:10,total:0},addVisible:!1,editVisible:!1,delVisible:!1,currentRow:{}}},created(){this.getApps()},methods:{async getApps(){try{this.loading=!0;const e={page:1,row:100},{data:t}=await Object(n["b"])(e);this.apps=t,this.searchForm.appId=""}catch(e){this.$message.error(this.$t("app.fetchError"))}finally{this.loading=!1}},async getList(){if(!this.searchForm.appId)return this.tableData=[],void(this.page.total=0);try{this.loading=!0;const e={page:this.page.current,row:this.page.size,appId:this.searchForm.appId,serviceId:this.searchForm.serviceId,orderTypeCd:this.searchForm.orderTypeCd},{data:t,total:a}=await Object(i["c"])(e);this.tableData=t,this.page.total=a}catch(e){this.$message.error(this.$t("route.fetchError"))}finally{this.loading=!1}},handleSearch(){this.page.current=1,this.getList()},handleAdd(){this.$router.push("/pages/dev/addRoute?appId="+this.searchForm.appId)},handleEdit(e){this.currentRow={...e},this.editVisible=!0},handleDelete(e){this.currentRow={...e},this.delVisible=!0},handleSuccess(){this.getList()},handleSizeChange(e){this.page.size=e,this.getList()},handleCurrentChange(e){this.page.current=e,this.getList()},handleApp(e){this.searchForm.appId=e,e?this.getList():(this.tableData=[],this.page.total=0)}}},g=m,b=(a("5be1"),Object(p["a"])(g,s,r,!1,null,"55131586",null));t["default"]=b.exports},"4ce1":function(e,t,a){"use strict";a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return n}));var s=a("b775");function r(e){return new Promise((t,a)=>{Object(s["a"])({url:"/serviceRegister.listServiceRegisters",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function i(e){return new Promise((t,a)=>{Object(s["a"])({url:"/service.bindingService",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function n(e){return new Promise((t,a)=>{Object(s["a"])({url:"/serviceRegister.deleteServiceRegister",method:"post",data:{id:e}}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}},"5be1":function(e,t,a){"use strict";a("b02d")},7220:function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return n}));var s=a("b775");function r(e){return new Promise((t,a)=>{Object(s["a"])({url:"/app.listApps",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function i(e){return new Promise((t,a)=>{Object(s["a"])({url:"/app.updateApp",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function n(e){return new Promise((t,a)=>{Object(s["a"])({url:"/app.deleteApp",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}},"9c4a":function(e,t,a){"use strict";a("ec22")},b02d:function(e,t,a){},ec22:function(e,t,a){}}]); //# sourceMappingURL=chunk-e6a4a09c.f54e340b.js.map