Merge branch 'pre-dev' into 'develop'

Pre dev

See merge request !22
This commit is contained in:
huangshengfa
2022-12-19 22:30:35 +08:00
14 changed files with 1001 additions and 944 deletions

View File

@@ -44,7 +44,7 @@ export default defineComponent({
const store = useStore();
const isLogin = ref(false);
// console.log("router", router.getRoutes(), route);
console.log("版本0.9.17------------");
console.log("版本0.9.18------------");
const routes = computed(() => {
return router.getRoutes().filter((e) => e.meta?.isLink);
});

View File

@@ -57,6 +57,7 @@ export const getProjectDetail = (obj) => http.get('/admin/project/detail', {para
export const releaseProject = (obj) => http.post('/admin/project/publish', obj)
//获取项目学员
export const projectStudent = (obj) => http.post('/admin/project/studentList', obj)
export const projectStudentCount = (obj) => http.get('/admin/student/getStudentCount', {params: obj})
//撤回发布、结束
export const handleProject = (obj) => http.post('/admin/project/handle', obj)

View File

@@ -51,31 +51,37 @@ body {
height: 6px;
/*对水平流动条有效*/
}
::-o-scrollbar {
width: 6px;
/*对垂直流动条有效*/
height: 6px;
/*对水平流动条有效*/
}
.scrollbar {
width: 6px;
/*对垂直流动条有效*/
height: 6px;
/*对水平流动条有效*/
}
/*定义滚动条的轨道颜色、内阴影及圆角*/
::-webkit-scrollbar-track {
background-color: rgba(239, 244, 252, 1);
border-radius: 6px;
}
::-moz-scrollbar-track {
background-color: rgba(239, 244, 252, 1);
border-radius: 6px;
}
::-o-scrollbar-track {
background-color: rgba(239, 244, 252, 1);
border-radius: 6px;
}
.scrollbar-track {
background-color: rgba(239, 244, 252, 1);
border-radius: 6px;
@@ -86,14 +92,17 @@ body {
border-radius: 3px;
background-color: rgba(78, 166, 255, 1);
}
::-moz-scrollbar-thumb {
border-radius: 3px;
background-color: rgba(78, 166, 255, 1);
}
::-o-scrollbar-thumb {
border-radius: 3px;
background-color: rgba(78, 166, 255, 1);
}
.scrollbar-thumb {
border-radius: 3px;
background-color: rgba(78, 166, 255, 1);
@@ -104,35 +113,43 @@ body {
background-color: cyan;
display: none;
}
::-moz-scrollbar-button {
background-color: cyan;
display: none;
}
::-o-scrollbar-button {
background-color: cyan;
display: none;
}
.scrollbar-button {
background-color: cyan;
display: none;
}
/*定义右下角汇合处的样式*/
::-webkit-scrollbar-corner {
background: rgba(239, 244, 252, 1);
;
}
::-moz-scrollbar-corner {
background: rgba(239, 244, 252, 1);
;
}
::-o-scrollbar-corner {
background: rgba(239, 244, 252, 1);
;
}
.scrollbar-corner {
background: rgba(239, 244, 252, 1);
;
}
//隐藏滚动条----------------------------------------------------------------
//禁止选中----------------------------------------------------------
@@ -329,6 +346,7 @@ textarea {
//抽屉--------------------------------------------------------
.drawerStyle {
// transform: translateX(0px) !important;
.ant-drawer-content-wrapper {
max-width: 1050px;
@@ -441,13 +459,16 @@ textarea {
.modalHeader {
background: linear-gradient(180deg, rgba(103, 64, 255, 0.2) 0%, rgba(166, 168, 255, 0) 100%) !important;
}
.top {
background: linear-gradient(180deg, rgba(103, 64, 255, 0.2) 0%, rgba(166, 168, 255, 0) 100%) !important;
}
.del_header {
background: linear-gradient(180deg, rgba(103, 64, 255, 0.2) 0%, rgba(166, 168, 255, 0) 100%) !important;
}
}
//弹窗--------------------------------------------------------
//loading--------------------------------------------------------
@@ -460,6 +481,8 @@ align-items: center;
justify-content: center;
position: absolute;
left: 0;
top:0,
top: 0;
z-index: 100
}
//loading--------------------------------------------------------

View File

@@ -12,9 +12,9 @@
<div class="itemtime">{{ item.pubtime }}</div>
</div>
</div>
</template>s
</template>
<script>
import { reactive, toRefs, onMounted } from "vue";
import { reactive, toRefs, onMounted, watch } from "vue";
import { getTask } from "../../api/indexTaskadd";
import { noticeList } from "../../api/indexNotice";
import emitter from "../../utils/bus";
@@ -26,6 +26,10 @@ export default {
type: Number,
default: null,
},
show: {
type: String,
default: null,
},
},
setup(props) {
@@ -89,6 +93,19 @@ export default {
getTaskInfo();
getNotice();
});
watch(
() => props.show,
() => {
console.log("props.show", props.show);
if (props.show == 12) {
getTaskInfo();
getNotice();
}
},
{
deep: true,
}
);
return {
...toRefs(state),
getTaskInfo,

View File

@@ -4,11 +4,11 @@
<div class="noticeTitle">
<!-- <div class="notitle"><span class="titlespan">公告</span></div> -->
<div class="switch">
<a-switch v-model:checked="noticeChecked" @click="noticeFlag" size="small" /><span
style="margin-left: 16px"
>
开启
</span>
<a-switch
v-model:checked="noticeChecked"
@click="noticeFlag"
size="small"
/><span style="margin-left: 16px"> 开启 </span>
</div>
<template v-if="noticeChecked">
<p>当前公告内容</p>
@@ -23,10 +23,8 @@
</template>
<!-- 编辑 -->
<template v-if="editOn">
<div class="txt-content">
{{ noticeContent1 ? noticeContent1 : "暂无公告" }}
</div>
<p>编辑新公告</p>
<a-textarea
@@ -83,20 +81,21 @@ export default {
state.editOn = true;
};
const handleCancel = () => {
state.editOn = false;
};
const noticeFlag = () => {
//state.noticeChecked = !state.noticeChecked;
console.log("111", state.projectInfo);
state.projectInfo.noticeFlag = state.noticeChecked ? 1 : 0;
editProj(state.projectInfo).then((res)=>{
console.log("res",res.data.data.projectInfo);
}).catch((error)=>{
editProj(state.projectInfo)
.then((res) => {
console.log("res5555555555", res);
})
.catch((error) => {
console.log(error);
});
console.log("222", state.projectInfo);
}
};
const pubNotice = () => {
if (state.noticeContent == "") {
message.destroy();
@@ -109,13 +108,20 @@ export default {
};
publishNotice(obj); //加入历史
state.projectInfo.notice = state.noticeContent;
editProj(state.projectInfo).then((res) => {
console.log("222444444", state.projectInfo);
state.noticeContent1 =
state.noticeContent == "" ? "暂无公告" : state.noticeContent;
message.success("发布成功");
handleCancel();
editProj(state.projectInfo)
.then((res) => {
// console.log("res");
// console.log(res);
if (res.data.code === 200) {
message.destroy();
message.success("发布成功", res);
state.noticeContent1 = res.data.data.notice==""?"暂无公告":res.data.data.notice;
// message.success("发布成功");
state.noticeContent1 =
res.data.data.notice == "" ? "暂无公告" : res.data.data.notice;
handleCancel();
emitter.emit("setNotice", false);
}
@@ -125,8 +131,6 @@ export default {
message.warning("发布失败");
console.log(err);
});
}
};
onMounted(() => {

View File

@@ -241,7 +241,7 @@ const {
loading: stuLoading,
total: stuTotal
} = useBoeApiPage(USER_LIST, nameSearch.value, {
init: true,
init: false,
result: res => res.result.userInfoList,
totalPage: res => res.result.totalPage,
total: res => res.result.totalElement
@@ -260,7 +260,7 @@ const {
loading: audiLoading,
total: audiTotal
} = useBoeApiPage(AUDIENCE_LIST, audienceName.value, {
init: true,
init: false,
result: res => res.result.audienceList.map(e => ({...e, id: e.id + ''})),
totalPage: res => res.result.totalPage,
total: res => res.result.totalElement
@@ -478,7 +478,7 @@ const resetAudienceInfo = () => {
// };
//确定添加授权
const submitAuth = () => {
if (props.type !== 3) {
if (props.type === 2) {
stageVisible.value = true
} else {
handleStageOk()

View File

@@ -22,7 +22,8 @@
</a-col>
<a-col :span="2">
<a-button class="cus-btn white" style="width: 100px" @click="reset"
>重置</a-button
>重置
</a-button
>
</a-col>
</a-row>
@@ -96,7 +97,7 @@
</div>
</template>
<script setup>
import { computed, defineProps, onMounted, ref } from "vue";
import {computed, defineProps, onMounted, ref, watch} from "vue";
import {delStudentList, getStuPage} from "@/api/index1";
import CommonStudent from "@/components/student/CommonStudent";
@@ -183,6 +184,11 @@ onMounted(() => {
getStuList();
});
watch(props, () => {
tableParam.value.pid= props.id
getStuList();
})
function onStuSelectChange(e) {
stuSelectKeys.value = e;
}
@@ -203,13 +209,15 @@ function changePagination(page) {
function getStuList() {
tableData.value.loading = true;
getStuPage(tableParam.value).then((res) => {
console.log("学员管理-获取学员", res.data);
tableData.value.total = res.data.data.total;
tableData.value.list = res.data.data.records;
tableData.value.loading = false;
});
}
function reset() {}
function reset() {
}
function bathDel() {
stuSelectKeys.value &&

View File

@@ -2278,7 +2278,7 @@
<span>{{ currentPlanItem.teacher }}</span>
</div>
<div class="stmm_i5">
<TableStudent :type="3" :id="offcourseId" :columns="stuColumns">
<TableStudent :type="3" :id="offcoursePlanId" :columns="stuColumns">
<!-- <template #extension = "data">-->
<!-- <div style="display: flex">-->
<!-- <button @click="handlJoinStu(data)">成绩录入</button>-->
@@ -4982,7 +4982,7 @@ export default defineComponent({
console.log(state.currentPlanItem);
state.sm_hs = true;
getTableDate2();
// getTableDate2();
};
const sm_exit = () => {
state.sm_hs = false;

View File

@@ -699,6 +699,7 @@ import ProjPowerList from "../../components/drawers/ProjPowerList";
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
// import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1";
import * as apiStu from "../../api/index";
import { message } from "ant-design-vue";
import {
commonData,
@@ -905,23 +906,13 @@ export default {
console.log("err", err);
});
//获取学员列表
let stuobj = {
pageNo: 1,
pageSize: 10,
routerId: router.id,
};
api
.getStudent(stuobj)
.then((res) => {
console.log("获取学员列表", res.data.data.total);
if (res.data.code === 200) {
state.routeStudentsNum = res.data.data.total;
apiStu.projectStudentCount({
pid: router.id,
type:2
}).then((res) => {
state.routeStudentsNum = res.data.data;
state.pubLoading = false;
}
})
.catch((err) => {
console.log("获取学员列表失败", err);
});
};
//确定发布
const releaseLearnPath = () => {

View File

@@ -17,11 +17,12 @@
@click="showCodeModel2()"
/>
<div v-if="action == 1 || action == 0" class="line"></div>-->
<div class ="pubIcon" v-if="action == 1 || action == 0" @click="pubIcon(action)">
<img
class="img2"
src="../../assets/images/leveladd/pub.png"
/>
<div
class="pubIcon"
v-if="action == 1 || action == 0"
@click="pubIcon(action)"
>
<img class="img2" src="../../assets/images/leveladd/pub.png" />
<!-- 已发布的显示 -->
<div class="pub" style="width: 28px">
{{ act }}
@@ -29,7 +30,7 @@
</div>
<div class="line"></div>
<router-link to="/learningpath"
><div style="display: flex; ">
><div style="display: flex">
<img class="img2" src="../../assets/images/leveladd/back.png" />
<div class="return">返回</div>
</div>
@@ -703,7 +704,6 @@
</a-tabs>
</a-tab-pane>
-->
</a-tabs>
<a-modal
@@ -1114,6 +1114,7 @@ import { codeUrl } from "../../api/method";
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
import TableStudent from "@/components/student/TableStudent";
// import * as student from "@/api/student";
import { getStuPage } from "@/api/index1";
export default {
name: "LevelAdd",
components: {
@@ -1680,10 +1681,10 @@ export default {
let stuobj = {
pageNo: 1,
pageSize: 10,
routerId: state.routerId,
pid: state.routerId,
type: 2,
};
api
.getStudent(stuobj)
getStuPage(stuobj)
.then((res) => {
console.log("获取学员列表", res.data.data.total);
if (res.data.code === 200) {
@@ -1701,8 +1702,7 @@ export default {
} else {
showPub();
}
}
};
//显示撤回弹窗
const showBackModal = () => {
state.backModal = true;
@@ -1868,7 +1868,10 @@ export default {
state.nodata = false;
}
let data = res.data.data.chapterList;
state.stage = res.data.data.chapterList.map(e => ({id: e.chapterId, name: e.name}))
state.stage = res.data.data.chapterList.map((e) => ({
id: e.chapterId,
name: e.name,
}));
state.taskSyllabus = data;
// for(let i in data) {
// state.taskSyllabus[i].name = data[i].name
@@ -4262,7 +4265,5 @@ export default {
}
}
}
}
</style>

View File

@@ -357,7 +357,7 @@ export default {
...res.data.data.projectInfo,
...state.projectInfo,
};
state.projectInfo.name = ''
!routers.query.projectId && !!routers.query.parentId && (state.projectInfo.name = '')
state.projectInfo.rangeTime = [
state.projectInfo.beginTime,
state.projectInfo.endTime,

View File

@@ -974,7 +974,7 @@ export default {
return;
} */
const offName = await validateName({
name: state.qdms_inputV1,
name: state.projectInfo.name,
type: 1,
id: state.projectInfo.projectId,
}).then((res) => {
@@ -1047,25 +1047,13 @@ export default {
state.projectTasks = res.data.data.tasks;
});
//获取学员总数
let obj = {
pageNo: 0,
pageSize: 0,
projectId: object.projectId,
};
api
.projectStudent(obj)
.then((res) => {
if (res.data.code === 200) {
// console.log("res", res.data);
state.projectStudentsNum = res.data.data.total
? res.data.data.total
: 0;
api.projectStudentCount({
pid: object.projectId,
type:1
}).then((res) => {
state.projectStudentsNum = res.data.data
state.projectPubLoading = false;
}
})
.catch((err) => {
console.log("获取学员人数失败", err);
});
//获取阶段及任务总数
};
//确认发布项目

View File

@@ -691,7 +691,12 @@
<div class="content3">
<a-tabs v-model:activeKey="activeKey1">
<a-tab-pane key="8" tab="学员管理">
<TableStudent :type="1" :id="projectId" :columns="stuColumns" :stage="stage"></TableStudent>
<TableStudent
:type="1"
:id="projectId"
:columns="stuColumns"
:stage="stage"
></TableStudent>
</a-tab-pane>
</a-tabs>
</div>
@@ -703,7 +708,10 @@
<NoticePub v-model:projectId="projectId"></NoticePub>
</a-tab-pane>
<a-tab-pane key="12" tab="历史公告" force-render>
<NoticeHis v-model:projectId="projectId"></NoticeHis>
<NoticeHis
v-model:projectId="projectId"
:show="activeKeyNotice"
></NoticeHis>
</a-tab-pane>
</a-tabs>
</a-tab-pane>
@@ -1688,7 +1696,7 @@ import ProjectLevel from "@/components/project/ProjectLevel";
import TrainClass from "@/components/project/TrainClass";
import ProjectManager from "@/components/project/ProjectManagerNew";
import TableStudent from "@/components/student/TableStudent";
import { getStuPage } from "@/api/index1";
export default {
name: "taskPage",
components: {
@@ -1714,14 +1722,15 @@ export default {
NoticeHis,
TwoDimensionalCode,
ProjectManager,
TableStudent
TableStudent,
},
setup() {
const store = useStore();
const route = useRoute();
const state = reactive({
stage: [],
stuColumns: [{
stuColumns: [
{
title: "进度",
dataIndex: "progress",
key: "progress",
@@ -1729,15 +1738,21 @@ export default {
align: "center",
className: "h",
ellipsis: true,
customRender: ({ record }) => (
<div>
{record.finishTaskNum}/{record.totalTaskNum}
</div>
),
},
{
title: "最近学习时间",
dataIndex: "stutime",
key: "stutime",
dataIndex: "lastStudyTime",
key: "lastStudyTime",
width: 80,
align: "center",
className: "h",
}],
},
],
loading: false,
projectId: route.query.projectId,
isbj: storage.get("isbj") ? JSON.parse(storage.get("isbj")) : null,
@@ -3341,7 +3356,10 @@ export default {
console.log("get task", res.data.data);
if (res.data.code === 200) {
// 判断当前审核是否通过
if (res.data.data.status == -5 && res.data.data.projectAuditLogDtoList !== null) {
if (
res.data.data.status == -5 &&
res.data.data.projectAuditLogDtoList !== null
) {
console.log("审核信息是什么", res.data.data.projectAuditLogDtoList);
let dataset = res.data.data.projectAuditLogDtoList;
state.passInfo = dataset[dataset.length - 1];
@@ -3356,7 +3374,10 @@ export default {
}
*/
}
state.stage = res.data.data.stageList.map(e => ({id: e.stageId, name: e.name}))
state.stage = res.data.data.stageList.map((e) => ({
id: e.stageId,
name: e.name,
}));
let info = res.data.data.projectInfo;
// let start = toDate(info.beginTime / 1000, "Y-M-D h:m");
let start = info.beginTime;
@@ -3725,10 +3746,10 @@ export default {
let obj = {
pageNo: 0,
pageSize: 0,
projectId: state.projectId,
pid: state.projectId,
type: 1,
};
apiproj
.projectStudent(obj)
getStuPage(obj)
.then((res) => {
if (res.data.code === 200) {
// console.log("res", res.data);
@@ -5627,7 +5648,6 @@ export default {
.group {
display: flex;
.groupleft {
display: flex;
flex-wrap: wrap;

View File

@@ -174,7 +174,11 @@
<!--操作弹窗 -->
</div>
<!-- 加载动画 -->
<div class="aeLoading" :style="{ display: addLoading ? 'flex' : 'none' }">
<div
class="aeLoading"
style="z-index: 100"
:style="{ display: addLoading ? 'flex' : 'none' }"
>
<a-spin :spinning="addLoading" tip="" />
</div>
</template>