1、救援队伍新增人员维护

2、定时任务bug修复
liujun0703-新项目开发
liujun 2024-08-19 08:52:31 +08:00
parent 43ae67909d
commit 5a94d3b101
4 changed files with 557 additions and 192 deletions

View File

@ -0,0 +1,124 @@
<template>
<el-dialog v-loading="loading" :visible.sync="visible" :title="title" width="800px" append-to-body>
<el-form
ref="form"
:model="form"
:rules="rule"
label-position="right"
label-width="130px"
style="margin-right: 20px;margin-left: 20px">
<el-form-item label="姓名:" prop="NAME">
<el-input v-model="form.NAME" placeholder="请输入姓名"/>
</el-form-item>
<el-form-item label="性别:" prop="SEX">
<el-radio-group v-model="form.SEX">
<el-radio :label="'0'"></el-radio>
<el-radio :label="'1'"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="年龄:" prop="AGE">
<el-input v-model="form.AGE" placeholder="请输入年龄"/>
</el-form-item>
<el-form-item label="手机号:" prop="PHONE">
<el-input v-model="form.PHONE" placeholder="请输入手机号"/>
</el-form-item>
<el-form-item label="办公电话:" prop="TELEPHONE">
<el-input v-model="form.TELEPHONE" placeholder="请输入办公电话"/>
</el-form-item>
<el-form-item label="救援队职位名称:" prop="TEAM_POSITION">
<el-input v-model="form.TEAM_POSITION" placeholder="请输入备注"/>
</el-form-item>
<el-form-item label="所在单位名称:" prop="COMPANY_NAME">
<el-input v-model="form.COMPANY_NAME" placeholder="请输入备注"/>
</el-form-item>
<el-form-item label="所在单位岗位名称:" prop="COMPANY_POSITION">
<el-input v-model="form.COMPANY_POSITION" placeholder="请输入备注"/>
</el-form-item>
<el-form-item label="备注:" prop="remark">
<el-input v-model="form.REMARK" placeholder="请输入备注"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { requestFN } from '@/utils/request'
export default {
props: {
title: {
type: String,
default: '新增'
}
},
data() {
return {
visible: false,
loading: false,
form: {
YJ_EMERGENCY_TEAM_USER_ID: '',
YJ_EMERGENCY_TEAM_INFO_ID: '',
NAME: '',
SEX: '0',
AGE: '',
PHONE: '',
TELEPHONE: '',
REMARK: '',
TEAM_POSITION: '',
COMPANY_NAME: '',
COMPANY_POSITION: ''
},
rule: []
}
},
methods: {
init(e, info) {
console.log(e)
console.log(info)
this.visible = true
this.form.YJ_EMERGENCY_TEAM_INFO_ID = e.YJ_EMERGENCY_TEAM_INFO_ID
if (info) {
this.form = info
this.getInfo()
}
},
confirm() {
requestFN('/major/emergency/saveTeamUser', this.form).then(
(data) => {
this.$message.success('保存成功')
this.visible = false
this.$emit('flush', 'flush')
})
.catch((e) => {
console.error(e)
this.$message.error('保存失败')
})
},
getInfo() {
requestFN('/major/emergency/getTeamUser', { ID: this.form.YJ_EMERGENCY_TEAM_USER_ID }).then(
(data) => {
this.form = data.info
})
.catch((e) => {
console.error(e)
this.$message.error('保存失败')
})
}
}
}
</script>
<style lang="sass" scoped>
.table-ui
td
line-height: 34px
.tbg
width: 200px
.ui-foot
text-align: center
margin-top: 20px
</style>

View File

