值班人员只能是系统中的人员
parent
e69847d745
commit
d72e37dd8e
|
@ -2,32 +2,27 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
<el-form inline>
|
<el-form inline>
|
||||||
|
|
||||||
<el-form-item prop="ORGAN_ID" style="width: 250px;">
|
<el-form-item prop="ORGAN_ID" style="width: 250px;">
|
||||||
<Treeselect
|
<Treeselect
|
||||||
:options="DepartmentData"
|
:options="DepartmentData"
|
||||||
v-model="ORGAN_ID"
|
v-model="ORGAN_ID"
|
||||||
|
|
||||||
placeholder="请选择单位"
|
placeholder="请选择单位"
|
||||||
no-options-text="暂无数据"
|
no-options-text="暂无数据"
|
||||||
no-children-text="暂无数据"
|
no-children-text="暂无数据"
|
||||||
@input="handleDepartmentChange"
|
@input="handleDepartmentChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="月份:" prop="monthvalue">
|
<el-form-item label="月份:" prop="monthvalue">
|
||||||
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="monthvalue"
|
v-model="monthvalue"
|
||||||
type="month"
|
type="month"
|
||||||
format="yyyy-MM"
|
format="yyyy-MM"
|
||||||
placeholder="选择月"/>
|
placeholder="选择月"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<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-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="tolead">导入</el-button>
|
||||||
<el-button class="filter-item" type="primary" icon="el-icon-refresh" @click="clearmonth">清空本月</el-button>
|
<el-button v-if="false" class="filter-item" type="primary" icon="el-icon-refresh" @click="clearmonth">清空本月</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<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="primary" icon="el-icon-search" @click="getQuery">搜索</el-button>
|
||||||
|
@ -54,7 +49,6 @@
|
||||||
prop="name"
|
prop="name"
|
||||||
label="值班领导"
|
label="值班领导"
|
||||||
width="180">
|
width="180">
|
||||||
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div style="display: flex;justify-content: space-between">
|
<div style="display: flex;justify-content: space-between">
|
||||||
<div >
|
<div >
|
||||||
|
@ -65,7 +59,9 @@
|
||||||
disable-transitions
|
disable-transitions
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
@click="peopleDetail(tag.ID,tag.PEOPLE_NAME)"
|
@click="peopleDetail(tag.ID,tag.PEOPLE_NAME)"
|
||||||
@close="peopleClose(scope.row.morningShiftForLeader,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
@close="peopleClose(scope.row.morningShiftForLeader,tag,tag.ID)">
|
||||||
|
{{ tag.PEOPLE_NAME }}
|
||||||
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForLeader,scope.row.ID,1,1)"/>
|
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForLeader,scope.row.ID,1,1)"/>
|
||||||
|
@ -205,12 +201,12 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" align="center" width="200">
|
<el-table-column label="操作" align="center" width="200">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="clearyjDityMain(row.ID)">清空</el-button>
|
<el-button v-if="false" 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>
|
<el-button type="primary" icon="el-icon-edit" size="mini" @click="updateMainDity(row.ID)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-dialog :visible.sync="dialogPeopleFormEdit" :title="formPeople.PEOPLE_TYPE==1?'值班领导':formPeople.PEOPLE_TYPE==2?'值班员':'值班司机' " width="400px">
|
<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 ref="formPeople" :model="formPeople" label-width="110px" style="width: 300px;">
|
||||||
|
|
||||||
<el-form-item label="姓名" prop="PEOPLE_NAME">
|
<el-form-item label="姓名" prop="PEOPLE_NAME">
|
||||||
|
@ -370,7 +366,7 @@
|
||||||
<el-button type="primary" @click="savePeople2">确 定</el-button>
|
<el-button type="primary" @click="savePeople2">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<select-zhi-ban-user ref="selectZhiBanUser" @flush="getList()"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -381,8 +377,9 @@ import { Treeselect } from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { upload } from '@/utils/upload'
|
import { upload } from '@/utils/upload'
|
||||||
|
import SelectZhiBanUser from '../../../emergency_report/duty_management/shift_registration/components/selectZhiBanUser.vue'
|
||||||
export default {
|
export default {
|
||||||
components: { Treeselect, Pagination },
|
components: { SelectZhiBanUser, Treeselect, Pagination },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
exceltempFormAdd: false,
|
exceltempFormAdd: false,
|
||||||
|
@ -493,27 +490,13 @@ export default {
|
||||||
this.getAddressList()
|
this.getAddressList()
|
||||||
},
|
},
|
||||||
getTreeNode(node, resolve) {
|
getTreeNode(node, resolve) {
|
||||||
if (node.level === 0) {
|
requestFN(
|
||||||
requestFN(
|
'department/listAll', {}
|
||||||
'/yjcommunicate/getCommunicateGroupLevels',
|
).then((data) => {
|
||||||
{
|
resolve(data.list)
|
||||||
regulationsId: ''
|
}).catch((e) => {
|
||||||
}
|
console.log(e)
|
||||||
).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) {
|
filterNode(value, data) {
|
||||||
if (!value) return true
|
if (!value) return true
|
||||||
|
@ -528,20 +511,12 @@ export default {
|
||||||
getAddressList() {
|
getAddressList() {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
requestFN(
|
requestFN(
|
||||||
'/yjcommunicate/listAddressBook?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
'department/listTree', {}
|
||||||
{
|
|
||||||
groupId: this.addressgroupId,
|
|
||||||
addressName: this.addressName,
|
|
||||||
addressSex: this.addressSex
|
|
||||||
}
|
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
this.adressvarList = data.varList
|
}).catch((e) => {
|
||||||
this.total = data.page.totalResult
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
|
||||||
this.listLoading = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
addSysChoice() {
|
addSysChoice() {
|
||||||
this.dialogPeopleFormEdit = false
|
this.dialogPeopleFormEdit = false
|
||||||
|
@ -670,13 +645,12 @@ export default {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
requestFN('/workingSchedule/deletePeople', { id: id }).then((data) => {
|
requestFN('/workingSchedule/deletePeople', { id: id }).then((data) => {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
// this.varList = []
|
|
||||||
// this.getList()
|
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addPeopleTz(dynamicTags, id, type, dity_type) {
|
addPeopleTz(dynamicTags, id, type, dity_type) {
|
||||||
|
console.log('??????')
|
||||||
this.formPeople = {
|
this.formPeople = {
|
||||||
MAIN_ID: id,
|
MAIN_ID: id,
|
||||||
PEOPLE_TYPE: type,
|
PEOPLE_TYPE: type,
|
||||||
|
@ -685,7 +659,8 @@ export default {
|
||||||
PEOPLE_SOURCE: '1'
|
PEOPLE_SOURCE: '1'
|
||||||
}
|
}
|
||||||
this.dynamicTags = dynamicTags
|
this.dynamicTags = dynamicTags
|
||||||
this.dialogPeopleFormEdit = true
|
console.log('????')
|
||||||
|
this.$refs.selectZhiBanUser.init(this.formPeople)
|
||||||
},
|
},
|
||||||
// 保存值班人员
|
// 保存值班人员
|
||||||
savePeople() {
|
savePeople() {
|
||||||
|
@ -715,14 +690,11 @@ export default {
|
||||||
|
|
||||||
this.formPeople.ids = ids
|
this.formPeople.ids = ids
|
||||||
this.formPeople.PEOPLE_SOURCE = 2
|
this.formPeople.PEOPLE_SOURCE = 2
|
||||||
// this.listLoading = true
|
|
||||||
requestFN('/workingSchedule/savePeopleMian2', this.formPeople).then((data) => {
|
requestFN('/workingSchedule/savePeopleMian2', this.formPeople).then((data) => {
|
||||||
// this.listLoading = false
|
|
||||||
this.dialogFormAddSysChoiceShow = false
|
this.dialogFormAddSysChoiceShow = false
|
||||||
// this.varList = []
|
|
||||||
this.getList2()
|
this.getList2()
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
// this.listLoading = false
|
console.log(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//* *******************************************
|
//* *******************************************
|
||||||
|
@ -765,7 +737,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
getQuery() {
|
getQuery() {
|
||||||
// this.$refs.multipleTable.clearSelection()
|
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<list v-show="activeName=='list'" ref="list" />
|
<list v-show="activeName==='list'" ref="list" />
|
||||||
<detail v-if="activeName=='detail'"/>
|
<detail v-if="activeName==='detail'"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -16,18 +16,16 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="月份:" prop="monthvalue">
|
<el-form-item label="月份:" prop="monthvalue">
|
||||||
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="monthvalue"
|
v-model="monthvalue"
|
||||||
type="month"
|
type="month"
|
||||||
format="yyyy-MM"
|
format="yyyy-MM"
|
||||||
placeholder="选择月"/>
|
placeholder="选择月"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<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-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="tolead">导入</el-button>
|
||||||
<el-button class="filter-item" type="primary" icon="el-icon-refresh" @click="clearmonth">清空本月</el-button>
|
<el-button v-if="false" class="filter-item" type="primary" icon="el-icon-refresh" @click="clearmonth">清空本月</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<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="primary" icon="el-icon-search" @click="getQuery">搜索</el-button>
|
||||||
|
@ -68,7 +66,7 @@
|
||||||
@close="peopleClose(scope.row.morningShiftForLeader,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
@close="peopleClose(scope.row.morningShiftForLeader,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForLeader,scope.row.ID,1,1)"/>
|
<i class="el-icon-plus" style="cursor: pointer;" @click="addSysChoice(scope.row.morningShiftForLeader,scope.row.ID,1,1)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -96,7 +94,7 @@
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForAttendant,scope.row.ID,2,1)"/>
|
<i class="el-icon-plus" style="cursor: pointer;" @click="addSysChoice(scope.row.morningShiftForAttendant,scope.row.ID,2,1)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -119,7 +117,7 @@
|
||||||
@close="peopleClose(scope.row.morningShiftForDrivers,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
@close="peopleClose(scope.row.morningShiftForDrivers,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForDrivers,scope.row.ID,3,1)"/>
|
<i class="el-icon-plus" style="cursor: pointer;" @click="addSysChoice(scope.row.morningShiftForDrivers,scope.row.ID,3,1)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -145,7 +143,7 @@
|
||||||
@close="peopleClose(scope.row.morningShiftForLeaderForNight,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
@close="peopleClose(scope.row.morningShiftForLeaderForNight,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForLeaderForNight,scope.row.ID,1,2)"/>
|
<i class="el-icon-plus" style="cursor: pointer;" @click="addSysChoice(scope.row.morningShiftForLeaderForNight,scope.row.ID,1,2)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -168,7 +166,7 @@
|
||||||
@close="peopleClose(scope.row.morningShiftForAttendantForNight,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
@close="peopleClose(scope.row.morningShiftForAttendantForNight,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForAttendantForNight,scope.row.ID,2,2)"/>
|
<i class="el-icon-plus" style="cursor: pointer;" @click="addSysChoice(scope.row.morningShiftForAttendantForNight,scope.row.ID,2,2)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -191,7 +189,7 @@
|
||||||
@close="peopleClose(scope.row.morningShiftForDriversForNight,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
@close="peopleClose(scope.row.morningShiftForDriversForNight,tag,tag.ID)"> {{ tag.PEOPLE_NAME }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="el-icon-plus" style="cursor: pointer;" @click="addPeopleTz(scope.row.morningShiftForDriversForNight,scope.row.ID,3,2)"/>
|
<i class="el-icon-plus" style="cursor: pointer;" @click="addSysChoice(scope.row.morningShiftForDriversForNight,scope.row.ID,3,2)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -205,12 +203,12 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" align="center" width="200">
|
<el-table-column label="操作" align="center" width="200">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="clearyjDityMain(row.ID)">清空</el-button>
|
<el-button v-if="false" 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>
|
<el-button type="primary" icon="el-icon-edit" size="mini" @click="updateMainDity(row.ID)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-dialog :visible.sync="dialogPeopleFormEdit" :title="formPeople.PEOPLE_TYPE==1?'值班领导':formPeople.PEOPLE_TYPE==2?'值班员':'值班司机' " width="400px">
|
<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 ref="formPeople" :model="formPeople" label-width="110px" style="width: 300px;">
|
||||||
|
|
||||||
<el-form-item label="姓名" prop="PEOPLE_NAME">
|
<el-form-item label="姓名" prop="PEOPLE_NAME">
|
||||||
|
@ -220,7 +218,6 @@
|
||||||
<el-form-item label="电话" prop="PEOPLE_PHONE">
|
<el-form-item label="电话" prop="PEOPLE_PHONE">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formPeople.PEOPLE_PHONE"
|
v-model="formPeople.PEOPLE_PHONE"
|
||||||
|
|
||||||
placeholder="请输入电话..."/>
|
placeholder="请输入电话..."/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -370,7 +367,7 @@
|
||||||
<el-button type="primary" @click="savePeople2">确 定</el-button>
|
<el-button type="primary" @click="savePeople2">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<select-zhi-ban-user ref="selectZhiBanUser"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -381,8 +378,9 @@ import { Treeselect } from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { upload } from '@/utils/upload'
|
import { upload } from '@/utils/upload'
|
||||||
|
import SelectZhiBanUser from './selectZhiBanUser.vue'
|
||||||
export default {
|
export default {
|
||||||
components: { Treeselect, Pagination },
|
components: { SelectZhiBanUser, Treeselect, Pagination },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
exceltempFormAdd: false,
|
exceltempFormAdd: false,
|
||||||
|
@ -543,10 +541,15 @@ export default {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addSysChoice() {
|
addSysChoice(dynamicTags, id, type, dity_type) {
|
||||||
this.dialogPeopleFormEdit = false
|
this.formPeople = {
|
||||||
this.dialogFormAddSysChoiceShow = true
|
MAIN_ID: id,
|
||||||
this.getAddressList()
|
PEOPLE_TYPE: type,
|
||||||
|
PEOPLE_NAME: '',
|
||||||
|
DITY_TYPE: dity_type,
|
||||||
|
PEOPLE_SOURCE: '1'
|
||||||
|
}
|
||||||
|
this.$refs.selectZhiBanUser.init(this.formPeople)
|
||||||
},
|
},
|
||||||
// **********************文件上传*********************
|
// **********************文件上传*********************
|
||||||
handleEditChange(file) {
|
handleEditChange(file) {
|
||||||
|
|
|
@ -0,0 +1,201 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-loading="listLoading" :visible.sync="visible" title="选择人员" width="850px">
|
||||||
|
<el-container>
|
||||||
|
<el-aside width="240px" style="background-color:#fff">
|
||||||
|
<el-input
|
||||||
|
v-model="filterText"
|
||||||
|
placeholder="输入关键字进行过滤"
|
||||||
|
style="margin:10px 0"/>
|
||||||
|
<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>
|
||||||
|
<div class="filter-btn-group">
|
||||||
|
<el-form label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="用户名">
|
||||||
|
<el-input v-model="KEYWORDS" style="width: 150px" placeholder="请输入关键字"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<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="varList" :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="USERNAME" width="180" align="center" 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="visible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="savePeople">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { requestFN } from '@/utils/request'
|
||||||
|
import Pagination from '@/components/Pagination'
|
||||||
|
import { Treeselect } from '@riophae/vue-treeselect'
|
||||||
|
export default {
|
||||||
|
components: { Treeselect, Pagination },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
nodeData: [],
|
||||||
|
defaultProps: {
|
||||||
|
value: 'department_ID',
|
||||||
|
children: 'nodes',
|
||||||
|
label: 'name'
|
||||||
|
},
|
||||||
|
addressName: '',
|
||||||
|
addressSex: '',
|
||||||
|
adressvarList: [],
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
treeLoading: false,
|
||||||
|
filterText: '',
|
||||||
|
treeData: [],
|
||||||
|
form: {
|
||||||
|
DEPARTMENT_ID: ''
|
||||||
|
},
|
||||||
|
varList: [],
|
||||||
|
KEYWORDS: '',
|
||||||
|
DEPARTMENT_ID: '',
|
||||||
|
formPeople: {
|
||||||
|
ids: '',
|
||||||
|
PEOPLE_SOURCE: '',
|
||||||
|
MAIN_ID: '',
|
||||||
|
PEOPLE_TYPE: '',
|
||||||
|
PEOPLE_NAME: '',
|
||||||
|
PEOPLE_PHONE: '',
|
||||||
|
DITY_TYPE: ''
|
||||||
|
},
|
||||||
|
listLoading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
filterText(val) {
|
||||||
|
this.$refs.tree.filter(val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(e) {
|
||||||
|
this.visible = true
|
||||||
|
this.getTreeList()
|
||||||
|
this.formPeople = e
|
||||||
|
},
|
||||||
|
filterNode(value, data) {
|
||||||
|
if (!value) return true
|
||||||
|
return data.name.indexOf(value) !== -1
|
||||||
|
},
|
||||||
|
handleNodeClick(node, data, value) {
|
||||||
|
this.form.DEPARTMENT_ID = node.id
|
||||||
|
this.getList(node.id)
|
||||||
|
},
|
||||||
|
getAddressList() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
goKeyReset() {
|
||||||
|
this.addressName = ''
|
||||||
|
this.addressgroupId = ''
|
||||||
|
this.addressSex = ''
|
||||||
|
this.getAddressList()
|
||||||
|
},
|
||||||
|
savePeople() {
|
||||||
|
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.USER_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.visible = false
|
||||||
|
this.$emit('flush', '')
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList(DEPARTMENT_ID) {
|
||||||
|
this.listLoading = true
|
||||||
|
if (DEPARTMENT_ID) {
|
||||||
|
this.DEPARTMENT_ID = DEPARTMENT_ID
|
||||||
|
}
|
||||||
|
requestFN(
|
||||||
|
'/user/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||||
|
{
|
||||||
|
KEYWORDS: this.KEYWORDS,
|
||||||
|
DEPARTMENT_ID: this.DEPARTMENT_ID
|
||||||
|
}
|
||||||
|
).then((data) => {
|
||||||
|
this.listLoading = false
|
||||||
|
this.varList = data.userList
|
||||||
|
this.total = data.page.totalResult
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTreeList() {
|
||||||
|
this.treeLoading = true
|
||||||
|
requestFN(
|
||||||
|
'/department/listTree',
|
||||||
|
{}
|
||||||
|
).then((data) => {
|
||||||
|
this.treeLoading = false
|
||||||
|
this.treeData = JSON.parse(data.zTreeNodes)
|
||||||
|
}).catch((e) => {
|
||||||
|
this.treeLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass" scoped>
|
||||||
|
.table-ui
|
||||||
|
td
|
||||||
|
line-height: 34px
|
||||||
|
.tbg
|
||||||
|
width: 200px
|
||||||
|
.ui-foot
|
||||||
|
text-align: center
|
||||||
|
margin-top: 20px
|
||||||
|
</style>
|
Loading…
Reference in New Issue