指令功能补全

liujun0703-新项目开发
liujun 2024-08-13 10:36:08 +08:00
parent 1b5634eeb2
commit 29e6d5cd4f
4 changed files with 42 additions and 35 deletions

View File

@ -6,7 +6,7 @@
</div> </div>
<el-table :data="persons" border> <el-table :data="persons" border>
<el-table-column prop="USER_NAME" label="姓名" /> <el-table-column prop="USER_NAME" label="姓名" />
<el-table-column label="性别" show-overflow-tooltip="true"> <el-table-column :show-overflow-tooltip="true" label="性别">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.gender === '0' ? '男' : row.gender === '1' ? '女' : '' }} {{ row.gender === '0' ? '男' : row.gender === '1' ? '女' : '' }}
</template> </template>

View File

@ -115,7 +115,7 @@
<!-- 编辑弹窗 --> <!-- 编辑弹窗 -->
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px"> <el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px">
<el-form ref="form" :rules="rules" :model="form" label-width="250px"> <el-form ref="form" :rules="rules" :model="form" label-width="100px" style="margin-right: 10px">
<el-form-item label="机构名称" prop="ORG_NAME"> <el-form-item label="机构名称" prop="ORG_NAME">
<el-input v-model="form.ORG_NAME" placeholder="请输入机构名称..." /> <el-input v-model="form.ORG_NAME" placeholder="请输入机构名称..." />
</el-form-item> </el-form-item>

View File

