Kaynağa Gözat

fix-整体调整

LAPTOP-U5GOA5HA\zz 1 yıl önce
ebeveyn
işleme
328c97e6fb

+ 7 - 0
src/api/keys.js

@@ -103,4 +103,11 @@ export function getOpenAll() {
     url: '/clw/KeyCase/openAll',
     method: 'post',
   })
+}
+//钥匙柜状态
+export function getOnlineStatus() {
+  return request({
+    url: '/clw/KeyCase/onlineStatus',
+    method: 'get',
+  })
 }

+ 3 - 2
src/api/system/user.js

@@ -136,9 +136,10 @@ export function updateAuthRole (data) {
 }
 
 // 查询部门下拉树结构
-export function deptTreeSelect () {
+export function deptTreeSelect (params) {
   return request({
     url: '/system/user/deptTree',
-    method: 'get'
+    method: 'get',
+    params
   })
 }

+ 17 - 2
src/views/cardIot/Map/index.vue

@@ -46,6 +46,7 @@ export default {
   props: {
     idInfo: Object,
     showRang: String,
+    carInfos:Object
   },
   watch: {
     idInfo: {
@@ -66,6 +67,20 @@ export default {
       },
       deep: true,
     },
+    carInfos:{
+      handler(newVal){
+        this.markeList && this.markeList.forEach((element) => {
+          this.map.remove(element)
+        })
+        if (this.timer) {
+          clearTimeout(this.timer)
+        }
+        // console.log('----------id22',newVal.id);
+        this.ids = newVal.id
+        this.addCarMaker(this.AMap)
+      },
+      deep:true
+    }
   },
 
   methods: {
@@ -201,7 +216,6 @@ export default {
             })
             // 点击消防车车
             marker.on('click', (e) => {
-              // basicInfo.close()
               that.$emit('clickCarItem', car)
             })
 
@@ -268,7 +282,8 @@ export default {
           // 点击消防车车
           marker.on('click', (e) => {
             // basicInfo.close()
-            that.$emit('clickCarItem', car)
+            console.log(e);
+            // that.$emit('clickCarItem', car)
           })
 
           if (cache[car.id] && that.map) {

+ 0 - 1
src/views/cardIot/components/Statistics.vue

@@ -49,7 +49,6 @@ export default {
   watch: {
     deptIds: {
       handler(val) {
-        // console.log('---------编号', val)
         if (val.key.indexOf('dept') >= 0) {
           this.deptId = val.meta.deptId
           this.funStatis()

+ 58 - 20
src/views/cardIot/components/TreeCar.vue

@@ -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;

+ 9 - 6
src/views/cardIot/index.vue

@@ -1,10 +1,10 @@
 <template>
   <page-full-content>
-    <Map @clickCarItem="clickCarItem" :idInfo="idInfo" @move="(e) => (moveValue = e)" ref="refMap">
+    <Map @clickCarItem="clickCarItem" :idInfo="idInfo" :carInfos="carInfos" @move="(e) => (moveValue = e)" ref="refMap">
       <CarPathHistory ref="pathHistory" :idInfo="idInfo" />
     </Map>
     <div class="tree-car">
-      <TreeCar :carId="carId" @changeCar="changeCar" :showVideos="showVideos" :idVal="idVal" />
+      <TreeCar :carId="carId" @changeCar="changeCar" :showVideos="showVideos" :idVal="idVal" @changCarIdMap="changCarIdMap" />
     </div>
     <div class="car-sta">
       <VehicleStatistics @rangEv="rangEv" :idInfo="idInfo" />
@@ -39,8 +39,9 @@ export default {
       showRang: '',
       isStart: false,
       isPause: true,
-      showVideos: false,
+      showVideos: null,
       idVal: {},
+      carInfos:{}
     }
   },
   computed: {
@@ -53,10 +54,8 @@ export default {
       return true
     },
     clickCarItem(val) {
-      console.log('--------------点击车车',val);
-      this.idVal = val
       this.showVideos = true
-      console.log('---------编号',this.showVideos);
+      this.idVal = val
       this.carId = val.cqVehicleId
       this.idInfo = {
         meta: val,
@@ -92,6 +91,10 @@ export default {
         }
       })
     },
+    changCarIdMap(item){
+      console.log('-----点击了在线车车',item);
+     this.carInfos=item
+    }
   },
 }
 </script>

+ 1 - 1
src/views/clw/KeyCase/index.vue

@@ -55,7 +55,7 @@
                           <img src="../../../assets/vehicle/xg.png" alt="" @click="editInfo(4)" />
                           <span>字数限制7个字</span>
                         </div>
-                        <div style="text-align: left;margin: 8px 0 0 0px;"><a-button type="primary"> 二维码展示内容调整 </a-button></div>
+                        <div style="text-align: left;margin: 8px 0 0 70px;"><a-button type="primary"> 二维码展示内容调整 </a-button></div>
                       </div>
                     </div>
                     <div></div>

+ 28 - 2
src/views/clw/KeyCase/modules/KeyBox.vue

@@ -108,6 +108,16 @@
           <span>钥匙柜未绑定钥匙</span>
         </div>
       </div>
+      <div style="margin-top: 60px">
+        <span style="font-size: 14px"
+          >钥匙柜状态:
+          <!-- <span style="color: #18f035;">{{ statusInfo==true?'在线':'离线' }}</span> -->
+
+          <a-button type="primary" v-if="statusInfo == true"> 在线 </a-button>
+
+          <a-button type="danger" v-else> 离线 </a-button>
+        </span>
+      </div>
       <div class="imgs">
         <img style="cursor: pointer" @click="openConfig(2)" src="../../../../assets/vehicle/yjkm.png" alt="" />
         <img style="cursor: pointer" @click="openConfig(1)" src="../../../../assets/vehicle/zdpz.png" alt="" />
@@ -121,7 +131,16 @@
 </template>
 
 <script>
-import { KeyCaseList, getOpenOne, getRepairSuccess, getRepair, getCarBind, getUnbind, Reminder } from '@/api/keys.js'
+import {
+  KeyCaseList,
+  getOpenOne,
+  getRepairSuccess,
+  getRepair,
+  getCarBind,
+  getUnbind,
+  Reminder,
+  getOnlineStatus,
+} from '@/api/keys.js'
 import OpenCabinet from './OpenCabinet.vue'
 import Configuration from './Configuration.vue'
 import UsageRecord from './UsageRecord.vue'
@@ -133,6 +152,7 @@ export default {
       visible: Array.from({ length: 30 }).map((item) => false),
       formType: 1,
       showNum: 1,
+      statusInfo: '',
     }
   },
   dicts: ['key_status'],
@@ -224,9 +244,15 @@ export default {
       this.showNum = num
       this.$refs.opemModul.visible = true
     },
+    funBoxStatus() {
+      getOnlineStatus().then((res) => {
+        this.statusInfo = res.data
+      })
+    },
   },
   created() {
     this.funKeyList()
+    this.funBoxStatus()
   },
 }
 </script>
@@ -279,7 +305,7 @@ export default {
     }
   }
   .imgs {
-    margin-top: 180px;
+    margin-top: 140px;
     img {
       display: inline-block;
       width: 113px;

+ 14 - 8
src/views/clw/car/index.vue

@@ -109,6 +109,9 @@
             :bordered="tableBordered"
             :customHeaderRow="customRow"
           >
+          <span slot="num" slot-scope="text, records, index">
+          {{ (queryParam.pageNum - 1) * queryParam.pageSize + Number(index) + 1 }}
+        </span>
             <span slot="operation" slot-scope="text, record">
               <a-divider type="vertical" v-hasPermi="['clw:car:edit']" />
               <a @click="$refs.createForm.handleUpdate(record, undefined)" v-hasPermi="['clw:car:edit']">
@@ -177,6 +180,7 @@ export default {
         categoryId: null,
       },
       columns: [
+      { title: '序号', scopedSlots: { customRender: 'num' },width:'50px',   align: 'center', },
         {
           title: '机构名称',
           dataIndex: 'depName',
@@ -234,31 +238,31 @@ export default {
       //机构
       deptIdList: [
         {
-          id: 239,
+          id: 100,
           lable: '两江新区消防救援支队',
         },
         {
-          id: 233,
+          id: 173,
           lable: '两江新区支队鸳鸯消防救援站',
         },
         {
-          id: 232,
+          id: 141,
           lable: '两江新区支队翠云消防救援站',
         },
         {
-          id: 234,
+          id: 142,
           lable: '两江新区支队龙头寺消防救援站',
         },
         {
-          id: 229,
+          id: 140,
           lable: '两江新区支队大竹林特勤站',
         },
         {
-          id: 231,
+          id: 139,
           lable: '两江新区支队礼嘉消防救援站',
         },
         {
-          id: 230,
+          id: 129,
           lable: '两江新区支队奥园消防救援站',
         },
       ],
@@ -355,7 +359,7 @@ export default {
       })
     },
     getDeptTree() {
-      deptTreeSelect().then((response) => {
+      deptTreeSelect({deptType:1}).then((response) => {
         this.deptOptions = response.data
       })
     },
@@ -369,10 +373,12 @@ export default {
       })
     },
     seeCarInfo(node) {
+      console.log(node);
       this.$router.push({
         path: '/cardiot',
         query: {
           id: node.id,
+          cqVehicleId:node.cqVehicleId
         },
       })
     },

+ 4 - 6
src/views/clw/checkRegister/index.vue

@@ -56,6 +56,9 @@
         :pagination="false"
         :bordered="tableBordered"
       >
+      <span slot="num" slot-scope="text, records, index">
+          {{ (queryParam.pageNum - 1) * queryParam.pageSize + Number(index) + 1 }}
+        </span>
         <span slot="operation" slot-scope="text, record">
           <a-divider type="vertical" v-hasPermi="['clw:checkRegister:edit']" />
           <a @click="$refs.createForm.handleUpdate(record, undefined)" v-hasPermi="['clw:checkRegister:edit']">
@@ -121,12 +124,7 @@ export default {
         pageSize: 10
       },
       columns: [
-        {
-          title: '主键',
-          dataIndex: 'checkId',
-          ellipsis: true,
-          align: 'center'
-        },
+      { title: '序号', scopedSlots: { customRender: 'num' },width:'50px',   align: 'center', },
         {
           title: '检查日期',
           dataIndex: 'checkTime',

+ 4 - 6
src/views/clw/register/index.vue

@@ -79,6 +79,9 @@
         :pagination="false"
         :bordered="tableBordered"
       >
+      <span slot="num" slot-scope="text, records, index">
+          {{ (queryParam.pageNum - 1) * queryParam.pageSize + Number(index) + 1 }}
+        </span>
         <span slot="insuranceTime" slot-scope="text, record">
           {{ parseTime(record.insuranceTime) }}
         </span>
@@ -149,12 +152,7 @@ export default {
       dateFormat: 'YYYY/MM/DD',
       monthFormat: 'YYYY/MM',
       columns: [
-        {
-          title: '序号',
-          dataIndex: 'insuranceId',
-          ellipsis: true,
-          align: 'center',
-        },
+      { title: '序号', scopedSlots: { customRender: 'num' },width:'50px',   align: 'center', },
         {
           title: '经办人',
           dataIndex: 'username',

+ 4 - 6
src/views/clw/upkeepRegister/index.vue

@@ -68,6 +68,9 @@
         <span slot="content" slot-scope="text, record">
           <span v-html="record.content"></span>
         </span>
+        <span slot="num" slot-scope="text, records, index">
+          {{ (queryParam.pageNum - 1) * queryParam.pageSize + Number(index) + 1 }}
+        </span>
         <span slot="operation" slot-scope="text, record">
           <a-divider type="vertical" v-hasPermi="['clw:upkeepRegister:edit']" />
           <a @click="$refs.createForm.handleUpdate(record, undefined)" v-hasPermi="['clw:upkeepRegister:edit']">
@@ -131,12 +134,7 @@ export default {
         pageSize: 10,
       },
       columns: [
-        {
-          title: '序号',
-          dataIndex: 'registerId',
-          ellipsis: true,
-          align: 'center',
-        },
+      { title: '序号', scopedSlots: { customRender: 'num' },width:'50px',   align: 'center', },
         {
           title: '登记日期',
           dataIndex: 'registerTime',