584 值班人员和接班人员 数据不正确

liujun0703-新项目开发
liujun 2024-08-22 16:44:03 +08:00
parent 73ce314f24
commit b69157889e
4 changed files with 245 additions and 26 deletions

View File

@ -17,12 +17,11 @@
<el-table-column prop="UNIT" label="单位" width="180" /> <el-table-column prop="UNIT" label="单位" width="180" />
<el-table-column :show-overflow-tooltip="true" prop="START_TIME" label="开始时间" /> <el-table-column :show-overflow-tooltip="true" prop="START_TIME" label="开始时间" />
<el-table-column :show-overflow-tooltip="true" prop="END_TIME" label="结束时间" /> <el-table-column :show-overflow-tooltip="true" prop="END_TIME" label="结束时间" />
<el-table-column :show-overflow-tooltip="true" prop="DUTY_PERSONNEL" label="值班人员" /> <el-table-column :show-overflow-tooltip="true" prop="DUTY_PERSONNEL_NAME" label="值班人员" />
<el-table-column :show-overflow-tooltip="true" prop="SHIFT_PERSONNEL" label="接班人员" /> <el-table-column :show-overflow-tooltip="true" prop="SHIFT_PERSONNEL_NAME" label="接班人员" />
<el-table-column :show-overflow-tooltip="true" prop="DUTY_RECORD" label="值班记录" /> <el-table-column :show-overflow-tooltip="true" prop="DUTY_RECORD" label="值班记录" />
<el-table-column :show-overflow-tooltip="true" prop="HANDLING_SITUATION" label="处理情况" /> <el-table-column :show-overflow-tooltip="true" prop="HANDLING_SITUATION" label="处理情况" />
<el-table-column :show-overflow-tooltip="true" prop="HANDOVER_ITEMS" label="交接事项" /> <el-table-column :show-overflow-tooltip="true" prop="HANDOVER_ITEMS" label="交接事项" />
<el-table-column :show-overflow-tooltip="true" prop="OPERATETIME" label="修改时间" />
<el-table-column label="操作" align="center" width="220"> <el-table-column label="操作" align="center" width="220">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" icon="el-icon-download" size="mini" @click="confirmExport(row.ID)"></el-button> <el-button type="text" icon="el-icon-download" size="mini" @click="confirmExport(row.ID)"></el-button>
@ -77,26 +76,12 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="值班人员" prop="DUTY_PERSONNEL"> <el-form-item label="值班人员" prop="DUTY_PERSONNEL">
<el-select v-model="form.DUTY_PERSONNEL" placeholder="请选择值班人员"> <el-input v-model="form.DUTY_PERSONNEL_NAME" @click.native="openDutyPerson"/>
<el-option
v-for="item in addressOptions"
:key="item.ID"
:label="item.NAME"
:value="item.NAME"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="接班人员" prop="SHIFT_PERSONNEL"> <el-form-item label="接班人员" prop="SHIFT_PERSONNEL">
<el-select v-model="form.SHIFT_PERSONNEL" placeholder="请选择接班人员"> <el-input v-model="form.SHIFT_PERSONNEL_NAME" @click.native="openShiftPeople"/>
<el-option
v-for="item in addressOptions"
:key="item.ID"
:label="item.NAME"
:value="item.NAME"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -106,6 +91,8 @@
<el-button type="primary" @click="confirm"> </el-button> <el-button type="primary" @click="confirm"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<select-zhi-ban-user ref="dutyPerson" @selectPeople="dutyPerson"/>
<select-zhi-ban-user ref="shiftPeople" @selectPeople="shiftPeople"/>
</div> </div>
</template> </template>
@ -113,9 +100,10 @@
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import { MessageBox, Message } from 'element-ui' import { MessageBox, Message } from 'element-ui'
import SelectZhiBanUser from '../components/selectZhiBanUser.vue'
export default { export default {
components: { Pagination }, components: { SelectZhiBanUser, Pagination },
data() { data() {
return { return {
listLoading: false, listLoading: false,
@ -143,10 +131,10 @@ export default {
{ required: true, message: '交接事项不能为空', trigger: 'blur' } { required: true, message: '交接事项不能为空', trigger: 'blur' }
], ],
DUTY_PERSONNEL: [ DUTY_PERSONNEL: [
{ required: true, message: '值班人员不能为空', trigger: 'blur' } { required: true, message: '值班人员不能为空', trigger: 'change' }
], ],
SHIFT_PERSONNEL: [ SHIFT_PERSONNEL: [
{ required: true, message: '接班人员不能为空', trigger: 'blur' } { required: true, message: '接班人员不能为空', trigger: 'change' }
] ]
}, },
form: { form: {
@ -155,7 +143,9 @@ export default {
START_TIME: '', START_TIME: '',
END_TIME: '', END_TIME: '',
DUTY_PERSONNEL: '', DUTY_PERSONNEL: '',
DUTY_PERSONNEL_NAME: '',
SHIFT_PERSONNEL: '', SHIFT_PERSONNEL: '',
SHIFT_PERSONNEL_NAME: '',
DUTY_RECORD: '', DUTY_RECORD: '',
HANDLING_SITUATION: '', HANDLING_SITUATION: '',
HANDOVER_ITEMS: '' HANDOVER_ITEMS: ''
@ -226,7 +216,9 @@ export default {
START_TIME: data.START_TIME, START_TIME: data.START_TIME,
END_TIME: data.END_TIME, END_TIME: data.END_TIME,
DUTY_PERSONNEL: data.DUTY_PERSONNEL, DUTY_PERSONNEL: data.DUTY_PERSONNEL,
DUTY_PERSONNEL_NAME: data.DUTY_PERSONNEL_NAME,
SHIFT_PERSONNEL: data.SHIFT_PERSONNEL, SHIFT_PERSONNEL: data.SHIFT_PERSONNEL,
SHIFT_PERSONNEL_NAME: data.SHIFT_PERSONNEL_NAME,
DUTY_RECORD: data.DUTY_RECORD, DUTY_RECORD: data.DUTY_RECORD,
HANDLING_SITUATION: data.HANDLING_SITUATION, HANDLING_SITUATION: data.HANDLING_SITUATION,
HANDOVER_ITEMS: data.HANDOVER_ITEMS HANDOVER_ITEMS: data.HANDOVER_ITEMS
@ -243,7 +235,9 @@ export default {
START_TIME: '', START_TIME: '',
END_TIME: '', END_TIME: '',
DUTY_PERSONNEL: '', DUTY_PERSONNEL: '',
DUTY_PERSONNEL_NAME: '',
SHIFT_PERSONNEL: '', SHIFT_PERSONNEL: '',
SHIFT_PERSONNEL_NAME: '',
DUTY_RECORD: '', DUTY_RECORD: '',
HANDLING_SITUATION: '', HANDLING_SITUATION: '',
HANDOVER_ITEMS: '' HANDOVER_ITEMS: ''
@ -342,7 +336,22 @@ export default {
.catch((e) => { .catch((e) => {
this.listLoading = false this.listLoading = false
}) })
},
openDutyPerson() {
this.$refs.dutyPerson.init()
},
openShiftPeople() {
this.$refs.shiftPeople.init()
},
dutyPerson(e) {
this.form.DUTY_PERSONNEL = e.USER_ID
this.form.DUTY_PERSONNEL_NAME = e.NAME
},
shiftPeople(e) {
this.form.SHIFT_PERSONNEL = e.USER_ID
this.form.SHIFT_PERSONNEL_NAME = e.NAME
} }
} }
} }
</script> </script>

View File

@ -0,0 +1,196 @@
<template>
<el-dialog v-loading="listLoading" :visible.sync="visible" title="选择人员" width="850px">
<el-container>
<el-aside width="240px" style="background-color:#fff">
<el-input
v-model="filterText"
placeholder="输入关键字进行过滤"
style="margin:10px 0"/>
<el-tree
v-loading="treeLoading"
ref="tree"
:data="treeData"
:props="defaultProps"
:filter-node-method="filterNode"
class="filter-tree"
@node-click="handleNodeClick"
/>
</el-aside>
<el-main>
<div class="filter-btn-group">
<el-form label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="用户名">
<el-input v-model="KEYWORDS" style="width: 150px" placeholder="请输入关键字"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="10px">
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getAddressList()">
搜索
</el-button>
<el-button class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" style="height:350px" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="NAME" label="姓名" />
<el-table-column prop="USERNAME" width="180" align="center" label="电话号码" />
</el-table>
<div class="page-btn-group">
<div />
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</el-main>
</el-container>
<div slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="savePeople"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { requestFN } from '@/utils/request'
import Pagination from '@/components/Pagination'
import { Treeselect } from '@riophae/vue-treeselect'
export default {
components: { Treeselect, Pagination },
data() {
return {
visible: false,
nodeData: [],
defaultProps: {
value: 'department_ID',
children: 'nodes',
label: 'name'
},
addressName: '',
addressSex: '',
adressvarList: [],
listQuery: {
page: 1,
limit: 10
},
total: 0,
treeLoading: false,
filterText: '',
treeData: [],
form: {
DEPARTMENT_ID: ''
},
varList: [],
KEYWORDS: '',
DEPARTMENT_ID: '',
formPeople: {
ids: '',
PEOPLE_SOURCE: '',
MAIN_ID: '',
PEOPLE_TYPE: '',
PEOPLE_NAME: '',
PEOPLE_PHONE: '',
DITY_TYPE: ''
},
listLoading: false
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
}
},
created() {
},
methods: {
init(e) {
this.visible = true
this.getTreeList()
this.formPeople = e
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
handleNodeClick(node, data, value) {
this.form.DEPARTMENT_ID = node.id
this.getList(node.id)
},
getAddressList() {
this.getList()
},
goKeyReset() {
this.addressName = ''
this.addressgroupId = ''
this.addressSex = ''
this.getAddressList()
},
savePeople() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length === 0) {
this.$message({
message: '请选择人员',
type: 'error'
})
return false
}
if (_selectData.length !== 1) {
this.$message({
message: '请选择一个人员',
type: 'error'
})
return false
}
this.$emit('selectPeople', _selectData[0])
this.visible = false
},
getList(DEPARTMENT_ID) {
this.listLoading = true
if (DEPARTMENT_ID) {
this.DEPARTMENT_ID = DEPARTMENT_ID
}
requestFN(
'/user/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.KEYWORDS,
DEPARTMENT_ID: this.DEPARTMENT_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.userList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
getTreeList() {
this.treeLoading = true
requestFN(
'/department/listTree',
{}
).then((data) => {
this.treeLoading = false
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
this.treeLoading = false
})
}
}
}
</script>
<style lang="sass" scoped>
.table-ui
td
line-height: 34px
.tbg
width: 200px
.ui-foot
text-align: center
margin-top: 20px
</style>

View File

@ -187,10 +187,10 @@
</el-dialog> </el-dialog>
<!-- 是否救援弹窗 --> <!-- 是否救援弹窗 -->
<el-dialog :visible.sync="dialogRescueVisible" title="是否救援"> <el-dialog :visible.sync="dialogRescueVisible" title="是否救援">
<el-form ref="rescueForm" :model="rescueForm" label-width="120px"> <el-form ref="rescueForm" :model="rescueForm" :rules="rescueFormRules" label-width="120px">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否执救援:" prop="ISRESCUE"> <el-form-item label="是否执救援:" prop="RESCUE_SITUATION">
<el-radio-group v-model="rescueForm.RESCUE_SITUATION"> <el-radio-group v-model="rescueForm.RESCUE_SITUATION">
<el-radio :label="'1'"></el-radio> <el-radio :label="'1'"></el-radio>
<el-radio :label="'2'"></el-radio> <el-radio :label="'2'"></el-radio>
@ -198,7 +198,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否执预案:" prop="ISRESCUE"> <el-form-item label="是否执预案:" prop="EVENT_SITUATION">
<el-radio-group v-model="rescueForm.EVENT_SITUATION"> <el-radio-group v-model="rescueForm.EVENT_SITUATION">
<el-radio :label="'1'"></el-radio> <el-radio :label="'1'"></el-radio>
<el-radio :label="'0'"></el-radio> <el-radio :label="'0'"></el-radio>
@ -549,6 +549,20 @@ export default {
EVENT_SITUATION: '', EVENT_SITUATION: '',
RESCUE_SITUATION: '' RESCUE_SITUATION: ''
}, },
rescueFormRules: {
RESCUE_SITUATION: [
{ required: true, message: '请选择救援情况', trigger: 'blur' }
],
EVENT_SITUATION: [
{ required: true, message: '请选择是否执预案', trigger: 'blur' }
],
FIRERESERVEPLAN_ID: [
{ required: true, message: '请选择应急预案', trigger: 'blur' }
],
HIERARCHICALRESPONSE_ID: [
{ required: true, message: '请选择响应级别', trigger: 'blur' }
]
},
total: 0, total: 0,
varList: [], varList: [],
EVENT_NAME: '', EVENT_NAME: '',

View File

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<div class="filter-container"> <div class="filter-container">
<el-form inline> <el-form inline>
<el-form-item label="姓名:" prop="NAME"> <el-form-item label="机主姓名:" prop="NAME">
<el-input v-model="NAME" placeholder="姓名" class="filter-item" style="width: 200px;" /> <el-input v-model="NAME" placeholder="姓名" class="filter-item" style="width: 200px;" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>