<template>
|
<div class="Thecurrentjob">
|
<div class="content">
|
<div class="checkbox">
|
<div
|
v-if="show == '超级' || show == '机械'"
|
:class="['item', isactive == '机械' ? 'isactive' : '']"
|
@click="changeactive('机械')"
|
>
|
机械
|
</div>
|
<div
|
v-if="show == '超级' || show == '电气'"
|
:class="['item', isactive == '电气' ? 'isactive' : '']"
|
@click="changeactive('电气')"
|
>
|
电气
|
</div>
|
<div
|
v-if="show == '超级' || show == '地沟'"
|
:class="['item', isactive == '地沟' ? 'isactive' : '']"
|
@click="changeactive('地沟')"
|
>
|
地沟
|
</div>
|
</div>
|
<div class="serch">
|
<div class="time_box">
|
<el-select
|
v-model="queryForm.selectName"
|
:empty-values="[null, undefined]"
|
placeholder="请选择"
|
size="small"
|
style="width: 8.19rem; height: 2rem; margin-right: 0.98rem"
|
>
|
<el-option
|
v-for="item in stateType"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value"
|
/>
|
</el-select>
|
<div class="time">派工日期</div>
|
<el-date-picker
|
v-model="queryForm.selectTime"
|
prefix-icon="none"
|
clear-icon="none"
|
style="
|
font-size: 0.75rem !important;
|
border: 0.06rem solid rgba(222, 222, 222, 1);
|
border-radius: 0 0.25rem 0.25rem 0;
|
box-shadow: none;
|
width: 19rem;
|
height: 2rem;
|
border-left: 0;
|
"
|
format="YYYY-MM-DD HH:mm:ss"
|
type="datetimerange"
|
range-separator="~"
|
start-placeholder="起始日期"
|
end-placeholder="截止日期"
|
size="small"
|
/>
|
</div>
|
<div class="serch_box">
|
<div class="serchb">
|
<el-select
|
v-model="queryForm.selectType"
|
placeholder="请选择"
|
size="small"
|
style="width: 100%; height: 100%; font-size: 0.15rem"
|
>
|
<el-option
|
v-for="item in selectoptions"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value"
|
/>
|
</el-select>
|
</div>
|
<input
|
v-model="queryForm.inputcontent"
|
placeholder="请输入关键词搜索"
|
style="border-left: 0.06rem solid #e2e2e2"
|
/>
|
</div>
|
<el-button
|
@click="handleQuery"
|
type="primary"
|
size="small"
|
style="margin-left: 0.98rem; height: 2rem"
|
>查询</el-button
|
>
|
<el-button size="small" style="height: 2rem" @click="resetQuery"
|
>重置</el-button
|
>
|
<el-button
|
@click="opendoor"
|
type="primary"
|
size="small"
|
style="margin-left: 0.98rem; height: 2rem"
|
>套筒柜开门</el-button
|
>
|
<el-button
|
@click="closeDoor"
|
type="primary"
|
size="small"
|
style="margin-left: 0.98rem; height: 2rem"
|
>套筒柜关门</el-button
|
>
|
</div>
|
<div class="btns">
|
<div style="display: flex; align-items: center">
|
<el-button
|
size="small"
|
style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
|
@click="printExcel"
|
>批量导出</el-button
|
>
|
<!-- <el-button
|
@click="router.push('/Startjob')"
|
size="small"
|
style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
|
>开始作业</el-button
|
> -->
|
</div>
|
</div>
|
<div style="margin-top: 1rem; height: 100%">
|
<!-- 机械 -->
|
<el-table
|
empty-text="暂无数据"
|
v-if="isactive == '机械'"
|
height="450"
|
:data="tableData"
|
style="width: 100%"
|
:header-cell-style="{
|
background: 'rgba(250,250,250,1)',
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
border: 'none',
|
}"
|
:row-style="{
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
}"
|
>
|
<el-table-column type="selection" align="center" />
|
<el-table-column prop="takename" label="任务名称" align="center" />
|
<el-table-column prop="jishuyuan" label="技术员" align="center" />
|
<el-table-column prop="gonzhang" label="检修工长" align="center" />
|
<el-table-column
|
prop="zhijianyuan"
|
label="机械质检员"
|
align="center"
|
/>
|
<el-table-column
|
prop="lijuzouyeyuan"
|
label="机械矩作业员"
|
align="center"
|
/>
|
<el-table-column prop="fuzyuan" label="机械辅助员" align="center" />
|
<el-table-column label="任务详情" align="center">
|
<template #default="scope">
|
<el-popover
|
placement="right"
|
:width="600"
|
trigger="click"
|
@show="showdata(scope.row)"
|
>
|
<template #reference>
|
<span style="color: blue; font-size: 0.88rem; cursor: pointer"
|
>查看</span
|
>
|
</template>
|
<el-table :data="gridData" width="100%">
|
<el-table-column property="trainKind" label="车型" />
|
<el-table-column property="coachNum" label="车组" />
|
<el-table-column property="track" label="股道" />
|
<el-table-column property="trainNum" label="车厢号位置" />
|
<el-table-column property="bogie" label="转向架位置" />
|
<el-table-column property="processDept" label="检修班组" />
|
</el-table>
|
</el-popover>
|
</template>
|
</el-table-column>
|
<el-table-column prop="pustatus" label="作业状态" align="center">
|
<template #default="scope">
|
<span
|
style="color: #ffb200"
|
v-if="
|
scope.row.pustatus != 1 &&
|
scope.row.pustatus != 2 &&
|
scope.row.pustatus != 3 &&
|
scope.row.pustatus != 4
|
"
|
>待领筒</span
|
>
|
<span style="color: #31cf15" v-if="scope.row.pustatus == 1"
|
>待作业</span
|
>
|
<span style="color: #e88715" v-if="scope.row.pustatus == 2"
|
>待归筒</span
|
>
|
<span style="color: #ff0000" v-if="scope.row.pustatus == 3"
|
>待质检</span
|
>
|
<span style="color: #cad2da" v-if="scope.row.pustatus == 4"
|
>已完成</span
|
>
|
</template>
|
</el-table-column>
|
<el-table-column prop="pupeople" label="派工人" align="center"
|
><template #default=""> {{ userInfo }}</template></el-table-column
|
>
|
<el-table-column
|
prop="dispatchtime"
|
label="派工日期"
|
align="center"
|
/>
|
<el-table-column prop="finishedtime" label="完成日期" align="center">
|
<template #default="scope">
|
{{
|
scope.row.finishedtime != "1900-01-01 00:00:00"
|
? scope.row.finishedtime
|
: ""
|
}}
|
</template></el-table-column
|
>
|
<el-table-column label="操作" align="center">
|
<template #default="scope">
|
<el-button
|
v-if="
|
scope.row.pustatus != 1 &&
|
scope.row.pustatus != 2 &&
|
scope.row.pustatus != 3 &&
|
scope.row.pustatus != 4
|
"
|
size="small"
|
type="text"
|
@click="claim(scope.row, 1)"
|
>确认领取</el-button
|
>
|
<el-button
|
v-if="scope.row.pustatus == 1"
|
size="small"
|
type="text"
|
@click="toDetail(scope.row, isactive)"
|
>开始作业</el-button
|
>
|
<el-button
|
v-if="scope.row.pustatus == 2"
|
size="small"
|
type="text"
|
@click="claim(scope.row, 3)"
|
>确认归还</el-button
|
>
|
<el-button
|
v-if="scope.row.pustatus == 3"
|
size="small"
|
type="text"
|
@click="claim(scope.row, 4)"
|
>完成质检</el-button
|
>
|
<el-button
|
:disabled="true"
|
v-if="scope.row.pustatus == 4"
|
size="small"
|
type="text"
|
>已完成</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<!-- 电气 -->
|
<el-table
|
empty-text="暂无数据"
|
height="450"
|
v-if="isactive == '电气'"
|
:data="tableData"
|
style="width: 100%"
|
:header-cell-style="{
|
background: 'rgba(250,250,250,1)',
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
border: 'none',
|
}"
|
:row-style="{
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
}"
|
>
|
<el-table-column type="selection" align="center" />
|
<el-table-column prop="takename" label="任务名称" align="center" />
|
<el-table-column prop="jishuyuan" label="技术员" align="center" />
|
<el-table-column prop="gonzhang" label="检修工长" align="center" />
|
<el-table-column
|
prop="zhijianyuan"
|
label="电气质检员"
|
align="center"
|
/>
|
<el-table-column
|
prop="lijuzouyeyuan"
|
label="电气矩作业员"
|
align="center"
|
/>
|
<el-table-column prop="fuzyuan" label="电气辅助员" align="center" />
|
<el-table-column label="任务详情" align="center">
|
<template #default="scope">
|
<el-popover
|
placement="right"
|
:width="600"
|
trigger="click"
|
@show="showdata(scope.row)"
|
>
|
<template #reference>
|
<span style="color: blue; font-size: 0.88rem; cursor: pointer"
|
>查看</span
|
>
|
</template>
|
<el-table :data="gridData" width="100%">
|
<el-table-column property="trainKind" label="车型" />
|
<el-table-column property="coachNum" label="车组" />
|
<el-table-column property="track" label="股道" />
|
<el-table-column property="trainNum" label="车厢号位置" />
|
<el-table-column property="bogie" label="转向架位置" />
|
<el-table-column property="processDept" label="检修班组" />
|
</el-table>
|
</el-popover>
|
</template>
|
</el-table-column>
|
<el-table-column prop="pustatus" label="作业状态" align="center">
|
<template #default="scope">
|
<span
|
style="color: #ffb200"
|
v-if="
|
scope.row.pustatus != 1 &&
|
scope.row.pustatus != 2 &&
|
scope.row.pustatus != 3 &&
|
scope.row.pustatus != 4
|
"
|
>待领筒</span
|
>
|
<span style="color: #31cf15" v-if="scope.row.pustatus == 1"
|
>待作业</span
|
>
|
<span style="color: #e88715" v-if="scope.row.pustatus == 2"
|
>待归筒</span
|
>
|
<span style="color: #ff0000" v-if="scope.row.pustatus == 3"
|
>待质检</span
|
>
|
<span style="color: #cad2da" v-if="scope.row.pustatus == 4"
|
>已完成</span
|
>
|
</template>
|
</el-table-column>
|
<el-table-column prop="pupeople" label="派工人" align="center">
|
<template #default=""> {{ userInfo }}</template>
|
</el-table-column>
|
<el-table-column
|
prop="dispatchtime"
|
label="派工日期"
|
align="center"
|
/>
|
<el-table-column prop="finishedtime" label="完成日期" align="center">
|
<template #default="scope">
|
{{
|
scope.row.finishedtime != "1900-01-01 00:00:00"
|
? scope.row.finishedtime
|
: ""
|
}}
|
</template>
|
</el-table-column>
|
<el-table-column label="操作" align="center">
|
<template #default="scope">
|
<el-button
|
v-if="
|
scope.row.pustatus != 1 &&
|
scope.row.pustatus != 2 &&
|
scope.row.pustatus != 3 &&
|
scope.row.pustatus != 4
|
"
|
size="small"
|
type="text"
|
@click="claim(scope.row, 1)"
|
>确认领取</el-button
|
>
|
<el-button
|
v-if="scope.row.pustatus == 1"
|
size="small"
|
type="text"
|
@click="toDetail(scope.row, isactive)"
|
>开始作业</el-button
|
>
|
<el-button
|
v-if="scope.row.pustatus == 2"
|
size="small"
|
type="text"
|
@click="claim(scope.row, 3)"
|
>确认归还</el-button
|
>
|
<el-button
|
v-if="scope.row.pustatus == 3"
|
size="small"
|
type="text"
|
@click="claim(scope.row, 4)"
|
>完成质检</el-button
|
>
|
<el-button
|
:disabled="true"
|
v-if="scope.row.pustatus == 4"
|
size="small"
|
type="text"
|
>已完成</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<!-- 地沟 -->
|
<el-table
|
empty-text="暂无数据"
|
height="450"
|
v-if="isactive == '地沟'"
|
:data="tableData"
|
style="width: 100%"
|
:header-cell-style="{
|
background: 'rgba(250,250,250,1)',
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
border: 'none',
|
}"
|
:row-style="{
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
}"
|
>
|
<el-table-column type="selection" align="center" />
|
<el-table-column prop="takename" label="任务名称" align="center" />
|
<el-table-column prop="jishuyuan" label="技术员" align="center" />
|
<el-table-column prop="gonzhang" label="检修工长" align="center" />
|
<el-table-column
|
prop="zhijianyuan"
|
label="地沟质检员"
|
align="center"
|
/>
|
<el-table-column
|
prop="lijuzouyeyuan"
|
label="地沟矩作业员"
|
align="center"
|
/>
|
<el-table-column prop="fuzyuan" label="地沟辅助员" align="center" />
|
<el-table-column label="任务详情" align="center">
|
<template #default="scope">
|
<el-popover
|
placement="right"
|
:width="600"
|
trigger="click"
|
@show="showdata(scope.row)"
|
>
|
<template #reference>
|
<span style="color: blue; font-size: 0.88rem; cursor: pointer"
|
>查看</span
|
>
|
</template>
|
<el-table :data="gridData" width="100%">
|
<el-table-column property="trainKind" label="车型" />
|
<el-table-column property="coachNum" label="车组" />
|
<el-table-column property="track" label="股道" />
|
<el-table-column property="trainNum" label="车厢号位置" />
|
<el-table-column property="bogie" label="转向架位置" />
|
<el-table-column property="processDept" label="检修班组" />
|
</el-table>
|
</el-popover>
|
</template>
|
</el-table-column>
|
<el-table-column prop="pustatus" label="作业状态" align="center">
|
<template #default="scope">
|
<span
|
style="color: #ffb200"
|
v-if="
|
scope.row.pustatus != 1 &&
|
scope.row.pustatus != 2 &&
|
scope.row.pustatus != 3 &&
|
scope.row.pustatus != 4
|
"
|
>待领筒</span
|
>
|
<span style="color: #31cf15" v-if="scope.row.pustatus == 1"
|
>待作业</span
|
>
|
<span style="color: #e88715" v-if="scope.row.pustatus == 2"
|
>待归筒</span
|
>
|
<span style="color: #ff0000" v-if="scope.row.pustatus == 3"
|
>待质检</span
|
>
|
<span style="color: #cad2da" v-if="scope.row.pustatus == 4"
|
>已完成</span
|
>
|
</template>
|
</el-table-column>
|
<el-table-column prop="pupeople" label="派工人" align="center">
|
<template #default=""> {{ userInfo }}</template>
|
</el-table-column>
|
<el-table-column
|
prop="dispatchtime"
|
label="派工日期"
|
align="center"
|
/>
|
<el-table-column prop="finishedtime" label="完成日期" align="center">
|
<template #default="scope">
|
{{
|
scope.row.finishedtime != "1900-01-01 00:00:00"
|
? scope.row.finishedtime
|
: ""
|
}}
|
</template>
|
</el-table-column>
|
<el-table-column label="操作" align="center">
|
<template #default="scope">
|
<el-button
|
v-if="
|
scope.row.pustatus != 1 &&
|
scope.row.pustatus != 2 &&
|
scope.row.pustatus != 3 &&
|
scope.row.pustatus != 4
|
"
|
size="small"
|
type="text"
|
@click="claim(scope.row, 1)"
|
>确认领取</el-button
|
>
|
<el-button
|
v-if="scope.row.pustatus == 1"
|
size="small"
|
type="text"
|
@click="toDetail(scope.row, isactive)"
|
>开始作业</el-button
|
>
|
<el-button
|
v-if="scope.row.pustatus == 2"
|
size="small"
|
type="text"
|
@click="claim(scope.row, 3)"
|
>确认归还</el-button
|
>
|
<el-button
|
v-if="scope.row.pustatus == 3"
|
size="small"
|
type="text"
|
@click="claim(scope.row, 4)"
|
>完成质检</el-button
|
>
|
<el-button
|
:disabled="true"
|
v-if="scope.row.pustatus == 4"
|
size="small"
|
type="text"
|
>已完成</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<div
|
style="
|
display: flex;
|
justify-content: right;
|
align-self: flex-end;
|
margin-bottom: 1.19rem;
|
margin-right: 1.25rem;
|
"
|
>
|
<el-pagination
|
size="small"
|
background
|
layout="prev, pager, next"
|
:current-page="pageQuery.page"
|
:page-size="pageQuery.rows"
|
:total="pageTotal"
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
/>
|
</div>
|
</div>
|
<!-- 确认领取弹出框 -->
|
<el-dialog
|
v-model="claimdialogVisible"
|
title="确认完成"
|
width="400"
|
align-center
|
>
|
<div
|
style="
|
height: 5rem;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
"
|
>
|
<el-icon color="#FAAD14"><WarningFilled /></el-icon>
|
<span style="color: rgba(0, 0, 0, 1); font-size: 1.25rem"
|
>是否确认完成套筒数量[{{ TTnum }}]的领取?</span
|
>
|
</div>
|
<template #footer>
|
<div class="dialog-footer" style="text-align: right">
|
<el-button @click="claimdialogVisible = false">取消</el-button>
|
<el-button type="primary" @click="changeStatus"> 确认 </el-button>
|
</div>
|
</template>
|
</el-dialog>
|
|
<!-- 确认归还弹出框 -->
|
<el-dialog
|
v-model="claimdialogVisible1"
|
title="确认完成"
|
width="400"
|
align-center
|
>
|
<div
|
style="
|
height: 5rem;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
"
|
>
|
<el-icon color="#FAAD14"><WarningFilled /></el-icon>
|
<span style="color: rgba(0, 0, 0, 1); font-size: 1.25rem"
|
>是否确认完成套筒数量[{{ TTnum }}]的归还?</span
|
>
|
</div>
|
<template #footer>
|
<div class="dialog-footer" style="text-align: right">
|
<el-button @click="claimdialogVisible1 = false">取消</el-button>
|
<el-button type="primary" @click="changeStatus"> 确认 </el-button>
|
</div>
|
</template>
|
</el-dialog>
|
|
<!-- 完成质检弹出框 -->
|
<el-dialog
|
v-model="claimdialogVisible2"
|
title="确认完成"
|
width="400"
|
align-center
|
>
|
<div
|
style="
|
height: 5rem;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
"
|
>
|
<el-icon color="#FAAD14"><WarningFilled /></el-icon>
|
<span style="color: rgba(0, 0, 0, 1); font-size: 1.25rem"
|
>是否确认完成此工艺的质检</span
|
>
|
</div>
|
<template #footer>
|
<div class="dialog-footer" style="text-align: right">
|
<el-button @click="claimdialogVisible2 = false">取消</el-button>
|
<el-button type="primary" @click="changeStatus"> 确认 </el-button>
|
</div>
|
</template>
|
</el-dialog>
|
|
<!-- 人脸识别弹出框 -->
|
<el-dialog v-model="claimdialogVisible3" title="" width="400" align-center>
|
<div
|
style="
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
"
|
>
|
<span style="font-size: 0.88rem; font-weight: bold; color: #333333"
|
>请将脸部正对蓝色显示框内,并保持光线充足</span
|
>
|
<div
|
style="
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
border: 1px solid #4386ff;
|
border-radius: 50%;
|
width: 18.75rem;
|
height: 18.75rem;
|
margin: 2.06rem 0;
|
background-color: #f1fcff;
|
"
|
>
|
<img src="@/assets/login/face.png" alt="" />
|
</div>
|
</div>
|
<template #footer>
|
<div class="dialog-footer" style="text-align: right">
|
<el-button type="primary" size="small" style="width: 100%"
|
>开始识别</el-button
|
>
|
</div>
|
</template>
|
</el-dialog>
|
</div>
|
</template>
|
<script setup>
|
import { ref, reactive, onMounted, toRef } from "vue";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
import { useRouter } from "vue-router";
|
import { formatTime } from "@/utils/index.js";
|
import {
|
GetDetail,
|
ChangeStatus,
|
GetPageData,
|
ExportApi,
|
GetPageDataNew,
|
} from "@/api/newapi/Thecurrentjob";
|
import { GetSleeveandStep } from "@/api/newapi/Process";
|
import { ChanegOpenDoor, ChanegCloseDoor } from "@/api/newapi/Putake";
|
import { GetUserInfo } from "@/api/user";
|
|
const router = useRouter();
|
const obj = {
|
selectName: "",
|
selectTime: [], // 时间范围
|
selectType: "",
|
inputcontent: "",
|
};
|
const queryForm = toRef({ ...obj });
|
const selectoptions = ref([
|
{
|
value: "takename",
|
label: "任务名称",
|
},
|
{
|
value: "jishuyuan",
|
label: "技术员",
|
},
|
{
|
value: "gonzhang",
|
label: "检修工长",
|
},
|
{
|
value: "zhijianyuan",
|
label: "质检员",
|
},
|
{
|
value: "lijuzouyeyuan",
|
label: "力矩作业员",
|
},
|
]);
|
const tableData = ref([]);
|
const gridData = ref([]);
|
const options = ref([]);
|
const props = { multiple: true };
|
const table = ref(false);
|
const form = reactive({});
|
const isactive = ref("机械");
|
const claimdialogVisible = ref(false);
|
const claimdialogVisible1 = ref(false);
|
const claimdialogVisible2 = ref(false);
|
const claimdialogVisible3 = ref(false);
|
const stateType = ref([
|
{
|
label: "全部状态",
|
value: "",
|
},
|
{
|
label: "待领筒",
|
value: "0",
|
},
|
{
|
label: "待作业",
|
value: "1",
|
},
|
{
|
label: "待归筒",
|
value: "2",
|
},
|
{
|
label: "待质检",
|
value: "3",
|
},
|
{
|
label: "已完成",
|
value: "4",
|
},
|
]);
|
|
const changeactive = (value) => {
|
isactive.value = value;
|
queryForm.selectType = value;
|
initData();
|
};
|
|
const claimdata = ref({
|
id: "",
|
gruops: "",
|
creater: JSON.parse(localStorage.getItem("user")).userName,
|
createDate: formatTime(new Date()),
|
});
|
const TTnum = ref(0);
|
//页面数
|
const pageTotal = ref(0);
|
//确认领取/确认归还
|
const claim = (val, num) => {
|
console.log(val, num);
|
|
claimdata.value.id = val.njtakeid;
|
claimdata.value.gruops = isactive.value;
|
GetSleeveandStep(claimdata.value.gruops).then((res) => {
|
TTnum.value = res.data[0].sumTorqueSum;
|
if (num == 1) {
|
claimdialogVisible.value = true;
|
return;
|
}
|
if (num == 2) {
|
return;
|
}
|
if (num == 3) {
|
claimdialogVisible1.value = true;
|
return;
|
}
|
if (num == 4) {
|
claimdialogVisible2.value = true;
|
return;
|
}
|
});
|
};
|
//改变状态
|
const changeStatus = () => {
|
ChangeStatus(claimdata.value).then((res) => {
|
ElMessage({
|
message: "成功",
|
type: "success",
|
});
|
claimdialogVisible.value = false;
|
claimdialogVisible1.value = false;
|
claimdialogVisible2.value = false;
|
initData();
|
});
|
};
|
|
//查看详情
|
const showdata = (val) => {
|
gridData.value = [];
|
GetDetail(val.njtakeid).then((res) => {
|
gridData.value.push(res.data);
|
});
|
};
|
|
//分页请求参数
|
const pageQuery = ref({
|
page: 1, //当前页面
|
rows: 10, //每页显示条数
|
order: "desc", //排序方式
|
sort: "", //排序字段
|
wheres: "", //条件查询
|
});
|
|
//分页页面大小改变
|
const handleSizeChange = (val) => {
|
pageQuery.value.rows = val;
|
initData();
|
};
|
|
//分页页面改变
|
const handleCurrentChange = (val) => {
|
pageQuery.value.page = val;
|
initData();
|
};
|
//数据初始化
|
const initData = () => {
|
let obj = {
|
userId: JSON.parse(localStorage.getItem("user")).id,
|
group: isactive.value,
|
};
|
// GetPageDataNew(obj).then((res) => {
|
// tableData.value = res.data;
|
// pageTotal.value = res.data.length;
|
// });
|
// 查询条件
|
const startTime = formatTime(queryForm.value.selectTime[0]);
|
const endTime = formatTime(queryForm.value.selectTime[1]);
|
const filter = [
|
{
|
name: "grouptype",
|
value: isactive.value,
|
displayType: "String",
|
},
|
{
|
name: queryForm.value.selectType,
|
value: queryForm.value.inputcontent,
|
displayType: "like",
|
},
|
{
|
name: "pustatus",
|
value: queryForm.value.selectName,
|
displayType: "String",
|
},
|
{ name: "dispatchtime", value: startTime, displayType: "ThanOrEqual" },
|
{ name: "dispatchtime", value: endTime, displayType: "LessOrEqual" },
|
];
|
GetPageData({
|
...pageQuery.value,
|
filter,
|
}).then((res) => {
|
tableData.value = res.rows;
|
pageTotal.value = res.total;
|
});
|
};
|
//打印数据
|
const printExcel = () => {
|
// 查询条件
|
const startTime = formatTime(queryForm.value.selectTime[0]);
|
const endTime = formatTime(queryForm.value.selectTime[1]);
|
const filter = [
|
{
|
name: "grouptype",
|
value: isactive.value,
|
displayType: "String",
|
},
|
{
|
name: queryForm.value.selectType,
|
value: queryForm.value.selectInput,
|
displayType: "String",
|
},
|
{
|
name: "pustatus",
|
value: queryForm.value.selectName,
|
displayType: "String",
|
},
|
{ name: "dispatchtime", value: startTime, displayType: "ThanOrEqual" },
|
{ name: "dispatchtime", value: endTime, displayType: "LessOrEqual" },
|
];
|
ExportApi({
|
...pageQuery.value,
|
filter,
|
});
|
};
|
//数据检索事件
|
const handleQuery = () => {
|
pageQuery.value.page = 1;
|
initData();
|
};
|
|
//重置检索事件
|
const resetQuery = () => {
|
queryForm.value = Object.assign({}, obj);
|
pageQuery.value.page = 1;
|
initData();
|
};
|
//重置表单
|
const resetForm = (formEl) => {
|
if (!formEl) return;
|
formEl.resetFields();
|
};
|
const userInfo = ref("");
|
//路由跳转
|
const toDetail = (row, title) => {
|
router.push({
|
name: "Startjob",
|
state: { info: JSON.stringify(row), title: title },
|
});
|
};
|
const show = ref("");
|
|
const getuserinfo = () => {
|
GetUserInfo().then((res) => {
|
console.log(res);
|
show.value = res.data.roleName.substring(0, 2);
|
if (show.value != "超级") {
|
isactive.value = show.value;
|
initData();
|
}
|
});
|
};
|
|
const opendoor = () => {
|
ChanegOpenDoor(isactive.value).then((res) => {
|
if (res.status == true) {
|
ElMessage({
|
message: "开门成功",
|
type: "success",
|
});
|
} else {
|
ElMessage({
|
message: res.msg,
|
type: "error",
|
});
|
}
|
});
|
initData();
|
};
|
const closeDoor = () => {
|
ChanegCloseDoor(isactive.value).then((res) => {
|
if (res.status == true) {
|
ElMessage({
|
message: "关门成功",
|
type: "success",
|
});
|
} else {
|
ElMessage({
|
message: res.msg,
|
type: "error",
|
});
|
}
|
});
|
initData();
|
};
|
|
//数据初始化
|
onMounted(() => {
|
initData();
|
getuserinfo();
|
|
userInfo.value = JSON.parse(localStorage.getItem("user")).userName;
|
});
|
</script>
|
<style lang="scss" scoped>
|
.Thecurrentjob {
|
display: flex;
|
background-color: #fff;
|
.content {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
.checkbox {
|
width: 16rem;
|
display: flex;
|
justify-content: space-between;
|
margin-top: 1rem;
|
margin-left: 1.31rem;
|
.item {
|
width: 5rem;
|
height: 1.88rem;
|
border-radius: 0.25rem;
|
background-color: rgba(190, 199, 209, 1);
|
color: rgba(255, 255, 255, 1);
|
font-size: 0.88rem;
|
text-align: center;
|
line-height: 1.88rem;
|
cursor: pointer;
|
}
|
.isactive {
|
background-color: rgba(16, 16, 16, 1);
|
color: rgba(255, 255, 255, 1);
|
}
|
}
|
.serch {
|
display: flex;
|
margin-top: 1.31rem;
|
align-items: center;
|
.time_box {
|
display: flex;
|
align-items: center;
|
text-align: center;
|
margin-left: 0.98rem;
|
.time {
|
box-sizing: border-box;
|
width: 6.88rem;
|
height: 2rem;
|
text-align: center;
|
border: 0.06rem solid rgba(222, 222, 222, 1);
|
border-radius: 0.25rem 0 0 0.25rem;
|
font-size: 0.75rem;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
}
|
.serch_box {
|
display: flex;
|
align-items: center;
|
text-align: center;
|
margin-left: 0.98rem;
|
border-radius: 0.38rem;
|
.serchb {
|
box-sizing: border-box;
|
width: 6.88rem;
|
height: 2rem;
|
text-align: center;
|
font-size: 0.75rem;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
input {
|
box-sizing: border-box;
|
outline: none;
|
width: 19rem;
|
height: 2rem;
|
border: 0.06rem solid rgba(222, 222, 222, 1);
|
border-radius: 0 0.25rem 0.25rem 0;
|
padding-left: 0.3125rem;
|
font-size: 1rem;
|
}
|
}
|
}
|
.btns {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
margin-top: 1.31rem;
|
margin-left: 1.13rem;
|
padding-right: 2rem;
|
box-sizing: border-box;
|
}
|
}
|
}
|
</style>
|
<style>
|
.confirmButtonClass {
|
margin-right: 10px;
|
}
|
.el-message-box .el-message-box__btns {
|
flex-direction: row-reverse !important;
|
justify-content: normal !important;
|
}
|
</style>
|