pc指令发送功能
parent
598695df6f
commit
fdcbfdfbad
|
@ -26,7 +26,7 @@
|
|||
<feng-bi-ka-kou v-if="value.type === '3'" :id="value.id" :type="value.type"/>
|
||||
<!-- 报警点 -->
|
||||
<bao-jing v-if="value.type === '13'" :id="value.id" :type="value.type"/>
|
||||
<send-message v-if="value.type === 'sendMessage'" :id="value.id" :type="value.type"/>
|
||||
<send-message v-if="value.type === 'sendMessage'" :id="value.id" :info="value" @close="handlerClose"/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -297,7 +297,8 @@ export default {
|
|||
firstPoint: {
|
||||
x: null,
|
||||
y: null
|
||||
}
|
||||
},
|
||||
mapLevel: 20
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -329,10 +330,10 @@ export default {
|
|||
this.firstPoint.x = e.x
|
||||
this.firstPoint.y = e.y
|
||||
mapInstance = new window.BMapGL.Map('map') // 创建地图实例
|
||||
mapInstance.centerAndZoom(new window.BMapGL.Point(e.y, e.x), 15) // 创建点坐标
|
||||
mapInstance.centerAndZoom(new window.BMapGL.Point(e.y, e.x), this.mapLevel) // 创建点坐标
|
||||
mapInstance.enableScrollWheelZoom(true) // 开启鼠标滚轮缩放能力
|
||||
var point = new window.BMapGL.Point(this.firstPoint.y, this.firstPoint.x) // 设置中心点坐标(例如北京天安门)
|
||||
mapInstance.centerAndZoom(point, 15) // 设置中心点和缩放级别
|
||||
mapInstance.centerAndZoom(point, this.mapLevel) // 设置中心点和缩放级别
|
||||
mapInstance.enableScrollWheelZoom(true)
|
||||
var circle = new window.BMapGL.Circle(point, this.range, {
|
||||
strokeColor: 'blue',
|
||||
|
@ -349,7 +350,7 @@ export default {
|
|||
this.range = item
|
||||
mapInstance.clearOverlays()
|
||||
var point = new window.BMapGL.Point(this.firstPoint.y, this.firstPoint.x) // 设置中心点坐标(例如北京天安门)
|
||||
mapInstance.centerAndZoom(point, 15) // 设置中心点和缩放级别
|
||||
mapInstance.centerAndZoom(point, this.mapLevel) // 设置中心点和缩放级别
|
||||
mapInstance.enableScrollWheelZoom(true)
|
||||
var circle = new window.BMapGL.Circle(point, item, { // 2000米半径
|
||||
strokeColor: 'blue',
|
||||
|
@ -483,7 +484,7 @@ export default {
|
|||
subToggleCheck(sos, ind) {
|
||||
mapInstance.clearOverlays()
|
||||
var point = new window.BMapGL.Point(this.firstPoint.y, this.firstPoint.x) // 设置中心点坐标(例如北京天安门)
|
||||
mapInstance.centerAndZoom(point, 15) // 设置中心点和缩放级别
|
||||
mapInstance.centerAndZoom(point, 10) // 设置中心点和缩放级别
|
||||
mapInstance.enableScrollWheelZoom(true)
|
||||
var circle = new window.BMapGL.Circle(point, this.range, { // 2000米半径
|
||||
strokeColor: 'blue',
|
||||
|
@ -505,7 +506,7 @@ export default {
|
|||
// 接收子组件传递出来的指令发送的事件
|
||||
handlerOrderMessage() {
|
||||
this.infoDialog.visible = true
|
||||
this.infoDialog.info = {}
|
||||
this.infoDialog.info = { type: 'sendMessage', FIRERESERVEPLAN_ID: this.FIRERESERVEPLAN_ID, REPORT_ID: this.REPORT_ID }
|
||||
this.infoDialog.title = '指令信息'
|
||||
},
|
||||
initInfo() {
|
||||
|
|
|
@ -1,8 +1,57 @@
|
|||
<template>
|
||||
<div class="app-container print-work" style="width: 100%">
|
||||
<el-form>
|
||||
<el-form-item label="指令类型"/>
|
||||
<el-form v-model="form" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="执行部门:" label-position="right">
|
||||
<Treeselect
|
||||
:options="corpList"
|
||||
v-model="form.CORP_ID"
|
||||
placeholder="请选择机构"
|
||||
no-options-text="暂无数据"
|
||||
no-children-text="暂无数据"
|
||||
style="width: 400px"
|
||||
@select="handleSelect"
|
||||
/>
|
||||
</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-option
|
||||
v-for="item in userList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col v-if="false" :span="12">
|
||||
<el-form-item label="指令类型:" label-position="right">
|
||||
<el-select v-model="form.INSTRUCTION_TYPE" placeholder="请选择指令类型" style="width: 400px">
|
||||
<el-option
|
||||
v-for="item in instructionTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="指令内容:">
|
||||
<el-input v-model="form.INSTRUCTION_CONTENT" placeholder="请输入指令内容" style="width: 400px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="primary" @click="confirm">确定</el-button>
|
||||
<el-button @click="handleClose">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -22,28 +71,85 @@ export default {
|
|||
default() {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
form: {
|
||||
|
||||
}
|
||||
INSTRUCTION_TYPE: null,
|
||||
INSTRUCTION_CONTENT: null,
|
||||
CORP_ID: null,
|
||||
USER_ID: null
|
||||
},
|
||||
instructionTypeList: [
|
||||
{
|
||||
value: '0',
|
||||
label: '部门指令'
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
label: '个人指令'
|
||||
}
|
||||
],
|
||||
corpList: [],
|
||||
userList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
this.getCorp()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
handleSelect(value) {
|
||||
console.log(value)
|
||||
this.getUser(value.id)
|
||||
},
|
||||
getCorp() {
|
||||
requestFN(
|
||||
'/major/registration/detailLog', { Id: this.id }
|
||||
'plan/planningDepartment/getTreeForSelect', { FIRERESERVEPLAN_ID: this.info.FIRERESERVEPLAN_ID, proid: '0' }
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.form = data.msg
|
||||
this.corpList = data.data
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
getUser(id) {
|
||||
requestFN(
|
||||
'plan/planningDepartment/getUserList', { FIRERESERVEPLAN_ID: this.info.FIRERESERVEPLAN_ID, DEPARTMENT_ID: id }
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.userList = data.data
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
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
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.userList = data.data
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue