|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
+ <div class="app-container">
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -7,8 +7,8 @@
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
- v-hasPermi="['bccnew:flplandsdt:add']"
|
|
|
- >新增</el-button>
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -17,8 +17,8 @@
|
|
|
size="mini"
|
|
|
:disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
- v-hasPermi="['bccnew:flplandsdt:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -27,80 +27,446 @@
|
|
|
size="mini"
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
- v-hasPermi="['bccnew:flplandsdt:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
- <el-table v-loading="loading" :data="dsdtList" :height="clientHeight" @selection-change="handleSelectionChange" border>
|
|
|
+ <el-table v-loading="loading" :data="dsdtList" :height="clientHeight" @selection-change="handleSelectionChange"
|
|
|
+ border>
|
|
|
<el-table-column type="selection" width="55" align="center" fixed="left"/>
|
|
|
- <el-table-column label="培训员工编号" align="center" prop="newId" :show-overflow-tooltip="true" fixed="left"/>
|
|
|
- <el-table-column label="课程编号" align="center" prop="courseCode" :show-overflow-tooltip="true" fixed="left"/>
|
|
|
- <el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true" fixed="left"/>
|
|
|
- <el-table-column label="培训内容" align="center" prop="content" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="培训天" align="center" prop="courseDay" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="详细计划" align="center" prop="detailPlan" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="讲师" align="center" prop="trainer" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="培训日期" align="center" prop="courseDate" width="100">
|
|
|
+ <el-table-column label="课程编号" align="center" prop="courseCode" :show-overflow-tooltip="true" fixed="left"
|
|
|
+ width="180"/>
|
|
|
+ <el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true" fixed="left"
|
|
|
+ width="180"/>
|
|
|
+ <el-table-column label="培训内容" align="center" prop="content" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="培训天" align="center" prop="courseDay" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="详细计划" align="center" prop="detailPlan" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="讲师" align="center" prop="trainer" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="培训日期" align="center" prop="courseDate" width=" 180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.courseDate, '{y}-{m}-{d}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="培训状态" align="center" prop="planStatus" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="第一次成绩" align="center" prop="score1" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="第二次成绩" align="center" prop="score2" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="第三次成绩" align="center" prop="score3" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="培训状态" align="center" prop="planStatus" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="第一次成绩" align="center" prop="score1" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="第二次成绩" align="center" prop="score2" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="第三次成绩" align="center" prop="score3" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="180"/>
|
|
|
<el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+
|
|
|
+ <pagination
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- 添加或修改转岗培训对话框 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
|
|
+ <el-form-item label="培训员工编号" prop="newId">
|
|
|
+ <el-input v-model="form.newId" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程编号" prop="courseCode">
|
|
|
+ <el-input v-model="form.courseCode" placeholder="请输入课程编号"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="培训主题" prop="topic">
|
|
|
+ <el-input v-model="form.topic" placeholder="请输入培训主题"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="培训内容">
|
|
|
+ <el-input v-model="form.content" placeholder="请输入培训内容"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="培训天" prop="courseDay">
|
|
|
+ <el-input v-model="form.courseDay" placeholder="请输入培训天"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="培训小时" prop="courseHour">
|
|
|
+ <el-input v-model="form.courseHour" placeholder="请输入培训小时"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="详细计划" prop="detailPlan">
|
|
|
+ <el-input v-model="form.detailPlan" placeholder="请输入详细计划"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="讲师" prop="trainer">
|
|
|
+ <el-input v-model="form.trainer" placeholder="请输入讲师"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="培训日期" prop="courseDate">
|
|
|
+ <el-date-picker clearable size="small" style="width: 200px"
|
|
|
+ v-model="form.courseDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择培训日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="考核情况" prop="assess">
|
|
|
+ <el-input v-model="form.assess" placeholder="请输入考核情况"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remarks">
|
|
|
+ <el-input v-model="form.remarks" placeholder="请输入备注"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="培训状态">
|
|
|
+ <el-select v-model="form.planStatus" placeholder="请选择培训状态">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in planStatusOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="parseInt(dict.dictValue)"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="第一次成绩" prop="score1">
|
|
|
+ <el-input v-model="form.score1" placeholder="请输入第一次成绩"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="第二次成绩" prop="score2">
|
|
|
+ <el-input v-model="form.score2" placeholder="请输入第二次成绩"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="第三次成绩" prop="score3">
|
|
|
+ <el-input v-model="form.score3" placeholder="请输入第三次成绩"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="归属部门" prop="deptId">
|
|
|
+ <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-export default {
|
|
|
- props:{
|
|
|
- newId:{
|
|
|
-
|
|
|
- },
|
|
|
- traniningType:{
|
|
|
+import {
|
|
|
+ addLjplandsdt,
|
|
|
+ delLjplandsdt,
|
|
|
+ getLjplandsdt,
|
|
|
+ listLjplandsdt,
|
|
|
+ updateLjplandsdt
|
|
|
+} from "@/api/training/bccnew/ljplandsdt";
|
|
|
+import {
|
|
|
+ addYsplandsdt,
|
|
|
+ delYsplandsdt,
|
|
|
+ getYsplandsdt,
|
|
|
+ listYsplandsdt,
|
|
|
+ updateYsplandsdt
|
|
|
+} from "@/api/training/bccnew/ysplandsdt";
|
|
|
+import {
|
|
|
+ addFlplandsdt,
|
|
|
+ delFlplandsdt,
|
|
|
+ getFlplandsdt,
|
|
|
+ listFlplandsdt,
|
|
|
+ updateFlplandsdt
|
|
|
+} from "@/api/training/bccnew/flplandsdt";
|
|
|
+import {
|
|
|
+ addFtplandsdt,
|
|
|
+ delFtplandsdt,
|
|
|
+ getFtplandsdt,
|
|
|
+ listFtplandsdt,
|
|
|
+ updateFtplandsdt
|
|
|
+} from "@/api/training/bccnew/ftplandsdt";
|
|
|
+import {treeselect} from "@/api/system/dept";
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
|
- }
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ newId: {},
|
|
|
+ planType: {}
|
|
|
},
|
|
|
+ components: {Treeselect},
|
|
|
data() {
|
|
|
return {
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
// 非单个禁用
|
|
|
single: true,
|
|
|
// 非多个禁用
|
|
|
multiple: true,
|
|
|
// 显示搜索条件
|
|
|
showSearch: false,
|
|
|
- loading:true,
|
|
|
+ loading: true,
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 部门树选项
|
|
|
+ deptOptions: undefined,
|
|
|
+ // 培训状态字典
|
|
|
+ planStatusOptions: [],
|
|
|
clientHeight: 300,
|
|
|
- dsdtList:[],
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ dsdtList: [],
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ newId: this.newId
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ // 根据名称筛选部门树
|
|
|
+ deptName(val) {
|
|
|
+ this.$refs.tree.filter(val);
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
//设置表格高度对应屏幕高度
|
|
|
this.$nextTick(() => {
|
|
|
- this.clientHeight = document.body.clientHeight -250
|
|
|
+ this.clientHeight = document.body.clientHeight - 250
|
|
|
})
|
|
|
-
|
|
|
+ this.getList();
|
|
|
+ this.getTreeselect();
|
|
|
+ this.getDicts("training_newstaff_status").then(response => {
|
|
|
+ this.planStatusOptions = response.data;
|
|
|
+ });
|
|
|
},
|
|
|
- methods:{
|
|
|
- getList(){},
|
|
|
+ methods: {
|
|
|
+ getList() {
|
|
|
+ if (this.planType == 1) {
|
|
|
+ listLjplandsdt(this.queryParams).then(res => {
|
|
|
+ this.dsdtList = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ } else if (this.planType == 2) {
|
|
|
+ listYsplandsdt(this.queryParams).then(res => {
|
|
|
+ this.dsdtList = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ } else if (this.planType == 3) {
|
|
|
+ listFlplandsdt(this.queryParams).then(res => {
|
|
|
+ this.dsdtList = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ } else if (this.planType == 4) {
|
|
|
+ listFtplandsdt(this.queryParams).then(res => {
|
|
|
+ this.dsdtList = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
+ this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
+ getTreeselect() {
|
|
|
+ treeselect().then(response => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ id: null,
|
|
|
+ newId: this.newId,
|
|
|
+ courseCode: null,
|
|
|
+ topic: null,
|
|
|
+ content: null,
|
|
|
+ courseDay: null,
|
|
|
+ courseHour: null,
|
|
|
+ detailPlan: null,
|
|
|
+ trainer: null,
|
|
|
+ courseDate: null,
|
|
|
+ assess: null,
|
|
|
+ delFlag: null,
|
|
|
+ createrCode: null,
|
|
|
+ createdate: null,
|
|
|
+ updaterCode: null,
|
|
|
+ updatedate: null,
|
|
|
+ deptId: null,
|
|
|
+ remarks: null,
|
|
|
+ planStatus: 0,
|
|
|
+ score1: null,
|
|
|
+ score2: null,
|
|
|
+ score3: null
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ }, /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ handleDelete(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ if (this.planType == 1) {
|
|
|
+ this.$confirm('是否确认删除?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return delLjplandsdt(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ } else if (this.planType == 2) {
|
|
|
+ this.$confirm('是否确认删除?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return delYsplandsdt(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ } else if (this.planType == 3) {
|
|
|
+ this.$confirm('是否确认删除?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return delFlplandsdt(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ } else if (this.planType == 4) {
|
|
|
+ this.$confirm('是否确认删除?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return delFtplandsdt(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ if (this.planType == 1) {
|
|
|
+ getLjplandsdt(id).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改课程";
|
|
|
+ });
|
|
|
+ } else if (this.planType == 2) {
|
|
|
+ getYsplandsdt(id).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改课程";
|
|
|
+ });
|
|
|
+ } else if (this.planType == 3) {
|
|
|
+ getFlplandsdt(id).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改课程";
|
|
|
+ });
|
|
|
+ } else if (this.planType == 4) {
|
|
|
+ getFtplandsdt(id).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改课程";
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加课程";
|
|
|
+ }, /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.form.id != null) {
|
|
|
+ if (this.planType == 1) {
|
|
|
+ updateLjplandsdt(this.form).then(response => {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else if (this.planType == 2) {
|
|
|
+ updateYsplandsdt(this.form).then(response => {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else if (this.planType == 3) {
|
|
|
+ updateFlplandsdt(this.form).then(response => {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else if (this.planType == 4) {
|
|
|
+ updateFtplandsdt(this.form).then(response => {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.planType == 1) {
|
|
|
+ addLjplandsdt(this.form).then(response => {
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else if (this.planType == 2) {
|
|
|
+ addYsplandsdt(this.form).then(response => {
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else if (this.planType == 3) {
|
|
|
+ addFlplandsdt(this.form).then(response => {
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else if (this.planType == 4) {
|
|
|
+ addFtplandsdt(this.form).then(response => {
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
|