Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/views/courselibrary/CoursewareManage.vue
This commit is contained in:
yuping
2022-12-08 00:41:13 +08:00
23 changed files with 10721 additions and 761 deletions

View File

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

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-12-07 08:54:55
* @LastEditTime: 2022-12-07 13:41:47
* @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/

View File

@@ -1,7 +1,8 @@
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)

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

@@ -78,7 +78,7 @@
</a-drawer>
</template>
<script>
import { reactive, toRefs } from "vue";
import { reactive, toRefs, ref } from "vue";
// import { useRouter } from "vue-router";
import EvList from "./EvList.vue";
import * as api from "../../api/indexEval";
@@ -252,7 +252,15 @@ export default {
console.log(err, "erererrerererererer");
});
}
// 防止连续点击出现添加多条问题
const prohibitClick = ref(false);
const creoredit = () => {
if(prohibitClick.value){
message.destroy();
message.error('请勿频繁点击')
return
}
prohibitClick.value = true;
if (props.edit) {
editInvistText()
} else {
@@ -289,10 +297,12 @@ export default {
ctx.emit("changeData", false);
message.destroy();
message.success("创建测评成功");
prohibitClick.value = false;
})
.catch(() => {
message.destroy();
message.error("创建测评失败");
prohibitClick.value = false;
});
}
//创建测评信息
@@ -326,10 +336,12 @@ export default {
ctx.emit("changeData", false);
message.destroy();
message.success("创建测评成功");
prohibitClick.value = false;
})
.catch(() => {
message.destroy();
message.error("创建测评失败");
prohibitClick.value = false;
});
};

View File