@ -3,31 +3,52 @@
<div class="filter-container">
<el-form inline>
<el-form-item label="机构名称:" prop="RESCUE_TEAM_NAME">
<el-input v-model="RESCUE_TEAM_NAME" placeholder="机构名称" class="filter-item" style="width: 200px;" />
<el-input v-model="RESCUE_TEAM_NAME" placeholder="机构名称" class="filter-item" style="width: 200px;"/>
</el-form-item>
<el-form-item>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"></el-button>
<el-button class="filter-item" type="default" icon="el-icon-refresh" @click="resetQuery"></el-button>
<el-button class="filter-item" type="info" icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
</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="RESCUE_TEAM_NAME" label="队伍名称" width="180" />
<el-table-column prop="TYPE_NAME" label="队伍类型" show-overflow-tooltip="true" />
<el-table-column prop="LEVEL" label="队伍级别" show-overflow-tooltip="true" />
<el-table-column prop="RESCUE_TEAM_ADDRESS" label="队伍地址" show-overflow-tooltip="true" />
<el-table-column prop="RESPONSIBLE_OFFICE_PHONE" label="负责人办公电话" show-overflow-tooltip="true" />
<el-table-column prop="RESPONSIBLE_MOBILE_PHONE" label="负责人移动电话" show-overflow-tooltip="true" />
<el-table-column prop="RESPONSIBLE_HOME_PHONE" label="负责人固定电话" show-overflow-tooltip="true" />
<el-table-column prop="OPERATETIME" label="修改时间" show-overflow-tooltip="true" />
<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="RESCUE_TEAM_NAME" label="队伍名称" width="180"/>
<el-table-column :show-overflow-tooltip="true" prop="TYPE_NAME" label="队伍类型"/>
<el-table-column :show-overflow-tooltip="true" prop="LEVEL" label="队伍级别"/>
<el-table-column :show-overflow-tooltip="true" prop="RESCUE_TEAM_ADDRESS" label="队伍地址"/>
<el-table-column :show-overflow-tooltip="true" prop="RESPONSIBLE_OFFICE_PHONE" label="负责人办公电话"/>
<el-table-column :show-overflow-tooltip="true" prop="RESPONSIBLE_MOBILE_PHONE" label="负责人移动电话"/>
<el-table-column :show-overflow-tooltip="true" prop="RESPONSIBLE_HOME_PHONE" label="负责人固定电话"/>
<el-table-column :show-overflow-tooltip="true" prop="OPERATETIME" label="修改时间"/>
<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.RESCUE_TEAM_NAME)"></el-button>
<el-row>
<el-col :span="24">
<el-button type="text" icon="el-icon-document" size="mini" @click="goList('detail', row.ID, '1')">
查看
</el-button>
<el-button type="text" icon="el-icon-document" size="mini" @click="goList('peopleList', row.ID, '1')">
应急救援人员列表
</el-button>
</el-col>
<el-col :span="24">
<el-button type="text" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID)">
编辑
</el-button>
<el-button type="text" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.RESCUE_TEAM_NAME)">
删除
</el-button>
</el-col>
</el-row>
</template>
</el-table-column>
</el-table>
@ -35,22 +56,22 @@
<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>
<el-button type="danger" icon="el-icon-delete" plain @click="makeAll()"></el-button>
</template>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px">
<el-form ref="form" :rules="rules" :model="form" label-width="250px">
<el-form ref="form" :rules="rules" :model="form" label-width="120px" style="margin-right: 10px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="救援队名称" prop="RESCUE_TEAM_NAME">
<el-input v-model="form.RESCUE_TEAM_NAME" placeholder="请输入救援队名称..." />
<el-input v-model="form.RESCUE_TEAM_NAME" placeholder="请输入救援队名称..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地址" prop="RESCUE_TEAM_ADDRESS">
<el-input v-model="form.RESCUE_TEAM_ADDRESS" placeholder="请输入救援队地址..." />
<el-input v-model="form.RESCUE_TEAM_ADDRESS" placeholder="请输入救援队地址..."/>
</el-form-item>
</el-col>
</el-row>
@ -70,19 +91,19 @@
</el-col>
<el-col :span="12">
<el-form-item label="级别" prop="LEVEL">
<el-input v-model="form.LEVEL" placeholder="请输入级别..." />
<el-input v-model="form.LEVEL" placeholder="请输入级别..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="密级" prop="SECURITY_LEVEL">
<el-input v-model="form.SECURITY_LEVEL" placeholder="请输入密级..." />
<el-input v-model="form.SECURITY_LEVEL" placeholder="请输入密级..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="办公电话" prop="DUTY_PHONE">
<el-input v-model="form.DUTY_PHONE" placeholder="请输入办公电话..." />
<el-input v-model="form.DUTY_PHONE" placeholder="请输入办公电话..."/>
</el-form-item>
</el-col>
</el-row>
@ -105,16 +126,21 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="经度" prop="LONGITUDE">
<el-input v-model="form.LONGITUDE" placeholder="请输入经度" disabled @focus="handleMap" />
<el-input v-model="form.LONGITUDE" placeholder="请输入经度" disabled @focus="handleMap"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="纬度" prop="LATITUDE">
<div style="display: flex">
<el-input v-model="form.LATITUDE" placeholder="请输入纬度" disabled style="width: 100%" @focus="handleMap"/>
<el-input
v-model="form.LATITUDE"
placeholder="请输入纬度"
disabled
style="width: 100%"
@focus="handleMap"/>
<el-button style="margin-left:10px" @click="handleMap">
<span class="svg-container">
<svg-icon icon-class="international" />
<svg-icon icon-class="international"/>
</span>
</el-button>
</div>
@ -124,67 +150,67 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="负责人" prop="RESPONSIBLE_PERSON">
<el-input v-model="form.RESPONSIBLE_PERSON" placeholder="请输入负责人..." />
<el-input v-model="form.RESPONSIBLE_PERSON" placeholder="请输入负责人..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="负责人办公电话" prop="RESPONSIBLE_OFFICE_PHONE">
<el-input v-model="form.RESPONSIBLE_OFFICE_PHONE" placeholder="请输入负责人办公电话..." />
<el-input v-model="form.RESPONSIBLE_OFFICE_PHONE" placeholder="请输入负责人办公电话..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="负责人移动电话" prop="RESPONSIBLE_MOBILE_PHONE">
<el-input v-model="form.RESPONSIBLE_MOBILE_PHONE" placeholder="请输入负责人移动电话..." />
<el-input v-model="form.RESPONSIBLE_MOBILE_PHONE" placeholder="请输入负责人移动电话..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="负责人住宅电话" prop="RESPONSIBLE_HOME_PHONE">
<el-input v-model="form.RESPONSIBLE_HOME_PHONE" placeholder="请输入负责人住宅电话..." />
<el-input v-model="form.RESPONSIBLE_HOME_PHONE" placeholder="请输入负责人住宅电话..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="联系人" prop="CONTACT_PERSON">
<el-input v-model="form.CONTACT_PERSON" placeholder="请输入联系人..." />
<el-input v-model="form.CONTACT_PERSON" placeholder="请输入联系人..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人办公电话" prop="CONTACT_OFFICE_PHONE">
<el-input v-model="form.CONTACT_OFFICE_PHONE" placeholder="请输入联系人办公电话..." />
<el-input v-model="form.CONTACT_OFFICE_PHONE" placeholder="请输入联系人办公电话..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="联系人移动电话" prop="CONTACT_MOBILE_PHONE">
<el-input v-model="form.CONTACT_MOBILE_PHONE" placeholder="请输入联系人移动电话..." />
<el-input v-model="form.CONTACT_MOBILE_PHONE" placeholder="请输入联系人移动电话..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人住宅电话" prop="CONTACT_HOME_PHONE">
<el-input v-model="form.CONTACT_HOME_PHONE" placeholder="请输入联系人住宅电话..." />
<el-input v-model="form.CONTACT_HOME_PHONE" placeholder="请输入联系人住宅电话..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="联系人电子邮箱" prop="CONTACT_EMAIL">
<el-input v-model="form.CONTACT_EMAIL" placeholder="请输入联系人电子邮箱..." />
<el-input v-model="form.CONTACT_EMAIL" placeholder="请输入联系人电子邮箱..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="邮编" prop="POSTAL_CODE">
<el-input v-model="form.POSTAL_CODE" placeholder="请输入邮编..." />
<el-input v-model="form.POSTAL_CODE" placeholder="请输入邮编..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="传真" prop="FAX">
<el-input v-model="form.FAX" placeholder="请输入传真..." />
<el-input v-model="form.FAX" placeholder="请输入传真..."/>
</el-form-item>
</el-col>
</el-row>
@ -203,14 +229,14 @@
</el-col>
<el-col :span="12">
<el-form-item label="主管单位地址" prop="SUPERVISING_UNIT_ADDRESS">
<el-input v-model="form.SUPERVISING_UNIT_ADDRESS" placeholder="请输入主管单位地址..." />
<el-input v-model="form.SUPERVISING_UNIT_ADDRESS" placeholder="请输入主管单位地址..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="总人数" prop="TOTAL_PERSONNEL">
<el-input v-model="form.TOTAL_PERSONNEL" placeholder="请输入总人数..." />
<el-input v-model="form.TOTAL_PERSONNEL" placeholder="请输入总人数..."/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -229,38 +255,38 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="应急通信方式" prop="EMERGENCY_COMMUNICATION_MODE">
<el-input v-model="form.EMERGENCY_COMMUNICATION_MODE" placeholder="请输入应急通信方式..." />
<el-input v-model="form.EMERGENCY_COMMUNICATION_MODE" placeholder="请输入应急通信方式..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="主要职责" prop="MAIN_DUTIES">
<el-input v-model="form.MAIN_DUTIES" type="textarea" placeholder="请输入主要职责..." />
<el-input v-model="form.MAIN_DUTIES" type="textarea" placeholder="请输入主要职责..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="主要装备描述" prop="MAIN_EQUIPMENT_DESCRIPTION">
<el-input v-model="form.MAIN_EQUIPMENT_DESCRIPTION" type="textarea" placeholder="请输入主要装备描述..." />
<el-input v-model="form.MAIN_EQUIPMENT_DESCRIPTION" type="textarea" placeholder="请输入主要装备描述..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="专长描述" prop="SPECIALTY_DESCRIPTION">
<el-input v-model="form.SPECIALTY_DESCRIPTION" type="textarea" placeholder="请输入专长描述..." />
<el-input v-model="form.SPECIALTY_DESCRIPTION" type="textarea" placeholder="请输入专长描述..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="资质等级" prop="QUALIFICATION_LEVEL">
<el-input v-model="form.QUALIFICATION_LEVEL" placeholder="请输入资质等级..." />
<el-input v-model="form.QUALIFICATION_LEVEL" placeholder="请输入资质等级..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="应急救援经历" prop="EMERGENCY_RESCUE_EXPERIENCE">
<el-input v-model="form.EMERGENCY_RESCUE_EXPERIENCE" type="textarea" placeholder="请输入应急救援经历..." />
<el-input v-model="form.EMERGENCY_RESCUE_EXPERIENCE" type="textarea" placeholder="请输入应急救援经历..."/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -279,24 +305,24 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="集合出发地点" prop="ASSEMBLY_DEPARTURE_LOCATION">
<el-input v-model="form.ASSEMBLY_DEPARTURE_LOCATION" placeholder="请输入集合出发地点..." />
<el-input v-model="form.ASSEMBLY_DEPARTURE_LOCATION" placeholder="请输入集合出发地点..."/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="自备交通工具" prop="SELF_PROVIDED_TRANSPORT">
<el-input v-model="form.SELF_PROVIDED_TRANSPORT" placeholder="请输入自备交通工具..." />
<el-input v-model="form.SELF_PROVIDED_TRANSPORT" placeholder="请输入自备交通工具..."/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="需要后备支援" prop="REQUIRES_BACKUP_SUPPORT">
<el-input v-model="form.REQUIRES_BACKUP_SUPPORT" placeholder="请输入是否需要后备支援..." />
<el-input v-model="form.REQUIRES_BACKUP_SUPPORT" placeholder="请输入是否需要后备支援..."/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="REMARK">
<el-input v-model="form.REMARK" type="textarea" placeholder="请输入备注..." />
<el-input v-model="form.REMARK" type="textarea" placeholder="请输入备注..."/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -313,22 +339,28 @@
:style="{height: clientHeight+'px'}"
@click="getClickInfo"
@ready="handler">
<bm-view style="width: 100%; height:100%; flex: 1" />
<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="addressKeyword" :fetch-suggestions="querySearch" :trigger-on-focus="false" placeholder="请输入详细地址" style="width:100%" @select="handleSelect" />
<el-autocomplete
v-model="addressKeyword"
:fetch-suggestions="querySearch"
:trigger-on-focus="false"
placeholder="请输入详细地址"
style="width:100%"
@select="handleSelect"/>
</div>
</div>
</bm-control>
</baidu-map>
<div slot="footer" class="dialog-footer">
<span>经度</span>
<el-input v-model="LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled />
<el-input v-model="LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
<span>纬度</span>
<el-input v-model="LATITUDE" style="width: 200px" placeholder="请输入内容" disabled />
<el-input v-model="LATITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
<el-button @click="dialogFormMap = false"> </el-button>
<el-button type="primary" @click="setPosition"> </el-button>
</div>
@ -341,6 +373,7 @@ import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import { Treeselect } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Treeselect, Pagination },
data() {
@ -432,140 +465,6 @@ export default {
{ required: true, message: '负责人办公电话不能为空', trigger: 'blur' }
]
},
// rules: {
// RESCUE_TEAM_NAME: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// RESCUE_TEAM_ADDRESS: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// TYPE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// LEVEL: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// SECURITY_LEVEL: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// AREA: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// LONGITUDE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// LATITUDE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// DUTY_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 5, max: 50, message: ' 5 50 ', trigger: 'blur' }
// ],
// RESPONSIBLE_PERSON: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// RESPONSIBLE_OFFICE_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 50, message: ' 1 50 ', trigger: 'blur' }
// ],
// RESPONSIBLE_MOBILE_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 50, message: ' 1 50 ', trigger: 'blur' }
// ],
// RESPONSIBLE_HOME_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 50, message: ' 1 50 ', trigger: 'blur' }
// ],
// CONTACT_PERSON: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// CONTACT_OFFICE_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 50, message: ' 1 50 ', trigger: 'blur' }
// ],
// CONTACT_MOBILE_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 50, message: ' 1 50 ', trigger: 'blur' }
// ],
// CONTACT_HOME_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 50, message: ' 1 50 ', trigger: 'blur' }
// ],
// CONTACT_EMAIL: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// TOTAL_PERSONNEL: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 11, message: ' 1 11 ', trigger: 'blur' }
// ],
// ESTABLISHMENT_DATE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 50, message: ' 1 50 ', trigger: 'blur' }
// ],
// EMERGENCY_COMMUNICATION_MODE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// SUPERVISING_UNIT_NAME: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// SUPERVISING_UNIT_ADDRESS: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// MAIN_DUTIES: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 1000, message: ' 1 1000 ', trigger: 'blur' }
// ],
// MAIN_EQUIPMENT_DESCRIPTION: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 1000, message: ' 1 1000 ', trigger: 'blur' }
// ],
// SPECIALTY_DESCRIPTION: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 1000, message: ' 1 1000 ', trigger: 'blur' }
// ],
// QUALIFICATION_LEVEL: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// EMERGENCY_RESCUE_EXPERIENCE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 1000, message: ' 1 1000 ', trigger: 'blur' }
// ],
// EXPECTED_PREPARATION_TIME: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// ASSEMBLY_DEPARTURE_LOCATION: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// SELF_PROVIDED_TRANSPORT: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// REQUIRES_BACKUP_SUPPORT: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// REMARK: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 1000, message: ' 1 1000 ', trigger: 'blur' }
// ]
// },
FFILE: [],
caseSummaryList: [],
treeData: [],

