|
@@ -0,0 +1,500 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-tabs type="border-card">
|
|
|
+ <el-tab-pane label="月度反馈">
|
|
|
+ <!-- 搜索栏 -->
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <!-- <el-form-item label="反馈类型" prop="feedbackType">
|
|
|
+ <el-select v-model="queryParams.feedbackType" placeholder="请选择反馈类型" clearable size="small">
|
|
|
+ <el-option label="请选择字典生成" value="" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="导师ID" prop="mentorId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.mentorId"
|
|
|
+ placeholder="请输入导师ID"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="学员ID" prop="successorId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.successorId"
|
|
|
+ placeholder="请输入学员ID"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="受邀导师父级主键ID" prop="parentId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.parentId"
|
|
|
+ placeholder="请输入受邀导师父级主键ID"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="培训计划ID" prop="planId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.planId"
|
|
|
+ placeholder="请输入培训计划ID"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="年" prop="feedbackYear">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.feedbackYear"
|
|
|
+ placeholder="请输入年"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="季度" prop="feedbackSeason">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.feedbackSeason"
|
|
|
+ placeholder="请输入季度"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="月" prop="feedbackMonth">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.feedbackMonth"
|
|
|
+ placeholder="请输入月"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="学员反馈" prop="successorFeedback">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.successorFeedback"
|
|
|
+ placeholder="请输入学员反馈"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="导师反馈" prop="mentorFeedback">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.mentorFeedback"
|
|
|
+ placeholder="请输入导师反馈"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="导师评分" prop="feedbackScore">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.feedbackScore"
|
|
|
+ placeholder="请输入导师评分"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="反馈状态" prop="feedbackStatus">
|
|
|
+ <el-select v-model="queryParams.feedbackStatus" placeholder="请选择反馈状态" clearable size="small">
|
|
|
+ <el-option label="请选择字典生成" value="" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="面试会议日期" prop="meetingDate">
|
|
|
+ <el-date-picker clearable size="small" style="width: 200px"
|
|
|
+ v-model="queryParams.meetingDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择面试会议日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="refresh()">刷新</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <el-table
|
|
|
+ :span-method="spanMethod"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="feedbackList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ :height="clientHeight"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column label="时间" align="center" :show-overflow-tooltip="true" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.feedbackYear}}年{{scope.row.feedbackMonth}}月</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column label="年份" align="center" :show-overflow-tooltip="true" width="120" prop="feedbackYear"/>
|
|
|
+ <el-table-column label="月份" align="center" :show-overflow-tooltip="true" width="120" prop="feedbackMonth"/> -->
|
|
|
+ <el-table-column label="培训内容" align="center" :show-overflow-tooltip="true" prop="plantName"/>
|
|
|
+ <el-table-column label="开始日期" align="center" :show-overflow-tooltip="true" width="120" prop="startDate"/>
|
|
|
+ <el-table-column label="结束日期" align="center" :show-overflow-tooltip="true" width="120" prop="endDate"/>
|
|
|
+ <el-table-column label="实际完成日期" align="center" :show-overflow-tooltip="true" width="120" prop="dateOfCompletion"/>
|
|
|
+ <el-table-column label="学习状态" align="center" :show-overflow-tooltip="true" width="120" prop="studyStatus"/>
|
|
|
+ <el-table-column label="学员反馈" align="center" prop="successorFeedback" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="导师反馈" align="center" prop="mentorFeedback" :show-overflow-tooltip="true"/>
|
|
|
+ <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)"
|
|
|
+ v-hasPermi="['spec:feedback:edit']"
|
|
|
+ v-if="scope.row.successorFeedback==null"
|
|
|
+ >反馈</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['spec:feedback:edit']"
|
|
|
+ v-if="scope.row.feedbackStatus==0"
|
|
|
+ >修改</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleSubmit(scope.row)"
|
|
|
+ v-hasPermi="['spec:feedback:edit']"
|
|
|
+ v-if="scope.row.successorFeedback!=null && scope.row.feedbackStatus!=1"
|
|
|
+ >提交</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="500px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules">
|
|
|
+ <el-form-item prop="successorFeedback">
|
|
|
+ <el-input type="textarea" rows="6" v-model="form.successorFeedback" 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>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="季度反馈"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { listSuccessorMonthlyFeedback, getFeedback, delFeedback, addFeedback, updateFeedback, exportFeedback, importTemplate} from "@/api/training/spec/feedback";
|
|
|
+import { treeselect } from "@/api/system/dept";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "Feedback",
|
|
|
+ components: { Treeselect },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ activeName: 'first',
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 专项培训反馈表格数据
|
|
|
+ feedbackList: [],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 部门树选项
|
|
|
+ deptOptions: undefined,
|
|
|
+ clientHeight:300,
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 用户导入参数
|
|
|
+ upload: {
|
|
|
+ // 是否显示弹出层(用户导入)
|
|
|
+ open: false,
|
|
|
+ // 弹出层标题(用户导入)
|
|
|
+ title: "",
|
|
|
+ // 是否禁用上传
|
|
|
+ isUploading: false,
|
|
|
+ // 是否更新已经存在的用户数据
|
|
|
+ updateSupport: 0,
|
|
|
+ // 设置上传的请求头部
|
|
|
+ headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ // 上传的地址
|
|
|
+ url: process.env.VUE_APP_BASE_API + "/spec/feedback/importData"
|
|
|
+ },
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ feedbackType: null,
|
|
|
+ mentorId: null,
|
|
|
+ successorId: null,
|
|
|
+ parentId: null,
|
|
|
+ planId: null,
|
|
|
+ feedbackYear: null,
|
|
|
+ feedbackSeason: null,
|
|
|
+ feedbackMonth: null,
|
|
|
+ successorFeedback: null,
|
|
|
+ mentorFeedback: null,
|
|
|
+ feedbackScore: null,
|
|
|
+ feedbackStatus: null,
|
|
|
+ meetingDate: null
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ // 根据名称筛选部门树
|
|
|
+ deptName(val) {
|
|
|
+ this.$refs.tree.filter(val);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ //设置表格高度对应屏幕高度
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.clientHeight = document.body.clientHeight -250
|
|
|
+ })
|
|
|
+ this.getList();
|
|
|
+ this.getTreeselect();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 合并单元格
|
|
|
+ spanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (columnIndex === 0 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8) {
|
|
|
+ if (rowIndex === 0) {
|
|
|
+ return {
|
|
|
+ rowspan: 3,
|
|
|
+ colspan: 1
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ rowspan: 0,
|
|
|
+ colspan: 0
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ // if (rowIndex % 2 === 0) {
|
|
|
+ // return {
|
|
|
+ // rowspan: 2,
|
|
|
+ // colspan: 1
|
|
|
+ // };
|
|
|
+ // } else {
|
|
|
+ // return {
|
|
|
+ // rowspan: 1,
|
|
|
+ // colspan: 1
|
|
|
+ // };
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 刷新
|
|
|
+ refresh() {
|
|
|
+ // 保留检索条件
|
|
|
+ this.getList(this.form);
|
|
|
+ },
|
|
|
+ handleClick(tab, event) {
|
|
|
+ console.log(tab, event);
|
|
|
+ },
|
|
|
+ /** 查询专项培训反馈列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ listSuccessorMonthlyFeedback(this.queryParams).then(response => {
|
|
|
+ let dataList = [];
|
|
|
+ let responseRows = response.rows;
|
|
|
+ for (let i = 0; i < responseRows.length; i++) {
|
|
|
+ let planList = responseRows[i].planList;
|
|
|
+ for (let j = 0; j < planList.length; j++) {
|
|
|
+ let data = {...planList[j]};
|
|
|
+ data.id = responseRows[i].id;
|
|
|
+ data.feedbackYear = responseRows[i].feedbackYear;
|
|
|
+ data.feedbackMonth = responseRows[i].feedbackMonth;
|
|
|
+ data.mentorFeedback = responseRows[i].mentorFeedback;
|
|
|
+ data.successorFeedback = responseRows[i].successorFeedback;
|
|
|
+ dataList.push(data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.feedbackList = dataList;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
+ getTreeselect() {
|
|
|
+ treeselect().then(response => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ id: null,
|
|
|
+ feedbackType: null,
|
|
|
+ mentorId: null,
|
|
|
+ successorId: null,
|
|
|
+ parentId: null,
|
|
|
+ planId: null,
|
|
|
+ feedbackYear: null,
|
|
|
+ feedbackSeason: null,
|
|
|
+ feedbackMonth: null,
|
|
|
+ successorFeedback: null,
|
|
|
+ mentorFeedback: null,
|
|
|
+ feedbackScore: null,
|
|
|
+ feedbackStatus: 0,
|
|
|
+ meetingDate: null
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map(item => item.id)
|
|
|
+ this.single = selection.length!==1
|
|
|
+ this.multiple = !selection.length
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加专项培训反馈";
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getFeedback(id).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "学员反馈(" + row.feedbackYear + "年" + row.feedbackMonth + "月)";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交操作 */
|
|
|
+ handleSubmit(row) {
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getFeedback(id).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.form.feedbackStatus = 1;
|
|
|
+ updateFeedback(this.form).then(response => {
|
|
|
+ this.msgSuccess("提交成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.form.id != null) {
|
|
|
+ updateFeedback(this.form).then(response => {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ addFeedback(this.form).then(response => {
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ this.$confirm('是否确认删除?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return delFeedback(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ const queryParams = this.queryParams;
|
|
|
+ this.$confirm('是否确认导出所有专项培训反馈数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return exportFeedback(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 导入按钮操作 */
|
|
|
+ handleImport() {
|
|
|
+ this.upload.title = "用户导入";
|
|
|
+ this.upload.open = true;
|
|
|
+ },
|
|
|
+ /** 下载模板操作 */
|
|
|
+ importTemplate() {
|
|
|
+ importTemplate().then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 文件上传中处理
|
|
|
+ handleFileUploadProgress(event, file, fileList) {
|
|
|
+ this.upload.isUploading = true;
|
|
|
+ },
|
|
|
+ // 文件上传成功处理
|
|
|
+ handleFileSuccess(response, file, fileList) {
|
|
|
+ this.upload.open = false;
|
|
|
+ this.upload.isUploading = false;
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
+ this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ // 提交上传文件
|
|
|
+ submitFileForm() {
|
|
|
+ this.$refs.upload.submit();
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|