feat:合并

This commit is contained in:
lixg
2022-12-05 21:57:14 +08:00
13 changed files with 687 additions and 496 deletions

View File

@@ -13,6 +13,7 @@
"ant-design-vue": "^3.2.12",
"axios": "^1.1.3",
"core-js": "^3.8.3",
"dayjs": "^1.11.6",
"element-plus": "^2.2.17",
"element-resize-detector": "^1.2.4",
"html2canvas": "^1.4.1",

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-12-05 17:39:23
* @LastEditTime: 2022-12-05 21:56:56
* @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -55,10 +55,10 @@ http.interceptors.response.use(
if (code === 0 || code === 200) {
return response;
} else {
if (code === 1000) {
// window.open("https://u-pre.boe.com/web/", '_self');
// window.open("http://111.231.196.214:12013/manage/login", '_self');
}
// if (code === 1000) {
// window.open("https://u-pre.boe.com/web/", '_self');
// // window.open("http://111.231.196.214:12013/manage/login", '_self');
// }
console.log("api %o", msg);
}
return response;

View File

@@ -1,7 +1,7 @@
import http from "./config";
//获取面授课开课详情
export const queryFaceDetailById = (offcoursePlanId) => http.post(`http://localhost:8080/manageApi/admin/offcourse/detailPlan?offcoursePlanId=` + offcoursePlanId + ``)
export const queryFaceDetailById = (offcoursePlanId) => http.post(`/admin/offcourse/detailPlan?offcoursePlanId=` + offcoursePlanId + ``)
//新建或编辑面授课开课
export const editPlan = (obj) => http.post('/admin/offcourse/editPlan', obj)

View File

@@ -216,6 +216,7 @@ export default {
state.apiTaskList = selectedRows;
};
const handelChangePage = (page, pageSize) => {
state.selectedRowKeys = []
state.currentPage = page;
state.pageSize = pageSize;
getAllCaseText();
@@ -250,7 +251,14 @@ export default {
isTop: "",
})
.then((res) => {
console.log('案例列表',res)
if (res.status === 200) {
state.selectedRowKeys=[0]
for(let i=0;i<res.data.data.length;i++){
if(Number(res.data.data[i].casesId) == props.EditCaseId){
state.selectedRowKeys = [i]
}
}
getTableDate(res.data.data);
}
})

View File

@@ -3,7 +3,7 @@
placement="right" @after-visible-change="afterVisibleChange">
<div class="drawerMain">
<div class="header">
<div v-if="edit" class="headerTitle">编辑面授</div>
<div v-else class="headerTitle">添加面授</div>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
@@ -20,7 +20,7 @@
</div>
<div class="btnbox">
<a-input v-model:value="courseName" style="width: 384px; height: 32px" placeholder="请输入名称"
:maxlength="50"/>
:maxlength="50"/>
</div>
</div>
<div class="main_item">
@@ -32,7 +32,7 @@
</div>
<div class="btnbox">
<button class="xkbtn" @click="showDrawerSelFacet">
{{ chooseCourse == null ? "选择" : "" }}面授课
{{ chooseCourseName ? chooseCourseName : "择面授课" }}
</button>
<div v-if="chooseCourse">
<a-tag closable color="processing" @close="logC">
@@ -43,7 +43,8 @@
</div>
<!-- 选择面授侧弹窗 -->
<div>
<sel-facet v-model:selfacetVisible="selfacetvisible" v-model:chooseCourse="chooseCourse" v-model:chooseCourseName="chooseCourseName"/>
<sel-facet v-model:selfacetVisible="selfacetvisible" v-model:chooseCourse="chooseCourse"
v-model:chooseCourseName="chooseCourseName"/>
</div>
<!-- 选择面授侧弹窗 -->
</div>
@@ -52,7 +53,8 @@
<span style="margin-right: 3px">面授说明</span>
</div>
<div class="textarea">
<a-textarea v-model:value="description" placeholder="请输入说明" allow-clear show-count :maxlength="200" :rows="6"/>
<a-textarea v-model:value="description" placeholder="请输入说明" allow-clear show-count :maxlength="200"
:rows="6"/>
</div>
</div>
<div class="main_item">
@@ -63,8 +65,8 @@
<span style="margin-right: 3px">授课教师</span>
</div>
<div class="btnbox">
<!-- <a-auto-complete placeholder="选择老师" :value="memberValue.label" style="width: 364px"-->
<!-- :options="options" @change="handleChange2" @search="handleSearch"></a-auto-complete>-->
<!-- <a-auto-complete placeholder="选择老师" :value="memberValue.label" style="width: 364px"-->
<!-- :options="options" @change="handleChange2" @search="handleSearch"></a-auto-complete>-->
<ProjectManager v-model:value="memberValue.value" v-model:name="memberValue.label"></ProjectManager>
</div>
</div>
@@ -105,7 +107,7 @@
</div>
<div class="btnbox">
<a-input v-model:value="address" style="width: 384px; height: 32px" placeholder="请输入上课地址"
:maxlength="100"/>
:maxlength="100"/>
</div>
</div>
<div class="main_item2">
@@ -350,7 +352,7 @@ export default {
setup(props, ctx) {
const options = ref([]);
const state = reactive({
loading:false,
loading: false,
selfacetvisible: false,
addhomeworkvisible: false,
addtestvisible: false,
@@ -408,6 +410,7 @@ export default {
};
const closeDrawer = () => {
ctx.emit("update:addfaceteachVisible", false);
ctx.emit("update:edit", false);
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
state.fileList = []
@@ -533,22 +536,22 @@ export default {
offcourseId: state.chooseCourse,
offcoursePlanId: props.EditFaceId > 0 ? props.EditFaceId : 0,
testId: state.EditTestId,
duration:state.duration,
duration: state.duration,
};
console.log("obj============", obj, "6" + "9");
console.log("222222222");
editPlan(obj).then(async (res) => {
message.destroy();
message.success(`添加成功`);
await updateTask(res);
ctx.emit("changeData", false);
closeDrawer();
}).catch((e) => {
console.log(e)
message.destroy();
message.error(`添加失败`);
});
message.destroy();
message.success(`添加成功`);
await updateTask(res);
ctx.emit("changeData", false);
closeDrawer();
}).catch((e) => {
console.log(e)
message.destroy();
message.error(`添加失败`);
});
}
};
@@ -796,6 +799,7 @@ export default {
display: flex;
align-items: flex-start;
margin-bottom: 32px;
.textarea {
width: 423px;
@@ -817,6 +821,7 @@ export default {
border-radius: 8px;
}
}
.signbox {
width: 120px;
display: flex;

View File

@@ -66,8 +66,10 @@
</div>
<div class="btnbox">
<a-range-picker
show-time
style="width: 424px"
v-model:value="time"
format="YYYY/MM/DD HH:mm"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</div>
@@ -492,9 +494,11 @@ export default {
console.log("获取的数据",res)
state.inputV1 = res.data.data.liveName;
state.time = [
dayjs(res.data.data.liveStartTime, "YYYY-MM-DD"),
dayjs(res.data.data.liveEndTime, "YYYY-MM-DD"),
dayjs(res.data.data.liveStartTime, "YYYY-MM-DD HH:mm"),
dayjs(res.data.data.liveEndTime, "YYYY-MM-DD HH:mm"),
];
console.log(state.time)
state.inputV2 = res.data.data.liveDuration;
state.inputV3 = res.data.data.liveTeacherId;
//state.fileList= res.data.data
@@ -632,11 +636,11 @@ export default {
}
let startTime = toDate(
new Date(state.time[0].$d).getTime() / 1000,
"Y-M-D"
"Y-M-D h:m"
);
let endTime = toDate(
new Date(state.time[1].$d).getTime() / 1000,
"Y-M-D"
"Y-M-D h:m"
);
state.obj = {
afterSignIn: state.inputV6,
@@ -661,6 +665,7 @@ export default {
isEvaluate: state.needEval ? "1" : "0",
};
console.log('我是要更新的数据',state.obj )
if (props.edit) {
api
.updateLiveBroadcastMessage(state.obj)

View File

@@ -79,24 +79,7 @@
<div class="main_table">
<!-- 编辑的表格 -->
<div v-if="edit">
<div
v-if="choicecourse"
class="main_btns"
style="justify-content: flex-start"
>
<div
class="btn2"
style="
display: flex;
justify-content: center;
align-items: center;
"
@click="ChoiceCourse"
>
选择在线课
</div>
</div>
<div v-else>
<div>
<a-table
class="ant-table-striped"
:row-class-name="
@@ -338,6 +321,7 @@ export default {
};
const handelChangePage = (page) => {
state.currentPage = page;
state.selectedRowKeys = []
getAllOnlineText();
};
const getTableDate = (tableData) => {
@@ -381,6 +365,11 @@ export default {
state.tableDataTotal = res.data.data.count;
if (res.status === 200) {
console.log("获取在线课列表数据", res);
for(let i=0;i<res.data.data.list.length;i++){
if(Number(res.data.data.list[i].onlineClassesId) == props.EditOnlineId){
state.selectedRowKeys = [i+1]
}
}
getTableDate(arr);
}
})

View File

@@ -1,18 +1,18 @@
<template>
<a-drawer
:visible="addtestVisible"
class="drawerStyle addtestDrawer"
width="80%"
placement="right"
@after-visible-change="afterVisibleChange"
:visible="addtestVisible"
class="drawerStyle addtestDrawer"
width="80%"
placement="right"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain">
<div class="header">
<div class="headerTitle">{{ edit ? "编辑" : "添加" }}考试</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer2"
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer2"
/>
</div>
<!-- 2022-11-30注释 后面放开 修改div的padding-topL:32 -->
@@ -34,60 +34,62 @@
</button> -->
</div>
<a-form
v-if="isOuter == 1"
ref="formRef"
name="custom-validation"
:model="formState"
:rules="rules"
v-bind="layout"
@finish="handleFinish"
@validate="handleValidate"
@finishFailed="handleFinishFailed"
v-if="isOuter == 1"
ref="formRef"
name="custom-validation"
:model="formState"
:rules="rules"
v-bind="layout"
@finish="handleFinish"
@validate="handleValidate"
@finishFailed="handleFinishFailed"
>
<div class="contentMain">
<div class="main_left">
<div class="main_item">
<div class="btnbox">
<a-form-item
has-feedback
label="考试名称"
name="examinationName"
has-feedback
label="考试名称"
name="examinationName"
>
<a-input
v-model:value="formState.examinationName"
style="width: 424px; height: 32px; margin-left: 35px"
autocomplete="off"
placeholder="请输入考试名称"
show-count :maxlength="50"
v-model:value="formState.examinationName"
style="width: 424px; height: 32px; margin-left: 35px"
autocomplete="off"
placeholder="请输入考试名称"
show-count :maxlength="50"
/>
</a-form-item>
</div>
</div>
<div class="main_item2">
<a-form-item
has-feedback
label="考试说明"
name="examinationExplain"
><div class="textarea">
<a-textarea
v-model:value="formState.examinationExplain"
placeholder="请输入考试说明"
allow-clear
:rows="6"
style="margin-left: 35px"
show-count :maxlength="200"
/></div>
has-feedback
label="考试说明"
name="examinationExplain"
>
<div class="textarea">
<a-textarea
v-model:value="formState.examinationExplain"
placeholder="请输入考试说明"
allow-clear
:rows="6"
style="margin-left: 35px"
show-count :maxlength="200"
/>
</div>
</a-form-item>
</div>
<div class="main_item">
<div class="btnbox">
<a-form-item has-feedback label="选择考试" name="choosedTest">
<a-button
type="primary"
style="width: 100px; margin-left: 35px"
class="outer"
@click.prevent
@click="selectTest()"
type="primary"
style="width: 100px; margin-left: 35px"
class="outer"
@click.prevent
@click="selectTest()"
>
选择考试
</a-button>
@@ -115,28 +117,25 @@
</a-menu>
</template>
</a-dropdown> -->
<a-tag v-if="paperName != ''" closable color="processing" @close="delTag">
<span style="font-size:14px;line-height: 33px;">删除考试</span>
</a-tag>
<a-tag v-if="paperName != ''" closable color="processing" @close="delTag">
<span style="font-size:14px;line-height: 33px;">删除考试</span>
</a-tag>
</a-form-item>
</div>
</div>
<div class="main_item">
<div class="btnbox">
<a-form-item has-feedback label="考试时间" name="choosedTime">
<a-range-picker
v-model:value="formState.choosedTime"
format="YYYY-MM-DD"
style="width: 424px; margin-left: 35px"
:placeholder="[' 开始时间', ' 结束时间']"
v-model:value="formState.choosedTime"
format="YYYY-MM-DD"
style="width: 424px; margin-left: 35px"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</a-form-item>
</div>
@@ -144,14 +143,14 @@
<div class="main_item">
<div class="btnbox">
<a-form-item
has-feedback
label="考试时长"
name="examinationDuration"
has-feedback
label="考试时长"
name="examinationDuration"
>
<a-input
v-model:value="formState.examinationDuration"
type="number"
style="width: 388px; height: 32px; margin-left: 35px"
v-model:value="formState.examinationDuration"
type="number"
style="width: 388px; height: 32px; margin-left: 35px"
/>
</a-form-item>
<span style="transform: translateY(-50%)">分钟</span>
@@ -161,16 +160,16 @@
<div class="btnbox">
<span style="margin-right: 43px">考试限制</span>
<a-form-item
has-feedback
label="允许重复考试"
name="examinationLimit"
has-feedback
label="允许重复考试"
name="examinationLimit"
>
<a-input-number
:min="-1"
:precision="0"
type="number"
v-model:value="formState.examinationLimit"
style="
:min="-1"
:precision="0"
type="number"
v-model:value="formState.examinationLimit"
style="
width: 88px;
height: 32px;
border-radius: 8px;
@@ -179,7 +178,7 @@
/>
<span style="margin-left: 8px"></span>
<span style="margin-left: 24px; color: #999999"
>-1表示无限制</span
>-1表示无限制</span
>
</a-form-item>
</div>
@@ -188,20 +187,22 @@
<div class="btnbox">
<a-form-item has-feedback label="显示答案" name="showAnswers">
<a-radio-group
style="margin-left: 35px; margin-right: 12px"
v-model:value="formState.showAnswers"
style="margin-left: 35px; margin-right: 12px"
v-model:value="formState.showAnswers"
>
<a-radio
v-model:checked="checked"
:value="1"
@click="cloradio1"
>允许查看</a-radio
v-model:checked="checked"
:value="1"
@click="cloradio1"
>允许查看
</a-radio
>
<a-radio
v-model:checked="checked"
:value="2"
@click="cloradio1"
>不允许查看</a-radio
v-model:checked="checked"
:value="2"
@click="cloradio1"
>不允许查看
</a-radio
>
</a-radio-group>
</a-form-item>
@@ -211,20 +212,22 @@
<div class="btnbox">
<a-form-item has-feedback label="显示解析" name="showAnalysis">
<a-radio-group
style="margin-left: 35px; margin-right: 12px"
v-model:value="formState.showAnalysis"
style="margin-left: 35px; margin-right: 12px"
v-model:value="formState.showAnalysis"
>
<a-radio
v-model:checked="checked"
:value="1"
@click="cloradio2"
>允许查看</a-radio
v-model:checked="checked"
:value="1"
@click="cloradio2"
>允许查看
</a-radio
>
<a-radio
v-model:checked="checked"
:value="2"
@click="cloradio2"
>不允许查看</a-radio
v-model:checked="checked"
:value="2"
@click="cloradio2"
>不允许查看
</a-radio
>
</a-radio-group>
</a-form-item>
@@ -234,20 +237,22 @@
<div class="btnbox">
<a-form-item has-feedback label="评分模式" name="scoringModel">
<a-radio-group
style="margin-left: 35px; margin-right: 12px"
v-model:value="formState.scoringModel"
style="margin-left: 35px; margin-right: 12px"
v-model:value="formState.scoringModel"
>
<a-radio
v-model:checked="checked"
:value="1"
@click="cloradio3"
>最高一次</a-radio
v-model:checked="checked"
:value="1"
@click="cloradio3"
>最高一次
</a-radio
>
<a-radio
v-model:checked="checked"
:value="2"
@click="cloradio3"
>最后一次</a-radio
v-model:checked="checked"
:value="2"
@click="cloradio3"
>最后一次
</a-radio
>
</a-radio-group>
</a-form-item>
@@ -257,9 +262,9 @@
<div class="btnbox">
<a-form-item has-feedback label="及格线" name="passLine">
<a-input
v-model:value="formState.passLine"
type="number"
style="width: 88px; height: 32px; margin-left: 35px"
v-model:value="formState.passLine"
type="number"
style="width: 88px; height: 32px; margin-left: 35px"
/>
</a-form-item>
<span style="margin-left: 8px"></span>
@@ -268,31 +273,34 @@
<div class="main_item">
<div class="btnbox">
<a-form-item
has-feedback
label="作业要求"
name="questionArrangement"
has-feedback
label="作业要求"
name="questionArrangement"
>
<a-radio-group
style="margin-right: 12px"
v-model:value="formState.questionArrangement"
style="margin-right: 12px"
v-model:value="formState.questionArrangement"
>
<a-radio
v-model:checked="checked"
:value="1"
@click="cloradio4"
>试题乱序</a-radio
v-model:checked="checked"
:value="1"
@click="cloradio4"
>试题乱序
</a-radio
>
<a-radio
v-model:checked="checked"
:value="2"
@click="cloradio4"
>试题排序</a-radio
v-model:checked="checked"
:value="2"
@click="cloradio4"
>试题排序
</a-radio
>
<a-radio
v-model:checked="checked"
:value="3"
@click="cloradio4"
>全部乱序</a-radio
v-model:checked="checked"
:value="3"
@click="cloradio4"
>全部乱序
</a-radio
>
</a-radio-group>
</a-form-item>
@@ -306,31 +314,31 @@
</div>
</a-form>
<a-form
v-else
ref="formRef"
name="custom-validation"
:model="formState"
:rules="rules"
v-bind="layout"
@finish="handleFinish"
@validate="handleValidate"
@finishFailed="handleFinishFailed"
v-else
ref="formRef"
name="custom-validation"
:model="formState"
:rules="rules"
v-bind="layout"
@finish="handleFinish"
@validate="handleValidate"
@finishFailed="handleFinishFailed"
>
<div class="contentMain">
<div class="main_left">
<div class="main_item">
<div class="btnbox">
<a-form-item
has-feedback
label="考试名称"
name="examinationName"
has-feedback
label="考试名称"
name="examinationName"
>
<a-input
v-model:value="formState.examinationName"
style="width: 424px; height: 32px; margin-left: 35px"
autocomplete="off"
placeholder="请输入考试名称"
show-count :maxlength="50"
v-model:value="formState.examinationName"
style="width: 424px; height: 32px; margin-left: 35px"
autocomplete="off"
placeholder="请输入考试名称"
show-count :maxlength="50"
/>
</a-form-item>
</div>
@@ -338,16 +346,16 @@
<div class="main_item">
<div class="btnbox">
<a-form-item
has-feedback
label="数据来源"
name="examinationName"
has-feedback
label="数据来源"
name="examinationName"
>
<a-input
v-model:value="请输入数据来源"
style="width: 424px; height: 32px; margin-left: 35px"
autocomplete="off"
placeholder="数据来源"
show-count :maxlength="50"
v-model:value="请输入数据来源"
style="width: 424px; height: 32px; margin-left: 35px"
autocomplete="off"
placeholder="数据来源"
show-count :maxlength="50"
/>
</a-form-item>
</div>
@@ -355,19 +363,20 @@
<div class="main_item2">
<a-form-item
has-feedback
label="考试说明"
name="examinationExplain"
has-feedback
label="考试说明"
name="examinationExplain"
>
<div class="textarea">
<a-textarea
v-model:value="formState.examinationExplain"
placeholder="请输入考试说明"
allow-clear
:rows="6"
style="margin-left: 35px"
show-count :maxlength="200"
/></div>
<div class="textarea">
<a-textarea
v-model:value="formState.examinationExplain"
placeholder="请输入考试说明"
allow-clear
:rows="6"
style="margin-left: 35px"
show-count :maxlength="200"
/>
</div>
</a-form-item>
</div>
</div>
@@ -380,24 +389,25 @@
</div>
<!-- 加载动画 -->
<div class="aeLoading" :style="{ display: addLoading ? 'flex' : 'none' }">
<a-spin :spinning="addLoading" tip="添加中..." />
<a-spin :spinning="addLoading" tip="添加中..."/>
</div>
<!-- 选择考试抽屉 -->
<s-test v-model:STvisible="STvisible" @getSTData="getData" />
<s-test v-model:STvisible="STvisible" @getSTData="getData"/>
</a-drawer>
</template>
<script>
import { reactive, ref, toRefs } from "vue";
import { message } from "ant-design-vue";
import {reactive, ref, toRefs} from "vue";
import {message} from "ant-design-vue";
import {
createExamination,
queryExaminationDetailById,
updateExamination,
} from "@/api/indexExam";
import STest from "./SelectTest.vue";
import { ProjectEditTask, RouterEditTask } from "@/api/indexTask";
import { addTempTask } from "../../api/indexTaskadd";
import {ProjectEditTask, RouterEditTask} from "@/api/indexTask";
import {addTempTask} from "../../api/indexTaskadd";
import dayjs from "dayjs";
export default {
name: "AddTest",
components: {
@@ -519,7 +529,7 @@ export default {
return Promise.reject("请选择时间");
}
};
let checkExaminationDuration = async (_rule, value) => {
if (!value) {
return Promise.reject("请输入考试时长");
@@ -642,6 +652,7 @@ export default {
console.log(args);
};
const closeDrawer = () => {
console.log('closeDrawer')
formState.choosedTime = "";
ctx.emit("update:addtestVisible", false);
ctx.emit("update:edit", false);
@@ -652,10 +663,12 @@ export default {
};
const closeDrawer2 = () => {
formState.choosedTime = "";
ctx.emit("update:edit", false);
ctx.emit("update:addtestVisible", false);
resetForm();
};
const afterVisibleChange = () => {
console.log('props', props)
if (props.addtestVisible && props.edit) {
// 该页面显示同时 edit为true 时,发送查询请求,
queryTest();
@@ -669,46 +682,46 @@ export default {
state.paperName = "";
};
const queryTest = () => {
// state.addLoading = true;
queryExaminationDetailById({ examinationId: props.EditTestId })
.then((res) => {
formState.examinationName = res.data.data.examinationName;
formState.workRequirement = res.data.data.workRequirement;
formState.examinationDuration = res.data.data.examinationDuration;
formState.examinationLimit =
Number(res.data.data.examinationLimit) || -1;
formState.passLine = res.data.data.passLine;
formState.examinationExplain = res.data.data.examinationExplain;
formState.questionArrangement =
Number(res.data.data.questionArrangement) || 1;
formState.scoringModel = Number(res.data.data.scoringModel) || 1;
formState.showAnalysis = Number(res.data.data.showAnalysis) || 1;
formState.showAnswers = Number(res.data.data.showAnswers) || 1;
formState.papaerName = res.data.data.examinationTestName;
state.paperName = res.data.data.examinationTestName;
if (
res.data.data.examinationEndTime &&
res.data.data.examinationStartTime
) {
formState.choosedTime = [
dayjs(res.data.data.examinationStartTime, "YYYY-MM-DD"),
dayjs(res.data.data.examinationEndTime, "YYYY-MM-DD"),
];
state.addLoading = false;
} else {
formState.choosedTime = [];
}
})
.catch(() => {
//message.error(`查询失败`);
});
// state.addLoading = true;
queryExaminationDetailById({examinationId: props.EditTestId})
.then((res) => {
formState.examinationName = res.data.data.examinationName;
formState.workRequirement = res.data.data.workRequirement;
formState.examinationDuration = res.data.data.examinationDuration;
formState.examinationLimit =
Number(res.data.data.examinationLimit) || -1;
formState.passLine = res.data.data.passLine;
formState.examinationExplain = res.data.data.examinationExplain;
formState.questionArrangement =
Number(res.data.data.questionArrangement) || 1;
formState.scoringModel = Number(res.data.data.scoringModel) || 1;
formState.showAnalysis = Number(res.data.data.showAnalysis) || 1;
formState.showAnswers = Number(res.data.data.showAnswers) || 1;
formState.papaerName = res.data.data.examinationTestName;
state.paperName = res.data.data.examinationTestName;
if (
res.data.data.examinationEndTime &&
res.data.data.examinationStartTime
) {
formState.choosedTime = [
dayjs(res.data.data.examinationStartTime, "YYYY-MM-DD"),
dayjs(res.data.data.examinationEndTime, "YYYY-MM-DD"),
];
state.addLoading = false;
} else {
formState.choosedTime = [];
}
})
.catch(() => {
//message.error(`查询失败`);
});
};
const updateTest = () => {
//state.addLoading = true;updateTask
let obj = {
examinationDuration: formState.examinationDuration,
examinationEndTime: dayjs(formState.choosedTime[1]).format(
"YYYY-MM-DD"
"YYYY-MM-DD"
),
examinationExplain: formState.examinationExplain,
examinationId: props.edit ? props.EditTestId : 0,
@@ -717,7 +730,7 @@ export default {
examinationPaperId: 0,
// examinationPaperName: formState.choosedTest,
examinationStartTime: dayjs(formState.choosedTime[0]).format(
"YYYY-MM-DD"
"YYYY-MM-DD"
),
passLine: formState.passLine,
questionArrangement: formState.questionArrangement,
@@ -727,32 +740,32 @@ export default {
examinationTestId: state.paperId,
examinationTestName: state.paperName,
};
if(!(state.paperId >0)){
if (!(state.paperId > 0)) {
message.destroy();
return message.error("请选择考试");
}
if (props.edit) {
// 编辑任务
updateExamination(obj)
.then(async (res) => {
await updateTask(res);
closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`编辑失败`);
});
.then(async (res) => {
await updateTask(res);
closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`编辑失败`);
});
} else {
// 创建任务
createExamination(obj)
.then(async (res) => {
await updateTask(res);
closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`创建失败`);
});
.then(async (res) => {
await updateTask(res);
closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`创建失败`);
});
}
};
const updateTask = (res) => {
@@ -771,15 +784,15 @@ export default {
type: 5,
};
RouterEditTask(editObj1)
.then(() => {
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
state.addLoading = false;
closeDrawer();
})
.catch(() => {
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
.then(() => {
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
state.addLoading = false;
closeDrawer();
})
.catch(() => {
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
let editObj = {
courseId: res.data.data.examinationId,
@@ -792,13 +805,13 @@ export default {
};
// 新增编辑或新增项目
ProjectEditTask(editObj)
.then(() => {
//message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
})
.catch(() => {
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
});
.then(() => {
//message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
})
.catch(() => {
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
addTempTask({
courseId: res.data.data.examinationId,
@@ -809,13 +822,13 @@ export default {
stageId: props.chooseStageId || 0,
type: 5,
})
.then(() => {
//message.success( `${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
})
.catch(() => {
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
});
.then(() => {
//message.success( `${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
})
.catch(() => {
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
});
}
}
};
@@ -851,7 +864,7 @@ export default {
};
const closeTag = (removedTag) => {
const tags = state.choosedTestList.filter(
(item) => item.key != removedTag
(item) => item.key != removedTag
);
state.choosedTestList = tags;
};
@@ -887,7 +900,7 @@ export default {
chooseTest,
closeTag,
getData,
...toRefs(state),
};
},
@@ -897,6 +910,7 @@ export default {
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
.outer {
background-color: #4ea6ff;
color: #fff;
@@ -905,6 +919,7 @@ export default {
height: 36px;
margin-right: 10px;
}
.notOuter {
color: #000;
border-radius: 5px;
@@ -913,10 +928,12 @@ export default {
margin-right: 10px;
padding: 3px;
}
.tag-style {
color: rgb(113, 113, 237);
background-color: #d7d1f7;
}
.addtestDrawer {
.drawerMain {
.header {
@@ -926,6 +943,7 @@ export default {
justify-content: space-between;
align-items: center;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -934,31 +952,38 @@ export default {
margin-left: 24px;
}
}
.contentMain {
display: flex;
justify-content: space-between;
.main_left {
padding-right: 30px;
flex: 1;
border-right: 1px solid #e8e8e8;
.main_item {
display: flex;
align-items: center;
margin-top: 32px;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.btnbox {
display: flex;
flex: 1;
align-items: center;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -971,10 +996,12 @@ export default {
}
}
}
.main_item2 {
display: flex;
align-items: flex-start;
margin-bottom: 32px;
.textarea {
width: 423px;
@@ -996,24 +1023,29 @@ export default {
border-radius: 8px;
}
}
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.kqszbox {
.qdqtbox {
margin-left: 56px;
}
.setbox {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-bottom: 24px;
.timerbox {
margin-top: 6px;
margin-right: 32px;
@@ -1023,10 +1055,12 @@ export default {
}
}
}
.btnbox2 {
display: flex;
flex-direction: column;
justify-content: flex-start;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -1043,6 +1077,7 @@ export default {
}
}
}
.main_btns {
height: 72px;
width: 100%;
@@ -1052,6 +1087,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -1061,6 +1097,7 @@ export default {
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;

View File

@@ -1,18 +1,18 @@
<template>
<a-drawer
:visible="ProjPvisible"
class="drawerStyle ProjPowerList"
placement="right"
width="60%"
@after-visible-change="afterVisibleChange"
:visible="ProjPvisible"
class="drawerStyle ProjPowerList"
placement="right"
width="60%"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain">
<div class="header">
<div class="headerTitle">授权名单</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
</div>
<div class="main">
@@ -21,18 +21,18 @@
<div class="namecon" style="margin-right: 30px">
<div class="name">姓名</div>
<a-input
v-model:value="name"
style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入姓名"
v-model:value="name"
style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入姓名"
/>
</div>
</div>
<div class="btns">
<div
class="btn btn1"
style="margin-right: 20px"
@click="searchAuth"
class="btn btn1"
style="margin-right: 20px"
@click="searchAuth"
>
<div class="img1"></div>
<div class="wz">搜索</div>
@@ -46,28 +46,28 @@
<div class="tableBox" style="margin-top: 10px">
<a-table
style="border: 1px solid #f2f6fe"
:columns="tableDataFunc()"
:data-source="tableData"
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
@expand="expandTable"
:scroll="{ x: 900 }"
:pagination="false"
style="border: 1px solid #f2f6fe"
:columns="tableDataFunc()"
:data-source="tableData"
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
@expand="expandTable"
:scroll="{ x: 900 }"
:pagination="false"
/>
</div>
<div class="tableBox">
<div class="pa">
<a-pagination
v-if="tableDataTotal > 10"
showSizeChanger="true"
showQuickJumper="true"
hideOnSinglePage="true"
:pageSize="pageSize"
:current="currentPage"
:total="tableDataTotal"
class="pagination"
@change="changePagination"
v-if="tableDataTotal > 10"
showSizeChanger="true"
showQuickJumper="true"
hideOnSinglePage="true"
:pageSize="pageSize"
:current="currentPage"
:total="tableDataTotal"
class="pagination"
@change="changePagination"
/>
</div>
</div>
@@ -93,11 +93,11 @@
</div>
<!-- 取消授权弹窗 -->
<a-modal
v-model:visible="cancelModal"
:footer="null"
:closable="closeCancel"
wrapClassName="CopyModal"
centered="true"
v-model:visible="cancelModal"
:footer="null"
:closable="closeCancel"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete">
<div class="del_header"></div>
@@ -131,9 +131,10 @@
</template>
<script>
import { toRefs, reactive } from "vue";
import {toRefs, reactive} from "vue";
import * as api from "../../api/index1";
import { message } from "ant-design-vue";
import {message} from "ant-design-vue";
export default {
name: "ProjPowerList",
props: {
@@ -217,13 +218,13 @@ export default {
width: 70,
// align: "left",
className: "classify",
scopedSlots: { customRender: "action" }, //引入的插槽
scopedSlots: {customRender: "action"}, //引入的插槽
customRender: (text) => {
// console.log(text.record.checked1);
return (
<div class="racona">
<span> {text.record.name}</span>
</div>
<div class="racona">
<span> {text.record.name}</span>
</div>
);
},
},
@@ -269,18 +270,17 @@ export default {
key: "opacation",
width: 100,
align: "center",
scopedSlots: { customRender: "action" }, //引入的插槽
scopedSlots: {customRender: "action"}, //引入的插槽
customRender: (text) => {
return (
<div
class="opa"
onClick={() => {
console.log("text.record.id", text.record.id);
showCancelModal(text.record);
}}
>
取消授权
</div>
return (text.record.state === '归属权' ? '' : <div
className="opa"
onClick={() => {
console.log("text.record.id", text.record.id);
showCancelModal(text.record);
}}
>
取消授权
</div>
);
},
},
@@ -293,13 +293,13 @@ export default {
let obj = {
keyWord: state.name ? state.name : "",
type:
props.classify === "learnPath"
? 1
: props.classify === "project"
? 2
: props.classify === "course"
? 3
: null,
props.classify === "learnPath"
? 1
: props.classify === "project"
? 2
: props.classify === "course"
? 3
: null,
tag: 1,
opt: 1,
refId: props.selectProjectId,
@@ -308,34 +308,34 @@ export default {
};
console.log("获取权限名单obj", obj);
api
.optionAuthPerm(obj)
.then((res) => {
// console.log("获取权限名单成功", res);
if (res.data.code === 200) {
console.log("获取权限名单成功", res.data.data.records);
let arr = res.data.data.records;
let array = [];
arr.map((value) => {
let obj = {
key: value.memberId,
id: value.memberId,
.optionAuthPerm(obj)
.then((res) => {
// console.log("获取权限名单成功", res);
if (res.data.code === 200) {
console.log("获取权限名单成功", res.data.data.records);
let arr = res.data.data.records;
let array = [];
arr.map((value) => {
let obj = {
key: value.memberId,
id: value.memberId,
name: value.memberName ? value.memberName : "-",
name: value.memberName ? value.memberName : "-",
com: value.orgName ? value.orgName : "-",
gang: "-",
number: value.memberNo ? value.memberNo : "-",
state: value.tagName ? value.tagName : "-",
};
array.push(obj);
});
state.tableData = array;
state.tableDataTotal = res.data.data.total;
}
})
.catch((err) => {
console.log("获取权限名单失败", err);
});
com: value.orgName ? value.orgName : "-",
gang: "-",
number: value.memberNo ? value.memberNo : "-",
state: value.tagName ? value.tagName : "-",
};
array.push(obj);
});
state.tableData = array;
state.tableDataTotal = res.data.data.total;
}
})
.catch((err) => {
console.log("获取权限名单失败", err);
});
};
//分页
@@ -360,21 +360,21 @@ export default {
let obj = {
keyWord: "",
type:
props.classify === "learnPath"
? 1
: props.classify === "project"
? 2
: props.classify === "course"
? 3
: null,
props.classify === "learnPath"
? 1
: props.classify === "project"
? 2
: props.classify === "course"
? 3
: null,
tag:
state.cancelAuthState === "归属权"
? 2
: state.cancelAuthState === "查看权"
? 3
: state.cancelAuthState === "管理权"
? 4
: null,
state.cancelAuthState === "归属权"
? 2
: state.cancelAuthState === "查看权"
? 3
: state.cancelAuthState === "管理权"
? 4
: null,
opt: 4,
refId: props.selectProjectId,
pageNo: 1,
@@ -385,19 +385,19 @@ export default {
};
console.log("取消权限名单obj", obj, state.cancelAuthState);
api
.optionAuthPerm(obj)
.then((res) => {
console.log("取消权限名单", res);
if (res.data.code === 200) {
// console.log("取消授权成功", res.data.data);
optionAuthPerm();
message.success("取消授权成功");
closeCancelModal();
}
})
.catch((err) => {
console.log("取消授权失败", err);
});
.optionAuthPerm(obj)
.then((res) => {
console.log("取消权限名单", res);
if (res.data.code === 200) {
// console.log("取消授权成功", res.data.data);
optionAuthPerm();
message.success("取消授权成功");
closeCancelModal();
}
})
.catch((err) => {
console.log("取消授权失败", err);
});
};
return {
...toRefs(state),
@@ -430,16 +430,19 @@ export default {
.ant-drawer-header {
display: none !important;
}
.ant-drawer-body {
padding: 0;
}
}
.drawerMain {
min-width: 550px;
margin: 0px 32px 0px 32px;
// overflow-x: auto;
display: flex;
flex-direction: column;
.header {
height: 73px;
border-bottom: 1px solid #e8e8e8;
@@ -449,6 +452,7 @@ export default {
// background-color: red;
margin-bottom: 20px;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -457,11 +461,13 @@ export default {
// margin-left: 24px;
}
}
.main {
width: 100%;
height: 100%;
// background-color: #bfa;
overflow-y: auto;
.search {
width: 100%;
display: flex;
@@ -471,14 +477,17 @@ export default {
.leftchoose {
display: flex;
margin-right: 20px;
.namecon {
display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.name {
margin-top: 8px;
white-space: nowrap;
}
// .name {
// margin-top: 8px;
@@ -501,6 +510,7 @@ export default {
display: flex;
justify-content: center;
align-items: center;
.img1 {
width: 15px;
height: 17px;
@@ -508,6 +518,7 @@ export default {
background-size: 100% 100%;
margin-right: 7px;
}
.img2 {
width: 16px;
height: 18px;
@@ -522,6 +533,7 @@ export default {
color: #ffffff;
}
.btn2 {
background: #ffffff;
@@ -539,26 +551,31 @@ export default {
// padding-left: 9px !important;
padding-left: 20px !important;
}
.ant-checkbox-wrapper {
align-items: center;
margin-top: -2px;
}
.ant-table-selection-column {
padding: 0px !important;
// padding-left: 45px !important;
}
.ant-table-thead > tr > th {
background-color: rgba(239, 244, 252, 1);
}
th.h {
background-color: #eff4fc !important;
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
background: #f6f9fd;
}
.opa {
// background-color: #bfa;
font-size: 14px;
@@ -567,6 +584,7 @@ export default {
cursor: pointer;
}
}
.pa {
// left: 0;
margin-top: 25px;
@@ -585,6 +603,7 @@ export default {
margin-bottom: 10px;
}
}
// .tab {
// .ant-table-thead > tr > th {
// background-color: rgba(239, 244, 252, 1) !important;
@@ -602,6 +621,7 @@ export default {
// }
}
}
// .botm {
// width: 100%;
// height: 100%;
@@ -619,6 +639,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -628,6 +649,7 @@ export default {
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;

View File

@@ -69,7 +69,7 @@ export default {
onMounted(() => {
console.log('onMounted')
init()
// init()
})
function getMember() {

View File

@@ -2924,7 +2924,11 @@
</div>
</a-modal>
<!-- 预览弹窗 -->
<!-- <SeeModal :show="lookCourseModal" /> -->
<SeeModal
:visible="lookCourseModal"
:detail="faceDetailObj"
@cancel="ft_exit_see"
/>
<!--删除 复制 停用弹窗 -->
<!-- 学员管理课程库-归属权抽屉 -->
<!-- <own-power v-model:ownpowervisible="ownpowervisible" /> -->
@@ -3037,7 +3041,7 @@ import "@wangeditor/editor/dist/css/style.css";
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import ProjectManager from "@/components/project/ProjectManager";
// import SeeModal from "./components/seeModal.vue";
import SeeModal from "./components/seeModal.vue";
//列表表格
const columns1 = [
@@ -3090,7 +3094,17 @@ const columns1 = [
{
title: " 所属项目",
width: 250,
dataIndex: "project",
dataIndex: "projectName",
key: "3",
align: "center",
ellipsis: true,
customRender: ({ text }) => {
return text ? text : "-";
},
},{
title: " 所属路径",
width: 250,
dataIndex: "routerName",
key: "3",
align: "center",
ellipsis: true,
@@ -3498,6 +3512,7 @@ export default defineComponent({
// Corpowerlist,
Editor,
Toolbar,
SeeModal,
// StuAdd,
ProjectManager,
ProjOwnerShip,
@@ -4770,9 +4785,12 @@ export default defineComponent({
score: state.lrcj_inputV1,
studentIds: [state.studentId],
type: 1,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
}
});
getTableDate2();
delete_exit1();
}
}
};
@@ -4783,9 +4801,12 @@ export default defineComponent({
score: "",
studentIds: [state.studentId],
type: 2,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
}
});
getTableDate2();
delete_exit1();
}
};
//确认复制
@@ -4796,10 +4817,13 @@ export default defineComponent({
score: "",
studentIds: [state.studentId],
type: 3,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
state.addLoading = false;
}
});
getTableDate2();
delete_exit1();
state.addLoading = false;
}
if (state.rejectstudy_hs) {
handleStudent({
@@ -4807,9 +4831,12 @@ export default defineComponent({
score: "",
studentIds: [state.studentId],
type: 4,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
}
});
getTableDate2();
delete_exit1();
}
};
//确认复制课程
@@ -4825,16 +4852,22 @@ export default defineComponent({
score: "",
studentIds: [state.studentId],
type: 5,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
}
});
getTableDate2();
delete_exit1();
} else if (state.offcourseId && state.offcoursePlanId) {
console.log(2222222);
deletePlan({
offcoursePlanId: state.offcoursePlanId,
}).then((res) => {
if (res.data.code === 200) {
getTableDate3();
delete_exit1();
}
});
getTableDate3();
delete_exit1();
} else if (state.offcourseId) {
console.log(3333333);
handle({
@@ -5086,7 +5119,6 @@ export default defineComponent({
state.lookCourseModal = false;
};
const handleLook = async (itm, type) => {
state.lookCourseModal = true;
// state.isEdit = 0;
console.log(45555);
console.log(itm);
@@ -5100,12 +5132,14 @@ export default defineComponent({
}).then((res) => {
if (res.data.code === 200) return res.data.data;
});
state.lookCourseModal = true;
state.faceDetailObj = item;
// heroImg.value.src = item.picUrl;
// valueHtmlRef.value = item.outline;
// attachMap.value = item.attach == "" ? [] : item.attach.split(",");
console.log("res222222222");
console.log(item);
console.log(state.lookCourseModal);
// state.qdms_inputV1 = item.name;
// state.imageUrl = item.picUrl;

View File

@@ -2,14 +2,14 @@
<template>
<!-- 预览弹窗 -->
<a-modal
v-model:visible="showM"
:visible="visible"
title="查看"
@ok="handleCancel"
:footer="null"
:closable="false"
wrapClassName="modalStyle lookCourseModal"
width="80%"
@cancel="handleCancel"
@ok="handleCancel"
>
<div class="modalHeader">
<div class="headerLeft">
@@ -37,7 +37,7 @@
<div class="asterisk_icon">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
alt="img"
/>
</div>
<span style="margin-right: 14px">课程名称</span>
@@ -48,7 +48,7 @@
</div>
</div>
</div>
<div class="i2_cz">
<!-- <div class="i2_cz">
<div class="i2_top">
<div
class="i2_right"
@@ -58,13 +58,13 @@
<div class="b_icon"></div>
</div>
</div>
</div>
</div> -->
<div class="mbl_items2">
<div class="item_nam">
<div class="asterisk_icon">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
alt="img"
/>
</div>
<span style="margin-right: 14px">封面图</span>
@@ -82,7 +82,7 @@
<img
style="width: 10px; height: 10px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
alt="img"
/>
</div>
<span style="margin-right: 14px">目标人群</span>
@@ -193,10 +193,10 @@
</div>
</div>
<div class="mbl_items">
<div v-if="attachMap.length > 0" class="item_nam">
<!-- <div v-if="attachMap.length > 0" class="item_nam">
<span style="margin-right: 10px">附件</span>
</div>
<div
</div> -->
<!-- <div
class="item_inp"
v-for="(value, index) in attachMap"
:key="index"
@@ -215,8 +215,9 @@
</a>
<a style="margin-left: 120px" :src="value" :href="value">
查看
</a>
<!-- <a-upload multiple :show-upload-list="false" :before-upload="beforeUpload2">
</a>
</div>-->
<!-- <a-upload multiple :show-upload-list="false" :before-upload="beforeUpload2">
<div class="accessory" style="cursor: pointer">
<div class="accessory_icon">
<img src="@/assets/images/coursewareManage/enclosure.png" alt="enclosure" />
@@ -227,7 +228,6 @@
<span>
支持.pdf,.ppt,.pptx,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.zip
</span> -->
</div>
</div>
<div class="mbl_items12">
<div
@@ -253,13 +253,13 @@
</div>
</div>
</div>
<div class="file_operation">
<!-- <div class="file_operation">
<div class="fobox">
<span style="color: #4ea6ff" @click="handleDel(index)">
删除
</span>
</div>
</div>
</div> -->
</div>
</div>
</div>
@@ -301,11 +301,11 @@
</a-modal>
</template>
<script>
import { reactive, toRefs, defineComponent } from "vue";
import { reactive, toRefs, defineComponent, toRef, watch } from "vue";
export default defineComponent({
props: {
show: {
visible: {
type: Boolean,
default: false,
},
@@ -316,10 +316,18 @@ export default defineComponent({
},
setup(props, { emit }) {
console.log(props);
// const showM = ref(props.show);
const detailWatch = toRef(props, "detail");
const state = reactive({
showM: false,
imgList: [],
});
watch(
() => detailWatch,
(newValue) => {
console.log(78787878);
console.log(newValue);
},
{ deep: true }
);
const filterTxt = (txt) => {
if (txt) {
@@ -329,7 +337,6 @@ export default defineComponent({
}
};
const handleCancel = () => {
console.log(6767767);
emit("cancel");
};

View File

@@ -377,7 +377,7 @@
<img src="../../assets/images/taskpage/right2.png"/>
</div>
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
单层项目
单层{{projectInfo.parentId?'子':''}}项目
</div>
<div class="centermain">
不包含子项目直接填写项目基础信息后创建任务
@@ -402,10 +402,10 @@
<img src="../../assets/images/taskpage/right3.png"/>
</div>
<div class="centerbox1" style="color: rgba(93, 201, 136, 1)">
多层项目
多层{{projectInfo.parentId?'子':''}}项目
</div>
<div class="centermain1">
包含子项目分为多层子项目和单层子项目多层子项目可创建班级通过班级填写基础信息并创建任务
{{projectInfo.parentId?'可创建班级,通过班级填写基础信息并创建任务':'包含子项目,分为多层子项目和单层子项目多层子项目可创建班级通过班级填写基础信息并创建任务'}}
</div>
</div>
</div>
@@ -644,6 +644,37 @@
</div>
</div>
</a-modal>
<!-- 撤回结束弹窗-->
<a-modal
v-model:visible="backFinashModal"
:footer="null"
:closable="closeBack"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete">
<div class="del_header"></div>
<div class="del_main">
<div class="header">
<div class="icon"></div>
<span>提示</span>
<div class="close_exit" @click="closeBackFinashModal"></div>
</div>
<div class="body">
<span>是否撤回结束</span>
<div class="back">项目撤回结束后学员可继续学习</div>
</div>
<div class="del_btnbox">
<div class="del_btn btn1" @click="closeBackFinashModal">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2" @click="reFinashedProject">
<div class="btnText">确定</div>
</div>
</div>
</div>
</div>
</a-modal>
<!-- 创建项目提示框 -->
<a-modal
v-model:visible="reminderModal"
@@ -778,6 +809,8 @@ import {storage} from "../../api/storage";
import ProjectManager from "@/components/project/ProjectManager";
import ProjectClass from "@/components/project/ProjectClass";
import OrgClass from "@/components/project/OrgClass";
import dayjs from "dayjs";
export default {
name: "projectManage",
@@ -848,6 +881,7 @@ export default {
projectClass: [],
managerList: [],
managerLoading: false,
backFinashModal:false,
memberParam: {
pageNo: 1,
pageSize: 10,
@@ -965,16 +999,11 @@ export default {
api
.getProjectCount(object.projectId)
.then((res) => {
if (res.status === 200) {
console.log("获取关卡、任务、学员统计数据", res.data);
state.projectStudentsNum = res.data.students;
state.projectStages = res.data.stages;
state.projectTasks = res.data.tasks;
}
console.log("获取关卡、任务、学员统计数据", res.data);
state.projectStudentsNum = res.data.students;
state.projectStages = res.data.stages;
state.projectTasks = res.data.tasks;
})
.catch((err) => {
console.log("err", err);
});
// //获取学员总数
// let obj = {
// pageNo: 0,
@@ -1003,8 +1032,7 @@ export default {
projectId: state.releaseProjectId,
type: 4,
};
api
.handleProject(obj)
api.handleProject(obj)
.then((res) => {
console.log("发布成功", res);
message.destroy();
@@ -1012,19 +1040,21 @@ export default {
state.projectPub = false;
getTableDate();
})
.catch((err) => {
console.log("发布失败", err);
});
};
//关闭发布弹窗
const closeProjectPub = () => {
state.projectPub = false;
};
//打开撤回弹窗
//打开撤回发布弹窗
const showBackModal = (projectId) => {
state.backModal = true;
state.recallProjectId = projectId;
};
//打开撤回结束弹窗
const showBackFinashModal = (projectId) => {
state.backFinashModal = true;
state.recallProjectId = projectId;
};
//确认撤回发布
const recallProject = () => {
let obj = {
@@ -1044,10 +1074,32 @@ export default {
console.log("撤回失败", err);
});
};
//确认撤回结束
const reFinashedProject = () => {
let obj = {
projectId: state.recallProjectId,
type: -6,
};
api
.handleProject(obj)
.then((res) => {
console.log("撤回成功", res);
message.destroy();
message.success("撤回成功");
state.backFinashModal = false;
getTableDate();
})
.catch((err) => {
console.log("撤回失败", err);
});
};
//关闭撤回弹窗
const closeBackModal = () => {
state.backModal = false;
};
const closeBackFinashModal = () => {
state.backFinashModal = false;
};
//打开结束弹窗
const showStopModal = (projectId) => {
state.stopModal = true;
@@ -1250,24 +1302,15 @@ export default {
customRender: (value) => {
return (
<div>
{value.record.status == 0 ||
value.record.status == 1 ||
value.record.status == 2 ||
value.record.status == -2
? "草稿"
: value.record.status == 3 &&
Number(value.record.beginTime) <
Math.ceil(new Date().getTime() / 1000)
? "进行中"
: value.record.status == 3 &&
Number(value.record.beginTime) >
Math.ceil(new Date().getTime() / 1000) &&
value.record.type !== 1 &&
value.record.type !== 2
? "未开始"
: value.record.status == -1
? "已结束"
: "-"}
{value.record.type === 3 ? {
'0': () => '草稿',
'1': () => '草稿',
'2': () => '草稿',
'3': () => dayjs().isBefore(value.record.beginTime) ? '未开始' : '进行中',
'4': () => dayjs().isBefore(value.record.end) ? '进行中' : '已结束',
'-1': () => '已结束',
'-5': () => '草稿'
}[value.record.status + '']() || '' : '-'}
</div>
);
},
@@ -1290,19 +1333,15 @@ export default {
customRender: (value) => {
return (
<div>
{value.record.type !== 3
? "-"
: value.record.status == 0
? "未审核"
: value.record.status == 1
? "审核中"
: value.record.status == 2 ||
value.record.status == 3 ||
value.record.status == -1
? "已审核"
: value.record.status == -2
? "未通过"
: "-"}
{value.record.type === 3 ? {
'0': '未审核',
'1': '审核中',
'2': '已审核',
'3': '已审核',
'4': '已审核',
'-1': '已审核',
'-5': '拒绝'
}[value.record.status + ''] || '' : '-'}
</div>
);
},
@@ -1325,7 +1364,7 @@ export default {
// console.log("value", value.record.type, value.record.status);
return (
<div className="operation">
{value.record.status === 0 || value.record.status === -2 ? (
{value.record.status === 0 || value.record.status === -5 ? (
<span
onClick={() => {
if (value.record.type === 1 || value.record.type === 2) {
@@ -1351,7 +1390,7 @@ export default {
) : (
""
)}
{(value.record.status === 0 || value.record.status === -2) &&
{(value.record.status === 0 || value.record.status === -5) &&
value.record.type === 3 ? (
<span
onClick={() => {
@@ -1365,7 +1404,7 @@ export default {
) : (
""
)}
{value.record.status === 1 && value.record.type !== 1 ? (
{value.record.status === 1 && value.record.type === 3 ? (
<span
onClick={() => {
showRecallReviewModal(value.record.projectId);
@@ -1378,10 +1417,10 @@ export default {
) : (
""
)}
{value.record.status === 2 ? (
{value.record.status === 2 && value.record.type === 3 ? (
<span
onClick={() => {
let time = value.record.beginTime + "-" + value.record.beginTime;
let time = value.record.beginTime + "-" + value.record.endTime;
let obj = {
projectId: value.record.projectId,
name: value.record.name,
@@ -1397,6 +1436,19 @@ export default {
) : (
""
)}
{value.record.status === 3 && value.record.type === 3 ? (
<span
onClick={() => {
showBackModal(value.record.projectId);
}}
style="cursor:pointer"
class="operation3"
>
撤回发布
</span>
) : (
""
)}
<div className="tableSelect">
<a-select
style="width: 50px"
@@ -1519,6 +1571,33 @@ export default {
) : (
""
)}
{value.record.status === 3 && value.record.type === 3 ? (
<a-select-option value="结束" label="结束">
<div
onClick={() => {
showStopModal(value.record.projectId);
}}
>
结束
</div>
</a-select-option>
) : (
""
)}
{value.record.status === -1 && value.record.type === 3 ? (
<a-select-option value="撤回" label="撤回">
<div
onClick={() => {
showBackFinashModal(value.record.projectId);
}}
>
撤回
</div>
</a-select-option>
) : (
""
)}
{value.record.type === 3 ? (
<a-select-option value="基础信息" label="基础信息">
<div
@@ -1664,6 +1743,9 @@ export default {
);
return {
...toRefs(state),
dayjs,
reFinashedProject,
showBackFinashModal,
timeChange,
expandTable,
showModal,
@@ -1684,6 +1766,7 @@ export default {
closeStartModal,
showBackModal,
closeBackModal,
closeBackFinashModal,
getTableDate,
showProjOwner,
showProjPrower,