curry 5 days ago
parent
commit
57dff81b7b
2 changed files with 44 additions and 12 deletions
  1. 7 8
      web/src/view/vehicle/component/chart.vue
  2. 37 4
      web/src/view/vehicle/vehicle.vue

+ 7 - 8
web/src/view/vehicle/component/chart.vue

@@ -26,45 +26,44 @@ const option = {
   xAxis: {
     type: 'category',
     boundaryGap: false,
-    data: ['08:00', '08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00', '18:30', '19:00', '19:30']
+    data: ['06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00', '00:00']
   },
-  yAxis: { type: 'value' },
+  yAxis: { type: 'value', max: 2000 },
   series: [
     {
       name: '客车',
       type: 'line',
-      stack: 'Total',
       data: [120, 132, 101, 134, 90, 230, 210, 101]
     },
     {
       name: '货车',
       type: 'line',
-      stack: 'Total',
       data: [220, 182, 191, 234, 290, 330, 310, 241]
     },
     {
       name: '轿车',
       type: 'line',
-      stack: 'Total',
       data: [150, 232, 201, 154, 190, 330, 410, 963]
     },
     {
       name: '工程车',
       type: 'line',
-      stack: 'Total',
       data: [320, 332, 301, 334, 390, 330, 320, 148]
     },
     {
       name: '卡车',
       type: 'line',
-      stack: 'Total',
       data: [820, 932, 901, 934, 1290, 1330, 1320, 674]
     },
     {
       name: '拖车',
       type: 'line',
-      stack: 'Total',
       data: [98, 92, 701, 964, 670, 1260, 1450, 196]
+    },
+    {
+      name: '私家车',
+      type: 'line',
+      data: [844, 456, 1250, 1450, 289, 376, 250 ]
     }
   ]
 }

+ 37 - 4
web/src/view/vehicle/vehicle.vue

@@ -8,20 +8,36 @@
         <div>
           <el-form :inline="true">
             <el-form-item label="编号:">
-              <el-input placeholder="请输入布防点编号" v-model="condition.code"/>
+              <el-input
+                v-model="condition.code"
+                placeholder="请输入布防点编号"
+              />
             </el-form-item>
             <el-form-item label="日期:">
               <el-date-picker
-                v-model="dateValue"
+                v-model="condition.date"
                 type="date"
                 placeholder="请选择日期"
               />
             </el-form-item>
             <el-form-item label="车牌号:">
-              <el-input placeholder="请输入车牌号" />
+              <el-input
+                v-model="condition.licensePlate"
+                placeholder="请输入车牌号"
+              />
             </el-form-item>
             <el-form-item label="车牌类型:">
-              <el-select placeholder="请选择车辆类型" />
+              <el-select
+                v-model="typeLabel"
+                placeholder="请选择车辆类型"
+                @change="changeType"
+              >
+                <el-option
+                  v-for="item in typeList"
+                  :label="item.label"
+                  :value="item.label"
+                />
+              </el-select>
             </el-form-item>
             <el-form-item>
               <el-button
@@ -193,6 +209,23 @@ const openPreview = (val) => {
 const changePage = (page) => {
   console.log(page)
 }
+
+const typeList = reactive([
+  { id: 0, label: '客车' },
+  { id: 1, label: '货车' },
+  { id: 2, label: '轿车' },
+  { id: 3, label: '工程车' },
+  { id: 4, label: '卡车' },
+  { id: 5, label: '拖车' }
+])
+const typeLabel = ref('')
+const changeType = (e) => {
+  typeList.forEach(item => {
+    if (item.label === e) {
+      condition.vehicleType = item.id
+    }
+  })
+}
 </script>
 
 <style scoped lang="scss">