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/
# 代理url 本地调试,不可以用在其他地方
VUE_APP_PROXY_URL=http://111.231.196.214/manageApi
VUE_APP_PROXY_URL=http://43.143.139.204/manageApi
# 登录url
VUE_APP_LOGIN_URL=https://u-pre.boe.com/web
# boe域名

View File

@@ -18,7 +18,13 @@
<div class="main">
<div class="minatitl">
<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>
<div class="upload">
@@ -128,7 +134,9 @@
>
<div class="lefimg"></div>
<div class="tacl">
{{ succNum }}条数据导入成功{{ downloadErrUrl == ''? 0 :errNum }}条数据导入失败
{{ succNum }}条数据导入成功{{
downloadErrUrl == "" ? 0 : errNum
}}条数据导入失败
</div>
</div>
@@ -223,7 +231,7 @@ export default {
const state = reactive({
locationHref:
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/",
template: process.env.VUE_APP_UP_LOAD_STUDENT_TEMPLATE,
importStudent:

View File

@@ -3,7 +3,7 @@
:visible="Svisible"
class="drawerStyle subset"
placement="right"
width="70%"
width="640px"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain">
@@ -16,39 +16,43 @@
/>
</div>
<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 class="groupin">
<a-input
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"
/>
<div class="peopleNum">20</div>
<span style="margin-left: 3px"></span>
<div class="delete">删除</div>
</div>
</div>
</div>
<div class="addgroup" @click="showAddGroup">
<!-- <div class="addgroup" @click="showAddGroup">
<img src="../../assets/images/courseManage/add0.png" />
<span class="grot">创建小组</span>
</div>
<div class="zhu">随机分组不对小组长生效</div>
</div> -->
<!-- <div class="zhu">随机分组不对小组长生效</div> -->
<div class="btnn">
<button class="btn1">取消</button>
<button class="btn2">确定</button>
@@ -139,11 +143,33 @@ export default {
}
}
.main {
.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 {
display: flex;
align-items: center;
margin-top: 32px;
font-size: 16px;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
.ant-input {
border-radius: 5px;
// height: 120%;
@@ -156,6 +182,17 @@ export default {
margin-left: 10px;
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 {
color: rgba(0, 0, 0, 0.85);

View File

@@ -1,15 +1,30 @@
<!-- 课件管理页面 -->
<template>
<!-- 预览弹窗 -->
<a-modal :visible="visible" title="查看" :footer="null" :closable="false" wrapClassName="modalStyle lookCourseModal"
width="80%" @cancel="handleCancel" @ok="handleCancel">
<a-modal
:visible="visible"
title="查看"
:footer="null"
:closable="false"
wrapClassName="modalStyle lookCourseModal"
width="80%"
@cancel="handleCancel"
@ok="handleCancel"
>
<div class="modalHeader">
<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>
</div>
<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 class="modalMain">
@@ -20,7 +35,10 @@
<div class="mbl_items">
<div class="item_nam">
<div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="img"/>
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt="img"
/>
</div>
<span style="margin-right: 14px">课程名称</span>
</div>
@@ -33,17 +51,27 @@
<div class="mbl_items2">
<div class="item_nam">
<div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="img"/>
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt="img"
/>
</div>
<span style="margin-right: 14px">封面图</span>
</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 class="mbl_items">
<div class="item_nam">
<div class="asterisk_icon">
<img style="width: 10px; height: 10px" src="@/assets/images/coursewareManage/asterisk.png"
alt="img"/>
<img
style="width: 10px; height: 10px"
src="@/assets/images/coursewareManage/asterisk.png"
alt="img"
/>
</div>
<span style="margin-right: 14px">目标人群</span>
</div>
@@ -66,7 +94,10 @@
<div class="mbl_items">
<div class="item_nam">
<div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="img"/>
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt="img"
/>
</div>
<span style="margin-right: 14px">内容分类</span>
</div>
@@ -99,7 +130,10 @@
<div class="mbl_items">
<div class="item_nam">
<div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk"/>
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
/>
</div>
<span style="margin-right: 14px">授课教师</span>
</div>
@@ -112,7 +146,10 @@
<div class="mbl_items2" v-if="detail.intro">
<div class="item_nam">
<div class="asterisk_icon">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk"/>
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
/>
</div>
<span style="margin-right: 14px">课程简介</span>
</div>
@@ -123,25 +160,50 @@
</div>
</div>
<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">
<img v-if="
<img
v-if="
item.indexOf('jpg') !== -1 ||
item.indexOf('jpeg') !== -1 ||
item.indexOf('png') !== -1
" src="@/assets/images/coursewareManage/pngpic.png"/>
"
src="@/assets/images/coursewareManage/pngpic.png"
/>
<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>
<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>
<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>
<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>
<img v-if="item.indexOf('zip') !== -1"
src="@/assets/images/coursewareManage/zippic.png"/>
<img v-else src="@/assets/images/coursewareManage/docpic.png"/>
<img
v-if="item.indexOf('zip') !== -1"
src="@/assets/images/coursewareManage/zippic.png"
/>
<img
v-else
src="@/assets/images/coursewareManage/docpic.png"
/>
</div>
</div>
</div>
@@ -150,8 +212,9 @@
</div>
<div class="file_detail">
<div class="file_name">
<!-- http://111.231.196.214:12016/7.231.196.214:12016/7-1670486854017.jpg -->
<span style="
<!-- http://43.143.139.204:12016/7.231.196.214:12016/7-1670486854017.jpg -->
<span
style="
color: #6f6f6f;
width: 200px;
display: block;
@@ -161,7 +224,8 @@
position: absolute;
top: 4px;
left: 72px;
">
"
>
{{
item.indexOf("-") !== -1
? item.slice(
@@ -185,7 +249,13 @@
</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>
@@ -196,7 +266,7 @@
</div>
<div class="fotarea">
<div style="border: 1px solid #ccc">
<div v-html="detail.outline"/>
<div v-html="detail.outline" />
</div>
</div>
</div>
@@ -211,9 +281,9 @@
</a-modal>
</template>
<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 {useStore} from "vuex";
import { useStore } from "vuex";
export default defineComponent({
props: {
@@ -226,7 +296,7 @@ export default defineComponent({
default: () => ({}),
},
},
setup(props, {emit}) {
setup(props, { emit }) {
console.log("props", props);
const store = useStore();
@@ -234,151 +304,171 @@ export default defineComponent({
imgList: [],
options2222: [
{
title: '领导力',
value: '100',
title: "领导力",
value: "100",
children: [
{
title: '管理业务',
value: '1001',
title: "管理业务",
value: "1001",
},
{
title: '管理团队',
value: '1002',
title: "管理团队",
value: "1002",
},
{
title: '管理自我',
value: '1003',
title: "管理自我",
value: "1003",
},
],
},
{
title: '专业力',
value: '200',
title: "专业力",
value: "200",
children: [
{
title: '研发',
value: '2001',
title: "研发",
value: "2001",
},
{
title: '系统和解决方案',
value: '2002',
title: "系统和解决方案",
value: "2002",
},
{
title: '生产技术与制造',
value: '2003',
title: "生产技术与制造",
value: "2003",
},
{
title: '供应链',
value: '2004',
title: "供应链",
value: "2004",
},
{
title: '营销',
value: '2005',
title: "营销",
value: "2005",
},
{
title: '品质',
value: '2006',
title: "品质",
value: "2006",
},
{
title: '专业职能',
value: '2007',
title: "专业职能",
value: "2007",
children: [
{
title: '战略与企划',
value: '200701',
title: "战略与企划",
value: "200701",
},
{
title: '流程管理',
value: '200702',
title: "流程管理",
value: "200702",
},
{
title: '业绩管理',
value: '200703',
title: "业绩管理",
value: "200703",
},
{
title: '项目管理',
value: '200704',
title: "项目管理",
value: "200704",
},
{
title: '信息技术',
value: '200705',
title: "信息技术",
value: "200705",
},
{
title: '环境与安全',
value: '200706',
title: "环境与安全",
value: "200706",
},
{
title: '人力资源',
value: '200707',
title: "人力资源",
value: "200707",
},
{
title: '企业文化',
value: '200708',
title: "企业文化",
value: "200708",
},
{
title: '品牌',
value: '200709',
title: "品牌",
value: "200709",
},
{
title: '财务',
value: '200710',
title: "财务",
value: "200710",
},
{
title: '法务',
value: '200711',
title: "法务",
value: "200711",
},
{
title: '风险控制',
value: '200712',
title: "风险控制",
value: "200712",
},
{
title: '行政',
value: '200713'
title: "行政",
value: "200713",
},
]
},
{
title: '医工',
value: '2008',
}
],
},
{
title: '通用力',
value: '300',
title: "医工",
value: "2008",
},
],
},
{
title: "通用力",
value: "300",
children: [
{
title: '职业操守与道德',
value: '3001',
title: "职业操守与道德",
value: "3001",
},
{
title: '职业素养与技能',
value: '3002',
title: "职业素养与技能",
value: "3002",
},
{
title: '规章制度',
value: '3003',
title: "规章制度",
value: "3003",
},
],
}
},
],
categoryName: '',
categoryName: "",
ceshi: "https://u-pre.boe.com/upload/测试下载ppt2-1671002026755.pptx",
ceshi2: "http://111.231.196.214: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/'
ceshi2: "http://43.143.139.204:12016/测试下载ppt3-1671001683026.pptx",
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);
watch(() => props.detail.categoryId, () => {
state.categoryName = findClassFullName(sysTypeOptions.value)
})
watch(
() => props.detail.categoryId,
() => {
state.categoryName = findClassFullName(sysTypeOptions.value);
}
);
function findClassFullName(list, name = '') {
return list && list.length && 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('') || ''
function findClassFullName(list, name = "") {
return (
(list &&
list.length &&
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) => {
@@ -463,7 +553,6 @@ export default defineComponent({
.lookCourseModal {
.ant-modal {
.ant-modal-content {
// width:1358px !important;
.ant-modal-body {
.modalHeader {

View File

@@ -861,7 +861,11 @@
>
<a
href="javascript:void(0);"
@click="downloadFile(item.response ? item.response.data : '')"
@click="
downloadFile(
item.response ? item.response.data : ''
)
"
style="margin-left: 5px"
>下载</a
>
@@ -911,8 +915,20 @@
></a-select>
</div>
<div class="btn">
<button class="sameb btn1" style="cursor:pointer;" @click="closeChangeModal">取消</button>
<button class="sameb btn2" style="cursor:pointer;" @click="changeLevel">确定</button>
<button
class="sameb btn1"
style="cursor: pointer"
@click="closeChangeModal"
>
取消
</button>
<button
class="sameb btn2"
style="cursor: pointer"
@click="changeLevel"
>
确定
</button>
</div>
</div>
</div>
@@ -1475,7 +1491,7 @@ export default {
closeDeleteAll: false,
curLevel: undefined,
curLevelName: "",
curStuID:"",
curStuID: "",
taskSyllabusActive: 0,
//在线管理等页面传递参数
showTimeText: "",
@@ -1555,9 +1571,9 @@ export default {
facestudent: "",
locationHref:
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/",
isreload: true
isreload: true,
});
const levelList = reactive({
@@ -2508,9 +2524,9 @@ export default {
// 共享文档文件下载
const downloadFile = (url) => {
console.log(url)
if(url){
window.open(url)
console.log(url);
if (url) {
window.open(url);
}
// if(url){
// const filename = '操作指南'
@@ -2527,55 +2543,57 @@ export default {
// }
// x.send()
// }
}
};
// 点击学员管理-查看学员操作
function showStudent(record) {
console.log(record)
console.log(record);
state.CheckStuvisible = true;
state.studentId = record.studentId;
}
// 调整关卡
function setLevels(record) {
console.log(record)
console.log(record);
state.curLevelName = record.currentStageName;
state.curStuID = record.id;
state.visiblene = true;
}
// 选择要调整的关卡
function selectProjectName4(e){
console.log(e)
function selectProjectName4(e) {
console.log(e);
state.curLevel = e;
}
// 点击确定 调整关卡
function changeLevel() {
state.isreload = false;
if(!state.curLevel){
message.error("请选择关卡")
return
if (!state.curLevel) {
message.error("请选择关卡");
return;
}
moveStudent({targetId: state.curLevel, ids: [state.curStuID]}).then(res => {
console.log(res)
moveStudent({ targetId: state.curLevel, ids: [state.curStuID] })
.then((res) => {
console.log(res);
state.visiblene = false;
message.destroy();
state.isreload = true;
message.success("调整关卡成功")
message.success("调整关卡成功");
state.curLevel = undefined;
state.curStuID = "";
state.curLevelName = "";
getStudent();
}).catch(err=>{
console.log(err)
})
.catch((err) => {
console.log(err);
state.visiblene = false;
message.error("调整关卡失败");
state.isreload = true;
state.curLevel = undefined;
state.curStuID = "";
state.curLevelName = "";
})
});
}
return {
@@ -2647,7 +2665,7 @@ export default {
showStudent,
setLevels,
selectProjectName4,
changeLevel
changeLevel,
};
},
};

View File

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