2 Commits 5cf3d10407 ... efb6ac1f99

Author SHA1 Message Date
  LAPTOP-U5GOA5HA\zz efb6ac1f99 Merge branch 'zz-test' into master 1 year ago
  LAPTOP-U5GOA5HA\zz e94eb693ac fix-车速记录等接口 1 year ago

+ 24 - 0
src/api/clw/applyCarLog.js

@@ -48,4 +48,28 @@ export function getWorkflow (id) {
     url: '/clw/workflow/' + id,
     method: 'get'
   })
+}
+// 车速记录
+export function getSpeedList (params) {
+  return request({
+    url: '/car/speedList',
+    method: 'get',
+    params
+  })
+}
+// 超速管理记录
+export function getOverSpeedList (params) {
+  return request({
+    url: '/car/overSpeedList',
+    method: 'get',
+    params
+  })
+}
+// 离线天数
+export function getOfflineList (params) {
+  return request({
+    url: '/car/offlineList',
+    method: 'get',
+    params
+  })
 }

+ 16 - 0
src/api/iot.js

@@ -69,4 +69,20 @@ export function getCmobd(params) {
     method: 'get',
     params
   })
+}
+// 用车次数
+export function getUseCarStatistics(params) {
+  return request({
+    url: '/clw/statistics/useCarStatistics',
+    method: 'get',
+    params
+  })
+}
+// 超速记录排行可视化
+export function getOverSpeedStatistics(params) {
+  return request({
+    url: '/clw/statistics/overSpeedStatistics',
+    method: 'get',
+    params
+  })
 }

+ 1 - 1
src/utils/request.js

@@ -18,7 +18,7 @@ const request = axios.create({
   // API 请求的默认前缀
   baseURL: process.env.VUE_APP_BASE_API,
   // baseURL: 'https://ruoyi.setworld.net',
-  timeout: 10000 // 请求超时时间
+  timeout: 70000 // 请求超时时间
 })
 
 // 异常拦截处理器

+ 86 - 79
src/views/cardIot/components/LunarOverspeed.vue

@@ -1,49 +1,79 @@
 <template>
   <div class="lun-main">
-    <div style="padding: 10px 10px; ">
-      <span style="color: #000; font-size: 18px;">月超速统计</span>
-      <div style="margin-top: 60px;width: 100px;text-align: center;">
-        <div style="margin: 10px 0;color: #3eb2e8;font-size: 20px;">141</div>
-        <div style="color: #000;font-size: 14px;">整体超速次数</div>
+    <div style="padding: 10px 10px">
+      <span style="color: #000; font-size: 18px">月超速统计</span>
+      <div style="margin-top: 60px; width: 100px; text-align: center">
+        <div style="margin: 10px 0; color: #3eb2e8; font-size: 20px">{{ totalVehicle }}</div>
+        <div style="color: #000; font-size: 14px">整体超速次数</div>
       </div>
-      <div style="margin-top: 20px;width: 100px;text-align: center;">
-        <div style="margin: 10px 0;color: #3eb2e8;font-size: 20px;">23.5</div>
-        <div style="color: #000;font-size: 14px;">平均超速次数</div>
+      <div style="margin-top: 20px; width: 100px; text-align: center">
+        <div style="margin: 10px 0; color: #3eb2e8; font-size: 20px">{{ deptVehicle }}</div>
+        <div style="color: #000; font-size: 14px">平均超速次数</div>
       </div>
     </div>
-    <div style="padding: 10px 10px 10px 0; ">
+    <div style="padding: 10px 10px 10px 0">
       <a-range-picker
         style="width: 100%"
+        @change="changaPicker"
         v-model="daterangeCreateTime"
         valueFormat="YYYY-MM-DD"
         format="YYYY-MM-DD"
         allow-clear
       />
-      <div ref="chart" class="item" style="width: 380px; height: 260px" />
+      <a-spin :spinning="spinning" size="large">
+        <div ref="chart" class="item" style="width: 380px; height: 260px" />
+      </a-spin>
     </div>
   </div>
 </template>
 
 <script>
 import * as echarts from 'echarts'
