pc端发送指令功能补全

liujun0703-新项目开发
liujun 2024-08-12 20:29:28 +08:00
parent fdcbfdfbad
commit 8e05bc8a25
1 changed files with 36 additions and 18 deletions

View File

@ -1,9 +1,9 @@
<template> <template>
<div class="app-container print-work" style="width: 100%"> <div class="app-container print-work" style="width: 100%">
<el-form v-model="form" label-width="150px"> <el-form ref="form" :model="form" :rules="rule" label-width="150px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="执行部门:" label-position="right"> <el-form-item label="执行部门:" prop="CORP_ID" label-position="right">
<Treeselect <Treeselect
:options="corpList" :options="corpList"
v-model="form.CORP_ID" v-model="form.CORP_ID"
@ -16,8 +16,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="执行人:"> <el-form-item label="执行人:" prop="USER_ID">
<el-select v-model="form.USER_ID" placeholder="请选择执行人" style="width: 400px"> <el-select v-model="form.USER_ID" prop="USER_ID" placeholder="请选择执行人" style="width: 400px">
<el-option <el-option
v-for="item in userList" v-for="item in userList"
:key="item.USER_ID" :key="item.USER_ID"
@ -42,7 +42,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="指令内容:"> <el-form-item label="指令内容:" prop="INSTRUCTION_CONTENT">
<el-input v-model="form.INSTRUCTION_CONTENT" placeholder="请输入指令内容" style="width: 400px"/> <el-input v-model="form.INSTRUCTION_CONTENT" placeholder="请输入指令内容" style="width: 400px"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -88,6 +88,17 @@ export default {
CORP_ID: null, CORP_ID: null,
USER_ID: null USER_ID: null
}, },
rule: {
INSTRUCTION_CONTENT: [
{ required: true, message: '请输入指令内容', trigger: 'blur' }
],
CORP_ID: [
{ required: true, message: '请选择机构', trigger: 'blur' }
],
USER_ID: [
{ required: true, message: '请选择执行人', trigger: 'blur' }
]
},
instructionTypeList: [ instructionTypeList: [
{ {
value: '0', value: '0',
@ -136,8 +147,10 @@ export default {
this.$emit('close', false) this.$emit('close', false)
}, },
confirm() { confirm() {
this.$refs.form.validate((valid) => {
if (valid) {
requestFN( requestFN(
'plan/planningDepartment/getUserList', { '/bi/emergency/creatInstruct', {
FIRERESERVEPLAN_ID: this.info.FIRERESERVEPLAN_ID, FIRERESERVEPLAN_ID: this.info.FIRERESERVEPLAN_ID,
REPORT_ID: this.info.REPORT_ID, REPORT_ID: this.info.REPORT_ID,
USER_ID: this.form.USER_ID, USER_ID: this.form.USER_ID,
@ -146,11 +159,16 @@ export default {
} }
).then((data) => { ).then((data) => {
if (data.result === 'success') { if (data.result === 'success') {
this.userList = data.data this.$emit('close', false)
} }
}).catch((e) => { }).catch((e) => {
console.log(e) console.log(e)
}) })
} else {
console.log('error submit!')
return false
}
})
} }
} }
} }