liwei19941102 2 anos atrás
pai
commit
706426e542

BIN
src/assets/images/icon/map.png


BIN
src/assets/images/icon/video.png


BIN
src/assets/images/icon/小货车.png


+ 107 - 90
src/components/Public/timeLine.vue

@@ -1,93 +1,110 @@
 <template>
-    <div class="processBox">
-        <div v-for="(item,index) in activities">
-          
+  <div>
+    <div style="display: flex;flex-direction: row;">
+    <div v-for="(obj, index1) in activities" style="width: 13vw;">
+      <div style="height: 40px;">
+         <img v-if="obj.isNow" style="width: 40px;" src="@/assets/images/icon/小货车.png" />
+      </div>
+      <div style="display: flex;flex-direction: row;  font-family: 思源黑体;font-size: 18px;font-weight: bold;color:#C0C4CC">
+        <div>{{ obj.startTime }}</div>
+        <div style="padding-left: 40px;">{{ obj.endTime }}</div>
+      </div>
+    </div>
+    </div>
+    <div style="display: flex;flex-direction: row;padding-left: 3%;">
+    <div v-for="(item, index) in activities" style="width: 13vw;">
+      <div>
+        <div style="display: flex;flex-direction: row;">
+          <div class="activitieyContent" v-if="item.rank == 1" style="background: #06D903;">
+            起
+          </div>
+          <div class="activitieyContent" v-if="item.rank != 1" style="">
+            {{ index }}
+          </div>
+          <div class="line" style="margin-top:17px;margin-left: 2px;" v-if="item.rank != 999"></div>
         </div>
+        <div style="writing-mode:vertical-rl;width: 40px;line-height: 40px;font-family: 思源黑体;
+                    font-size: 23px;font-weight: bold;letter-spacing: 10px;margin-top: 10px;">
+          {{ item.content }}
+        </div>
+      </div>
+    </div>
     </div>
-  </template>
-  <script lang="ts" setup>
-  const activities = [
-    {
-      content: '白下',
-      time: '7:00',
-      people: '五六七',
-      done: true,
-      color:'#06D903',
-      index:'起点',
-      rank:1
-    },
-    {
-      content: '白下',
-      people: '吉吉国王',
-      done: false,
-      time: '8:00-9:00',
-      index:'站点1',
-      color:'#409EFF',
-      rank:2
-    },
-    {
-      content: '白下',
-      people: '吉吉国王',
-      done: false,
-      time: '8:00-9:00',
-      index:'站点2',
-      color:'#409EFF',
-      rank:3
-    },
-  ]
-  </script>
-  <style lang="scss" scoped>
-  .processBox {
-    background-color: #fff;
-    height: 210px;
-   
-    .title {
-      font-size: 16px;
-      font-weight: 600;
-      padding-left: 32px;
-      padding-top: 16px;
-    }
-    .timelineProcessBox {
-      .timeline {
-        display: flex;
-        width: 95%;
-        margin: 40px auto;
-        .lineitem {
-          transform: translateX(50%);
-          width: 25%;
-        }
-      }
-    }
-  }
-   
-  :deep(.el-timeline-item__tail) {
-    border-left: none;
-    border-top: 2px solid #e4e7ed;
-    width: 100%;
-    position: absolute;
-    top: 6px;
-  }
-  :deep(.el-timeline-item__wrapper) {
-    padding-left: 0;
-    position: absolute;
-    top: 20px;
-    transform: translateX(-50%);
-    text-align: center;
-  }
-  :deep(.el-timeline-item__timestamp) {
-    font-size: 14px;
-  }
-  .active {
-    :deep(.el-timeline-item__node) {
-      background-color: #06D903;
-    }
-    :deep(.el-timeline-item__tail) {
-      border-color: #06D903;
-    }
-  }
-  .active + li {
-    :deep(.el-timeline-item__node) {
-      background-color: #06D903;
-    }
-  }
-  </style>
+  </div>
+</template>
+<script lang="ts" setup>
+const activities = [
+  {
+    content: '白下',
+    endTime: '7:00',
+    people: '五六七',
+    done: true,
+    color: '#06D903',
+    index: '起点',
+    rank: 1,
+    isNow:true
+  },
+  {
+    content: '白下',
+    people: '吉吉国王',
+    done: false,
+    startTime: '8:00',
+    endTime: '9:00',
+    index: '站点1',
+    color: '#409EFF',
+    rank: 2
+  },
+  {
+    content: '白下',
+    people: '吉吉国王',
+    done: false,
+    startTime: '8:00',
+    endTime: '9:00',
+    index: '站点2',
+    color: '#409EFF',
+    rank: 3
+  },
+  {
+    content: '白下',
+    people: '吉吉国王',
+    done: false,
+    startTime: '8:00',
+    endTime: '9:00',
+    index: '站点2',
+    color: '#409EFF',
+    rank: 4
+  },
+  {
+    content: '白下',
+    people: '吉吉国王',
+    done: false,
+    startTime: '8:00',
+    endTime: '9:00',
+    index: '站点2',
+    color: '#409EFF',
+    rank: 999
+  },
+]
+</script>
+<style lang="scss" scoped>
+.activitieyContent {
+  width: 40px;
+  height: 40px;
+  opacity: 1;
+  background-color: #6495ED;
+  border-radius: 50%;
+  text-align: center;
+  line-height: 40px;
+  font-family: 思源黑体;
+  font-size: 20px;
+  color: #ffffff
+}
+
+.line {
+  width: 10vw;
+  height: 8px;
+  border-radius: 10px;
+  opacity: 1;
+  background: #D8D8D8;
+}
+</style>

