liwei19941102 2 лет назад
Родитель
Сommit
b8c3dfc533

+ 7 - 0
src/api/data.ts

@@ -8,6 +8,13 @@ export const getpassenger = () => {
     });
   };
 
+export const getInfo = (code) =>{
+  return request({
+    url: '/system/common/cabinet/'+code+'/info',
+    method: 'post'
+  });
+}
+
 export const getBoxInfo = (code) =>{
   return request({
     url: '/system/common/cabinet/'+code+'/allbox/info',

+ 1 - 1
src/components/HomeComponents/messageTable.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="messagePageClass">
         <div class="titleBg">
-            <div class="titleFont">车辆报警</div>
+            <div class="titleFont">设备报警</div>
         </div>
         <div class="divContent">
             <div style="margin-left: 1vw;max-height: 30vh;overflow-y: scroll;" class="tableClass">

+ 1 - 1
src/components/HomeComponents/pieEcharts.vue

@@ -66,7 +66,7 @@ const initData = async () => {
         }
         dataList.value.push(cObj)
     }
-    dataList.value.push({ name: '其它', value: total, label: label, labelLine: labelLine });
+    // dataList.value.push({ name: '其它', value: total, label: label, labelLine: labelLine });
     drawEchart();
 }
 

+ 188 - 150
src/components/HomeComponents/stationPie.vue

@@ -12,7 +12,8 @@
                         <div class="countDiv"
                             style="display: flex;flex-direction: column;justify-content: space-between;">
                             <div><img style="width: 2vw;height: 1vh;" src="@/assets/images/homeImages/up.png"></div>
-                            <div style="display: flex;flex-direction: row;justify-content: space-between;padding-left: 0.5vw;padding-right: 1vw;">
+                            <div
+                                style="display: flex;flex-direction: row;justify-content: space-between;padding-left: 0.5vw;padding-right: 1vw;">
                                 <div class="typeClass">
                                     总装备数
                                 </div>
@@ -26,7 +27,8 @@
                         <div class="countDiv"
                             style="display: flex;flex-direction: column;justify-content: space-between;margin-top: 0.5vh;">
                             <div><img style="width: 2vw;height: 1vh;" src="@/assets/images/homeImages/up.png"></div>
-                            <div style="display: flex;flex-direction: row;justify-content: space-between;padding-left: 0.5vw;padding-right: 1vw;">
+                            <div
+                                style="display: flex;flex-direction: row;justify-content: space-between;padding-left: 0.5vw;padding-right: 1vw;">
                                 <div class="typeClass">
                                     在线设备
                                 </div>
@@ -40,7 +42,8 @@
                         <div class="countDiv"
                             style="display: flex;flex-direction: column;justify-content: space-between;margin-top: 0.5vh;">
                             <div><img style="width: 2vw;height: 1vh;" src="@/assets/images/homeImages/up.png"></div>
-                            <div style="display: flex;flex-direction: row;justify-content: space-between;padding-left: 0.5vw;padding-right: 1vw;">
+                            <div
+                                style="display: flex;flex-direction: row;justify-content: space-between;padding-left: 0.5vw;padding-right: 1vw;">
                                 <div class="typeClass">
                                     箱体总数
                                 </div>
@@ -54,7 +57,8 @@
                         <div class="countDiv"
                             style="display: flex;flex-direction: column;justify-content: space-between;margin-top: 0.5vh;">
                             <div><img style="width: 2vw;height: 1vh;" src="@/assets/images/homeImages/up.png"></div>
-                            <div style="display: flex;flex-direction: row;justify-content: space-between;padding-left: 0.5vw;padding-right: 1vw;">
+                            <div
+                                style="display: flex;flex-direction: row;justify-content: space-between;padding-left: 0.5vw;padding-right: 1vw;">
                                 <div class="typeClass">
                                     空闲箱体
                                 </div>
@@ -103,174 +107,208 @@
     </div>
 </template>
 <script setup name="Index" lang="ts">
-import * as echarts from 'echarts';
+    import * as echarts from 'echarts';
+    import { getDicts } from '@/api/system/dict/data'
+    import { getInfo, getBoxInfo, getLock, openall } from "@/api/data"
 
-const stationchart = ref();
+    const stationchart = ref();
 
-const drawEchart = () => {
-    let echartsObj = echarts.init(stationchart.value, "macarons");
-    var dateArray = getRecentDays();
-    var option = {
-        color: ['#707070', '#0EEFFF'],
-        title: {
-            // 图形标题(如果想要换行则使用ES6 `` 模板字符串)
-            // 例如: `示例
-            //   这里的文字会变为第二行(因为会保留格式)
-            text: '75%',
-            subtext: "在线率",
-            left: "center",//对齐方式居中
-            top: "40%",//距离顶部
-            textStyle: {//文字配置
-                color: "#ffffff",//文字颜色
-                fontSize: 30,//字号
-                align: "center"//对齐方式
-            },
-            subtextStyle: {
-                color: "#C1D2E4"
+    const device = ref({
+        total: 0,
+        online: 0,
+        boxs: 0,
+        kongxian: 0
+    })
+
+    const getDeviceData = () => {
+        getDicts('tbl_sites').then(res => {
+            initSiteData(res)
+        })
+    }
+
+    const initSiteData = async (res) => {
+        console.log(device.value.total);
+        for (var index in res.data) {
+            // console.log(isNull(res.data[index].remark))
+            if (res.data[index].remark != null && res.data[index].remark != '') {
+                var devices = JSON.parse(res.data[index].remark)
+                device.value.total += devices.length
+                for (var i in devices) {
+                    if (devices[i].type == 'cabinet') {
+                        const boxinfo = await getInfo(devices[i].code)
+                        console.log(boxinfo)
+                    }
+                }
             }
-        },
-        series: [
-            {
-                name: 'Access From',
-                type: 'pie',
-                radius: ['65%', '80%'],
-                avoidLabelOverlap: false,
-                label: {
-                    show: false,
-                    position: 'center'
-                },
-                labelLine: {
-                    show: false
+        }
+        console.log(device.value.total)
+    }
+
+    const drawEchart = () => {
+        let echartsObj = echarts.init(stationchart.value, "macarons");
+        var dateArray = getRecentDays();
+        var option = {
+            color: ['#707070', '#0EEFFF'],
+            title: {
+                // 图形标题(如果想要换行则使用ES6 `` 模板字符串)
+                // 例如: `示例
+                //   这里的文字会变为第二行(因为会保留格式)
+                text: '75%',
+                subtext: "在线率",
+                left: "center",//对齐方式居中
+                top: "40%",//距离顶部
+                textStyle: {//文字配置
+                    color: "#ffffff",//文字颜色
+                    fontSize: 30,//字号
+                    align: "center"//对齐方式
                 },
-                data: [
-                    { value: 25, name: 'Search Engine' },
-                    { value: 75, name: 'Direct' },
-                ]
-            }
-        ]
-    };
-    echartsObj.setOption(option);
-}
+                subtextStyle: {
+                    color: "#C1D2E4"
+                }
+            },
+            series: [
+                {
+                    name: 'Access From',
+                    type: 'pie',
+                    radius: ['65%', '80%'],
+                    avoidLabelOverlap: false,
+                    label: {
+                        show: false,
+                        position: 'center'
+                    },
+                    labelLine: {
+                        show: false
+                    },
+                    data: [
+                        { value: 25, name: 'Search Engine' },
+                        { value: 75, name: 'Direct' },
+                    ]
+                }
+            ]
+        };
+        echartsObj.setOption(option);
+    }
 
-const getRecentDays = () => {
-    const oneDay = 24 * 60 * 60 * 1000; // 这里定义一天的毫秒数
-    const resultArray = [];
-    for (let i = 6; i >= 0; i--) {
-        const currentDate = new Date(Date.now() - i * oneDay); // 计算出每天的日期
-        const year = currentDate.getFullYear();
-        const month = String(currentDate.getMonth() + 1).padStart(2, "0"); // 月份需要补零
-        const day = String(currentDate.getDate()).padStart(2, "0"); // 日期也需要补零
-        const formattedDate = `${month}-${day}`; // 格式化日期为 yyyy-mm-dd 的形式
-        resultArray.push(formattedDate);
+    const getRecentDays = () => {
+        const oneDay = 24 * 60 * 60 * 1000; // 这里定义一天的毫秒数
+        const resultArray = [];
+        for (let i = 6; i >= 0; i--) {
+            const currentDate = new Date(Date.now() - i * oneDay); // 计算出每天的日期
+            const year = currentDate.getFullYear();
+            const month = String(currentDate.getMonth() + 1).padStart(2, "0"); // 月份需要补零
+            const day = String(currentDate.getDate()).padStart(2, "0"); // 日期也需要补零
+            const formattedDate = `${month}-${day}`; // 格式化日期为 yyyy-mm-dd 的形式
+            resultArray.push(formattedDate);
+        }
+        return resultArray;
     }
-    return resultArray;
-}
 
 
-onMounted(() => {
-    drawEchart();
-})
+    onMounted(() => {
+        getDeviceData();
+        drawEchart();
+    })
 </script>
 <style lang="scss">
-.stationEchartsClass {
-    height: 20vh;
-    width: 20vw;
+    .stationEchartsClass {
+        height: 20vh;
+        width: 20vw;
+
+        .titleBg {
+            background: url("@/assets/images/homeImages/titleBg.png") no-repeat;
+            background-size: 100% 100%;
+        }
 
-    .titleBg {
-        background: url("@/assets/images/homeImages/titleBg.png") no-repeat;
-        background-size: 100% 100%;
+        .titleFont {
+            font-family: Source Han Sans CN, Source Han Sans CN;
+            font-weight: 400;
+            font-size: 18px;
+            color: #FFFFFF;
+            line-height: 4vh;
+            text-shadow: 0px 4px 0px rgba(10, 40, 95, 0.69);
+            text-align: left;
+            font-style: normal;
+            text-transform: none;
+            margin-left: 2vw;
+            letter-spacing: 5px;
+        }
+
+        .divContent {
+            background: url("@/assets/images/homeImages/contentBg.png") no-repeat;
+            background-size: 100% 100%;
+            width: 20vw;
+            height: 22vh;
+        }
+
+    }
+
+    .countDiv {
+        width: 8vw;
+        height: 4vh;
+        background-color: #375785;
     }
 
-    .titleFont {
+    .countClass {
         font-family: Source Han Sans CN, Source Han Sans CN;
-        font-weight: 400;
+        font-weight: bold;
         font-size: 18px;
-        color: #FFFFFF;
-        line-height: 4vh;
-        text-shadow: 0px 4px 0px rgba(10, 40, 95, 0.69);
-        text-align: left;
+        letter-spacing: 5px;
+        text-align: right;
         font-style: normal;
         text-transform: none;
-        margin-left: 2vw;
-        letter-spacing: 5px;
+        line-height: 1vh;
+        height: 1vh;
     }
 
-    .divContent {
-        background: url("@/assets/images/homeImages/contentBg.png") no-repeat;
-        background-size: 100% 100%;
-        width: 20vw;
-        height: 22vh;
+    .typeClass {
+        font-family: SourceHanSansCN-Regular, SourceHanSansCN-Regular;
+        font-weight: normal;
+        font-size: 14px;
+        color: #FFFFFE;
+        line-height: 1vh;
+        height: 1vh;
+        letter-spacing: 2px;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
     }
 
-}
-
-.countDiv {
-    width: 8vw;
-    height: 4vh;
-    background-color: #375785;
-}
-
-.countClass {
-    font-family: Source Han Sans CN, Source Han Sans CN;
-    font-weight: bold;
-    font-size: 18px;
-    letter-spacing: 5px;
-    text-align: right;
-    font-style: normal;
-    text-transform: none;
-    line-height: 1vh;
-    height: 1vh;
-}
-
-.typeClass {
-    font-family: SourceHanSansCN-Regular, SourceHanSansCN-Regular;
-    font-weight: normal;
-    font-size: 14px;
-    color: #FFFFFE;
-    line-height: 1vh;
-    height: 1vh;
-    letter-spacing: 2px;
-    text-align: left;
-    font-style: normal;
-    text-transform: none;
-}
-
-.stationkeyClass {
-    font-family: Source Han Sans CN, Source Han Sans CN;
-    font-weight: 400;
-    font-size: 14px;
-    color: #000000;
-    line-height: 1vh;
-    height: 1vh;
-    text-align: left;
-    font-style: normal;
-    text-transform: none;
-}
+    .stationkeyClass {
+        font-family: Source Han Sans CN, Source Han Sans CN;
+        font-weight: 400;
+        font-size: 14px;
+        color: #000000;
+        line-height: 1vh;
+        height: 1vh;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+    }
 
-.stationvalueClass {
-    font-family: Source Han Sans CN, Source Han Sans CN;
-    font-weight: bold;
-    font-size: 24px;
-    color: #000000;
-    line-height: 11px;
-    text-align: right;
-    font-style: normal;
-    text-transform: none;
-}
+    .stationvalueClass {
+        font-family: Source Han Sans CN, Source Han Sans CN;
+        font-weight: bold;
+        font-size: 24px;
+        color: #000000;
+        line-height: 11px;
+        text-align: right;
+        font-style: normal;
+        text-transform: none;
+    }
 
-.stationunitClass {
-    font-family: Source Han Sans CN, Source Han Sans CN;
-    font-weight: 400;
-    font-size: 12px;
-    color: #000000;
-    line-height: 11px;
-    text-align: left;
-    font-style: normal;
-    text-transform: none;
-}
+    .stationunitClass {
+        font-family: Source Han Sans CN, Source Han Sans CN;
+        font-weight: 400;
+        font-size: 12px;
+        color: #000000;
+        line-height: 11px;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+    }
 
-.imageDiv {
-    width: 9vw;
-    margin-top: 1vh;
-}
+    .imageDiv {
+        width: 9vw;
+        margin-top: 1vh;
+    }
 </style>

+ 1 - 1
src/components/HomeComponents/warnTable.vue

@@ -2,7 +2,7 @@
     <div class="warnPageClass">
         <div class="messagePageClass">
             <div class="titleBg">
-                <div class="titleFont">车辆报警</div>
+                <div class="titleFont">设备报警</div>
             </div>
             <div class="divContent">
                 <div style="padding-left: 1vw;max-height: 30vh;overflow-y: scroll;" class="tableClass">

+ 1 - 1
src/components/HomeStatics/messageTable.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="countPageClass" style="padding-left: 1vw;padding-top: 1.5vh;padding-right: 2vw;">
         <div> 
-            <div class="title" style="padding-left: 0.5vw;">车辆报警</div>
+            <div class="title" style="padding-left: 0.5vw;">设备报警</div>
             <div style="margin-left: 1vw;max-height: 20vh;overflow-y: scroll;" class="tableClass">
                 <div v-for="(item, index) in messageList">
                     <div style="display: flex;flex-direction: row;justify-content: space-around;margin-top: 20px;">

+ 1 - 1
src/components/HomeStatics/pieEcharts.vue

@@ -62,7 +62,7 @@ const initData = async () => {
         }
         dataList.value.push(cObj)
     }
-    dataList.value.push({ name: '其它', value: total, label: label, labelLine: labelLine });
+    // dataList.value.push({ name: '其它', value: total, label: label, labelLine: labelLine });
     drawEchart();
 }
 

+ 3 - 3
src/views/miniprogram/index.vue

@@ -276,9 +276,9 @@ const handleUpdate = async (row?: MiniprogramVO) => {
 
 /** 提交按钮 */
 const submitForm = () => {
-  form.value.status = 1
-  form.value.ext1 = 1
-  form.value.ext2 = 1
+  // form.value.status = 1
+  // form.value.ext1 = 1
+  // form.value.ext2 = 1
   form.value.logo = JSON.stringify(fileData.value)
   miniprogramFormRef.value?.validate(async (valid: boolean) => {
     if (valid) {

+ 2 - 0
src/views/order/goodsOrder.vue

@@ -264,6 +264,8 @@ const getList = async () => {
     console.log(userRes)
     console.log(carPathRes)
     loading.value = true;
+    queryParams.value.orderByColumn = 'create_time'
+    queryParams.value.isAsc = 'desc'
     const res = await listGoodsOrder(queryParams.value);
     goodsOrderList.value = res.rows;
     total.value = res.total;

+ 362 - 0
src/views/order/taxiOrder.vue

@@ -0,0 +1,362 @@
+<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">
+                <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
+                    <el-form-item label="订单号" prop="orderId">
+                        <el-input v-model="queryParams.orderId" placeholder="请输入订单号" clearable style="width: 240px"
+                            @keyup.enter="handleQuery" />
+                    </el-form-item>
+                    <el-form-item label="乘客" prop="fromUserId">
+                        <el-input v-model="queryParams.fromUserId" placeholder="请输入乘客" clearable style="width: 240px"
+                            @keyup.enter="handleQuery" />
+                    </el-form-item>
+                    <el-form-item label="司机" prop="toUserId">
+                        <el-input v-model="queryParams.toUserId" placeholder="请输入司机" clearable style="width: 240px"
+                            @keyup.enter="handleQuery" />
+                    </el-form-item>
+                    <el-form-item label="出发地" prop="fromAddr">
+                        <el-input v-model="queryParams.fromAddr" placeholder="请输入出发地" clearable style="width: 240px"
+                            @keyup.enter="handleQuery" />
+                    </el-form-item>
+                    <el-form-item label="出发时间" prop="gotime">
+                        <el-date-picker clearable v-model="queryParams.gotime" type="date" value-format="YYYY-MM-DD"
+                            placeholder="请选择出发时间" />
+                    </el-form-item>
+                    <el-form-item label="乘车人数" prop="peoNum">
+                        <el-input v-model="queryParams.peoNum" placeholder="请输入乘车人数" clearable style="width: 240px"
+                            @keyup.enter="handleQuery" />
+                    </el-form-item>
+                    <el-form-item label="目的地" prop="toAddr">
+                        <el-input v-model="queryParams.toAddr" placeholder="请输入目的地" clearable style="width: 240px"
+                            @keyup.enter="handleQuery" />
+                    </el-form-item>
+                    <el-form-item>
+                        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+                        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+                    </el-form-item>
+                </el-form>
+            </div>
+        </transition>
+
+        <el-card shadow="never">
+            <!-- <template #header>
+                <el-row :gutter="10" class="mb8">
+                    <el-col :span="1.5">
+                        <el-button type="primary" plain icon="Plus" @click="handleAdd"
+                            v-hasPermi="['system:taxiOrder:add']">新增</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
+                            v-hasPermi="['system:taxiOrder:edit']">修改</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
+                            v-hasPermi="['system:taxiOrder:remove']">删除</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button type="warning" plain icon="Download" @click="handleExport"
+                            v-hasPermi="['system:taxiOrder:export']">导出</el-button>
+                    </el-col>
+                    <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+                </el-row>
+            </template> -->
+
+            <el-table v-loading="loading" :data="taxiOrderList" @selection-change="handleSelectionChange">
+                <el-table-column type="selection" width="55" align="center" />
+                <el-table-column label="编号" align="center" prop="id" v-if="true" />
+                <el-table-column label="订单号" align="center" prop="orderId" />
+                <!-- <el-table-column label="乘客" align="center" prop="fromUserId" /> -->
+                <!-- <el-table-column label="司机" align="center" prop="toUserId" /> -->
+                <el-table-column label="乘客" align="center" prop="fromUserId" width="180">
+                    <template #default="scope">
+                        <span>{{ getUserName(scope.row.fromUserId) }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="司机" align="center" prop="toUserId" width="180">
+                    <template #default="scope">
+                        <span>{{ getUserName(scope.row.toUserId) }}</span>
+                    </template>
+                </el-table-column>
+                <!-- <el-table-column label="0-待接单 1-已接单 2-取消 3-完成" align="center" prop="status" /> -->
+                <el-table-column label="状态" align="center" prop="status" width="180">
+                    <template #default="scope">
+                        <span>{{ getStatusName(scope.row.status) }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="出发地" align="center" prop="fromAddr" />
+                <el-table-column label="出发时间" align="center" prop="gotime" width="180">
+                    <template #default="scope">
+                        <span>{{ parseTime(scope.row.gotime, '{y}-{m}-{d}') }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="乘车人数" align="center" prop="peoNum" />
+                <el-table-column label="目的地" align="center" prop="toAddr" />
+                <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                    <template #default="scope">
+                        <el-tooltip content="删除" placement="top">
+                            <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
+                                v-hasPermi="['system:taxiOrder:remove']"></el-button>
+                        </el-tooltip>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <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="500px" append-to-body>
+            <el-form ref="taxiOrderFormRef" :model="form" :rules="rules" label-width="80px">
+                <el-form-item label="订单号" prop="orderId">
+                    <el-input v-model="form.orderId" placeholder="请输入订单号" />
+                </el-form-item>
+                <el-form-item label="乘客" prop="fromUserId">
+                    <el-input v-model="form.fromUserId" placeholder="请输入乘客" />
+                </el-form-item>
+                <el-form-item label="司机" prop="toUserId">
+                    <el-input v-model="form.toUserId" placeholder="请输入司机" />
+                </el-form-item>
+                <el-form-item label="出发地" prop="fromAddr">
+                    <el-input v-model="form.fromAddr" placeholder="请输入出发地" />
+                </el-form-item>
+                <el-form-item label="出发时间" prop="gotime">
+                    <el-date-picker clearable v-model="form.gotime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
+                        placeholder="请选择出发时间">
+                    </el-date-picker>
+                </el-form-item>
+                <el-form-item label="乘车人数" prop="peoNum">
+                    <el-input v-model="form.peoNum" placeholder="请输入乘车人数" />
+                </el-form-item>
+                <el-form-item label="目的地" prop="toAddr">
+                    <el-input v-model="form.toAddr" placeholder="请输入目的地" />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <div class="dialog-footer">
+                    <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
+                    <el-button @click="cancel">取 消</el-button>
+                </div>
+            </template>
+        </el-dialog>
+    </div>
+</template>
+
+<script setup name="TaxiOrder" lang="ts">
+    import api from "@/api/system/user"
+    import { listTaxiOrder, getTaxiOrder, delTaxiOrder, addTaxiOrder, updateTaxiOrder } from '@/api/taxiOrder';
+    import { TaxiOrderVO, TaxiOrderQuery, TaxiOrderForm } from '@/api/taxiOrder/types';
+
+    const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+
+    const taxiOrderList = ref < TaxiOrderVO[] > ([]);
+    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 userList = ref([])
+
+    const queryFormRef = ref < ElFormInstance > ();
+    const taxiOrderFormRef = ref < ElFormInstance > ();
+
+    const dialog = reactive < DialogOption > ({
+        visible: false,
+        title: ''
+    });
+
+    const initFormData: TaxiOrderForm = {
+        id: undefined,
+        orderId: undefined,
+        fromUserId: undefined,
+        toUserId: undefined,
+        status: undefined,
+        fromAddr: undefined,
+        gotime: undefined,
+        peoNum: undefined,
+        toAddr: undefined,
+        ext1: undefined,
+        ext2: undefined,
+    }
+    const data = reactive < PageData < TaxiOrderForm, TaxiOrderQuery>> ({
+        form: { ...initFormData },
+        queryParams: {
+            pageNum: 1,
+            pageSize: 10,
+            orderId: undefined,
+            fromUserId: undefined,
+            toUserId: undefined,
+            status: undefined,
+            fromAddr: undefined,
+            gotime: undefined,
+            peoNum: undefined,
+            toAddr: undefined,
+            ext1: undefined,
+            ext2: undefined,
+            params: {
+            }
+        },
+        rules: {
+            id: [
+                { required: true, message: "编号不能为空", trigger: "blur" }
+            ],
+            orderId: [
+                { required: true, message: "订单号不能为空", trigger: "blur" }
+            ],
+            fromUserId: [
+                { required: true, message: "乘客不能为空", trigger: "blur" }
+            ],
+            toUserId: [
+                { required: true, message: "司机不能为空", trigger: "blur" }
+            ],
+            status: [
+                { required: true, message: "0-待接单 1-已接单 2-取消 3-完成不能为空", trigger: "change" }
+            ],
+            fromAddr: [
+                { required: true, message: "出发地不能为空", trigger: "blur" }
+            ],
+            gotime: [
+                { required: true, message: "出发时间不能为空", trigger: "blur" }
+            ],
+            peoNum: [
+                { required: true, message: "乘车人数不能为空", trigger: "blur" }
+            ],
+            toAddr: [
+                { 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 getList = async () => {
+        loading.value = true;
+        queryParams.value.orderByColumn = 'create_time'
+        queryParams.value.isAsc = 'desc'
+        const res = await listTaxiOrder(queryParams.value);
+        taxiOrderList.value = res.rows;
+        total.value = res.total;
+        loading.value = false;
+    }
+
+    /** 取消按钮 */
+    const cancel = () => {
+        reset();
+        dialog.visible = false;
+    }
+
+    /** 表单重置 */
+    const reset = () => {
+        form.value = { ...initFormData };
+        taxiOrderFormRef.value?.resetFields();
+    }
+
+    /** 搜索按钮操作 */
+    const handleQuery = () => {
+        queryParams.value.pageNum = 1;
+        getList();
+    }
+
+    /** 重置按钮操作 */
+    const resetQuery = () => {
+        queryFormRef.value?.resetFields();
+        handleQuery();
+    }
+
+    /** 多选框选中数据 */
+    const handleSelectionChange = (selection: TaxiOrderVO[]) => {
+        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?: TaxiOrderVO) => {
+        reset();
+        const _id = row?.id || ids.value[0]
+        const res = await getTaxiOrder(_id);
+        Object.assign(form.value, res.data);
+        dialog.visible = true;
+        dialog.title = "修改打车订单";
+    }
+
+    /** 提交按钮 */
+    const submitForm = () => {
+        taxiOrderFormRef.value?.validate(async (valid: boolean) => {
+            if (valid) {
+                buttonLoading.value = true;
+                if (form.value.id) {
+                    await updateTaxiOrder(form.value).finally(() => buttonLoading.value = false);
+                } else {
+                    await addTaxiOrder(form.value).finally(() => buttonLoading.value = false);
+                }
+                proxy?.$modal.msgSuccess("修改成功");
+                dialog.visible = false;
+                await getList();
+            }
+        });
+    }
+
+    /** 删除按钮操作 */
+    const handleDelete = async (row?: TaxiOrderVO) => {
+        const _ids = row?.id || ids.value;
+        await proxy?.$modal.confirm('是否确认删除打车订单编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
+        await delTaxiOrder(_ids);
+        proxy?.$modal.msgSuccess("删除成功");
+        await getList();
+    }
+
+    /** 导出按钮操作 */
+    const handleExport = () => {
+        proxy?.download('system/taxiOrder/export', {
+            ...queryParams.value
+        }, `taxiOrder_${new Date().getTime()}.xlsx`)
+    }
+
+    const getUserName = (id) => {
+        for (var index in userList.value) {
+            if (userList.value[index].userId == id) {
+                return userList.value[index].nickName
+            }
+        }
+    }
+
+    const initData = async () => {
+        const userRes = await api.listUser({ pageSize: 1000 });
+        userList.value = userRes.rows
+        getList();
+    }
+
+    const getStatusName = (index) => {
+        if (index == 0) {
+            return '待接单'
+        } else if (index == 1) {
+            return '已接单'
+        } else if (index == 2) {
+            return '取消'
+        } else if (index == 3) {
+            return '完成'
+        }
+    }
+
+    onMounted(() => {
+        initData();
+    });
+</script>

+ 2 - 2
src/views/statics/passengerFlow.vue

@@ -22,7 +22,7 @@
                                         </el-select>
                                     </el-form-item>
                                     <el-form-item label="时间" prop="carNum">
-                                        <el-date-picker v-model="dataValue" type="daterange" :shortcuts="shortcuts"
+                                        <el-date-picker v-model="dataValue" type="datetimerange" :shortcuts="shortcuts"
                                             range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
                                     </el-form-item>
                                 </el-form>
@@ -65,7 +65,7 @@
                                         </el-select>
                                     </el-form-item>
                                     <el-form-item label="时间" prop="carNum">
-                                        <el-date-picker v-model="dataValue2" type="daterange" :shortcuts="shortcuts"
+                                        <el-date-picker v-model="dataValue2" type="datetimerange" :shortcuts="shortcuts"
                                             range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
                                     </el-form-item>
                                 </el-form>

+ 14 - 6
src/views/yunying/kdg/index.vue

@@ -55,7 +55,7 @@
           <!-- <el-button v-if="tableData.length > 0 && tableData.length < 4" type="primary"
             style="position: absolute;right: 20px;" @click="goAdd">添加设备</el-button> -->
         </div>
-        <div style="margin-top: 10vh;">
+        <div style="margin-top: 10vh;"  v-if="showKdg">
           <div v-if="type == 1">
             <div style="display: flex;flex-direction: row;justify-content: center;">
               <div style="width: 9vw;border:0.5vw solid #000;">
@@ -389,6 +389,7 @@
 
   const boxData = ref([])
   const boxCode = ref(null)
+  const showKdg = ref(false)
 
 
   const formdata = ref({
@@ -619,8 +620,10 @@
   }
 
   const getBoxInfoData = (code) => {
+    showKdg.value = false
     getBoxInfo(code).then(res => {
       boxData.value = res.data.list
+      showKdg.value = true
       console.log(boxData.value)
     })
   }
@@ -693,12 +696,17 @@
   }
 
   const getStatus = (index) => {
-    console.log(boxData.value[index - 1].box_use_status)
-    if (boxData.value[index - 1].box_use_status == 0) {
-      return '空闲中'
-    } else {
-      return '使用中'
+    console.log(boxData.value.length)
+    if (index - 1 < boxData.value.length) {
+      if (boxData.value[index - 1].box_use_status == 0) {
+        return '空闲中'
+      } else {
+        return '使用中'
+      }
+    }else{
+      return '暂无'
     }
+
   }
 
   const data = computed(() => {