|
@@ -56,7 +56,7 @@
|
|
|
<div
|
|
|
v-for="(item, index) in list"
|
|
|
:key="index"
|
|
|
- style="display: flex; justify-content: space-between; margin-top: 8px; cursor: pointer;"
|
|
|
+ style="display: flex; justify-content: space-between; margin-top: 8px; cursor: pointer"
|
|
|
@click="OnlineCar(item)"
|
|
|
>
|
|
|
<div>
|
|
@@ -76,34 +76,50 @@
|
|
|
</template>
|
|
|
</a-space>
|
|
|
</div>
|
|
|
- <div style="margin-top: 10px; margin-left: 10px; pointer-events: all" v-if="show != 2 && !videoid">
|
|
|
+ <div style="margin-top: 10px; margin-left: 10px; pointer-events: all" v-if="show != 2 && !videoid && !showFlag">
|
|
|
<a-button type="primary" @click="ChangeBtn"> {{ showBtn ? '收起' : '展开' }} </a-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
<!-- 机构详情 -->
|
|
|
- <div style="display: flex;position: relative;" v-if="showBtn && (showFlag != true || videoid == '')">
|
|
|
- <Statistics :deptIds="deptIds" />
|
|
|
- <div style="width: 1030px;height: 300px;background: #fff;position: absolute;bottom: 0;left: 85%; display: flex;padding: 0 10px;">
|
|
|
- <LunarOverspeed/>
|
|
|
- <OfCarUseNum/>
|
|
|
+ <div style="display: flex; position: relative" v-if="showBtn && (showFlag != true || videoid == '')">
|
|
|
+ <Statistics :deptIds="deptIds" />
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ width: 1030px;
|
|
|
+ height: 300px;
|
|
|
+ background: #fff;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 85%;
|
|
|
+ display: flex;
|
|
|
+ padding: 0 10px;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <LunarOverspeed />
|
|
|
+ <OfCarUseNum />
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 在线车辆视频 -->
|
|
|
- <!-- v-if="this.show==2&&carInfo" -->
|
|
|
- <!-- div>show----{{ show }}</div> -->
|
|
|
- <!-- <div>videoid----{{ videoid }}</div>
|
|
|
- <div>showFlag---{{ showFlag }}</div>
|
|
|
+ <!-- <div>showFlag---{{ showFlag }}</div>
|
|
|
+ <div>carIds---{{ carIds }}</div>
|
|
|
<div>showBtn---{{ showBtn }}</div>
|
|
|
- <div>videoid---------{{ videoid }}</div>
|
|
|
- <div>carIds---------{{ carIds }}</div> -->
|
|
|
- <div v-if="videoid || showFlag != false&&carIds">
|
|
|
+ <div>videoid----{{ videoid }}</div> -->
|
|
|
+ <!-- v-if="this.show==2&&carInfo"
|
|
|
+ div>show----{{ show }}</div>
|
|
|
+ <div>videoid----{{ videoid }}</div>
|
|
|
+ <div>showFlag---{{ showFlag }}</div>
|
|
|
+ <div>showBtn---{{ showBtn }}</div>
|
|
|
+ <div>videoid---------{{ videoid }}</div>
|
|
|
+ <div>carIds---------{{ carIds }}</div>
|
|
|
+ v-if="videoid || showFlag != false&&carIds" -->
|
|
|
+ <div v-if="showFlag == true||carIds&&!showBtn">
|
|
|
<Video :carInfo="carInfo" :videoid="videoid" />
|
|
|
<!-- 机构详情 -->
|
|
|
<FireStationDetails :deptIds="deptIds" />
|
|
|
<!-- 油箱 -->
|
|
|
<!-- <QuantityOil /> -->
|
|
|
- <QuantityOil/>
|
|
|
+ <QuantityOil />
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <div class="gj-img" v-if="videoid"></div> -->
|
|
@@ -111,13 +127,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getCarTree, getCarList, getCarLocation } from '@/api/iot'
|
|
|
+import { getCarTree, getCarList, getCarLocation,getCarInfo} from '@/api/iot'
|
|
|
import Statistics from './Statistics.vue'
|
|
|
import Video from './Video.vue'
|
|
|
import QuantityOil from './QuantityOil.vue'
|
|
|
import FireStationDetails from './FireStationDetails.vue'
|
|
|
import LunarOverspeed from './LunarOverspeed.vue'
|
|
|
-import OfCarUseNum from './OfCarUseNum.vue';
|
|
|
+import OfCarUseNum from './OfCarUseNum.vue'
|
|
|
const getParentKey = (key, tree) => {
|
|
|
let parentKey
|
|
|
for (let i = 0; i < tree.length; i++) {
|
|
@@ -133,7 +149,7 @@ const getParentKey = (key, tree) => {
|
|
|
return parentKey
|
|
|
}
|
|
|
export default {
|
|
|
- components: { Statistics, Video, FireStationDetails,QuantityOil,LunarOverspeed,OfCarUseNum},
|
|
|
+ components: { Statistics, Video, FireStationDetails, QuantityOil, LunarOverspeed, OfCarUseNum },
|
|
|
props: {
|
|
|
carId: String,
|
|
|
showVideos: Boolean,
|
|
@@ -151,17 +167,29 @@ export default {
|
|
|
handler(val) {
|
|
|
this.showFlag = val
|
|
|
},
|
|
|
- immediate:true,
|
|
|
+ immediate: true,
|
|
|
deep: true,
|
|
|
},
|
|
|
idVal: {
|
|
|
handler(newVal) {
|
|
|
if (newVal) {
|
|
|
+ this.showFlag = true
|
|
|
this.deptIds = newVal
|
|
|
this.values = newVal.plateNumber
|
|
|
}
|
|
|
},
|
|
|
+ // immediate:true,
|
|
|
+ deep: true,
|
|
|
},
|
|
|
+ // carIds: {
|
|
|
+ // handler(newVal) {
|
|
|
+ // if (newVal) {
|
|
|
+ // this.showFlag = true
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // immediate:true,
|
|
|
+ // // deep: true,
|
|
|
+ // },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -219,6 +247,7 @@ export default {
|
|
|
this.autoExpandParent = false
|
|
|
},
|
|
|
onChangeSel(e) {
|
|
|
+
|
|
|
const value = e.target.value
|
|
|
const expandedKeys = this.dataList
|
|
|
.map((item) => {
|
|
@@ -236,6 +265,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
ChangeSelect(node) {
|
|
|
+ // console.log('-----------机构',node);
|
|
|
const id = node
|
|
|
const carID = this.dataList.find((item) => {
|
|
|
// eslint-disabled
|
|
@@ -259,7 +289,12 @@ export default {
|
|
|
this.showBtn = !this.showBtn
|
|
|
},
|
|
|
OnlineCar(val) {
|
|
|
+ // console.log('------------在线车辆',val);
|
|
|
+ this.$emit('changCarIdMap',val)
|
|
|
// this.show = 2
|
|
|
+ this.showFlag = true
|
|
|
+ this.deptIds = val
|
|
|
+ this.values = val.plateNumber
|
|
|
this.visible = false
|
|
|
this.carInfo = val
|
|
|
this.videoid = val.cqVehicleId
|
|
@@ -271,6 +306,7 @@ export default {
|
|
|
created() {
|
|
|
this.FunTree()
|
|
|
this.funcarList()
|
|
|
+ this.videoid= this.$route.query.cqVehicleId
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
@@ -280,6 +316,9 @@ export default {
|
|
|
carIds() {
|
|
|
return this.$route.query.id
|
|
|
},
|
|
|
+ // videoid(){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -311,7 +350,6 @@ export default {
|
|
|
width: 100px;
|
|
|
height: 100px;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
::-webkit-scrollbar-track-piece {
|
|
|
background: #ebedf0;
|