增加搜索条件

cmt1.0
zhaoyu 2023-12-15 18:27:13 +08:00
parent 350263c039
commit be3448012a
2 changed files with 89 additions and 55 deletions

View File

@ -1,41 +1,51 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="searchForm" :model="searchForm"> <el-form ref="searchForm" :model="searchForm" label-width="80px">
<el-row :gutter="12"> <el-row>
<el-col :span="4"> <el-col span="6">
<el-form-item label="作业编号" prop="keySource" label-width="80px"> <el-form-item label="作业编号" prop="keySource">
<el-input v-model="searchForm.keyJobNumber" placeholder="请输入作业编号" class="filter-item" /> <el-input v-model="searchForm.keyJobNumber" placeholder="请输入作业编号" class="filter-item" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col span="6">
<el-form-item label="特级动火审批状态" prop="keyHiddenDescr" label-width="140px"> <el-form-item label="特级动火审批状态" prop="keyHiddenDescr" label-width="130px">
<el-select v-model="searchForm.keyState" placeholder="请选择"> <el-select v-model="searchForm.keyState" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in statusSuperList" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="4">--> <el-col :span="6">
<!-- <el-form-item label="申请人" prop="keyApplyUserName">--> <el-form-item label="动火等级" prop="HOT_WORK_LEVEL_INDEX" >
<!-- <el-input v-model="searchForm.keyApplyUserName" placeholder="请输入申请人" class="filter-item" />--> <el-select v-model="searchForm.HOT_WORK_LEVEL_INDEX" placeholder="请选择" style="width: 80%">
<!-- </el-form-item>--> <el-option v-for="item in hotworklevelList" :key="item.id" :label="item.name" :value="item.id" />
<!--&lt;!&ndash; </el-col>&ndash;&gt;--> </el-select>
<!-- <el-col :span="4">--> </el-form-item>
<!-- <el-form-item label="审批人" prop="keyApproveUserName">--> </el-col>
<!-- <el-input v-model="searchForm.keyApproveUserName" placeholder="请输入审批人" class="filter-item" />--> <el-col :span="6">
<!-- </el-form-item>--> <el-form-item label="动火内容" prop="keySource">
<!-- </el-col>--> <el-input v-model="searchForm.JOB_CONTENT" placeholder="请输入动火内容" class="filter-item" />
<!-- <el-col :span="4">--> </el-form-item>
<!-- <el-form-item label="审批时间" prop="keyFindUserName">--> </el-col>
<!-- <el-date-picker--> </el-row>
<!-- v-model="searchForm.keyApproveTime"--> <el-row>
<!-- value-format="yyyy-MM-dd"--> <el-col :span="6">
<!-- style="width: 100%"--> <el-form-item label="动火部位" prop="keySource">
<!-- type="date"--> <el-input v-model="searchForm.HOT_WORK_POSITION" placeholder="请输入动火部位" class="filter-item" />
<!-- placeholder="选择日期"--> </el-form-item>
<!-- />--> </el-col>
<!-- </el-form-item>--> <el-col :span="6">
<!-- </el-col>--> <el-form-item label="动火区域管辖单位" prop="keySource" label-width="130px">
<el-col :span="4"> <SelectTree
ref="deptTree_Inspected"
:clearable="false"
:options="treeData"
:props="defaultProps"
v-model="searchForm.UNIT_LEADER_DEPARTMENT_ID"
placeholder="请选择动火区域管辖单位"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getList"> <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getList">
搜索 搜索
</el-button> </el-button>
@ -54,6 +64,10 @@
{{ translate(row.JOB_TYPE_INDEX, jobTypeList) }} {{ translate(row.JOB_TYPE_INDEX, jobTypeList) }}
</template> </template>
</el-table-column> </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="申请单位" > <el-table-column prop="WORK_LEVEL" label="申请单位" >
<template slot-scope="{row}"> <template slot-scope="{row}">
{{ getUserName('deptName', row.HOT_WORK_APPLICATION_List) }} {{ getUserName('deptName', row.HOT_WORK_APPLICATION_List) }}
@ -93,8 +107,10 @@
import Pagination from '@/components/Pagination' // el-pagination import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree'
export default { export default {
components: { Pagination }, components: { Pagination, SelectTree },
directives: { waves }, directives: { waves },
data() { data() {
return { return {
@ -113,6 +129,7 @@ export default {
multipleSelectionAll: [], // multipleSelectionAll: [], //
multipleSelection: [], // multipleSelection: [], //
treeData: [], //
dialogFormShow: false, dialogFormShow: false,
dialogFormEdit: false, dialogFormEdit: false,
dialogType: 'add', dialogType: 'add',
@ -124,6 +141,24 @@ export default {
{ id: '0', name: '内部作业' }, { id: '0', name: '内部作业' },
{ id: '1', 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: [ statusList: [
{ id: '0', name: '申请人' }, { id: '0', name: '申请人' },
{ id: '1', name: '动火单位待确认' }, { id: '1', name: '动火单位待确认' },
@ -159,7 +194,11 @@ export default {
keyState: '', keyState: '',
keyApplyUserName: '', keyApplyUserName: '',
keyApproveUserName: '', keyApproveUserName: '',
keyApproveTime: '' keyApproveTime: '',
HOT_WORK_LEVEL_INDEX: '',
JOB_CONTENT: '',
HOT_WORK_POSITION: '',
UNIT_LEADER_DEPARTMENT_ID: ''
}, },
loginUserID: '' loginUserID: ''
} }
@ -167,6 +206,7 @@ export default {
created() { created() {
this.getList() this.getList()
this.getEditMyInfo() this.getEditMyInfo()
this.getDictTreeData()
}, },
methods: { methods: {
getRowKey(row) { getRowKey(row) {
@ -248,6 +288,18 @@ export default {
this.$parent.HOTWORKAPPLICATION_ID = id this.$parent.HOTWORKAPPLICATION_ID = id
this.$parent.HOTWORKAPPLICATION_TYPE = type 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() { chongzhi() {
this.searchForm = { this.searchForm = {
stateConfirm: '', stateConfirm: '',
@ -261,7 +313,10 @@ export default {
keyFindTime: [], keyFindTime: [],
keyFindStateTime: '', keyFindStateTime: '',
keyFindEndTime: '', keyFindEndTime: '',
keyConfirmUser: '' keyConfirmUser: '',
HOT_WORK_LEVEL_INDEX: '',
JOB_CONTENT: '',
HOT_WORK_POSITION: ''
} }
this.$refs.searchForm.resetFields() this.$refs.searchForm.resetFields()
this.getList() this.getList()

View File

@ -15,8 +15,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="动火等级" prop="HOT_WORK_LEVEL_INDEX" label-width="130px"> <el-form-item label="动火等级" prop="HOT_WORK_LEVEL_INDEX" >
<el-select v-model="searchForm.HOT_WORK_LEVEL_INDEX" placeholder="请选择"> <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-option v-for="item in hotworklevelList" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -45,27 +45,6 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="4">-->
<!-- <el-form-item label="申请人" prop="keyApplyUserName">-->
<!-- <el-input v-model="searchForm.keyApplyUserName" placeholder="请输入申请人" class="filter-item" />-->
<!-- </el-form-item>-->
<!--&lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- <el-col :span="4">-->
<!-- <el-form-item label="审批人" prop="keyApproveUserName">-->
<!-- <el-input v-model="searchForm.keyApproveUserName" placeholder="请输入审批人" class="filter-item" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <el-form-item label="审批时间" prop="keyFindUserName">-->
<!-- <el-date-picker-->
<!-- v-model="searchForm.keyApproveTime"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- style="width: 100%"-->
<!-- type="date"-->
<!-- placeholder="选择日期"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6"> <el-col :span="6">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getList"> <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getList">
搜索 搜索