feat:增加随机分组

This commit is contained in:
lixg
2023-01-28 16:44:23 +08:00
parent acf8eaa458
commit 8aa96cd0ac
6 changed files with 456 additions and 294 deletions

2
.env
View File

@@ -5,7 +5,7 @@ VUE_APP_BASE_API=/manageApi
#文件路径 #文件路径
VUE_APP_FILE_PATH=/upload/ VUE_APP_FILE_PATH=/upload/
# 代理url 本地调试,不可以用在其他地方 # 代理url 本地调试,不可以用在其他地方
VUE_APP_PROXY_URL=http://111.231.196.214/manageApi VUE_APP_PROXY_URL=http://43.143.139.204/manageApi
# 登录url # 登录url
VUE_APP_LOGIN_URL=https://u-pre.boe.com/web VUE_APP_LOGIN_URL=https://u-pre.boe.com/web
# boe域名 # boe域名

View File

@@ -18,7 +18,13 @@
<div class="main"> <div class="main">
<div class="minatitl"> <div class="minatitl">
<div class="up1">请下载</div> <div class="up1">请下载</div>
<a class="up2" :href="locationHref + template" target="_blank" style="cursor: pointer">模板</a> <a
class="up2"
:href="locationHref + template"
target="_blank"
style="cursor: pointer"
>模板</a
>
<div class="up1">按要求填写数据并导入</div> <div class="up1">按要求填写数据并导入</div>
</div> </div>
<div class="upload"> <div class="upload">
@@ -128,7 +134,9 @@
> >
<div class="lefimg"></div> <div class="lefimg"></div>
<div class="tacl"> <div class="tacl">
{{ succNum }}条数据导入成功{{ downloadErrUrl == ''? 0 :errNum }}条数据导入失败 {{ succNum }}条数据导入成功{{
downloadErrUrl == "" ? 0 : errNum
}}条数据导入失败
</div> </div>
</div> </div>
@@ -223,7 +231,7 @@ export default {
const state = reactive({ const state = reactive({
locationHref: locationHref:
location.href.indexOf("http://") !== -1 location.href.indexOf("http://") !== -1
? "http://111.231.196.214:12016/" ? "http://43.143.139.204:12016/"
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/", : location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
template: process.env.VUE_APP_UP_LOAD_STUDENT_TEMPLATE, template: process.env.VUE_APP_UP_LOAD_STUDENT_TEMPLATE,
importStudent: importStudent:

View File

@@ -3,7 +3,7 @@
:visible="Svisible" :visible="Svisible"
class="drawerStyle subset" class="drawerStyle subset"
placement="right" placement="right"
width="70%" width="640px"
@after-visible-change="afterVisibleChange" @after-visible-change="afterVisibleChange"
> >
<div class="drawerMain"> <div class="drawerMain">
@@ -16,39 +16,43 @@
/> />
</div> </div>
<div class="main"> <div class="main">
<div class="groupl">小组</div> <div class="group">
<span>创建</span>
<a-input-number
:min="0"
:precision="0"
style="width: 64px; height: 40px; border-radius: 8px"
v-model:value="inputV2"
/>
<span style="margin-left: 8px">个小组</span>
<span>每组</span>
<a-input-number
:min="0"
:precision="0"
style="width: 64px; height: 40px; border-radius: 8px"
v-model:value="inputV2"
/>
<span style="margin-left: 8px">个学员</span>
<button class="sure">确定</button>
</div>
<!-- <div class="groupl">小组</div> -->
<div> <div>
<div class="groupin"> <div class="groupin">
<a-input <a-input
v-model:value="value1" v-model:value="value1"
placeholder="好好学习小组"
style="border-radius: 8px; height: 40px"
/>
<div class="delete">删除</div>
</div>
<div class="groupin">
<a-input
v-model:value="value2"
placeholder="全能小组"
style="border-radius: 8px; height: 40px"
/>
<div class="delete">删除</div>
</div>
<div class="groupin">
<a-input
v-model:value="value3"
placeholder="宇宙第一最强小组"
style="border-radius: 8px; height: 40px" style="border-radius: 8px; height: 40px"
/> />
<div class="peopleNum">20</div>
<span style="margin-left: 3px"></span>
<div class="delete">删除</div> <div class="delete">删除</div>
</div> </div>
</div> </div>
</div> </div>
<div class="addgroup" @click="showAddGroup"> <!-- <div class="addgroup" @click="showAddGroup">
<img src="../../assets/images/courseManage/add0.png" /> <img src="../../assets/images/courseManage/add0.png" />
<span class="grot">创建小组</span> <span class="grot">创建小组</span>
</div> </div> -->
<div class="zhu">随机分组不对小组长生效</div> <!-- <div class="zhu">随机分组不对小组长生效</div> -->
<div class="btnn"> <div class="btnn">
<button class="btn1">取消</button> <button class="btn1">取消</button>
<button class="btn2">确定</button> <button class="btn2">确定</button>
@@ -139,11 +143,33 @@ export default {
} }
} }
.main { .main {
display: flex; .group {
display: flex;
align-items: center;
font-size: 16px;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
.sure {
cursor: pointer;
width: 100px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-left: 15px;
color: #fff;
margin-left: 32px;
}
}
.groupin { .groupin {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 32px; margin-top: 32px;
font-size: 16px;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
.ant-input { .ant-input {
border-radius: 5px; border-radius: 5px;
// height: 120%; // height: 120%;
@@ -156,6 +182,17 @@ export default {
margin-left: 10px; margin-left: 10px;
cursor: pointer; cursor: pointer;
} }
.peopleNum {
width: 56px;
height: 40px;
border-radius: 8px;
border: 1px solid #c7cbd2;
display: flex;
align-items: center;
justify-content: center;
margin-left: 12px;
}
} }
.groupl { .groupl {
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);

View File

@@ -1,15 +1,30 @@
<!-- 课件管理页面 --> <!-- 课件管理页面 -->
<template> <template>
<!-- 预览弹窗 --> <!-- 预览弹窗 -->
<a-modal :visible="visible" title="查看" :footer="null" :closable="false" wrapClassName="modalStyle lookCourseModal" <a-modal
width="80%" @cancel="handleCancel" @ok="handleCancel"> :visible="visible"
title="查看"
:footer="null"
:closable="false"
wrapClassName="modalStyle lookCourseModal"
width="80%"
@cancel="handleCancel"
@ok="handleCancel"
>
<div class="modalHeader"> <div class="modalHeader">
<div class="headerLeft"> <div class="headerLeft">
<img style="width: 17px; height: 18px; margin-right: 8px" src="@/assets/images/basicinfo/add.png"/> <img
style="width: 17px; height: 18px; margin-right: 8px"
src="@/assets/images/basicinfo/add.png"
/>
<span class="headerLeftText">预览</span> <span class="headerLeftText">预览</span>
</div> </div>
<div style="margin-right: 57px; cursor: pointer"> <div style="margin-right: 57px; cursor: pointer">
<img @click="handleCancel" style="width: 22px; height: 22px" src="@/assets/images/basicinfo/close22.png"/> <img
@click="handleCancel"
style="width: 22px; height: 22px"
src="@/assets/images/basicinfo/close22.png"
/>
</div> </div>
</div> </div>
<div class="modalMain"> <div class="modalMain">
@@ -20,7 +35,10 @@
<div class="mbl_items"> <div class="mbl_items">
<div class="item_nam"> <div class="item_nam">
<div class="asterisk_icon"> <div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="img"/> <img
src="@/assets/images/coursewareManage/asterisk.png"
alt="img"
/>
</div> </div>
<span style="margin-right: 14px">课程名称</span> <span style="margin-right: 14px">课程名称</span>
</div> </div>
@@ -33,17 +51,27 @@
<div class="mbl_items2"> <div class="mbl_items2">
<div class="item_nam"> <div class="item_nam">
<div class="asterisk_icon"> <div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="img"/> <img
src="@/assets/images/coursewareManage/asterisk.png"
alt="img"
/>
</div> </div>
<span style="margin-right: 14px">封面图</span> <span style="margin-right: 14px">封面图</span>
</div> </div>
<img :src="detail.picUrl" alt="img" style="width: 100px; height: 100px"/> <img
:src="detail.picUrl"
alt="img"
style="width: 100px; height: 100px"
/>
</div> </div>
<div class="mbl_items"> <div class="mbl_items">
<div class="item_nam"> <div class="item_nam">
<div class="asterisk_icon"> <div class="asterisk_icon">
<img style="width: 10px; height: 10px" src="@/assets/images/coursewareManage/asterisk.png" <img
alt="img"/> style="width: 10px; height: 10px"
src="@/assets/images/coursewareManage/asterisk.png"
alt="img"
/>
</div> </div>
<span style="margin-right: 14px">目标人群</span> <span style="margin-right: 14px">目标人群</span>
</div> </div>
@@ -66,7 +94,10 @@
<div class="mbl_items"> <div class="mbl_items">
<div class="item_nam"> <div class="item_nam">
<div class="asterisk_icon"> <div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="img"/> <img
src="@/assets/images/coursewareManage/asterisk.png"
alt="img"
/>
</div> </div>
<span style="margin-right: 14px">内容分类</span> <span style="margin-right: 14px">内容分类</span>
</div> </div>
@@ -99,7 +130,10 @@
<div class="mbl_items"> <div class="mbl_items">
<div class="item_nam"> <div class="item_nam">
<div class="asterisk_icon"> <div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk"/> <img
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
/>
</div> </div>
<span style="margin-right: 14px">授课教师</span> <span style="margin-right: 14px">授课教师</span>
</div> </div>
@@ -112,7 +146,10 @@
<div class="mbl_items2" v-if="detail.intro"> <div class="mbl_items2" v-if="detail.intro">
<div class="item_nam"> <div class="item_nam">
<div class="asterisk_icon"> <div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk"/> <img
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
/>
</div> </div>
<span style="margin-right: 14px">课程简介</span> <span style="margin-right: 14px">课程简介</span>
</div> </div>
@@ -123,25 +160,50 @@
</div> </div>
</div> </div>
<div class="mbl_items12"> <div class="mbl_items12">
<div class="i12_box1" style="position: relative" v-for="(item, index) in detail.attach" :key="index"> <div
class="i12_box1"
style="position: relative"
v-for="(item, index) in detail.attach"
:key="index"
>
<div class="file_img"> <div class="file_img">
<img v-if=" <img
item.indexOf('jpg') !== -1 || v-if="
item.indexOf('jpeg') !== -1 || item.indexOf('jpg') !== -1 ||
item.indexOf('png') !== -1 item.indexOf('jpeg') !== -1 ||
" src="@/assets/images/coursewareManage/pngpic.png"/> item.indexOf('png') !== -1
"
src="@/assets/images/coursewareManage/pngpic.png"
/>
<div v-else> <div v-else>
<img v-if="item.indexOf('doc') !== -1" src="@/assets/images/coursewareManage/docpic.png"/> <img
v-if="item.indexOf('doc') !== -1"
src="@/assets/images/coursewareManage/docpic.png"
/>
<div v-else> <div v-else>
<img v-if="item.indexOf('xls') !== -1" src="@/assets/images/coursewareManage/xlspic.png"/> <img
v-if="item.indexOf('xls') !== -1"
src="@/assets/images/coursewareManage/xlspic.png"
/>
<div v-else> <div v-else>
<img v-if="item.indexOf('ppt') !== -1" src="@/assets/images/coursewareManage/pptpic.png"/> <img
v-if="item.indexOf('ppt') !== -1"
src="@/assets/images/coursewareManage/pptpic.png"
/>
<div v-else> <div v-else>
<img v-if="item.indexOf('pdf') !== -1" src="@/assets/images/coursewareManage/pdfpic.png"/> <img
v-if="item.indexOf('pdf') !== -1"
src="@/assets/images/coursewareManage/pdfpic.png"
/>
<div v-else> <div v-else>
<img v-if="item.indexOf('zip') !== -1" <img
src="@/assets/images/coursewareManage/zippic.png"/> v-if="item.indexOf('zip') !== -1"
<img v-else src="@/assets/images/coursewareManage/docpic.png"/> src="@/assets/images/coursewareManage/zippic.png"
/>
<img
v-else
src="@/assets/images/coursewareManage/docpic.png"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -150,8 +212,9 @@
</div> </div>
<div class="file_detail"> <div class="file_detail">
<div class="file_name"> <div class="file_name">
<!-- http://111.231.196.214:12016/7.231.196.214:12016/7-1670486854017.jpg --> <!-- http://43.143.139.204:12016/7.231.196.214:12016/7-1670486854017.jpg -->
<span style=" <span
style="
color: #6f6f6f; color: #6f6f6f;
width: 200px; width: 200px;
display: block; display: block;
@@ -161,16 +224,17 @@
position: absolute; position: absolute;
top: 4px; top: 4px;
left: 72px; left: 72px;
"> "
{{ >
{{
item.indexOf("-") !== -1 item.indexOf("-") !== -1
? item.slice( ? item.slice(
item.lastIndexOf("/") + 1, item.lastIndexOf("/") + 1,
item.lastIndexOf("-") item.lastIndexOf("-")
) + item.slice(item.lastIndexOf(".")) ) + item.slice(item.lastIndexOf("."))
: item : item
}} }}
</span> </span>
</div> </div>
<div class="file_updata"> <div class="file_updata">
@@ -185,7 +249,13 @@
</div> </div>
</div> </div>
</div> </div>
<a :href="item.indexOf('http') !== -1 ? item : locationHref + item" style="margin-left: 5px">下载</a> <a
:href="
item.indexOf('http') !== -1 ? item : locationHref + item
"
style="margin-left: 5px"
>下载</a
>
</div> </div>
</div> </div>
</div> </div>
@@ -196,7 +266,7 @@
</div> </div>
<div class="fotarea"> <div class="fotarea">
<div style="border: 1px solid #ccc"> <div style="border: 1px solid #ccc">
<div v-html="detail.outline"/> <div v-html="detail.outline" />
</div> </div>
</div> </div>
</div> </div>
@@ -211,9 +281,9 @@
</a-modal> </a-modal>
</template> </template>
<script> <script>
import {reactive, toRefs, defineComponent, ref, watch, computed} from "vue"; import { reactive, toRefs, defineComponent, ref, watch, computed } from "vue";
import * as api1 from "../../../api/index1"; import * as api1 from "../../../api/index1";
import {useStore} from "vuex"; import { useStore } from "vuex";
export default defineComponent({ export default defineComponent({
props: { props: {
@@ -226,7 +296,7 @@ export default defineComponent({
default: () => ({}), default: () => ({}),
}, },
}, },
setup(props, {emit}) { setup(props, { emit }) {
console.log("props", props); console.log("props", props);
const store = useStore(); const store = useStore();
@@ -234,151 +304,171 @@ export default defineComponent({
imgList: [], imgList: [],
options2222: [ options2222: [
{ {
title: '领导力', title: "领导力",
value: '100', value: "100",
children: [ children: [
{ {
title: '管理业务', title: "管理业务",
value: '1001', value: "1001",
}, },
{ {
title: '管理团队', title: "管理团队",
value: '1002', value: "1002",
}, },
{ {
title: '管理自我', title: "管理自我",
value: '1003', value: "1003",
}, },
], ],
}, },
{ {
title: '专业力', title: "专业力",
value: '200', value: "200",
children: [ children: [
{ {
title: '研发', title: "研发",
value: '2001', value: "2001",
}, },
{ {
title: '系统和解决方案', title: "系统和解决方案",
value: '2002', value: "2002",
}, },
{ {
title: '生产技术与制造', title: "生产技术与制造",
value: '2003', value: "2003",
}, },
{ {
title: '供应链', title: "供应链",
value: '2004', value: "2004",
}, },
{ {
title: '营销', title: "营销",
value: '2005', value: "2005",
}, },
{ {
title: '品质', title: "品质",
value: '2006', value: "2006",
}, },
{ {
title: '专业职能', title: "专业职能",
value: '2007', value: "2007",
children: [ children: [
{ {
title: '战略与企划', title: "战略与企划",
value: '200701', value: "200701",
}, },
{ {
title: '流程管理', title: "流程管理",
value: '200702', value: "200702",
}, },
{ {
title: '业绩管理', title: "业绩管理",
value: '200703', value: "200703",
}, },
{ {
title: '项目管理', title: "项目管理",
value: '200704', value: "200704",
}, },
{ {
title: '信息技术', title: "信息技术",
value: '200705', value: "200705",
}, },
{ {
title: '环境与安全', title: "环境与安全",
value: '200706', value: "200706",
}, },
{ {
title: '人力资源', title: "人力资源",
value: '200707', value: "200707",
}, },
{ {
title: '企业文化', title: "企业文化",
value: '200708', value: "200708",
}, },
{ {
title: '品牌', title: "品牌",
value: '200709', value: "200709",
}, },
{ {
title: '财务', title: "财务",
value: '200710', value: "200710",
}, },
{ {
title: '法务', title: "法务",
value: '200711', value: "200711",
}, },
{ {
title: '风险控制', title: "风险控制",
value: '200712', value: "200712",
}, },
{ {
title: '行政', title: "行政",
value: '200713' value: "200713",
}, },
] ],
}, },
{ {
title: '医工', title: "医工",
value: '2008', value: "2008",
} },
], ],
}, },
{ {
title: '通用力', title: "通用力",
value: '300', value: "300",
children: [ children: [
{ {
title: '职业操守与道德', title: "职业操守与道德",
value: '3001', value: "3001",
}, },
{ {
title: '职业素养与技能', title: "职业素养与技能",
value: '3002', value: "3002",
}, },
{ {
title: '规章制度', title: "规章制度",
value: '3003', value: "3003",
}, },
], ],
} },
], ],
categoryName: '', categoryName: "",
ceshi: "https://u-pre.boe.com/upload/测试下载ppt2-1671002026755.pptx", ceshi: "https://u-pre.boe.com/upload/测试下载ppt2-1671002026755.pptx",
ceshi2: "http://111.231.196.214:12016/测试下载ppt3-1671001683026.pptx", ceshi2: "http://43.143.139.204:12016/测试下载ppt3-1671001683026.pptx",
locationHref: location.href.indexOf('http://') !== -1 ? 'http://111.231.196.214:12016/' : location.href.slice(0, location.href.indexOf('/m')) + '/upload/' locationHref:
location.href.indexOf("http://") !== -1
? "http://43.143.139.204:12016/"
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
}); });
const sysTypeOptions = computed(() => store.state.sysType); const sysTypeOptions = computed(() => store.state.sysType);
watch(() => props.detail.categoryId, () => { watch(
state.categoryName = findClassFullName(sysTypeOptions.value) () => props.detail.categoryId,
}) () => {
state.categoryName = findClassFullName(sysTypeOptions.value);
}
);
function findClassFullName(list, name = '') { function findClassFullName(list, name = "") {
return list && list.length && list return (
.map(e => props.detail.categoryId == e.dictCode ? name ? name + '-' + e.dictName : e.dictName : findClassFullName(e.children, name ? name + '-' + e.dictName : e.dictName)) (list &&
.filter(name => name) list.length &&
.join('') || '' list
.map((e) =>
props.detail.categoryId == e.dictCode
? name
? name + "-" + e.dictName
: e.dictName
: findClassFullName(
e.children,
name ? name + "-" + e.dictName : e.dictName
)
)
.filter((name) => name)
.join("")) ||
""
);
} }
const filterTxt = (txt) => { const filterTxt = (txt) => {
@@ -414,37 +504,37 @@ export default defineComponent({
setCode: param, setCode: param,
}; };
api1 api1
.getDict(obj) .getDict(obj)
.then((res) => { .then((res) => {
console.log("获取字典成功", res); console.log("获取字典成功", res);
if (res.data.code === 200) { if (res.data.code === 200) {
if (param === "faceclassClass") { if (param === "faceclassClass") {
let arr = res.data.data.rows; let arr = res.data.data.rows;
let newArr = []; let newArr = [];
arr.forEach((item) => { arr.forEach((item) => {
newArr.push({ newArr.push({
value: item.dictCode, value: item.dictCode,
label: item.dictName, label: item.dictName,
});
}); });
options2.value = state.options2222; });
} options2.value = state.options2222;
if (param === "faceclassScene") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
});
});
options3.value = newArr;
}
} }
}) if (param === "faceclassScene") {
.catch((err) => { let arr = res.data.data.rows;
console.log("获取字典失败", err); let newArr = [];
}); arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
});
});
options3.value = newArr;
}
}
})
.catch((err) => {
console.log("获取字典失败", err);
});
}; };
getDictList("faceclassClass"); getDictList("faceclassClass");
getDictList("faceclassScene"); getDictList("faceclassScene");
@@ -463,7 +553,6 @@ export default defineComponent({
.lookCourseModal { .lookCourseModal {
.ant-modal { .ant-modal {
.ant-modal-content { .ant-modal-content {
// width:1358px !important; // width:1358px !important;
.ant-modal-body { .ant-modal-body {
.modalHeader { .modalHeader {

View File

@@ -531,71 +531,71 @@
:stage="stage" :stage="stage"
:columns="tableDataFunc()" :columns="tableDataFunc()"
> >
<template #extension="{ data: { record } }"> <template #extension="{ data: { record } }">
<div style="display: flex"> <div style="display: flex">
<div <div
@click="showStudent(record)" @click="showStudent(record)"
style=" style="
color: #4ea6ff; color: #4ea6ff;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
margin-left: 20px; margin-left: 20px;
cursor: pointer; cursor: pointer;
" "
> >
查看 查看
</div>
<div
@click="setLevels(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div> </div>
<div </template>
@click="setLevels(record)" </TableStudent>
style=" <TableStudent
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div>
</template>
</TableStudent>
<TableStudent
v-else v-else
:type="2" :type="2"
:id="routerId" :id="routerId"
:stage="stage" :stage="stage"
:columns="tableDataFunc()" :columns="tableDataFunc()"
> >
<template #extension="{ data: { record } }"> <template #extension="{ data: { record } }">
<div style="display: flex"> <div style="display: flex">
<div <div
@click="showStudent(record)" @click="showStudent(record)"
style=" style="
color: #4ea6ff; color: #4ea6ff;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
margin-left: 20px; margin-left: 20px;
cursor: pointer; cursor: pointer;
" "
> >
查看 查看
</div>
<div
@click="setLevels(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div> </div>
<div </template>
@click="setLevels(record)" </TableStudent>
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div>
</template>
</TableStudent>
</a-tab-pane> </a-tab-pane>
<!-- 1211注释 待开放 --> <!-- 1211注释 待开放 -->
<a-tab-pane key="4" tab="设置"> <a-tab-pane key="4" tab="设置">
@@ -861,7 +861,11 @@
> >
<a <a
href="javascript:void(0);" href="javascript:void(0);"
@click="downloadFile(item.response ? item.response.data : '')" @click="
downloadFile(
item.response ? item.response.data : ''
)
"
style="margin-left: 5px" style="margin-left: 5px"
>下载</a >下载</a
> >
@@ -911,8 +915,20 @@
></a-select> ></a-select>
</div> </div>
<div class="btn"> <div class="btn">
<button class="sameb btn1" style="cursor:pointer;" @click="closeChangeModal">取消</button> <button
<button class="sameb btn2" style="cursor:pointer;" @click="changeLevel">确定</button> class="sameb btn1"
style="cursor: pointer"
@click="closeChangeModal"
>
取消
</button>
<button
class="sameb btn2"
style="cursor: pointer"
@click="changeLevel"
>
确定
</button>
</div> </div>
</div> </div>
</div> </div>
@@ -1475,7 +1491,7 @@ export default {
closeDeleteAll: false, closeDeleteAll: false,
curLevel: undefined, curLevel: undefined,
curLevelName: "", curLevelName: "",
curStuID:"", curStuID: "",
taskSyllabusActive: 0, taskSyllabusActive: 0,
//在线管理等页面传递参数 //在线管理等页面传递参数
showTimeText: "", showTimeText: "",
@@ -1555,9 +1571,9 @@ export default {
facestudent: "", facestudent: "",
locationHref: locationHref:
location.href.indexOf("http://") !== -1 location.href.indexOf("http://") !== -1
? "http://111.231.196.214:12016/" ? "http://43.143.139.204:12016/"
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/", : location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
isreload: true isreload: true,
}); });
const levelList = reactive({ const levelList = reactive({
@@ -2243,7 +2259,7 @@ export default {
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
// message.error("获取路径列表失败" + err); // message.error("获取路径列表失败" + err);
}); });
}; };
@@ -2508,9 +2524,9 @@ export default {
// 共享文档文件下载 // 共享文档文件下载
const downloadFile = (url) => { const downloadFile = (url) => {
console.log(url) console.log(url);
if(url){ if (url) {
window.open(url) window.open(url);
} }
// if(url){ // if(url){
// const filename = '操作指南' // const filename = '操作指南'
@@ -2527,55 +2543,57 @@ export default {
// } // }
// x.send() // x.send()
// } // }
} };
// 点击学员管理-查看学员操作 // 点击学员管理-查看学员操作
function showStudent(record) { function showStudent(record) {
console.log(record) console.log(record);
state.CheckStuvisible = true; state.CheckStuvisible = true;
state.studentId = record.studentId; state.studentId = record.studentId;
} }
// 调整关卡 // 调整关卡
function setLevels(record) { function setLevels(record) {
console.log(record) console.log(record);
state.curLevelName = record.currentStageName; state.curLevelName = record.currentStageName;
state.curStuID = record.id; state.curStuID = record.id;
state.visiblene = true; state.visiblene = true;
} }
// 选择要调整的关卡 // 选择要调整的关卡
function selectProjectName4(e){ function selectProjectName4(e) {
console.log(e) console.log(e);
state.curLevel = e; state.curLevel = e;
} }
// 点击确定 调整关卡 // 点击确定 调整关卡
function changeLevel() { function changeLevel() {
state.isreload = false; state.isreload = false;
if(!state.curLevel){ if (!state.curLevel) {
message.error("请选择关卡") message.error("请选择关卡");
return return;
} }
moveStudent({targetId: state.curLevel, ids: [state.curStuID]}).then(res => { moveStudent({ targetId: state.curLevel, ids: [state.curStuID] })
console.log(res) .then((res) => {
state.visiblene = false; console.log(res);
message.destroy(); state.visiblene = false;
state.isreload = true; message.destroy();
message.success("调整关卡成功") state.isreload = true;
state.curLevel = undefined; message.success("调整关卡成功");
state.curStuID = ""; state.curLevel = undefined;
state.curLevelName = ""; state.curStuID = "";
getStudent(); state.curLevelName = "";
}).catch(err=>{ getStudent();
console.log(err) })
state.visiblene = false; .catch((err) => {
message.error("调整关卡失败"); console.log(err);
state.isreload = true; state.visiblene = false;
state.curLevel = undefined; message.error("调整关卡失败");
state.curStuID = ""; state.isreload = true;
state.curLevelName = ""; state.curLevel = undefined;
}) state.curStuID = "";
state.curLevelName = "";
});
} }
return { return {
@@ -2647,7 +2665,7 @@ export default {
showStudent, showStudent,
setLevels, setLevels,
selectProjectName4, selectProjectName4,
changeLevel changeLevel,
}; };
}, },
}; };

View File

@@ -11,7 +11,6 @@
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
line-height: 20px; line-height: 20px;
display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
@@ -53,7 +52,7 @@
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
line-height: 20px; line-height: 20px;
display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
@@ -88,32 +87,35 @@
<div @click="downloadQr(200)">下载200</div> <div @click="downloadQr(200)">下载200</div>
<!-- <div @click="downloadQr(400)">下载400</div> <!-- <div @click="downloadQr(400)">下载400</div>
<div @click="downloadQr(800)">下载800</div> --> <div @click="downloadQr(800)">下载800</div> -->
<div @click="changeCodevisible">显示二维码弹窗</div>
<two-dimensional-code
v-model:codevisible="codevisible"
:codeInfo="codeInfo"
index="0"
type="课程二维码"
/>
<div @click="changeCodevisible2">显示二维码弹窗22</div>
<two-dimensional-code
v-model:codevisible="codevisible2"
:codeInfo="codeInfo2"
index="1"
type="签到二维码"
/>
<a-table
:columns="columns"
:data-source="data"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
/>
<div @click="randomgroup">分组</div>
<SubsetManage v-model:Svisible="Svisible" />
</div> </div>
<div @click="changeCodevisible">显示二维码弹窗</div>
<two-dimensional-code
v-model:codevisible="codevisible"
:codeInfo="codeInfo"
index="0"
type="课程二维码"
/>
<div @click="changeCodevisible2">显示二维码弹窗22</div>
<two-dimensional-code
v-model:codevisible="codevisible2"
:codeInfo="codeInfo2"
index="1"
type="签到二维码"
/>
<a-table
:columns="columns"
:data-source="data"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
/>
</template> </template>
<script> <script>
import { reactive, toRefs } from "vue"; import { reactive, toRefs } from "vue";
@@ -132,6 +134,7 @@ import QrcodeVue from "qrcode.vue";
import html2canvas from "html2canvas"; import html2canvas from "html2canvas";
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue"; import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
import SubsetManage from "../../components/drawers/SubsetManage.vue";
export default { export default {
name: "SystemManage", name: "SystemManage",
components: { components: {
@@ -141,6 +144,7 @@ export default {
draggable, draggable,
QrcodeVue, QrcodeVue,
TwoDimensionalCode, TwoDimensionalCode,
SubsetManage,
}, },
setup() { setup() {
@@ -250,6 +254,7 @@ export default {
}, },
], ],
selectedRowKeys: [], selectedRowKeys: [],
Svisible: true,
}); });
const showDrawer = () => { const showDrawer = () => {
@@ -428,6 +433,10 @@ export default {
} }
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
}; };
const randomgroup = () => {
state.Svisible = true;
};
return { return {
...toRefs(state), ...toRefs(state),
showDrawer, showDrawer,
@@ -440,6 +449,7 @@ export default {
changeCodevisible2, changeCodevisible2,
onSelectChange, onSelectChange,
randomgroup,
}; };
}, },
}; };