View File

@ -0,0 +1,340 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form inline>
<el-form-item label="机构名称:" prop="RESCUE_TEAM_NAME">
<el-input v-model="RESCUE_TEAM_NAME" placeholder="机构名称" class="filter-item" style="width: 200px;"/>
</el-form-item>
<el-form-item>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"></el-button>
<el-button class="filter-item" type="info" icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
</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 :show-overflow-tooltip="true" type="selection" width="55" align="center"/>
<el-table-column :show-overflow-tooltip="true" type="index" label="序号" width="50" align="center"/>
<el-table-column :show-overflow-tooltip="true" prop="NAME" label="姓名" width="180"/>
<el-table-column :show-overflow-tooltip="true" prop="SEX" label="性別">
<template slot-scope="scope">
{{ scope.row.SEX === '0' ? '男' : '女' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" prop="AGE" label="年龄"/>
<el-table-column :show-overflow-tooltip="true" prop="PHONE" label="手机号"/>
<el-table-column :show-overflow-tooltip="true" prop="TELEPHONE" label="座机电话号"/>
<el-table-column :show-overflow-tooltip="true" prop="TEAM_POSITION" label="救援队职位名称"/>
<el-table-column :show-overflow-tooltip="true" prop="COMPANY_NAME" label="所在单位名称"/>
<el-table-column :show-overflow-tooltip="true" prop="COMPANY_POSITION" label="所在单位岗位名称"/>
<el-table-column label="操作">
<template slot-scope="{row}">
<el-button type="text" size="mini" @click="handleEdit(row)"></el-button>
<el-button type="text" style="color: red" size="mini" @click="handleDelete(row)"></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="handleDelete()"></el-button>
</template>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
<add-people ref="addPeople" :title="title" @flush="getList"/>
<div class="ui-foot">
<el-button type="primary" @click="goBack"></el-button>
</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 AddPeople from './addPeople.vue'
export default {
components: { AddPeople, Treeselect, Pagination },
data() {
return {
//
CORPINFO_ID: this.$parent.CORPINFO_ID,
clientHeight: 600,
loadingMap: true,
listLoading: false,
buttonloading: false,
BMap: '',
map: '',
showMap: false,
addressKeyword: '',
pointLngLat: '',
zoom: 10,
dialogFormMap: false,
LATITUDE: '',
LONGITUDE: '',
listQuery: {
page: 1,
limit: 10
},
total: 0,
varList: [],
KEYWORDS: '',
RESCUE_TEAM_NAME: '',
dialogType: 'add',
form: {
RESCUE_TEAM_NAME: '',
RESCUE_TEAM_ADDRESS: '',
TYPE: '',
TYPE_NAME: '',
LEVEL: '',
LEVEL_NAME: '',
SECURITY_LEVEL: '',
SECURITY_LEVEL_NAME: '',
AREA: '',
AREA_NAME: '',
DUTY_PHONE: '',
FAX: '',
POSTAL_CODE: '',
LONGITUDE: '',
LATITUDE: '',
RESPONSIBLE_PERSON: '',
RESPONSIBLE_OFFICE_PHONE: '',
RESPONSIBLE_MOBILE_PHONE: '',
RESPONSIBLE_HOME_PHONE: '',
CONTACT_PERSON: '',
CONTACT_OFFICE_PHONE: '',
CONTACT_MOBILE_PHONE: '',
CONTACT_HOME_PHONE: '',
CONTACT_EMAIL: '',
TOTAL_PERSONNEL: '',
ESTABLISHMENT_DATE: '',
EMERGENCY_COMMUNICATION_MODE: '',
SUPERVISING_UNIT: '',
SUPERVISING_UNIT_NAME: '',
SUPERVISING_UNIT_ADDRESS: '',
MAIN_DUTIES: '',
MAIN_EQUIPMENT_DESCRIPTION: '',
SPECIALTY_DESCRIPTION: '',
QUALIFICATION_LEVEL: '',
EMERGENCY_RESCUE_EXPERIENCE: '',
EXPECTED_PREPARATION_TIME: '',
ASSEMBLY_DEPARTURE_LOCATION: '',
SELF_PROVIDED_TRANSPORT: '',
REQUIRES_BACKUP_SUPPORT: '',
REMARK: ''
},
rules: {
RESCUE_TEAM_NAME: [
{ required: true, message: '救援队名称不能为空', trigger: 'blur' },
{ min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
],
LONGITUDE: [
{ required: true, message: '经度不能为空', trigger: 'blur' }
],
LATITUDE: [
{ required: true, message: '纬度不能为空', trigger: 'blur' }
],
RESPONSIBLE_PERSON: [
{ required: true, message: '负责人不能为空', trigger: 'blur' }
],
RESPONSIBLE_OFFICE_PHONE: [
{ required: true, message: '负责人办公电话不能为空', trigger: 'blur' }
]
},
FFILE: [],
caseSummaryList: [],
treeData: [],
DepartmentData: [],
yjTypeData: [],
normalizer(node) {
return {
id: node.DICTIONARIES_ID,
label: node.name,
children: node.nodes
}
},
title: '新增',
YJ_EMERGENCY_TEAM_INFO_ID: ''
}
},
created() {
this.YJ_EMERGENCY_TEAM_INFO_ID = this.$parent.CASE_ID
this.getList()
},
methods: {
handleRegionChange(value) {
const selectedRegion = this.treeData.find(region => region.DICTIONARIES_ID === value)
if (selectedRegion) {
this.form.AREA_NAME = selectedRegion.name
}
},
handleTypeChange(value) {
const selectedType = this.yjTypeData.find(type => type.DICTIONARIES_ID === value)
if (selectedType) {
this.form.TYPE_NAME = selectedType.name
}
},
handleDepartmentChange(value) {
const selectedDepartment = this.DepartmentData.find(department => department.id === value)
if (selectedDepartment) {
this.form.SUPERVISING_UNIT_NAME = selectedDepartment.label
}
},
resetQuery() {
this.RESCUE_TEAM_NAME = ''
this.getQuery()
},
goList(page, CASE_ID, ticketType) {
this.$parent.activeName = page
this.$parent.CASE_ID = CASE_ID
this.$parent.ticketType = ticketType
},
getTreeList() {
const params = {
PARENT_ID: '5a5d2809ed644aa6ba97a5240ff35484'
}
requestFN('/dictionaries/listTree', params).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
console.error('获取树形数据失败', e)
})
},
//* *************************************************
getList() {
this.listLoading = true
requestFN(
'/major/emergency/getTeamUserList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
YJ_EMERGENCY_TEAM_INFO_ID: this.YJ_EMERGENCY_TEAM_INFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
})
.catch((e) => {
this.listLoading = false
})
},
getyjTypeDataList() {
const params = {
PARENT_ID: '2bd21d9d4d254f179e79f75d6377f651'
}
requestFN('/dictionaries/listTree', params).then((data) => {
this.yjTypeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
console.error('获取树形数据失败', e)
})
},
//* *************************************************************
handleEdit(e) {
this.$refs.addPeople.init({ YJ_EMERGENCY_TEAM_INFO_ID: this.$parent.CASE_ID }, e)
},
handleAdd() {
this.$refs.addPeople.init({ YJ_EMERGENCY_TEAM_INFO_ID: this.$parent.CASE_ID })
},
confirm() {
this.$refs.form.validate(valid => {
if (valid) {
this.dataSave()
} else {
return false
}
})
},
dataSave() {
this.listLoading = true
requestFN('/major/emergency/save', this.form).then((data) => {
this.listLoading = false
this.dialogFormEdit = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
},
//* *************************************************************
handleDelete(id, RESCUE_TEAM_NAME) {
this.$confirm('确定要删除[' + RESCUE_TEAM_NAME + ']吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/major/emergency/delete',
{
id: id
}
).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.getList()
}
}).catch((e) => {
this.listLoading = 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.listLoading = true
requestFN(
'/major/emergency/deleteAll',
{
ids: ids
}
).then(() => {
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
goBack() {
this.$parent.activeName = 'list'
}
}
}
</script>

View File

@ -1,14 +1,16 @@
<template>
<div>
<list v-show="activeName=='list'" ref="list" />
<detail v-if="activeName=='detail'"/>
<list v-show="activeName==='list'" ref="list" />
<detail v-if="activeName==='detail'"/>
<people-list v-if="activeName==='peopleList'"/>
</div>
</template>
<script>
import list from './components/list.vue'
import detail from './components/detail.vue'
import PeopleList from './components/peopleList.vue'
export default {
components: { list, detail },
components: { PeopleList, list, detail },
data() {
return {
activeName: 'list',