mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 20:06:47 +08:00
feat: 关卡下 学员添加,列表获取,学员删除 方法添加,添加编辑和共享文档
This commit is contained in:
@@ -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 delStudent = (obj) => http.post('/admin/router/deleteStudent', obj);
|
||||
|
||||
|
||||
|
||||
//项目基础信息-----------------------------------
|
||||
|
||||
1622
src/components/drawers/pathStuAdd.vue
Normal file
1622
src/components/drawers/pathStuAdd.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -749,7 +749,7 @@
|
||||
<img src="@/assets/images/basicinfo/download.png" style="cursor: pointer;
|
||||
width:40px;height:40px;margin-right:40px;
|
||||
" 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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -915,7 +915,7 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 添加学员抽屉 -->
|
||||
<add-stu v-model:AddSvisible="AddSvisible" />
|
||||
<path-add-stu v-model:Stuvisible="Stuvisible" />
|
||||
<!-- 导入学员抽屉 -->
|
||||
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" />
|
||||
<!-- 学员管理查看抽屉 -->
|
||||
@@ -945,7 +945,7 @@
|
||||
<script>
|
||||
import { ref, reactive, toRefs,onMounted } from "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 CheckStu from "../../components/drawers/CheckStu";
|
||||
import FaceStu from "../../components/drawers/FaceStu";
|
||||
@@ -956,16 +956,15 @@ import FaceManage from "../../components/drawers/FaceManage";
|
||||
import WorkManage from "../../components/drawers/WorkManage";
|
||||
// import { useRoute } from "vue-router";
|
||||
// import { useStore } from "vuex";
|
||||
import * as api from "../../api/index1";
|
||||
import { storage } from "../../api/storage";
|
||||
|
||||
import { getRouterOverview } from "@/api/indexLearningPath";
|
||||
import { GetRouterDetail } from "@/api/indexTask";
|
||||
import * as api from "../../api/index1";
|
||||
|
||||
export default {
|
||||
name: "LevelAdd",
|
||||
components: {
|
||||
AddStu,
|
||||
PathAddStu,
|
||||
ImpStu,
|
||||
CheckStu,
|
||||
FaceStu,
|
||||
@@ -984,7 +983,7 @@ export default {
|
||||
gatename: null, //关卡名称
|
||||
gatenamee: null, //学员管理关卡名称
|
||||
deleteAll: false, //批量删除学员弹窗
|
||||
AddSvisible: false, //添加学员抽屉
|
||||
Stuvisible: false, //添加学员抽屉
|
||||
AddImpStuvisible: false, //导入学员抽屉
|
||||
CheckStuvisible: false, //学员管理的查看抽屉
|
||||
addLoading:false, // 加载动画
|
||||
@@ -994,6 +993,7 @@ export default {
|
||||
twobtnn: false,
|
||||
inputbox: false,
|
||||
Wvisible: false, //作业管理
|
||||
// 共享文档列表
|
||||
docList:[
|
||||
{
|
||||
name:'测试文档1.doc',
|
||||
@@ -1007,7 +1007,7 @@ export default {
|
||||
name:'测试文档3.doc',
|
||||
src:"",
|
||||
}
|
||||
], // 共享文档列表
|
||||
],
|
||||
huodModal: false,
|
||||
zhibModal: false,
|
||||
projectNameListt: [
|
||||
@@ -1377,7 +1377,9 @@ export default {
|
||||
>
|
||||
调整
|
||||
</span>
|
||||
<span style="color:#4EA6FF;cursor:pointer">删除</span>
|
||||
<span style="color:#4EA6FF;cursor:pointer"
|
||||
onClick={() => {myDelStudent}}
|
||||
>删除</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -1403,7 +1405,7 @@ export default {
|
||||
state.visiblene = false;
|
||||
};
|
||||
const showAddStu = () => {
|
||||
state.AddSvisible = true;
|
||||
state.Stuvisible = true;
|
||||
};
|
||||
const showImpStu = () => {
|
||||
state.AddImpStuvisible = true;
|
||||
@@ -1488,9 +1490,10 @@ export default {
|
||||
//获取学员列表
|
||||
const getStudent = () => {
|
||||
let obj = {
|
||||
name: "",
|
||||
pageNo: 0,
|
||||
pageSize: 0,
|
||||
routerId: state.routerId,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
api
|
||||
.getStudent(obj)
|
||||
@@ -1501,8 +1504,19 @@ export default {
|
||||
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) => {
|
||||
let typeRules = [
|
||||
"",
|
||||
@@ -1616,7 +1630,8 @@ export default {
|
||||
closezhibModal,
|
||||
changeTabs,
|
||||
checkType,
|
||||
handleChange
|
||||
handleChange,
|
||||
myDelStudent,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -383,6 +383,8 @@
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="4" tab="设置">
|
||||
<div class="split"></div>
|
||||
<a-tabs>
|
||||
<a-tab-pane key="1" tab="编辑">
|
||||
<div class="setting">
|
||||
<div class="set_tit">
|
||||
<span>基本信息</span>
|
||||
@@ -460,6 +462,49 @@
|
||||
</div>
|
||||
</div>
|
||||
</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-modal
|
||||
style="padding: 0"
|
||||
@@ -639,12 +684,28 @@ export default defineComponent({
|
||||
checked: false,
|
||||
checked2: false,
|
||||
checked3: false,
|
||||
docChecked:true,
|
||||
value3: false,
|
||||
value4: false,
|
||||
hideshow: false,
|
||||
score1: 5,
|
||||
score2: 5,
|
||||
edit: true,
|
||||
// 共享文档列表
|
||||
docList:[
|
||||
{
|
||||
name:'测试文档1.doc',
|
||||
src:"",
|
||||
},
|
||||
{
|
||||
name:'测试文档2.doc',
|
||||
src:"",
|
||||
},
|
||||
{
|
||||
name:'测试文档3.doc',
|
||||
src:"",
|
||||
}
|
||||
],
|
||||
});
|
||||
const value = ref("");
|
||||
const value2 = ref("");
|
||||
@@ -849,7 +910,11 @@ export default defineComponent({
|
||||
height: 20px;
|
||||
background-color: #edf0f5;
|
||||
}
|
||||
|
||||
.docListStyle {
|
||||
display: flex;
|
||||
width: 300px !important;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.taskBox {
|
||||
.onerow {
|
||||
//width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user