mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
fix:学员查看,模板和学员搜索·重置,添加考试样式,
This commit is contained in:
@@ -16,11 +16,11 @@
|
||||
/>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: row">
|
||||
<a-button style="width:100px;"
|
||||
<button style="width:100px;"
|
||||
@click="changeOuter(1)"
|
||||
:class="[isOuter == 1? 'outer' : '' ]">系统考试</a-button>
|
||||
<a-button style="width:100px;" @click="changeOuter(2)"
|
||||
:class="[isOuter == 2? 'outer' : '' ]" >外部考试</a-button>
|
||||
:class="[isOuter == 1? 'outer' : 'notOuter' ]">系统考试</button>
|
||||
<button style="width:100px;" @click="changeOuter(2)"
|
||||
:class="[isOuter == 2? 'outer' : 'notOuter' ]" >外部考试</button>
|
||||
</div>
|
||||
<a-form
|
||||
ref="formRef"
|
||||
@@ -59,16 +59,34 @@
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="btnbox">
|
||||
<a-form-item has-feedback label="选择考试" name="choosedTest">
|
||||
<a-select
|
||||
<a-form-item has-feedback label="选择试卷" name="choosedTest">
|
||||
<!-- <a-select
|
||||
dropdownClassName="dropdown-style"
|
||||
style="width: 424px;margin-left: 35px;"
|
||||
placeholder="请输入考试名称"
|
||||
:options="options1"
|
||||
v-model:value="formState.choosedTest"
|
||||
allowClear
|
||||
showSearch
|
||||
/>
|
||||
/> -->
|
||||
<a-dropdown >
|
||||
<a-button type="primary" style="width: 100px;margin-left: 35px;" class="outer" @click.prevent>
|
||||
选择试卷
|
||||
<DownOutlined />
|
||||
</a-button>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item v-for="item in formState.choosedTest" :key="item.key">
|
||||
<a @click="chooseTest(item.key-1)">{{item.value}}</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
<span style="margin-left: 10px">
|
||||
<a-tag class="tag-style"
|
||||
v-for="item in choosedTestList" :closable="true"
|
||||
@close="closeTag(item.key)"
|
||||
:key="item.key">{{item.value}}</a-tag>
|
||||
</span>
|
||||
</a-form-item>
|
||||
|
||||
</div>
|
||||
@@ -274,10 +292,29 @@ export default {
|
||||
showAnalysis:2,
|
||||
showAnswers:2,
|
||||
choosedTime:'',
|
||||
choosedTest:[
|
||||
{
|
||||
key:1,
|
||||
value:'提高核心竞争力'
|
||||
},
|
||||
{
|
||||
key:2,
|
||||
value:'增强创新意识感'
|
||||
},
|
||||
{
|
||||
key:3,
|
||||
value:'巩固基础求发展'
|
||||
},
|
||||
],
|
||||
|
||||
});
|
||||
const state = reactive({
|
||||
addLoading: false,
|
||||
isOuter:1, // 是否为外部考试
|
||||
choosedTestList:[{
|
||||
value:'提高核心竞争力',
|
||||
key:1,
|
||||
}],
|
||||
})
|
||||
const formRef = ref();
|
||||
let checkExaminationName = async (_rule, value) => {
|
||||
@@ -555,6 +592,16 @@ export default {
|
||||
console.log(value)
|
||||
state.isOuter = value
|
||||
}
|
||||
const chooseTest = (index) => {
|
||||
for(let i in state.choosedTestList ) {
|
||||
if(state.choosedTestList[i].key == formState.choosedTest[index].key) return;
|
||||
}
|
||||
state.choosedTestList.push(formState.choosedTest[index])
|
||||
}
|
||||
const closeTag = (removedTag) => {
|
||||
const tags = state.choosedTestList.filter(item => item.key != removedTag);
|
||||
state.choosedTestList = tags;
|
||||
}
|
||||
return {
|
||||
formState,
|
||||
afterVisibleChange,
|
||||
@@ -574,6 +621,8 @@ export default {
|
||||
updateTest,
|
||||
queryTest,
|
||||
changeOuter,
|
||||
chooseTest,
|
||||
closeTag,
|
||||
...toRefs(state)
|
||||
};
|
||||
},
|
||||
@@ -583,6 +632,26 @@ export default {
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
.outer {
|
||||
background-color: #4ea6ff;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
border:1px solid #a09292;
|
||||
height: 36px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.notOuter {
|
||||
color: #000;
|
||||
border-radius: 5px;
|
||||
border:1px solid #a09292;
|
||||
background:#fff;
|
||||
margin-right: 10px;
|
||||
padding:3px;
|
||||
}
|
||||
.tag-style {
|
||||
color:rgb(113, 113, 237);
|
||||
background-color:#d7d1f7;
|
||||
}
|
||||
.addtestDrawer {
|
||||
.drawerMain {
|
||||
.header {
|
||||
|
||||
@@ -560,14 +560,14 @@
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="关卡名称"
|
||||
/>
|
||||
<div class="btns">
|
||||
<div class="btns" @click="searchLevel" >
|
||||
<div class="btn btn1">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
<a-button class="btnText" style="border:none;background:none;transform: translateY(-20%);" >搜索</a-button>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="btn btn2" @click="resetLevel">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
<a-button style="border:none;background:none; transform: translateY(-20%);width:100%;" class="btnText" >重置</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -822,6 +822,13 @@
|
||||
</div></a-modal
|
||||
>
|
||||
|
||||
<!-- 查看学员 传入查看学员的id-->
|
||||
<see-stu
|
||||
v-model:Seevisible="Seevisible"
|
||||
v-model:checkStuId="checkStuId"
|
||||
v-model:projectId="projectId"
|
||||
/>
|
||||
|
||||
<!-- 批量删除学员弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="deleteAll"
|
||||
@@ -1146,14 +1153,15 @@ import TimeManage from "../../components/drawers/TimeManage";
|
||||
import TestManage from "../../components/drawers/TestManage";
|
||||
import FaceManage from "../../components/drawers/FaceManage";
|
||||
import WorkManage from "../../components/drawers/WorkManage";
|
||||
import SeeStu from "../../components/drawers/SeeStu";
|
||||
// import { useRoute } from "vue-router";
|
||||
// import { useStore } from "vuex";
|
||||
import { storage } from "../../api/storage";
|
||||
import { getRouterOverview } from "@/api/indexLearningPath";
|
||||
import { handleLearnPath } from "../../api/index1";
|
||||
import { GetRouterDetail } from "@/api/indexTask";
|
||||
import * as api from "../../api/index1";
|
||||
import { toDate } from "../../api/method";
|
||||
import { handleLearnPath } from "../../api/index1";
|
||||
|
||||
export default {
|
||||
name: "LevelAdd",
|
||||
@@ -1167,6 +1175,7 @@ export default {
|
||||
TestManage,
|
||||
FaceManage,
|
||||
WorkManage,
|
||||
SeeStu
|
||||
},
|
||||
methods: {},
|
||||
setup() {
|
||||
@@ -1178,6 +1187,16 @@ export default {
|
||||
: null, //学习路径页面传的学习路径id
|
||||
gatename: null, //关卡名称
|
||||
gatenamee: null, //学员管理关卡名称
|
||||
action: null,
|
||||
act: null,
|
||||
pub: false, //发布弹窗
|
||||
backModal: false, //撤回弹窗
|
||||
dcopyModal: false, //复制弹窗
|
||||
closeBack: false,
|
||||
routeStudentsNum: null,
|
||||
dcloseCopy: false,
|
||||
dicloseCopy: false,
|
||||
stopModal: false, //结束弹窗
|
||||
deleteAll: false, //批量删除学员弹窗
|
||||
Stuvisible: false, //添加学员抽屉
|
||||
AddImpStuvisible: false, //导入学员抽屉
|
||||
@@ -1187,14 +1206,14 @@ export default {
|
||||
twobtn: true,
|
||||
number: true,
|
||||
twobtnn: false,
|
||||
Seevisible:false,
|
||||
checkStuId:null,
|
||||
inputbox: false,
|
||||
Wvisible: false, //作业管理
|
||||
studentId: null,
|
||||
styTitle: null,
|
||||
cretime: null,
|
||||
picUrl: null,
|
||||
action: null,
|
||||
act: null,
|
||||
// 共享文档列表
|
||||
docList: [
|
||||
{
|
||||
@@ -1260,14 +1279,6 @@ export default {
|
||||
visible: false, //时间管理
|
||||
TMvisible: false, //考试管理
|
||||
FaceVisivle: false, //面授管理
|
||||
pub: false, //发布弹窗
|
||||
backModal: false, //撤回弹窗
|
||||
dcopyModal: false, //复制弹窗
|
||||
closeBack: false,
|
||||
routeStudentsNum: null,
|
||||
dcloseCopy: false,
|
||||
dicloseCopy: false,
|
||||
stopModal: false, //结束弹窗
|
||||
//关卡的数据
|
||||
level: [
|
||||
// {
|
||||
@@ -1412,6 +1423,7 @@ export default {
|
||||
<span
|
||||
onClick={() => {
|
||||
showCheckStu(text.record.studentId);
|
||||
state.Seevisible = true;
|
||||
}}
|
||||
style="color:#4EA6FF;margin-right:25px;cursor:pointer"
|
||||
>
|
||||
@@ -1610,89 +1622,6 @@ export default {
|
||||
getOverview();
|
||||
reget();
|
||||
});
|
||||
|
||||
// 获取项目概览
|
||||
const getOverview = () => {
|
||||
getRouterOverview(state.routerId)
|
||||
.then((res) => {
|
||||
Object.keys(res.data.data.routerInfoOverview).forEach((item) => {
|
||||
levelList.routerInfoOverview[item] =
|
||||
res.data.data.routerInfoOverview[item] || 0;
|
||||
});
|
||||
Object.keys(res.data.data.chapterOverviewList).forEach((item) => {
|
||||
levelList.chapterOverviewList[item] =
|
||||
res.data.data.chapterOverviewList[item] || 0;
|
||||
});
|
||||
// res.data.data.routerInfoOverview.forEach((r) => {
|
||||
// console.log(r)
|
||||
// })
|
||||
state.addLoading = false;
|
||||
console.log("项目概览--" + res);
|
||||
})
|
||||
.catch((err) => {
|
||||
state.addLoading = false;
|
||||
message.error("概览获取失败");
|
||||
console.log("获取失败" + err);
|
||||
});
|
||||
};
|
||||
// 获取路径列表
|
||||
const myGetRouterDetail = () => {
|
||||
GetRouterDetail(state.routerId)
|
||||
.then((res) => {
|
||||
let data = res.data.data.chapterList;
|
||||
|
||||
state.taskSyllabus = data;
|
||||
// for(let i in data) {
|
||||
// state.taskSyllabus[i].name = data[i].name
|
||||
// if(data[i].taskList.length > 0) {
|
||||
// for(let j in data[i].taskList) {
|
||||
// Object.keys(data[i].taskList[j]).forEach(item => {
|
||||
// state.taskSyllabus[i].taskList[j][item] = data[i].taskList[j][item] || 0
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.error("获取路径列表失败" + err);
|
||||
});
|
||||
};
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status !== "uploading") {
|
||||
console.log(info.file, info.fileList);
|
||||
}
|
||||
|
||||
if (info.file.status === "done") {
|
||||
message.success(`${info.file.name} 文件上传成功`);
|
||||
} else if (info.file.status === "error") {
|
||||
message.error(`${info.file.name} 文件上传失败.`);
|
||||
}
|
||||
};
|
||||
|
||||
const delConfirm = (id) => {
|
||||
Modal.confirm({
|
||||
title: "是否确认删除",
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content: "",
|
||||
okText: "确认",
|
||||
cancelText: "取消",
|
||||
onOk() {
|
||||
api
|
||||
.delStudent({ routerId: 100, studentIds: [id] })
|
||||
.then((res) => {
|
||||
message.success("删除成功");
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error("删除失败" + err);
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
const closePub = () => {
|
||||
state.pub = false;
|
||||
};
|
||||
@@ -1850,7 +1779,96 @@ export default {
|
||||
: "-";
|
||||
});
|
||||
};
|
||||
// 获取项目概览
|
||||
const getOverview = () => {
|
||||
getRouterOverview(state.routerId)
|
||||
.then((res) => {
|
||||
Object.keys(res.data.data.routerInfoOverview).forEach((item) => {
|
||||
levelList.routerInfoOverview[item] =
|
||||
res.data.data.routerInfoOverview[item] || 0;
|
||||
});
|
||||
Object.keys(res.data.data.chapterOverviewList).forEach((item) => {
|
||||
levelList.chapterOverviewList[item] =
|
||||
res.data.data.chapterOverviewList[item] || 0;
|
||||
});
|
||||
// res.data.data.routerInfoOverview.forEach((r) => {
|
||||
// console.log(r)
|
||||
// })
|
||||
state.addLoading = false;
|
||||
console.log("项目概览--" + res);
|
||||
})
|
||||
.catch((err) => {
|
||||
state.addLoading = false;
|
||||
message.error("概览获取失败");
|
||||
console.log("获取失败" + err);
|
||||
});
|
||||
};
|
||||
// 获取路径列表
|
||||
const myGetRouterDetail = () => {
|
||||
GetRouterDetail(state.routerId)
|
||||
.then((res) => {
|
||||
let data = res.data.data.chapterList;
|
||||
|
||||
state.taskSyllabus = data;
|
||||
// for(let i in data) {
|
||||
// state.taskSyllabus[i].name = data[i].name
|
||||
// if(data[i].taskList.length > 0) {
|
||||
// for(let j in data[i].taskList) {
|
||||
// Object.keys(data[i].taskList[j]).forEach(item => {
|
||||
// state.taskSyllabus[i].taskList[j][item] = data[i].taskList[j][item] || 0
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.error("获取路径列表失败" + err);
|
||||
});
|
||||
};
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status !== "uploading") {
|
||||
console.log(info.file, info.fileList);
|
||||
}
|
||||
|
||||
if (info.file.status === "done") {
|
||||
message.success(`${info.file.name} 文件上传成功`);
|
||||
} else if (info.file.status === "error") {
|
||||
message.error(`${info.file.name} 文件上传失败.`);
|
||||
}
|
||||
};
|
||||
|
||||
const delConfirm = (id) => {
|
||||
Modal.confirm({
|
||||
title: "是否确认删除",
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content: "",
|
||||
okText: "确认",
|
||||
cancelText: "取消",
|
||||
onOk() {
|
||||
api
|
||||
.delStudent({ routerId: 100, studentIds: [id] })
|
||||
.then((res) => {
|
||||
message.success("删除成功");
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error("删除失败" + err);
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
const searchLevel = () => {
|
||||
const result = state.tableData.filter(item => item.cur == state.gatenamee)
|
||||
state.tableData = result;
|
||||
};
|
||||
const resetLevel = () => {
|
||||
state.gatenamee = '';
|
||||
getStudent();
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
...toRefs(levelList),
|
||||
@@ -1881,6 +1899,8 @@ export default {
|
||||
checkType,
|
||||
handleChange,
|
||||
delConfirm,
|
||||
searchLevel,
|
||||
resetLevel,
|
||||
closePub,
|
||||
releaseLearnPath,
|
||||
showPub,
|
||||
@@ -1899,12 +1919,6 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " ";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.pub {
|
||||
.ant-modal {
|
||||
.ant-modal-body {
|
||||
@@ -2041,6 +2055,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " ";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.CopyModal {
|
||||
.ant-modal {
|
||||
width: 424px !important;
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="tmplh_btn">
|
||||
<div class="btn btn1">
|
||||
<div class="btn btn1" @click="searchLevel">
|
||||
<div class="search"></div>
|
||||
<div class="btnText btnText1">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="btn btn2" @click="resetLevel">
|
||||
<div class="search"></div>
|
||||
<div class="btnText btnText2">重置</div>
|
||||
</div>
|
||||
@@ -106,6 +106,7 @@ export default defineComponent({
|
||||
name: "TemplateLibrary",
|
||||
setup() {
|
||||
const state = reactive({
|
||||
value1:null,
|
||||
tableData1: [
|
||||
{
|
||||
key: "1",
|
||||
@@ -232,12 +233,39 @@ export default defineComponent({
|
||||
message.error(`模板操作失败`+error)
|
||||
})
|
||||
}
|
||||
|
||||
const searchLevel = () => {
|
||||
const result = state.tableData1.filter(item => item.name == state.value1)
|
||||
state.tableData1 = result;
|
||||
};
|
||||
const resetLevel = () => {
|
||||
state.value1 = '';
|
||||
// getLibraryList();
|
||||
state.tableData1 = [
|
||||
{
|
||||
key: "1",
|
||||
name: "测试模板1",
|
||||
status: "已发布",
|
||||
creator: "李部长",
|
||||
stutime: "2022-10-31 23:12:00",
|
||||
operation: "operation",
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
name: "测试模板2",
|
||||
status: "未发布",
|
||||
creator: "李部长",
|
||||
stutime: "2022-10-31 23:12:00",
|
||||
operation: "operation",
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
columns1,
|
||||
templateHadler,
|
||||
searchLevel,
|
||||
resetLevel,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user