|
|
@@ -112,7 +112,7 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange" :height="clientHeight" border>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="培训员工编号" align="center" prop="staffId" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="培训员工" align="center" prop="staffName" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="培训内容" align="center" prop="plantName" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="开始日期" align="center" prop="startDate" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
@@ -127,7 +127,7 @@
|
|
|
<el-table-column label="学时" align="center" prop="classHour" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="具体内容" align="center" prop="classContent" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="学习状态" align="center" prop="studyState" :formatter="studyStateFormat" />
|
|
|
- <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
@@ -158,16 +158,17 @@
|
|
|
<!-- 添加或修改培训计划对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <!-- <el-form-item label="培训员工" prop="staffId">
|
|
|
- <el-select v-model="form.successorOptions" placeholder="请选择学员">
|
|
|
+ <!-- 添加对话框显示下拉列表 -->
|
|
|
+ <el-form-item label="培训员工" prop="staffId">
|
|
|
+ <el-select v-model="form.staffId" placeholder="请选择学员">
|
|
|
<el-option
|
|
|
v-for="successor in successorOptions"
|
|
|
- :key="successor.value"
|
|
|
- :label="successor.label"
|
|
|
- :value="successor.value"
|
|
|
+ :key="successor.key"
|
|
|
+ :label="successor.value"
|
|
|
+ :value="successor.key"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="培训内容" prop="plantName">
|
|
|
<el-input v-model="form.plantName" placeholder="请输入培训内容" />
|
|
|
</el-form-item>
|
|
|
@@ -194,9 +195,15 @@
|
|
|
<el-input v-model="form.classHour" placeholder="请输入学时" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="具体内容">
|
|
|
- <editor v-model="form.classContent" :min-height="192"/>
|
|
|
+ <!-- <editor v-model="form.classContent" :min-height="192"/> -->
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :rows="6"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="form.classContent">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="学习状态" prop="studyState">
|
|
|
+ <el-form-item label="学习状态" prop="studyState" v-if="this.operation=='modify'">
|
|
|
<el-select v-model="form.studyState" placeholder="请选择学习状态">
|
|
|
<el-option
|
|
|
v-for="dict in studyStateOptions"
|
|
|
@@ -281,6 +288,8 @@ export default {
|
|
|
planList: [],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
+ // 操作
|
|
|
+ operation: "",
|
|
|
// 部门树选项
|
|
|
deptOptions: undefined,
|
|
|
clientHeight:300,
|
|
|
@@ -350,10 +359,12 @@ export default {
|
|
|
getSuccessorOptions() {
|
|
|
getSuccessorListByMentorId(this.queryObject).then(response => {
|
|
|
let successorList = response.data;
|
|
|
- for (successor in successorList) {
|
|
|
- console.log(successor);
|
|
|
+ for (let i = 0; i < successorList.length; i++) {
|
|
|
+ let successor = {};
|
|
|
+ successor.key = successorList[i].staffId;
|
|
|
+ successor.value = successorList[i].staffName;
|
|
|
+ this.successorOptions.push(successor);
|
|
|
}
|
|
|
- // this.successorOptions = response.data;
|
|
|
});
|
|
|
},
|
|
|
/** 查询培训计划列表 */
|
|
|
@@ -422,6 +433,7 @@ export default {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
this.title = "添加培训计划";
|
|
|
+ this.operation = "add";
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
@@ -431,6 +443,7 @@ export default {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改培训计划";
|
|
|
+ this.operation = "modify";
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|