|
@@ -56,7 +56,8 @@
|
|
|
<div class="periodFrom">
|
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" :validate-on-rule-change="false">
|
|
|
<el-form-item label="一级部门" prop="department">
|
|
|
- <el-select v-model="ruleForm.department" placeholder="请选择所属部门" filterable @change="changedepart2Data">
|
|
|
+ <el-select v-model="ruleForm.department" placeholder="请选择所属部门" :disabled="isSave"
|
|
|
+ filterable @change="changedepart2Data">
|
|
|
<el-option
|
|
|
v-for="item in departData"
|
|
|
:key="item.id"
|
|
@@ -66,7 +67,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="二级部门">
|
|
|
- <el-select v-model="ruleForm.depart2ment" placeholder="请选择所属部门" >
|
|
|
+ <el-select v-model="ruleForm.depart2ment" placeholder="请选择所属部门" :disabled="isSave" >
|
|
|
<el-option
|
|
|
v-for="item in depart2Data"
|
|
|
:key="item.id"
|
|
@@ -116,7 +117,8 @@ import seachs from '../seachGroup.vue'
|
|
|
import addW from '../../assets/btnIcon/addW.png'
|
|
|
import addIcon from '../../assets/btnIcon/add.png'
|
|
|
import {apiGetEvaluationDeptList, apiGetevaluationdeptSave, apiGetevaluationdeptremoveAll, apiGetorganizationstructureFromTree,
|
|
|
-apiGetDepartmentallocationLeader} from '../../api/api'
|
|
|
+apiGetDepartmentallocationLeader,
|
|
|
+apievaluationdeptallocationgetDept,apievaluationdeptallocationgetDept2, apievaluationdeptallocationgetUser} from '../../api/api'
|
|
|
export default {
|
|
|
components: { importDailog, btns, seachs },
|
|
|
data() {
|
|
@@ -208,6 +210,12 @@ export default {
|
|
|
that.departData = datas.data[0].children
|
|
|
}
|
|
|
})
|
|
|
+ // 测试数据
|
|
|
+ // apievaluationdeptallocationgetDept().then(datas =>{
|
|
|
+ // if (datas && datas.data) {
|
|
|
+ // that.departData = datas.data
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
// 二级部门
|
|
|
changedepart2Data(val) {
|
|
@@ -220,9 +228,28 @@ export default {
|
|
|
apiGetorganizationstructureFromTree(params).then(datas =>{
|
|
|
if (datas && datas.data) {
|
|
|
that.depart2Data = datas.data[0].children
|
|
|
+ if (that.isSave) {
|
|
|
+ that.ruleForm.depart2ment = ''
|
|
|
+ if (that.evalradio.parentId !== '') {
|
|
|
+ that.ruleForm.depart2ment = that.evalradio.deptId
|
|
|
+ }
|
|
|
+ }
|
|
|
that.getuserPageList(val)
|
|
|
}
|
|
|
})
|
|
|
+ // 测试数据
|
|
|
+ // apievaluationdeptallocationgetDept2(val).then(datas =>{
|
|
|
+ // if (datas && datas.data) {
|
|
|
+ // that.depart2Data = datas.data
|
|
|
+ // if (that.isSave) {
|
|
|
+ // that.ruleForm.depart2ment = ''
|
|
|
+ // if (that.evalradio.parentId !== '') {
|
|
|
+ // that.ruleForm.depart2ment = that.evalradio.deptId
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // that.getuserPageList(val)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
// 查询人员
|
|
|
getuserPageList(val) {
|
|
@@ -232,6 +259,12 @@ export default {
|
|
|
that.deptLeaderOption = datas.data
|
|
|
}
|
|
|
})
|
|
|
+ // 测试数据
|
|
|
+ // apievaluationdeptallocationgetUser().then(datas =>{
|
|
|
+ // if (datas && datas.data) {
|
|
|
+ // that.deptLeaderOption = datas.data
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
handleAdd() {
|
|
|
this.dialogVisible = true
|
|
@@ -265,12 +298,13 @@ export default {
|
|
|
}
|
|
|
if (this.evalradio.parentId !== '') {
|
|
|
this.ruleForm.department = this.evalradio.parentId
|
|
|
- this.ruleForm.depart2ment = this.evalradio.deptId
|
|
|
this.changedepart2Data(this.evalradio.parentId)
|
|
|
+ // this.getuserPageList(this.evalradio.parentId)
|
|
|
} else {
|
|
|
this.ruleForm.department = this.evalradio.deptId
|
|
|
+ this.changedepart2Data(this.evalradio.deptId)
|
|
|
+ // this.getuserPageList(this.evalradio.deptId)
|
|
|
}
|
|
|
- this.getuserPageList(this.evalradio.deptId)
|
|
|
},
|
|
|
saveevaluationDepartmentMsg(formName) {
|
|
|
let that = this
|