|
@@ -311,6 +311,7 @@
|
|
|
v-model="form.year"
|
|
|
type="year"
|
|
|
value-format="yyyy"
|
|
|
+ @change="handleStaff"
|
|
|
:placeholder="$t('请选择') + $t('年份')">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -343,7 +344,7 @@
|
|
|
<el-form-item :label="$t('指定人员')" prop="designatedStaff" v-if="haveDesignated === true && designatedPositions.length > 0">
|
|
|
<el-select v-model="designatedStaffs" filterable multiple :placeholder="$t('请选择') + $t('指定人员')">
|
|
|
<el-option
|
|
|
- v-for="dict in stffmgrOptions"
|
|
|
+ v-for="dict in designatedStaffsOptions"
|
|
|
:key="dict.staffid"
|
|
|
:label="dict.name"
|
|
|
:value="dict.staffid">
|
|
@@ -519,7 +520,7 @@
|
|
|
import { listTraining, getTraining, delTraining, addTraining, updateTraining, exportTraining } from "@/api/training/training";
|
|
|
import nonAdd from './trainingNon'
|
|
|
import newAdd from './trainingNew'
|
|
|
-import {listStaffmgrAll, listStaffmgr } from "@/api/plant/staffmgr";
|
|
|
+import {listStaffmgrAll,listAllStaffmgr, listStaffmgr } from "@/api/plant/staffmgr";
|
|
|
import { treeselect } from "@/api/system/dept";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
@@ -582,6 +583,8 @@ export default {
|
|
|
stffmgrOptions: undefined,
|
|
|
//人员表联查-包含离职
|
|
|
stffmgrAllOptions: undefined,
|
|
|
+ //指定人员选项
|
|
|
+ designatedStaffsOptions: [],
|
|
|
// 用户导入参数
|
|
|
upload: {
|
|
|
downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
|
|
@@ -861,11 +864,16 @@ export default {
|
|
|
return this.selectDictLabel(this.isfinishOptions, row.isfinish);
|
|
|
},
|
|
|
//获取人员表
|
|
|
- getStaffmar() {
|
|
|
- listStaffmgr(this.staffmgrQueryParams).then(response => {
|
|
|
+ getStaffmar(year) {
|
|
|
+ this.staffmgrQueryParams.leftYear = year
|
|
|
+ listAllStaffmgr(this.staffmgrQueryParams).then(response => {
|
|
|
this.stffmgrOptions = response.rows;
|
|
|
});
|
|
|
},
|
|
|
+ //年份选择change事件
|
|
|
+ handleStaff(val){
|
|
|
+ this.getStaffmar(val)
|
|
|
+ },
|
|
|
//获取人员表--包含离职
|
|
|
getStaffmarAll() {
|
|
|
listStaffmgrAll(this.staffmgrQueryParams).then(response => {
|
|
@@ -975,7 +983,7 @@ export default {
|
|
|
})
|
|
|
this.staffmgrQueryParams.actualposts = designatedId;
|
|
|
listStaffmgr(this.staffmgrQueryParams).then(response => {
|
|
|
- this.stffmgrOptions = response.rows;
|
|
|
+ this.designatedStaffsOptions = response.rows;
|
|
|
});
|
|
|
|
|
|
let _this = this
|
|
@@ -1015,6 +1023,7 @@ export default {
|
|
|
});
|
|
|
this.form.trainingType = this.queryParams.trainingType
|
|
|
this.title = this.$t('新增') + this.$t('空格') + this.$t('培训计划');
|
|
|
+ this.getStaffmar()
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -1024,6 +1033,7 @@ export default {
|
|
|
const id = row.id || this.ids
|
|
|
getTraining(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
+ this.getStaffmar(response.data.year)
|
|
|
if (this.form.position != null) {
|
|
|
this.form.position = this.form.position.split(',');
|
|
|
this.getDicts("ACTUALPOST").then(response => {
|
|
@@ -1065,8 +1075,8 @@ export default {
|
|
|
})
|
|
|
this.staffmgrQueryParams.actualposts = designatedId;
|
|
|
this.$nextTick(() => {
|
|
|
- listStaffmgr(this.staffmgrQueryParams).then(response => {
|
|
|
- this.stffmgrOptions = response.rows;
|
|
|
+ listAllStaffmgr(this.staffmgrQueryParams).then(response => {
|
|
|
+ this.designatedStaffsOptions = response.rows;
|
|
|
});
|
|
|
})
|
|
|
}else {
|