liujun0703-新项目开发
liy 2024-07-11 16:46:48 +08:00
parent c78e805b0a
commit bf166f24cf
3 changed files with 1042 additions and 0 deletions

View File

@ -0,0 +1,244 @@
<template>
<div>
<div class="app-container">
<div class="level-title">
<h1>救援队伍详情</h1>
</div>
<div class="mb-20">
<table class="table-ui">
<tr>
<td class="tbg">救援队名称</td>
<td>{{ form.RESCUE_TEAM_NAME }}</td>
<td class="tbg">地址</td>
<td>{{ form.RESCUE_TEAM_ADDRESS }}</td>
</tr>
<tr>
<td class="tbg">类型</td>
<td>{{ form.TYPE_NAME }}</td>
<td class="tbg">级别</td>
<td>{{ form.LEVEL }}</td>
</tr>
<tr>
<td class="tbg">密级</td>
<td>{{ form.SECURITY_LEVEL }}</td>
<td class="tbg">所属区域</td>
<td>{{ form.AREA_NAME }}</td>
</tr>
<tr>
<td class="tbg">值班电话</td>
<td>{{ form.DUTY_PHONE }}</td>
<td class="tbg">传真</td>
<td>{{ form.FAX }}</td>
</tr>
<tr>
<td class="tbg">邮编</td>
<td>{{ form.POSTAL_CODE }}</td>
<td class="tbg">成立时间</td>
<td>{{ form.ESTABLISHMENT_DATE }}</td>
</tr>
<tr>
<td class="tbg">经度</td>
<td>{{ form.LONGITUDE }}</td>
<td class="tbg">纬度</td>
<td>{{ form.LATITUDE }}</td>
</tr>
<tr>
<td class="tbg">负责人</td>
<td>{{ form.RESPONSIBLE_PERSON }}</td>
<td class="tbg">负责人办公电话</td>
<td>{{ form.RESPONSIBLE_OFFICE_PHONE }}</td>
</tr>
<tr>
<td class="tbg">负责人移动电话</td>
<td>{{ form.RESPONSIBLE_MOBILE_PHONE }}</td>
<td class="tbg">负责人住宅电话</td>
<td>{{ form.RESPONSIBLE_HOME_PHONE }}</td>
</tr>
<tr>
<td class="tbg">联系人</td>
<td>{{ form.CONTACT_PERSON }}</td>
<td class="tbg">联系人办公电话</td>
<td>{{ form.CONTACT_OFFICE_PHONE }}</td>
</tr>
<tr>
<td class="tbg">联系人移动电话</td>
<td>{{ form.CONTACT_MOBILE_PHONE }}</td>
<td class="tbg">联系人住宅电话</td>
<td>{{ form.CONTACT_HOME_PHONE }}</td>
</tr>
<tr>
<td class="tbg">联系人电子邮箱</td>
<td>{{ form.CONTACT_EMAIL }}</td>
</tr>
<tr>
<td class="tbg">主管单位名称</td>
<td>{{ form.SUPERVISING_UNIT_NAME }}</td>
<td class="tbg">主管单位地址</td>
<td>{{ form.SUPERVISING_UNIT_ADDRESS }}</td>
</tr>
<tr>
<td class="tbg">总人数</td>
<td>{{ form.TOTAL_PERSONNEL }}</td>
<td class="tbg">应急通信方式</td>
<td>{{ form.EMERGENCY_COMMUNICATION_MODE }}</td>
</tr>
<tr>
<td class="tbg">预计准备时间</td>
<td>{{ form.EXPECTED_PREPARATION_TIME }}</td>
<td class="tbg">集合出发地点</td>
<td>{{ form.ASSEMBLY_DEPARTURE_LOCATION }}</td>
</tr>
<tr>
<td class="tbg">主要职责</td>
<td colspan="3">{{ form.MAIN_DUTIES }}</td>
</tr>
<tr>
<td class="tbg">主要装备描述</td>
<td colspan="3">{{ form.MAIN_EQUIPMENT_DESCRIPTION }}</td>
</tr>
<tr>
<td class="tbg">专长描述</td>
<td colspan="3">{{ form.SPECIALTY_DESCRIPTION }}</td>
</tr>
<tr>
<td class="tbg">资质等级</td>
<td colspan="3">{{ form.QUALIFICATION_LEVEL }}</td>
</tr>
<tr>
<td class="tbg">应急救援经历</td>
<td colspan="3">{{ form.EMERGENCY_RESCUE_EXPERIENCE }}</td>
</tr>
<tr>
<td class="tbg">备注</td>
<td colspan="3">{{ form.REMARK }}</td>
</tr>
</table>
</div>
</div>
<div class="ui-height" />
<div class="ui-foot">
<el-button type="primary" @click="goBack"></el-button>
</div>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
export default {
data() {
return {
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_NAME: '',
SUPERVISING_UNIT_ADDRESS: '',
MAIN_DUTIES: '',
MAIN_EQUIPMENT_DESCRIPTION: '',
SPECIALTY_DESCRIPTION: '',
QUALIFICATION_LEVEL: '',
EMERGENCY_RESCUE_EXPERIENCE: '',
EXPECTED_PREPARATION_TIME: '',
ASSEMBLY_DEPARTURE_LOCATION: '',
REMARK: ''
},
Id: ''
}
},
created() {
if (this.$parent.CASE_ID) {
this.Id = this.$parent.CASE_ID
this.getDetail(this.Id)
}
},
methods: {
goBack() {
this.$parent.activeName = 'list'
},
getDetail(Id) {
const params = { Id }
requestFN('/major/emergency/detail', params).then((response) => {
const data = response.msg
this.form = {
RESCUE_TEAM_NAME: data.RESCUE_TEAM_NAME,
RESCUE_TEAM_ADDRESS: data.RESCUE_TEAM_ADDRESS,
TYPE: data.TYPE,
TYPE_NAME: data.TYPE_NAME,
LEVEL: data.LEVEL,
LEVEL_NAME: data.LEVEL_NAME,
SECURITY_LEVEL: data.SECURITY_LEVEL,
SECURITY_LEVEL_NAME: data.SECURITY_LEVEL_NAME,
AREA: data.AREA,
AREA_NAME: data.AREA_NAME,
DUTY_PHONE: data.DUTY_PHONE,
FAX: data.FAX,
POSTAL_CODE: data.POSTAL_CODE,
LONGITUDE: data.LONGITUDE,
LATITUDE: data.LATITUDE,
RESPONSIBLE_PERSON: data.RESPONSIBLE_PERSON,
RESPONSIBLE_OFFICE_PHONE: data.RESPONSIBLE_OFFICE_PHONE,
RESPONSIBLE_MOBILE_PHONE: data.RESPONSIBLE_MOBILE_PHONE,
RESPONSIBLE_HOME_PHONE: data.RESPONSIBLE_HOME_PHONE,
CONTACT_PERSON: data.CONTACT_PERSON,
CONTACT_OFFICE_PHONE: data.CONTACT_OFFICE_PHONE,
CONTACT_MOBILE_PHONE: data.CONTACT_MOBILE_PHONE,
CONTACT_HOME_PHONE: data.CONTACT_HOME_PHONE,
CONTACT_EMAIL: data.CONTACT_EMAIL,
TOTAL_PERSONNEL: data.TOTAL_PERSONNEL,
ESTABLISHMENT_DATE: data.ESTABLISHMENT_DATE,
EMERGENCY_COMMUNICATION_MODE: data.EMERGENCY_COMMUNICATION_MODE,
SUPERVISING_UNIT_NAME: data.SUPERVISING_UNIT_NAME,
SUPERVISING_UNIT_ADDRESS: data.SUPERVISING_UNIT_ADDRESS,
MAIN_DUTIES: data.MAIN_DUTIES,
MAIN_EQUIPMENT_DESCRIPTION: data.MAIN_EQUIPMENT_DESCRIPTION,
SPECIALTY_DESCRIPTION: data.SPECIALTY_DESCRIPTION,
QUALIFICATION_LEVEL: data.QUALIFICATION_LEVEL,
EMERGENCY_RESCUE_EXPERIENCE: data.EMERGENCY_RESCUE_EXPERIENCE,
EXPECTED_PREPARATION_TIME: data.EXPECTED_PREPARATION_TIME,
ASSEMBLY_DEPARTURE_LOCATION: data.ASSEMBLY_DEPARTURE_LOCATION,
REMARK: data.REMARK,
Id: data.ID
}
}).catch((e) => {
console.error('获取详情数据失败', e)
})
}
}
}
</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

