feat: 关卡下 学员添加,列表获取,学员删除 方法添加,添加编辑和共享文档

This commit is contained in:
王熙东
2022-11-14 11:48:24 +08:00
parent db70b9033d
commit 4b84e2c429
4 changed files with 1721 additions and 16 deletions

View File

@@ -70,6 +70,9 @@ export const getRouterDetail = (routerId) => http.get('/admin/router/detail', {
}); });
//添加学员 //添加学员
export const addStudent = (obj) => http.post('/admin/router/addStudent', obj); export const addStudent = (obj) => http.post('/admin/router/addStudent', obj);
//删除学员
export const delStudent = (obj) => http.post('/admin/router/deleteStudent', obj);
//项目基础信息----------------------------------- //项目基础信息-----------------------------------

File diff suppressed because it is too large Load Diff

View File

@@ -749,7 +749,7 @@
<img src="@/assets/images/basicinfo/download.png" style="cursor: pointer; <img src="@/assets/images/basicinfo/download.png" style="cursor: pointer;
width:40px;height:40px;margin-right:40px; width:40px;height:40px;margin-right:40px;
" alt=""> " alt="">
<span style="font: oblique bold 16px Sans-serif">{{item.name}}</span> <span style="font: oblique 16px Sans-serif">{{item.name}}</span>
<span style="color: #4ea6ff;float:right;">删除</span> <span style="color: #4ea6ff;float:right;">删除</span>
</div> </div>
</div> </div>
@@ -915,7 +915,7 @@
</div> </div>
</a-modal> </a-modal>
<!-- 添加学员抽屉 --> <!-- 添加学员抽屉 -->
<add-stu v-model:AddSvisible="AddSvisible" /> <path-add-stu v-model:Stuvisible="Stuvisible" />
<!-- 导入学员抽屉 --> <!-- 导入学员抽屉 -->
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" /> <imp-stu v-model:AddImpStuvisible="AddImpStuvisible" />
<!-- 学员管理查看抽屉 --> <!-- 学员管理查看抽屉 -->
@@ -945,7 +945,7 @@
<script> <script>
import { ref, reactive, toRefs,onMounted } from "vue"; import { ref, reactive, toRefs,onMounted } from "vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import AddStu from "../../components/drawers/AddLevelAddStu"; import PathAddStu from "../../components/drawers/pathStuAdd";
import ImpStu from "../../components/drawers/AddLevelImportStu"; import ImpStu from "../../components/drawers/AddLevelImportStu";
import CheckStu from "../../components/drawers/CheckStu"; import CheckStu from "../../components/drawers/CheckStu";
import FaceStu from "../../components/drawers/FaceStu"; import FaceStu from "../../components/drawers/FaceStu";
@@ -956,16 +956,15 @@ import FaceManage from "../../components/drawers/FaceManage";
import WorkManage from "../../components/drawers/WorkManage"; import WorkManage from "../../components/drawers/WorkManage";
// import { useRoute } from "vue-router"; // import { useRoute } from "vue-router";
// import { useStore } from "vuex"; // import { useStore } from "vuex";
import * as api from "../../api/index1";
import { storage } from "../../api/storage"; import { storage } from "../../api/storage";
import { getRouterOverview } from "@/api/indexLearningPath"; import { getRouterOverview } from "@/api/indexLearningPath";
import { GetRouterDetail } from "@/api/indexTask"; import { GetRouterDetail } from "@/api/indexTask";
import * as api from "../../api/index1";
export default { export default {
name: "LevelAdd", name: "LevelAdd",
components: { components: {
AddStu, PathAddStu,
ImpStu, ImpStu,
CheckStu, CheckStu,
FaceStu, FaceStu,
@@ -984,7 +983,7 @@ export default {
gatename: null, //关卡名称 gatename: null, //关卡名称
gatenamee: null, //学员管理关卡名称 gatenamee: null, //学员管理关卡名称
deleteAll: false, //批量删除学员弹窗 deleteAll: false, //批量删除学员弹窗
AddSvisible: false, //添加学员抽屉 Stuvisible: false, //添加学员抽屉
AddImpStuvisible: false, //导入学员抽屉 AddImpStuvisible: false, //导入学员抽屉
CheckStuvisible: false, //学员管理的查看抽屉 CheckStuvisible: false, //学员管理的查看抽屉
addLoading:false, // 加载动画 addLoading:false, // 加载动画
@@ -994,6 +993,7 @@ export default {
twobtnn: false, twobtnn: false,
inputbox: false, inputbox: false,
Wvisible: false, //作业管理 Wvisible: false, //作业管理
// 共享文档列表
docList:[ docList:[
{ {
name:'测试文档1.doc', name:'测试文档1.doc',
@@ -1007,7 +1007,7 @@ export default {
name:'测试文档3.doc', name:'测试文档3.doc',
src:"", src:"",
} }
], // 共享文档列表 ],
huodModal: false, huodModal: false,
zhibModal: false, zhibModal: false,
projectNameListt: [ projectNameListt: [
@@ -1377,7 +1377,9 @@ export default {
> >
调整 调整
</span> </span>
<span style="color:#4EA6FF;cursor:pointer">删除</span> <span style="color:#4EA6FF;cursor:pointer"
onClick={() => {myDelStudent}}
>删除</span>
</div> </div>
</div> </div>
); );
@@ -1403,7 +1405,7 @@ export default {
state.visiblene = false; state.visiblene = false;
}; };
const showAddStu = () => { const showAddStu = () => {
state.AddSvisible = true; state.Stuvisible = true;
}; };
const showImpStu = () => { const showImpStu = () => {
state.AddImpStuvisible = true; state.AddImpStuvisible = true;
@@ -1488,9 +1490,10 @@ export default {
//获取学员列表 //获取学员列表
const getStudent = () => { const getStudent = () => {
let obj = { let obj = {
name: "",
pageNo: 0,
pageSize: 0,
routerId: state.routerId, routerId: state.routerId,
pageNo: 1,
pageSize: 10,
}; };
api api
.getStudent(obj) .getStudent(obj)
@@ -1501,8 +1504,19 @@ export default {
console.log("获取学员列表失败", err); console.log("获取学员列表失败", err);
}); });
}; };
const myDelStudent = () => {
let obj = {
"routerId": 0,
"studentIds": []
};
api.methods(obj).then(res => {
message.success("删除成功")
console.log(res)
}).catch(err => {
message.error("删除失败"+err)
console.log(err)
})
}
const checkType = (type) => { const checkType = (type) => {
let typeRules = [ let typeRules = [
"", "",
@@ -1616,7 +1630,8 @@ export default {
closezhibModal, closezhibModal,
changeTabs, changeTabs,
checkType, checkType,
handleChange handleChange,
myDelStudent,
}; };
}, },
}; };

View File

@@ -383,6 +383,8 @@
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="4" tab="设置"> <a-tab-pane key="4" tab="设置">
<div class="split"></div> <div class="split"></div>
<a-tabs>
<a-tab-pane key="1" tab="编辑">
<div class="setting"> <div class="setting">
<div class="set_tit"> <div class="set_tit">
<span>基本信息</span> <span>基本信息</span>
@@ -460,6 +462,49 @@
</div> </div>
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="共享文档">
<div class="sametab">
<div class="Gcon">
<div class="pad"></div>
<div class="Gin">
<div class="headone">
<div class="box"></div>
<div class="onetitle">上传共享文档</div>
<div class="oneedi">
<a-switch v-model:checked="docChecked" ></a-switch>
</div>
</div>
<div class="btnbox" style="margin:20px;">
<a-upload
v-model:file-list="fileList"
name="file"
action="/api/file/upload"
@change="handleChange"
>
<span class="xkbtn" style="cursor: pointer; font-size: 17px" >上传</span>
<img src="@/assets/images/basicinfo/cloud.png" style="cursor: pointer;
width:34px;height:34px;
" alt="">
</a-upload>
<div 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 docList" :key="item.src" class="docListStyle">
<img src="@/assets/images/basicinfo/download.png" style="cursor: pointer;
width:40px;height:40px;margin-right:40px;
" alt="">
<span style="font: oblique 16px Sans-serif">{{item.name}}</span>
<span style="color: #4ea6ff;float:right;">删除</span>
</div>
</div>
</div>
</div>
</div>
</a-tab-pane>
</a-tabs>
</a-tab-pane>
</a-tabs> </a-tabs>
<a-modal <a-modal
style="padding: 0" style="padding: 0"
@@ -639,12 +684,28 @@ export default defineComponent({
checked: false, checked: false,
checked2: false, checked2: false,
checked3: false, checked3: false,
docChecked:true,
value3: false, value3: false,
value4: false, value4: false,
hideshow: false, hideshow: false,
score1: 5, score1: 5,
score2: 5, score2: 5,
edit: true, edit: true,
// 共享文档列表
docList:[
{
name:'测试文档1.doc',
src:"",
},
{
name:'测试文档2.doc',
src:"",
},
{
name:'测试文档3.doc',
src:"",
}
],
}); });
const value = ref(""); const value = ref("");
const value2 = ref(""); const value2 = ref("");
@@ -849,7 +910,11 @@ export default defineComponent({
height: 20px; height: 20px;
background-color: #edf0f5; background-color: #edf0f5;
} }
.docListStyle {
display: flex;
width: 300px !important;
justify-content: space-around;
}
.taskBox { .taskBox {
.onerow { .onerow {
//width: 100%; //width: 100%;