|
@@ -42,30 +42,33 @@
|
|
|
<el-input v-model="form.idcard" placeholder="输入身份证号" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col class="mb-30" :span="12">
|
|
|
+ <!-- <el-col class="mb-30" :span="12">
|
|
|
<el-form-item label="部门:">
|
|
|
<el-input v-model="form.depname" readonly placeholder="请选择" suffix-icon="el-icon-arrow-down" @focus="showTree = true" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<el-col class="mb-30" :span="12">
|
|
|
<el-form-item label="办公电话:">
|
|
|
<el-input v-model="form.officetelephone" placeholder="输入办公电话" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" v-if="showTree">
|
|
|
+ <el-col :span="24" v-if="dialogFormVisible">
|
|
|
<el-form-item label="选择部门:">
|
|
|
<div style="border:1px solid #f1f2f3">
|
|
|
<el-tree
|
|
|
+ ref="tree"
|
|
|
:data="deplist"
|
|
|
- node-key="id"
|
|
|
+ node-key="departmentid"
|
|
|
default-expand-all
|
|
|
highlight-current
|
|
|
- :expand-on-click-node="false">
|
|
|
+ :current-node-key="form.departmentid"
|
|
|
+ :expand-on-click-node="false"
|
|
|
+ @node-click="selectDep">
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
<span>{{ node.label }}</span>
|
|
|
- <span>
|
|
|
+ <!-- <span>
|
|
|
<el-button size="small" type="text" @click="selectDep(data)">选 择</el-button>
|
|
|
- </span>
|
|
|
+ </span> -->
|
|
|
</span>
|
|
|
</el-tree>
|
|
|
</div>
|
|
@@ -147,7 +150,7 @@ export default {
|
|
|
"email":"",
|
|
|
"birthday":"",
|
|
|
"remarks":"",
|
|
|
- "departmentid":"",
|
|
|
+ "departmentid":'',
|
|
|
"isleader":"",
|
|
|
"position":"",
|
|
|
"reporthrid":"",
|
|
@@ -169,7 +172,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.form = Object.assign({},this.form, res.data)
|
|
|
- console.log(this.form);
|
|
|
+ // this.$refs.tree.setCurrentKey(this.form.departmentid)
|
|
|
+ console.log(this.form.departmentid);
|
|
|
},
|
|
|
async department () {
|
|
|
const res = await this.$api.requested({
|
|
@@ -216,6 +220,7 @@ export default {
|
|
|
return arr
|
|
|
},
|
|
|
onShow () {
|
|
|
+ this.form.departmentid = this.data.departmentid
|
|
|
this.query_hrMain()
|
|
|
this.department()
|
|
|
this.$store.dispatch('optiontypeselect','sex')
|