(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c4c42"],{"3bda":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page-content corporate-customers"},[a("transition-group",{staticClass:"transition-group",attrs:{tag:"div",name:t.transitionName,appear:""}},[a("table-page",{directives:[{name:"show",rawName:"v-show",value:"TablePage"===t.componentName,expression:"componentName === 'TablePage'"}],key:"TablePage",attrs:{componentName:t.componentName},on:{changePage:t.changePage}}),a("detail-page",{directives:[{name:"show",rawName:"v-show",value:"DetailPage"===t.componentName,expression:"componentName === 'DetailPage'"}],key:"DetailPage",attrs:{componentName:t.componentName},on:{changePage:t.changePage}})],1)],1)},i=[],o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"table-page"},[a("div",{staticClass:"table-page-content"},[a("div",{staticClass:"right-table"},[a("div",{staticClass:"full-page bg"},[a("div",{staticClass:"search-box"},[a("div",{ref:"btnPanel",staticClass:"btn-box"},[a("el-button",{staticClass:"btn btn-plus",attrs:{icon:"el-icon-receiving",type:"primary",size:"small",loading:t.syncLoading},on:{click:t.handleRefreshData}},[t._v("\n 同步\n ")])],1),a("SearchCommon",{attrs:{optionList:t.optionList},on:{search:t.handleSearch}})],1),a("div",{staticClass:"main-table-container"},[a("div",{staticClass:"table-container",staticStyle:{padding:"20px"}},[a("div",{ref:"tableRef",staticClass:"table-content"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.tableLoading,expression:"tableLoading"}],ref:"multipleSelection",staticClass:"table-list",attrs:{stripe:"","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.6)",data:t.tableData,"row-key":"id","max-height":t.tableMaxHeight,border:""},on:{select:t.handleSelection,"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"index",width:"100",label:"序号",align:"center",index:function(e){return e+1+(t.params.pageBean.page-1)*t.params.pageBean.pageSize}}}),a("el-table-column",{attrs:{prop:"code","min-width":"100","show-overflow-tooltip":"",align:"center",label:"路线编号"}}),a("el-table-column",{attrs:{prop:"name","min-width":"100","show-overflow-tooltip":"",align:"center",label:"路线名称"}}),a("el-table-column",{attrs:{prop:"companyName","min-width":"140","show-overflow-tooltip":"",align:"center",label:"所属公司"}}),a("el-table-column",{attrs:{prop:"start","min-width":"140","show-overflow-tooltip":"",align:"center",label:"起点地址"}}),a("el-table-column",{attrs:{prop:"end","min-width":"140","show-overflow-tooltip":"",align:"center",label:"终点地址"}}),a("el-table-column",{attrs:{prop:"startPeg","min-width":"100","show-overflow-tooltip":"",align:"center",label:"起点桩号"}}),a("el-table-column",{attrs:{prop:"endPeg","min-width":"100","show-overflow-tooltip":"",align:"center",label:"终点桩号"}}),a("el-table-column",{attrs:{prop:"mileage","min-width":"100","show-overflow-tooltip":"",align:"center",label:"里程(千米)"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"","min-width":"80",align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("el-link",{attrs:{type:"primary",underline:!1},on:{click:function(e){return t.handleDetailPage(n)}}},[t._v("\n 详情\n ")])]}}])})],1),a("pagination",{ref:"paginationPanel",staticStyle:{"margin-top":"10px"},attrs:{pageResult:t.params.pageBean},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)])])])])])])},s=[],l=a("c7eb"),r=a("1da1"),c=a("7846"),u=a("57cf"),p=a("4702"),m=a("6ab8"),d=(a("d3b7"),a("8daa")),b=window.context.portal;function g(t){return new Promise((function(e,a){d["a"].post(b+"/bizBaseRoute/v1/query",t).then((function(t){return e((null===t||void 0===t?void 0:t.data)||[])})).catch((function(t){return a(t)}))}))}function h(){return new Promise((function(t,e){d["a"].get(b+"/bizBaseRoute/v1/SynchronizeData").then((function(e){return t((null===e||void 0===e?void 0:e.data)||{})})).catch((function(t){return e(t)}))}))}function f(t){return new Promise((function(e,a){d["a"].get(b+"/bizBaseRoute/v1/".concat(t)).then((function(t){return e((null===t||void 0===t?void 0:t.data)||{})})).catch((function(t){return a(t)}))}))}var v=a("06800"),w=a("911a"),x=a.n(w),P={name:"TablePage",components:{pagination:u["a"],SearchCommon:m["a"]},mixins:[p["a"]],data:function(){return{pubSub:null,tableMaxHeight:"600px",tableLoading:!0,tableData:[],optionList:[{title:"路线名称",prop:"name",type:"input",default:!0},{title:"路线编码",prop:"code",type:"input",default:!0}],params:{pageBean:{pageSize:20,page:1,total:0},querys:[{operation:"LIKE",property:"name"},{operation:"LIKE",property:"code"}],sorter:[]},syncLoading:!1}},created:function(){this.loadData()},mounted:function(){var t=this;this.pubSub=x.a.subscribe("TablePage",(function(e,a){switch(a.type){case"add":t.params.pageBean.page=1,t.loadData();break;case"edit":t.loadData();break}}))},methods:{dictionaryEscape:v["a"],getSorterDirection:c["a"],loadData:function(){var t=this;return Object(r["a"])(Object(l["a"])().mark((function e(){var a,n,i,o,s;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.tableLoading=!0,e.next=4,g(Object(c["b"])(t.params));case 4:a=e.sent,n=a.total,i=void 0===n?0:n,o=a.rows,s=void 0===o?[]:o,t.params.pageBean.total=i,t.tableData=s;case 11:return e.prev=11,t.tableLoading=!1,e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,,11,14]])})))()},handleRefreshData:function(){var t=this;this.$confirm("是否路段数据?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(Object(r["a"])(Object(l["a"])().mark((function e(){var a,n;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.syncLoading=!0,e.next=4,h();case 4:if(a=e.sent,n=a.state,!n){e.next=11;break}return t.$message.success("数据同步成功"),t.params.pageBean.page=1,e.next=11,t.loadData();case 11:return e.prev=11,t.syncLoading=!1,e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,,11,14]])})))).catch((function(t){return t}))},changePage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&this.$emit("changePage",t,(function(a){x.a.publish(t,e)}),e.id?"编辑":"添加")}},beforeDestroy:function(){x.a.unsubscribe(this.pubSub)}},C=P,y=a("2877"),_=Object(y["a"])(C,o,s,!1,null,"3a872c2c",null),D=_.exports,S=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"edit-add-detail detail"},[a("div",{staticClass:"form-content"},[a("el-form",{ref:"formInfo",staticClass:"detail-form",attrs:{model:t.detailForm,"label-position":"right","label-suffix":":"}},[a("div",{staticClass:"rows"},[a("div",{staticClass:"rows-left"},[a("div",{staticClass:"rows-hr"})]),a("div",{staticClass:"rows-title"},[a("div",{staticClass:"text-overflow"},[t._v("路线信息")])])]),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"路线编号"}},[a("span",{staticClass:"text",attrs:{title:t.detailForm.code}},[t._v("\n "+t._s(t.detailForm.code||"-")+"\n ")])])],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"路线名称"}},[a("span",{staticClass:"text",attrs:{title:t.detailForm.name}},[t._v("\n "+t._s(t.detailForm.name||"-")+"\n ")])])],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"所属公司"}},[a("span",{staticClass:"text",attrs:{title:t.detailForm.companyName}},[t._v("\n "+t._s(t.detailForm.companyName||"-")+"\n ")])])],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"里程"}},[a("span",{staticClass:"text",attrs:{title:t.detailForm.mileage}},[t._v("\n "+t._s(t.detailForm.mileage+" 千米"||!1)+"\n ")])])],1)],1),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"起点地址"}},[a("span",{staticClass:"text",attrs:{title:t.detailForm.start}},[t._v("\n "+t._s(t.detailForm.start||"-")+"\n ")])])],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"终点地址"}},[a("span",{staticClass:"text",attrs:{title:t.detailForm.end}},[t._v("\n "+t._s(t.detailForm.end||"-")+"\n ")])])],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"起点桩号"}},[a("span",{staticClass:"text",attrs:{title:t.detailForm.startPeg}},[t._v("\n "+t._s(t.detailForm.startPeg||"-")+"\n ")])])],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"终点桩号"}},[a("span",{staticClass:"text",attrs:{title:t.detailForm.endPeg}},[t._v("\n "+t._s(t.detailForm.endPeg||"-")+"\n ")])])],1)],1),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注"}},[a("span",{staticClass:"text show-all",attrs:{title:t.detailForm.remarks}},[t._v("\n "+t._s(t.detailForm.remarks||"-")+"\n ")])])],1)],1)],1)],1),a("el-backtop",{attrs:{target:".detail-form","visibility-height":10}},[a("div",{staticClass:"top-box"},[t._v("UP")])])],1)},k=[],N=(a("b0c0"),{name:"DetailPage",props:{componentName:{default:"DetailPage",type:String}},components:{},data:function(){return{detailForm:{},pubSub:null}},computed:{},watch:{componentName:{handler:function(t){t===this.$options.name?this.openPage():this.closePage()}}},mounted:function(){var t=this;this.pubSub=x.a.subscribe("DetailPage",(function(e,a){a.id&&t.getDetail(a.id)}))},methods:{openPage:function(){},closePage:function(){var t=this;Object.assign(this.$data,this.$options.data.call(this),{pubSub:this.pubSub}),this.$nextTick((function(e){t.$refs.formInfo.$el.scrollTop=0}))},getDetail:function(t){var e=this;return Object(r["a"])(Object(l["a"])().mark((function a(){return Object(l["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,f(t);case 2:e.detailForm=a.sent;case 3:case"end":return a.stop()}}),a)})))()}},beforeDestroy:function(){x.a.unsubscribe(this.pubSub)}}),F=N,j=Object(y["a"])(F,S,k,!1,null,"0772c198",null),L=j.exports,O={name:"RouteInfo",components:{TablePage:D,DetailPage:L},data:function(){return{componentName:"TablePage",pubSub:null,transitionName:""}},mounted:function(){var t=this;this.pubSub=x.a.subscribe("breadcrumb-click",(function(e,a){a.isCurrentRoute&&(t.componentName="TablePage")}))},methods:{changePage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;switch(this.componentName=t,this.transitionName="fold-right"===this.transitionName?"fold-left":"fold-right",e&&e(),t){case"TablePage":x.a.publish("go-back");break;case"DetailPage":x.a.publish("add-custom-breadcrumb","详情");break}}},beforeDestroy:function(){x.a.unsubscribe(this.pubSub)}},T=O,B=Object(y["a"])(T,n,i,!1,null,"55b149a8",null);e["default"]=B.exports}}]);