Merge remote-tracking branch 'origin/develop' into manage-release

This commit is contained in:
yuping
2023-03-04 15:17:37 +08:00
48 changed files with 1173 additions and 947 deletions

View File

@@ -155,8 +155,8 @@ const getDictList = (param) => api1.getDictTree({code: param,}).then((res) => re
}
.white {
background: #fff;
color: #4ea6ff;
// background: #fff;
// color: #4ea6ff;
}
.cus-input {

View File

@@ -1,14 +1,15 @@
//学员列表带分页
export const USER_LIST_PAGE = '/userbasic/user/list post'
export const USER_LIST_PAGE = "/userbasic/user/list post";
//学员列表 没有分页数据 只能通过名称检索 速度较快
export const USER_LIST = '/userbasic/user/searchList post'
export const ORG_LIST = '/userbasic/org/list post'
export const ORG_CHILD_LIST = '/userbasic/org/info post'
export const USER_LIST = "/userbasic/user/searchList post";
export const ORG_LIST = "/userbasic/org/list post";
export const ORG_CHILD_LIST = "/userbasic/org/info post";
// export const AUDIENCE_LIST = '/userbasic/audience/list post'
//当前用户可以查看的受众接口
export const AUDIENCE_LIST = '/userbasic/audience/userAudiencesFilter post'
export const USER_PERMISSION = '/userbasic/permission/listByUser post'
export const CASE_PAGE = '/systemapi/xboe/m/boe/cases/pagelist post formData'
export const EXAM_PAPER_PAGE = '/systemapi/xboe/m/exam/paper/querylist post formData'
export const TEST_PAGE = '/api/b1/system/quiz/quiz-list post formData'
export const ONLINE_PAGE = '/systemapi/xboe/m/course/manage/pagelist post formData'
export const AUDIENCE_LIST = "/userbasic/audience/userAudiencesFilter post";
export const USER_PERMISSION = "/userbasic/permission/listByUser post";
export const CASE_PAGE = "/systemapi/xboe/m/boe/cases/pagelist post formData";
export const EXAM_PAPER_PAGE = "/systemapi/xboe/m/exam/paper/querylist post formData";
export const TEST_PAGE = "/api/b1/system/quiz/quiz-list post formData";
export const ONLINE_PAGE = "/systemapi/xboe/m/course/manage/pagelist post formData";
export const ONLINE_COURSE_DEL = (id, courseId) => `/systemapi/xboe/school/study/course/delete-signup?id=${id}&couserId=${courseId} post`;

View File

@@ -6,3 +6,4 @@ export const ROUTER_DETAIL_MODIFY = '/admin/router/routerInfoTemp post';
export const PROJECT_DETAIL_MODIFY = '/admin/project/projectInfoTemp post';
export const PROJECT_TEMPLATE_DETAIL_MODIFY = '/admin/project/template/editStageAndTask post';
export const PROJECT_RELEASE = '/admin/project/realease';
export const ASYNC_STUDENT_STATUS = '/admin/cache/getStudentAsyncStatus';

View File

@@ -237,7 +237,7 @@ export function useRequest(_url, params = {}, init = true) {
};
}
export async function boeRequest(_url, params) {
export async function boeRequest(_url, params = {}) {
const s = _url.split(' ')
let url = s[0]
const method = s[1]?.toLowerCase() || 'get'

View File

@@ -192,7 +192,7 @@
<router-link to="/researchmanage">评估管理</router-link>
</a-menu-item>
<a-sub-menu key="sub6">
<a-sub-menu key="sub6" v-if="checkMenu('OldSystemManage','ReadingClubManage','dictmanage')">
<template #icon>
<div class="imgBox">
<img
@@ -202,7 +202,7 @@
</div>
</template>
<template #title>系统管理</template>
<a-menu-item key="sub6-1">
<a-menu-item key="sub6-1" v-if="checkMenu('OldSystemManage')">
<span
:class="{
circleActive: selectedKeys[0] === 'sub6-1',
@@ -211,7 +211,7 @@
></span>
<router-link to="/OldSystemManage">旧版管理员界面</router-link>
</a-menu-item>
<a-menu-item key="sub6-2">
<a-menu-item key="sub6-2" v-if="checkMenu('ReadingClubManage')">
<span
:class="{
circleActive: selectedKeys[0] === 'sub6-2',
@@ -220,16 +220,7 @@
></span>
<router-link to="/ReadingClubManage">业务支援读书会管理</router-link>
</a-menu-item>
<a-menu-item key="sub6-3">
<span
:class="{
circleActive: selectedKeys[0] === 'sub6-3',
circle: selectedKeys[0]!=='sub6-3',
}"
></span>
<router-link to="/AudienceManage">受众管理</router-link>
</a-menu-item>
<a-menu-item key="sub6-4">
<a-menu-item key="sub6-4" v-if="checkMenu('dictmanage')">
<span
:class="{
circleActive: selectedKeys[0] === 'sub6-4',
@@ -240,7 +231,28 @@
</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub5" v-if="checkMenu('systemManage')">
<a-sub-menu key="sub7" v-if="checkMenu('AudienceManage')">
<template #icon>
<div class="imgBox">
<img
style="width: 22px; height: 22px"
src="../assets/images/navleft/review.png"
/>
</div>
</template>
<template #title>受众管理</template>
<a-menu-item key="sub7-1" v-if="checkMenu('AudienceManage')">
<span
:class="{
circleActive: selectedKeys[0] === 'sub6-7',
circle: selectedKeys[0]!=='sub6-7',
}"
></span>
<router-link to="/AudienceManage">受众管理</router-link>
</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub5" v-if="checkMenu('researchmanage')">
<div class="imgBox">
<img style="width: 16px; height: 16px" src="../assets/images/navleft/system.png"/>
</div>

View File

@@ -1,13 +1,13 @@
<template>
<a-modal
:visible="true"
:footer="null"
:title="null"
:centere="true"
:closable="false"
style="margin-top: 400px"
:zIndex="9999"
@cancel="close"
:visible="true"
:footer="null"
:title="null"
:centere="true"
:closable="false"
style="margin-top: 400px"
:zIndex="9999"
@cancel="close"
>
<div class="delete">
<div class="del_header"></div>
@@ -22,7 +22,7 @@
<div><span>{{ content }}</span></div>
</div>
<div class="del_btnbox">
<div class="del_btn btn1" @click="close">
<div class="del_btn btn2" @click="close" v-if="cancel">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2" @click="handleConfirm">
@@ -34,9 +34,9 @@
</a-modal>
</template>
<script setup>
import notide from '@/assets/images/coursewareManage/notice.png'
import infoPng from '@/assets/images/coursewareManage/QR.png'
import {defineProps, ref} from "vue";
import notide from "@/assets/images/coursewareManage/notice.png";
import infoPng from "@/assets/images/coursewareManage/QR.png";
import {defineProps, onMounted, ref} from "vue";
const props = defineProps({
close: {
@@ -50,22 +50,34 @@ const props = defineProps({
content: String,
title: {
type: String,
default: '提示'
default: "提示"
},
cancel: {
type: Boolean,
default: true
},
duration: {
type: Number,
default: 0
},
type: {
type: Number,
default: 1
}
})
});
const types = {
1: infoPng,
2: notide
}
const type = ref(1)
};
const type = ref(1);
onMounted(() => {
props.duration && setTimeout(() => props.close(), props.duration)
});
function handleConfirm() {
props.ok()
props.close()
props.ok();
props.close();
}
</script>
<style lang="scss" scoped>
@@ -84,8 +96,8 @@ function handleConfirm() {
width: calc(100%);
height: 40px;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
}

View File

