QuKatie 3 年 前
コミット
ab9b99b53f

+ 32 - 2
src/views/index.vue

@@ -907,8 +907,9 @@ export default {
           textTwo:[],
           textTwo:[],
           data:[],
           data:[],
           dataTwo:[]
           dataTwo:[]
-        }
+        },
       },
       },
+      boxCMCC:[],
       // 利润统计数据获得
       // 利润统计数据获得
       profitData: {
       profitData: {
         xData: [],
         xData: [],
@@ -1001,10 +1002,14 @@ export default {
     this.dataList.bookingRanking.data = []
     this.dataList.bookingRanking.data = []
     this.dataList.bookingRanking.dataTwo = []
     this.dataList.bookingRanking.dataTwo = []
     if (Number(this.sysType) === 3){
     if (Number(this.sysType) === 3){
+      let arr=[]
       boxDistribution().then(res =>{
       boxDistribution().then(res =>{
         res.data.forEach(item =>{
         res.data.forEach(item =>{
           this.dataList.addressName.push(item.addressName)
           this.dataList.addressName.push(item.addressName)
           this.dataList.boxNumber.push(item.boxNumber)
           this.dataList.boxNumber.push(item.boxNumber)
+          if(item.details){
+           this.boxCMCC=item.details
+          }
         })
         })
         this.boxDistribution()
         this.boxDistribution()
       })
       })
@@ -1192,6 +1197,7 @@ export default {
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
       let myChart = this.$echarts.init(document.getElementById("distribution"));
       let myChart = this.$echarts.init(document.getElementById("distribution"));
       // 绘制图表
       // 绘制图表
+      let _this=this
       myChart.setOption({
       myChart.setOption({
         title: {
         title: {
           text: "箱分布",
           text: "箱分布",
@@ -1202,7 +1208,31 @@ export default {
           data: this.dataList.addressName
           data: this.dataList.addressName
         },
         },
         tooltip: {
         tooltip: {
-          trigger: 'axis'
+          trigger: 'axis',
+           formatter(params){
+            let res=''
+            params.forEach(item=>{
+              if(item.name=='在船'){
+                params.forEach(item=>{
+                  let data=''
+                  if(_this.boxCMCC.length>0){
+                   _this.boxCMCC.forEach(e=>{
+                    data+=e.f_vsl+':'+e.f_voy+'</br>'
+                   })
+                  }else{
+                    data='-'+'</br>'
+                  }
+                  res=item.axisValueLabel+'</br>'+data+item.marker+item.data
+                })
+              }else{
+                params.forEach(item=>{
+                 res=item.axisValueLabel+'</br>'+item.marker+item.data
+                })
+              }
+            })
+            return res
+            
+       }
         },
         },
         yAxis: {
         yAxis: {
           type: 'value'
           type: 'value'

+ 14 - 0
src/views/kaihe/singleVoyageShip/index.vue

@@ -14,6 +14,8 @@
               v-model="queryParams.fVslid"
               v-model="queryParams.fVslid"
               placeholder="请选择船名"
               placeholder="请选择船名"
               clearable
               clearable
+              @change="fvslChange"
+              @clear="fvslClear"
               size="small"
               size="small"
               filterable
               filterable
             >
             >
@@ -385,6 +387,18 @@ export default {
     this.getList();
     this.getList();
   },
   },
   methods: {
   methods: {
+    fvslChange(id) {
+      getVoyageName({fPid:id}).then((response) => {
+        this.voyageOptions = response.rows;
+      });
+      this.queryParams.fVoyid = null;
+    },
+    fvslClear() {
+         getVoyageName().then((response) => {
+        this.voyageOptions = response.rows;
+      });
+      this.queryParams.fVoyid = null;
+    },
     refresh(){
     refresh(){
       this.getList()
       this.getList()
     },
     },

+ 2 - 0
src/views/kaihe/singleVoyageShip/indexItem.vue

@@ -159,6 +159,8 @@ export default {
         billList: arr,
         billList: arr,
         fUpdatetime: this.departure,
         fUpdatetime: this.departure,
         updateStatus: "1",
         updateStatus: "1",
+        fVsl:this.selecList[0].vslName,
+        fVoy:this.selecList[0].voyNo
       };
       };
       cargoStatus(data).then((response) => {
       cargoStatus(data).then((response) => {
         this.$emit("refresh");
         this.$emit("refresh");