zhgdyun/src/views/projectFront/operationManagement/shieldMachinesMonitoring.vue

2232 lines
75 KiB
Vue

<template>
<div class="payoff">
<el-row type="flex" style="width: 100%; height: 100%">
<el-col class="left-col">
<vue-scroll>
<div class="scroll">
<div class="list-wrapper">
<div
v-for="(item, index) in operationList"
:key="item.id"
:class="['list-item', { 'is-active': activeIndex == index }]"
@click="handleItemClick(index)"
>
<span class="title">{{ item.operationName }}</span>
</div>
</div>
</div>
</vue-scroll>
</el-col>
<el-col class="right-col">
<el-row style="width: 100%; height: 100%">
<el-col class="top-col" :span="4" :class="styleType == 3 ? 'changeStyle' : ''">
<el-form size="medium" :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="选择设备" prop="devSn">
<el-select
v-model="queryParams.devSn"
placeholder="请选择"
clearable
filterable
>
<el-option
v-for="(item, index) in allUfaceDev"
:key="item.devSn"
:label="item.devName"
:value="item.devSn"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="时间" prop="reportTime">
<el-date-picker
v-model="queryParams.reportTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="handleQuery">查询</el-button>
<el-button type="warning" plain @click="handleRefresh">刷新</el-button>
</el-form-item>
<el-form-item>
<el-button
v-permission="{
key: 'demonGeneration',
menuPath: '/project/operationManagement/shieldMachinesMonitoring',
}"
type="primary"
@click="ruleConfigDialog"
>演示数据生成</el-button
>
</el-form-item>
<el-form-item>
<el-button
v-permission="{
key: 'datchDelete',
menuPath: '/project/operationManagement/shieldMachinesMonitoring',
}"
type="primary"
@click="deleteAttendanceBatch"
>批量删除</el-button
>
</el-form-item>
</el-form>
</el-col>
<el-col
class="bottom-col"
:span="20"
:class="styleType == 3 ? 'bottomTwo' : ''"
>
<div class="scroll" :class="styleType == 3 ? 'boxBottom' : ''">
<el-table
:max-height="570"
:height="570"
ref="multipleTable"
v-loading="loading"
:data="userList"
class="tables table-box"
:class="{ 'scrollbar-exists': scrollbarFlag }"
>
<template slot="empty">
<el-empty
:image="require('@/assets/images/noData4.png')"
:image-size="100"
description="暂无数据"
></el-empty>
</template>
<el-table-column
type="selection"
align="center"
width="55"
></el-table-column>
<el-table-column width="120" label="设备名称" align="center" prop="deviceName" />
<el-table-column width="120" label="上传时间" align="center" prop="reportTime">
<template #default="{ row }">
<span>{{ row.reportTime }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
v-for="item in scopeData"
:key="item.listTableId"
:label="item.label"
align="center"
:prop="item.listTableId"
>
<template #default="{ row }">
<span>{{ row[item.listTableId] }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
v-for="item in scopeData1"
:key="item.listTableId"
:label="item.listTableName"
align="center"
:prop="item.listTableId"
>
<template #default="{ row }">
<span>{{ row[item.listTableId] }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
v-for="item in scopeData2"
:key="item.listTableId"
:label="item.listTableName"
align="center"
:prop="item.listTableId"
>
<template #default="{ row }">
<span>{{ row[item.listTableId] }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
v-for="item in scopeData3"
:key="item.listTableId"
:label="item.listTableName"
align="center"
:prop="item.listTableId"
>
<template #default="{ row }">
<span>{{ row[item.listTableId] }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
v-for="item in scopeData4"
:key="item.listTableId"
:label="item.listTableName"
align="center"
:prop="item.listTableId"
>
<template #default="{ row }">
<span>{{ row[item.listTableId] }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="报警状态" align="center" prop="alarmType">
<template #default="{ row }">
<span>{{ deviceStateUp(row.alarmType) }}</span>
</template>
</el-table-column> -->
<el-table-column fixed="right" width="150" label="操作" align="center">
<template #default="{ row }">
<el-button
v-permission="{
key: 'edit',
menuPath:
'/project/operationManagement/shieldMachinesMonitoring',
}"
style="border: 0 !important"
type="text"
icon="el-icon-edit"
@click="handleUpdate(row)"
>编辑</el-button
>
<el-button
v-permission="{
key: 'delete',
menuPath:
'/project/operationManagement/shieldMachinesMonitoring',
}"
style="border: 0 !important; color: #f56c6c"
type="text"
icon="el-icon-delete"
@click="handleDelete(row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<el-row type="flex" justify="center">
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
:pageSizes="[...$store.state.PAGESIZRS, 100, 200, 500, 1000]"
layout="total,sizes, prev, pager, next, jumper"
/>
</el-row>
</div>
</el-col>
</el-row>
</el-col>
</el-row>
<!-- 编辑弹窗 -->
<el-dialog :visible.sync="open" width="850px" append-to-body title="编辑">
<el-form
ref="editForm"
:model="editForm"
:rules="editFormRules"
size="medium"
label-width="140px"
class="edit_form_main"
style="display: flex; flex-wrap: wrap"
>
<el-form-item label="选择设备" prop="deviceSn">
<el-select v-model="editForm.deviceSn" placeholder="请选择" clearable filterable>
<el-option
v-for="(item, index) in allUfaceDev"
:key="item.devSn"
:label="item.devName"
:value="item.devSn"
></el-option>
</el-select>
</el-form-item>
<el-form-item
v-for="item in scopeData"
:key="item.listTableId"
:label="item.label"
:prop="item.listTableId"
>
<el-input-number
:controls="false"
v-model="editForm[item.listTableId]"
></el-input-number>
</el-form-item>
<el-form-item
v-for="item in scopeData1"
:key="item.listTableId"
:label="item.listTableName"
:prop="item.listTableId"
>
<el-input-number
:controls="false"
v-model="editForm[item.listTableId]"
></el-input-number>
</el-form-item>
<el-form-item
v-for="item in scopeData2"
:key="item.listTableId"
:label="item.listTableName"
:prop="item.listTableId"
>
<el-input-number
:controls="false"
v-model="editForm[item.listTableId]"
></el-input-number>
</el-form-item>
<el-form-item
v-for="item in scopeData3"
:key="item.listTableId"
:label="item.listTableName"
:prop="item.listTableId"
>
<el-input-number
:controls="false"
v-model="editForm[item.listTableId]"
></el-input-number>
</el-form-item>
<el-form-item
v-for="item in scopeData4"
:key="item.listTableId"
:label="item.listTableName"
:prop="item.listTableId"
>
<el-input-number
:controls="false"
v-model="editForm[item.listTableId]"
></el-input-number>
</el-form-item>
<!-- <el-form-item label="报警状态" prop="alarmType">
<el-select v-model="editForm.alarmType" placeholder="请选择" clearable filterable>
<el-option
v-for="(item, index) in deviceStateList"
:key="item.deviceStateId"
:label="item.deviceStateName"
:value="item.deviceStateId"
></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="上报时间" prop="reportTime">
<el-date-picker
value-format="yyyy-MM-dd hh:mm:ss"
type="datetime"
placeholder="上传时间"
v-model="editForm.reportTime"
></el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" style="text-align: center">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
</div>
</el-dialog>
<!-- 下载模拟数据弹窗 -->
<el-dialog
:visible.sync="downSimulateShow"
width="600px"
append-to-body
title="下载模拟数据"
>
<el-radio-group class="simulate_box" v-model="staffSimulateRadio">
<el-radio
:label="item.staffSimulateId"
v-for="item in staffSimulateList"
:key="item.staffSimulateId"
>{{ item.staffSimulateName }}</el-radio
>
</el-radio-group>
<div slot="footer">
<el-button @click="downSimulateShow = false">取消</el-button>
<el-button type="primary" @click="submitDownSimulate">确定</el-button>
</div>
</el-dialog>
<!-- 演示数据生成弹窗 -->
<el-dialog
:visible.sync="ruleConfigShow"
width="900px"
append-to-body
title="规则配置"
class="ruleConfig_box"
>
<el-form
ref="ruleConfigForm"
:model="ruleConfigForm"
:rules="ruleConfigFormRules"
size="medium"
label-width="160px"
>
<el-form-item label="选择设备" prop="devSns">
<el-checkbox-group v-model="ruleConfigForm.devSns">
<el-checkbox
:label="item.devSn"
v-for="item in allUfaceDev"
:key="item.devSn"
>{{ item.devName }}</el-checkbox
>
</el-checkbox-group>
</el-form-item>
<el-form-item label="数据量" prop="devGenerateNum">
<span class="mr_8">所选设备每个设备随机生成</span
><el-input-number
v-model="ruleConfigForm.devGenerateNum"
:min="0"
:max="999"
></el-input-number
><span class="ml_8">条数据</span>
</el-form-item>
<template v-if="activeIndex == 0">
<el-form-item label="模拟上传时间范围" prop="startTime">
<div class="flex">
<el-form-item prop="startTime">
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="开始时间"
:picker-options="handleTimeChange(ruleConfigForm.endTime, 'startTime')"
v-model="ruleConfigForm.startTime"
></el-date-picker>
</el-form-item>
<span class="mr_8 ml_8">至</span>
<el-form-item prop="endTime">
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="结束时间"
:picker-options="handleTimeChange(ruleConfigForm.startTime, 'endTime')"
v-model="ruleConfigForm.endTime"
></el-date-picker>
</el-form-item>
</div>
</el-form-item>
<el-form-item label="数据范围" prop="enterpriseIds">
<!-- <el-form-item label-width="120px" label="较接状态" prop="certification">
<el-input
v-model="ruleConfigForm.certification"
placeholder="请输入内容"
></el-input>
</el-form-item>
<el-form-item class="mt_12" label-width="120px" label="工作状态" prop="certification">
<el-input
v-model="ruleConfigForm.certification"
placeholder="请输入内容"
></el-input>
</el-form-item>
<el-form-item class="mt_12" label-width="120px" label="通讯状态" prop="certification">
<el-input
v-model="ruleConfigForm.certification"
placeholder="请输入内容"
></el-input>
</el-form-item> -->
<div class="ruleconfig_staff">
<el-form-item
label-width="140px"
:label="item.label"
v-for="item in scopeData"
:key="item.id"
>
<el-input-number
placeholder="小"
:controls="false"
v-model="item.minValue"
:max="item.maxValue ? item.maxValue : Infinity"
controls-position="right"
></el-input-number>
<span class="mr_8 ml_8">~</span>
<el-input-number
:controls="false"
:min="item.minValue ? item.minValue : -Infinity"
v-model="item.maxValue"
controls-position="right"
placeholder="大"
></el-input-number>
</el-form-item>
<div class="ruleconfig_staff_title">油缸位移(mm)</div>
<el-form-item
label-width="140px"
:label="item.label"
v-for="item in scopeData1"
:key="item.id"
>
<el-input-number
placeholder="小"
:controls="false"
v-model="item.minValue"
:max="item.maxValue ? item.maxValue : Infinity"
controls-position="right"
></el-input-number>
<span class="mr_8 ml_8">~</span>
<el-input-number
:controls="false"
:min="item.minValue ? item.minValue : -Infinity"
v-model="item.maxValue"
controls-position="right"
placeholder="大"
></el-input-number>
</el-form-item>
<div class="ruleconfig_staff_title">油缸压力(bar)</div>
<el-form-item
label-width="140px"
:label="item.label"
v-for="item in scopeData2"
:key="item.id"
>
<el-input-number
placeholder="小"
:controls="false"
v-model="item.minValue"
:max="item.maxValue ? item.maxValue : Infinity"
controls-position="right"
></el-input-number>
<span class="mr_8 ml_8">~</span>
<el-input-number
:controls="false"
:min="item.minValue ? item.minValue : -Infinity"
v-model="item.maxValue"
controls-position="right"
placeholder="大"
></el-input-number>
</el-form-item>
<div class="ruleconfig_staff_title">舱压(bar)</div>
<el-form-item
label-width="140px"
:label="item.label"
v-for="item in scopeData3"
:key="item.id"
>
<el-input-number
placeholder="小"
:controls="false"
v-model="item.minValue"
:max="item.maxValue ? item.maxValue : Infinity"
controls-position="right"
></el-input-number>
<span class="mr_8 ml_8">~</span>
<el-input-number
:controls="false"
:min="item.minValue ? item.minValue : -Infinity"
v-model="item.maxValue"
controls-position="right"
placeholder="大"
></el-input-number>
</el-form-item>
<div class="ruleconfig_staff_title">注浆控制压力(bar)</div>
<el-form-item
label-width="140px"
:label="item.label"
v-for="item in scopeData4"
:key="item.id"
>
<el-input-number
placeholder="小"
:controls="false"
v-model="item.minValue"
:max="item.maxValue ? item.maxValue : Infinity"
controls-position="right"
></el-input-number>
<span class="mr_8 ml_8">~</span>
<el-input-number
:controls="false"
:min="item.minValue ? item.minValue : -Infinity"
v-model="item.maxValue"
controls-position="right"
placeholder="大"
></el-input-number>
</el-form-item>
</div>
</el-form-item>
</template>
<!-- <el-form-item label="设备状态" prop="deviceStatuses">
<el-checkbox-group v-model="ruleConfigForm.deviceStatuses">
<el-checkbox
v-for="item in deviceStateList"
:key="item.deviceStateId"
:label="item.deviceStateId.toString()"
>{{ item.deviceStateName }}</el-checkbox
>
</el-checkbox-group>
</el-form-item>
<el-form-item label="全选" prop="detailStatuses">
<div class="flex">
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
></el-checkbox>
<el-form-item label="全部状态" label-width="80px">
<el-checkbox-group
@change="handleCheckedCitiesChange"
v-model="ruleConfigForm.detailStatuses"
>
<el-checkbox
v-for="item in cardTypeList"
:key="item.cardTypeName"
:label="item.cardTypeName"
>{{ item.cardTypeName }}</el-checkbox
>
</el-checkbox-group>
</el-form-item>
</div>
</el-form-item> -->
</el-form>
<div slot="footer" style="text-align: center">
<el-button
:loading="ruleConfigLoading"
type="primary"
@click="submitRuleConfigForm"
>{{ ruleConfigLoading ? "正在生成数据,请耐心等待!" : "开始生成" }}</el-button
>
<el-button type="primary" @click="ruleConfigReset">重置配置</el-button>
<el-button @click="ruleConfigCancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
enterpriseList,
teamList,
departmentList,
payrollRecord,
exportSalaryPdf,
exportSalaryExcel,
updateWorkerWagesPayment,
} from "@/assets/js/api/laborManagement/payoff";
import {
exportAttendanceExcel,
deleteBatchTunnelBoringMachineCurrentDataApi,
editTunnelBoringMachineCurrentDataApi,
mockDataTunnelBoringMachineCurrentDataApi,
getDepartmentAndTeamListApi,
getMockTunnelBoringMachineCurrentDataConfigApi,
saveMockFrontierProtectionNoNetDataConfigApi,
resetMockTunnelBoringMachineCurrentDataConfigApi,
} from "@/assets/js/api/operationManagement";
import { selectDustNoisePageListApi } from "@/assets/js/api/environmentManage";
import {
getWorkerInfoList,
getPageListApi,
getEnterpriseInfoList,
} from "@/assets/js/api/laborPerson";
import {
tunnelBoringMachineCurrentDataPage,
tunnelBoringMachineList,
} from "@/assets/js/api/equipmentCenter/tunnelBoringMachine";
import { nowDate } from "@/util";
import dayjs from "dayjs";
export default {
data: () => ({
// 模拟数据下载弹窗
downSimulateShow: false,
staffSimulateRadio: 50,
staffSimulateList: [
{
staffSimulateId: 50,
staffSimulateName: "人员模拟数据(50)人.zip",
},
{
staffSimulateId: 100,
staffSimulateName: "人员模拟数据(100)人.zip",
},
{
staffSimulateId: 500,
staffSimulateName: "人员模拟数据(500)人.zip",
},
{
staffSimulateId: 1000,
staffSimulateName: "人员模拟数据(1000)人.zip",
},
],
gasTypeList: [
{
gasTypeId: 1,
gasTypeName: "氧气",
},
{
gasTypeId: 2,
gasTypeName: "甲烷",
},
{
gasTypeId: 3,
gasTypeName: "一氧化碳",
},
],
deviceStateList: [
{
deviceStateId: 0,
deviceStateName: "正常",
},
{
deviceStateId: 1,
deviceStateName: "低报警",
},
{
deviceStateId: 2,
deviceStateName: "高报警",
},
{
deviceStateId: 3,
deviceStateName: "超量程",
},
],
cardTypeList: [
{
cardTypeId: 1,
cardTypeName: "布防",
},
{
cardTypeId: 2,
cardTypeName: "撤防",
},
{
cardTypeId: 3,
cardTypeName: "SOS",
},
{
cardTypeId: 4,
cardTypeName: "盗警",
},
{
cardTypeId: 5,
cardTypeName: "交流电故障",
},
],
devGenerateList: [
{
devGenerateId: 1,
devGenerateName: "每日抄表一次",
},
{
devGenerateId: 2,
devGenerateName: "每周抄表一次",
},
{
devGenerateId: 3,
devGenerateName: "每月抄表一次",
},
{
devGenerateId: 4,
devGenerateName: "每年抄表一次",
},
],
scopeData: [
// {
// id: 1,
// label: "舱压(bar)",
// minValue: "",
// maxValue: "",
// },
{
id: 2,
label: "当前环数",
minValue: "",
maxValue: "",
listTableId: "currentNumber",
},
{
id: 3,
label: "月推进环数",
minValue: "",
maxValue: "",
listTableId: "monthNumber",
},
{
id: 4,
label: "水平偏差趋势",
minValue: "",
maxValue: "",
listTableId: "horizontalDeviation",
},
{
id: 5,
label: "刀盘水平偏差(mm)",
minValue: "",
maxValue: "",
listTableId: "cutterheadHorizontalDeviation",
},
{
id: 6,
label: "垂直偏差趋势",
minValue: "",
maxValue: "",
listTableId: "verticalDeviation",
},
{
id: 7,
label: "盾尾垂直偏差(mm)",
minValue: "",
maxValue: "",
listTableId: "shieldVerticalDeviation",
},
{
id: 8,
label: "刀盘扭矩(N·m)",
minValue: "",
maxValue: "",
listTableId: "cutterheadTorque",
},
{
id: 9,
label: "总推力(KN)",
minValue: "",
maxValue: "",
listTableId: "totalThrust",
},
{
id: 10,
label: "刀盘转速(rpm)",
minValue: "",
maxValue: "",
listTableId: "cutterheadSpeed",
},
{
id: 11,
label: "盾尾水平偏差(mm)",
minValue: "",
maxValue: "",
listTableId: "shieldHorizontalDeviation",
},
{
id: 12,
label: "滚动角(°)",
minValue: "",
maxValue: "",
listTableId: "rollPosition",
},
{
id: 13,
label: "已完成里程",
minValue: "",
maxValue: "",
listTableId: "mileageCompleted",
},
// {
// id: 14,
// label: "通讯状态",
// minValue: "",
// maxValue: "",
// },
{
id: 15,
label: "贯入度",
minValue: "",
maxValue: "",
listTableId: "penetration",
},
{
id: 16,
label: "俯仰角(°)",
minValue: "",
maxValue: "",
listTableId: "pitchAngle",
},
{
id: 17,
label: "总推进泵压力(bar)",
minValue: "",
maxValue: "",
listTableId: "totalPropulsion",
},
{
id: 18,
label: "推进速度(mm/min)",
minValue: "",
maxValue: "",
listTableId: "advanceSpeed",
},
],
scopeData1: [
{
id: 1,
label: "A组",
minValue: "",
maxValue: "",
listTableId: "cylinderDisplacementA",
listTableName: "油缸位移(mm)A组"
},
{
id: 2,
label: "B组",
minValue: "",
maxValue: "",
listTableId: "cylinderDisplacementB",
listTableName: "油缸位移(mm)B组"
},
{
id: 3,
label: "C组",
minValue: "",
maxValue: "",
listTableId: "cylinderDisplacementC",
listTableName: "油缸位移(mm)C组"
},
{
id: 4,
label: "D组",
minValue: "",
maxValue: "",
listTableId: "cylinderDisplacementD",
listTableName: "油缸位移(mm)D组"
},
{
id: 5,
label: "E组",
minValue: "",
maxValue: "",
listTableId: "cylinderDisplacementE",
listTableName: "油缸位移(mm)E组"
},
{
id: 6,
label: "F组",
minValue: "",
maxValue: "",
listTableId: "cylinderDisplacementF",
listTableName: "油缸位移(mm)F组"
},
],
scopeData2: [
{
id: 1,
label: "A组",
minValue: "",
maxValue: "",
listTableId: "cylinderPressureA",
listTableName: "油缸压力(bar)A组"
},
{
id: 2,
label: "B组",
minValue: "",
maxValue: "",
listTableId: "cylinderPressureB",
listTableName: "油缸压力(bar)B组"
},
{
id: 3,
label: "C组",
minValue: "",
maxValue: "",
listTableId: "cylinderPressureC",
listTableName: "油缸压力(bar)C组"
},
{
id: 4,
label: "D组",
minValue: "",
maxValue: "",
listTableId: "cylinderPressureD",
listTableName: "油缸压力(bar)D组"
},
{
id: 5,
label: "E组",
minValue: "",
maxValue: "",
listTableId: "cylinderPressureE",
listTableName: "油缸压力(bar)E组"
},
{
id: 6,
label: "F组",
minValue: "",
maxValue: "",
listTableId: "cylinderPressureF",
listTableName: "油缸压力(bar)F组"
},
],
scopeData3: [
{
id: 1,
label: "正上",
minValue: "",
maxValue: "",
listTableId: "upCabinPressure",
listTableName: "舱压(bar)正上"
},
{
id: 2,
label: "左上",
minValue: "",
maxValue: "",
listTableId: "leftUpCabinPressure",
listTableName: "舱压(bar)左上"
},
{
id: 3,
label: "左中",
minValue: "",
maxValue: "",
listTableId: "leftCenterCabinPressure",
listTableName: "舱压(bar)左中"
},
{
id: 4,
label: "左下",
minValue: "",
maxValue: "",
listTableId: "leftBelowCabinPressure",
listTableName: "舱压(bar)左下"
},
{
id: 5,
label: "右上",
minValue: "",
maxValue: "",
listTableId: "rightUpCabinPressure",
listTableName: "舱压(bar)右上"
},
{
id: 6,
label: "右中",
minValue: "",
maxValue: "",
listTableId: "rightCenterCabinPressure",
listTableName: "舱压(bar)右中"
},
{
id: 7,
label: "右下",
minValue: "",
maxValue: "",
listTableId: "rightBelowCabinPressure",
listTableName: "舱压(bar)右下"
},
],
scopeData4: [
{
id: 1,
label: "左上",
minValue: "",
maxValue: "",
listTableId: "leftUpGroutingPressure",
listTableName: "舱压(bar)左上"
},
{
id: 2,
label: "左中",
minValue: "",
maxValue: "",
listTableId: "leftCenterGroutingPressure",
listTableName: "舱压(bar)左中"
},
{
id: 3,
label: "左下",
minValue: "",
maxValue: "",
listTableId: "leftBelowGroutingPressure",
listTableName: "舱压(bar)左下"
},
{
id: 4,
label: "右上",
minValue: "",
maxValue: "",
listTableId: "rightUpGroutingPressure",
listTableName: "舱压(bar)右上"
},
{
id: 5,
label: "右中",
minValue: "",
maxValue: "",
listTableId: "rightCenterGroutingPressure",
listTableName: "舱压(bar)右中"
},
{
id: 6,
label: "右下",
minValue: "",
maxValue: "",
listTableId: "rightBelowGroutingPressure",
listTableName: "舱压(bar)右下"
},
],
checkAll: false,
isIndeterminate: true,
ruleConfigLoading: false,
isDepartmentTeamList: [],
personList: [],
allUfaceDev: [],
// 演示数据生成弹窗
ruleConfigShow: false,
ruleConfigForm: {
devSns: [],
devGenerateNum: "",
startTime: "",
endTime: "",
degreeBegin: "",
degreeEnd: "",
gasTypes: [],
alarmTypes: [],
},
ruleConfigFormRules: {
devSns: [
{
type: "array",
required: true,
message: "请至少选择一个设备",
trigger: "change",
},
],
devGenerateNum: [{ required: true, message: "请输入数据量", trigger: "blur" }],
startTime: [
{
required: true,
message: "请选择模拟开始时间",
trigger: "change",
},
],
endTime: [
{
required: true,
message: "请选择模拟结束时间",
trigger: "change",
},
],
gasTypes: [
{
type: "array",
required: true,
message: "请至少选择一个气体类型",
trigger: "change",
},
],
alarmTypes: [
{
type: "array",
required: true,
message: "请至少选择一个报警状态",
trigger: "change",
},
],
},
// 3 衢州版 2 星璇版 1 正常版本
styleType: "",
// 项目SN
projectSn: "",
// 弹窗标题
title: "",
// 控制弹窗的打开与关闭
open: false,
// 遮罩层
loading: false,
// 当前激活的项目
activeIndex: 0,
// 项目列表
operationList: [
{
operationId: 1,
operationName: "实时数据",
},
],
// 总条数
total: 0,
// 用户数据
userList: [],
// 班组列表选项
teamOptions: [],
// 部门列表选项
departmentOptions: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
projectSn: undefined, // 项目SN
enterpriseId: undefined, // 企业ID
reportTime: [], // 报警时间
devSn: "",
},
editForm: {},
editFormRules: {
deviceSn: [{ required: true, message: "请选择设备", trigger: "change" }],
gasType: [{ required: true, message: "请选择气体类型", trigger: "change" }],
alarmType: [{ required: true, message: "请选择报警状态", trigger: "change" }],
reportTime: [{ required: true, message: "请选择报警时间", trigger: "change" }],
},
enterpriseListData: [],
scrollbarFlag: false,
}),
computed: {
headers() {
return { Authorization: this.$store.state.userInfo.token };
},
gasTypeUp() {
return (gasType) => {
const resultList = [...this.gasTypeList];
const find = resultList.find((item) => item.gasTypeId == gasType);
return find ? find.gasTypeName : "";
};
},
deviceStateUp() {
return (deviceStatus) => {
const resultList = [...this.deviceStateList];
const find = resultList.find((item) => item.deviceStateId == deviceStatus);
return find ? find.deviceStateName : "";
};
},
},
created() {
this.projectSn = this.$store.state.projectSn;
this.styleType = this.$store.state.userInfo.styleType;
// 查询企业列表
this.getEnterpriseList();
// this.getPersonListFn();
this.getMachineList();
this.getCompanyList();
},
methods: {
handleTimeChange(diffTime, type) {
return {
disabledDate: (time) => {
// console.log(time, diffTime, type)
const date1 = dayjs(time);
const date2 = dayjs(diffTime);
if (type == "startTime") {
return date1.diff(date2) > 0 ? true : false;
} else if (type == "endTime") {
return date2.diff(date1) > 0 ? true : false;
}
return false;
},
};
},
handleCheckAllChange(val) {
this.ruleConfigForm.detailStatuses = val
? this.cardTypeList.map((item) => item.cardTypeName)
: [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cardTypeList.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cardTypeList.length;
},
enterpriseChange(enterpriseIds, departmentTeamIds, type) {
getDepartmentAndTeamListApi({
projectSn: this.projectSn,
enterpriseIds:
enterpriseIds instanceof Array ? enterpriseIds.join(",") : enterpriseIds,
}).then((res) => {
if (res.success) {
this.isDepartmentTeamList = res.result;
if (type != 1) {
this.ruleConfigForm.departmentTeamIds = [];
this.editForm.departmentTeamId = "";
}
this.departmentTeamChange(enterpriseIds, departmentTeamIds, type);
}
});
},
departmentTeamChange(enterpriseIds, departmentTeamIds, type) {
let reqeustData = {
projectSn: this.$store.state.projectSn,
};
if (enterpriseIds instanceof Array && departmentTeamIds instanceof Array) {
reqeustData.enterpriseIds = enterpriseIds;
reqeustData.departmentTeamIds = departmentTeamIds;
} else {
reqeustData.enterpriseId = enterpriseIds;
reqeustData.departmentTeamId = departmentTeamIds;
}
getWorkerInfoList(reqeustData).then((res) => {
this.personList = res.result.records;
if (type != 1) {
this.ruleConfigForm.personSns = [];
this.editForm.personSn = "";
}
});
},
// 演示数据生成弹窗
ruleConfigDialog() {
// this.ruleConfigReset();
getMockTunnelBoringMachineCurrentDataConfigApi({
projectSn: this.projectSn,
}).then((res) => {
if (res.success) {
if (res.result instanceof Array && res.result.length > 0) {
const result = res.result[0];
this.ruleConfigForm = {
...result,
devSns: result.devSns ? result.devSns.split(",") : [],
gasTypes: result.gasTypes ? result.gasTypes.split(",") : [],
alarmTypes: result.alarmTypes ? result.alarmTypes.split(",") : [],
};
this.setScopeDataListFn(result);
}
this.$nextTick(() => {
this.$refs["ruleConfigForm"].clearValidate();
});
}
});
this.ruleConfigShow = true;
},
submitRuleConfigForm() {
this.$refs["ruleConfigForm"].validate((valid) => {
if (!valid) return;
this.ruleConfigLoading = true;
const resultScope = this.initScopeDataListFn();
const params = {
...this.ruleConfigForm,
...resultScope,
devSns: this.ruleConfigForm.devSns.join(","),
gasTypes: this.ruleConfigForm.gasTypes.join(","),
alarmTypes: this.ruleConfigForm.alarmTypes.join(","),
projectSn: this.projectSn,
};
mockDataTunnelBoringMachineCurrentDataApi(params)
.then((res) => {
if (res.success) {
this.$message.success(res.message);
this.getList();
this.ruleConfigShow = false;
}
})
.finally(() => {
this.ruleConfigLoading = false;
});
});
},
initScopeDataListFn() {
const currentNumber = this.scopeData.find((item) => item.label == "当前环数");
const monthNumber = this.scopeData.find((item) => item.label == "月推进环数");
const horizontalDeviation = this.scopeData.find(
(item) => item.label == "水平偏差趋势"
);
const cutterheadHorizontalDeviation = this.scopeData.find(
(item) => item.label == "刀盘水平偏差(mm)"
);
const verticalDeviation = this.scopeData.find(
(item) => item.label == "垂直偏差趋势"
);
const shieldVerticalDeviation = this.scopeData.find(
(item) => item.label == "盾尾垂直偏差(mm)"
);
const cutterheadTorque = this.scopeData.find(
(item) => item.label == "刀盘扭矩(N·m)"
);
const totalThrust = this.scopeData.find((item) => item.label == "总推力(KN)");
const cutterheadSpeed = this.scopeData.find(
(item) => item.label == "刀盘转速(rpm)"
);
const shieldHorizontalDeviation = this.scopeData.find(
(item) => item.label == "盾尾水平偏差(mm)"
);
const rollPosition = this.scopeData.find((item) => item.label == "滚动角(°)");
const mileageCompleted = this.scopeData.find((item) => item.label == "已完成里程");
const penetration = this.scopeData.find((item) => item.label == "贯入度");
const pitchAngle = this.scopeData.find((item) => item.label == "俯仰角(°)");
const totalPropulsion = this.scopeData.find(
(item) => item.label == "总推进泵压力(bar)"
);
const advanceSpeed = this.scopeData.find(
(item) => item.label == "推进速度(mm/min)"
);
const cylinderDisplacementA = this.scopeData1.find((item) => item.label == "A组");
const cylinderDisplacementB = this.scopeData1.find((item) => item.label == "B组");
const cylinderDisplacementC = this.scopeData1.find((item) => item.label == "C组");
const cylinderDisplacementD = this.scopeData1.find((item) => item.label == "D组");
const cylinderDisplacementE = this.scopeData1.find((item) => item.label == "E组");
const cylinderDisplacementF = this.scopeData1.find((item) => item.label == "F组");
const cylinderPressureA = this.scopeData2.find((item) => item.label == "A组");
const cylinderPressureB = this.scopeData2.find((item) => item.label == "B组");
const cylinderPressureC = this.scopeData2.find((item) => item.label == "C组");
const cylinderPressureD = this.scopeData2.find((item) => item.label == "D组");
const cylinderPressureE = this.scopeData2.find((item) => item.label == "E组");
const cylinderPressureF = this.scopeData2.find((item) => item.label == "F组");
const upCabinPressure = this.scopeData3.find((item) => item.label == "正上");
const leftUpCabinPressure = this.scopeData3.find((item) => item.label == "左上");
const leftCenterCabinPressure = this.scopeData3.find(
(item) => item.label == "左中"
);
const leftBelowCabinPressure = this.scopeData3.find((item) => item.label == "左下");
const rightUpCabinPressure = this.scopeData3.find((item) => item.label == "右上");
const rightCenterCabinPressure = this.scopeData3.find(
(item) => item.label == "右中"
);
const rightBelowCabinPressure = this.scopeData3.find(
(item) => item.label == "右下"
);
const leftUpGroutingPressure = this.scopeData4.find((item) => item.label == "左上");
const leftCenterGroutingPressure = this.scopeData4.find(
(item) => item.label == "左中"
);
const leftBelowGroutingPressure = this.scopeData4.find(
(item) => item.label == "左下"
);
const rightUpGroutingPressure = this.scopeData4.find(
(item) => item.label == "右上"
);
const rightCenterGroutingPressure = this.scopeData4.find(
(item) => item.label == "右中"
);
const rightBelowGroutingPressure = this.scopeData4.find(
(item) => item.label == "右下"
);
return {
currentNumberBegin: currentNumber ? currentNumber.minValue : "",
currentNumberEnd: currentNumber ? currentNumber.maxValue : "",
monthNumberBegin: monthNumber ? monthNumber.minValue : "",
monthNumberEnd: monthNumber ? monthNumber.maxValue : "",
horizontalDeviationBegin: horizontalDeviation ? horizontalDeviation.minValue : "",
horizontalDeviationEnd: horizontalDeviation ? horizontalDeviation.maxValue : "",
cutterheadHorizontalDeviationBegin: cutterheadHorizontalDeviation
? cutterheadHorizontalDeviation.minValue
: "",
cutterheadHorizontalDeviationEnd: cutterheadHorizontalDeviation
? cutterheadHorizontalDeviation.maxValue
: "",
verticalDeviationBegin: verticalDeviation ? verticalDeviation.minValue : "",
verticalDeviationEnd: verticalDeviation ? verticalDeviation.maxValue : "",
shieldVerticalDeviationBegin: shieldVerticalDeviation
? shieldVerticalDeviation.minValue
: "",
shieldVerticalDeviationEnd: shieldVerticalDeviation
? shieldVerticalDeviation.maxValue
: "",
cutterheadTorqueBegin: cutterheadTorque ? cutterheadTorque.minValue : "",
cutterheadTorqueEnd: cutterheadTorque ? cutterheadTorque.maxValue : "",
totalThrustBegin: totalThrust ? totalThrust.minValue : "",
totalThrustEnd: totalThrust ? totalThrust.maxValue : "",
cutterheadSpeedBegin: cutterheadSpeed ? cutterheadSpeed.minValue : "",
cutterheadSpeedEnd: cutterheadSpeed ? cutterheadSpeed.maxValue : "",
shieldHorizontalDeviationBegin: shieldHorizontalDeviation
? shieldHorizontalDeviation.minValue
: "",
shieldHorizontalDeviationEnd: shieldHorizontalDeviation
? shieldHorizontalDeviation.maxValue
: "",
rollPositionBegin: rollPosition ? rollPosition.minValue : "",
rollPositionEnd: rollPosition ? rollPosition.maxValue : "",
mileageCompletedBegin: mileageCompleted ? mileageCompleted.minValue : "",
mileageCompletedEnd: mileageCompleted ? mileageCompleted.maxValue : "",
penetrationBegin: penetration ? penetration.minValue : "",
penetrationEnd: penetration ? penetration.maxValue : "",
pitchAngleBegin: pitchAngle ? pitchAngle.minValue : "",
pitchAngleEnd: pitchAngle ? pitchAngle.maxValue : "",
totalPropulsionBegin: totalPropulsion ? totalPropulsion.minValue : "",
totalPropulsionEnd: totalPropulsion ? totalPropulsion.maxValue : "",
advanceSpeedBegin: advanceSpeed ? advanceSpeed.minValue : "",
advanceSpeedEnd: advanceSpeed ? advanceSpeed.maxValue : "",
cylinderDisplacementABegin: cylinderDisplacementA
? cylinderDisplacementA.minValue
: "",
cylinderDisplacementBEnd: cylinderDisplacementB
? cylinderDisplacementB.maxValue
: "",
cylinderDisplacementCBegin: cylinderDisplacementC
? cylinderDisplacementC.minValue
: "",
cylinderDisplacementCEnd: cylinderDisplacementC
? cylinderDisplacementC.maxValue
: "",
cylinderDisplacementDBegin: cylinderDisplacementD
? cylinderDisplacementD.minValue
: "",
cylinderDisplacementDEnd: cylinderDisplacementD
? cylinderDisplacementD.maxValue
: "",
cylinderDisplacementEBegin: cylinderDisplacementE
? cylinderDisplacementE.minValue
: "",
cylinderDisplacementEEnd: cylinderDisplacementE
? cylinderDisplacementE.maxValue
: "",
cylinderDisplacementFBegin: cylinderDisplacementF
? cylinderDisplacementF.minValue
: "",
cylinderDisplacementFEnd: cylinderDisplacementF
? cylinderDisplacementF.maxValue
: "",
cylinderPressureABegin: cylinderPressureA ? cylinderPressureA.minValue : "",
cylinderPressureBEnd: cylinderPressureB ? cylinderPressureB.maxValue : "",
cylinderPressureCBegin: cylinderPressureC ? cylinderPressureC.minValue : "",
cylinderPressureCEnd: cylinderPressureC ? cylinderPressureC.maxValue : "",
cylinderPressureDBegin: cylinderPressureD ? cylinderPressureD.minValue : "",
cylinderPressureDEnd: cylinderPressureD ? cylinderPressureD.maxValue : "",
cylinderPressureEBegin: cylinderPressureE ? cylinderPressureE.minValue : "",
cylinderPressureEEnd: cylinderPressureE ? cylinderPressureE.maxValue : "",
cylinderPressureFBegin: cylinderPressureF ? cylinderPressureF.minValue : "",
cylinderPressureFEnd: cylinderPressureF ? cylinderPressureF.maxValue : "",
upCabinPressureBegin: upCabinPressure ? upCabinPressure.minValue : "",
upCabinPressureEnd: upCabinPressure ? upCabinPressure.maxValue : "",
leftUpCabinPressureBegin: leftUpCabinPressure ? leftUpCabinPressure.minValue : "",
leftUpCabinPressureEnd: leftUpCabinPressure ? leftUpCabinPressure.maxValue : "",
leftCenterCabinPressureBegin: leftCenterCabinPressure
? leftCenterCabinPressure.minValue
: "",
leftCenterCabinPressureEnd: leftCenterCabinPressure
? leftCenterCabinPressure.maxValue
: "",
leftBelowCabinPressureBegin: leftBelowCabinPressure
? leftBelowCabinPressure.minValue
: "",
leftBelowCabinPressureEnd: leftBelowCabinPressure
? leftBelowCabinPressure.maxValue
: "",
rightUpCabinPressureBegin: rightUpCabinPressure
? rightUpCabinPressure.minValue
: "",
rightCenterCabinPressureBegin: rightCenterCabinPressure
? rightCenterCabinPressure.minValue
: "",
rightCenterCabinPressureEnd: rightCenterCabinPressure
? rightCenterCabinPressure.maxValue
: "",
rightBelowCabinPressureBegin: rightBelowCabinPressure
? rightBelowCabinPressure.minValue
: "",
rightBelowCabinPressureEnd: rightBelowCabinPressure
? rightBelowCabinPressure.maxValue
: "",
leftUpGroutingPressureBegin: leftUpGroutingPressure
? leftUpGroutingPressure.minValue
: "",
leftUpGroutingPressureEnd: leftUpGroutingPressure
? leftUpGroutingPressure.maxValue
: "",
leftCenterGroutingPressureBegin: leftCenterGroutingPressure
? leftCenterGroutingPressure.minValue
: "",
leftCenterGroutingPressureEnd: leftCenterGroutingPressure
? leftCenterGroutingPressure.maxValue
: "",
leftBelowGroutingPressureBegin: leftBelowGroutingPressure
? leftBelowGroutingPressure.minValue
: "",
leftBelowGroutingPressureEnd: leftBelowGroutingPressure
? leftBelowGroutingPressure.maxValue
: "",
rightUpGroutingPressureBegin: rightUpGroutingPressure
? rightUpGroutingPressure.minValue
: "",
rightCenterGroutingPressureBegin: rightCenterGroutingPressure
? rightCenterGroutingPressure.minValue
: "",
rightBelowGroutingPressureBegin: rightBelowGroutingPressure
? rightBelowGroutingPressure.minValue
: "",
rightBelowGroutingPressureEnd: rightBelowGroutingPressure
? rightBelowGroutingPressure.maxValue
: "",
};
},
setScopeDataListFn(row) {
const currentNumber = this.scopeData.find((item) => item.label == "当前环数");
if (currentNumber) {
currentNumber.minValue = row.currentNumberBegin;
currentNumber.maxValue = row.currentNumberEnd;
}
const monthNumber = this.scopeData.find((item) => item.label == "月推进环数");
if (monthNumber) {
monthNumber.minValue = row.monthNumberBegin;
monthNumber.maxValue = row.monthNumberEnd;
}
const horizontalDeviation = this.scopeData.find(
(item) => item.label == "水平偏差趋势"
);
if (horizontalDeviation) {
horizontalDeviation.minValue = row.horizontalDeviationBegin;
horizontalDeviation.maxValue = row.horizontalDeviationEnd;
}
const cutterheadHorizontalDeviation = this.scopeData.find(
(item) => item.label == "刀盘水平偏差(mm)"
);
if (cutterheadHorizontalDeviation) {
cutterheadHorizontalDeviation.minValue = row.cutterheadHorizontalDeviationBegin;
cutterheadHorizontalDeviation.maxValue = row.cutterheadHorizontalDeviationEnd;
}
const verticalDeviation = this.scopeData.find(
(item) => item.label == "垂直偏差趋势"
);
if (verticalDeviation) {
verticalDeviation.minValue = row.verticalDeviationBegin;
verticalDeviation.maxValue = row.verticalDeviationEnd;
}
const shieldVerticalDeviation = this.scopeData.find(
(item) => item.label == "盾尾垂直偏差(mm)"
);
if (shieldVerticalDeviation) {
shieldVerticalDeviation.minValue = row.shieldVerticalDeviationBegin;
shieldVerticalDeviation.maxValue = row.shieldVerticalDeviationEnd;
}
const cutterheadTorque = this.scopeData.find(
(item) => item.label == "刀盘扭矩(N·m)"
);
if (cutterheadTorque) {
cutterheadTorque.minValue = row.cutterheadTorqueBegin;
cutterheadTorque.maxValue = row.cutterheadTorqueEnd;
}
const totalThrust = this.scopeData.find((item) => item.label == "总推力(KN)");
if (totalThrust) {
totalThrust.minValue = row.totalThrustBegin;
totalThrust.maxValue = row.totalThrustEnd;
}
const cutterheadSpeed = this.scopeData.find(
(item) => item.label == "刀盘转速(rpm)"
);
if (cutterheadSpeed) {
cutterheadSpeed.minValue = row.cutterheadSpeedBegin;
cutterheadSpeed.maxValue = row.cutterheadSpeedEnd;
}
const shieldHorizontalDeviation = this.scopeData.find(
(item) => item.label == "盾尾水平偏差(mm)"
);
if (shieldHorizontalDeviation) {
shieldHorizontalDeviation.minValue = row.shieldHorizontalDeviationBegin;
shieldHorizontalDeviation.maxValue = row.shieldHorizontalDeviationEnd;
}
const rollPosition = this.scopeData.find((item) => item.label == "滚动角(°)");
if (rollPosition) {
rollPosition.minValue = row.rollPositionBegin;
rollPosition.maxValue = row.rollPositionEnd;
}
const mileageCompleted = this.scopeData.find((item) => item.label == "已完成里程");
if (mileageCompleted) {
mileageCompleted.minValue = row.mileageCompletedBegin;
mileageCompleted.maxValue = row.mileageCompletedEnd;
}
const penetration = this.scopeData.find((item) => item.label == "贯入度");
if (penetration) {
penetration.minValue = row.penetrationBegin;
penetration.maxValue = row.penetrationEnd;
}
const pitchAngle = this.scopeData.find((item) => item.label == "俯仰角(°)");
if (pitchAngle) {
pitchAngle.minValue = row.pitchAngleBegin;
pitchAngle.maxValue = row.pitchAngleEnd;
}
const totalPropulsion = this.scopeData.find(
(item) => item.label == "总推进泵压力(bar)"
);
if (totalPropulsion) {
totalPropulsion.minValue = row.totalPropulsionBegin;
totalPropulsion.maxValue = row.totalPropulsionEnd;
}
const advanceSpeed = this.scopeData.find(
(item) => item.label == "推进速度(mm/min)"
);
if (advanceSpeed) {
advanceSpeed.minValue = row.advanceSpeedBegin;
advanceSpeed.maxValue = row.advanceSpeedEnd;
}
const cylinderDisplacementA = this.scopeData1.find((item) => item.label == "A组");
if (cylinderDisplacementA) {
cylinderDisplacementA.minValue = row.cylinderDisplacementABegin;
cylinderDisplacementA.maxValue = row.cylinderDisplacementAEnd;
}
const cylinderDisplacementB = this.scopeData1.find((item) => item.label == "B组");
if (cylinderDisplacementB) {
cylinderDisplacementB.minValue = row.cylinderDisplacementBBegin;
cylinderDisplacementB.maxValue = row.cylinderDisplacementBEnd;
}
const cylinderDisplacementC = this.scopeData1.find((item) => item.label == "C组");
if (cylinderDisplacementC) {
cylinderDisplacementC.minValue = row.cylinderDisplacementCBegin;
cylinderDisplacementC.maxValue = row.cylinderDisplacementCEnd;
}
const cylinderDisplacementD = this.scopeData1.find((item) => item.label == "D组");
if (cylinderDisplacementD) {
cylinderDisplacementD.minValue = row.cylinderDisplacementDBegin;
cylinderDisplacementD.maxValue = row.cylinderDisplacementDEnd;
}
const cylinderDisplacementE = this.scopeData1.find((item) => item.label == "E组");
if (cylinderDisplacementE) {
cylinderDisplacementE.minValue = row.cylinderDisplacementEBegin;
cylinderDisplacementE.maxValue = row.cylinderDisplacementEEnd;
}
const cylinderDisplacementF = this.scopeData1.find((item) => item.label == "F组");
if (cylinderDisplacementF) {
cylinderDisplacementF.minValue = row.cylinderDisplacementFBegin;
cylinderDisplacementF.maxValue = row.cylinderDisplacementFEnd;
}
const cylinderPressureA = this.scopeData2.find((item) => item.label == "A组");
if (cylinderPressureA) {
cylinderPressureA.minValue = row.cylinderPressureABegin;
cylinderPressureA.maxValue = row.cylinderPressureAEnd;
}
const cylinderPressureB = this.scopeData2.find((item) => item.label == "B组");
if (cylinderPressureB) {
cylinderPressureB.minValue = row.cylinderPressureBBegin;
cylinderPressureB.maxValue = row.cylinderPressureBEnd;
}
const cylinderPressureC = this.scopeData2.find((item) => item.label == "C组");
if (cylinderPressureC) {
cylinderPressureC.minValue = row.cylinderPressureCBegin;
cylinderPressureC.maxValue = row.cylinderPressureCEnd;
}
const cylinderPressureD = this.scopeData2.find((item) => item.label == "D组");
if (cylinderPressureD) {
cylinderPressureD.minValue = row.cylinderPressureDBegin;
cylinderPressureD.maxValue = row.cylinderPressureDEnd;
}
const cylinderPressureE = this.scopeData2.find((item) => item.label == "E组");
if (cylinderPressureE) {
cylinderPressureE.minValue = row.cylinderPressureEBegin;
cylinderPressureE.maxValue = row.cylinderPressureEEnd;
}
const cylinderPressureF = this.scopeData2.find((item) => item.label == "F组");
if (cylinderPressureF) {
cylinderPressureF.minValue = row.cylinderPressureFBegin;
cylinderPressureF.maxValue = row.cylinderPressureFEnd;
}
const upCabinPressure = this.scopeData3.find((item) => item.label == "正上");
if (upCabinPressure) {
upCabinPressure.minValue = row.upCabinPressureBegin;
upCabinPressure.maxValue = row.upCabinPressureEnd;
}
const leftUpCabinPressure = this.scopeData3.find((item) => item.label == "左上");
if (leftUpCabinPressure) {
leftUpCabinPressure.minValue = row.leftUpCabinPressureBegin;
leftUpCabinPressure.maxValue = row.leftUpCabinPressureEnd;
}
const leftCenterCabinPressure = this.scopeData3.find(
(item) => item.label == "左中"
);
if (leftCenterCabinPressure) {
leftCenterCabinPressure.minValue = row.leftCenterCabinPressureBegin;
leftCenterCabinPressure.maxValue = row.leftCenterCabinPressureEnd;
}
const leftBelowCabinPressure = this.scopeData3.find((item) => item.label == "左下");
if (leftBelowCabinPressure) {
leftBelowCabinPressure.minValue = row.leftBelowCabinPressureBegin;
leftBelowCabinPressure.maxValue = row.leftBelowCabinPressureEnd;
}
const rightUpCabinPressure = this.scopeData3.find((item) => item.label == "右上");
if (rightUpCabinPressure) {
rightUpCabinPressure.minValue = row.rightUpCabinPressureBegin;
rightUpCabinPressure.maxValue = row.rightUpCabinPressureEnd;
}
const rightCenterCabinPressure = this.scopeData3.find(
(item) => item.label == "右中"
);
if (rightCenterCabinPressure) {
rightCenterCabinPressure.minValue = row.rightCenterCabinPressureBegin;
rightCenterCabinPressure.maxValue = row.rightCenterCabinPressureEnd;
}
const rightBelowCabinPressure = this.scopeData3.find(
(item) => item.label == "右下"
);
if (rightBelowCabinPressure) {
rightBelowCabinPressure.minValue = row.rightBelowCabinPressureBegin;
rightBelowCabinPressure.maxValue = row.rightBelowCabinPressureEnd;
}
const leftUpGroutingPressure = this.scopeData4.find((item) => item.label == "左上");
if (leftUpGroutingPressure) {
leftUpGroutingPressure.minValue = row.leftUpGroutingPressureBegin;
leftUpGroutingPressure.maxValue = row.leftUpGroutingPressureEnd;
}
const leftCenterGroutingPressure = this.scopeData4.find(
(item) => item.label == "左中"
);
if (leftCenterGroutingPressure) {
leftCenterGroutingPressure.minValue = row.leftCenterGroutingPressureBegin;
leftCenterGroutingPressure.maxValue = row.leftCenterGroutingPressureEnd;
}
const leftBelowGroutingPressure = this.scopeData4.find(
(item) => item.label == "左下"
);
if (leftBelowGroutingPressure) {
leftBelowGroutingPressure.minValue = row.leftBelowGroutingPressureBegin;
leftBelowGroutingPressure.maxValue = row.leftBelowGroutingPressureEnd;
}
const rightUpGroutingPressure = this.scopeData4.find(
(item) => item.label == "右上"
);
if (rightUpGroutingPressure) {
rightUpGroutingPressure.minValue = row.rightUpGroutingPressureBegin;
rightUpGroutingPressure.maxValue = row.rightUpGroutingPressureEnd;
}
const rightCenterGroutingPressure = this.scopeData4.find(
(item) => item.label == "右中"
);
if (rightCenterGroutingPressure) {
rightCenterGroutingPressure.minValue = row.rightCenterGroutingPressureBegin;
rightCenterGroutingPressure.maxValue = row.rightCenterGroutingPressureEnd;
}
const rightBelowGroutingPressure = this.scopeData4.find(
(item) => item.label == "右下"
);
if (rightBelowGroutingPressure) {
rightBelowGroutingPressure.minValue = row.rightBelowGroutingPressureBegin;
rightBelowGroutingPressure.maxValue = row.rightBelowGroutingPressureEnd;
}
},
ruleConfigCancel() {
// this.ruleConfigReset();
this.ruleConfigShow = false;
},
// 表单重置
ruleConfigReset() {
// this.ruleConfigForm = {
// devSns: [],
// devGenerateNum: "",
// startTime: "",
// endTime: "",
// detailStatuses: []
// };
// this.resetForm("ruleConfigForm");
const params = {
// ...this.ruleConfigForm,
// devSns: this.ruleConfigForm.devSns.join(","),
// deviceStatuses: this.ruleConfigForm.deviceStatuses.join(","),
// detailStatuses: this.ruleConfigForm.detailStatuses.join(","),
projectSn: this.projectSn,
};
// saveMockFrontierProtectionNoNetDataConfigApi
resetMockTunnelBoringMachineCurrentDataConfigApi(params).then((res) => {
if (res.success) {
this.$message.success(res.message);
// this.ruleConfigShow = false;
this.ruleConfigDialog();
}
});
},
// 打卡人员模拟数据弹窗
downSimulateDialog() {
this.downSimulateShow = true;
},
// 下载人员模拟数据
submitDownSimulate() {
this.downSimulateShow = false;
const find = this.staffSimulateList.find(
(item) => item.staffSimulateId === this.staffSimulateRadio
);
exportAttendanceExcel({
workerNum: this.staffSimulateRadio,
projectSn: this.projectSn,
fetchName: find ? find.staffSimulateName : "",
url: "xmgl/workerInfo/downloadMockWorkerInfo",
}).then((res) => {
window.open(res.result);
});
},
getPersonListFn() {
let reqeustData = {
projectSn: this.$store.state.projectSn,
enterpriseId: "",
};
getWorkerInfoList(reqeustData).then((res) => {
this.personList = res.result.records;
});
},
//获取所有的闸机设备
getMachineList() {
tunnelBoringMachineList({ projectSn: this.$store.state.projectSn }).then((list) => {
this.allUfaceDev = list.result;
});
},
// 批量删除考勤人员
deleteAttendanceBatch() {
if (this.$refs.multipleTable.selection.length === 0)
return this.$message.warning("请勾选需要删除的数据!");
this.$confirm("删除后操作不可恢复,请谨慎操作!", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const ids = this.$refs.multipleTable.selection.map((item) => item.id).join(",");
console.log(this.$refs.multipleTable.selection);
deleteBatchTunnelBoringMachineCurrentDataApi({ ids }).then((res) => {
this.getList();
});
})
.catch(() => {});
},
/** 查询企业列表 */
getEnterpriseList() {
const params = {
projectSn: this.projectSn,
enterpriseName: undefined,
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId,
enterpriseTypeId: undefined,
};
enterpriseList(params).then((res) => {
// 查询数据
this.getList();
// 查询班组列表
this.getTeamList();
// 查询部门列表
this.getDepartmentList();
});
},
/** 查询用户数据 */
getList() {
this.loading = true;
this.queryParams.projectSn = this.projectSn;
tunnelBoringMachineCurrentDataPage({
projectSn: this.projectSn,
pageNo: this.queryParams.pageNo,
pageSize: this.queryParams.pageSize,
deviceSn: this.queryParams.devSn,
reportTime_begin:
this.queryParams.reportTime.length > 0
? dayjs(this.queryParams.reportTime[0]).format("YYYY-MM-DD 00:00:00")
: "",
reportTime_end:
this.queryParams.reportTime.length > 0
? dayjs(this.queryParams.reportTime[1]).format("YYYY-MM-DD 23:59:59")
: "",
mockDesc: 1,
// isMock: this.queryParams.enterpriseId == 2 ? 1 : "",
}).then(({ result }) => {
console.log("查询用户数据: ", result);
this.userList = result.records;
this.total = result.total - 0;
this.$nextTick(() => {
this.scrollbarFn();
});
this.loading = false;
});
},
scrollbarFn() {
const div = document.querySelector(".table-box .el-table__body-wrapper");
if (div.scrollHeight > div.clientHeight) {
this.scrollbarFlag = true;
} else {
this.scrollbarFlag = false;
}
},
//获取所属 企业下拉
getCompanyList() {
let data = {
projectSn: this.projectSn,
enterpriseName: "",
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId,
};
getEnterpriseInfoList(data).then((res) => {
this.enterpriseListData = res.result;
});
},
/** 查询班组列表 */
getTeamList() {
const params = {
// enterpriseId: this.queryParams.enterpriseId,
projectSn: this.projectSn,
};
teamList(params).then((res) => {
console.log("查询班组列表: ", res);
this.teamOptions = res.result.list;
// this.isDepartmentTeamList = [...this.isDepartmentTeamList, ...res.result.list];
});
},
/** 查询部门列表 */
getDepartmentList() {
const params = {
// enterpriseId: this.queryParams.enterpriseId,
projectSn: this.projectSn,
};
departmentList(params).then((res) => {
console.log("查询部门列表: ", res);
this.departmentOptions = res.result.list;
// this.isDepartmentTeamList = [...this.isDepartmentTeamList, ...res.result.list];
});
},
/** 项目列表 点击操作 */
handleItemClick(index) {
if (this.activeIndex == index) return;
this.activeIndex = index;
this.queryParams.pageNo = 1;
this.getList();
// this.getTeamList();
// this.getDepartmentList();
},
// 表单重置
reset() {
this.editForm = {
deviceSn: "",
reportTime: "",
gasType: "",
temperature: "",
humidity: "",
alarmType: "",
};
this.scopeData.forEach((item) => {
this.$set(this.editForm, item.listTableId, "");
});
this.scopeData1.forEach((item) => {
this.$set(this.editForm, item.listTableId, "");
});
this.scopeData2.forEach((item) => {
this.$set(this.editForm, item.listTableId, "");
});
this.scopeData3.forEach((item) => {
this.$set(this.editForm, item.listTableId, "");
});
this.scopeData4.forEach((item) => {
this.$set(this.editForm, item.listTableId, "");
});
this.resetForm("editForm");
},
/** 查询 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
handleRefresh() {
this.queryParams.pageNo = 1;
this.queryParams.devSn = "";
this.queryParams.reportTime = [];
this.getList();
},
/** 导出 */
handleExport() {
let params = {
projectSn: this.projectSn,
teamName: this.queryParams.teamName,
departmentId: this.queryParams.departmentId,
payStatus: this.queryParams.payStatus,
payMonth: this.queryParams.payMonth,
enterpriseId: this.queryParams.enterpriseId,
};
exportSalaryPdf(params);
},
/** 导出Excel */
handleExportExcel() {
let params = {
projectSn: this.projectSn,
teamName: this.queryParams.teamName,
departmentId: this.queryParams.departmentId,
payStatus: this.queryParams.payStatus,
payMonth: this.queryParams.payMonth,
enterpriseId: this.queryParams.enterpriseId,
};
// console.log('导出参数',params)
exportSalaryExcel(params);
},
handleUploadSuccess(res) {
console.log("导入成功");
if (res.code == 200) {
this.$message.success(res.message);
this.getEnterpriseList();
this.$refs.upload.clearFiles();
} else {
this.$message.error(res.message);
}
},
handleUploadError() {
this.$message.error("导入失败");
},
// 删除人员考勤
handleDelete(row) {
this.$confirm("删除后操作不可恢复,请谨慎操作!", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteBatchTunnelBoringMachineCurrentDataApi({ ids: row.id }).then((res) => {
this.getList();
});
})
.catch(() => {});
},
/** 编辑 || 更新 */
handleUpdate(row) {
this.reset();
this.editForm = Object.assign(this.editForm, row);
console.log("this.editForm: ", this.editForm);
this.open = true;
},
/** 取消按钮 */
cancel() {
this.reset();
this.open = false;
},
/** 提交按钮 */
submitForm: function () {
this.$refs["editForm"].validate((valid) => {
if (!valid) return;
const params = {
...this.editForm,
projectSn: this.projectSn,
};
editTunnelBoringMachineCurrentDataApi(params).then((res) => {
this.getList();
this.cancel();
});
});
},
handleAvatarSuccess(res, file) {
if (res.status == "SUCCESS") {
this.editForm.fileList.push({
name: file.response.data[0].imageUrl,
url: this.$store.state.FILEURL + file.response.data[0].imageUrl,
});
}
},
handleExceed(files, fileList) {
this.$message.warning(
this.$t("message.docManage.dialog_upload_files.limitingChoice")
);
},
handleDeleteDialog(file, fileList) {
this.editForm.fileList = fileList;
},
},
};
</script>
<style lang="scss">
.text_hint {
width: 280px;
}
</style>
<style lang="scss" scoped>
:deep(.edit_form_main) {
.el-form-item {
width: 50%;
}
.el-input {
width: 220px !important;
}
}
:deep(.el-table__empty-block) {
width: 100% !important;
.el-empty__description {
margin-top: 0px;
p {
line-height: 30px;
}
}
}
:deep(.el-table__fixed-right) {
bottom: 0 !important;
right: 0 !important;
}
.scrollbar-exists :deep(.el-table__fixed-right) {
right: 4px !important;
}
.flex {
display: flex;
}
.ruleConfig_box :deep(.el-dialog__title) {
font-weight: bold;
}
.mr_8 {
margin-right: 8px;
}
.ml_8 {
margin-left: 8px;
}
.el-input {
width: 220px;
}
.ruleconfig_staff {
display: flex;
// flex-direction: column;
flex-wrap: wrap;
// align-content: center;
.el-input-number {
width: 70px;
}
.el-input {
width: 164px;
}
> div:nth-child(n + 3) {
margin-top: 12px;
}
.ruleconfig_staff_title {
width: 100%;
font-weight: bold;
padding-left: 80px;
}
}
.simulate_box {
display: flex;
flex-direction: column;
padding-left: 80px;
.el-radio {
line-height: 30px;
}
}
.el-icon-question {
margin-left: 5px;
}
.payoff {
display: flex;
width: 100%;
height: 100%;
.left-col {
width: calc(10% - 20px);
padding-top: 20px;
margin-right: 20px;
height: 100%;
background-color: #fff;
// 工程列表
.list-wrapper {
box-sizing: border-box;
height: 100%;
border-top: 2px solid #f3f5fd;
}
.list-item {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 45px;
padding: 10px 20px;
cursor: pointer;
transition: all 0.3s ease-in;
background-color: #fff;
border-left: 3px solid transparent;
border-bottom: 2px solid #f3f5fd;
}
.list-item.is-active {
width: 100%;
box-sizing: border-box;
// border-left-color: #0e74d6;
// background-color: #f3f6fd;
border-left-color: #4e7cff;
color: #4e7cff;
background-color: rgba(78, 124, 255, 0.25) !important;
}
}
.right-col {
width: 90%;
height: 100%;
.top-col,
.bottom-col {
background: #fff;
}
.top-col {
padding: 20px 25px;
width: 100%;
height: 10%;
margin-bottom: 20px;
}
.bottom-col {
width: 100%;
height: calc(90% - 20px);
}
}
}
/* 查询表单 按钮样式 */
// .right-col ::v-deep .el-button {
// border-color: #4e7cff;
// }
.scroll {
overflow-y: auto;
}
.boxBottom {
margin-top: 30px;
}
::v-deep .el-input__inner {
line-height: 1px !important;
}
</style>