mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
提交专业力必修
This commit is contained in:
3
.env.boe
3
.env.boe
@@ -1,6 +1,7 @@
|
||||
NODE_ENV=boe
|
||||
VUE_APP_BASE=/manage
|
||||
VUE_APP_BASE_API=
|
||||
VUE_APP_BASE_API=/manageApi
|
||||
VUE_APP_BASE_API_GROWTH=/growth
|
||||
VUE_APP_LOGIN_URL=//u-pre.boe.com/web?returnUrl=
|
||||
|
||||
VUE_APP_BOE_API_URL=//u-pre.boe.com
|
||||
|
||||
87
src/api/configGrowth.js
Normal file
87
src/api/configGrowth.js
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 14:32:52
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-01-04 13:49:54
|
||||
* @FilePath: /fe-manage/src/api/config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import { message } from "ant-design-vue";
|
||||
import axios from "axios";
|
||||
import router from "@/router";
|
||||
import { REFRESH_TOKEN_API } from "@/api/ThirdApi";
|
||||
import { boeRequest } from "@/api/request";
|
||||
// import { getCookie } from '../api/method'
|
||||
// const Qs = require("qs");
|
||||
|
||||
// axios.defaults.headers.post["Content-Type"] =
|
||||
// "application/x-www-form-urlencoded";
|
||||
axios.defaults.withCredentials = true;
|
||||
const http = axios.create({
|
||||
// baseURL: '/growth',
|
||||
baseURL: process.env.VUE_APP_BASE_API_GROWTH,
|
||||
timeout: 1000 * 15,
|
||||
// headers: { "Content-Type": "multipart/form-data" },
|
||||
headers: { "Content-Type": "application/json" },
|
||||
});
|
||||
|
||||
http.interceptors.request.use(
|
||||
(config) => {
|
||||
// console.log("config", config);
|
||||
// const token = localStorage.getItem("token");
|
||||
// // const token = getCookie('token')
|
||||
// // console.log('token', token)
|
||||
// if (token) {
|
||||
// config.headers.token = token; //测试1111
|
||||
// } else {
|
||||
// console.log("当前请求页面无token,请执行操作!!!");
|
||||
|
||||
// // 此处测试默认配置token
|
||||
// config.headers.token =
|
||||
// "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NzAxNTMxMDMsImV4cCI6MTY3MDE2MDMwMywiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.c937b2d3a59cbab2136fdde55fd38f06bdff041212aab0fa6741bc4be41e28a7";
|
||||
// // }
|
||||
return config;
|
||||
},
|
||||
(err) => {
|
||||
console.log("登陆前拦截", err);
|
||||
return Promise.reject(err);
|
||||
}
|
||||
);
|
||||
|
||||
http.interceptors.response.use(
|
||||
(response) => {
|
||||
// console.log('response', response)
|
||||
const {
|
||||
data: { code, msg, show },
|
||||
} = response;
|
||||
if (code === 0 || code === 200) {
|
||||
return response;
|
||||
} else if (code === 1000) {
|
||||
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
||||
// TODO token过期后退出登录 清空当前用户标记 - 为了刷新页面使用
|
||||
localStorage.removeItem('refreshPage')
|
||||
return Promise.reject(response);
|
||||
} else if (code === 1001) {
|
||||
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
||||
return Promise.reject(response);
|
||||
} else {
|
||||
message.error(msg)
|
||||
}
|
||||
// show ? message.error(msg):message.error('系统接口数据异常,请联系管理员');
|
||||
console.log("api %o", msg);
|
||||
return Promise.reject(response);
|
||||
},
|
||||
function (error) {
|
||||
if (error.message == "timeout of 1ms exceeded") {
|
||||
message.destroy();
|
||||
message.error("请求超时");
|
||||
}
|
||||
console.log("api error %o", error);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
export default http;
|
||||
export function setHttpTimeout(newTimeout) {
|
||||
http.defaults.timeout = newTimeout;
|
||||
}
|
||||
@@ -1,38 +1,84 @@
|
||||
import http from "./config";
|
||||
import http from "./configGrowth";
|
||||
import https from './configPublic'
|
||||
const API_URL = "/growth"
|
||||
|
||||
|
||||
//查询专业力必修列表
|
||||
export const listData = (obj) => http.get(API_URL + '/professional/compulsory/list', { params: obj })
|
||||
export const listData = (obj) => http.get('/professional/compulsory/list', { params: obj })
|
||||
//基本信息
|
||||
export const getBasicInfo = (obj) => http.get(API_URL + '/professional/compulsory/details/' + obj.growId)
|
||||
export const getBasicInfo = (obj) => http.get('/professional/compulsory/details/' + obj.growId)
|
||||
//专业力必修发布
|
||||
export const published = (obj) => http.get(API_URL + '/professional/compulsory/publish/' + obj.growId)
|
||||
export const published = (obj) => http.get('/professional/compulsory/publish/' + obj.growId)
|
||||
//专业力必修撤回
|
||||
export const withdrawal = (id) => http.get('/professional/compulsory/withdrawal/' + id)
|
||||
//专业力必修修改
|
||||
export const updatePostInfomation = (obj) => http.post(API_URL + '/professional/compulsory/updatePostInfomation', obj)
|
||||
export const updatePostInfomation = (obj) => http.post('/professional/compulsory/updatePostInformation', obj)
|
||||
//专业力必修分配权限
|
||||
export const assignPermissions = (obj) => http.post('/professional/compulsory/assignPermissions', obj)
|
||||
//专业力必修修改列表
|
||||
export const modifyList = (obj) => http.get('/professional/modify/records/list', { params: obj })
|
||||
//任务概览
|
||||
export const manangementOverview = (obj) => http.get('/professional/managementOverview/taskOverview/' + obj.growId)
|
||||
//学员列表
|
||||
export const allocationList = (obj) => http.get('/professional/allocation/list', { params: obj })
|
||||
|
||||
//学员列表新增学员
|
||||
export const addLearners = (obj) => http.post('/professional/allocation/addLearners', obj)
|
||||
//获取任务列表
|
||||
export const taskOutline = (obj) => http.get(API_URL + '/professional/task/list', { params: obj })
|
||||
export const taskOutline = (obj) => http.get('/professional/task/list', { params: obj })
|
||||
|
||||
//新增任务
|
||||
export const saveTask = (obj) => http.post(API_URL + '/professional/task/saveTask', obj)
|
||||
export const saveTask = (obj) => http.post('/professional/task/saveTask', obj)
|
||||
|
||||
//获取未发布编辑任务列表
|
||||
export const notPublishedTaskList = (obj) => http.get(API_URL + '/professional/task/notPublishedTaskList', { params: obj })
|
||||
export const notPublishedTaskList = (obj) => http.get('/professional/task/notPublishedTaskList', { params: obj })
|
||||
|
||||
//发布学习任务
|
||||
export const publishedTask = (id) => http.get(API_URL + '/professional/task/published/' + id)
|
||||
export const publishedTask = (id) => http.get('/professional/task/published/' + id)
|
||||
//撤回学习任务
|
||||
export const withdrawTask = (id) => http.get(API_URL + '/professional/task/withdrawal/' + id)
|
||||
export const withdrawTask = (id) => http.get('/professional/task/withdrawal/' + id)
|
||||
//批量删除学习任务
|
||||
export const deleteTask = (ids) => http.get(API_URL + '/professional/task/delete/' + ids)
|
||||
export const deleteTask = (ids) => http.get('/professional/task/delete/' + ids)
|
||||
|
||||
//获取岗位
|
||||
export const getStdPosition = (obj) => http.get(API_URL + '/professional/compulsory/getStdPositionList', { params: obj })
|
||||
export const getStdPosition = (obj) => http.get('/professional/compulsory/getStdPositionList', { params: obj })
|
||||
|
||||
//获取职级
|
||||
export const getQualsLevelCode = (obj) => http.get(API_URL + '/professional/compulsory/getQualsLevelCodeList', { params: obj })
|
||||
export const getQualsLevelCode = (obj) => http.get('/professional/compulsory/getQualsLevelCodeList', { params: obj })
|
||||
|
||||
//学员导入模板下载
|
||||
export const downLoadImpTemplate = () => http.post(`/professional/allocation/downloadTemplate.do`)
|
||||
|
||||
//列表排序
|
||||
export const toSortTask = (ids) => http.get(API_URL + `/professional/task/sortTask/` + ids)
|
||||
export const toSortTask = (ids) => http.get(`/professional/task/sortTask/` + ids)
|
||||
|
||||
//删除学员
|
||||
export const batchDelStudents = (ids) => http.get(`/professional/allocation/batchDelStudents/` + ids)
|
||||
|
||||
//获取专业力必修人员
|
||||
export const getGrowthUserList = (obj) => http.get(`/professional/compulsory/getGrowthUserList`, { params: obj })
|
||||
//获取学员详情
|
||||
export const getGrowStudentDetail = (obj) => http.get('/professional/allocation/getStudentMsg', { params: obj })
|
||||
|
||||
// 删除权限
|
||||
export const delAssignPermissions = (obj) => http.post('/professional/compulsory/delAssignPermissions', obj)
|
||||
|
||||
// 设置需解锁的任务
|
||||
export const saveSuperiorTask = (obj) => http.get('/professional/task/saveSuperiorTask', { params: obj })
|
||||
|
||||
// 删除需解锁的任务
|
||||
export const delSuperiorTask = (id) => http.get('/professional/task/delSuperiorTask/' + id)
|
||||
|
||||
// 获取任务管理学员
|
||||
export const getStudentTaskPage = (obj) => http.get('/professional/studentTask/getStudentTaskPage', { params: obj })
|
||||
|
||||
// 导出任务管理学员
|
||||
export const exportStudentTaskPage = (obj) => http.post('/professional/studentTask/export', obj)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//新增、编辑成长路径
|
||||
// export const addEdit = (obj) => http.post('/admin/grow/edit', obj)
|
||||
//编辑获取路径信息
|
||||
@@ -52,6 +98,7 @@ export const getOverview = (obj) => http.get('/admin/grow/overview', { params: o
|
||||
|
||||
//发布、撤回、删除 -- 1发布 0撤回 -2删除
|
||||
export const handleGrowth = (obj) => http.post('/admin/grow/handle', obj)
|
||||
|
||||
//复制路径信息
|
||||
export const getCopyData = (obj) => http.get('/admin/grow/getCopyData', { params: obj })
|
||||
//保存复制的路径信息
|
||||
@@ -65,8 +112,7 @@ export const isRequiredTask = (obj) => http.post(`/admin/grow/isRequiredTask?tas
|
||||
|
||||
//获取学员列表
|
||||
export const getGrowStudent = (obj) => http.get('/admin/student/getGrowStudent', { params: obj })
|
||||
//获取查看详情
|
||||
export const getGrowStudentDetail = (obj) => http.get('/admin/student/getGrowStudentDetail', { params: obj })
|
||||
|
||||
//获取考试管理列表
|
||||
export const queryExamManagementMessage = (obj) => http.post('/admin/exam/manage/queryExamManagementMessageOfGrow', obj)
|
||||
//获取外部考试
|
||||
|
||||
@@ -132,22 +132,18 @@ body {
|
||||
/*定义右下角汇合处的样式*/
|
||||
::-webkit-scrollbar-corner {
|
||||
background: rgba(239, 244, 252, 1);
|
||||
;
|
||||
}
|
||||
|
||||
::-moz-scrollbar-corner {
|
||||
background: rgba(239, 244, 252, 1);
|
||||
;
|
||||
}
|
||||
|
||||
::-o-scrollbar-corner {
|
||||
background: rgba(239, 244, 252, 1);
|
||||
;
|
||||
}
|
||||
|
||||
.scrollbar-corner {
|
||||
background: rgba(239, 244, 252, 1);
|
||||
;
|
||||
}
|
||||
|
||||
//隐藏滚动条----------------------------------------------------------------
|
||||
@@ -183,7 +179,7 @@ textarea {
|
||||
.select .ant-select-selector {
|
||||
height: 40px !important;
|
||||
border-radius: 8px !important;
|
||||
border: 1px solid #C7CBD2 !important;
|
||||
border: 1px solid #c7cbd2 !important;
|
||||
}
|
||||
|
||||
.select .ant-select-selector .ant-select-selection-search-input {
|
||||
@@ -199,19 +195,18 @@ textarea {
|
||||
.select .ant-picker {
|
||||
height: 40px !important;
|
||||
border-radius: 8px !important;
|
||||
border: 1px solid #C7CBD2 !important;
|
||||
border: 1px solid #c7cbd2 !important;
|
||||
}
|
||||
|
||||
// 下拉框----------------------------------------------------------
|
||||
|
||||
|
||||
// 表格---------------------------------
|
||||
.tableBox {
|
||||
.ant-table-row .ant-table-cell {
|
||||
height: 48px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4F5156;
|
||||
color: #4f5156;
|
||||
line-height: 36px;
|
||||
padding: 0px;
|
||||
// overflow: hidden;
|
||||
@@ -262,7 +257,6 @@ textarea {
|
||||
}
|
||||
|
||||
.ant-pagination-options {
|
||||
|
||||
// .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{
|
||||
// font-size: 14px;
|
||||
// font-weight: 400;
|
||||
@@ -298,7 +292,9 @@ textarea {
|
||||
margin-left: 21px;
|
||||
display: inline-block;
|
||||
|
||||
.ant-select:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input {
|
||||
.ant-select:not(.ant-select-customize-input)
|
||||
.ant-select-selector
|
||||
.ant-select-selection-search-input {
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
border: none;
|
||||
}
|
||||
@@ -312,7 +308,10 @@ textarea {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
||||
.ant-select-focused:not(.ant-select-disabled).ant-select:not(
|
||||
.ant-select-customize-input
|
||||
)
|
||||
.ant-select-selector {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
@@ -343,10 +342,8 @@ textarea {
|
||||
|
||||
//表格下拉框-------------------------------------------
|
||||
|
||||
|
||||
//抽屉--------------------------------------------------------
|
||||
.drawerStyle {
|
||||
|
||||
// transform: translateX(0px) !important;
|
||||
.ant-drawer-content-wrapper {
|
||||
max-width: 1050px;
|
||||
@@ -372,7 +369,6 @@ textarea {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
}
|
||||
.drawerMain {
|
||||
.header {
|
||||
@@ -381,6 +377,7 @@ textarea {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
@@ -548,7 +545,7 @@ textarea {
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
|
||||
.ant-table-thead>tr>th {
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1);
|
||||
}
|
||||
|
||||
@@ -556,7 +553,9 @@ textarea {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td {
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
|
||||
@@ -615,7 +614,6 @@ textarea {
|
||||
|
||||
.ant-drawer-body {
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,13 +623,11 @@ textarea {
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//大型抽屉
|
||||
|
||||
|
||||
//弹窗--------------------------------------------------------
|
||||
.modalStyle {
|
||||
height: 100%;
|
||||
@@ -667,9 +663,11 @@ textarea {
|
||||
.modalHeader {
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
background: linear-gradient(0deg,
|
||||
background: linear-gradient(
|
||||
0deg,
|
||||
rgba(78, 166, 255, 0) 0%,
|
||||
rgba(78, 166, 255, 0.2) 100%);
|
||||
rgba(78, 166, 255, 0.2) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.modalMain {
|
||||
@@ -678,23 +676,33 @@ textarea {
|
||||
overflow-y: auto;
|
||||
margin-top: 7px;
|
||||
margin: 0px 52px;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-modal {
|
||||
.modalHeader {
|
||||
background: linear-gradient(180deg, rgba(103, 64, 255, 0.2) 0%, rgba(166, 168, 255, 0) 100%) !important;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(103, 64, 255, 0.2) 0%,
|
||||
rgba(166, 168, 255, 0) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.top {
|
||||
background: linear-gradient(180deg, rgba(103, 64, 255, 0.2) 0%, rgba(166, 168, 255, 0) 100%) !important;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(103, 64, 255, 0.2) 0%,
|
||||
rgba(166, 168, 255, 0) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.del_header {
|
||||
background: linear-gradient(180deg, rgba(103, 64, 255, 0.2) 0%, rgba(166, 168, 255, 0) 100%) !important;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(103, 64, 255, 0.2) 0%,
|
||||
rgba(166, 168, 255, 0) 100%
|
||||
) !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -711,7 +719,7 @@ textarea {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 100
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
//loading--------------------------------------------------------
|
||||
@@ -9,7 +9,7 @@
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">报名记录</div>
|
||||
<div class="headerTitle">导入记录</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="@/assets/images/basicinfo/close.png"
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
<div class="CommonStudent">
|
||||
<a-drawer
|
||||
:visible="visiable"
|
||||
class="drawerStyle ProjCheckship CommonStudent"
|
||||
class="drawerStyle CommonStudent"
|
||||
placement="right"
|
||||
width="60%"
|
||||
>
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || title }}
|
||||
{{ title }}
|
||||
</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
@@ -22,45 +22,6 @@
|
||||
<div class="drawer-content" style="">
|
||||
<div class="tabs" style="min-width: 800px">
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane v-if="infoType" :key="4" tab="项目内学员">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div>
|
||||
<a-form-item label="姓名:">
|
||||
<a-input
|
||||
v-model:value="projectParams.studentName"
|
||||
style="width: 260px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="getProjectStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="resetProjectStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="tableBox tabb">
|
||||
<BaseTable
|
||||
ref="projectStuTableRef"
|
||||
:columns="projectStuColumns"
|
||||
:url="STUDENT_LIST"
|
||||
v-model:params="projectParams"
|
||||
v-model:selectedRows="projectSelectRows"
|
||||
type="checkbox"
|
||||
></BaseTable>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane :key="1" tab="快速选人">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div class="tab1">
|
||||
@@ -140,98 +101,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane v-if="!selectStu" :key="2" tab="添加组织">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div class="tab2">
|
||||
<a-form-item label="组织:">
|
||||
<a-input
|
||||
v-model:value="searchOrgName.keyword"
|
||||
style="width: 230px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入组织"
|
||||
@click="orgValue"
|
||||
/>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="searchOrg"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="resetOrg"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="boeTree">
|
||||
<a-tree
|
||||
v-model:selectedKeys="selectedOrgKeys"
|
||||
:tree-data="searchOrgName.keyword ? orgData : treeOrgData"
|
||||
@select="onOrgSelectChange"
|
||||
:loading="orgOrgLoading"
|
||||
:load-data="onLoadOrgData"
|
||||
:fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
title: 'name',
|
||||
value: 'name',
|
||||
}"
|
||||
row-key="id"
|
||||
:row-selection="orgRowSelection"
|
||||
multiple
|
||||
>
|
||||
</a-tree>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane v-if="!selectStu" :key="3" tab="受众关联">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div>
|
||||
<a-form-item label="受众名称:">
|
||||
<a-input
|
||||
v-model:value="audienceName.keyword"
|
||||
style="width: 260px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入受众名称"
|
||||
/>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="searchAudi"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="resetAudienceInfo"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>
|
||||
重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="tableBox tabb">
|
||||
<BaseTable
|
||||
ref="auditTableRef"
|
||||
:columns="audiColums"
|
||||
:url="AUDIENCE_LIST"
|
||||
page-key="pageNo"
|
||||
v-model:params="audienceName"
|
||||
:request="useTotalPage"
|
||||
v-model:selectedRows="auditSelectRows"
|
||||
v-model:selectedRowKeys="auditSelectRowKeys"
|
||||
type="checkbox"
|
||||
></BaseTable>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
<div class="right1" style="min-width: 200px">
|
||||
@@ -244,37 +113,6 @@
|
||||
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto; padding-bottom: 10px"
|
||||
>
|
||||
<div class="selecteds" v-if="infoType">
|
||||
<div class="person">项目内学员</div>
|
||||
<div v-for="(item, i) in projectSelectRows" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose">
|
||||
{{ item.studentName }}
|
||||
<div class="ch" @click="auditTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="person">
|
||||
<div class="chose">
|
||||
{{ item.studentName }}
|
||||
<div class="ch" @click="auditTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="!member && projectSelectRows?.length > 10"
|
||||
class="ifsw"
|
||||
>
|
||||
<div @click="member = !member" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div
|
||||
v-if="member && projectSelectRows?.length > 10"
|
||||
class="ifsw"
|
||||
>
|
||||
<div @click="member = !member" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="selecteds">
|
||||
<div class="person">快速选人</div>
|
||||
<div v-for="(item, i) in stuSelectRows" :key="i">
|
||||
@@ -300,67 +138,12 @@
|
||||
<div @click="person = !person" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!selectStu" class="selecteds">
|
||||
<div class="dept">添加组织</div>
|
||||
<div v-for="(item, i) in deptList" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose1">
|
||||
<div class="span">{{ item.name }}</div>
|
||||
<div
|
||||
class="ch1"
|
||||
@click="orgDel(i)"
|
||||
style="cursor: pointer"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="dept">
|
||||
<div class="chose1">
|
||||
<div class="span">{{ item.name }}</div>
|
||||
<div class="ch1" @click="orgDel(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!dept && deptList.length > 10" class="ifsw">
|
||||
<div @click="dept = !dept" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div v-if="dept && deptList.length > 10" class="ifsw">
|
||||
<div @click="dept = !dept" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--受众-->
|
||||
<div v-if="!selectStu" class="selecteds">
|
||||
<div class="group">受众关联</div>
|
||||
<div v-for="(item, i) in auditSelectRows" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose2">
|
||||
<div class="span">{{ item.audienceName }}</div>
|
||||
<div class="ch2" @click="auditTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="group">
|
||||
<div class="chose2">
|
||||
<div class="span">{{ item.audienceName }}</div>
|
||||
<div class="ch2" @click="auditTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!group && auditSelectRows.length > 10" class="ifsw">
|
||||
<div @click="group = !group" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div v-if="group && auditSelectRows.length > 10" class="ifsw">
|
||||
<div @click="group = !group" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="submitAuth">确定</button>
|
||||
<button class="btn2" @click="confirm">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
@@ -368,87 +151,18 @@
|
||||
<slot></slot>
|
||||
</a-button>
|
||||
</div>
|
||||
<a-modal
|
||||
:style="{ padding: 0, position: 'relative', right: '-20%' }"
|
||||
:closable="true"
|
||||
:visible="stageVisible"
|
||||
:footer="null"
|
||||
centered="true"
|
||||
@ok="handleStageOk"
|
||||
wrapClassName="changeModal"
|
||||
>
|
||||
<div class="con">
|
||||
<div class="header">
|
||||
<div class="inhe">
|
||||
<div class="tz">{{ type === 1 ? "选择阶段" : "添加学员到关卡" }}</div>
|
||||
<div class="mg" @click="closeChangeModal"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mid">
|
||||
<div class="inher">
|
||||
<div class="select">
|
||||
<a-select
|
||||
style="width: 400px"
|
||||
:placeholder="type === 1 ? '选择阶段' : '选择关卡'"
|
||||
v-model:value="stageId"
|
||||
className="cus-select"
|
||||
>
|
||||
<a-select-option
|
||||
v-for="(item, i) in stageIds"
|
||||
:key="i"
|
||||
:value="item.id"
|
||||
>{{ item.name || "默认" }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
<span style="color: #999999; margin-left: 10px"
|
||||
><minus-circle-outlined />已在其他关卡的学员,不会被添加到该关卡</span
|
||||
>
|
||||
<div class="btn" style="margin-top: 50px">
|
||||
<button
|
||||
class="sameb btn1"
|
||||
@click="closeChangeModal"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
取消
|
||||
</button>
|
||||
<button
|
||||
class="sameb btn2"
|
||||
@click="handleDialogOk"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
确定
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import { message } from "ant-design-vue";
|
||||
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
||||
import {
|
||||
useNewRowsPageNoInit,
|
||||
request,
|
||||
useRequest,
|
||||
useTotalPage,
|
||||
} from "@/api/request";
|
||||
import { saveStu } from "@/api/index1";
|
||||
import { useNewRowsPageNoInit, request, useRequest } from "@/api/request";
|
||||
import { assignPermissions } from "@/api/growthpath";
|
||||
import dialog from "@/utils/dialog";
|
||||
import BaseTable from "@/components/common/BaseTable";
|
||||
import {
|
||||
AUDIENCE_LIST,
|
||||
ORG_CHILD_LIST,
|
||||
ORG_LIST,
|
||||
STUDENT_LIST,
|
||||
USER_LIST_PAGE,
|
||||
} from "@/api/apis";
|
||||
import { ORG_CHILD_LIST, ORG_LIST, USER_LIST_PAGE } from "@/api/apis";
|
||||
|
||||
const emit = defineEmits({});
|
||||
const emit = defineEmits(["confirm"]);
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
infoType: Number,
|
||||
infoId: Number,
|
||||
id: String,
|
||||
title: {
|
||||
@@ -459,10 +173,6 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
selectStu: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
selectOne: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -501,33 +211,13 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
const projectSelectKeys = ref([]);
|
||||
const projectSelectRows = ref([]);
|
||||
const stuSelectRows = ref([]);
|
||||
const auditSelectRows = ref([]);
|
||||
const auditSelectRowKeys = ref([]);
|
||||
const deptList = ref([]);
|
||||
const member = ref(false);
|
||||
const dept = ref(false);
|
||||
const projectStuTableRef = ref();
|
||||
const stuTableRef = ref();
|
||||
const projectParams = ref({
|
||||
pid: props.infoId,
|
||||
type: props.infoType,
|
||||
studentName: "",
|
||||
});
|
||||
|
||||
const getProjectStu = () => projectStuTableRef.value.fetch();
|
||||
const resetProjectStu = () => {
|
||||
projectParams.value.studentName = "";
|
||||
projectStuTableRef.value.reset();
|
||||
};
|
||||
|
||||
const person = ref(false);
|
||||
const group = ref(false);
|
||||
const visiable = ref(false);
|
||||
const activeKey = ref(props.infoType ? 4 : 1);
|
||||
const stageVisible = ref(false);
|
||||
const stageId = ref();
|
||||
const activeKey = ref(1);
|
||||
|
||||
const nameSearch = ref({
|
||||
keyword: "",
|
||||
@@ -535,65 +225,11 @@ const nameSearch = ref({
|
||||
});
|
||||
const stuTreeSelectKeys = ref([]);
|
||||
const stuTreeExpandedKeys = ref([]);
|
||||
const audienceName = ref({
|
||||
keyword: "",
|
||||
});
|
||||
const searchOrgName = ref({
|
||||
keyword: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const stageIds = computed(() => props.stage);
|
||||
|
||||
const { data: orgData, fetchData: searchOrg } = useRequest(
|
||||
ORG_LIST,
|
||||
searchOrgName.value
|
||||
);
|
||||
const { data: treeData, loading: orgLoading } = useRequest(ORG_LIST, {
|
||||
keyword: "",
|
||||
});
|
||||
const { data: treeOrgData, loading: orgOrgLoading } = useRequest(ORG_LIST, {
|
||||
keyword: "",
|
||||
});
|
||||
|
||||
const projectStuColumns = ref([
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "studentName",
|
||||
key: "studentName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "studentOrgName",
|
||||
key: "studentOrgName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "studentDepartName",
|
||||
key: "studentDepartName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
]);
|
||||
const stuColumns = ref([
|
||||
{
|
||||
title: "姓名",
|
||||
@@ -632,47 +268,15 @@ const stuColumns = ref([
|
||||
ellipsis: true,
|
||||
},
|
||||
]);
|
||||
const audiColums = ref([
|
||||
{
|
||||
title: "受众名称",
|
||||
dataIndex: "audienceName",
|
||||
key: "audienceName",
|
||||
width: 30,
|
||||
align: "left",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "人数",
|
||||
dataIndex: "totalMember",
|
||||
key: "totalMember",
|
||||
width: 30,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
]);
|
||||
const orgSelectKeys = ref([]);
|
||||
const auditTableRef = ref();
|
||||
const screenHeight = ref(document.body.clientHeight);
|
||||
|
||||
const orgRowSelection = computed(() => ({
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: orgSelectKeys.value,
|
||||
onChange: onOrgSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
}));
|
||||
|
||||
const closeDrawer = () => {
|
||||
deleteDepSelect();
|
||||
visiable.value = false;
|
||||
nameSearch.value.keyword = "";
|
||||
selectedOrgKeys.value = [];
|
||||
};
|
||||
|
||||
function searchAudi() {
|
||||
auditTableRef.value.reset(audienceName.value);
|
||||
}
|
||||
|
||||
function onLoadData(treeNode) {
|
||||
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
|
||||
(r) => {
|
||||
@@ -682,18 +286,6 @@ function onLoadData(treeNode) {
|
||||
);
|
||||
}
|
||||
|
||||
function onLoadOrgData(treeNode) {
|
||||
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
|
||||
(r) => {
|
||||
treeNode.dataRef.treeChildList = r.data;
|
||||
treeOrgData.value = [...treeOrgData.value];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const closeChangeModal = () => {
|
||||
stageVisible.value = false;
|
||||
};
|
||||
const openDrawer = () => {
|
||||
visiable.value = true;
|
||||
};
|
||||
@@ -707,25 +299,6 @@ function stuStuOrgSelect(e) {
|
||||
stuTableRef.value.fetch();
|
||||
}
|
||||
|
||||
const selectedOrgKeys = ref([]);
|
||||
|
||||
watch(selectedOrgKeys, () => {
|
||||
console.log("selectedKeys", selectedOrgKeys);
|
||||
});
|
||||
|
||||
function orgDel(i) {
|
||||
orgSelectKeys.value = orgSelectKeys.value.filter(
|
||||
(e) => e !== deptList.value[i].id
|
||||
);
|
||||
selectedOrgKeys.value.splice(i, 1);
|
||||
deptList.value.splice(i, 1);
|
||||
}
|
||||
|
||||
function onOrgSelectChange(e, l) {
|
||||
orgRowSelection.value = e;
|
||||
deptList.value = l.selectedNodes;
|
||||
}
|
||||
|
||||
const resetStu = () => {
|
||||
nameSearch.value.keyword = "";
|
||||
stuTableRef.value.reset({ keyword: "", departId: "" });
|
||||
@@ -733,104 +306,28 @@ const resetStu = () => {
|
||||
//清空选择部门信息
|
||||
const deleteDepSelect = () => {
|
||||
stuSelectRows.value = [];
|
||||
selectedOrgKeys.value = [];
|
||||
projectSelectKeys.value = [];
|
||||
};
|
||||
//重置组织
|
||||
const resetOrg = () => {
|
||||
searchOrgName.value = { keyword: "" };
|
||||
};
|
||||
//重置受众
|
||||
const resetAudienceInfo = () => {
|
||||
audienceName.value.keyword = "";
|
||||
auditTableRef.value.reset({ keyword: "" });
|
||||
};
|
||||
|
||||
//确定添加授权
|
||||
const submitAuth = () => {
|
||||
if (props.type === 2) {
|
||||
stageVisible.value = true;
|
||||
} else {
|
||||
handleDialogOk();
|
||||
}
|
||||
};
|
||||
|
||||
function handleDialogOk() {
|
||||
if (auditSelectRowKeys.value.length || deptList.value.length) {
|
||||
dialog({
|
||||
content: "您选择了组织或受众,此添加为异步添加,请稍后手动刷新学员!",
|
||||
ok: handleStageOk,
|
||||
});
|
||||
return;
|
||||
}
|
||||
handleStageOk();
|
||||
}
|
||||
|
||||
function handleStageOk() {
|
||||
if (
|
||||
props.type === 1 &&
|
||||
props.groupId &&
|
||||
props.groupMemberCount <
|
||||
props.groupMemberNumber * 1 +
|
||||
projectSelectRows.value.length +
|
||||
stuSelectRows.value.length
|
||||
) {
|
||||
return message.warning("添加小组学员超过最大值");
|
||||
}
|
||||
stageVisible.value = false;
|
||||
const confirm = () => {
|
||||
visiable.value = false;
|
||||
emit("finash", false);
|
||||
nameSearch.value.keyword = "";
|
||||
saveStu({
|
||||
targetId: props.id,
|
||||
type: props.type,
|
||||
clear: props.clear,
|
||||
deptIds: deptList.value?.map((e) => e.id),
|
||||
stageId: stageId.value,
|
||||
groupIds: auditSelectRows.value?.map((e) => e.id),
|
||||
studentList: stuSelectRows.value,
|
||||
projectList: projectSelectRows.value,
|
||||
groupName: props.groupName,
|
||||
groupId: props.groupId,
|
||||
}).then(() => {
|
||||
message.success("授权成功");
|
||||
deleteDepSelect();
|
||||
emit("finash", true);
|
||||
});
|
||||
}
|
||||
emit("confirm", stuSelectRows.value);
|
||||
|
||||
// 搜索受众值发生变化
|
||||
function orgValue(value) {
|
||||
console.log("", value.target.value);
|
||||
searchOrgName.value.keyword = value.target.value;
|
||||
}
|
||||
};
|
||||
|
||||
watch(visiable, () => {
|
||||
orgSelectKeys.value = [];
|
||||
deptList.value = [];
|
||||
audienceName.value.keyword = "";
|
||||
nameSearch.value.departId = "";
|
||||
stuTreeExpandedKeys.value = [];
|
||||
stuTreeSelectKeys.value = [];
|
||||
activeKey.value = props.isGroup ? 4 : 1;
|
||||
|
||||
projectParams.value.studentName = "";
|
||||
nameSearch.value.keyword = "";
|
||||
searchOrgName.value.keyword = "";
|
||||
audienceName.value.keyword = "";
|
||||
|
||||
if (!visiable.value) {
|
||||
auditTableRef.value && auditTableRef.value.clear();
|
||||
auditTableRef.value && auditTableRef.value.reset({ keyword: "" });
|
||||
stuTableRef.value && stuTableRef.value.clear();
|
||||
stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: "" });
|
||||
projectStuTableRef.value && projectStuTableRef.value.clear();
|
||||
projectStuTableRef.value &&
|
||||
projectStuTableRef.value.reset({
|
||||
pid: props.infoId,
|
||||
type: props.infoType,
|
||||
studentName: "",
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1032,12 +529,6 @@ watch(visiable, () => {
|
||||
}
|
||||
}
|
||||
|
||||
.group {
|
||||
width: 100%;
|
||||
margin-top: 30px;
|
||||
border-top: 1px solid #f2f6fe;
|
||||
}
|
||||
|
||||
.chose2 {
|
||||
//width: 120px;
|
||||
height: 24px;
|
||||
|
||||
@@ -1,34 +1,56 @@
|
||||
<template>
|
||||
<a-drawer v-if="HomeworkModelVisible" :visible="HomeworkModelVisible" class="drawerStyle ProjectHomeWorkManage"
|
||||
placement="right" width="80%" @after-visible-change="afterVisibleChange" :zIndex="100">
|
||||
<a-drawer
|
||||
v-if="HomeworkModelVisible"
|
||||
:visible="HomeworkModelVisible"
|
||||
class="drawerStyle ProjectHomeWorkManage"
|
||||
placement="right"
|
||||
width="80%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
:zIndex="100"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">【作业】{{ title }}</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="@/assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer" />
|
||||
<div class="headerTitle">【作业】{{ datasource.taskName }}</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="@/assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="endtime">
|
||||
起止时间:{{
|
||||
datasource && datasource.startTime ? datasource.startTime : "-"
|
||||
}}
|
||||
起止时间:{{ datasource.info.submitStartTime }}
|
||||
~
|
||||
{{ datasource && datasource.endTime ? datasource.endTime : "-" }}
|
||||
{{ datasource.info.submitEndTime }}
|
||||
</div>
|
||||
<div class="search">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">姓名:</div>
|
||||
<a-input v-model:value="name" style="width: 200px; height: 40px; border-radius: 8px" placeholder="请输入姓名" />
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
style="width: 200px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<div class="namecon" style="margin-right: 50px">
|
||||
<div class="name">任务状态:</div>
|
||||
<div class="select">
|
||||
<a-select v-model:value="projectName" style="width: 200px" placeholder="请选择" :options="projectNameList"
|
||||
@change="selectProjectName" allowClear></a-select>
|
||||
<a-select
|
||||
v-model:value="projectName"
|
||||
style="width: 200px"
|
||||
placeholder="请选择"
|
||||
:options="projectNameList"
|
||||
@change="selectProjectName"
|
||||
allowClear
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn btn1" style="margin-right: 20px" @click="searchTaskList">
|
||||
<div
|
||||
class="btn btn1"
|
||||
style="margin-right: 20px"
|
||||
@click="searchTaskList"
|
||||
>
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
@@ -38,7 +60,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px" v-if="checkPer(permissions,createId)">
|
||||
<div
|
||||
class="btnss"
|
||||
style="margin-top: 20px"
|
||||
v-if="checkPer(permissions, createId)"
|
||||
>
|
||||
<div class="btn btn1" @click="godie" style="margin-right: 20px">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">催促学习</div>
|
||||
@@ -68,16 +94,31 @@
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="tableBox" style="margin-top: 20px; margin-bottom: 100px">
|
||||
<a-table style="border: 1px solid #f2f6fe" :columns="tablecolumns" :data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false" :scroll="{ x: 1300 }" :pagination="false" :row-selection="{
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:scroll="{ x: 1300 }"
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: onSelectChange,
|
||||
}" />
|
||||
}"
|
||||
/>
|
||||
|
||||
<div class="pa">
|
||||
<a-pagination :showSizeChanger="false" showQuickJumper="true" hideOnSinglePage="true" :pageSize="pageSize"
|
||||
:current="currentPage" :total="tableDataTotal" class="pagination" v-if="tableDataTotal > 10"
|
||||
@change="changePaginationStu" />
|
||||
<a-pagination
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
v-if="tableDataTotal > 10"
|
||||
@change="changePaginationStu"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,15 +131,27 @@
|
||||
</a-drawer>
|
||||
|
||||
<!-- 录入成绩抽屉 -->
|
||||
<EScore v-model:eScorevisible="Evisible" :type="2" :id="datasource?.id" :pid="datasource?.routerId"
|
||||
v-model:searchTaskList="searchTaskList" />
|
||||
<EScore
|
||||
v-model:eScorevisible="Evisible"
|
||||
:type="2"
|
||||
:id="datasource?.id"
|
||||
:pid="datasource?.routerId"
|
||||
v-model:searchTaskList="searchTaskList"
|
||||
/>
|
||||
<!-- 查看作业抽屉 -->
|
||||
<CKWork v-model:CWvisible="CWvisible" :workId="datasource?.courseId" v-model:stuId="stuId" />
|
||||
<CKWork
|
||||
v-model:CWvisible="CWvisible"
|
||||
:workId="datasource?.courseId"
|
||||
v-model:stuId="stuId"
|
||||
/>
|
||||
<!-- 查看答卷抽屉 -->
|
||||
<CQue v-model:CQvisible="CQvisible" />
|
||||
|
||||
<!-- 导出作业提示框 -->
|
||||
<ExportHomeWork v-model:exportHomeWorkV="exportHomeWorkV" :downloadUrl="downloadUrl" />
|
||||
<ExportHomeWork
|
||||
v-model:exportHomeWorkV="exportHomeWorkV"
|
||||
:downloadUrl="downloadUrl"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="jsx">
|
||||
@@ -109,8 +162,9 @@ import { message } from "ant-design-vue";
|
||||
// import EScore from "../ExportScore.vue";
|
||||
import * as api from "@/api/index1";
|
||||
// import ExportHomeWork from "../../Modals/ExportHomeWork.vue";
|
||||
import {checkPer} from "@/utils/utils";
|
||||
import { checkPer } from "@/utils/utils";
|
||||
import { batchSendMessage } from "@/api/index1";
|
||||
import { getStudentTaskPage } from "@/api/growthpath";
|
||||
export default {
|
||||
name: "GrowthHomeworkManage",
|
||||
components: {
|
||||
@@ -132,10 +186,6 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
projectTaskId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
@@ -196,8 +246,8 @@ export default {
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
dataIndex: "username",
|
||||
key: "username",
|
||||
width: 120,
|
||||
align: "left",
|
||||
className: "h head",
|
||||
@@ -205,7 +255,7 @@ export default {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.studentUserNo ? text.record.studentUserNo : "-"}
|
||||
{text.record.username ? text.record.username : "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
@@ -213,8 +263,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "studentName",
|
||||
key: "studentName",
|
||||
dataIndex: "username",
|
||||
key: "username",
|
||||
width: 50,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -223,7 +273,7 @@ export default {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.studentName ? text.record.studentName : "-"}
|
||||
{text.record.username ? text.record.username : "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
@@ -301,7 +351,9 @@ export default {
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.workScore || text.record.workScore == 0
|
||||
? text.record.workScore < 0 ? "-" : text.record.workScore
|
||||
? text.record.workScore < 0
|
||||
? "-"
|
||||
: text.record.workScore
|
||||
: "-"}
|
||||
</span>
|
||||
</div>
|
||||
@@ -449,20 +501,22 @@ export default {
|
||||
const godie = () => {
|
||||
//考试催促请求报文
|
||||
var obj = {
|
||||
'courseId': props.datasource.courseId,//任务的Id
|
||||
'courseName': props.title,//任务的名称
|
||||
'logo': '2',//项目或径的标识 1-项目 2-路径图 3面授课
|
||||
'routerTaskId': props.datasource.id,//任务的routerTaskld或projectTaskld
|
||||
'targetId': props.datasource.routerId,//路径图的就是routerId,项目的是projectId;根据这张图来看的话
|
||||
'taskType': props.datasource.type,//催促的任务的类型
|
||||
'chapterId': props.datasource.chapterId,//阶段或关卡Id
|
||||
courseId: props.datasource.courseId, //任务的Id
|
||||
courseName: props.datasource.taskName, //任务的名称
|
||||
logo: "2", //项目或径的标识 1-项目 2-路径图 3面授课
|
||||
routerTaskId: props.datasource.id, //任务的routerTaskld或projectTaskld
|
||||
targetId: props.datasource.routerId, //路径图的就是routerId,项目的是projectId;根据这张图来看的话
|
||||
taskType: props.datasource.type, //催促的任务的类型
|
||||
chapterId: props.datasource.chapterId, //阶段或关卡Id
|
||||
};
|
||||
batchSendMessage(obj).then(res => {
|
||||
console.log(res)
|
||||
batchSendMessage(obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
message.success("催促" + props.title + "成功");
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
//表头清空
|
||||
const clearLine = () => {
|
||||
@@ -471,7 +525,10 @@ export default {
|
||||
|
||||
//获取学员
|
||||
const getStudent = () => {
|
||||
{/* debugger */ }
|
||||
console.log(props.datasource);
|
||||
{
|
||||
/* debugger */
|
||||
}
|
||||
console.log("我是传递的查询参数", props.datasource.courseId, {
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
@@ -481,22 +538,20 @@ export default {
|
||||
taskId: props.datasource.id,
|
||||
taskType: props.datasource.type,
|
||||
status: state.projectName,
|
||||
studentName: state.name,
|
||||
username: state.name,
|
||||
});
|
||||
api
|
||||
.AssessmentManagementMessage({
|
||||
getStudentTaskPage({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.chapterId,
|
||||
type: 2,
|
||||
pid: props.datasource.routerId,
|
||||
taskId: props.datasource.id,
|
||||
taskType: props.datasource.type,
|
||||
taskType: props.datasource.taskType,
|
||||
status: state.projectName,
|
||||
studentName: state.name,
|
||||
username: state.name,
|
||||
})
|
||||
.then((res) => {
|
||||
{/* debugger */ }
|
||||
{
|
||||
/* debugger */
|
||||
}
|
||||
console.log("获取作业管理学员", res);
|
||||
if (res.data.code == 200) {
|
||||
let newData = [];
|
||||
@@ -539,9 +594,12 @@ export default {
|
||||
function exportTaskStu() {
|
||||
console.log("props.datasource", props.datasource);
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId
|
||||
}&type=${2}&pid=${props.datasource.routerId}&taskType=${4}&taskId=${props.datasource.id
|
||||
`${
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportTaskStudent?currentStageId=${
|
||||
props.datasource.chapterId
|
||||
}&type=${2}&pid=${props.datasource.routerId}&taskType=${4}&taskId=${
|
||||
props.datasource.id
|
||||
}`
|
||||
);
|
||||
// api
|
||||
@@ -594,9 +652,12 @@ export default {
|
||||
function exportHomeWork() {
|
||||
console.log("props.datasource", props.datasource);
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportHomeWork?currentStageId=${props.datasource.chapterId
|
||||
}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId
|
||||
`${
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportHomeWork?currentStageId=${
|
||||
props.datasource.chapterId
|
||||
}&type=${2}&pid=${props.datasource.routerId}&taskId=${
|
||||
props.datasource.routerTaskId
|
||||
}&taskType=${props.datasource.type}`
|
||||
);
|
||||
}
|
||||
@@ -834,7 +895,7 @@ export default {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.ant-table-thead>tr>th {
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1) !important;
|
||||
}
|
||||
|
||||
@@ -850,7 +911,9 @@ export default {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td {
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
|
||||
|
||||
301
src/components/growthpath/GrowthInvistRoot.vue
Normal file
301
src/components/growthpath/GrowthInvistRoot.vue
Normal file
@@ -0,0 +1,301 @@
|
||||
<template>
|
||||
<div class="growth-invist-root">
|
||||
<div class="contentMain drawerMain">
|
||||
<div class="main_item">
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="params.assessmentName"
|
||||
style="width: 424px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入评估名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
<div class="btns" @click="search">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btnsn" @click="reset">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
<div class="btnsn" @click="reset">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">刷新</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item">
|
||||
<button class="xkbtn" style="margin: 0" @click="goResearchmanage">
|
||||
新建评估
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="main_table">
|
||||
<a-table
|
||||
class="ant-table-striped"
|
||||
:row-class-name="
|
||||
(_, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||
"
|
||||
row-key="id"
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
:loading="loading"
|
||||
:pagination="pagination"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'select'">
|
||||
<a
|
||||
:style="{
|
||||
color: id == record.id ? '#999' : null,
|
||||
}"
|
||||
@click="confirm(record)"
|
||||
>选择</a
|
||||
>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="jsx">
|
||||
import { defineEmits, defineProps, ref, computed } from "vue";
|
||||
import { Form, message } from "ant-design-vue";
|
||||
import { useResetRef } from "@/utils/useCommon";
|
||||
import { saveTask } from "@/api/growthpath";
|
||||
// import { useRouter } from "vue-router";
|
||||
import { useRowsPage } from "@/api/request";
|
||||
import { ASSESSMENT_PAGE } from "@/api/apis";
|
||||
const emit = defineEmits(["confirm"]);
|
||||
const props = defineProps({
|
||||
id: String,
|
||||
name: String,
|
||||
});
|
||||
const formData = useResetRef({});
|
||||
const initParams = {
|
||||
assessmentName: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
releaseStatus: 2,
|
||||
};
|
||||
// const router = useRouter();
|
||||
const params = ref(initParams);
|
||||
const { data, loading, total, fetch } = useRowsPage(
|
||||
ASSESSMENT_PAGE,
|
||||
params.value
|
||||
);
|
||||
const pagination = computed(() => ({
|
||||
total: total.value,
|
||||
showSizeChanger: false,
|
||||
current: params.value.pageNo,
|
||||
pageSize: params.value.pageSize,
|
||||
onChange: changePagination,
|
||||
}));
|
||||
|
||||
const changePagination = (e) => {
|
||||
params.value.pageNo = e;
|
||||
fetch();
|
||||
};
|
||||
|
||||
function search() {
|
||||
params.value.pageIndex = 1;
|
||||
fetch();
|
||||
}
|
||||
|
||||
function reset() {
|
||||
params.value.pageIndex = 1;
|
||||
params.value.keyWord = "";
|
||||
params.value.assessmentName = "";
|
||||
fetch();
|
||||
}
|
||||
|
||||
const goResearchmanage = () => {
|
||||
// router.push({ path: "/researchmanage" });
|
||||
window.open(process.env.VUE_APP_BASE + "/researchmanage?openCreate=true");
|
||||
};
|
||||
const columns = ref([
|
||||
{
|
||||
title: "选择",
|
||||
dataIndex: "select",
|
||||
key: "select",
|
||||
width: "100px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
dataIndex: "assessmentName",
|
||||
key: "assessmentName",
|
||||
width: "40%",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "题数",
|
||||
dataIndex: "num",
|
||||
key: "num",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{" "}
|
||||
{text.record.essayQuestionVoList.length +
|
||||
text.record.multipleStemVoList.length +
|
||||
text.record.scoringQuestionVoList.length +
|
||||
text.record.singleStemVoList.length}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "createName",
|
||||
key: "createName",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
]);
|
||||
|
||||
async function confirm(record) {
|
||||
emit("confirm", record);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
.growth-invist-root > .ant-drawer-content-wrapper {
|
||||
min-width: 1300px !important;
|
||||
width: 1300px !important;
|
||||
}
|
||||
.growth-invist-root {
|
||||
.drawerMain {
|
||||
margin: 16px 0;
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.contentMain {
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 20px;
|
||||
.fi_input {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.btns {
|
||||
margin-right: 20px;
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
//border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url("../../assets/images/courseManage/search0.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btnsn {
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset1.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.main_table {
|
||||
position: relative;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.ant-checkbox-wrapper {
|
||||
align-items: center;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.ant-table-selection-column {
|
||||
padding: 0px !important;
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1);
|
||||
}
|
||||
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,26 +1,25 @@
|
||||
<!-- 直播抽屉 -->
|
||||
<template>
|
||||
<div @click="openDrawer">
|
||||
<div @click="openDrawer()">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<a-drawer
|
||||
:visible="visible"
|
||||
class="drawerStyle growth-live"
|
||||
width="1000"
|
||||
width="1400"
|
||||
title="添加直播"
|
||||
placement="right"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
{{ taskIndex >= 0 ? "编辑" : "添加" }}直播
|
||||
</div>
|
||||
<div class="headerTitle">{{ formData.id ? "编辑" : "添加" }}直播</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<template v-if="step == 1">
|
||||
<div class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
@@ -35,7 +34,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="formData.liveName"
|
||||
v-model:value="formData.info.liveName"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入直播名称"
|
||||
:maxlength="20"
|
||||
@@ -54,7 +53,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="formData.liveLink"
|
||||
v-model:value="formData.info.liveLink"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入直播链接"
|
||||
:maxlength="100"
|
||||
@@ -98,7 +97,7 @@
|
||||
:precision="0"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
:placeholder="durationText"
|
||||
v-model:value="formData.liveDuration"
|
||||
v-model:value="formData.info.liveDuration"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
@@ -115,8 +114,8 @@
|
||||
</div>
|
||||
<div class="select" style="width: 400px">
|
||||
<ProjectManager
|
||||
v-model:value="formData.liveTeacherId"
|
||||
v-model:name="formData.liveTeacherName"
|
||||
v-model:value="formData.info.liveTeacherId"
|
||||
v-model:name="formData.info.liveTeacherName"
|
||||
>
|
||||
</ProjectManager>
|
||||
</div>
|
||||
@@ -174,7 +173,7 @@
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="formData.liveNotice"
|
||||
v-model:value="formData.info.liveNotice"
|
||||
placeholder="请输入直播公告"
|
||||
allow-clear
|
||||
show-count
|
||||
@@ -190,19 +189,19 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-switch
|
||||
v-model:checked="formData.livePlayback"
|
||||
v-model:checked="formData.info.livePlayback"
|
||||
@change="getchange(formData.livePlayback)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="formData.livePlayback">
|
||||
<div v-if="formData.info.livePlayback">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">回放链接:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="formData.livePlaybackLink"
|
||||
v-model:value="formData.info.livePlaybackLink"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入回放链接"
|
||||
:maxlength="100"
|
||||
@@ -217,7 +216,7 @@
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="formData.liveExplain"
|
||||
v-model:value="formData.info.liveExplain"
|
||||
placeholder="请输入直播说明"
|
||||
allow-clear
|
||||
show-count
|
||||
@@ -250,7 +249,7 @@
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
"
|
||||
v-model:value="formData.beforeSignIn"
|
||||
v-model:value="formData.info.beforeSignIn"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>分钟允许签到</span
|
||||
@@ -268,7 +267,7 @@
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
"
|
||||
v-model:value="formData.afterSignIn"
|
||||
v-model:value="formData.info.afterSignIn"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>分钟允许签到</span
|
||||
@@ -283,26 +282,20 @@
|
||||
</div>
|
||||
<div class="btnbox2">
|
||||
<a-checkbox
|
||||
v-model:checked="formData.isEvaluate"
|
||||
@change="getchanges(formData.isEvaluate)"
|
||||
v-model:checked="formData.info.isEvaluate"
|
||||
@change="getchanges(formData.info.isEvaluate)"
|
||||
>需要评估
|
||||
</a-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="formData.isEvaluate" class="main_item">
|
||||
<div v-if="formData.info.isEvaluate" class="main_item">
|
||||
<div class="signbox"></div>
|
||||
<div class="btnbox">
|
||||
<AddInvistRoot
|
||||
v-model:id="formData.assessmentId"
|
||||
v-model:name="formData.assessmentName"
|
||||
>
|
||||
<button class="xkbtn">选择评估</button>
|
||||
</AddInvistRoot>
|
||||
|
||||
<div v-if="formData.assessmentId">
|
||||
<button class="xkbtn" @click="step = 2">选择评估</button>
|
||||
<div v-if="formData.info.assessmentId">
|
||||
<a-tag closable @close="removePG" color="processing">
|
||||
<span style="font-size: 14px; line-height: 33px">{{
|
||||
formData.assessmentName
|
||||
formData.info.assessmentName
|
||||
}}</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
@@ -320,6 +313,15 @@
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="confirm">确定</button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="step == 2">
|
||||
<GrowthInvistRoot
|
||||
v-model:id="formData.info.assessmentId"
|
||||
v-model:name="formData.info.assessmentName"
|
||||
@confirm="step = 1"
|
||||
>
|
||||
</GrowthInvistRoot>
|
||||
</template>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
@@ -327,15 +329,17 @@
|
||||
import { computed, defineEmits, defineProps, ref } from "vue";
|
||||
import dayjs from "dayjs";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import AddInvistRoot from "@/components/drawers/AddInvistRoot.vue";
|
||||
import GrowthInvistRoot from "@/components/growthpath/GrowthInvistRoot.vue";
|
||||
import { Form, message } from "ant-design-vue";
|
||||
import { fileUp } from "../../api/indexEval";
|
||||
import { useResetRef } from "@/utils/useCommon";
|
||||
import { getCookieForName } from "@/api/method";
|
||||
|
||||
const step = ref(1);
|
||||
|
||||
const removePG = () => {
|
||||
formData.value.assessmentId = "";
|
||||
formData.value.assessmentName = "";
|
||||
formData.value.info.assessmentId = "";
|
||||
formData.value.info.assessmentName = "";
|
||||
};
|
||||
const getchange = (mess) => {
|
||||
console.log(mess); //输出true或者false
|
||||
@@ -350,6 +354,7 @@ const props = defineProps({
|
||||
const visible = ref(false);
|
||||
const headers = { token: getCookieForName("token") };
|
||||
const formData = useResetRef({
|
||||
info: {
|
||||
liveName: "",
|
||||
liveLink: "",
|
||||
liveStartTime: "",
|
||||
@@ -366,9 +371,9 @@ const formData = useResetRef({
|
||||
assessmentName: "",
|
||||
livePlayback: "",
|
||||
liveExplain: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits({});
|
||||
const taskIndex = ref(-1);
|
||||
const dateTime = ref([]);
|
||||
|
||||
const rulesRef = ref({
|
||||
@@ -429,7 +434,7 @@ const rulesRef = ref({
|
||||
],
|
||||
});
|
||||
|
||||
const { resetFields, validate } = Form.useForm(formData, rulesRef);
|
||||
const { resetFields, validate } = Form.useForm(formData.info, rulesRef);
|
||||
const durationText = computed(() =>
|
||||
dateTime.value?.length
|
||||
? dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]), "minute")
|
||||
@@ -439,14 +444,14 @@ const durationText = computed(() =>
|
||||
const closeDrawer = () => {
|
||||
imageUrl.value = "";
|
||||
visible.value = false;
|
||||
taskIndex.value = -1;
|
||||
dateTime.value = [];
|
||||
formData.reset();
|
||||
formData.value.info = {};
|
||||
resetFields();
|
||||
};
|
||||
function timeChange(time, timeStr) {
|
||||
formData.value.liveStartTime = timeStr[0];
|
||||
formData.value.liveEndTime = timeStr[1];
|
||||
formData.value.info.liveStartTime = timeStr[0];
|
||||
formData.value.info.liveEndTime = timeStr[1];
|
||||
// formData.value.liveDuration || (formData.value.liveDuration = dayjs(timeStr[1]).diff(dayjs(timeStr[0]),'minute'))
|
||||
}
|
||||
const disabledDate = (current) => {
|
||||
@@ -459,6 +464,8 @@ async function confirm() {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过");
|
||||
});
|
||||
console.log(formData.value);
|
||||
return;
|
||||
if (taskIndex.value === -1) {
|
||||
let list = props.taskList;
|
||||
list.push({
|
||||
@@ -484,12 +491,11 @@ async function confirm() {
|
||||
closeDrawer();
|
||||
}
|
||||
|
||||
function openDrawer(i, row) {
|
||||
console.log(i, row);
|
||||
row && (formData.value = { ...row.info });
|
||||
function openDrawer(row) {
|
||||
console.log(row);
|
||||
row && (formData.value = row);
|
||||
row && (dateTime.value = [row.info.liveStartTime, row.info.liveEndTime]);
|
||||
row && (imageUrl.value = row.info.liveCover);
|
||||
i >= 0 && (taskIndex.value = i);
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
@@ -522,7 +528,8 @@ const beforeUpload = (file) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log(res.data.data, 45);
|
||||
imageUrl.value = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||
formData.value.liveCover = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||
formData.value.info.liveCover =
|
||||
process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||
|
||||
// state.hasImgName = file.name;
|
||||
// emit("src", { id: '', src: res.data.data });
|
||||
@@ -537,8 +544,8 @@ const beforeUpload = (file) => {
|
||||
}
|
||||
|
||||
.growth-live > .ant-drawer-content-wrapper {
|
||||
min-width: 800px !important;
|
||||
width: 800px !important;
|
||||
min-width: 1200px !important;
|
||||
width: 1200px !important;
|
||||
}
|
||||
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
@@ -565,9 +572,6 @@ const beforeUpload = (file) => {
|
||||
}
|
||||
|
||||
.contentMain {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.main_left {
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
|
||||
@@ -9,24 +9,8 @@
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle" :title="title">
|
||||
【{{
|
||||
datasource.type === 1
|
||||
? "在线"
|
||||
: datasource.type === 3
|
||||
? "案例"
|
||||
: datasource.type === 6
|
||||
? "直播"
|
||||
: datasource.type === 7
|
||||
? "外链"
|
||||
: datasource.type === 8
|
||||
? "讨论"
|
||||
: datasource.type === 9
|
||||
? "活动"
|
||||
: datasource.type === 11
|
||||
? "评估"
|
||||
: "-"
|
||||
}}】{{ title }}
|
||||
<div class="headerTitle">
|
||||
【{{ TASK_TYPE[datasource.taskType].name }}】{{ datasource.taskName }}
|
||||
</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
@@ -36,7 +20,7 @@
|
||||
</div>
|
||||
<div class="main">
|
||||
<!-- <div
|
||||
v-if="datasource.type !== 6 && datasource.type !== 9"
|
||||
v-if="datasource.taskType !== 6 && datasource.taskType !== 9"
|
||||
class="endtime"
|
||||
> -->
|
||||
<!--
|
||||
@@ -45,8 +29,22 @@
|
||||
<!-- <div class="endtime">
|
||||
起止时间:{{ titleData.beginTime }} ~ {{ titleData.endTime }}
|
||||
</div> -->
|
||||
<div class="search" style="justify-content:flex-start;">
|
||||
<div class="search" style="justify-content: flex-start">
|
||||
<div class="sealeft">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">标准岗位:</div>
|
||||
<PostSelectNew width="200px" v-model:value="stdPositionId">
|
||||
</PostSelectNew>
|
||||
</div>
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">任职资格:</div>
|
||||
<OfficeSelect
|
||||
v-model:value="qualsLevelCode"
|
||||
:searchData="stdPositionId"
|
||||
width="200px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">姓名/工号:</div>
|
||||
<a-input
|
||||
@@ -84,7 +82,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px" v-if="checkGrowthPer(permissions)">
|
||||
<div
|
||||
class="btnss"
|
||||
style="margin-top: 20px"
|
||||
v-if="checkGrowthPer(permissions)"
|
||||
>
|
||||
<div class="btn btn1" @click="godie" style="margin-right: 20px">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">催促学习</div>
|
||||
@@ -136,12 +138,22 @@
|
||||
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
// import ViewAssess from "../ViewAssess";
|
||||
import {checkGrowthPer} from "@/utils/utils";
|
||||
import {queryOnlineManagementDetail,batchSendMessage} from "@/api/growthpath";
|
||||
import { checkGrowthPer } from "@/utils/utils";
|
||||
import {
|
||||
getStudentTaskPage,
|
||||
batchSendMessage,
|
||||
exportStudentTaskPage,
|
||||
} from "@/api/growthpath";
|
||||
import { TASK_TYPE } from "@/utils/constGrown";
|
||||
import PostSelectNew from "@/components/growthpath/PostSelect";
|
||||
import OfficeSelect from "@/components/growthpath/OfficeSelect";
|
||||
|
||||
export default {
|
||||
name: "GrowthOnlineManage",
|
||||
components: { },
|
||||
components: {
|
||||
OfficeSelect,
|
||||
PostSelectNew,
|
||||
},
|
||||
props: {
|
||||
createId: {
|
||||
type: Number,
|
||||
@@ -155,10 +167,6 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
levelName: {
|
||||
type: String,
|
||||
default: "",
|
||||
@@ -188,6 +196,9 @@ export default {
|
||||
currentPage: 1,
|
||||
tableDataTotal: 0,
|
||||
projectName: undefined,
|
||||
TASK_TYPE: TASK_TYPE,
|
||||
stdPositionId: null,
|
||||
qualsLevelCode: null,
|
||||
projectNameList: [
|
||||
{
|
||||
id: 1,
|
||||
@@ -206,63 +217,68 @@ export default {
|
||||
},
|
||||
],
|
||||
tabledata: [],
|
||||
titleData: {},
|
||||
tableDataTotalLoading: true, // 表格loading加载配置
|
||||
evalDataSource: "",
|
||||
Assessvisible: false
|
||||
Assessvisible: false,
|
||||
});
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
dataIndex: "username",
|
||||
key: "username",
|
||||
width: 50,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentUserNo?text.record.studentUserNo:"-"}</span>
|
||||
<span>
|
||||
{" "}
|
||||
{text.record.username ? text.record.username : "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "studentName",
|
||||
key: "studentName",
|
||||
dataIndex: "userNickName",
|
||||
key: "userNickName",
|
||||
width: 50,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentName?text.record.studentName:"-"}</span>
|
||||
<span>
|
||||
{" "}
|
||||
{text.record.userNickName ? text.record.userNickName : "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "studentDepartName",
|
||||
key: "studentDepartName",
|
||||
dataIndex: "orgName",
|
||||
key: "orgName",
|
||||
width: 160,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
// customRender: (text) => {
|
||||
// return (
|
||||
// <div class="racona">
|
||||
// <span> {text.record.studentDepartName?text.record.studentDepartName:"-"}</span>
|
||||
// </div>
|
||||
// );
|
||||
// },
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.orgName ? text.record.orgName : "-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "所在岗位",
|
||||
dataIndex: "studentJobName",
|
||||
key: "studentJobName",
|
||||
title: "标准岗位",
|
||||
dataIndex: "stdPositionName",
|
||||
key: "stdPositionName",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -270,11 +286,69 @@ export default {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentJobName?text.record.studentJobName:"-"}</span>
|
||||
<span>
|
||||
{" "}
|
||||
{text.record.stdPositionName
|
||||
? text.record.stdPositionName
|
||||
: "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "任职资格",
|
||||
dataIndex: "qualsLevelDesr",
|
||||
key: "qualsLevelDesr",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{" "}
|
||||
{text.record.qualsLevelDesr
|
||||
? text.record.qualsLevelDesr
|
||||
: "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Band职级",
|
||||
dataIndex: "stdPositionName",
|
||||
key: "stdPositionName",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>-</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "加入方式",
|
||||
dataIndex: "joinMethod",
|
||||
key: "joinMethod",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: ({ record: { joinMethod } }) =>
|
||||
({
|
||||
1: "自动匹配",
|
||||
2: "手动添加",
|
||||
3: "导入",
|
||||
4: "添加",
|
||||
}[joinMethod]),
|
||||
},
|
||||
/** {
|
||||
title: "学员关卡",
|
||||
dataIndex: "currentStageName",
|
||||
@@ -293,8 +367,8 @@ export default {
|
||||
},*/
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "lastStudyTime",
|
||||
key: "lastStudyTime",
|
||||
dataIndex: "finishTime",
|
||||
key: "finishTime",
|
||||
width: 100,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -302,15 +376,18 @@ export default {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.lastStudyTime?text.record.lastStudyTime:"-"}</span>
|
||||
<span>
|
||||
{" "}
|
||||
{text.record.finishTime ? text.record.finishTime : "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "任务状态",
|
||||
dataIndex: "finishStatus",
|
||||
key: "finishStatus",
|
||||
dataIndex: "completionStatus",
|
||||
key: "completionStatus",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -318,7 +395,15 @@ export default {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.finishStatus == 0 || text.record.finishStatus==null ? "未开始" :text.record.finishStatus == 1 ?"已完成":"进行中"}</span>
|
||||
<span>
|
||||
{" "}
|
||||
{text.record.completionStatus == 0 ||
|
||||
text.record.completionStatus == null
|
||||
? "未开始"
|
||||
: text.record.completionStatus == 1
|
||||
? "已完成"
|
||||
: "进行中"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -337,24 +422,29 @@ export default {
|
||||
return (
|
||||
<div class="racona">
|
||||
<a
|
||||
style={{color:text.record.finishStatus == 1 ?"":"#666"}}
|
||||
onClick={()=>{
|
||||
text.record.finishStatus==1 && showassess(text.record);
|
||||
}}>查看</a>
|
||||
style={{ color: text.record.finishStatus == 1 ? "" : "#666" }}
|
||||
onClick={() => {
|
||||
text.record.finishStatus == 1 && showassess(text.record);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
{/* 评估查看操作 */}
|
||||
if(props.datasource.type==11){
|
||||
columns.push(obj)
|
||||
/* 评估查看操作 */
|
||||
if (props.datasource.taskType == 11) {
|
||||
columns.push(obj);
|
||||
}
|
||||
|
||||
return columns;
|
||||
};
|
||||
|
||||
{/* 查看评估弹框 */}
|
||||
{
|
||||
/* 查看评估弹框 */
|
||||
}
|
||||
const showassess = (data) => {
|
||||
state.evalDataSource = data;
|
||||
state.Assessvisible = true;
|
||||
@@ -369,7 +459,7 @@ export default {
|
||||
};
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
console.log("当前是什么类型", props.datasource.type);
|
||||
console.log("当前是什么类型", props.datasource.taskType);
|
||||
state.tableDataTotalLoading = true;
|
||||
getData();
|
||||
}
|
||||
@@ -380,20 +470,22 @@ export default {
|
||||
//催促
|
||||
const godie = () => {
|
||||
var obj = {
|
||||
'courseId': props.datasource.courseId,//任务的Id
|
||||
'courseName': props.title,//任务的名称
|
||||
'logo': '14',//项目或径的标识 1-项目 2-路径图 3面授课
|
||||
'routerTaskId': props.datasource.id,//任务的routerTaskld或projectTaskld
|
||||
'targetId': props.datasource.targetId,//路径图的就是routerId,项目的是projectId;根据这张图来看的话
|
||||
'taskType': props.datasource.type,//催促的任务的类型
|
||||
'chapterId': null,//阶段或关卡Id
|
||||
courseId: props.datasource.courseId, //任务的Id
|
||||
courseName: props.datasource.taskName, //任务的名称
|
||||
logo: "14", //项目或径的标识 1-项目 2-路径图 3面授课
|
||||
routerTaskId: props.datasource.id, //任务的routerTaskld或projectTaskld
|
||||
targetId: props.datasource.targetId, //路径图的就是routerId,项目的是projectId;根据这张图来看的话
|
||||
taskType: props.datasource.taskType, //催促的任务的类型
|
||||
chapterId: null, //阶段或关卡Id
|
||||
};
|
||||
batchSendMessage(obj).then(res => {
|
||||
console.log(res)
|
||||
batchSendMessage(obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
message.success("催促学员成功");
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
const onChange = (pageNumber) => {
|
||||
console.log("Page: ", pageNumber);
|
||||
@@ -401,95 +493,27 @@ export default {
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7 || props.datasource.type == 8 || props.datasource.type == 3) {
|
||||
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
|
||||
console.log("我是传递的查询参数", {
|
||||
getStudentTaskPage({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.stageId,
|
||||
type: 1,
|
||||
pid: props.datasource.projectId,
|
||||
completionStatus: state.projectName,
|
||||
username: state.name,
|
||||
taskId: props.datasource.id,
|
||||
taskType: props.datasource.type,
|
||||
status: state.projectName,
|
||||
studentName: state.name,
|
||||
});
|
||||
// api
|
||||
// .AssessmentManagementMessage({
|
||||
// pageNo: state.currentPage,
|
||||
// pageSize: state.pageSize,
|
||||
// currentStageId: props.datasource.stageId,
|
||||
// type: 1,
|
||||
// pid: props.datasource.projectId,
|
||||
// taskId: props.datasource.id,
|
||||
// taskType: props.datasource.type,
|
||||
// status: state.projectName,
|
||||
// studentName: state.name,
|
||||
// })
|
||||
// .then((res) => {
|
||||
// console.log(res);
|
||||
// if (res.status == 200) {
|
||||
// state.tabledata = res.data.data.records;
|
||||
// state.tableDataTotal = res.data.data.total;
|
||||
// state.tableDataTotalLoading = false;
|
||||
// }
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// state.tableDataTotalLoading = false;
|
||||
// state.tabledata = [];
|
||||
// });
|
||||
} else if(props.datasource.type == 1) {
|
||||
console.log("我是传递的查询参数", {
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"chapterId": props.datasource.stageId=="0"?"":props.datasource.stageId,
|
||||
"status": state.projectName,
|
||||
"searchTerms": state.name,
|
||||
"targetId":props.datasource.projectId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"thirdId": props.datasource.targetId,
|
||||
"type": 2
|
||||
});
|
||||
{/* "chapterId": props.datasource.stageId=="0"?"":props.datasource.stageId, */}
|
||||
queryOnlineManagementDetail({
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"status": state.projectName,
|
||||
"searchTerms": state.name,
|
||||
"targetId":props.datasource.targetId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"thirdId": null,
|
||||
"type": 14
|
||||
}).then(res=>{
|
||||
console.log('在线课数据获取', res)
|
||||
if(res.data.code==200){
|
||||
state.tableDataTotalLoading = false;
|
||||
let newData = []
|
||||
for(let i=0;i<res.data.data.studyDetailList.records.length;i++){
|
||||
// 处理在线课字段和表格中字段保持一致
|
||||
let obj = {
|
||||
studentUserNo: res.data.data.studyDetailList.records[i].studentCode,
|
||||
studentName: res.data.data.studyDetailList.records[i].studentName,
|
||||
studentDepartName: res.data.data.studyDetailList.records[i].studentOrgName,
|
||||
studentJobName: res.data.data.studyDetailList.records[i].studentJobName,
|
||||
lastStudyTime: res.data.data.studyDetailList.records[i].finishedTime,
|
||||
finishStatus: res.data.data.studyDetailList.records[i].status?res.data.data.studyDetailList.records[i].status:0
|
||||
}
|
||||
newData.push(obj)
|
||||
}
|
||||
state.titleData = res.data.data
|
||||
state.tabledata = newData;
|
||||
state.tableDataTotal = res.data.data.studyDetailList.total;
|
||||
}
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
state.tableDataTotalLoading = false;
|
||||
qualsLevelCode: state.qualsLevelCode,
|
||||
stdPositionId: state.stdPositionId,
|
||||
})
|
||||
}else{
|
||||
.then((res) => {
|
||||
console.log("在线课数据获取", res);
|
||||
if (res.data.code == 200) {
|
||||
state.tableDataTotalLoading = false;
|
||||
state.tabledata = [];
|
||||
state.tabledata = res.data.data.records;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
state.tableDataTotalLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 搜索按钮
|
||||
@@ -516,19 +540,52 @@ export default {
|
||||
|
||||
// 导出数据
|
||||
function exportTaskStu() {
|
||||
exportStudentTaskPage({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
completionStatus: state.projectName,
|
||||
username: state.name,
|
||||
taskId: props.datasource.id,
|
||||
qualsLevelCode: state.qualsLevelCode,
|
||||
stdPositionId: state.stdPositionId,
|
||||
}).catch((err) => {
|
||||
let blob = new Blob([err.data], {
|
||||
type: "application/vnd.ms-excel",
|
||||
});
|
||||
console.log(blob);
|
||||
let url = window.URL.createObjectURL(blob);
|
||||
|
||||
// 创建a标签并为其添加属性
|
||||
const link = document.createElement("a");
|
||||
link.href = url;
|
||||
link.download = "专业力必修-录入学员模版.xlsx";
|
||||
// 触发点击事件执行下载
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
// 下载完成就删掉a标签
|
||||
document.body.removeChild(link);
|
||||
//释放blob对象
|
||||
window.URL.revokeObjectURL(url);
|
||||
});
|
||||
// if(props.datasource.type==1){
|
||||
// {/* 在线课导出 */}
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/online/manage/exportOnline?chapterId=${props.datasource.stageId}&type=${1}&targetId=${props.datasource.projectId}&taskId=${props.datasource.courseId}`)
|
||||
// }else if(props.datasource.type==11){
|
||||
// }else if(props.datasource.taskType==11){
|
||||
// {/* 评估导出 */}
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/exportAssessmentMessage?chapterId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&courseId=${props.datasource.courseId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
|
||||
// }else if(props.datasource.type==8){
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/exportAssessmentMessage?chapterId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&courseId=${props.datasource.courseId}&taskId=${props.datasource.id}&taskType=${props.datasource.taskType}`)
|
||||
// }else if(props.datasource.taskType==8){
|
||||
// {/* 讨论导出 */}
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportDiscussStudent?chapterId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&courseId=${props.datasource.courseId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportDiscussStudent?chapterId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&courseId=${props.datasource.courseId}&taskId=${props.datasource.id}&taskType=${props.datasource.taskType}`)
|
||||
// }else{
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.id}&taskType=${props.datasource.taskType}`)
|
||||
// }
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/online/manage/exportOnline?type=${14}&targetId=${props.datasource.targetId}&taskId=${props.datasource.courseId}`)
|
||||
// window.open(
|
||||
// `${
|
||||
// process.env.VUE_APP_BASE_API
|
||||
// }/admin/online/manage/exportOnline?type=${14}&targetId=${
|
||||
// props.datasource.targetId
|
||||
// }&taskId=${props.datasource.courseId}`
|
||||
// );
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -604,7 +661,7 @@ export default {
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
// margin-left: 24px;
|
||||
margin-left: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
@@ -786,6 +843,30 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-select {
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
min-height: 40px;
|
||||
.ant-select-selector {
|
||||
border-radius: 8px;
|
||||
width: 100%;
|
||||
min-height: 40px;
|
||||
}
|
||||
.ant-select-selection-placeholder {
|
||||
line-height: 40px;
|
||||
}
|
||||
.ant-select-selection-item {
|
||||
line-height: 40px;
|
||||
}
|
||||
.ant-select-selection-item-content {
|
||||
line-height: 26px !important;
|
||||
}
|
||||
.ant-select-selection-item-remove {
|
||||
line-height: 26px !important;
|
||||
}
|
||||
.ant-select-selection-item {
|
||||
line-height: 40px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -872,7 +872,6 @@ function reset() {
|
||||
const CommonTestRef = ref(null);
|
||||
// 关闭步骤
|
||||
const closeDrawer = () => {
|
||||
debugger
|
||||
// 如果不是第一步则退到新增
|
||||
if (step.value > 2 && commonTestStep.value == 1) {
|
||||
step.value = 2;
|
||||
@@ -1187,7 +1186,6 @@ defineExpose({ openDrawer });
|
||||
.createschooltime {
|
||||
.cst_main {
|
||||
width: 100%;
|
||||
max-height: 700px;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<template>
|
||||
<TableModelStudent :types="types" :id="id" ref="tableModelRef">
|
||||
<template #extension="{ data: { record } }">
|
||||
<a-button style="" type="link" @click="transferOwnership(record)"
|
||||
<a-button style="margin-right: 12px;" type="link" @click="transferOwnership(record)"
|
||||
>转移归属权</a-button
|
||||
>
|
||||
</template>
|
||||
@@ -19,8 +19,11 @@
|
||||
<script setup>
|
||||
import { defineProps, ref } from "vue";
|
||||
import TableModelStudent from "@/components/growthpath/GrowthTableModel";
|
||||
import { assignPermissions } from "@/api/growthpath";
|
||||
import dialog from "@/utils/dialog";
|
||||
import { message } from "ant-design-vue";
|
||||
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
id: String,
|
||||
types: {
|
||||
type: Array,
|
||||
@@ -32,5 +35,23 @@ const tableModelRef = ref();
|
||||
// 转移归属权
|
||||
const transferOwnership = (data) => {
|
||||
console.log(data);
|
||||
dialog({
|
||||
content: "是否转移归属权?",
|
||||
ok: () => {
|
||||
assignPermissions({
|
||||
growthId: props.id,
|
||||
userIds: [data.id],
|
||||
permissionType: '17',
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
message.success("操作成功");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error(err.data.msg);
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
class="cus-btn"
|
||||
style="background: #4ea6ff; color: #fff; width: 100px"
|
||||
@click="search"
|
||||
:loading="stuAsyncLoading"
|
||||
:loading="loading"
|
||||
>
|
||||
<template #icon
|
||||
><img
|
||||
@@ -62,33 +62,62 @@
|
||||
</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row
|
||||
type="flex"
|
||||
gutter="12"
|
||||
style="padding-left: 20px; margin-right: 0px"
|
||||
>
|
||||
<a-col v-if="type == 15">
|
||||
<a-button
|
||||
class="cus-btn"
|
||||
style="width: 100px; background: #4ea6ff; color: #fff"
|
||||
@click="setPermissions()"
|
||||
>
|
||||
分配查看权
|
||||
</a-button>
|
||||
</a-col>
|
||||
<a-col v-if="type == 16">
|
||||
<a-button
|
||||
class="cus-btn"
|
||||
style="width: 100px; background: #4ea6ff; color: #fff"
|
||||
@click="setPermissions()"
|
||||
>
|
||||
分配管理权
|
||||
</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div style="margin-top: 20px">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="studentList"
|
||||
:pagination="stuPagination"
|
||||
:loading="loading"
|
||||
row-key="id"
|
||||
:row-selection="type == 17 ? null : rowSelection"
|
||||
row-key="workNum"
|
||||
>
|
||||
<template #action="{ record }">
|
||||
<a-space :size="2">
|
||||
<slot name="extension" v-bind:data="{ record }"></slot>
|
||||
<a-button
|
||||
v-if="record.type !== 17"
|
||||
@click="del(record.id)"
|
||||
v-if="type == 17 && record.permission != 17"
|
||||
style="margin-right: 12px"
|
||||
type="link"
|
||||
@click="setPermissions(record)"
|
||||
>转移归属权</a-button
|
||||
>
|
||||
|
||||
<a-button
|
||||
v-else-if="type !== 17 && record.permission"
|
||||
@click="del(record)"
|
||||
type="link"
|
||||
danger
|
||||
>删除</a-button
|
||||
>
|
||||
<div v-else>--</div>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<a-button @click="openDrawer" type="link"><slot></slot></a-button>
|
||||
@@ -127,76 +156,130 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, defineProps, defineExpose, ref, watch } from "vue";
|
||||
import { usePage } from "@/api/request";
|
||||
import { STUDENT_LIST } from "@/api/apis";
|
||||
import {
|
||||
getGrowthUserList,
|
||||
assignPermissions,
|
||||
delAssignPermissions,
|
||||
} from "@/api/growthpath";
|
||||
import { delStudentList } from "@/api/index1";
|
||||
import { useAsyncStu } from "@/utils/useCommon";
|
||||
import { message } from "ant-design-vue";
|
||||
import dialog from "@/utils/dialog";
|
||||
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
id: String,
|
||||
stage: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
types: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const visiable = ref(false);
|
||||
|
||||
const initParams = {
|
||||
studentName: "",
|
||||
pageNo: 1,
|
||||
userName: "",
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
type: props.type || "",
|
||||
types: props.types,
|
||||
pid: props.id || "",
|
||||
growthId: props.id || "",
|
||||
};
|
||||
// 选中数据
|
||||
const stuSelectKeys = ref([]);
|
||||
// 表单选择框配置
|
||||
const rowSelection = computed(() => ({
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: stuSelectKeys.value,
|
||||
onChange: onStuSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
}));
|
||||
// 选择框change
|
||||
const onStuSelectChange = (e) => {
|
||||
stuSelectKeys.value = e;
|
||||
};
|
||||
|
||||
const searchParams = ref(initParams);
|
||||
const searchName = ref("");
|
||||
|
||||
// 转移归属权
|
||||
const setPermissions = (data) => {
|
||||
if (!data && !stuSelectKeys.value.length) {
|
||||
message.warning("请选择用户");
|
||||
return;
|
||||
}
|
||||
const title =
|
||||
props.type == 15
|
||||
? "是否添加查看权"
|
||||
: props.type == 16
|
||||
? "是否添加管理权"
|
||||
: "是否转移归属权";
|
||||
dialog({
|
||||
content: title,
|
||||
ok: () => {
|
||||
let params = {
|
||||
growthId: props.id,
|
||||
userIds: [],
|
||||
permissionType: "",
|
||||
};
|
||||
// 转移归属权
|
||||
if (props.type == 17) {
|
||||
params.userIds = [data.workNum];
|
||||
params.permissionType = "17";
|
||||
}
|
||||
// 设置管理权
|
||||
if (props.type == 16) {
|
||||
params.userIds = stuSelectKeys.value;
|
||||
params.permissionType = "16";
|
||||
}
|
||||
// 设置查看权
|
||||
if (props.type == 15) {
|
||||
params.userIds = stuSelectKeys.value;
|
||||
params.permissionType = "15";
|
||||
}
|
||||
assignPermissions(params)
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
message.success("操作成功");
|
||||
visiable.value = false;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error(err.data.msg);
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
const columns = ref([
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "studentName",
|
||||
key: "studentName",
|
||||
dataIndex: "userName",
|
||||
key: "userName",
|
||||
width: 30,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
dataIndex: "workNum",
|
||||
key: "workNum",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "studentDepartName",
|
||||
key: "studentDepartName",
|
||||
dataIndex: "orgName",
|
||||
key: "orgName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "权限",
|
||||
dataIndex: "type",
|
||||
key: "type",
|
||||
dataIndex: "permission",
|
||||
key: "permission",
|
||||
width: 30,
|
||||
align: "center",
|
||||
customRender: ({ record: { type } }) =>
|
||||
({
|
||||
customRender: ({ record: { permission } }) =>
|
||||
permission
|
||||
? {
|
||||
15: "查看权",
|
||||
16: "管理权",
|
||||
17: "归属权",
|
||||
}[type]),
|
||||
}[permission]
|
||||
: "--",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
@@ -207,54 +290,65 @@ const columns = ref([
|
||||
slots: { customRender: "action" },
|
||||
},
|
||||
]);
|
||||
const studentList = ref([]);
|
||||
const total = ref(0);
|
||||
const loading = ref(false);
|
||||
|
||||
const {
|
||||
data: studentList,
|
||||
fetch: searchStu,
|
||||
total,
|
||||
loading,
|
||||
} = usePage(STUDENT_LIST, searchParams);
|
||||
|
||||
const { loading: stuAsyncLoading } = useAsyncStu(
|
||||
props.id,
|
||||
props.types.join(","),
|
||||
searchStu
|
||||
);
|
||||
// const { loading: stuAsyncLoading } = useAsyncStu(
|
||||
// props.id,
|
||||
// props.types.join(","),
|
||||
// searchStu
|
||||
// );
|
||||
|
||||
const stuPagination = computed(() => ({
|
||||
total: total.value,
|
||||
showSizeChanger: false,
|
||||
current: searchParams.value.pageNo,
|
||||
current: searchParams.value.pageNum,
|
||||
pageSize: searchParams.value.pageSize,
|
||||
onChange: changePagination,
|
||||
}));
|
||||
|
||||
const searchStu = () => {
|
||||
loading.value = true;
|
||||
getGrowthUserList(searchParams.value).then((res) => {
|
||||
console.log(res);
|
||||
studentList.value = res.data.data.records;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
const openDrawer = () => {
|
||||
visiable.value = true;
|
||||
|
||||
console.log(props.type);
|
||||
};
|
||||
|
||||
const changePagination = (page) => {
|
||||
searchParams.value.pageNo = page;
|
||||
searchParams.value.pageNum = page;
|
||||
searchStu();
|
||||
};
|
||||
|
||||
function search() {
|
||||
searchParams.value.studentName = searchName.value;
|
||||
searchParams.value.pageNo = 1;
|
||||
searchParams.value.userName = searchName.value;
|
||||
searchParams.value.pageNum = 1;
|
||||
searchStu();
|
||||
}
|
||||
|
||||
const deleteModalVisible = ref(false);
|
||||
const deleteId = ref(null);
|
||||
function del(id) {
|
||||
function del(row) {
|
||||
deleteModalVisible.value = true;
|
||||
deleteId.value = id;
|
||||
deleteId.value = row.workNum;
|
||||
}
|
||||
|
||||
//确定删除
|
||||
const sureSameModal = () => {
|
||||
if (deleteId.value) {
|
||||
let params = {
|
||||
growthId: props.id,
|
||||
userIds: [deleteId.value],
|
||||
};
|
||||
loading.value = true;
|
||||
delStudentList({ ids: [deleteId.value] }).then(() => {
|
||||
delAssignPermissions(params).then(() => {
|
||||
message.success("删除成功");
|
||||
searchStu();
|
||||
});
|
||||
@@ -274,8 +368,8 @@ const closeDrawer = () => {
|
||||
function reset() {
|
||||
searchParams.value = initParams;
|
||||
searchName.value = "";
|
||||
searchParams.value.studentName = "";
|
||||
searchParams.value.pageNo = 1;
|
||||
searchParams.value.userName = "";
|
||||
searchParams.value.pageNum = 1;
|
||||
searchStu();
|
||||
}
|
||||
|
||||
@@ -289,40 +383,7 @@ defineExpose({
|
||||
loading,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
background-color: #ffffff;
|
||||
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
<style lang="scss">
|
||||
.cus-btn {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
@@ -337,7 +398,6 @@ defineExpose({
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.cus-input {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
@@ -368,8 +428,6 @@ defineExpose({
|
||||
.ant-tabs {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.deleteModal1 {
|
||||
.ant-modal {
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
<div class="main">
|
||||
<div class="minatitl">
|
||||
<div class="up1">请下载</div>
|
||||
<span
|
||||
class="up2"
|
||||
style="cursor: pointer"
|
||||
@click="downloadTemplate"
|
||||
<span class="up2" style="cursor: pointer" @click="downloadTemplate"
|
||||
>模板</span
|
||||
>
|
||||
<div class="up1">,按要求填写数据并导入</div>
|
||||
@@ -38,7 +35,7 @@
|
||||
:multiple="false"
|
||||
@change="handleChange"
|
||||
:data="{
|
||||
growId: Number(courseId),
|
||||
growthId: Number(courseId),
|
||||
type: courseType,
|
||||
}"
|
||||
:showUploadList="false"
|
||||
@@ -101,7 +98,11 @@
|
||||
下载失败数据
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="notMatchUrl != ''" :style="{left:downloadErrUrl !== ''?'181px':'46px'}" class="defeat2">
|
||||
<div
|
||||
v-if="notMatchUrl != ''"
|
||||
:style="{ left: downloadErrUrl !== '' ? '181px' : '46px' }"
|
||||
class="defeat2"
|
||||
>
|
||||
<div class="detext" @click="notDown">下载不匹配的学员</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,17 +118,23 @@
|
||||
}}条数据解析失败
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showBottomBar&¬MatchUrl != ''" class="group_data">
|
||||
<div v-if="showBottomBar && notMatchUrl != ''" class="group_data">
|
||||
<div class="icon">
|
||||
<RightCircleFilled style="color: #4ea6ff;fontSize:18px;" />
|
||||
<RightCircleFilled style="color: #4ea6ff; fontsize: 18px" />
|
||||
</div>
|
||||
<div class="text">
|
||||
待导入学员的岗位与本专业力必修的要求不匹配,是否导入
|
||||
</div>
|
||||
<div class="text">待导入学员的岗位与本专业力必修的要求不匹配,是否导入</div>
|
||||
<div class="right">
|
||||
<!-- <a-radio-group size="small" v-model:value="groupValue" button-style="solid">
|
||||
<a-radio-button style="margin-right:20px;width: 50px;text-align: center;" value="1">是</a-radio-button>
|
||||
<a-radio-button style="width: 50px;text-align: center;" value="0">否</a-radio-button>
|
||||
</a-radio-group> -->
|
||||
<a-switch v-model:checked="groupValue" checkedChildren="是" unCheckedChildren="否" />
|
||||
<a-switch
|
||||
v-model:checked="groupValue"
|
||||
checkedChildren="是"
|
||||
unCheckedChildren="否"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="loadborder">
|
||||
@@ -197,10 +204,14 @@
|
||||
<script>
|
||||
import { computed, reactive, toRefs } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { getImportStatus,saveStudent } from "@/api/growthpath"
|
||||
import {
|
||||
getImportStatus,
|
||||
saveStudent,
|
||||
downLoadImpTemplate,
|
||||
} from "@/api/growthpath";
|
||||
import { useStore } from "vuex";
|
||||
import {getCookieForName} from "@/api/method";
|
||||
import { RightCircleFilled } from '@ant-design/icons-vue';
|
||||
import { getCookieForName } from "@/api/method";
|
||||
import { RightCircleFilled } from "@ant-design/icons-vue";
|
||||
export default {
|
||||
name: "ImportStu",
|
||||
props: {
|
||||
@@ -218,16 +229,16 @@ export default {
|
||||
},
|
||||
},
|
||||
components: {
|
||||
RightCircleFilled
|
||||
RightCircleFilled,
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
const state = reactive({
|
||||
redisKey: '',
|
||||
redisKey: "",
|
||||
locationHref: process.env.VUE_APP_BASE_API,
|
||||
template: process.env.VUE_APP_UP_LOAD_STUDENT_TEMPLATE,
|
||||
importStudent:
|
||||
process.env.VUE_APP_BASE_API + "/admin/grow/importGrowStudentToCache",
|
||||
process.env.VUE_APP_BASE_API + "/professional/allocation/importLearner",
|
||||
timers: "", // 定时器,用于清空定时器使用
|
||||
isAddStudent: false, // 用于判断用户是否关闭弹框需要重新获取学员列表
|
||||
uploadpercent: -1,
|
||||
@@ -237,7 +248,7 @@ export default {
|
||||
succNum: 0, //成功数据数
|
||||
errNum: 0, //失败数据数
|
||||
downloadErrUrl: "",
|
||||
notMatchUrl: '',
|
||||
notMatchUrl: "",
|
||||
showBottomBar: false, // 显示底部成功条数和失败条数
|
||||
fileName: "",
|
||||
groupValue: true,
|
||||
@@ -253,36 +264,59 @@ export default {
|
||||
state.uploadErr = false; //上传失败
|
||||
state.showBottomBar = false;
|
||||
state.downloadErrUrl = "";
|
||||
state.notMatchUrl = '';
|
||||
if(state.redisKey&&state.succNum!=0&&item){
|
||||
state.notMatchUrl = "";
|
||||
if (state.redisKey && state.succNum != 0 && item) {
|
||||
saveStudent({
|
||||
redisKey: state.redisKey,
|
||||
growId: props.courseId,
|
||||
isImportNotMatchStudent: state.groupValue ? 1 : 0
|
||||
}).then(res=>{
|
||||
console.log(res,'res')
|
||||
isImportNotMatchStudent: state.groupValue ? 1 : 0,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "res");
|
||||
// 通知父组件重新获取学员列表
|
||||
message.success("导入成功");
|
||||
ctx.emit("update:AddImpStuvisible", false);
|
||||
ctx.emit("AddImpStuvisibleClose", true);
|
||||
}).catch(err=>{
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error("导入失败");
|
||||
ctx.emit("update:AddImpStuvisible", false);
|
||||
ctx.emit("AddImpStuvisibleClose", false);
|
||||
})
|
||||
}else{
|
||||
});
|
||||
} else {
|
||||
ctx.emit("update:AddImpStuvisible", false);
|
||||
ctx.emit("AddImpStuvisibleClose", false);
|
||||
}
|
||||
state.redisKey = ''
|
||||
state.redisKey = "";
|
||||
state.succNum = 0;
|
||||
state.errNum = 0;
|
||||
state.isAddStudent = false;
|
||||
};
|
||||
const downloadTemplate = () => {
|
||||
console.log(`${process.env.VUE_APP_BOE_API_URL}/upload/files/2024/6/专业力必修-导入学员模版.xlsx`,'xiazai')
|
||||
window.open(`${process.env.VUE_APP_BOE_API_URL}/upload/files/2024/7/专业力必修-录入学员模版.xlsx`);
|
||||
}
|
||||
downLoadImpTemplate().catch((err) => {
|
||||
let blob = new Blob([err.data], {
|
||||
type: "application/vnd.ms-excel",
|
||||
});
|
||||
console.log(blob);
|
||||
let url = window.URL.createObjectURL(blob);
|
||||
|
||||
// 创建a标签并为其添加属性
|
||||
const link = document.createElement("a");
|
||||
link.href = url;
|
||||
link.download = "专业力必修-录入学员模版.xlsx";
|
||||
// 触发点击事件执行下载
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
// 下载完成就删掉a标签
|
||||
document.body.removeChild(link);
|
||||
//释放blob对象
|
||||
window.URL.revokeObjectURL(url);
|
||||
});
|
||||
|
||||
// window.open(
|
||||
// `${process.env.VUE_APP_BOE_API_URL}/upload/files/2024/7/专业力必修-录入学员模版.xlsx`
|
||||
// );
|
||||
};
|
||||
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
@@ -301,11 +335,11 @@ export default {
|
||||
message.error("文件格式错误");
|
||||
return;
|
||||
}
|
||||
if(info.file.size > 50000000){
|
||||
if (info.file.size > 50000000) {
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
message.destroy();
|
||||
message.error("文件大小超出50M,请重新上传")
|
||||
message.error("文件大小超出50M,请重新上传");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -328,17 +362,17 @@ export default {
|
||||
});
|
||||
state.fileName = info.file.name;
|
||||
let i = 0;
|
||||
if(info.file.response.code == 1){
|
||||
if (info.file.response.code == 1) {
|
||||
state.fileList = [];
|
||||
state.addLoading = false;
|
||||
state.uploadpercent = -1;
|
||||
message.destroy();
|
||||
message.error(info.file.response.msg)
|
||||
return
|
||||
message.error(info.file.response.msg);
|
||||
return;
|
||||
}
|
||||
state.timers = setInterval(() => {
|
||||
state.redisKey = info.file.response.data;
|
||||
getImportStatus({redisKey:state.redisKey})
|
||||
getImportStatus({ redisKey: state.redisKey })
|
||||
.then((res) => {
|
||||
console.log("查询导入状态", res);
|
||||
if (res.data.code === 200) {
|
||||
@@ -354,7 +388,7 @@ export default {
|
||||
state.succNum = res.data.data.successNum;
|
||||
state.errNum = res.data.data.failedNum;
|
||||
state.downloadErrUrl = res.data.data.url;
|
||||
state.notMatchUrl = res.data.data.notMatchUrl
|
||||
state.notMatchUrl = res.data.data.notMatchUrl;
|
||||
clearInterval(state.timers);
|
||||
}
|
||||
}
|
||||
@@ -376,14 +410,22 @@ export default {
|
||||
// 下载失败数据
|
||||
const downloadEeeorData = () => {
|
||||
if (state.downloadErrUrl !== "") {
|
||||
window.open(process.env.VUE_APP_BOE_API_URL + '/upload/boe/file' + state.downloadErrUrl);
|
||||
window.open(
|
||||
process.env.VUE_APP_BOE_API_URL +
|
||||
"/upload/boe/file" +
|
||||
state.downloadErrUrl
|
||||
);
|
||||
}
|
||||
};
|
||||
const notDown = () => {
|
||||
if (state.notMatchUrl !== "") {
|
||||
window.open(process.env.VUE_APP_BOE_API_URL + '/upload/boe/file' + state.notMatchUrl);
|
||||
}
|
||||
window.open(
|
||||
process.env.VUE_APP_BOE_API_URL +
|
||||
"/upload/boe/file" +
|
||||
state.notMatchUrl
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//删除
|
||||
const removeUpload = () => {
|
||||
@@ -394,10 +436,10 @@ export default {
|
||||
state.addLoading = false;
|
||||
state.uploadErr = false; //上传失败
|
||||
state.succNum = 0;
|
||||
state.redisKey = ''
|
||||
state.redisKey = "";
|
||||
state.errNum = 0;
|
||||
state.downloadErrUrl = "";
|
||||
state.notMatchUrl = '';
|
||||
state.notMatchUrl = "";
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -503,17 +545,17 @@ export default {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
.group_data{
|
||||
.group_data {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #d9ecff;
|
||||
height: 40px;
|
||||
margin-top: 12px;
|
||||
.icon{
|
||||
.icon {
|
||||
margin: 0 20px;
|
||||
}
|
||||
.text{
|
||||
margin-right:20px;
|
||||
.text {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
.loadstate {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
@change="onSelectChange"
|
||||
@search="handleSearch"
|
||||
@focus="focus"
|
||||
notFoundContent="请先选择标准岗位"
|
||||
allowClear
|
||||
showArrow
|
||||
showSearch
|
||||
@@ -52,7 +53,7 @@ export default {
|
||||
async function fetchOptions(val = "") {
|
||||
try {
|
||||
const data = await getQualsLevelCode({
|
||||
val,
|
||||
stdPosition: val,
|
||||
});
|
||||
options.value = data.data.data.map((item) => {
|
||||
return {
|
||||
@@ -80,8 +81,7 @@ export default {
|
||||
}
|
||||
);
|
||||
function onSelectChange(newVal, postList) {
|
||||
emit("update:value", postList?.key);
|
||||
emit("update:postList", postList);
|
||||
emit("update:value", newVal);
|
||||
}
|
||||
async function handleSearch(val) {
|
||||
console.log(val, "val");
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:mode="multiple"
|
||||
v-model:value="selectedValue"
|
||||
:style="{ width: width || '' }"
|
||||
placeholder="请选择岗位"
|
||||
placeholder="请选择标准岗位"
|
||||
:options="options"
|
||||
@change="onSelectChange"
|
||||
allowClear
|
||||
@@ -18,42 +18,42 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, watch } from 'vue';
|
||||
import { getStdPosition } from "@/api/growthpath"
|
||||
import { ref, watch } from "vue";
|
||||
import { getStdPosition } from "@/api/growthpath";
|
||||
export default {
|
||||
name: 'PostSelect',
|
||||
name: "PostSelect",
|
||||
props: {
|
||||
value: String,
|
||||
multiple: {
|
||||
type: String,
|
||||
default: '',
|
||||
default: "",
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '',
|
||||
default: "",
|
||||
},
|
||||
isTrue: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
emits: ['update:value'],
|
||||
},
|
||||
emits: ["update:value", "update:postList"],
|
||||
setup(props, { emit }) {
|
||||
const selectedValue = ref(props.value);
|
||||
const options = ref([]);
|
||||
|
||||
async function fetchOptions() {
|
||||
try {
|
||||
const data = await getStdPosition({positionName: ''})
|
||||
const data = await getStdPosition({ positionName: "" });
|
||||
options.value = data.data.data.map((item) => {
|
||||
return {
|
||||
id: item.stdPosition,
|
||||
label: item.stdPositionName,
|
||||
value: item.stdPosition,
|
||||
};
|
||||
})
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('error', error);
|
||||
console.error("error", error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,9 +63,9 @@ export default {
|
||||
|
||||
fetchOptions();
|
||||
|
||||
function onSelectChange(newVal,postList ) {
|
||||
emit('update:value', newVal);
|
||||
emit('update:postList', postList);
|
||||
function onSelectChange(newVal, postList) {
|
||||
emit("update:value", newVal);
|
||||
emit("update:postList", postList);
|
||||
}
|
||||
return {
|
||||
selectedValue,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { ref, watchEffect } from 'vue';
|
||||
import { getAllBandInfo } from "@/api/growthpath"
|
||||
import { getStdPosition } from "@/api/growthpath"
|
||||
export default {
|
||||
name: 'RankSelect',
|
||||
props: {
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
|
||||
async function fetchOptions() {
|
||||
try {
|
||||
const data = await getAllBandInfo()
|
||||
const data = await getStdPosition()
|
||||
options.value = data.data.data.map((item) => {
|
||||
return {
|
||||
label: item.bandCode,
|
||||
|
||||
@@ -5,32 +5,20 @@
|
||||
gutter="12"
|
||||
style="padding-left: 20px; margin-right: 0px"
|
||||
>
|
||||
<a-col>
|
||||
<a-form-item title="部门:">
|
||||
<div class="select in" style="width: 270px">
|
||||
<OrgClass v-model:value="tableParam.studentDepartId"></OrgClass>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-item title="选择岗位" style="min-width: 170px">
|
||||
<div class="select in">
|
||||
<PostSelect
|
||||
v-model:value="statusPost"
|
||||
v-model:postList="statusPostMaps"
|
||||
multiple="multiple"
|
||||
>
|
||||
</PostSelect>
|
||||
<PostSelect v-model:value="tableParam.qualsLevelCode"> </PostSelect>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-item title="选择职级" style="min-width: 170px">
|
||||
<div class="select in">
|
||||
<RankSelect
|
||||
v-model:value="statusRanks"
|
||||
v-model:rankList="statusRank"
|
||||
></RankSelect>
|
||||
<OfficeSelect
|
||||
v-model:value="tableParam.stdPosition"
|
||||
:searchData="tableParam.qualsLevelCode"
|
||||
></OfficeSelect>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -38,7 +26,7 @@
|
||||
<a-form-item title="加入方式" style="width: 193px">
|
||||
<div class="select in">
|
||||
<a-select
|
||||
v-model:value="tableParam.source"
|
||||
v-model:value="tableParam.joinMethod"
|
||||
placeholder="请选择加入方式"
|
||||
:options="statusValues"
|
||||
@change="selectstatusValue"
|
||||
@@ -103,7 +91,7 @@
|
||||
<GrowthCommonStudent
|
||||
:type="type"
|
||||
:id="id"
|
||||
@finash="submitCall"
|
||||
@confirm="submitCall"
|
||||
:stage="stage"
|
||||
:coulmsList="coulmsList"
|
||||
:selectStu="true"
|
||||
@@ -158,11 +146,11 @@
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/coursewareManage/export.png"
|
||||
/></template>
|
||||
导出学习信息
|
||||
导出学员信息
|
||||
</a-button>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="1.5">
|
||||
<!-- <a-col :span="1.5">
|
||||
<a-button
|
||||
class="cus-btn"
|
||||
@click="showTexts"
|
||||
@@ -173,9 +161,9 @@
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/projectadd/edit.png"
|
||||
/></template>
|
||||
报名记录
|
||||
导入记录
|
||||
</a-button>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
|
||||
<div class="tips">
|
||||
@@ -188,14 +176,14 @@
|
||||
:pagination="stuPagination"
|
||||
:loading="tableData.loading"
|
||||
:scroll="{ x: 1000 }"
|
||||
row-key="sid"
|
||||
row-key="id"
|
||||
:row-selection="stuRowSelection"
|
||||
:row-class-name="getRowClass"
|
||||
>
|
||||
<template #studyNames="{ record }">
|
||||
<div class="stuName">
|
||||
<span class="name" :title="record.studentName">{{
|
||||
record.studentName
|
||||
<span class="name" :title="record.userNickName">{{
|
||||
record.userNickName
|
||||
}}</span>
|
||||
<a-popover
|
||||
v-if="record.moveStatus"
|
||||
@@ -239,34 +227,29 @@
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<div
|
||||
style="display: flex; justify-content: center; align-items: center"
|
||||
>
|
||||
<a-button
|
||||
@click="seeStudent(record)"
|
||||
style="
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
margin-left: 20px;
|
||||
cursor: pointer;
|
||||
"
|
||||
type="link"
|
||||
style="margin-right: 16px"
|
||||
>
|
||||
查看
|
||||
</div>
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="checkGrowthPer(permissions)"
|
||||
:disabled="record.isLeader === '1'"
|
||||
@click="del(record.sid, record)"
|
||||
@click="del(record)"
|
||||
type="link"
|
||||
>删除
|
||||
</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 查看学员 传入查看学员的id-->
|
||||
<see-stu
|
||||
v-model:Seevisible="Seevisible"
|
||||
v-model:checkStuId="checkStuId"
|
||||
v-model:projectId="projectId"
|
||||
/>
|
||||
<see-stu :permissions="permissions" ref="seeStuRef" />
|
||||
|
||||
<!-- 导入学员抽屉 -->
|
||||
<!-- :courseId="projectTaskInfo.courseId"
|
||||
@@ -277,58 +260,30 @@
|
||||
:courseId="id"
|
||||
:courseType="type"
|
||||
/>
|
||||
|
||||
<!-- 删除弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="deleteModalVisible"
|
||||
:footer="null"
|
||||
wrapClassName="deleteModal1"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
<div class="header">
|
||||
<div class="icon"></div>
|
||||
<span>提示</span>
|
||||
<div class="close_exit" @click="closeSameModal"></div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span>确定删除?</span>
|
||||
<span style="margin-top: 20px">数据删除后不可恢复!</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1" @click="closeSameModal">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2" @click="sureSameModal">
|
||||
<div class="btnText">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<GrowShowText
|
||||
<!-- <GrowShowText
|
||||
:permissions="permissions"
|
||||
@isSearchList="isSearchLists"
|
||||
v-model:showText="showText"
|
||||
/>
|
||||
/> -->
|
||||
</template>
|
||||
<script setup lang="jsx">
|
||||
import { computed, defineProps, onMounted, ref, watch } from "vue";
|
||||
import { delStudentList, getStuPage } from "@/api/index1";
|
||||
import { getGrowStudent, delGrowStudent } from "@/api/growthpath";
|
||||
import {
|
||||
getGrowStudent,
|
||||
delGrowStudent,
|
||||
batchDelStudents,
|
||||
allocationList,
|
||||
addLearners,
|
||||
} from "@/api/growthpath";
|
||||
import GrowthCommonStudent from "./GrowthCommonStudent";
|
||||
import { message } from "ant-design-vue";
|
||||
import SeeStu from "./StudentSeeStu";
|
||||
import OrgClass from "@/components/growthpath/OrgClass";
|
||||
import * as api from "../../api/index1";
|
||||
import ImportStu from "./ImportStu";
|
||||
import { checkGrowthPer } from "@/utils/utils";
|
||||
import { useAsyncStu } from "@/utils/useCommon";
|
||||
import dialog from "@/utils/dialog";
|
||||
import PostSelect from "@/components/growthpath/PostSelect";
|
||||
import RankSelect from "@/components/growthpath/RankSelect";
|
||||
import OfficeSelect from "@/components/growthpath/OfficeSelect";
|
||||
import GrowShowText from "@/components/growthpath/GrowShowText";
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
@@ -393,8 +348,8 @@ const getRowClass = (record) => {
|
||||
const tablecolumns = ref([
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "studentName",
|
||||
key: "studentName",
|
||||
dataIndex: "userNickName",
|
||||
key: "userNickName",
|
||||
width: 100,
|
||||
align: "left",
|
||||
className: "h",
|
||||
@@ -403,8 +358,8 @@ const tablecolumns = ref([
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
dataIndex: "username",
|
||||
key: "username",
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -441,21 +396,17 @@ const tablecolumns = ref([
|
||||
},
|
||||
{
|
||||
title: "加入方式",
|
||||
dataIndex: "source",
|
||||
key: "source",
|
||||
dataIndex: "joinMethod",
|
||||
key: "joinMethod",
|
||||
width: 100,
|
||||
align: "center",
|
||||
customRender: ({ record: { source } }) =>
|
||||
customRender: ({ record: { joinMethod } }) =>
|
||||
({
|
||||
0: "岗位匹配",
|
||||
1: "手动加入",
|
||||
2: "组织添加",
|
||||
3: "受众添加",
|
||||
4: "导入",
|
||||
5: "报名",
|
||||
6: "签到添加",
|
||||
7: "岗位匹配",
|
||||
}[source]),
|
||||
1: "自动匹配",
|
||||
2: "手动添加",
|
||||
3: "导入",
|
||||
4: "添加",
|
||||
}[joinMethod]),
|
||||
},
|
||||
{
|
||||
title: "进度",
|
||||
@@ -532,18 +483,17 @@ const coulmsList = ref([
|
||||
},
|
||||
]);
|
||||
const tableParam = ref({
|
||||
source: null,
|
||||
joinMethod: null,
|
||||
keyword: "", //学员名称
|
||||
// groupName: "", //学员小组
|
||||
studentDepartId: null, //部门
|
||||
// studentDepartName: null, //部门名称
|
||||
topFlag: null, //是否是优秀学员
|
||||
pageNo: 1,
|
||||
pageNum: 1,
|
||||
status: 1,
|
||||
pageSize: 10,
|
||||
type: props.type,
|
||||
// pid: props.id,
|
||||
growId: props.growId,
|
||||
growthId: props.growId,
|
||||
...props.params,
|
||||
bandCodeList: "",
|
||||
positionNameList: "",
|
||||
@@ -564,21 +514,7 @@ const stuRowSelection = computed(() => ({
|
||||
}));
|
||||
|
||||
function search() {
|
||||
tableParam.value.pageNo = 1;
|
||||
if (statusRank.value && statusRank.value.length != 0) {
|
||||
tableParam.value.bandCodeList = statusRank.value
|
||||
.map((item) => item.label)
|
||||
.join(",");
|
||||
} else {
|
||||
tableParam.value.bandCodeList = "";
|
||||
}
|
||||
if (statusPost.value && statusPost.value.length != 0) {
|
||||
tableParam.value.positionNameList = statusPostMaps.value
|
||||
.map((item) => item.value)
|
||||
.join(",");
|
||||
} else {
|
||||
tableParam.value.positionNameList = "";
|
||||
}
|
||||
tableParam.value.pageNum = 1;
|
||||
getStuList();
|
||||
}
|
||||
|
||||
@@ -624,24 +560,21 @@ const stuPagination = computed(() => ({
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
current: tableParam.value.pageNo,
|
||||
current: tableParam.value.pageNum,
|
||||
pageSize: tableParam.value.pageSize,
|
||||
onChange: changePagination,
|
||||
}));
|
||||
|
||||
function changePagination(page, pageSize) {
|
||||
tableParam.value.pageNo = page;
|
||||
tableParam.value.pageNum = page;
|
||||
tableParam.value.pageSize = pageSize;
|
||||
getStuList();
|
||||
}
|
||||
const statusPost = ref([]);
|
||||
const statusPostMaps = ref([]);
|
||||
const statusRank = ref([]);
|
||||
const statusRanks = ref([]);
|
||||
|
||||
function getStuList() {
|
||||
tableData.value.loading = true;
|
||||
console.log("tableParam.value", tableParam.value);
|
||||
getGrowStudent(tableParam.value)
|
||||
allocationList(tableParam.value)
|
||||
.then((res) => {
|
||||
console.log("学员管理-获取学员", res.data);
|
||||
tableData.value.total = res.data.data.total;
|
||||
@@ -656,16 +589,12 @@ function getStuList() {
|
||||
function reset() {
|
||||
tableParam.value.keyword = "";
|
||||
// tableParam.value.groupName = ""; //学员小组
|
||||
tableParam.value.studentDepartId = null; //部门
|
||||
// tableParam.value.studentDepartName = null; //部门
|
||||
tableParam.value.topFlag = null; //是否是优秀学员
|
||||
tableParam.value.bandCodeList = "";
|
||||
tableParam.value.positionNameList = "";
|
||||
tableParam.value.source = null;
|
||||
statusRank.value = [];
|
||||
statusRanks.value = [];
|
||||
statusPost.value = [];
|
||||
statusPostMaps.value = [];
|
||||
tableParam.value.joinMethod = null;
|
||||
tableParam.value.qualsLevelCode = null;
|
||||
tableParam.value.stdPosition = null;
|
||||
getStuList();
|
||||
}
|
||||
|
||||
@@ -680,93 +609,61 @@ function bathDel() {
|
||||
// .filter((item) => item.isLeader === "1");
|
||||
// if (arr.length > 0) {
|
||||
// return message.warning(
|
||||
// "选择人员中:" + arr[0].studentName + "是小组长,请勿删除!"
|
||||
// "选择人员中:" + arr[0].userNickName + "是小组长,请勿删除!"
|
||||
// );
|
||||
// }
|
||||
dialog({
|
||||
content: "确定删除吗?",
|
||||
ok: () => {
|
||||
tableData.value.loading = true;
|
||||
delGrowStudent({
|
||||
ids: stuSelectKeys.value,
|
||||
type: props.type,
|
||||
targetId: props.id,
|
||||
}).then((res) => {
|
||||
batchDelStudents(stuSelectKeys.value.toString()).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
message.success("删除成功");
|
||||
}
|
||||
stuSelectKeys.value = [];
|
||||
tableParam.value.pageNo = 1;
|
||||
tableParam.value.pageNum = 1;
|
||||
getStuList();
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const deleteModalVisible = ref(false);
|
||||
const deleteId = ref(null);
|
||||
const deleteTargetId = ref(null);
|
||||
const deleteType = ref(null);
|
||||
|
||||
function del(id, row) {
|
||||
function del(row) {
|
||||
// if (row.isLeader === "1") {
|
||||
// return message.warning("" + row.name + "是小组长,请勿删除!");
|
||||
// }
|
||||
deleteModalVisible.value = true;
|
||||
deleteId.value = id;
|
||||
deleteTargetId.value = row.pid;
|
||||
deleteType.value = row.type;
|
||||
}
|
||||
|
||||
//确定删除
|
||||
const sureSameModal = () => {
|
||||
if (deleteId.value) {
|
||||
dialog({
|
||||
content: "确定删除吗?",
|
||||
ok: () => {
|
||||
tableData.value.loading = true;
|
||||
delGrowStudent({
|
||||
ids: [deleteId.value],
|
||||
targetId: deleteTargetId.value,
|
||||
type: deleteType.value,
|
||||
}).then((res) => {
|
||||
batchDelStudents(row.id).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
message.success("删除成功");
|
||||
}
|
||||
tableParam.value.pageNo = 1;
|
||||
getStuList();
|
||||
});
|
||||
deleteModalVisible.value = false;
|
||||
}
|
||||
};
|
||||
//取消
|
||||
const closeSameModal = () => {
|
||||
deleteModalVisible.value = false;
|
||||
deleteId.value = null;
|
||||
deleteTargetId.value = null;
|
||||
deleteType.value = null;
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function submitCall(flag) {
|
||||
|
||||
function submitCall(selectList) {
|
||||
tableData.value.loading = true;
|
||||
if (!flag) {
|
||||
addLearners({
|
||||
growthId: props.id,
|
||||
studentIds: selectList.map((item) => item.userNo),
|
||||
}).then((res) => {
|
||||
tableData.value.loading = false;
|
||||
}
|
||||
flag && getStuList();
|
||||
// flag && start();
|
||||
message.success("添加成功");
|
||||
getStuList();
|
||||
});
|
||||
}
|
||||
|
||||
// 查看学员
|
||||
const Seevisible = ref(false);
|
||||
const checkStuId = ref(null);
|
||||
const projectId = ref(null);
|
||||
const seeStuRef = ref(false);
|
||||
|
||||
function seeStudent(record) {
|
||||
console.log(record);
|
||||
checkStuId.value = record.id;
|
||||
projectId.value = props.id;
|
||||
Seevisible.value = true;
|
||||
|
||||
console.log(props.type);
|
||||
|
||||
console.log(checkStuId.value, projectId.value);
|
||||
seeStuRef.value.openDrawer(record);
|
||||
}
|
||||
|
||||
//导入学员
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="Seevisible"
|
||||
:visible="seevisible"
|
||||
class="drawerStyle seestu"
|
||||
placement="right"
|
||||
width="70%"
|
||||
@@ -23,50 +23,38 @@
|
||||
<div class="portrait">
|
||||
<img
|
||||
style="width: 80px; height: 80px; border-radius: 50%"
|
||||
v-if="info?.studentAvatar"
|
||||
v-if="info?.avatar"
|
||||
:src="
|
||||
info?.studentAvatar.includes('upload')
|
||||
? info?.studentAvatar
|
||||
: '/upload' + info?.studentAvatar
|
||||
info?.avatar.includes('upload')
|
||||
? info?.avatar
|
||||
: '/upload' + info?.avatar
|
||||
"
|
||||
alt=""
|
||||
/>
|
||||
<img v-else src="../../assets/images/studentimg/character.png" />
|
||||
</div>
|
||||
<div class="stumation">
|
||||
<div class="stuname">{{ info.studentName }}</div>
|
||||
<div class="stuname">{{ info.username }}</div>
|
||||
<div class="stugangw">
|
||||
{{ info.studentJobName }} —— {{ info.studentBandCode }}
|
||||
{{ info.stdPositionName }}
|
||||
</div>
|
||||
<div class="stugangw">归属组织: {{ info.orgName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; margin-right: 207px">
|
||||
<!-- <div class="sortbox">
|
||||
<div class="sortname">进度排名</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{ info.processRankingOrder || 0 }}</span>
|
||||
<span class="total">/{{ info.processRankingBase || 0 }}</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <a-divider type="vertical" style="
|
||||
height: 49px;
|
||||
margin-left: 34px;
|
||||
background-color: rgba(170, 166, 166, 0.3);
|
||||
"/> -->
|
||||
<div class="sortbox" style="margin-left: 34px">
|
||||
<div class="sortname">完成必修</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{ info.finishReqTaskNum || 0 }}</span>
|
||||
<span class="total">/{{ info.reqTaskNum || 0 }}</span>
|
||||
<span class="nub1">{{
|
||||
info.requiredCompletionNumber || 0
|
||||
}}</span>
|
||||
<span class="total">/{{ info.requiredNumber || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="secondrow">
|
||||
<div class="rowleft">{{ info?.projectInfo?.name }}</div>
|
||||
</div> -->
|
||||
<div class="mainbox">
|
||||
<div class="main_title">{{ info?.growName }}</div>
|
||||
<div class="main_title">任务列表</div>
|
||||
<a-collapse
|
||||
style="border: 1px solid #ddeeff; border-radius: 6px"
|
||||
v-model:activeKey="stageListActive"
|
||||
@@ -82,158 +70,173 @@
|
||||
/>
|
||||
<div></div>
|
||||
</template>
|
||||
<div
|
||||
class="rowclass"
|
||||
v-for="(item, key) in info?.growStudentDetailTaskBoList"
|
||||
:key="key"
|
||||
</a-collapse>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="info.studentTasksList"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #courseType="{ record }">
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
"
|
||||
>
|
||||
<div class="leftclass">
|
||||
<div>
|
||||
<img
|
||||
:src="
|
||||
item.taskType === 1
|
||||
record.courseType == 1
|
||||
? require('../../assets/images/leveladd/zai.png')
|
||||
: item.taskType === 2
|
||||
: record.courseType == 2
|
||||
? require('../../assets/images/leveladd/mian.png')
|
||||
: item.taskType === 3
|
||||
: record.courseType == 3
|
||||
? require('../../assets/images/leveladd/an.png')
|
||||
: item.taskType === 4
|
||||
: record.courseType == 4
|
||||
? require('../../assets/images/leveladd/zuo.png')
|
||||
: item.taskType === 5
|
||||
: record.courseType == 5
|
||||
? require('../../assets/images/leveladd/kao.png')
|
||||
: item.taskType === 6
|
||||
: record.courseType == 6
|
||||
? require('../../assets/images/leveladd/zhi.png')
|
||||
: item.taskType === 7
|
||||
: record.courseType == 7
|
||||
? require('../../assets/images/leveladd/wai.png')
|
||||
: item.taskType === 8
|
||||
: record.courseType == 8
|
||||
? require('../../assets/images/leveladd/tao.png')
|
||||
: item.taskType === 9
|
||||
: record.courseType == 9
|
||||
? require('../../assets/images/leveladd/huo.png')
|
||||
: item.taskType === 10
|
||||
: record.courseType == 10
|
||||
? require('../../assets/images/leveladd/ce.png')
|
||||
: item.taskType === 11
|
||||
: record.courseType == 11
|
||||
? require('../../assets/images/leveladd/diao.png')
|
||||
: item.taskType === 12
|
||||
: record.courseType == 12
|
||||
? require('../../assets/images/leveladd/tou.png')
|
||||
: item.taskType === 13
|
||||
: record.courseType == 13
|
||||
? require('../../assets/images/leveladd/xiangmu.png')
|
||||
: null
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="text1">{{ item.taskTypeName }}</div>
|
||||
<div class="text2" :title="item.taskName">
|
||||
{{ item.taskName }}
|
||||
<div style="padding-left: 12px">
|
||||
{{ TASK_TYPE[record.courseType].name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="begin_time">
|
||||
<div class="text1">开始时间</div>
|
||||
<div class="text1">
|
||||
{{ item?.taskBeginTime?.split(".")[0] || "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="begin_time">
|
||||
<div class="text1">完成时间</div>
|
||||
<div class="text1">
|
||||
{{ item?.taskFinishTime?.split(".")[0] || "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img
|
||||
:src="
|
||||
item.status === 1
|
||||
? require('../../assets/images/studentimg/complete.png')
|
||||
: require('../../assets/images/studentimg/notice.png')
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<template
|
||||
v-if="
|
||||
record.completionStatus == 2 && checkGrowthPer(permissions)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="altext">
|
||||
{{
|
||||
item.taskFinishStatus === 2
|
||||
? "进行中"
|
||||
: item.taskFinishStatus === 1
|
||||
? "已完成"
|
||||
: "未开始"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-if="true" class="biit">
|
||||
<div class="altext">标记已完成</div>
|
||||
<div style="text-align: center;">
|
||||
<a-switch size="small" v-model:checked="checked"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="width: 70px;"></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</a-collapse>
|
||||
>
|
||||
<a-button type="link" @click="setPermissions(record)"
|
||||
>标记已完成</a-button
|
||||
>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div>--</div>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<pro-mess v-model:Provisible="Provisible" />
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, watch } from "vue";
|
||||
// import ProMess from "./ProMess.vue";
|
||||
import { reactive, toRefs, watch, ref } from "vue";
|
||||
import { getGrowStudentDetail } from "@/api/growthpath";
|
||||
import { message } from "ant-design-vue";
|
||||
import { TASK_TYPE } from "@/utils/constGrown";
|
||||
import { checkGrowthPer } from "@/utils/utils";
|
||||
export default {
|
||||
name: "SeeStu",
|
||||
components: {},
|
||||
props: {
|
||||
Seevisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
studentId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
growId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
certificateNum: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
permissions: String,
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
checked: false,
|
||||
seevisible: false,
|
||||
loading: false,
|
||||
info: {},
|
||||
Provisible: false,
|
||||
stageListActive: 0,
|
||||
rank: {
|
||||
total: 0,
|
||||
current: 0,
|
||||
finishCompulsoryNum: 0,
|
||||
totalCompulsoryNum: 0,
|
||||
certNum: 0,
|
||||
TASK_TYPE: TASK_TYPE,
|
||||
});
|
||||
const columns = ref([
|
||||
{
|
||||
title: "类型",
|
||||
dataIndex: "courseType",
|
||||
key: "courseType",
|
||||
width: 80,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
slots: { customRender: "courseType" },
|
||||
},
|
||||
});
|
||||
watch([() => props.studentId, () => props.growId], () => {
|
||||
check();
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:Seevisible", false);
|
||||
};
|
||||
const showProMess = () => {
|
||||
state.Provisible = true;
|
||||
};
|
||||
const check = () => {
|
||||
{
|
||||
title: "任务名称",
|
||||
dataIndex: "taskName",
|
||||
key: "taskName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "必修/选修",
|
||||
dataIndex: "taskType",
|
||||
key: "taskType",
|
||||
width: 30,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: ({ record: { taskType } }) =>
|
||||
({
|
||||
1: "必修",
|
||||
2: "选修",
|
||||
}[taskType]),
|
||||
},
|
||||
{
|
||||
title: "开始时间",
|
||||
dataIndex: "startTime",
|
||||
key: "startTime",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "finishTime",
|
||||
key: "finishTime",
|
||||
width: 50,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "任务状态",
|
||||
dataIndex: "completionStatus",
|
||||
key: "completionStatus",
|
||||
width: 30,
|
||||
align: "center",
|
||||
customRender: ({ record: { completionStatus } }) =>
|
||||
({
|
||||
2: "进行中",
|
||||
1: "已完成",
|
||||
0: "未开始",
|
||||
}[completionStatus]),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
width: 50,
|
||||
align: "center",
|
||||
slots: { customRender: "action" },
|
||||
},
|
||||
]);
|
||||
const openDrawer = (row) => {
|
||||
state.seevisible = true;
|
||||
state.loading = true;
|
||||
props.growId &&
|
||||
props.studentId &&
|
||||
getGrowStudentDetail({ growId: props.growId, sid: props.studentId })
|
||||
getGrowStudentDetail({ id: row.id })
|
||||
.then((res) => {
|
||||
state.loading = false;
|
||||
state.info = res.data.data;
|
||||
@@ -243,11 +246,16 @@ export default {
|
||||
message.error(err.data.msg);
|
||||
});
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
state.seevisible = false;
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
showProMess,
|
||||
openDrawer,
|
||||
columns,
|
||||
checkGrowthPer,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -268,6 +276,18 @@ export default {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.ant-table-row .ant-table-cell {
|
||||
height: 48px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4f5156;
|
||||
line-height: 29px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.ant-table-thead tr th {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="Avisible"
|
||||
class="drawerStyle addgroup"
|
||||
:visible="avisible"
|
||||
class="drawerStyle update-record"
|
||||
placement="right"
|
||||
width="80%"
|
||||
>
|
||||
@@ -33,7 +33,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<div class="btn btn1" @click="searchLearnPath">
|
||||
<div class="btn btn1" @click="getList">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
@@ -47,52 +47,72 @@
|
||||
<a-table
|
||||
:columns="tableColumns"
|
||||
:data-source="tableData"
|
||||
:pagination="false"
|
||||
:pagination="pagination"
|
||||
></a-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, watch, ref } from "vue";
|
||||
import { reactive, toRefs, computed, ref, onMounted } from "vue";
|
||||
import { modifyList } from "@/api/growthpath";
|
||||
export default {
|
||||
name: "UpdateRecord",
|
||||
props: {
|
||||
Avisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
nameUserNo: null,
|
||||
searchdate: [],
|
||||
avisible: false,
|
||||
growthId: null,
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
total: 0,
|
||||
});
|
||||
const pagination = computed(() => ({
|
||||
total: state.total,
|
||||
showSizeChanger: false,
|
||||
current: state.pageNum,
|
||||
pageSize: state.pageSize,
|
||||
onChange: changePagination,
|
||||
}));
|
||||
const tableData = ref([]);
|
||||
const getList = () => {
|
||||
modifyList({
|
||||
growthId: state.growthId,
|
||||
pageSize: state.pageSize,
|
||||
pageNum: state.pageNum,
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
tableData.value = res.data.data.records;
|
||||
state.total = res.data.data.total;
|
||||
});
|
||||
};
|
||||
const changePagination = (page) => {
|
||||
state.pageNum = page;
|
||||
getList();
|
||||
};
|
||||
|
||||
const tableColumns = ref([
|
||||
{
|
||||
title: "操作内容",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
dataIndex: "operationContent",
|
||||
key: "operationContent",
|
||||
width: "80px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "操作人",
|
||||
dataIndex: "age",
|
||||
key: "age",
|
||||
dataIndex: "createName",
|
||||
key: "createName",
|
||||
width: "150px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "操作时间",
|
||||
dataIndex: "age",
|
||||
key: "age",
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
width: "150px",
|
||||
align: "center",
|
||||
},
|
||||
@@ -100,32 +120,41 @@ export default {
|
||||
const searchTimeChange = (e) => {
|
||||
console.log(e, "eeeee");
|
||||
};
|
||||
const searchLearnPath = () => {};
|
||||
const resetLearnPath = () => {
|
||||
state.nameUserNo = null;
|
||||
state.searchdate = [];
|
||||
searchLearnPath();
|
||||
state.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
state.nameUserNo = null;
|
||||
state.searchdate = [];
|
||||
ctx.emit("update:Avisible", false);
|
||||
state.avisible = false;
|
||||
};
|
||||
const open = (row) => {
|
||||
state.growthId = row.id;
|
||||
state.avisible = true;
|
||||
getList();
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
open,
|
||||
tableColumns,
|
||||
searchTimeChange,
|
||||
searchLearnPath,
|
||||
resetLearnPath,
|
||||
getList,
|
||||
tableData,
|
||||
pagination,
|
||||
changePagination,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.addgroup {
|
||||
.update-record {
|
||||
.ant-drawer-content-wrapper {
|
||||
// max-width: 1000px;
|
||||
.ant-drawer-header {
|
||||
@@ -142,7 +171,12 @@ export default {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 73px;
|
||||
z-index: 9999;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<div class="growthpath">
|
||||
<div class="filterItems">
|
||||
<div class="select multi" style="min-width: 264px; height: 40px">
|
||||
<PostSelectNew v-model:value="statusPost">
|
||||
</PostSelectNew>
|
||||
<PostSelectNew v-model:value="statusPost"> </PostSelectNew>
|
||||
</div>
|
||||
<div class="select multi" style="min-width: 181px; height: 40px">
|
||||
<!-- <RankSelect
|
||||
@@ -11,13 +10,6 @@
|
||||
></RankSelect> -->
|
||||
<OfficeSelect v-model:value="statusOffice" :searchData="statusPost" />
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-input
|
||||
style="width: 181px; height: 40px; border-radius: 8px"
|
||||
v-model:value="nameOrUserNo"
|
||||
placeholder="请输入创建人姓名/工号"
|
||||
/>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="statusValue"
|
||||
@@ -70,29 +62,17 @@
|
||||
>管理</a-button
|
||||
>
|
||||
<DropDown v-if="record?.permissions?.includes('17')" value="授权">
|
||||
<OwnerTableModelStudent
|
||||
:types="[15, 16, 17]"
|
||||
:id="record.id"
|
||||
:type="17"
|
||||
>归属权</OwnerTableModelStudent
|
||||
<TableModelStudent :id="record.id" :type="17"
|
||||
>归属权</TableModelStudent
|
||||
>
|
||||
<CommonStudent
|
||||
:type="15"
|
||||
:selectStu="true"
|
||||
:id="record.id"
|
||||
title="查看权"
|
||||
>查看权</CommonStudent
|
||||
<TableModelStudent :id="record.id" :type="15"
|
||||
>查看权</TableModelStudent
|
||||
>
|
||||
<CommonStudent
|
||||
:type="16"
|
||||
:id="record.id"
|
||||
:selectStu="true"
|
||||
title="管理权"
|
||||
>管理权</CommonStudent
|
||||
<TableModelStudent :id="record.id" :type="16"
|
||||
>管理权</TableModelStudent
|
||||
>
|
||||
</DropDown>
|
||||
<a-dropdown
|
||||
v-if="checkGrowthPer(record.permissions)"
|
||||
:getPopupContainer="(triggerNode) => triggerNode.parentNode"
|
||||
:trigger="['click']"
|
||||
>
|
||||
@@ -102,7 +82,12 @@
|
||||
</a>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" v-if="record.isPublished">
|
||||
<a-menu-item
|
||||
key="1"
|
||||
v-if="
|
||||
record.isPublished && checkGrowthPer(record.permissions)
|
||||
"
|
||||
>
|
||||
<a-button type="link" @click="withdraw(record)">
|
||||
撤回
|
||||
</a-button>
|
||||
@@ -142,7 +127,7 @@
|
||||
v-model:visible="bg_check"
|
||||
:footer="null"
|
||||
closable="false"
|
||||
style="margin-top: 400px"
|
||||
style="margin-top: 350px"
|
||||
@cancel="of_exit"
|
||||
>
|
||||
<div
|
||||
@@ -218,7 +203,7 @@
|
||||
</div>
|
||||
<div class="bg_body_bt">
|
||||
<div class="bg_body_bttext">
|
||||
<span>完成选修</span>
|
||||
<span>完成选修数量</span>
|
||||
</div>
|
||||
<div class="bg_body_input">
|
||||
<a-input-number
|
||||
@@ -244,15 +229,15 @@
|
||||
<div class="bg_body_input">
|
||||
<a-radio-group v-model:value="matchRules">
|
||||
<div style="display: flex">
|
||||
<a-radio :value="1" style="margin-bottom: 15px"
|
||||
<a-radio value="1" style="margin-bottom: 15px"
|
||||
>自动匹配学员</a-radio
|
||||
><br />
|
||||
<a-radio :value="2">不自动匹配学员</a-radio>
|
||||
<a-radio value="2">不自动匹配学员</a-radio>
|
||||
</div>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="bg_body_bt" style="align-items: flex-start">
|
||||
<div class="bg_body_bt" style="align-items: flex-start">
|
||||
<div class="bg_body_bttext">
|
||||
<div class="bg_body_btimg">
|
||||
<img
|
||||
@@ -263,13 +248,16 @@
|
||||
<span>选择模板</span>
|
||||
</div>
|
||||
<div class="bg_body_input">
|
||||
<a-radio-group v-model:value="matchRules">
|
||||
<a-radio :value="1" style="margin-bottom: 15px">路径图</a-radio
|
||||
<a-radio-group v-model:value="template">
|
||||
<div style="display: flex">
|
||||
<a-radio :value="1" style="margin-bottom: 15px"
|
||||
>路径图</a-radio
|
||||
><br />
|
||||
<a-radio :value="2">任务列表</a-radio>
|
||||
</div>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="bg_body_bt" style="align-items: flex-start">
|
||||
<div class="bg_body_bttext">
|
||||
<span>说明</span>
|
||||
@@ -306,7 +294,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<UpdateRecord v-model:Avisible="Avisible" />
|
||||
<UpdateRecord ref="UpdateRecordRef" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -322,18 +310,13 @@ import OfficeSelect from "@/components/growthpath/OfficeSelect";
|
||||
import { checkGrowthPer } from "@/utils/utils";
|
||||
import DropDown from "@/components/growthpath/GrowthDropDown";
|
||||
import CommonStudent from "@/components/growthpath/GrowthCommonStudent";
|
||||
import OwnerTableModelStudent from "@/components/growthpath/GrowthOwnerTable";
|
||||
import TableModelStudent from "@/components/growthpath/GrowthTableModel";
|
||||
import UpdateRecord from "@/components/growthpath/UpdateRecord";
|
||||
import { useStore } from "vuex";
|
||||
import {
|
||||
listData,
|
||||
addEdit,
|
||||
getEditData,
|
||||
handleGrowth,
|
||||
getPublishInfo,
|
||||
getCopyData,
|
||||
copyCreate,
|
||||
published,
|
||||
withdrawal,
|
||||
updatePostInfomation,
|
||||
} from "@/api/growthpath";
|
||||
export default {
|
||||
@@ -345,7 +328,7 @@ export default {
|
||||
RankSelect,
|
||||
DropDown,
|
||||
CommonStudent,
|
||||
OwnerTableModelStudent,
|
||||
TableModelStudent,
|
||||
UpdateRecord,
|
||||
OfficeSelect,
|
||||
},
|
||||
@@ -360,7 +343,6 @@ export default {
|
||||
const state = reactive({
|
||||
band: null,
|
||||
statusOffices: null,
|
||||
Avisible: false,
|
||||
bg_check: false,
|
||||
statusPostCreate: [],
|
||||
statusRankCreate: [],
|
||||
@@ -368,14 +350,14 @@ export default {
|
||||
matStudens: "",
|
||||
pathWays: "",
|
||||
statusPost: null,
|
||||
matchRules: "1",
|
||||
template: "1",
|
||||
statusPostMaps: [],
|
||||
statusPosts: null,
|
||||
statusPostsIds: null,
|
||||
editId: null,
|
||||
statusPostList: null,
|
||||
statusRank: [],
|
||||
statusOffice: null,
|
||||
nameOrUserNo: null,
|
||||
statusRanks: [],
|
||||
rankList: [],
|
||||
bandLists: [],
|
||||
@@ -408,8 +390,8 @@ export default {
|
||||
});
|
||||
};
|
||||
const statusValues = ref([
|
||||
{ value: "1", label: "已发布" },
|
||||
{ value: "0", label: "未发布" },
|
||||
{ value: true, label: "已发布" },
|
||||
{ value: false, label: "未发布" },
|
||||
]);
|
||||
const columns = ref([
|
||||
{
|
||||
@@ -464,17 +446,23 @@ export default {
|
||||
let params = {
|
||||
pageNum: state.pageNum,
|
||||
pageSize: state.pageSize,
|
||||
stdPosition: state.statusOffice,
|
||||
isPublished: state.statusValue,
|
||||
positionIdList: state.statusPostMaps.map((item) => item.id), //岗位
|
||||
bandIdList: state.statusRank, //职级
|
||||
qualsLevelCode: state.statusPost,
|
||||
};
|
||||
console.log(store);
|
||||
// 判断当前用户是否是专业力必修角色管理员,如果不是查询列表时需传入员工工号
|
||||
let find = store.state.userInfo.roleList.find(
|
||||
(item) => item.roleCode === "admin-growth"
|
||||
);
|
||||
if (!find) {
|
||||
params.username = store.state.userInfo.userNo;
|
||||
}
|
||||
await listData(params).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
// 临时权限
|
||||
state.dataList = res.data.data.records.map((item) => {
|
||||
item.permissions = "15,16,17";
|
||||
return item;
|
||||
});
|
||||
state.dataList = res.data.data.records;
|
||||
state.total = res.data.data.total;
|
||||
state.loadingList = false;
|
||||
}
|
||||
@@ -486,7 +474,6 @@ export default {
|
||||
};
|
||||
const resetList = () => {
|
||||
state.statusValue = null;
|
||||
state.statusPostMaps = [];
|
||||
state.statusPost = null;
|
||||
state.statusRank = [];
|
||||
state.pageNum = 1;
|
||||
@@ -506,6 +493,7 @@ export default {
|
||||
state.courseNum = record.electivesCompletedNum;
|
||||
state.pathWays = record.description;
|
||||
state.band = record.bandCodes;
|
||||
state.matchRules = record.matchRules;
|
||||
state.bg_check = true;
|
||||
};
|
||||
// 确定
|
||||
@@ -521,16 +509,19 @@ export default {
|
||||
qualsLevelCode: state.statusOffices,
|
||||
electivesCompletedNum: state.courseNum,
|
||||
description: state.pathWays,
|
||||
matchRules: state.matchRules,
|
||||
id: state.editId ? state.editId : null,
|
||||
template: state.template,
|
||||
};
|
||||
updatePostInfomation(params)
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data.flag == 1) {
|
||||
if (state.matchRules == 1) {
|
||||
message.warning("自动匹配学员为异步添加,请稍后手动刷新学员");
|
||||
}
|
||||
message.success("保存成功");
|
||||
listDatas()
|
||||
state.bg_check = false;
|
||||
listDatas();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -539,7 +530,6 @@ export default {
|
||||
// of_exit()
|
||||
};
|
||||
const of_exit = () => {
|
||||
state.statusPostsIds = null;
|
||||
state.statusPosts = null;
|
||||
state.statusOffices = null;
|
||||
state.statusPostList = null;
|
||||
@@ -548,7 +538,7 @@ export default {
|
||||
state.bandLists = [];
|
||||
state.organCreateName = null;
|
||||
state.courseNum = "";
|
||||
state.matchRules = ''
|
||||
state.matchRules = "1";
|
||||
state.pathWays = "";
|
||||
state.bg_check = false;
|
||||
state.editId = null;
|
||||
@@ -570,10 +560,7 @@ export default {
|
||||
content: "确定撤回?",
|
||||
contentTwo: "撤回后学员进度保留,发布后可继续学习",
|
||||
ok: () => {
|
||||
handleGrowth({
|
||||
growId: record.id,
|
||||
type: 0,
|
||||
}).then((res) => {
|
||||
withdrawal(record.id).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
message.success("撤回成功");
|
||||
listDatas();
|
||||
@@ -582,9 +569,11 @@ export default {
|
||||
},
|
||||
});
|
||||
};
|
||||
// 查看修改记录
|
||||
const UpdateRecordRef = ref(null);
|
||||
const updateList = (record) => {
|
||||
console.log(record, "record");
|
||||
state.Avisible = true;
|
||||
UpdateRecordRef.value.open(record);
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
@@ -603,6 +592,7 @@ export default {
|
||||
updateList,
|
||||
withdraw,
|
||||
releaseLearnPath,
|
||||
UpdateRecordRef,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div
|
||||
class="pubIcon"
|
||||
v-if="checkGrowthPer(preId)"
|
||||
@click="basicData.isPublished ? resize() : pubReviw()"
|
||||
@click="basicData.isPublished ? resize() : releaseLearnPath()"
|
||||
>
|
||||
<img
|
||||
v-if="!basicData.isPublished"
|
||||
@@ -71,13 +71,6 @@
|
||||
src="../../assets/images/growthpath/addStudent.png"
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
class="btn"
|
||||
v-if="!basicData.isPublished == 0"
|
||||
@click="pubReviw"
|
||||
src="../../assets/images/growthpath/pushJob.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="width: 100%; margin-top: 30px">
|
||||
@@ -91,18 +84,18 @@
|
||||
</div>
|
||||
<div class="second">
|
||||
<div class="nubbox">
|
||||
<div class="nub1">{{ overviewData?.totalStudentCnt || 0 }}</div>
|
||||
<div class="nub1">{{ overviewData?.studentNum || 0 }}</div>
|
||||
<div class="nub2">总人数</div>
|
||||
</div>
|
||||
<div class="nubbox">
|
||||
<div class="nub1" style="color: #ff90ae">
|
||||
{{ overviewData?.studyStudentCnt || 0 }}
|
||||
{{ overviewData?.learnNum || 0 }}
|
||||
</div>
|
||||
<div class="nub2">学习人数</div>
|
||||
</div>
|
||||
<div class="nubbox">
|
||||
<div class="nub1" style="color: #409eff">
|
||||
{{ overviewData?.completeStudentCnt || 0 }}
|
||||
{{ overviewData?.completedNum || 0 }}
|
||||
</div>
|
||||
<div class="nub2">完成人数</div>
|
||||
</div>
|
||||
@@ -120,9 +113,7 @@
|
||||
</div> -->
|
||||
<div class="nubbox">
|
||||
<div class="nub1" style="color: #564aff">
|
||||
{{
|
||||
((overviewData?.totalCompleteRatio || 0) * 100).toFixed(2)
|
||||
}}%
|
||||
{{ ((overviewData?.completedRate || 0) * 100).toFixed(2) }}%
|
||||
</div>
|
||||
<div class="nub2">总完成率</div>
|
||||
</div>
|
||||
@@ -348,7 +339,43 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operations">
|
||||
<div class="first" v-if="checkGrowthPer(preId)">
|
||||
<template v-if="element.superiorTaskName">
|
||||
<div style="margin-right: 8px">
|
||||
{{ element.superiorTaskName }}
|
||||
</div>
|
||||
<CloseCircleOutlined
|
||||
@click="selectSuperiorTask(element)"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-dropdown :trigger="['click']">
|
||||
<div>
|
||||
<a-button type="link">
|
||||
选择需解锁的上级任务
|
||||
</a-button>
|
||||
<DownOutlined
|
||||
:style="{
|
||||
color: '#1890ff',
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item
|
||||
v-for="i of listTaskData"
|
||||
@click="selectSuperiorTask(element, i)"
|
||||
:disabled="element.id == i.id"
|
||||
>
|
||||
<a href="javascript:;">{{ i.taskName }}</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</div>
|
||||
<div class="operations" v-if="checkGrowthPer(preId)">
|
||||
<div
|
||||
class="operation"
|
||||
@click="openCourse(element, index)"
|
||||
@@ -364,6 +391,13 @@
|
||||
二维码
|
||||
</div>
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer; margin-right: 35px"
|
||||
@click="showOnline(element)"
|
||||
>
|
||||
管理
|
||||
</div>
|
||||
<!-- <div
|
||||
class="operation"
|
||||
style="cursor: pointer; margin-right: 35px"
|
||||
@click="
|
||||
@@ -391,7 +425,7 @@
|
||||
"
|
||||
>
|
||||
管理
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -405,9 +439,9 @@
|
||||
<StudentManage
|
||||
ref="stuRef"
|
||||
:type="14"
|
||||
title="添加学员"
|
||||
:id="routerId"
|
||||
:growId="routerId"
|
||||
:columns="tableDataFunc()"
|
||||
:visable="tabFlag"
|
||||
:permissions="preId"
|
||||
>
|
||||
@@ -462,74 +496,9 @@
|
||||
:permissions="preId"
|
||||
:createId="createId"
|
||||
v-model:HomeworkModelVisible="homeworkModelVisible"
|
||||
:title="homeworkModelVisibleTitle"
|
||||
:datasource="homeworkData"
|
||||
/>
|
||||
<!-- 发布弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="pub"
|
||||
:title="null"
|
||||
:footer="null"
|
||||
:closable="false"
|
||||
wrapClassName="pub"
|
||||
width="679px"
|
||||
height="437px"
|
||||
>
|
||||
<div
|
||||
class="modalHeader"
|
||||
style="
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<div class="headerLeft" style="margin-left: 32px">
|
||||
<span style="width: 15px; height: 15px"
|
||||
><img src="../../assets/images/taskpage/pub.png"
|
||||
/></span>
|
||||
<span
|
||||
class="headerLeftText"
|
||||
style="font-size: 16px; margin-left: 10px"
|
||||
>专业力必修发布</span
|
||||
>
|
||||
</div>
|
||||
<div style="cursor: pointer; margin-right: 32px" @click="closePub">
|
||||
<img
|
||||
style="width: 22px; height: 22px"
|
||||
src="../../assets/images/basicinfo/close22.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modalMain">
|
||||
<div class="projectname">{{ pubData?.growName || "" }}</div>
|
||||
<div class="projectbox">
|
||||
<div class="promessage">
|
||||
<div class="messageme">任务信息</div>
|
||||
<div class="messagege">共{{ pubData?.taskNum || 0 }}个任务</div>
|
||||
</div>
|
||||
<div class="stumessage">
|
||||
<div class="messageme1">学员信息</div>
|
||||
<div class="messagege1">共{{ pubData?.stuNum || 0 }}名学员</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pubtn">
|
||||
<a-button class="pubtn2" @click="closePub" style="margin-right: 32px"
|
||||
>取消</a-button
|
||||
>
|
||||
<a-button class="pubtn2" @click="releaseLearnPath(pubData?.taskNum)"
|
||||
>发布</a-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 加载动画 -->
|
||||
<div class="aeLoading" :style="{ display: pubLoading ? 'flex' : 'none' }">
|
||||
<a-spin :spinning="pubLoading" />
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
||||
<!-- 面授课开课弹框 -->
|
||||
<GrowthOpenCourse ref="coursePlanRef" :type="2" />
|
||||
</template>
|
||||
@@ -550,15 +519,21 @@ import { fixDoublePer, checkGrowthPer } from "@/utils/utils";
|
||||
import dialog from "@/utils/dialog";
|
||||
import { TASK_TYPE } from "@/utils/constGrown";
|
||||
import Draggable from "vuedraggable";
|
||||
import { DownOutlined, CloseCircleOutlined } from "@ant-design/icons-vue";
|
||||
import ProjectFaceTaskManage from "../../components/drawers/project/ProjectFaceTaskManage";
|
||||
import GrowthHomeworkManage from "@/components/growthpath/GrowthHomeworkManage";
|
||||
import {
|
||||
getOverview,
|
||||
getBasicInfo,
|
||||
taskOutline,
|
||||
handleGrowth,
|
||||
withdrawal,
|
||||
getPublishInfo,
|
||||
allocationList,
|
||||
manangementOverview,
|
||||
published,
|
||||
toSortTask,
|
||||
saveSuperiorTask,
|
||||
delSuperiorTask,
|
||||
} from "@/api/growthpath";
|
||||
export default {
|
||||
name: "pathManage",
|
||||
@@ -572,7 +547,9 @@ export default {
|
||||
GrowthHomeworkManage,
|
||||
Draggable,
|
||||
ProjectFaceTaskManage,
|
||||
GrowthOpenCourse
|
||||
GrowthOpenCourse,
|
||||
DownOutlined,
|
||||
CloseCircleOutlined,
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
@@ -581,14 +558,12 @@ export default {
|
||||
const headers = { token: getCookieForName("token") };
|
||||
const state = reactive({
|
||||
homeworkModelVisible: false,
|
||||
pubLoading: false,
|
||||
pub: false,
|
||||
pubData: {},
|
||||
activeKey: "1",
|
||||
commonData: null,
|
||||
showTimeText: null,
|
||||
onlineVisible: false,
|
||||
tabFlag: true,
|
||||
homeworkData: {},
|
||||
TMvisible: false,
|
||||
TMvisibleExternal: false,
|
||||
showTestText: "",
|
||||
@@ -617,7 +592,7 @@ export default {
|
||||
(old, val) => {
|
||||
if (old.length == val.length) {
|
||||
const listIds = old.map((item) => item.id).join(",");
|
||||
toSortTask(listIds)
|
||||
listIds && toSortTask(listIds);
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
@@ -627,10 +602,7 @@ export default {
|
||||
content: "确定撤回?",
|
||||
contentTwo: "撤回后学员进度保留,发布后可继续学习",
|
||||
ok: () => {
|
||||
handleGrowth({
|
||||
growId: state.routerId,
|
||||
type: 0,
|
||||
})
|
||||
withdrawal(route.query.id)
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
message.success("撤回成功");
|
||||
@@ -643,43 +615,45 @@ export default {
|
||||
},
|
||||
});
|
||||
};
|
||||
const pubReviw = () => {
|
||||
state.pub = true;
|
||||
state.pubLoading = true;
|
||||
getPublishInfo({ growId: state.routerId })
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
state.pubData = res.data.data;
|
||||
}
|
||||
state.pubLoading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
state.pubLoading = false;
|
||||
|
||||
// 保存/删除上级任务
|
||||
const selectSuperiorTask = (element, row) => {
|
||||
console.log(element, row);
|
||||
if (row) {
|
||||
// 保存需解锁的上级任务
|
||||
saveSuperiorTask({
|
||||
id: element.id,
|
||||
superiorTaskId: row.id,
|
||||
}).then((res) => {
|
||||
message.success("操作成功");
|
||||
element.superiorTaskName = row.taskName;
|
||||
});
|
||||
} else {
|
||||
// 删除需解锁的上级任务
|
||||
delSuperiorTask(element.id).then((res) => {
|
||||
message.success("操作成功");
|
||||
element.superiorTaskName = null;
|
||||
});
|
||||
};
|
||||
const closePub = () => {
|
||||
state.pub = false;
|
||||
};
|
||||
const releaseLearnPath = (item) => {
|
||||
if (item == 0) {
|
||||
message.error("请先添加任务");
|
||||
return;
|
||||
}
|
||||
handleGrowth({
|
||||
growId: state.routerId,
|
||||
type: 1,
|
||||
};
|
||||
const releaseLearnPath = () => {
|
||||
dialog({
|
||||
content: "确定发布当前任务?",
|
||||
ok: () => {
|
||||
published({
|
||||
growId: route.query.id,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
message.success("发布成功");
|
||||
closePub();
|
||||
getOverviewList();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
closePub();
|
||||
message.error(err.data.msg);
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
const changeTabs = (e) => {
|
||||
if (e == 3) {
|
||||
@@ -688,24 +662,6 @@ export default {
|
||||
state.tabFlag = false;
|
||||
}
|
||||
};
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
title: "进度",
|
||||
dataIndex: "jin",
|
||||
key: "jin",
|
||||
width: 110,
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: ({ record }) => (
|
||||
<div>
|
||||
{record.finishTaskNum || 0}/{record.totalTaskNum || 0}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
const showStudent = (record) => {
|
||||
state.Seevisible = true;
|
||||
state.studentId = record.sid;
|
||||
@@ -756,9 +712,8 @@ export default {
|
||||
// 作业点击管理弹框
|
||||
const homeworkModel = (data) => {
|
||||
console.log(data);
|
||||
state.homeworkModelVisible = true;
|
||||
state.homeworkModelVisibleTitle = data.name;
|
||||
state.homeworkData = data;
|
||||
state.homeworkModelVisible = true;
|
||||
// 作业弹框名称 RouterHomeworkManage
|
||||
};
|
||||
// 面授课点击管理弹框
|
||||
@@ -822,7 +777,7 @@ export default {
|
||||
}
|
||||
});
|
||||
//概览
|
||||
getOverview({
|
||||
manangementOverview({
|
||||
growId: state.routerId,
|
||||
}).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
@@ -852,11 +807,8 @@ export default {
|
||||
stuRef,
|
||||
headers,
|
||||
coursePlanRef,
|
||||
tableDataFunc,
|
||||
changeTabs,
|
||||
resize,
|
||||
pubReviw,
|
||||
closePub,
|
||||
releaseLearnPath,
|
||||
showStudent,
|
||||
showTest,
|
||||
@@ -870,110 +822,12 @@ export default {
|
||||
checkGrowthPer,
|
||||
openCourse,
|
||||
faceTeachModel,
|
||||
selectSuperiorTask,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pub {
|
||||
.ant-modal {
|
||||
.ant-modal-body {
|
||||
padding: 0;
|
||||
|
||||
.modalHeader {
|
||||
background: linear-gradient(
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.modalMain {
|
||||
.projectname {
|
||||
color: rgba(79, 81, 86, 1);
|
||||
font-size: 14px;
|
||||
line-height: 36px;
|
||||
margin-left: 62px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.projectbox {
|
||||
margin-top: 26px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.promessage {
|
||||
width: 280px;
|
||||
height: 110px;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(254, 243, 221, 1),
|
||||
rgba(255, 250, 240, 1)
|
||||
);
|
||||
border-radius: 10px;
|
||||
margin-right: 7px;
|
||||
|
||||
.messageme {
|
||||
color: rgba(255, 182, 78, 1);
|
||||
font-size: 14px;
|
||||
line-height: 36px;
|
||||
margin-top: 17px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.messagege {
|
||||
color: rgba(153, 155, 163, 1);
|
||||
font-size: 14px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.stumessage {
|
||||
width: 280px;
|
||||
height: 110px;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(221, 234, 255, 1),
|
||||
rgba(240, 248, 254, 1)
|
||||
);
|
||||
border-radius: 10px;
|
||||
|
||||
.messageme1 {
|
||||
color: rgba(78, 166, 255, 1);
|
||||
font-size: 14px;
|
||||
line-height: 36px;
|
||||
margin-top: 17px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.messagege1 {
|
||||
color: rgba(153, 155, 163, 1);
|
||||
font-size: 14px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.pubtn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 25px;
|
||||
.pubtn2 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
margin-bottom: 29px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 4px;
|
||||
color: #ffffff;
|
||||
font-size: 14px;
|
||||
align-items: center;
|
||||
//line-height: 36px;
|
||||
background: #4ea6ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " ";
|
||||
@@ -1669,10 +1523,8 @@ export default {
|
||||
|
||||
.operations {
|
||||
display: flex;
|
||||
width: 420px;
|
||||
justify-content: center;
|
||||
// flex-grow: 1;/
|
||||
//flex-grow: 1;
|
||||
width: 250px;
|
||||
justify-content: flex-end;
|
||||
.operation {
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
|
||||
@@ -19,19 +19,13 @@ module.exports = defineConfig({
|
||||
},
|
||||
proxy: {
|
||||
"/professional": {
|
||||
target: 'http://192.168.16.195:32002',
|
||||
// target: 'http://192.168.175.141:32002',
|
||||
// target: 'http://192.168.16.195:32002',
|
||||
target: 'http://192.168.18.141:32002',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
"^/manageApi/growth": "",
|
||||
},
|
||||
},
|
||||
// "/growth": {
|
||||
// target: 'https:' + process.env.VUE_APP_BOE_API_URL,
|
||||
// changeOrigin: true,
|
||||
// pathRewrite: {
|
||||
// "^/manageApi": "",
|
||||
// },
|
||||
// },
|
||||
"/manageApi": {
|
||||
target: 'https:' + process.env.VUE_APP_PROXY_URL,
|
||||
|
||||
Reference in New Issue
Block a user