<template> <div class="checkOrder"> <div class="subtitle">工单查询</div> <el-divider /> <el-row class="chooseBox"> <el-col :span="7" class="flex flex-align-center chooseTime"> <span class="title">登记时间</span> <el-date-picker v-model="dateRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" /> </el-col> <el-col :span="5" class="flex flex-align-center chooseType"> <span class="title">工单类型</span> <el-select v-model="value" placeholder="请选择" style="width: 240px"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> </el-select> </el-col> <el-col :span="6"> <el-button type="primary">查询</el-button> <el-button type="primary" icon="Download">导出</el-button> </el-col> </el-row> <el-table :data="tableData" style="width: 100%" v-setHeight="{ bottom: 80 }"> <el-table-column type="index" label="序号" width="50" /> <el-table-column prop="code" label="工单编号" /> <el-table-column prop="date" label="登记时间" /> <el-table-column prop="type" label="工单类型" /> <el-table-column prop="ly" label="工单来源" /> <el-table-column prop="info" label="信息" /> <el-table-column prop="state" label="工单状态" /> <el-table-column label="操作"> <template #default="{ row }"> <div style="display: flex; justify-content: space-evenly"> <!-- <el-button link type="primary" icon="Edit" @click="addArea(row)">编辑</el-button> <el-button link type="danger" icon="Delete" @click="deleteArea(row)">删除</el-button> --> <el-button link type="primary">受理</el-button> </div> </template> </el-table-column> </el-table> <pagination class="pagingPosition" v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> </div> </template> <script setup name="checkOrder"> import { onMounted } from 'vue'; const { proxy } = getCurrentInstance(); const total = ref(0); const queryParams = ref({ pageNum: 1, pageSize: 10, }); const dateRange = ref([ proxy.moment().subtract(3, 'days').format('YYYY-MM-DD 00:00:00'), proxy.moment().format('YYYY-MM-DD 23:59:59'), ]); const value = ref(''); const options = [ { value: 'Option1', label: '燃气工单', }, { value: 'Option2', label: '排水工单', }, { value: 'Option3', label: '桥梁工单', }, { value: 'Option4', label: '隧道工单', }, ]; const tableData = ref([ { code: 'GD2024102900001', date: '2024-05-03 12:00:00', type: '燃气工单', ly: 'APP', info: '', state: '待受理', }, { code: 'GD2024102900002', date: '2024-05-03 12:00:00', type: '排水工单', ly: '电话', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, { code: 'GD2024102900003', date: '2024-05-03 12:00:00', type: '排水工单', ly: '指挥调度', info: '', state: '待受理', }, ]); const getList = () => { total.value = tableData.value.length; }; onMounted(() => { getList(); }); </script> <style lang="scss" scoped> .checkOrder { position: relative; width: 100%; height: 100%; .subtitle { font-weight: bold; font-size: 17px; color: #333333; } .chooseBox { // padding: 20px 0; margin-bottom: 15px; } .chooseType { margin-left: 20px; } .title { font-weight: 500; font-size: 14px; color: #333333; margin-right: 10px; } } .el-divider { margin: 10px 0 15px 0; } .pagingPosition { position: absolute; right: 0px; bottom: 0px; margin-bottom: 10px; } </style>