2324 lines
73 KiB
Vue
2324 lines
73 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="createDate">
|
|
<el-date-picker
|
|
v-model="queryParams.createDate"
|
|
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/hangingBasketMonitoring',
|
|
}"
|
|
type="primary"
|
|
@click="ruleConfigDialog"
|
|
>演示数据生成</el-button
|
|
>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button
|
|
v-permission="{
|
|
key: 'datchDelete',
|
|
menuPath: '/project/operationManagement/hangingBasketMonitoring',
|
|
}"
|
|
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"
|
|
:key="activeIndex"
|
|
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>
|
|
<template v-if="activeIndex == 0">
|
|
<el-table-column
|
|
width="100"
|
|
label="设备名称"
|
|
align="center"
|
|
prop="devName"
|
|
/>
|
|
<el-table-column
|
|
width="100"
|
|
label="上传时间"
|
|
align="center"
|
|
prop="createDate"
|
|
/>
|
|
<el-table-column
|
|
width="100"
|
|
label="底膜高度差(mm)"
|
|
align="center"
|
|
prop="bottomFilmHeightDifference"
|
|
/>
|
|
<el-table-column
|
|
width="100"
|
|
label="底膜高度左(mm)"
|
|
align="center"
|
|
prop="bottomFilmHeightLeft"
|
|
/>
|
|
<el-table-column
|
|
width="100"
|
|
label="底膜高度右(mm)"
|
|
align="center"
|
|
prop="bottomFilmHeightRight"
|
|
/>
|
|
<el-table-column
|
|
width="100"
|
|
label="左后梁锚杆(kN)"
|
|
align="center"
|
|
prop="leftRearBeamAnchor"
|
|
/>
|
|
<el-table-column
|
|
width="100"
|
|
label="倾角"
|
|
align="center"
|
|
prop="inclination"
|
|
/>
|
|
<el-table-column
|
|
width="100"
|
|
label="风速(m/s)"
|
|
align="center"
|
|
prop="windSpeed"
|
|
/>
|
|
<el-table-column
|
|
width="100"
|
|
label="右后梁锚杆(kN)"
|
|
align="center"
|
|
prop="rightRearBeamAnchor"
|
|
/>
|
|
<el-table-column
|
|
width="100"
|
|
label="挂篮有人"
|
|
align="center"
|
|
prop="hangingBasketSomeone"
|
|
>
|
|
<template #default="{ row }">
|
|
<span>{{ hangingBasketSomeoneUp(row.hangingBasketSomeone) }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
width="100"
|
|
v-for="item in checkAllBoxList"
|
|
:key="item.listTableName"
|
|
:label="item.label"
|
|
align="center"
|
|
:prop="item.listTableName"
|
|
>
|
|
<template #default="{ row }">
|
|
<span>{{ row[item.listTableName] }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</template>
|
|
<template v-if="activeIndex == 1">
|
|
<el-table-column label="设备名称" align="center" prop="devName" />
|
|
<el-table-column label="上传时间" align="center" prop="createDate" />
|
|
<el-table-column
|
|
label="菱形架位移(m)"
|
|
align="center"
|
|
prop="diamondFrameDisplacement"
|
|
/>
|
|
<el-table-column
|
|
label="菱形架速度(m/s)"
|
|
align="center"
|
|
prop="diamondFrameSpeed"
|
|
/>
|
|
</template>
|
|
<template v-if="activeIndex == 2">
|
|
<el-table-column
|
|
label="设备名称"
|
|
align="center"
|
|
prop="devName"
|
|
/>
|
|
<el-table-column
|
|
label="开始时间"
|
|
align="center"
|
|
prop="alarmBeginTime"
|
|
/>
|
|
<el-table-column
|
|
label="结束时间"
|
|
align="center"
|
|
prop="alarmEndTime"
|
|
/>
|
|
<el-table-column
|
|
label="告警名称"
|
|
align="center"
|
|
prop="alarmName"
|
|
/>
|
|
<el-table-column
|
|
label="内容"
|
|
align="center"
|
|
prop="content"
|
|
/>
|
|
</template>
|
|
<el-table-column fixed="right" width="150" label="操作" align="center">
|
|
<template #default="{ row }">
|
|
<el-button
|
|
v-permission="{
|
|
key: 'edit',
|
|
menuPath: '/project/operationManagement/hangingBasketMonitoring',
|
|
}"
|
|
style="border: 0 !important"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(row)"
|
|
>编辑</el-button
|
|
>
|
|
<el-button
|
|
v-permission="{
|
|
key: 'delete',
|
|
menuPath: '/project/operationManagement/hangingBasketMonitoring',
|
|
}"
|
|
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="900px" append-to-body title="编辑">
|
|
<el-form
|
|
ref="editForm"
|
|
:model="editForm"
|
|
:rules="editFormRules"
|
|
size="medium"
|
|
label-width="180px"
|
|
class="edit_form_main"
|
|
style="display: flex; flex-wrap: wrap"
|
|
>
|
|
<el-form-item label="选择设备" prop="devSn">
|
|
<el-select v-model="editForm.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>
|
|
<template v-if="activeIndex == 0">
|
|
<el-form-item label="底膜高度差(mm)" prop="bottomFilmHeightDifference">
|
|
<el-input-number
|
|
:controls="false"
|
|
v-model="editForm.bottomFilmHeightDifference"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
<el-form-item label="底膜高度左(mm)" prop="bottomFilmHeightLeft">
|
|
<el-input-number
|
|
:controls="false"
|
|
v-model="editForm.bottomFilmHeightLeft"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
<el-form-item label="底膜高度右(mm)" prop="bottomFilmHeightRight">
|
|
<el-input-number
|
|
:controls="false"
|
|
v-model="editForm.bottomFilmHeightRight"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
<el-form-item label="左后梁锚杆(kN)" prop="leftRearBeamAnchor">
|
|
<el-input-number
|
|
:controls="false"
|
|
v-model="editForm.leftRearBeamAnchor"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
<el-form-item label="倾角" prop="inclination">
|
|
<el-input-number
|
|
:controls="false"
|
|
v-model="editForm.inclination"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
<el-form-item label="风速(m/s)" prop="windSpeed">
|
|
<el-input-number
|
|
:controls="false"
|
|
v-model="editForm.windSpeed"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
<el-form-item label="右后梁锚杆(kN)" prop="rightRearBeamAnchor">
|
|
<el-input-number
|
|
:controls="false"
|
|
v-model="editForm.rightRearBeamAnchor"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
<el-form-item label="上传时间" prop="createDate">
|
|
<el-date-picker
|
|
value-format="yyyy-MM-dd hh:mm:ss"
|
|
type="datetime"
|
|
placeholder="上传时间"
|
|
v-model="editForm.createDate"
|
|
></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="挂篮有人">
|
|
<el-select
|
|
v-model="editForm.hangingBasketSomeone"
|
|
placeholder="请选择"
|
|
clearable
|
|
>
|
|
<el-option label="有人" :value="1"></el-option>
|
|
<el-option label="无人" :value="2"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item
|
|
:label="item.label"
|
|
v-for="item in checkAllBoxList"
|
|
:key="item.listTableId"
|
|
>
|
|
<el-select
|
|
v-model="editForm[item.listTableId]"
|
|
placeholder="请选择"
|
|
clearable
|
|
>
|
|
<el-option
|
|
v-for="item in rearBeamFixedAnchorList"
|
|
:key="item.id"
|
|
:label="item.titleName"
|
|
:value="item.id"
|
|
></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</template>
|
|
<template v-if="activeIndex == 1">
|
|
<el-form-item label="菱形架位移(m)" prop="diamondFrameDisplacement">
|
|
<el-input-number
|
|
:controls="false"
|
|
v-model="editForm.diamondFrameDisplacement"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
<el-form-item label="菱形架速度(m/s)" prop="diamondFrameSpeed">
|
|
<el-input-number
|
|
:controls="false"
|
|
v-model="editForm.diamondFrameSpeed"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
<el-form-item label="上传时间" prop="createDate">
|
|
<el-date-picker
|
|
value-format="yyyy-MM-dd hh:mm:ss"
|
|
type="datetime"
|
|
placeholder="上传时间"
|
|
v-model="editForm.createDate"
|
|
></el-date-picker>
|
|
</el-form-item>
|
|
</template>
|
|
<template v-if="activeIndex == 2">
|
|
<el-form-item label="告警名称" prop="alarmName">
|
|
<el-input
|
|
v-model="editForm.alarmName"
|
|
placeholder="请输入内容"
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="内容" prop="content">
|
|
<el-input
|
|
v-model="editForm.content"
|
|
placeholder="请输入内容"
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="开始时间" prop="alarmBeginTime">
|
|
<el-date-picker
|
|
value-format="yyyy-MM-dd hh:mm:ss"
|
|
type="datetime"
|
|
placeholder="上传时间"
|
|
:picker-options="handleTimeChange(editForm.alarmEndTime, 'startTime')"
|
|
v-model="editForm.alarmBeginTime"
|
|
></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="结束时间" prop="alarmEndTime">
|
|
<el-date-picker
|
|
value-format="yyyy-MM-dd hh:mm:ss"
|
|
type="datetime"
|
|
placeholder="上传时间"
|
|
:picker-options="handleTimeChange(editForm.alarmBeginTime, 'endTime')"
|
|
v-model="editForm.alarmEndTime"
|
|
></el-date-picker>
|
|
</el-form-item>
|
|
</template>
|
|
</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="1000px"
|
|
append-to-body
|
|
title="规则配置"
|
|
class="ruleConfig_box"
|
|
>
|
|
<el-form
|
|
ref="ruleConfigForm"
|
|
:model="ruleConfigForm"
|
|
:rules="ruleConfigFormRules"
|
|
size="medium"
|
|
label-width="180px"
|
|
>
|
|
<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>
|
|
<template v-if="activeIndex != 4">
|
|
<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>
|
|
<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">
|
|
<div class="ruleconfig_staff">
|
|
<el-form-item
|
|
:label="item.label"
|
|
v-for="(item, index) in scopeData"
|
|
:key="item.id"
|
|
:label-width="index % 2 == 0 ? '130px' : '200px'"
|
|
>
|
|
<el-input-number
|
|
placeholder="小"
|
|
:controls="false"
|
|
:max="item.maxValue ? Number(item.maxValue) : Infinity"
|
|
v-model="item.minValue"
|
|
controls-position="right"
|
|
></el-input-number>
|
|
<span class="mr_8 ml_8">~</span>
|
|
<el-input-number
|
|
:controls="false"
|
|
:min="item.minValue ? Number(item.minValue) : -Infinity"
|
|
v-model="item.maxValue"
|
|
controls-position="right"
|
|
placeholder="大"
|
|
></el-input-number>
|
|
</el-form-item>
|
|
</div>
|
|
</el-form-item>
|
|
<el-form-item label="全选" prop="cardTypeAllList">
|
|
<div class="flex">
|
|
<el-checkbox
|
|
:indeterminate="isIndeterminate"
|
|
v-model="checkAll"
|
|
@change="handleCheckAllChange"
|
|
></el-checkbox>
|
|
<div class="checkbox_box">
|
|
<el-form-item label="挂篮有人">
|
|
<el-checkbox-group
|
|
@change="handleCheckedCitiesChange"
|
|
v-model="ruleConfigForm.hangingBasketSomeones"
|
|
>
|
|
<el-checkbox
|
|
v-for="item in hangingBasketSomeonesList"
|
|
:key="item.id"
|
|
:label="item.id.toString()"
|
|
>{{ item.titleName }}</el-checkbox
|
|
>
|
|
</el-checkbox-group>
|
|
</el-form-item>
|
|
<el-form-item
|
|
v-for="item in checkAllBoxList"
|
|
:key="item.listName"
|
|
:label="item.label"
|
|
>
|
|
<el-checkbox-group
|
|
@change="handleCheckedCitiesChange"
|
|
v-model="ruleConfigForm[item.listName]"
|
|
>
|
|
<el-checkbox
|
|
v-for="item in rearBeamFixedAnchorList"
|
|
:key="item.id"
|
|
:label="item.id.toString()"
|
|
>{{ item.titleName }}</el-checkbox
|
|
>
|
|
</el-checkbox-group>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</template>
|
|
<template v-if="activeIndex == 1">
|
|
<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">
|
|
<div class="ruleconfig_staff1">
|
|
<el-form-item
|
|
:label="item.label"
|
|
v-for="(item, index) in scopeData1"
|
|
:key="item.id"
|
|
>
|
|
<el-input-number
|
|
placeholder="小"
|
|
:controls="false"
|
|
:max="item.maxValue ? item.maxValue : Infinity"
|
|
v-model="item.minValue"
|
|
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>
|
|
<template v-if="activeIndex == 2">
|
|
<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="alarmName">
|
|
<el-input
|
|
v-model="ruleConfigForm.alarmName"
|
|
placeholder="请输入内容"
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item
|
|
class="mt_12"
|
|
label-width="120px"
|
|
label="内容"
|
|
prop="content"
|
|
>
|
|
<el-input
|
|
v-model="ruleConfigForm.content"
|
|
placeholder="请输入内容"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</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,
|
|
deleteBatchHangBasketDetectDataApi,
|
|
editHangBasketDetectDataApi,
|
|
mockDataHangBasketDetectDataApi,
|
|
getDepartmentAndTeamListApi,
|
|
getMockHangBasketDetectDataConfigApi,
|
|
saveMockTowerCurrentDataConfigApi,
|
|
resetMockHangBasketDetectDataConfigApi,
|
|
getMockHangBasketDisplacementDataConfigApi,
|
|
saveMockTowerAlarmConfigApi,
|
|
resetMockHangBasketDisplacementDataConfigApi,
|
|
editHangBasketDisplacementDataApi,
|
|
deleteBatchHangBasketDisplacementDataApi,
|
|
mockDataHangBasketDisplacementDataApi,
|
|
resetMockHangBasketAlarmDataConfigApi,
|
|
getMockHangBasketAlarmDataConfigApi,
|
|
mockDataHangBasketAlarmDataApi,
|
|
deleteBatchHangBasketAlarmDataApi,
|
|
editHangBasketAlarmDataApi,
|
|
} from "@/assets/js/api/operationManagement";
|
|
import {
|
|
getWorkerInfoList,
|
|
getPageListApi,
|
|
getEnterpriseInfoList,
|
|
} from "@/assets/js/api/laborPerson";
|
|
import {
|
|
hangBasketDetectData,
|
|
hangBasketDevList,
|
|
hangBasketDisplacementData,
|
|
hangBasketAlarmDataPage,
|
|
} from "@/assets/js/api/hangBasketMonitor.js";
|
|
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",
|
|
},
|
|
],
|
|
checkAllBoxList: [
|
|
{
|
|
label: "后梁固定锚杆1#状态",
|
|
listName: "rearBeamFixedAnchor1s",
|
|
listTableId: "rearBeamFixedAnchor1",
|
|
listTableName: "rearBeamFixedAnchor1Name",
|
|
},
|
|
{
|
|
label: "后梁固定锚杆2#状态",
|
|
listName: "rearBeamFixedAnchor2s",
|
|
listTableId: "rearBeamFixedAnchor2",
|
|
listTableName: "rearBeamFixedAnchor2Name",
|
|
},
|
|
{
|
|
label: "后梁固定锚杆3#状态",
|
|
listName: "rearBeamFixedAnchor3s",
|
|
listTableId: "rearBeamFixedAnchor3",
|
|
listTableName: "rearBeamFixedAnchor3Name",
|
|
},
|
|
{
|
|
label: "后梁固定锚杆4#状态",
|
|
listName: "rearBeamFixedAnchor4s",
|
|
listTableId: "rearBeamFixedAnchor4",
|
|
listTableName: "rearBeamFixedAnchor4Name",
|
|
},
|
|
{
|
|
label: "后梁固定锚杆5#状态",
|
|
listName: "rearBeamFixedAnchor5s",
|
|
listTableId: "rearBeamFixedAnchor5",
|
|
listTableName: "rearBeamFixedAnchor5Name",
|
|
},
|
|
{
|
|
label: "后梁固定锚杆6#状态",
|
|
listName: "rearBeamFixedAnchor6s",
|
|
listTableId: "rearBeamFixedAnchor6",
|
|
listTableName: "rearBeamFixedAnchor6Name",
|
|
},
|
|
{
|
|
label: "后梁固定锚杆7#状态",
|
|
listName: "rearBeamFixedAnchor7s",
|
|
listTableId: "rearBeamFixedAnchor7",
|
|
listTableName: "rearBeamFixedAnchor7Name",
|
|
},
|
|
{
|
|
label: "后梁固定锚杆8#状态",
|
|
listName: "rearBeamFixedAnchor8s",
|
|
listTableId: "rearBeamFixedAnchor8",
|
|
listTableName: "rearBeamFixedAnchor8Name",
|
|
},
|
|
],
|
|
hangingBasketSomeonesList: [
|
|
{
|
|
id: 1,
|
|
titleName: "有人",
|
|
},
|
|
{
|
|
id: 2,
|
|
titleName: "无人",
|
|
},
|
|
],
|
|
rearBeamFixedAnchorList: [
|
|
{
|
|
id: 1,
|
|
titleName: "正常",
|
|
},
|
|
{
|
|
id: 2,
|
|
titleName: "未连接",
|
|
},
|
|
{
|
|
id: 3,
|
|
titleName: "未使用",
|
|
},
|
|
{
|
|
id: 4,
|
|
titleName: "报警",
|
|
},
|
|
],
|
|
cardTypeList: [
|
|
{
|
|
cardTypeId: 1,
|
|
cardTypeName: "身份识别模块故障",
|
|
cardTypeKey: "idError",
|
|
},
|
|
{
|
|
cardTypeId: 2,
|
|
cardTypeName: "人数识别装置故障",
|
|
cardTypeKey: "peopleCntError",
|
|
},
|
|
],
|
|
earlyWarningTypeList: [
|
|
{
|
|
earlyWarningTypeId: 1,
|
|
earlyWarningTypeName: "载重预警",
|
|
earlyWarningTypeKey: "weightPreAlarm",
|
|
},
|
|
{
|
|
earlyWarningTypeId: 2,
|
|
earlyWarningTypeName: "速度预警",
|
|
earlyWarningTypeKey: "speedPreAlarm",
|
|
},
|
|
{
|
|
earlyWarningTypeId: 3,
|
|
earlyWarningTypeName: "高度预警",
|
|
earlyWarningTypeKey: "heightPreAlarm",
|
|
},
|
|
{
|
|
earlyWarningTypeId: 4,
|
|
earlyWarningTypeName: "倾角X预警",
|
|
earlyWarningTypeKey: "obliguityXPreAlarm",
|
|
},
|
|
{
|
|
earlyWarningTypeId: 5,
|
|
earlyWarningTypeName: "倾角Y预警",
|
|
earlyWarningTypeKey: "obliguityYPreAlarm",
|
|
},
|
|
{
|
|
earlyWarningTypeId: 6,
|
|
earlyWarningTypeName: "风速预警",
|
|
earlyWarningTypeKey: "windSpeedPreAlarm",
|
|
},
|
|
],
|
|
alarmTypeList: [
|
|
{
|
|
alarmTypeId: 1,
|
|
alarmTypeName: "人数报警",
|
|
alarmTypeKey: "peopleCntAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 2,
|
|
alarmTypeName: "载重报警",
|
|
alarmTypeKey: "weightAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 3,
|
|
alarmTypeName: "速度报警",
|
|
alarmTypeKey: "speedAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 4,
|
|
alarmTypeName: "高度报警",
|
|
alarmTypeKey: "heightAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 5,
|
|
alarmTypeName: "倾角X报警",
|
|
alarmTypeKey: "obliguityXAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 6,
|
|
alarmTypeName: "倾角Y报警",
|
|
alarmTypeKey: "obliguityYAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 7,
|
|
alarmTypeName: "风速报警",
|
|
alarmTypeKey: "windSpeedAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 8,
|
|
alarmTypeName: "1号电机报警",
|
|
alarmTypeKey: "motor1Alarm",
|
|
},
|
|
{
|
|
alarmTypeId: 9,
|
|
alarmTypeName: "2号电机报警",
|
|
alarmTypeKey: "motor2Alarm",
|
|
},
|
|
{
|
|
alarmTypeId: 10,
|
|
alarmTypeName: "3号电机报警",
|
|
alarmTypeKey: "motor3Alarm",
|
|
},
|
|
{
|
|
alarmTypeId: 11,
|
|
alarmTypeName: "防冲顶报警",
|
|
alarmTypeKey: "topAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 12,
|
|
alarmTypeName: "防坠器报警",
|
|
alarmTypeKey: "fallAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 13,
|
|
alarmTypeName: "下限位报警",
|
|
alarmTypeKey: "bottomAlarm",
|
|
},
|
|
],
|
|
alarmTypeList2: [
|
|
{
|
|
alarmTypeId: 1,
|
|
alarmTypeName: "人数报警",
|
|
alarmTypeKey: "peopleCntAlarm",
|
|
listEditKey: "peopleCntAlarm",
|
|
towerWorkKey: "peopleCntAlarm",
|
|
towerWorkEditKey: "peopleCntAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 2,
|
|
alarmTypeName: "载重报警",
|
|
alarmTypeKey: "weightAlarm",
|
|
listEditKey: "weightAlarm",
|
|
towerWorkKey: "weightAlarm",
|
|
towerWorkEditKey: "weightAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 3,
|
|
alarmTypeName: "速度报警",
|
|
alarmTypeKey: "speedAlarm",
|
|
listEditKey: "speedAlarm",
|
|
towerWorkKey: "speedAlarm",
|
|
towerWorkEditKey: "speedAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 4,
|
|
alarmTypeName: "高度报警",
|
|
alarmTypeKey: "heightAlarm",
|
|
listEditKey: "heightAlarm",
|
|
towerWorkKey: "heightAlarm",
|
|
towerWorkEditKey: "heightAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 5,
|
|
alarmTypeName: "倾角X报警",
|
|
alarmTypeKey: "obliguityXAlarm",
|
|
listEditKey: "obliguityXAlarm",
|
|
towerWorkKey: "obliguityXAlarm",
|
|
towerWorkEditKey: "obliguityXAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 6,
|
|
alarmTypeName: "倾角Y报警",
|
|
alarmTypeKey: "obliguityYAlarm",
|
|
listEditKey: "obliguityYAlarm",
|
|
towerWorkKey: "obliguityYAlarm",
|
|
towerWorkEditKey: "obliguityYAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 7,
|
|
alarmTypeName: "风速报警",
|
|
alarmTypeKey: "windSpeedAlarm",
|
|
listEditKey: "windSpeedAlarm",
|
|
towerWorkKey: "windSpeedAlarm",
|
|
towerWorkEditKey: "windSpeedAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 8,
|
|
alarmTypeName: "1号电机报警",
|
|
alarmTypeKey: "motor1Alarm",
|
|
listEditKey: "motor1Alarm",
|
|
towerWorkKey: "motor1Alarm",
|
|
towerWorkEditKey: "motor1Alarm",
|
|
},
|
|
{
|
|
alarmTypeId: 9,
|
|
alarmTypeName: "2号电机报警",
|
|
alarmTypeKey: "motor2Alarm",
|
|
listEditKey: "motor2Alarm",
|
|
towerWorkKey: "motor2Alarm",
|
|
towerWorkEditKey: "motor2Alarm",
|
|
},
|
|
{
|
|
alarmTypeId: 10,
|
|
alarmTypeName: "3号电机报警",
|
|
alarmTypeKey: "motor3Alarm",
|
|
listEditKey: "motor3Alarm",
|
|
towerWorkKey: "motor3Alarm",
|
|
towerWorkEditKey: "motor3Alarm",
|
|
},
|
|
{
|
|
alarmTypeId: 11,
|
|
alarmTypeName: "防冲顶报警",
|
|
alarmTypeKey: "topAlarm",
|
|
listEditKey: "topAlarm",
|
|
towerWorkKey: "topAlarm",
|
|
towerWorkEditKey: "topAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 12,
|
|
alarmTypeName: "防坠器报警",
|
|
alarmTypeKey: "fallAlarm",
|
|
listEditKey: "fallAlarm",
|
|
towerWorkKey: "fallAlarm",
|
|
towerWorkEditKey: "fallAlarm",
|
|
},
|
|
{
|
|
alarmTypeId: 13,
|
|
alarmTypeName: "下限位报警",
|
|
alarmTypeKey: "bottomAlarm",
|
|
listEditKey: "bottomAlarm",
|
|
towerWorkKey: "bottomAlarm",
|
|
towerWorkEditKey: "bottomAlarm",
|
|
},
|
|
],
|
|
alarmTypeList3: [
|
|
{
|
|
alarmTypeId: 1,
|
|
alarmTypeName: "力矩违章",
|
|
alarmTypeKey: "momentViolations",
|
|
listEditKey: "momentViolation",
|
|
},
|
|
{
|
|
alarmTypeId: 2,
|
|
alarmTypeName: "风速违章",
|
|
alarmTypeKey: "windSpeedViolations",
|
|
listEditKey: "windSpeedViolation",
|
|
},
|
|
{
|
|
alarmTypeId: 3,
|
|
alarmTypeName: "群塔碰撞违章",
|
|
alarmTypeKey: "collisionViolations",
|
|
listEditKey: "collisionViolation",
|
|
},
|
|
{
|
|
alarmTypeId: 4,
|
|
alarmTypeName: "禁行区域违章",
|
|
alarmTypeKey: "banRegionViolations",
|
|
listEditKey: "banRegionViolation",
|
|
},
|
|
{
|
|
alarmTypeId: 5,
|
|
alarmTypeName: "人员报警违章",
|
|
alarmTypeKey: "personViolations",
|
|
listEditKey: "personViolation",
|
|
},
|
|
{
|
|
alarmTypeId: 6,
|
|
alarmTypeName: "吊钩违章",
|
|
alarmTypeKey: "hookViolations",
|
|
listEditKey: "hookViolation",
|
|
},
|
|
],
|
|
checkAll: false,
|
|
isIndeterminate: true,
|
|
checkAllEarly: false,
|
|
isIndeterminateEarly: true,
|
|
checkAll1: false,
|
|
isIndeterminate1: true,
|
|
checkAll2: false,
|
|
isIndeterminate2: true,
|
|
checkAll3: false,
|
|
isIndeterminate3: true,
|
|
ruleConfigLoading: false,
|
|
isDepartmentTeamList: [],
|
|
personList: [],
|
|
allUfaceDev: [],
|
|
// 演示数据生成弹窗
|
|
ruleConfigShow: false,
|
|
ruleConfigForm: {
|
|
devSns: [],
|
|
devGenerateNum: "",
|
|
startTime: "",
|
|
endTime: "",
|
|
createDateBegin: "",
|
|
createDateEnd: "",
|
|
driverName: "",
|
|
driverIdCard: "",
|
|
standardHighAlarmDev: "",
|
|
height: "",
|
|
sectionCount: "",
|
|
endTimeBegin: "",
|
|
endTimeEnd: "",
|
|
|
|
certification: "",
|
|
endTime: "",
|
|
startTime: "",
|
|
workTimeBegin: "",
|
|
workTimeEnd: "",
|
|
hangingBasketSomeones: [],
|
|
rearBeamFixedAnchor1s: [],
|
|
rearBeamFixedAnchor2s: [],
|
|
rearBeamFixedAnchor3s: [],
|
|
rearBeamFixedAnchor4s: [],
|
|
rearBeamFixedAnchor5s: [],
|
|
rearBeamFixedAnchor6s: [],
|
|
rearBeamFixedAnchor7s: [],
|
|
rearBeamFixedAnchor8s: [],
|
|
cardTypeAllList: [],
|
|
earlyWarningTypeAllList: [],
|
|
alarmTypeAllList: [],
|
|
alarmTypeAllList2: [],
|
|
alarmTypeAllList3: [],
|
|
},
|
|
scopeData: [
|
|
{
|
|
id: 1,
|
|
label: "底膜高度差(mm)",
|
|
minValue: "",
|
|
maxValue: "",
|
|
},
|
|
{
|
|
id: 2,
|
|
label: "底膜高度左(mm)",
|
|
minValue: "",
|
|
maxValue: "",
|
|
},
|
|
{
|
|
id: 3,
|
|
label: "底膜高度右(mm)",
|
|
minValue: "",
|
|
maxValue: "",
|
|
},
|
|
{
|
|
id: 4,
|
|
label: "左后梁锚杆(kN)",
|
|
minValue: "",
|
|
maxValue: "",
|
|
},
|
|
{
|
|
id: 5,
|
|
label: "倾角",
|
|
minValue: "",
|
|
maxValue: "",
|
|
},
|
|
{
|
|
id: 6,
|
|
label: "风速(m/s)",
|
|
minValue: "",
|
|
maxValue: "",
|
|
},
|
|
{
|
|
id: 7,
|
|
label: "右后梁锚杆(kN)",
|
|
minValue: "",
|
|
maxValue: "",
|
|
},
|
|
],
|
|
scopeData1: [
|
|
{
|
|
id: 1,
|
|
label: "菱形架位移(m)",
|
|
minValue: "",
|
|
maxValue: "",
|
|
},
|
|
{
|
|
id: 2,
|
|
label: "菱形架速度(m/s)",
|
|
minValue: "",
|
|
maxValue: "",
|
|
},
|
|
],
|
|
ruleConfigFormRules: {
|
|
devSns: [
|
|
{
|
|
type: "array",
|
|
required: true,
|
|
message: "请至少选择一个设备",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
devGenerateNum: [{ required: true, message: "请输入数据量", trigger: "blur" }],
|
|
createDateBegin: [
|
|
{
|
|
required: true,
|
|
message: "请选择模拟报警开始时间",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
createDateEnd: [
|
|
{
|
|
required: true,
|
|
message: "请选择模拟报警结束时间",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
startTime: [
|
|
{
|
|
required: true,
|
|
message: "请选择模拟报警开始时间",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
endTime: [
|
|
{
|
|
required: true,
|
|
message: "请选择模拟报警结束时间",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
startTimeBegin: [
|
|
{
|
|
required: true,
|
|
message: "请选择报警开始时间",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
startTimeEnd: [
|
|
{
|
|
required: true,
|
|
message: "请选择报警结束时间",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
endTimeBegin: [
|
|
{
|
|
required: true,
|
|
message: "请选择报警开始时间",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
endTimeEnd: [
|
|
{
|
|
required: true,
|
|
message: "请选择报警结束时间",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
},
|
|
|
|
// 3 衢州版 2 星璇版 1 正常版本
|
|
styleType: "",
|
|
// 项目SN
|
|
projectSn: "",
|
|
// 弹窗标题
|
|
title: "",
|
|
// 控制弹窗的打开与关闭
|
|
open: false,
|
|
// 遮罩层
|
|
loading: false,
|
|
// 当前激活的项目
|
|
activeIndex: 0,
|
|
// 项目列表
|
|
operationList: [
|
|
{
|
|
operationId: 1,
|
|
operationName: "监测数据",
|
|
},
|
|
{
|
|
operationId: 2,
|
|
operationName: "位移数据",
|
|
},
|
|
{
|
|
operationId: 3,
|
|
operationName: "告警数据",
|
|
},
|
|
],
|
|
// 总条数
|
|
total: 1,
|
|
// 用户数据
|
|
userList: [],
|
|
// 班组列表选项
|
|
teamOptions: [],
|
|
// 部门列表选项
|
|
departmentOptions: [],
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
projectSn: undefined, // 项目SN
|
|
enterpriseId: undefined, // 企业ID
|
|
|
|
teamName: undefined,
|
|
departmentId: undefined,
|
|
payStatus: undefined,
|
|
payMonth: undefined,
|
|
workerName: undefined,
|
|
idCard: undefined,
|
|
createDate: [], // 报警时间
|
|
devSn: "",
|
|
},
|
|
editForm: {},
|
|
editFormRules: {
|
|
deviceId: [{ required: true, message: "请选择设备", trigger: "change" }],
|
|
},
|
|
enterpriseListData: [],
|
|
scrollbarFlag: false,
|
|
}),
|
|
computed: {
|
|
headers() {
|
|
return { Authorization: this.$store.state.userInfo.token };
|
|
},
|
|
malfunctionUp() {
|
|
return (malfunction) => {
|
|
const obj = {
|
|
0: "无故障",
|
|
1: "有故障",
|
|
};
|
|
return obj[malfunction] || "";
|
|
};
|
|
},
|
|
earlyUp() {
|
|
return (early) => {
|
|
const obj = {
|
|
0: "正常",
|
|
1: "预警",
|
|
};
|
|
return obj[early] || "";
|
|
};
|
|
},
|
|
alarmUp() {
|
|
return (alarm) => {
|
|
const obj = {
|
|
0: "正常",
|
|
1: "报警",
|
|
2: "预警",
|
|
};
|
|
return obj[alarm] || "";
|
|
};
|
|
},
|
|
cardTypeUp() {
|
|
return (cardType) => {
|
|
const resultList = [...this.cardTypeList];
|
|
const find = resultList.find((item) => item.cardTypeId == cardType);
|
|
return find ? find.cardTypeName : "";
|
|
};
|
|
},
|
|
hangingBasketSomeoneUp() {
|
|
return (hangingBasketSomeone) => {
|
|
const resultList = [...this.hangingBasketSomeonesList];
|
|
const find = resultList.find((item) => item.id == hangingBasketSomeone);
|
|
return find ? find.titleName : "";
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
this.projectSn = this.$store.state.projectSn;
|
|
this.queryParams.payMonth = nowDate();
|
|
this.styleType = this.$store.state.userInfo.styleType;
|
|
// 查询企业列表
|
|
this.getEnterpriseList();
|
|
// this.getPersonListFn();
|
|
this.getMachineList();
|
|
this.getCompanyList();
|
|
},
|
|
methods: {
|
|
scrollbarFn() {
|
|
const div = document.querySelector(".table-box .el-table__body-wrapper");
|
|
if (div.scrollHeight > div.clientHeight) {
|
|
this.scrollbarFlag = true;
|
|
} else {
|
|
this.scrollbarFlag = false;
|
|
}
|
|
},
|
|
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.hangingBasketSomeones = val
|
|
? this.hangingBasketSomeonesList.map((item) => item.id.toString())
|
|
: [];
|
|
this.checkAllBoxList.forEach((item) => {
|
|
this.ruleConfigForm[item.listName] = val
|
|
? this.rearBeamFixedAnchorList.map((item) => item.id.toString())
|
|
: [];
|
|
});
|
|
this.isIndeterminate = false;
|
|
},
|
|
handleCheckedCitiesChange(value) {
|
|
console.log(11223344, value);
|
|
let checkedCount = this.ruleConfigForm.hangingBasketSomeones.length;
|
|
let count = this.hangingBasketSomeonesList.length;
|
|
this.checkAllBoxList.forEach((item) => {
|
|
checkedCount += this.ruleConfigForm[item.listName].length;
|
|
count += this.rearBeamFixedAnchorList.length;
|
|
});
|
|
// let checkedCount = value.length;
|
|
this.checkAll = checkedCount === count;
|
|
this.isIndeterminate = checkedCount > 0 && checkedCount < count;
|
|
},
|
|
handleCheckAllChangeEarly(val) {
|
|
this.ruleConfigForm.earlyWarningTypeAllList = val
|
|
? this.earlyWarningTypeList.map((item) => item.earlyWarningTypeName)
|
|
: [];
|
|
this.isIndeterminateEarly = false;
|
|
},
|
|
handleCheckedCitiesChangeEarly(value) {
|
|
let checkedCount = value.length;
|
|
this.checkAllEarly = checkedCount === this.earlyWarningTypeList.length;
|
|
this.isIndeterminateEarly =
|
|
checkedCount > 0 && checkedCount < this.earlyWarningTypeList.length;
|
|
},
|
|
handleCheckAllChange1(val) {
|
|
this.ruleConfigForm.alarmTypeAllList = val
|
|
? this.alarmTypeList.map((item) => item.alarmTypeName)
|
|
: [];
|
|
this.isIndeterminate1 = false;
|
|
},
|
|
handleCheckedCitiesChange1(value) {
|
|
let checkedCount = value.length;
|
|
this.checkAll1 = checkedCount === this.alarmTypeList.length;
|
|
this.isIndeterminate1 =
|
|
checkedCount > 0 && checkedCount < this.alarmTypeList.length;
|
|
},
|
|
handleCheckAllChange2(val) {
|
|
this.ruleConfigForm.alarmTypeAllList2 = val
|
|
? this.alarmTypeList2.map((item) => item.alarmTypeName)
|
|
: [];
|
|
this.isIndeterminate2 = false;
|
|
},
|
|
handleCheckedCitiesChange2(value) {
|
|
let checkedCount = value.length;
|
|
this.checkAll2 = checkedCount === this.alarmTypeList2.length;
|
|
this.isIndeterminate2 =
|
|
checkedCount > 0 && checkedCount < this.alarmTypeList2.length;
|
|
},
|
|
handleCheckAllChange3(val) {
|
|
this.ruleConfigForm.alarmTypeAllList3 = val
|
|
? this.alarmTypeList3.map((item) => item.alarmTypeName)
|
|
: [];
|
|
this.isIndeterminate3 = false;
|
|
},
|
|
handleCheckedCitiesChange3(value) {
|
|
let checkedCount = value.length;
|
|
this.checkAll3 = checkedCount === this.alarmTypeList3.length;
|
|
this.isIndeterminate3 =
|
|
checkedCount > 0 && checkedCount < this.alarmTypeList3.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();
|
|
const objFn = {
|
|
0: getMockHangBasketDetectDataConfigApi,
|
|
1: getMockHangBasketDisplacementDataConfigApi,
|
|
2: getMockHangBasketAlarmDataConfigApi,
|
|
};
|
|
objFn[this.activeIndex]({
|
|
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(",") : [],
|
|
};
|
|
if (this.activeIndex == 0) {
|
|
(this.ruleConfigForm.hangingBasketSomeones = result.hangingBasketSomeones
|
|
? result.hangingBasketSomeones.split(",")
|
|
: []),
|
|
(this.ruleConfigForm.rearBeamFixedAnchor1s = result.rearBeamFixedAnchor1s
|
|
? result.rearBeamFixedAnchor1s.split(",")
|
|
: []),
|
|
(this.ruleConfigForm.rearBeamFixedAnchor2s = result.rearBeamFixedAnchor2s
|
|
? result.rearBeamFixedAnchor2s.split(",")
|
|
: []),
|
|
(this.ruleConfigForm.rearBeamFixedAnchor3s = result.rearBeamFixedAnchor3s
|
|
? result.rearBeamFixedAnchor3s.split(",")
|
|
: []),
|
|
(this.ruleConfigForm.rearBeamFixedAnchor4s = result.rearBeamFixedAnchor4s
|
|
? result.rearBeamFixedAnchor4s.split(",")
|
|
: []),
|
|
(this.ruleConfigForm.rearBeamFixedAnchor5s = result.rearBeamFixedAnchor5s
|
|
? result.rearBeamFixedAnchor5s.split(",")
|
|
: []),
|
|
(this.ruleConfigForm.rearBeamFixedAnchor6s = result.rearBeamFixedAnchor6s
|
|
? result.rearBeamFixedAnchor6s.split(",")
|
|
: []),
|
|
(this.ruleConfigForm.rearBeamFixedAnchor7s = result.rearBeamFixedAnchor7s
|
|
? result.rearBeamFixedAnchor7s.split(",")
|
|
: []),
|
|
(this.ruleConfigForm.rearBeamFixedAnchor8s = result.rearBeamFixedAnchor8s
|
|
? result.rearBeamFixedAnchor8s.split(",")
|
|
: []),
|
|
this.setScopeDataListFn(result);
|
|
} else if (this.activeIndex == 1) {
|
|
this.setScopeDataListFn1(result);
|
|
}
|
|
}
|
|
this.$nextTick(() => {
|
|
this.$refs["ruleConfigForm"].clearValidate();
|
|
});
|
|
}
|
|
});
|
|
this.ruleConfigShow = true;
|
|
},
|
|
submitRuleConfigForm() {
|
|
this.$refs["ruleConfigForm"].validate((valid) => {
|
|
if (!valid) return;
|
|
this.ruleConfigLoading = true;
|
|
let params = {
|
|
...this.ruleConfigForm,
|
|
devSns: this.ruleConfigForm.devSns.join(","),
|
|
projectSn: this.projectSn,
|
|
};
|
|
if (this.activeIndex == 0) {
|
|
const resultScope = this.initScopeDataListFn();
|
|
params = {
|
|
...params,
|
|
...resultScope,
|
|
hangingBasketSomeones: params.hangingBasketSomeones.join(","),
|
|
rearBeamFixedAnchor1s: params.rearBeamFixedAnchor1s.join(","),
|
|
rearBeamFixedAnchor2s: params.rearBeamFixedAnchor2s.join(","),
|
|
rearBeamFixedAnchor3s: params.rearBeamFixedAnchor3s.join(","),
|
|
rearBeamFixedAnchor4s: params.rearBeamFixedAnchor4s.join(","),
|
|
rearBeamFixedAnchor5s: params.rearBeamFixedAnchor5s.join(","),
|
|
rearBeamFixedAnchor6s: params.rearBeamFixedAnchor6s.join(","),
|
|
rearBeamFixedAnchor7s: params.rearBeamFixedAnchor7s.join(","),
|
|
rearBeamFixedAnchor8s: params.rearBeamFixedAnchor8s.join(","),
|
|
};
|
|
} else if (this.activeIndex == 1) {
|
|
const resultScope = this.initScopeDataListFn1();
|
|
params = {
|
|
...params,
|
|
...resultScope,
|
|
};
|
|
}
|
|
|
|
const objFn = {
|
|
0: mockDataHangBasketDetectDataApi,
|
|
1: mockDataHangBasketDisplacementDataApi,
|
|
2: mockDataHangBasketAlarmDataApi,
|
|
};
|
|
objFn[this.activeIndex](params)
|
|
.then((res) => {
|
|
if (res.success) {
|
|
this.$message.success(res.message);
|
|
this.getList();
|
|
this.ruleConfigShow = false;
|
|
}
|
|
})
|
|
.finally(() => {
|
|
this.ruleConfigLoading = false;
|
|
});
|
|
});
|
|
},
|
|
initScopeDataListFn() {
|
|
const bottomFilmHeightDifference = this.scopeData.find(
|
|
(item) => item.label == "底膜高度差(mm)"
|
|
);
|
|
const bottomFilmHeightLeft = this.scopeData.find(
|
|
(item) => item.label == "底膜高度左(mm)"
|
|
);
|
|
const bottomFilmHeightRight = this.scopeData.find(
|
|
(item) => item.label == "底膜高度右(mm)"
|
|
);
|
|
const leftRearBeamAnchor = this.scopeData.find(
|
|
(item) => item.label == "左后梁锚杆(kN)"
|
|
);
|
|
const inclination = this.scopeData.find((item) => item.label == "倾角");
|
|
const windSpeed = this.scopeData.find((item) => item.label == "风速(m/s)");
|
|
const rightRearBeamAnchor = this.scopeData.find(
|
|
(item) => item.label == "右后梁锚杆(kN)"
|
|
);
|
|
|
|
return {
|
|
bottomFilmHeightDifferenceBegin: bottomFilmHeightDifference
|
|
? bottomFilmHeightDifference.minValue
|
|
: "",
|
|
bottomFilmHeightDifferenceEnd: bottomFilmHeightDifference
|
|
? bottomFilmHeightDifference.maxValue
|
|
: "",
|
|
bottomFilmHeightLeftBegin: bottomFilmHeightLeft
|
|
? bottomFilmHeightLeft.minValue
|
|
: "",
|
|
bottomFilmHeightLeftEnd: bottomFilmHeightLeft
|
|
? bottomFilmHeightLeft.maxValue
|
|
: "",
|
|
bottomFilmHeightRightBegin: bottomFilmHeightRight
|
|
? bottomFilmHeightRight.minValue
|
|
: "",
|
|
bottomFilmHeightRightEnd: bottomFilmHeightRight
|
|
? bottomFilmHeightRight.maxValue
|
|
: "",
|
|
leftRearBeamAnchorBegin: leftRearBeamAnchor ? leftRearBeamAnchor.minValue : "",
|
|
leftRearBeamAnchorEnd: leftRearBeamAnchor ? leftRearBeamAnchor.maxValue : "",
|
|
inclinationBegin: inclination ? inclination.minValue : "",
|
|
inclinationEnd: inclination ? inclination.maxValue : "",
|
|
windSpeedBegin: windSpeed ? windSpeed.minValue : "",
|
|
windSpeedEnd: windSpeed ? windSpeed.maxValue : "",
|
|
rightRearBeamAnchorBegin: rightRearBeamAnchor ? rightRearBeamAnchor.minValue : "",
|
|
rightRearBeamAnchorEnd: rightRearBeamAnchor ? rightRearBeamAnchor.maxValue : "",
|
|
};
|
|
},
|
|
setScopeDataListFn(row) {
|
|
const bottomFilmHeightDifference = this.scopeData.find(
|
|
(item) => item.label == "底膜高度差(mm)"
|
|
);
|
|
if (bottomFilmHeightDifference) {
|
|
bottomFilmHeightDifference.minValue = row.bottomFilmHeightDifferenceBegin;
|
|
bottomFilmHeightDifference.maxValue = row.bottomFilmHeightDifferenceEnd;
|
|
}
|
|
const bottomFilmHeightLeft = this.scopeData.find(
|
|
(item) => item.label == "底膜高度左(mm)"
|
|
);
|
|
if (bottomFilmHeightLeft) {
|
|
bottomFilmHeightLeft.minValue = row.bottomFilmHeightLeftBegin;
|
|
bottomFilmHeightLeft.maxValue = row.bottomFilmHeightLeftEnd;
|
|
}
|
|
const bottomFilmHeightRight = this.scopeData.find(
|
|
(item) => item.label == "底膜高度右(mm)"
|
|
);
|
|
if (bottomFilmHeightRight) {
|
|
bottomFilmHeightRight.minValue = row.bottomFilmHeightRightBegin;
|
|
bottomFilmHeightRight.maxValue = row.bottomFilmHeightRightEnd;
|
|
}
|
|
const leftRearBeamAnchor = this.scopeData.find(
|
|
(item) => item.label == "左后梁锚杆(kN)"
|
|
);
|
|
if (leftRearBeamAnchor) {
|
|
leftRearBeamAnchor.minValue = row.leftRearBeamAnchorBegin;
|
|
leftRearBeamAnchor.maxValue = row.leftRearBeamAnchorEnd;
|
|
}
|
|
const inclination = this.scopeData.find((item) => item.label == "倾角");
|
|
if (inclination) {
|
|
inclination.minValue = row.inclinationBegin;
|
|
inclination.maxValue = row.inclinationEnd;
|
|
}
|
|
const windSpeed = this.scopeData.find((item) => item.label == "风速(m/s)");
|
|
if (windSpeed) {
|
|
windSpeed.minValue = row.windSpeedBegin;
|
|
windSpeed.maxValue = row.windSpeedEnd;
|
|
}
|
|
const rightRearBeamAnchor = this.scopeData.find(
|
|
(item) => item.label == "右后梁锚杆(kN)"
|
|
);
|
|
if (rightRearBeamAnchor) {
|
|
rightRearBeamAnchor.minValue = row.rightRearBeamAnchorBegin;
|
|
rightRearBeamAnchor.maxValue = row.rightRearBeamAnchorEnd;
|
|
}
|
|
},
|
|
initScopeDataListFn1() {
|
|
const diamondFrameDisplacement = this.scopeData1.find(
|
|
(item) => item.label == "菱形架位移(m)"
|
|
);
|
|
const diamondFrameSpeed = this.scopeData1.find(
|
|
(item) => item.label == "菱形架速度(m/s)"
|
|
);
|
|
|
|
return {
|
|
diamondFrameDisplacementBegin: diamondFrameDisplacement
|
|
? diamondFrameDisplacement.minValue
|
|
: "",
|
|
diamondFrameDisplacementEnd: diamondFrameDisplacement
|
|
? diamondFrameDisplacement.maxValue
|
|
: "",
|
|
diamondFrameSpeedBegin: diamondFrameSpeed ? diamondFrameSpeed.minValue : "",
|
|
diamondFrameSpeedEnd: diamondFrameSpeed ? diamondFrameSpeed.maxValue : "",
|
|
};
|
|
},
|
|
setScopeDataListFn1(row) {
|
|
const diamondFrameDisplacement = this.scopeData1.find(
|
|
(item) => item.label == "菱形架位移(m)"
|
|
);
|
|
if (diamondFrameDisplacement) {
|
|
diamondFrameDisplacement.minValue = row.diamondFrameDisplacementBegin;
|
|
diamondFrameDisplacement.maxValue = row.diamondFrameDisplacementEnd;
|
|
}
|
|
const diamondFrameSpeed = this.scopeData1.find(
|
|
(item) => item.label == "菱形架速度(m/s)"
|
|
);
|
|
if (diamondFrameSpeed) {
|
|
diamondFrameSpeed.minValue = row.diamondFrameSpeedBegin;
|
|
diamondFrameSpeed.maxValue = row.diamondFrameSpeedEnd;
|
|
}
|
|
},
|
|
ruleConfigCancel() {
|
|
// this.ruleConfigReset();
|
|
this.ruleConfigShow = false;
|
|
},
|
|
// 表单重置
|
|
ruleConfigReset() {
|
|
let params = {
|
|
...this.ruleConfigForm,
|
|
devSns: this.ruleConfigForm.devSns.join(","),
|
|
projectSn: this.projectSn,
|
|
};
|
|
if (this.activeIndex === 0) {
|
|
const resultScope = this.initScopeDataListFn();
|
|
params = {
|
|
...params,
|
|
...resultScope,
|
|
};
|
|
} else if (this.activeIndex === 1) {
|
|
const resultScope = this.initScopeDataListFn1();
|
|
params = {
|
|
...params,
|
|
...resultScope,
|
|
};
|
|
}
|
|
const objFn = {
|
|
// 0: saveMockTowerCurrentDataConfigApi,
|
|
// 1: saveMockTowerAlarmConfigApi,
|
|
0: resetMockHangBasketDetectDataConfigApi,
|
|
1: resetMockHangBasketDisplacementDataConfigApi,
|
|
2: resetMockHangBasketAlarmDataConfigApi,
|
|
};
|
|
objFn[this.activeIndex](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() {
|
|
hangBasketDevList({ 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);
|
|
const objFn = {
|
|
0: deleteBatchHangBasketDetectDataApi,
|
|
1: deleteBatchHangBasketDisplacementDataApi,
|
|
2: deleteBatchHangBasketAlarmDataApi,
|
|
};
|
|
objFn[this.activeIndex]({ 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;
|
|
const objFn = {
|
|
0: hangBasketDetectData,
|
|
1: hangBasketDisplacementData,
|
|
2: hangBasketAlarmDataPage,
|
|
};
|
|
const params = {
|
|
projectSn: this.projectSn,
|
|
pageNo: this.queryParams.pageNo,
|
|
pageSize: this.queryParams.pageSize,
|
|
mockDesc: 1,
|
|
devSn: this.queryParams.devSn,
|
|
}
|
|
if(this.activeIndex == 0 || this.activeIndex == 1) {
|
|
params.createDate_begin = this.queryParams.createDate.length > 0
|
|
? dayjs(this.queryParams.createDate[0]).format("YYYY-MM-DD 00:00:00")
|
|
: "";
|
|
params.createDate_end = this.queryParams.createDate.length > 0
|
|
? dayjs(this.queryParams.createDate[1]).format("YYYY-MM-DD 23:59:59")
|
|
: "";
|
|
} else if(this.activeIndex == 2) {
|
|
params.alarmEndTime_begin = this.queryParams.createDate.length > 0
|
|
? dayjs(this.queryParams.createDate[0]).format("YYYY-MM-DD 00:00:00")
|
|
: "";
|
|
params.alarmBeginTime_end = this.queryParams.createDate.length > 0
|
|
? dayjs(this.queryParams.createDate[1]).format("YYYY-MM-DD 23:59:59")
|
|
: "";
|
|
}
|
|
objFn[this.activeIndex]({
|
|
...params,
|
|
// 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;
|
|
});
|
|
},
|
|
//获取所属 企业下拉
|
|
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.initRuleConfigForm();
|
|
this.activeIndex = index;
|
|
this.queryParams.pageNo = 1;
|
|
this.queryParams.payMonth = nowDate();
|
|
this.queryParams.enterpriseId = this.operationList[index].operationId;
|
|
this.getList();
|
|
// this.getTeamList();
|
|
// this.getDepartmentList();
|
|
},
|
|
initRuleConfigForm() {
|
|
if (this.activeIndex == 0) {
|
|
this.ruleConfigForm = {
|
|
devSns: [],
|
|
devGenerateNum: "",
|
|
startTime: "",
|
|
endTime: "",
|
|
bottomFilmHeightDifference: "",
|
|
bottomFilmHeightLeft: "",
|
|
bottomFilmHeightRight: "",
|
|
leftRearBeamAnchor: "",
|
|
inclination: "",
|
|
rightRearBeamAnchor: "",
|
|
hangingBasketSomeone: "",
|
|
hangingBasketSomeones: [],
|
|
rearBeamFixedAnchor1s: [],
|
|
rearBeamFixedAnchor2s: [],
|
|
rearBeamFixedAnchor3s: [],
|
|
rearBeamFixedAnchor4s: [],
|
|
rearBeamFixedAnchor5s: [],
|
|
rearBeamFixedAnchor6s: [],
|
|
rearBeamFixedAnchor7s: [],
|
|
rearBeamFixedAnchor8s: [],
|
|
};
|
|
} else if (this.activeIndex == 1) {
|
|
this.ruleConfigForm = {
|
|
devSns: [],
|
|
devGenerateNum: "",
|
|
startTime: "",
|
|
endTime: "",
|
|
};
|
|
} else if (this.activeIndex == 2) {
|
|
this.ruleConfigForm = {
|
|
devSns: [],
|
|
devGenerateNum: "",
|
|
startTime: "",
|
|
endTime: "",
|
|
alarmName: "",
|
|
content: "",
|
|
};
|
|
}
|
|
},
|
|
// 表单重置
|
|
reset() {
|
|
this.editForm = {
|
|
devSn: "",
|
|
driverIdCard: "",
|
|
driverName: "",
|
|
createDate: "",
|
|
startTime: "",
|
|
bottomFilmHeightDifference: "",
|
|
bottomFilmHeightDifference: "",
|
|
bottomFilmHeightLeft: "",
|
|
bottomFilmHeightRight: "",
|
|
leftRearBeamAnchor: "",
|
|
inclination: "",
|
|
rightRearBeamAnchor: "",
|
|
hangingBasketSomeone: "",
|
|
diamondFrameDisplacement: "",
|
|
diamondFrameSpeed: "",
|
|
createTime: "",
|
|
alarmName: "",
|
|
content: "",
|
|
alarmBeginTime: "",
|
|
alarmEndTime: "",
|
|
};
|
|
if (this.activeIndex == 0) {
|
|
this.checkAllBoxList.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.createDate = [];
|
|
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(() => {
|
|
const objFn = {
|
|
0: deleteBatchHangBasketDetectDataApi,
|
|
1: deleteBatchHangBasketDisplacementDataApi,
|
|
2: deleteBatchHangBasketAlarmDataApi,
|
|
};
|
|
objFn[this.activeIndex]({ 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,
|
|
};
|
|
const objFn = {
|
|
0: editHangBasketDetectDataApi,
|
|
1: editHangBasketDisplacementDataApi,
|
|
2: editHangBasketAlarmDataApi,
|
|
};
|
|
objFn[this.activeIndex](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(.el-table__empty-block) {
|
|
width: 100% !important;
|
|
.el-empty__description {
|
|
margin-top: 0px;
|
|
p {
|
|
line-height: 30px;
|
|
}
|
|
}
|
|
}
|
|
:deep(.edit_form_main) {
|
|
.el-form-item {
|
|
width: 50%;
|
|
}
|
|
.el-input {
|
|
width: 220px !important;
|
|
}
|
|
}
|
|
.remark_box {
|
|
margin-left: 4px;
|
|
color: red;
|
|
}
|
|
:deep(.checkbox_box) {
|
|
flex: 1;
|
|
// .el-form-item {
|
|
// display: flex;
|
|
// flex-direction: column;
|
|
// }
|
|
// .el-form-item__label {
|
|
// width: 100% !important;
|
|
// text-align: left;
|
|
// margin-left: 16px;
|
|
// span {
|
|
// margin-left: 4px;
|
|
// color: red;
|
|
// }
|
|
// }
|
|
.el-form-item__content {
|
|
margin-left: 40px !important;
|
|
}
|
|
}
|
|
: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;
|
|
}
|
|
.mt_12 {
|
|
margin-top: 12px;
|
|
}
|
|
.ruleconfig_staff {
|
|
display: flex;
|
|
// flex-direction: column;
|
|
flex-wrap: wrap;
|
|
// align-content: center;
|
|
.el-input-number {
|
|
width: 70px;
|
|
}
|
|
> div:nth-child(n + 3) {
|
|
margin-top: 12px;
|
|
}
|
|
}
|
|
.ruleconfig_staff1 {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-wrap: wrap;
|
|
// align-content: center;
|
|
.el-input-number {
|
|
width: 70px;
|
|
}
|
|
> div:not(:first-child) {
|
|
margin-top: 12px;
|
|
}
|
|
}
|
|
.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>
|