Commit 3a100eefc3de52d4b4f37d469075cf2c055b1b2d
1 parent
6fa418e4
临港二期
Showing
7 changed files
with
1024 additions
and
17 deletions
src/api/refresh/page.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +export function refreshScheduling() { | ||
| 5 | + | ||
| 6 | + return request({ | ||
| 7 | + url: '/refresh/scheduling', | ||
| 8 | + method: 'get', | ||
| 9 | + refreshTip:false | ||
| 10 | + }) | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +export function refreshKeyInfoLocal() { | ||
| 14 | + | ||
| 15 | + return request({ | ||
| 16 | + url: '/refresh/key/info/local', | ||
| 17 | + method: 'get', | ||
| 18 | + refreshTip:false | ||
| 19 | + }) | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +export function refreshDriver() { | ||
| 24 | + | ||
| 25 | + return request({ | ||
| 26 | + url: '/refresh/driver', | ||
| 27 | + method: 'get', | ||
| 28 | + refreshTip:false | ||
| 29 | + }) | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | + | ||
| 33 | +export function refreshDriverImageByJob(imagePath,device) { | ||
| 34 | + | ||
| 35 | + let url = '/refresh/driver/init/image?imagePath='+imagePath+"&device="+device; | ||
| 36 | + return request({ | ||
| 37 | + url: url, | ||
| 38 | + method: 'post', | ||
| 39 | + refreshTip:false | ||
| 40 | + }) | ||
| 41 | +} | ||
| 42 | + | ||
| 43 | + | ||
| 44 | +export function refreshDriverImageByName(imagePath,device) { | ||
| 45 | + let url = '/refresh/driver/init/image/name?imagePath='+imagePath+"&device="+device; | ||
| 46 | + return request({ | ||
| 47 | + url: url, | ||
| 48 | + method: 'post', | ||
| 49 | + refreshTip:false | ||
| 50 | + }) | ||
| 51 | +} | ||
| 0 | \ No newline at end of file | 52 | \ No newline at end of file |
src/api/scheduling/keyWorkLocation/keyWorkLocation.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +// 分页查询列表 | ||
| 5 | +export function listLimitOfLinggangKeyWorkLocation(params,page,limit) { | ||
| 6 | + console.log("page------------------------->"+page); | ||
| 7 | + | ||
| 8 | + return request({ | ||
| 9 | + url: '/linggang/key/work/location/list/limit/'+page+'/'+limit, | ||
| 10 | + method: 'post', | ||
| 11 | + refreshTip:false, | ||
| 12 | + params | ||
| 13 | + }) | ||
| 14 | +} | ||
| 15 | + | ||
| 16 | +// 选择列表 | ||
| 17 | +export function selectListOfLinggangKeyWorkLocation(params) { | ||
| 18 | + return request({ | ||
| 19 | + url: '/linggang/key/work/location/list/select', | ||
| 20 | + method: 'post', | ||
| 21 | + params | ||
| 22 | + }) | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +// 导出报表列表 | ||
| 26 | +export function exportReportList(params) { | ||
| 27 | + return request({ | ||
| 28 | + url: '/linggang/key/work/location/export', | ||
| 29 | + method: 'get', | ||
| 30 | + params | ||
| 31 | + }) | ||
| 32 | +} | ||
| 33 | + | ||
| 34 | +//查询列表详情 | ||
| 35 | +export function viewOfLinggangKeyWorkLocation(id) { | ||
| 36 | + return request({ | ||
| 37 | + url: '/linggang/key/work/location/view/'+id, | ||
| 38 | + method: 'get' | ||
| 39 | + }) | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +// 添加数据 | ||
| 43 | +export function addOfLinggangKeyWorkLocation(params) { | ||
| 44 | + return request({ | ||
| 45 | + url: '/linggang/key/work/location/add', | ||
| 46 | + method: 'post', | ||
| 47 | + params | ||
| 48 | + }) | ||
| 49 | +} | ||
| 50 | + | ||
| 51 | +//修改数据 | ||
| 52 | +export function updateOfLinggangKeyWorkLocation(params) { | ||
| 53 | + return request({ | ||
| 54 | + url: "/linggang/key/work/location/update", | ||
| 55 | + method: "post", | ||
| 56 | + params | ||
| 57 | + }) | ||
| 58 | +} | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + //修改状态 | ||
| 62 | +export function updateStatusOfLinggangKeyWorkLocation(params) { | ||
| 63 | + return request({ | ||
| 64 | + url: "/linggang/key/work/location/update/status", | ||
| 65 | + method: "post", | ||
| 66 | + params | ||
| 67 | + }) | ||
| 68 | +} | ||
| 69 | + | ||
| 70 | + //删除数据 | ||
| 71 | +export function deleteOfLinggangKeyWorkLocation(id) { | ||
| 72 | + return request({ | ||
| 73 | + url: "/linggang/key/work/location/del/"+id, | ||
| 74 | + method: "get" | ||
| 75 | + }) | ||
| 76 | +} |
src/api/scheduling/linggangScheduling.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +// 分页查询列表 | ||
| 5 | +export function listLimitOfLinggangScheduling(params,page,limit) { | ||
| 6 | + return request({ | ||
| 7 | + url: '/linggang/scheduling/list/limit/'+page+'/'+limit, | ||
| 8 | + method: 'post', | ||
| 9 | + refreshTip:false, | ||
| 10 | + params | ||
| 11 | + }) | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +// 选择列表 | ||
| 15 | +export function selectListOfLinggangScheduling(params) { | ||
| 16 | + return request({ | ||
| 17 | + url: '/linggang/scheduling/list/select', | ||
| 18 | + method: 'post', | ||
| 19 | + params | ||
| 20 | + }) | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +// 导出报表列表 | ||
| 24 | +export function exportReportList(params) { | ||
| 25 | + return request({ | ||
| 26 | + url: '/linggang/scheduling/export', | ||
| 27 | + method: 'get', | ||
| 28 | + params | ||
| 29 | + }) | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +//查询列表详情 | ||
| 33 | +export function viewOfLinggangScheduling(id) { | ||
| 34 | + return request({ | ||
| 35 | + url: '/linggang/scheduling/view/'+id, | ||
| 36 | + method: 'get' | ||
| 37 | + }) | ||
| 38 | +} | ||
| 39 | + | ||
| 40 | +// 添加数据 | ||
| 41 | +export function addOfLinggangScheduling(params) { | ||
| 42 | + return request({ | ||
| 43 | + url: '/linggang/scheduling/add', | ||
| 44 | + method: 'post', | ||
| 45 | + params | ||
| 46 | + }) | ||
| 47 | +} | ||
| 48 | + | ||
| 49 | +//修改数据 | ||
| 50 | +export function updateOfLinggangScheduling(params) { | ||
| 51 | + return request({ | ||
| 52 | + url: "/linggang/scheduling/update", | ||
| 53 | + method: "post", | ||
| 54 | + params | ||
| 55 | + }) | ||
| 56 | +} | ||
| 57 | + | ||
| 58 | + | ||
| 59 | + //修改状态 | ||
| 60 | +export function updateStatusOfLinggangScheduling(params) { | ||
| 61 | + return request({ | ||
| 62 | + url: "/linggang/scheduling/update/status", | ||
| 63 | + method: "post", | ||
| 64 | + params | ||
| 65 | + }) | ||
| 66 | +} | ||
| 67 | + | ||
| 68 | + //删除数据 | ||
| 69 | +export function deleteOfLinggangScheduling(id) { | ||
| 70 | + return request({ | ||
| 71 | + url: "/linggang/scheduling/del/"+id, | ||
| 72 | + method: "get" | ||
| 73 | + }) | ||
| 74 | +} |
src/views/in/in/index.vue
| @@ -63,7 +63,14 @@ | @@ -63,7 +63,14 @@ | ||
| 63 | <!-- <el-table-column label="签到设备" v-show="false" align="center" prop="deviceId" width="130" /> --> | 63 | <!-- <el-table-column label="签到设备" v-show="false" align="center" prop="deviceId" width="130" /> --> |
| 64 | <el-table-column label="图片" align="center" prop="image"> | 64 | <el-table-column label="图片" align="center" prop="image"> |
| 65 | <template #default="scope"> | 65 | <template #default="scope"> |
| 66 | - <image-preview :src="scope.row.image" :width="50" :height="50" /> | 66 | + <view v-if="!isEmpty(scope.row.image)"> |
| 67 | + <image-preview :src="scope.row.image" :width="50" :height="50" /> | ||
| 68 | + </view> | ||
| 69 | + | ||
| 70 | + <view v-else> | ||
| 71 | + <img src="" /> | ||
| 72 | + </view> | ||
| 73 | + | ||
| 67 | </template> | 74 | </template> |
| 68 | </el-table-column> | 75 | </el-table-column> |
| 69 | <el-table-column label="打卡结果" align="center" prop="status"> | 76 | <el-table-column label="打卡结果" align="center" prop="status"> |
| @@ -85,12 +92,20 @@ | @@ -85,12 +92,20 @@ | ||
| 85 | <el-table-column label="备注" align="center" prop="remark" width="300" /> | 92 | <el-table-column label="备注" align="center" prop="remark" width="300" /> |
| 86 | <el-table-column label="打卡场地" align="center" prop="siteName" width="130" /> | 93 | <el-table-column label="打卡场地" align="center" prop="siteName" width="130" /> |
| 87 | <el-table-column label="打卡时间" align="center" prop="createTime" width="160" /> | 94 | <el-table-column label="打卡时间" align="center" prop="createTime" width="160" /> |
| 88 | - <el-table-column label="打卡操作" align="center" prop="singnIn" width="320"> | 95 | + |
| 96 | + <el-table-column label="打卡操作" align="center" prop="singnIn" width="120"> | ||
| 89 | <template #default="scope"> | 97 | <template #default="scope"> |
| 90 | <view><dict-tag :options="sys_status" :value="scope.row.singnIn ? scope.row.singnIn.split(',') : []" /></view> | 98 | <view><dict-tag :options="sys_status" :value="scope.row.singnIn ? scope.row.singnIn.split(',') : []" /></view> |
| 91 | - <view><button @click="openVideoDialog(scope.row)" v-if="displayViedeo(scope.row)">视频</button></view> | ||
| 92 | </template> | 99 | </template> |
| 93 | </el-table-column> | 100 | </el-table-column> |
| 101 | + | ||
| 102 | + <el-table-column label="操作" align="center" width="100"> | ||
| 103 | + <template #default="scope"> | ||
| 104 | + <el-button type="primary" @click="openVideoDialog(scope.row)" v-if="displayViedeo(scope.row)">查看视频</el-button> | ||
| 105 | + </template> | ||
| 106 | + </el-table-column> | ||
| 107 | + | ||
| 108 | + | ||
| 94 | </el-table> | 109 | </el-table> |
| 95 | 110 | ||
| 96 | <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" | 111 | <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" |
| @@ -142,22 +157,23 @@ | @@ -142,22 +157,23 @@ | ||
| 142 | </div> | 157 | </div> |
| 143 | </template> | 158 | </template> |
| 144 | </el-dialog> | 159 | </el-dialog> |
| 145 | - </div> | ||
| 146 | 160 | ||
| 147 | - <div> | ||
| 148 | - <el-dialog title="查看签到视频" v-model="videoURLOpen" width="1200px"> | ||
| 149 | - <view v-html="videoHTMl" style="width: 900px; height: 800px;text-align: center;"></view> | ||
| 150 | - </el-dialog> | 161 | + <el-dialog title="查看签到视频" v-model="videoURLOpen" width="1200px"> |
| 162 | + <view v-html="videoHTMl" style="width: 900px; height: 800px;text-align: center;"></view> | ||
| 163 | + </el-dialog> | ||
| 164 | + | ||
| 151 | </div> | 165 | </div> |
| 166 | + | ||
| 167 | + | ||
| 152 | </template> | 168 | </template> |
| 153 | 169 | ||
| 154 | -<script setup name="In"> | 170 | +<script setup> |
| 155 | import { getPeopleInfo } from '@/api/attendance/attendance'; | 171 | import { getPeopleInfo } from '@/api/attendance/attendance'; |
| 156 | import { getEquipmentAll, getEquipmentSiteName } from "@/api/equipment/equipment"; | 172 | import { getEquipmentAll, getEquipmentSiteName } from "@/api/equipment/equipment"; |
| 157 | import { delIn, getIn, listIn, supplementarySignature } from "@/api/in/in"; | 173 | import { delIn, getIn, listIn, supplementarySignature } from "@/api/in/in"; |
| 158 | import { getReportDetail } from "@/api/report/report.js"; | 174 | import { getReportDetail } from "@/api/report/report.js"; |
| 159 | import moment from "moment"; | 175 | import moment from "moment"; |
| 160 | -import { computed, ref, watch } from "vue"; | 176 | +import { computed, ref, watch,onMounted,onBeforeMount } from "vue"; |
| 161 | const { proxy } = getCurrentInstance(); | 177 | const { proxy } = getCurrentInstance(); |
| 162 | const { sys_status, sign_type, sign_in, alcohol } = proxy.useDict('sys_status', 'sign_type', 'sign_in', 'alcohol'); | 178 | const { sys_status, sign_type, sign_in, alcohol } = proxy.useDict('sys_status', 'sign_type', 'sign_in', 'alcohol'); |
| 163 | const siteNameList = ref([]) | 179 | const siteNameList = ref([]) |
| @@ -231,12 +247,18 @@ onDeactivated(() => { | @@ -231,12 +247,18 @@ onDeactivated(() => { | ||
| 231 | clearInterval(timer.value) | 247 | clearInterval(timer.value) |
| 232 | }) | 248 | }) |
| 233 | onBeforeUnmount(() => { | 249 | onBeforeUnmount(() => { |
| 234 | - clearInterval(timer.value) | 250 | + clearInterval(timer.value); |
| 251 | + console.log(timer.value); | ||
| 252 | + | ||
| 253 | +}) | ||
| 254 | +onBeforeMount(()=>{ | ||
| 255 | +}) | ||
| 256 | +onActivated(()=>{ | ||
| 235 | }) | 257 | }) |
| 236 | onMounted(() => { | 258 | onMounted(() => { |
| 237 | getEquipmentSiteName().then((res) => { | 259 | getEquipmentSiteName().then((res) => { |
| 238 | siteNameList.value = res.data | 260 | siteNameList.value = res.data |
| 239 | - }) | 261 | + }); |
| 240 | queryParams.value.date = moment().format("YYYY-MM-DD"); | 262 | queryParams.value.date = moment().format("YYYY-MM-DD"); |
| 241 | getList(); | 263 | getList(); |
| 242 | timer.value = setInterval(() => { | 264 | timer.value = setInterval(() => { |
| @@ -424,9 +446,9 @@ function displayViedeo(data){ | @@ -424,9 +446,9 @@ function displayViedeo(data){ | ||
| 424 | return null != data.videoURL && undefined != data.videoURL && '' != data.videoURL | 446 | return null != data.videoURL && undefined != data.videoURL && '' != data.videoURL |
| 425 | } | 447 | } |
| 426 | 448 | ||
| 427 | -watch(open, (val1, val2) => { | ||
| 428 | - if (!open.value) { | ||
| 429 | - dateOptions.value = [] | ||
| 430 | - } | ||
| 431 | -}) | 449 | +function isEmpty(val){ |
| 450 | + return null == val|| undefined == val || "" == val; | ||
| 451 | +} | ||
| 452 | + | ||
| 453 | +getList(); | ||
| 432 | </script> | 454 | </script> |
src/views/refresh/page.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + <div class="query-from"> | ||
| 4 | + | ||
| 5 | + <el-button @click="refreshSchedulingFun()">重新拉取排班</el-button> | ||
| 6 | + <el-button @click="refreshKeyInfoLocalFun()">重新计算钥匙存放信息</el-button> | ||
| 7 | + <el-button @click="refreshDriverFun()">重新拉取司机信息</el-button> | ||
| 8 | + <br /> | ||
| 9 | + <el-input style="width: 160px;" placeholder="请输入设备编号" clearable v-model="imagePath"/> | ||
| 10 | + <el-input style="width: 160px;" placeholder="请输入图片位置" v-model="device" clearable /> | ||
| 11 | + <el-button @click="refreshDriverImageByJobFun()">根据工号重新初始化司机图片信息</el-button> | ||
| 12 | + <el-button @click="refreshDriverImageByNameFun()">根据姓名重新初始化司机图片信息</el-button> | ||
| 13 | + </div> | ||
| 14 | + </div> | ||
| 15 | +</template> | ||
| 16 | + | ||
| 17 | + | ||
| 18 | +<script setup name="LinggangKeyWorkLocation"> | ||
| 19 | + import { refreshScheduling, refreshKeyInfoLocal, refreshDriver, refreshDriverImageByJob,refreshDriverImageByName } from "@/api/refresh/page"; | ||
| 20 | + const { proxy } = getCurrentInstance(); | ||
| 21 | + | ||
| 22 | + const imagePath=ref(); | ||
| 23 | + const device =ref("/data/lingang/images"); | ||
| 24 | + | ||
| 25 | + function refreshSchedulingFun(){ | ||
| 26 | + refreshScheduling().then(res=>{ | ||
| 27 | + if(res.code==200){ | ||
| 28 | + proxy.$modal.msgSuccess("重新拉取排班成功"); | ||
| 29 | + }else{ | ||
| 30 | + proxy.$modal.msgSuccess(res.msg); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + }) | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + function refreshKeyInfoLocalFun(){ | ||
| 37 | + refreshKeyInfoLocal().then(res=>{ | ||
| 38 | + if(res.code==200){ | ||
| 39 | + proxy.$modal.msgSuccess("重新计算钥匙存放信息成功"); | ||
| 40 | + }else{ | ||
| 41 | + proxy.$modal.msgSuccess(res.msg); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + }) | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + function refreshDriverFun(){ | ||
| 48 | + refreshDriver().then(res=>{ | ||
| 49 | + if(res.code==200){ | ||
| 50 | + proxy.$modal.msgSuccess("重新拉取司机信息成功"); | ||
| 51 | + }else{ | ||
| 52 | + proxy.$modal.msgSuccess(res.msg); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + }) | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + function refreshDriverImageByJobFun(){ | ||
| 59 | + refreshDriverImageByJob(imagePath.value,device.value).then(res=>{ | ||
| 60 | + if(res.code==200){ | ||
| 61 | + proxy.$modal.msgSuccess("根据工号重新初始化司机图片信息成功"); | ||
| 62 | + }else{ | ||
| 63 | + proxy.$modal.msgSuccess(res.msg); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + }) | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + function refreshDriverImageByNameFun(){ | ||
| 70 | + refreshDriverImageByName().then(res=>{ | ||
| 71 | + if(res.code==200){ | ||
| 72 | + proxy.$modal.msgSuccess("根据姓名重新初始化司机图片信息成功"); | ||
| 73 | + }else{ | ||
| 74 | + proxy.$modal.msgSuccess(res.msg); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + }) | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | +</script> | ||
| 0 | \ No newline at end of file | 81 | \ No newline at end of file |
src/views/scheduling/keyWorkLocation/keyWorkLocation.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + <div class="query-from"> | ||
| 4 | + <el-form :inline="true" :model="queryParamsOfLinggangKeyWorkLocation" class="demo-form-inline"> | ||
| 5 | + | ||
| 6 | + <el-form-item label="车辆信息" props="请输入车辆信息"> | ||
| 7 | + <el-input style="width: 160px;" v-model="queryParamsOfLinggangKeyWorkLocation.nbbm" placeholder="车辆信息" clearable @keyup.enter="handleQueryOfLinggangKeyWorkLocation" /> | ||
| 8 | + </el-form-item> | ||
| 9 | + | ||
| 10 | + <el-form-item label="操作时间" props="请选择时间"> | ||
| 11 | + <el-date-picker style="width: 140px;" v-model="queryParamsOfLinggangKeyWorkLocation.time" type="date" align="right" unlink-panels | ||
| 12 | + format="YYYY/MM/DD" value-format="YYYY-MM-DD" @keyup.enter="handleQueryOfLinggangKeyWorkLocation"> | ||
| 13 | + </el-date-picker> | ||
| 14 | + </el-form-item> | ||
| 15 | + | ||
| 16 | + <el-form-item> | ||
| 17 | + <el-button type="primary" icon="Search" @click="handleQueryOfLinggangKeyWorkLocation">搜索</el-button> | ||
| 18 | + <el-button icon="Refresh" @click="resetQueryOfLinggangKeyWorkLocation">重置</el-button> | ||
| 19 | + </el-form-item> | ||
| 20 | + </el-form> | ||
| 21 | + </div> | ||
| 22 | + | ||
| 23 | + <el-table v-loading="loadingOfLinggangKeyWorkLocation" :data="listOfLinggangKeyWorkLocation" @selection-change="handleSelectionChangeOfLinggangKeyWorkLocation" border max-height="600" | ||
| 24 | + :default-expand-all="false" :row-class-name="tableRowClassName" @sort-change="sortChangeOfLinggangKeyWorkLocation"> | ||
| 25 | + <el-table-column type="selection" width="50" align="center" /> | ||
| 26 | + <el-table-column label="序号" type="index" width="60" align="center"> | ||
| 27 | + <template #default="scope"> | ||
| 28 | + {{ (queryParamsOfLinggangKeyWorkLocation.pageNum - 1) * queryParamsOfLinggangKeyWorkLocation.pageSize + scope.$index + 1 }} | ||
| 29 | + </template> | ||
| 30 | + </el-table-column> | ||
| 31 | + <el-table-column label="场站名称" align="center" prop="yardName" sortable /> | ||
| 32 | + <el-table-column label="设备号" align="center" prop="device" sortable /> | ||
| 33 | + <el-table-column label="车辆信息" align="center" prop="nbbm" /> | ||
| 34 | + <el-table-column label="操作人员" align="center" prop="jobCode" /> | ||
| 35 | + <el-table-column label="操作时间" align="center" prop="time" sortable /> | ||
| 36 | + <el-table-column label="操作类型" align="center" prop="eventType" sortable > | ||
| 37 | + <template #default="scope"> | ||
| 38 | + <view v-if="scope.row.eventType==16">管理员操作</view> | ||
| 39 | + <view v-else-if="scope.row.eventType==17">紧急操作</view> | ||
| 40 | + <view v-else>司机操作</view> | ||
| 41 | + </template> | ||
| 42 | + </el-table-column> | ||
| 43 | + <el-table-column label="存取状态" align="center" prop="type1" sortable > | ||
| 44 | + <template #default="scope"> | ||
| 45 | + <view v-if="scope.row.type1==0">归还</view> | ||
| 46 | + <view v-else-if="scope.row.type1==1">借出</view> | ||
| 47 | + <view v-else-if="scope.row.type1==2">初始状态</view> | ||
| 48 | + </template> | ||
| 49 | + </el-table-column> | ||
| 50 | + </el-table> | ||
| 51 | + | ||
| 52 | + <pagination v-show="totalOfLinggangKeyWorkLocation > 0" :total="totalOfLinggangKeyWorkLocation" v-model:page="queryParamsOfLinggangKeyWorkLocation.pageNum" v-model:limit="queryParamsOfLinggangKeyWorkLocation.pageSize" | ||
| 53 | + @pagination="getListOfLinggangKeyWorkLocation" @current-change=""/> | ||
| 54 | + | ||
| 55 | + | ||
| 56 | + </div> | ||
| 57 | +</template> | ||
| 58 | + | ||
| 59 | + | ||
| 60 | +<script setup name="LinggangKeyWorkLocation"> | ||
| 61 | + import { getDicts,getDictsDelFlag } from '@/api/system/dict/data'; | ||
| 62 | + import { listLimitOfLinggangKeyWorkLocation, viewOfLinggangKeyWorkLocation, addOfLinggangKeyWorkLocation, updateOfLinggangKeyWorkLocation,updateStatusOfLinggangKeyWorkLocation,deleteOfLinggangKeyWorkLocation } from "@/api/scheduling/keyWorkLocation/keyWorkLocation"; | ||
| 63 | + const { proxy } = getCurrentInstance(); | ||
| 64 | + | ||
| 65 | + const listOfLinggangKeyWorkLocation = ref([]); | ||
| 66 | + const openOfLinggangKeyWorkLocation = ref(false); | ||
| 67 | + const titleOfLinggangKeyWorkLocation = ref(""); | ||
| 68 | + const loadingOfLinggangKeyWorkLocation = ref(true); | ||
| 69 | + const showSearchOfLinggangKeyWorkLocation = ref(true); | ||
| 70 | + const idsOfLinggangKeyWorkLocation = ref([]); | ||
| 71 | + const singleLinggangKeyWorkLocation = ref(true); | ||
| 72 | + const multipleLinggangKeyWorkLocation = ref(true); | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + const pageOfLinggangKeyWorkLocation = ref(1) //第几页 | ||
| 76 | + const sizeOfLinggangKeyWorkLocation = ref(10) //一页多少条 | ||
| 77 | + const totalOfLinggangKeyWorkLocation = ref(0); | ||
| 78 | + const pageSizesOfLinggangKeyWorkLocation = [5, 10, 20, 50]; //每页显示多少条 | ||
| 79 | + const currentPageOfLinggangKeyWorkLocation = ref(1) // 当前页 | ||
| 80 | + const globalRowOfLinggangKeyWorkLocation = ref(null) // 当前行数据 | ||
| 81 | + | ||
| 82 | + const changeFlagOfLinggangKeyWorkLocation = ref(true) | ||
| 83 | + const deleteFlagsOfLinggangKeyWorkLocation = ref([]) | ||
| 84 | + | ||
| 85 | + const YardIds=ref([]); | ||
| 86 | + const KeyInfoIds=ref([]); | ||
| 87 | + const SchedulingIds=ref([]); | ||
| 88 | + | ||
| 89 | + const dataOfLinggangKeyWorkLocation = reactive({ | ||
| 90 | + formOfLinggangKeyWorkLocation: {}, | ||
| 91 | + queryParamsOfLinggangKeyWorkLocation: { | ||
| 92 | + pageNum: 1, | ||
| 93 | + pageSize: 10, | ||
| 94 | + id : null, | ||
| 95 | + yardId : null, | ||
| 96 | + yardName : null, | ||
| 97 | + device : null, | ||
| 98 | + cabinetNo : null, | ||
| 99 | + createBy : null, | ||
| 100 | + createTime : null, | ||
| 101 | + updateBy : null, | ||
| 102 | + updateTime : null, | ||
| 103 | + delFlag : null, | ||
| 104 | + eventType : null, | ||
| 105 | + keyInfoId : null, | ||
| 106 | + scheduleDate : null, | ||
| 107 | + schedulingId : null, | ||
| 108 | + type : null, | ||
| 109 | + type1 : null, | ||
| 110 | + time : null, | ||
| 111 | + nbbm :null, | ||
| 112 | + }, | ||
| 113 | + checkRulesOfLinggangKeyWorkLocation: { | ||
| 114 | + id : [ | ||
| 115 | + { required: true, message: "ID", trigger: "blur" } | ||
| 116 | + ], | ||
| 117 | + yardId : [ | ||
| 118 | + { required: true, message: "场站ID", trigger: "blur" } | ||
| 119 | + ], | ||
| 120 | + yardName : [ | ||
| 121 | + { required: true, message: "场站名称", trigger: "blur" } | ||
| 122 | + ], | ||
| 123 | + device : [ | ||
| 124 | + { required: true, message: "设备号", trigger: "blur" } | ||
| 125 | + ], | ||
| 126 | + cabinetNo : [ | ||
| 127 | + { required: true, message: "钥匙位编号", trigger: "blur" } | ||
| 128 | + ], | ||
| 129 | + createBy : [ | ||
| 130 | + { required: true, message: "创建人员", trigger: "blur" } | ||
| 131 | + ], | ||
| 132 | + createTime : [ | ||
| 133 | + { required: true, message: "创建时间", trigger: "blur" } | ||
| 134 | + ], | ||
| 135 | + updateBy : [ | ||
| 136 | + { required: true, message: "修改人员", trigger: "blur" } | ||
| 137 | + ], | ||
| 138 | + updateTime : [ | ||
| 139 | + { required: true, message: "修改时间", trigger: "blur" } | ||
| 140 | + ], | ||
| 141 | + delFlag : [ | ||
| 142 | + { required: true, message: "是否删除;0为未删除,1已删除", trigger: "blur" } | ||
| 143 | + ], | ||
| 144 | + eventType : [ | ||
| 145 | + { required: true, message: "操作类型;-0司机操作,16管理员操作,17紧急操作", trigger: "blur" } | ||
| 146 | + ], | ||
| 147 | + keyInfoId : [ | ||
| 148 | + { required: true, message: "钥匙ID", trigger: "blur" } | ||
| 149 | + ], | ||
| 150 | + scheduleDate : [ | ||
| 151 | + { required: true, message: "排班时间", trigger: "blur" } | ||
| 152 | + ], | ||
| 153 | + schedulingId : [ | ||
| 154 | + { required: true, message: "排班ID", trigger: "blur" } | ||
| 155 | + ], | ||
| 156 | + type : [ | ||
| 157 | + { required: true, message: "状态:0存入,1取出 ,16:钥匙未归还,255异常", trigger: "blur" } | ||
| 158 | + ], | ||
| 159 | + type1 : [ | ||
| 160 | + { required: true, message: "状态:1 是归还;0是借出;2是初始状态", trigger: "blur" } | ||
| 161 | + ], | ||
| 162 | + time : [ | ||
| 163 | + { required: true, message: "", trigger: "blur" } | ||
| 164 | + ], | ||
| 165 | + } | ||
| 166 | + }); | ||
| 167 | + | ||
| 168 | + const { queryParamsOfLinggangKeyWorkLocation, formOfLinggangKeyWorkLocation, checkRulesOfLinggangKeyWorkLocation } = toRefs(dataOfLinggangKeyWorkLocation ); | ||
| 169 | + | ||
| 170 | + /** 查询设备信息列表 */ | ||
| 171 | + function getListOfLinggangKeyWorkLocation() { | ||
| 172 | + loadingOfLinggangKeyWorkLocation.value = true; | ||
| 173 | + console.log(queryParamsOfLinggangKeyWorkLocation.value.pageNum); | ||
| 174 | + | ||
| 175 | + | ||
| 176 | + listLimitOfLinggangKeyWorkLocation(queryParamsOfLinggangKeyWorkLocation.value,queryParamsOfLinggangKeyWorkLocation.value.pageNum,queryParamsOfLinggangKeyWorkLocation.value.pageSize).then(response => { | ||
| 177 | + listOfLinggangKeyWorkLocation.value = response.records; | ||
| 178 | + totalOfLinggangKeyWorkLocation.value = response.total; | ||
| 179 | + | ||
| 180 | + loadingOfLinggangKeyWorkLocation.value = false; | ||
| 181 | + | ||
| 182 | + // deleteFlagsOfLinggangKeyWorkLocationFunction(function (){ | ||
| 183 | + | ||
| 184 | + // }) | ||
| 185 | + }); | ||
| 186 | + } | ||
| 187 | + | ||
| 188 | + function currentChangeFun(val){ | ||
| 189 | + console.log("currentChangeFun--------------------->"); | ||
| 190 | + | ||
| 191 | + } | ||
| 192 | + | ||
| 193 | + function deleteFlagsOfLinggangKeyWorkLocationFunction(fun){ | ||
| 194 | + getDictsDelFlag().then(response=>{ | ||
| 195 | + deleteFlagsOfLinggangKeyWorkLocation.value = response.data; | ||
| 196 | + | ||
| 197 | + | ||
| 198 | + if(fun){ | ||
| 199 | + fun(response); | ||
| 200 | + } | ||
| 201 | + }); | ||
| 202 | + } | ||
| 203 | + /**排序*/ | ||
| 204 | + function sortChangeOfLinggangKeyWorkLocation(data){ | ||
| 205 | + queryParamsOfLinggangKeyWorkLocation.value.order=data.order; | ||
| 206 | + queryParamsOfLinggangKeyWorkLocation.value.prop=data.prop; | ||
| 207 | + getListOfLinggangKeyWorkLocation(); | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + // 取消按钮 | ||
| 211 | + function cancelOfLinggangKeyWorkLocation() { | ||
| 212 | + openOfLinggangKeyWorkLocation.value = false; | ||
| 213 | + globalRowOfLinggangKeyWorkLocation.value = null | ||
| 214 | + resetOfLinggangKeyWorkLocation(); | ||
| 215 | + } | ||
| 216 | + | ||
| 217 | + const handleSizeChange = (val) => { | ||
| 218 | + sizeOfLinggangKeyWorkLocation.value = val; | ||
| 219 | + } | ||
| 220 | + const handleCurrentChange = (val) => { | ||
| 221 | + pageOfLinggangKeyWorkLocation.value = val; | ||
| 222 | + } | ||
| 223 | + | ||
| 224 | + | ||
| 225 | + // 表单重置 | ||
| 226 | + function resetOfLinggangKeyWorkLocation() { | ||
| 227 | + formOfLinggangKeyWorkLocation.value = { | ||
| 228 | + id : null, | ||
| 229 | + yardId : null, | ||
| 230 | + yardName : null, | ||
| 231 | + device : null, | ||
| 232 | + cabinetNo : null, | ||
| 233 | + createBy : null, | ||
| 234 | + createTime : null, | ||
| 235 | + updateBy : null, | ||
| 236 | + updateTime : null, | ||
| 237 | + delFlag : null, | ||
| 238 | + eventType : null, | ||
| 239 | + keyInfoId : null, | ||
| 240 | + scheduleDate : null, | ||
| 241 | + schedulingId : null, | ||
| 242 | + type : null, | ||
| 243 | + type1 : null, | ||
| 244 | + time : null, | ||
| 245 | + }; | ||
| 246 | + proxy.resetForm("rulesOfLinggangKeyWorkLocation"); | ||
| 247 | + } | ||
| 248 | + | ||
| 249 | + /** 搜索按钮操作 */ | ||
| 250 | + function handleQueryOfLinggangKeyWorkLocation() { | ||
| 251 | + queryParamsOfLinggangKeyWorkLocation.value.pageNum = 1; | ||
| 252 | + getListOfLinggangKeyWorkLocation(); | ||
| 253 | + } | ||
| 254 | + | ||
| 255 | + /** 重置按钮操作 */ | ||
| 256 | + function resetQueryOfLinggangKeyWorkLocation() { | ||
| 257 | + dataOfLinggangKeyWorkLocation.queryParamsOfLinggangKeyWorkLocation.nbbm = null; | ||
| 258 | + dataOfLinggangKeyWorkLocation.queryParamsOfLinggangKeyWorkLocation.time = null; | ||
| 259 | + handleQueryOfLinggangKeyWorkLocation(); | ||
| 260 | + } | ||
| 261 | + | ||
| 262 | + // 多选框选中数据 | ||
| 263 | + function handleSelectionChangeOfLinggangKeyWorkLocation(selection) { | ||
| 264 | + idsOfLinggangKeyWorkLocation.value = selection.map(item => item.id); | ||
| 265 | + singleLinggangKeyWorkLocation.value = selection.length != 1; | ||
| 266 | + multipleLinggangKeyWorkLocation.value = !selection.length; | ||
| 267 | + } | ||
| 268 | + | ||
| 269 | + /** 新增按钮操作 */ | ||
| 270 | + function handleAddOfLinggangKeyWorkLocation() { | ||
| 271 | + resetOfLinggangKeyWorkLocation(); | ||
| 272 | + changeFlagOfLinggangKeyWorkLocation.value = true; | ||
| 273 | + openOfLinggangKeyWorkLocation.value = true; | ||
| 274 | + titleOfLinggangKeyWorkLocation.value = "添加"; | ||
| 275 | + } | ||
| 276 | + | ||
| 277 | + /** 修改按钮操作 */ | ||
| 278 | + function handleUpdateOfLinggangKeyWorkLocation(row) { | ||
| 279 | + resetOfLinggangKeyWorkLocation(); | ||
| 280 | + const _id = row.id || idsOfLinggangKeyWorkLocation.value | ||
| 281 | + viewOfLinggangKeyWorkLocation(_id).then(response => { | ||
| 282 | + formOfLinggangKeyWorkLocation.value = response.data; | ||
| 283 | + openOfLinggangKeyWorkLocation.value = true; | ||
| 284 | + titleOfLinggangKeyWorkLocation.value = "修改"; | ||
| 285 | + }); | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + /** 提交按钮 */ | ||
| 289 | + function submitFormOfLinggangKeyWorkLocation() { | ||
| 290 | + proxy.$refs["rulesOfLinggangKeyWorkLocation"].validate(valid => { | ||
| 291 | + if (valid) { | ||
| 292 | + if (formOfLinggangKeyWorkLocation.value.id != null) { | ||
| 293 | + updateOfLinggangKeyWorkLocation(formOfLinggangKeyWorkLocation.value).then(response => { | ||
| 294 | + proxy.$modal.msgSuccess("修改成功"); | ||
| 295 | + openOfLinggangKeyWorkLocation.value = false; | ||
| 296 | + getListOfLinggangKeyWorkLocation(); | ||
| 297 | + }); | ||
| 298 | + } else { | ||
| 299 | + addOfLinggangKeyWorkLocation(formOfLinggangKeyWorkLocation.value).then(response => { | ||
| 300 | + proxy.$modal.msgSuccess("新增成功"); | ||
| 301 | + openOfLinggangKeyWorkLocation.value = false; | ||
| 302 | + getListOfLinggangKeyWorkLocation(); | ||
| 303 | + }); | ||
| 304 | + } | ||
| 305 | + } | ||
| 306 | + }); | ||
| 307 | + } | ||
| 308 | + | ||
| 309 | + /** 删除按钮操作 */ | ||
| 310 | + function handleDeleteOfLinggangKeyWorkLocation(row) { | ||
| 311 | + const _idsOfLinggangKeyWorkLocation = row.id || idsOfLinggangKeyWorkLocation.value; | ||
| 312 | + proxy.$modal.confirm('是否确认删除 为"' + _idsOfLinggangKeyWorkLocation + '"的数据项?').then(function () { | ||
| 313 | + return deleteOfLinggangKeyWorkLocation(_idsOfLinggangKeyWorkLocation); | ||
| 314 | + }).then(() => { | ||
| 315 | + getListOfLinggangKeyWorkLocation(); | ||
| 316 | + proxy.$modal.msgSuccess("删除成功"); | ||
| 317 | + }).catch(() => { }); | ||
| 318 | + } | ||
| 319 | + | ||
| 320 | + /** 导出按钮操作 */ | ||
| 321 | + function handleExportOfLinggangKeyWorkLocation() { | ||
| 322 | + proxy.download('Linggang/key/work/location/export', { | ||
| 323 | + ...queryParamsOfLinggangKeyWorkLocation.value | ||
| 324 | + }, `LinggangKeyWorkLocation_${new Date().getTime()}.xlsx`) | ||
| 325 | + } | ||
| 326 | + | ||
| 327 | + // function init_YardId(){ | ||
| 328 | + // ().then(res=>{YardIds.value=res.data}); | ||
| 329 | + // } | ||
| 330 | + // function init_KeyInfoId(){ | ||
| 331 | + // ().then(res=>{KeyInfoIds.value=res.data}); | ||
| 332 | + // } | ||
| 333 | + // function init_SchedulingId(){ | ||
| 334 | + // ().then(res=>{SchedulingIds.value=res.data}); | ||
| 335 | + // } | ||
| 336 | + | ||
| 337 | + getListOfLinggangKeyWorkLocation(); | ||
| 338 | +</script> | ||
| 0 | \ No newline at end of file | 339 | \ No newline at end of file |
src/views/scheduling/scheduling/linggangScheduling.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + <div class="query-from"> | ||
| 4 | + <el-form :inline="true" :model="queryParamsOfLinggangScheduling" class="demo-form-inline"> | ||
| 5 | + | ||
| 6 | + <el-form-item label="排班日期" props="scheduleDate"> | ||
| 7 | + <el-date-picker style="width: 130px;" v-model="queryParamsOfLinggangScheduling.scheduleDate" type="date" align="right" unlink-panels format="YYYY/MM/DD" value-format="YYYY-MM-DD"></el-date-picker> | ||
| 8 | + </el-form-item> | ||
| 9 | + | ||
| 10 | + <el-form-item label="工号" props="jobCode"> | ||
| 11 | + <el-input style="width: 120px;" v-model="queryParamsOfLinggangScheduling.jobCode" placeholder="请输入工号" clearable @keyup.enter="handleQueryOfLinggangScheduling" /> | ||
| 12 | + </el-form-item> | ||
| 13 | + | ||
| 14 | + | ||
| 15 | + <el-form-item label="车辆自编号" props="nbbm"> | ||
| 16 | + <el-input style="width: 160px;" v-model="queryParamsOfLinggangScheduling.nbbm" placeholder="请输入车辆自编号" clearable @keyup.enter="handleQueryOfLinggangScheduling" /> | ||
| 17 | + </el-form-item> | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + <el-form-item> | ||
| 21 | + <el-button type="primary" icon="Search" @click="handleQueryOfLinggangScheduling">搜索</el-button> | ||
| 22 | + <el-button icon="Refresh" @click="resetQueryOfLinggangScheduling()">重置</el-button> | ||
| 23 | + </el-form-item> | ||
| 24 | + </el-form> | ||
| 25 | + </div> | ||
| 26 | + | ||
| 27 | + <el-table v-loading="loadingOfLinggangScheduling" :data="listOfLinggangScheduling" @selection-change="handleSelectionChangeOfLinggangScheduling" border max-height="600" | ||
| 28 | + :default-expand-all="false" :row-class-name="tableRowClassName" @sort-change="sortChangeOfLinggangScheduling"> | ||
| 29 | + <el-table-column type="selection" width="50" align="center" /> | ||
| 30 | + <el-table-column label="序号" type="index" width="60" align="center"> | ||
| 31 | + <template #default="scope"> | ||
| 32 | + {{ (queryParamsOfLinggangScheduling.pageNum - 1) * queryParamsOfLinggangScheduling.pageSize + scope.$index + 1 }} | ||
| 33 | + </template> | ||
| 34 | + </el-table-column> | ||
| 35 | + | ||
| 36 | + <el-table-column label="排班日期" align="center" prop="scheduleDateStr" sortable /> | ||
| 37 | + <el-table-column label="线路名称" align="center" prop="lineName" sortable /> | ||
| 38 | + <el-table-column label="工号" align="center" prop="jobCode" sortable /> | ||
| 39 | + <el-table-column label="姓名" align="center" prop="name" /> | ||
| 40 | + <el-table-column label="工种" align="center" prop="posts" sortable /> | ||
| 41 | + <el-table-column label="路牌" align="center" prop="lpName" sortable /> | ||
| 42 | + <el-table-column label="车辆自编号" align="center" prop="nbbm" sortable /> | ||
| 43 | + <el-table-column label="班次类型" align="center" prop="bcType" > | ||
| 44 | + <template #default="scope"> | ||
| 45 | + <view v-if="scope.row.bcType=='in'">进站</view> | ||
| 46 | + <view v-else-if="scope.row.bcType=='out'">出站</view> | ||
| 47 | + <view v-else>司机操作</view> | ||
| 48 | + </template> | ||
| 49 | + </el-table-column> | ||
| 50 | + <el-table-column label="发车时间" align="center" prop="fcsjTStr" sortable /> | ||
| 51 | + <el-table-column label="到站时间" align="center" prop="zdsjTStr" sortable /> | ||
| 52 | + | ||
| 53 | + <el-table-column label="打卡时间" align="center" prop="signTime" sortable /> | ||
| 54 | + <el-table-column label="是否酒精测试" align="center" prop="alcoholFlag" > | ||
| 55 | + <template #default="scope"> | ||
| 56 | + <view v-if="scope.row.alcoholFlag==1">是</view> | ||
| 57 | + <view v-if="scope.row.alcoholFlag==0">否</view> | ||
| 58 | + <view v-else></view> | ||
| 59 | + </template> | ||
| 60 | + </el-table-column> | ||
| 61 | + <el-table-column label="酒精测试含量" align="center" prop="alcoholIntake" /> | ||
| 62 | + <el-table-column label="原因" align="center" prop="remark" /> | ||
| 63 | + <el-table-column label="起点站名字" align="center" prop="qdzname" /> | ||
| 64 | + <el-table-column label="终点站名字" align="center" prop="zdzname" /> | ||
| 65 | + <el-table-column label="酒测次数" align="center" prop="alcoholCount" /> | ||
| 66 | + | ||
| 67 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="160"> | ||
| 68 | + <template #default="scope"> | ||
| 69 | + <el-button type="success" plain icon="Edit" :disabled="singleLinggangScheduling" @click="handleUpdateOfLinggangScheduling(scope.row)" v-hasPermi="['linggang:scheduling:update']">修改</el-button> | ||
| 70 | + | ||
| 71 | + </template> | ||
| 72 | + </el-table-column> | ||
| 73 | + </el-table> | ||
| 74 | + | ||
| 75 | + <pagination v-show="totalOfLinggangScheduling > 0" :total="totalOfLinggangScheduling" v-model:page="queryParamsOfLinggangScheduling.pageNum" v-model:limit="queryParamsOfLinggangScheduling.pageSize" | ||
| 76 | + @pagination="getListOfLinggangScheduling" /> | ||
| 77 | + | ||
| 78 | + <el-dialog :title="titleOfLinggangScheduling" v-model="openOfLinggangScheduling" width="400px" append-to-body> | ||
| 79 | + <el-form :model="formOfLinggangScheduling" ref="rulesOfLinggangScheduling" label-width="110px" :rules="checkRulesOfLinggangScheduling"> | ||
| 80 | + | ||
| 81 | + <el-form-item label="排班日期" prop="scheduleDate"> | ||
| 82 | + <el-input el-input="input" v-model="formOfLinggangScheduling.scheduleDateStr" disabled="true" /> | ||
| 83 | + </el-form-item> | ||
| 84 | + | ||
| 85 | + <el-form-item label="工号" prop="jobCode"> | ||
| 86 | + <el-input el-input="input" v-model="formOfLinggangScheduling.jobCode" disabled="true"/> | ||
| 87 | + </el-form-item> | ||
| 88 | + <el-form-item label="姓名" prop="name"> | ||
| 89 | + <el-input el-input="input" v-model="formOfLinggangScheduling.name" disabled="true"/> | ||
| 90 | + </el-form-item> | ||
| 91 | + <el-form-item label="工种" prop="posts"> | ||
| 92 | + <el-input el-input="input" v-model="formOfLinggangScheduling.posts" disabled="true"/> | ||
| 93 | + </el-form-item> | ||
| 94 | + | ||
| 95 | + <el-form-item label="车辆自编号" prop="nbbm"> | ||
| 96 | + <el-input el-input="input" v-model="formOfLinggangScheduling.nbbm" disabled="true"/> | ||
| 97 | + </el-form-item> | ||
| 98 | + <el-form-item label="班次类型" prop="bcType"> | ||
| 99 | + <el-input el-input="input" v-model="formOfLinggangScheduling.bcTypeLabel" disabled="true"/> | ||
| 100 | + </el-form-item> | ||
| 101 | + <el-form-item label="发车时间" prop="fcsjT"> | ||
| 102 | + <el-input el-input="input" v-model="formOfLinggangScheduling.fcsjTStr" disabled="true"/> | ||
| 103 | + </el-form-item> | ||
| 104 | + <el-form-item label="到站时间" prop="zdsjT"> | ||
| 105 | + <el-input el-input="input" v-model="formOfLinggangScheduling.zdsjTStr" disabled="true"/> | ||
| 106 | + </el-form-item> | ||
| 107 | + | ||
| 108 | + <el-form-item label="是否酒精测试" prop="alcoholFlag"> | ||
| 109 | + <el-input el-input="input" v-model="formOfLinggangScheduling.alcoholFlagLabel" disabled="true" /> | ||
| 110 | + </el-form-item> | ||
| 111 | + <el-form-item label="酒精测试含量" prop="alcoholIntake"> | ||
| 112 | + <el-input el-input="input" v-model="formOfLinggangScheduling.alcoholIntake" disabled="true"/> | ||
| 113 | + </el-form-item> | ||
| 114 | + <el-form-item label="原因" prop="remark"> | ||
| 115 | + <el-input el-input="input" v-model="formOfLinggangScheduling.remark" disabled="true"/> | ||
| 116 | + </el-form-item> | ||
| 117 | + | ||
| 118 | + <el-form-item label="酒测次数" prop="alcoholCount"> | ||
| 119 | + <el-input el-input="input" v-model="formOfLinggangScheduling.alcoholCount" placeholder="请输入酒测次数" /> | ||
| 120 | + </el-form-item> | ||
| 121 | + </el-form> | ||
| 122 | + | ||
| 123 | + <template #footer> | ||
| 124 | + <div class="dialog-footer"> | ||
| 125 | + <el-button type="primary" @click="submitFormOfLinggangScheduling">确 定</el-button> | ||
| 126 | + <el-button @click="cancelOfLinggangScheduling">取 消</el-button> | ||
| 127 | + </div> | ||
| 128 | + </template> | ||
| 129 | + </el-dialog> | ||
| 130 | + | ||
| 131 | + </div> | ||
| 132 | +</template> | ||
| 133 | + | ||
| 134 | + | ||
| 135 | +<script setup name="LinggangScheduling"> | ||
| 136 | + import { getDicts,getDictsDelFlag } from '@/api/system/dict/data'; | ||
| 137 | + import { listLimitOfLinggangScheduling, viewOfLinggangScheduling, addOfLinggangScheduling, updateOfLinggangScheduling,updateStatusOfLinggangScheduling,deleteOfLinggangScheduling } from "@/api/scheduling/linggangScheduling"; | ||
| 138 | + const { proxy } = getCurrentInstance(); | ||
| 139 | + | ||
| 140 | + const listOfLinggangScheduling = ref([]); | ||
| 141 | + const openOfLinggangScheduling = ref(false); | ||
| 142 | + const titleOfLinggangScheduling = ref(""); | ||
| 143 | + const loadingOfLinggangScheduling = ref(true); | ||
| 144 | + const showSearchOfLinggangScheduling = ref(true); | ||
| 145 | + const idsOfLinggangScheduling = ref([]); | ||
| 146 | + const singleLinggangScheduling = ref(true); | ||
| 147 | + const multipleLinggangScheduling = ref(true); | ||
| 148 | + | ||
| 149 | + | ||
| 150 | + const pageOfLinggangScheduling = ref(1) //第几页 | ||
| 151 | + const sizeOfLinggangScheduling = ref(10) //一页多少条 | ||
| 152 | + const totalOfLinggangScheduling = ref(0); | ||
| 153 | + const pageSizesOfLinggangScheduling = [5, 10, 20, 50]; //每页显示多少条 | ||
| 154 | + const currentPageOfLinggangScheduling = ref(1) // 当前页 | ||
| 155 | + const globalRowOfLinggangScheduling = ref(null) // 当前行数据 | ||
| 156 | + | ||
| 157 | + const changeFlagOfLinggangScheduling = ref(true) | ||
| 158 | + const deleteFlagsOfLinggangScheduling = ref([]) | ||
| 159 | + | ||
| 160 | + const SignInIds=ref([]); | ||
| 161 | + const KeyInfoIds=ref([]); | ||
| 162 | + | ||
| 163 | + const dataOfLinggangScheduling = reactive({ | ||
| 164 | + formOfLinggangScheduling: {}, | ||
| 165 | + queryParamsOfLinggangScheduling: { | ||
| 166 | + pageNum: 1, | ||
| 167 | + pageSize: 10, | ||
| 168 | + id : null, | ||
| 169 | + scheduleDate : null, | ||
| 170 | + lineName : null, | ||
| 171 | + jobCode : null, | ||
| 172 | + name : null, | ||
| 173 | + posts : null, | ||
| 174 | + lpName : null, | ||
| 175 | + nbbm : null, | ||
| 176 | + bcType : null, | ||
| 177 | + fcsjT : null, | ||
| 178 | + zdsjT : null, | ||
| 179 | + signInId : null, | ||
| 180 | + exType : null, | ||
| 181 | + signTime : null, | ||
| 182 | + signType : null, | ||
| 183 | + alcoholFlag : null, | ||
| 184 | + alcoholIntake : null, | ||
| 185 | + remark : null, | ||
| 186 | + keyInfoId : null, | ||
| 187 | + updown : null, | ||
| 188 | + qdzcode : null, | ||
| 189 | + qdzname : null, | ||
| 190 | + zdzcode : null, | ||
| 191 | + zdzname : null, | ||
| 192 | + schedulingType : null, | ||
| 193 | + alcoholCount : null, | ||
| 194 | + | ||
| 195 | + }, | ||
| 196 | + checkRulesOfLinggangScheduling: { | ||
| 197 | + | ||
| 198 | + alcoholCount : [ | ||
| 199 | + { required: true, message: "酒测次数", trigger: "blur" } | ||
| 200 | + ], | ||
| 201 | + } | ||
| 202 | + }); | ||
| 203 | + | ||
| 204 | + const { queryParamsOfLinggangScheduling, formOfLinggangScheduling, checkRulesOfLinggangScheduling } = toRefs(dataOfLinggangScheduling ); | ||
| 205 | + | ||
| 206 | + /** 查询设备信息列表 */ | ||
| 207 | + function getListOfLinggangScheduling() { | ||
| 208 | + loadingOfLinggangScheduling.value = true; | ||
| 209 | + listLimitOfLinggangScheduling(queryParamsOfLinggangScheduling.value,queryParamsOfLinggangScheduling.value.pageNum,queryParamsOfLinggangScheduling.value.pageSize).then(response => { | ||
| 210 | + listOfLinggangScheduling.value = response.records; | ||
| 211 | + totalOfLinggangScheduling.value = response.total; | ||
| 212 | + deleteFlagsOfLinggangSchedulingFunction(function (){ | ||
| 213 | + loadingOfLinggangScheduling.value = false; | ||
| 214 | + }) | ||
| 215 | + }); | ||
| 216 | + } | ||
| 217 | + | ||
| 218 | + | ||
| 219 | + function deleteFlagsOfLinggangSchedulingFunction(fun){ | ||
| 220 | + getDictsDelFlag().then(response=>{ | ||
| 221 | + deleteFlagsOfLinggangScheduling.value = response.data; | ||
| 222 | + | ||
| 223 | + | ||
| 224 | + if(fun){ | ||
| 225 | + fun(response); | ||
| 226 | + } | ||
| 227 | + }); | ||
| 228 | + } | ||
| 229 | + /**排序*/ | ||
| 230 | + function sortChangeOfLinggangScheduling(data){ | ||
| 231 | + queryParamsOfLinggangScheduling.value.order=data.order; | ||
| 232 | + queryParamsOfLinggangScheduling.value.prop=data.prop; | ||
| 233 | + getListOfLinggangScheduling(); | ||
| 234 | + } | ||
| 235 | + | ||
| 236 | + // 取消按钮 | ||
| 237 | + function cancelOfLinggangScheduling() { | ||
| 238 | + openOfLinggangScheduling.value = false; | ||
| 239 | + globalRowOfLinggangScheduling.value = null | ||
| 240 | + resetOfLinggangScheduling(); | ||
| 241 | + } | ||
| 242 | + | ||
| 243 | + const handleSizeChange = (val) => { | ||
| 244 | + sizeOfLinggangScheduling.value = val; | ||
| 245 | + } | ||
| 246 | + const handleCurrentChange = (val) => { | ||
| 247 | + pageOfLinggangScheduling.value = val; | ||
| 248 | + } | ||
| 249 | + | ||
| 250 | + | ||
| 251 | + // 表单重置 | ||
| 252 | + function resetOfLinggangScheduling() { | ||
| 253 | + formOfLinggangScheduling.value = { | ||
| 254 | + id : null, | ||
| 255 | + scheduleDate : null, | ||
| 256 | + lineName : null, | ||
| 257 | + jobCode : null, | ||
| 258 | + name : null, | ||
| 259 | + posts : null, | ||
| 260 | + lpName : null, | ||
| 261 | + nbbm : null, | ||
| 262 | + bcType : null, | ||
| 263 | + fcsjT : null, | ||
| 264 | + zdsjT : null, | ||
| 265 | + signInId : null, | ||
| 266 | + exType : null, | ||
| 267 | + signTime : null, | ||
| 268 | + signType : null, | ||
| 269 | + alcoholFlag : null, | ||
| 270 | + alcoholIntake : null, | ||
| 271 | + remark : null, | ||
| 272 | + keyInfoId : null, | ||
| 273 | + updown : null, | ||
| 274 | + qdzcode : null, | ||
| 275 | + qdzname : null, | ||
| 276 | + zdzcode : null, | ||
| 277 | + zdzname : null, | ||
| 278 | + schedulingType : null, | ||
| 279 | + alcoholCount : null, | ||
| 280 | + }; | ||
| 281 | + proxy.resetForm("rulesOfLinggangScheduling"); | ||
| 282 | + } | ||
| 283 | + | ||
| 284 | + /** 搜索按钮操作 */ | ||
| 285 | + function handleQueryOfLinggangScheduling() { | ||
| 286 | + queryParamsOfLinggangScheduling.value.pageNum = 1; | ||
| 287 | + getListOfLinggangScheduling(); | ||
| 288 | + } | ||
| 289 | + | ||
| 290 | + /** 重置按钮操作 */ | ||
| 291 | + function resetQueryOfLinggangScheduling() { | ||
| 292 | + dataOfLinggangScheduling.queryParamsOfLinggangScheduling.scheduleDate=null; | ||
| 293 | + dataOfLinggangScheduling.queryParamsOfLinggangScheduling.jobCode=null; | ||
| 294 | + dataOfLinggangScheduling.queryParamsOfLinggangScheduling.nbbm=null; | ||
| 295 | + | ||
| 296 | + proxy.resetForm("queryOfLinggangScheduling"); | ||
| 297 | + handleQueryOfLinggangScheduling(); | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + // 多选框选中数据 | ||
| 301 | + function handleSelectionChangeOfLinggangScheduling(selection) { | ||
| 302 | + idsOfLinggangScheduling.value = selection.map(item => item.id); | ||
| 303 | + singleLinggangScheduling.value = selection.length != 1; | ||
| 304 | + multipleLinggangScheduling.value = !selection.length; | ||
| 305 | + } | ||
| 306 | + | ||
| 307 | + /** 新增按钮操作 */ | ||
| 308 | + function handleAddOfLinggangScheduling() { | ||
| 309 | + resetOfLinggangScheduling(); | ||
| 310 | + changeFlagOfLinggangScheduling.value = true; | ||
| 311 | + openOfLinggangScheduling.value = true; | ||
| 312 | + titleOfLinggangScheduling.value = "添加"; | ||
| 313 | + } | ||
| 314 | + | ||
| 315 | + /** 修改按钮操作 */ | ||
| 316 | + function handleUpdateOfLinggangScheduling(row) { | ||
| 317 | + resetOfLinggangScheduling(); | ||
| 318 | + const _id = row.id || idsOfLinggangScheduling.value | ||
| 319 | + viewOfLinggangScheduling(_id).then(response => { | ||
| 320 | + formOfLinggangScheduling.value = response.data; | ||
| 321 | + openOfLinggangScheduling.value = true; | ||
| 322 | + titleOfLinggangScheduling.value = "修改"; | ||
| 323 | + }); | ||
| 324 | + } | ||
| 325 | + | ||
| 326 | + /** 提交按钮 */ | ||
| 327 | + function submitFormOfLinggangScheduling() { | ||
| 328 | + proxy.$refs["rulesOfLinggangScheduling"].validate(valid => { | ||
| 329 | + if (valid) { | ||
| 330 | + if (formOfLinggangScheduling.value.id != null) { | ||
| 331 | + updateOfLinggangScheduling(formOfLinggangScheduling.value).then(response => { | ||
| 332 | + proxy.$modal.msgSuccess("修改成功"); | ||
| 333 | + openOfLinggangScheduling.value = false; | ||
| 334 | + getListOfLinggangScheduling(); | ||
| 335 | + }); | ||
| 336 | + } else { | ||
| 337 | + addOfLinggangScheduling(formOfLinggangScheduling.value).then(response => { | ||
| 338 | + proxy.$modal.msgSuccess("新增成功"); | ||
| 339 | + openOfLinggangScheduling.value = false; | ||
| 340 | + getListOfLinggangScheduling(); | ||
| 341 | + }); | ||
| 342 | + } | ||
| 343 | + } | ||
| 344 | + }); | ||
| 345 | + } | ||
| 346 | + | ||
| 347 | + /** 删除按钮操作 */ | ||
| 348 | + function handleDeleteOfLinggangScheduling(row) { | ||
| 349 | + const _idsOfLinggangScheduling = row.id || idsOfLinggangScheduling.value; | ||
| 350 | + proxy.$modal.confirm('是否确认删除 为"' + _idsOfLinggangScheduling + '"的数据项?').then(function () { | ||
| 351 | + return deleteOfLinggangScheduling(_idsOfLinggangScheduling); | ||
| 352 | + }).then(() => { | ||
| 353 | + getListOfLinggangScheduling(); | ||
| 354 | + proxy.$modal.msgSuccess("删除成功"); | ||
| 355 | + }).catch(() => { }); | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + /** 导出按钮操作 */ | ||
| 359 | + function handleExportOfLinggangScheduling() { | ||
| 360 | + proxy.download('linggang/scheduling/export', { | ||
| 361 | + ...queryParamsOfLinggangScheduling.value | ||
| 362 | + }, `LinggangScheduling_${new Date().getTime()}.xlsx`) | ||
| 363 | + } | ||
| 364 | + | ||
| 365 | + getListOfLinggangScheduling(); | ||
| 366 | +</script> | ||
| 0 | \ No newline at end of file | 367 | \ No newline at end of file |