+ 276 - 0
src/views/car/activeSupervision/index.vue

@@ -0,0 +1,276 @@
+<template>
+    <div class="p-2">
+        <transition :enter-active-class="proxy?.animate.searchAnimate.enter"
+            :leave-active-class="proxy?.animate.searchAnimate.leave">
+            <div class="search" v-show="showSearch" style="display: flex;flex-direction: row;">
+                <div style="width: 85%;">
+                    <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
+                        <el-form-item label="驾驶员" prop="carNum">
+                            <el-input v-model="queryParams.carNum" placeholder="请输入车牌号" clearable style="width: 160px"
+                                @keyup.enter="handleQuery" />
+                        </el-form-item>
+                        <!-- <el-form-item label="身份证" prop="carNum">
+                            <el-input v-model="queryParams.carNum" placeholder="请输入车牌号" clearable style="width: 160px"
+                                @keyup.enter="handleQuery" />
+                        </el-form-item> -->
+                        <!-- <el-form-item label="时间" prop="carNum">
+                            <el-date-picker v-model="value2" type="datetimerange" :shortcuts="shortcuts"
+                                range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
+                        </el-form-item> -->
+                    </el-form>
+                </div>
+                <div style="width: 15%;">
+                    <el-form-item>
+                        <el-button type="primary" @click="goadd">新增</el-button>
+                        <el-button type="primary" @click="resetQuery">查询</el-button>
+                    </el-form-item>
+                </div>
+            </div>
+        </transition>
+        <el-card shadow="never">
+
+            <tableElm :columns="columns" ref="table"></tableElm>
+
+            <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+                v-model:limit="queryParams.pageSize" @pagination="getList" />
+        </el-card>
+    </div>
+</template>
+
+<script setup name="CarInfo" lang="ts">
+import { listCarInfo, getCarInfo, delCarInfo, addCarInfo, updateCarInfo } from '@/api/carInfo';
+import { CarInfoVO, CarInfoQuery, CarInfoForm } from '@/api/carInfo/types';
+import tableElm from "@/components/Public/table.vue";
+import { useRoute, useRouter } from "vue-router";
+
+const route = useRoute();
+const router = useRouter();
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+
+const carInfoList = ref<CarInfoVO[]>([]);
+const buttonLoading = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref<Array<string | number>>([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+const value2 = ref('')
+
+const queryFormRef = ref<ElFormInstance>();
+const carInfoFormRef = ref<ElFormInstance>();
+
+
+const dialog = reactive<DialogOption>({
+    visible: false,
+    title: ''
+});
+
+const table = ref(tableElm)
+
+const columns = ref([
+    // {label: '上层位置', prop: 'v', visible: true},
+    { label: '驾驶员', prop: 'driver', visible: true, isTemplate: false },
+    { label: '作业时间', prop: 'workTime', visible: true, isTemplate: false, },
+    { label: '作业名称', prop: 'workName', pprop: "ext1", visible: true, isTemplate: false },
+    { label: '危险驾驶次数', prop: 'warnNum', pprop: "ext1", visible: true, isTemplate: false },
+    { label: '危险驾驶累计次数', prop: 'warnCount', pprop: "ext1", visible: true, isTemplate: false },
+])
+
+const initFormData: CarInfoForm = {
+    id: undefined,
+    carNum: undefined,
+    carType: undefined,
+    deviceInfos: undefined,
+    repairInfo: undefined,
+    maintenanceInfo: undefined,
+    insuranceInfo: undefined,
+    inspectionInfo: undefined,
+    trafficAccidentInfo: undefined,
+    violationInfo: undefined,
+    changeInfo: undefined,
+    ext1: undefined,
+    ext2: undefined
+}
+const data = reactive<PageData<CarInfoForm, CarInfoQuery>>({
+    form: { ...initFormData },
+    queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        carNum: undefined,
+        carType: undefined,
+        deviceInfos: undefined,
+        repairInfo: undefined,
+        maintenanceInfo: undefined,
+        insuranceInfo: undefined,
+        inspectionInfo: undefined,
+        trafficAccidentInfo: undefined,
+        violationInfo: undefined,
+        changeInfo: undefined,
+        ext1: undefined,
+        ext2: undefined,
+        params: {
+        }
+    },
+    rules: {
+        id: [
+            { required: true, message: "编号不能为空", trigger: "blur" }
+        ],
+        carNum: [
+            { required: true, message: "车牌号不能为空", trigger: "blur" }
+        ],
+        carType: [
+            { required: true, message: "车类型不能为空", trigger: "change" }
+        ],
+        deviceInfos: [
+            { required: true, message: "所有车载设备信息不能为空", trigger: "blur" }
+        ],
+        repairInfo: [
+            { required: true, message: "维修信息不能为空", trigger: "blur" }
+        ],
+        maintenanceInfo: [
+            { required: true, message: "保养信息不能为空", trigger: "blur" }
+        ],
+        insuranceInfo: [
+            { required: true, message: "保险信息不能为空", trigger: "blur" }
+        ],
+        inspectionInfo: [
+            { required: true, message: "年检信息不能为空", trigger: "blur" }
+        ],
+        trafficAccidentInfo: [
+            { required: true, message: "交通事故信息不能为空", trigger: "blur" }
+        ],
+        violationInfo: [
+            { required: true, message: "违章信息不能为空", trigger: "blur" }
+        ],
+        changeInfo: [
+            { required: true, message: "车辆变更信息不能为空", trigger: "blur" }
+        ],
+        ext1: [
+            { required: true, message: "扩展1不能为空", trigger: "blur" }
+        ],
+        ext2: [
+            { required: true, message: "扩展2不能为空", trigger: "blur" }
+        ]
+    }
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+const goadd = () => {
+    router.push("/car/work/addWork")
+}
+
+/** 查询车辆信息列表 */
+const getList = async () => {
+    // loading.value = true;
+    // const res = await listCarInfo(queryParams.value);
+    var res = {
+          rows:[
+            {
+                driver:'张林',
+                workTime:"320902198711957841",
+                workName:"13898219932",
+                warnNum:"xxxxx",
+                warnCount:"苏A51972",
+            }
+          ],
+          total:12
+    }
+    var buttons = [
+        { type: 'primary', text: '核销', func: "goAdd" },
+        { type: 'danger', text: '删除', func: "goAdd" },
+    ]
+    table.value.setDataList(res.rows);
+    table.value.setButton(buttons);
+    total.value = res.total;
+    loading.value = false;
+}
+
+/** 取消按钮 */
+const cancel = () => {
+    reset();
+    dialog.visible = false;
+}
+
+/** 表单重置 */
+const reset = () => {
+    form.value = { ...initFormData };
+    carInfoFormRef.value?.resetFields();
+}
+
+/** 搜索按钮操作 */
+const handleQuery = () => {
+    queryParams.value.pageNum = 1;
+    getList();
+}
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+    queryFormRef.value?.resetFields();
+    handleQuery();
+}
+
+/** 多选框选中数据 */
+const handleSelectionChange = (selection: CarInfoVO[]) => {
+    ids.value = selection.map(item => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+}
+
+/** 新增按钮操作 */
+const handleAdd = () => {
+    reset();
+    dialog.visible = true;
+    dialog.title = "添加车辆信息";
+}
+
+/** 修改按钮操作 */
+const handleUpdate = async (row?: CarInfoVO) => {
+    reset();
+    const _id = row?.id || ids.value[0]
+    const res = await getCarInfo(_id);
+    Object.assign(form.value, res.data);
+    dialog.visible = true;
+    dialog.title = "修改车辆信息";
+}
+
+/** 提交按钮 */
+const submitForm = () => {
+    carInfoFormRef.value?.validate(async (valid: boolean) => {
+        if (valid) {
+            buttonLoading.value = true;
+            if (form.value.id) {
+                await updateCarInfo(form.value).finally(() => buttonLoading.value = false);
+            } else {
+                await addCarInfo(form.value).finally(() => buttonLoading.value = false);
+            }
+            proxy?.$modal.msgSuccess("修改成功");
+            dialog.visible = false;
+            await getList();
+        }
+    });
+}
+
+/** 删除按钮操作 */
+const handleDelete = async (row?: CarInfoVO) => {
+    const _ids = row?.id || ids.value;
+    await proxy?.$modal.confirm('是否确认删除车辆信息编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
+    await delCarInfo(_ids);
+    proxy?.$modal.msgSuccess("删除成功");
+    await getList();
+}
+
+/** 导出按钮操作 */
+const handleExport = () => {
+    proxy?.download('system/carInfo/export', {
+        ...queryParams.value
+    }, `carInfo_${new Date().getTime()}.xlsx`)
+}
+
+onMounted(() => {
+    getList();
+});
+</script>
+    

+ 25 - 17
src/views/car/safe/index.vue

@@ -15,7 +15,7 @@
                         </el-form-item> -->
                         <!-- <el-form-item label="时间" prop="carNum">
                             <el-date-picker v-model="value2" type="datetimerange" :shortcuts="shortcuts"
-                                range-separator="To" start-placeholder="Start date" end-placeholder="End date" />
+                                range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
                         </el-form-item> -->
                     </el-form>
                 </div>
@@ -34,6 +34,12 @@
             <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
                 v-model:limit="queryParams.pageSize" @pagination="getList" />
         </el-card>
+
+
+        <el-dialog :title="dialog.title" v-model="dialog.visible" width="40vw" append-to-body>
+            <video v-for="item in 1" style="width: 99%;margin-left:0.5%" controls="controls" :autoplay="false"
+              muted="muted" :ref="`videoref${item}`"></video>
+        </el-dialog>
     </div>
 </template>
 
@@ -43,6 +49,9 @@ import { CarInfoVO, CarInfoQuery, CarInfoForm } from '@/api/carInfo/types';
 import tableElm from "@/components/Public/table.vue";
 import { useRoute, useRouter } from "vue-router";
 
+import videojs from "video.js"
+import "video.js/dist/video-js.css"
+
 const route = useRoute();
 const router = useRouter();
 
@@ -63,7 +72,7 @@ const carInfoFormRef = ref<ElFormInstance>();
 
 
 const dialog = reactive<DialogOption>({
-    visible: false,
+    visible: true,
     title: ''
 });
 
@@ -71,13 +80,11 @@ const table = ref(tableElm)
 
 const columns = ref([
     // {label: '上层位置', prop: 'v', visible: true},
-    { label: '姓名', prop: 'carNum', visible: true, isTemplate: false },
-    { label: '身份证', prop: 'workTime', visible: true, isTemplate: false, },
-    { label: '手机号', prop: 'workName', pprop: "ext1", visible: true, isTemplate: false },
-    { label: '设备号', prop: 'type', pprop: "ext1", visible: true, isTemplate: false,},
-    { label: '车辆', prop: 'wangge', pprop: "ext1", visible: true, isTemplate: false, },
-    { label: '工作小组', prop: 'gpeople', pprop: "ext1", visible: true, isTemplate: false,  },
-    { label: '类型', prop: 'people', pprop: "ext1", visible: true, isTemplate: false, },
+    { label: '驾驶员', prop: 'driver', visible: true, isTemplate: false },
+    { label: '作业时间', prop: 'workTime', visible: true, isTemplate: false, },
+    { label: '作业名称', prop: 'workName', pprop: "ext1", visible: true, isTemplate: false },
+    { label: '危险驾驶次数', prop: 'warnNum', pprop: "ext1", visible: true, isTemplate: false },
+    { label: '危险驾驶累计次数', prop: 'warnCount', pprop: "ext1", visible: true, isTemplate: false },
 ])
 
 const initFormData: CarInfoForm = {
@@ -171,19 +178,20 @@ const getList = async () => {
     var res = {
           rows:[
             {
-                carNum:'张林',
-                workTime:"320902198711957841",
-                workName:"13898219932",
-                type:"xxxxx",
-                wangge:"苏A51972",
-                gpeople:"仙林",
-                people:"司机"
-
+                driver:'张林',
+                workTime:"2024-11-11 11:00-2024-11-11 12:00",
+                workName:"松罗乡-姚澳村",
+                warnNum:"1",
+                warnCount:"5",
             }
           ],
           total:12
     }
+    var buttons = [
+        { type: 'primary', text: '查看危险驾驶警告', func: "goAdd" },
+    ]
     table.value.setDataList(res.rows);
+    table.value.setButton(buttons);
     total.value = res.total;
     loading.value = false;
 }

+ 42 - 16
src/views/yunying/scheduling/index.vue

@@ -38,7 +38,7 @@
         <el-card shadow="never">
             <div class="carDiv">
                 <div
-                    style="width: 20%;background: #7BC932;text-align: center;display: flex;flex-direction: column;justify-content: center;align-items:center;">
+                    style="width: 18%;background: #7BC932;text-align: center;display: flex;flex-direction: column;justify-content: center;align-items:center;">
                     <div class="carDetail">苏A xxxxx</div>
                     <div class="carFont">07:00-10:00</div>
                     <div class="carFont">白下/新港</div>
@@ -46,10 +46,27 @@
                     <div class="carFont">小型电动吊桶车</div>
                 </div>
                 <div style="width: 80%;">
-                   <timeLineDiv></timeLineDiv>
+                    <timeLineDiv></timeLineDiv>
+                </div>
+                <div style="padding-top:1%">
+                    <div style="width: 30px;height: 30px;border: 1px solid #000000;border-radius: 20%;" @click="dialogMap.visible = true">
+                        <img style="width: 28px;height: 28px;" src='@/assets/images/icon/map.png' />
+                    </div>
+                    <div style="width: 30px;height: 30px;border: 1px solid #000000;border-radius: 20%;margin-top: 5px"  @click="dialog.visible = true">
+                        <img style="width: 28px;height: 28px;" src='@/assets/images/icon/video.png' />
+                    </div>
                 </div>
             </div>
         </el-card>
+
+        <el-dialog :title="dialogMap.title" v-model="dialogMap.visible" width="40vw" append-to-body>
+            <mapDiv style="width:40vw;height:40vh;" @childToParent='childrenClick'></mapDiv>
+        </el-dialog>
+
+        <el-dialog :title="dialog.title" v-model="dialog.visible" width="40vw" append-to-body>
+            <video v-for="item in 1" style="width: 99%;margin-left:0.5%" controls="controls" :autoplay="false"
+              muted="muted" :ref="`videoref${item}`"></video>
+        </el-dialog>
     </div>
 </template>
 
@@ -60,6 +77,10 @@ import tableElm from "@/components/Public/table.vue";
 import { useRoute, useRouter } from "vue-router";
 import timeLineDiv from "@/components/Public/timeline";
 import useTagsViewStore from '@/store/modules/tagsView';
+import mapDiv from "@/components/Map/index.vue"
+
+import videojs from "video.js"
+import "video.js/dist/video-js.css"
 
 
 
@@ -82,9 +103,14 @@ const queryFormRef = ref<ElFormInstance>();
 const carInfoFormRef = ref<ElFormInstance>();
 
 
-const dialog = reactive<DialogOption>({
+const dialogMap = reactive<DialogOption>({
     visible: false,
-    title: ''
+    title: '地图'
+});
+
+const dialog = reactive<DialogOption>({
+    visible: true,
+    title: '在线视频'
 });
 
 const table = ref(tableElm)
@@ -210,18 +236,18 @@ const getList = async () => {
 }
 
 const activities = [
-  {
-    content: 'Event start',
-    timestamp: '2018-04-15',
-  },
-  {
-    content: 'Approved',
-    timestamp: '2018-04-13',
-  },
-  {
-    content: 'Success',
-    timestamp: '2018-04-11',
-  },
+    {
+        content: 'Event start',
+        timestamp: '2018-04-15',
+    },
+    {
+        content: 'Approved',
+        timestamp: '2018-04-13',
+    },
+    {
+        content: 'Success',
+        timestamp: '2018-04-11',
+    },
 ]
 
 /** 取消按钮 */