(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e4ecc"],{"91fd":function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-card",{attrs:{bordered:!1}},[a("a-row",{attrs:{gutter:8}},[a("a-col",{attrs:{span:12}},[a("j-vxe-table",{attrs:{toolbar:"","row-number":"","row-selection":"","click-select-row":"","highlight-current-row":"","radio-config":{highlight:!1},"checkbox-config":{highlight:!1},height:790,loading:t.table1.loading,columns:t.table1.columns,dataSource:t.table1.dataSource,pagination:t.table1.pagination},on:{pageChange:t.handleTable1PageChange,selectRowChange:t.handleTable1SelectRowChange}})],1),a("a-col",{attrs:{span:12}},[a("j-vxe-table",{staticStyle:{margin:"40px 0 8px"},attrs:{"row-number":"",height:381,columns:t.table1.columns,dataSource:t.table1.selectedRows}}),a("j-vxe-table",{attrs:{toolbar:"","row-number":"","row-selection":"","click-select-row":"",height:361,loading:t.table2.loading,columns:t.table2.columns,dataSource:t.table2.dataSource,pagination:t.table2.pagination},on:{pageChange:t.handleTable2PageChange,selectRowChange:t.handleTable2SelectRowChange}})],1)],1)],1)},n=[],i=a("0fea"),o=a("2475");function s(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var c={name:"Template2",data:function(){return{table1:{loading:!1,pagination:{current:1,pageSize:200,pageSizeOptions:["10","20","30","100","200"],total:0},lastRow:null,selectedRows:[],dataSource:[],columns:[{key:"num",title:"序号",width:"80px"},{key:"ship_name",title:"船名",width:"180px",type:o["b"].input},{key:"call",title:"呼叫",width:"80px",type:o["b"].input},{key:"len",title:"长",width:"80px",type:o["b"].input},{key:"ton",title:"吨",width:"120px",type:o["b"].input},{key:"payer",title:"付款方",width:"120px",type:o["b"].input},{key:"count",title:"数",width:"40px"},{key:"company",title:"公司",minWidth:"180px",type:o["b"].input},{key:"trend",title:"动向",width:"120px",type:o["b"].input}]},table2:{loading:!1,pagination:{current:1,pageSize:200,pageSizeOptions:["100","200"],total:0},selectedRows:[],dataSource:[],columns:[{key:"dd_num",title:"调度序号",width:"120px"},{key:"tug",title:"拖轮",width:"180px",type:o["b"].input},{key:"work_start_time",title:"作业开始时间",width:"180px",type:o["b"].input},{key:"work_stop_time",title:"作业结束时间",width:"180px",type:o["b"].input},{key:"type",title:"船舶分类",width:"120px",type:o["b"].input},{key:"port_area",title:"所属港区",width:"120px",type:o["b"].input}]},url:{getData:"/mock/vxe/getData"}}},watch:s({},"table1.lastRow",(function(){this.loadTable2Data()})),created:function(){this.loadTable1Data()},methods:{loadTable1Data:function(){var t=this,e={pageNo:this.table1.pagination.current,pageSize:this.table1.pagination.pageSize};this.table1.loading=!0,Object(i["c"])(this.url.getData,e).then((function(e){e.success?(t.table1.pagination.total=e.result.total,t.table1.dataSource=e.result.records,t.table1.selectedRows=[]):t.$error({title:"主表查询失败",content:e.message})})).finally((function(){t.table1.loading=!1}))},loadTable2Data:function(){var t=this,e=this.table1.selectedRows;if(!e||0===e.length)return this.table2.pagination.total=0,this.table2.dataSource=[],void(this.table2.selectedRows=[]);null==this.table1.lastRow&&(this.table1.lastRow=e[e.length-1]);var a={parentId:this.table1.lastRow.id,pageNo:this.table2.pagination.current,pageSize:this.table2.pagination.pageSize};this.table2.loading=!0,Object(i["c"])(this.url.getData,a).then((function(e){e.success?(t.table2.pagination.total=e.result.total,t.table2.dataSource=e.result.records,t.table2.selectedRows=[]):t.$error({title:"子表查询失败",content:e.message})})).finally((function(){t.table2.loading=!1}))},handleTable1SelectRowChange:function(t){this.handleTableSelectRowChange(this.table1,t)},handleTable2SelectRowChange:function(t){this.table2.selectedRows=t.selectedRows},handleTable1PageChange:function(t){this.table1.pagination.current=t.current,this.table1.pagination.pageSize=t.pageSize,this.loadTable1Data()},handleTable2PageChange:function(t){this.table2.pagination.current=t.current,this.table2.pagination.pageSize=t.pageSize,this.loadTable2Data()},handleTableSelectRowChange:function(t,e){var a=e.row,l=e.action,n=e.selectedRows,i=e.$table,o=n[n.length-1];"selected"===l?t.lastRow=a:"selected-all"===l?0===n.length?t.lastRow=null:t.lastRow||(t.lastRow=o):"unselected"===l&&a===t.lastRow&&(t.lastRow=o),i.setCurrentRow(t.lastRow),t.selectedRows=n}}},r=c,h=a("2877"),p=Object(h["a"])(r,l,n,!1,null,"8a69257c",null);e["default"]=p.exports}}]);