|
@@ -17,7 +17,7 @@
|
|
|
<div class="fxc_top_num">
|
|
<div class="fxc_top_num">
|
|
|
<numCard v-for="(item,index) in ''+finished" :key="index" :num="item || 0" :color="'#EF4598'"></numCard>
|
|
<numCard v-for="(item,index) in ''+finished" :key="index" :num="item || 0" :color="'#EF4598'"></numCard>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="fxc_top_type">已结束(个)</div>
|
|
|
|
|
|
|
+ <div class="fxc_top_type">已出库(个)</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="fxc_top_item">
|
|
<div class="fxc_top_item">
|
|
@@ -26,7 +26,7 @@
|
|
|
<div class="fxc_top_num">
|
|
<div class="fxc_top_num">
|
|
|
<numCard v-for="(item,index) in ''+transit" :key="index" :num="item || 0" :color="'#F8B30E'"></numCard>
|
|
<numCard v-for="(item,index) in ''+transit" :key="index" :num="item || 0" :color="'#F8B30E'"></numCard>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="fxc_top_type">运输中(个)</div>
|
|
|
|
|
|
|
+ <div class="fxc_top_type">已入库(个)</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="fxc_top_item">
|
|
<div class="fxc_top_item">
|
|
@@ -35,7 +35,7 @@
|
|
|
<div class="fxc_top_num">
|
|
<div class="fxc_top_num">
|
|
|
<numCard v-for="(item,index) in ''+used" :key="index" :num="item || 0" :color="'#3E9DFF'"></numCard>
|
|
<numCard v-for="(item,index) in ''+used" :key="index" :num="item || 0" :color="'#3E9DFF'"></numCard>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="fxc_top_type">已使用(个)</div>
|
|
|
|
|
|
|
+ <div class="fxc_top_type">已结束(个)</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -94,46 +94,47 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="fxc_mid">
|
|
|
|
|
|
|
+ <div class="fxc_mid" @click="hideInfo">
|
|
|
<div class="fxc_map">
|
|
<div class="fxc_map">
|
|
|
- <mapPage></mapPage>
|
|
|
|
|
|
|
+ <mapPage :markers="markers"></mapPage>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="fxc_mid_con1">
|
|
|
|
|
|
|
+ <div class="fxc_mid_con1" v-if="markerInfo">
|
|
|
<div class="fxc_win_icon1"></div>
|
|
<div class="fxc_win_icon1"></div>
|
|
|
<div class="fxc_win_icon2"></div>
|
|
<div class="fxc_win_icon2"></div>
|
|
|
<div class="fxc_win_icon3"></div>
|
|
<div class="fxc_win_icon3"></div>
|
|
|
<div class="fxc_win_icon4"></div>
|
|
<div class="fxc_win_icon4"></div>
|
|
|
<div class="fxc_mc1_txt">
|
|
<div class="fxc_mc1_txt">
|
|
|
- 检测对象:货物<br>
|
|
|
|
|
- 当前温度:42℃<br>
|
|
|
|
|
- 最低温度:12℃<br>
|
|
|
|
|
- 检测状态:正常<br>
|
|
|
|
|
- 更新时间:2021-09-09 12:00
|
|
|
|
|
|
|
+ 检测对象:{{markerInfo.name||"--"}}<br>
|
|
|
|
|
+ 当前温度:{{markerInfo.lastTemperature||"--"}}℃<br>
|
|
|
|
|
+ 最低温度:{{markerInfo.minTemperature||"--"}}℃<br>
|
|
|
|
|
+ 检测状态:{{markerInfo.statusStr||"--"}}<br>
|
|
|
|
|
+ 更新时间:{{markerInfo.updateTime||"--"}}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="fxc_mid_con2">
|
|
|
|
|
|
|
+ <div class="fxc_mid_con2" v-if="chaintemp">
|
|
|
<div class="fxc_win_icon1"></div>
|
|
<div class="fxc_win_icon1"></div>
|
|
|
<div class="fxc_win_icon2"></div>
|
|
<div class="fxc_win_icon2"></div>
|
|
|
<div class="fxc_win_icon3"></div>
|
|
<div class="fxc_win_icon3"></div>
|
|
|
<div class="fxc_win_icon4"></div>
|
|
<div class="fxc_win_icon4"></div>
|
|
|
<div class="fxc_mc2_con">
|
|
<div class="fxc_mc2_con">
|
|
|
- <lineChart></lineChart>
|
|
|
|
|
|
|
+ <lineChart :chaintemp="chaintemp"></lineChart>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="fxc_right1">
|
|
<div class="fxc_right1">
|
|
|
<div class="fxc_tit">储运状态</div>
|
|
<div class="fxc_tit">储运状态</div>
|
|
|
<div class="fxc_right1_con">
|
|
<div class="fxc_right1_con">
|
|
|
- <barChart></barChart>
|
|
|
|
|
|
|
+ <barChart :chipStates="chipStates"></barChart>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="fxc_right2">
|
|
<div class="fxc_right2">
|
|
|
<div class="fxc_tit">监测数量</div>
|
|
<div class="fxc_tit">监测数量</div>
|
|
|
<div class="fxc_right2_con">
|
|
<div class="fxc_right2_con">
|
|
|
- <huan2d :id="'huan2d1'" :value1="1220" :value2="1000" :value3="1200"></huan2d>
|
|
|
|
|
|
|
+ <huan2d :id="'huan2d1'" :chipCountData="chipCountData"></huan2d>
|
|
|
|
|
+ <!-- <huan2d :id="'huan2d1'" :chipCountData="chipCountData" :value1="1220" :value2="1000" :value3="1200"></huan2d> -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="no_login" @click="goLogin">
|
|
|
|
|
|
|
+ <div class="no_login" @click="goLogin" v-if="!token">
|
|
|
<div>去登录</div>
|
|
<div>去登录</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -146,7 +147,7 @@ import Huan2d from "../../components/fangxincha/huan2d"//
|
|
|
import MapPage from "../../components/fangxincha/map"//高德地图
|
|
import MapPage from "../../components/fangxincha/map"//高德地图
|
|
|
import LineChart from "../../components/fangxincha/lineChart"//
|
|
import LineChart from "../../components/fangxincha/lineChart"//
|
|
|
import BarChart from "../../components/fangxincha/barChart"//
|
|
import BarChart from "../../components/fangxincha/barChart"//
|
|
|
-import { getFxcToken,getFxclistChainLocal,getFxcProductTypeChipCount,getFxcProductChipState,getFxcChainStatus } from '@/api/screen'
|
|
|
|
|
|
|
+import { getFxcToken,getFxclistChainLocal,getFxcProductTypeChipCount,getFxcProductChipState,getFxcChainStatus,getFxcChainInfo,getFxcChainTemperature } from '@/api/screen'
|
|
|
export default({
|
|
export default({
|
|
|
name:"Shop",
|
|
name:"Shop",
|
|
|
components: {
|
|
components: {
|
|
@@ -168,12 +169,27 @@ export default({
|
|
|
normal:6780,
|
|
normal:6780,
|
|
|
warning:6780,
|
|
warning:6780,
|
|
|
error:6780,
|
|
error:6780,
|
|
|
|
|
+ token:"",
|
|
|
|
|
+ markers:[],
|
|
|
|
|
+ markerInfo:"",
|
|
|
|
|
+ chaintemp:"",
|
|
|
|
|
+ chainStatus:{},
|
|
|
|
|
+ chipCountData:[],
|
|
|
|
|
+ chipStates:[],
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
|
- this.changeNum()
|
|
|
|
|
|
|
+ this.token = localStorage.getItem("token");
|
|
|
|
|
+ if(this.token){
|
|
|
|
|
+ this.getListChainLocal()
|
|
|
|
|
+ this.getProductTypeChipCount()
|
|
|
|
|
+ this.getProductChipState()
|
|
|
|
|
+ this.getChainStatus()
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.changeNum()
|
|
|
|
|
+ }
|
|
|
// this.randomNum()
|
|
// this.randomNum()
|
|
|
- this.getLoginToken()
|
|
|
|
|
|
|
+ // this.getLoginToken()
|
|
|
// this.$store.dispatch("FxcLogin").then((res)=>{
|
|
// this.$store.dispatch("FxcLogin").then((res)=>{
|
|
|
// var fxcToken = this.$store.getters.fxcToken
|
|
// var fxcToken = this.$store.getters.fxcToken
|
|
|
// this.getListChainLocal(fxcToken)
|
|
// this.getListChainLocal(fxcToken)
|
|
@@ -182,35 +198,67 @@ export default({
|
|
|
// })
|
|
// })
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getLoginToken(){
|
|
|
|
|
- getFxcToken().then(response => {
|
|
|
|
|
- var fxcToken = response.token
|
|
|
|
|
- this.getListChainLocal(fxcToken)
|
|
|
|
|
- this.getProductTypeChipCount(fxcToken)
|
|
|
|
|
- this.getProductChipState(fxcToken)
|
|
|
|
|
- this.getChainStatus(fxcToken)
|
|
|
|
|
|
|
+ // getLoginToken(){
|
|
|
|
|
+ // getFxcToken().then(response => {
|
|
|
|
|
+ // var fxcToken = response.token
|
|
|
|
|
+ // this.getListChainLocal(fxcToken)
|
|
|
|
|
+ // this.getProductTypeChipCount(fxcToken)
|
|
|
|
|
+ // this.getProductChipState(fxcToken)
|
|
|
|
|
+ // this.getChainStatus(fxcToken)
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
+ getListChainLocal(){
|
|
|
|
|
+ getFxclistChainLocal().then(response => {
|
|
|
|
|
+ this.markers = response.data
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- getListChainLocal(token){
|
|
|
|
|
- getFxclistChainLocal(token).then(response => {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ getProductChipState(){
|
|
|
|
|
+ getFxcProductChipState().then(response => {
|
|
|
|
|
+ this.chipStates = response.data
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- getProductChipState(token){
|
|
|
|
|
- getFxcProductChipState(token).then(response => {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ getProductTypeChipCount(){
|
|
|
|
|
+ getFxcProductTypeChipCount().then(response => {
|
|
|
|
|
+ var data = response.data
|
|
|
|
|
+ var list = []
|
|
|
|
|
+ for(var i in data){
|
|
|
|
|
+ list[i] = []
|
|
|
|
|
+ list[i][0] = data[i].productTypeName
|
|
|
|
|
+ list[i][1] = data[i].num
|
|
|
|
|
+ }
|
|
|
|
|
+ this.chipCountData = list
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- getProductTypeChipCount(token){
|
|
|
|
|
- getFxcProductTypeChipCount(token).then(response => {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ getChainStatus(){
|
|
|
|
|
+ getFxcChainStatus().then(response => {
|
|
|
|
|
+ var data = response.data
|
|
|
|
|
+ this.produced = data.total
|
|
|
|
|
+ this.finished = data.inTrans
|
|
|
|
|
+ this.transit = data.inStore
|
|
|
|
|
+ this.used = data.inEnd
|
|
|
|
|
+ this.normal = data.temperatureDTO.normal
|
|
|
|
|
+ this.warning = data.temperatureDTO.warning
|
|
|
|
|
+ this.error = data.temperatureDTO.alarm
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- getChainStatus(token){
|
|
|
|
|
- getFxcChainStatus(token).then(response => {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ getChainInfo(id){
|
|
|
|
|
+ getFxcChainInfo({id}).then(response => {
|
|
|
|
|
+ var data = response.data
|
|
|
|
|
+ data.status && (data.statusStr = {"00": "已入库", "10": "已出库", "20": "已结束"}[data.status])
|
|
|
|
|
+ this.markerInfo = data
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ getChainTemperature(id){
|
|
|
|
|
+ getFxcChainTemperature({id}).then(response => {
|
|
|
|
|
+ var data = response.data
|
|
|
|
|
+ this.chaintemp = data.length && data
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ hideInfo(){
|
|
|
|
|
+ this.markerInfo = null
|
|
|
|
|
+ this.chaintemp = null
|
|
|
|
|
+ },
|
|
|
changeNum(){
|
|
changeNum(){
|
|
|
const that = this
|
|
const that = this
|
|
|
var list = that.attrs
|
|
var list = that.attrs
|