mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
feat:锁定选中阶段 面授获取 公告 历史公告 项目积分规则 项目共享文档
This commit is contained in:
4
src/api/indexFace.js
Normal file
4
src/api/indexFace.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import http from "./config";
|
||||
|
||||
//获取面授课开课详情
|
||||
export const queryFaceDetailById = (offcoursePlanId) => http.post(`http://localhost:8080/api/admin/offcourse/detailPlan?offcoursePlanId=` + offcoursePlanId + ``)
|
||||
13
src/api/indexNotice.js
Normal file
13
src/api/indexNotice.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import http from "./config";
|
||||
|
||||
//获取公告列表
|
||||
// export const noticeList = (projectId) => http.post('/admin/project/noticeList', {
|
||||
// params: {
|
||||
// projectId: projectId,
|
||||
// }
|
||||
// });
|
||||
export const noticeList = (projectId) => http.post(`http://localhost:8080/api/admin/project/noticeList?projectId=` + projectId + ``)
|
||||
|
||||
//发布项目公告
|
||||
export const publishNotice = (obj) => http.post('/admin/project/publishNotice', obj)
|
||||
|
||||
@@ -162,13 +162,13 @@ function autoComma(number) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
const commonData={
|
||||
timeout:50
|
||||
const commonData = {
|
||||
timeout: 50
|
||||
}
|
||||
|
||||
|
||||
//组织树
|
||||
const organizationalTree= [
|
||||
const organizationalTree = [
|
||||
{
|
||||
title: "京东方",
|
||||
value: "京东方",
|
||||
@@ -371,6 +371,7 @@ export {
|
||||
toDate,
|
||||
getWeek,
|
||||
autoComma,
|
||||
formatNumber,
|
||||
commonData,
|
||||
organizationalTree,
|
||||
}
|
||||
@@ -102,6 +102,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
v-model:value="chooseTime"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
</div>
|
||||
@@ -185,10 +186,10 @@
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="qdqtbox">
|
||||
<div class="qdqtbox">
|
||||
<div class="qtbtn"><div class="btntext">签退</div></div>
|
||||
</div> -->
|
||||
<!-- <div class="setbox">
|
||||
</div>
|
||||
<div class="setbox">
|
||||
<div class="timerbox">
|
||||
<span>结束前:</span>
|
||||
<a-input-number
|
||||
@@ -207,7 +208,7 @@
|
||||
>分钟(提前签退则记为早退)</span
|
||||
>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
@@ -230,7 +231,7 @@
|
||||
<span style="margin-right: 3px">其他设置:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-checkbox v-model:checked="checked"
|
||||
<a-checkbox v-model:checked="checkedHolidy"
|
||||
>学员请假后记为任务完成</a-checkbox
|
||||
>
|
||||
</div>
|
||||
@@ -255,7 +256,9 @@
|
||||
<span style="margin-right: 3px">评估:</span>
|
||||
</div>
|
||||
<div class="btnbox2">
|
||||
<a-checkbox v-model:checked="checked">需要评估</a-checkbox>
|
||||
<a-checkbox v-model:checked="checkedAssessment"
|
||||
>需要评估</a-checkbox
|
||||
>
|
||||
<button class="xkbtn">选择评估</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -309,7 +312,11 @@ import { reactive, toRefs } from "vue";
|
||||
import SelFacet from "../../components/drawers/SelFacet.vue";
|
||||
import AddHomework from "../../components/drawers/AddHomework.vue";
|
||||
import AddTest from "../../components/drawers/AddTest.vue";
|
||||
|
||||
import { ProjectEditTask, RouterEditTask } from "@/api/indexTask";
|
||||
// import * as method from "../../api/method"
|
||||
import { message } from "ant-design-vue";
|
||||
import { queryFaceDetailById } from "../../api/indexFace";
|
||||
import dayjs from "dayjs";
|
||||
export default {
|
||||
name: "AddFaceteach",
|
||||
components: {
|
||||
@@ -379,6 +386,10 @@ export default {
|
||||
testV1: "",
|
||||
radioV1: "",
|
||||
radioV2: "",
|
||||
textV1: "",
|
||||
checkedHolidy: false,
|
||||
checkedAssessment: false,
|
||||
chooseTime: [],
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addfaceteachVisible", false);
|
||||
@@ -388,9 +399,11 @@ export default {
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
if (bool) {
|
||||
if (bool && props.edit) {
|
||||
// 该页面显示同时 edit为true 时,发送查询请求,
|
||||
queryFaceTeach();
|
||||
}
|
||||
// queryFaceTeach();
|
||||
};
|
||||
const showDrawerSelFacet = () => {
|
||||
state.selfacetvisible = true;
|
||||
@@ -412,12 +425,102 @@ export default {
|
||||
}
|
||||
};
|
||||
//查询面授
|
||||
const queryFaceTeach = () => {};
|
||||
//更新任务列表
|
||||
const updateTask = () => {};
|
||||
const queryFaceTeach = () => {
|
||||
//暂时写一个假的offcoursePlanId
|
||||
queryFaceDetailById(2).then((res) => {
|
||||
// state.inputV1 = res.data.data.name;
|
||||
// state.inputV2 = res.data.data.teacherId;
|
||||
console.log("获取到了面授课开课详情", res.data.data);
|
||||
let result = res.data.data;
|
||||
state.inputV1 = result.name;
|
||||
state.textV1 = result.description;
|
||||
state.inputV2 = result.teacher;
|
||||
if (result.beginTime && result.endTime) {
|
||||
state.chooseTime = [
|
||||
dayjs(result.beginTime, "YYYY-MM-DD"),
|
||||
dayjs(result.endTime, "YYYY-MM-DD"),
|
||||
];
|
||||
} else {
|
||||
state.chooseTime = [];
|
||||
}
|
||||
state.inputV4 = result.address;
|
||||
state.inputV5 = result.beforeStart;
|
||||
state.inputV6 = result.afterStart;
|
||||
state.inputV7 = result.beforeEnd;
|
||||
// state.radioV1 = result.
|
||||
state.checkedHolidy =
|
||||
result.completeType == 1
|
||||
? false
|
||||
: result.completeType == 2
|
||||
? false
|
||||
: result.completeType == 3
|
||||
? true
|
||||
: false;
|
||||
if (result.projectMember) {
|
||||
state.radioV2 = "1";
|
||||
} else if (result.noProjectMember) {
|
||||
state.radioV2 = "2";
|
||||
} else {
|
||||
state.radioV2 = "";
|
||||
}
|
||||
if (result.completeSet == 1) {
|
||||
state.radioV1 = "1";
|
||||
} else {
|
||||
state.radioV1 = "2";
|
||||
}
|
||||
state.checkedAssessment = result.evalFlag == 1 ? true : false;
|
||||
});
|
||||
};
|
||||
|
||||
//新建或编辑面授
|
||||
const updateFaceTeach = () => {};
|
||||
const upDateTable = () => {
|
||||
const upDateTable = () => {};
|
||||
|
||||
//更新任务列表
|
||||
const updateTask = (res) => {
|
||||
if (props.isLevel == 1) {
|
||||
let editObj1 = {
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.offcoursePlanId,
|
||||
name: res.data.data.name,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 2,
|
||||
};
|
||||
RouterEditTask(editObj1)
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
// state.addLoading = false;
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
let editObj = {
|
||||
courseId: res.data.data.offcoursePlanId,
|
||||
duration: 0,
|
||||
name: res.data.data.name,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 2,
|
||||
};
|
||||
// 新增编辑或新增项目
|
||||
ProjectEditTask(editObj)
|
||||
.then(() => {
|
||||
message.success(
|
||||
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
|
||||
);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
console.log("");
|
||||
}
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import { getTask } from "../../api/indexTaskadd";
|
||||
import { noticeList } from "../../api/indexNotice";
|
||||
// import { toDate } from "../../api/method";
|
||||
export default {
|
||||
name: "NoticeHis",
|
||||
props: {
|
||||
@@ -35,11 +37,6 @@ export default {
|
||||
// "jwlfwefefweffjwofiewjffwefwowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefwef",
|
||||
// pubtime: "2022-11-7 12:23:00",
|
||||
// },
|
||||
// {
|
||||
// id: 2,
|
||||
// content: "fjwofiewjfowefjwlfwefwefwefwef",
|
||||
// pubtime: "2022-11-7 12:23:00",
|
||||
// },
|
||||
],
|
||||
projectInfo: {},
|
||||
});
|
||||
@@ -50,12 +47,42 @@ export default {
|
||||
//下一步是把公告赋值给state.notice
|
||||
});
|
||||
};
|
||||
const setNoticeData = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
data.map((item) => {
|
||||
let obj = {
|
||||
id: item.noticeId,
|
||||
content: item.notice,
|
||||
createId: item.createId,
|
||||
pubtime: item.createTime,
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.notice = array;
|
||||
};
|
||||
const getNotice = () => {
|
||||
noticeList(props.projectId)
|
||||
.then((res) => {
|
||||
console.log("获取公告列表成功");
|
||||
let result = res.data.data;
|
||||
if (result.length > 0) {
|
||||
setNoticeData(result);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取公告列表失败", err);
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getTaskInfo();
|
||||
getNotice();
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
getTaskInfo,
|
||||
getNotice,
|
||||
setNoticeData,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
import { message } from "ant-design-vue";
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import { getTask } from "../../api/indexTaskadd";
|
||||
import { editProj } from "../../api/indexTaskadd";
|
||||
// import { editProj } from "../../api/indexTaskadd";
|
||||
import { publishNotice } from "../../api/indexNotice";
|
||||
export default {
|
||||
name: "NoticePub",
|
||||
props: {
|
||||
@@ -54,36 +55,19 @@ export default {
|
||||
message.destroy();
|
||||
return message.warning("请输入公告内容");
|
||||
} else {
|
||||
let result = state.projectInfo;
|
||||
let obj = {
|
||||
attach: result.attach,
|
||||
beginTime: result.beginTime,
|
||||
boeFlag: result.boeFlag,
|
||||
category: result.category,
|
||||
courseSyncFlag: result.courseSyncFlag,
|
||||
endTime: result.endTime,
|
||||
level: result.level,
|
||||
manager: result.manager,
|
||||
managerId: result.managerId,
|
||||
name: result.name,
|
||||
createId: state.projectInfo.createId,
|
||||
createName: state.projectInfo.createName,
|
||||
notice: state.noticeContent,
|
||||
noticeFlag: 1,
|
||||
parentId: result.parentId,
|
||||
picUrl: result.picUrl,
|
||||
projectId: result.projectId,
|
||||
remark: result.remark,
|
||||
sourceBelongId: result.sourceBelongId,
|
||||
status: result.status,
|
||||
systemId: result.systemId,
|
||||
templateId: result.templateId,
|
||||
type: result.type,
|
||||
noticeId: 0,
|
||||
projectId: props.projectId,
|
||||
title: "",
|
||||
};
|
||||
// console.log(result, obj, result.type);
|
||||
editProj(obj)
|
||||
publishNotice(obj)
|
||||
.then((res) => {
|
||||
message.destroy();
|
||||
message.success("发布成功", res);
|
||||
state.noticeContent = null;
|
||||
state.noticeContent = "";
|
||||
})
|
||||
.catch((err) => {
|
||||
message.destroy();
|
||||
|
||||
@@ -291,9 +291,10 @@ import StuScoreDetail from "../../components/drawers/StuScoreDetail";
|
||||
import { reactive, toRefs, computed, onMounted } from "vue";
|
||||
import * as api from "../../api/index1";
|
||||
// import { message } from "ant-design-vue";
|
||||
// import { scoreRule } from "../../api/indexTaskadd"; //获取项目积分规则
|
||||
import { scoreRule } from "../../api/indexTaskadd"; //获取项目积分规则
|
||||
import { setScoreRule } from "../../api/indexTaskadd"; //设置项目积分规则
|
||||
import { getProjStu } from "../../api/indexProjStu";
|
||||
import { message } from "ant-design-vue";
|
||||
export default {
|
||||
name: "ProjectScore",
|
||||
components: {
|
||||
@@ -512,6 +513,8 @@ export default {
|
||||
if (e == 2) {
|
||||
// console.log('获取项目积分-榜单')
|
||||
scoreRank(1, 1);
|
||||
} else if (e == 3) {
|
||||
getScoreRule();
|
||||
}
|
||||
rankReset();
|
||||
state.todayvalue = "1";
|
||||
@@ -558,29 +561,55 @@ export default {
|
||||
});
|
||||
};
|
||||
// end -----榜单----------------榜单----------------------榜单-----------榜单----------
|
||||
//设置积分规则
|
||||
const editRule = () => {
|
||||
console.log(props.projectId);
|
||||
let obj = {
|
||||
courseScore: state.score1,
|
||||
examItem: {
|
||||
examItem: [
|
||||
{
|
||||
id: 0,
|
||||
projectId: props.projectId,
|
||||
numLimit: 0,
|
||||
score: state.five2,
|
||||
scoreLimit: state.five1,
|
||||
type: 3,
|
||||
},
|
||||
],
|
||||
|
||||
homeworkItem: [
|
||||
//有名次要求的提交作业
|
||||
homeworkItem: {
|
||||
{
|
||||
id: 0,
|
||||
projectId: props.projectId,
|
||||
numLimit: state.four3,
|
||||
score: state.four5,
|
||||
scoreLimit: state.four4,
|
||||
type: 2,
|
||||
},
|
||||
//无名次要求的提交作业
|
||||
{
|
||||
id: 0,
|
||||
projectId: props.projectId,
|
||||
numLimit: 0,
|
||||
score: state.done3,
|
||||
scoreLimit: state.done2,
|
||||
type: 2,
|
||||
},
|
||||
],
|
||||
leaderScore: state.seven1,
|
||||
projectId: props.projectId,
|
||||
signScore: state.six1,
|
||||
topCompleteCourseItem: {
|
||||
topCompleteCourseItem: [
|
||||
{
|
||||
id: 0,
|
||||
projectId: props.projectId,
|
||||
numLimit: state.four1,
|
||||
score: state.four2,
|
||||
scoreLimit: 0,
|
||||
type: 1,
|
||||
},
|
||||
],
|
||||
topStudentScore: state.seven2,
|
||||
totalScore: scoresum.value,
|
||||
};
|
||||
@@ -588,9 +617,13 @@ export default {
|
||||
setScoreRule(obj)
|
||||
.then((res) => {
|
||||
console.log(res.data, "修改成功");
|
||||
message.destroy();
|
||||
return message.success("修改积分规则成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err.data);
|
||||
message.destroy();
|
||||
return message.warning("修改积分规则失败");
|
||||
});
|
||||
// scoreRule({
|
||||
// projectId: props.projectId,
|
||||
@@ -655,6 +688,33 @@ export default {
|
||||
state.searchNameValue = null;
|
||||
getStu();
|
||||
};
|
||||
const getScoreRule = () => {
|
||||
scoreRule({
|
||||
projectId: props.projectId,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("获取了项目积分规则", res.data.data);
|
||||
let result = res.data.data;
|
||||
scoresum.value = result.totalScore; //Write operation failed: computed value is readonly
|
||||
state.seven1 = result.leaderScore;
|
||||
state.score1 = result.courseScore;
|
||||
state.done2 = result.homeworkItem[1].scoreLimit;
|
||||
state.done3 = result.homeworkItem[1].score;
|
||||
state.four1 = result.topCompleteCourseItem[0].numLimit;
|
||||
state.four2 = result.topCompleteCourseItem[0].score;
|
||||
state.four3 = result.homeworkItem[0].numLimit;
|
||||
state.four4 = result.homeworkItem[0].scoreLimit;
|
||||
state.four5 = result.homeworkItem[0].score;
|
||||
state.five1 = result.examItem[0].scoreLimit;
|
||||
state.five2 = result.examItem[0].score;
|
||||
state.six1 = result.signScore;
|
||||
state.seven1 = result.leaderScore;
|
||||
state.seven2 = result.topStudentScore;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取项目积分规则失败了", err);
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getStu();
|
||||
});
|
||||
@@ -673,6 +733,7 @@ export default {
|
||||
changePagination,
|
||||
searchStu,
|
||||
resetStud,
|
||||
getScoreRule,
|
||||
};
|
||||
},
|
||||
// computed: {
|
||||
|
||||
@@ -989,7 +989,6 @@
|
||||
</div></a-modal
|
||||
>
|
||||
|
||||
|
||||
<!-- 是否删除阶段弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="deleteStageModal"
|
||||
@@ -1011,10 +1010,10 @@
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1" @click="closeDeleteStage">
|
||||
<div class="btnText" >取消</div>
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2" @click="deleteStage">
|
||||
<div class="btnText" >确定</div>
|
||||
<div class="btnText">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1289,8 +1288,8 @@ export default {
|
||||
selectAll: 0, //0:未选择,1:全选,2:部分选择
|
||||
|
||||
updateStageID: null, //编辑阶段id
|
||||
deleteStageId:null,//删除阶段的id
|
||||
deleteStageModal:false,//删除阶段弹窗
|
||||
deleteStageId: null, //删除阶段的id
|
||||
deleteStageModal: false, //删除阶段弹窗
|
||||
});
|
||||
console.log("projectId", state.projectId);
|
||||
const selectProjectName = (value, index) => {
|
||||
@@ -1520,8 +1519,10 @@ export default {
|
||||
? localStorage.getItem("stageId")
|
||||
: null;
|
||||
console.log("zhaodaole", stage);
|
||||
|
||||
if (stage !== null) {
|
||||
// console.log("stage",Object.prototype.toString.call(stage))
|
||||
getStageData(res.data.data.stageList);
|
||||
if (stage !== "null") {
|
||||
console.log(stage);
|
||||
let stageList = res.data.data.stageList; //阶段数组
|
||||
let result = stageList.find((item) => item.stageId == stage);
|
||||
console.log("又找到了", result);
|
||||
@@ -1530,11 +1531,9 @@ export default {
|
||||
let arr = res.data.data.stageList[0].taskList;
|
||||
console.log("任务列表", arr);
|
||||
getTableData(arr);
|
||||
// state.isActive = true;
|
||||
changebgc(res.data.data.stageList[0].stageId);
|
||||
}
|
||||
// let stageList = res.data.data.stageList; //阶段数组
|
||||
// let result = stageList.find((item) => item.stageId == stage);
|
||||
// console.log("又找到了", result);
|
||||
// getTableData(result.taskList);
|
||||
|
||||
// 每次都获取了第一条taskList
|
||||
// let arr = res.data.data.stageList[0].taskList;
|
||||
@@ -1544,7 +1543,7 @@ export default {
|
||||
|
||||
let stagearr = res.data.data.stageList;
|
||||
let arrlist = state.curLevel;
|
||||
//console.log(stagearr, 111111);
|
||||
console.log(stagearr, 111111);
|
||||
if (stagearr.length > 0) {
|
||||
getStageData(stagearr);
|
||||
stagearr.map((value) => {
|
||||
@@ -1553,11 +1552,11 @@ export default {
|
||||
});
|
||||
}
|
||||
//给阶段id赋初始值
|
||||
let stage = localStorage.getItem("stageId")
|
||||
let stageid = localStorage.getItem("stageId")
|
||||
? localStorage.getItem("stageId")
|
||||
: null;
|
||||
if (stage !== "null") {
|
||||
state.chooseStageId = stage;
|
||||
if (stageid !== "null") {
|
||||
state.chooseStageId = stageid;
|
||||
} else {
|
||||
state.chooseStageId = leng > 0 ? stagearr[0].stageId : null;
|
||||
}
|
||||
@@ -1719,7 +1718,7 @@ export default {
|
||||
console.log("修改阶段成功", res);
|
||||
state.valuesname = "";
|
||||
state.valuesnotice = "";
|
||||
closeModal()
|
||||
closeModal();
|
||||
state.updateStageID = null;
|
||||
message.destroy();
|
||||
message.success("修改阶段成功");
|
||||
@@ -1738,9 +1737,9 @@ export default {
|
||||
.editStage(obj)
|
||||
.then((res) => {
|
||||
console.log("添加阶段成功", res);
|
||||
state.valuesname = ""
|
||||
state.valuesnotice = ""
|
||||
closeModal()
|
||||
state.valuesname = "";
|
||||
state.valuesnotice = "";
|
||||
closeModal();
|
||||
message.destroy();
|
||||
message.success("添加阶段成功");
|
||||
getTask();
|
||||
@@ -1751,18 +1750,16 @@ export default {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//打开删除阶段弹窗
|
||||
const showDeleteStage=(id)=>{
|
||||
|
||||
state.deleteStageId=id
|
||||
state.deleteStageModal=true
|
||||
}
|
||||
//关闭删除阶段弹窗
|
||||
const closeDeleteStage=()=>{
|
||||
state.deleteStageId=null
|
||||
state.deleteStageModal=false
|
||||
}
|
||||
//打开删除阶段弹窗
|
||||
const showDeleteStage = (id) => {
|
||||
state.deleteStageId = id;
|
||||
state.deleteStageModal = true;
|
||||
};
|
||||
//关闭删除阶段弹窗
|
||||
const closeDeleteStage = () => {
|
||||
state.deleteStageId = null;
|
||||
state.deleteStageModal = false;
|
||||
};
|
||||
//删除阶段
|
||||
const deleteStage = () => {
|
||||
console.log("chapterId", state.deleteStageId);
|
||||
@@ -1773,8 +1770,8 @@ const closeDeleteStage=()=>{
|
||||
.deleteStage(obj)
|
||||
.then((res) => {
|
||||
console.log("删除阶段成功", res);
|
||||
message.success('删除阶段成功')
|
||||
closeDeleteStage()
|
||||
message.success("删除阶段成功");
|
||||
closeDeleteStage();
|
||||
getTask();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
@@ -1049,8 +1049,8 @@
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
v-for="item in docList"
|
||||
:key="item.src"
|
||||
v-for="item in fileList"
|
||||
:key="item.uid"
|
||||
class="docListStyle"
|
||||
>
|
||||
<img
|
||||
@@ -1066,7 +1066,7 @@
|
||||
<span style="font: oblique bold 16px Sans-serif">{{
|
||||
item.name
|
||||
}}</span>
|
||||
<span style="color: #4ea6ff; float: right">删除</span>
|
||||
<span style="color: #4ea6ff; float: right;cursor: pointer;" @click="deFile(item.uid)">删除</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1713,6 +1713,7 @@ import {
|
||||
import { message } from "ant-design-vue";
|
||||
import * as apitl from "../../api/index";
|
||||
import { getTask } from "../../api/indexTaskadd";
|
||||
import { editProj } from "../../api/indexTaskadd";
|
||||
import { toDate } from "../../api/method";
|
||||
import projSet from "../../components/Modals/projSet";
|
||||
import { overview } from "../../api/indexProjStu";
|
||||
@@ -1776,20 +1777,6 @@ export default {
|
||||
choosedStageId: 1, // 选择的阶段id
|
||||
activeSetKey: "12", //12-基础信息 13-共享文档
|
||||
docChecked: true,
|
||||
docList: [
|
||||
{
|
||||
name: "测试文档1.doc",
|
||||
src: "",
|
||||
},
|
||||
{
|
||||
name: "测试文档2.doc",
|
||||
src: "",
|
||||
},
|
||||
{
|
||||
name: "测试文档3.doc",
|
||||
src: "",
|
||||
},
|
||||
],
|
||||
//学员信息列表
|
||||
tabledata: [
|
||||
// {
|
||||
@@ -1907,6 +1894,7 @@ export default {
|
||||
ChangeGroupStuId: null, //要换组的学生id
|
||||
ChangeGroupStuName: null, //要换组的学生name
|
||||
ChangeGroupId: null, //要换组的学生的小组id
|
||||
fileList: [], //文件列表
|
||||
//进度排行表
|
||||
jindutabledata: [
|
||||
{
|
||||
@@ -2371,16 +2359,31 @@ export default {
|
||||
valueName: "", //排行榜输入姓名
|
||||
|
||||
//设置
|
||||
name: null, //项目名称
|
||||
startTime: null, //开始时间
|
||||
endTime: null, //结束时间
|
||||
manager: null, //项目经理
|
||||
sourceBelong: null, //资源归属
|
||||
remark: null, //项目说明
|
||||
level: null, //项目级别
|
||||
name: null, //项目名称 未改
|
||||
startTime: null, //开始时间 已改
|
||||
tstartTime: null, //开始事件 未改
|
||||
endTime: null, //结束时间 已改
|
||||
tendTime: null, //结束时间 未改
|
||||
manager: null, //项目经理 未改
|
||||
sourceBelong: null, //资源归属 已改
|
||||
tsourceBelong: null, //资源归属 未改
|
||||
remark: null, //项目说明 未改
|
||||
level: null, //项目级别 已改
|
||||
tlevel: null, //项目级别 未改
|
||||
systemId: null, //培训分类
|
||||
picUrl: null,
|
||||
parentId: null,
|
||||
tsystemId: null, //培训分类 未改
|
||||
picUrl: null, //未改
|
||||
parentId: null, //未改
|
||||
courseSyncFlag: null, //未改
|
||||
boeFlag: null, //未改
|
||||
managerId: null, //未改
|
||||
notice: null, //未改
|
||||
status: null, //未改
|
||||
type: null, //未改
|
||||
category: null, //未改
|
||||
noticeFlag: null, //未改
|
||||
templateId: null, //未改
|
||||
attach: null,
|
||||
});
|
||||
|
||||
const levelList = reactive({
|
||||
@@ -3309,6 +3312,9 @@ export default {
|
||||
let info = res.data.data.projectInfo;
|
||||
let start = toDate(info.beginTime / 1000, "Y-M-D h:m");
|
||||
let end = toDate(info.endTime / 1000, "Y-M-D h:m");
|
||||
state.tstartTime = info.beginTime;
|
||||
state.tendTime = info.endTime;
|
||||
state.tsourceBelong = info.sourceBelongId;
|
||||
state.parentId = info.parentId;
|
||||
state.name = info.name;
|
||||
state.startTime = start;
|
||||
@@ -3325,6 +3331,7 @@ export default {
|
||||
: info.level == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
state.tlevel = info.level;
|
||||
state.systemId =
|
||||
info.systemId == 1
|
||||
? "集团级"
|
||||
@@ -3335,9 +3342,20 @@ export default {
|
||||
: info.systemId == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
state.tsystemId = info.systemId;
|
||||
state.checkedSty = info.courseSyncFlag == 1 ? true : false;
|
||||
state.courseSyncFlag = info.courseSyncFlag;
|
||||
state.checkedBOEU = info.boeFlag == 1 ? true : false;
|
||||
state.boeFlag = info.boeFlag;
|
||||
state.picUrl = info.picUrl;
|
||||
state.managerId = info.managerId;
|
||||
state.notice = info.notice;
|
||||
state.status = info.status;
|
||||
state.type = info.type;
|
||||
state.category = info.category;
|
||||
state.noticeFlag = info.noticeFlag;
|
||||
// state.attach = info.attach;
|
||||
// state.templateId = info.templateId;
|
||||
state.sourceBelong =
|
||||
info.sourceBelongId == 1
|
||||
? "项目一"
|
||||
@@ -3346,6 +3364,24 @@ export default {
|
||||
: info.sourceBelongId == 3
|
||||
? "项目三"
|
||||
: "-";
|
||||
// state.fileList=info.attach.split(",")
|
||||
let d = info.attach.indexOf(",");
|
||||
console.log(info.attach, "xgo", info.attach.length);
|
||||
if (info.attach.length == 0) {
|
||||
return;
|
||||
} else if (info.attach.length !== 0 && d == -1) {
|
||||
return;
|
||||
} else {
|
||||
console.log(info.attach, "xgo");
|
||||
// let str = JSON.parse(info.attach)
|
||||
// console.log("赚回来",str)
|
||||
// let luj = info.attach.split(",")
|
||||
let luj = info.attach;
|
||||
console.log("lulj", luj);
|
||||
console.log("赚回来", JSON.parse(luj));
|
||||
state.fileList = JSON.parse(luj)
|
||||
// state.fileList = luj
|
||||
}
|
||||
});
|
||||
};
|
||||
//获取小组列表
|
||||
@@ -3453,8 +3489,54 @@ export default {
|
||||
//end---------项目概览
|
||||
|
||||
const handleChange = (info) => {
|
||||
let list = [];
|
||||
if (info.file.status !== "uploading") {
|
||||
console.log(info.file, info.fileList);
|
||||
console.log(info.file.response.data, info.fileList);
|
||||
// info.fileList.map((item) => {
|
||||
// //把地址放到list里
|
||||
// // list.push(item.response.data);
|
||||
// // list.push(JSON.stringify(item))
|
||||
// state.fileList.push(item)
|
||||
// });
|
||||
|
||||
state.fileList.push(info.file)
|
||||
list = state.fileList
|
||||
console.log("list", list);
|
||||
// let str = list.join(",");
|
||||
let str = JSON.stringify(list);
|
||||
console.log("str", str);
|
||||
//要编辑项目
|
||||
editProj({
|
||||
attach: str,
|
||||
beginTime: state.tstartTime.slice(0, 10),
|
||||
// beginTime:1668643200,
|
||||
boeFlag: state.boeFlag,
|
||||
category: state.category,
|
||||
courseSyncFlag: state.courseSyncFlag,
|
||||
endTime: state.tendTime.slice(0, 10),
|
||||
// endTime: 1668816000,
|
||||
level: state.tlevel,
|
||||
manager: state.manager,
|
||||
managerId: state.managerId,
|
||||
name: state.name,
|
||||
notice: state.notice,
|
||||
noticeFlag: state.noticeFlag,
|
||||
parentId: state.parentId,
|
||||
picUrl: state.picUrl,
|
||||
projectId: state.projectId,
|
||||
remark: state.remark,
|
||||
sourceBelongId: Number(state.tsourceBelong),
|
||||
status: state.status,
|
||||
systemId: state.tsystemId,
|
||||
templateId: state.templateId || 0,
|
||||
type: state.type,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("上传成功", res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("上传失败了", err);
|
||||
});
|
||||
}
|
||||
|
||||
if (info.file.status === "done") {
|
||||
@@ -3644,6 +3726,46 @@ export default {
|
||||
console.log("模版保存失败", err);
|
||||
});
|
||||
};
|
||||
//删除文件
|
||||
const deFile=(id)=>{
|
||||
console.log(id)
|
||||
let index = state.fileList.findIndex(item=>{item.uid==id})
|
||||
state.fileList.splice(index,1)
|
||||
let str = JSON.stringify(state.fileList)
|
||||
editProj({
|
||||
attach: str,
|
||||
beginTime: state.tstartTime.slice(0, 10),
|
||||
// beginTime:1668643200,
|
||||
boeFlag: state.boeFlag,
|
||||
category: state.category,
|
||||
courseSyncFlag: state.courseSyncFlag,
|
||||
endTime: state.tendTime.slice(0, 10),
|
||||
// endTime: 1668816000,
|
||||
level: state.tlevel,
|
||||
manager: state.manager,
|
||||
managerId: state.managerId,
|
||||
name: state.name,
|
||||
notice: state.notice,
|
||||
noticeFlag: state.noticeFlag,
|
||||
parentId: state.parentId,
|
||||
picUrl: state.picUrl,
|
||||
projectId: state.projectId,
|
||||
remark: state.remark,
|
||||
sourceBelongId: Number(state.tsourceBelong),
|
||||
status: state.status,
|
||||
systemId: state.tsystemId,
|
||||
templateId: state.templateId || 0,
|
||||
type: state.type,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("上传成功", res);
|
||||
message.destroy()
|
||||
return message.success("删除成功")
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("上传失败了", err);
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
getStu();
|
||||
getTaskList();
|
||||
@@ -3651,6 +3773,8 @@ export default {
|
||||
getGroup();
|
||||
getOverview();
|
||||
reget();
|
||||
// let a = state.attach.split(",")
|
||||
// state.fileList = a
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
@@ -3744,6 +3868,7 @@ export default {
|
||||
closeStartModal,
|
||||
templateProject,
|
||||
changeGrouped,
|
||||
deFile,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user