协调员组件选择
This commit is contained in:
parent
7516417f52
commit
e216c800f9
|
@ -79,13 +79,7 @@
|
|||
<el-table-column label="姓名" prop="name"></el-table-column>
|
||||
|
||||
<el-table-column label="手机号" prop="phone"></el-table-column>
|
||||
<el-table-column label="部门" prop="belong_dept">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.belong_dept_">{{
|
||||
scope.row.belong_dept_.name
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门" prop="belong_dept_name"></el-table-column>
|
||||
<el-table-column label="账号类型" prop="type">
|
||||
<template #default="scope">
|
||||
<span>{{userTypeOptions[scope.row.type]}}</span>
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="作业区域" prop="area">
|
||||
<el-select v-model="form.area" placeholder="选择作业区域">
|
||||
<el-select v-model="form.area" placeholder="选择作业区域" @change="areaChange" clearable>
|
||||
<el-option
|
||||
v-for="item in areaoptions"
|
||||
:key="item.id"
|
||||
|
@ -75,7 +75,6 @@
|
|||
<el-form-item label="业务部门" prop="dept_bus">
|
||||
<el-cascader
|
||||
placeholder="选择业务部门"
|
||||
@change="dept1Change"
|
||||
getCheckedNodes="true"
|
||||
:props="{
|
||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||
|
@ -93,17 +92,12 @@
|
|||
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="部门协调员" prop="coordinator">
|
||||
<el-select
|
||||
v-model="form.coordinator"
|
||||
placeholder="选择业务部门协调员"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in coordinatoroptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="form.coordinator_name"
|
||||
disabled
|
||||
style="width:200px"
|
||||
></el-input>
|
||||
<ehsUserSelect :multiple="false" @submit="getUser"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
|
@ -213,19 +207,27 @@ export default {
|
|||
this.areaoptions = res;
|
||||
});
|
||||
},
|
||||
dept1Change(val) {
|
||||
// 业务部门变化
|
||||
this.$API.system.user.list.req({ page: 0, belong_dept: val }).then((res) => {
|
||||
|
||||
this.coordinatoroptions = res;
|
||||
});
|
||||
areaChange(val) {
|
||||
this.form.area = val
|
||||
this.getVchannels()
|
||||
},
|
||||
// dept1Change(val) {
|
||||
// // 业务部门变化
|
||||
// this.$API.system.user.list.req({ page: 0, belong_dept: val }).then((res) => {
|
||||
|
||||
// this.coordinatoroptions = res;
|
||||
// });
|
||||
// },
|
||||
getVchannels(){
|
||||
this.$API.third.tdevice.list.req({ type: 60, page: 0 }).then((res) => {
|
||||
this.$API.third.tdevice.list.req({ type: 60, page: 0, area: this.form.area }).then((res) => {
|
||||
this.vchannelOptions = res;
|
||||
});
|
||||
},
|
||||
|
||||
getUser(data) {
|
||||
// 子组件调用父组件的方法并传参
|
||||
this.form.coordinator=data.id;
|
||||
this.form.coordinator_name=data.name
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
|
|
Loading…
Reference in New Issue