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

@@ -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,
};
},
};