缓存问题

master
sunzehua 9 months ago
parent d57e4ae42b
commit 9d46f1c8c5

@ -1388,7 +1388,7 @@ export default {
pageSize: 20,
pageSizes: [10, 20, 50, 100, 200, 500]
},
columns: JSON.parse(JSON.stringify(initData.columns)),
columns: [],
data: []
},
formTableData: JSON.parse(JSON.stringify(initData.columns)),
@ -1495,6 +1495,11 @@ export default {
},
created() {
this.createdInit()
if (localStorage.getItem('bookingSetting')) {
this.gridOptions.columns = JSON.parse(localStorage.getItem('bookingSetting'))
} else {
this.gridOptions.columns = JSON.parse(JSON.stringify(initData.columns))
}
},
mounted() {
this.onresize()
@ -2299,6 +2304,7 @@ export default {
return item.field
})
this.gridOptions.columns = JSON.parse(JSON.stringify(this.formTableData))
localStorage.setItem('bookingSetting', JSON.stringify(this.gridOptions.columns))
const moreTableArr = []
this.fromTableAllData.map((item, index) => {
if (!nowTableArr.includes(item.field)) {
@ -2614,11 +2620,13 @@ export default {
this.gridOptions.columns = JSON.parse(JSON.stringify(data))
this.$refs.setTableForm.handleCancel()
this.editColumnsSave(this.gridOptions.columns)
localStorage.setItem('bookingSetting', JSON.stringify(this.gridOptions.columns))
},
resizableChange(e) {
this.gridOptions.columns[e.columnIndex].width = e.resizeWidth
this.editColumnsSave(this.gridOptions.columns)
localStorage.setItem('bookingSetting', JSON.stringify(this.gridOptions.columns))
},
editColumnsSave(data = {}) {
DjyUserConfigAdd({

@ -80,7 +80,7 @@
<div v-html="form.dynamicData"></div>
<div style="width: 40%;">
<a-form-model ref="ruleForm" :rules="rules" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" :model="opinion">
<a-form-model-item prop="userOpinion" label="是否接换船">
<a-form-model-item prop="userOpinion" label="是否接换船">
<a-select v-model="opinion.userOpinion">
<a-select-option value="是">

@ -476,6 +476,9 @@ export default {
this.loading = true
EmailUserAccountGetInfo({ gid: gid }).then(res => {
if (res.data.succ) {
if (!res.data.ext.parserList) {
res.data.ext.parserList = []
}
this.addForm = res.data.ext
if (this.addForm.useIMAP) {
this.addForm.useIMAP = 'true'

@ -95,29 +95,87 @@
</a-form-model-item>
</a-col>
</a-row>
<div class="title">货物详情</div>
<a-row>
<a-col :span="6">
<a-form-model-item label="商品名称">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="商品编码类型">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="总重">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="货物标志">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="是否冷冻处理">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="温度">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="货物探测器数量">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="通风" >
<a-input v-model="form.name" style="width: 74%;" />
/hour
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="湿度">
<a-input v-model="form.name" style="width: 84%;" />%
</a-form-model-item>
</a-col>
</a-row>
<div class="title">箱型箱量</div>
</a-form-model>
<a-modal title="检索船期" :visible="visible" width="1000px" @cancel="visible = false">
<a-modal title="检索船期" :visible="visible" width="1200px" @cancel="visible = false">
<div style="display: flex;align-items: center;">
<a-row>
<a-form-model :model="searchForm" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
<a-form-model :model="searchForm" :label-col="{ span: 7 }" :wrapper-col="{ span: 17 }">
<a-col :span="6">
<a-form-model-item label="始发地">
<a-input style="width: 72%;" v-model="form.name" />
<a-input v-model="searchForm.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="目的地">
<a-input style="width: 72%;" v-model="form.name" />
<a-input v-model="searchForm.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="船名">
<a-input style="width: 72%;" v-model="form.name" />
<a-input v-model="searchForm.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="航次号">
<a-input style="width: 72%;" v-model="form.name" />
<a-input v-model="searchForm.name" />
</a-form-model-item>
</a-col>
</a-form-model>
@ -146,6 +204,34 @@
<div>2024-02-24 06:00</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u102.svg" alt=""> </div>
<div class="item-right">
<div>运输时间</div>
<div>72天数</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u98.svg" alt=""> </div>
<div class="item-right">
<div>船名/航次</div>
<div>MSC MIA / 408W</div>
</div>
</div>
</div>
</div>
<div class="right">
<a-button type="primary">选择</a-button>
</div>
</div>
<div class="box">
<div class="left">
<div class="top">
<span class="top-text">Qingdao, China </span>
<img style="margin: 0 15px;" src="../../../assets/icons/u92.svg" alt="">
<span class="top-text">Belgrade, Serbia</span>
</div>
<div class="bottom">
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u90.svg" alt=""> </div>
<div class="item-right">
@ -160,10 +246,111 @@
<div>2024-02-24 06:00</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u102.svg" alt=""> </div>
<div class="item-right">
<div>运输时间</div>
<div>72天数</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u98.svg" alt=""> </div>
<div class="item-right">
<div>船名/航次</div>
<div>MSC MIA / 408W</div>
</div>
</div>
</div>
</div>
<div class="right"></div>
<div class="right">
<a-button type="primary">选择</a-button>
</div>
</div>
<div class="box">
<div class="left">
<div class="top">
<span class="top-text">Qingdao, China </span>
<img style="margin: 0 15px;" src="../../../assets/icons/u92.svg" alt="">
<span class="top-text">Belgrade, Serbia</span>
</div>
<div class="bottom">
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u90.svg" alt=""> </div>
<div class="item-right">
<div>离港</div>
<div>2024-02-24 06:00</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u90.svg" alt=""> </div>
<div class="item-right">
<div>离港</div>
<div>2024-02-24 06:00</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u102.svg" alt=""> </div>
<div class="item-right">
<div>运输时间</div>
<div>72天数</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u98.svg" alt=""> </div>
<div class="item-right">
<div>船名/航次</div>
<div>MSC MIA / 408W</div>
</div>
</div>
</div>
</div>
<div class="right">
<a-button type="primary">选择</a-button>
</div>
</div>
<div class="box">
<div class="left">
<div class="top">
<span class="top-text">Qingdao, China </span>
<img style="margin: 0 15px;" src="../../../assets/icons/u92.svg" alt="">
<span class="top-text">Belgrade, Serbia</span>
</div>
<div class="bottom">
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u90.svg" alt=""> </div>
<div class="item-right">
<div>离港</div>
<div>2024-02-24 06:00</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u90.svg" alt=""> </div>
<div class="item-right">
<div>离港</div>
<div>2024-02-24 06:00</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u102.svg" alt=""> </div>
<div class="item-right">
<div>运输时间</div>
<div>72天数</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u98.svg" alt=""> </div>
<div class="item-right">
<div>船名/航次</div>
<div>MSC MIA / 408W</div>
</div>
</div>
</div>
</div>
<div class="right">
<a-button type="primary">选择</a-button>
</div>
</div>
<p>共计 4 条船期记录</p>
</a-modal>
</div>
</template>
@ -214,6 +401,14 @@ export default {
border: 1px black dashed;
padding: 15px;
margin: 10px 0;
display: flex;
align-items: center;
.left{
width: 80%;
}
.right{
width: 20%;
}
.top{
margin-bottom: 15px;
}
@ -225,6 +420,7 @@ export default {
}
.item{
display: flex;
width: 20%;
.item-left{
margin-right: 10px;
}

@ -348,16 +348,23 @@ export default {
//
this.dictTypeData().then(res => { })
const query = {
typeArr: ['vesselinfo_sort', 'vesselinfo_list_column', 'vesselinfo_page', 'booking_list_cond']
typeArr: ['vesselinfo_sort', 'vesselinfo_list_column', 'vesselinfo_page', 'booking_list_column']
}
DjyUserConfigMulti(this.$qs.stringify(query)).then(res => {
const vessArr = []
res.data.forEach(item => {
let bookArr = []
res.data.forEach(item => {
if (item.type.includes('vesselinfo')) {
vessArr.push(item)
}
})
localStorage.setItem('vesselinfoSetting', JSON.stringify(vessArr))
if (item.type === 'booking_list_column') {
if (item.configJson) {
bookArr = JSON.parse(item.configJson)
}
}
})
localStorage.setItem('vesselinfoSetting', JSON.stringify(vessArr))
localStorage.setItem('bookingSetting', JSON.stringify(bookArr))
})
this.$store.dispatch('getVesselinfo')
},

Loading…
Cancel
Save