|
|
|
@ -54,12 +54,6 @@
|
|
|
|
|
<span class="tab-btn" @click="tableHeaderEdit">
|
|
|
|
|
<a-icon type="setting" :style="{ fontSize: '16px' }" /> 设置
|
|
|
|
|
</span>
|
|
|
|
|
<!-- <a-popover placement="bottom" v-model="setVisible" trigger="click">
|
|
|
|
|
<template #content>
|
|
|
|
|
<columnSetting :columns="showColumns" @columnChange="columnChange"></columnSetting>
|
|
|
|
|
</template>
|
|
|
|
|
<span class="tab-btn"> <a-icon type="setting" :style="{ fontSize: '16px' }" /> 设置 </span>
|
|
|
|
|
</a-popover> -->
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-toolbar>
|
|
|
|
@ -76,9 +70,9 @@
|
|
|
|
|
<a-modal title="新增船公司" :width="300" :visible="addVisible" @ok="addSubmit" @cancel="addCancel">
|
|
|
|
|
<a-radio-group v-model="carrierRadio">
|
|
|
|
|
<a-radio :style="radioStyle" value="CMA"> <img class="radio-logo" src="@/assets/cma.png" /> CMA </a-radio>
|
|
|
|
|
<a-radio :style="radioStyle" value="ONE"> <img class="radio-logo" src="@/assets/cma.png" /> ONE </a-radio>
|
|
|
|
|
<a-radio :style="radioStyle" value="ESL"> <img class="radio-logo" src="@/assets/cma.png" /> ESL </a-radio>
|
|
|
|
|
<a-radio :style="radioStyle" value="MAC"> <img class="radio-logo" src="@/assets/cma.png" /> MAC </a-radio>
|
|
|
|
|
<a-radio :style="radioStyle" value="MAC"> <img class="radio-logo" src="@/assets/cma.png" /> MSC </a-radio>
|
|
|
|
|
<a-radio :style="radioStyle" value="ONE"> <img class="radio-logo" src="@/assets/cma.png" /> ONE </a-radio>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</a-modal>
|
|
|
|
|
|
|
|
|
@ -154,12 +148,12 @@ export default {
|
|
|
|
|
pageSizes: [10, 20, 50, 100, 200, 500],
|
|
|
|
|
},
|
|
|
|
|
columns: JSON.parse(JSON.stringify(initData.columns)),
|
|
|
|
|
data: [],
|
|
|
|
|
treeConfig: {
|
|
|
|
|
transform: true,
|
|
|
|
|
rowField: 'index',
|
|
|
|
|
parentField: 'parentId',
|
|
|
|
|
},
|
|
|
|
|
data: []
|
|
|
|
|
// treeConfig: {
|
|
|
|
|
// transform: true,
|
|
|
|
|
// rowField: 'index',
|
|
|
|
|
// parentField: 'parentId',
|
|
|
|
|
// },
|
|
|
|
|
},
|
|
|
|
|
// 表格编辑
|
|
|
|
|
formTableData: JSON.parse(JSON.stringify(initData.columns)),
|
|
|
|
@ -297,7 +291,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
tableReset() {
|
|
|
|
|
this.form.resetFields()
|
|
|
|
|
this.init()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -364,6 +357,7 @@ export default {
|
|
|
|
|
this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid } })
|
|
|
|
|
},
|
|
|
|
|
getList(queryParam = {}) {
|
|
|
|
|
this.$set(this.gridOptions, 'loading', true)
|
|
|
|
|
const { currentPage, pageSize } = this.gridOptions.pagerConfig
|
|
|
|
|
const query = {
|
|
|
|
|
...queryParam,
|
|
|
|
@ -373,14 +367,23 @@ export default {
|
|
|
|
|
} }
|
|
|
|
|
BookingOrderPage(query)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
const _data = res.data.rows.map((item, index) => {
|
|
|
|
|
item.index = (currentPage - 1) * pageSize + index
|
|
|
|
|
return item
|
|
|
|
|
})
|
|
|
|
|
this.$set(this.gridOptions.pagerConfig, 'total', res.data.totalPage)
|
|
|
|
|
this.$set(this.gridOptions, 'data', JSON.parse(JSON.stringify(_data)))
|
|
|
|
|
this.$set(this.gridOptions, 'loading', false)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
if (res.success) {
|
|
|
|
|
const _data = res.data.rows.map((item, index) => {
|
|
|
|
|
item.index = (currentPage - 1) * pageSize + index
|
|
|
|
|
return item
|
|
|
|
|
})
|
|
|
|
|
this.$set(this.gridOptions.pagerConfig, 'columns', JSON.parse(JSON.stringify(initData.columns)))
|
|
|
|
|
// this.$set(this.gridOptions, 'data', JSON.parse(JSON.stringify(_data)))
|
|
|
|
|
this.$set(this.gridOptions, 'data', [...this.gridOptions.data, ..._data])
|
|
|
|
|
this.$set(this.gridOptions.pagerConfig, 'total', res.data.totalRows)
|
|
|
|
|
this.$set(this.gridOptions, 'loading', false)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
console.log('======分页数据======', this.gridOptions.data)
|
|
|
|
|
} else {
|
|
|
|
|
this.$set(this.gridOptions, 'data', [...this.gridOptions.data, ...[]])
|
|
|
|
|
this.$set(this.gridOptions, 'loading', false)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err)
|
|
|
|
|