This commit is contained in:
Ggysh-7
2022-11-15 10:50:16 +08:00
29 changed files with 12584 additions and 4200 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="allCon">
<div class="taskadd">
<div class="left clearfix">
<div class="leftmain">
<div class="tit">
@@ -310,7 +310,7 @@
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
v-model:projectTaskId="projectTaskId"
v-model:EditInvistId = "EditInvistId"
v-model:EditInvistId="EditInvistId"
/>
</div>
<!-- 添加评估侧弹窗 -->
@@ -332,8 +332,9 @@
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
v-model:projectTaskId="projectTaskId"
v-model:voteId = "voteId"
v-model:ballotId = "ballotId"
v-model:EditVoteId="EditVoteId"
v-model:voteId="voteId"
v-model:ballotId="ballotId"
/>
</div>
<!-- 添加投票侧弹窗 -->
@@ -345,7 +346,7 @@
<div class="onerow">
<div class="taskmain">任务列表</div>
<button class="btn" @click="showChangeModal">移动任务到阶段</button>
<div class="edit" @click="deleteTaskAll">
<div class="edit" @click="showdeAll">
<img
class="editimg"
src="../../assets/images/projectadd/delete.png"
@@ -501,10 +502,10 @@
<div class="opacationt clearfix">
<a-switch
style="margin-left: -50px; margin-top: 3px"
:checked="element.checked1"
v-model:checked="element.checked1"
size="small"
active-color="red"
@click="changeCourseType(element.id)"
@click="changeCourseType(element)"
/>
<div class="showt clearfix">
<div
@@ -795,6 +796,35 @@
</div>
</div>
</a-modal>
<a-modal
v-model:visible="deAll"
:footer="null"
:closable="cC"
wrapClassName="ConfirmModal"
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="closeDeAll"></div>
</div>
<div class="body">
<span>您确定要批量删除任务吗</span>
</div>
<div class="del_btnbox">
<div class="del_btn btn1">
<div class="btnText" @click="closeDeAll">取消</div>
</div>
<div class="del_btn btn2">
<div class="btnText" @click="deleteTaskAll">确定</div>
</div>
</div>
</div>
</div>
</a-modal>
<!-- 移动任务到阶段 -->
<a-modal
style="padding: 0"
@@ -802,7 +832,7 @@
v-model:visible="visiblene"
:footer="null"
centered="true"
wrapClassName="changeModal"
wrapClassName="moveModal"
>
<div class="con">
<div class="header">
@@ -858,7 +888,6 @@ import * as apimove from "../../api/indexMovetask";
import draggable from "vuedraggable";
import { storage } from "../../api/storage";
const drawercolumns = [
{
title: "项目名称",
@@ -928,17 +957,16 @@ export default {
isLiveEdit: false, //直播编辑
EditRefId: null, //要编辑的外链的id
EditLiveId: null, //要编辑的直播的ids
EditDiscussId:null,//要编辑的讨论的id
EditActiveId:null,//要编辑的活动id
EditWorkId:null, // 要编辑的作业id
EditTestId: null,// 要编辑的考试id
EditOnlineId:null, //要编辑的在线id
EditEvalId:null,
evaluationId: null, //编辑需要的id
EditInvistId:null,
deAll: false,
EditDiscussId: null, //要编辑的讨论的id
EditActiveId: null, //要编辑的活动id
EditWorkId: null, // 要编辑的作业id
EditTestId: null, // 要编辑的考试id
EditEvalId: null,
EditInvistId: null,
EditVoteId: null, //编辑需要投票的id
ballotId: "", //编辑需要的题干id
projectTaskId:null, // 要编辑的具体任务id
projectTaskId: null, // 要编辑的具体任务id
projectNameList: [
{
id: 1,
@@ -1171,6 +1199,9 @@ export default {
checked1: value.flag ? true : false,
checked: false, //是否选中类型
courseId: value.courseId,
projectId: value.projectId,
stageId: value.stageId,
type: value.type,
};
array.push(obj);
});
@@ -1336,7 +1367,6 @@ export default {
// console.log("22222", res.data.data.stageList);
let leng = res.data.data.stageList.length;
if (leng > 0) {
let arr = res.data.data.stageList[0].taskList;
console.log("任务列表", arr);
getTableData(arr);
@@ -1362,8 +1392,6 @@ export default {
});
};
//获取修改、删除id投票)
const changeVData = (data) => {
console.log("获取修改、删除id投票", data);
@@ -1375,7 +1403,7 @@ export default {
console.log("添加数据", data);
getTask(data);
};
//删除任务
const deleteTask = () => {
let obj = { projectTaskIds: state.deleteID };
@@ -1432,8 +1460,11 @@ export default {
})
.catch((err) => {
console.log(err);
message.destroy();
message.warning("批量删除失败");
});
});
state.deAll = false;
};
const onSelectChange = (selectedRowKeys) => {
console.log("selectedRowKeys changed: ", selectedRowKeys);
@@ -1516,12 +1547,12 @@ export default {
state.projectTaskId = eleId;
state.adddiscussvisible = true;
};
const showDrawerAddActive = (id, eleId) => {
state.addactivevisible = true;
state.EditActiveId = id;
state.projectTaskId = eleId;
console.log("active=======",id);
console.log("active=======", id);
};
const showDrawerAddEval = (id, eleId) => {
state.addevalvisible = true;
@@ -1535,6 +1566,7 @@ export default {
state.projectTaskId = eleId;
};
const showDrawerAddVote = (id, eleId) => {
console.log(id, eleId, '95835325932953295325');
state.addvotevisible = true;
state.EditVoteId = id;
state.projectTaskId = eleId;
@@ -1584,6 +1616,8 @@ export default {
});
}
state.selectRow = arr;
console.log(state.selectRow, "xuanzhong");
console.log(Object.prototype.toString.call(state.selectRow));
//判断是否是全部选择或者是全部未选择来修改selectAll框的样式
if (arr.length !== 0) {
if (arr.length === state.tableData.length) {
@@ -1622,11 +1656,33 @@ export default {
state.selectRow = array;
};
//修改任务的课程类型 id为任务id
const changeCourseType = (id) => {
console.log("任务id", id);
const changeCourseType = (ele) => {
console.log("任务id", ele.id);
console.log("flag", ele.checked1);
let obj = {
courseId: ele.courseId,
duration: ele.cretime == "-" ? 0 : ele.cretime,
flag: ele.checked1,
name: ele.creater,
projectId: ele.projectId,
projectTaskId: ele.id,
stageId: ele.stageId,
type: ele.type,
};
api
.addTask(obj)
.then((res) => {
console.log(`修改状态成功${res.data}`);
message.destroy();
message.success("修改成功");
})
.catch((err) => {
console.log(`修改状态失败${err.data}`);
message.destroy();
message.warning("修改失败");
});
};
//打开测评的弹窗
const showEditEvalDrawer = (id, eleId) => {
console.log("222222222222222222222", id);
@@ -1661,6 +1717,17 @@ export default {
showDrawerOnline(id, eleId);
}
};
const showdeAll = () => {
if (state.selectRow.length == 0) {
message.destroy();
return message.warning("请选择要删除的任务");
} else {
state.deAll = true;
}
};
const closeDeAll = () => {
state.deAll = false;
};
return {
...toRefs(state),
selectProjectName,
@@ -1708,8 +1775,8 @@ export default {
moveTask,
deleteTaskAll,
decideType,
showdeAll,
closeDeAll,
};
},
};
@@ -1857,8 +1924,77 @@ export default {
}
}
}
.name {
width: 78%;
// background-color: lightcoral;
display: flex;
margin-top: 20px;
align-items: center;
//height: 40px;
// border: 1px solid black;
.namebox {
width: 120px;
display: flex;
align-items: center;
justify-content: flex-end;
flex-shrink: 0;
.nameimg {
width: 10px;
height: 10px;
}
}
.d {
margin-top: 8px;
font-size: 25px;
color: #ff4e4e;
}
.box {
position: relative;
margin-left: 14px;
.box1 {
position: absolute;
left: 50%;
top: 50%;
width: 50px;
margin-left: -25px;
margin-top: -5px;
border-top: 2px solid rgba(78, 166, 255, 1);
}
.box2 {
position: absolute;
left: 50%;
top: 50%;
height: 50px;
//margin-left: -5px;
margin-top: -25px;
border-left: 2px solid rgba(78, 166, 255, 1);
}
}
.inname {
color: #000000;
font-size: 14px;
margin-left: 7px;
}
.in {
margin-left: 14px;
flex: 1;
// .ant-radio-wrapper {
// }
.ant-input-affix-wrapper {
width: 384px;
border-radius: 8px;
}
.ant-input {
border-radius: 8px;
// height: 120%;
//width: 384px;
height: 30px;
}
}
}
}
.changeModal {
.moveModal {
.ant-modal {
width: 549px !important;
height: 245px !important;
@@ -1959,179 +2095,112 @@ export default {
}
}
}
.info {
width: 78%;
// background-color: lightcoral;
display: flex;
margin-top: 30px;
// align-items: center;
// height: 40px;
// border: 1px solid black;
// .info {
// width: 78%;
// // background-color: lightcoral;
// display: flex;
// margin-top: 30px;
// // align-items: center;
// // height: 40px;
// // border: 1px solid black;
.inname {
color: #6f6f6f;
font-size: 14px;
margin-left: 26px;
margin-top: 15px;
}
.in {
margin-left: 14px;
width: 81%;
position: relative;
.ant-input {
border-radius: 5px;
// height: 120%;
width: 100%;
height: 130px;
resize: none;
}
}
}
.name {
width: 78%;
// background-color: lightcoral;
display: flex;
margin-top: 20px;
align-items: center;
//height: 40px;
// border: 1px solid black;
.namebox {
width: 120px;
display: flex;
align-items: center;
justify-content: flex-end;
flex-shrink: 0;
.nameimg {
width: 10px;
height: 10px;
}
}
.d {
margin-top: 8px;
font-size: 25px;
color: #ff4e4e;
}
.box {
position: relative;
margin-left: 14px;
.box1 {
position: absolute;
left: 50%;
top: 50%;
width: 50px;
margin-left: -25px;
margin-top: -5px;
border-top: 2px solid rgba(78, 166, 255, 1);
}
.box2 {
position: absolute;
left: 50%;
top: 50%;
height: 50px;
//margin-left: -5px;
margin-top: -25px;
border-left: 2px solid rgba(78, 166, 255, 1);
}
}
.inname {
color: #000000;
font-size: 14px;
margin-left: 7px;
}
.in {
margin-left: 14px;
flex: 1;
// .ant-radio-wrapper {
// }
.ant-input-affix-wrapper {
width: 384px;
border-radius: 8px;
}
.ant-input {
border-radius: 8px;
// height: 120%;
//width: 384px;
height: 30px;
}
}
}
.drawerStyle {
.ant-drawer-content-wrapper {
// max-width: 1000px;
.ant-drawer-header {
display: none !important;
}
.ant-drawer-body {
padding: 0;
}
}
.drawerMain {
min-width: 600px;
margin: 0px 32px 0px 32px;
overflow-x: auto;
display: flex;
flex-direction: column;
.header {
height: 73px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: center;
// background-color: red;
margin-bottom: 20px;
.headerTitle {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
// margin-left: 24px;
}
}
.drawerbox {
margin: 20px 38px 30px;
th {
background-color: #eff4fc !important;
}
// .inname {
// color: #6f6f6f;
// font-size: 14px;
// margin-left: 26px;
// margin-top: 15px;
// }
// .in {
// margin-left: 14px;
// width: 81%;
// position: relative;
// .ant-input {
// border-radius: 5px;
// // height: 120%;
// width: 100%;
// height: 130px;
// resize: none;
// }
// }
// }
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
background: #f6f9fd;
}
}
.btnn {
height: 72px;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
border: 1px solid #4ea6ff;
border-radius: 8px;
color: #4ea6ff;
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-left: 15px;
color: #fff;
}
}
}
}
.allCon {
// .drawerStyle {
// .ant-drawer-content-wrapper {
// // max-width: 1000px;
// .ant-drawer-header {
// display: none !important;
// }
// .ant-drawer-body {
// padding: 0;
// }
// }
// .drawerMain {
// min-width: 600px;
// margin: 0px 32px 0px 32px;
// overflow-x: auto;
// display: flex;
// flex-direction: column;
// .header {
// height: 73px;
// border-bottom: 1px solid #e8e8e8;
// display: flex;
// justify-content: space-between;
// align-items: center;
// // background-color: red;
// margin-bottom: 20px;
// .headerTitle {
// font-size: 18px;
// font-weight: 600;
// color: #333333;
// line-height: 25px;
// // margin-left: 24px;
// }
// }
// .drawerbox {
// margin: 20px 38px 30px;
// th {
// background-color: #eff4fc !important;
// }
// .ant-table-tbody
// > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
// > td {
// background: #f6f9fd;
// }
// }
// .btnn {
// height: 72px;
// width: 100%;
// position: absolute;
// bottom: 0;
// left: 0;
// display: flex;
// align-items: center;
// justify-content: center;
// box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
// .btn1 {
// width: 100px;
// height: 40px;
// border: 1px solid #4ea6ff;
// border-radius: 8px;
// color: #4ea6ff;
// background-color: #fff;
// cursor: pointer;
// }
// .btn2 {
// cursor: pointer;
// width: 100px;
// height: 40px;
// background: #4ea6ff;
// border-radius: 8px;
// border: 0;
// margin-left: 15px;
// color: #fff;
// }
// }
// }
// }
.taskadd {
width: 100%;
display: flex;
min-width: 933px;