feat:合并

This commit is contained in:
岳佳鑫
2022-11-07 17:57:57 +08:00

View File

@@ -172,6 +172,8 @@
@changeData="updateTableData" @changeData="updateTableData"
v-model:projectId="projectId" v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId" v-model:chooseStageId="chooseStageId"
v-model:isLiveEdit="isLiveEdit"
v-model:EditLiveId="EditLiveId"
/> />
</div> </div>
<!-- 添加直播侧弹窗 --> <!-- 添加直播侧弹窗 -->
@@ -254,6 +256,7 @@
v-model:edit="edit" v-model:edit="edit"
v-model:projectId="projectId" v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId" v-model:chooseStageId="chooseStageId"
v-model:EditEvalId="EditEvalId"
/> />
</div> </div>
<!-- 添加测评侧弹窗 --> <!-- 添加测评侧弹窗 -->
@@ -844,8 +847,11 @@ export default {
? JSON.parse(storage.get("projectId")) ? JSON.parse(storage.get("projectId"))
: null, : null,
chooseStageId: null, chooseStageId: null,
edit: false,
isRefEdit: 1, //外链编辑 isRefEdit: 1, //外链编辑
isLiveEdit: 1, //直播编辑
EditRefId: null, //要编辑的外链的id EditRefId: null, //要编辑的外链的id
EditLiveId: null, //要编辑的直播的id
projectNameList: [ projectNameList: [
{ {
id: 1, id: 1,
@@ -985,7 +991,6 @@ export default {
selectedRowKeys: [], selectedRowKeys: [],
valuesname: "", valuesname: "",
valuesnotice: "", valuesnotice: "",
edit: false,
confirmModal: false, //确认添加阶段弹窗 confirmModal: false, //确认添加阶段弹窗
cC: false, cC: false,
cancelModal: false, //确认取消阶段弹窗 cancelModal: false, //确认取消阶段弹窗
@@ -1026,10 +1031,10 @@ export default {
.editStage(obj) .editStage(obj)
.then((res) => { .then((res) => {
console.log("添加阶段成功", res); console.log("添加阶段成功", res);
state.valuesname = "", (state.valuesname = ""),
state.valuesnotice = "", (state.valuesnotice = ""),
state.stage = false; (state.stage = false);
message.destroy(); message.default();
message.success("添加阶段成功"); message.success("添加阶段成功");
}) })
.catch((err) => { .catch((err) => {
@@ -1086,7 +1091,6 @@ export default {
const getStageData = (tableData) => { const getStageData = (tableData) => {
let data = tableData; let data = tableData;
let array = []; let array = [];
console.log("tableData", data);
data.map((value) => { data.map((value) => {
let obj = { let obj = {
id: value.stageId, id: value.stageId,
@@ -1099,128 +1103,135 @@ export default {
state.level = array; state.level = array;
}; };
// const tableDataFunc = () => { const tableDataFunc = () => {
// const columns = [ const columns = [
// { {
// title: "类型", title: "类型",
// dataIndex: "state", dataIndex: "state",
// // width: "30%", // width: "30%",
// key: "state", key: "state",
// width: 60, width: 60,
// align: "left", align: "left",
// className: "classify", className: "classify",
// scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
// customRender: (text) => { customRender: (text) => {
// // console.log(text.record.checked1); // console.log(text.record.checked1);
// return ( return (
// <div class="racona"> <div class="racona">
// <div <div
// class="img" class="img"
// style={{ cursor: "pointer" }} style={{ cursor: "pointer" }}
// onClick={() => { onClick={() => {
// console.log("点击了"); console.log("点击了");
// }} }}
// ></div> ></div>
// <span> {text.record.lei}</span> <span> {text.record.lei}</span>
// </div>
// ); {/**
// }, <div class="img"></div>
// }, <a-checkbox class="ch" checked={text.record.checkedd}>
// { {text.record.lei}
// title: "任务名称", </a-checkbox>
// dataIndex: "creater", */}
// // width: "30%", </div>
// key: "creater", );
// width: 200, },
// align: "center", },
// className: "h", {
// }, title: "任务名称",
// { dataIndex: "creater",
// title: "必修/选修", // width: "30%",
// dataIndex: "pubtime", key: "creater",
// key: "pubtime", width: 200,
// // width: 100, align: "center",
// align: "center", className: "h",
// className: "h", },
// scopedSlots: { customRender: "action" }, {
// customRender: (text) => { title: "必修/选修",
// // console.log(text.record.checked1); dataIndex: "pubtime",
// return ( key: "pubtime",
// <div class="opat"> // width: 100,
// <div class="opacationt clearfix"> align: "center",
// <a-switch className: "h",
// style="margin-left:-50px;margin-top:3px" scopedSlots: { customRender: "action" },
// checked={text.record.checked1} customRender: (text) => {
// size="small" // console.log(text.record.checked1);
// active-color="red" return (
// onClick={() => { <div class="opat">
// console.log("点击了"); <div class="opacationt clearfix">
// text.record.checked1 = !text.record.checked1; <a-switch
// }} style="margin-left:-50px;margin-top:3px"
// /> checked={text.record.checked1}
// <div class="showt clearfix"> size="small"
// <div active-color="red"
// class="bi" onClick={() => {
// style={ console.log("点击了");
// text.record.checked1 ? "z-index:999" : "z-index:998" text.record.checked1 = !text.record.checked1;
// } }}
// > />
// 必修 <div class="showt clearfix">
// </div> <div
// <div class="xuan">选修</div> class="bi"
// </div> style={
// </div> text.record.checked1 ? "z-index:999" : "z-index:998"
// </div> }
// ); >
// }, 必修
// }, </div>
// { <div class="xuan">选修</div>
// title: "时长", </div>
// dataIndex: "cretime", </div>
// key: "cretime", </div>
// // width: 100, );
// align: "center", },
// className: "h", },
// }, {
// { title: "时长",
// title: "操作", dataIndex: "cretime",
// className: "h", key: "cretime",
// dataIndex: "opacation", // width: 100,
// key: "opacation", align: "center",
// // width: 100, className: "h",
// align: "center", },
// scopedSlots: { customRender: "action" }, {
// customRender: (text) => { title: "操作",
// return ( className: "h",
// <div class="opa"> dataIndex: "opacation",
// <div class="opacation"> key: "opacation",
// <span // width: 100,
// onClick={() => { align: "center",
// state.editonlinevisible = true; scopedSlots: { customRender: "action" },
// console.log(text, "编辑text"); customRender: (text) => {
// editInvistPath(); return (
// }} <div class="opa">
// style="color:#4EA6FF;margin-right:25px;cursor:pointer" <div class="opacation">
// > <span
// 编辑 onClick={() => {
// </span> state.editonlinevisible = true;
// <span console.log(text, "编辑text");
// style="color:#4EA6FF;cursor:pointer" editInvistPath();
// onClick={() => { }}
// showDelete(); style="color:#4EA6FF;margin-right:25px;cursor:pointer"
// state.deleteID = text.record.id; >
// }} 编辑
// > </span>
// 删除 <span
// </span> style="color:#4EA6FF;cursor:pointer"
// </div> onClick={() => {
// </div> showDelete();
// ); state.deleteID = text.record.id;
// }, }}
// }, >
// ]; 删除
// return columns; </span>
// }; </div>
</div>
);
},
},
];
return columns;
};
//获取任务列表 //获取任务列表
const getTask = () => { const getTask = () => {
@@ -1525,17 +1536,6 @@ export default {
updateTime: "", updateTime: "",
updateUser: 0, updateUser: 0,
}; };
apieval
.queryEvaluationDetailById(obj.evaluationId)
.then((res) => {
setTimeout(() => {
console.log("获取成功", res,obj.evaluationId);
message.success("获取成功");
}, 1000);
})
.catch((err) => {
console.log("获取失败", err);
});
apieval apieval
.updateEvaluation(obj) .updateEvaluation(obj)
.then((res) => { .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 = () => { const deleteInvistText = () => {
let obj = { let obj = {
@@ -1736,7 +1673,7 @@ export default {
let obj = { let obj = {
stageId: state.chooseStageId, stageId: state.chooseStageId,
projectTaskId: state.selectRow, projectTaskId: state.selectRow,
} };
apimove apimove
.moveTask(obj) .moveTask(obj)
.then((res) => { .then((res) => {
@@ -1747,8 +1684,8 @@ export default {
}) })
.catch((err) => { .catch((err) => {
console.log("移动失败", err); console.log("移动失败", err);
}) });
} };
//批量删除 //批量删除
const deleteTaskAll = () => { const deleteTaskAll = () => {
let arr = state.selectRow; let arr = state.selectRow;
@@ -1768,8 +1705,8 @@ export default {
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
}) });
} };
const onSelectChange = (selectedRowKeys) => { const onSelectChange = (selectedRowKeys) => {
console.log("selectedRowKeys changed: ", selectedRowKeys); console.log("selectedRowKeys changed: ", selectedRowKeys);
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
@@ -1941,34 +1878,35 @@ export default {
state.isRefEdit = 2; state.isRefEdit = 2;
state.EditRefId = id; state.EditRefId = id;
}; };
//打开编辑直播的弹窗
const showEditLiveDrawer = (id) => {
state.addlivevisible = true;
state.isLiveEdit = 2;
state.EditLiveId = id;
};
//编辑的按钮 //编辑的按钮
const decideType = (type, id) => { const decideType = (type, id) => {
state.edit = true, state.edit = true;
console.log(type, id); console.log(type, id);
if (type == "外链") { if (type == "外链") {
showEditRefDrawer(id); 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 { return {
...toRefs(state), ...toRefs(state),
selectProjectName, selectProjectName,
selectProjectName2, selectProjectName2,
// tableDataFunc, tableDataFunc,
showModal, showModal,
closeModal, closeModal,
// showDrawer, // showDrawer,
@@ -2006,8 +1944,6 @@ export default {
editActivity, editActivity,
editEvalPath, editEvalPath,
deleteInvistText, deleteInvistText,
editLiveBroadcast,
editExternal,
editInvistPath, editInvistPath,
editVotePath, editVotePath,
getTableData, getTableData,
@@ -2024,9 +1960,9 @@ export default {
updateWork, updateWork,
deleteTest, deleteTest,
deleteWork, deleteWork,
// showDrawerEditRef,
decideType, decideType,
showEditRefDrawer, showEditRefDrawer,
showEditLiveDrawer,
}; };
}, },
}; };
@@ -2417,9 +2353,7 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; // background-color: #bfa; align-items: center; // background-color: #bfa;
.chosen {
// background-color: pink;
}
.ghost { .ghost {
// background-color: red; // background-color: red;
opacity: 0 !important; opacity: 0 !important;