一公司人员定位 报警列表
parent
6a802fc163
commit
e2b3dbd5ef
|
@ -0,0 +1,332 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="searchForm" :model="searchForm" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="作业编号" prop="keySource">
|
||||
<el-input v-model="searchForm.keyJobNumber" placeholder="请输入作业编号" class="filter-item" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="特级动火审批状态" prop="keyHiddenDescr" label-width="130px">
|
||||
<el-select v-model="searchForm.keyState" placeholder="请选择">
|
||||
<el-option v-for="item in statusSuperList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="动火等级" prop="HOT_WORK_LEVEL_INDEX" >
|
||||
<el-select v-model="searchForm.HOT_WORK_LEVEL_INDEX" placeholder="请选择" style="width: 80%">
|
||||
<el-option v-for="item in hotworklevelList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="动火内容" prop="keySource">
|
||||
<el-input v-model="searchForm.JOB_CONTENT" placeholder="请输入动火内容" class="filter-item" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table v-loading="listLoading" ref="multipleTable" :data="varList" :row-key="getRowKey" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
|
||||
<el-table-column :reserve-selection="true" type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="JOB_NUMBER" label="作业编号" />
|
||||
<el-table-column prop="JOB_TYPE_INDEX" label="作业类型" >
|
||||
<template slot-scope="{row}">
|
||||
{{ translate(row.JOB_TYPE_INDEX, jobTypeList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="HOT_WORK_LEVEL_NAME" label="动火等级" />
|
||||
<el-table-column prop="JOB_CONTENT" label="动火内容" />
|
||||
<el-table-column prop="HOT_WORK_POSITION" label="动火部位" />
|
||||
<el-table-column prop="UNIT_LEADER_DEPARTMENT_NAME" label="动火区域管辖单位" />
|
||||
<el-table-column prop="WORK_LEVEL" label="申请单位" >
|
||||
<template slot-scope="{row}">
|
||||
{{ getUserName('deptName', row.HOT_WORK_APPLICATION_List) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="APPLY_USER_NAME" label="申请人" />
|
||||
<el-table-column prop="APPLY_USER_NAME" label="申请时间" >
|
||||
<template slot-scope="{row}">
|
||||
{{ getUserName('OPERATTIME', row.HOT_WORK_APPLICATION_List) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="STATE" label="审核状态" >
|
||||
<template slot-scope="{row}">
|
||||
{{ translate(row.STATE.toString(), statusList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="examineUserName" label="审核人" >
|
||||
<template slot-scope="{row}">
|
||||
{{ row.examineUserName || row.examineDeptName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<template slot-scope="{row}">
|
||||
<!-- <el-button :disabled="row.STATE !='11'" type="primary" icon="el-icon-document" size="mini" @click="goDetail(row.HOTWORKAPPLICATION_ID,'apply')">申请</el-button>-->
|
||||
<!-- <el-button :disabled="row.STATE !='-2'" type="primary" icon="el-icon-document" size="mini" @click="goDetail(row.HOTWORKAPPLICATION_ID,'repulse')">打回</el-button>-->
|
||||
<el-button icon="el-icon-view" size="mini" @click="goInfo(row.HOTWORKAPPLICATION_ID,'see')">查看</el-button>
|
||||
<!--<el-button v-if="row.STATE=='-6' && row.CREATOR == loginUserID" type="danger" icon="el-icon-delete" plain @click="batchDel(row.HOTWORKAPPLICATION_ID)">删除</el-button>-->
|
||||
<el-button v-if="(row.CREATOR == loginUserID || loginUserID == '1' || loginRoleNumber == 'R20201225624685') && row.STATE != 11" type="danger" icon="el-icon-delete" plain @click="batchDel(row.HOTWORKAPPLICATION_ID)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<!-- <el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>-->
|
||||
<!-- <el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel">删除</el-button>-->
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
components: { Pagination, SelectTree },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
|
||||
multipleSelectionAll: [], // 所有选中的数据包含跨页数据
|
||||
multipleSelection: [], // 当前页选中的数据
|
||||
treeData: [], // 动火前管辖单位
|
||||
dialogFormShow: false,
|
||||
dialogFormEdit: false,
|
||||
dialogType: 'add',
|
||||
replyListQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
jobTypeList: [
|
||||
{ id: '0', name: '内部作业' },
|
||||
{ id: '1', name: '相关方作业' }
|
||||
],
|
||||
statusSuperList: [
|
||||
{ id: '0', name: '请选择' },
|
||||
{ id: '1', name: '待提交' },
|
||||
{ id: '2', name: '待审批' },
|
||||
{ id: '3', name: '审批通过' },
|
||||
{ id: '4', name: '已打回' }
|
||||
],
|
||||
hotworklevelList: [
|
||||
{ id: '0', name: '特级' },
|
||||
{ id: '1', name: '一级' },
|
||||
{ id: '2', name: '二级' },
|
||||
{ id: '3', name: '三级' }
|
||||
],
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
},
|
||||
statusList: [
|
||||
{ id: '0', name: '申请人' },
|
||||
{ id: '1', name: '动火单位待确认' },
|
||||
{ id: '2', name: '项目发包单位待确认' },
|
||||
{ id: '3', name: '现场管辖单位待签发' },
|
||||
{ id: '4', name: '动火许可签发单位待审核' },
|
||||
{ id: '5', name: '安全总监待确认' },
|
||||
{ id: '6', name: '现场管辖人待接收' },
|
||||
{ id: '7', name: '动火前现场管辖人待确认' },
|
||||
{ id: '8', name: '现场管辖人待确认' },
|
||||
{ id: '9', name: '动火后现场管辖人待确认' },
|
||||
{ id: '30', name: '动火负责人待确认' },
|
||||
{ id: '31', name: '项目主管人员待待初审' },
|
||||
{ id: '32', name: '项目主管部门负责人待审核' },
|
||||
{ id: '33', name: '分公司安全总监待审批' },
|
||||
{ id: '34', name: '分公司主要负责人待签批' },
|
||||
{ id: '35', name: '(港股)安全监督部门待初审' },
|
||||
{ id: '36', name: '安委会办公室待审批' },
|
||||
{ id: '37', name: '安全总监待审批' },
|
||||
{ id: '10', name: '延时监火' },
|
||||
{ id: '11', name: '归档' },
|
||||
{ id: '-1', name: '审核不通过' },
|
||||
{ id: '-2', name: '特级不通过' },
|
||||
{ id: '-3', name: '关闭归档' },
|
||||
{ id: '-4', name: '延期' },
|
||||
{ id: '-5', name: '已打回' },
|
||||
{ id: '-6', name: '超期未动火' }
|
||||
],
|
||||
STATUS: '',
|
||||
DEPTIDS: '',
|
||||
searchForm: {
|
||||
keyJobNumber: '',
|
||||
keyState: '',
|
||||
keyApplyUserName: '',
|
||||
keyApproveUserName: '',
|
||||
keyApproveTime: '',
|
||||
HOT_WORK_LEVEL_INDEX: '',
|
||||
JOB_CONTENT: '',
|
||||
HOT_WORK_POSITION: '',
|
||||
UNIT_LEADER_DEPARTMENT_ID: ''
|
||||
},
|
||||
loginUserID: '',
|
||||
loginRoleNumber: JSON.parse(sessionStorage.getItem('user')).RNUMBER
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getEditMyInfo()
|
||||
this.getDictTreeData()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.HOTWORK_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取登录人信息
|
||||
getEditMyInfo() {
|
||||
requestFN(
|
||||
'/user/goEditMyInfo',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.loginUserID = data.pd.USER_ID // 主职角色ID
|
||||
}).catch((e) => {
|
||||
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/dw/getAlarmList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
tm: new Date().getTime()
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton() {
|
||||
var keys = 'hotwork:add,hotwork:del,hotwork:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.hotworkfhadminadd // 新增权限
|
||||
this.del = data.hotworkfhadmindel // 删除权限
|
||||
this.edit = data.hotworkfhadminedit // 修改权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
translate(id, list) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].BIANMA === id || list[i].value === id || list[i].id === id) return list[i].NAME || list[i].label || list[i].name
|
||||
}
|
||||
},
|
||||
getUserName(keyName, list) {
|
||||
if (list) {
|
||||
var keyVal = ''
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i][keyName]) {
|
||||
keyVal += list[i][keyName] + ','
|
||||
}
|
||||
}
|
||||
return keyVal.substring(0, (keyVal.length - 1))
|
||||
}
|
||||
},
|
||||
goDetail(id, type) {
|
||||
this.$parent.activeName = 'Detail'
|
||||
this.$parent.HOTWORKAPPLICATION_ID = id
|
||||
this.$parent.HOTWORKAPPLICATION_TYPE = type
|
||||
},
|
||||
goInfo(id, type) {
|
||||
this.$parent.activeName = 'Info'
|
||||
this.$parent.HOTWORKAPPLICATION_ID = id
|
||||
this.$parent.HOTWORKAPPLICATION_TYPE = type
|
||||
},
|
||||
getDictTreeData() {
|
||||
return new Promise((resolve) => {
|
||||
requestFN(
|
||||
'/department/listTreeCorpDept',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
|
||||
resolve('ok')
|
||||
}).catch((e) => {
|
||||
})
|
||||
})
|
||||
},
|
||||
chongzhi() {
|
||||
this.searchForm = {
|
||||
stateConfirm: '',
|
||||
keySource: '',
|
||||
keyHiddenDescr: '',
|
||||
keyFindUserName: '',
|
||||
keyFindUserDept: '',
|
||||
keyHiddenType: '',
|
||||
keyHiddenPart: '',
|
||||
keyHiddenlevel: '',
|
||||
keyFindTime: [],
|
||||
keyFindStateTime: '',
|
||||
keyFindEndTime: '',
|
||||
keyConfirmUser: '',
|
||||
HOT_WORK_LEVEL_INDEX: '',
|
||||
JOB_CONTENT: '',
|
||||
HOT_WORK_POSITION: ''
|
||||
}
|
||||
this.$refs.searchForm.resetFields()
|
||||
this.getList()
|
||||
},
|
||||
batchDel(id) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/hotworkapplication/delete',
|
||||
{
|
||||
HOTWORKAPPLICATION_ID: id,
|
||||
loginUserId: this.loginUserID
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
|
@ -0,0 +1,29 @@
|
|||
<template>
|
||||
<div>
|
||||
<List v-show="activeName=='List'" ref="list" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
export default {
|
||||
components: {
|
||||
List: List
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
activeName(val) {
|
||||
if (val == 'List') {
|
||||
this.$refs.list.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
Loading…
Reference in New Issue