@@ -2,47 +2,68 @@
<div @click="openDrawer">
<slot></slot>
</div>
<a-drawer :visible="visible" class="drawerStyle addevalDrawer" width="800" title="添加测评" placement="right">
<a-drawer
:visible="visible"
class="drawerStyle addevalDrawer"
width="800"
title="添加测评"
placement="right"
>
<div class="drawerMain">
<div class="header">
<div class="headerTitle">{{ taskIndex >= 0 ? "编辑" : "添加" }}测评</div>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"/>
<div class="headerTitle">
{{ taskIndex >= 0 ? "编辑" : "添加" }}测评
</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
</div>
<div class="contentMain">
<div class="main_left">
<div class="main_item">
<div class="signbox">
<div class="sign">
<img src="@/assets/images/coursewareManage/asterisk.png" alt=""/>
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<span style="margin-right: 3px">测评名称</span>
</div>
<div class="btnbox">
<a-input v-model:value="formData.evaluationName" style="width: 400px; height: 40px; border-radius: 8px;"
placeholder="请输入测评名称"
show-count
:maxlength="20"/>
<a-input
v-model:value="formData.evaluationName"
style="width: 400px; height: 40px; border-radius: 8px"
placeholder="请输入测评名称"
show-count
:maxlength="20"
/>
</div>
</div>
<div class="main_item">
<div class="signbox">
<div class="sign">
<img src="@/assets/images/coursewareManage/asterisk.png" alt=""/>
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<span style="margin-right: 3px">选择测评</span>
</div>
<div class="btnbox">
<EvList v-model:evaluationTypeName="formData.evaluationTypeName" v-model:evaluationTypeId="formData.evaluationTypeId">
<button class="checkEval">
选择测评
</button>
<EvList
v-model:evaluationTypeName="formData.evaluationTypeName"
v-model:evaluationTypeId="formData.evaluationTypeId"
>
<button class="checkEval">选择测评</button>
</EvList>
<div v-if="formData.evaluationTypeName" style="margin-left:20px">
<div v-if="formData.evaluationTypeName" style="margin-left: 20px">
<a-tag closable @close="delTag" color="processing">
<span style="font-size: 14px; line-height: 33px"
>{{ formData.evaluationTypeName }}</span
>
<span style="font-size: 14px; line-height: 33px">{{
formData.evaluationTypeName
}}</span>
</a-tag>
</div>
</div>
@@ -53,14 +74,16 @@
</div>
<div class="btnbox">
<a-range-picker
:show-time="{ format: 'HH:mm' }"
:disabled-date="disabledDate"
:disabled-time="disabledRangeTime"
style="width: 400px; height: 40px; border-radius: 8px;" v-model:value="dateTime"
format="YYYY-MM-DD HH:mm"
valueFormat="YYYY-MM-DD HH:mm"
@change="timeChange"
:placeholder="[' 开始时间', ' 结束时间']"/>
:show-time="{ format: 'HH:mm' }"
:disabled-date="disabledDate"
:disabled-time="disabledRangeTime"
style="width: 400px; height: 40px; border-radius: 8px"
v-model:value="dateTime"
format="YYYY-MM-DD HH:mm"
valueFormat="YYYY-MM-DD HH:mm"
@change="timeChange"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</div>
</div>
<div class="main_item2">
@@ -68,10 +91,15 @@
<span style="margin-right: 3px">测评说明</span>
</div>
<div class="textarea">
<a-textarea show-count :maxlength="200" v-model:value="formData.evaluationExplain"
placeholder="请输入测评说明"
style="width:400px;" allowClear :rows="6"/>
<a-textarea
show-count
:maxlength="200"
v-model:value="formData.evaluationExplain"
placeholder="请输入测评说明"
style="width: 400px"
allowClear
:rows="6"
/>
</div>
</div>
</div>
@@ -84,55 +112,55 @@
</a-drawer>
</template>
<script setup>
import {defineEmits, defineProps, ref} from "vue";
import { defineEmits, defineProps, ref } from "vue";
import EvList from "./EvList.vue";
import {Form, message} from "ant-design-vue";
import { Form, message } from "ant-design-vue";
import dayjs from "dayjs";
const props = defineProps({
type: Number,
taskList: []
})
const visible = ref(false)
taskList: [],
});
const visible = ref(false);
const formData = ref({
evaluationName: '',
evaluationTypeId: '',
evaluationTypeName: '',
evaluationExplain: '',
evaluationStartTime: '',
evaluationEndTime: '',
})
const emit = defineEmits({})
evaluationName: "",
evaluationTypeId: "",
evaluationTypeName: "",
evaluationExplain: "",
evaluationStartTime: "",
evaluationEndTime: "",
});
const emit = defineEmits({});
const taskIndex = ref(-1);
const dateTime = ref([]);
const rulesRef = ref({
evaluationName: [
{
required: true,
message: '请输入测评名称',
message: "请输入测评名称",
},
],
evaluationTypeId: [
{
required: true,
message: '请选择测评',
message: "请选择测评",
},
],
evaluationTypeName: [
{
required: true,
message: '请选择测评',
message: "请选择测评",
},
],
});
const {resetFields, validate} = Form.useForm(formData, rulesRef);
const { resetFields, validate } = Form.useForm(formData, rulesRef);
const closeDrawer = () => {
visible.value = false
taskIndex.value = -1
dateTime.value = []
resetFields()
visible.value = false;
taskIndex.value = -1;
dateTime.value = [];
resetFields();
};
const range = (start, end) => {
@@ -144,12 +172,12 @@ const range = (start, end) => {
};
function timeChange(time, timeStr) {
formData.value.evaluationStartTime = timeStr[0]
formData.value.evaluationEndTime = timeStr[1]
formData.value.evaluationStartTime = timeStr[0];
formData.value.evaluationEndTime = timeStr[1];
}
const disabledDate = (current) => {
return current && current < dayjs().startOf('day');
return current && current < dayjs().startOf("day");
};
const disabledRangeTime = () => ({
@@ -159,38 +187,51 @@ const disabledRangeTime = () => ({
});
function delTag() {
formData.value.evaluationTypeId = ''
formData.value.evaluationTypeName = ''
formData.value.evaluationTypeId = "";
formData.value.evaluationTypeName = "";
}
async function confirm() {
await validate().catch(({errorFields}) => {
await validate().catch(({ errorFields }) => {
message.warning(errorFields[0].errors.join());
throw Error("数据校验不通过")
throw Error("数据校验不通过");
});
if (taskIndex.value === -1) {
const list = props.taskList
list.push({name: formData.value.evaluationName,duration:dayjs(formData.value.evaluationEndTime).diff(formData.value.evaluationStartTime,'minutes'), type: props.type, info: {...formData.value}})
const list = props.taskList;
list.push({
name: formData.value.evaluationName,
duration: dayjs(formData.value.evaluationEndTime).diff(
formData.value.evaluationStartTime,
"minutes"
),
type: props.type,
info: { ...formData.value },
});
} else {
const data = props.taskList[taskIndex.value]
data.name = formData.value.evaluationName
data.info = formData.value
data.duration = dayjs(formData.value.evaluationEndTime).diff(formData.value.evaluationStartTime,'minutes')
const data = props.taskList[taskIndex.value];
data.name = formData.value.evaluationName;
data.info = {...formData.value};
data.duration = dayjs(formData.value.evaluationEndTime).diff(
formData.value.evaluationStartTime,
"minutes"
);
}
emit('update:taskList', [...props.taskList])
closeDrawer()
emit("update:taskList", [...props.taskList]);
closeDrawer();
}
function openDrawer(i, row) {
row && (formData.value = {...row.info});
row && (dateTime.value = [dayjs(row.info.evaluationStartTime, "YYYY-MM-DD HH:mm"), dayjs(row.info.evaluationEndTime, "YYYY-MM-DD HH:mm")]);
(i >= 0) && (taskIndex.value = i)
visible.value = true
row && (formData.value = { ...row.info });
row &&
(dateTime.value = [
dayjs(row.info.evaluationStartTime, "YYYY-MM-DD HH:mm"),
dayjs(row.info.evaluationEndTime, "YYYY-MM-DD HH:mm"),
]);
i >= 0 && (taskIndex.value = i);
visible.value = true;
}
defineExpose({openDrawer})
defineExpose({ openDrawer });
</script>
<style lang="scss">
.ant-table-striped :deep(.table-striped) td {
@@ -402,8 +443,8 @@ defineExpose({openDrawer})
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
background: #f6f9fd;
}

View File

@@ -138,7 +138,7 @@ function confirm() {
} else {
const data = props.taskList[taskIndex.value]
data.name = formData.value.workName
data.info = formData.value
data.info = {...formData.value}
data.duration = dayjs(formData.value.submitEndTime).diff(formData.value.submitStartTime,'minutes')
}
emit('update:taskList', [...props.taskList])

View File

@@ -17,7 +17,7 @@
</div>
<div>
<div class="contentMain" style="padding:20px">
<CreateOnline ref="onlineRef">
<CreateOnline ref="onlineRef" :id="props.id" :type="props.infoType">
<a-button type="primary" style="border-radius: 4px">{{
taskIndex === -1 ? '选择/新建课程' : '重新选择'
}}
@@ -46,7 +46,9 @@ import {message} from "ant-design-vue";
import CreateOnline from "@/components/drawers/CreateOnline.vue";
const props = defineProps({
type: Number,
infoType: Number,
courseSyncFlag: Number,
id: Number,
taskList: []
})
const visible = ref(false)
@@ -133,6 +135,10 @@ function confirm() {
function selectCourse(row) {
console.log(row)
if(!props.courseSyncFlag && !row.refId){
message.warning("请新建本项目在线课!");
return
}
rowSelectKeys.value = [row.id]
selectsData.value = [row]
onlineRef.value.closeModal()

View File

@@ -59,7 +59,7 @@
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
</a-tag>
</div>
<s-test v-else v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
<s-test v-if="taskIndex < 0" v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
<div class="btnbox">
<button class="xkbtn" style="margin:0" >
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷
@@ -116,7 +116,7 @@
<div class="textarea">
<a-textarea :disabled="taskIndex >= 0" v-model:value="formData.examinationExplain" placeholder="请输入考试说明"
allow-clear show-count :maxlength="200" :rows="6" />
</div>
</div>
</div>
<div class="main_item2">
<div class="signbox">
@@ -212,7 +212,7 @@
</div>
<div class="btnbox">
<a-input v-model:value="formData.source" style="width: 400px; height: 40px; border-radius: 8px" :disabled="taskIndex >= 0"
placeholder="请输入数据来源" :maxlength="20" />
placeholder="请输入数据来源" :maxlength="120" />
</div>
</div>
<div class="main_item2">
@@ -327,6 +327,8 @@ watch(() => formData.value.examType, () => {
const closeDrawer = () => {
visible.value = false
taskIndex.value = -1
formData.value.examinationLimit = ''
formData.value.examinationExplain = ''
resetFields()
dateTime.value = []
};

View File

@@ -19,7 +19,7 @@
<div class="main">
<div class="basetext"><span>投票题目</span></div>
<div v-if="voteResource" class="basequestion">
<div class="ques" v-for=" item,index in voteResource.ballotVo.voteStemVoList" :key="index">
<div class="ques" v-for=" item,index in voteResource.voteStemDtoList" :key="index">
<div class="quename">{{ index+1 +"."+ item.voteStemName }}</div>
<div class="queanswer">
<a-radio-group v-model:value="currentChoice[index]">
@@ -27,7 +27,7 @@
<div class="queabox" v-for="items,index in item.optionDetailList" :key="index">
<a-radio
v-model:checked="checked"
:value="items.optionId"
:value="items.id"
>
{{items.optionName}}
</a-radio>
@@ -138,11 +138,11 @@ export default {
state.voteResource = res.data.data
let choiceArr = []
let dataQuestion = state.voteResource.ballotVo.voteStemVoList
let dataQuestion = state.voteResource.voteStemDtoList
for(let i=0;i<dataQuestion.length;i++){
for(let j=0;j<dataQuestion[i].optionDetailList.length;j++){
if(dataQuestion[i].optionDetailList[j].isAnswer){
choiceArr.push(dataQuestion[i].optionDetailList[j].optionId)
choiceArr.push(dataQuestion[i].optionDetailList[j].id)
break
}
if(j==dataQuestion[i].optionDetailList.length - 1 && dataQuestion[i].optionDetailList[j].isAnswer == false){

View File

@@ -68,14 +68,14 @@
</div>
<span style="margin-right: 3px">选择试卷</span>
</div>
<s-test v-model:id="formData.examinationTestId" v-model:name="formData.examinationTestName">
<s-test v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
<div class="btnbox">
<button class="xkbtn" style="margin:0">
{{ formData.examinationTestId ? "重选" : "选择" }}试卷
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷
</button>
</div>
</s-test>
<div v-if="formData.examinationTestId">
<div v-if="formData.examinationPaperId">
<a-tag closable color="processing" @close="delTag" :closeIcon="true">
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
</a-tag>
@@ -287,7 +287,7 @@
v-model:value="formData.source"
style="width: 400px; height: 40px; border-radius: 8px"
placeholder="请输入数据来源"
:maxlength="20"
:maxlength="120"
/>
</div>
</div>
@@ -327,7 +327,7 @@ const props = defineProps({
const visible = ref(false)
const initValue = {
examinationName: '',
examinationTestId: '',
examinationPaperId: '',
examinationStartTime: '',
examinationEndTime: '',
examinationDuration: '',
@@ -349,7 +349,7 @@ const innerRule = {
message: '请输入考试名称',
},
],
examinationTestId: [
examinationPaperId: [
{
required: true,
message: '请输入选择试卷',
@@ -440,7 +440,7 @@ function openDrawer() {
}
const delTag = () => {
formData.value.examinationTestId = '';
formData.value.examinationPaperId = '';
formData.value.examinationTestName = '';
}

View File

@@ -375,6 +375,7 @@ export default {
background-color: #fafafa !important;
}
.crevoteDrawer {
z-index: 9999;
.drawerMain {
.header {
height: 73px;

View File

@@ -3,38 +3,44 @@
<slot></slot>
</div>
<a-modal
:visible="visible"
:footer="null"
:centered="true"
:maskClosable="false"
width="80%"
height="80%"
@cancel="closeModal"
:visible="visible"
:footer="null"
:centered="true"
:maskClosable="false"
width="80%"
height="80%"
@cancel="closeModal"
>
<iframe
id="iframe"
style="width: 100%; height: 600px"
:src="iframeUrl + '/course/manages?f=choose'"
name="myframe"
security="restricted"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
id="iframe"
style="width: 100%; height: 600px"
:src="`${iframeUrl}/course/manages?f=choose?ref_id=${props.id}&ref_type=${props.type}`"
name="myframe"
security="restricted"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
></iframe>
</a-modal>
</template>
<script setup>
import {ref} from "vue";
import {defineProps, ref} from "vue";
import {iframeUrl} from "@/api/method";
const visible = ref(false)
const visible = ref(false);
const props = defineProps({
type: Number,
id: Number,
});
function openModal() {
visible.value = true
visible.value = true;
}
function closeModal() {
visible.value = false
visible.value = false;
}
defineExpose({closeModal})
defineExpose({ closeModal });
</script>
<style lang="scss">
@@ -302,8 +308,8 @@ defineExpose({closeModal})
justify-content: center;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
.inhe {

View File

@@ -130,7 +130,7 @@
</div>
<div class="btnn">
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button>
</div>
</div>

View File

@@ -117,7 +117,7 @@
<EScore v-model:eScorevisible="eScorevisible" />
</a-drawer>
<!-- 查看答卷抽屉 -->
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource"/>
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource1"/>
</template>
<script>
@@ -318,14 +318,14 @@ export default {
customRender: (text) => {
return (
<div class="racona">
{text.record.status == '0' ? "查看答卷" :
<a onClick={()=>{
{text.record.status === 1 || text.record.status === 9 ?
<a onClick={()=>{
state.studentKid = text.record.studentKid;
state.datasource = text.record;
state.datasource1 = text.record;
state.CAvisible = true;
}}> 查看答卷 </a>
}}>查看答卷 </a> :
<span style="color:rgba(0, 0, 0, 0.25);cursor:not-allowed;"> 查看答卷 </span>
}
</div>
);
},
@@ -334,7 +334,7 @@ export default {
loadingData: true,
studentKid: '',
CAvisible: false,
datasource: ''
datasource1: ''
});
const closeDrawer = () => {

View File

@@ -498,7 +498,7 @@ export default {
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){
{/* 评估导出 */}
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}`)
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{
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}`)
}

View File

@@ -505,7 +505,7 @@ export default {
window.open(`${process.env.VUE_APP_BASE_API}/admin/online/manage/exportOnline?chapterId=${props.datasource.chapterId}&type=${2}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}`)
}else if(props.datasource.type==11){
{/* 评估导出 */}
window.open(`${process.env.VUE_APP_BASE_API}admin/assessment/manage/exportAssessmentMessage?chapterId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&courseId=${props.datasource.courseId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/exportAssessmentMessage?chapterId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&courseId=${props.datasource.courseId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
}else{
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
}

View File

@@ -437,7 +437,7 @@
{/* 导出数据 */}
function exportData() {
window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.chapterId}&type=${1}&targetId=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.chapterId}&type=${1}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}`)
}
return {
...toRefs(state),

View File

@@ -79,7 +79,7 @@
<EScore v-model:eScorevisible="eScorevisible" />
</a-drawer>
<!-- 查看答卷抽屉 -->
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource" />
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource1" />
</template>
<script>
@@ -306,7 +306,7 @@ export default {
type="link"
onClick={() => {
state.studentKid = text.record.studentKid;
state.datasource = text.record;
state.datasource1 = text.record;
state.CAvisible = true;
}}>
查看答卷
@@ -321,7 +321,7 @@ export default {
disabled
onClick={() => {
state.studentKid = text.record.studentKid;
state.datasource = text.record;
state.datasource1 = text.record;
state.CAvisible = true;
}}>
查看答卷
@@ -336,7 +336,7 @@ export default {
loadingData: true,
studentKid: '',
CAvisible: false,
datasource: ''
datasource1: ''
});
const closeDrawer = () => {

View File

@@ -780,7 +780,7 @@ const submitAuth = () => {
if (props.type === 2) {
stageVisible.value = true;
} else {
handleStageOk();
handleDialogOk();
}
};

View File

@@ -1,45 +1,45 @@
<template>
<a-modal
:visible="visiable"
:centered="true"
width="70%"
title="学员管理"
@cancel="closeDrawer"
:visible="visiable"
:centered="true"
width="70%"
title="学员管理"
@cancel="closeDrawer"
>
<div class="header-content">
<div style="font-size: 16px">
xxxxxxxx 课程
{{ formData.name }} 课程
</div>
<div>
<span style="color:#999">内容分类</span>12312
</div>
<div>
<span style="color:#999">授课教师</span>12312
<span style="color:#999">授课教师</span>{{ formData.sysType1 }}/{{ formData.sysType2 }}/{{ formData.sysType3 }}
</div>
<div>
<span style="color:#999">审核状态</span>12312
<span style="color:#999">审核状态</span>{{ formData.status }}
</div>
</div>
<div class="TableStudent">
<a-row
type="flex"
gutter="12"
style="padding-left: 20px; margin-right: 0px"
type="flex"
gutter="12"
style="padding-left: 20px; margin-right: 0px"
>
<a-col>
<a-form-item title="学员名称:">
<a-input
class="cus-input"
v-model:value="searchParams.studentName"
placeholder="请输入学员名称"
class="cus-input"
v-model:value="searchParams.studentName"
placeholder="请输入学员名称"
/>
</a-form-item>
</a-col>
<a-col>
<a-button
class="cus-btn"
style="background: #4ea6ff; color: #fff; width: 100px"
@click="searchStu"
class="cus-btn"
style="background: #4ea6ff; color: #fff; width: 100px"
@click="searchStu"
>
<template #icon><img style="margin-right: 10px" src="../../assets/images/courseManage/search0.png"/>
</template>
@@ -55,16 +55,17 @@
</a-row>
<a-row
type="flex"
gutter="12"
style="padding-left: 20px; margin-right: 0px"
type="flex"
gutter="12"
style="padding-left: 20px; margin-right: 0px"
>
<a-col :span="1.5">
<CommonStudent
:type="type"
:id="id"
@finash="submitCall"
:stage="stage"
:type="type"
title="添加在线课学员"
:id="formData.id"
@finash="submitCall"
:stage="stage"
>
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff">
<template #icon><img style="margin-right: 10px" src="../../assets/images/courseManage/add0.png"/>
@@ -76,17 +77,16 @@
</a-row>
<div style="margin-top: 20px">
<a-table
:columns="columns"
:data-source="studentList"
:pagination="stuPagination"
:loading="loading"
row-key="id"
:row-selection="stuRowSelection"
:columns="columns"
:data-source="studentList"
:pagination="stuPagination"
:loading="loading"
row-key="id"
>
<template #action="{ record }">
<a-space :size="2">
<slot name="extension" v-bind:data="{ record }"></slot>
<a-button v-if="checkPer(permissions)" @click="del(record.id)" type="link" danger>删除</a-button>
<a-button v-if="checkPer(permissions)" @click="del(record.courseStuId)" type="link" danger>删除</a-button>
</a-space>
</template>
</a-table>
@@ -95,22 +95,20 @@
</a-modal>
</template>
<script setup>
import {computed, createVNode, defineExpose, defineProps, ref, watch} from "vue";
import {usePage} from "@/api/request";
import {computed, defineExpose, defineProps, ref, watch} from "vue";
import {boeRequest, usePage} from "@/api/request";
import {STUDENT_LIST} from "@/api/apis";
import {delStudentList} from "@/api/index1";
import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
import {Modal} from "ant-design-vue";
import CommonStudent from "@/components/student/CommonStudent";
import {checkPer} from "@/utils/utils";
import dialog from "@/utils/dialog";
import {ONLINE_COURSE_DEL} from "@/api/ThirdApi";
const props = defineProps({
permissions: {
type: String,
default: ''
default: ""
},
type: Number,
id: String,
stage: {
type: Array,
default: () => [],
@@ -127,20 +125,20 @@ const initParams = {
studentName: "",
pageNo: 1,
pageSize: 10,
type: props.type || '',
type: props.type || "",
types: props.types,
pid: props.id || '',
}
pid: props.id || "",
};
const searchParams = ref(initParams)
const searchName = ref('')
const searchParams = ref(initParams);
const searchName = ref("");
const columns = ref([
{
title: "姓名",
dataIndex: "studentName",
key: "studentName",
width: 30,
width: 50,
align: "center",
ellipsis: true,
},
@@ -160,17 +158,89 @@ const columns = ref([
align: "center",
ellipsis: true,
},
{
title: "岗位",
dataIndex: "studentJobName",
key: "studentJobName",
width: 80,
align: "center",
ellipsis: true,
},
{
title: "Band",
dataIndex: "studentBandDesc",
key: "studentBandDesc",
width: 80,
align: "center",
ellipsis: true,
},
{
title: "报名状态",
dataIndex: "studentDepartName",
key: "studentDepartName",
width: 80,
align: "center",
ellipsis: true,
customRender: () => "已报名",
},
{
title: "加入方式",
dataIndex: "studentDepartName",
key: "studentDepartName",
width: 80,
align: "center",
ellipsis: true,
customRender: () => "手动加入",
},
{
title: "数据来源",
dataIndex: "id",
key: "id",
width: 80,
align: "center",
ellipsis: true,
customRender: () => "-",
},
{
title: "评估状态",
dataIndex: "status",
key: "status",
width: 80,
align: "center",
ellipsis: true,
customRender: () => "-",
},
{
title: "考试成绩",
dataIndex: "score",
key: "score",
width: 80,
align: "center",
ellipsis: true,
customRender: ({ record: { score } }) => score || "-",
},
{
title: "状态",
dataIndex: "status",
key: "status",
width: 80,
align: "center",
ellipsis: true,
customRender: ({ record: { status } }) => status ? "已完成" : "未开始",
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
width: 50,
align: "center",
slots: {customRender: "action"},
slots: { customRender: "action" },
},
])
]);
const {data: studentList, fetch: searchStu, total, loading} = usePage(STUDENT_LIST, searchParams)
const formData = ref({});
const { data: studentList, fetch: searchStu, total, loading } = usePage(STUDENT_LIST, searchParams, false);
const stuPagination = computed(() => ({
total: total.value,
@@ -180,21 +250,13 @@ const stuPagination = computed(() => ({
onChange: changePagination
}));
const stuSelectKeys = ref([]);
const stuRowSelection = computed(() => ({
columnWidth: 20,
selectedRowKeys: stuSelectKeys.value,
onChange: onStuSelectChange,
preserveSelectedRowKeys: true,
}));
function onStuSelectChange(e) {
stuSelectKeys.value = e;
}
const openDrawer = () => {
const openDrawer = (raw) => {
console.log(raw);
searchParams.value.pid = raw.id;
formData.value = raw;
visiable.value = true;
searchStu();
};
const changePagination = (page) => {
@@ -202,20 +264,17 @@ const changePagination = (page) => {
};
function del(id) {
Modal.confirm({
title: () => '确定删除?',
icon: () => createVNode(ExclamationCircleOutlined),
content: () => '数据删除后不可恢复!',
okText: () => '确定',
okType: 'danger',
cancelText: () => '取消',
onOk() {
dialog({ content: "确定删除?", ok: async () => {
if (id) {
loading.value = true
delStudentList({ids: [id]}).then(() => searchStu())
loading.value = true;
await boeRequest(ONLINE_COURSE_DEL(id, formData.value.id))
searchStu()
}
},
});
}});
}
function submitCall(flag) {
flag && searchStu();
}
const closeDrawer = () => {
@@ -223,13 +282,13 @@ const closeDrawer = () => {
};
function reset() {
searchParams.value = initParams
searchName.value = ''
searchParams.value = initParams;
searchName.value = "";
}
watch(visiable, () => {
visiable.value && searchStu()
searchParams.value = initParams
visiable.value && searchStu();
searchParams.value = initParams;
});
defineExpose({
@@ -237,7 +296,7 @@ defineExpose({
loading,
closeDrawer,
openDrawer
})
});
</script>
<style lang="scss">
.header-content {

View File

@@ -35,6 +35,7 @@
class="cus-btn"
style="background: #4ea6ff; color: #fff; width: 100px"
@click="search"
:loading="stuAsyncLoading"
>
<template #icon
><img
@@ -131,7 +132,6 @@
<script setup>
import {
computed,
// createVNode,
defineProps,
defineExpose,
ref,
@@ -140,8 +140,7 @@ import {
import { usePage } from "@/api/request";
import { STUDENT_LIST } from "@/api/apis";
import { delStudentList } from "@/api/index1";
// import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
// import { Modal } from "ant-design-vue";
import {useAsyncStu} from "@/utils/useCommon";
const props = defineProps({
type: Number,
@@ -231,6 +230,9 @@ const {
loading,
} = usePage(STUDENT_LIST, searchParams);
const { loading: stuAsyncLoading } = useAsyncStu(props.id, props.types.join(","), searchStu);
const stuPagination = computed(() => ({
total: total.value,
showSizeChanger: false,
@@ -250,6 +252,7 @@ const changePagination = (page) => {
function search() {
searchParams.value.studentName = searchName.value;
searchParams.value.pageNo = 1;
searchStu()
}
const deleteModalVisible = ref(false);
@@ -257,20 +260,6 @@ const deleteId = ref(null);
function del(id) {
deleteModalVisible.value = true;
deleteId.value = id;
// Modal.confirm({
// title: () => "确定删除?",
// icon: () => createVNode(ExclamationCircleOutlined),
// content: () => "数据删除后不可恢复!",
// okText: () => "确定",
// okType: "danger",
// cancelText: () => "取消",
// onOk() {
// if (id) {
// loading.value = true;
// delStudentList({ ids: [id] }).then(() => searchStu());
// }
// },
// });
}
//确定删除
@@ -294,6 +283,8 @@ const closeDrawer = () => {
function reset() {
searchParams.value = initParams;
searchName.value = "";
searchParams.value.pageNo = 1;
searchStu()
}
watch(visiable, () => {

View File

@@ -42,9 +42,7 @@
style="width: 260px; height: 40px"
placeholder="是否为优秀学员"
:options="topFlagList"
@change="selectProjectName"
allowClear
showSearch
></a-select>
</div>
</a-form-item>
@@ -54,12 +52,13 @@
class="cus-btn"
style="background: #4ea6ff; color: #fff; width: 100px"
@click="getStuList"
:loading="stuAsyncLoading"
>
<template #icon>
<img
style="margin-right: 10px"
src="../../assets/images/courseManage/search0.png"
/></template>
/></template>
搜索
</a-button>
</a-col>
@@ -68,8 +67,8 @@
<template #icon>
<img
style="margin-right: 10px"
src="../../assets/images/leveladd/reset.png"
/></template>
src="../../assets/images/courseManage/reset0.png"
/></template>
重置
</a-button>
</a-col>
@@ -90,9 +89,9 @@
>
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff">
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/courseManage/add0.png"
><img
style="margin-right: 10px"
src="../../assets/images/courseManage/add0.png"
/></template>
添加学员
</a-button>
@@ -102,9 +101,9 @@
<a-col :span="1.5" v-if="type === 1 || type === 2">
<a-button class="cus-btn white" @click="showImpStu">
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/basicinfo/in2.png"
><img
style="margin-right: 10px"
src="../../assets/images/basicinfo/in.png"
/></template>
导入学员
</a-button>
@@ -129,9 +128,9 @@
<a-col :span="1.5">
<a-button class="cus-btn white" @click="bathDel">
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/projectadd/delete.png"
><img
style="margin-right: 10px"
src="../../assets/images/projectadd/delete1.png"
/></template>
批量删除
</a-button>
@@ -223,13 +222,15 @@
v-if="type === 3 && record.status !== 0 && checkPer(permissions)"
@click="updateStatus(0, record.id)"
type="link"
>通过</a-button
>通过
</a-button
>
<a-button
v-if="type === 3 && record.status !== 0 && checkPer(permissions)"
@click="updateStatus(2, record.id)"
type="link"
>拒绝</a-button
>拒绝
</a-button
>
<a-button
v-if="checkPer(permissions)"
@@ -237,7 +238,8 @@
@click="del(record.id, record)"
type="link"
danger
>删除</a-button
>删除
</a-button
>
</a-space>
</template>
@@ -387,21 +389,20 @@
</a-modal>
</template>
<script setup>
import { computed, defineProps, onMounted, ref, watch } from "vue";
import { delStudentList, getStuPage, batchUpdateStatus } from "@/api/index1";
import {computed, defineProps, onMounted, ref, watch} from "vue";
import {delStudentList, getStuPage, batchUpdateStatus} from "@/api/index1";
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue";
import { message } from "ant-design-vue";
// import { topStudent } from "../../api/indexProjStu";
import {message} from "ant-design-vue";
import SeeStu from "../../components/drawers/SeeStu";
import EScore from "../drawers/ExportScore.vue";
import OrgClass from "@/components/project/OrgClass";
import ExportHomeWork from "../Modals/ExportHomeWork.vue";
import * as api from "../../api/index1";
import ImpStu from "../drawers/AddLevelImportStu";
// import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { checkPer } from "@/utils/utils";
import {checkPer} from "@/utils/utils";
import {useAsyncStu} from "@/utils/useCommon";
const props = defineProps({
type: Number,
@@ -435,6 +436,9 @@ const props = defineProps({
default: () => [],
},
});
const { loading: stuAsyncLoading, start } = useAsyncStu(props.id, props.type, getStuList);
const topFlagList = ref([
{
id: 0,
@@ -541,8 +545,8 @@ function allDepartShow(a, b) {
a == "" || a == null || a == undefined
? (a = "")
: a.slice(0, 1) == "/"
? a.slice(1, a.length)
: a;
? a.slice(1, a.length)
: a;
let depart = b == "" || b == null || b == undefined ? (b = "") : b;
let allname = org == "" && depart == "" ? "-" : org + depart;
return allname;
@@ -680,11 +684,12 @@ function bathDel() {
);
}
tableData.value.loading = true;
delStudentList({ ids: stuSelectKeys.value }).then(() => getStuList());
delStudentList({ ids: stuSelectKeys.value, type: props.type, targetId: props.id }).then(() => getStuList());
}
const deleteModalVisible = ref(false);
const deleteId = ref(null);
function del(id, row) {
if (row.isLeader === "1") {
return message.warning("" + row.name + "是小组长,请勿删除!");
@@ -707,6 +712,7 @@ function del(id, row) {
// },
// });
}
//确定删除
const sureSameModal = () => {
if (deleteId.value) {
@@ -724,6 +730,7 @@ const closeSameModal = () => {
function submitCall(flag) {
tableData.value.loading = true;
flag && getStuList();
flag && start();
}
// 调整关卡;
@@ -885,9 +892,11 @@ const AddImpStuvisibleClose = (isget) => {
getStuList();
}
};
function startLoading() {
tableData.value.loading = true;
}
defineExpose({ getStuList, startLoading });
</script>
<style lang="scss">
@@ -967,8 +976,8 @@ defineExpose({ getStuList, startLoading });
width: calc(100%);
height: 40px;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
}
@@ -1101,8 +1110,8 @@ defineExpose({ getStuList, startLoading });
width: calc(100%);
height: 68px;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
}
@@ -1194,11 +1203,13 @@ defineExpose({ getStuList, startLoading });
}
}
}
.ant-modal-close-x {
display: none;
}
}
}
/*.delete {
z-index: 9999;
width: 424px;

View File

@@ -1,45 +1,79 @@
import {ref} from "vue";
import {onMounted, ref, watch} from "vue";
import {message} from "ant-design-vue";
import {ASYNC_STUDENT_STATUS} from "@/api/apis";
import {request} from "@/api/request";
import dialog from "@/utils/dialog";
export function useInterval(fun, time) {
const timer = ref();
const timer = ref();
function start(d) {
clearInterval(timer.value)
timer.value = setInterval(async () => {
if (await fun(d)) {
clearInterval(timer.value)
}
}, time);
}
function start(d) {
clearInterval(timer.value);
timer.value = setInterval(async () => {
if (await fun(d)) {
clearInterval(timer.value);
}
}, time);
}
return {start}
return { start };
}
export function useTimeout(asyncFun, time) {
const timer = ref();
const maxCount = ref(0);
const timer = ref();
const maxCount = ref(0);
function start(d) {
clearTimeout(timer.value)
maxCount.value = 0
execute(d)
function start(d) {
clearTimeout(timer.value);
maxCount.value = 0;
execute(d);
}
async function execute(d) {
if (maxCount.value > 300) {
message.error("等待超时,请联系管理员!");
throw Error("等待超时 查询任务结束");
}
async function execute(d) {
if (maxCount.value > 300) {
message.error("等待超时,请联系管理员!")
throw Error("等待超时 查询任务结束")
}
try {
await asyncFun(d)
maxCount.value = maxCount.value + 1
timer.value = setTimeout(() => execute(d), time);
} catch (e) {
clearTimeout(timer.value)
console.log(e)
}
try {
await asyncFun(d);
maxCount.value = maxCount.value + 1;
timer.value = setTimeout(() => execute(d), time);
} catch (e) {
clearTimeout(timer.value);
console.log(e);
}
}
return {start}
return { start };
}
export function useAsyncStu(id, type, func) {
const loading = ref(false);
const { start } = useTimeout(async () => {
const { data } = await request(ASYNC_STUDENT_STATUS, { id, type });
if (!data) {
loading.value = false;
throw Error("查询任务结束");
}
loading.value = true;
}, 10000);
watch(loading, () => {
loading.value && dialog({
duration: 3500,
cancel: false,
content: "您选择的学员正在添加中,请耐心等待,进行其他操作不影响此次添加"
});
loading.value || (func && func());
});
onMounted(() => {
console.log(22222222);
console.log(id);
console.log(type);
id && type && start();
});
return { loading, start };
}

View File

@@ -34,7 +34,7 @@
</div>
<div class="btn2" @click="reseatDownloadList">
<div class="img2">
<img src="../assets/images/courseManage/reset1.png" />
<img src="../assets/images/courseManage/reset0.png" />
</div>
<div class="wz">重置</div>
</div>
@@ -290,24 +290,24 @@ export default {
margin-left: 10px;
}
}
.btn1:hover {
background: rgba(64, 158, 255, 0.76);
// .btn1:hover {
// background: rgba(64, 158, 255, 0.76);
.search {
background-image: url("../assets/images/courseManage/search0.png");
}
// .search {
// background-image: url("../assets/images/courseManage/search0.png");
// }
.btnText {
color: #ffffff;
}
}
// .btnText {
// color: #ffffff;
// }
// }
.btn1:active {
background: #0982ff;
}
.btn2:hover {
background: rgba(64, 158, 255, 0.1);
}
// .btn2:hover {
// background: rgba(64, 158, 255, 0.1);
// }
.btn2:active {
background: rgba(64, 158, 255, 0.2);
}
@@ -317,12 +317,11 @@ export default {
display: flex;
align-items: center;
justify-content: center;
color: #4ea6ff;
color: #fff;
font-size: 14px;
background: #ffffff;
background: #4ea6ff;
border-radius: 8px;
cursor: pointer;
border: 1px solid #4ea6ff;
.wz {
margin-left: 10px;
}

View File

@@ -287,7 +287,11 @@
<div class="btn btn5" @click="of_exit1">
<div class="btnText">取消</div>
</div>
<a-button class="btn btn6" @click="createft" :loading="validated===1">
<a-button
class="btn btn6"
@click="createft"
:loading="validated === 1"
>
确定
</a-button>
</div>
@@ -846,10 +850,10 @@
>
删除
</a-menu-item>
<!--新加 二维码
<!-- 新加 二维码 -->
<a-menu-item @click="qrcodeVisible(record, 1)">
二维码
</a-menu-item>-->
</a-menu-item>
</a-menu>
</template>
<div class="fb" style="margin-left: -20px">
@@ -1169,7 +1173,11 @@
<div class="cstm_btn btn5" @click="handleCancelStu">
<div class="btnText">取消</div>
</div>
<a-button class="cstm_btn btn6" @click="handleSureStu" :loading="validated===1">
<a-button
class="cstm_btn btn6"
@click="handleSureStu"
:loading="validated === 1"
>
确定
</a-button>
</div>
@@ -3457,6 +3465,7 @@ export default defineComponent({
const options4CurId = ref("");
const options4CurName = ref("张");
const of_hShow = () => {
state.offcourseId = '';
getTea();
if (state.of_hs == false) {
state.of_hs = true;
@@ -3502,7 +3511,7 @@ export default defineComponent({
return message.warning("请输入必填项");
}
if (!state.validated == 2) {
if (state.validated !== 2) {
message.destroy();
return message.warning("该课程名称已存在");
}
@@ -3615,6 +3624,8 @@ export default defineComponent({
state.EditTestId = 0;
state.assessmentId = null;
state.assessmentName = "";
state.workInfo = {};
state.examInfo = {};
state.EditWorkId = null;
state.beforeValue = null; //考勤 开始前
state.afterStartValue = null; //考勤 开始后
@@ -4448,6 +4459,7 @@ export default defineComponent({
state.lookCourseModal = true;
item.attach = item.attach == "" ? [] : item.attach.split(",");
state.faceDetailObj = item;
console.log("获取查看信息", item);
};
// const handleTea = async () => {
// console.log("item22224444");
@@ -4646,7 +4658,7 @@ export default defineComponent({
state.manageStuLoading = true;
console.log(787666, item);
state.faceClassification = item.contentTxt;
state.faceStatus = item.kkty;
state.faceStatus = item.status;
state.currentFaceId = item.id;
getCourseStudentList();
state.newCourseName = item.name;
@@ -4867,21 +4879,21 @@ export default defineComponent({
//二维码
const qrcodeVisible = (record, type) => {
// `${location.protocol}//${location.host}${import.meta.env.VUE_APP_BASE_API}/stu/project/redirectDetail?courseId=${record.id}`
state.codevisible = true;
state.codeInfo = {
title: type == 1 ? "【课程】二维码" : "【签到】二维码",
name: record.name ? record.name : "",
url:
type == 1
? window.location.protocol +
process.env.VUE_APP_COURSE_STUDY +
record.offcourseId
? process.env.VUE_APP_BASE_API +
`/stu/project/redirectDetail?courseId=${record.id}`
: process.env.VUE_APP_BASE_API +
`/admin/student/studentSign?taskId=${
record.id
}&taskType=${2}&type=${3}`,
};
console.log("codeInfo", state.codeInfo);
console.log("codeInfo", state.codeInfo, record);
state.codeIndex = 0;
state.codeType = type;
};
@@ -5129,7 +5141,7 @@ export default defineComponent({
.btnn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #ffffff;
background: #4ea6ff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
@@ -5146,7 +5158,7 @@ export default defineComponent({
.btnText {
font-size: 14px;
font-weight: 400;
color: #4ea6ff;
color: #fff;
line-height: 36px;
margin-left: 5px;
}
@@ -5159,18 +5171,23 @@ export default defineComponent({
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn1:active {
background: #0982ff;
}
.btn2:active {
background: #0982ff;
}
.btn2 {
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
background-image: url("../../assets/images/courseManage/reset0.png");
}
.daochu {
width: 16px;
height: 18px;
background-image: url("../../assets/images/coursewareManage/export.png");
background-image: url("../../assets/images/coursewareManage/export1.png");
}
}
@@ -5227,7 +5244,9 @@ export default defineComponent({
margin-left: 5px;
}
}
.btn3:active {
background: #0982ff;
}
.btn3 {
.search {
width: 17px;
@@ -6232,9 +6251,10 @@ export default defineComponent({
.btn {
padding: 0px 26px 0px 26px;
height: 40px;
background: rgba(64, 158, 255, 0);
background: rgba(64, 158, 255, 1);
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
@@ -6248,7 +6268,7 @@ export default defineComponent({
.btnText {
font-size: 14px;
font-weight: 400;
color: rgba(64, 158, 255, 1);
color: #fff;
line-height: 36px;
margin-left: 5px;
}
@@ -6279,7 +6299,7 @@ export default defineComponent({
width: 16px;
height: 18px;
margin-right: 6px;
background-image: url("../../assets/images/courseManage/reset1.png");
background-image: url("../../assets/images/courseManage/reset0.png");
}
}
}
@@ -6854,9 +6874,10 @@ export default defineComponent({
.btnn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #ffffff;
background: #4ea6ff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
color:#fff;
display: flex;
align-items: center;
justify-content: center;
@@ -6871,7 +6892,7 @@ export default defineComponent({
.btnText {
font-size: 14px;
font-weight: 400;
color: #4ea6ff;
color: #fff;
line-height: 36px;
margin-left: 5px;
}
@@ -6889,7 +6910,7 @@ export default defineComponent({
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
background-image: url("../../assets/images/courseManage/reset0.png");
}
}

View File

@@ -19,7 +19,7 @@
security="restricted"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
></iframe>
<OnlineClassModelStudent ref="stuRef"></OnlineClassModelStudent>
<OnlineClassModelStudent ref="stuRef" :type="13"></OnlineClassModelStudent>
</div>
</template>
<script setup>
@@ -32,6 +32,7 @@ const stuRef = ref()
onMounted(() => {
window.openSelectStu = stuRef.value.openDrawer
})
</script>
<style lang="scss">
.courseManage {

View File

@@ -405,6 +405,7 @@ export default defineComponent({
detail({
offcourseId: Number(props.detail.id),
}).then((res) => {
console.log("res", res);
if (res.data.code === 200) {
let item = res.data.data;
if (item.jobTypeIds) {
@@ -428,13 +429,16 @@ export default defineComponent({
);
let arrObj = [];
arrObj = orgSelectIds.map((item, index) => {
return { value: item, lebel: orgSelectNames[index] };
return { value: item, label: orgSelectNames[index] };
});
console.log("arrObj-------------", arrObj);
state.orgSelect = arrObj;
}
}
});
},
{
deep: true,
}
);

View File

@@ -457,7 +457,11 @@
<div class="btn btn5" @click="noEditClose">
<div class="btnText">取消</div>
</div>
<a-button class="btn btn6" @click="handlePush" :loading="validated===1">
<a-button
class="btn btn6"
@click="handlePush"
:loading="validated === 1"
>
<div class="btnText">保存</div>
</a-button>
</div>
@@ -556,7 +560,7 @@ export default defineComponent({
hideshow: true,
ft_eidt: false,
attach: "",
validated: 0,
validated: 2,
ft_hs: false,
addLoading: false,
statusJuJue: 0,
@@ -847,9 +851,9 @@ export default defineComponent({
orgSelectNames += item.label + ",";
});
}
console.log("orgSelectIds&orgSelectNames2", orgSelectIds, orgSelectNames);
orgSelectIds = orgSelectIds.slice(0, orgSelectIds.length - 1);
orgSelectNames = orgSelectNames.slice(0, orgSelectNames.length - 1);
console.log("orgSelectIds&orgSelectNames2", orgSelectIds, orgSelectNames);
let selectJobId = "";
if (state.selectJobId.length) {
@@ -1027,7 +1031,7 @@ export default defineComponent({
);
let arrObj = [];
arrObj = orgSelectIds.map((item, index) => {
return { value: item, lebel: orgSelectNames[index] };
return { value: item, label: orgSelectNames[index] };
});
console.log("arrObj-------------", arrObj);
state.orgSelect = arrObj;

View File

@@ -678,7 +678,12 @@ export default {
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2:active {
background: #0982ff;
}
.btn1:active {
background: #0982ff;
}
.btn2 {
background: #4ea6ff;
border: 1px solid #4ea6ff;

View File

@@ -1613,7 +1613,12 @@ export default {
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2:active {
background: #0982ff;
}
.btn1:active {
background: #0982ff;
}
.btn2 {
background: #4ea6ff;
border: 1px solid #4ea6ff;

View File

@@ -89,10 +89,10 @@
@expand="expandTable" :pagination="false" />
</div>
<div class="del_btnbox">
<div class="del_btn btn22" @click="closeProjAuditModal" style="margin-right: 32px;">
<div class="del_btn btn22" @click="closeProjAuditModal" style="margin-right: 32px;color: #fff;background: #4ea6ff;">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn22" @click="closeProjAuditModal">
<div class="del_btn btn22" @click="closeProjAuditModal" style="margin-right: 32px;color: #fff;background: #4ea6ff;">
<div class="btnText">确定</div>
</div>
</div>
@@ -599,7 +599,12 @@ export default {
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn22:active {
background: #0982ff;
}
.btn11:active {
background: #0982ff;
}
.btn22 {
background: #4ea6ff;
border: 1px solid #4ea6ff;

View File

@@ -383,7 +383,12 @@ export default {
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2:active {
background: #0982ff;
}
.btn1:active {
background: #0982ff;
}
.btn2 {
background: #4ea6ff;
border: 1px solid #4ea6ff;

View File

@@ -2359,7 +2359,7 @@ export default {
.btnn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #ffffff;
background: rgba(64, 158, 255, 1);
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
@@ -2376,7 +2376,7 @@ export default {
.btnText {
font-size: 14px;
font-weight: 400;
color: #4ea6ff;
color: #fff;
line-height: 36px;
margin-left: 5px;
}
@@ -2394,32 +2394,32 @@ export default {
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
background-image: url("../../assets/images/courseManage/reset0.png");
}
}
.btn1:hover {
background: rgba(64, 158, 255, 0.76);
// .btn1:hover {
// background: rgba(64, 158, 255, 0.76);
.search {
background-image: url("../../assets/images/courseManage/search0.png");
}
// .search {
// background-image: url("../../assets/images/courseManage/search0.png");
// }
.btnText {
color: #ffffff;
}
}
// .btnText {
// color: #ffffff;
// }
// }
.btn1:active {
background: #0982ff;
}
.btn2:hover {
background: rgba(64, 158, 255, 0.1);
}
// .btn2:hover {
// background: rgba(64, 158, 255, 0.1);
// }
.btn2:active {
background: rgba(64, 158, 255, 0.2);
background: #0982ff;
}
}
@@ -2462,18 +2462,6 @@ export default {
}
}
.btn3:hover {
background: rgba(64, 158, 255, 0.76);
.search {
background-image: url("../../assets/images/courseManage/add0.png");
}
.btnText {
color: #ffffff;
}
}
.btn3:active {
background: #0982ff;
}

View File

@@ -2598,7 +2598,7 @@ export default {
codeUrl =
window.location.protocol +
process.env.VUE_APP_ONLINE_CLASS_URL +
item.targetId;
item.courseId;
}
if (item.type == 2) {
let date1 = new Date(item.endTime).getTime();
@@ -2637,7 +2637,7 @@ export default {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/externalexam?courseId=" +
"/externalexam?type=2&courseId=" +
item.courseId;
} else {
codeUrl =
@@ -2705,7 +2705,7 @@ export default {
item.courseId +
"&evaType=" +
item.evaType +
"&targetId=" +
"&type=2&targetId=" +
item.targetId;
}
@@ -2737,7 +2737,7 @@ export default {
item.id +
"&chapterOrStageId=" +
item.chapterId +
"&infoId=" +
"&type=2&infoId=" +
state.routerId;
}
// 项目
@@ -2745,7 +2745,7 @@ export default {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/projectdetails?projectId=" +
"/projectdetails?type=2&projectId=" +
item.courseId;
}
state.codevisible = true;
@@ -2786,10 +2786,14 @@ export default {
// 共享文档文件下载
const downloadFile = (url) => {
url && window.open(url);
console.log(url);
if (url) {
window.open(url);
}
window.open(
window.location.protocol +
process.env.VUE_APP_BOE_API_URL +
process.env.VUE_APP_FILE_PATH +
url
);
// if(url){
// const filename = '操作指南'
// const x = new XMLHttpRequest()

View File

@@ -4,7 +4,7 @@
<div class="left clearfix">
<div class="leftmain">
<div class="tit" style="margin-left: 18px">关卡</div>
<div class="btn btn3" @click="showModal({},'add')" style="margin-left: 19px">
<div class="btn btn3" @click="showModal()" style="margin-left: 19px">
<div class="search"></div>
<div class="btnText">添加关卡</div>
</div>
@@ -33,7 +33,7 @@
</div>
</div>
</a-popover>
<div class="imgIcon" @click="showModal(element,'edit')"></div>
<div class="imgIcon" @click="showEditModal(element)"></div>
</div>
<div class="boxs_right">
<div class="imgIcon" @click="deleteChapter"></div>
@@ -82,8 +82,8 @@
</div>
<div class="name">
<div
class="d"
style="width: 10px;
class="d"
style="width: 10px;
height: 10px;
margin-top: 2px;
margin-right: 2px;"></div>
@@ -118,9 +118,9 @@
<div class="select" style="margin-right:90px;">
<span>学习模式</span>
<span
style="border: 1px solid rgba(0, 0, 0, 0.25);width: 120px;height: 38px; border-radius: 10px;text-align: center;line-height: 38px;">
style="border: 1px solid rgba(0, 0, 0, 0.25);width: 120px;height: 38px; border-radius: 10px;text-align: center;line-height: 38px;">
{{
routerInfo.routerInfo.unlockMode == 1 ? '自由学习模式' : routerInfo.routerInfo.unlockMode == 2 || routerInfo.routerInfo.unlockMode == 3 ? '闯关模式' : ''
routerInfo.routerInfo.unlockMode == 1 ? "自由学习模式" : routerInfo.routerInfo.unlockMode == 2 || routerInfo.routerInfo.unlockMode == 3 ? "闯关模式" : ""
}}
</span>
<unlock-mode :routerInfo="routerInfo.routerInfo" :types="types">
@@ -140,7 +140,7 @@
</div>
<div class="mid">
<div class="item" v-for="(value,key) in TASK_TYPE" :key="key">
<component :is="value.component" :ref="el=>courseRef['el'+key]=el" :type="key"
<component :is="value.component" :ref="el=>courseRef['el'+key]=el" :type="key" :infoType="2" :id="routerInfo.routerInfo?.id" :courseSyncFlag="routerInfo.routerInfo?.courseSyncFlag"
v-model:task-list="routerInfo.chapterList[activeIndex].draftTaskList">
<div class="itcon">
<div class="img">
@@ -216,8 +216,8 @@
animation="500">
<template #item="{ element,index }">
<div
v-if="!element.deleted"
style="
v-if="!element.deleted"
style="
height: 50px;
display: flex;
justify-content: space-between;
@@ -241,7 +241,7 @@
left: -25px;"></div>
<a-checkbox :id="element.id" v-model:checked="element.checked"></a-checkbox>
<div style="margin-top: 2px; margin-left: 8px">
{{ TASK_TYPE[element.type]?.name || '' }}
{{ TASK_TYPE[element.type]?.name || "" }}
</div>
</div>
</div>
@@ -280,10 +280,10 @@
<div class="opa">
<div class="opacation">
<span
style="color: #4ea6ff;
style="color: #4ea6ff;
margin-right: 25px;
cursor: pointer;"
@click="editTaskForType(element,index)">
@click="editTaskForType(element,index)">
编辑
</span>
<span style="color: #4ea6ff; cursor: pointer" @click="deleteTask(element,index)">
@@ -374,53 +374,47 @@ import {ROUTER_DETAIL_MODIFY} from "@/api/apis";
import {request} from "@/api/request";
import dialog from "@/utils/dialog";
const {query: {routerId}} = useRoute();
const modal = ref(false)
const ischapterEdit = ref(false)
const visiblene = ref(false)
const cancleLoading = ref(false)
const confirmLoading = ref(false)
const moveChapterIndex = ref('')
const activeIndex = ref(0)
const types = 1 // 1 路径图 2 项目
const courseRef = ref({})
const formValue = ref({draftTaskList: []})
const routerInfo = ref({chapterList: [{name: '关卡一', draftTaskList: []}], routerInfo: {}})
const { query: { routerId } } = useRoute();
const modal = ref(false);
const visiblene = ref(false);
const cancleLoading = ref(false);
const confirmLoading = ref(false);
const moveChapterIndex = ref("");
const activeIndex = ref(0);
const types = 1; // 1 路径图 2 项目
const courseRef = ref({});
const formValue = ref({ draftTaskList: [] });
const routerInfo = ref({ chapterList: [{ name: "关卡一", draftTaskList: [] }], routerInfo: {} });
const selectAll = computed(() => {
const selectedNum = routerInfo.value.chapterList[activeIndex.value].draftTaskList.filter(t => t.checked).length
const selectedNum = routerInfo.value.chapterList[activeIndex.value].draftTaskList.filter(t => t.checked).length;
if (!selectedNum) {
return 0
return 0;
}
if (selectedNum === routerInfo.value.chapterList[activeIndex.value].draftTaskList.length) {
return 1
return 1;
}
return 2
})
return 2;
});
watch(() => routerInfo.value.chapterList, () => {
routerInfo.value.chapterList.forEach((t, i) => {
t.sort = i;
t.draftTaskList?.forEach((s, j) => {
s.sort = j
})
})
}, {deep: true})
s.sort = j;
});
});
}, { deep: true });
const showModal = (e,type) => {
ischapterEdit.value = (type === "edit");
console.log(ischapterEdit.value)
if(type == 'edit'){
console.log("关卡信息:" + e.name);
formValue.value = e;//回传修改的信息
}else{
//关卡信息初始化
formValue.value = {};
}
const showModal = () => {
formValue.value = {draftTaskList: []}
modal.value = true;
};
function showEditModal(ele){
formValue.value =ele;
modal.value = true;
}
const closeModal = () => {
modal.value = false;
};
@@ -430,26 +424,31 @@ const editChapter = () => {
if (!formValue.value.name) {
return message.warning("请输入关卡名称");
}
if(ischapterEdit.value){
routerInfo.value.chapterList = [{...formValue.value, draftTaskList: []}];
if(formValue.value.id){
closeModal();
return
}
else{
routerInfo.value.chapterList.push({...formValue.value, draftTaskList: []})
}
formValue.value = {draftTaskList: []}
closeModal()
routerInfo.value.chapterList.push({ ...formValue.value, draftTaskList: [] });
activeIndex.value = activeIndex.value + 1
formValue.value = { draftTaskList: [] };
closeModal();
};
//删除关卡
const deleteChapter = () => {
dialog({
content: '确定要删除关卡吗?',
content: "确定要删除关卡吗?",
ok: () => {
if (routerInfo.value.chapterList.length === 1) {
message.warning("至少保留一个关卡");
return
return;
}
if (routerInfo.value.chapterList[activeIndex.value].id) {
routerInfo.value.chapterList[activeIndex.value].deleted = true;
routerInfo.value.chapterList[activeIndex.value].draftTaskList?.forEach((t, i) => t.id ? (t.deleted = true) : routerInfo.value.chapterList[activeIndex.value].draftTaskList.splice(i, 1));
} else {
routerInfo.value.chapterList.splice(activeIndex.value, 1);
}
routerInfo.value.chapterList[activeIndex.value].id ? (routerInfo.value.chapterList[activeIndex.value].deleted = true) : routerInfo.value.chapterList.splice(activeIndex.value, 1);
activeIndex.value && (activeIndex.value = activeIndex.value - 1);
message.info("删除关卡成功");
},
@@ -458,8 +457,8 @@ const deleteChapter = () => {
const getDetail = async () => {
await GetRouterDraftDetail(routerId).then((res) => {
routerInfo.value = res.data.data
})
routerInfo.value = res.data.data;
});
};
onMounted(() => {
@@ -467,19 +466,19 @@ onMounted(() => {
});
const changebgc = (index) => {
activeIndex.value = index
activeIndex.value = index;
};
const subdeleteAll = () => {
if (!routerInfo.value?.chapterList[activeIndex.value]?.draftTaskList?.filter(t => t.checked)?.length) {
message.warning("请选择要删除的任务!");
return
return;
}
dialog({
content: '确定要删除所选任务吗?',
content: "确定要删除所选任务吗?",
ok: () => {
for (let i = 0; i < routerInfo.value.chapterList[activeIndex.value].draftTaskList.length; i++) {
const t = routerInfo.value.chapterList[activeIndex.value].draftTaskList[i]
const t = routerInfo.value.chapterList[activeIndex.value].draftTaskList[i];
if (t.checked) {
if (t.id) {
t.checked = false;
@@ -497,10 +496,10 @@ const subdeleteAll = () => {
//全选任务或全不选任务
const selectRowAll = () => {
if (selectAll.value === 1) {
routerInfo.value.chapterList[activeIndex.value].draftTaskList.forEach(t => t.checked = false)
return
routerInfo.value.chapterList[activeIndex.value].draftTaskList.forEach(t => t.checked = false);
return;
}
routerInfo.value.chapterList[activeIndex.value].draftTaskList.forEach(t => t.checked = true)
routerInfo.value.chapterList[activeIndex.value].draftTaskList.forEach(t => t.checked = true);
};
//移动任务到关卡
const moveTask = () => {
@@ -513,15 +512,15 @@ const moveTask = () => {
};
//编辑的按钮
const editTaskForType = (ele, index) => {
courseRef.value['el' + ele.type].openDrawer(index, ele)
courseRef.value["el" + ele.type].openDrawer(index, ele);
};
function deleteTask(element, index) {
dialog({
content: '确定要删除此任务吗?',
content: "确定要删除此任务吗?",
ok: () => {
message.success("删除成功");
routerInfo.value.chapterList[activeIndex.value].draftTaskList[index].id ? (element.deleted = true) : routerInfo.value.chapterList[activeIndex.value].draftTaskList.splice(index, 1)
routerInfo.value.chapterList[activeIndex.value].draftTaskList[index].id ? (element.deleted = true) : routerInfo.value.chapterList[activeIndex.value].draftTaskList.splice(index, 1);
},
});
}
@@ -529,51 +528,52 @@ function deleteTask(element, index) {
const showChangeModal = () => {
if (routerInfo.value?.chapterList?.length <= 1) {
message.warning("请添加关卡!");
return
return;
}
if (!routerInfo.value?.chapterList[activeIndex.value]?.draftTaskList?.filter(t => t.checked)?.length) {
message.warning("请选择要移动的任务!");
return
return;
}
visiblene.value = true
visiblene.value = true;
};
const closeChangeModal = () => {
visiblene.value = false
visiblene.value = false;
};
//暂存
const temporaryStorage = async () => {
confirmLoading.value = true
await request(ROUTER_DETAIL_MODIFY, routerInfo.value)
await getDetail()
confirmLoading.value = true;
await request(ROUTER_DETAIL_MODIFY, routerInfo.value);
await getDetail();
message.success("暂存成功");
confirmLoading.value = false
confirmLoading.value = false;
};
const submitStorage = async () => {
if (routerInfo.value.routerInfo.status === 1) {
dialog({
content: '该路径图已经发布,修改后如未点击暂存当前操作未保存数据将丢失,确认保存?',
content: "该路径图已经发布,修改后如未点击暂存当前操作未保存数据将丢失,确认保存?",
ok: async () => {
confirmLoading.value = true
await releaseRouter(routerId)
confirmLoading.value = true;
await releaseRouter(routerId);
message.success("关卡和任务数据已保存");
confirmLoading.value = false
confirmLoading.value = false;
},
})
return
});
return;
}
confirmLoading.value = true
await request(ROUTER_DETAIL_MODIFY, routerInfo.value)
message.success("关卡和任务数据已保存")
confirmLoading.value = false
confirmLoading.value = true;
await request(ROUTER_DETAIL_MODIFY, routerInfo.value);
await getDetail();
message.success("关卡和任务数据已保存");
confirmLoading.value = false;
};
//取消
const cancelStorage = async () => {
cancleLoading.value = true
await getDetail()
cancleLoading.value = true;
await getDetail();
message.success("取消成功");
cancleLoading.value = false
cancleLoading.value = false;
};
</script>
@@ -605,7 +605,7 @@ const cancelStorage = async () => {
width: calc(100%);
height: 40px;
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
rgba(78, 166, 255, 0) 100%);
}
.del_main {
@@ -722,7 +722,7 @@ const cancelStorage = async () => {
position: relative;
justify-content: center;
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
rgba(78, 166, 255, 0) 100%);
.inhe {
width: 80%;
@@ -835,8 +835,8 @@ const cancelStorage = async () => {
width: 624px;
height: 68px;
background: linear-gradient(180deg,
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
display: flex;
justify-content: center;
@@ -2076,7 +2076,7 @@ const cancelStorage = async () => {
width: calc(100%);
height: 40px;
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
rgba(78, 166, 255, 0) 100%);
}
.del_main {

View File

@@ -47,10 +47,10 @@
<div class="split"></div>
<div class="bom clearfix">
<a-tabs
class="tab"
v-model:activeKey="activeKey"
size="large"
:tabBarStyle="{ marginLeft: '10px' }"
class="tab"
v-model:activeKey="activeKey"
size="large"
:tabBarStyle="{ marginLeft: '10px' }"
>
<a-tab-pane key="1" tab="任务">
<div class="taskBox" style="flex: 1">
@@ -59,12 +59,12 @@
<div class="taskmain">任务大纲</div>
<!-- <button class="btn" @click="showFaceIn">批量面授报名</button> -->
<router-link
class="edit"
:to="{ path: `/temTask`, query: { projectId: projectTemplateId } }"
class="edit"
:to="{ path: `/temTask`, query: { projectId: projectTemplateId } }"
>
<img
class="editimg"
src="../../assets/images/projectadd/edit.png"
class="editimg"
src="../../assets/images/projectadd/edit.png"
/>
<span class="editext">编辑</span>
</router-link>
@@ -83,12 +83,12 @@
<a-collapse v-model:activeKey="taskSyllabusActive" accordion>
<template #expandIcon="{ isActive }">
<img
:style="{
:style="{
width: isActive ? 9.1 : 8.1,
height: isActive ? 8.1 : 9.1,
'margin-right': isActive ? '12px' : '13px',
}"
:src="
:src="
isActive
? require('../../assets/images/projectadd/open.png')
: require('../../assets/images/projectadd/close.png')
@@ -97,21 +97,21 @@
<div></div>
</template>
<a-collapse-panel
v-for="(value, index) in taskSyllabus"
:key="index"
:header="value.text"
v-for="(value, index) in taskSyllabus"
:key="index"
:header="value.text"
>
<div
class="course"
v-for="(item, key) in value.children"
:key="key"
class="course"
v-for="(item, key) in value.children"
:key="key"
>
<!-- :style="{width:item.course==='在线'?'28px':
height:item.course==='在线'?'27px':}" -->
<div class="first">
<div class="icon">
<div
style="
style="
width: 31px;
height: 28px;
display: flex;
@@ -120,7 +120,7 @@
"
>
<img
:src="
:src="
item.course === '在线'
? require('../../assets/images/leveladd/zai.png')
: item.course === '面授'
@@ -175,10 +175,10 @@
</div>
<div style="display: flex">
<a-progress
:showInfo="false"
:percent="item.percent"
strokeColor="#FFC067"
trailColor="rgba(253, 209, 98, 0.2)"
:showInfo="false"
:percent="item.percent"
strokeColor="#FFC067"
trailColor="rgba(253, 209, 98, 0.2)"
/>
<span class="progresstext" style="margin-left: 10px"
>{{ item.percent }}%</span
@@ -187,20 +187,20 @@
</div>
<div class="operations">
<div
class="operation"
style="cursor: pointer"
:style="{
class="operation"
style="cursor: pointer"
:style="{
display: item.course === '面授' ? 'flex' : 'none',
}"
@click="showFS"
@click="showFS"
>
<!-- 学员 -->
</div>
<div
class="operation"
style="cursor: pointer"
@click="showAA"
:style="{
class="operation"
style="cursor: pointer"
@click="showAA"
:style="{
display:
item.course === '直播' || item.course === '活动'
? 'flex'
@@ -210,9 +210,9 @@
<!-- 考勤 -->
</div>
<div
class="operation"
style="cursor: pointer"
:style="{
class="operation"
style="cursor: pointer"
:style="{
display:
item.course === '直播' ||
item.course === '活动' ||
@@ -224,9 +224,9 @@
<!-- 二维码 -->
</div>
<div
class="operation"
style="cursor: pointer; margin-right: 35px"
@click="
class="operation"
style="cursor: pointer; margin-right: 35px"
@click="
item.course === '在线' ||
item.course === '案例' ||
item.course === '外链' ||
@@ -253,8 +253,8 @@
</a-collapse>
<!-- 无数据创建任务 -->
<div
class="taskbox"
style="
class="taskbox"
style="
background: linear-gradient(180deg, #ddeaff, #f0f8fe);
display: none;
"
@@ -286,9 +286,9 @@
<div class="ntc_body">
<div class="ntc_switch">
<a-switch
size="small"
v-model:checked="checked"
@click="changeopclo"
size="small"
v-model:checked="checked"
@click="changeopclo"
/>
<div v-if="checked == true" class="opclo">
<span>关闭</span>
@@ -314,10 +314,10 @@
<div class="ntcc_tit">编辑公告</div>
<div class="textarea">
<a-textarea
v-model:value="projectInfo.notice"
placeholder="公告信息最多输入150个字。"
:maxlength="textnum"
allow-clear
v-model:value="projectInfo.notice"
placeholder="公告信息最多输入150个字。"
:maxlength="textnum"
allow-clear
/>
<div class="btnarea">
<div>&nbsp;</div>
@@ -415,9 +415,9 @@
<span>完成必修/选修获得 </span
><span
><a-input
v-model:value="score1"
:bordered="false"
@change="getScore"
v-model:value="score1"
:bordered="false"
@change="getScore"
/> </span
><span>积分</span>
</div>
@@ -442,7 +442,7 @@
>
<a-input v-model:value="four2" :bordered="false"/>
<span
style="margin-right: 50px"
style="margin-right: 50px"
>积分</span
>
<span></span
@@ -485,7 +485,7 @@
>
<a-input v-model:value="seven1" :bordered="false"/>
<span
style="margin-right: 50px"
style="margin-right: 50px"
>积分</span
>
<span>优秀学员可获得</span>
@@ -529,9 +529,9 @@
<div class="setc_name"><span>封面图</span></div>
<div class="setc_main">
<img
style="width: 151px; height: 84px"
:src="projectInfo.picUrl"
alt=""
style="width: 151px; height: 84px"
:src="projectInfo.picUrl"
alt=""
/>
</div>
</div>
@@ -612,45 +612,45 @@
<div class="onetitle">上传共享文档</div>
<div class="oneedi">
<a-switch
size="small"
v-model:checked="attachSwitch"
@change="checkedClose"
size="small"
v-model:checked="attachSwitch"
@change="checkedClose"
></a-switch>
</div>
</div>
<div class="btnbox" style="margin: 20px">
<a-upload
v-if="attachSwitch == true"
v-model:file-list="fileList"
name="file"
action="/manageApi/file/uploadunlimit"
@change="handleChange2"
v-if="attachSwitch == true"
v-model:file-list="fileList"
name="file"
action="/manageApi/file/uploadunlimit"
@change="handleChange2"
>
<span
class="xkbtn"
style="cursor: pointer; font-size: 17px"
class="xkbtn"
style="cursor: pointer; font-size: 17px"
>上传</span
>
<img
src="@/assets/images/basicinfo/cloud.png"
style="cursor: pointer; width: 24px; height: 24px; margin-left: 8px;margin-bottom: 3px;"
alt=""
src="@/assets/images/basicinfo/cloud.png"
style="cursor: pointer; width: 24px; height: 24px; margin-left: 8px;margin-bottom: 3px;"
alt=""
/>
</a-upload>
<div
v-if="attachSwitch == true"
class="btnbox"
style="margin: 20px"
v-if="attachSwitch == true"
class="btnbox"
style="margin: 20px"
>
<span style="color: #999999">
支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
</span>
</div>
<div
v-for="item in fileList"
:key="item.uid"
style="margin-bottom: 30px;"
class="docListStyle"
v-for="item in fileList"
:key="item.uid"
style="margin-bottom: 30px;"
class="docListStyle"
>
<!-- <img
src="@/assets/images/basicinfo/download.png"
@@ -698,16 +698,16 @@
</div>
<span
style="font: oblique bold 16px Sans-serif;width:300px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{
style="font: oblique bold 16px Sans-serif;width:300px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{
item.name
}}</span>
<a
href="javascript:void(0);"
@click="downloadFile(item.response ? item.response.data : '')"
style="margin-left: 5px">下载</a>
href="javascript:void(0);"
@click="downloadFile(item.response ? item.response.data : '')"
style="margin-left: 5px">下载</a>
<span
style="color: #4ea6ff; cursor: pointer"
@click="deFile(item.uid)"
style="color: #4ea6ff; cursor: pointer"
@click="deFile(item.uid)"
>删除</span
>
</div>
@@ -722,11 +722,11 @@
</a-tab-pane>
</a-tabs>
<a-modal
style="padding: 0"
:closable="sh"
v-model:visible="visible"
:footer="null"
centered="true"
style="padding: 0"
:closable="sh"
v-model:visible="visible"
:footer="null"
centered="true"
>
<div class="con">
<div class="header">
@@ -741,12 +741,12 @@
<div class="cur">当前关卡:</div>
<div class="select">
<a-select
v-model:value="projectName"
style="width: 100%"
placeholder="请选择关卡"
:options="projectNameList4"
@change="selectProjectName4"
allowClear
v-model:value="projectName"
style="width: 100%"
placeholder="请选择关卡"
:options="projectNameList4"
@change="selectProjectName4"
allowClear
></a-select>
</div>
<div class="btn">
@@ -948,13 +948,13 @@ export default defineComponent({
const changeopclo = () => {
state.projectInfo.noticeFlag = state.checked ? 1 : 0;
api
.templateEdit(state.projectInfo)
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
.templateEdit(state.projectInfo)
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
};
const changecheck2 = () => {
@@ -967,14 +967,14 @@ export default defineComponent({
// return message.warning("请输入合法数字");
// }
return (
Number(state.score1) +
Number(state.done3) +
Number(state.four2) +
Number(state.four5) +
Number(state.five2) +
Number(state.six1) +
Number(state.seven1) +
Number(state.seven2)
Number(state.score1) +
Number(state.done3) +
Number(state.four2) +
Number(state.four5) +
Number(state.five2) +
Number(state.six1) +
Number(state.seven1) +
Number(state.seven2)
);
});
const changecheck3 = () => {
@@ -1017,50 +1017,50 @@ export default defineComponent({
// 获取详情
const getDetail = () => {
api.templateEditDetail(projectTemplateId).then((res) => {
state.templateInfo = res.data.data
state.taskSyllabus = [];
state.projectInfo = res.data.data.projectTemplateInfo;
state.noticeContent = state.projectInfo.notice;
state.checked = state.projectInfo.noticeFlag == 1;
console.log(
"res.data.data.projectTemplateInfo",
res.data.data.projectTemplateInfo
);
try {
state.fileList = JSON.parse(
res.data.data.projectTemplateInfo.attach
);
} catch {
state.fileList = [];
}
state.attachSwitch = res.data.data.projectTemplateInfo.attachSwitch == 1;
let data = res.data.data.stageList;
console.log("data=====", data);
for (let i in data) {
console.log("what ------ > ", i, data);
// if (data[i].taskTemplateList.length !== 0) {
if (!data[i].name) {
continue;
}
state.taskSyllabus.push({
text: data[i].name ? data[i].name : "无阶段任务",
children: [],
});
// }
state.templateInfo = res.data.data
state.taskSyllabus = [];
state.projectInfo = res.data.data.projectTemplateInfo;
state.noticeContent = state.projectInfo.notice;
state.checked = state.projectInfo.noticeFlag == 1;
console.log(
"res.data.data.projectTemplateInfo",
res.data.data.projectTemplateInfo
);
try {
state.fileList = JSON.parse(
res.data.data.projectTemplateInfo.attach
);
} catch {
state.fileList = [];
}
state.attachSwitch = res.data.data.projectTemplateInfo.attachSwitch == 1;
let data = res.data.data.stageList;
console.log("data=====", data);
for (let i in data) {
console.log("what ------ > ", i, data);
// if (data[i].taskTemplateList.length !== 0) {
if (!data[i].name) {
continue;
}
state.taskSyllabus.push({
text: data[i].name ? data[i].name : "无阶段任务",
children: [],
});
// }
for (let j in data[i].taskTemplateList) {
state.taskSyllabus[i].children.push({
course: checkType(data[i].taskTemplateList[j].type),
name: data[i].taskTemplateList[j].name,
classify: data[i].taskTemplateList[j].flag,
beginTime: "",
total: 0, //总人数
complete: 0, //完成人数
percent: 0,
});
}
}
})
for (let j in data[i].taskTemplateList) {
state.taskSyllabus[i].children.push({
course: checkType(data[i].taskTemplateList[j].type),
name: data[i].taskTemplateList[j].name,
classify: data[i].taskTemplateList[j].flag,
beginTime: "",
total: 0, //总人数
complete: 0, //完成人数
percent: 0,
});
}
}
})
};
// 发布公告
@@ -1070,45 +1070,45 @@ export default defineComponent({
return message.warning("请输入公告内容");
}
api
.templateEdit(state.projectInfo)
.then((res) => {
state.noticeContent = state.projectInfo.notice;
message.success("公告发布成功");
console.log(res);
})
.catch((err) => {
message.error("公告发布失败" + err);
console.log(err);
});
.templateEdit(state.projectInfo)
.then((res) => {
state.noticeContent = state.projectInfo.notice;
message.success("公告发布成功");
console.log(res);
})
.catch((err) => {
message.error("公告发布失败" + err);
console.log(err);
});
state.editFlag = false;
};
// 删除阶段
const stateDel = (id) => {
api
.deleteStage(id)
.then((res) => {
message.success("删除阶段成功");
console.log(res);
})
.catch((err) => {
message.error("删除阶段失败" + err);
console.log(err);
});
.deleteStage(id)
.then((res) => {
message.success("删除阶段成功");
console.log(res);
})
.catch((err) => {
message.error("删除阶段失败" + err);
console.log(err);
});
};
// 删除任务
const taskDel = (id) => {
api
.deleteTask(id)
.then((res) => {
message.success("删除任务成功");
console.log(res);
})
.catch((err) => {
message.error("删除任务失败" + err);
console.log(err);
});
.deleteTask(id)
.then((res) => {
message.success("删除任务成功");
console.log(res);
})
.catch((err) => {
message.error("删除任务失败" + err);
console.log(err);
});
};
const toEdit = () => {
routered.push({
@@ -1128,15 +1128,15 @@ export default defineComponent({
stageId: 0,
};
api
.editStagek(obj)
.then((res) => {
message.success("编辑阶段成功");
console.log(res);
})
.catch((err) => {
message.error("编辑阶段失败" + err);
console.log(err);
});
.editStagek(obj)
.then((res) => {
message.success("编辑阶段成功");
console.log(res);
})
.catch((err) => {
message.error("编辑阶段失败" + err);
console.log(err);
});
};
//新建或编辑阶段任务
const taskEdit = () => {
@@ -1151,51 +1151,51 @@ export default defineComponent({
type: 0
};
api
.editTask(obj)
.then((res) => {
message.success("编辑任务成功");
console.log(res);
})
.catch((err) => {
message.error("编辑任务失败" + err);
console.log(err);
});
.editTask(obj)
.then((res) => {
message.success("编辑任务成功");
console.log(res);
})
.catch((err) => {
message.error("编辑任务失败" + err);
console.log(err);
});
};
const getScoreRule = () => {
scoreRule({
projectId: projectTemplateId,
})
.then((res) => {
let result = res.data.data;
//Write operation failed: computed value is readonly 总积分
.then((res) => {
let result = res.data.data;
//Write operation failed: computed value is readonly 总积分
state.scoresum = Number(result[0].pointsCount) + Number(result[1].pointsCount) + Number(result[2].pointsCount) + Number(result[3].pointsCount) + Number(result[4].pointsCount) + Number(result[5].pointsCount) + Number(result[6].pointsCount) + Number(result[7].pointsCount)
state.scoresum = Number(result[0].pointsCount) + Number(result[1].pointsCount) + Number(result[2].pointsCount) + Number(result[3].pointsCount) + Number(result[4].pointsCount) + Number(result[5].pointsCount) + Number(result[6].pointsCount) + Number(result[7].pointsCount)
state.score1 = result[0].pointsCount;
state.score1 = result[0].pointsCount;
state.done2 = result[1].typeDescConfig;
state.done3 = result[1].pointsCount;
state.done2 = result[1].typeDescConfig;
state.done3 = result[1].pointsCount;
state.four1 = result[2].typeDescConfig;
state.four2 = result[2].pointsCount;
state.four1 = result[2].typeDescConfig;
state.four2 = result[2].pointsCount;
state.four3 = result[3].typeDescConfig.slice(0,result[3].typeDescConfig.indexOf(';'));
state.four4 = result[3].typeDescConfig.slice(result[3].typeDescConfig.indexOf(';')+1);
state.four5 = result[3].pointsCount;
state.four3 = result[3].typeDescConfig.slice(0,result[3].typeDescConfig.indexOf(';'));
state.four4 = result[3].typeDescConfig.slice(result[3].typeDescConfig.indexOf(';')+1);
state.four5 = result[3].pointsCount;
state.five1 = result[4].typeDescConfig;
state.five2 = result[4].pointsCount;
state.five1 = result[4].typeDescConfig;
state.five2 = result[4].pointsCount;
state.six1 = result[5].pointsCount;
state.six1 = result[5].pointsCount;
state.seven1 = result[6].pointsCount;
state.seven1 = result[6].pointsCount;
state.seven2 = result[7].pointsCount;
state.seven2 = result[7].pointsCount;
})
.catch((err) => {
console.log("获取项目积分规则失败了", err);
});
})
.catch((err) => {
console.log("获取项目积分规则失败了", err);
});
};
const handleChange2 = ({file, fileList}) => {
console.log(fileList);
@@ -1227,30 +1227,30 @@ export default defineComponent({
});
//要编辑项目
api
.templateEdit({
name: state.projectInfo.name,
category: state.projectInfo.category,
picUrl: state.projectInfo.picUrl,
manager: state.projectInfo.manager,
managerId: state.projectInfo.managerId || 0,
sourceBelongId: state.projectInfo.sourceBelongId,
level: state.projectInfo.level,
systemId: state.projectInfo.systemId,
boeFlag: state.projectInfo.boeFlag ? 1 : 0,
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
notice: state.projectInfo.notice,
noticeFlag: state.projectInfo.noticeFlag,
projectTemplateId: localStorage.getItem("projectTemplateId"),
remark: state.projectInfo.remark,
status: state.projectInfo.status,
attach: str,
})
.then((res) => {
console.log("上传成功", res);
})
.catch((err) => {
console.log("上传失败了", err);
});
.templateEdit({
name: state.projectInfo.name,
category: state.projectInfo.category,
picUrl: state.projectInfo.picUrl,
manager: state.projectInfo.manager,
managerId: state.projectInfo.managerId || 0,
sourceBelongId: state.projectInfo.sourceBelongId,
level: state.projectInfo.level,
systemId: state.projectInfo.systemId,
boeFlag: state.projectInfo.boeFlag ? 1 : 0,
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
notice: state.projectInfo.notice,
noticeFlag: state.projectInfo.noticeFlag,
projectTemplateId: localStorage.getItem("projectTemplateId"),
remark: state.projectInfo.remark,
status: state.projectInfo.status,
attach: str,
})
.then((res) => {
console.log("上传成功", res);
})
.catch((err) => {
console.log("上传失败了", err);
});
}
if (file.status === "done") {
@@ -1270,23 +1270,23 @@ export default defineComponent({
let str = JSON.stringify(state.fileList);
api
.templateEdit({
sourceBelongId: state.projectInfo.sourceBelongId,
projectTemplateId: localStorage.getItem("projectTemplateId"),
attach: str,
})
.then((res) => {
console.log(res)
message.destroy();
message.success("删除成功");
return
})
.catch((err) => {
console.log(err)
message.destroy();
message.warning("删除失败");
return
});
.templateEdit({
sourceBelongId: state.projectInfo.sourceBelongId,
projectTemplateId: localStorage.getItem("projectTemplateId"),
attach: str,
})
.then((res) => {
console.log(res)
message.destroy();
message.success("删除成功");
return
})
.catch((err) => {
console.log(err)
message.destroy();
message.warning("删除失败");
return
});
};
// 设置上传图片开关
@@ -1298,17 +1298,17 @@ export default defineComponent({
// 更新开关状态
api
.templateEdit({
sourceBelongId: state.projectInfo.sourceBelongId,
projectTemplateId: projectTemplateId,
attachSwitch: state.attachSwitch ? 1 : -1,
})
.then((res) => {
console.log("开关更新成功", res);
})
.catch((err) => {
console.log("开关更新失败", err);
});
.templateEdit({
sourceBelongId: state.projectInfo.sourceBelongId,
projectTemplateId: projectTemplateId,
attachSwitch: state.attachSwitch ? 1 : -1,
})
.then((res) => {
console.log("开关更新成功", res);
})
.catch((err) => {
console.log("开关更新失败", err);
});
};
//设置积分规则
@@ -1317,67 +1317,67 @@ export default defineComponent({
projectId: projectTemplateId,
datas:[
{
"type": 1,
"pointsCount": Number(state.score1),
"typeDesc": "完成【必修/选修】获得%p积分",
"typeDescConfig": ""
"type": 1,
"pointsCount": Number(state.score1),
"typeDesc": "完成【必修/选修】获得%p积分",
"typeDescConfig": ""
},
{
"type": 2,
"pointsCount": Number(state.done3),
"typeDesc": "完成作业成绩不低于%d分获得%p积分",
"typeDescConfig": state.done2
"type": 2,
"pointsCount": Number(state.done3),
"typeDesc": "完成作业成绩不低于%d分获得%p积分",
"typeDescConfig": state.done2
},
{
"type": 3,
"pointsCount": Number(state.four2),
"typeDesc": "前%d名学完在线课程获得%p积分",
"typeDescConfig": state.four1
"type": 3,
"pointsCount": Number(state.four2),
"typeDesc": "前%d名学完在线课程获得%p积分",
"typeDescConfig": state.four1
},
{
"type": 4,
"pointsCount": Number(state.four5),
"typeDesc": "前%d名提交作业且成绩不低于%d分获得%p积分",
"typeDescConfig": state.four3 + ';' + state.four4
"type": 4,
"pointsCount": Number(state.four5),
"typeDesc": "前%d名提交作业且成绩不低于%d分获得%p积分",
"typeDescConfig": state.four3 + ';' + state.four4
},
{
"type": 5,
"pointsCount": Number(state.five2),
"typeDesc": "考试成绩高于%d分获得%p积分",
"typeDescConfig": state.five1
"type": 5,
"pointsCount": Number(state.five2),
"typeDesc": "考试成绩高于%d分获得%p积分",
"typeDescConfig": state.five1
},
{
"type": 6,
"pointsCount": Number(state.six1),
"typeDesc": "考勤正常学员获得%p积分",
"typeDescConfig": ""
"type": 6,
"pointsCount": Number(state.six1),
"typeDesc": "考勤正常学员获得%p积分",
"typeDescConfig": ""
},
{
"type": 7,
"pointsCount": Number(state.seven1),
"typeDesc": "成为小组长获得%p积分",
"typeDescConfig": ""
"type": 7,
"pointsCount": Number(state.seven1),
"typeDesc": "成为小组长获得%p积分",
"typeDescConfig": ""
},
{
"type": 8,
"pointsCount": Number(state.seven2),
"typeDesc": "优秀学员可获得%p积分",
"typeDescConfig": ""
"type": 8,
"pointsCount": Number(state.seven2),
"typeDesc": "优秀学员可获得%p积分",
"typeDescConfig": ""
}
]
};
console.log(obj);
setScoreRule(obj)
.then((res) => {
console.log(res.data, "修改成功");
message.destroy();
return message.success("修改积分规则成功");
})
.catch((err) => {
console.log(err.data);
message.destroy();
return message.warning("修改积分规则失败");
});
.then((res) => {
console.log(res.data, "修改成功");
message.destroy();
return message.success("修改积分规则成功");
})
.catch((err) => {
console.log(err.data);
message.destroy();
return message.warning("修改积分规则失败");
});
// scoreRule({
// projectId: props.projectId,
// });

View File

@@ -150,21 +150,8 @@
<div class="namebox">
<div class="inname">同步学习记录</div>
</div>
<div class="in ggysxz" v-if="courseSyncFlag">
<!-- :disabled="viewDetail ? true : false" -->
<a-checkbox v-model:checked="courseSyncFlag" disabled>
<span style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
">
同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程
</span>
</a-checkbox>
</div>
<div class="in" v-else>
<!-- :disabled="viewDetail ? true : false" -->
<a-checkbox v-model:checked="courseSyncFlag" disabled>
<div class="in ggysxz">
<a-checkbox v-model:checked="courseSyncFlag">
<span style="
width: 100%;
color: rgba(109, 117, 132, 1);

View File

@@ -1352,8 +1352,11 @@ export default {
projectId: state.copyProjectId,
type: 2
})
.then(() => getTableDate());
message.success("复制成功");
.then(() => {
state.tableLoading = false;
message.success("复制成功");
getTableDate()
});
};
//打开提交审核弹窗
const showReviewModal = (projectId) => {
@@ -1829,7 +1832,7 @@ export default {
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
background: rgba(64, 158, 255, 0);
background: #4ea6ff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
@@ -1846,7 +1849,7 @@ export default {
.btnText {
font-size: 14px;
font-weight: 400;
color: rgba(64, 158, 255, 1);
color: #fff;
line-height: 36px;
margin-left: 5px;
}
@@ -1890,32 +1893,32 @@ export default {
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
background-image: url("../../assets/images/courseManage/reset0.png");
}
}
.btn1:hover {
background: rgba(64, 158, 255, 0.76);
// .btn1:hover {
// background: rgba(64, 158, 255, 0.76);
.search {
background-image: url("../../assets/images/courseManage/search0.png");
}
// .search {
// background-image: url("../../assets/images/courseManage/search0.png");
// }
.btnText {
color: #ffffff;
}
}
// .btnText {
// color: #ffffff;
// }
// }
.btn1:active {
background: #0982ff;
}
.btn2:hover {
background: rgba(64, 158, 255, 0.1);
}
// .btn2:hover {
// background: rgba(64, 158, 255, 0.1);
// }
.btn2:active {
background: rgba(64, 158, 255, 0.2);
background: #0982ff;
}
}
@@ -1958,9 +1961,9 @@ export default {
}
}
.btn3:hover {
background: rgba(64, 158, 255, 0.76);
}
// .btn3:hover {
// background: rgba(64, 158, 255, 0.76);
// }
.btn3:active {
background: #0982ff;

View File

@@ -25,7 +25,7 @@
<a-popover placement="topLeft" trigger="click">
<template #content>
<div style="width: 130px">
{{ element.name || "暂无说明" }}
{{ element.remark || "暂无说明" }}
</div>
</template>
<template #title>
@@ -35,7 +35,7 @@
<span style="font-size: 12px; color: #ffffff">说明</span>
</div>
</a-popover>
<div class="imgIcon" @click="showModal(index)"></div>
<div class="imgIcon" @click="editModal(index)"></div>
</div>
<div class="boxs_right">
<div class="imgIcon" @click="deleteStage(index)"></div>
@@ -100,7 +100,7 @@
<div class="mid">
<div class="item" v-for="(value,key) in TASK_TYPE" :key="key">
<div v-if="key!=13">
<component :is="value.component" :ref="el=>courseRef['el'+key]=el" :type="key"
<component :is="value.component" :ref="el=>courseRef['el'+key]=el" :type="key" :infoType="1" :id="projectInfo.projectInfo?.id" :courseSyncFlag="projectInfo.projectInfo?.courseSyncFlag"
v-model:task-list="projectInfo.stageList[activeIndex].taskDraftDtoList">
<div class="itcon">
<div class="img">
@@ -513,6 +513,11 @@ const closeModal = () => {
};
//显示添加阶段弹窗
const showModal = () => {
formValue.value = {taskDraftDtoList: []}
stage.value = true
};
const editModal = () => {
formValue.value = projectInfo.value.stageList[activeIndex.value]
stage.value = true
};
@@ -522,6 +527,10 @@ function editStage() {
message.warning("请输入阶段名称!");
return
}
if(formValue.value.id){
stage.value = false
return
}
//替换 默认阶段
if (projectInfo.value.stageList.length === 1 && projectInfo.value.stageList[0].id === '0') {
formValue.value.taskDraftDtoList = [...projectInfo.value.stageList[0].taskDraftDtoList]
@@ -541,7 +550,12 @@ const deleteStage = () => {
content: projectInfo.value.stageList.length === 1 ? "当前为最后一个阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?" : '确认删除此阶段吗?',
ok: () => {
message.success("删除成功");
projectInfo.value.stageList[activeIndex.value].id ? (projectInfo.value.stageList[activeIndex.value].deleted = true) : projectInfo.value.stageList.splice(activeIndex.value, 1)
if (projectInfo.value.stageList[activeIndex.value].id) {
projectInfo.value.stageList[activeIndex.value].deleted = true
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList?.forEach((t, i) => t.id ? (t.deleted = true) : projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.splice(i, 1));
} else {
projectInfo.value.stageList.splice(activeIndex.value, 1)
}
activeIndex.value && (activeIndex.value = activeIndex.value - 1);
},
});
@@ -599,6 +613,7 @@ const submitStorage = async () => {
}
confirmLoading.value = true
await request(PROJECT_DETAIL_MODIFY, projectInfo.value)
await getTask()
message.success("阶段和任务数据已保存")
confirmLoading.value = false
};

View File

@@ -366,12 +366,13 @@
:key="item.stageId"
@click="stageChange(item, index)"
>
{{ item.name || "无阶段" }}
<div v-if="item.id === '0'">无阶段</div>
<div v-else>{{ "阶段" + (index + 1) }}</div>
</div>
<!-- <div class="stage1">阶段1</div>
<div class="stage2">阶段2</div> -->
</div>
<div class="stagesecond">
<div class="stagesecond" v-if="choosedStageName">
<div class="staname">阶段名称</div>
<div class="stamess">{{ choosedStageName }}</div>
</div>
@@ -465,7 +466,7 @@
<button class="edit">
<img
class="editimg"
src="../../assets/images/projectadd/edit.png"
src="../../assets/images/projectadd/edit1.png"
/>
<span class="editext">编辑</span>
</button>
@@ -2918,13 +2919,16 @@ export default {
}
}
levelList.stageList = res.data.data.stageList;
if (levelList.stageList.length === 1) {
if (
levelList.stageList.length === 1 &&
levelList.stageList[0].id === "0"
) {
// 无解段任务
state.rankjieduan = [{ value: 0, label: "无阶段" }];
state.valuestu2 = 0;
} else {
// 有阶段任务
console.log(levelList.stageList);
console.log("有阶段任务", levelList.stageList);
let arrStage = [];
for (let i = 0; i < levelList.stageList.length; i++) {
if (levelList.stageList[i].id !== "0") {
@@ -3925,7 +3929,7 @@ export default {
};
//创建小组
const createGroup = async () => {
debugger
debugger;
console.log("state.groupPageList" + state.groupPageList);
const id = state.groupInfo.id;
const d = state.groupPageList
@@ -4513,7 +4517,7 @@ export default {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/faceteach?type=2&courseId=" +
"/faceteach?type=1&courseId=" +
item.courseId +
"&id=" +
item.id;
@@ -4540,7 +4544,7 @@ export default {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/externalexam?courseId=" +
"/externalexam?type=1&courseId=" +
item.courseId;
} else {
codeUrl =
@@ -4607,7 +4611,7 @@ export default {
process.env.VUE_APP_H5 +
"/evaluation?courseId=" +
item.courseId +
"&evaType=" +
"&type=1&evaType=" +
item.evaType +
"&targetId=" +
item.targetId;
@@ -4638,7 +4642,7 @@ export default {
process.env.VUE_APP_H5 +
"/ballotpage?courseId=" +
item.courseId +
"&btype=2&id=" +
"&type=1&btype=2&id=" +
item.id +
"&chapterOrStageId=" +
item.stageId +
@@ -4663,7 +4667,7 @@ export default {
url:
window.location.protocol +
process.env.VUE_APP_H5 +
"/projectdetails?projectId=" +
"/projectdetails?type=1&projectId=" +
state.projectId,
};
state.codeInfo = obj;
@@ -4679,6 +4683,13 @@ export default {
// 共享文档文件下载
const downloadFile = (url) => {
url && window.open(url);
console.log(url);
window.open(
window.location.protocol +
process.env.VUE_APP_BOE_API_URL +
process.env.VUE_APP_FILE_PATH +
url
);
};
function stageChange(item, index) {
state.choosedStageName = item.name;
@@ -5954,12 +5965,13 @@ export default {
position: absolute;
right: 38px;
top: 0;
color: #4ea6ff;
background: #ffffff;
color: #fff;
background: #4ea6ff;
width: 100px;
height: 40px;
border: 1px solid #4ea6ff;
border-radius: 8px;
cursor: pointer;
.editimg {
width: 15px;
@@ -5973,15 +5985,15 @@ export default {
}
}
.edit:hover {
color: #ffffff;
background-color: #4ea6ff;
cursor: pointer;
// .edit:hover {
// color: #ffffff;
// background-color: #4ea6ff;
// cursor: pointer;
.editimg {
background-image: url("../../assets/images/projectadd/edit1.png");
}
}
// .editimg {
// background-image: url("../../assets/images/projectadd/edit1.png");
// }
// }
}
.second {

View File

@@ -368,10 +368,15 @@ export default defineComponent({
}
.btnText2 {
color: rgba(64, 158, 255, 1);
color: rgb(255, 255, 255);
}
}
.btn1:active {
background: #0982ff;
}
.btn2:active {
background: #0982ff;
}
.btn1 {
background: #4ea6ff;
@@ -383,39 +388,14 @@ export default defineComponent({
}
.btn2 {
background: #ffffff;
background: #4ea6ff;
border: 1px solid #4ea6ff;
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
}
}
.btn1:hover {
background: rgb(255, 255, 255);
border: 1px solid #4ea6ff;
.search {
background-image: url("../../assets/images/courseManage/search1.png");
}
.btnText {
color: rgba(64, 158, 255, 1);
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
}
}

View File

@@ -98,7 +98,7 @@
<div class="mid">
<div class="item" v-for="(value, key) in TASK_TYPE" :key="key">
<div v-if="key != 13">
<component :is="value.component" :ref="el => courseRef['el' + key] = el" :type="key"
<component :is="value.component" :ref="el => courseRef['el' + key] = el" :type="key" :infoType="1" :id="projectInfo.projectTemplateInfo?.id"
v-model:task-list="projectInfo.stageList[activeIndex].taskTemplateList">
<div class="itcon">
<div class="img">

View File

@@ -197,7 +197,7 @@
</div>
<div class="in ggysxz" v-if="courseSyncFlag">
<!-- :disabled="viewDetail ? true : false" -->
<a-checkbox disabled v-model:checked="courseSyncFlag"
<a-checkbox v-model:checked="courseSyncFlag"
><span
style="
width: 100%;
@@ -210,7 +210,7 @@
</div>
<div class="in" v-else>
<!-- :disabled="viewDetail ? true : false" -->
<a-checkbox disabled v-model:checked="courseSyncFlag"
<a-checkbox v-model:checked="courseSyncFlag"
><span
style="
width: 100%;

View File

@@ -31,7 +31,7 @@
</div>
<div style="width: 103px; margin-right: 126px; float: left">
<span class="name">创建人:</span>
<span class="descript">{{ basicInfo.createName }}</span>
<span class="descript">{{ createName }}</span>
</div>
<div style="width: 88px; margin-right: 126px; float: left">
<span class="name">状态:</span>
@@ -40,7 +40,7 @@
</div>
<div style="width: 192px; margin-right: 126px; float: left">
<span class="name">创建时间:</span>
<span class="descript">{{ basicInfo.createTime }}</span>
<span class="descript">{{ createTime }}</span>
</div>
<div style="width: 192px; margin-right: 126px; float: left">
<span class="name">发布时间:</span>
@@ -82,7 +82,7 @@
import ViewAssess from "../../components/drawers/ViewAssess";
import { reactive, toRefs } from "vue";
import { queryAssessmentDetailList } from "@/api/indexResearch";
import { useRouter } from "vue-router";
import { useRouter, useRoute } from "vue-router";
import * as api from "@/api/indexTaskManage";
export default {
@@ -90,6 +90,7 @@ export default {
components: { ViewAssess },
setup() {
const router = useRouter();
const { query: { createName, createTime }} = useRoute();
const state = reactive({
Assessvisible: false,
basicInfo: "",
@@ -104,7 +105,7 @@ export default {
evalStuListDataTotal: 0,
evalCurrentPage: 1
});
const getInfoDate = async () => {
state.tableDataTotalLoading = true;
await queryAssessmentDetailList({
@@ -322,7 +323,9 @@ export default {
],
showassess,
changePaginationStu,
exportStudentInfo
exportStudentInfo,
createName,
createTime
};
},
};
@@ -482,7 +485,7 @@ export default {
.img2 {
width: 16px;
height: 18px;
background-image: url(../../assets/images/coursewareManage/export.png);
background-image: url(../../assets/images/coursewareManage/export1.png);
background-size: 100% 100%;
margin-right: 7px;
}
@@ -495,9 +498,13 @@ export default {
}
.btn2 {
background: #ffffff;
background: #4ea6ff;
color: #4ea6ff;
color: #fff;
border: 1px solid #4ea6ff;
}
.btn2:active {
background: #0982ff;
}
}</style>

View File

@@ -82,6 +82,8 @@
height: 40px;
margin-left: 14px;
border-radius: 8px;
color:#fff;
background-color: #4ea6ff;
"
@click="handleAllCancel"
>
@@ -665,7 +667,8 @@ export default {
cursor: pointer;
width: 80px;
height: 40px;
color: #4ea6ff;
color: #fff;
background: #4ea6ff;
border: 1px solid #4ea6ff;
border-radius: 4px;
display: flex;

View File

@@ -76,7 +76,7 @@
@click=" handleEditPage(record.id)" type="link">基础信息
</a-button>
<a-button v-if="record.releaseStatus === '2' && checkPer(record.permissions)"
@click=" toManage(record.id)" type="link">管理
@click=" toManage(record.id, record)" type="link">管理
</a-button>
<a-button v-if="checkPer(record.permissions)" @click=" handleOper(record,'copy')" type="link">复制
</a-button>
@@ -144,7 +144,7 @@
</div>
</div>
<div class="btn">
<button class="samtn btn1" @click="handleCancel">取消</button>
<button class="samtn btn2" @click="handleCancel">取消</button>
<a-button class="samtn btn2" @click="handleNext" :loading="formData.validated===1">
{{ !formData.id ? "下一步" : "确定" }}
</a-button>
@@ -369,9 +369,10 @@ function handleEditPage(id) {
router.push("/researchadd/" + id);
}
function toManage(id) {
router.push("/managepage/" + id);
function toManage(id, record) {
router.push({ path: `/managepage/${id}`, query: { createName:record.createName, createTime:record.createTime } });
}
const handleNext = async () => {
await validate().catch(({ errorFields }) => {
message.warning(errorFields[0].errors.join());
@@ -588,7 +589,7 @@ const handleNext = async () => {
.btnn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #ffffff;
background: #4ea6ff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
@@ -605,7 +606,7 @@ const handleNext = async () => {
.btnText {
font-size: 14px;
font-weight: 400;
color: #4ea6ff;
color: #fff;
line-height: 36px;
margin-left: 5px;
}
@@ -623,29 +624,29 @@ const handleNext = async () => {
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
background-image: url("../../assets/images/courseManage/reset0.png");
}
}
.btn1:hover {
background: rgba(64, 158, 255, 0.76);
// .btn1:hover {
// background: rgba(64, 158, 255, 0.76);
.search {
background-image: url("../../assets/images/courseManage/search0.png");
}
// .search {
// background-image: url("../../assets/images/courseManage/search0.png");
// }
.btnText {
color: #ffffff;
}
}
// .btnText {
// color: #ffffff;
// }
// }
.btn1:active {
background: #0982ff;
}
.btn2:hover {
background: rgba(64, 158, 255, 0.1);
}
// .btn2:hover {
// background: rgba(64, 158, 255, 0.1);
// }
.btn2:active {
background: rgba(64, 158, 255, 0.2);
@@ -691,17 +692,17 @@ const handleNext = async () => {
}
}
.btn3:hover {
background: rgba(64, 158, 255, 0.76);
// .btn3:hover {
// background: rgba(64, 158, 255, 0.76);
.search {
background-image: url("../../assets/images/courseManage/add0.png");
}
// .search {
// background-image: url("../../assets/images/courseManage/add0.png");
// }
.btnText {
color: #ffffff;
}
}
// .btnText {
// color: #ffffff;
// }
// }
.btn3:active {
background: #0982ff;