feat:合并

This commit is contained in:
songwc
2022-11-07 16:33:23 +08:00
12 changed files with 341 additions and 251 deletions

View File

@@ -191,10 +191,6 @@
<add-ref
v-model:addrefVisible="addrefvisible"
@changeData="updateTableData"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
v-model:isRefEdit="isRefEdit"
v-model:EditRefId="EditRefId"
/>
</div>
<!-- 添加外链侧弹窗 -->
@@ -211,8 +207,6 @@
<div>
<add-discuss
v-model:adddiscussVisible="adddiscussvisible"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
@changeData="updateTableData"
/>
</div>
@@ -230,8 +224,6 @@
<div>
<add-active
v-model:addactiveVisible="addactivevisible"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
@changeData="updateTableData"
/>
</div>
@@ -250,8 +242,6 @@
<add-eval
v-model:addevalVisible="addevalvisible"
@changeData="updateTableData"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
/>
</div>
<!-- 添加测评侧弹窗 -->
@@ -269,8 +259,6 @@
<add-invist
v-model:addinvistVisible="addinvistvisible"
@changeData="updateTableData"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
/>
</div>
<!-- 添加评估侧弹窗 -->
@@ -493,7 +481,6 @@
margin-right: 25px;
cursor: pointer;
"
@click="decideType(element.lei, element.courseId)"
>
编辑
</span>
@@ -1026,7 +1013,7 @@ export default {
(state.valuesname = ""),
(state.valuesnotice = ""),
(state.stage = false);
message.destroy();
message.default();
message.success("添加阶段成功");
})
.catch((err) => {
@@ -1072,7 +1059,6 @@ export default {
cretime: value.duration ? value.duration : "-",
checked1: value.flag ? true : false,
checked: false, //是否选中类型
courseId: value.courseId,
};
array.push(obj);
});
@@ -1083,7 +1069,6 @@ export default {
const getStageData = (tableData) => {
let data = tableData;
let array = [];
console.log("tableData", data);
data.map((value) => {
let obj = {
id: value.stageId,
@@ -1096,128 +1081,135 @@ export default {
state.level = array;
};
// const tableDataFunc = () => {
// const columns = [
// {
// title: "类型",
// dataIndex: "state",
// // width: "30%",
// key: "state",
// width: 60,
// align: "left",
// className: "classify",
// scopedSlots: { customRender: "action" },
// customRender: (text) => {
// // console.log(text.record.checked1);
// return (
// <div class="racona">
// <div
// class="img"
// style={{ cursor: "pointer" }}
// onClick={() => {
// console.log("点击了");
// }}
// ></div>
// <span> {text.record.lei}</span>
// </div>
// );
// },
// },
// {
// title: "任务名称",
// dataIndex: "creater",
// // width: "30%",
// key: "creater",
// width: 200,
// align: "center",
// className: "h",
// },
// {
// title: "必修/选修",
// dataIndex: "pubtime",
// key: "pubtime",
// // width: 100,
// align: "center",
// className: "h",
// scopedSlots: { customRender: "action" },
// customRender: (text) => {
// // console.log(text.record.checked1);
// return (
// <div class="opat">
// <div class="opacationt clearfix">
// <a-switch
// style="margin-left:-50px;margin-top:3px"
// checked={text.record.checked1}
// size="small"
// active-color="red"
// onClick={() => {
// console.log("点击了");
// text.record.checked1 = !text.record.checked1;
// }}
// />
// <div class="showt clearfix">
// <div
// class="bi"
// style={
// text.record.checked1 ? "z-index:999" : "z-index:998"
// }
// >
// 必修
// </div>
// <div class="xuan">选修</div>
// </div>
// </div>
// </div>
// );
// },
// },
// {
// title: "时长",
// dataIndex: "cretime",
// key: "cretime",
// // width: 100,
// align: "center",
// className: "h",
// },
// {
// title: "操作",
// className: "h",
// dataIndex: "opacation",
// key: "opacation",
// // width: 100,
// align: "center",
// scopedSlots: { customRender: "action" },
// customRender: (text) => {
// return (
// <div class="opa">
// <div class="opacation">
// <span
// onClick={() => {
// state.editonlinevisible = true;
// console.log(text, "编辑text");
// editInvistPath();
// }}
// style="color:#4EA6FF;margin-right:25px;cursor:pointer"
// >
// 编辑
// </span>
// <span
// style="color:#4EA6FF;cursor:pointer"
// onClick={() => {
// showDelete();
// state.deleteID = text.record.id;
// }}
// >
// 删除
// </span>
// </div>
// </div>
// );
// },
// },
// ];
// return columns;
// };
const tableDataFunc = () => {
const columns = [
{
title: "类型",
dataIndex: "state",
// width: "30%",
key: "state",
width: 60,
align: "left",
className: "classify",
scopedSlots: { customRender: "action" },
customRender: (text) => {
// console.log(text.record.checked1);
return (
<div class="racona">
<div
class="img"
style={{ cursor: "pointer" }}
onClick={() => {
console.log("点击了");
}}
></div>
<span> {text.record.lei}</span>
{/**
<div class="img"></div>
<a-checkbox class="ch" checked={text.record.checkedd}>
{text.record.lei}
</a-checkbox>
*/}
</div>
);
},
},
{
title: "任务名称",
dataIndex: "creater",
// width: "30%",
key: "creater",
width: 200,
align: "center",
className: "h",
},
{
title: "必修/选修",
dataIndex: "pubtime",
key: "pubtime",
// width: 100,
align: "center",
className: "h",
scopedSlots: { customRender: "action" },
customRender: (text) => {
// console.log(text.record.checked1);
return (
<div class="opat">
<div class="opacationt clearfix">
<a-switch
style="margin-left:-50px;margin-top:3px"
checked={text.record.checked1}
size="small"
active-color="red"
onClick={() => {
console.log("点击了");
text.record.checked1 = !text.record.checked1;
}}
/>
<div class="showt clearfix">
<div
class="bi"
style={
text.record.checked1 ? "z-index:999" : "z-index:998"
}
>
必修
</div>
<div class="xuan">选修</div>
</div>
</div>
</div>
);
},
},
{
title: "时长",
dataIndex: "cretime",
key: "cretime",
// width: 100,
align: "center",
className: "h",
},
{
title: "操作",
className: "h",
dataIndex: "opacation",
key: "opacation",
// width: 100,
align: "center",
scopedSlots: { customRender: "action" },
customRender: (text) => {
return (
<div class="opa">
<div class="opacation">
<span
onClick={() => {
state.editonlinevisible = true;
console.log(text, "编辑text");
editInvistPath();
}}
style="color:#4EA6FF;margin-right:25px;cursor:pointer"
>
编辑
</span>
<span
style="color:#4EA6FF;cursor:pointer"
onClick={() => {
showDelete();
state.deleteID = text.record.id;
}}
>
删除
</span>
</div>
</div>
);
},
},
];
return columns;
};
//获取任务列表
const getTask = () => {
@@ -1887,7 +1879,7 @@ export default {
...toRefs(state),
selectProjectName,
selectProjectName2,
// tableDataFunc,
tableDataFunc,
showModal,
closeModal,
// showDrawer,
@@ -2334,9 +2326,7 @@ export default {
display: flex;
flex-direction: column;
align-items: center; // background-color: #bfa;
.chosen {
// background-color: pink;
}
.ghost {
// background-color: red;
opacity: 0 !important;