Merge remote-tracking branch 'origin/liujun0703-新项目开发' into liujun0703-新项目开发
commit
8f9bf438ed
|
@ -0,0 +1,513 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<div class="level-title">
|
||||
<h1>应急预案维护</h1>
|
||||
</div>
|
||||
<div class="mb-20">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="基本信息" name="first">
|
||||
<el-form ref="form" :model="form" label-width="180px">
|
||||
<el-row :gutter="15">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预案名称" prop="PLAN_NAME">
|
||||
<el-input v-model="form.PLAN_NAME" placeholder="请输入资源名称..." />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预案类型" prop="PLAN_TYPE">
|
||||
<Treeselect
|
||||
:options="yhtypelistthree"
|
||||
:normalizer="normalizer"
|
||||
v-model="form.PLAN_TYPE"
|
||||
placeholder="请选择预案类型"
|
||||
no-options-text="暂无数据"
|
||||
no-children-text="暂无数据"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<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>
|
||||
</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">
|
||||
<Treeselect
|
||||
:options="wenbenlistthree"
|
||||
:normalizer="normalizer"
|
||||
v-model="form.TEXTMESSAGE"
|
||||
placeholder="请选择预文本信息"
|
||||
no-options-text="暂无数据"
|
||||
no-children-text="暂无数据"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
</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="请选择关联事件"
|
||||
no-options-text="暂无数据"
|
||||
no-children-text="暂无数据"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预案描述" prop="PLAN_DESCRIPTION">
|
||||
<el-input v-model="form.PLAN_DESCRIPTION" 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-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
<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>
|
||||
</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>
|
||||
</div>
|
||||
|
||||
</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'
|
||||
export default {
|
||||
components: { Treeselect, yingjizhuangjia, zuzhijiagou },
|
||||
data() {
|
||||
return {
|
||||
|
||||
// 附件上传电子档
|
||||
dianzidangfile: [],
|
||||
// 救援方案标绘图
|
||||
jiuyuanfanganfile: [],
|
||||
// 平面图附件
|
||||
pingmiantufile: [],
|
||||
// 其他附件
|
||||
otherfile: [],
|
||||
// 所有图片
|
||||
allfiletype: [],
|
||||
|
||||
form: {
|
||||
|
||||
},
|
||||
activeName: 'first',
|
||||
// 预案类型
|
||||
yhtypelistthree: [],
|
||||
wenbenlistthree: [],
|
||||
guanlianlistthree: [],
|
||||
normalizer(node) {
|
||||
return {
|
||||
id: node.DICTIONARIES_ID,
|
||||
label: node.name,
|
||||
children: node.nodes
|
||||
}
|
||||
},
|
||||
listISLOADing: false,
|
||||
PLAN_ID: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$parent.CASE_ID) {
|
||||
this.PLAN_ID = this.$parent.CASE_ID
|
||||
// 获取详情
|
||||
this.getDetail(this.PLAN_ID)
|
||||
}
|
||||
this.getYaTypeDataList()
|
||||
this.getwenbenDataList()
|
||||
this.getguanlianataList()
|
||||
},
|
||||
methods: {
|
||||
getDetail(id) {
|
||||
const params = {
|
||||
Id: id
|
||||
}
|
||||
requestFN('/major/emergencyplan/detail', params).then((response) => {
|
||||
const data = response.data
|
||||
console.log(data)
|
||||
this.form = {
|
||||
|
||||
PLAN_TYPE: data.PLAN_TYPE,
|
||||
|
||||
PLAN_NUMBER: data.PLAN_NUMBER,
|
||||
|
||||
PLAN_LEVEL: data.PLAN_LEVEL,
|
||||
|
||||
PLAN_NAME: data.PLAN_NAME,
|
||||
|
||||
PLAN_CATEGORY: data.PLAN_CATEGORY,
|
||||
|
||||
INDUSTRY_CATEGORY: data.INDUSTRY_CATEGORY,
|
||||
|
||||
COMPILING_UNIT: data.COMPILING_UNIT,
|
||||
|
||||
VALIDITY_PERIOD: data.VALIDITY_PERIOD,
|
||||
|
||||
REVISION_TIME: data.REVISION_TIME,
|
||||
|
||||
PUBLICATION_TIME: data.PUBLICATION_TIME,
|
||||
|
||||
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
|
||||
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.error('获取详情数据失败', e)
|
||||
})
|
||||
},
|
||||
//* ***********组件查询*****************************
|
||||
// 预案类型
|
||||
getYaTypeDataList() {
|
||||
const params = {
|
||||
PARENT_ID: '0e20515f3aea4214b2fcfeb4b0bb054c'
|
||||
}
|
||||
requestFN('/dictionaries/listTree', params).then((data) => {
|
||||
this.yhtypelistthree = JSON.parse(data.zTreeNodes)
|
||||
}).catch((e) => {
|
||||
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
|
||||
}
|
||||
requestFN(
|
||||
'/major/emergencyplan/save', this.form
|
||||
).then((data) => {
|
||||
this.listISLOADing = false
|
||||
this.PLAN_ID = data.data.id
|
||||
this.activeName = 'tow'
|
||||
if (type === 0) {
|
||||
this.$parent.activeName = 'list'
|
||||
this.$parent.huidiao()
|
||||
}
|
||||
//
|
||||
}).catch((e) => {
|
||||
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'
|
||||
} else if (this.activeName === 'three') {
|
||||
this.activeName = 'four'
|
||||
} else {
|
||||
this.confirm('0')
|
||||
}
|
||||
},
|
||||
|
||||
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)
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleClick(tab, event) {
|
||||
/* if (tab.index == 1) {
|
||||
|
||||
} else if (tab.index == 2) {
|
||||
|
||||
}*/
|
||||
},
|
||||
goback() {
|
||||
this.$parent.activeName = 'list'
|
||||
this.$parent.huidiao()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="sass" scoped>
|
||||
.table-ui
|
||||
td
|
||||
line-height: 34px
|
||||
.tbg
|
||||
width: 200px
|
||||
.ui-foot
|
||||
text-align: center
|
||||
margin-top: 20px
|
||||
</style>
|
|
@ -0,0 +1,192 @@
|
|||
|
||||
<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 + '¤tPage=' + 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' + '¤tPage=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>
|
||||
|
|
@ -0,0 +1,406 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 200px;" />
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<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 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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<template>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" plain @click="makeAll('0')">删除</el-button>
|
||||
</template>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<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 },
|
||||
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
|
||||
},
|
||||
total: 0,
|
||||
varList: [],
|
||||
KEYWORDS: '',
|
||||
dialogFormEdit: false,
|
||||
dialogFormShow: false,
|
||||
dialogType: 'add',
|
||||
form: {
|
||||
// 名称
|
||||
EQUIP_NAME: '',
|
||||
// 设备类型
|
||||
TYPE: '',
|
||||
|
||||
// 经度
|
||||
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
|
||||
this.$parent.CASE_ID = CASE_ID
|
||||
this.$parent.ticketType = ticketType
|
||||
},
|
||||
|
||||
//* *******************列表查询******************************
|
||||
|
||||
getList() {
|
||||
this.listISLOADing = true
|
||||
requestFN(
|
||||
'/major/emergencyplan/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
PLAN_NAME: this.KEYWORDS
|
||||
}
|
||||
).then((data) => {
|
||||
this.listISLOADing = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
})
|
||||
.catch((e) => {
|
||||
this.listISLOADing = false
|
||||
})
|
||||
},
|
||||
//* ***************************数据保存**********************************
|
||||
handleEdit(id) {
|
||||
this.$parent.activeName = 'addfrom'
|
||||
this.$parent.CASE_ID = id
|
||||
},
|
||||
|
||||
handleAdd() {
|
||||
this.$parent.activeName = 'addfrom'
|
||||
this.$parent.CASE_ID = ''
|
||||
},
|
||||
|
||||
//* *****************************删除********************************
|
||||
handleDelete(id, name) {
|
||||
this.$confirm('确定要删除[' + name + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listISLOADing = true
|
||||
requestFN(
|
||||
'/major/emergencyplan/delete',
|
||||
{
|
||||
id: id
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result == 'success') {
|
||||
this.listISLOADing = false
|
||||
this.getList()
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listISLOADing = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
makeAll() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
console.info('_selectData')
|
||||
console.info(_selectData)
|
||||
if (_selectData == null || _selectData.length == 0) {
|
||||
this.$message({
|
||||
message: '请选中要删除的项...',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
const ids = _selectData.map((item, index) => {
|
||||
return item.ID
|
||||
}).join(',')
|
||||
|
||||
this.$confirm('确定要删除选中的数据吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listISLOADing = true
|
||||
requestFN(
|
||||
'/major/emergencyplan/deleteAll',
|
||||
{
|
||||
ids: ids
|
||||
}
|
||||
).then(() => {
|
||||
this.listISLOADing = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listISLOADing = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
|
||||
<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 + '¤tPage=' + 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' + '¤tPage=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>
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-aside width="300px" style="background-color:#fff">
|
||||
|
||||
<el-tree
|
||||
v-loading="treeLoading"
|
||||
ref="tree"
|
||||
:data="treeData"
|
||||
:props="defaultProps"
|
||||
:filter-node-method="filterNode"
|
||||
class="filter-tree"
|
||||
@node-click="handleNodeClick"/>
|
||||
</el-aside>
|
||||
<el-main>
|
||||
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
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>
|
||||
<div class="page-btn-group">
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList(DEPARTMENT_ID)" />
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { requestFN } from '@/utils/request'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { Treeselect } from '@riophae/vue-treeselect'
|
||||
export default {
|
||||
name: 'Yingjizhuangjia',
|
||||
components: { Pagination, Treeselect },
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
varList: [],
|
||||
listLoading: false, // 加载状态
|
||||
treeLoading: false,
|
||||
defaultProps: {
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
},
|
||||
total: 0,
|
||||
treeData: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTreeList()
|
||||
this.getDEPARTMENTList(0)
|
||||
},
|
||||
methods: {
|
||||
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)
|
||||
},
|
||||
getTreeList() {
|
||||
this.treeLoading = true
|
||||
requestFN(
|
||||
'/department/listTree',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.treeLoading = false
|
||||
this.treeData = JSON.parse(data.zTreeNodes)
|
||||
}).catch((e) => {
|
||||
this.treeLoading = false
|
||||
})
|
||||
},
|
||||
// 组织架构查询
|
||||
getDEPARTMENTList(DEPARTMENT_ID) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
requestFN(
|
||||
'/department/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
DEPARTMENT_ID: DEPARTMENT_ID
|
||||
}
|
||||
).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) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<div>
|
||||
<list v-show="activeName=='list'" ref="list" />
|
||||
<addfrom v-if="activeName=='addfrom'"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import list from './components/list.vue'
|
||||
import addfrom from './components/addfrom.vue'
|
||||
export default {
|
||||
components: { list, addfrom },
|
||||
data() {
|
||||
return {
|
||||
activeName: 'list',
|
||||
CASE_ID: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
huidiao() {
|
||||
console.log('sdfsdsfd')
|
||||
this.$refs.list.getList()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<router-view />
|
||||
</template>
|
Loading…
Reference in New Issue