Commit 639bfc19 authored by huhaiqing's avatar huhaiqing

修复agent

parent 6e3467db
......@@ -2,16 +2,16 @@
<div class="app-seaProcess">
<!-- 海运流程图 -->
<el-scrollbar :vertical="true" viewClass="shipping-chart">
<div v-for="(nodes,index) in seaBaseData" :key="index" class="chart-nodes">
<div v-for="(nodes,index) in processData" :key="index" class="chart-nodes">
<div class="node-area">
<div v-for="node in nodes" :key="node.title" @click="nodeClick(index, node)" class="node-div">
<div v-show="isShowAgent(node.type)">
<div>
<img :src="getImgSrc(node)" alt="">
<p>{{node.title}}</p>
</div>
</div>
</div>
<div class="arrow-area" v-if="index !== (seaBaseData.length-1)">
<div class="arrow-area" v-if="index !== (processData.length-1)">
<img src="@/assets/images/shipping/jt-start.png" alt="" v-if="index >= currIndex">
<img src="@/assets/images/shipping/jt-end.png" alt="" v-if="index < currIndex">
</div>
......@@ -90,10 +90,12 @@ export default {
currIndex: 0,
// 当前节点
currNode: {},
// 数据
processData: this.seaBaseData,
};
},
created() {},
computed: {
/* computed: {
isShowAgent() {
return (type) => {
if (type === "agent") {
......@@ -106,7 +108,7 @@ export default {
return true;
};
},
},
}, */
methods: {
/** 关闭弹窗 */
closeDialog(type) {
......@@ -176,6 +178,7 @@ export default {
watch: {
/* 监听发货对象 */
shipmentObj(val) {
let newNodes = [];
// 迭代每个节点
for (let i = 0; i < this.seaBaseData.length; i++) {
const nodes = this.seaBaseData[i];
......@@ -218,7 +221,9 @@ export default {
// 加1表示为已完成步骤后一步
this.currIndex = i + 1;
}
newNodes.push(nodes);
}
this.processData = newNodes;
},
},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment