pc端发送指令功能补全
parent
fdcbfdfbad
commit
8e05bc8a25
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<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-col :span="12">
|
||||
<el-form-item label="执行部门:" label-position="right">
|
||||
<el-form-item label="执行部门:" prop="CORP_ID" label-position="right">
|
||||
<Treeselect
|
||||
:options="corpList"
|
||||
v-model="form.CORP_ID"
|
||||
|
@ -16,8 +16,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="执行人:">
|
||||
<el-select v-model="form.USER_ID" placeholder="请选择执行人" style="width: 400px">
|
||||
<el-form-item label="执行人:" prop="USER_ID">
|
||||
<el-select v-model="form.USER_ID" prop="USER_ID" placeholder="请选择执行人" style="width: 400px">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.USER_ID"
|
||||
|
@ -42,7 +42,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
|
@ -88,6 +88,17 @@ export default {
|
|||
CORP_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: [
|
||||
{
|
||||
value: '0',
|
||||
|
@ -136,20 +147,27 @@ export default {
|
|||
this.$emit('close', false)
|
||||
},
|
||||
confirm() {
|
||||
requestFN(
|
||||
'plan/planningDepartment/getUserList', {
|
||||
FIRERESERVEPLAN_ID: this.info.FIRERESERVEPLAN_ID,
|
||||
REPORT_ID: this.info.REPORT_ID,
|
||||
USER_ID: this.form.USER_ID,
|
||||
USER_NAME: this.userList.find(item => item.USER_ID === this.form.USER_ID).NAME,
|
||||
MESSAGE: this.form.INSTRUCTION_CONTENT
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
requestFN(
|
||||
'/bi/emergency/creatInstruct', {
|
||||
FIRERESERVEPLAN_ID: this.info.FIRERESERVEPLAN_ID,
|
||||
REPORT_ID: this.info.REPORT_ID,
|
||||
USER_ID: this.form.USER_ID,
|
||||
USER_NAME: this.userList.find(item => item.USER_ID === this.form.USER_ID).NAME,
|
||||
MESSAGE: this.form.INSTRUCTION_CONTENT
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.$emit('close', false)
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!')
|
||||
return false
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.userList = data.data
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue