mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
feat:讨乱编辑样式
This commit is contained in:
@@ -7,8 +7,9 @@
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">添加讨论</div>
|
||||
<div class="header">
|
||||
<div v-if="edit" class="headerTitle">编辑讨论</div>
|
||||
<div v-else class="headerTitle">添加讨论</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@@ -99,6 +100,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
edit: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isStudiscuss: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -130,6 +135,7 @@ export default {
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:adddiscussVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
state.inputV1 = "";
|
||||
state.textV1 = "";
|
||||
};
|
||||
|
||||
@@ -139,6 +139,14 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
isactive: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
@@ -209,50 +217,8 @@ export default {
|
||||
};
|
||||
|
||||
|
||||
//编辑测评信息
|
||||
// const editEvalPath = () => {
|
||||
// let obj = {
|
||||
// createTime: "",
|
||||
// createUser: 0,
|
||||
// evaluationEndTime: "",
|
||||
// evaluationFlag: "",
|
||||
// evaluationId: 125,
|
||||
// evaluationName: "",
|
||||
// evaluationPictureAddress: "",
|
||||
// evaluationStartTime: "",
|
||||
// evaluationTag: "",
|
||||
// evaluationTypeId: 0,
|
||||
// evaluationTypeName: "",
|
||||
// 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) => {
|
||||
// setTimeout(() => {
|
||||
// console.log("修改成功", res);
|
||||
// message.success("修改成功");
|
||||
// }, 1000);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log("修改失败", err);
|
||||
// // state.createLoading = false;
|
||||
// //重新获取列表
|
||||
// // getTask();
|
||||
// });
|
||||
// };
|
||||
//创建测评信息
|
||||
|
||||
//创建或编辑测评信息
|
||||
const createEvalText = () => {
|
||||
if (!state.inputV1) {
|
||||
message.destroy();
|
||||
@@ -294,7 +260,7 @@ export default {
|
||||
evaluationEndTime: "",
|
||||
evaluationFlag: "",
|
||||
evaluationId: 125,
|
||||
evaluationName: "",
|
||||
evaluationName: state.inputV1,
|
||||
evaluationPictureAddress: "",
|
||||
evaluationStartTime: "",
|
||||
evaluationTag: "",
|
||||
@@ -304,62 +270,62 @@ export default {
|
||||
updateUser: 0,
|
||||
};
|
||||
if (props.edit == false) {
|
||||
api
|
||||
.createEvaluation(obj)
|
||||
.then((res) => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
closeDrawer();
|
||||
//渲染到学历路径
|
||||
if (props.learn == 0)
|
||||
apitaskadd
|
||||
.addTask({
|
||||
api
|
||||
.createEvaluation(obj)
|
||||
.then((res) => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
closeDrawer();
|
||||
//渲染到学历路径
|
||||
if (props.learn == 0)
|
||||
apitaskadd
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.evaluationName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 10,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
//自定义事件给父组件传值
|
||||
ctx.emit("changeData", false);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
//渲染到项目列表
|
||||
else {
|
||||
let editObj1 = {
|
||||
chapterId: props.isactive,
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.evaluationName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: 0,
|
||||
stageId: props.chooseStageId,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: 0,
|
||||
type: 10,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
//自定义事件给父组件传值
|
||||
ctx.emit("changeData", false);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
//渲染到项目列表
|
||||
else {
|
||||
let editObj1 = {
|
||||
chapterId: 36,
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.evaluationName,
|
||||
routerId: 92,
|
||||
routerTaskId: 0,
|
||||
type: 10,
|
||||
};
|
||||
RouterEditTask(editObj1)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
// state.createLoading = false;
|
||||
});
|
||||
};
|
||||
RouterEditTask(editObj1)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
// state.createLoading = false;
|
||||
});
|
||||
}
|
||||
else {
|
||||
api
|
||||
.queryEvaluationDetailById(objedit.evaluationId)
|
||||
.queryEvaluationDetailById(obj.evaluationId)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("获取成功", res,objedit.evaluationId);
|
||||
console.log("获取成功", res,obj.evaluationId);
|
||||
message.success("获取成功");
|
||||
}, 1000);
|
||||
})
|
||||
@@ -387,12 +353,8 @@ export default {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
//增删改查
|
||||
//增改
|
||||
createEvalText,
|
||||
// getEvalPath,
|
||||
// changePagination,
|
||||
// deleteEvalPath,
|
||||
// editEvalPath,
|
||||
//上传组件
|
||||
fileList,
|
||||
loading,
|
||||
|
||||
@@ -280,6 +280,8 @@
|
||||
v-model:addevalVisible="addevalvisible"
|
||||
v-model:edit="edit"
|
||||
v-model:learn="learn"
|
||||
v-model:isactive="isactive"
|
||||
v-model:routerId="routerId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加测评侧弹窗 -->
|
||||
|
||||
@@ -209,6 +209,7 @@
|
||||
<div>
|
||||
<add-discuss
|
||||
v-model:adddiscussVisible="adddiscussvisible"
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
@changeData="updateTableData"
|
||||
@@ -1954,6 +1955,9 @@ export default {
|
||||
else if (type == "投票") {
|
||||
showDrawerAddVote(id)
|
||||
}
|
||||
else if (type == "讨论") {
|
||||
showDrawerAddDiscuss(id)
|
||||
}
|
||||
}
|
||||
return {
|
||||
...toRefs(state),
|
||||
|
||||
Reference in New Issue
Block a user