fix
This commit is contained in:
parent
c85e45aa38
commit
90619d320a
@ -3,10 +3,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="staff-archives-title"></div>
|
<div class="staff-archives-title"></div>
|
||||||
<el-form :inline="true" :model="formInline" class="demo-form-inline staff-archives-form">
|
<el-form :inline="true" :model="formInline" class="demo-form-inline staff-archives-form">
|
||||||
<el-form-item label="选择部门">
|
<el-form-item label="选择部门" >
|
||||||
<el-input
|
<el-input
|
||||||
placeholder="请选择部门"
|
placeholder="请选择部门"
|
||||||
@focus="isChoose=true"
|
@focus="handleShowDep"
|
||||||
readonly
|
readonly
|
||||||
:value="formInline.departmentName"
|
:value="formInline.departmentName"
|
||||||
></el-input>
|
></el-input>
|
||||||
@ -19,6 +19,7 @@
|
|||||||
v-model="selectMonthTime"
|
v-model="selectMonthTime"
|
||||||
value-format="yyyy-MM"
|
value-format="yyyy-MM"
|
||||||
@change="changeApplyMonth"
|
@change="changeApplyMonth"
|
||||||
|
style="width: 120px"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -80,6 +81,10 @@
|
|||||||
// this.selectMonthTime = this.monthTime
|
// this.selectMonthTime = this.monthTime
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleShowDep () {
|
||||||
|
this.isChoose = true
|
||||||
|
this.initDep = this.formInline.departmentName
|
||||||
|
},
|
||||||
async handleChangeData () {
|
async handleChangeData () {
|
||||||
this.onSubmit()
|
this.onSubmit()
|
||||||
},
|
},
|
||||||
@ -106,6 +111,9 @@
|
|||||||
this.selectMonthTime = ''
|
this.selectMonthTime = ''
|
||||||
},
|
},
|
||||||
onsumbit () {
|
onsumbit () {
|
||||||
|
if (this.isChooseObj.departmentName !== this.initDep) {
|
||||||
|
this.resetPage()
|
||||||
|
}
|
||||||
this.formInline = Object.assign({}, this.formInline, this.isChooseObj)
|
this.formInline = Object.assign({}, this.formInline, this.isChooseObj)
|
||||||
this.isChoose = false
|
this.isChoose = false
|
||||||
},
|
},
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<el-form-item label="选择部门" >
|
<el-form-item label="选择部门" >
|
||||||
<el-input
|
<el-input
|
||||||
placeholder="选择部门"
|
placeholder="选择部门"
|
||||||
@focus="isChoose=true"
|
@focus="handleShowDep"
|
||||||
readonly
|
readonly
|
||||||
:value="formInline.departmentName"
|
:value="formInline.departmentName"
|
||||||
style="width: 120px"
|
style="width: 120px"
|
||||||
@ -67,7 +67,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-dialog title="选择部门" :visible.sync="isChoose" width="30%">
|
<el-dialog title="选择部门" :visible.sync="isChoose" width="30%">
|
||||||
<el-tree :data="menuList" :props="defaultProps" @node-click="handleNodeClick">
|
<el-tree :data="menuList" :props="defaultProps" @node-click="handleNodeClick" >
|
||||||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||||||
<span>{{ data.departmentName }}</span>
|
<span>{{ data.departmentName }}</span>
|
||||||
<span>({{ data.memberCount }})人</span>
|
<span>({{ data.memberCount }})人</span>
|
||||||
@ -155,6 +155,10 @@
|
|||||||
beforeUpdate () {
|
beforeUpdate () {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleShowDep () {
|
||||||
|
this.isChoose = true
|
||||||
|
this.initDep = this.formInline.departmentName
|
||||||
|
},
|
||||||
async handleChangeData () {
|
async handleChangeData () {
|
||||||
this.onSubmit()
|
this.onSubmit()
|
||||||
},
|
},
|
||||||
@ -187,6 +191,9 @@
|
|||||||
this.level = ''
|
this.level = ''
|
||||||
},
|
},
|
||||||
onsumbit () {
|
onsumbit () {
|
||||||
|
if (this.isChooseObj.departmentName !== this.initDep) {
|
||||||
|
this.resetPage()
|
||||||
|
}
|
||||||
this.formInline = Object.assign({}, this.formInline, this.isChooseObj)
|
this.formInline = Object.assign({}, this.formInline, this.isChooseObj)
|
||||||
this.isChoose = false
|
this.isChoose = false
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user