merge and update dashboard detail

This commit is contained in:
2022-03-16 20:11:30 +08:00
37 changed files with 678 additions and 666 deletions

View File

@@ -2,7 +2,7 @@
* @Author: gtz
* @Date: 2022-03-03 09:16:10
* @LastEditors: gtz
* @LastEditTime: 2022-03-16 19:12:35
* @LastEditTime: 2022-03-16 20:07:40
* @Description: file content
* @FilePath: \mt-ck-wms-ui\src\views\dashboard\index.vue
-->
@@ -23,9 +23,10 @@
{{ item.name }}
</div>
<div class="dashboard-legend-search">
<el-select v-model="current" size="mini" placeholder="请选择库存范围" @change="handleChange">
<el-select v-model="current" size="mini" @change="handleChange">
<el-option v-for="item in totalPage" :key="'select' + item" :label="$t('module.dashboard.pageHeader') + item + $t('module.dashboard.pageFooter')" :value="item" />
</el-select>
<el-button type="primary" @click="refresh">{{ 'btn.refresh' | i18nFilter }}</el-button>
</div>
</el-row>
<el-row v-if="current * 80 < shelfVoList[0].rowVoList[0].portVoList.length" class="dashboard-layout" :gutter="12">
@@ -92,34 +93,28 @@ export default {
},
created() {
this.totalPage = Math.ceil(this.shelfVoList[0].rowVoList[0].portVoList.length / 80)
getPortList().then(res => {
console.log(res.data[0].shelfVoList)
this.shelfVoList = res.data[0].shelfVoList.map(item => {
item.rowVoList.map(i => {
i.portVoList.map(z => {
if (!(z.attribute)) {
z.attribute = 0
}
return z
})
return i
})
return item
})
this.totalPage = Math.ceil(this.shelfVoList[0].rowVoList[0].portVoList.length / 80)
})
this.init()
},
methods: {
init() {
getPortList().then(res => {
this.shelfVoList = res.data[0].shelfVoList
this.totalPage = Math.ceil(this.shelfVoList[0].rowVoList[0].portVoList.length / 80)
})
},
handleChange(v) {
console.log(v)
},
handlePort(z, x) {
getPortDetail(z.portVoList[x].id).then(res => {
getPortDetail(z.portVoList[x - 1].id).then(res => {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(res.data)
this.$refs.addOrUpdate.init({ ...(res.data), ...z.portVoList[x - 1] })
})
})
},
refresh() {
this.init()
}
}
}