mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-21 08:46:46 +08:00
@@ -44,7 +44,7 @@ export default defineComponent({
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const isLogin = ref(false);
|
const isLogin = ref(false);
|
||||||
// console.log("router", router.getRoutes(), route);
|
// console.log("router", router.getRoutes(), route);
|
||||||
console.log("版本1.02------------");
|
console.log("版本1.03------------");
|
||||||
const routes = computed(() => {
|
const routes = computed(() => {
|
||||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {reactive, ref, toRefs, watch} from "vue";
|
import {reactive, ref, toRefs, watch} from "vue";
|
||||||
import {getCookieForName} from "@/api/method";
|
import {getCookieForName, throttle} from "@/api/method";
|
||||||
import JSONBigInt from 'json-bigint';
|
import JSONBigInt from 'json-bigint';
|
||||||
|
|
||||||
const JSONBigIntStr = JSONBigInt({storeAsString: true});
|
const JSONBigIntStr = JSONBigInt({storeAsString: true});
|
||||||
@@ -21,11 +21,8 @@ export function useBoeApiPage(_url, params = {}, config = {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function fetch() {
|
function fetch() {
|
||||||
console.log('params', params)
|
|
||||||
state.loading = true
|
state.loading = true
|
||||||
return request(_url, params).then(r => {
|
return request(_url, params).then(r => {
|
||||||
console.log(2222222222222)
|
|
||||||
console.log(r)
|
|
||||||
state.data = config.result(r)
|
state.data = config.result(r)
|
||||||
state.totalPage = config.totalPage(r)
|
state.totalPage = config.totalPage(r)
|
||||||
state.total = config.total(r)
|
state.total = config.total(r)
|
||||||
@@ -69,6 +66,41 @@ export function useBoeApi(_url, params = {}, config = {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function useBoeUserListPage(_url, params = {}, init = true) {
|
||||||
|
|
||||||
|
const state = reactive({
|
||||||
|
data: [],
|
||||||
|
loading: false,
|
||||||
|
total: 0,
|
||||||
|
totalPage: 0,
|
||||||
|
page: 1,
|
||||||
|
...params
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => params.keyWord, throttle(fetch, 600))
|
||||||
|
watch(() => params.page, fetch)
|
||||||
|
|
||||||
|
function fetch() {
|
||||||
|
state.loading = true
|
||||||
|
if (!params.keyWord) {
|
||||||
|
state.loading = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return request(_url, params).then(r => {
|
||||||
|
state.data = params.page === 1 ? r.result.userInfoList : [...state.data, ...r.result.userInfoList]
|
||||||
|
state.totalPage = r.result.totalPage
|
||||||
|
state.total = r.result.totalElement
|
||||||
|
state.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
init && fetch()
|
||||||
|
return {
|
||||||
|
...toRefs(state),
|
||||||
|
fetch,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function usePage(_url, params = {}, init = true) {
|
export function usePage(_url, params = {}, init = true) {
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@after-visible-change="afterVisibleChange">
|
@after-visible-change="afterVisibleChange">
|
||||||
<div class="drawerMain">
|
<div class="drawerMain">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">{{ edit ? "编辑" : "添加" }}作业</div>
|
<div class="headerTitle">{{ edit ? "编辑" : "添加" }}任务</div>
|
||||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||||
@click="closeDrawer2" />
|
@click="closeDrawer2" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -391,6 +391,7 @@ export default {
|
|||||||
id: "",
|
id: "",
|
||||||
testName: "",
|
testName: "",
|
||||||
TestName: "",
|
TestName: "",
|
||||||
|
|
||||||
testObj: {
|
testObj: {
|
||||||
name: "",
|
name: "",
|
||||||
paperId: "",
|
paperId: "",
|
||||||
@@ -511,6 +512,19 @@ export default {
|
|||||||
(state.test.examinationPaperId = state.paperId);
|
(state.test.examinationPaperId = state.paperId);
|
||||||
//TODO缺少paperName字段
|
//TODO缺少paperName字段
|
||||||
state.test.examinationTestName = state.paperName;
|
state.test.examinationTestName = state.paperName;
|
||||||
|
//考试推送
|
||||||
|
state.test.targetId = 0;
|
||||||
|
state.test.type = 0;
|
||||||
|
if(props.isLevel == 1){
|
||||||
|
state.test.targetId = props.routerId;
|
||||||
|
state.test.type = 1;
|
||||||
|
|
||||||
|
}else if(props.isLevel == 2){
|
||||||
|
state.test.targetId = props.projectId;
|
||||||
|
state.test.type = 2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (props.EditTestId > 0) {
|
if (props.EditTestId > 0) {
|
||||||
// 编辑任务
|
// 编辑任务
|
||||||
|
|||||||
@@ -28,8 +28,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, defineEmits, defineProps, onMounted, ref, watch} from "vue";
|
import {computed, defineEmits, defineProps, onMounted, ref, watch} from "vue";
|
||||||
import {scrollLoad, throttle} from "@/api/method";
|
import {useBoeUserListPage} from "@/api/request";
|
||||||
import * as api1 from "@/api/index1";
|
import {USER_LIST} from "@/api/ThirdApi";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
@@ -48,8 +48,6 @@ const props = defineProps({
|
|||||||
mode: String
|
mode: String
|
||||||
})
|
})
|
||||||
|
|
||||||
const options = ref([])
|
|
||||||
|
|
||||||
const selectOptions = ref([])
|
const selectOptions = ref([])
|
||||||
|
|
||||||
const managerArray = computed(() => props.mode === 'select' ? props.value : (props.value ? props.value.split(',') : []))
|
const managerArray = computed(() => props.mode === 'select' ? props.value : (props.value ? props.value.split(',') : []))
|
||||||
@@ -58,11 +56,17 @@ const emit = defineEmits({})
|
|||||||
|
|
||||||
const isOpen = ref(false)
|
const isOpen = ref(false)
|
||||||
|
|
||||||
const memberParam = ref({keyWord: '', pageNo: 1, pageSize: 10})
|
const memberParam = ref({keyWord: '', page: 1, pageSize: 20})
|
||||||
const loading = ref(false)
|
|
||||||
|
|
||||||
|
const {data: userList, loading} = useBoeUserListPage(USER_LIST, memberParam.value, false)
|
||||||
|
|
||||||
|
const options = computed(() => userList.value.filter(e => !(props.value + '').includes(e.id)).map(e => ({
|
||||||
|
label: e.realName + e.userNo,
|
||||||
|
value: e.id,
|
||||||
|
...e,
|
||||||
|
audienceList: null
|
||||||
|
})))
|
||||||
|
|
||||||
watch(() => memberParam.value, throttle(getMemberData, 1000))
|
|
||||||
watch(props, init)
|
watch(props, init)
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
@@ -78,59 +82,32 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
function getMemberData() {
|
const memberScroll = ({target: {scrollHeight, scrollTop, clientHeight}}) => {
|
||||||
if (!memberParam.value.keyWord) {
|
scrollHeight === (clientHeight + scrollTop) && memberParam.value.page++
|
||||||
return
|
|
||||||
}
|
|
||||||
if (memberParam.value.pageNo !== 1) {
|
|
||||||
options.value && options.value.length && (options.value = [])
|
|
||||||
}
|
|
||||||
isOpen.value = true
|
|
||||||
loading.value = true
|
|
||||||
api1.getMemberInfo(memberParam.value).then((res) => {
|
|
||||||
if (!res.data.data.rows || !res.data.data.rows.length) {
|
|
||||||
isOpen.value = false
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
console.log(1111111111111)
|
|
||||||
console.log(props.value)
|
|
||||||
const list = res.data.data.rows.filter(e => !(props.value + '').includes(e.id)).map(e => ({
|
|
||||||
label: e.realName + e.userNo,
|
|
||||||
value: e.id,
|
|
||||||
deptId: e.departId,
|
|
||||||
departName: e.departName,
|
|
||||||
userNo: e.userNo,
|
|
||||||
name: e.realName
|
|
||||||
}));
|
|
||||||
memberParam.value.pageNo === 1 && props.value ? (options.value = list) : options.value.push(...list)
|
|
||||||
loading.value = false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const memberScroll = (e) => {
|
|
||||||
let num = scrollLoad(e);
|
|
||||||
if (num === 2) {
|
|
||||||
memberParam.value.pageNo++;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//搜索学员
|
//搜索学员
|
||||||
const searchMember = (keyWord) => {
|
const searchMember = (keyWord) => {
|
||||||
console.log('searchMember', keyWord)
|
console.log('searchMember', keyWord)
|
||||||
loading.value = true
|
loading.value = true
|
||||||
options.value = []
|
|
||||||
isOpen.value = true
|
isOpen.value = true
|
||||||
keyWord && (memberParam.value = {keyWord, pageNo: 1, pageSize: 10});
|
userList.value = []
|
||||||
|
memberParam.value.page = 1
|
||||||
|
memberParam.value.keyWord = keyWord
|
||||||
};
|
};
|
||||||
|
|
||||||
function blur() {
|
function blur() {
|
||||||
isOpen.value = false
|
isOpen.value = false
|
||||||
|
memberParam.value.keyWord = ''
|
||||||
|
memberParam.value.page = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function change(e, l) {
|
function change(e, l) {
|
||||||
|
memberParam.value.keyWord = ''
|
||||||
|
memberParam.value.page = 1
|
||||||
isOpen.value = false
|
isOpen.value = false
|
||||||
Array.isArray(l) && (selectOptions.value = l)
|
Array.isArray(l) && (selectOptions.value = l)
|
||||||
Array.isArray(selectOptions.value) && emit('onChange', e, l, selectOptions.value.find(e => e.deptId)?.deptId, selectOptions.value.find(e => e.deptId)?.departName)
|
Array.isArray(selectOptions.value) && emit('onChange', e, l, selectOptions.value.find(e => e.departId)?.departId, selectOptions.value.find(e => e.departId)?.departName)
|
||||||
if (Array.isArray(l)) {
|
if (Array.isArray(l)) {
|
||||||
emit('update:name', l.map(t => t.label).join(','))
|
emit('update:name', l.map(t => t.label).join(','))
|
||||||
emit('update:value', l.map(t => t.value).join(','))
|
emit('update:value', l.map(t => t.value).join(','))
|
||||||
|
|||||||
@@ -129,6 +129,10 @@ const props = defineProps({
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
visable: {
|
||||||
|
type: Boolean,
|
||||||
|
default:false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const tablecolumns = ref([
|
const tablecolumns = ref([
|
||||||
{
|
{
|
||||||
@@ -202,8 +206,15 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
watch(props, () => {
|
watch(props, () => {
|
||||||
|
if(!props.visable){
|
||||||
|
stuSelectKeys.value =[];
|
||||||
|
console.log("关闭了");
|
||||||
|
}
|
||||||
|
console.log("props.visable",props.visable)
|
||||||
tableParam.value.pid = props.id;
|
tableParam.value.pid = props.id;
|
||||||
getStuList();
|
getStuList();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onStuSelectChange(e) {
|
function onStuSelectChange(e) {
|
||||||
|
|||||||
@@ -638,6 +638,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mbl_items2">
|
<div class="mbl_items2">
|
||||||
<div class="item_nam">
|
<div class="item_nam">
|
||||||
|
<div class="asterisk_icon">
|
||||||
|
<img
|
||||||
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
|
alt="asterisk"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<span style="margin-right: 14px">课程简介</span>
|
<span style="margin-right: 14px">课程简介</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item_inp">
|
<div class="item_inp">
|
||||||
@@ -681,7 +687,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mbl_items12">
|
<div class="mbl_items12">{{imgList}}
|
||||||
<div
|
<div
|
||||||
class="i12_box1"
|
class="i12_box1"
|
||||||
v-for="(item, index) in imgList"
|
v-for="(item, index) in imgList"
|
||||||
@@ -2279,6 +2285,7 @@
|
|||||||
:type="3"
|
:type="3"
|
||||||
:id="offcoursePlanId"
|
:id="offcoursePlanId"
|
||||||
:columns="stuColumns"
|
:columns="stuColumns"
|
||||||
|
:visable ="sm_hs"
|
||||||
>
|
>
|
||||||
<!-- <template #extension = "data">-->
|
<!-- <template #extension = "data">-->
|
||||||
<!-- <div style="display: flex">-->
|
<!-- <div style="display: flex">-->
|
||||||
@@ -4988,7 +4995,6 @@ export default defineComponent({
|
|||||||
const sm_exit = () => {
|
const sm_exit = () => {
|
||||||
state.sm_hs = false;
|
state.sm_hs = false;
|
||||||
state.hideshow = true;
|
state.hideshow = true;
|
||||||
|
|
||||||
state.tableData7 = [];
|
state.tableData7 = [];
|
||||||
};
|
};
|
||||||
const clear_valueE1 = (value) => {
|
const clear_valueE1 = (value) => {
|
||||||
@@ -5592,7 +5598,8 @@ export default defineComponent({
|
|||||||
// });
|
// });
|
||||||
// console.log(state.filesList);
|
// console.log(state.filesList);
|
||||||
console.log(res.data.data);
|
console.log(res.data.data);
|
||||||
state.filesList = [res.data.data];
|
state.filesList.push([res.data.data]);
|
||||||
|
|
||||||
// state.hasImgName = res.data.data;
|
// state.hasImgName = res.data.data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -837,6 +837,7 @@ export default defineComponent({
|
|||||||
postData.categoryId,
|
postData.categoryId,
|
||||||
postData.teacherId,
|
postData.teacherId,
|
||||||
postData.picUrl,
|
postData.picUrl,
|
||||||
|
postData.qdms_inputV6,
|
||||||
];
|
];
|
||||||
if (!checkVal(checkList)) {
|
if (!checkVal(checkList)) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
<!-- eslint-disable vue/valid-v-model -->
|
||||||
|
<!-- eslint-disable vue/no-parsing-error -->
|
||||||
<!-- 任务页面 -->img
|
<!-- 任务页面 -->img
|
||||||
<template>
|
<template>
|
||||||
<div class="taskpage">
|
<div class="taskpage">
|
||||||
@@ -686,6 +688,7 @@
|
|||||||
<div style="display: flex; height: 20px"></div>
|
<div style="display: flex; height: 20px"></div>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
<a-tab-pane key="3" tab="学员">
|
<a-tab-pane key="3" tab="学员">
|
||||||
<div class="split"></div>
|
<div class="split"></div>
|
||||||
<div class="content3">
|
<div class="content3">
|
||||||
@@ -696,6 +699,7 @@
|
|||||||
:id="projectId"
|
:id="projectId"
|
||||||
:columns="stuColumns"
|
:columns="stuColumns"
|
||||||
:stage="stage"
|
:stage="stage"
|
||||||
|
:visable ="tabFlag"
|
||||||
></TableStudent>
|
></TableStudent>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
@@ -1721,6 +1725,7 @@ export default {
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
tabFlag:true,
|
||||||
stage: [],
|
stage: [],
|
||||||
stuColumns: [
|
stuColumns: [
|
||||||
{
|
{
|
||||||
@@ -2573,6 +2578,7 @@ export default {
|
|||||||
state.changeGoods = [];
|
state.changeGoods = [];
|
||||||
state.canclestu = false;
|
state.canclestu = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
//点击取消授予优秀学员后
|
//点击取消授予优秀学员后
|
||||||
const cancelyou = () => {
|
const cancelyou = () => {
|
||||||
state.changeGoods = [];
|
state.changeGoods = [];
|
||||||
@@ -3065,6 +3071,8 @@ export default {
|
|||||||
|
|
||||||
//tabs切换
|
//tabs切换
|
||||||
const tabsChange = (e) => {
|
const tabsChange = (e) => {
|
||||||
|
|
||||||
|
|
||||||
//排行榜
|
//排行榜
|
||||||
if (e == 6) {
|
if (e == 6) {
|
||||||
//获取进度榜
|
//获取进度榜
|
||||||
@@ -3073,9 +3081,13 @@ export default {
|
|||||||
getbillboard(2, 1);
|
getbillboard(2, 1);
|
||||||
//获取学时榜
|
//获取学时榜
|
||||||
getbillboard(3, 1);
|
getbillboard(3, 1);
|
||||||
|
} else if(e == 3){
|
||||||
|
state.tabFlag =true;
|
||||||
}else{
|
}else{
|
||||||
rankReset();
|
rankReset();
|
||||||
|
state.tabFlag =false;
|
||||||
}
|
}
|
||||||
|
console.log("切换了",state.tabFlag);
|
||||||
};
|
};
|
||||||
|
|
||||||
// start -------排行榜---------------排行榜------------排行榜------------------排行榜---------
|
// start -------排行榜---------------排行榜------------排行榜------------------排行榜---------
|
||||||
@@ -4025,6 +4037,7 @@ export default {
|
|||||||
closeModal2,
|
closeModal2,
|
||||||
showModal3,
|
showModal3,
|
||||||
closeModal3,
|
closeModal3,
|
||||||
|
|
||||||
showDeleteOne,
|
showDeleteOne,
|
||||||
closeDeleteOne,
|
closeDeleteOne,
|
||||||
showTime,
|
showTime,
|
||||||
|
|||||||
Reference in New Issue
Block a user