|
@@ -28,8 +28,8 @@
|
|
<el-form-item v-if="this.user.type != '3'" label="家庭住址">
|
|
<el-form-item v-if="this.user.type != '3'" label="家庭住址">
|
|
<el-input v-model="form.address"></el-input>
|
|
<el-input v-model="form.address"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item v-if="this.user.type === '0' || this.user.type === '1'" label="部门" @change="selectChild">
|
|
|
|
- <el-select v-model="form.dept_id" filterable placeholder="请选择部门">
|
|
|
|
|
|
+ <el-form-item v-if="this.user.type === '0' || this.user.type === '1'" label="部门">
|
|
|
|
+ <el-select v-model="form.dept_id" filterable placeholder="请选择部门" @change="selectChild">
|
|
<el-option v-for="(item, index) in deptList" :key="index" :label="item.name" :value="item._id"></el-option>
|
|
<el-option v-for="(item, index) in deptList" :key="index" :label="item.name" :value="item._id"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -139,6 +139,7 @@ export default {
|
|
...login({ logout: 'logout' }),
|
|
...login({ logout: 'logout' }),
|
|
async search() {
|
|
async search() {
|
|
this.searchInfo();
|
|
this.searchInfo();
|
|
|
|
+ this.selectChild();
|
|
if (this.user.type === '3') {
|
|
if (this.user.type === '3') {
|
|
const user = await this.fetch(this.user.uid);
|
|
const user = await this.fetch(this.user.uid);
|
|
this.$set(this, `form`, user.data);
|
|
this.$set(this, `form`, user.data);
|
|
@@ -159,7 +160,8 @@ export default {
|
|
},
|
|
},
|
|
// 职务
|
|
// 职务
|
|
async selectChild(dept_id) {
|
|
async selectChild(dept_id) {
|
|
- let res = await this.levelQuery(dept_id);
|
|
|
|
|
|
+ console.log(dept_id);
|
|
|
|
+ let res = await this.levelQuery({ dept_id });
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$set(this, `levelList`, res.data);
|
|
this.$set(this, `levelList`, res.data);
|
|
}
|
|
}
|