mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
feat:合并
This commit is contained in:
@@ -172,6 +172,8 @@
|
||||
@changeData="updateTableData"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:isLiveEdit="isLiveEdit"
|
||||
v-model:EditLiveId="EditLiveId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加直播侧弹窗 -->
|
||||
@@ -254,6 +256,7 @@
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:EditEvalId="EditEvalId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加测评侧弹窗 -->
|
||||
@@ -844,8 +847,11 @@ export default {
|
||||
? JSON.parse(storage.get("projectId"))
|
||||
: null,
|
||||
chooseStageId: null,
|
||||
edit: false,
|
||||
isRefEdit: 1, //外链编辑
|
||||
isLiveEdit: 1, //直播编辑
|
||||
EditRefId: null, //要编辑的外链的id
|
||||
EditLiveId: null, //要编辑的直播的id
|
||||
projectNameList: [
|
||||
{
|
||||
id: 1,
|
||||
@@ -985,7 +991,6 @@ export default {
|
||||
selectedRowKeys: [],
|
||||
valuesname: "",
|
||||
valuesnotice: "",
|
||||
edit: false,
|
||||
confirmModal: false, //确认添加阶段弹窗
|
||||
cC: false,
|
||||
cancelModal: false, //确认取消阶段弹窗
|
||||
@@ -1026,10 +1031,10 @@ export default {
|
||||
.editStage(obj)
|
||||
.then((res) => {
|
||||
console.log("添加阶段成功", res);
|
||||
state.valuesname = "",
|
||||
state.valuesnotice = "",
|
||||
state.stage = false;
|
||||
message.destroy();
|
||||
(state.valuesname = ""),
|
||||
(state.valuesnotice = ""),
|
||||
(state.stage = false);
|
||||
message.default();
|
||||
message.success("添加阶段成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -1086,7 +1091,6 @@ export default {
|
||||
const getStageData = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
console.log("tableData", data);
|
||||
data.map((value) => {
|
||||
let obj = {
|
||||
id: value.stageId,
|
||||
@@ -1099,128 +1103,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 = () => {
|
||||
@@ -1525,17 +1536,6 @@ export default {
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
};
|
||||
apieval
|
||||
.queryEvaluationDetailById(obj.evaluationId)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("获取成功", res,obj.evaluationId);
|
||||
message.success("获取成功");
|
||||
}, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取失败", err);
|
||||
});
|
||||
apieval
|
||||
.updateEvaluation(obj)
|
||||
.then((res) => {
|
||||
@@ -1552,69 +1552,6 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
//编辑直播信息
|
||||
const editLiveBroadcast = () => {
|
||||
let obj = {
|
||||
afterSignIn: "",
|
||||
beforeSignIn: "",
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
liveCover: "",
|
||||
liveDuration: 0,
|
||||
liveEndTime: "",
|
||||
liveExplain: "",
|
||||
liveFlag: "",
|
||||
liveId: 0,
|
||||
liveLink: "",
|
||||
liveName: "",
|
||||
livePlayback: "",
|
||||
livePlaybackLink: "",
|
||||
liveStartTime: "",
|
||||
liveTag: "",
|
||||
liveTeacherId: 0,
|
||||
otherSettings: "",
|
||||
signOutTime: "",
|
||||
standardSettings: "",
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
};
|
||||
apilive
|
||||
.updateLiveBroadcastMessage(obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
message.success("修改成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.warn("修改失败");
|
||||
});
|
||||
};
|
||||
//编辑外链信息
|
||||
const editExternal = () => {
|
||||
let obj = {
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
linkAddress: "",
|
||||
linkDescription: "",
|
||||
linkFlag: "",
|
||||
linkId: 0,
|
||||
linkName: "",
|
||||
linkTag: "",
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
};
|
||||
apiExternal
|
||||
.updateLinks(obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
message.success("修改成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.warn("修改失败");
|
||||
});
|
||||
};
|
||||
|
||||
//删除评估测试
|
||||
const deleteInvistText = () => {
|
||||
let obj = {
|
||||
@@ -1733,22 +1670,22 @@ export default {
|
||||
};
|
||||
//移动任务到阶段
|
||||
const moveTask = () => {
|
||||
let obj ={
|
||||
let obj = {
|
||||
stageId: state.chooseStageId,
|
||||
projectTaskId: state.selectRow,
|
||||
}
|
||||
};
|
||||
apimove
|
||||
.moveTask(obj)
|
||||
.then((res) => {
|
||||
console.log("移动成功",res);
|
||||
console.log("移动成功", res);
|
||||
message.destroy();
|
||||
message.success("移动成功");
|
||||
getTask();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("移动失败", err);
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
//批量删除
|
||||
const deleteTaskAll = () => {
|
||||
let arr = state.selectRow;
|
||||
@@ -1768,8 +1705,8 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
@@ -1941,34 +1878,35 @@ export default {
|
||||
state.isRefEdit = 2;
|
||||
state.EditRefId = id;
|
||||
};
|
||||
//打开编辑直播的弹窗
|
||||
const showEditLiveDrawer = (id) => {
|
||||
state.addlivevisible = true;
|
||||
state.isLiveEdit = 2;
|
||||
state.EditLiveId = id;
|
||||
};
|
||||
//编辑的按钮
|
||||
const decideType = (type, id) => {
|
||||
state.edit = true,
|
||||
state.edit = true;
|
||||
console.log(type, id);
|
||||
if (type == "外链") {
|
||||
showEditRefDrawer(id);
|
||||
} else if (type == "直播") {
|
||||
showEditLiveDrawer(id);
|
||||
} else if (type == "测评") {
|
||||
showDrawerAddEval(id);
|
||||
} else if (type == "评估") {
|
||||
showDrawerAddInvist(id);
|
||||
} else if (type == "投票") {
|
||||
showDrawerAddVote(id);
|
||||
} else if (type == "讨论") {
|
||||
showDrawerAddDiscuss(id);
|
||||
}
|
||||
else if (type == "测评") {
|
||||
showDrawerAddEval(id)
|
||||
}
|
||||
else if (type == "评估") {
|
||||
showDrawerAddInvist(id)
|
||||
}
|
||||
else if (type == "投票") {
|
||||
showDrawerAddVote(id)
|
||||
}
|
||||
else if (type == "讨论") {
|
||||
showDrawerAddDiscuss(id)
|
||||
}
|
||||
else if (type == "活动") {
|
||||
showDrawerAddActive(id)
|
||||
}
|
||||
}
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
selectProjectName2,
|
||||
// tableDataFunc,
|
||||
tableDataFunc,
|
||||
showModal,
|
||||
closeModal,
|
||||
// showDrawer,
|
||||
@@ -2006,8 +1944,6 @@ export default {
|
||||
editActivity,
|
||||
editEvalPath,
|
||||
deleteInvistText,
|
||||
editLiveBroadcast,
|
||||
editExternal,
|
||||
editInvistPath,
|
||||
editVotePath,
|
||||
getTableData,
|
||||
@@ -2024,9 +1960,9 @@ export default {
|
||||
updateWork,
|
||||
deleteTest,
|
||||
deleteWork,
|
||||
// showDrawerEditRef,
|
||||
decideType,
|
||||
showEditRefDrawer,
|
||||
showEditLiveDrawer,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -2417,9 +2353,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;
|
||||
|
||||
Reference in New Issue
Block a user