Merge remote-tracking branch 'origin/liujun0703-新项目开发' into liujun0703-新项目开发

liujun0703-新项目开发
WenShiJun 2024-07-18 14:27:58 +08:00
commit eb9d364645
10 changed files with 1734 additions and 846 deletions

View File

@ -11,15 +11,15 @@
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="预案名称" prop="PLAN_NAME">
<el-input v-model="form.PLAN_NAME" placeholder="请输入资源名称..." />
<el-input v-model="form.PLANNAME" placeholder="请输入资源名称..." />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预案类型" prop="PLAN_TYPE">
<el-form-item label="预案类型" prop="PLANTYPE">
<Treeselect
:options="yhtypelistthree"
:normalizer="normalizer"
v-model="form.PLAN_TYPE"
v-model="form.PLANTYPE"
placeholder="请选择预案类型"
no-options-text="暂无数据"
no-children-text="暂无数据"
@ -30,170 +30,68 @@
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="预案编号" prop="PLAN_NUMBER">
<el-input v-model="form.PLAN_NUMBER" placeholder="请输入资源名称..." />
<el-form-item label="预案编码" prop="PLANCODE">
<el-input v-model="form.PLANCODE" placeholder="请输入预案编码..." />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预案级别" prop="PLAN_LEVEL">
<el-input v-model="form.PLAN_LEVEL" placeholder="请输入预案类型..." />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="文本信息" prop="TEXTMESSAGE">
<el-form-item label="预案等级" prop="PLANGRADE">
<Treeselect
:options="wenbenlistthree"
:normalizer="normalizer"
v-model="form.TEXTMESSAGE"
placeholder="请选择预文本信息"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
:options="yhPLANGRADEthree"
</el-col>
<el-col :span="8">
<el-form-item label="行业类别" prop="INDUSTRY_CATEGORY">
<el-input v-model="form.INDUSTRY_CATEGORY" placeholder="请输入预案类型..." />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="编制单位" prop="COMPILING_UNIT">
<el-input v-model="form.COMPILING_UNIT" placeholder="请输入资源名称..." />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="有效时间" prop="VALIDITY_PERIOD">
<el-date-picker
v-model="form.VALIDITY_PERIOD"
type="date"
placeholder="选择日期"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="修订时间" prop="REVISION_TIME">
<el-date-picker
v-model="form.REVISION_TIME"
type="date"
placeholder="选择日期"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发布时间" prop="PUBLICATION_TIME">
<el-date-picker
v-model="form.PUBLICATION_TIME"
type="date"
placeholder="选择日期"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="使用范围" prop="APPLICABLE_SCOPE">
<el-input v-model="form.APPLICABLE_SCOPE" placeholder="请输入资源名称..." />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发布范围" prop="PUBLICATION_SCOPE">
<el-input v-model="form.PUBLICATION_SCOPE" placeholder="请输入预案类型..." />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="关联事件" prop="RELATED_EVENTS">
<Treeselect
:options="guanlianlistthree"
:normalizer="normalizer"
v-model="form.RELATED_EVENTS"
placeholder="请选择关联事件"
v-model="form.PLANGRADE"
placeholder="请选择预案类型"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-form-item label="事件类型" prop="PLANGRADE">
<el-checkbox-group v-model="checkList">
<el-checkbox label="1">危化品事故</el-checkbox>
<el-checkbox label="2">爆炸</el-checkbox>
<el-checkbox label="3">火灾</el-checkbox>
<el-checkbox label="4">水灾</el-checkbox>
<el-checkbox label="5">其他</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-row>
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="预案描述" prop="PLAN_DESCRIPTION">
<el-input v-model="form.PLAN_DESCRIPTION" type="textarea" placeholder="请输入预案类型..." />
<el-form-item :key="form.LON" label="经度" prop="LON">
<el-input v-model="form.LON" placeholder="请输入内容" disabled @focus="handleMap" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :key="form.LAT" label="纬度" prop="LAT">
<div style="display: flex">
<el-input v-model="form.LAT" placeholder="请输入内容" disabled style="width: 100%" @focus="handleMap"/>
<el-button style="margin-left:10px" @click="handleMap">
<span class="svg-container">
<svg-icon icon-class="international" />
</span>
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="15">
<el-form-item label="预案概述" prop="PLANDES">
<el-input v-model="form.PLANDES" type="textarea" placeholder="请输入预案概述..." />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="预案电子档">
<el-upload
ref="upload"
:on-change="handleDianzidangfileChange"
:on-remove="handleDianzidangfileRemove"
:auto-upload="false"
:limit="1"
action="#" >
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="救援方案标绘图">
<el-upload
ref="upload"
:on-change="handlejiuyuanfanganfileChange"
:on-remove="handlejiuyuanfanganfileRemove"
:auto-upload="false"
:limit="1"
action="#" >
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="平面图附件">
<el-upload
ref="upload"
:on-change="handlepingmiantufileChange"
:on-remove="handlepingmiantufileRemove"
:auto-upload="false"
:limit="1"
action="#" >
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="其他附件">
<el-upload
ref="upload"
:on-change="handleotherfileChange"
:on-remove="handleotherfileRemove"
:auto-upload="false"
:limit="1"
action="#" >
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="16">
<el-form-item label="是否默认预案" prop="DEFAULT_PLAN">
<el-radio v-model="form.DEFAULT_PLAN" label="1"></el-radio>
<el-radio v-model="form.DEFAULT_PLAN" label="0"></el-radio>
<el-col :span="15">
<el-form-item label="备注信息" prop="BZ">
<el-input v-model="form.BZ" type="textarea" placeholder="备注信息..." />
</el-form-item>
</el-col>
</el-row>
@ -202,57 +100,112 @@
</el-tab-pane>
<el-tab-pane v-if="PLAN_ID" label="急专家" name="tow">
<el-tab-pane v-if="PLAN_ID" label="分级响应" name="tow">
<yingjizhuangjia :planid="PLAN_ID"/>
</el-tab-pane>
<el-tab-pane v-if="PLAN_ID" label="救援队伍" name="three"></el-tab-pane>
<el-tab-pane v-if="PLAN_ID" label="组织架构" name="four">
<zuzhijiagou/>
<el-tab-pane v-if="PLAN_ID" label="组织结构" name="three">
<zuzhijiagou :planid="PLAN_ID"/>
</el-tab-pane>
<el-tab-pane v-if="PLAN_ID" label="预案资源" name="four">
<yvanziyuan :planid="PLAN_ID"/>
</el-tab-pane>
<el-tab-pane v-if="PLAN_ID" label="预案指令" name="five">
<yvanziling :planid="PLAN_ID" />
</el-tab-pane>
<el-tab-pane v-if="PLAN_ID" label="预案文本" name="six">
<yvanwenben :planid="PLAN_ID" :plan-name="planName" />
</el-tab-pane>
<el-tab-pane v-if="PLAN_ID" label="预案附件" name="seven">
<yvanfujian :planid="PLAN_ID" />
</el-tab-pane>
</el-tabs>
</div>
</div>
<div class="ui-height" />
<div class="ui-foot">
<el-button type="primary" @click="goback"></el-button>
<el-button v-if="activeName != 'four'" type="primary" @click="confirm(0)"></el-button>
<el-button v-if="activeName != 'four'" type="primary" @click="gotoxiayibu(1)" >保存并进入下一步</el-button>
<el-button v-if="activeName === 'first'" type="primary" @click="goback"></el-button>
<el-button v-if="activeName === 'first'" type="primary" @click="confirm(0)"></el-button>
<el-button v-if="activeName === 'first'" type="primary" @click="gotoxiayibu(1)" >保存并进入下一步</el-button>
<el-button v-if="activeName !== 'first'" type="primary" @click="shiyibu(0)"></el-button>
<el-button v-if="activeName !== 'first'" type="primary" @click="xiayibu(1)" >下一步</el-button>
</div>
<!-- 坐标选择 -->
<el-dialog :visible.sync="dialogFormMap" title="编辑坐标" width="800px" class="dy-dialog">
<baidu-map
v-ISLOADing="ISLOADingMap"
:zoom="zoom"
:scroll-wheel-zoom="true"
:style="{height: clientHeight+'px'}"
@click="getClickInfo"
@ready="handler">
<bm-view style="width: 100%; height:100%; flex: 1" />
<bm-control ref="control" :offset="{width: 10, height: 10}" anchor="BMAP_ANCHOR_TOP_LEFT">
<div class="map-flex">
<div class="map-lable">关键词</div>
<div style="flex:1;">
<el-autocomplete v-model="TYPEKeyword" :fetch-suggestions="querySearch" :trigger-on-focus="false" placeholder="请输入详细设备类型" style="width:100%" @select="handleSelect" />
</div>
<!-- <el-input v-model="TYPEKeyword" style="width: 200px" placeholder="请输入内容" />-->
<!-- <el-button slot="append" icon="el-icon-search" @click="mapNameChange"/>-->
</div>
</bm-control>
<!-- <bm-local-search :keyword="TYPEKeyword" :auto-viewport="true"/>-->
</baidu-map>
<div slot="footer" class="dialog-footer">
<span>经度</span>
<el-input v-model="LON" style="width: 200px" placeholder="请输入内容" disabled />
<span>纬度</span>
<el-input v-model="LAT" style="width: 200px" placeholder="请输入内容" disabled />
<el-button @click="dialogFormMap = false"> </el-button>
<el-button type="primary" @click="setPosition"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
import { upload } from '@/utils/upload'
import { Treeselect } from '@riophae/vue-treeselect'
import yingjizhuangjia from './yingjizhuangjia.vue'
import zuzhijiagou from './zuzhijiagou.vue'
import yvanziyuan from './yvanziyuan.vue'
import yvanziling from './yvanziling.vue'
import yvanwenben from './yvanwenben.vue'
import yvanfujian from './yvanfujian.vue'
export default {
components: { Treeselect, yingjizhuangjia, zuzhijiagou },
components: { Treeselect, yingjizhuangjia, zuzhijiagou, yvanziyuan, yvanziling, yvanwenben, yvanfujian },
data() {
return {
//
dianzidangfile: [],
//
jiuyuanfanganfile: [],
//
pingmiantufile: [],
//
otherfile: [],
//
allfiletype: [],
//
CORPINFO_ID: this.$parent.CORPINFO_ID,
clientHeight: 600,
ISLOADingMap: true,
listISLOADing: false,
buttonISLOADing: false,
BMap: '',
map: '',
showMap: false,
TYPEKeyword: '',
pointLngLat: '',
zoom: 10,
dialogFormMap: false,
LAT: '',
LON: '',
//
checkList: [],
form: {
LAT: '',
LON: ''
},
activeName: 'first',
//
yhtypelistthree: [],
wenbenlistthree: [],
guanlianlistthree: [],
normalizer(node) {
return {
id: node.DICTIONARIES_ID,
@ -260,8 +213,13 @@ export default {
children: node.nodes
}
},
listISLOADing: false,
PLAN_ID: ''
//
yhPLANGRADEthree: [
{ id: 1, label: '一级预案' },
{ id: 2, label: '二级预案' }
],
PLAN_ID: '',
planName: ''
}
},
created() {
@ -271,10 +229,128 @@ export default {
this.getDetail(this.PLAN_ID)
}
this.getYaTypeDataList()
this.getwenbenDataList()
this.getguanlianataList()
},
methods: {
//* *******************************
//
mapOpen() {
this.top = this.getScrollTop()
if (this.top) {
this.setScrollTop(0)
}
},
//
mapClose() {
this.setScrollTop(this.top)
this.top = 0
this.showMap = false
},
getScrollTop() {
let scrollTop = 0
if (document.documentElement && document.documentElement.scrollTop) {
scrollTop = document.documentElement.scrollTop
} else if (document.body) {
scrollTop = document.body.scrollTop
}
return scrollTop
},
setScrollTop(top) {
if (!isNaN(top)) {
if (document.documentElement && document.documentElement.scrollTop !== undefined) {
document.documentElement.scrollTop = top
} else if (document.body) {
document.body.scrollTop = top
}
}
},
//
handler({ BMap, map }) {
this.mapOpen()
this.BMap = BMap
this.map = map
this.ISLOADingMap = true
var geolocation = new BMap.Geolocation()
const myGeo = new BMap.Geocoder()
var $this = this
// api
geolocation.getCurrentPosition(function(r) {
myGeo.getLocation(new BMap.Point(r.point.lng, r.point.lat), function(result) {
if (result) {
$this.ISLOADingMap = false
$this.$set($this, 'pointLngLat', { lng: result.point.lng, lat: result.point.lat })
map.enableScrollWheelZoom(true) // ,
$this.setCenter({ BMap, map })
}
})
})
},
//
querySearch(queryString, cb) {
var options = {
onSearchComplete: function(results) {
if (local.getStatus() === 0) {
//
var s = []
for (var i = 0; i < results.getCurrentNumPois(); i++) {
var x = results.getPoi(i)
var item = { value: x.TYPE + x.title, point: x.point }
s.push(item)
cb(s)
}
} else {
cb()
}
}
}
var local = new this.BMap.LocalSearch(this.map, options)
local.search(queryString)
},
handleSelect(item) {
var { point } = item
this.map.clearOverlays() //
this.map.centerAndZoom(point, this.zoom)
const marker = new this.BMap.Marker(point) //
this.map.addOverlay(marker) //
marker.enableDragging() //
this.LON = point.lng
this.LAT = point.lat
},
//
setCenter({ BMap, map }) {
var lng = ''
var lat = ''
if (this.form.LON == '' || this.form.LAT == '') {
lng = '119.525971'
lat = '39.894727'
} else {
lng = this.form.LON
lat = this.form.LAT
}
var point = new BMap.Point(lng, lat)
// var point = new BMap.Point(this.form.LON, this.form.LAT)
const zoom = map.getZoom()
setTimeout(() => {
map.centerAndZoom(point, zoom)
}, 0)
// var marker = new BMap.Marker(point) //
// map.addOverlay(marker) //
},
handleMap() {
this.dialogFormMap = true
this.LAT = this.form.LAT
this.LON = this.form.LON
},
getClickInfo(e) {
this.LON = e.point.lng
this.LAT = e.point.lat
},
setPosition() {
this.dialogFormMap = false
this.form.LAT = this.LAT
this.form.LON = this.LON
},
//* ***********************************
getDetail(id) {
const params = {
Id: id
@ -282,40 +358,33 @@ export default {
requestFN('/major/emergencyplan/detail', params).then((response) => {
const data = response.data
console.log(data)
this.planName = data.PLANNAME
this.form = {
PLAN_TYPE: data.PLAN_TYPE,
FIRERESERVEPLAN_ID: data.FIRERESERVEPLAN_ID,
PLAN_NUMBER: data.PLAN_NUMBER,
PLANNAME: data.PLANNAME,
PLAN_LEVEL: data.PLAN_LEVEL,
PLANDES: data.PLANDES,
PLAN_NAME: data.PLAN_NAME,
PLANTYPE: data.PLANTYPE,
PLAN_CATEGORY: data.PLAN_CATEGORY,
KEYPLACES_ID: data.KEYPLACES_ID,
INDUSTRY_CATEGORY: data.INDUSTRY_CATEGORY,
BZ: data.BZ,
COMPILING_UNIT: data.COMPILING_UNIT,
LON: data.LON,
VALIDITY_PERIOD: data.VALIDITY_PERIOD,
LAT: data.LAT,
REVISION_TIME: data.REVISION_TIME,
EVENTTYPE: data.EVENTTYPE,
PUBLICATION_TIME: data.PUBLICATION_TIME,
PLANCODE: data.PLANCODE,
TEXTMESSAGE: data.TEXTMESSAGE,
APPLICABLE_SCOPE: data.APPLICABLE_SCOPE,
PUBLICATION_SCOPE: data.PUBLICATION_SCOPE,
PLAN_DESCRIPTION: data.PLAN_DESCRIPTION,
RELATED_EVENTS: data.RELATED_EVENTS,
DEFAULT_PLAN: data.DEFAULT_PLAN,
ID: data.ID
PLANGRADE: data.PLANGRADE
}
this.checkList = data.EVENTTYPE.split(',')
}).catch((e) => {
console.error('获取详情数据失败', e)
})
@ -332,98 +401,20 @@ export default {
console.error('获取树形数据失败', e)
})
},
//
getwenbenDataList() {
const params = {
PARENT_ID: 'cfae32d9abd84509a27a1be780860857'
}
requestFN('/dictionaries/listTree', params).then((data) => {
this.wenbenlistthree = JSON.parse(data.zTreeNodes)
}).catch((e) => {
console.error('获取树形数据失败', e)
})
},
//
getguanlianataList() {
const params = {
PARENT_ID: '736977eb73e743a38830b053b283c1d0'
}
requestFN('/dictionaries/listTree', params).then((data) => {
this.guanlianlistthree = JSON.parse(data.zTreeNodes)
}).catch((e) => {
console.error('获取树形数据失败', e)
})
},
// *******************************************
handleDianzidangfileChange(file) {
this.dianzidangfile.push(file)
},
handleDianzidangfileRemove(file, fileList) {
this.dianzidangfile = fileList
},
handlejiuyuanfanganfileChange(file) {
this.jiuyuanfanganfile.push(file)
},
handlejiuyuanfanganfileRemove(file, fileList) {
this.jiuyuanfanganfile = fileList
},
handlepingmiantufileChange(file) {
this.pingmiantufile.push(file)
},
handlepingmiantufileRemove(file, fileList) {
this.pingmiantufile = fileList
},
handleotherfileChange(file) {
this.otherfile.push(file)
},
handleotherfileRemove(file, fileList) {
this.otherfile = fileList
},
upload(fun) {
const formData = new FormData()
for (let i = 0; i < this.dianzidangfile.length; i++) {
if (this.dianzidangfile[i].raw) {
this.allfiletype.push('1')
formData.append('FFILE', this.dianzidangfile[i].raw)
}
}
for (let i = 0; i < this.jiuyuanfanganfile.length; i++) {
if (this.jiuyuanfanganfile[i].raw) {
this.allfiletype.push('2')
formData.append('FFILE', this.jiuyuanfanganfile[i].raw)
}
}
for (let i = 0; i < this.pingmiantufile.length; i++) {
if (this.pingmiantufile[i].raw) {
this.allfiletype.push('3')
formData.append('FFILE', this.pingmiantufile[i].raw)
}
}
for (let i = 0; i < this.otherfile.length; i++) {
if (this.otherfile[i].raw) {
this.allfiletype.push('4')
formData.append('FFILE', this.otherfile[i].raw)
}
}
upload(
'/file/upload2',
formData
).then((data) => {
fun(data.fileurl)
}).catch((e) => {
})
},
saveData(type) {
this.listISLOADing = true
if (this.PLAN_ID) {
this.form.Id = this.PLAN_ID
this.form.FIRERESERVEPLAN_ID = this.PLAN_ID
}
this.planName = this.form.PLANNAME
this.form.EVENTTYPE = this.checkList.join(',')
requestFN(
'/major/emergencyplan/save', this.form
).then((data) => {
this.listISLOADing = false
this.PLAN_ID = data.data.id
this.PLAN_ID = data.data
this.activeName = 'tow'
if (type === 0) {
this.$parent.activeName = 'list'
@ -434,15 +425,7 @@ export default {
this.listISLOADing = false
})
},
//
judgefileupload() {
const num = this.dianzidangfile.length + this.jiuyuanfanganfile.length + this.pingmiantufile.length + this.otherfile.length
if (num > 0) {
return true
} else {
return false
}
},
gotoxiayibu(type) {
if (this.activeName === 'tow') {
this.activeName = 'three'
@ -456,30 +439,7 @@ export default {
confirm(type) {
this.$refs.form.validate(valid => {
if (valid) {
if (this.judgefileupload()) {
this.upload((v) => {
//
const url = v.split(',')
for (let i = 0; i < this.allfiletype.length; i++) {
if (this.allfiletype[i] === '1') {
this.form.PLAN_ELECTRONIC_FILE = url[i]
}
if (this.allfiletype[i] === '2') {
this.form.RESCUE_PLAN_DRAWING = url[i]
}
if (this.allfiletype[i] === '3') {
this.form.FLOOR_PLAN_ATTACHMENT = url[i]
}
if (this.allfiletype[i] === '4') {
this.form.OTHER_ATTACHMENTS = url[i]
}
}
this.$refs.upload.clearFiles()
this.saveData(type)
})
} else {
this.saveData(type)
}
this.saveData(type)
} else {
return false
}
@ -487,12 +447,43 @@ export default {
},
handleClick(tab, event) {
/* if (tab.index == 1) {
} else if (tab.index == 2) {
}*/
},
shiyibu() {
if (this.activeName === 'tow') {
this.activeName = 'first'
} else if (this.activeName === 'three') {
this.activeName = 'tow'
} else if (this.activeName === 'four') {
this.activeName = 'three'
} else if (this.activeName === 'five') {
this.activeName = 'four'
} else if (this.activeName === 'six') {
this.activeName = 'five'
} else if (this.activeName === 'seven') {
this.activeName = 'six'
}
},
xiayibu() {
if (this.activeName === 'first') {
this.activeName = 'tow'
} else if (this.activeName === 'tow') {
this.activeName = 'three'
} else if (this.activeName === 'three') {
this.activeName = 'four'
} else if (this.activeName === 'four') {
this.activeName = 'five'
} else if (this.activeName === 'five') {
this.activeName = 'six'
} else if (this.activeName === 'six') {
this.activeName = 'seven'
}
},
goback() {
this.$parent.activeName = 'list'
this.$parent.huidiao()

View File

@ -1,192 +0,0 @@
<template>
<div>
<div class="filter-container">
<el-button class="filter-item" type="primary" @click="yjzjadd">
添加
</el-button>
</div>
<el-table ref="multipleTable" :data="yjzjvarList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column prop="EXPERT_NAME" label="名称" width="180" />
<el-table-column prop="EXPERT_CATEGORY" label="专家类型" />
<el-table-column prop="OFFICE_PHONE" label="办公电话" />
<el-table-column prop="MOBILE_PHONE" label="移动电话" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deletezhuangjiaPeople(row)"></el-button>
</template>
</el-table-column>
</el-table>
<el-dialog :visible.sync="dialogzhuangjiaShow" title="选择人员" width="850px" @close="closeDialog('ruleForm')">
<el-container>
<el-main>
<div class="filter-btn-group">
<el-form label-width="100px">
<el-row>
<el-col :span="10">
<el-form-item label="姓名">
<el-input v-model="zhuangjianame" placeholder="搜索姓名"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label-width="10px">
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getzhuanjiaList">
搜索
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table ref="multipleTable" :data="zhuanjiaList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" style="height:350px" tooltip-effect="dark" border fit highlight-current-row>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column prop="EXPERT_NAME" label="姓名" />
<el-table-column prop="MOBILE_TELEPHONE" label="移动电话" />
<el-table-column prop="OFFICE_TELEPHONE" label="办公电话" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="savezhuangjiaPeople(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div />
<Pagination :total="zhuangjiatotal" :page.sync="listQueryzj.page" :limit.sync="listQueryzj.limit" @pagination="getzhuanjiaList" />
</div>
</el-main>
</el-container>
</el-dialog>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
import Pagination from '@/components/Pagination'
export default {
name: 'Yingjizhuangjia',
components: { Pagination },
props: {
planid: {
type: String,
default() {
return ''
} }
},
data() {
return {
zhuangjiatotal: 0,
zhuangjianame: '',
dialogzhuangjiaShow: false,
yjzjvarList: [],
yjzhuangjiatotal: [],
zhuanjiaList: [],
listQueryzj: {
page: 1,
limit: 20
},
zhuangjiafrom: {
},
listISLOADing: false
}
},
created() {
console.log(this.planid)
this.getPlanexpertList()
},
methods: {
closeDialog() {
this.dialogzhuangjiaShow = false
},
deletezhuangjiaPeople(row) {
this.listISLOADing = true
requestFN(
'/major/association/delete', { id: row.ID }
).then((data) => {
this.$message({
message: '移除成功',
type: 'success'
})
this.listISLOADing = false
this.getPlanexpertList()
}).catch((e) => {
this.listISLOADing = false
})
},
savezhuangjiaPeople(row) {
this.zhuangjiafrom.PLAN_ID = this.planid
this.zhuangjiafrom.TYPE = '1'
this.zhuangjiafrom.REL_ID = row.EXPERT_ID
this.zhuangjiafrom.EXPERT_NAME = row.EXPERT_NAME
this.zhuangjiafrom.EXPERT_CATEGORY = row.EXPERT_TYPE
this.zhuangjiafrom.OFFICE_PHONE = row.OFFICE_TELEPHONE
this.zhuangjiafrom.MOBILE_PHONE = row.MOBILE_TELEPHONE
this.listISLOADing = true
requestFN(
'/major/association/save', this.zhuangjiafrom
).then((data) => {
this.$message({
message: '添加成功',
type: 'success'
})
this.listISLOADing = false
this.getPlanexpertList()
this.getzhuanjiaList()
}).catch((e) => {
this.listISLOADing = false
})
},
yjzjadd() {
this.dialogzhuangjiaShow = true
this.getzhuanjiaList()
},
getzhuanjiaList() {
this.listISLOADing = true
requestFN(
'/yjexpert/getRelevanceNotPlanList?showCount=' + this.listQueryzj.limit + '&currentPage=' + this.listQueryzj.page,
{
name: this.KEYWORDS,
id: this.planid,
type: '1'
}
).then((data) => {
this.listISLOADing = false
this.zhuanjiaList = data.varList
this.zhuangjiatotal = data.page.totalResult
})
.catch((e) => {
this.listISLOADing = false
})
},
//
getPlanexpertList() {
this.listISLOADing = true
requestFN(
'/major/association/list?showCount=50' + '&currentPage=1',
{
name: this.KEYWORDS,
PLAN_ID: this.planid,
TYPE: '1'
}
).then((data) => {
this.listISLOADing = false
this.yjzjvarList = data.varList
this.yjzhuangjiatotal = data.page.totalResult
})
.catch((e) => {
this.listISLOADing = false
})
}
}
}
</script>
<style lang="scss">
</style>

View File

@ -9,15 +9,15 @@
<el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="PLAN_NAME" label="预案名称" width="180" />
<el-table-column prop="PLAN_LEVEL" label="预案类别" show-overflow-tooltip="true" />
<el-table-column prop="PLAN_DESCRIPTION" label="预案概述" show-overflow-tooltip="true" />
<el-table-column prop="PLANNAME" label="预案名称" width="180" />
<el-table-column prop="PLANCODE" label="预案编码" show-overflow-tooltip="true" />
<el-table-column prop="PLANDES" label="预案概述" show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<!-- <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)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.PLAN_NAME)"></el-button>
<!-- <el-button type="primary" icon="el-icon-document" size="mini" @click="goList('detail', row.FIRERESERVEPLAN_ID, '1')">查看</el-button>-->
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.FIRERESERVEPLAN_ID)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.FIRERESERVEPLAN_ID,row.PLANNAME)"></el-button>
</template>
</el-table-column>
</el-table>
@ -37,30 +37,12 @@
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import { Treeselect } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { upload } from '@/utils/upload'
export default {
components: { Treeselect, Pagination },
components: { Pagination },
data() {
return {
//
CORPINFO_ID: this.$parent.CORPINFO_ID,
clientHeight: 600,
ISLOADingMap: true,
listISLOADing: false,
buttonISLOADing: false,
BMap: '',
map: '',
showMap: false,
TYPEKeyword: '',
pointLngLat: '',
zoom: 10,
dialogFormMap: false,
LATITUDE: '',
LONGITUDE: '',
listQuery: {
page: 1,
limit: 10
@ -70,233 +52,15 @@ export default {
KEYWORDS: '',
dialogFormEdit: false,
dialogFormShow: false,
dialogType: 'add',
form: {
//
EQUIP_NAME: '',
//
TYPE: '',
dialogType: 'add'
//
LONGITUDE: '',
//
LATITUDE: '',
//
CONTACT_PERSON: '',
//
CONTACT_TELE_PHONE: '',
//
CONTACT_MOBILE_PHONE: '',
//
ADDRESS: '',
//
COMPANY: '',
//
REGION: '',
//
AFFILIATEDUNIT: ''
},
yjrescueEquipData: [],
treeData: [],
DepartmentData: [],
normalizer(node) {
return {
id: node.DICTIONARIES_ID,
label: node.name,
children: node.nodes
}
},
FFILE: []
}
},
created() {
this.getList()
this.getyjrescueEquipDataList()
this.getDepartmentList()
this.getTreeList()
},
methods: {
// *******************************************
handleEditChange(file) {
file.MATERIALS_ID = Math.random()
const is5M = file.size / 1024 / 1024 < 5
if (is5M) this.FFILE.push(file)
},
handleRemove(file, fileList) {
this.FFILE = fileList
},
upload(fun) {
const formData = new FormData()
for (let i = 0; i < this.FFILE.length; i++) {
if (this.FFILE[i].raw) {
formData.append('FFILE', this.FFILE[i].raw)
}
}
upload(
'/file/upload',
formData
).then((data) => {
fun(data.fileurl)
}).catch((e) => {
})
},
//* ****************************************
getDepartmentList() {
requestFN('/department/listAll').then((data) => {
this.DepartmentData = data.list.map(item => ({
id: item.department_ID,
label: item.name
}))
}).catch((e) => {
console.error('获取主管单位数据失败', e)
})
},
getTreeList() {
const params = {
PARENT_ID: '5a5d2809ed644aa6ba97a5240ff35484'
}
requestFN('/dictionaries/listTree', params).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
console.error('获取树形数据失败', e)
})
},
getyjrescueEquipDataList() {
const params = {
PARENT_ID: '73e875a1123443b69956cf6761f943de'
}
requestFN('/dictionaries/listTree', params).then((data) => {
this.yjrescueEquipData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
console.error('获取树形数据失败', e)
})
},
//* *******************************
//
mapOpen() {
this.top = this.getScrollTop()
if (this.top) {
this.setScrollTop(0)
}
},
//
mapClose() {
this.setScrollTop(this.top)
this.top = 0
this.showMap = false
},
getScrollTop() {
let scrollTop = 0
if (document.documentElement && document.documentElement.scrollTop) {
scrollTop = document.documentElement.scrollTop
} else if (document.body) {
scrollTop = document.body.scrollTop
}
return scrollTop
},
setScrollTop(top) {
if (!isNaN(top)) {
if (document.documentElement && document.documentElement.scrollTop !== undefined) {
document.documentElement.scrollTop = top
} else if (document.body) {
document.body.scrollTop = top
}
}
},
//
handler({ BMap, map }) {
this.mapOpen()
this.BMap = BMap
this.map = map
this.ISLOADingMap = true
var geolocation = new BMap.Geolocation()
const myGeo = new BMap.Geocoder()
var $this = this
// api
geolocation.getCurrentPosition(function(r) {
myGeo.getLocation(new BMap.Point(r.point.lng, r.point.lat), function(result) {
if (result) {
$this.ISLOADingMap = false
$this.$set($this, 'pointLngLat', { lng: result.point.lng, lat: result.point.lat })
map.enableScrollWheelZoom(true) // ,
$this.setCenter({ BMap, map })
}
})
})
},
//
querySearch(queryString, cb) {
var options = {
onSearchComplete: function(results) {
if (local.getStatus() === 0) {
//
var s = []
for (var i = 0; i < results.getCurrentNumPois(); i++) {
var x = results.getPoi(i)
var item = { value: x.TYPE + x.title, point: x.point }
s.push(item)
cb(s)
}
} else {
cb()
}
}
}
var local = new this.BMap.LocalSearch(this.map, options)
local.search(queryString)
},
handleSelect(item) {
var { point } = item
this.map.clearOverlays() //
this.map.centerAndZoom(point, this.zoom)
const marker = new this.BMap.Marker(point) //
this.map.addOverlay(marker) //
marker.enableDragging() //
this.LONGITUDE = point.lng
this.LATITUDE = point.lat
},
//
setCenter({ BMap, map }) {
var lng = ''
var lat = ''
if (this.form.LONGITUDE == '' || this.form.LATITUDE == '') {
lng = '119.525971'
lat = '39.894727'
} else {
lng = this.form.LONGITUDE
lat = this.form.LATITUDE
}
var point = new BMap.Point(lng, lat)
// var point = new BMap.Point(this.form.LONGITUDE, this.form.LATITUDE)
const zoom = map.getZoom()
setTimeout(() => {
map.centerAndZoom(point, zoom)
}, 0)
// var marker = new BMap.Marker(point) //
// map.addOverlay(marker) //
},
handleMap() {
this.dialogFormMap = true
this.LATITUDE = this.form.LATITUDE
this.LONGITUDE = this.form.LONGITUDE
},
getClickInfo(e) {
this.LONGITUDE = e.point.lng
this.LATITUDE = e.point.lat
},
setPosition() {
this.dialogFormMap = false
this.form.LATITUDE = this.LATITUDE
this.form.LONGITUDE = this.LONGITUDE
},
//* ***********************************
goList(page, CASE_ID, ticketType) {
this.$parent.activeName = page

View File

@ -2,61 +2,54 @@
<template>
<div>
<div class="filter-container">
<el-button class="filter-item" type="primary" @click="yjzjadd">
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="yjzjadd">
添加
</el-button>
</div>
<el-table ref="multipleTable" :data="yjzjvarList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column prop="EXPERT_NAME" label="名称" width="180" />
<el-table-column prop="EXPERT_CATEGORY" label="专家类型" />
<el-table-column prop="OFFICE_PHONE" label="办公电话" />
<el-table-column prop="MOBILE_PHONE" label="移动电话" />
<el-table-column prop="HIERARCHICALNAME" label="分级名称" width="180" />
<el-table-column prop="HIERARCHICALDES" label="分级描述" />
<el-table-column prop="BZ" label="备注信息" />
<!-- <el-table-column prop="MOBILE_PHONE" label="移动电话" />-->
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deletezhuangjiaPeople(row)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deletezhuangjiaPeople(row)"></el-button>
<el-button type="primary" icon="el-icon-setting" size="mini" @click="updatezhuangjiaPeople(row)"></el-button>
</template>
</el-table-column>
</el-table>
<el-dialog :visible.sync="dialogzhuangjiaShow" title="选择人员" width="850px" @close="closeDialog('ruleForm')">
<el-container>
<el-main>
<div class="filter-btn-group">
<el-form label-width="100px">
<el-row>
<el-col :span="10">
<el-form-item label="姓名">
<el-input v-model="zhuangjianame" placeholder="搜索姓名"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label-width="10px">
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getzhuanjiaList">
搜索
</el-button>
</el-form-item>
</el-col>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQueryzj.page" :limit.sync="listQueryzj.limit" @pagination="getPlanexpertList" />
</div>
</el-row>
</el-form>
</div>
<el-table ref="multipleTable" :data="zhuanjiaList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" style="height:350px" tooltip-effect="dark" border fit highlight-current-row>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column prop="EXPERT_NAME" label="姓名" />
<el-table-column prop="MOBILE_TELEPHONE" label="移动电话" />
<el-table-column prop="OFFICE_TELEPHONE" label="办公电话" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="savezhuangjiaPeople(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div />
<Pagination :total="zhuangjiatotal" :page.sync="listQueryzj.page" :limit.sync="listQueryzj.limit" @pagination="getzhuanjiaList" />
</div>
</el-main>
</el-container>
<el-dialog :visible.sync="dialogzhuangjiaShow" title="分级响应" width="600px" @close="closeDialog('ruleForm')">
<el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
<el-form-item label="分级名称" prop="HIERARCHICALNAME">
<el-input v-model="zhuangjiafrom.HIERARCHICALNAME" placeholder="这里分级名称..." />
</el-form-item>
<el-form-item label="分级描述" prop="HIERARCHICALDES">
<el-input
v-model="zhuangjiafrom.HIERARCHICALDES"
:rows="6"
type="textarea"
placeholder="请分级描述"/>
</el-form-item>
<el-form-item label="备注信息" prop="BZ">
<el-input
v-model="zhuangjiafrom.BZ"
:rows="6"
type="textarea"
placeholder="请备注信息"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogzhuangjiaShow = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
</div>
@ -103,7 +96,7 @@ export default {
deletezhuangjiaPeople(row) {
this.listISLOADing = true
requestFN(
'/major/association/delete', { id: row.ID }
'/plan/fractional/delete', { id: row.HIERARCHICALRESPONSE_ID }
).then((data) => {
this.$message({
message: '移除成功',
@ -116,61 +109,45 @@ export default {
this.listISLOADing = false
})
},
savezhuangjiaPeople(row) {
this.zhuangjiafrom.PLAN_ID = this.planid
this.zhuangjiafrom.TYPE = '1'
this.zhuangjiafrom.REL_ID = row.EXPERT_ID
this.zhuangjiafrom.EXPERT_NAME = row.EXPERT_NAME
this.zhuangjiafrom.EXPERT_CATEGORY = row.EXPERT_TYPE
this.zhuangjiafrom.OFFICE_PHONE = row.OFFICE_TELEPHONE
this.zhuangjiafrom.MOBILE_PHONE = row.MOBILE_TELEPHONE
confirm() {
this.zhuangjiafrom.FIRERESERVEPLAN_ID = this.planid
this.listISLOADing = true
requestFN(
'/major/association/save', this.zhuangjiafrom
'/plan/fractional/save', this.zhuangjiafrom
).then((data) => {
this.$message({
message: '添加成功',
type: 'success'
})
this.dialogzhuangjiaShow = false
this.listISLOADing = false
this.getPlanexpertList()
this.getzhuanjiaList()
}).catch((e) => {
this.listISLOADing = false
})
},
yjzjadd() {
this.dialogzhuangjiaShow = true
this.getzhuanjiaList()
this.zhuangjiafrom = {}
},
getzhuanjiaList() {
this.listISLOADing = true
requestFN(
'/yjexpert/getRelevanceNotPlanList?showCount=' + this.listQueryzj.limit + '&currentPage=' + this.listQueryzj.page,
{
name: this.KEYWORDS,
id: this.planid,
type: '1'
}
).then((data) => {
this.listISLOADing = false
this.zhuanjiaList = data.varList
this.zhuangjiatotal = data.page.totalResult
})
.catch((e) => {
this.listISLOADing = false
})
updatezhuangjiaPeople(row) {
this.dialogzhuangjiaShow = true
this.zhuangjiafrom = {
HIERARCHICALRESPONSE_ID: row.HIERARCHICALRESPONSE_ID,
HIERARCHICALNAME: row.HIERARCHICALNAME,
HIERARCHICALDES: row.HIERARCHICALDES,
BZ: row.BZ
}
},
//
//
getPlanexpertList() {
this.listISLOADing = true
requestFN(
'/major/association/list?showCount=50' + '&currentPage=1',
'/plan/fractional/list?showCount=50' + '&currentPage=1',
{
name: this.KEYWORDS,
PLAN_ID: this.planid,
FIRERESERVEPLAN_ID: this.planid,
TYPE: '1'
}
).then((data) => {

View File

@ -0,0 +1,261 @@
<template>
<div>
<div class="filter-container">
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="yjzjadd">
添加
</el-button>
</div>
<el-table ref="multipleTable" :data="yjzjvarList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column prop="FILENAME" label="文件名称" width="180" />
<el-table-column prop="BZ" label="备注" />
<el-table-column prop="createTimeStr" label="维护日期" />
<el-table-column prop="FILEURL" width="180" align="center" label="附件" >
<template v-if="row.FILEURL" slot-scope="{row}">
<el-button type="primary" icon="el-icon-down" size="mini" @click="download(row)"></el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deletePlanningfile(row)"></el-button>
<el-button type="primary" icon="el-icon-setting" size="mini" @click="updatePlanningfile(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="yjzhuangjiatotal" :page.sync="listQueryzj.page" :limit.sync="listQueryzj.limit" @pagination="getDataList" />
</div>
<el-dialog :visible.sync="dialogzhuangjiaShow" title="预案附件" width="600px" @close="closeDialog('ruleForm')">
<el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
<el-form-item label="文件名称" prop="FILENAME">
<el-input
v-model="fujianfrom.FILENAME"
placeholder="文件名称"/>
</el-form-item>
<el-form-item label="附件类型" prop="fujianfrom.FILETYPE">
<Treeselect
:options="FILETYPEThree"
v-model="fujianfrom.FILETYPE"
placeholder="请选择预案类型"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
<el-form-item label="备注" prop="BZ">
<el-input
v-model="fujianfrom.BZ"
:rows="3"
type="textarea"
placeholder="备注"/>
</el-form-item>
<el-form-item label="附件地址">
<el-upload
ref="upload"
:on-change="handleEditChange"
:on-remove="handleRemove"
:auto-upload="false"
:limit="1"
action="#" >
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogzhuangjiaShow = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
import Pagination from '@/components/Pagination'
import { upload } from '@/utils/upload'
export default {
name: 'Yingjizhuangjia',
components: { Pagination },
props: {
planid: {
type: String,
default() {
return ''
} }
},
data() {
return {
zhuangjiatotal: 0,
zhuangjianame: '',
dialogzhuangjiaShow: false,
yjzjvarList: [],
yjzhuangjiatotal: 0,
zhuanjiaList: [],
listQueryzj: {
page: 1,
limit: 20
},
fujianfrom: {
},
FFILE: [],
FILETYPEThree: [
{ id: 1, label: '预案视频' },
{ id: 2, label: '通讯录' },
{ id: 3, label: '组织机构' },
{ id: 4, label: '建筑平面图' },
{ id: 5, label: '其他' },
{ id: 6, label: '预案电子档案' },
{ id: 7, label: '指挥平面图' },
{ id: 8, label: '应急资源' }
],
downloadUrl: ''
}
},
created() {
console.log(this.planid)
this.getDataList()
},
methods: {
//* **********************************************
download(obj) {
this.$confirm('确定要下载此文件吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.downloadUrl = config.fileUrl + obj.FILEURL
const _this = this
setTimeout(function() {
window.open(_this.downloadUrl)
}, 200)
}).catch(() => {
})
},
// *******************************************
handleEditChange(file) {
file.MATERIALS_ID = Math.random()
const is5M = file.size / 1024 / 1024 < 5
if (is5M) this.FFILE.push(file)
},
handleRemove(file, fileList) {
this.FFILE = fileList
},
upload(fun) {
const formData = new FormData()
for (let i = 0; i < this.FFILE.length; i++) {
if (this.FFILE[i].raw) {
formData.append('FFILE', this.FFILE[i].raw)
}
}
upload(
'/file/upload',
formData
).then((data) => {
fun(data.fileurl)
}).catch((e) => {
})
},
//* ***********************************
closeDialog() {
this.dialogzhuangjiaShow = false
},
deletePlanningfile(row) {
this.listISLOADing = true
requestFN(
'/plan/planplanningfile/delete', { id: row.PLANNINGFILE_ID }
).then((data) => {
this.$message({
message: '移除成功',
type: 'success'
})
this.listISLOADing = false
this.getDataList()
}).catch((e) => {
this.listISLOADing = false
})
},
confirm() {
if (this.FFILE.length > 0) {
this.upload((v) => {
this.fujianfrom.FILEURL = v
this.$refs.upload.clearFiles()
this.dataSave()
})
} else {
this.dataSave()
}
},
dataSave() {
this.fujianfrom.FIRERESERVEPLAN_ID = this.planid
this.listISLOADing = true
requestFN(
'/plan/planplanningfile/save', this.fujianfrom
).then((data) => {
this.$message({
message: '添加成功',
type: 'success'
})
this.dialogzhuangjiaShow = false
this.listISLOADing = false
this.getDataList()
}).catch((e) => {
this.listISLOADing = false
})
},
yjzjadd() {
this.dialogzhuangjiaShow = true
this.fujianfrom = {
LAT: '',
LON: ''
}
},
updatePlanningfile(row) {
this.dialogzhuangjiaShow = true
this.fujianfrom = {
PLANNINGFILE_ID: row.PLANNINGFILE_ID,
FILETYPE: row.FILETYPE,
FILENAME: row.FILENAME,
BZ: row.BZ
}
},
//
getDataList() {
this.listISLOADing = true
requestFN(
'/plan/planplanningfile/list?showCount=50' + '&currentPage=1',
{
name: this.KEYWORDS,
FIRERESERVEPLAN_ID: this.planid,
TYPE: '1'
}
).then((data) => {
this.listISLOADing = false
this.yjzjvarList = data.varList
this.yjzhuangjiatotal = data.page.totalResult
})
.catch((e) => {
this.listISLOADing = false
})
}
}
}
</script>
<style lang="scss">
</style>

View File

@ -0,0 +1,115 @@
<template>
<div>
<el-form ref="form" :model="form" label-width="180px">
<el-row :gutter="20">
<el-col :span="4" >
<el-form-item />
</el-col>
<el-col :span="8">
<el-form-item label="预案名称:" >
{{ planName }}
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="4" >
<el-form-item />
</el-col>
<el-col :span="8">
<el-form-item label="预案文本" prop="PLANNINGTEXT">
<el-input v-model="zhuangjiafrom.PLANNINGTEXT" :rows="6" type="textarea" placeholder="预案文本..." />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer" style="margin-left: 750px;">
<el-button type="primary" @click="confirm"></el-button>
</div>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
export default {
name: 'Yvanwenb',
components: { },
props: {
planid: {
type: String,
default() {
return ''
}
},
planName: {
type: String,
default() {
return ''
}
}
},
data() {
return {
zhuangjiafrom: { 'PLANNINGTEXT': '' },
listISLOADing: false
}
},
created() {
this.getDataList()
},
methods: {
//* ***********************************
confirm() {
this.zhuangjiafrom.FIRERESERVEPLAN_ID = this.planid
this.listISLOADing = true
requestFN(
'/plan/planningtext/save', this.zhuangjiafrom
).then((data) => {
this.$message({
message: '添加成功',
type: 'success'
})
this.listISLOADing = false
this.getDataList()
}).catch((e) => {
this.listISLOADing = false
})
},
//
getDataList() {
this.listISLOADing = true
requestFN(
'/plan/planningtext/getDetail',
{
planId: this.planid
}
).then((data) => {
this.listISLOADing = false
if (data.data.FIRERESERVEPLAN_ID) {
this.zhuangjiafrom.PLANNINGTEXT = data.data.PLANNINGTEXT
this.zhuangjiafrom.PLANNINGTEXT_ID = data.data.PLANNINGTEXT_ID
}
})
.catch((e) => {
this.listISLOADing = false
})
}
}
}
</script>
<style lang="scss">
</style>

View File

@ -0,0 +1,389 @@
<template>
<div>
<el-row :gutter="20">
<el-col :span="13" class="bianxian">
<el-form ref="form" :model="yvanzhilingfrom" label-width="110px" >
<el-row :gutter="15">
<el-form-item label="响应级别" prop="PLANGRADE">
<el-checkbox-group v-model="checkList">
<el-checkbox v-for="jibei in xiangyingjibeiList" :label="jibei.HIERARCHICALRESPONSE_ID" :key="jibei.HIERARCHICALRESPONSE_ID">{{ jibei.HIERARCHICALNAME }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-row>
<el-form-item label="指令内容" prop="DIRECTIVECONTENT">
<el-input
v-model="yvanzhilingfrom.DIRECTIVECONTENT"
:rows="2"
type="textarea"
placeholder="指令内容"/>
</el-form-item>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="执行机构" prop="EXECUTIVEBODY">
<Treeselect
:options="treeData"
v-model="yvanzhilingfrom.EXECUTIVEBODY"
placeholder="请选择机构"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
<el-col :span="14"/>
</el-row>
<el-row :gutter="20">
<el-col :span="19"> <el-form-item label="相关资源" /></el-col>
<el-col :span="2">
<div class="filter-container">
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="yjzhilingadd">
添加
</el-button>
</div>
</el-col>
</el-row>
</el-form>
<el-table ref="multipleTable" :data="yjzhilinglinshiList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column prop="RESOURCETYPE" label="类型" width="180" />
<el-table-column prop="RESOURCENAME" label="资源名称" />
<el-table-column prop="LINKMPHONE" label="联系电话" />
<el-table-column prop="URGENTLINKPHONE" label="紧急联系电话" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteyjzhilinglinshi(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div style="height: 20px"/>
<el-row type="flex" class="row-bg" justify="center">
<el-col :span="9"><div class="grid-content bg-purple"/></el-col>
<el-col :span="4">
<el-button type="primary" @click="confirmDatasave()"></el-button>
</el-col>
<el-col :span="4">
<el-button @click="doreset()"></el-button>
</el-col>
</el-row>
</el-col>
<el-col :span="10" >
<div class="filter-container">
<el-button class="filter-item" type="danger" icon="el-icon-delete" @click="makeAll">
批量删除
</el-button>
</div>
<el-table ref="multipleTable" :data="yjzjvarList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="HIERARCHICALRESPONSE_NAME" label="响应级别" />
<el-table-column prop="DIRECTIVECONTENT" label="指令内容" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deletezhiling(row)"></el-button>
<el-button type="primary" icon="el-icon-setting" size="mini" @click="updatezhiling(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="yjzhuangjiatotal" :page.sync="listQueryzj.page" :limit.sync="listQueryzj.limit" @pagination="getDataList" />
</div>
</el-col>
</el-row>
<el-dialog :visible.sync="dialogyjzlzyShow" title="相关资源" width="600px" >
<el-form ref="form" :model="zlxianghuanziyuanform" label-width="110px" style="width: 500px;">
<el-form-item label="资源名称" prop="RESOURCENAME">
<el-input v-model="zlxianghuanziyuanform.RESOURCENAME" placeholder="资源名称..." />
</el-form-item>
<el-form-item label="类型" prop="RESOURCETYPE">
<el-input v-model="zlxianghuanziyuanform.RESOURCETYPE" placeholder="类型..." />
</el-form-item>
<el-form-item label="联系电话" prop="LINKMPHONE">
<el-input v-model="zlxianghuanziyuanform.LINKMPHONE" placeholder="联系电话..." />
</el-form-item>
<el-form-item label="紧急联系电话" prop="URGENTLINKPHONE">
<el-input v-model="zlxianghuanziyuanform.URGENTLINKPHONE" placeholder="紧急联系电话..." />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogyjzlzyShow = false"> </el-button>
<el-button type="primary" @click="confirmsave"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
import Pagination from '@/components/Pagination'
export default {
name: 'Yingjizhuangjia',
components: { Pagination },
props: {
planid: {
type: String,
default() {
return ''
} }
},
data() {
return {
checkList: [],
zhuangjiatotal: 0,
zhuangjianame: '',
dialogzhuangjiaShow: false,
yjzjvarList: [],
yjzhuangjiatotal: 0,
zhuanjiaList: [],
listQueryzj: {
page: 1,
limit: 20
},
yvanzhilingfrom: {
},
//
xiangyingjibeiList: [],
//
treeData: [],
//
yjzhilinglinshiList: [],
//
dialogyjzlzyShow: false,
//
zlxianghuanziyuanform: {}
}
},
created() {
console.log(this.planid)
this.getDataList()
this.getForFractModule()
this.getTreeList()
},
methods: {
//* *******************************
updatezhiling(row) {
requestFN(
'/plan/planningdirectives/getDetail',
{
id: row.PLANNINGDIRECTIVES_ID
}
).then((data) => {
this.loading = false
this.checkList = data.data.HIERARCHICALRESPONSE_ID.split(',')
//
this.yvanzhilingfrom = {
DIRECTIVECONTENT: data.data.DIRECTIVECONTENT,
EXECUTIVEBODY: data.data.EXECUTIVEBODY,
PLANNINGDIRECTIVES_ID: data.data.PLANNINGDIRECTIVES_ID
}
this.yjzhilinglinshiList = data.data.getResources
}).catch((e) => {
this.loading = false
})
},
//
makeAll() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const ids = _selectData.map((item, index) => {
return item.PLANNINGDIRECTIVES_ID
}).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true
requestFN(
'/plan/planningdirectives/deleteAll',
{
ids: ids
}
).then(() => {
this.loading = false
this.$refs.multipleTable.clearSelection()
this.getDataList()
}).catch((e) => {
this.loading = false
})
}).catch(() => {
})
},
deletezhiling(row) {
this.loading = true
requestFN(
'/plan/planningdirectives/delete', { id: row.PLANNINGDIRECTIVES_ID }
).then((data) => {
this.$message({
message: '移除成功',
type: 'success'
})
this.loading = false
this.getDataList()
}).catch((e) => {
this.loading = false
})
},
//
getDataList() {
this.loading = true
requestFN(
'/plan/planningdirectives/list?showCount=50' + '&currentPage=1',
{
name: this.KEYWORDS,
FIRERESERVEPLAN_ID: this.planid
}
).then((data) => {
this.loading = false
this.yjzjvarList = data.varList
this.yjzhuangjiatotal = data.page.totalResult
})
.catch((e) => {
this.loading = false
})
},
//* *****************************
doreset() {
this.yvanzhilingfrom = {}
this.checkList = []
this.yjzhilinglinshiList = []
},
confirmDatasave() {
this.yvanzhilingfrom.FIRERESERVEPLAN_ID = this.planid
this.yvanzhilingfrom.HIERARCHICALRESPONSE_ID = this.checkList.join(',')
this.yvanzhilingfrom.listResources2 = this.yjzhilinglinshiList
this.loading = true
if (this.yvanzhilingfrom.HIERARCHICALRESPONSE_ID === '') {
this.$message({
message: '表单内容不能为空',
type: 'warning'
})
return
}
if (this.yvanzhilingfrom.EXECUTIVEBODY) {
console.log('通过')
} else {
this.$message({
message: '表单内容不能为空',
type: 'warning'
})
return
}
if (this.yvanzhilingfrom.DIRECTIVECONTENT) {
console.log('通过')
} else {
this.$message({
message: '表单内容不能为空',
type: 'warning'
})
return
}
requestFN(
'/plan/planningdirectives/save', this.yvanzhilingfrom
).then((data) => {
this.$message({
message: '添加成功',
type: 'success'
})
this.loading = false
this.doreset()
this.getDataList()
}).catch((e) => {
this.loading = false
})
},
//* ************************
deleteyjzhilinglinshi(row) {
for (let i = 0; i < this.yjzhilinglinshiList.length; i++) {
if (this.yjzhilinglinshiList[i].id === row.id) {
this.yjzhilinglinshiList.splice(i)
i++
break
}
}
},
yjzhilingadd() {
this.zlxianghuanziyuanform = {}
this.dialogyjzlzyShow = true
},
confirmsave() {
const form = {
RESOURCENAME: this.zlxianghuanziyuanform.RESOURCENAME,
RESOURCETYPE: this.zlxianghuanziyuanform.RESOURCETYPE,
LINKMPHONE: this.zlxianghuanziyuanform.LINKMPHONE,
URGENTLINKPHONE: this.zlxianghuanziyuanform.URGENTLINKPHONE,
id: this.yjzhilinglinshiList.length + 1
}
this.yjzhilinglinshiList.push(form)
this.dialogyjzlzyShow = false
},
//* *****************
getTreeList() {
this.loading = true
requestFN(
'/plan/planningDepartment/getTreeForSelect',
{
FIRERESERVEPLAN_ID: this.planid,
proid: '0'
}
).then((data) => {
this.loading = false
this.treeData = data.data
}).catch((e) => {
this.loading = false
})
},
//* *******************
getForFractModule() {
this.loading = true
requestFN(
'/plan/fractional/getForFractModule', { planId: this.planid }
).then((data) => {
this.xiangyingjibeiList = data.data
}).catch((e) => {
this.loading = false
})
}
//* ***********************************
}
}
</script>
<style lang="scss">
.bianxian{
border: 1px #d4d4d4 solid;
border-radius: 6px;
padding: 20px;
margin-left: 10px;
}
</style>

View File

@ -0,0 +1,385 @@
<template>
<div>
<div class="filter-container">
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="yjzjadd">
添加
</el-button>
</div>
<el-table ref="multipleTable" :data="yjzjvarList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column prop="RESOURCETYPES" label="资源类型" width="180" />
<el-table-column prop="RESOURCENAME" label="资源名称" />
<el-table-column prop="RESOURCEADDRESS" label="资源地址" />
<el-table-column prop="RESOURCESNUMBER" label="资源数量" />
<el-table-column prop="LINKMAN" label="联系人" />
<el-table-column prop="LINKPHONE" label="电话" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deletezhuangjiaPeople(row)"></el-button>
<el-button type="primary" icon="el-icon-setting" size="mini" @click="updatezhuangjiaPeople(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQueryzj.page" :limit.sync="listQueryzj.limit" @pagination="getDataList" />
</div>
<el-dialog :visible.sync="dialogzhuangjiaShow" title="预案资源" width="600px" @close="closeDialog('ruleForm')">
<el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
<el-form-item label="资源类型" prop="RESOURCETYPES">
<el-input v-model="zhuangjiafrom.RESOURCETYPES" placeholder="资源类型..." />
</el-form-item>
<el-form-item label="资源名称" prop="RESOURCENAME">
<el-input v-model="zhuangjiafrom.RESOURCENAME" placeholder="资源名称..." />
</el-form-item>
<el-form-item label="资源地址" prop="RESOURCEADDRESS">
<el-input v-model="zhuangjiafrom.RESOURCEADDRESS" placeholder="资源地址..." />
</el-form-item>
<el-form-item label="资源数量" prop="RESOURCESNUMBER">
<el-input v-model="zhuangjiafrom.RESOURCESNUMBER" placeholder="资源数量..." />
</el-form-item>
<el-form-item label="联系人" prop="LINKMAN">
<el-input v-model="zhuangjiafrom.LINKMAN" placeholder="联系人..." />
</el-form-item>
<el-form-item label="联系电话" prop="LINKPHONE">
<el-input v-model="zhuangjiafrom.LINKPHONE" placeholder="联系电话..." />
</el-form-item>
<el-form-item label="资源描述" prop="RESOURCEDES">
<el-input v-model="zhuangjiafrom.RESOURCEDES" placeholder="资源描述..." />
</el-form-item>
<el-form-item label="备注" prop="BZ">
<el-input v-model="zhuangjiafrom.BZ" placeholder="备注..." />
</el-form-item>
<el-row :gutter="32">
<el-col :span="16">
<el-form-item :key="zhuangjiafrom.LON" label="经度" prop="LON">
<el-input v-model="zhuangjiafrom.LON" placeholder="请输入内容" disabled @focus="handleMap" />
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :key="zhuangjiafrom.LAT" label="纬度" prop="LAT">
<div style="display: flex">
<el-input v-model="zhuangjiafrom.LAT" placeholder="请输入内容" disabled style="width: 100%" @focus="handleMap"/>
<el-button style="margin-left:10px" @click="handleMap">
<span class="svg-container">
<svg-icon icon-class="international" />
</span>
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogzhuangjiaShow = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
<!-- 坐标选择 -->
<el-dialog :visible.sync="dialogFormMap" title="编辑坐标" width="800px" class="dy-dialog">
<baidu-map
v-ISLOADing="ISLOADingMap"
:zoom="zoom"
:scroll-wheel-zoom="true"
:style="{height: clientHeight+'px'}"
@click="getClickInfo"
@ready="handler">
<bm-view style="width: 100%; height:100%; flex: 1" />
<bm-control ref="control" :offset="{width: 10, height: 10}" anchor="BMAP_ANCHOR_TOP_LEFT">
<div class="map-flex">
<div class="map-lable">关键词</div>
<div style="flex:1;">
<el-autocomplete v-model="TYPEKeyword" :fetch-suggestions="querySearch" :trigger-on-focus="false" placeholder="请输入详细设备类型" style="width:100%" @select="handleSelect" />
</div>
<!-- <el-input v-model="TYPEKeyword" style="width: 200px" placeholder="请输入内容" />-->
<!-- <el-button slot="append" icon="el-icon-search" @click="mapNameChange"/>-->
</div>
</bm-control>
<!-- <bm-local-search :keyword="TYPEKeyword" :auto-viewport="true"/>-->
</baidu-map>
<div slot="footer" class="dialog-footer">
<span>经度</span>
<el-input v-model="LON" style="width: 200px" placeholder="请输入内容" disabled />
<span>纬度</span>
<el-input v-model="LAT" style="width: 200px" placeholder="请输入内容" disabled />
<el-button @click="dialogFormMap = false"> </el-button>
<el-button type="primary" @click="setPosition"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
import Pagination from '@/components/Pagination'
export default {
name: 'Yingjizhuangjia',
components: { Pagination },
props: {
planid: {
type: String,
default() {
return ''
} }
},
data() {
return {
//
CORPINFO_ID: this.$parent.CORPINFO_ID,
clientHeight: 600,
ISLOADingMap: true,
listISLOADing: false,
buttonISLOADing: false,
BMap: '',
map: '',
showMap: false,
TYPEKeyword: '',
pointLngLat: '',
zoom: 10,
dialogFormMap: false,
LAT: '',
LON: '',
zhuangjiatotal: 0,
zhuangjianame: '',
dialogzhuangjiaShow: false,
yjzjvarList: [],
yjzhuangjiatotal: [],
zhuanjiaList: [],
listQueryzj: {
page: 1,
limit: 20
},
zhuangjiafrom: {
LAT: '',
LON: ''
}
}
},
created() {
console.log(this.planid)
this.getDataList()
},
methods: {
//* *******************************
//
mapOpen() {
this.top = this.getScrollTop()
if (this.top) {
this.setScrollTop(0)
}
},
//
mapClose() {
this.setScrollTop(this.top)
this.top = 0
this.showMap = false
},
getScrollTop() {
let scrollTop = 0
if (document.documentElement && document.documentElement.scrollTop) {
scrollTop = document.documentElement.scrollTop
} else if (document.body) {
scrollTop = document.body.scrollTop
}
return scrollTop
},
setScrollTop(top) {
if (!isNaN(top)) {
if (document.documentElement && document.documentElement.scrollTop !== undefined) {
document.documentElement.scrollTop = top
} else if (document.body) {
document.body.scrollTop = top
}
}
},
//
handler({ BMap, map }) {
this.mapOpen()
this.BMap = BMap
this.map = map
this.ISLOADingMap = true
var geolocation = new BMap.Geolocation()
const myGeo = new BMap.Geocoder()
var $this = this
// api
geolocation.getCurrentPosition(function(r) {
myGeo.getLocation(new BMap.Point(r.point.lng, r.point.lat), function(result) {
if (result) {
$this.ISLOADingMap = false
$this.$set($this, 'pointLngLat', { lng: result.point.lng, lat: result.point.lat })
map.enableScrollWheelZoom(true) // ,
$this.setCenter({ BMap, map })
}
})
})
},
//
querySearch(queryString, cb) {
var options = {
onSearchComplete: function(results) {
if (local.getStatus() === 0) {
//
var s = []
for (var i = 0; i < results.getCurrentNumPois(); i++) {
var x = results.getPoi(i)
var item = { value: x.TYPE + x.title, point: x.point }
s.push(item)
cb(s)
}
} else {
cb()
}
}
}
var local = new this.BMap.LocalSearch(this.map, options)
local.search(queryString)
},
handleSelect(item) {
var { point } = item
this.map.clearOverlays() //
this.map.centerAndZoom(point, this.zoom)
const marker = new this.BMap.Marker(point) //
this.map.addOverlay(marker) //
marker.enableDragging() //
this.LON = point.lng
this.LAT = point.lat
},
//
setCenter({ BMap, map }) {
var lng = ''
var lat = ''
if (this.zhuangjiafrom.LON == '' || this.zhuangjiafrom.LAT == '') {
lng = '119.525971'
lat = '39.894727'
} else {
lng = this.zhuangjiafrom.LON
lat = this.zhuangjiafrom.LAT
}
var point = new BMap.Point(lng, lat)
// var point = new BMap.Point(this.zhuangjiafrom.LON, this.zhuangjiafrom.LAT)
const zoom = map.getZoom()
setTimeout(() => {
map.centerAndZoom(point, zoom)
}, 0)
// var marker = new BMap.Marker(point) //
// map.addOverlay(marker) //
},
handleMap() {
this.dialogFormMap = true
this.LAT = this.zhuangjiafrom.LAT
this.LON = this.zhuangjiafrom.LON
},
getClickInfo(e) {
this.LON = e.point.lng
this.LAT = e.point.lat
},
setPosition() {
this.dialogFormMap = false
this.zhuangjiafrom.LAT = this.LAT
this.zhuangjiafrom.LON = this.LON
},
//* ***********************************
closeDialog() {
this.dialogzhuangjiaShow = false
},
deletezhuangjiaPeople(row) {
this.listISLOADing = true
requestFN(
'/plan/planningresources/delete', { id: row.PLANNINGRESOURCES_ID }
).then((data) => {
this.$message({
message: '移除成功',
type: 'success'
})
this.listISLOADing = false
this.getDataList()
}).catch((e) => {
this.listISLOADing = false
})
},
confirm() {
this.zhuangjiafrom.FIRERESERVEPLAN_ID = this.planid
this.listISLOADing = true
requestFN(
'/plan/planningresources/save', this.zhuangjiafrom
).then((data) => {
this.$message({
message: '添加成功',
type: 'success'
})
this.dialogzhuangjiaShow = false
this.listISLOADing = false
this.getDataList()
}).catch((e) => {
this.listISLOADing = false
})
},
yjzjadd() {
this.dialogzhuangjiaShow = true
this.zhuangjiafrom = {
LAT: '',
LON: ''
}
},
updatezhuangjiaPeople(row) {
this.dialogzhuangjiaShow = true
this.zhuangjiafrom = {
PLANNINGRESOURCES_ID: row.PLANNINGRESOURCES_ID,
RESOURCETYPES: row.RESOURCETYPES,
RESOURCENAME: row.RESOURCENAME,
RESOURCEADDRESS: row.RESOURCEADDRESS,
RESOURCESNUMBER: row.RESOURCESNUMBER,
LINKMAN: row.LINKMAN,
LINKPHONE: row.LINKPHONE,
RESOURCEDES: row.RESOURCEDES,
BZ: row.BZ,
LAT: row.LAT,
LON: row.LON
}
},
//
getDataList() {
this.listISLOADing = true
requestFN(
'/plan/planningresources/list?showCount=50' + '&currentPage=1',
{
name: this.KEYWORDS,
FIRERESERVEPLAN_ID: this.planid,
TYPE: '1'
}
).then((data) => {
this.listISLOADing = false
this.yjzjvarList = data.varList
this.yjzhuangjiatotal = data.page.totalResult
})
.catch((e) => {
this.listISLOADing = false
})
}
}
}
</script>
<style lang="scss">
</style>

View File

@ -1,6 +1,20 @@
<template>
<div>
<div class="filter-container">
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="jigouAdd">
新增机构
</el-button>
<el-button class="filter-item" type="danger" icon="el-icon-delete" @click="jigoudelete">
删除机构
</el-button>
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="renyuanadd">
新增人员
</el-button>
<!-- <el-button class="filter-item" type="danger" icon="el-icon-delete" @click="renyuandelete">
批量删除
</el-button>-->
</div>
<el-container>
<el-aside width="300px" style="background-color:#fff">
@ -29,11 +43,18 @@
highlight-current-row
>
<el-table-column label="名称" prop="NAME" />
<el-table-column prop="HEADMAN_NAME" label="负责人"/>
<el-table-column prop="leName" label="部门级别"/>
<el-table-column prop="DEP_ORDER" label="排序" width="100" />
<el-table-column label="姓名" prop="NAME" />
<el-table-column prop="DUTIES" label="职务"/>
<el-table-column prop="POSITION" label="组内岗位"/>
<el-table-column prop="LINKPHONE" label="联系电话"/>
<el-table-column prop="URGENTLINKPHONE" label="紧急联系电话"/>
<el-table-column prop="PLANNINGDEPARTMENT_NAME" label="组织机构"/>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deleterenyuanPeople(row.PLANNINGPERSONNEL_ID)"></el-button>
<el-button type="primary" icon="el-icon-setting" size="mini" @click="updaterenyuanPeople(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
@ -41,6 +62,73 @@
</div>
</el-main>
</el-container>
<el-dialog :visible.sync="dialogjigouShow" title="机构" width="600px" >
<el-tag class="mark_up" size="medium">上级菜单{{ jigoumainid == '0' ?'(无) 此项为顶级分组':jigouname }}</el-tag>
<el-form ref="form" :rules="rules" :model="jigoufrom" label-width="110px" style="width: 500px;">
<el-form-item label="名称" prop="NAME">
<el-input v-model="jigoufrom.NAME" placeholder="这里名称..." />
</el-form-item>
<el-form-item label="英文" prop="NAME_EN">
<el-input v-model="jigoufrom.NAME_EN" placeholder="这里英文..." />
</el-form-item>
<el-form-item label="编码" prop="BIANMA">
<el-input v-model="jigoufrom.BIANMA" placeholder="这里编码..." />
</el-form-item>
<el-form-item label="负责人" prop="HEADMAN">
<el-input v-model="jigoufrom.HEADMAN" placeholder="这里负责人..." />
</el-form-item>
<el-form-item label="电话" prop="TEL">
<el-input v-model="jigoufrom.TEL" placeholder="这里电话..." />
</el-form-item>
<el-form-item label="部门职能" prop="FUNCTIONS">
<el-input v-model="jigoufrom.FUNCTIONS" placeholder="这里部门职能..." />
</el-form-item>
<el-form-item label="地址" prop="ADDRESS">
<el-input v-model="jigoufrom.ADDRESS" placeholder="这里地址..." />
</el-form-item>
<el-form-item label="备注" prop="BZ">
<el-input v-model="jigoufrom.BZ" placeholder="这里备注..." />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogjigouShow = false"> </el-button>
<el-button type="primary" @click="jigouconfirm"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogrenyuanShow" title="人员" width="600px" >
<el-tag class="mark_up" size="medium">所属机构{{ jigoumainid == '0' ?'(无) 此项为顶级分组':jigouname }}</el-tag>
<el-form ref="form" :rules="rules" :model="renyuanfrom" label-width="110px" style="width: 500px;">
<el-form-item label="姓名" prop="NAME">
<el-input v-model="renyuanfrom.NAME" placeholder="这里名称..." />
</el-form-item>
<el-form-item label="职务" prop="DUTIES">
<el-input v-model="renyuanfrom.DUTIES" placeholder="这里英文..." />
</el-form-item>
<el-form-item label="组内岗位" prop="POSITION">
<el-input v-model="renyuanfrom.POSITION" placeholder="这里编码..." />
</el-form-item>
<el-form-item label="联系电话" prop="LINKPHONE">
<el-input v-model="renyuanfrom.LINKPHONE" placeholder="这里负责人..." />
</el-form-item>
<el-form-item label="紧急联系电话" prop="URGENTLINKPHONE">
<el-input v-model="renyuanfrom.URGENTLINKPHONE" placeholder="这里电话..." />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogrenyuanShow = false"> </el-button>
<el-button type="primary" @click="renyuanconfirm"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -52,10 +140,16 @@ export default {
name: 'Yingjizhuangjia',
components: { Pagination, Treeselect },
props: {
planid: {
type: String,
default() {
return ''
} }
},
data() {
return {
rules: [],
listISLOADing: false,
listQuery: {
page: 1,
limit: 20
@ -68,30 +162,136 @@ export default {
label: 'name'
},
total: 0,
treeData: []
treeData: [],
//* **********
jigoumainid: '0',
jigouname: '',
dialogjigouShow: false,
jigoufrom: {},
//* ***************
renyuanfrom: {},
dialogrenyuanShow: false
}
},
created() {
this.getTreeList()
this.getDEPARTMENTList(0)
this.getDEPARTMENTList('')
},
methods: {
renyuanadd() {
this.dialogrenyuanShow = true
this.renyuanfrom = {}
},
updaterenyuanPeople(row) {
this.dialogrenyuanShow = true
this.jigouname = row.PLANNINGDEPARTMENT_NAME
this.renyuanfrom = {
PLANNINGPERSONNEL_ID: row.PLANNINGPERSONNEL_ID,
NAME: row.NAME,
DUTIES: row.DUTIES,
POSITION: row.POSITION,
LINKPHONE: row.LINKPHONE,
URGENTLINKPHONE: row.URGENTLINKPHONE
}
},
deleterenyuanPeople(id) {
this.listISLOADing = true
requestFN(
'/plan/planningDepartment/deletePersonnel', { id: id }
).then((data) => {
this.$message({
message: '移除成功',
type: 'success'
})
this.listISLOADing = false
this.getDEPARTMENTList()
}).catch((e) => {
this.listISLOADing = false
})
},
renyuanconfirm() {
this.listISLOADing = true
this.renyuanfrom.FIRERESERVEPLAN_ID = this.planid
this.renyuanfrom.PLANNINGDEPARTMENT_ID = this.jigoumainid
requestFN(
'/plan/planningDepartment/savePersonnel', this.renyuanfrom
).then((data) => {
this.$message({
message: '添加成功',
type: 'success'
})
this.dialogrenyuanShow = false
this.listISLOADing = false
this.getDEPARTMENTList(this.jigoumainid)
}).catch((e) => {
this.listISLOADing = false
})
},
//* **************************
jigouAdd() {
this.jigoufrom = {}
this.dialogjigouShow = true
},
jigoudelete() {
this.listISLOADing = true
requestFN(
'/plan/planningDepartment/delete', { id: this.jigoumainid }
).then((data) => {
this.$message({
message: '移除成功',
type: 'success'
})
this.listISLOADing = false
this.getTreeList()
}).catch((e) => {
this.listISLOADing = false
})
},
jigouconfirm() {
this.listISLOADing = true
this.jigoufrom.FIRERESERVEPLAN_ID = this.planid
this.jigoufrom.PARENT_ID = this.jigoumainid
requestFN(
'/plan/planningDepartment/save', this.jigoufrom
).then((data) => {
this.$message({
message: '添加成功',
type: 'success'
})
this.dialogjigouShow = false
this.listISLOADing = false
this.getTreeList()
}).catch((e) => {
this.listISLOADing = false
})
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
handleNodeClick(node, data, value) {
this.form.PARENT_ID = node.id
this.getDEPARTMENTList(node.id)
this.jigoumainid = node.id
this.jigouname = node.name
this.getDEPARTMENTList(this.jigoumainid)
},
getTreeList() {
this.treeLoading = true
requestFN(
'/department/listTree',
{}
'/plan/planningDepartment/getTree',
{
FIRERESERVEPLAN_ID: this.planid,
proid: '0'
}
).then((data) => {
this.treeLoading = false
this.treeData = JSON.parse(data.zTreeNodes)
this.treeData = data.data
}).catch((e) => {
this.treeLoading = false
})
@ -101,15 +301,14 @@ export default {
this.listLoading = true
this.varList = []
requestFN(
'/department/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
'/plan/planningDepartment/personnelList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
DEPARTMENT_ID: DEPARTMENT_ID
PLANNINGDEPARTMENT_ID: DEPARTMENT_ID,
FIRERESERVEPLAN_ID: this.planid
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.form.PARENT_ID = data.PARENT_ID
this.form.LEVEL = data.LEVEL
this.total = data.page.totalResult
this.hasButton()
}).catch((e) => {

View File

@ -18,7 +18,6 @@ export default {
methods: {
huidiao() {
console.log('sdfsdsfd')
this.$refs.list.getList()
}