@@ -255,9 +255,10 @@ export default {
};
const resetForm = () => {
//formRef.value.resetFields();
// formRef.value.resetFields();
formState.workName = ''
formState.workRequirement = ''
formState.choosedTime = []
};
const handleValidate = (...args) => {
@@ -299,14 +300,28 @@ export default {
resetForm();
};
const closeDrawer2 = () => {
ctx.emit("update:edit", false);
formState.choosedTime = "";
ctx.emit("update:addhomeworkVisible", false);
ctx.emit("update:edit", false);
ctx.emit("update:EditWorkId", state.EditWorkId);
ctx.emit("update:workName", formState.workName);
console.log("state.EditWorkId==============", state.workName);
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
fileList.value = [];
state.workEnclosureAddress = "";
resetForm();
};
// 重置表单选项
const afterVisibleChange = () => {
console.log('11223344', props.EditWorkId)
if (props.EditWorkId > 0) {
state.EditWorkId = props.EditWorkId;
queryWork();
}else{
formRef.value.resetFields();
resetForm();
}
};

View File

@@ -21,24 +21,24 @@
<div class="main_items">
<div class="mi_ipts">
<div class="mii_ipt">
<div class="ipt_name">课程编号</div>
<div class="ipt_name">课程名称</div>
<div class="fi_input">
<a-input
v-model:value="inputV1"
style="width: 240px; height: 40px; border-radius: 8px"
placeholder="请输入项目名称"
placeholder="请输入课程名称"
maxlength="20"
/>
</div>
</div>
<div class="mii_ipt">
<div class="ipt_name">内容分类</div>
<div class="ipt_name">课程分类</div>
<div class="select">
<a-select
v-model:value="selectV"
dropdownClassName="dropdown-style"
style="width: 240px"
placeholder="请选择"
placeholder="请选择课程分类"
:options="options1"
allowClear
showSearch
@@ -209,7 +209,7 @@ export default {
},
setup(props, ctx) {
const state = reactive({
inputV1: "",
inputV1: null,
options1: [
{
value: "微课",
@@ -223,7 +223,7 @@ export default {
time: undefined,
onlineClassesId: null,
onlineName: "",
selectV: "",
selectV: null,
selectedRowKeys: [],
tableData: [],
addOnlineList: [],
@@ -239,7 +239,8 @@ export default {
state.choicecourse = true;
ctx.emit("update:addonlineVisible", false);
ctx.emit("update:edit", false);
state.inputV1 = "";
state.inputV1 = null;
state.selectV = null;
state.selectedRowKeys = [];
state.addOnlineList = [];
state.currentPage = 1;
@@ -258,7 +259,7 @@ export default {
dataIndex: "num",
key: "num",
width: "80px",
align: "left",
align: "center",
},
{
title: "名称",
@@ -266,9 +267,10 @@ export default {
key: "name",
width: "100px",
align: "center",
ellipsis: true,
},
{
title: "内容分类",
title: "课程分类",
dataIndex: "contenttype",
key: "contenttype",
width: "80px",
@@ -539,17 +541,13 @@ export default {
})
.then(() => {
message.destroy();
message.success(
`${props.edit ? "编辑" : "新增"}任务成功`
);
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
ctx.emit("changeData", false);
closeDrawer();
})
.catch(() => {
message.destroy();
message.error(
`${props.edit ? "编辑" : "新增"}任务失败`
);
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
});
});
}
@@ -583,7 +581,7 @@ export default {
};
//搜索在线列表
const searchList = () => {
if (state.inputV1 !== "" || state.selectV !== "") {
if (state.inputV1 || state.selectV) {
getAllOnlineText();
} else {
resetOnline();
@@ -591,8 +589,8 @@ export default {
};
//重置在线信息
const resetOnline = () => {
state.inputV1 = "";
state.selectV = "";
state.inputV1 = null;
state.selectV = null;
state.selectedRowKeys = [];
state.addOnlineList = [];
state.currentPage = 1;
@@ -763,6 +761,7 @@ export default {
}
.ant-table-selection-column {
padding: 0px !important;
padding-left: 5px !important;
}
.ant-table-thead > tr > th {
background-color: rgba(239, 244, 252, 1);

View File

@@ -580,6 +580,7 @@ export default {
// state.addLoading = true;
queryExaminationDetailById({ examinationId: props.EditTestId })
.then((res) => {
console.log("获取编辑考试信息", res);
formState.examinationName = res.data.data.examinationName;
formState.workRequirement = res.data.data.workRequirement;
formState.examinationDuration = res.data.data.examinationDuration;
@@ -594,6 +595,9 @@ export default {
formState.showAnswers = Number(res.data.data.showAnswers) || 1;
formState.papaerName = res.data.data.examinationTestName;
state.paperName = res.data.data.examinationTestName;
// state.paperId=
state.paperId = res.data.data.examinationTestId;
state.paperName = res.data.data.examinationTestName;
if (
res.data.data.examinationEndTime &&
res.data.data.examinationStartTime
@@ -658,7 +662,7 @@ export default {
updateExamination(obj)
.then(async (res) => {
await updateTask(res);
closeDrawer();
// closeDrawer();
})
.catch(() => {
message.destroy();
@@ -669,7 +673,7 @@ export default {
createExamination(obj)
.then(async (res) => {
await updateTask(res);
closeDrawer();
// closeDrawer();
})
.catch(() => {
message.destroy();
@@ -694,7 +698,8 @@ export default {
};
RouterEditTask(editObj1)
.then(() => {
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
console.log("props.edit", props.edit);
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
ctx.emit("changeData", false);
state.addLoading = false;
closeDrawer();
@@ -715,8 +720,9 @@ export default {
// 新增编辑或新增项目
ProjectEditTask(editObj)
.then(() => {
//message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
ctx.emit("changeData", false);
closeDrawer();
})
.catch(() => {
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
@@ -732,8 +738,9 @@ export default {
type: 5,
})
.then(() => {
//message.success( `${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
ctx.emit("changeData", false);
closeDrawer();
})
.catch(() => {
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);

View File

@@ -48,7 +48,10 @@
:data-source="tableData"
:loading="tableDataTotal === -1 ? true : false"
:pagination="false"
:row-selection="{ selectedRowKeys:selectedRowKeys,onChange:onSelectChange}"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
/>
<div class="pa">
<a-pagination
@@ -74,8 +77,8 @@
</template>
<script>
import { reactive, toRefs } from "vue";
import * as api from "../../api/indexEval";
export default {
import * as api from "../../api/indexEval";
export default {
name: "EvList",
props: {
EvalListVisible: {
@@ -86,7 +89,7 @@ import { reactive, toRefs } from "vue";
type: Number,
default: null,
},
evaluationTypeName:{
evaluationTypeName: {
type: String,
default: "",
},
@@ -96,13 +99,13 @@ import { reactive, toRefs } from "vue";
currentPage: 1,
tableDataTotal: 0,
pageSize: 10,
inputV1:"",
evaluationTypeId:null,
evaluationTypeName:"",
inputV1: "",
evaluationTypeId: null,
evaluationTypeName: "",
tableData: [],
selectedRowKeys:[],
evListData:{},
columns:[
selectedRowKeys: [],
evListData: {},
columns: [
{
title: "课程编号",
width: "20%",
@@ -124,9 +127,9 @@ import { reactive, toRefs } from "vue";
key: "content",
align: "center",
maxWidth: "13%",
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
overflow: "hidden",
whiteSpace: "nowrap",
textOverflow: "ellipsis",
},
{
title: "状态",
@@ -149,30 +152,30 @@ import { reactive, toRefs } from "vue";
key: "time",
align: "center",
},
]
],
});
const onSelectChange = (selectedRowKeys,selectedRows)=> {
if(selectedRowKeys.length>1){
return
}
state.selectedRowKeys = selectedRowKeys
state.evListData = selectedRows[0] ? selectedRows[0] : {}
const onSelectChange = (selectedRowKeys, selectedRows) => {
if (selectedRowKeys.length > 1) {
return;
}
state.selectedRowKeys = selectedRowKeys;
state.evListData = selectedRows[0] ? selectedRows[0] : {};
};
const closeDrawer = () => {
state.selectedRowKeys = []
state.evListData = {}
state.inputV1 = ""
state.selectedRowKeys = [];
state.evListData = {};
state.inputV1 = "";
ctx.emit("update:EvalListVisible", false);
};
const afterVisibleChange = (bol) => {
if ( bol == true ) {
if (bol == true) {
getAllEvalText();
}
};
const checkFinish =() =>{
const checkFinish = () => {
ctx.emit("getEvListData", state.evListData);
closeDrawer();
}
};
const changePagination = (page) => {
state.currentPage = page;
getAllEvalText();
@@ -182,37 +185,36 @@ import { reactive, toRefs } from "vue";
let data = tableData;
let array = [];
let arrayKey = [];
if(props.evaluationTypeName != ""){
data.map((value,index) => {
if (props.evaluationTypeName != "") {
data.map((value, index) => {
let obj = {
key:index+1,
status:value.status,
quiz_code:value.quiz_code,
quiz_kid:value.quiz_kid,
title:value.title,
theme_desc:value.theme_desc,
quiz_price:value.quiz_price,
quiz_range:value.quiz_range,
key: index + 1,
status: value.status,
quiz_code: value.quiz_code,
quiz_kid: value.quiz_kid,
title: value.title,
theme_desc: value.theme_desc,
quiz_price: value.quiz_price,
quiz_range: value.quiz_range,
};
array.push(obj)
if(obj.title == props.evaluationTypeName){
array.push(obj);
if (obj.title == props.evaluationTypeName) {
arrayKey.push(obj.key);
}
});
state.tableData = array;
state.selectedRowKeys = arrayKey;
}
else{
data.map((value,index) => {
} else {
data.map((value, index) => {
let obj = {
key:index+1,
status:value.status,
quiz_code:value.quiz_code,
quiz_kid:value.quiz_kid,
title:value.title,
theme_desc:value.theme_desc,
quiz_price:value.quiz_price,
quiz_range:value.quiz_range,
key: index + 1,
status: value.status,
quiz_code: value.quiz_code,
quiz_kid: value.quiz_kid,
title: value.title,
theme_desc: value.theme_desc,
quiz_price: value.quiz_price,
quiz_range: value.quiz_range,
};
array.push(obj);
});
@@ -221,34 +223,33 @@ import { reactive, toRefs } from "vue";
};
//获取测评列表
const getAllEvalText = ()=> {
const getAllEvalText = () => {
let objael = {
"keyword": state.inputV1,
"user_id": "965341999643234304",
}
keyword: state.inputV1,
user_id: "965341999643234304",
};
api
.choiceEvaluation(objael)
.then((res) => {
getTableDataList(res.data.data)
getTableDataList(res.data.data);
})
.catch(()=>{
})
}
.catch(() => {});
};
//搜索测评列表
const searchList = ()=> {
if(state.inputV1 !== ''){
getAllEvalText()
}else {
resetData()
}
const searchList = () => {
if (state.inputV1 !== "") {
getAllEvalText();
} else {
resetData();
}
};
//重置测评列表
const resetData = ()=> {
const resetData = () => {
state.currentPage = 1;
state.selectedRowKeys = [];
state.evListData = {}
state.evListData = {};
getAllEvalText();
}
};
return {
...toRefs(state),
afterVisibleChange,
@@ -261,13 +262,13 @@ import { reactive, toRefs } from "vue";
resetData,
};
},
};
};
</script>
<style lang="scss">
.ant-table-striped :deep(.table-striped) td {
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
.addonlineDrawer {
}
.addonlineDrawer {
.drawerMain {
.header {
height: 73px;
@@ -406,7 +407,7 @@ import { reactive, toRefs } from "vue";
}
.ant-table-selection-column {
padding: 0px !important;
padding-left: 60px !important;
padding-left: 5px !important;
}
.ant-table-thead > tr > th {
background-color: rgba(239, 244, 252, 1);
@@ -461,5 +462,5 @@ import { reactive, toRefs } from "vue";
}
}
}
}
</style>
}
</style>

View File

@@ -11,11 +11,11 @@
</span>
</div>
<template v-if="noticeChecked">
<p>公告内容</p>
<p>当前公告内容</p>
<!-- 预览 -->
<template v-if="!editOn">
<div class="txt-content">
{{ noticeContent ? noticeContent : "暂无公告" }}
{{ noticeContent1 ? noticeContent1 : "暂无公告" }}
</div>
<div class="btn-content">
<a-button type="primary" @click="handleEdit">编辑</a-button>
@@ -23,13 +23,12 @@
</template>
<!-- 编辑 -->
<template v-if="editOn">
<div class="txt-contain">
<span>预览</span>
<div class="txt-content">
{{ noticeContent }}
{{ noticeContent1 ? noticeContent1 : "暂无公告" }}
</div>
</div>
<p>编辑</p>
<p>编辑新公告</p>
<a-textarea
v-model:value="noticeContent"
:maxlength="150"
@@ -65,14 +64,15 @@ export default {
const state = reactive({
noticeChecked: true,
projectInfo: {},
noticeContent1: "",
noticeContent: "",
editOn: false,
});
const getTaskInfo = () => {
getTask({ projectId: props.projectId }).then((res) => {
console.log("公告获取项目", res.data.data.projectInfo);
state.projectInfo = res.data.data.projectInfo;
state.noticeContent1 = state.projectInfo.notice;
state.noticeContent = state.projectInfo.notice;
});
};
@@ -104,7 +104,7 @@ export default {
if (res.data.code === 200) {
message.destroy();
message.success("发布成功", res);
state.noticeContent = res.data.data.notice;
state.noticeContent1 = res.data.data.notice==""?"暂无公告":res.data.data.notice;
handleCancel();
emitter.emit("setNotice", false);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -319,6 +319,7 @@
'background-image': 'url(' + item.dictValue + ')',
display: index >= 5 ? 'none' : 'flex',
}"
style="background-size: 100% 100%"
>
<!-- <img class="im" :src="item.source" /> -->
</div>
@@ -857,8 +858,8 @@ export default {
api
.getLearnCount(router.id)
.then((res) => {
console.log("获取关卡、任务、学员统计数据", res.data);
if (res.status === 200) {
// console.log("获取关卡、任务、学员统计数据", res.data);
state.routeStudentsNum = res.data.students;
state.routeChapters = res.data.chapters;
state.routeTasks = res.data.tasks;
@@ -1045,18 +1046,14 @@ export default {
? "已结束"
: "-",
creater: value.createName ? value.createName : "-",
pubtime: value.publishTime
? value.publishTime
: "-",
cretime: value.createTime
? value.createTime
: "-",
pubtime: value.publishTime ? value.publishTime : "-",
cretime: value.createTime ? value.createTime : "-",
remark: value.remark ? value.remark : "-",
};
array.push(obj);
});
state.tableData = array;
console.log(array,tableData)
console.log(array, tableData);
};
const tableDataFunc = () => {

View File

@@ -455,7 +455,9 @@
<div class="iconame">
{{ checkType(item.type) }}
</div>
<div class="icontext">{{ item.name }}</div>
<div class="icontext" :title="item.name">
{{ item.name }}
</div>
</div>
</div>
<div class="type">
@@ -466,7 +468,7 @@
<div class="time">
<div class="timetext">开始时间</div>
<div class="timetext">
{{ item.startTime !== null ? item.startTime : "" }}
{{ item.startTime !== null ? item.startTime : "-" }}
</div>
</div>
<div class="progress">
@@ -692,63 +694,78 @@
</div>
<div class="onemain clearfix">
<div class="checkcon">
<input
<a-checkbox
class="in"
:disabled="number"
v-model:checked="previewSelect"
></a-checkbox>
<!-- <input
type="checkbox"
name="cb1"
value="yulan"
v-model: ="previewSelect"
class="in"
/>
:disabled="number"
/> -->
<span class="yulan">预览其他关卡</span><br />
<div style="width: 10px; height: 4px"></div>
<div style="display: flex; align-items: center">
<span class="yulan2">学员可预览第</span>
<span style="color: #4ea6ff" v-show="number">1</span>
<span style="color: #4ea6ff" v-show="number">{{
previewStartNum
}}</span>
<a-input-number
v-model:value="nubvalue"
v-model:value="previewStartNum"
v-show="inputbox"
:controls="false"
:autofocus="true"
:min="1"
:min="0"
/>
<span>-</span
><span style="color: #4ea6ff" v-show="number">4</span>
><span style="color: #4ea6ff" v-show="number">{{
previewEndNum
}}</span>
<a-input-number
v-model:value="nubvalue1"
v-model:value="previewEndNum"
v-show="inputbox"
:controls="false"
:autofocus="true"
:min="1"
:min="0"
/>
<span>关内容</span>
</div>
</div>
<div class="checkcon" style="margin-top: 20px">
<input
<!-- <input
type="checkbox"
name="cb1"
value="xuexi"
v-model:value="studySelect"
class="in"
/>
:disabled="number"
/> -->
<span class="yulan">学习其他关卡</span><br />
<div style="width: 10px; height: 4px"></div>
<div style="display: flex; align-items: center">
<span class="yulan2">学员可预览</span>
<span style="color: #4ea6ff" v-show="number">1</span>
<span class="yulan2">学员可学习</span>
<span style="color: #4ea6ff" v-show="number">{{
studyStartNum
}}</span>
<a-input-number
v-model:value="nubvalue2"
v-model:value="studyStartNum"
v-show="inputbox"
:controls="false"
:autofocus="true"
:min="1"
:min="0"
/>
<span>-</span
><span style="color: #4ea6ff" v-show="number">4</span>
><span style="color: #4ea6ff" v-show="number">{{
studyEndNum
}}</span>
<a-input-number
v-model:value="nubvalue3"
v-model:value="studyEndNum"
v-show="inputbox"
:controls="false"
:autofocus="true"
:min="1"
:min="0"
/>
<span>关内容</span>
</div>
@@ -1459,6 +1476,11 @@ export default {
name: "关卡二xx",
},
],
previewStartNum: 0,
previewEndNum: 0,
studyStartNum: 0,
studyEndNum: 0,
});
const tableDataFunc = () => {
@@ -3738,7 +3760,7 @@ export default {
//height: 71px;
margin-left: 12px;
margin-right: 50px;
width: 120px;
.iconame {
//position: absolute;
color: #4f5156;
@@ -3751,7 +3773,10 @@ export default {
color: #999ba3;
font-size: 14px;
margin-left: 12px;
width: 83px;
width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
@@ -3787,7 +3812,7 @@ export default {
//height: 71px;
flex-grow: 1;
margin-right: 50px;
width: 100px;
.timetext {
font-size: 14px;
color: #999ba3;

View File

@@ -168,6 +168,15 @@
</div>
</div>
</div>
<div
class="aeLoading"
:style="{ display: addLoading ? 'flex' : 'none' }"
>
<a-spin
:spinning="addLoading"
:tip="updateChapterID ? '修改中...' : '添加中...'"
/>
</div>
</a-modal>
<div class="right" :style="{ display: gqxy_hs ? 'block' : 'none' }">
<div class="addhead">
@@ -1202,6 +1211,8 @@ export default {
curLevel: null, //选择移动到的关卡名称
deleteType: null, //批量删除学员/任务 1任务 2学员
addLoading: false, //添加编辑关卡动画
});
const showModal = (element) => {
@@ -1223,6 +1234,7 @@ export default {
//新建关卡
const editChapter = () => {
if (!state.value1) return message.warning("请输入关卡名称");
state.addLoading = true;
if (state.updateChapterID) {
let obj = {
name: state.value1,
@@ -1235,6 +1247,7 @@ export default {
.then((res) => {
console.log("修改成功", res);
message.success("修改成功");
state.addLoading = false;
getDetail();
closeModal();
})
@@ -1262,6 +1275,7 @@ export default {
// state.createLoading = false;
//state.currentPage = 1;
// getLearnPath();
state.addLoading = false;
getDetail();
closeModal();
})
@@ -1421,7 +1435,7 @@ export default {
//给level赋初始值
state.level = res.data.data.chapterList;
state.styTitle = res.data.data.routerInfo.name;
state.creTime = res.data.data.routerInfo.createTime ;
state.creTime = res.data.data.routerInfo.createTime;
state.picUrl = res.data.data.routerInfo.picUrl;
//增加两个字段
state.level.forEach((item) => {

View File

@@ -2,7 +2,7 @@
<div class="addwrapper">
<div class="addhead">
<div class="leftimg">
<img class="img" src="../../assets/images/projectadd/picture.png" />
<img class="img" :src="projectInfo.picUrl" />
</div>
<div class="imgfor">
<div class="forz">{{ projectInfo.name || "-" }}</div>
@@ -151,17 +151,16 @@
</div>
</div>
<div class="type">
<div
:class="
item.classify == '必修' ? 'typename1' : 'typename'
"
>
{{ item.classify }}
<div :class="item.classify ? 'typename1' : 'typename'">
<span v-if="item.classify">必修</span>
<span v-else>选修</span>
</div>
</div>
<div class="time">
<div class="timetext">开始时间</div>
<div class="timetext">{{ item.beginTime }}</div>
<div class="timetext">
{{ item.beginTime ? item.beginTime : "-" }}
</div>
</div>
<div class="progress">
<div class="progresstext">
@@ -311,9 +310,9 @@
/>
<div class="btnarea">
<div>&nbsp;</div>
<div class="area_btn">
<div class="area_btn" @click="addNotice">
<div class="pub"></div>
<div class="btnText" @click="addNotice">发布</div>
<div class="btnText">发布</div>
</div>
</div>
</div>
@@ -498,7 +497,7 @@
<div class="setc_main">
<img
style="width: 151px; height: 84px"
:src="picUrl"
:src="projectInfo.picUrl"
alt=""
/>
</div>
@@ -582,12 +581,12 @@
<div class="box"></div>
<div class="onetitle">上传共享文档</div>
<div class="oneedi">
<a-switch v-model:checked="docChecked"></a-switch>
<a-switch v-model:checked="attachSwitch" @change="checkedClose"></a-switch>
</div>
</div>
<div class="btnbox" style="margin: 20px">
<a-upload
v-if="docChecked == true"
v-if="attachSwitch == true"
v-model:file-list="fileList"
name="file"
action="/manageApi/file/upload"
@@ -605,7 +604,7 @@
/>
</a-upload>
<div
v-if="docChecked == true"
v-if="attachSwitch == true"
class="btnbox"
style="margin: 20px"
>
@@ -834,6 +833,8 @@ export default defineComponent({
seven1: null,
seven2: null,
edit: true,
fileList:[],
attachSwitch:true,
// 共享文档列表
docList: [
{
@@ -937,34 +938,35 @@ export default defineComponent({
state.taskSyllabus = [];
console.log(res);
state.projectInfo.name = res.data.data.projectTemplateInfo.name;
state.projectInfo.beginTime =
res.data.data.projectTemplateInfo.beginTime;
state.projectInfo.beginTime = res.data.data.projectTemplateInfo.beginTime;
state.projectInfo.endTime = res.data.data.projectTemplateInfo.endTime;
state.projectInfo.manager = res.data.data.projectTemplateInfo.manager;
state.projectInfo.notice = res.data.data.projectTemplateInfo.notice;
state.projectInfo.sourceBelongId =
res.data.data.projectTemplateInfo.sourceBelongId;
state.projectInfo.managerId =
res.data.data.projectTemplateInfo.managerId;
state.projectInfo.sourceBelongId = res.data.data.projectTemplateInfo.sourceBelongId;
state.projectInfo.managerId = res.data.data.projectTemplateInfo.managerId;
state.projectInfo.remark = res.data.data.projectTemplateInfo.remark;
state.projectInfo.courseSyncFlag =
res.data.data.projectTemplateInfo.courseSyncFlag;
state.projectInfo.courseSyncFlag = res.data.data.projectTemplateInfo.courseSyncFlag;
state.projectInfo.level = res.data.data.projectTemplateInfo.level;
state.projectInfo.systemId =
res.data.data.projectTemplateInfo.systemId;
state.projectInfo.systemId = res.data.data.projectTemplateInfo.systemId;
state.projectInfo.boeFlag = res.data.data.projectTemplateInfo.boeFlag;
state.projectInfo.noticeFlag =
res.data.data.projectTemplateInfo.noticeFlag;
state.projectInfo.noticeFlag = res.data.data.projectTemplateInfo.noticeFlag;
state.projectInfo.remark = res.data.data.projectTemplateInfo.remark;
state.projectInfo.status = res.data.data.projectTemplateInfo.status;
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.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;
console.log("data=====", data);
for (let i in 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) {
state.taskSyllabus[i].children.push({
course: checkType(data[i].taskList[j].type),
@@ -991,8 +993,6 @@ export default defineComponent({
name: state.projectInfo.name,
category: state.projectInfo.category,
picUrl: state.projectInfo.picUrl,
beginTime: new Date(state.projectInfo.beginTime).getTime(),
endTime: new Date(state.projectInfo.endTime).getTime(),
manager: state.projectInfo.manager,
managerId: state.projectInfo.managerId || 0,
sourceBelongId: state.projectInfo.sourceBelongId,
@@ -1126,6 +1126,7 @@ export default defineComponent({
});
};
const handleChange2 = ({ file, fileList }) => {
console.log(fileList);
let list = [];
if (file.status !== "uploading") {
console.log("上传的list", fileList);
@@ -1138,8 +1139,6 @@ export default defineComponent({
name: state.projectInfo.name,
category: state.projectInfo.category,
picUrl: state.projectInfo.picUrl,
beginTime: new Date(state.projectInfo.beginTime).getTime()/1000,
endTime: new Date(state.projectInfo.endTime).getTime()/1000,
manager: state.projectInfo.manager,
managerId: state.projectInfo.managerId || 0,
sourceBelongId: state.projectInfo.sourceBelongId,
@@ -1149,19 +1148,17 @@ export default defineComponent({
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
notice: state.projectInfo.notice,
noticeFlag: state.projectInfo.noticeFlag,
projectTemplateId: Number(localStorage.getItem("projectTemplateId")),
projectTemplateId: localStorage.getItem("projectTemplateId"),
remark: state.projectInfo.remark,
status: state.projectInfo.status,
attach: str,
})
});
//要编辑项目
api
.templateEdit({
name: state.projectInfo.name,
category: state.projectInfo.category,
picUrl: state.projectInfo.picUrl,
beginTime: new Date(state.projectInfo.beginTime).getTime(),
endTime: new Date(state.projectInfo.endTime).getTime(),
manager: state.projectInfo.manager,
managerId: state.projectInfo.managerId || 0,
sourceBelongId: state.projectInfo.sourceBelongId,
@@ -1190,6 +1187,27 @@ export default defineComponent({
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 = () => {
let obj = {
@@ -1270,6 +1288,7 @@ export default defineComponent({
editRule,
handleChange2,
scoresum,
checkedClose
};
},
});
@@ -2060,7 +2079,7 @@ export default defineComponent({
//height: 71px;
margin-left: 12px;
margin-right: 50px;
width: 120px;
.iconame {
//position: absolute;
color: #4f5156;
@@ -2072,7 +2091,10 @@ export default defineComponent({
color: #999ba3;
font-size: 14px;
margin-left: 12px;
width: 83px;
width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.type {
@@ -2104,6 +2126,7 @@ export default defineComponent({
//height: 71px;
flex-grow: 1;
margin-right: 50px;
width: 100px;
.timetext {
font-size: 14px;
color: #999ba3;

View File

@@ -823,6 +823,15 @@
</button>
</div>
</div>
<div
class="aeLoading"
:style="{ display: addLoading ? 'flex' : 'none' }"
>
<a-spin
:spinning="addLoading"
:tip="updateStageID ? '修改中...' : '添加中...'"
/>
</div>
</a-modal>
</div>
<!-- 确认添加阶段弹窗 -->
@@ -1154,6 +1163,8 @@ export default {
deleteStageModal: false, //删除阶段弹窗
unlockModeVisible: false, //切换模式抽屉
addLoading: false, // 添加编辑阶段动画
});
console.log("projectId", state.projectId);
const selectProjectName = (value, index) => {
@@ -1607,6 +1618,8 @@ export default {
message.destroy();
return message.warning("请输入阶段名称");
}
state.addLoading = true;
if (state.updateStageID) {
let obj = {
name: state.valuesname,
@@ -1630,6 +1643,7 @@ export default {
(item) => item.id == state.chooseStageId
);
getTableData(final.taskList);
state.addLoading = false;
})
.catch((err) => {
console.log("添加阶段失败", err);
@@ -1655,6 +1669,7 @@ export default {
(item) => item.id == state.chooseStageId
);
getTableData(final.taskList);
state.addLoading = false;
})
.catch((err) => {
console.log("添加阶段失败", err);

View File

@@ -17,31 +17,33 @@
@click="showCodeModel2()"
/>
<div class="line" v-if="action == 1 || action == 0"></div>
<!-- 显示发布图标 -->
<img
v-if="action == 1 || action == 0"
v-if="action == 2"
class="img2"
src="../../assets/images/leveladd/pub.png"
/>
<!-- <div class="pub">发布</div> -->
<!-- 已发布的显示 -->
<div
class="pub"
style="width: 28px"
<!-- 显示撤回发布图标 -->
<img
v-if="action == 3"
class="img2"
src="../../assets/images/leveladd/pub.png"
/>
<!-- 显示审核图标 -->
<img
v-if="action == 0"
class="img2"
src="../../assets/images/project/reviewsubmit.png"
/>
<!-- 显示撤回审核图标 -->
<img
v-if="action == 1"
@click="showBackModal"
>
{{ act }}
</div>
<!-- 未发布/草稿的显示 -->
<div
class="pub"
style="width: 28px"
v-if="action == 2"
@click="showProjectPub"
>
{{ act }}
</div>
class="img2"
src="../../assets/images/project/reviewrecall.png"
/>
<!-- <div class="pub">发布</div> -->
<!-- 显示提交审核 -->
<div
class="pub"
style="width: 56px"
@@ -50,6 +52,34 @@
>
{{ act }}
</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
v-model:visible="reviewModal"
@@ -74,7 +104,7 @@
<div class="del_btn btn1" @click="closeReviewModal">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2" @click="recallReviewProject">
<div class="del_btn btn2" @click="submitReviewProject">
<div class="btnText">确定</div>
</div>
</div>
@@ -494,7 +524,7 @@
<div class="time">
<div class="timetext">开始时间</div>
<div class="timetext">
{{ item.startTime !== null ? item.startTime : "" }}
{{ item.startTime !== null ? item.startTime : "-" }}
</div>
</div>
<div class="progress">
@@ -1725,7 +1755,37 @@
</div>
</div>
</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
v-model:visible="stopModal"
@@ -2028,6 +2088,7 @@ export default {
releaseProjectName: null, //发布的项目名称
releaseProjectTime: null, //发布的项目时间
backModal: false, //撤回弹窗
recallReviewModal: false, //撤回审核
closeBack: false,
stopModal: false,
closeStop: false,
@@ -2873,7 +2934,7 @@ export default {
state.reviewModal = true;
};
const recallReviewProject = () => {
const submitReviewProject = () => {
let obj = {
projectId: state.projectId,
type: 3,
@@ -2887,6 +2948,8 @@ export default {
message.success("提交成功");
state.reviewModal = false;
getTaskInfo();
// getTask();
reget();
})
.catch((err) => {
console.log("提交失败", err);
@@ -3802,6 +3865,7 @@ export default {
getTask({
projectId: state.projectId,
}).then((res) => {
console.log("获取项目状态", res);
state.action = res.data.data.projectInfo.status;
state.act =
state.action == 2
@@ -3809,7 +3873,9 @@ export default {
: state.action == 0
? "提交审核"
: state.action == 1
? "撤回"
? "撤回审核"
: state.action == 3
? "撤回发布"
: state.action == -1
? ""
: "-";
@@ -3852,9 +3918,10 @@ export default {
console.log("点击发布");
let obj = {
projectId: state.releaseProjectId,
type: 4,
};
apiproj
.releaseProject(obj)
.handleProject(obj)
.then((res) => {
console.log("发布成功", res);
message.destroy();
@@ -3878,7 +3945,7 @@ export default {
const recallProject = () => {
let obj = {
projectId: state.projectId,
type: 0,
type: -4,
};
apiproj
.handleProject(obj)
@@ -3893,6 +3960,36 @@ export default {
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 = () => {
state.stopModal = false;
@@ -4162,7 +4259,10 @@ export default {
checkedClose,
submitExamine,
closeReviewModal,
showRecallReviewModal,
recallReviewProject,
closeRecallReviewModal,
submitReviewProject,
showCodeModel,
showCodeModel2,
checkType,
@@ -5594,7 +5694,7 @@ export default {
//height: 71px;
margin-left: 12px;
margin-right: 50px;
width: 120px;
.iconame {
//position: absolute;
color: #4f5156;
@@ -5607,7 +5707,10 @@ export default {
color: #999ba3;
font-size: 14px;
margin-left: 12px;
width: 83px;
width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
@@ -5643,7 +5746,7 @@ export default {
//height: 71px;
flex-grow: 1;
margin-right: 50px;
width: 100px;
.timetext {
font-size: 14px;
color: #999ba3;

View File

@@ -148,7 +148,7 @@
<!-- <img class="img2" src="../../assets/images/projectadd/keep.png" />
<div class="pub">保存</div>
<div class="line"></div> -->
<router-link to="/taskpage">
<router-link to="/libraryAdd">
<div style="display: flex">
<img
class="img2"
@@ -824,6 +824,15 @@
</button>
</div>
</div>
<div
class="aeLoading"
:style="{ display: addLoading ? 'flex' : 'none' }"
>
<a-spin
:spinning="addLoading"
:tip="updateStageID ? '修改中...' : '添加中...'"
/>
</div>
</a-modal>
</div>
<!-- 确认添加阶段弹窗 -->
@@ -1301,6 +1310,8 @@ export default {
deleteStageModal: false, //删除阶段弹窗
unlockModeVisible: false, //切换模式抽屉
addLoading: false, //添加、编辑阶段动画
});
console.log("projectTemplateId", state.projectTemplateId);
const selectProjectName = (value, index) => {
@@ -1377,7 +1388,13 @@ export default {
};
array.push(obj);
});
console.log(array)
if(array[0].id=='0'){
state.level = [];
}else{
state.level = array;
}
};
const tableDataFunc = () => {
@@ -1514,11 +1531,12 @@ export default {
api
.templateDetail(localStorage.getItem("projectTemplateId"))
.then((res) => {
console.log('获取的任务列表信息',res)
if (res.status == 200) {
console.log("22222", res.data.data.stageList);
state.projectTitle = res.data.data.projectTemplateInfo.name;
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) {
let stage = localStorage.getItem("templateStageId")
? localStorage.getItem("templateStageId")
@@ -1709,6 +1727,7 @@ export default {
message.destroy();
return message.warning("请输入阶段名称");
}
state.addLoading = true;
let obj = {
name: state.valuesname,
projectTemplateId: localStorage.getItem("projectTemplateId"),
@@ -1726,6 +1745,7 @@ export default {
message.destroy();
message.success("修改阶段成功");
getTask();
state.addLoading = false;
})
.catch((err) => {
console.log("添加阶段失败", err);

View File

@@ -230,46 +230,46 @@ export default {
number: null,
selectTime: null,
tableData: [
{
key: 1,
number: 1,
manager: "产品经理评估",
state: "已发布",
creater: "管理员",
pubtime: "2022-07-20 9:03",
cretime: "2022-07-20 9:03",
haspub: false,
},
{
key: 2,
number: 2,
manager: "高级产品经理评估",
state: "已发布",
creater: "管理员",
pubtime: "2022-07-20 9:03",
cretime: "2022-07-20 9:03",
haspub: false,
},
{
key: 3,
number: 3,
manager: "管理者进阶腾飞班管理者进阶腾飞班评估",
state: "待发布",
creater: "管理员",
pubtime: "2022-07-20 9:03",
cretime: "2022-07-20 9:03",
haspub: true,
},
{
key: 4,
number: 4,
manager: "HR评估",
state: "已结束",
creater: "管理员",
pubtime: "2022-07-20 9:03",
cretime: "2022-07-20 9:03",
haspub: true,
},
// {
// key: 1,
// number: 1,
// manager: "产品经理评估",
// state: "已发布",
// creater: "管理员",
// pubtime: "2022-07-20 9:03",
// cretime: "2022-07-20 9:03",
// haspub: false,
// },
// {
// key: 2,
// number: 2,
// manager: "高级产品经理评估",
// state: "已发布",
// creater: "管理员",
// pubtime: "2022-07-20 9:03",
// cretime: "2022-07-20 9:03",
// haspub: false,
// },
// {
// key: 3,
// number: 3,
// manager: "管理者进阶腾飞班管理者进阶腾飞班评估",
// state: "待发布",
// creater: "管理员",
// pubtime: "2022-07-20 9:03",
// cretime: "2022-07-20 9:03",
// haspub: true,
// },
// {
// key: 4,
// number: 4,
// manager: "HR评估",
// state: "已结束",
// creater: "管理员",
// pubtime: "2022-07-20 9:03",
// cretime: "2022-07-20 9:03",
// haspub: true,
// },
],
currentPage: 1,
tableDataTotal: 0,