|
@@ -1,7 +1,14 @@
|
|
|
<template>
|
|
|
<div class="container-view">
|
|
|
<div v-loading="treeLoading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="container-left">
|
|
|
- <el-tree :data="containerHistoryTree" :props="defaultTreeProps" node-key="index" default-expand-all :expand-on-click-node="false" @current-change="currentChangeHandler" />
|
|
|
+ <el-tree :data="containerHistoryTree" :props="defaultTreeProps" node-key="index" default-expand-all :expand-on-click-node="false" @current-change="currentChangeHandler" >
|
|
|
+ <span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
+ <el-tooltip class="item" effect="dark" :content="msg" placement="top" v-if="data.index==-1">
|
|
|
+ <span>{{ node.label }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ <span v-else>{{ node.label }}</span>
|
|
|
+ </span>
|
|
|
+ </el-tree>
|
|
|
</div>
|
|
|
<div v-loading="tableLoading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="container-right">
|
|
|
|
|
@@ -116,7 +123,9 @@ export default {
|
|
|
tableData: [],
|
|
|
tableDataFilters: {},
|
|
|
filterValues: {},
|
|
|
- tableDataSortRules: {}
|
|
|
+ tableDataSortRules: {},
|
|
|
+ containerNO:"",
|
|
|
+ msg:"容器历史默认显示最近10条历史,如果需要可联系管理员进行配置"
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -125,7 +134,7 @@ export default {
|
|
|
return [
|
|
|
{
|
|
|
index: -1,
|
|
|
- label: '容器历史',
|
|
|
+ label: '容器历史'+'-'+this.containerNO,
|
|
|
children: this.containerHistory.map(({ flightNO, flightDate, departureAirport, arriveAirport }, index) => ({
|
|
|
index,
|
|
|
label: [flightNO, flightDate.replaceAll('-', '/'), departureAirport, arriveAirport].join('-')
|
|
@@ -162,9 +171,11 @@ export default {
|
|
|
handler ({ path, query }) {
|
|
|
if (path.includes('containerView')) {
|
|
|
const { containerID } = query
|
|
|
+ this.containerNO = containerID;
|
|
|
if (containerID) {
|
|
|
const { containerID: oldContainerID } = this.queryData
|
|
|
if (containerID !== oldContainerID) {
|
|
|
+ this.containerNO = containerID;
|
|
|
this.queryData = { containerID }
|
|
|
this.queryContainerHistory([containerID])
|
|
|
}
|
|
@@ -326,6 +337,7 @@ export default {
|
|
|
try {
|
|
|
const result = await myQuery(DATACONTENT_ID.containerHistory, ...dataContent)
|
|
|
this.containerHistory = result
|
|
|
+ this.msg = "容器历史默认显示最近"+this.containerHistory[0].k+"条历史,如果需要可联系管理员进行配置"
|
|
|
} catch (error) {
|
|
|
|
|
|
}
|