change - 异常数据记录、页面弹窗告警

main
yinq 4 months ago
parent a4d28fcbf6
commit a6d4f89aad

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@ -42,3 +42,11 @@ export function delRecordAlarmData(objId) {
method: 'delete'
})
}
// 新增异常数据记录
export function handleExceptions(objId) {
return request({
url: '/ems/record/recordAlarmData/handleExceptions/' + objId,
method: 'post'
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -1,26 +1,38 @@
<template>
<div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
@toggleClick="toggleSideBar"
/>
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu">
<template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" />
<search id="header-search" class="right-menu-item"/>
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
<!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
<!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
<!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">-->
<!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">-->
<!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
<el-tooltip content="异常处理" class="right-menu-item hover-effect">
<span
class="exceptionHandling"
:class="{ warnTxt: alarmDataList && alarmDataList.length > 0, 'red-yellow-blink': alarmDataList && alarmDataList.length > 0 }"
@click="getAlarmData(true)"
>
<i class="el-icon-message"></i>{{
(alarmDataList && alarmDataList.length > 0 && alarmDataList.length) || ''
}}
</span>
</el-tooltip>
<screenfull id="screenfull" class="right-menu-item hover-effect"/>
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
<size-select id="size-select" class="right-menu-item hover-effect"/>
</el-tooltip>
</template>
@ -28,7 +40,7 @@
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar">
<i class="el-icon-caret-bottom" />
<i class="el-icon-caret-bottom"/>
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/user/profile">
@ -43,6 +55,62 @@
</el-dropdown-menu>
</el-dropdown>
</div>
<!-- 告警对话框 -->
<el-dialog
:title="alarmTitle"
:visible.sync="alarmOpen"
width="800px"
append-to-body
>
<el-table
v-loading="alarmLoading"
:data="alarmDataList"
@selection-change="handleSelectionChangeAlarm"
>
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="异常设备" align="center" prop="deviceName"/>
<el-table-column label="异常类型" align="center" prop="alarmType">
<template slot-scope="scope">
<dict-tag :options="dict.type.alarm_type" :value="scope.row.alarmType"/>
</template>
</el-table-column>
<el-table-column label="异常数据" align="center" prop="alarmData"/>
<el-table-column label="异常状态" align="center" prop="alarmStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.alarm_status" :value="scope.row.alarmStatus"/>
</template>
</el-table-column>
<el-table-column label="记录时间" align="center" prop="collectTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- icon="el-icon-d-arrow-right"-->
<!-- size="small"-->
<!-- type="Info"-->
<!-- @click="jumpProcessing(scope.row)"-->
<!-- >跳转-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="alarmDataTotal > 0"
:total="alarmDataTotal"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageNum"
@pagination="getAlarmDataList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="jumpProcessing"> </el-button>
<el-button @click="alarmOpen = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -57,8 +125,41 @@ import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import settings from '@/settings'
import { handleExceptions, listRecordAlarmData } from '@/api/ems/record/recordAlarmData'
export default {
dicts: ['alarm_type', 'alarm_status'],
data() {
return {
poolNameList: [],
poolName: '',
alarmTitle: '异常处理',
alarmOpen: false,
alarmLoading: false,
alarmDataList: [],
alarmDataTotal: 0,
//
objIds: [],
//
single: true,
//
multiple: true,
//
queryParams: {
pageNum: 1,
pageSize: 10,
alarmStatus: '1'
}
}
},
created() {
localStorage.setItem('this.alarmDataTotal', 0)
},
mounted() {
//
this.getAlarmData()
// setInterval(() => this.getAlarmData(), 1000 * 60);
},
components: {
Breadcrumb,
TopNav,
@ -93,6 +194,58 @@ export default {
}
},
methods: {
//
openAlarm() {
this.$notify({
title: '异常数据提示',
position: 'bottom-right',
message: this.$createElement(
'div',
{
on: {
click: () => {
this.getAlarmData(true)
}
}
},
[this.$createElement('el-button', {}, ['点击查看'])]
)
})
},
/** 报警列表 */
getAlarmData(open) {
this.alarmOpen = open
this.alarmLoading = true
this.getAlarmDataList()
},
getAlarmDataList() {
listRecordAlarmData(this.queryParams).then((response) => {
this.alarmDataList = response.rows
this.alarmDataTotal = response.total
this.alarmLoading = false
if (localStorage.getItem('this.alarmDataTotal') != this.alarmDataTotal) {
localStorage.setItem('this.alarmDataTotal', this.alarmDataTotal)
this.openAlarm()
}
})
},
/** 跳转处理 */
jumpProcessing(row) {
if (this.objIds.length === 0) {
this.$modal.msgWarning('请勾选设备进行异常处理!')
return
}
handleExceptions(this.objIds).then(response => {
this.$modal.msgSuccess('处理成功')
this.alarmOpen = false
})
},
//
handleSelectionChangeAlarm(selection) {
this.objIds = selection.map((item) => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
@ -103,23 +256,41 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
if (!settings.casEnable){
location.href = '/index';
if (!settings.casEnable) {
location.href = '/index'
}
})
}).catch(() => {});
}).catch(() => {
})
}
}
}
</script>
<style lang="scss" scoped>
@keyframes redYellowBlink {
0% {
color: red;
}
50% {
color: rgb(186, 186, 16);
}
100% {
color: red;
}
}
.red-yellow-blink {
animation: redYellowBlink 1s infinite;
}
.navbar {
height: 50px;
overflow: hidden;
position: relative;
background: #fff;
box-shadow: 0 1px 4px rgba(0,21,41,.08);
box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
.hamburger-container {
line-height: 46px;
@ -127,7 +298,7 @@ export default {
float: left;
cursor: pointer;
transition: background .3s;
-webkit-tap-highlight-color:transparent;
-webkit-tap-highlight-color: transparent;
&:hover {
background: rgba(0, 0, 0, .025)

@ -62,41 +62,41 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['ems/record:recordAlarmData:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['ems/record:recordAlarmData:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['ems/record:recordAlarmData:remove']"
>删除
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['ems/record:recordAlarmData:add']"-->
<!-- >新增-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['ems/record:recordAlarmData:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['ems/record:recordAlarmData:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
@ -114,8 +114,8 @@
<el-table v-loading="loading" :data="recordAlarmDataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="自增标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorId" v-if="columns[1].visible"/>
<el-table-column label="采集设备编号" align="center" prop="collectDeviceId" v-if="columns[2].visible"/>
<el-table-column label="计量设备名称" align="center" prop="monitorName" v-if="columns[1].visible"/>
<el-table-column label="采集设备名称" align="center" prop="collectDeviceName" v-if="columns[2].visible"/>
<el-table-column label="记录时间" align="center" prop="collectTime" width="180" v-if="columns[3].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.collectTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -150,14 +150,14 @@
v-hasPermi="['ems/record:recordAlarmData:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['ems/record:recordAlarmData:remove']"
>删除
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['ems/record:recordAlarmData:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>
@ -182,8 +182,8 @@
<el-form-item label="记录时间" prop="collectTime">
<el-date-picker clearable
v-model="form.collectTime"
type="date"
value-format="yyyy-MM-dd"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择记录时间"
>
</el-date-picker>
@ -211,24 +211,24 @@
<el-form-item label="异常数据" prop="alarmData">
<el-input v-model="form.alarmData" placeholder="请输入异常数据"/>
</el-form-item>
<el-form-item label="操作人员" prop="operationName">
<el-input v-model="form.operationName" placeholder="请输入操作人员"/>
</el-form-item>
<el-form-item label="操作时间" prop="operationTime">
<el-date-picker clearable
v-model="form.operationTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择操作时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="cause">
<el-input v-model="form.cause" placeholder="请输入备注"/>
</el-form-item>
<el-form-item label="通知用户" prop="notifyUser">
<el-input v-model="form.notifyUser" placeholder="请输入通知用户"/>
</el-form-item>
<!-- <el-form-item label="操作人员" prop="operationName">-->
<!-- <el-input v-model="form.operationName" placeholder="请输入操作人员"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="操作时间" prop="operationTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.operationTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择操作时间"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备注" prop="cause">-->
<!-- <el-input v-model="form.cause" placeholder="请输入备注"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="通知用户" prop="notifyUser">-->
<!-- <el-input v-model="form.notifyUser" placeholder="请输入通知用户"/>-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -277,7 +277,7 @@ export default {
monitorId: null,
collectDeviceId: null,
collectTime: null,
alarmType: null,
alarmType: '1',
alarmStatus: null,
alarmData: null,
operationName: null,

@ -34,41 +34,41 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['ems/record:recordAlarmRule:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['ems/record:recordAlarmRule:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['ems/record:recordAlarmRule:remove']"
>删除
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['ems/record:recordAlarmRule:add']"-->
<!-- >新增-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['ems/record:recordAlarmRule:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['ems/record:recordAlarmRule:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
@ -102,7 +102,7 @@
</el-table-column>
<el-table-column label="触发阈值次数" align="center" prop="triggerNumber" v-if="columns[7].visible"/>
<el-table-column label="时间范围(分)" align="center" prop="timeRange" v-if="columns[8].visible"/>
<el-table-column label="设备离线时间(分)" align="center" prop="deviceOfflineTime" v-if="columns[9].visible"/>
<el-table-column label="设备离线时间(分)" align="center" prop="deviceOfflineTime" v-if="columns[9].visible"/>
<el-table-column label="通知用户" align="center" prop="notifyUser" v-if="columns[10].visible"/>
<el-table-column label="备注" align="center" prop="cause" v-if="columns[11].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
@ -115,14 +115,14 @@
v-hasPermi="['ems/record:recordAlarmRule:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['ems/record:recordAlarmRule:remove']"
>删除
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['ems/record:recordAlarmRule:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>
@ -137,30 +137,30 @@
<!-- 添加或修改异常告警规则对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-form-item label="规则编号" prop="ruleId">
<el-input v-model="form.ruleId" placeholder="请输入规则编号"/>
<el-input v-model="form.ruleId" placeholder="请输入规则编号" disabled/>
</el-form-item>
<el-form-item label="规则名称" prop="ruleName">
<el-input v-model="form.ruleName" placeholder="请输入规则名称"/>
</el-form-item>
<el-form-item label="计量设备编号" prop="monitorId">
<el-input v-model="form.monitorId" placeholder="请输入计量设备编号"/>
</el-form-item>
<el-form-item label="记录时间" prop="collectTime">
<el-date-picker clearable
v-model="form.collectTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择记录时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="能源类型" prop="energyType">
<el-input v-model="form.energyType" placeholder="请输入能源类型"/>
</el-form-item>
<!-- <el-form-item label="计量设备编号" prop="monitorId">-->
<!-- <el-input v-model="form.monitorId" placeholder="请输入计量设备编号"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="记录时间" prop="collectTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.collectTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择记录时间"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="能源类型" prop="energyType">-->
<!-- <el-input v-model="form.energyType" placeholder="请输入能源类型"/>-->
<!-- </el-form-item>-->
<el-form-item label="触发规则" prop="triggerRule">
<el-radio-group v-model="form.triggerRule">
<el-radio-group v-model="form.triggerRule" disabled>
<el-radio
v-for="dict in dict.type.trigger_rule"
:key="dict.value"
@ -169,18 +169,18 @@
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="触发阈值次数" prop="triggerNumber">
<el-input v-model="form.triggerNumber" placeholder="请输入触发阈值次数"/>
</el-form-item>
<el-form-item label="时间范围(分)" prop="timeRange">
<el-input v-model="form.timeRange" placeholder="请输入时间范围(分)"/>
</el-form-item>
<el-form-item label="设备离线时间(分)" prop="deviceOfflineTime">
<el-input v-model="form.deviceOfflineTime" placeholder="请输入设备离线时间(分)"/>
</el-form-item>
<el-form-item label="通知用户" prop="notifyUser">
<el-input v-model="form.notifyUser" placeholder="请输入通知用户"/>
<!-- <el-form-item label="触发阈值次数" prop="triggerNumber">-->
<!-- <el-input v-model="form.triggerNumber" placeholder="请输入触发阈值次数"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="时间范围(分)" prop="timeRange">-->
<!-- <el-input v-model="form.timeRange" placeholder="请输入时间范围(分)"/>-->
<!-- </el-form-item>-->
<el-form-item label="设备离线时间(分钟)" prop="deviceOfflineTime">
<el-input-number v-model="form.deviceOfflineTime" placeholder="请输入设备离线时间(分钟)"/>
</el-form-item>
<!-- <el-form-item label="通知用户" prop="notifyUser">-->
<!-- <el-input v-model="form.notifyUser" placeholder="请输入通知用户"/>-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="cause">
<el-input v-model="form.cause" placeholder="请输入备注"/>
</el-form-item>
@ -253,13 +253,13 @@ export default {
{ key: 0, label: `自增标识`, visible: false },
{ key: 1, label: `规则编号`, visible: true },
{ key: 2, label: `规则名称`, visible: true },
{ key: 3, label: `计量设备编号`, visible: true },
{ key: 4, label: `记录时间`, visible: true },
{ key: 5, label: `能源类型`, visible: true },
{ key: 3, label: `计量设备编号`, visible: false },
{ key: 4, label: `记录时间`, visible: false },
{ key: 5, label: `能源类型`, visible: false },
{ key: 6, label: `触发规则`, visible: true },
{ key: 7, label: `触发阈值次数`, visible: true },
{ key: 8, label: `时间范围(分)`, visible: true },
{ key: 9, label: `设备离线时间(分)`, visible: true },
{ key: 7, label: `触发阈值次数`, visible: false },
{ key: 8, label: `时间范围(分)`, visible: false },
{ key: 9, label: `设备离线时间(分)`, visible: true },
{ key: 10, label: `通知用户`, visible: false },
{ key: 11, label: `备注`, visible: true },
{ key: 12, label: `创建人`, visible: false },

@ -17,6 +17,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工序名称" prop="processCode">
<el-select v-model="queryParams.processCode" placeholder="请选择工序名称">
<el-option
v-for="item in processInfoList"
:key="item.processCode"
:label="item.processName"
:value="item.processCode"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="所属工位" prop="stationCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.stationCode"-->

@ -1,29 +1,31 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="身份证" prop="idCard">
<el-form-item label="任务编号" prop="taskCode">
<el-input
v-model="queryParams.idCard"
placeholder="请输入身份证"
v-model="queryParams.taskCode"
placeholder="请输入任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="班组编号" prop="groupId">
<el-form-item label="身份证" prop="idCard">
<el-input
v-model="queryParams.groupId"
placeholder="请输入班组编号"
v-model="queryParams.idCard"
placeholder="请输入身份证"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务编号" prop="taskCode">
<el-input
v-model="queryParams.taskCode"
placeholder="请输入任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="班组名称" prop="groupId">
<el-select v-model="queryParams.groupId" placeholder="请选择班组名称" clearable>
<el-option
v-for="item in teamMembersList"
:key="item.teamCode"
:label="item.teamName"
:value="item.teamCode"
/>
</el-select>
</el-form-item>
<el-form-item label="事件日期">
<el-date-picker
@ -95,28 +97,30 @@
<el-table v-loading="loading" :data="recordStaffSalaryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="身份证" align="center" prop="idCard" v-if="columns[1].visible"/>
<el-table-column label="班组编号" align="center" prop="groupId" v-if="columns[2].visible"/>
<el-table-column label="事件日期" align="center" prop="eventDate" width="180" v-if="columns[3].visible">
<el-table-column label="员工名称" align="center" prop="staffName" v-if="columns[16].visible"/>
<el-table-column label="身份证" align="center" prop="idCard" v-if="columns[1].visible" width="200"/>
<el-table-column label="班组编号" align="center" prop="groupId" v-if="columns[2].visible" width="100"/>
<el-table-column label="班组名称" align="center" prop="teamName" v-if="columns[17].visible" width="120"/>
<el-table-column label="事件日期" align="center" prop="eventDate" width="100" v-if="columns[3].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.eventDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="薪资类别" align="center" prop="salaryCategory" v-if="columns[4].visible"/>
<el-table-column label="收入大类" align="center" prop="revenueClass" v-if="columns[5].visible"/>
<el-table-column label="收入大类" align="center" prop="revenueClass" v-if="columns[5].visible" width="120"/>
<el-table-column label="收入金额" align="center" prop="revenueAmount" v-if="columns[6].visible"/>
<el-table-column label="收入理由" align="center" prop="revenueReason" v-if="columns[7].visible"/>
<el-table-column label="扣罚大类" align="center" prop="fineClass" v-if="columns[8].visible"/>
<el-table-column label="扣罚金额" align="center" prop="fineAmount" v-if="columns[9].visible"/>
<el-table-column label="扣罚理由" align="center" prop="fineReason" v-if="columns[10].visible"/>
<el-table-column label="任务编号" align="center" prop="taskCode" v-if="columns[12].visible"/>
<el-table-column label="任务编号" align="center" prop="taskCode" v-if="columns[12].visible" width="120"/>
<el-table-column label="工资系数" align="center" prop="salaryCoefficient" v-if="columns[13].visible"/>
<el-table-column label="开始日期" align="center" prop="beginDate" width="180" v-if="columns[14].visible">
<el-table-column label="开始日期" align="center" prop="beginDate" width="100" v-if="columns[14].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束日期" align="center" prop="endDate" width="180" v-if="columns[15].visible">
<el-table-column label="结束日期" align="center" prop="endDate" width="100" v-if="columns[15].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
</template>
@ -231,6 +235,8 @@ import {
addRecordStaffSalary,
updateRecordStaffSalary
} from '@/api/mes/record/recordStaffSalary'
import { getTeamMembers } from '@/api/mes/base/baseTeamMembers'
import { parseTime } from '@/utils/ruoyi'
export default {
name: 'RecordStaffSalary',
@ -299,11 +305,23 @@ export default {
{ key: 12, label: `任务编号`, visible: true },
{ key: 13, label: `工资系数`, visible: true },
{ key: 14, label: `开始日期`, visible: true },
{ key: 15, label: `结束日期`, visible: true }
]
{ key: 15, label: `结束日期`, visible: true },
{ key: 16, label: `员工名称`, visible: true },
{ key: 17, label: `班组名称`, visible: true }
],
//
teamMembersList: []
}
},
created() {
const currentDate = new Date();
const firstDay = parseTime(new Date(currentDate.getFullYear(), currentDate.getMonth(), 1), '{y}-{m}-{d}')
const lastDay = parseTime(new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0), '{y}-{m}-{d}')
this.daterangeEventDate[0] = firstDay
this.daterangeEventDate[1] = lastDay
getTeamMembers().then(response => {
this.teamMembersList = response.data
})
this.getList()
},
methods: {

@ -11,7 +11,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="下单日期">
<el-form-item label="打卡日期">
<el-date-picker
v-model="daterangeOrderDate"
style="width: 240px"

Loading…
Cancel
Save