From d57e4ae42b6c7d516e219e7cc76fefe6f7c77f86 Mon Sep 17 00:00:00 2001 From: sunzehua Date: Mon, 26 Feb 2024 14:43:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A9=AC=E5=A3=AB=E5=9F=BA=E8=AE=A2=E8=88=B1+?= =?UTF-8?q?=E8=88=B9=E6=9C=9F=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/u102.svg | 6 + src/assets/icons/u90.svg | 19 ++ src/assets/icons/u92.svg | 6 + src/assets/icons/u98.svg | 6 + src/layouts/BasicLayout.vue | 4 +- src/views/main/BookingLedger/detail/index.vue | 2 +- .../detail/modules/goodsTable.vue | 2 +- .../detail/modules/rightContent.vue | 12 +- .../detail/style/rightContent.less | 13 +- src/views/main/mskBookingOrder/index.vue | 233 ++++++++++++++++++ src/views/main/vesselinfo/index.vue | 174 ++++++++++--- src/views/userLoginReg/Login.vue | 50 +--- 12 files changed, 440 insertions(+), 87 deletions(-) create mode 100644 src/assets/icons/u102.svg create mode 100644 src/assets/icons/u90.svg create mode 100644 src/assets/icons/u92.svg create mode 100644 src/assets/icons/u98.svg create mode 100644 src/views/main/mskBookingOrder/index.vue diff --git a/src/assets/icons/u102.svg b/src/assets/icons/u102.svg new file mode 100644 index 0000000..99fdb13 --- /dev/null +++ b/src/assets/icons/u102.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/assets/icons/u90.svg b/src/assets/icons/u90.svg new file mode 100644 index 0000000..4185dec --- /dev/null +++ b/src/assets/icons/u90.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/u92.svg b/src/assets/icons/u92.svg new file mode 100644 index 0000000..2ee4eb6 --- /dev/null +++ b/src/assets/icons/u92.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/assets/icons/u98.svg b/src/assets/icons/u98.svg new file mode 100644 index 0000000..9bc4ac8 --- /dev/null +++ b/src/assets/icons/u98.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 2a40b9b..6fd29fc 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -50,9 +50,9 @@ - + diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 7da457d..de57584 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -120,7 +120,7 @@ ref="iframe" @load="handleIframeLoad" style="width: 100%;height: 1400px;" - src="http://60.209.125.238:35103/#/index" + src="http://localhost:8080/#/index" frameborder="0"> diff --git a/src/views/main/BookingLedger/detail/modules/goodsTable.vue b/src/views/main/BookingLedger/detail/modules/goodsTable.vue index 8dc71d9..26fec32 100644 --- a/src/views/main/BookingLedger/detail/modules/goodsTable.vue +++ b/src/views/main/BookingLedger/detail/modules/goodsTable.vue @@ -4,7 +4,6 @@
- 刷新 添加 删除 @@ -22,6 +21,7 @@ 展开箱量 + 刷新
diff --git a/src/views/main/BookingLedger/detail/modules/rightContent.vue b/src/views/main/BookingLedger/detail/modules/rightContent.vue index d664218..4a49e3b 100644 --- a/src/views/main/BookingLedger/detail/modules/rightContent.vue +++ b/src/views/main/BookingLedger/detail/modules/rightContent.vue @@ -256,14 +256,14 @@
- 修改人 - 修改时间 - 功能模块 + 修改人 + 修改时间 + 功能模块
- {{ log.createdUserName }} - + {{ log.createdUserName }} + {{ log.createdTime }} - {{ log.fromFunc }} + {{ log.fromFunc }}
diff --git a/src/views/main/BookingLedger/detail/style/rightContent.less b/src/views/main/BookingLedger/detail/style/rightContent.less index f1b0e27..fbeb2d8 100644 --- a/src/views/main/BookingLedger/detail/style/rightContent.less +++ b/src/views/main/BookingLedger/detail/style/rightContent.less @@ -483,23 +483,26 @@ .list { display: flex; background: #fff; - height: 40px; - line-height: 40px; + min-height: 30px; + // line-height: 40px; text-align: center; .btn { display: inline-block; - flex: 1; + // flex: 1; border: 1px solid #eee; border-top: none; padding: 0 8px; + font-size: 12px; overflow: hidden; &:nth-of-type(1) { - padding: 0 19px; + padding: 0 2px; border-right: none; + line-height: 30px; } &:nth-of-type(2) { - padding-right: 30px; + padding-right: 5px; position: relative; + line-height: 30px; } } .more { diff --git a/src/views/main/mskBookingOrder/index.vue b/src/views/main/mskBookingOrder/index.vue new file mode 100644 index 0000000..dceb5d3 --- /dev/null +++ b/src/views/main/mskBookingOrder/index.vue @@ -0,0 +1,233 @@ + + + + diff --git a/src/views/main/vesselinfo/index.vue b/src/views/main/vesselinfo/index.vue index fb7da0d..2ee1ad7 100644 --- a/src/views/main/vesselinfo/index.vue +++ b/src/views/main/vesselinfo/index.vue @@ -17,13 +17,11 @@ placeholder="请选择船公司" v-model="queryParam.CARRIER" show-search - @focus="carrierSearch" - @search="carrierSearch" :default-active-first-option="false" :show-arrow="false" - :filter-option="false" + :filter-option="filterOption" :not-found-content="null"> - + {{ item.cnName }} @@ -32,21 +30,6 @@ - @@ -105,6 +88,7 @@ ref="table" :columns="columns" :loading="loading" + @cell-dblclick="handledbclick" @sort-change="tableSortChange" @resizable-change="resizableChange" height="600px" @@ -142,12 +126,18 @@ import { DjyUserConfigMulti } from '@/api/modular/main/BookingLedger' import addForm from './addForm.vue' import tableSort from '@/components/tableSort' import editForm from './editForm.vue' +import { mapGetters } from 'vuex' export default { components: { addForm, editForm, tableSort }, + computed: { + ...mapGetters([ + 'carrierList' + ]) + }, data() { return { vesselData: [], @@ -365,9 +355,15 @@ export default { this.vesselData = res.data }) }, + filterOption(input, option) { + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + handledbclick(row) { + this.$refs.editForm.edit(row.row) + }, getConfigUser(isInit = false) { const query = { - typeArr: ['vesselinfo_sort', 'vesselinfo_list_column'] + typeArr: ['vesselinfo_sort', 'vesselinfo_list_column', 'vesselinfo_page'] } this.loading = true DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => { @@ -375,15 +371,13 @@ export default { this.columns = JSON.parse(JSON.stringify(this.columnsAll)) this.FnGetData() } else { - if (res.data.length === 1) { - if (res.data[0].type === 'vesselinfo_list_column') { - this.FnGetData() - } - } res.data.forEach(item => { if (item.type === 'vesselinfo_list_column') { this.columns = JSON.parse(item.configJson) } + if (item.type === 'vesselinfo_page') { + this.queryParam.PageSize = JSON.parse(item.configJson).pageSize + } if (item.type === 'vesselinfo_sort') { const data = JSON.parse(item.configJson) setTimeout(() => { @@ -391,15 +385,27 @@ export default { }, 200); this.queryParam.sortField = data.sortField this.queryParam.descSort = data.descSort - this.FnGetData() } }) + setTimeout(() => { + this.FnGetData() + }, 200); } }) }, resizableChange(e) { this.columns[e.columnIndex].width = e.resizeWidth this.editColumnsSave(this.columns) + this.changeSetting('vesselinfo_list_column', this.columns) + }, + changeSetting(key, value) { + const arr = localStorage.getItem('vesselinfoSetting') ? JSON.parse(localStorage.getItem('vesselinfoSetting')) : [] + arr.forEach(item => { + if (item.type === key) { + item.configJson = JSON.stringify(value) + } + }) + localStorage.setItem('vesselinfoSetting', JSON.stringify(arr)) }, tableSortChange(e) { const { property, order } = e @@ -410,6 +416,7 @@ export default { } this.queryParam.sortField = data.sortField this.queryParam.descSort = data.descSort + this.changeSetting('vesselinfo_sort', data) this.FnGetData(this.queryParam) DjyUserConfigAdd({ type: 'vesselinfo_sort', @@ -424,6 +431,7 @@ export default { }) this.$forceUpdate() this.editColumnsSave(this.columns) + this.changeSetting('vesselinfo_list_column', this.columns) }, carrierSearch(data) { GetCarrierlist({ KeyWord: data }).then(res => { @@ -438,6 +446,10 @@ export default { }) }, handlePageChange1({ currentPage, pageSize }) { + if (this.queryParam.pageSize !== pageSize) { + this.editPageSizeSave(pageSize) + this.changeSetting('vesselinfo_page', { pageSize: pageSize }) + } this.queryParam.PageNo = currentPage this.queryParam.PageSize = pageSize this.FnGetData() @@ -445,6 +457,17 @@ export default { confirm(e) { this.FnDel(e) }, + editPageSizeSave(pageSize) { + const data = { + pageSize: pageSize + } + DjyUserConfigAdd({ + type: 'vesselinfo_page', + configJson: JSON.stringify(data) + }).then(res => { + console.log('页码设置成功') + }) + }, FnDel(data) { DjyVesselInfoServiceDelete({ Ids: data.id }).then(res => { this.$message.success('删除成功') @@ -457,10 +480,101 @@ export default { init() { Object.assign(this.$data, this.$options.data()) this.ColumnsQuery = this.columns - GetCarrierlist().then(res => { - this.carrierData = res.data - }) - this.getConfigUser() + // GetCarrierlist().then(res => { + // this.carrierData = res.data + // }) + this.getConfigStart() + }, + getConfigStart() { + const arr = localStorage.getItem('vesselinfoSetting') ? JSON.parse(localStorage.getItem('vesselinfoSetting')) : [] + if (arr.length === 0) { + this.columns = JSON.parse(JSON.stringify(this.columnsAll)) + const data = [ + { + type: 'vesselinfo_list_column', + configJson: JSON.stringify(this.columns) + }, + { + type: 'vesselinfo_page', + configJson: JSON.stringify({ pageSize: 10 }) + }, + { + type: 'vesselinfo_sort', + configJson: '' + } + ] + localStorage.setItem('vesselinfoSetting', JSON.stringify(data)) + this.FnGetData() + } else { + // arr.forEach(item => { + // if (item.type === 'vesselinfo_list_column') { + // this.columns = JSON.parse(item.configJson) + // } + // if (item.type === 'vesselinfo_page') { + // this.queryParam.PageSize = JSON.parse(item.configJson).pageSize + // } + // if (item.type === 'vesselinfo_sort') { + // const data = JSON.parse(item.configJson) + // setTimeout(() => { + // this.$refs.table.sort(data.sortField, data.descSort ? 'desc' : 'asc') + // }, 200); + // this.queryParam.sortField = data.sortField + // this.queryParam.descSort = data.descSort + // } + // }) + const $data = {} + arr.map((item, index) => { + switch (item.type) { + case 'vesselinfo_list_column': + this.$set($data, 'vesselinfo_list_column', item) + break + case 'vesselinfo_page': + this.$set($data, 'vesselinfo_page', item) + break + case 'vesselinfo_sort': + this.$set($data, 'vesselinfo_sort', item) + break + } + }) + console.log(JSON.parse($data.vesselinfo_list_column.configJson)) + if (Object.keys($data).includes('vesselinfo_list_column')) { + this.columns = JSON.parse($data.vesselinfo_list_column.configJson) + } else { + arr.push({ + type: 'vesselinfo_list_column', + configJson: JSON.stringify(this.columns) + }) + localStorage.setItem('vesselinfoSetting', JSON.stringify(arr)) + } + if (Object.keys($data).includes('vesselinfo_page')) { + this.queryParam.PageSize = JSON.parse($data.vesselinfo_page.configJson).pageSize + } else { + arr.push({ + type: 'vesselinfo_page', + configJson: JSON.stringify({ pageSize: 10 }) + }) + localStorage.setItem('vesselinfoSetting', JSON.stringify(arr)) + } + if (Object.keys($data).includes('vesselinfo_sort')) { + const data = $data.vesselinfo_sort.configJson ? JSON.parse($data.vesselinfo_sort.configJson) : null + if (data) { + setTimeout(() => { + this.$refs.table.sort(data.sortField, data.descSort ? 'desc' : 'asc') + }, 200); + this.queryParam.sortField = data.sortField + this.queryParam.descSort = data.descSort + } + } else { + arr.push({ + type: 'vesselinfo_sort', + configJson: '' + }) + localStorage.setItem('vesselinfoSetting', JSON.stringify(arr)) + } + setTimeout(() => { + this.FnGetData() + }, 200); + } }, FnGetData() { this.loading = true diff --git a/src/views/userLoginReg/Login.vue b/src/views/userLoginReg/Login.vue index ee31e29..82c34e7 100644 --- a/src/views/userLoginReg/Login.vue +++ b/src/views/userLoginReg/Login.vue @@ -348,50 +348,16 @@ export default { // 加载字典所有字典到缓存中 this.dictTypeData().then(res => { }) const query = { - typeArr: ['booking_list_column'] + typeArr: ['vesselinfo_sort', 'vesselinfo_list_column', 'vesselinfo_page', 'booking_list_cond'] } DjyUserConfigMulti(this.$qs.stringify(query)).then(res => { - if (res.data.length > 0) { - const labelData = JSON.parse(res.data[0].configJson) - labelData.forEach(item => { - if (!item.slots && item.field === 'bsstatusname') { - item.slots = { default: 'bsstatusname' } - } - if (item.field === 'zhanCangFlag') { - item.width = 35 - } - if (item.field === 'custno') { - item.slots = { default: 'custno' } - } - if (item.field === 'shenQingXiangShi') { - item.slots = { default: 'shenQingXiangShi' } - } - if (item.field === 'pono') { - item.slots = { default: 'pono' } - } - if (item.label === 'LINENAME') { - item.field = 'lineName' - } - if (item.label === 'ETA') { - item.title = '目的港ETA' - } - if (item.label === 'isVGM') { - item.title = 'VGM' - item.width = 60 - } - if (item.label === 'IsZZFX') { - item.title = '装载' - item.width = 50 - } - if (item.label === 'IsCanDan') { - item.title = '舱单' - item.width = 50 - } - }) - localStorage.setItem('formTableData', JSON.stringify(labelData)); - } else { - localStorage.setItem('formTableData', JSON.stringify(initData.columns)); - } + const vessArr = [] + res.data.forEach(item => { + if (item.type.includes('vesselinfo')) { + vessArr.push(item) + } + }) + localStorage.setItem('vesselinfoSetting', JSON.stringify(vessArr)) }) this.$store.dispatch('getVesselinfo') },