pc指令发送功能

liujun0703-新项目开发
liujun 2024-08-12 18:50:26 +08:00
parent 598695df6f
commit fdcbfdfbad
3 changed files with 122 additions and 15 deletions

View File

@ -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>

View File

@ -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() {

View File

@ -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)
})
}
}