Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop

This commit is contained in:
zhangyc
2022-12-07 21:24:30 +08:00
7 changed files with 200 additions and 72 deletions

View File

@@ -1,7 +1,8 @@
import http from "./config"; import http from "./config";
//获取待审核面授课列表 //获取待审核面授课列表
export const list = (obj) => http.post('/admin/offcourse/list', obj) export const list = (obj) => http.post('/admin/offcourse/listToBeReviewed', obj)
// export const list = (obj) => http.post('/admin/offcourse/list', obj)
//获取待审核项目列表 //获取待审核项目列表
export const projlist = (obj) => http.post('/admin/project/list', obj) export const projlist = (obj) => http.post('/admin/project/list', obj)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -2,7 +2,7 @@
<div class="addwrapper"> <div class="addwrapper">
<div class="addhead"> <div class="addhead">
<div class="leftimg"> <div class="leftimg">
<img class="img" src="../../assets/images/projectadd/picture.png" /> <img class="img" :src="projectInfo.picUrl" />
</div> </div>
<div class="imgfor"> <div class="imgfor">
<div class="forz">{{ projectInfo.name || "-" }}</div> <div class="forz">{{ projectInfo.name || "-" }}</div>
@@ -310,9 +310,9 @@
/> />
<div class="btnarea"> <div class="btnarea">
<div>&nbsp;</div> <div>&nbsp;</div>
<div class="area_btn"> <div class="area_btn" @click="addNotice">
<div class="pub"></div> <div class="pub"></div>
<div class="btnText" @click="addNotice">发布</div> <div class="btnText">发布</div>
</div> </div>
</div> </div>
</div> </div>
@@ -497,7 +497,7 @@
<div class="setc_main"> <div class="setc_main">
<img <img
style="width: 151px; height: 84px" style="width: 151px; height: 84px"
:src="picUrl" :src="projectInfo.picUrl"
alt="" alt=""
/> />
</div> </div>
@@ -581,12 +581,12 @@
<div class="box"></div> <div class="box"></div>
<div class="onetitle">上传共享文档</div> <div class="onetitle">上传共享文档</div>
<div class="oneedi"> <div class="oneedi">
<a-switch v-model:checked="docChecked"></a-switch> <a-switch v-model:checked="attachSwitch" @change="checkedClose"></a-switch>
</div> </div>
</div> </div>
<div class="btnbox" style="margin: 20px"> <div class="btnbox" style="margin: 20px">
<a-upload <a-upload
v-if="docChecked == true" v-if="attachSwitch == true"
v-model:file-list="fileList" v-model:file-list="fileList"
name="file" name="file"
action="/manageApi/file/upload" action="/manageApi/file/upload"
@@ -604,7 +604,7 @@
/> />
</a-upload> </a-upload>
<div <div
v-if="docChecked == true" v-if="attachSwitch == true"
class="btnbox" class="btnbox"
style="margin: 20px" style="margin: 20px"
> >
@@ -833,6 +833,8 @@ export default defineComponent({
seven1: null, seven1: null,
seven2: null, seven2: null,
edit: true, edit: true,
fileList:[],
attachSwitch:true,
// 共享文档列表 // 共享文档列表
docList: [ docList: [
{ {
@@ -936,35 +938,35 @@ export default defineComponent({
state.taskSyllabus = []; state.taskSyllabus = [];
console.log(res); console.log(res);
state.projectInfo.name = res.data.data.projectTemplateInfo.name; state.projectInfo.name = res.data.data.projectTemplateInfo.name;
state.projectInfo.beginTime = state.projectInfo.beginTime = res.data.data.projectTemplateInfo.beginTime;
res.data.data.projectTemplateInfo.beginTime;
state.projectInfo.endTime = res.data.data.projectTemplateInfo.endTime; state.projectInfo.endTime = res.data.data.projectTemplateInfo.endTime;
state.projectInfo.manager = res.data.data.projectTemplateInfo.manager; state.projectInfo.manager = res.data.data.projectTemplateInfo.manager;
state.projectInfo.notice = res.data.data.projectTemplateInfo.notice; state.projectInfo.notice = res.data.data.projectTemplateInfo.notice;
state.projectInfo.sourceBelongId = state.projectInfo.sourceBelongId = res.data.data.projectTemplateInfo.sourceBelongId;
res.data.data.projectTemplateInfo.sourceBelongId; state.projectInfo.managerId = res.data.data.projectTemplateInfo.managerId;
state.projectInfo.managerId =
res.data.data.projectTemplateInfo.managerId;
state.projectInfo.remark = res.data.data.projectTemplateInfo.remark; state.projectInfo.remark = res.data.data.projectTemplateInfo.remark;
state.projectInfo.courseSyncFlag = state.projectInfo.courseSyncFlag = res.data.data.projectTemplateInfo.courseSyncFlag;
res.data.data.projectTemplateInfo.courseSyncFlag;
state.projectInfo.level = res.data.data.projectTemplateInfo.level; state.projectInfo.level = res.data.data.projectTemplateInfo.level;
state.projectInfo.systemId = state.projectInfo.systemId = res.data.data.projectTemplateInfo.systemId;
res.data.data.projectTemplateInfo.systemId;
state.projectInfo.boeFlag = res.data.data.projectTemplateInfo.boeFlag; state.projectInfo.boeFlag = res.data.data.projectTemplateInfo.boeFlag;
state.projectInfo.noticeFlag = state.projectInfo.noticeFlag = res.data.data.projectTemplateInfo.noticeFlag;
res.data.data.projectTemplateInfo.noticeFlag;
state.projectInfo.remark = res.data.data.projectTemplateInfo.remark; state.projectInfo.remark = res.data.data.projectTemplateInfo.remark;
state.projectInfo.status = res.data.data.projectTemplateInfo.status; state.projectInfo.status = res.data.data.projectTemplateInfo.status;
state.projectInfo.picUrl = res.data.data.projectTemplateInfo.picUrl; state.projectInfo.picUrl = res.data.data.projectTemplateInfo.picUrl;
state.picUrl = res.data.data.projectTemplateInfo.picUrl;
state.projectInfo.attach = res.data.data.projectTemplateInfo.attach; state.projectInfo.attach = res.data.data.projectTemplateInfo.attach;
state.projectInfo.category = state.projectInfo.category = res.data.data.projectTemplateInfo.category;
res.data.data.projectTemplateInfo.category; try{
state.fileList = JSON.parse(res.data.data.projectTemplateInfo.attach);
}catch{
state.fileList = [];
}
state.attachSwitch = res.data.data.projectTemplateInfo.attachSwitch == 1 ? true : false
let data = res.data.data.stageList; let data = res.data.data.stageList;
console.log("data=====", data); console.log("data=====", data);
for (let i in data) { for (let i in data) {
console.log("what ------ > ", i, data); console.log("what ------ > ", i, data);
state.taskSyllabus.push({ text: data[i].name, children: [] }); state.taskSyllabus.push({ text: data[i].name?data[i].name:'无阶段任务', children: [] });
for (let j in data[i].taskList) { for (let j in data[i].taskList) {
state.taskSyllabus[i].children.push({ state.taskSyllabus[i].children.push({
course: checkType(data[i].taskList[j].type), course: checkType(data[i].taskList[j].type),
@@ -991,8 +993,6 @@ export default defineComponent({
name: state.projectInfo.name, name: state.projectInfo.name,
category: state.projectInfo.category, category: state.projectInfo.category,
picUrl: state.projectInfo.picUrl, picUrl: state.projectInfo.picUrl,
beginTime: new Date(state.projectInfo.beginTime).getTime(),
endTime: new Date(state.projectInfo.endTime).getTime(),
manager: state.projectInfo.manager, manager: state.projectInfo.manager,
managerId: state.projectInfo.managerId || 0, managerId: state.projectInfo.managerId || 0,
sourceBelongId: state.projectInfo.sourceBelongId, sourceBelongId: state.projectInfo.sourceBelongId,
@@ -1139,8 +1139,6 @@ export default defineComponent({
name: state.projectInfo.name, name: state.projectInfo.name,
category: state.projectInfo.category, category: state.projectInfo.category,
picUrl: state.projectInfo.picUrl, picUrl: state.projectInfo.picUrl,
beginTime: new Date(state.projectInfo.beginTime).getTime() / 1000,
endTime: new Date(state.projectInfo.endTime).getTime() / 1000,
manager: state.projectInfo.manager, manager: state.projectInfo.manager,
managerId: state.projectInfo.managerId || 0, managerId: state.projectInfo.managerId || 0,
sourceBelongId: state.projectInfo.sourceBelongId, sourceBelongId: state.projectInfo.sourceBelongId,
@@ -1150,7 +1148,7 @@ export default defineComponent({
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0, courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
notice: state.projectInfo.notice, notice: state.projectInfo.notice,
noticeFlag: state.projectInfo.noticeFlag, noticeFlag: state.projectInfo.noticeFlag,
projectTemplateId: Number(localStorage.getItem("projectTemplateId")), projectTemplateId: localStorage.getItem("projectTemplateId"),
remark: state.projectInfo.remark, remark: state.projectInfo.remark,
status: state.projectInfo.status, status: state.projectInfo.status,
attach: str, attach: str,
@@ -1189,6 +1187,27 @@ export default defineComponent({
message.error(`${file.name} 文件上传失败.`); message.error(`${file.name} 文件上传失败.`);
} }
}; };
// 设置上传图片开关
const checkedClose = (data, a) => {
console.log(data, a);
state.attachSwitch = data;
// 更新开关状态
api
.templateEdit({
sourceBelongId: state.projectInfo.sourceBelongId,
projectTemplateId: localStorage.getItem("projectTemplateId"),
attachSwitch: state.attachSwitch?1:-1
})
.then((res) => {
console.log("开关更新成功", res);
})
.catch((err) => {
console.log("开关更新失败", err);
});
};
//设置积分规则 //设置积分规则
const editRule = () => { const editRule = () => {
let obj = { let obj = {
@@ -1269,6 +1288,7 @@ export default defineComponent({
editRule, editRule,
handleChange2, handleChange2,
scoresum, scoresum,
checkedClose
}; };
}, },
}); });

View File

@@ -17,31 +17,33 @@
@click="showCodeModel2()" @click="showCodeModel2()"
/> />
<div class="line" v-if="action == 1 || action == 0"></div> <div class="line" v-if="action == 1 || action == 0"></div>
<!-- 显示发布图标 -->
<img <img
v-if="action == 1 || action == 0" v-if="action == 2"
class="img2" class="img2"
src="../../assets/images/leveladd/pub.png" src="../../assets/images/leveladd/pub.png"
/> />
<!-- <div class="pub">发布</div> --> <!-- 显示撤回发布图标 -->
<!-- 已发布的显示 --> <img
<div v-if="action == 3"
class="pub" class="img2"
style="width: 28px" src="../../assets/images/leveladd/pub.png"
/>
<!-- 显示审核图标 -->
<img
v-if="action == 0"
class="img2"
src="../../assets/images/project/reviewsubmit.png"
/>
<!-- 显示撤回审核图标 -->
<img
v-if="action == 1" v-if="action == 1"
@click="showBackModal" class="img2"
> src="../../assets/images/project/reviewrecall.png"
{{ act }} />
</div> <!-- <div class="pub">发布</div> -->
<!-- 未发布/草稿的显示 -->
<div
class="pub"
style="width: 28px"
v-if="action == 2"
@click="showProjectPub"
>
{{ act }}
</div>
<!-- 显示提交审核 -->
<div <div
class="pub" class="pub"
style="width: 56px" style="width: 56px"
@@ -50,6 +52,34 @@
> >
{{ act }} {{ act }}
</div> </div>
<!-- 显示撤回审核 -->
<div
class="pub"
style="width: 56px"
v-if="action == 1"
@click="showRecallReviewModal"
>
{{ act }}
</div>
<!-- 显示发布 -->
<div
class="pub"
style="width: 28px"
v-if="action == 2"
@click="showProjectPub"
>
{{ act }}
</div>
<!-- 显示撤回发布 -->
<div
class="pub"
style="width: 56px"
v-if="action == 3"
@click="showBackModal"
>
{{ act }}
</div>
<!-- 项目提交审核弹窗 --> <!-- 项目提交审核弹窗 -->
<a-modal <a-modal
v-model:visible="reviewModal" v-model:visible="reviewModal"
@@ -74,7 +104,7 @@
<div class="del_btn btn1" @click="closeReviewModal"> <div class="del_btn btn1" @click="closeReviewModal">
<div class="btnText">取消</div> <div class="btnText">取消</div>
</div> </div>
<div class="del_btn btn2" @click="recallReviewProject"> <div class="del_btn btn2" @click="submitReviewProject">
<div class="btnText">确定</div> <div class="btnText">确定</div>
</div> </div>
</div> </div>
@@ -1725,7 +1755,37 @@
</div> </div>
</div> </div>
</a-modal> </a-modal>
<!-- 项目撤回审核弹窗 -->
<a-modal
v-model:visible="recallReviewModal"
:footer="null"
:closable="false"
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="closeRecallReviewModal"></div>
</div>
<div class="body">
<span>您确定要撤回审核吗</span>
<div class="back"></div>
</div>
<div class="del_btnbox">
<div class="del_btn btn1" @click="closeRecallReviewModal">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2" @click="recallReviewProject">
<div class="btnText">确定</div>
</div>
</div>
</div>
</div>
</a-modal>
<!-- 结束项目弹窗 --> <!-- 结束项目弹窗 -->
<a-modal <a-modal
v-model:visible="stopModal" v-model:visible="stopModal"
@@ -2028,6 +2088,7 @@ export default {
releaseProjectName: null, //发布的项目名称 releaseProjectName: null, //发布的项目名称
releaseProjectTime: null, //发布的项目时间 releaseProjectTime: null, //发布的项目时间
backModal: false, //撤回弹窗 backModal: false, //撤回弹窗
recallReviewModal: false, //撤回审核
closeBack: false, closeBack: false,
stopModal: false, stopModal: false,
closeStop: false, closeStop: false,
@@ -2873,7 +2934,7 @@ export default {
state.reviewModal = true; state.reviewModal = true;
}; };
const recallReviewProject = () => { const submitReviewProject = () => {
let obj = { let obj = {
projectId: state.projectId, projectId: state.projectId,
type: 3, type: 3,
@@ -2887,6 +2948,8 @@ export default {
message.success("提交成功"); message.success("提交成功");
state.reviewModal = false; state.reviewModal = false;
getTaskInfo(); getTaskInfo();
// getTask();
reget();
}) })
.catch((err) => { .catch((err) => {
console.log("提交失败", err); console.log("提交失败", err);
@@ -3802,6 +3865,7 @@ export default {
getTask({ getTask({
projectId: state.projectId, projectId: state.projectId,
}).then((res) => { }).then((res) => {
console.log("获取项目状态", res);
state.action = res.data.data.projectInfo.status; state.action = res.data.data.projectInfo.status;
state.act = state.act =
state.action == 2 state.action == 2
@@ -3809,7 +3873,9 @@ export default {
: state.action == 0 : state.action == 0
? "提交审核" ? "提交审核"
: state.action == 1 : state.action == 1
? "撤回" ? "撤回审核"
: state.action == 3
? "撤回发布"
: state.action == -1 : state.action == -1
? "" ? ""
: "-"; : "-";
@@ -3852,9 +3918,10 @@ export default {
console.log("点击发布"); console.log("点击发布");
let obj = { let obj = {
projectId: state.releaseProjectId, projectId: state.releaseProjectId,
type: 4,
}; };
apiproj apiproj
.releaseProject(obj) .handleProject(obj)
.then((res) => { .then((res) => {
console.log("发布成功", res); console.log("发布成功", res);
message.destroy(); message.destroy();
@@ -3878,7 +3945,7 @@ export default {
const recallProject = () => { const recallProject = () => {
let obj = { let obj = {
projectId: state.projectId, projectId: state.projectId,
type: 0, type: -4,
}; };
apiproj apiproj
.handleProject(obj) .handleProject(obj)
@@ -3893,6 +3960,36 @@ export default {
console.log("撤回失败", err); console.log("撤回失败", err);
}); });
}; };
//打开撤回审核弹窗
const showRecallReviewModal = () => {
state.recallReviewModal = true;
};
//确认撤回审核
const recallReviewProject = () => {
let obj = {
projectId: state.projectId,
type: -3,
};
console.log("撤回成功obj", obj);
apiproj
.handleProject(obj)
.then((res) => {
console.log("撤回成功", res);
message.destroy();
message.success("撤回成功");
state.recallReviewModal = false;
reget();
})
.catch((err) => {
console.log("撤回成功", err);
});
};
//关闭提交审核弹窗
const closeRecallReviewModal = () => {
state.recallReviewModal = false;
};
//关闭结束弹窗 //关闭结束弹窗
const closeStopModal = () => { const closeStopModal = () => {
state.stopModal = false; state.stopModal = false;
@@ -4162,7 +4259,10 @@ export default {
checkedClose, checkedClose,
submitExamine, submitExamine,
closeReviewModal, closeReviewModal,
showRecallReviewModal,
recallReviewProject, recallReviewProject,
closeRecallReviewModal,
submitReviewProject,
showCodeModel, showCodeModel,
showCodeModel2, showCodeModel2,
checkType, checkType,

View File

@@ -148,7 +148,7 @@
<!-- <img class="img2" src="../../assets/images/projectadd/keep.png" /> <!-- <img class="img2" src="../../assets/images/projectadd/keep.png" />
<div class="pub">保存</div> <div class="pub">保存</div>
<div class="line"></div> --> <div class="line"></div> -->
<router-link to="/taskpage"> <router-link to="/libraryAdd">
<div style="display: flex"> <div style="display: flex">
<img <img
class="img2" class="img2"
@@ -1388,7 +1388,13 @@ export default {
}; };
array.push(obj); array.push(obj);
}); });
console.log(array)
if(array[0].id=='0'){
state.level = [];
}else{
state.level = array; state.level = array;
}
}; };
const tableDataFunc = () => { const tableDataFunc = () => {
@@ -1525,11 +1531,12 @@ export default {
api api
.templateDetail(localStorage.getItem("projectTemplateId")) .templateDetail(localStorage.getItem("projectTemplateId"))
.then((res) => { .then((res) => {
console.log('获取的任务列表信息',res)
if (res.status == 200) { if (res.status == 200) {
console.log("22222", res.data.data.stageList); console.log("22222", res.data.data.stageList);
state.projectTitle = res.data.data.projectTemplateInfo.name; state.projectTitle = res.data.data.projectTemplateInfo.name;
state.picUrl = res.data.data.projectTemplateInfo.picUrl; state.picUrl = res.data.data.projectTemplateInfo.picUrl;
let leng = res.data.data.stageList.length; let leng = res.data.data.stageList[0].name!==null ?res.data.data.stageList.length:0;
if (leng > 0) { if (leng > 0) {
let stage = localStorage.getItem("templateStageId") let stage = localStorage.getItem("templateStageId")
? localStorage.getItem("templateStageId") ? localStorage.getItem("templateStageId")