mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 14:56:46 +08:00
feat:合并
This commit is contained in:
@@ -192,6 +192,7 @@
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:isRefEdit="isRefEdit"
|
||||
v-model:EditRefId="EditRefId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加外链侧弹窗 -->
|
||||
@@ -493,7 +494,7 @@
|
||||
margin-right: 25px;
|
||||
cursor: pointer;
|
||||
"
|
||||
@click="decideType(element.lei,element.courseId)"
|
||||
@click="decideType(element.lei, element.courseId)"
|
||||
>
|
||||
编辑
|
||||
</span>
|
||||
@@ -841,6 +842,7 @@ export default {
|
||||
: null,
|
||||
chooseStageId: null,
|
||||
isRefEdit: 1, //外链编辑
|
||||
EditRefId: null, //要编辑的外链的id
|
||||
projectNameList: [
|
||||
{
|
||||
id: 1,
|
||||
@@ -1070,6 +1072,7 @@ export default {
|
||||
cretime: value.duration ? value.duration : "-",
|
||||
checked1: value.flag ? true : false,
|
||||
checked: false, //是否选中类型
|
||||
courseId: value.courseId,
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
@@ -1093,135 +1096,128 @@ 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 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 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 getTask = () => {
|
||||
@@ -1734,26 +1730,22 @@ export default {
|
||||
};
|
||||
//移动任务到阶段
|
||||
const moveTask = () => {
|
||||
let arr = state.selectRow;
|
||||
console.log("选择的行信息", arr);
|
||||
arr.map((value) => {
|
||||
console.log("value:", value);
|
||||
let obj = {
|
||||
chapterId: state.chooseStageId,
|
||||
routerTaskIdList: value,
|
||||
}
|
||||
apimove
|
||||
.moveTask(obj)
|
||||
.then((res) => {
|
||||
console.log("移动成功",res);
|
||||
let obj ={
|
||||
stageId: state.chooseStageId,
|
||||
projectTaskId: state.selectRow,
|
||||
}
|
||||
apimove
|
||||
.moveTask(obj)
|
||||
.then((res) => {
|
||||
console.log("移动成功",res);
|
||||
message.destroy();
|
||||
message.success("移动成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("移动失败", err);
|
||||
});
|
||||
});
|
||||
};
|
||||
getTask();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("移动失败", err);
|
||||
})
|
||||
}
|
||||
//批量删除
|
||||
const deleteTaskAll = () => {
|
||||
let arr = state.selectRow;
|
||||
@@ -1940,15 +1932,20 @@ export default {
|
||||
const changeCourseType = (id) => {
|
||||
console.log("任务id", id);
|
||||
};
|
||||
//展示编辑外链弹窗
|
||||
const showDrawerEditRef = () => {
|
||||
//打开编辑外链的弹窗
|
||||
const showEditRefDrawer = (id) => {
|
||||
state.addrefvisible = true;
|
||||
state.isRefEdit = 2;
|
||||
state.EditRefId = id;
|
||||
};
|
||||
|
||||
//编辑的按钮
|
||||
const decideType = (type, id) => {
|
||||
state.edit = true,
|
||||
console.log(type, id);
|
||||
if (type == "测评") {
|
||||
if (type == "外链") {
|
||||
showEditRefDrawer(id);
|
||||
}
|
||||
else if (type == "测评") {
|
||||
showDrawerAddEval(id)
|
||||
}
|
||||
else if (type == "评估") {
|
||||
@@ -1962,7 +1959,7 @@ export default {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
selectProjectName2,
|
||||
tableDataFunc,
|
||||
// tableDataFunc,
|
||||
showModal,
|
||||
closeModal,
|
||||
// showDrawer,
|
||||
@@ -2018,8 +2015,9 @@ export default {
|
||||
updateWork,
|
||||
deleteTest,
|
||||
deleteWork,
|
||||
showDrawerEditRef,
|
||||
// showDrawerEditRef,
|
||||
decideType,
|
||||
showEditRefDrawer,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user