feat:新增批量删除 导入学员 导入学员状态 添加学员抽屉 路径-无关卡

This commit is contained in:
songwc
2022-10-21 15:46:07 +08:00
parent 944b3744c8
commit 58db0256da
6 changed files with 1587 additions and 173 deletions

View File

@@ -72,66 +72,97 @@
</div>
</div>
<div class="Lbom">
<div class="item" v-for="item in level" :key="item.id">
<div class="itemhead">
<div class="lev">{{ item.lev }}</div>
<div class="lin"></div>
<div class="nam">{{ item.name }}</div>
<div class="count">
<span>当前关卡</span>
<span>{{ item.count }}</span>
<span>个人</span>
</div>
</div>
<div class="itembomm">
<div class="it">
<div class="on" style="color: #ffb145">
{{ item.online }}
<!-- 判断路径中是否有关卡 -->
<div v-if="level.length != 0">
<div class="item" v-for="item in level" :key="item.id">
<div class="itemhead">
<div class="lev">{{ item.lev }}</div>
<div class="lin"></div>
<div class="nam">{{ item.name }}</div>
<div class="count">
<span>当前关卡</span>
<span>{{ item.count }}</span>
<span>个人</span>
</div>
<div class="ittext">在线</div>
</div>
<div class="linee"></div>
<div class="it">
<div class="on" style="color: #ff89a4">
{{ item.homework }}
<div class="itembomm">
<div class="it">
<div class="on" style="color: #ffb145">
{{ item.online }}
</div>
<div class="ittext">在线</div>
</div>
<div class="ittext">作业</div>
</div>
<div class="linee"></div>
<div class="it">
<div class="on" style="color: #3fc5e3">
{{ item.juan }}
<div class="linee"></div>
<div class="it">
<div class="on" style="color: #ff89a4">
{{ item.homework }}
</div>
<div class="ittext">作业</div>
</div>
<div class="ittext">问卷</div>
</div>
<div class="linee"></div>
<div class="it">
<div class="on" style="color: #5be1c0">
{{ item.ballot }}
<div class="linee"></div>
<div class="it">
<div class="on" style="color: #3fc5e3">
{{ item.juan }}
</div>
<div class="ittext">问卷</div>
</div>
<div class="ittext">投票</div>
</div>
<div class="linee"></div>
<div class="it">
<div class="on" style="color: #a498ff">
{{ item.test }}
<div class="linee"></div>
<div class="it">
<div class="on" style="color: #5be1c0">
{{ item.ballot }}
</div>
<div class="ittext">投票</div>
</div>
<div class="ittext">考试</div>
</div>
<div class="linee"></div>
<div class="itright">
<span class="te">编辑</span>
<div class="more">
<div class="te" style="margin-left: 20px">更多</div>
<div class="moreArrow"></div>
<div class="moreItems">
<div class="roleItem">复制</div>
<div class="roleItem">删除</div>
<div class="linee"></div>
<div class="it">
<div class="on" style="color: #a498ff">
{{ item.test }}
</div>
<div class="ittext">考试</div>
</div>
<div class="linee"></div>
<div class="itright">
<span class="te">编辑</span>
<div class="more">
<div class="te" style="margin-left: 20px">更多</div>
<div class="moreArrow"></div>
<div class="moreItems">
<div class="roleItem">复制</div>
<div class="roleItem">删除</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div v-else>
<div class="create">
<div
class="taskbox"
style="
background: linear-gradient(180deg, #e5f6ec, #eef9f3);
"
>
<div class="leftt">
<img src="../../assets/images/taskpage/left3.png" />
</div>
<div class="photo">
<img src="../../assets/images/taskpage/picture3.png" />
</div>
<div class="rightt">
<img src="../../assets/images/taskpage/right3.png" />
</div>
<div
class="centerbox"
style="color: rgba(93, 201, 136, 1)"
>
发布
</div>
<div class="centermain">快速发布项目</div>
</div>
</div>
</div>
</div>
</div>
<div class="pad"></div>
@@ -159,8 +190,8 @@
</div>
</div>
<div class="xheadb">
<button class="addx">添加学员</button>
<button class="addd">导入学员</button>
<button class="addx" @click="showAddStu">添加学员</button>
<button class="addd" @click="showImpStu">导入学员</button>
<div class="select">
<a-select
v-model:value="projectName"
@@ -289,7 +320,7 @@
"
placeholder="请选择部门"
:options="projectNameList"
@change="selectProjectName"
@change="selectProjectName3"
allowClear
showSearch
></a-select>
@@ -344,13 +375,14 @@
v-model:visible="visible"
:footer="null"
centered="true"
wrapClassName="changeModal"
>
<div class="con">
<div class="header">
<div class="inhe">
<div class="mod"></div>
<div class="tz">调整关卡</div>
<div class="mg"></div>
<div class="mg" @click="closeChangeModal"></div>
</div>
</div>
<div class="mid">
@@ -375,39 +407,74 @@
</div>
</div></a-modal
>
<!-- 批量删除学员弹窗 -->
<a-modal
v-model:visible="deleteAll"
:footer="null"
:closable="closeDeleteAll"
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="closeDeleteALLModal"></div>
</div>
<div class="body">
<span>请确认是否批量删除学员</span>
</div>
<div class="del_btnbox">
<div class="del_btn btn1">
<div class="btnText" @click="delete_exit">取消</div>
</div>
<div class="del_btn btn2">
<div class="btnText" @click="delete_exit">确定</div>
</div>
</div>
</div>
</div>
</a-modal>
<!-- 添加学员抽屉 -->
<add-stu v-model:AddSvisible="AddSvisible" />
<!-- 导入学员抽屉 -->
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" />
</div>
</div>
</template>
<script>
import { ref, reactive, toRefs } from "vue";
import AddStu from "../../components/drawers/AddLevelAddStu";
import ImpStu from "../../components/drawers/AddLevelImportStu";
export default {
name: "LevelAdd",
components: {},
components: { AddStu, ImpStu },
methods: {},
setup() {
const state = reactive({
gatename: null, //关卡名称
gatenamee: null, //学员管理关卡名称
deleteAll: false, //批量删除学员弹窗
AddSvisible: false, //添加学员抽屉
AddImpStuvisible: false, //导入学员抽屉
projectNameListt: [
{
id: 1,
value: "项目一",
label: "项目一",
value: "导出信息",
label: "导出信息",
},
{
id: 2,
value: "项目二",
label: "项目二",
value: "批量调整关卡",
label: "批量调整关卡",
},
{
id: 3,
value: "项目三",
label: "项目三",
},
{
id: 4,
value: "项目四",
label: "项目四",
value: "批量删除",
label: "批量删除",
},
],
projectNameList: [
@@ -479,29 +546,31 @@ export default {
pageSize: 10,
visible: false,
sh: false,
closeDeleteAll: false,
//关卡的数据
level: [
{
id: 1,
lev: "关卡2",
name: "中级产品经理",
count: 3,
online: 5,
homework: 1,
juan: 1,
ballot: 1,
test: 1,
},
{
id: 2,
lev: "关卡2",
name: "初级产品经理",
count: 3,
online: 5,
homework: 1,
juan: 1,
ballot: 1,
test: 1,
},
// {
// id: 1,
// lev: "关卡2",
// name: "中级产品经理",
// count: 3,
// online: 5,
// homework: 1,
// juan: 1,
// ballot: 1,
// test: 1,
// },
// {
// id: 2,
// lev: "关卡2",
// name: "初级产品经理",
// count: 3,
// online: 5,
// homework: 1,
// juan: 1,
// ballot: 1,
// test: 1,
// },
],
tableData: [
{
@@ -580,6 +649,9 @@ export default {
});
const selectProjectName = (value, index) => {
console.log("value", value, index);
if (value === "批量删除") {
showDeleteALLModal();
}
};
const selectProjectName2 = (value, index) => {
console.log("value", value, index);
@@ -698,18 +770,38 @@ export default {
console.log("selectedRowKeys changed: ", selectedRowKeys);
state.selectedRowKeys = selectedRowKeys;
};
const showDeleteALLModal = () => {
state.deleteAll = true;
};
const closeDeleteALLModal = () => {
state.deleteAll = false;
};
const showModal = () => {
state.visible = true;
};
const closeChangeModal = () => {
state.visible = false;
};
const showAddStu = () => {
state.AddSvisible = true;
};
const showImpStu = () => {
state.AddImpStuvisible = true;
};
return {
...toRefs(state),
selectProjectName,
selectProjectName2,
selectProjectName3,
selectProjectName4,
showDeleteALLModal,
closeDeleteALLModal,
tableDataFunc,
onSelectChange,
showModal,
closeChangeModal,
showAddStu,
showImpStu,
};
},
};
@@ -721,96 +813,210 @@ export default {
display: block;
clear: both;
}
.ant-modal {
width: 549px !important;
height: 245px !important;
.ant-modal-content {
width: 549px !important;
height: 245px !important;
.ant-modal-body {
padding: 0 !important;
width: 549px !important;
height: 245px !important;
.con {
// background-color: #bfa;
width: 100%;
height: 100%;
.header {
width: 100%;
display: flex;
height: 68px;
position: relative;
justify-content: center;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
.inhe {
width: 80%;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.mod {
left: 30px;
top: 27px;
position: absolute;
width: 18px;
height: 17px;
background-image: url(../../assets/images/leveladd/mod.png);
}
.tz {
color: #000000;
font-weight: 400;
.CopyModal {
.ant-modal {
width: 424px !important;
height: 258px !important;
.ant-modal-content {
width: 424px !important;
height: 258px !important;
.ant-modal-body {
width: 424px !important;
height: 258px !important;
padding: 0 !important;
.delete {
z-index: 999;
width: 424px;
height: 258px;
background: #ffffff;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
border-radius: 4px;
// position: absolute;
// left: 50%;
// top: 10%;
// transform: translate(-50%, -50%);
.del_header {
position: absolute;
width: calc(100%);
height: 40px;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
}
.del_main {
width: 100%;
position: relative;
.header {
display: flex;
align-items: center;
padding-top: 20px;
padding-left: 26px;
font-size: 16px;
.icon {
width: 16px;
height: 16px;
margin-right: 10px;
background-image: url(@/assets/images/coursewareManage/QR.png);
background-size: 100% 100%;
}
.close_exit {
position: absolute;
right: 42px;
cursor: pointer;
width: 20px;
height: 20px;
background-image: url(@/assets/images/coursewareManage/close.png);
background-size: 100% 100%;
}
}
.mg {
width: 20px;
height: 20px;
background-image: url(../../assets/images/basicinfo/close22.png);
background-size: 100% 100%;
.body {
width: 100%;
margin: 34px auto 56px auto;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
// background-color: red;
position: relative;
.back {
position: absolute;
top: 30px;
font-size: 12px;
font-weight: 400;
color: #666666;
}
}
.del_btnbox {
display: flex;
margin: 30px auto;
justify-content: center;
.del_btn {
width: 100px;
height: 40px;
background: rgba(64, 158, 255, 0);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
cursor: pointer;
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 40px;
}
}
.btn1 {
border: 1px solid rgba(64, 158, 255, 1);
color: #4ea6ff;
margin-right: 14px;
}
.btn2 {
background-color: #4ea6ff;
color: #ffffff;
}
}
}
}
.mid {
}
}
}
}
.changeModal {
.ant-modal {
width: 549px !important;
height: 245px !important;
.ant-modal-content {
width: 549px !important;
height: 245px !important;
.ant-modal-body {
padding: 0 !important;
width: 549px !important;
height: 245px !important;
.con {
// background-color: #bfa;
width: 100%;
display: flex;
height: 100%;
justify-content: center;
.inher {
width: 80%;
height: 100%;
.cur {
color: #6f6f6f;
font-size: 14px;
}
.select {
margin-top: 10px;
}
.btn {
width: 100%;
display: flex;
justify-content: center;
margin-top: 30px;
.sameb {
width: 100px;
height: 40px;
font-size: 14px;
border-radius: 8px;
.header {
width: 100%;
display: flex;
height: 68px;
position: relative;
justify-content: center;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
.inhe {
width: 80%;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.mod {
left: 30px;
top: 27px;
position: absolute;
width: 18px;
height: 17px;
background-image: url(../../assets/images/leveladd/mod.png);
}
.btn1 {
color: #4ea6ff;
background: #ffffff;
border: 1px solid #4ea6ff;
.tz {
color: #000000;
font-weight: 400;
font-size: 16px;
}
.btn2 {
margin-left: 16px;
border: 0;
color: #ffffff;
background: #4ea6ff;
.mg {
width: 20px;
height: 20px;
background-image: url(../../assets/images/basicinfo/close22.png);
background-size: 100% 100%;
cursor: pointer;
}
}
}
.mid {
width: 100%;
display: flex;
height: 100%;
justify-content: center;
.inher {
width: 80%;
height: 100%;
.cur {
color: #6f6f6f;
font-size: 14px;
}
.select {
margin-top: 10px;
}
.btn {
width: 100%;
display: flex;
justify-content: center;
margin-top: 30px;
.sameb {
width: 100px;
height: 40px;
font-size: 14px;
border-radius: 8px;
}
.btn1 {
color: #4ea6ff;
background: #ffffff;
border: 1px solid #4ea6ff;
}
.btn2 {
margin-left: 16px;
border: 0;
color: #ffffff;
background: #4ea6ff;
}
}
}
}
@@ -1200,6 +1406,55 @@ export default {
}
}
}
.show {
color: blue;
}
.noshow {
display: none;
}
}
.create {
margin-top: 40px;
.taskbox {
width: 412px;
height: 160px;
border-radius: 10px;
position: relative;
// margin-left: 68px;
margin-bottom: 40px;
cursor: pointer;
.leftt {
position: absolute;
top: 18px;
left: 0;
}
.photo {
position: absolute;
top: 42px;
left: 37px;
}
.rightt {
position: absolute;
top: 69px;
right: 26px;
}
.centerbox {
position: absolute;
top: 52px;
left: 145px;
font-size: 20px;
font-weight: 700;
//line-height: 36px;
}
.centermain {
color: rgba(135, 139, 146, 1);
font-size: 14px;
position: absolute;
left: 144px;
bottom: 49px;
}
}
}
}
}