@ -6,6 +6,7 @@
<el-form-item label="执行部门:" prop="CORP_ID" label-position="right"> <el-form-item label="执行部门:" prop="CORP_ID" label-position="right">
<Treeselect <Treeselect
:options="corpList" :options="corpList"
:normalizer="normalizer"
v-model="form.CORP_ID" v-model="form.CORP_ID"
placeholder="请选择机构" placeholder="请选择机构"
no-options-text="暂无数据" no-options-text="暂无数据"
@ -20,9 +21,9 @@
<el-select v-model="form.USER_ID" prop="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.ID"
:label="item.NAME" :label="item.USER_NAME"
:value="item.USER_ID" :value="item.ID"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -123,10 +124,10 @@ export default {
}, },
getCorp() { getCorp() {
requestFN( requestFN(
'plan/planningDepartment/getTreeForSelect', { FIRERESERVEPLAN_ID: this.info.FIRERESERVEPLAN_ID, proid: '0' } '/bi/emergency/getYjCorp', {}
).then((data) => { ).then((data) => {
if (data.result === 'success') { if (data.result === 'success') {
this.corpList = data.data this.corpList = data.departmentList
} }
}).catch((e) => { }).catch((e) => {
console.log(e) console.log(e)
@ -134,10 +135,10 @@ export default {
}, },
getUser(id) { getUser(id) {
requestFN( requestFN(
'plan/planningDepartment/getUserList', { FIRERESERVEPLAN_ID: this.info.FIRERESERVEPLAN_ID, DEPARTMENT_ID: id } '/major/organization/detail', { Id: id }
).then((data) => { ).then((data) => {
if (data.result === 'success') { if (data.result === 'success') {
this.userList = data.data this.userList = data.msg.persons
} }
}).catch((e) => { }).catch((e) => {
console.log(e) console.log(e)
@ -154,7 +155,7 @@ export default {
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,
USER_NAME: this.userList.find(item => item.USER_ID === this.form.USER_ID).NAME, USER_NAME: this.userList.find(item => item.ID === this.form.USER_ID).USER_NAME,
MESSAGE: this.form.INSTRUCTION_CONTENT MESSAGE: this.form.INSTRUCTION_CONTENT
} }
).then((data) => { ).then((data) => {
@ -175,6 +176,13 @@ export default {
return false return false
} }
}) })
},
normalizer(node) {
return {
id: node.ID,
label: node.ORG_NAME,
children: node.nodes
}
} }
} }
} }

View File

@ -29,23 +29,20 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="50" align="center" /> <el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="ACCESS_MODE" label="接入方式" width="180" /> <el-table-column prop="ACCESS_MODE" label="接入方式" width="180" />
<el-table-column prop="OWNER_NAME" label="机主姓名" show-overflow-tooltip="true" /> <el-table-column :show-overflow-tooltip="true" prop="OWNER_NAME" label="机主姓名" />
<el-table-column prop="INCOMING_PHONE" label="呼入电话" show-overflow-tooltip="true" /> <el-table-column :show-overflow-tooltip="true" prop="INCOMING_PHONE" label="呼入电话" />
<el-table-column prop="EVENT_TYPE" label="事件类型" show-overflow-tooltip="true" /> <el-table-column :show-overflow-tooltip="true" prop="EVENT_TYPE" label="事件类型" />
<el-table-column prop="REPORT_TIME" label="接报时间" show-overflow-tooltip="true" /> <el-table-column :show-overflow-tooltip="true" prop="REPORT_TIME" label="接报时间" />
<el-table-column prop="OCCURRENCE_TIME" label="发生时间" show-overflow-tooltip="true" /> <el-table-column :show-overflow-tooltip="true" prop="OCCURRENCE_TIME" label="发生时间" />
<el-table-column prop="RESCUE_SITUATION" label="救援情况" show-overflow-tooltip="true"> <el-table-column :show-overflow-tooltip="true" prop="RESCUE_SITUATION_NAME" label="救援情况"/>
<template slot-scope="scope"> <el-table-column :show-overflow-tooltip="true" prop="EVENT_SITUATION_NAME" label="预案是否启动"/>
{{ scope.row.RESCUE_SITUATION === '1' ? '已发起' : (scope.row.RESCUE_SITUATION === '2' || scope.row.RESCUE_SITUATION === null ? '未发起' : '') }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="500"> <el-table-column label="操作" align="center" width="500">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button v-if="row.RESCUE_SITUATION !== '1'" type="primary" size="mini" @click="handleRescue(row.ID)"></el-button> <el-button v-if="row.RESCUE_SITUATION !== '1'" type="primary" size="mini" @click="handleRescue(row.ID)"></el-button>
<el-button type="primary" icon="el-icon-document" size="mini" @click="goList('detail', row.ID, '1')">查看</el-button> <el-button type="primary" icon="el-icon-document" size="mini" @click="goList('detail', row.ID, '1')">查看</el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID, true)">生成专报</el-button> <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID, true)">生成专报</el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID)"></el-button> <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.EVENT_NAME)"></el-button> <el-button v-if="false" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.EVENT_NAME)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -59,7 +56,7 @@
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div> </div>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px"> <el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px">
<el-form ref="form" :rules="rules" :model="form" label-width="250px"> <el-form ref="form" :rules="rules" :model="form" label-width="100px" style="margin-right: 10px">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="接入方式" prop="ACCESS_MODE"> <el-form-item label="接入方式" prop="ACCESS_MODE">
@ -179,9 +176,9 @@
<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="ISRESCUE">
<el-radio-group v-model="rescueForm.ISRESCUE"> <el-radio-group v-model="rescueForm.RESCUE_SITUATION">
<el-radio :label="'true'"></el-radio> <el-radio :label="'1'"></el-radio>
<el-radio :label="'false'"></el-radio> <el-radio :label="'2'"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -518,7 +515,9 @@ export default {
rescueForm: { rescueForm: {
FIRERESERVEPLAN_ID: '', FIRERESERVEPLAN_ID: '',
HIERARCHICALRESPONSE_ID: '', HIERARCHICALRESPONSE_ID: '',
EVENT_SITUATION: '' REGISTRATION_ID: '',
EVENT_SITUATION: '',
RESCUE_SITUATION: ''
}, },
total: 0, total: 0,
varList: [], varList: [],
@ -634,9 +633,6 @@ export default {
], ],
LATITUDE: [ LATITUDE: [
{ required: true, message: '纬度不能为空', trigger: 'blur' } { required: true, message: '纬度不能为空', trigger: 'blur' }
],
ISRESCUE: [
{ required: true, message: '是否救援不能为空', trigger: 'blur' }
] ]
}, },
FFILE: [], FFILE: [],
@ -672,15 +668,18 @@ export default {
if (valid) { if (valid) {
this.dialogRescueVisible = false this.dialogRescueVisible = false
// //
this.sendSMS(this.rescueForm.FIRERESERVEPLAN_ID, this.rescueForm.HIERARCHICALRESPONSE_ID, this.rescueForm.REGISTRATION_ID) this.sendSMS(this.rescueForm)
.finally(() => {
this.getList()
})
} }
}) })
}, },
sendSMS(planId, responseId, registrationId) { sendSMS(e) {
requestFN('/major/registration/sendSMS', { planId, responseId, registrationId }) requestFN('/major/registration/sendSMS',
{ planId: e.FIRERESERVEPLAN_ID,
responseId: e.FIRERESERVEPLAN_ID,
registrationId: e.REGISTRATION_ID,
eventSituation: e.EVENT_SITUATION,
rescueSituation: e.RESCUE_SITUATION
})
.then((data) => { .then((data) => {
this.$router.push({ path: '/emergen_cyrescue/incident_management', query: { a: '' }}) this.$router.push({ path: '/emergen_cyrescue/incident_management', query: { a: '' }})
}).catch((e) => { }).catch((e) => {