+import moment from 'moment'
+import { getOverSpeedStatistics } from '@/api/iot'
 export default {
+  props: { OfDeptId: String },
   data() {
     return {
-      daterangeCreateTime: [],
+      daterangeCreateTime: [
+        moment().month(moment().month()).startOf('month').format('YYYY-MM-DD 00:00:00'),
+        moment().month(moment().month()).endOf('month').format('YYYY-MM-DD 23:59:59'),
+      ],
+      deptId: '',
+      list: [],
+      spinning: false,
+      totalVehicle:0,
+      deptVehicle:0
     }
   },
+
+  watch: {
+    OfDeptId: {
+      handler(val) {
+        if (val&&val.indexOf('dept' > 0)) {
+          this.deptId = val.substring(5)
+        } else {
+          this.deptId = '100'
+        }
+        this.funLunarNum()
+      },
+      immediate: true,
+      deep: true,  
+    },
+  },
   mounted() {
     // 获取dom容器
+    this.funLunarNum()
     const chartDom = this.$refs.chart
     // 初始化图表实例
     this.chart = echarts.init(chartDom)
-    this.initChart()
     // console.log("da======ta", this.processData, this.maxNum);
   },
   methods: {
-    initChart() {
-      const data = [220, 182, 191, 234, 290, 330, 310]
-      const sideData = data.map((item) => item + 4.5)
+    initChart(datas) {
+      const data = datas.map(item=>{
+        return item.value
+      })
       const option = {
         tooltip: {
           trigger: 'axis',
@@ -54,15 +84,9 @@ export default {
           },
         },
         xAxis: {
-          data: [
-            '两江支队',
-            '鸳鸯消防救援站',
-            '翠云消防救援站',
-            '龙头寺消防救援站',
-            '大竹林特勤站',
-            '礼嘉消防救援站',
-            '奥园消防救援站',
-          ],
+          data: datas.map(item=>{
+            return item.deptName
+          }),
           //坐标轴
           axisLine: {
             lineStyle: {
@@ -73,10 +97,10 @@ export default {
           axisLabel: {
             show: true,
             interval: 0,
-            rotate: 30,
+            rotate: 0,
             textStyle: {
               color: '#3eb2e8',
-              fontSize:12
+              fontSize: 12,
             },
           },
         },
@@ -103,10 +127,10 @@ export default {
           {
             name: 'a',
             tooltip: {
-              show: false,
+              show: true,
             },
             type: 'bar',
-            barWidth: 14.5,
+            barWidth: 18.5,
             itemStyle: {
               normal: {
                 color: new echarts.graphic.LinearGradient(
@@ -135,61 +159,44 @@ export default {
             data: data,
             barGap: 0,
           },
-          {
-            type: 'bar',
-            barWidth: 0,
-            itemStyle: {
-              normal: {
-                color: new echarts.graphic.LinearGradient(
-                  0,
-                  1,
-                  0,
-                  0,
-                  [
-                    {
-                      offset: 0,
-                      color: '#09337C', // 0% 处的颜色
-                    },
-                    {
-                      offset: 0.6,
-                      color: '#0761C0', // 60% 处的颜色
-                    },
-                    {
-                      offset: 1,
-                      color: '#0575DE', // 100% 处的颜色
-                    },
-                  ],
-                  false
-                ),
-              },
-            },
-            barGap: 0,
-            data: sideData,
-          },
-          //   {
-          //     name: 'b',
-          //     tooltip: {
-          //       show: false,
-          //     },
-          //     type: 'pictorialBar',
-          //     itemStyle: {
-          //       borderWidth: 1,
-          //       borderColor: '#0571D5',
-          //       color: '#1779E0',
-          //     },
-          //     symbol: 'path://M 0,0 l 120,0 l -30,60 l -120,0 z',
-          //     symbolSize: ['30', '12'],
-          //     symbolOffset: ['0', '-11'],
-          //     //symbolRotate: -5,
-          //     symbolPosition: 'end',
-          //     data: data,
-          //     z: 3,
-          //   },
         ],
       }
 
       this.chart.setOption(option)
     },
+    funLunarNum() {
+      this.spinning = true
+      const params = {
+        deptId: this.deptId || '100',
+        startTime: this.daterangeCreateTime[0],
+        endTime: this.daterangeCreateTime[1],
+      }
+      getOverSpeedStatistics(params)
+        .then((res) => {
+          if (res.code == 200) {
+            this.list = res.data.data
+            this.totalVehicle = res.data.totalCount //总体
+            this.deptVehicle = res.data.totalAvg
+            this.$nextTick(() => {
+              // 获取dom容器
+              const chartDom = this.$refs.chart
+              // 初始化图表实例
+              this.chart = echarts.init(chartDom)
+              this.initChart(this.list)
+            })
+            this.spinning = false
+          }
+        })
+        .catch((error) => {
+          this.spinning = false
+        })
+    },
+    changaPicker(ev) {
+      let startTime = `${ev[0]} 00:00:00`
+      let endTime = `${ev[1]} 23:59:59`
+      this.daterangeCreateTime = [startTime, endTime]
+      this.funLunarNum()
+    },
   },
 }
 </script>
@@ -201,7 +208,7 @@ export default {
   display: flex;
   justify-content: space-between;
   //   background-color: aqua;
-//   border-right: 1px solid #ccc;
+  //   border-right: 1px solid #ccc;
   pointer-events: all;
   padding-right: 10px;
 }

+ 139 - 93
src/views/cardIot/components/OfCarUseNum.vue

@@ -3,63 +3,138 @@
     <div style="padding: 10px 10px">
       <span style="color: #000; font-size: 18px">用车次数</span>
       <div style="margin-top: 60px; width: 100px; text-align: center">
-        <div style="margin: 10px 0; color: #3eb2e8; font-size: 20px">168</div>
+        <div style="margin: 10px 0; color: #3eb2e8; font-size: 20px">{{ totalVehicle }}</div>
         <div style="color: #000; font-size: 14px">总体用车次数</div>
       </div>
       <div style="margin-top: 20px; width: 100px; text-align: center">
-        <div style="margin: 10px 0; color: #3eb2e8; font-size: 20px">13</div>
+        <div style="margin: 10px 0; color: #3eb2e8; font-size: 20px">{{ deptVehicle }}</div>
         <div style="color: #000; font-size: 14px">本机构用车次数</div>
       </div>
     </div>
     <div style="padding: 10px 10px 10px 0">
-      <div style="display: flex;">
-        <a-radio-group name="radioGroup" :default-value="1">
+      <div style="display: flex">
+        <a-radio-group name="radioGroup" :default-value="1" @change="changaTime">
           <a-radio :value="1"> 日 </a-radio>
           <a-radio :value="2"> 周 </a-radio>
           <a-radio :value="3"> 月 </a-radio>
           <a-radio :value="4"> 年 </a-radio>
+          <a-radio :value="5"> 自定义 </a-radio>
         </a-radio-group>
-        <a-range-picker
-        :value="[startDate,endDate]"
-        disabled
-        style="width: 100%"
-        v-model="daterangeCreateTime"
-        valueFormat="YYYY-MM-DD"
-        format="YYYY-MM-DD"
-        allow-clear
-      />
+        <div>
+          <a-range-picker
+            @change="changaPicker"
+            :disabled="disabled"
+            v-model="daterangeCreateTime"
+            valueFormat="YYYY-MM-DD"
+            format="YYYY-MM-DD"
+            allow-clear
+          />
+        </div>
       </div>
-    
-      <div ref="chart" class="item" style="width: 380px; height: 260px" />
+      <a-spin :spinning="spinning" size="large">
+        <div ref="chart" class="item" style="width: 440px; height: 260px" />
+      </a-spin>
     </div>
   </div>
 </template>
 
 <script>
 import * as echarts from 'echarts'
-import moment from 'moment';
+import moment from 'moment'
+import { getUseCarStatistics } from '@/api/iot'
 export default {
+  props: { OfDeptId: String },
   data() {
     return {
-      daterangeCreateTime: [],
-      dateFormat:'YYYY-MM-DD',
-      startDate :'2023-08-28',
-      endDate:'2023-08-28',
-      moment: moment
+      daterangeCreateTime: [moment().format('YYYY-MM-DD 00:00:00'), moment().format('YYYY-MM-DD 23:59:59')],
+      dateFormat: 'YYYY-MM-DD',
+      startDate: moment().week(moment().week()).startOf('week').format('YYYY-MM-DD'),
+      endDate: moment().week(moment().week()).endOf('week').format('YYYY-MM-DD'),
+      moment: moment,
+      disabled: true,
+      deptId: '',
+      list: [],
+      spinning: false,
+      totalVehicle: 0, //总体
+      deptVehicle: 0,
     }
   },
+  watch: {
+    OfDeptId: {
+      handler(val) {
+        if (val.indexOf('dept' > 0)) {
+          this.deptId = val.substring(5)
+        }else{
+          this.deptId ='100'
+        }
+        console.log(this.deptId);
+        this.funOfCarNum()
+      },
+      immediate:true,
+      deep: true,
+    },
+  },
+  // created() {
+  //   this.funOfCarNum()
+  // },
   mounted() {
     // 获取dom容器
-    const chartDom = this.$refs.chart
-    // 初始化图表实例
-    this.chart = echarts.init(chartDom)
-    this.initChart()
-    // console.log("da======ta", this.processData, this.maxNum);
+    this.funOfCarNum()
+    if (this.list.length > 0) {
+      const chartDom = this.$refs.chart
+      // 初始化图表实例
+      this.chart = echarts.init(chartDom)
+    }
   },
   methods: {
-    initChart() {
-      const data = [220, 182, 191, 234, 290, 330, 310]
-      const sideData = data.map((item) => item + 4.5)
+    changaTime(val) {
+      if (val.target.value == 1) {
+        this.daterangeCreateTime = [moment().format('YYYY-MM-DD 00:00:00'), moment().format('YYYY-MM-DD 23:59:59')]
+        this.startDate = moment().format('YYYY-MM-DD')
+        this.endDate = moment().format('YYYY-MM-DD')
+        this.funOfCarNum()
+      } else if (val.target.value == 2) {
+        this.daterangeCreateTime = [
+          moment().week(moment().week()).startOf('week').format('YYYY-MM-DD 00:00:00'),
+          moment().week(moment().week()).endOf('week').format('YYYY-MM-DD 23:59:59'),
+        ]
+        this.funOfCarNum()
+        this.startDate = moment().week(moment().week()).startOf('week').format('YYYY-MM-DD')
+        this.endDate = moment().week(moment().week()).endOf('week').format('YYYY-MM-DD')
+      } else if (val.target.value == 3) {
+        this.daterangeCreateTime = [
+          moment().month(moment().month()).startOf('month').format('YYYY-MM-DD 00:00:00'),
+          moment().month(moment().month()).endOf('month').format('YYYY-MM-DD 23:59:59'),
+        ]
+        this.startDate = moment().month(moment().month()).startOf('month').format('YYYY-MM-DD')
+        this.endDate = moment().month(moment().month()).endOf('month').format('YYYY-MM-DD')
+        this.funOfCarNum()
+      } else if (val.target.value == 4) {
+        this.daterangeCreateTime = [
+          moment().year(moment().year()).startOf('year').format('YYYY-MM-DD 00:00:00'),
+          moment().year(moment().year()).endOf('year').format('YYYY-MM-DD 23:59:59'),
+        ]
+        ;(this.startDate = moment().year(moment().year()).startOf('year').format('YYYY-MM-DD')),
+          (this.endDate = moment().year(moment().year()).endOf('year').format('YYYY-MM-DD'))
+        this.funOfCarNum()
+      } else if (val.target.value == 5) {
+        this.daterangeCreateTime = []
+        this.disabled = false
+      }
+    },
+    changaPicker(ev) {
+      let startTime=`${ev[0]} 00:00:00`
+      let endTime=`${ev[1]} 23:59:59`
+      this.daterangeCreateTime = [startTime,endTime]
+      this.funOfCarNum()
+    },
+    initChart(datas) {
+      const data = datas.map((item) => {
+        return item.value
+      })
+      // const sideData = datas.map((item) => {
+      //   return item.value
+      // })
       const option = {
         tooltip: {
           trigger: 'axis',
@@ -70,15 +145,9 @@ export default {
           },
         },
         xAxis: {
-          data: [
-            '两江支队',
-            '鸳鸯消防救援站',
-            '翠云消防救援站',
-            '龙头寺消防救援站',
-            '大竹林特勤站',
-            '礼嘉消防救援站',
-            '奥园消防救援站',
-          ],
+          data: datas.map((v) => {
+            return v.deptName
+          }),
           //坐标轴
           axisLine: {
             lineStyle: {
@@ -89,7 +158,7 @@ export default {
           axisLabel: {
             show: true,
             interval: 0,
-            rotate: 30,
+            rotate: 0,
             textStyle: {
               color: '#3eb2e8',
               fontSize: 12,
@@ -119,10 +188,10 @@ export default {
           {
             name: 'a',
             tooltip: {
-              show: false,
+              show: true,
             },
             type: 'bar',
-            barWidth: 14.5,
+            barWidth: 18.5,
             itemStyle: {
               normal: {
                 color: new echarts.graphic.LinearGradient(
@@ -151,68 +220,45 @@ export default {
             data: data,
             barGap: 0,
           },
-          {
-            type: 'bar',
-            barWidth: 0,
-            itemStyle: {
-              normal: {
-                color: new echarts.graphic.LinearGradient(
-                  0,
-                  1,
-                  0,
-                  0,
-                  [
-                    {
-                      offset: 0,
-                      color: '#09337C', // 0% 处的颜色
-                    },
-                    {
-                      offset: 0.6,
-                      color: '#0761C0', // 60% 处的颜色
-                    },
-                    {
-                      offset: 1,
-                      color: '#0575DE', // 100% 处的颜色
-                    },
-                  ],
-                  false
-                ),
-              },
-            },
-            barGap: 0,
-            data: sideData,
-          },
-          //   {
-          //     name: 'b',
-          //     tooltip: {
-          //       show: false,
-          //     },
-          //     type: 'pictorialBar',
-          //     itemStyle: {
-          //       borderWidth: 1,
-          //       borderColor: '#0571D5',
-          //       color: '#1779E0',
-          //     },
-          //     symbol: 'path://M 0,0 l 120,0 l -30,60 l -120,0 z',
-          //     symbolSize: ['30', '12'],
-          //     symbolOffset: ['0', '-11'],
-          //     //symbolRotate: -5,
-          //     symbolPosition: 'end',
-          //     data: data,
-          //     z: 3,
-          //   },
         ],
       }
-
       this.chart.setOption(option)
     },
+    funOfCarNum() {
+      this.spinning = true
+      const params = {
+        deptId: this.deptId || '100',
+        startTime: this.daterangeCreateTime[0],
+        endTime: this.daterangeCreateTime[1],
+      }
+      getUseCarStatistics(params)
+        .then((res) => {
+          if (res.code == 200) {
+            this.list = res.data.data
+            ;(this.totalVehicle = res.data.totalUseCount), //总体
+              (this.deptVehicle = res.data.selfDeptUseCount)
+            this.$nextTick(() => {
+              // 获取dom容器
+              const chartDom = this.$refs.chart
+              // 初始化图表实例
+              this.chart = echarts.init(chartDom)
+              this.initChart(this.list)
+            })
+            // this.initChart(this.list)
+            this.spinning = false
+          }
+        })
+        .catch((error) => {
+          this.spinning = false
+        })
+    },
   },
 }
 </script>
 
 <style lang="less" scoped>
 .lun-main {
-  width: 400px;
+  width: 500px;
   height: 300px;
   display: flex;
   justify-content: space-between;

+ 2 - 2
src/views/cardIot/components/Statistics.vue

@@ -49,7 +49,7 @@ export default {
   watch: {
     deptIds: {
       handler(val) {
-        if (val.key.indexOf('dept') >= 0) {
+        if (val.key&&val.key.indexOf('dept') >= 0) {
           this.deptId = val.meta.deptId
           this.funStatis()
           this.funZz()
@@ -99,7 +99,7 @@ export default {
   // margin-top: 15px;
 
   .null-car {
-    width: 152px;
+    width: 159px;
     display: flex;
     flex-direction: column;
     justify-content: center;

+ 8 - 6
src/views/cardIot/components/TreeCar.vue

@@ -89,7 +89,7 @@
         <Statistics :deptIds="deptIds" />
         <div
           style="
-            width: 1030px;
+            width: 1100px;
             height: 300px;
             background: #fff;
             position: absolute;
@@ -99,8 +99,8 @@
             padding: 0 10px;
           "
         >
-          <LunarOverspeed />
-          <OfCarUseNum />
+          <LunarOverspeed :OfDeptId="OfDeptId" />
+          <OfCarUseNum :OfDeptId="OfDeptId" />
         </div>
       </div>
       <!-- 在线车辆视频 -->
@@ -231,6 +231,7 @@ export default {
       showFlag: null,
       treeShow: null,
       carIds: '',
+      OfDeptId: 'dept#100', //用车次数-超速
     }
   },
   methods: {
@@ -285,7 +286,6 @@ export default {
       })
     },
     ChangeSelect(node) {
-      // console.log('-----------机构',node);
       const id = node
       const carID = this.dataList.find((item) => {
         // eslint-disabled
@@ -293,6 +293,8 @@ export default {
       })
       this.deptIds = carID
       this.$emit('changeCar', carID)
+      this.OfDeptId = node[0]
+      console.log(this.OfDeptId);
       if (this.deptIds.key.indexOf('dept') < 0) {
         this.showBtn = false
       } else if (this.deptIds.key.indexOf('dept') >= 0) {
@@ -334,8 +336,8 @@ export default {
       const obj = {
         id: this.carIds,
         categoryId: 2,
-        status:'3',
-        onlineStatus:1
+        status: '3',
+        onlineStatus: 1,
       }
       this.$emit('changCarIdMap', obj, 1)
     }

+ 21 - 51
src/views/clw/offLine/index.vue

@@ -11,17 +11,17 @@
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="8">
-                    <a-form-item label="负责人" prop="applyUserName">
-                      <a-input v-model="queryParam.applyUserName" placeholder="请输入负责人" allow-clear />
+                    <a-form-item label="负责人" prop="username">
+                      <a-input v-model="queryParam.username" placeholder="请输入负责人" allow-clear />
                     </a-form-item>
                   </a-col>
-                  <!-- <template >
+                  <template >
                     <a-col :md="8" :sm="10">
-                      <a-form-item label="用车时间" prop="status">
-                        <a-range-picker style="width: 100%" v-model="    daterangeCreateTime " valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" allow-clear/>
+                      <a-form-item label="离线时间" prop="status">
+                        <a-range-picker style="width: 100%" v-model="daterangeCreateTime" valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" allow-clear/>
                       </a-form-item>
                     </a-col>
-                  </template> -->
+                  </template>
                   <a-col :md="8" :sm="8">
                     <span
                       class="table-page-search-submitButtons"
@@ -29,10 +29,6 @@
                     >
                       <a-button type="primary" @click="handleQuery"><a-icon type="search" />查询</a-button>
                       <a-button style="margin-left: 8px" @click="resetQuery"><a-icon type="redo" />重置</a-button>
-                      <!-- <a @click="toggleAdvanced" style="margin-left: 8px">
-                        {{ advanced ? '收起' : '展开' }}
-                        <a-icon :type="advanced ? 'up' : 'down'" />
-                      </a> -->
                     </span>
                   </a-col>
                 </a-row>
@@ -66,7 +62,7 @@
         <a-table
           :loading="loading"
           :size="tableSize"
-          rowKey="id"
+          rowKey="index"
           :columns="columns"
           :data-source="list"
           :pagination="false"
@@ -115,7 +111,7 @@
   </template>
   
   <script>
-  import { listApplyCarLog, delApplyCarLog } from '@/api/clw/applyCarLog'
+  import { listApplyCarLog, delApplyCarLog ,getOfflineList} from '@/api/clw/applyCarLog'
   import CreateForm from './modules/CreateForm'
   import { tableMixin } from '@/store/table-mixin'
   
@@ -142,14 +138,18 @@
         total: 0,
         // 查询参数
         queryParam: {
-          plateNumber: null,
-          applyUserName:null,
           pageNum: 1,
           pageSize: 10,
         },
         daterangeCreateTime:[],
         columns: [
           { title: '序号', scopedSlots: { customRender: 'num' }, width: '50px', align: 'center' },
+          {
+            title: '离线日期',
+            dataIndex: 'offlineTime',
+            ellipsis: true,
+            align: 'center',
+          },
           {
             title: '车牌号码',
             dataIndex: 'plateNumber',
@@ -158,22 +158,20 @@
           },
           {
           title: '车辆类型',
-        //   dataIndex: 'carType',
-          scopedSlots: { customRender: 'insuranceTime' },
+          dataIndex: 'categoryName',
           ellipsis: true,
           align: 'center',
         },
         {
           title: 'IMEI',
-        //   dataIndex: 'carType',
-          scopedSlots: { customRender: 'insuranceIme' },
+          dataIndex: 'imei',
           ellipsis: true,
           align: 'center',
         },
         
           {
             title: '负责人',
-            dataIndex: 'driverName',
+            dataIndex: 'username',
             ellipsis: true,
             align: 'center',
           },
@@ -183,29 +181,6 @@
             ellipsis: true,
             align: 'center',
           },
-  
-        //   {
-        //     title: 'IMEI',
-        //     dataIndex: 'isNonfixedPoint',
-        //     ellipsis: true,
-        //     align: 'center',
-        //   },
-          {
-            title: '离线天数',
-            dataIndex: 'deptId',
-            ellipsis: true,
-            align: 'center',
-          },
-
-  
-   
-        //   {
-        //     title: '操作',
-        //     dataIndex: 'operation',
-        //     width: '6%',
-        //     scopedSlots: { customRender: 'operation' },
-        //     align: 'center',
-        //   },
         ],
       }
     },
@@ -221,10 +196,11 @@
         this.loading = true
         this.queryParam.params = {}
         if (this.daterangeCreateTime !== null && this.daterangeCreateTime !== '' && this.daterangeCreateTime.length !== 0) {
-          this.queryParam.params['beginApplyTime'] = this.daterangeCreateTime[0]
-          this.queryParam.params['endApplyTime'] = this.daterangeCreateTime[1]
+          this.queryParam.startTime = this.daterangeCreateTime[0]
+          this.queryParam.endTime = this.daterangeCreateTime[1]
         }
-        listApplyCarLog(this.queryParam).then((response) => {
+        getOfflineList(this.queryParam).then((response) => {
+          console.log(response);
           this.list = response.rows
           this.total = response.total
           this.loading = false
@@ -240,12 +216,6 @@
       resetQuery() {
         this.daterangeCreateTime = []
         this.queryParam = {
-          deptId: undefined,
-          plateNumber: undefined,
-          driverName: undefined,
-          isNonfixedPoint: undefined,
-          createTime: undefined,
-          applyUserName:undefined,
           pageNum: 1,
           pageSize: 10,
         }

+ 13 - 39
src/views/clw/overspeed/index.vue

@@ -11,8 +11,8 @@
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="8">
-                    <a-form-item label="负责人" prop="applyUserName">
-                      <a-input v-model="queryParam.applyUserName" placeholder="请输入负责人" allow-clear />
+                    <a-form-item label="负责人" prop="username">
+                      <a-input v-model="queryParam.username" placeholder="请输入负责人" allow-clear />
                     </a-form-item>
                   </a-col>
                   <template >
@@ -29,10 +29,6 @@
                     >
                       <a-button type="primary" @click="handleQuery"><a-icon type="search" />查询</a-button>
                       <a-button style="margin-left: 8px" @click="resetQuery"><a-icon type="redo" />重置</a-button>
-                      <!-- <a @click="toggleAdvanced" style="margin-left: 8px">
-                        {{ advanced ? '收起' : '展开' }}
-                        <a-icon :type="advanced ? 'up' : 'down'" />
-                      </a> -->
                     </span>
                   </a-col>
                 </a-row>
@@ -115,7 +111,7 @@
   </template>
   
   <script>
-  import { listApplyCarLog, delApplyCarLog } from '@/api/clw/applyCarLog'
+  import { listApplyCarLog, delApplyCarLog,getOverSpeedList } from '@/api/clw/applyCarLog'
   import CreateForm from './modules/CreateForm'
   import { tableMixin } from '@/store/table-mixin'
   
@@ -142,8 +138,6 @@
         total: 0,
         // 查询参数
         queryParam: {
-          plateNumber: null,
-          applyUserName:null,
           pageNum: 1,
           pageSize: 10,
         },
@@ -158,22 +152,20 @@
           },
           {
           title: '车辆类型',
-        //   dataIndex: 'carType',
-          scopedSlots: { customRender: 'insuranceTime' },
+          dataIndex: 'categoryName',
           ellipsis: true,
           align: 'center',
         },
         {
           title: 'IMEI',
-        //   dataIndex: 'carType',
-          scopedSlots: { customRender: 'insuranceIme' },
+          dataIndex: 'imei',
           ellipsis: true,
           align: 'center',
         },
         
           {
             title: '负责人',
-            dataIndex: 'driverName',
+            dataIndex: 'username',
             ellipsis: true,
             align: 'center',
           },
@@ -186,31 +178,22 @@
   
           {
             title: '超速时间',
-            dataIndex: 'createTime',
+            dataIndex: 'reportTime',
             ellipsis: true,
             align: 'center',
           },
           {
             title: '最高车速(km/h)',
-            dataIndex: 'carId',
+            dataIndex: 'speedLimit',
             ellipsis: true,
             align: 'center',
           },
           {
             title: '限制车速(km/h)',
-            dataIndex: 'deptId',
+            dataIndex: 'speed',
             ellipsis: true,
             align: 'center',
           },
-  
-   
-        //   {
-        //     title: '操作',
-        //     dataIndex: 'operation',
-        //     width: '6%',
-        //     scopedSlots: { customRender: 'operation' },
-        //     align: 'center',
-        //   },
         ],
       }
     },
@@ -226,10 +209,10 @@
         this.loading = true
         this.queryParam.params = {}
         if (this.daterangeCreateTime !== null && this.daterangeCreateTime !== '' && this.daterangeCreateTime.length !== 0) {
-          this.queryParam.params['beginApplyTime'] = this.daterangeCreateTime[0]
-          this.queryParam.params['endApplyTime'] = this.daterangeCreateTime[1]
+          this.queryParam.startTime = this.daterangeCreateTime[0]
+          this.queryParam.endTime = this.daterangeCreateTime[1]
         }
-        listApplyCarLog(this.queryParam).then((response) => {
+        getOverSpeedList(this.queryParam).then((response) => {
           this.list = response.rows
           this.total = response.total
           this.loading = false
@@ -244,13 +227,7 @@
       /** 重置按钮操作 */
       resetQuery() {
         this.daterangeCreateTime = []
-        this.queryParam = {
-          deptId: undefined,
-          plateNumber: undefined,
-          driverName: undefined,
-          isNonfixedPoint: undefined,
-          createTime: undefined,
-          applyUserName:undefined,
+        this.queryParam = {      
           pageNum: 1,
           pageSize: 10,
         }
@@ -272,9 +249,6 @@
         this.single = selectedRowKeys.length !== 1
         this.multiple = !selectedRowKeys.length
       },
-      toggleAdvanced() {
-        this.advanced = !this.advanced
-      },
       /** 删除按钮操作 */
       handleDelete(row) {
         var that = this

+ 16 - 31
src/views/clw/speedRecord/index.vue

@@ -11,14 +11,14 @@
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="8">
-                    <a-form-item label="负责人" prop="applyUserName">
-                      <a-input v-model="queryParam.applyUserName" placeholder="请输入负责人" allow-clear />
+                    <a-form-item label="负责人" prop="username">
+                      <a-input v-model="queryParam.username" placeholder="请输入负责人" allow-clear />
                     </a-form-item>
                   </a-col>
                   <template >
                     <a-col :md="8" :sm="10">
                       <a-form-item label="时间" prop="status">
-                        <a-range-picker style="width: 100%" v-model="    daterangeCreateTime " valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" allow-clear/>
+                        <a-range-picker style="width: 100%" v-model="daterangeCreateTime" valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" allow-clear/>
                       </a-form-item>
                     </a-col>
                   </template>
@@ -29,10 +29,6 @@
                     >
                       <a-button type="primary" @click="handleQuery"><a-icon type="search" />查询</a-button>
                       <a-button style="margin-left: 8px" @click="resetQuery"><a-icon type="redo" />重置</a-button>
-                      <!-- <a @click="toggleAdvanced" style="margin-left: 8px">
-                        {{ advanced ? '收起' : '展开' }}
-                        <a-icon :type="advanced ? 'up' : 'down'" />
-                      </a> -->
                     </span>
                   </a-col>
                 </a-row>
@@ -66,7 +62,7 @@
         <a-table
           :loading="loading"
           :size="tableSize"
-          rowKey="id"
+          rowKey="index"
           :columns="columns"
           :data-source="list"
           :pagination="false"
@@ -115,7 +111,7 @@
   </template>
   
   <script>
-  import { listApplyCarLog, delApplyCarLog } from '@/api/clw/applyCarLog'
+  import {delApplyCarLog ,getSpeedList} from '@/api/clw/applyCarLog'
   import CreateForm from './modules/CreateForm'
   import { tableMixin } from '@/store/table-mixin'
   
@@ -142,8 +138,6 @@
         total: 0,
         // 查询参数
         queryParam: {
-          plateNumber: null,
-          applyUserName:null,
           pageNum: 1,
           pageSize: 10,
         },
@@ -158,22 +152,22 @@
           },
           {
           title: '车辆类型',
-        //   dataIndex: 'carType',
-          scopedSlots: { customRender: 'insuranceTime' },
+          dataIndex: 'categoryName',
+          // scopedSlots: { customRender: 'insuranceTime' },
           ellipsis: true,
           align: 'center',
         },
         {
           title: 'IMEI',
-        //   dataIndex: 'carType',
-          scopedSlots: { customRender: 'insuranceIme' },
+          dataIndex: 'imei',
+          // scopedSlots: { customRender: 'insuranceIme' },
           ellipsis: true,
           align: 'center',
         },
         
           {
             title: '负责人',
-            dataIndex: 'driverName',
+            dataIndex: 'username',
             ellipsis: true,
             align: 'center',
           },
@@ -186,19 +180,19 @@
   
           {
             title: '超速时间',
-            dataIndex: 'createTime',
+            dataIndex: 'reportTime',
             ellipsis: true,
             align: 'center',
           },
           {
             title: '车速限制(km/h)',
-            dataIndex: 'carId',
+            dataIndex: 'speedLimit',
             ellipsis: true,
             align: 'center',
           },
           {
             title: '车速(km/h)',
-            dataIndex: 'deptId',
+            dataIndex: 'speed',
             ellipsis: true,
             align: 'center',
           },
@@ -226,10 +220,10 @@
         this.loading = true
         this.queryParam.params = {}
         if (this.daterangeCreateTime !== null && this.daterangeCreateTime !== '' && this.daterangeCreateTime.length !== 0) {
-          this.queryParam.params['beginApplyTime'] = this.daterangeCreateTime[0]
-          this.queryParam.params['endApplyTime'] = this.daterangeCreateTime[1]
+          this.queryParam.startTime = this.daterangeCreateTime[0]
+          this.queryParam.endTime = this.daterangeCreateTime[1]
         }
-        listApplyCarLog(this.queryParam).then((response) => {
+        getSpeedList(this.queryParam).then((response) => {
           this.list = response.rows
           this.total = response.total
           this.loading = false
@@ -245,12 +239,6 @@
       resetQuery() {
         this.daterangeCreateTime = []
         this.queryParam = {
-          deptId: undefined,
-          plateNumber: undefined,
-          driverName: undefined,
-          isNonfixedPoint: undefined,
-          createTime: undefined,
-          applyUserName:undefined,
           pageNum: 1,
           pageSize: 10,
         }
@@ -272,9 +260,6 @@
         this.single = selectedRowKeys.length !== 1
         this.multiple = !selectedRowKeys.length
       },
-      toggleAdvanced() {
-        this.advanced = !this.advanced
-      },
       /** 删除按钮操作 */
       handleDelete(row) {
         var that = this

+ 2 - 2
vue.config.js

@@ -110,8 +110,8 @@ const vueConfig = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `https://ruoyi.setworld.net`,
-        // target: `http://113.249.153.164:7618/api`,
-        target:`http://172.20.16.92:8080/`,
+        target: `http://113.249.153.164:7618/api`,
+        // target:`http://172.20.16.92:8080/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''