pad-app/pages/monitor/index.vue

1498 lines
44 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="app">
<head-info :navIndex="4"></head-info>
<view class="container">
<custom-tabs type="c1" :value="tabsValue" @change="changeTabs">
<custom-tab-pane label="场位图" name="c1_1">
<view></view>
<view class="tab1" v-if="isCwnum == 0">
<view class="form">
<view class="inputBox">
<view class="leftInput">
<uni-easyinput suffixIcon="search" v-model="vinCode" placeholder="车架号/备件号"
@iconClick="search"></uni-easyinput>
</view>
<view class="rightInput">
<superwei-combox class="input" :candidates="shipList" :isJSON="true"
keyName="vslCnname" placeholder="船名" v-model="shipName" @select="shipSelect"
@input="shipInput"></superwei-combox>
<superwei-combox class="input" :candidates="vvyList" :isJSON="true"
keyName="vvyName" placeholder="航次" v-model="vvyName" @input="vvyInput"
@select="vvySelect"></superwei-combox>
<superwei-combox class="input" :candidates="brandList" :isJSON="true"
keyName="brdName" placeholder="品牌" v-model="brdName"
@select="brandSelect"></superwei-combox>
<superwei-combox class="input" :candidates="potList" :isJSON="true"
keyName="potCnname" placeholder="港口" v-model="potname"
@select="potSelect"></superwei-combox>
<superwei-combox class="input zyInput" :candidates="workList" :isJSON="true"
keyName="ptrDesc" placeholder="作业状态" v-model="workName"
@select="workSelect"></superwei-combox>
</view>
</view>
</view>
<view style="padding: 0 8px;">
<view class="dataTitle" @click="isShowData = !isShowData">
<text>数据概况</text>
<p v-if="isShowData">
<uni-icons type="bottom" color="#1890FF" size="16"></uni-icons>
<text style="margin-left: 4px;">收起</text>
</p>
<p v-if="!isShowData">
<uni-icons type="top" color="#1890FF" size="16"></uni-icons>
<text style="margin-left: 4px;">展开</text>
</p>
</view>
<view class="dataBox" v-if="isShowData">
<view class="boxTop">
<view class="topContent">
<view class="contentLeft">
<image src="../../static/images/cwTop1.png" mode=""></image>
</view>
<view class="contentRight">
<text>总车位数</text>
<p>{{surveyList.totalSeatAmout}}</p>
</view>
</view>
<view class="topContent">
<view class="contentLeft">
<image src="../../static/images/cwTop2.png" mode=""></image>
</view>
<view class="contentRight">
<text>使用车位数</text>
<p>{{surveyList.useSeatAmout}}</p>
</view>
</view>
<view class="topContent">
<view class="contentLeft">
<image src="../../static/images/cwTop3.png" mode=""></image>
</view>
<view class="contentRight">
<text>剩余车位数</text>
<p>{{surveyList.remainSeatAmout}}</p>
</view>
</view>
<view class="topContent">
<view class="contentLeft">
<image src="../../static/images/cwTop4.png" mode=""></image>
</view>
<view class="contentRight">
<text>虚拟车位数</text>
<p>{{surveyList.virtuaSeatAmout}}</p>
</view>
</view>
<view class="topContent">
<view class="contentLeft">
<image src="../../static/images/cwTop5.png" mode=""></image>
</view>
<view class="contentRight">
<text>可停放货物数量</text>
<p>{{surveyList.unparkGoodsAmout}}</p>
</view>
</view>
<view class="topContent">
<view class="contentLeft">
<image src="../../static/images/cwTop6.png" mode=""></image>
</view>
<view class="contentRight">
<text>已停放货物数量</text>
<p>{{surveyList.stopGoodsAmout}}</p>
</view>
</view>
</view>
<view class="boxBottom">
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop7.png" mode=""></image>
</view>
<view class="contentRight">
<text>车辆总数(辆)</text>
<p>{{carList.carAmout}}</p>
</view>
</view>
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop8.png" mode=""></image>
</view>
<view class="contentRight">
<text>外贸出口(辆)</text>
<p>{{carList.externalExportCarAmout}}</p>
</view>
</view>
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop9.png" mode=""></image>
</view>
<view class="contentRight">
<text>外贸进口(辆)</text>
<p>{{carList.externalImportCarAmout}}</p>
</view>
</view>
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop10.png" mode=""></image>
</view>
<view class="contentRight">
<text>内贸出口(辆)</text>
<p>{{carList.domesticExportCarAmout}}</p>
</view>
</view>
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop11.png" mode=""></image>
</view>
<view class="contentRight">
<text>内贸进口(辆)</text>
<p>{{carList.domesticImportCarAmout}}</p>
</view>
</view>
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop12.png" mode=""></image>
</view>
<view class="contentRight">
<text>备件总数(件)</text>
<p>{{partsList.partAmout}}</p>
</view>
</view>
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop13.png" mode=""></image>
</view>
<view class="contentRight">
<text>外贸出口(件)</text>
<p>{{partsList.externalExportPartAmout}}</p>
</view>
</view>
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop14.png" mode=""></image>
</view>
<view class="contentRight">
<text>外贸进口(件)</text>
<p>{{partsList.externalImportPartAmout}}</p>
</view>
</view>
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop15.png" mode=""></image>
</view>
<view class="contentRight">
<text>内贸出口(件)</text>
<p>{{partsList.domesticExportPartAmout}}</p>
</view>
</view>
<view class="bottomContent">
<view class="contentLeft">
<image src="../../static/images/cwTop16.png" mode=""></image>
</view>
<view class="contentRight">
<text>内贸进口(件)</text>
<p>{{partsList.domesticImportPartAmout}}</p>
</view>
</view>
</view>
</view>
</view>
<view class="cwMain">
<view class="cwLeft">
<view class="leftData" v-for="(item,index) in dcList" :key="index"
@click="clickLeft(item,index)"
:class="{active:activeIndex == index,gl:item.existFlag == 1}">
<p>{{item.pymName}}
</p>
</view>
</view>
<view class="cwRight">
<view class="rightBox" v-for="(item,index) in qyList" :key="index">
<view class="boxTop">
<p>{{item.pyaAreaCode}}{{item.totalLaneAmout}}/{{item.totalSeatAmout}}</p>
<text @click="clickLine(item)">车道</text>
</view>
<view class="boxContent">
<view class="dataList">
<p>车位总数:
<template v-if="item.totalSeatAmout == null">-- </template>
<template v-else>{{item.totalSeatAmout}}</template>
车位
</p>
<p>使用:
<template v-if="item.useSeatAmout == null">-- </template>
<template v-else>{{item.useSeatAmout}}</template>
车位
</p>
<p>剩余:
<template v-if="item.remainSeatAmout == null">-- </template>
<template v-else>{{item.remainSeatAmout}}</template>
车位
</p>
<p>可停放车辆:
<template v-if="item.unparkGoodsAmout == null">-- </template>
<template v-else>{{item.unparkGoodsAmout}}</template>
</p>
<p>已停放车辆:
<template v-if="item.stopGoodsAmout == null">-- </template>
<template v-else>{{item.stopGoodsAmout}}</template>
</p>
</view>
<view class="boxJd">
<lx-progress-bar title="" :total="item.totalSeatAmout"
:firstValue="item.stopGoodsAmout" contentColor="#0067CF" />
<text>{{item.stopGoodsAmout}}/{{item.totalSeatAmout}}</text>
</view>
<view class="carUl">
<view class="carLi" v-for="(v,index2) in item.carStatisticsList"
:key="index2" @click="clickCar(v)">
<zb-tooltip placement="top-start" color="white"
:visible.sync="v.isShow">
<view slot="content">
<view>
<p v-for="(item2,idx) in v.carDetailList" :key="idx">
{{item2.storeLine}}道,{{item2.storeSeatAmout}}车位
</p>
</view>
</view>
<view style="width: 100%; height: 100%;">
<p class="carTitle">{{v.brdName}}
<template v-if="v.bvmName != ''">
-
</template>
{{v.bvmName}}
</p>
<text>共{{v.carAmout}}辆</text>
</view>
</zb-tooltip>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<template v-else>
<place @modifyPlaceTabs="modifyPlaceTabs" :vvyId="vvyId" :pyaObj="pyaObj" :brdId="brdId"
:potId="potId" :vinCode="vinCode" :workId="workId"></place>
</template>
</custom-tab-pane>
<custom-tab-pane :label="tabsTitle1" name="c1_2">
<view></view>
<view class="tabs2">
<view class="form">
<view class="inputBox">
<view class="leftInput">
<uni-easyinput suffixIcon="search" v-model="vinCode" placeholder="车架号/备件号"
@iconClick="search"></uni-easyinput>
</view>
<view class="rightInput">
<superwei-combox class="input dcInput" :candidates="yardList" :isJSON="true"
keyName="pymName" placeholder="堆场" v-model="yardName"
@select="yardSelect"></superwei-combox>
<superwei-combox class="input" :candidates="jckList" :isJSON="true" keyName="text"
placeholder="进出口" v-model="jckName" @select="jckSelect"></superwei-combox>
<superwei-combox class="input zyInput" :candidates="myList" :isJSON="true"
keyName="text" placeholder="贸易类型" v-model="myName"
@select="mySelect"></superwei-combox>
<superwei-combox class="input" :candidates="shipList" :isJSON="true"
keyName="vslCnname" placeholder="船名" v-model="shipName" @select="shipSelect"
@input="shipInput"></superwei-combox>
<superwei-combox class="input" :candidates="vvyList" :isJSON="true"
keyName="vvyName" placeholder="航次" v-model="vvyName" @select="vvySelect"
@input="vvyInput"></superwei-combox>
<superwei-combox class="input" :candidates="brandList" :isJSON="true"
keyName="brdName" placeholder="品牌" v-model="brdName"
@select="brandSelect"></superwei-combox>
<superwei-combox class="input" :candidates="potList" :isJSON="true"
keyName="potCnname" placeholder="港口" v-model="potname"
@select="potSelect"></superwei-combox>
<superwei-combox class="input zyInput" :candidates="workList" :isJSON="true"
keyName="ptrDesc" placeholder="作业状态" v-model="workName"
@select="workSelect"></superwei-combox>
</view>
</view>
</view>
<view class="itemList">
<template v-if="goodsList.length > 0">
<view class="item" v-for="(item,index) in goodsList" :key="index">
<view class="headTop">
<view class="leftHead">
<image src="../../static/images/zlIcon.png" mode=""></image>
<text>车架号/条形码:{{item.vinCode}}</text>
</view>
<view class="rightHead">
<view class="btn">
<image src="../../static/images/cwCs.png"></image>
<text>残损</text>
</view>
<view class="btn">
<image src="../../static/images/cwJl.png"></image>
<text>作业记录</text>
</view>
</view>
</view>
<view class="row">
<view class="col">
港区:<text>{{item.pamName == null ? "-" : item.pamName}}</text>
</view>
<view class="col">
提单号:<text>{{item.mnfBl == null ? "-" : item.mnfBl}}</text>
</view>
<view class="col">
收车状态:<text>{{item.godStatus == null ? "-" : item.godStatus}}</text>
</view>
<view class="col">
作业时间:<text>{{item.updateTime == null ? "-" : item.updateTime}}</text>
</view>
</view>
<view class="row">
<view class="col">
船名:<text>{{item.vslCnname == null ? "-" : item.vslCnname}}</text>
</view>
<view class="col">
作业状态:<text>{{item.workStatus == null ? "-" : item.workStatus}}</text>
</view>
<view class="col">
港口:<text>{{item.potName == null ? "-" : item.potName}}</text>
</view>
<view class="col">
作业人员:<text>{{item.updateUser == null ? "-" : item.updateUser}}</text>
</view>
</view>
<view class="row">
<view class="col">
航次:<text>{{item.vvyName == null ? "-" : item.vvyName}}</text>
</view>
<view class="col">
堆场名称:<text>{{item.yardName == null ? "-" : item.yardName}}</text>
</view>
<view class="col">
品牌:<text>{{item.brdName == null ? "-" : item.brdName}}</text>
</view>
</view>
<view class="row">
<view class="col">
贸易类型:<text>{{item.tradeType == null ? "-" : item.tradeType}}</text>
</view>
<view class="col">
场位:<text>{{item.posYard == null ? "-" : item.posYard}}</text>
</view>
<view class="col">
型号:<text>{{item.model == null ? "-" : item.model}}</text>
</view>
</view>
<view class="row">
<view class="col">
进出口:<text>{{item.importExportType == null ? "-" : item.importExportType}}</text>
</view>
<view class="col">
车型:<text>{{item.bvmName == null ? "-" : item.bvmName}}</text>
</view>
<view class="col">
车型明细:<text>{{item.bvdName == null ? "-" : item.bvdName}}</text>
</view>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
</view>
<view class="pageBox" v-if="goodsList.length > 0">
<uni-pagination :show-icon="true" :total="total" :pageSize="pageSize" :current="current"
@change="changePage" />
</view>
</view>
</custom-tab-pane>
<custom-tab-pane :label="tabsTitle2" name="c1_3">
<view></view>
<view class="tabs2">
<view class="form">
<view class="inputBox">
<view class="leftInput">
<uni-easyinput suffixIcon="search" v-model="vinCode" placeholder="车架号/备件号"
@iconClick="search"></uni-easyinput>
</view>
<view class="rightInput">
<superwei-combox class="input dcInput" :candidates="yardList" :isJSON="true"
keyName="pymName" placeholder="堆场" v-model="yardName"
@select="yardSelect"></superwei-combox>
<superwei-combox class="input" :candidates="jckList" :isJSON="true" keyName="text"
placeholder="进出口" v-model="jckName" @select="jckSelect"></superwei-combox>
<superwei-combox class="input zyInput" :candidates="myList" :isJSON="true"
keyName="text" placeholder="贸易类型" v-model="myName"
@select="mySelect"></superwei-combox>
<superwei-combox class="input" :candidates="shipList" :isJSON="true"
keyName="vslCnname" placeholder="船名" v-model="shipName" @select="shipSelect"
@input="shipInput"></superwei-combox>
<superwei-combox class="input" :candidates="vvyList" :isJSON="true"
keyName="vvyName" placeholder="航次" v-model="vvyName" @select="vvySelect"
@input="vvyInput"></superwei-combox>
<superwei-combox class="input" :candidates="brandList" :isJSON="true"
keyName="brdName" placeholder="品牌" v-model="brdName"
@select="brandSelect"></superwei-combox>
<superwei-combox class="input" :candidates="potList" :isJSON="true"
keyName="potCnname" placeholder="港口" v-model="potname"
@select="potSelect"></superwei-combox>
<superwei-combox class="input zyInput" :candidates="workList" :isJSON="true"
keyName="ptrDesc" placeholder="作业状态" v-model="workName"
@select="workSelect"></superwei-combox>
</view>
</view>
</view>
<view class="itemList">
<template v-if="ycGoodsList.length > 0">
<view class="item" v-for="(item,index) in ycGoodsList" :key="index">
<view class="headTop">
<view class="leftHead">
<image src="../../static/images/zlIcon.png" mode=""></image>
<text>车架号/条形码{{item.vinCode}}</text>
</view>
<view class="rightHead">
<view class="btn">
<image src="../../static/images/cwCs.png"></image>
<text>残损</text>
</view>
<view class="btn">
<image src="../../static/images/cwJl.png"></image>
<text>作业记录</text>
</view>
</view>
</view>
<view class="row">
<view class="col">
港区<text>{{item.pamName == null ? "-" : item.pamName}}</text>
</view>
<view class="col">
提单号<text>{{item.mnfBl == null ? "-" : item.mnfBl}}</text>
</view>
<view class="col">
收车状态<text>{{item.godStatus == null ? "-" : item.godStatus}}</text>
</view>
<view class="col">
作业时间<text>{{item.updateTime == null ? "-" : item.updateTime}}</text>
</view>
</view>
<view class="row">
<view class="col">
船名<text>{{item.vslCnname == null ? "-" : item.vslCnname}}</text>
</view>
<view class="col">
作业状态<text>{{item.workStatus == null ? "-" : item.workStatus}}</text>
</view>
<view class="col">
港口<text>{{item.potName == null ? "-" : item.potName}}</text>
</view>
<view class="col">
作业人员<text>{{item.updateUser == null ? "-" : item.updateUser}}</text>
</view>
</view>
<view class="row">
<view class="col">
航次<text>{{item.vvyName == null ? "-" : item.vvyName}}</text>
</view>
<view class="col">
堆场名称<text>{{item.yardName == null ? "-" : item.yardName}}</text>
</view>
<view class="col">
品牌<text>{{item.brdName == null ? "-" : item.brdName}}</text>
</view>
<view class="col">
备注<text>{{item.remark == null ? "-" : item.remark}}</text>
</view>
</view>
<view class="row">
<view class="col">
贸易类型<text>{{item.tradeType == null ? "-" : item.tradeType}}</text>
</view>
<view class="col">
场位<text>{{item.posYard == null ? "-" : item.posYard}}</text>
</view>
<view class="col">
型号<text>{{item.model == null ? "-" : item.model}}</text>
</view>
</view>
<view class="row">
<view class="col">
进出口<text>{{item.importExportType == null ? "-" : item.importExportType}}</text>
</view>
<view class="col">
车型<text>{{item.bvmName == null ? "-" : item.bvmName}}</text>
</view>
<view class="col">
车型明细<text>{{item.bvdName == null ? "-" : item.bvdName}}</text>
</view>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
</view>
<view class="pageBox" v-if="ycGoodsList.length > 0">
<uni-pagination :show-icon="true" :total="total" :pageSize="pageSize" :current="current"
@change="changePage" />
</view>
</view>
</custom-tab-pane>
</custom-tabs>
</view>
</view>
</template>
<script>
import HeadInfo from '@/components/head-info/head-info';
import place from './place.vue';
export default {
data() {
return {
tabsValue: 0,
tabsTitle1: "货物列表",
tabsTitle2: "场位异常货物列表",
loginObj: {},
portObj: {},
// 查询条件
// 车架号/备件号
vinCode: "",
// 货物列表下拉堆场
yardId: "",
yardName: "",
yardList: [],
// 进出口
jckId: "",
jckName: "",
jckList: [{
id: "I",
text: "进口"
},
{
id: "E",
text: "出口"
}
],
// 贸易类型
myId: "",
myName: "",
myList: [{
id: "W",
text: "外贸"
},
{
id: "N",
text: "内贸"
}
],
// 航次
vvyId: "",
vvyName: "",
vvyList: [],
// 航次下拉出来船ID
vvySpmId: "",
// 船名
shipId: "",
shipName: "",
shipList: [],
// 品牌
brdId: "",
brdName: "",
brandList: [],
// 港口
potId: "",
potname: "",
potList: [],
// 作业状态
workId: "",
workName: "",
workList: [],
// 场位概况
surveyList: {},
carTabsValue: 0,
// 车辆
carList: {},
// 备件
partsList: {},
// 是否展开
isShowData: false,
// 选中左侧堆场
activeIndex: 0,
// 场位图左侧堆场
dcId: "",
dcName: "",
dcList: [],
// 区域
pyaObj: "",
qyList: [],
// 场位的状态 是否进入车道
isCwnum: 0,
// 货物列表数据
goodsList: [],
// 场位异常货物列表
ycGoodsList: [],
// 分页
total: 0,
pageSize: 10,
current: 1,
}
},
onBackPress(options) {
// 触发返回就会调用此方法,这里实现的是禁用物理返回,顶部导航栏的自定义返回 uni.navigateBack 仍可使用
if (options.from == 'backbutton') {
return true;
} else if (options.from == 'navigateBack') {
return false;
}
},
onLoad() {
this.loginObj = uni.getStorageSync('loginObj')
this.portObj = uni.getStorageSync('portObj')
this.getShip("")
this.getVvy("")
this.getBrand()
this.getPot()
this.getWork()
this.getDc()
this.getYard()
this.getGoodsInfo()
this.getYcGoodsInfo()
},
components: {
HeadInfo,
place
},
methods: {
// tabs切换
changeTabs(e) {
this.tabsValue = e.value
this.yardId = ""
this.yardName = ""
this.vinCode = ""
this.vvyId = ""
this.vvyName = ""
this.vvySpmId = ""
this.shipId = ""
this.shipName = ""
this.brdId = ""
this.brdName = ""
this.potId = ""
this.potname = ""
this.workId = ""
this.workName = ""
this.jckId = ""
this.jckName = ""
this.myId = ""
this.myName = ""
this.activeIndex = 0
this.current = 1
if (this.tabsValue == 0) {
this.getDc()
this.getGoodsInfo()
this.getYcGoodsInfo()
} else if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 查询条件
// 查询框
search() {
if (this.tabsValue == 0) {
this.getQy()
} else if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 获取船名
getShip(query) {
uni.request({
url: `${this.$local}/api/shipManage/queryLikeShipManage?query=${query}&spmId=${this.vvySpmId}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == "200") {
this.shipList = res.data.data
}
}
})
},
// 船名模糊查询
shipInput(e) {
this.getShip(e)
},
// 选择船名
shipSelect(e) {
this.shipId = e.spmId
this.shipName = e.vslCnname
this.getVvy("")
if (this.tabsValue == 0) {
this.getQy()
this.getDc()
} else if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 获取航次
getVvy(key) {
uni.request({
url: `${this.$local}/api/shipInstructions/queryByKey?key=${key}&spmId=${this.shipId}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == "200") {
this.vvyList = res.data.data
}
}
})
},
// 航次模糊查询
vvyInput(e) {
this.getVvy(e)
},
// 选择航次
vvySelect(e) {
console.log(e)
this.vvyId = e.vvyId
this.vvyName = e.vvyName
this.vvySpmId = e.spmId
this.getShip("")
if (this.tabsValue == 0) {
this.getQy()
this.getDc()
} else if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 获取品牌
getBrand() {
uni.request({
url: `${this.$local}/api/yardGoods/monitor/goods/brand`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == "200") {
this.brandList = res.data.data
}
}
})
},
// 选择品牌
brandSelect(e) {
this.brdId = e.brdId
this.brdName = e.brdName
if (this.tabsValue == 0) {
this.getQy()
this.getDc()
} else if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 获取港口
getPot() {
uni.request({
url: `${this.$local}/api/yardGoods/monitor/goods/pot`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == "200") {
this.potList = res.data.data
}
}
})
},
// 选择港口
potSelect(e) {
this.potId = e.potId
this.potName = e.potCnname
if (this.tabsValue == 0) {
this.getQy()
this.getDc()
} else if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 获取作业状态
getWork() {
uni.request({
url: `${this.$local}/api/miniapp/typeRef/domain/WORK_STATUS`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == "200") {
this.workList = res.data.data
}
}
})
},
// 选择作业状态
workSelect(e) {
this.workId = e.ptrCode
this.workName = e.ptrDesc
if (this.tabsValue == 0) {
this.getQy()
this.getDc()
} else if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 获取堆场数据
getYard() {
uni.request({
url: `${this.$local}/api/yard/sel/query/yard?pamId=${this.portObj.portId}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == "200") {
this.yardList = res.data.data
}
}
})
},
// 选择堆场
yardSelect(e) {
this.yardId = e.pymId
this.yardName = e.pymName
if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 选择进出口
jckSelect(e) {
this.jckId = e.id
this.jckName = e.text
if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 选择贸易类型
mySelect(e) {
this.myId = e.id
this.myName = e.text
if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
// 场位图
// 获取场位概况
getSurvey() {
uni.request({
url: `${this.$local}/api/yardGoods/monitor/situation?pamId=${this.portObj.portId}&pymId=${this.dcId}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.statusCode == 200) {
this.surveyList = res.data.data
if (this.surveyList.carSituation != null) {
this.carList = this.surveyList.carSituation
}
if (this.surveyList.partSituation != null) {
this.partsList = this.surveyList.partSituation
}
}
}
})
},
// 获取左侧堆场列表
getDc() {
uni.request({
url: `${this.$local}/api/yardGoods/monitor/goods/manage/page?displayFlag=0&pamId=${this.portObj.portId}&vvyId=${this.vvyId}&brdId=${this.brdId}&potId=${this.potId}&spmId=${this.shipId}&vinCode=${this.vinCode}&workStatuss=${this.workId}&size=100`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == "200") {
this.dcList = res.data.data.records
this.dcId = this.dcList[0].pymId
this.dcName = this.dcList[0].pymName
this.getSurvey()
this.getQy()
}
}
})
},
// 点击左侧列表
clickLeft(item, index) {
this.dcId = item.pymId
this.dcName = item.pymName
this.activeIndex = index
this.getSurvey()
this.getQy()
},
// 获取右侧区域数据
getQy() {
uni.request({
url: `${this.$local}/api/yardGoods/monitor/region/statistics?spmId=${this.shipId}&vvyId=${this.vvyId}&pymId=${this.dcId}&displayFlag=0&brdId=${this.brdId}&potId=${this.potId}&vinCode=${this.vinCode}&workStatuss=${this.workId}&size=1000`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.statusCode == 200) {
this.qyList = res.data.data.records
this.qyList.forEach(v => {
if (v.remainSeatAmout == null) {
this.$set(v, "remainSeatAmout", 0)
}
if (v.stopGoodsAmout == null) {
this.$set(v, "stopGoodsAmout", 0)
}
if (v.totalLaneAmout == null) {
this.$set(v, "totalLaneAmout", 0)
}
if (v.totalSeatAmout == null) {
this.$set(v, "totalSeatAmout", 0)
}
if (v.unparkGoodsAmout == null) {
this.$set(v, "unparkGoodsAmout", 0)
}
if (v.useSeatAmout == null) {
this.$set(v, "useSeatAmout", 0)
}
if (v.carStatisticsList != null) {
v.carStatisticsList.forEach(e => {
this.$set(e, "isShow", false)
})
}
})
}
}
})
},
// 点击车位查看详情
clickCar(item) {
item.isShow = !item.isShow
},
// 点击车道
clickLine(item) {
this.pyaObj = item
this.isCwnum = 1;
},
// 子组件修改值
modifyPlaceTabs(data) {
this.isCwnum = data;
},
// 货物列表
// 获取货物列表货物信息数据
getGoodsInfo() {
uni.request({
url: `${this.$local}/api/yardGoods/monitor/goods/list?brdId=${this.brdId}&pamId=${this.portObj.portId}&potId=${this.potId}&pymId=${this.yardId}&spmId=${this.shipId}&vinCode=${this.vinCode}&vvyId=${this.vvyId}&workStatuss=${this.workId}&importExportType=${this.jckId}&tradeType=${this.myId}&current=${this.current}&size=${this.pageSize}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == "200") {
this.goodsList = res.data.data.records
this.total = res.data.data.total
this.tabsTitle1 = `货物列表(${this.total})`
}
}
})
},
// 获取场位异常货物列表
getYcGoodsInfo() {
uni.request({
url: `${this.$local}/api/yardGoods/monitor/error/list?brdId=${this.brdId}&pamId=${this.portObj.portId}&potId=${this.potId}&pymId=${this.yardId}&spmId=${this.shipId}&vinCode=${this.vinCode}&vvyId=${this.vvyId}&workStatuss=${this.workId}&importExportType=${this.jckId}&tradeType=${this.myId}&current=${this.current}&size=${this.pageSize}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == "200") {
this.ycGoodsList = res.data.data.records
this.total = res.data.data.total
this.tabsTitle2 = `场位异常货物列表(${this.total})`
}
}
})
},
// 点击分页
changePage(e) {
this.current = e.current;
if (this.tabsValue == 1) {
this.getGoodsInfo()
} else if (this.tabsValue == 2) {
this.getYcGoodsInfo()
}
},
}
};
</script>
<style lang="less" scoped>
.container {
height: 100vh;
margin-top: 68px;
/deep/.tab .tab-bar {
height: 66px;
line-height: 66px;
font-family: PingFangSC-Semibold;
font-weight: 600;
position: fixed;
left: 0;
top: 68px;
z-index: 996;
}
/deep/.tab .tab-bar-item {
font-size: 18px;
height: 66px;
line-height: 66px;
}
/deep/.tab .tab-bar-item .active-line {
height: 4px;
width: calc(100% - 40px);
padding: 0 10px;
}
/deep/.tab .tab-cont {
padding: 0;
}
/deep/.tab-pane {
width: 100%;
}
.form {
background: #FAFAFA;
border-top: 1px solid #EEEEEE;
border-bottom: 1px solid #EEEEEE;
.inputBox {
width: 100%;
display: flex;
justify-content: space-between;
padding: 5px 10px;
.leftInput {
width: 300px;
}
/deep/.uni-easyinput {
width: 300px;
/deep/.content-clear-icon {
padding-right: 16px;
}
}
/deep/.is-input-border {
border-radius: 18.5px;
}
.rightInput {
display: flex;
gap: 10px;
}
}
.input {
width: 80px;
height: 35px;
line-height: 35px;
background: transparent;
border: none;
/deep/.superwei-combox__input {
text-align: right;
padding-right: 6px;
}
/deep/.superwei-combox__input-plac {
color: #000;
}
}
.dcInput {
width: 120px;
}
.zyInput {
width: 100px;
}
.btn {
height: 35px;
line-height: 35px;
margin-right: 10px;
}
}
.tab1 {
margin-top: 66px;
.dataTitle {
margin-top: 14px;
width: 100%;
height: 36px;
line-height: 36px;
font-size: 14px;
color: #1890FF;
padding: 0 16px;
display: flex;
justify-content: space-between;
background: #FFFFFF;
border: 1px solid #E1E5ED;
text:first-child {
font-size: 16px;
color: #0D518B;
}
}
.dataBox {
width: 100%;
padding: 0 8px;
margin-top: 8px;
.boxTop {
display: flex;
justify-content: space-between;
.topContent {
width: calc(100% / 6 - 8px);
height: 70px;
background-color: #fff;
box-shadow: 0 4px 14px 0 rgba(228, 228, 228, 0.50);
border-radius: 4px;
display: flex;
}
}
.boxBottom {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 16px;
margin-top: 16px;
.bottomContent {
width: calc(100% / 5 - 16px);
height: 70px;
background-color: #fff;
box-shadow: 0 4px 14px 0 rgba(228, 228, 228, 0.50);
border-radius: 4px;
display: flex;
}
}
.contentLeft {
display: flex;
flex-direction: column;
justify-content: center;
margin-right: 8px;
margin-left: 14px;
image {
width: 50px;
height: 50px;
}
}
.contentRight {
display: flex;
flex-direction: column;
justify-content: center;
text {
font-size: 13px;
color: #666666;
}
p {
margin-top: 4px;
ont-family: D-DINExp;
font-size: 24px;
color: #252525;
}
}
}
.cwMain {
display: flex;
width: 100%;
height: calc(100vh - 66px - 68px - 47px);
margin-top: 16px;
.cwLeft {
width: 128px;
height: 100%;
background-color: #fff;
overflow: scroll;
.leftData {
width: 116px;
height: 42px;
text-align: center;
line-height: 42px;
margin: 4px 6px;
overflow: hidden;
}
.gl {
box-shadow: 5px 5px 20px 1px #0371e024 inset;
border: 1px solid rgba(3, 114, 224);
}
.active {
color: #fff;
background-color: #0372E0;
border-radius: 4px;
}
}
.cwRight {
width: calc(100% - 128px);
height: 100%;
overflow: scroll;
padding-left: 18px;
background: #F5F6FA;
display: flex;
flex-wrap: wrap;
margin-top: 10px;
padding: 8px 16px;
.rightBox {
width: calc(33.3% - 10px);
height: 214px;
border: 1px solid #E1E5ED;
margin-right: 10px;
margin-bottom: 10px;
/deep/.zb_tooltip_content {
width: 100%;
}
.boxTop {
width: 100%;
height: 32px;
border-bottom: 1px solid #E1E5ED;
line-height: 32px;
display: flex;
justify-content: space-between;
padding: 0 8px;
background: #FAFAFA;
p {
font-size: 14px;
color: #0D518B;
}
text {
font-size: 14px;
color: #1677FF;
}
}
.boxContent {
height: 180px;
overflow: scroll;
padding: 5px 8px;
.dataList {
display: flex;
flex-wrap: wrap;
p {
margin-right: 10px;
font-size: 12px;
color: #666666;
}
}
.boxJd {
display: flex;
margin-top: 10px;
text {
margin-left: 10px;
font-size: 14px;
color: #333333;
}
/deep/.progress-bar-title {
margin: 0;
}
/deep/.bar {
height: 8px;
margin-top: 5px;
width: 240px;
border-radius: 50%;
}
/deep/.progress-bar .bar-single {
width: 100%;
height: 100%;
border-radius: 8px;
}
/deep/.progress-bar .bar-double {
height: 100%;
}
/deep/.progress-bar .bar-interval {
width: 0;
}
/deep/.bar-text span {
display: none;
}
}
.carUl {
width: 100%;
display: flex;
flex-wrap: wrap;
.carLi {
width: calc(50% - 12px);
height: 42px;
margin: 8px 12px;
margin-left: 0;
background: #ffffff;
border: 1px solid #e1e5ed;
font-family: PingFangSC-Regular;
font-size: 12px;
line-height: 15px;
padding: 4px 8px;
.carTitle {
font-size: 12px;
color: #1677FF;
margin-bottom: 4px;
}
}
}
}
}
}
}
}
.tabs2 {
margin-top: 66px;
padding-bottom: 20px;
.itemList {
padding: 16px;
display: flex;
flex-direction: column;
.item {
padding: 15px;
border-radius: 8px;
background-color: #fff;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #23262E;
margin-bottom: 16px;
.headTop {
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 10px;
.leftHead {
font-size: 16px;
color: #23262E;
font-weight: bold;
display: flex;
image {
width: 18px;
height: 18px;
margin-right: 7px;
}
}
.rightHead {
font-size: 16px;
color: #1677FF;
display: flex;
.btn {
display: flex;
margin-left: 16px;
image {
width: 16px;
height: 16px;
margin-right: 8px;
margin-top: 3px;
}
}
}
}
.row {
width: 19%;
flex-direction: column;
display: flex;
}
.col {
margin-bottom: 10px;
color: #999999;
text {
color: #23262E;
}
}
}
}
}
}
</style>