mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-08 18:36:46 +08:00
提交
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
export const STUDENT_LIST = "/admin/student/getStudent";
|
||||
// 专业力必修项目内学员
|
||||
export const GROWTH_STUDENT_LIST = "/professional/allocation/getInternalLearners";
|
||||
export const TASK_STUDENT_LIST = "/admin/student/getTaskStudent";
|
||||
export const ONLINE_COURSE_PAGE = "/onlineClasses/queryOnlineList";
|
||||
export const ASSESSMENT_PAGE = "/assessment/queryAssessmentDetailList post";
|
||||
@@ -22,7 +24,7 @@ export const WORK_DETAIL = workId => `/work/queryWorkDetailById?workId=${workId}
|
||||
//考试
|
||||
export const EXAM_DETAIL = examinationId => `/examination/queryExaminationDetailById?examinationId=${examinationId} post`;
|
||||
//评估
|
||||
export const ASSESSMENT_DETAIL = (assessmentId)=>`/assessment/queryAssessmentDetailById?assessmentId=${assessmentId} post`;
|
||||
export const ASSESSMENT_DETAIL = (assessmentId) => `/assessment/queryAssessmentDetailById?assessmentId=${assessmentId} post`;
|
||||
|
||||
export const USER_LIST_PAGE = "/admin/thirdApi/user/list";
|
||||
//学员列表 没有分页数据 只能通过名称检索 速度较快
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import http from "./configGrowth";
|
||||
import https from './configPublic'
|
||||
|
||||
|
||||
//查询专业力必修列表
|
||||
@@ -82,68 +81,3 @@ export const taskInformation = (growthId) => http.get('/professional/managementO
|
||||
export const taskCompletionRate = (growthId) => http.get('/professional/managementOverview/taskCompletionRate/' + growthId)
|
||||
|
||||
|
||||
|
||||
//新增、编辑成长路径
|
||||
// export const addEdit = (obj) => http.post('/admin/grow/edit', obj)
|
||||
//编辑获取路径信息
|
||||
export const getEditData = (obj) => http.get('/admin/grow/getEditData', { params: obj })
|
||||
//获取可添加职级信息
|
||||
export const getAllBandInfo = (obj) => http.get('/admin/thirdApi/getAllBandInfo', { params: obj })
|
||||
//获取可添加岗位信息
|
||||
export const getAllPosition = (obj) => http.get(`/admin/thirdApi/getAllPosition?positionName=${obj.positionName}&positionCode=${obj.positionCode}`)
|
||||
//获取可添加组织信息
|
||||
export const getOrgList = (obj) => http.get('/admin/thirdApi/org/list', { params: obj })
|
||||
//添加在线、面授课 type:1为在线课,2为面授课,3为案例,4为作业,5为考试
|
||||
export const addOrEditTask = (obj) => http.post('/admin/grow/addOrEditTask', obj)
|
||||
//添加案例、作业 type: 3:案例 4:考试
|
||||
// export const addTask = (obj) => http.post('/admin/grow/addTask', obj)
|
||||
//概览
|
||||
export const getOverview = (obj) => http.get('/admin/grow/overview', { params: obj })
|
||||
|
||||
//发布、撤回、删除 -- 1发布 0撤回 -2删除
|
||||
export const handleGrowth = (obj) => http.post('/admin/grow/handle', obj)
|
||||
|
||||
//复制路径信息
|
||||
export const getCopyData = (obj) => http.get('/admin/grow/getCopyData', { params: obj })
|
||||
//保存复制的路径信息
|
||||
export const copyCreate = (obj) => http.post('/admin/grow/copy', obj)
|
||||
|
||||
|
||||
//移除编辑任务
|
||||
export const removeTask = (obj) => http.post(`/admin/grow/removeTask?growId=${obj.growId}&taskIdList=${obj.taskId}`)
|
||||
//改变选修必修
|
||||
export const isRequiredTask = (obj) => http.post(`/admin/grow/isRequiredTask?taskId=${obj.taskId}`)
|
||||
|
||||
//获取学员列表
|
||||
export const getGrowStudent = (obj) => http.get('/admin/student/getGrowStudent', { params: obj })
|
||||
|
||||
//获取考试管理列表
|
||||
export const queryExamManagementMessage = (obj) => http.post('/admin/exam/manage/queryExamManagementMessageOfGrow', obj)
|
||||
//获取外部考试
|
||||
export const queryExternalExamManageDetail = (obj) => http.post('/admin/external/exam/manage/queryExternalExamManageDetail', obj)
|
||||
//催促考试
|
||||
export const batchSendMessage = (obj) => http.post('/admin/taskmanage/batchSendMessage', obj)
|
||||
//在线管理列表
|
||||
export const queryOnlineManagementDetail = (obj) => http.post('/admin/online/manage/queryOnlineManagementDetail', obj)
|
||||
//获取导入的信息
|
||||
export const getImportStatus = (obj) => http.get('/admin/grow/getImportStatus', { params: obj })
|
||||
//保存成功的数据
|
||||
export const saveStudent = (obj) => http.post(`/admin/grow/saveStudent?redisKey=${obj.redisKey}&growId=${obj.growId}&isImportNotMatchStudent=${obj.isImportNotMatchStudent}`)
|
||||
//保存考试
|
||||
export const saveGrowExamScoreToDatabase = (obj) => http.post(`/admin/grow/saveGrowExamScoreToDatabase?redisKey=${obj.redisKey}&growId=${obj.growId}`)
|
||||
//发布弹窗信息
|
||||
export const getPublishInfo = (obj) => http.get('/admin/grow/getPublishInfo', { params: obj })
|
||||
//删除学员
|
||||
export const delGrowStudent = obj => http.post("/admin/student/delGrowStudent", obj);
|
||||
//导入记录接口
|
||||
export const getRecordList = (obj) => http.post('/admin/grow/getRecordList', obj)
|
||||
//在线课列表
|
||||
export const pagelist = (obj) => https.post('/systemapi/xboe/m/course/manage/pagelist', obj)
|
||||
//获取导入方式
|
||||
export const getRecordTypes = () => http.get('/admin/grow/getRecordTypes')
|
||||
//恢复学员
|
||||
export const recoverStudent = (obj) => http.post(`/admin/student/recoverStudent?studentId=${obj.studentId}&growId=${obj.growId}`)
|
||||
//外部考试保存
|
||||
export const saveExternalScoreToDatabase = (obj) => http.post(`/admin/grow/saveExternalScoreToDatabase?redisKey=${obj.redisKey}`)
|
||||
//获取可添加任职资格等级
|
||||
export const getQualificationLevel = (id) => http.get(`/admin/grow/getQualificationLevel?standPosition=${id}`)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import {isRef, reactive, ref, toRefs, unref, watch, watchEffect} from "vue";
|
||||
import {getCookieForName, setCookie, throttle} from "@/api/method";
|
||||
import { isRef, reactive, ref, toRefs, unref, watch, watchEffect } from "vue";
|
||||
import { getCookieForName, setCookie, throttle } from "@/api/method";
|
||||
import JSONBigInt from "json-bigint";
|
||||
import router from "@/router";
|
||||
import {message} from "ant-design-vue";
|
||||
import {REFRESH_TOKEN, VALIDATE_TOKEN} from "@/api/apis";
|
||||
import {REFRESH_TOKEN_API} from "@/api/ThirdApi";
|
||||
import { message } from "ant-design-vue";
|
||||
import { REFRESH_TOKEN, VALIDATE_TOKEN } from "@/api/apis";
|
||||
import { REFRESH_TOKEN_API } from "@/api/ThirdApi";
|
||||
import growthHttp from "./configGrowth";
|
||||
|
||||
const JSONBigIntStr = JSONBigInt({ storeAsString: true });
|
||||
|
||||
@@ -163,7 +164,7 @@ export function useNewRowsPageNoInit(_url, params) {
|
||||
state.data = r.data.list;
|
||||
state.total = r.data.total;
|
||||
state.loading = false;
|
||||
}).catch((err)=>{
|
||||
}).catch((err) => {
|
||||
state.data = [];
|
||||
state.total = 0;
|
||||
state.loading = false;
|
||||
@@ -260,7 +261,7 @@ export function useRowsPage(_url, params, init = true) {
|
||||
* @param init
|
||||
* @param listing
|
||||
*/
|
||||
export function useTotalPage(_url, params, init = true,listing = false) {
|
||||
export function useTotalPage(_url, params, init = true, listing = false) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
@@ -304,7 +305,7 @@ export function useTotalPage(_url, params, init = true,listing = false) {
|
||||
reset,
|
||||
};
|
||||
}
|
||||
export function usePage(_url, params, init = true,listing = false) {
|
||||
export function usePage(_url, params, init = true, listing = false) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
@@ -348,7 +349,7 @@ export function usePage(_url, params, init = true,listing = false) {
|
||||
reset,
|
||||
};
|
||||
}
|
||||
export function useThrottlePage(_url, params = {}, init = true) {
|
||||
export function useThrottlePage(_url, params = {}, init = true) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
@@ -371,7 +372,7 @@ export function usePage(_url, params, init = true,listing = false) {
|
||||
}
|
||||
return request(_url, params).then(r => {
|
||||
state.data = params.pageNo === 1 ? r.data.list : [...state.data, ...r.data.list];
|
||||
state.totalPage = r.data.total/10 || 1;
|
||||
state.totalPage = r.data.total / 10 || 1;
|
||||
state.total = r.data.total;
|
||||
state.loading = false;
|
||||
}).catch(err => {
|
||||
@@ -386,6 +387,44 @@ export function usePage(_url, params, init = true,listing = false) {
|
||||
};
|
||||
}
|
||||
|
||||
export function growthRequest(_url, params, init = true) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
total: 1,
|
||||
pageNo: 1,
|
||||
pages: 1,
|
||||
loading: false
|
||||
});
|
||||
|
||||
function reset() {
|
||||
state.data = [];
|
||||
state.loading = false;
|
||||
state.pageNo = 1
|
||||
state.pages = 1
|
||||
}
|
||||
|
||||
function fetch() {
|
||||
state.loading = true;
|
||||
return growthHttp.get(unref(_url), { params: unref(params) }).then(r => {
|
||||
state.data = r.data.data.records;
|
||||
state.total = r.data.data.total;
|
||||
state.pageNo = r.data.data.pageNum
|
||||
state.pages = r.data.data.pageSize
|
||||
state.loading = false;
|
||||
}).catch((err) => {
|
||||
state.data = [];
|
||||
state.total = 0;
|
||||
state.loading = false;
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
fetch,
|
||||
reset,
|
||||
};
|
||||
}
|
||||
|
||||
export function useRequest(_url, params, init = true) {
|
||||
|
||||
@@ -504,15 +543,15 @@ export async function request(_url, params) {
|
||||
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)
|
||||
localStorage.removeItem('refreshPage')
|
||||
return Promise.reject(res);
|
||||
}else if(res.code=== 1001){
|
||||
return boeRequest(REFRESH_TOKEN_API).then((res)=>{
|
||||
if(res.code===0 || res.code === 200){
|
||||
} else if (res.code === 1001) {
|
||||
return boeRequest(REFRESH_TOKEN_API).then((res) => {
|
||||
if (res.code === 0 || res.code === 200) {
|
||||
return request(_url, params)
|
||||
}
|
||||
})
|
||||
}
|
||||
//刷新token
|
||||
res.show ? message.error(res.msg):res.msg=='无数据'?null:message.error('系统接口数据异常,请联系管理员');
|
||||
res.show ? message.error(res.msg) : res.msg == '无数据' ? null : message.error('系统接口数据异常,请联系管理员');
|
||||
return Promise.reject(res);
|
||||
});
|
||||
}
|
||||
@@ -337,7 +337,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineEmits, defineProps, ref, watch, computed } from "vue";
|
||||
import { defineEmits, defineProps, ref, watch, computed,onMounted } from "vue";
|
||||
import GrowthSelectTest from "./GrowthSelectTest.vue";
|
||||
import { Form, message } from "ant-design-vue";
|
||||
import { useResetRef } from "@/utils/useCommon";
|
||||
@@ -395,13 +395,12 @@ const initValue = {
|
||||
externalExplain: "",
|
||||
examinationExplain: "",
|
||||
type: 14,
|
||||
targetId: props.growId,
|
||||
// targetId: props.info,
|
||||
};
|
||||
const formData = useResetRef(initValue);
|
||||
const innerRule = {
|
||||
examinationName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入考试名称",
|
||||
},
|
||||
],
|
||||
@@ -439,7 +438,6 @@ const innerRule = {
|
||||
const outerRule = {
|
||||
examinationName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入考试名称",
|
||||
},
|
||||
],
|
||||
@@ -454,7 +452,7 @@ const rulesRef = ref(innerRule);
|
||||
const emit = defineEmits({});
|
||||
const dateTime = ref([]);
|
||||
|
||||
const { resetFields, validate } = Form.useForm(formData.value, rulesRef);
|
||||
const { resetFields, validate } = Form.useForm(formData, rulesRef);
|
||||
watch(
|
||||
() => formData.value.examType,
|
||||
() => {
|
||||
@@ -488,10 +486,11 @@ async function confirm() {
|
||||
message.warning("请输入考试名称");
|
||||
return;
|
||||
}
|
||||
if (formData.value.source.trim() == "" && formData.value.examType != 1) {
|
||||
if (formData.value.examType != 1 && formData.value.source.trim() == "") {
|
||||
message.warning("请输入数据来源");
|
||||
return;
|
||||
}
|
||||
console.log(formData.value)
|
||||
await validate().catch(({ errorFields }) => {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过");
|
||||
|
||||
@@ -100,7 +100,7 @@ import {
|
||||
} from "vue";
|
||||
import { list } from "@/api/indexCourse";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
import dialog from "@/utils/dialog";
|
||||
const props = defineProps({
|
||||
id: String,
|
||||
name: String,
|
||||
@@ -257,7 +257,12 @@ const goResearchmanage = () => {
|
||||
};
|
||||
function selectData(row) {
|
||||
if (row.id == props.id) return;
|
||||
emit("select", row);
|
||||
dialog({
|
||||
content: "确定选择该课程吗?",
|
||||
ok: () => {
|
||||
emit("select", row);
|
||||
},
|
||||
});
|
||||
}
|
||||
defineExpose({ getList });
|
||||
</script>
|
||||
|
||||
@@ -92,6 +92,7 @@ import { CASE_PAGE } from "@/api/ThirdApi";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useResetRef } from "@/utils/useCommon";
|
||||
import { saveTask } from "@/api/growthpath";
|
||||
import dialog from "@/utils/dialog";
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
growId: String,
|
||||
@@ -166,26 +167,31 @@ const closeDrawer = () => {
|
||||
reset();
|
||||
};
|
||||
|
||||
async function confirm(row) {
|
||||
// 新增
|
||||
if (!selectedRows?.value?.id) {
|
||||
await saveTask({
|
||||
growthId: props.growId,
|
||||
taskName: row.title,
|
||||
taskType: props.type,
|
||||
taskId: row.id,
|
||||
type: props.activeKey,
|
||||
});
|
||||
message.success("添加成功");
|
||||
} else {
|
||||
// 编辑
|
||||
selectedRows.value.taskName = row.title;
|
||||
selectedRows.value.taskId = row.id;
|
||||
await saveTask(selectedRows.value);
|
||||
message.success("编辑成功");
|
||||
}
|
||||
closeDrawer();
|
||||
emit("refresh");
|
||||
function confirm(row) {
|
||||
dialog({
|
||||
content: "确定选择该案例吗?",
|
||||
ok: async () => {
|
||||
// 新增
|
||||
if (!selectedRows?.value?.id) {
|
||||
await saveTask({
|
||||
growthId: props.growId,
|
||||
taskName: row.title,
|
||||
taskType: props.type,
|
||||
taskId: row.id,
|
||||
type: props.activeKey,
|
||||
});
|
||||
message.success("添加成功");
|
||||
} else {
|
||||
// 编辑
|
||||
selectedRows.value.taskName = row.title;
|
||||
selectedRows.value.taskId = row.id;
|
||||
await saveTask(selectedRows.value);
|
||||
message.success("编辑成功");
|
||||
}
|
||||
closeDrawer();
|
||||
emit("refresh");
|
||||
},
|
||||
});
|
||||
}
|
||||
let selectedRows = ref({});
|
||||
function openDrawer(row) {
|
||||
|
||||
484
src/components/growthpath/GrowthCommonImport.vue
Normal file
484
src/components/growthpath/GrowthCommonImport.vue
Normal file
@@ -0,0 +1,484 @@
|
||||
<template>
|
||||
<div class="impotergroupleader">
|
||||
<div class="main">
|
||||
<div class="minatitl" v-if="templateUrl">
|
||||
<div class="up1">请下载</div>
|
||||
<a
|
||||
class="up2"
|
||||
:href="templateUrl"
|
||||
target="_blank"
|
||||
style="cursor: pointer"
|
||||
>模板</a
|
||||
>
|
||||
<div class="up1">,按要求填写数据并导入</div>
|
||||
</div>
|
||||
<div class="upload">
|
||||
<div class="text">上传:</div>
|
||||
<div class="right">
|
||||
<div style="height: 176px; margin-bottom: 20px">
|
||||
<a-upload-dragger
|
||||
:data="data"
|
||||
:multiple="true"
|
||||
:name="name"
|
||||
:headers="headers"
|
||||
:accept="accept"
|
||||
:action="uploadUrl"
|
||||
@change="handleChange"
|
||||
v-model:file-list="fileList"
|
||||
>
|
||||
<p class="ant-upload-drag-icon">
|
||||
<inbox-outlined></inbox-outlined>
|
||||
</p>
|
||||
<p class="ant-upload-text">点击或将文件拖拽到此处上传</p>
|
||||
<p class="ant-upload-hint">支持扩展名:.xls/.xlsx</p>
|
||||
<template #itemRender="{ file }">
|
||||
<div class="loadstate">
|
||||
<div class="loadborder">
|
||||
<div class="content">
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">{{ file.name }}</div>
|
||||
<div class="stateloading">
|
||||
{{
|
||||
{
|
||||
done: "上传成功",
|
||||
uploading: "正在上传",
|
||||
error: "上传失败",
|
||||
removed: "正在上传",
|
||||
}[file.status]
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<a-progress :percent="file.percent" />
|
||||
</div>
|
||||
<div class="curloading">
|
||||
<div
|
||||
style="
|
||||
color: #387df7;
|
||||
margin-left: 20px;
|
||||
cursor: pointer;
|
||||
"
|
||||
v-if="file.uploadState?.status === 'FAILED'"
|
||||
@click="downloadErrorData(file.uploadState?.url)"
|
||||
>
|
||||
下载失败数据
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-spin
|
||||
:spinning="true"
|
||||
v-if="file.uploadState?.status === 'START'"
|
||||
/>
|
||||
<div
|
||||
:class="
|
||||
file.uploadState?.status === 'SUCCESS'
|
||||
? 'succebox'
|
||||
: 'defeatbox'
|
||||
"
|
||||
>
|
||||
<img
|
||||
style="width: 14px; height: 14px; margin-left: 16px"
|
||||
:src="
|
||||
file.uploadState?.status === 'SUCCESS' ? success : err
|
||||
"
|
||||
/>
|
||||
<div class="tacl">
|
||||
{{
|
||||
file.uploadState?.successNum || 0
|
||||
}}条数据导入成功,{{
|
||||
file.uploadState?.failedNum || 0
|
||||
}}条数据导入失败
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-upload-dragger>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineEmits, defineProps, ref } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { getImportStatus } from "@/api/index1";
|
||||
import { useTimeout } from "@/utils/useCommon";
|
||||
import err from "@/assets/images/err.png";
|
||||
import success from "@/assets/images/success.png";
|
||||
import { getCookieForName } from "@/api/method";
|
||||
|
||||
const props = defineProps({
|
||||
url: String,
|
||||
name: {
|
||||
type: String,
|
||||
defalut: "file",
|
||||
},
|
||||
title: String,
|
||||
accept: String,
|
||||
fileType: Object,
|
||||
data: Object,
|
||||
templateUrl: String,
|
||||
});
|
||||
const emit = defineEmits({});
|
||||
const fileList = ref([]);
|
||||
const headers = { token: getCookieForName("token") };
|
||||
const uploadUrl = ref(process.env.VUE_APP_BASE_API + props.url);
|
||||
const { start } = useTimeout(async ({ uuid, file }) => {
|
||||
const {
|
||||
data: { data: upData },
|
||||
} = await getImportStatus(uuid);
|
||||
file.uploadState = upData;
|
||||
fileList.value = [...fileList.value];
|
||||
if (upData && upData.status !== "START" && upData.status !== "NULL") {
|
||||
emit("change", "end");
|
||||
// message.success("导入成功");
|
||||
// closeDrawer();
|
||||
throw Error("查询任务结束");
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
const closeDrawer = () => {
|
||||
fileList.value = [];
|
||||
emit('close')
|
||||
};
|
||||
|
||||
function downloadErrorData(url) {
|
||||
window.open(process.env.VUE_APP_FILE_PATH + url);
|
||||
}
|
||||
|
||||
function handleChange({ file }) {
|
||||
emit("change", "start");
|
||||
file && file.response && start({ uuid: file.response.data, file });
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.impotergroupleader > .ant-drawer-content-wrapper {
|
||||
min-width: 800px !important;
|
||||
width: 800px !important;
|
||||
}
|
||||
.impotergroupleader {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.main {
|
||||
.minatitl {
|
||||
display: flex;
|
||||
|
||||
.up1 {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.up2 {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.upload {
|
||||
margin-top: 32px;
|
||||
display: flex;
|
||||
|
||||
.text {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 6px;
|
||||
width: 500px;
|
||||
|
||||
.load {
|
||||
width: 500px;
|
||||
height: 176px;
|
||||
background: #f5f9fd;
|
||||
border-radius: 4px;
|
||||
// opacity: 0.3;
|
||||
border: 1px dashed #caddfd;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.cloud {
|
||||
margin-top: 52px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background-image: url(../../assets/images/basicinfo/cloud.png);
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
margin-top: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tipz {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.loadstate {
|
||||
width: 500px;
|
||||
margin-bottom: 50px;
|
||||
|
||||
.loadborder {
|
||||
width: 500px;
|
||||
height: 173px;
|
||||
border-radius: 4px;
|
||||
border: 1px dashed #eaeaea;
|
||||
margin-bottom: 30px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
|
||||
.defeat {
|
||||
width: 262px;
|
||||
padding: 10px 20px;
|
||||
position: absolute;
|
||||
left: 46px;
|
||||
top: 42px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
height: 32px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #387df7;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
.detext {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
}
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 30px;
|
||||
height: 34px;
|
||||
background-image: url(../../assets/images/basicinfo/exl.png);
|
||||
}
|
||||
|
||||
.timebox {
|
||||
margin-left: 15px;
|
||||
margin-top: -5px;
|
||||
|
||||
.timetop {
|
||||
display: flex;
|
||||
width: 262px;
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 8px;
|
||||
.tit {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.stateloading {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.statedefeat {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ff7474;
|
||||
}
|
||||
|
||||
.statesucce {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #35ae69;
|
||||
}
|
||||
}
|
||||
|
||||
.prog {
|
||||
width: 262px;
|
||||
height: 5px;
|
||||
background: #eaf1fe;
|
||||
border-radius: 4px;
|
||||
|
||||
.inprogloading {
|
||||
width: 55%;
|
||||
height: 5px;
|
||||
border-radius: 4px;
|
||||
|
||||
background: #4ea6ff;
|
||||
}
|
||||
|
||||
//下载失败条
|
||||
.inprogdefeat {
|
||||
width: 55%;
|
||||
height: 5px;
|
||||
border-radius: 4px;
|
||||
|
||||
background: #ff7474;
|
||||
}
|
||||
|
||||
//下载成功条
|
||||
.inprogsucce {
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
border-radius: 4px;
|
||||
|
||||
background: #57c887;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.curloading {
|
||||
margin-left: 15px;
|
||||
margin-top: 15px;
|
||||
display: flex;
|
||||
|
||||
.cur {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.cancel {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.downloadErr {
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #387df7;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
margin-left: 66px;
|
||||
margin-top: 16px;
|
||||
position: absolute;
|
||||
bottom: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.defeatbox {
|
||||
width: 500px;
|
||||
height: 40px;
|
||||
margin-top: 20px;
|
||||
background: rgba(255, 116, 116, 0.1);
|
||||
border: 1px solid #ff7474;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.lefimg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-right: 8px;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.tacl {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
margin-left: 17px;
|
||||
color: #ff7474;
|
||||
}
|
||||
}
|
||||
|
||||
.succebox {
|
||||
width: 500px;
|
||||
height: 40px;
|
||||
background: rgba(53, 174, 105, 0.1);
|
||||
border: 1px solid #35ae69;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.lefimg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-left: 17px;
|
||||
margin-right: 8px;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.tacl {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
|
||||
.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>
|
||||
@@ -2,217 +2,267 @@
|
||||
<!-- eslint-disable vue/require-v-for-key -->
|
||||
<template>
|
||||
<div class="CommonStudent">
|
||||
<a-drawer
|
||||
:visible="visiable"
|
||||
class="drawerStyle CommonStudent"
|
||||
placement="right"
|
||||
width="60%"
|
||||
>
|
||||
<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>
|
||||
<div class="drawer-content" style="">
|
||||
<div class="tabs" style="min-width: 800px">
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane :key="1" tab="快速选人">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div class="tab1">
|
||||
<a-form-item label="姓名">
|
||||
<a-input
|
||||
v-model:value="nameSearch.keyword"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="onSearchStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="resetStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div
|
||||
class="chooseLeft"
|
||||
style="display: grid; grid-template-columns: 250px auto"
|
||||
<div class="drawer-content" style="">
|
||||
<div class="tabs" style="min-width: 800px">
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<template v-if="type == 2">
|
||||
<a-tab-pane :key="2" tab="项目内学员">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div>
|
||||
<a-form-item label="姓名:">
|
||||
<a-input
|
||||
v-model:value="projectParams.userNickName"
|
||||
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="GROWTH_STUDENT_LIST"
|
||||
v-model:params="projectParams"
|
||||
v-model:selectedRows="projectSelectRows"
|
||||
:request="growthRequest"
|
||||
type="checkbox"
|
||||
></BaseTable>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</template>
|
||||
<a-tab-pane :key="1" tab="快速选人">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div class="tab1">
|
||||
<a-form-item label="姓名">
|
||||
<a-input
|
||||
v-model:value="nameSearch.keyword"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="onSearchStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>
|
||||
<div
|
||||
:style="{
|
||||
height: screenHeight - 180 + 'px',
|
||||
overflowY: 'auto',
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="resetStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div
|
||||
class="chooseLeft"
|
||||
style="display: grid; grid-template-columns: 250px auto"
|
||||
>
|
||||
<div style="border: 1px solid #f0f0f0">
|
||||
<div class="tree" style="margin: 10px 4px 0 10px">
|
||||
<a-tree
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="treeData"
|
||||
:load-data="onLoadData"
|
||||
v-model:selectedKeys="stuTreeSelectKeys"
|
||||
v-model:expandedKeys="stuTreeExpandedKeys"
|
||||
:fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
title: 'name',
|
||||
value: 'name',
|
||||
}"
|
||||
style="border: 1px solid #f0f0f0"
|
||||
@select="stuStuOrgSelect"
|
||||
>
|
||||
<div class="tree" style="margin: 10px 4px 220px 10px">
|
||||
<a-tree
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="treeData"
|
||||
:loading="orgLoading"
|
||||
:load-data="onLoadData"
|
||||
v-model:selectedKeys="stuTreeSelectKeys"
|
||||
v-model:expandedKeys="stuTreeExpandedKeys"
|
||||
:fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
title: 'name',
|
||||
value: 'name',
|
||||
}"
|
||||
@select="stuStuOrgSelect"
|
||||
>
|
||||
</a-tree>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="tableBox tabb"
|
||||
style="
|
||||
margin: 0px 4px 120px 10px;
|
||||
border: 1px solid #f0f0f0;
|
||||
"
|
||||
>
|
||||
<BaseTable
|
||||
ref="stuTableRef"
|
||||
:columns="stuColumns"
|
||||
:url="USER_LIST_PAGE"
|
||||
pageKey="pageNo"
|
||||
v-model:params="nameSearch"
|
||||
:request="useNewRowsPageNoInit"
|
||||
v-model:selectedRows="stuSelectRows"
|
||||
type="checkbox"
|
||||
></BaseTable>
|
||||
</div>
|
||||
</a-tree>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
<div class="right1" style="min-width: 200px">
|
||||
<div class="onerow">
|
||||
<div class="onleft">
|
||||
<div class="already">已选</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto; padding-bottom: 10px"
|
||||
>
|
||||
<div class="selecteds">
|
||||
<div class="person">快速选人</div>
|
||||
<div v-for="(item, i) in stuSelectRows" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose">
|
||||
{{ item.realName }}
|
||||
<div class="ch" @click="stuTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="person">
|
||||
<div class="chose">
|
||||
{{ item.realName }}
|
||||
<div class="ch" @click="stuTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!person && stuSelectRows.length > 10" class="ifsw">
|
||||
<div @click="person = !person" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div v-if="person && stuSelectRows.length > 10" class="ifsw">
|
||||
<div @click="person = !person" class="sw">收起<</div>
|
||||
<div
|
||||
class="tableBox tabb"
|
||||
style="margin: 0px 4px 0 10px; border: 1px solid #f0f0f0"
|
||||
>
|
||||
<BaseTable
|
||||
ref="stuTableRef"
|
||||
:columns="stuColumns"
|
||||
:url="USER_LIST_PAGE"
|
||||
pageKey="pageNo"
|
||||
v-model:params="nameSearch"
|
||||
:request="useNewRowsPageNoInit"
|
||||
v-model:selectedRows="stuSelectRows"
|
||||
type="checkbox"
|
||||
></BaseTable>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
<div class="right1" style="min-width: 200px">
|
||||
<div class="onerow">
|
||||
<div class="onleft">
|
||||
<div class="already">已选</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="confirm">确定</button>
|
||||
<div
|
||||
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto; padding-bottom: 10px"
|
||||
>
|
||||
<div class="selecteds" v-if="type == 2">
|
||||
<div class="person">项目内学员</div>
|
||||
<div v-for="(item, i) in projectSelectRows" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose">
|
||||
{{ item.userNickName }}
|
||||
<div class="ch" @click="projectStuTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="person">
|
||||
<div class="chose">
|
||||
{{ item.userNickName }}
|
||||
<div class="ch" @click="projectStuTableRef.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">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose">
|
||||
{{ item.realName }}
|
||||
<div class="ch" @click="stuTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="person">
|
||||
<div class="chose">
|
||||
{{ item.realName }}
|
||||
<div class="ch" @click="stuTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!person && stuSelectRows.length > 10" class="ifsw">
|
||||
<div @click="person = !person" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div v-if="person && stuSelectRows.length > 10" class="ifsw">
|
||||
<div @click="person = !person" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<a-button @click="openDrawer" type="link">
|
||||
<slot></slot>
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="confirm">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { message } from "ant-design-vue";
|
||||
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
||||
import { useNewRowsPageNoInit, request, useRequest } from "@/api/request";
|
||||
import { computed, defineEmits, defineProps, ref, watch, onMounted } from "vue";
|
||||
import {
|
||||
useNewRowsPageNoInit,
|
||||
request,
|
||||
useRequest,
|
||||
growthRequest,
|
||||
} from "@/api/request";
|
||||
import { assignPermissions } from "@/api/growthpath";
|
||||
import dialog from "@/utils/dialog";
|
||||
import BaseTable from "@/components/common/BaseTable";
|
||||
import { ORG_CHILD_LIST, ORG_LIST, USER_LIST_PAGE } from "@/api/apis";
|
||||
import {
|
||||
ORG_CHILD_LIST,
|
||||
ORG_LIST,
|
||||
USER_LIST_PAGE,
|
||||
GROWTH_STUDENT_LIST,
|
||||
} from "@/api/apis";
|
||||
|
||||
const emit = defineEmits(["confirm"]);
|
||||
const emit = defineEmits(["confirm", "close"]);
|
||||
const props = defineProps({
|
||||
infoId: Number,
|
||||
id: String,
|
||||
title: {
|
||||
growthId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
clear: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
selectOne: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
stage: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
isGroup: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
projectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
groupId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
groupName: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
groupMemberCount: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
groupMemberNumber: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
activeKey1: {
|
||||
type: String,
|
||||
default: null,
|
||||
type: {
|
||||
type: [String, Number],
|
||||
default: 1,
|
||||
},
|
||||
});
|
||||
const projectSelectKeys = ref([]);
|
||||
const projectStuTableRef = ref(null);
|
||||
// 项目内学员获取列表
|
||||
const getProjectStu = () => projectStuTableRef.value.fetch();
|
||||
// 项目内学员列表重置
|
||||
const resetProjectStu = () => {
|
||||
projectParams.value.userNickName = "";
|
||||
projectStuTableRef.value.reset();
|
||||
projectParams.value.growthId = props.growthId;
|
||||
};
|
||||
// 项目内学员勾选项
|
||||
const projectSelectRows = ref([]);
|
||||
// 项目内学员筛选
|
||||
const projectParams = ref({
|
||||
growthId: props.growthId,
|
||||
userNickName: "",
|
||||
});
|
||||
const projectStuColumns = ref([
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "userNickName",
|
||||
key: "userNickName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "username",
|
||||
key: "username",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "orgName",
|
||||
key: "orgName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
]);
|
||||
const stuSelectRows = ref([]);
|
||||
const dept = ref(false);
|
||||
const stuTableRef = ref();
|
||||
|
||||
const person = ref(false);
|
||||
@@ -226,8 +276,11 @@ const nameSearch = ref({
|
||||
const stuTreeSelectKeys = ref([]);
|
||||
const stuTreeExpandedKeys = ref([]);
|
||||
|
||||
const { data: treeData, loading: orgLoading } = useRequest(ORG_LIST, {
|
||||
const treeData = ref([]);
|
||||
request(ORG_LIST, {
|
||||
keyword: "",
|
||||
}).then((res) => {
|
||||
treeData.value = res.data;
|
||||
});
|
||||
|
||||
const stuColumns = ref([
|
||||
@@ -273,8 +326,8 @@ const screenHeight = ref(document.body.clientHeight);
|
||||
|
||||
const closeDrawer = () => {
|
||||
deleteDepSelect();
|
||||
visiable.value = false;
|
||||
nameSearch.value.keyword = "";
|
||||
emit("close");
|
||||
};
|
||||
|
||||
function onLoadData(treeNode) {
|
||||
@@ -286,10 +339,6 @@ function onLoadData(treeNode) {
|
||||
);
|
||||
}
|
||||
|
||||
const openDrawer = () => {
|
||||
visiable.value = true;
|
||||
};
|
||||
|
||||
function onSearchStu() {
|
||||
stuTableRef.value.reset(nameSearch.value);
|
||||
}
|
||||
@@ -306,22 +355,20 @@ const resetStu = () => {
|
||||
//清空选择部门信息
|
||||
const deleteDepSelect = () => {
|
||||
stuSelectRows.value = [];
|
||||
projectSelectKeys.value = [];
|
||||
projectSelectRows.value = [];
|
||||
};
|
||||
|
||||
//确定添加授权
|
||||
const confirm = () => {
|
||||
visiable.value = false;
|
||||
emit("confirm", stuSelectRows.value);
|
||||
|
||||
emit("confirm", stuSelectRows.value, projectSelectRows.value);
|
||||
};
|
||||
|
||||
watch(visiable, () => {
|
||||
onMounted(() => {
|
||||
orgSelectKeys.value = [];
|
||||
nameSearch.value.departId = "";
|
||||
stuTreeExpandedKeys.value = [];
|
||||
stuTreeSelectKeys.value = [];
|
||||
activeKey.value = props.isGroup ? 4 : 1;
|
||||
|
||||
nameSearch.value.keyword = "";
|
||||
|
||||
|
||||
44
src/components/growthpath/GrowthDrawer.vue
Normal file
44
src/components/growthpath/GrowthDrawer.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="visiable"
|
||||
class="drawerStyle"
|
||||
placement="right"
|
||||
width="60%"
|
||||
>
|
||||
<div class="drawerMain" style="">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || title }}
|
||||
</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
||||
const emit = defineEmits({});
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const visiable = ref(false);
|
||||
|
||||
const openDrawer = () => {
|
||||
visiable.value = true;
|
||||
};
|
||||
const closeDrawer = ()=>{
|
||||
visiable.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
openDrawer,
|
||||
closeDrawer
|
||||
})
|
||||
</script>
|
||||
@@ -511,9 +511,11 @@ const closeDrawer = () => {
|
||||
if (step.value > 1) {
|
||||
step.value = step.value - 1;
|
||||
} else {
|
||||
formData.value.info = {};
|
||||
visible.value = false;
|
||||
formData.reset();
|
||||
formData.value.info = {
|
||||
examType: 1,
|
||||
};
|
||||
dateTime.value = [];
|
||||
}
|
||||
};
|
||||
@@ -523,10 +525,9 @@ function timeChange(time, timeStr) {
|
||||
formData.value.info.examinationEndTime = timeStr[1];
|
||||
}
|
||||
|
||||
|
||||
// 系统考试
|
||||
async function confirm() {
|
||||
console.log(formData.value)
|
||||
console.log(formData.value);
|
||||
if (formData.value.info.examinationName.trim() == "") {
|
||||
message.warning("请输入考试名称");
|
||||
return;
|
||||
@@ -552,7 +553,7 @@ async function confirm() {
|
||||
// 任务名称
|
||||
formData.value.taskName = formData.value.info.examinationName;
|
||||
// 任务时长
|
||||
formData.value.duration = formData.value.info.examinationDuration
|
||||
formData.value.duration = formData.value.info.examinationDuration;
|
||||
saveTask(formData.value).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
if (formData.value.id) {
|
||||
@@ -566,7 +567,6 @@ async function confirm() {
|
||||
}
|
||||
closeDrawer();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function openDrawer(row) {
|
||||
|
||||
1272
src/components/growthpath/GrowthFaceStu.vue
Normal file
1272
src/components/growthpath/GrowthFaceStu.vue
Normal file
File diff suppressed because it is too large
Load Diff
1070
src/components/growthpath/GrowthFaceTaskManage.vue
Normal file
1070
src/components/growthpath/GrowthFaceTaskManage.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -86,6 +86,7 @@ import { saveTask } from "@/api/growthpath";
|
||||
// import { useRouter } from "vue-router";
|
||||
import { useRowsPage } from "@/api/request";
|
||||
import { ASSESSMENT_PAGE } from "@/api/apis";
|
||||
import dialog from "@/utils/dialog";
|
||||
const emit = defineEmits(["refresh"]);
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
@@ -195,24 +196,29 @@ const closeDrawer = () => {
|
||||
};
|
||||
|
||||
async function confirm(record) {
|
||||
if (!formData?.value?.id) {
|
||||
await saveTask({
|
||||
growthId: props.growId,
|
||||
taskName: record.assessmentName,
|
||||
taskType: props.type,
|
||||
taskId: record.id,
|
||||
type: props.activeKey,
|
||||
});
|
||||
message.success("添加成功");
|
||||
} else {
|
||||
// 编辑
|
||||
formData.value.taskName = record.assessmentName;
|
||||
formData.value.taskId = record.id;
|
||||
await saveTask(formData.value);
|
||||
message.success("编辑成功");
|
||||
}
|
||||
closeDrawer();
|
||||
emit("refresh");
|
||||
dialog({
|
||||
content: "确定选择该评估吗?",
|
||||
ok: async () => {
|
||||
if (!formData?.value?.id) {
|
||||
await saveTask({
|
||||
growthId: props.growId,
|
||||
taskName: record.assessmentName,
|
||||
taskType: props.type,
|
||||
taskId: record.id,
|
||||
type: props.activeKey,
|
||||
});
|
||||
message.success("添加成功");
|
||||
} else {
|
||||
// 编辑
|
||||
formData.value.taskName = record.assessmentName;
|
||||
formData.value.taskId = record.id;
|
||||
await saveTask(formData.value);
|
||||
message.success("编辑成功");
|
||||
}
|
||||
closeDrawer();
|
||||
emit("refresh");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function openDrawer(row) {
|
||||
|
||||
@@ -322,10 +322,8 @@ export default {
|
||||
className: "h",
|
||||
customRender: ({ record: { joinMethod } }) =>
|
||||
({
|
||||
1: "自动匹配",
|
||||
2: "手动添加",
|
||||
3: "导入",
|
||||
4: "添加",
|
||||
1: "系统加入",
|
||||
2: "手动加入",
|
||||
}[joinMethod]),
|
||||
},
|
||||
{
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
</div>
|
||||
|
||||
<div class="items_btn">
|
||||
<div class="cstm_btn btn6" @click="handleCancelStu">
|
||||
<div class="cstm_btn btn6" @click="closeDrawer">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<a-button
|
||||
@@ -485,13 +485,6 @@
|
||||
</CommonTest>
|
||||
</template>
|
||||
</div>
|
||||
<!--新建开课页面 -->
|
||||
<a-modal
|
||||
v-model:visible="offCourseNewVisiable"
|
||||
style="margin-top: 400px"
|
||||
@cancel="handleCancelStu"
|
||||
>
|
||||
</a-modal>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup lang="jsx">
|
||||
@@ -534,6 +527,7 @@ import moment from "moment";
|
||||
import * as api from "../../api/indexTaskadd";
|
||||
import { useRoute } from "vue-router";
|
||||
import { DeleteOutlined } from "@ant-design/icons-vue";
|
||||
import { ElLoading } from "element-plus";
|
||||
// 步骤数
|
||||
const step = ref(1);
|
||||
|
||||
@@ -549,6 +543,8 @@ const title = computed(() => {
|
||||
return "配置作业";
|
||||
} else if (step.value == 5) {
|
||||
return "配置考试";
|
||||
} else if (step.value == 7) {
|
||||
return "新增考试";
|
||||
}
|
||||
});
|
||||
// 选择评估确认
|
||||
@@ -569,7 +565,6 @@ const props = defineProps({
|
||||
type: Number,
|
||||
});
|
||||
const openCourseVisible = ref(false);
|
||||
const offCourseNewVisiable = ref(false);
|
||||
const tableRef = ref();
|
||||
const toggleCheckboxes = (checkedName) => {
|
||||
if (checkedName === "projectSignFlag") {
|
||||
@@ -659,17 +654,9 @@ const columns = ref([
|
||||
const params = ref({
|
||||
type: props.type,
|
||||
offcourseId: "",
|
||||
draftTaskId: "",
|
||||
taskId: "",
|
||||
createBeginTime: "",
|
||||
createEndTime: "",
|
||||
offteachers: [
|
||||
{
|
||||
teacherId: "",
|
||||
teacherName: "",
|
||||
weight: "",
|
||||
},
|
||||
],
|
||||
});
|
||||
const validated = ref(0);
|
||||
const dateTime = ref([]);
|
||||
@@ -690,7 +677,24 @@ const formData = useResetRef({
|
||||
assessmentId: "",
|
||||
duration: "",
|
||||
workInfo: {},
|
||||
examInfo: {},
|
||||
examInfo: {
|
||||
examinationName: "",
|
||||
examinationPaperId: "",
|
||||
examinationStartTime: "",
|
||||
examinationEndTime: "",
|
||||
examinationDuration: null,
|
||||
passLine: "",
|
||||
examType: 1,
|
||||
source: "",
|
||||
showAnswers: "2",
|
||||
showAnalysis: "2",
|
||||
scoringModel: "2",
|
||||
questionArrangement: "4",
|
||||
externalExplain: "",
|
||||
examinationExplain: "",
|
||||
type: 14,
|
||||
targetId: props.growId,
|
||||
},
|
||||
attach: "",
|
||||
type: props.type,
|
||||
offcourseId: "",
|
||||
@@ -745,11 +749,11 @@ const formDataRule = {
|
||||
],
|
||||
};
|
||||
const { validate } = Form.useForm(formData, formDataRule);
|
||||
const durationText = computed(() =>
|
||||
dateTime.value?.length
|
||||
const durationText = computed(() => {
|
||||
return dateTime.value[0] && dateTime.value[1]
|
||||
? dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]), "minute")
|
||||
: "请输入持续时间"
|
||||
);
|
||||
: "请输入持续时间";
|
||||
});
|
||||
const nums = ref(0);
|
||||
watch(durationText, (val) => {
|
||||
nums.value++;
|
||||
@@ -865,7 +869,6 @@ function reset() {
|
||||
tableRef.value.reset({
|
||||
type: props.type,
|
||||
offcourseId: params.value.offcourseId,
|
||||
draftTaskId: params.value.draftTaskId,
|
||||
});
|
||||
resetTime.value.resetTime();
|
||||
}
|
||||
@@ -881,9 +884,9 @@ const closeDrawer = () => {
|
||||
// 主弹框不退步,配置考试组件内退一步
|
||||
CommonTestRef.value.setStep(1);
|
||||
commonTestStep.value = 1;
|
||||
} else if (step.value == 2 && commonTestStep.value == 7) {
|
||||
} else if (step.value > 2 && commonTestStep.value == 7) {
|
||||
// commonTestStep = 7,说明在配置考试组件内,展示页面为新增试卷
|
||||
// 主弹框不退步,配置考试组件内退一步
|
||||
// 主弹框不退步,配置考试组件内退一步
|
||||
CommonTestRef.value.setStep(2);
|
||||
commonTestStep.value = 6;
|
||||
} else if (step.value == 2) {
|
||||
@@ -893,35 +896,12 @@ const closeDrawer = () => {
|
||||
tableRef.value.reset({
|
||||
type: props.type,
|
||||
offcourseId: params.value.offcourseId,
|
||||
draftTaskId: params.value.draftTaskId,
|
||||
});
|
||||
}
|
||||
};
|
||||
const route = useRoute();
|
||||
const projectInfo = ref({});
|
||||
const emit = defineEmits(["call-parent-method"]);
|
||||
const confirm = async () => {
|
||||
closeDrawer();
|
||||
if (route.query.projectId) {
|
||||
await api.getDraftTask({ projectId: route.query.projectId }).then((res) => {
|
||||
projectInfo.value = res.data.data;
|
||||
});
|
||||
request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value });
|
||||
if (projectInfo.value.projectInfo.status == 3) {
|
||||
request(PROJECT_RELEASE, { projectId: route.query.projectId });
|
||||
}
|
||||
emit("call-parent-method");
|
||||
}
|
||||
if (route.query.routerId) {
|
||||
await GetRouterDraftDetail(route.query.routerId).then((res) => {
|
||||
projectInfo.value = res.data.data;
|
||||
});
|
||||
request(ROUTER_DETAIL_MODIFY, { ...projectInfo.value });
|
||||
if (projectInfo.value.routerInfo.status == 1) {
|
||||
await releaseRouter(route.query.routerId);
|
||||
}
|
||||
emit("call-parent-method");
|
||||
}
|
||||
};
|
||||
|
||||
const createNewCourse = () => {
|
||||
@@ -930,7 +910,7 @@ const createNewCourse = () => {
|
||||
formData.reset({
|
||||
type: props.type,
|
||||
offcourseId: params.value.offcourseId,
|
||||
draftTaskId: params.value.draftTaskId,
|
||||
taskId: params.value.taskId,
|
||||
name: courseName.value,
|
||||
});
|
||||
dateTime.value = [moment().format("YYYY-MM-DD HH:mm"), ""];
|
||||
@@ -946,10 +926,6 @@ const createNewCourse = () => {
|
||||
// 第二步新增课程
|
||||
step.value = 2;
|
||||
};
|
||||
const handleCancelStu = () => {
|
||||
changeName.value = false;
|
||||
offCourseNewVisiable.value = false;
|
||||
};
|
||||
|
||||
const expenseStatus = {
|
||||
A10: true,
|
||||
@@ -970,7 +946,8 @@ const del = (id, record) => {
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 全局Loading
|
||||
let loadingInstance = null;
|
||||
async function coursePlanConfirm() {
|
||||
if (!dateTime.value[0]) {
|
||||
message.info("开始时间未填写");
|
||||
@@ -1036,7 +1013,6 @@ async function coursePlanConfirm() {
|
||||
message.warning("开课名称重复,请重新填写");
|
||||
return;
|
||||
}
|
||||
offCourseNewVisiable.value = false;
|
||||
tableRef.value.toLoading();
|
||||
// TODO 当点击选择了是否评估按钮 点击保存的时候没有选择评估 则是否需要评估重置为 0 不需要
|
||||
formData.value.evalFlag = formData.value.assessmentName ? 1 : 0;
|
||||
@@ -1047,30 +1023,13 @@ async function coursePlanConfirm() {
|
||||
formData.value.projectSignFlag = formData.value.projectSignFlag ? 1 : 0;
|
||||
formData.value.beginTime = dateTime.value[0];
|
||||
formData.value.endTime = dateTime.value[1];
|
||||
// 开启loading
|
||||
loadingInstance = ElLoading.service({ fullscreen: true });
|
||||
await request(COURSE_PLAN_EDIT, { ...formData.value });
|
||||
if (route.query.projectId) {
|
||||
await api.getDraftTask({ projectId: route.query.projectId }).then((res) => {
|
||||
projectInfo.value = res.data.data;
|
||||
});
|
||||
request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value });
|
||||
if (projectInfo.value.projectInfo.status == 3) {
|
||||
request(PROJECT_RELEASE, { projectId: route.query.projectId });
|
||||
}
|
||||
emit("call-parent-method");
|
||||
}
|
||||
if (route.query.routerId) {
|
||||
await GetRouterDraftDetail(route.query.routerId).then((res) => {
|
||||
projectInfo.value = res.data.data;
|
||||
});
|
||||
console.log(projectInfo.value, "ite2545m");
|
||||
request(ROUTER_DETAIL_MODIFY, { ...projectInfo.value });
|
||||
if (projectInfo.value.routerInfo.status == 1) {
|
||||
await releaseRouter(route.query.routerId);
|
||||
}
|
||||
emit("call-parent-method");
|
||||
}
|
||||
handleCancelStu();
|
||||
tableRef.value.fetch();
|
||||
// 关闭loading
|
||||
loadingInstance.close();
|
||||
closeDrawer();
|
||||
}
|
||||
|
||||
const editBeginClass = ref(false);
|
||||
@@ -1079,30 +1038,31 @@ function planEdit(record) {
|
||||
editBeginClass.value = false;
|
||||
if (record.expenseStatus && !expenseStatus[record.expenseStatus]) {
|
||||
editBeginClass.value = true;
|
||||
console.log(editBeginClass.value);
|
||||
}
|
||||
onceName.value = record.name;
|
||||
formData.value = { ...record };
|
||||
// formData.value.duration = ''
|
||||
console.log({ ...record }, "{ ...record }");
|
||||
validated.value = 0;
|
||||
formData.value.homeWorkId &&
|
||||
request(WORK_DETAIL(formData.value.homeWorkId), {}).then(
|
||||
(res) => (formData.value.workInfo = res.data)
|
||||
);
|
||||
formData.value.testId &&
|
||||
request(EXAM_DETAIL(formData.value.testId), {}).then(
|
||||
(res) => (formData.value.examInfo = res.data)
|
||||
);
|
||||
formData.value.homeWorkId
|
||||
? request(WORK_DETAIL(formData.value.homeWorkId), {}).then((res) => {
|
||||
formData.value.workInfo = res.data;
|
||||
})
|
||||
: (formData.value.workInfo = {});
|
||||
formData.value.testId
|
||||
? request(EXAM_DETAIL(formData.value.testId), {}).then(
|
||||
(res) => (formData.value.examInfo = res.data)
|
||||
)
|
||||
: (formData.value.examInfo = { examType: 1 });
|
||||
dateTime.value = [formData.value.beginTime, formData.value.endTime];
|
||||
offCourseNewVisiable.value = true;
|
||||
step.value = 2;
|
||||
}
|
||||
function openDrawer(row) {
|
||||
openCourseVisible.value = true;
|
||||
params.value.offcourseId = row.taskId;
|
||||
params.value.draftTaskId = row.id;
|
||||
params.value.taskId = row.id;
|
||||
formData.value.offcourseId = row.taskId;
|
||||
formData.value.draftTaskId = row.id;
|
||||
formData.value.taskId = row.id;
|
||||
courseName.value = row.taskName;
|
||||
setTimeout(() => {
|
||||
nextTick(tableRef?.value.fetch);
|
||||
|
||||
@@ -112,6 +112,7 @@ import { message } from "ant-design-vue";
|
||||
import { useRowsPage } from "@/api/request";
|
||||
import { PROJECT_AUDIT_PAGE } from "@/api/apis";
|
||||
import { saveTask } from "@/api/growthpath";
|
||||
import dialog from "@/utils/dialog";
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
growId: String,
|
||||
@@ -236,25 +237,31 @@ const closeDrawer = () => {
|
||||
};
|
||||
|
||||
async function confirm(record) {
|
||||
// 新增
|
||||
if (!selectData?.value?.id) {
|
||||
await saveTask({
|
||||
growthId: props.growId,
|
||||
taskName: record.name,
|
||||
taskType: props.type,
|
||||
taskId: record.id,
|
||||
type: props.activeKey,
|
||||
});
|
||||
message.success("添加成功");
|
||||
} else {
|
||||
// 编辑
|
||||
selectData.value.taskName = record.name;
|
||||
selectData.value.taskId = record.id;
|
||||
await saveTask(selectData.value);
|
||||
message.success("编辑成功");
|
||||
}
|
||||
closeDrawer();
|
||||
emit("refresh");
|
||||
dialog({
|
||||
content: "确定选择该项目吗?",
|
||||
ok: async () => {
|
||||
formData.value.offteachers.splice(index, 1);
|
||||
// 新增
|
||||
if (!selectData?.value?.id) {
|
||||
await saveTask({
|
||||
growthId: props.growId,
|
||||
taskName: record.name,
|
||||
taskType: props.type,
|
||||
taskId: record.id,
|
||||
type: props.activeKey,
|
||||
});
|
||||
message.success("添加成功");
|
||||
} else {
|
||||
// 编辑
|
||||
selectData.value.taskName = record.name;
|
||||
selectData.value.taskId = record.id;
|
||||
await saveTask(selectData.value);
|
||||
message.success("编辑成功");
|
||||
}
|
||||
closeDrawer();
|
||||
emit("refresh");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const goProjectmanage = () => {
|
||||
|
||||
@@ -235,10 +235,9 @@ export default {
|
||||
const store = useStore();
|
||||
const state = reactive({
|
||||
redisKey: "",
|
||||
importStudent:
|
||||
process.env.VUE_APP_BOE_API_URL +
|
||||
process.env.VUE_APP_BASE_API_GROWTH +
|
||||
"/professional/allocation/importLearner",
|
||||
importStudent: `${process.env.VUE_APP_BOE_API_URL}${
|
||||
process.env.VUE_APP_BASE_API_GROWTH || ""
|
||||
}/professional/allocation/importLearner`,
|
||||
timers: "", // 定时器,用于清空定时器使用
|
||||
isAddStudent: false, // 用于判断用户是否关闭弹框需要重新获取学员列表
|
||||
uploadpercent: -1,
|
||||
@@ -294,7 +293,9 @@ export default {
|
||||
};
|
||||
const downloadTemplate = () => {
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BOE_API_URL}${process.env.VUE_APP_BASE_API_GROWTH}/professional/allocation/downloadTemplate.do`
|
||||
`${process.env.VUE_APP_BOE_API_URL}${
|
||||
process.env.VUE_APP_BASE_API_GROWTH || ""
|
||||
}/professional/allocation/downloadTemplate.do`
|
||||
);
|
||||
// window.open(
|
||||
// `http://192.168.18.141:32002/professional/allocation/downloadTemplate.do`
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
@change="onSelectChange"
|
||||
@search="handleSearch"
|
||||
@focus="focus"
|
||||
notFoundContent="请先选择标准岗位"
|
||||
allowClear
|
||||
showArrow
|
||||
showSearch
|
||||
|
||||
@@ -111,22 +111,18 @@
|
||||
v-if="checkGrowthPer(permissions)"
|
||||
>
|
||||
<a-col :span="1.5">
|
||||
<GrowthCommonStudent
|
||||
:type="type"
|
||||
:id="id"
|
||||
@confirm="submitCall"
|
||||
:stage="stage"
|
||||
:selectStu="true"
|
||||
<a-button
|
||||
@click="addSut"
|
||||
class="cus-btn"
|
||||
style="background: #4ea6ff; color: #fff"
|
||||
>
|
||||
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff">
|
||||
<template #icon
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/courseManage/add0.png"
|
||||
/></template>
|
||||
新增学员
|
||||
</a-button>
|
||||
</GrowthCommonStudent>
|
||||
<template #icon
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/courseManage/add0.png"
|
||||
/></template>
|
||||
新增学员
|
||||
</a-button>
|
||||
</a-col>
|
||||
<!-- 新加导入学员 批量换组 导出学习信息 -->
|
||||
<a-col :span="1.5">
|
||||
@@ -174,7 +170,7 @@
|
||||
</a-row>
|
||||
|
||||
<div class="tips">
|
||||
说明:以下学员信息来自于员工发展认证管理系统,如需调整学员,请登录员工发展认证管理系统操作!
|
||||
说明:以下学员信息来自于AMED系统,如需调整学员,请登录员工发展认证管理系统操作!
|
||||
</div>
|
||||
<div style="margin-top: 20px; padding: 0 20px">
|
||||
<a-table
|
||||
@@ -267,6 +263,13 @@
|
||||
:courseId="id"
|
||||
:courseType="type"
|
||||
/>
|
||||
<GrowthDrawer ref="GrowthDrawerRef" title="新增学员">
|
||||
<GrowthCommonStudent
|
||||
:growthId="growId"
|
||||
@confirm="confirmDrawer"
|
||||
@close="closeDrawer"
|
||||
></GrowthCommonStudent>
|
||||
</GrowthDrawer>
|
||||
</template>
|
||||
<script setup lang="jsx">
|
||||
import { computed, defineProps, onMounted, ref, watch } from "vue";
|
||||
@@ -288,6 +291,7 @@ import dialog from "@/utils/dialog";
|
||||
import PostSelect from "@/components/growthpath/PostSelect";
|
||||
import OfficeSelect from "@/components/growthpath/OfficeSelect";
|
||||
import OrgClass from "@/components/growthpath/OrgClass";
|
||||
import GrowthDrawer from "@/components/growthpath/GrowthDrawer";
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
permissions: {
|
||||
@@ -323,16 +327,17 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
// const { loading: stuAsyncLoading, start } = useAsyncStu(props.id, props.type, getStuList);
|
||||
|
||||
const GrowthDrawerRef = ref(null);
|
||||
const addSut = () => {
|
||||
GrowthDrawerRef.value.openDrawer();
|
||||
};
|
||||
const visibleName = ref([]);
|
||||
// band职级选项
|
||||
const bandOption = ref([]);
|
||||
// 加入方式选项
|
||||
const statusValues = ref([
|
||||
{ value: "1", label: "自动匹配" },
|
||||
{ value: "2", label: "手动匹配" },
|
||||
{ value: "3", label: "导入" },
|
||||
{ value: "4", label: "添加" },
|
||||
{ value: "1", label: "系统加入" },
|
||||
{ value: "2", label: "手动加入" },
|
||||
]);
|
||||
const getRowClass = (record) => {
|
||||
return record.moveStatus ? "row-moveStatus-true" : "";
|
||||
@@ -418,10 +423,8 @@ const tablecolumns = ref([
|
||||
align: "center",
|
||||
customRender: ({ record: { joinMethod } }) =>
|
||||
({
|
||||
1: "自动匹配",
|
||||
2: "手动匹配",
|
||||
3: "导入",
|
||||
4: "添加",
|
||||
1: "系统加入",
|
||||
2: "手动加入",
|
||||
}[joinMethod]),
|
||||
},
|
||||
{
|
||||
@@ -511,7 +514,6 @@ function buildUrl(url, params) {
|
||||
return `${url}?${searchParams.toString()}`;
|
||||
}
|
||||
onMounted(() => {
|
||||
// debugger
|
||||
console.log("props.activeKey1" + props.activeKey1);
|
||||
getStuList();
|
||||
});
|
||||
@@ -623,18 +625,25 @@ function del(row) {
|
||||
});
|
||||
}
|
||||
|
||||
function submitCall(selectList) {
|
||||
// 关闭新增学员弹框
|
||||
function closeDrawer() {
|
||||
GrowthDrawerRef.value.closeDrawer();
|
||||
}
|
||||
function confirmDrawer(selectList) {
|
||||
tableData.value.loading = true;
|
||||
addLearners({
|
||||
growthId: props.id,
|
||||
studentIds: selectList.map((item) => item.userNo),
|
||||
}).then((res) => {
|
||||
tableData.value.loading = false;
|
||||
message.success("添加成功");
|
||||
getStuList();
|
||||
}).catch(err =>{
|
||||
tableData.value.loading = false;
|
||||
});
|
||||
})
|
||||
.then((res) => {
|
||||
tableData.value.loading = false;
|
||||
message.success("添加成功");
|
||||
getStuList();
|
||||
closeDrawer()
|
||||
})
|
||||
.catch((err) => {
|
||||
tableData.value.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 查看学员
|
||||
|
||||
@@ -25,8 +25,6 @@ import GrowthEval from "@/components/growthpath/GrowthEval.vue";
|
||||
import GrowthInvist from "@/components/growthpath/GrowthInvist.vue";
|
||||
import GrowthVote from "@/components/growthpath/GrowthVote.vue";
|
||||
import GrowthProject from "@/components/growthpath/GrowthProject.vue";
|
||||
|
||||
|
||||
export const TASK_TYPE = {
|
||||
1: {
|
||||
name: '在线',
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import { createApp } from 'vue'
|
||||
import QrCode from "@/components/growthpath/growQrCode";
|
||||
import Antd from "ant-design-vue";
|
||||
|
||||
function mountContent (option = {}) {
|
||||
const dom = document.createElement('div')
|
||||
document.body.appendChild(dom)
|
||||
const app = createApp(QrCode, {
|
||||
close: () => { app.unmount(dom); document.body.removeChild(dom) },
|
||||
...option
|
||||
})
|
||||
app.use(Antd).mount(dom)
|
||||
}
|
||||
export default mountContent
|
||||
@@ -9,9 +9,7 @@
|
||||
<div class="imgfor">
|
||||
<div class="fort" style="color: #333333; font-size: 16px">
|
||||
{{
|
||||
`${basicData?.stdPosition || ""}${
|
||||
basicData?.qualsLevelDesr || ""
|
||||
}`
|
||||
basicData.growthName
|
||||
}}
|
||||
</div>
|
||||
<div class="fort">创建时间:{{ basicData?.createTime }}</div>
|
||||
@@ -87,7 +85,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="listDatas.length != 0"
|
||||
v-if="listDatas.length != 0 && !basicData.isPublished"
|
||||
class="btn btn2"
|
||||
@click="confirmDelTask()"
|
||||
>
|
||||
@@ -368,6 +366,10 @@ const getBasicInfoData = () => {
|
||||
|
||||
// 发布
|
||||
const published = (element) => {
|
||||
if(basicData.value.isPublished){
|
||||
message.warning('该专业力必修已发布,不可发布学习任务')
|
||||
return
|
||||
}
|
||||
dialog({
|
||||
content: "确定要发布该任务吗?",
|
||||
ok: () => {
|
||||
@@ -380,6 +382,10 @@ const published = (element) => {
|
||||
};
|
||||
// 撤回
|
||||
const withdraw = (element) => {
|
||||
if(basicData.value.isPublished){
|
||||
message.warning('该专业力必修已发布,不可撤回学习任务')
|
||||
return
|
||||
}
|
||||
dialog({
|
||||
content: "确定要撤回该任务吗?",
|
||||
ok: () => {
|
||||
|
||||
@@ -165,12 +165,11 @@
|
||||
<span>任职资格等级</span>
|
||||
</div>
|
||||
<div class="bg_body_input">
|
||||
<OfficeSelect
|
||||
disabled
|
||||
width="384px"
|
||||
:searchData="statusPosts"
|
||||
@bandCodes="getBandCodes"
|
||||
<a-input
|
||||
v-model:value="statusOffices"
|
||||
disabled
|
||||
style="width: 384px; height: 40px"
|
||||
allowClear
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -220,7 +219,10 @@
|
||||
<span>匹配学员</span>
|
||||
</div>
|
||||
<div class="bg_body_input">
|
||||
<a-radio-group v-model:value="matchRules">
|
||||
<a-radio-group
|
||||
v-model:value="matchRules"
|
||||
@change="matchRulesChange"
|
||||
>
|
||||
<div style="display: flex">
|
||||
<a-radio value="1" style="margin-bottom: 15px"
|
||||
>自动匹配学员</a-radio
|
||||
@@ -286,11 +288,39 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<a-modal
|
||||
v-model:visible="matchRulesVisible"
|
||||
title="提示"
|
||||
@ok="
|
||||
() => {
|
||||
keepLearner = true;
|
||||
matchRulesVisible = false;
|
||||
}
|
||||
"
|
||||
@cancel="
|
||||
() => {
|
||||
keepLearner = false;
|
||||
matchRulesVisible = false;
|
||||
}
|
||||
"
|
||||
>
|
||||
<div style="padding: 30px 24px; font-size: 16px">
|
||||
是否保留已绑定的学员?
|
||||
</div>
|
||||
</a-modal>
|
||||
<UpdateRecord ref="UpdateRecordRef" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, ref, onMounted, watch, computed } from "vue";
|
||||
import {
|
||||
reactive,
|
||||
toRefs,
|
||||
ref,
|
||||
onMounted,
|
||||
watch,
|
||||
computed,
|
||||
createVNode,
|
||||
} from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { message } from "ant-design-vue";
|
||||
import dialog from "@/utils/dialog";
|
||||
@@ -305,6 +335,7 @@ import CommonStudent from "@/components/growthpath/GrowthCommonStudent";
|
||||
import TableModelStudent from "@/components/growthpath/GrowthTableModel";
|
||||
import UpdateRecord from "@/components/growthpath/UpdateRecord";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
import {
|
||||
listData,
|
||||
published,
|
||||
@@ -344,7 +375,8 @@ export default {
|
||||
pathWays: "",
|
||||
statusPost: null,
|
||||
matchRules: "1",
|
||||
template: "1",
|
||||
matchRulesVisible: false,
|
||||
template: "2",
|
||||
statusPostMaps: [],
|
||||
statusPosts: null,
|
||||
editId: null,
|
||||
@@ -360,6 +392,7 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
dataList: [],
|
||||
keepLearner: false,
|
||||
});
|
||||
const releaseLearnPath = (item) => {
|
||||
dialog({
|
||||
@@ -389,8 +422,8 @@ export default {
|
||||
const columns = ref([
|
||||
{
|
||||
title: "标准岗位",
|
||||
dataIndex: "positionName",
|
||||
key: "positionName",
|
||||
dataIndex: "stdPositionName",
|
||||
key: "stdPositionName",
|
||||
width: 100,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -469,6 +502,7 @@ export default {
|
||||
state.statusValue = null;
|
||||
state.statusPost = null;
|
||||
state.statusRank = [];
|
||||
state.statusOffice = null;
|
||||
state.pageNum = 1;
|
||||
listDatas();
|
||||
};
|
||||
@@ -482,15 +516,20 @@ export default {
|
||||
const editPath = (record) => {
|
||||
state.editId = record.id;
|
||||
state.statusPosts = record.stdPosition;
|
||||
state.statusOffices = record.qualsLevelCode;
|
||||
state.statusOffices = record.qualsLevelDesr;
|
||||
state.courseNum = record.electivesCompletedNum;
|
||||
state.elePublishedNum = record.elePublishedNum;
|
||||
state.pathWays = record.description;
|
||||
state.band = record.bandCodes;
|
||||
state.band = record.band;
|
||||
state.matchRules = record.matchRules || "1";
|
||||
state.template = state.template || "1";
|
||||
state.template = state.template || "2";
|
||||
state.bg_check = true;
|
||||
};
|
||||
|
||||
// 切换匹配学员方式
|
||||
const matchRulesChange = () => {
|
||||
state.matchRulesVisible = true;
|
||||
};
|
||||
// 确定
|
||||
const confirm = () => {
|
||||
if (state.courseNum !== 0 && !state.courseNum) {
|
||||
@@ -503,12 +542,13 @@ export default {
|
||||
}
|
||||
const params = {
|
||||
stdPosition: state.statusPosts,
|
||||
qualsLevelCode: state.statusOffices,
|
||||
qualsLevelDesr: state.statusOffices,
|
||||
electivesCompletedNum: state.courseNum,
|
||||
description: state.pathWays,
|
||||
matchRules: state.matchRules,
|
||||
id: state.editId ? state.editId : null,
|
||||
template: state.template,
|
||||
keepLearner: state.keepLearner,
|
||||
};
|
||||
updatePostInfomation(params)
|
||||
.then((res) => {
|
||||
@@ -590,6 +630,7 @@ export default {
|
||||
withdraw,
|
||||
releaseLearnPath,
|
||||
UpdateRecordRef,
|
||||
matchRulesChange,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -103,18 +103,6 @@
|
||||
</div>
|
||||
<div class="nub2">完成人数</div>
|
||||
</div>
|
||||
<!-- <div class="nubbox">
|
||||
<div class="nub2">在线课程数</div>
|
||||
<div class="nub1">{{
|
||||
overviewData.onlineCourseCnt
|
||||
}}%</div>
|
||||
</div> -->
|
||||
<!-- <div class="nubbox">
|
||||
<div class="nub2">面授课程数</div>
|
||||
<div class="nub1">{{
|
||||
overviewData.offLineCourseCnt
|
||||
}}%</div>
|
||||
</div> -->
|
||||
<div class="nubbox">
|
||||
<div class="nub1" style="color: #564aff">
|
||||
{{ ((overviewData?.completedRate || 0) * 100).toFixed(2) }}%
|
||||
@@ -217,11 +205,7 @@
|
||||
},
|
||||
}"
|
||||
class="editright"
|
||||
v-if="
|
||||
checkGrowthPer(preId) &&
|
||||
listTaskData.length &&
|
||||
!basicData.isPublished
|
||||
"
|
||||
v-if="checkGrowthPer(preId) && listTaskData.length"
|
||||
>
|
||||
<span class="editextb">编辑任务</span>
|
||||
</router-link>
|
||||
@@ -299,19 +283,7 @@
|
||||
|
||||
<img
|
||||
style="width: 31px; height: 28px; margin: 0 12px"
|
||||
:src="
|
||||
element.taskType == 1
|
||||
? require('../../assets/images/leveladd/zai.png')
|
||||
: element.taskType == 2
|
||||
? require('../../assets/images/leveladd/mian.png')
|
||||
: element.taskType == 3
|
||||
? require('../../assets/images/leveladd/an.png')
|
||||
: element.taskType == 4
|
||||
? require('../../assets/images/leveladd/zuo.png')
|
||||
: element.taskType == 5
|
||||
? require('../../assets/images/leveladd/kao.png')
|
||||
: require('../../assets/images/leveladd/tou.png')
|
||||
"
|
||||
:src="TASK_TYPE[element.taskType]?.img"
|
||||
/>
|
||||
<div style="margin-top: 2px; margin-left: 8px">
|
||||
{{ TASK_TYPE[element.taskType]?.name || "" }}
|
||||
@@ -384,56 +356,135 @@
|
||||
</template>
|
||||
</div>
|
||||
<div class="operations" v-if="checkGrowthPer(preId)">
|
||||
<div
|
||||
class="operation"
|
||||
@click="openCourse(element, index)"
|
||||
v-if="element.taskType == 2"
|
||||
<template
|
||||
v-if="
|
||||
element.assessmentIds.length > 1 &&
|
||||
element.taskType == 2
|
||||
"
|
||||
>
|
||||
开课
|
||||
</div>
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer"
|
||||
@click="showCodeModel(element)"
|
||||
<div class="operations_dropdown">
|
||||
<a-dropdown
|
||||
:getPopupContainer="
|
||||
(triggerNode) => triggerNode.parentNode
|
||||
"
|
||||
:trigger="['click']"
|
||||
v-model:visible="visibleEwmpg[element.id]"
|
||||
>
|
||||
<a
|
||||
class="ant-dropdown-link"
|
||||
@click="qrcodeAssement(element)"
|
||||
>
|
||||
评估二维码
|
||||
<DownOutlined />
|
||||
</a>
|
||||
<template #overlay>
|
||||
<a-menu @click="handleMenuClickpg">
|
||||
<template
|
||||
v-for="(item, index) in qrCodeItemspg"
|
||||
:key="index"
|
||||
>
|
||||
<a-menu-item>
|
||||
<div>
|
||||
<p>{{ item.name }}</p>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</template>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
<div class="operations_dropdown">
|
||||
<a-dropdown
|
||||
:getPopupContainer="
|
||||
(triggerNode) => triggerNode.parentNode
|
||||
"
|
||||
:trigger="['click']"
|
||||
v-model:visible="visibleEwm[element.id]"
|
||||
>
|
||||
<a
|
||||
class="ant-dropdown-link"
|
||||
@click="qrcodeVisible(element)"
|
||||
>
|
||||
签到二维码
|
||||
<DownOutlined />
|
||||
</a>
|
||||
<template #overlay v-if="qrCodeItems.length > 0">
|
||||
<a-menu @click="handleMenuClick">
|
||||
<template
|
||||
v-for="(item, index) in qrCodeItems"
|
||||
:key="index"
|
||||
>
|
||||
<a-menu-item>
|
||||
<div>
|
||||
<p>{{ item.name }}</p>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</template>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template
|
||||
v-if="
|
||||
element.assessmentIds.filter((id) => id !== null)
|
||||
.length == 1 && element.taskType == 2
|
||||
"
|
||||
>
|
||||
二维码
|
||||
</div>
|
||||
<div class="operations_dropdown">
|
||||
<a
|
||||
class="ant-dropdown-link"
|
||||
@click="qrcodeAssement(element)"
|
||||
>
|
||||
评估二维码
|
||||
</a>
|
||||
</div>
|
||||
<div class="operations_dropdown">
|
||||
<a
|
||||
class="ant-dropdown-link"
|
||||
@click="qrcodeVisible(element)"
|
||||
>
|
||||
签到二维码
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="element.taskType == 2">
|
||||
<div
|
||||
class="operation"
|
||||
@click="openCourse(element, index)"
|
||||
>
|
||||
开课
|
||||
</div>
|
||||
<div
|
||||
class="operation"
|
||||
@click="showFS(element, index)"
|
||||
>
|
||||
学员
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="element.taskType != 2">
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer"
|
||||
@click="showCodeModel(element)"
|
||||
>
|
||||
二维码
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer; margin-right: 35px"
|
||||
@click="showOnline(element)"
|
||||
@click="
|
||||
element.taskType == 2
|
||||
? faceTeachModel(element)
|
||||
: showOnline(element)
|
||||
"
|
||||
>
|
||||
管理
|
||||
</div>
|
||||
<!-- <div
|
||||
class="operation"
|
||||
style="cursor: pointer; margin-right: 35px"
|
||||
@click="
|
||||
element.taskType == 1 ||
|
||||
element.taskType == 3 ||
|
||||
element.taskType == 7 ||
|
||||
element.taskType == 8 ||
|
||||
element.taskType == 6 ||
|
||||
element.taskType == 11 ||
|
||||
element.taskType == 9
|
||||
? showOnline(element)
|
||||
: element.taskType == 2
|
||||
? faceTeachModel(element)
|
||||
: element.taskType == 4
|
||||
? homeworkModel(element)
|
||||
: element.taskType == 5
|
||||
? showTest(element)
|
||||
: element.taskType == 10
|
||||
? evaluationModel(element)
|
||||
: element.taskType == 12
|
||||
? voteModel(element)
|
||||
: element.taskType == 13
|
||||
? projectModel(element)
|
||||
: null
|
||||
"
|
||||
>
|
||||
管理
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -464,14 +515,22 @@
|
||||
</div>
|
||||
|
||||
<!-- 面授管理抽屉 开始 -->
|
||||
<ProjectFaceTaskManage
|
||||
<GrowthFaceTaskManage
|
||||
:permissions="preId"
|
||||
:createId="createId"
|
||||
:type="2"
|
||||
:type="4"
|
||||
v-model:visible="faceTeachModelVisible"
|
||||
:datasource="faceData"
|
||||
/>
|
||||
<!-- 面授管理抽屉 结束-->
|
||||
|
||||
<!-- 面授学员抽屉 -->
|
||||
<GrowthFaceStu
|
||||
:permissions="permissions"
|
||||
v-model:FSvisible="FSvisible"
|
||||
:datasource="facestudent"
|
||||
:type="4"
|
||||
:courseName="name"
|
||||
/>
|
||||
<!-- 查看学员 传入查看学员的id-->
|
||||
<seeStu
|
||||
v-model:Seevisible="Seevisible"
|
||||
@@ -504,15 +563,22 @@
|
||||
<!-- 作业管理抽屉 开始-->
|
||||
<GrowthHomeworkManage
|
||||
:permissions="preId"
|
||||
:createId="createId"
|
||||
v-model:HomeworkModelVisible="homeworkModelVisible"
|
||||
:datasource="homeworkData"
|
||||
/>
|
||||
</a-spin>
|
||||
</div>
|
||||
|
||||
<!-- 二维码弹窗 -->
|
||||
<two-dimensional-code
|
||||
v-model:codevisible="codevisible"
|
||||
:codeInfo="codeInfo"
|
||||
index="0"
|
||||
type="课程二维码"
|
||||
/>
|
||||
<!-- 二维码弹窗 -->
|
||||
<!-- 面授课开课弹框 -->
|
||||
<GrowthOpenCourse ref="coursePlanRef" :type="2" />
|
||||
<GrowthOpenCourse ref="coursePlanRef" :type="4" />
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
import { ref, reactive, toRefs, onMounted, createVNode, watch } from "vue";
|
||||
@@ -526,14 +592,17 @@ import GrowthExamManage from "@/components/growthpath/GrowthExamManage";
|
||||
import GrowthOnlineManage from "@/components/growthpath/GrowthOnlineManage";
|
||||
import CommonStudent from "@/components/student/CommonStudent";
|
||||
import GrowthOpenCourse from "@/components/growthpath/GrowthOpenCourse.vue";
|
||||
import qrCode from "@/utils/growQrCode";
|
||||
import qrCode from "@/utils/qrCode";
|
||||
import { fixDoublePer, checkGrowthPer } from "@/utils/utils";
|
||||
import dialog from "@/utils/dialog";
|
||||
import { TASK_TYPE } from "@/utils/constGrown";
|
||||
import Draggable from "vuedraggable";
|
||||
import TwoDimensionalCode from "@/components/TwoDimensionalCode.vue";
|
||||
import GrowthFaceStu from "@/components/growthpath/GrowthFaceStu";
|
||||
import { DownOutlined, CloseCircleOutlined } from "@ant-design/icons-vue";
|
||||
import ProjectFaceTaskManage from "../../components/drawers/project/ProjectFaceTaskManage";
|
||||
import GrowthFaceTaskManage from "../../components/growthpath/GrowthFaceTaskManage";
|
||||
import GrowthHomeworkManage from "@/components/growthpath/GrowthHomeworkManage";
|
||||
import { courseData } from "@/api/index1";
|
||||
import {
|
||||
getOverview,
|
||||
getBasicInfo,
|
||||
@@ -558,12 +627,14 @@ export default {
|
||||
GrowthExamManage,
|
||||
GrowthOnlineManage,
|
||||
CommonStudent,
|
||||
TwoDimensionalCode,
|
||||
GrowthHomeworkManage,
|
||||
Draggable,
|
||||
ProjectFaceTaskManage,
|
||||
GrowthFaceTaskManage,
|
||||
GrowthOpenCourse,
|
||||
DownOutlined,
|
||||
CloseCircleOutlined,
|
||||
GrowthFaceStu,
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
@@ -573,6 +644,8 @@ export default {
|
||||
const state = reactive({
|
||||
homeworkModelVisible: false,
|
||||
activeKey: "1",
|
||||
FSvisible: false,
|
||||
facestudent: false,
|
||||
commonData: null,
|
||||
showTimeText: null,
|
||||
onlineVisible: false,
|
||||
@@ -588,6 +661,10 @@ export default {
|
||||
preId: route.query.pre,
|
||||
Seevisible: false,
|
||||
studentId: "",
|
||||
codevisible: false, //二维码是否显示
|
||||
codeInfo: {
|
||||
url: "",
|
||||
}, //二维码内容
|
||||
growId: "",
|
||||
basicData: {},
|
||||
listTaskData: [],
|
||||
@@ -615,10 +692,6 @@ export default {
|
||||
);
|
||||
// 新增选修任务
|
||||
const addTask = (url) => {
|
||||
if (state.basicData.isPublished) {
|
||||
message.warning("该任务已发布,不可进行编辑");
|
||||
return;
|
||||
}
|
||||
router.push({
|
||||
path: url,
|
||||
query: { growId: state.routerId, pre: state.preId },
|
||||
@@ -644,6 +717,112 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
const qrCodeItems = ref([]);
|
||||
const visibleEwm = ref({});
|
||||
const qrcodeVisible = async (item) => {
|
||||
if (qrCodeItems.value.length != 0) {
|
||||
qrCodeItems.value = [];
|
||||
}
|
||||
visibleEwm.value[item.id] = !visibleEwm.value[item.id];
|
||||
const planParams = {
|
||||
type: 4,
|
||||
taskId: item.id,
|
||||
};
|
||||
await courseData(planParams).then((res) => {
|
||||
qrCodeItems.value = res.data.data.map((dataItem) => ({
|
||||
...dataItem,
|
||||
courseName: item.taskName,
|
||||
}));
|
||||
if (qrCodeItems.value.length == 1) {
|
||||
qrCode({
|
||||
title: "【签到】二维码",
|
||||
courseName: state.basicData.growthName,
|
||||
name: qrCodeItems.value[0].name + "课程签到",
|
||||
createName:
|
||||
qrCodeItems.value[0].offteachers
|
||||
.map((teacher) => teacher.teacherName)
|
||||
.join(", ") || qrCodeItems.value[0].teacher,
|
||||
url: `${location.protocol}//${location.host}${
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/studentSign?taskId=${
|
||||
qrCodeItems.value[0].id
|
||||
}&taskType=${2}&type=${3}&openCourseId=${qrCodeItems.value[0].id}`,
|
||||
});
|
||||
}
|
||||
if (qrCodeItems.value.length == 0) {
|
||||
message.info("暂无签到二维码");
|
||||
}
|
||||
});
|
||||
};
|
||||
function handleMenuClick({ key }) {
|
||||
const name = qrCodeItems.value[key].name;
|
||||
const teacher = qrCodeItems.value[key].teacher;
|
||||
const id = qrCodeItems.value[key].id;
|
||||
const offteachers = qrCodeItems.value[key].offteachers
|
||||
.map((teacher) => teacher.teacherName)
|
||||
.join(", ");
|
||||
qrCode({
|
||||
title: "【签到】二维码",
|
||||
courseName: state.basicData.growthName,
|
||||
name: name + "课程签到",
|
||||
createName: offteachers || teacher,
|
||||
url: `${location.protocol}//${location.host}${
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/studentSign?taskId=${id}&taskType=${2}&type=${3}&openCourseId=${id}`,
|
||||
});
|
||||
}
|
||||
const qrCodeItemspg = ref([]);
|
||||
const visibleEwmpg = ref({});
|
||||
const qrcodeAssement = async (item) => {
|
||||
if (qrCodeItemspg.value.length != 0) {
|
||||
qrCodeItemspg.value = [];
|
||||
}
|
||||
visibleEwmpg.value[item.id] = !visibleEwmpg.value[item.id];
|
||||
const planParams = {
|
||||
type: 4,
|
||||
taskId: item.id,
|
||||
};
|
||||
await courseData(planParams).then((res) => {
|
||||
const qrCodeItemspgItem = res.data.data.map((dataItem) => ({
|
||||
...dataItem,
|
||||
courseName: item.taskName,
|
||||
}));
|
||||
qrCodeItemspg.value = qrCodeItemspgItem.filter(
|
||||
(item) => item.assessmentId !== null
|
||||
);
|
||||
if (qrCodeItemspg.value.length == 1) {
|
||||
const courseName = state.basicData.growthName;
|
||||
qrCode({
|
||||
title: "【评估】二维码",
|
||||
courseName,
|
||||
name: qrCodeItemspg.value[0].name + "课程评估",
|
||||
createName:
|
||||
qrCodeItemspg.value[0].offteachers
|
||||
.map((teacher) => teacher.teacherName)
|
||||
.join(", ") || qrCodeItemspg.value[0].teacher,
|
||||
url: `${location.protocol}//${location.host}/student-h5/investigatpage?id=${qrCodeItemspg.value[0].id}&type=3&infoId=${qrCodeItemspg.value[0].id}&courseId=${qrCodeItemspg.value[0].assessmentId}&chapterOrStageId=0&level=${courseName}`,
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function handleMenuClickpg({ key }) {
|
||||
const name = qrCodeItemspg.value[key].name;
|
||||
const offteachers = qrCodeItemspg.value[key].offteachers
|
||||
.map((teacher) => teacher.teacherName)
|
||||
.join(", ");
|
||||
const teacher = qrCodeItemspg.value[key].teacher;
|
||||
const id = qrCodeItemspg.value[key].id;
|
||||
const assessmentId = qrCodeItemspg.value[key].assessmentId;
|
||||
const courseName = state.basicData.growthName;
|
||||
qrCode({
|
||||
title: "【评估】二维码",
|
||||
courseName,
|
||||
name: name + "课程评估",
|
||||
createName: offteachers || teacher,
|
||||
url: `${location.protocol}//${location.host}/student-h5/investigatpage?id=${id}&type=3&infoId=${id}&courseId=${assessmentId}&chapterOrStageId=0&level=${courseName}`,
|
||||
});
|
||||
}
|
||||
// 保存/删除上级任务
|
||||
const selectSuperiorTask = (element, row) => {
|
||||
console.log(element, row);
|
||||
@@ -703,28 +882,51 @@ export default {
|
||||
state.growId = state.routerId;
|
||||
};
|
||||
const showCodeModel = (item) => {
|
||||
console.log(item, "item");
|
||||
console.log("二维码任务信息", item);
|
||||
let codeUrl = "";
|
||||
// 在线课 停用 -- 暂时没有在线课停用标记
|
||||
if (item.taskType == 1) {
|
||||
// if (item.taskStatus == 1 || item.taskStatus == 2)
|
||||
// return message.error("该任务无法学习,请联系管理员进行替换。");
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_ONLINE_CLASS_URL +
|
||||
item.taskId;
|
||||
}
|
||||
if (item.taskType == 3) return message.error("请在pc端完成");
|
||||
|
||||
if (item.taskType == 4) {
|
||||
let date1 = new Date(item.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) return message.warning("当前作业已结束");
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/homeworkpage?courseId=" +
|
||||
item.info.id +
|
||||
"&type=4&id=" +
|
||||
item.id +
|
||||
"&chapterOrStageId=" +
|
||||
0 +
|
||||
"&infoId=" +
|
||||
state.routerId;
|
||||
}
|
||||
// 考试 停用
|
||||
if (item.taskType == 5) {
|
||||
if (item.info.examType != 1) {
|
||||
// if (item.taskStatus == 1 || item.taskStatus == 2)
|
||||
// return message.error("该任务无法学习,请联系管理员进行替换。");
|
||||
// 此处判断外部考试跳转
|
||||
if (item.info.examType == 2) {
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_BOE_API_URL +
|
||||
"/mobile/pages/learnPath/examScore?type=14&courseId=" +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/externalexam?type=4&courseId=" +
|
||||
item.info.id +
|
||||
"&id=" +
|
||||
item.id +
|
||||
"&pName=" +
|
||||
item.info.examinationName +
|
||||
"&studentNo=" +
|
||||
item.studentNo;
|
||||
"&chapterOrStageId=0" +
|
||||
"&infoId=" +
|
||||
state.routerId;
|
||||
} else {
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
@@ -732,17 +934,145 @@ export default {
|
||||
item.info.examinationPaperId;
|
||||
}
|
||||
}
|
||||
qrCode({
|
||||
title:
|
||||
item.type == 1
|
||||
? "[在线] 二维码"
|
||||
: item.type == 5
|
||||
? "[考试] 二维码"
|
||||
: "二维码",
|
||||
// 直播结束时间
|
||||
if (item.type == 6) {
|
||||
let date1 = new Date(item.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) return message.warning("当前直播已结束");
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/liveboradcast?courseId=" +
|
||||
item.courseId +
|
||||
"&type=2&id=" +
|
||||
item.id +
|
||||
"&chapterOrStageId=" +
|
||||
item.chapterId +
|
||||
"&infoId=" +
|
||||
state.routerId;
|
||||
}
|
||||
// 外链
|
||||
if (item.type == 7) {
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/outerchain?courseId=" +
|
||||
item.courseId +
|
||||
"&type=2&id=" +
|
||||
item.id +
|
||||
"&chapterOrStageId=" +
|
||||
item.chapterId +
|
||||
"&infoId=" +
|
||||
state.routerId;
|
||||
}
|
||||
//讨论
|
||||
if (item.type == 8) {
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/discusspage?courseId=" +
|
||||
item.courseId +
|
||||
"&type=2&id=" +
|
||||
item.id +
|
||||
"&chapterOrStageId=" +
|
||||
item.chapterId +
|
||||
"&infoId=" +
|
||||
state.routerId;
|
||||
}
|
||||
//活动
|
||||
if (item.type == 9) {
|
||||
let date1 = new Date(item.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) return message.warning("当前活动已结束");
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/activitiespage?courseId=" +
|
||||
item.courseId +
|
||||
"&type=2&id=" +
|
||||
item.id +
|
||||
"&chapterOrStageId=" +
|
||||
item.chapterId +
|
||||
"&infoId=" +
|
||||
state.routerId;
|
||||
}
|
||||
//活动
|
||||
if (item.type == 10) {
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/evaluation?courseId=" +
|
||||
item.courseId +
|
||||
"&evaType=" +
|
||||
item.evaType +
|
||||
"&type=2&targetId=" +
|
||||
item.targetId +
|
||||
"&id=" +
|
||||
item.id +
|
||||
"&chapterOrStageId=" +
|
||||
item.chapterId +
|
||||
"&infoId=" +
|
||||
state.routerId;
|
||||
}
|
||||
|
||||
// 评估 停用
|
||||
if (item.type == 11) {
|
||||
// if (item.taskStatus == 1 || item.taskStatus == 2)
|
||||
// return message.error("该任务无法学习,请联系管理员进行替换。");
|
||||
console.log("item", item);
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/investigatpage?courseId=" +
|
||||
item.courseId +
|
||||
"&type=2&id=" +
|
||||
item.id +
|
||||
"&chapterOrStageId=" +
|
||||
item.chapterId +
|
||||
"&infoId=" +
|
||||
state.routerId;
|
||||
}
|
||||
// 投票
|
||||
if (item.type == 12) {
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/ballotpage?courseId=" +
|
||||
item.courseId +
|
||||
"&btype=2&id=" +
|
||||
item.id +
|
||||
"&chapterOrStageId=" +
|
||||
item.chapterId +
|
||||
"&type=2&infoId=" +
|
||||
state.routerId;
|
||||
}
|
||||
// 项目
|
||||
if (item.type == 13) {
|
||||
codeUrl =
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/projectdetails?type=2&projectId=" +
|
||||
item.courseId +
|
||||
"&id=" +
|
||||
item.id +
|
||||
"&chapterOrStageId=" +
|
||||
item.chapterId +
|
||||
"&type=2&infoId=" +
|
||||
state.routerId;
|
||||
}
|
||||
state.codevisible = true;
|
||||
let obj = {
|
||||
title: "[" + state.TASK_TYPE[item.taskType].name + "]二维码",
|
||||
name: item.name,
|
||||
copyAble: true,
|
||||
url: codeUrl,
|
||||
});
|
||||
};
|
||||
state.codeInfo = obj;
|
||||
};
|
||||
//面授学员的弹窗
|
||||
const showFS = (item) => {
|
||||
state.FSvisible = true;
|
||||
state.facestudent = item;
|
||||
console.log("facestudent", state.facestudent);
|
||||
};
|
||||
// 作业点击管理弹框
|
||||
const homeworkModel = (data) => {
|
||||
@@ -755,7 +1085,7 @@ export default {
|
||||
const faceTeachModel = (data) => {
|
||||
console.log(data);
|
||||
state.faceTeachModelVisible = true;
|
||||
state.faceTeachModelVisibleTitle = data.name;
|
||||
state.faceTeachModelVisibleTitle = data.taskName;
|
||||
state.faceData = data;
|
||||
// 面授课弹框名称 RouterFaceTeachManage
|
||||
};
|
||||
@@ -858,6 +1188,7 @@ export default {
|
||||
const openCourse = (ele) => {
|
||||
coursePlanRef.value.openDrawer(ele);
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
stuRef,
|
||||
@@ -880,6 +1211,15 @@ export default {
|
||||
faceTeachModel,
|
||||
selectSuperiorTask,
|
||||
addTask,
|
||||
qrcodeAssement,
|
||||
handleMenuClickpg,
|
||||
handleMenuClick,
|
||||
qrcodeVisible,
|
||||
showFS,
|
||||
qrCodeItems,
|
||||
visibleEwm,
|
||||
qrCodeItemspg,
|
||||
visibleEwmpg,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1580,7 +1920,7 @@ export default {
|
||||
|
||||
.operations {
|
||||
display: flex;
|
||||
width: 250px;
|
||||
width: 460px;
|
||||
justify-content: flex-end;
|
||||
.operation {
|
||||
color: #4ea6ff;
|
||||
@@ -1589,6 +1929,12 @@ export default {
|
||||
width: 63px;
|
||||
text-align: center;
|
||||
}
|
||||
.operations_dropdown {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
min-width: 90px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ module.exports = defineConfig({
|
||||
},
|
||||
proxy: {
|
||||
"/professional": {
|
||||
// target: 'http://192.168.16.195:32002',
|
||||
target: 'http://192.168.18.141:32002',
|
||||
target: 'http://192.168.150.97:32002',
|
||||
// target: 'http://192.168.237.141:32002',
|
||||
changeOrigin: true,
|
||||
},
|
||||
// "/growth": {
|
||||
|
||||
Reference in New Issue
Block a user