@ -0,0 +1,779 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form inline>
<el-form-item prop="ORGAN_ID" style="width: 250px;">
<Treeselect
:options="DepartmentData"
v-model="ORGAN_ID"
placeholder="请选择单位"
no-options-text="暂无数据"
no-children-text="暂无数据"
@input="handleDepartmentChange"
/>
</el-form-item>
<el-form-item label="月份:" prop="monthvalue">
<el-date-picker
v-model="monthvalue"
type="month"
format="yyyy-MM"
placeholder="选择月"/>
</el-form-item>
<el-form-item>
<el-button class="filter-item" type="primary" icon="el-icon-tickets" @click="tempdown"></el-button>
<el-button class="filter-item" type="primary" icon="el-icon-top" @click="tolead"></el-button>
<el-button class="filter-item" type="primary" icon="el-icon-top" @click="clearmonth"></el-button>
</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-form-item>
</el-form>
</div>
<el-table
:data="varList"
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column
prop="DUTY_DATE"
label="值班日期"
width="150"/>
<el-table-column label="早班">
<el-table-column
prop="name"
label="值班领导"
width="180">
<template v-slot="scope">
<div style="display: flex;justify-content: space-between">
<div >
<el-tag
v-for=" tag in scope.row.morningShiftForLeader"
:key="tag.ID"
closable
disable-transitions
style="cursor: pointer;"
@click="peopleDetail(tag.ID,tag.PEOPLE_NAME)"
@close="peopleClose(scope.row.morningShiftForLeader,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
</div>
<div>
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForLeader,scope.row.ID,1,1)"/>
</div>
</div>
</template>
</el-table-column>
<el-table-column
prop="name"
label="值班员"
width="180">
<template v-slot="scope">
<div style="display: flex;justify-content: space-between">
<div >
<el-tag
v-for=" tag in scope.row.morningShiftForAttendant"
:key="tag.ID"
closable
style="cursor: pointer;"
disable-transitions
@click="peopleDetail(tag.ID,tag.PEOPLE_NAME)"
@close="peopleClose(scope.row.morningShiftForAttendant,tag,tag.ID)">
{{ tag.PEOPLE_NAME }}
</el-tag>
</div>
<div>
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForAttendant,scope.row.ID,2,1)"/>
</div>
</div>
</template>
</el-table-column>
<el-table-column
prop="name"
label="值班司机"
width="180" >
<template v-slot="scope">
<div style="display: flex;justify-content: space-between">
<div >
<el-tag
v-for=" tag in scope.row.morningShiftForDrivers"
:key="tag.ID"
closable
style="cursor: pointer;"
disable-transitions
@click="peopleDetail(tag.ID,tag.PEOPLE_NAME)"
@close="peopleClose(scope.row.morningShiftForDrivers,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
</div>
<div>
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForDrivers,scope.row.ID,3,1)"/>
</div>
</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="晚班">
<el-table-column
prop="name"
label="值班领导"
width="180">
<template v-slot="scope">
<div style="display: flex;justify-content: space-between">
<div >
<el-tag
v-for=" tag in scope.row.morningShiftForLeaderForNight"
:key="tag.ID"
closable
disable-transitions
style="cursor: pointer;"
@click="peopleDetail(tag.ID,tag.PEOPLE_NAME)"
@close="peopleClose(scope.row.morningShiftForLeaderForNight,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
</div>
<div>
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForLeaderForNight,scope.row.ID,1,2)"/>
</div>
</div>
</template>
</el-table-column>
<el-table-column
prop="name"
label="值班员"
width="180">
<template v-slot="scope">
<div style="display: flex;justify-content: space-between">
<div >
<el-tag
v-for=" tag in scope.row.morningShiftForAttendantForNight"
:key="tag.ID"
closable
disable-transitions
style="cursor: pointer;"
@click="peopleDetail(tag.ID,tag.PEOPLE_NAME)"
@close="peopleClose(scope.row.morningShiftForAttendantForNight,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
</div>
<div>
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForAttendantForNight,scope.row.ID,2,2)"/>
</div>
</div>
</template>
</el-table-column>
<el-table-column
prop="name"
label="值班司机"
width="180">
<template v-slot="scope">
<div style="display: flex;justify-content: space-between">
<div >
<el-tag
v-for=" tag in scope.row.morningShiftForDriversForNight"
:key="tag.ID"
closable
disable-transitions
style="cursor: pointer;"
@click="peopleDetail(tag.ID,tag.PEOPLE_NAME)"
@close="peopleClose(scope.row.morningShiftForDriversForNight,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
</div>
<div>
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForDriversForNight,scope.row.ID,3,2)"/>
</div>
</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop="REMARKS"
label="备注"
/>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="{row}">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="clearyjDityMain(row.ID)"></el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="updateMainDity(row.ID)"></el-button>
</template>
</el-table-column>
</el-table>
<el-dialog :visible.sync="dialogPeopleFormEdit" :title="formPeople.PEOPLE_TYPE==1?'值班领导':formPeople.PEOPLE_TYPE==2?'值班员':'值班司机' " width="400px">
<el-form ref="formPeople" :model="formPeople" label-width="110px" style="width: 300px;">
<el-form-item label="姓名" prop="PEOPLE_NAME">
<el-input v-model="formPeople.PEOPLE_NAME" placeholder="这里姓名..." />
</el-form-item>
<el-form-item label="电话" prop="PEOPLE_PHONE">
<el-input
v-model="formPeople.PEOPLE_PHONE"
placeholder="请输入电话..."/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="addSysChoice"></el-button>
<el-button @click="dialogPeopleFormEdit = false"> </el-button>
<el-button type="primary" @click="savePeople"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormPeopleDetailShow" title="人员详情" width="400px">
<table class="table-ui">
<tr>
<td class="tbg">姓名</td>
<td>
<div v-html="formPeopleDetail.PEOPLE_NAME" />
</td>
</tr>
<tr>
<td class="tbg">电话</td>
<td>
<div v-html="formPeopleDetail.PEOPLE_PHONE" />
</td>
</tr>
</table>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormPeopleDetailShow = false"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogPeopleMainEdit" title="编辑" width="400px">
<el-form ref="formPeople" :model="formMainPeople" label-width="110px" style="width: 300px;">
<el-form-item label="排班登记名称" prop="PEOPLE_NAME">
<el-input v-model="formMainPeople.DUTY_NAME" placeholder="这里排班登记名称..." />
</el-form-item>
<el-form-item label="排班登记类型" prop="DUTY_REG_TYPE">
<el-input
v-model="formMainPeople.DUTY_REG_TYPE"
placeholder="请输入排班登记类型..."/>
</el-form-item>
<el-form-item label="备注" prop="REMARKS">
<el-input
v-model="formMainPeople.REMARKS"
type="textarea"
placeholder="请输入备注..."/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogPeopleMainEdit = false"> </el-button>
<el-button type="primary" @click="saveMainDity"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="exceltempFormAdd" title="模版导入" width="280px">
<el-form ref="formPeople" label-width="100px" >
<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="exceltempFormAdd = false"> </el-button>
<el-button type="primary" @click="confirmExcel()"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormAddSysChoiceShow" title="选择人员" width="850px">
<el-container>
<el-aside width="240px" style="background-color:#fff">
<el-tree
ref="tree"
:data="nodeData"
:props="defaultProps"
:filter-node-method="filterNode"
:load="getTreeNode"
lazy
class="filter-tree"
accordion
@node-click="handleNodeClick" />
</el-aside>
<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="addressName" placeholder="搜索姓名"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="性别">
<el-radio v-model="addressSex" label="0"></el-radio>
<el-radio v-model="addressSex" label="1"></el-radio>
</el-form-item>
</el-col>
<el-col >
<el-form-item label-width="10px">
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getAddressList">
搜索
</el-button>
<el-button class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table ref="multipleTable" :data="adressvarList" :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="NAME" label="姓名" />
<el-table-column prop="SEX" width="180" align="center" label="性别" >
<template v-slot="{row}">
<span>{{ row.SEX==='0'?'男':'女' }}</span>
</template>
</el-table-column>
<el-table-column prop="OFFICE_PHONE" label="移动电话" />
<el-table-column prop="MOVE_PHONE" label="办公电话" />
</el-table>
<div class="page-btn-group">
<div />
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</el-main>
</el-container>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormAddSysChoiceShow = false"> </el-button>
<el-button type="primary" @click="savePeople2"> </el-button>
</div>
</el-dialog>
</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 moment from 'moment'
import { upload } from '@/utils/upload'
export default {
components: { Treeselect, Pagination },
data() {
return {
exceltempFormAdd: false,
FFILE: [],
dialogPeopleMainEdit: false,
formMainPeople: {
DUTY_NAME: '',
DUTY_REG_TYPE: '',
REMARKS: ''
},
monthvalue: moment().startOf('day').format('YYYY-MM'),
dialogPeopleFormEdit: false,
varList: [],
KEYWORDS: '',
formPeople: {
MAIN_ID: '',
PEOPLE_TYPE: '',
PEOPLE_NAME: '',
PEOPLE_PHONE: '',
DITY_TYPE: ''
},
dynamicTags: [],
//
formPeopleDetail: {
PEOPLE_NAME: '',
PEOPLE_PHONE: ''
},
dialogFormPeopleDetailShow: false,
dialogFormAddSysChoiceShow: false,
//* *******************
listQuery: {
page: 1,
limit: 10
},
total: 0,
adressvarList: [],
addressName: '',
addressSex: '',
nodeData: [],
addressgroupId: '',
defaultProps: {
value: 'DICTIONARIES_ID',
children: 'nodes',
label: 'NAME'
},
ORGAN_ID: null,
DepartmentData: [],
normalizer(node) {
return {
id: node.DICTIONARIES_ID,
label: node.name,
children: node.nodes
}
}
}
},
created() {
this.getDepartmentList(() => {
this.getList()
})
},
methods: {
//* **************************************
getDepartmentList(fun) {
requestFN('/department/listAll').then((data) => {
this.DepartmentData = data.list.map(item => ({
id: item.department_ID,
label: item.name
}))
this.ORGAN_ID = this.DepartmentData[0].id
fun()
console.log(this.DepartmentData)
}).catch((e) => {
console.error('获取主管单位数据失败', e)
})
},
handleDepartmentChange(value) {
const selectedDepartment = this.DepartmentData.find(department => department.id === value)
if (selectedDepartment) {
this.ORGAN_ID = selectedDepartment.id
}
},
//* ****************************************
clearmonth() {
requestFN(
'/workingSchedule/clearOrganMonth',
{
ORGAN_ID: this.ORGAN_ID,
date: this.monthvalue
}
).then((data) => {
this.$message({
message: '清空成功',
type: 'success'
})
this.getList()
})
.catch((e) => {
this.listLoading = false
})
},
handleNodeClick(node, data, value) {
this.addressgroupId = node.DICTIONARIES_ID
this.getAddressList()
},
getTreeNode(node, resolve) {
if (node.level === 0) {
requestFN(
'/yjcommunicate/getCommunicateGroupLevels',
{
regulationsId: ''
}
).then((data) => {
resolve(data.list)
}).catch((e) => {
})
} else {
requestFN(
'/yjcommunicate/getCommunicateGroupLevels',
{
regulationsId: node.data.DICTIONARIES_ID
}
).then((data) => {
resolve(data.list)
}).catch((e) => {
})
}
},
filterNode(value, data) {
if (!value) return true
return data.NAME.indexOf(value) !== -1
},
goKeyReset() {
this.addressName = ''
this.addressgroupId = ''
this.addressSex = ''
this.getAddressList()
},
getAddressList() {
this.listLoading = true
requestFN(
'/yjcommunicate/listAddressBook?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
groupId: this.addressgroupId,
addressName: this.addressName,
addressSex: this.addressSex
}
).then((data) => {
this.listLoading = false
this.adressvarList = data.varList
this.total = data.page.totalResult
})
.catch((e) => {
this.listLoading = false
})
},
addSysChoice() {
this.dialogPeopleFormEdit = false
this.dialogFormAddSysChoiceShow = true
this.getAddressList()
},
// *******************************************
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
},
confirmExcel() {
if (this.FFILE.length > 0) {
this.upload((v) => {
this.$message({
message: '导入成功',
type: 'success'
})
this.exceltempFormAdd = false
this.$refs.upload.clearFiles()
this.getList()
})
}
},
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)
}
}
formData.append('date', this.monthvalue)
formData.append('ORGAN_ID', this.ORGAN_ID)
upload(
'/workingSchedule/upload',
formData
).then((data) => {
fun()
}).catch((e) => {
})
},
//* ****************Excel********************
tempdown() {
const url = config.httpurl + '/workingSchedule/download?date=' + this.monthvalue
setTimeout(function() {
window.open(url)
// _this.$refs.downloadUrl.dispatchEvent(new MouseEvent('click'))
}, 200)
},
tolead() {
this.exceltempFormAdd = true
this.FFILE = []
this.$refs.upload.clearFiles()
},
clearyjDityMain(id) {
this.$confirm('确定要清除排班数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/workingSchedule/clearyjDityMain',
{
id: id
}
).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.getList2()
}
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
//* ***********************************************************
updateMainDity(id) {
requestFN('/workingSchedule/getDityMainDetail', { id: id }).then((data) => {
this.listLoading = false
this.formMainPeople = {
ID: data.data.ID,
DUTY_REG_TYPE: data.data.DUTY_REG_TYPE,
REMARKS: data.data.REMARKS,
DUTY_NAME: data.data.DUTY_NAME
}
this.dialogPeopleMainEdit = true
}).catch((e) => {
this.listLoading = false
})
},
saveMainDity() {
requestFN('/workingSchedule/saveMian', this.formMainPeople).then((data) => {
this.dialogPeopleMainEdit = false
this.getList2()
}).catch((e) => {
// this.listLoading = false
})
},
//* *******************************************************
peopleDetail(id, name) {
this.listLoading = true
requestFN('/workingSchedule/getDityPeopleDetail', { id: id, name: name }).then((data) => {
this.listLoading = false
// this.varList = []
// this.getList()
this.formPeopleDetail = {
PEOPLE_NAME: data.data.PEOPLE_NAME,
PEOPLE_PHONE: data.data.PEOPLE_PHONE
}
}).catch((e) => {
this.listLoading = false
})
this.dialogFormPeopleDetailShow = true
},
peopleClose(dynamicTags, tag, id) {
dynamicTags.splice(dynamicTags.indexOf(tag), 1)
this.listLoading = true
requestFN('/workingSchedule/deletePeople', { id: id }).then((data) => {
this.listLoading = false
// this.varList = []
// this.getList()
}).catch((e) => {
this.listLoading = false
})
},
addPeopleTz(dynamicTags, id, type, dity_type) {
this.formPeople = {
MAIN_ID: id,
PEOPLE_TYPE: type,
PEOPLE_NAME: '',
DITY_TYPE: dity_type,
PEOPLE_SOURCE: '1'
}
this.dynamicTags = dynamicTags
this.dialogPeopleFormEdit = true
},
//
savePeople() {
this.dynamicTags.push(this.formPeople)
// this.listLoading = true
requestFN('/workingSchedule/savePeopleMian', this.formPeople).then((data) => {
// this.listLoading = false
this.dialogPeopleFormEdit = false
// this.varList = []
this.getList2()
}).catch((e) => {
// this.listLoading = false
})
},
savePeople2() {
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.ADDRESS_ID
}).join(',')
this.formPeople.ids = ids
this.formPeople.PEOPLE_SOURCE = 2
// this.listLoading = true
requestFN('/workingSchedule/savePeopleMian2', this.formPeople).then((data) => {
// this.listLoading = false
this.dialogFormAddSysChoiceShow = false
// this.varList = []
this.getList2()
}).catch((e) => {
// this.listLoading = false
})
},
//* *******************************************
resetQuery() {
this.monthvalue = moment().startOf('day').format('YYYY-MM')
this.ORGAN_ID = this.DepartmentData[0].id
this.getQuery()
},
//* *************************************************
getList() {
this.listLoading = true
requestFN(
'/workingSchedule/list',
{
date: this.monthvalue,
ORGAN_ID: this.ORGAN_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
})
.catch((e) => {
this.listLoading = false
})
},
getList2() {
requestFN(
'/workingSchedule/list',
{
ORGAN_ID: this.ORGAN_ID,
date: this.monthvalue
}
).then((data) => {
this.varList = data.varList
})
.catch((e) => {
})
},
getQuery() {
// this.$refs.multipleTable.clearSelection()
this.getList()
}
}
}
</script>
<style>
.el-dialog__body {
padding: 10px 20px !important;
}
</style>

View File

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