mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
feat:编辑测评选择测评选项可以回显,修复删除后tag没清除,修改时间的传参;管理的催促提示修改
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
<span style="margin-left: 10px">
|
||||
<a-tag
|
||||
class="tag-style"
|
||||
v-if="evaluationTypeName != ''"
|
||||
v-if="evaluationTypeName !== ''"
|
||||
:closable="true"
|
||||
@close="delTag"
|
||||
>{{ evaluationTypeName }}</a-tag
|
||||
@@ -97,6 +97,7 @@
|
||||
</div>
|
||||
<EvList
|
||||
v-model:EvalListVisible="EvalListVisible"
|
||||
v-model:evaluationTypeName="evaluationTypeName"
|
||||
@getEvListData="checkFinish"
|
||||
/>
|
||||
<!-- <div class="aeLoading" :style="{display:addLoading?'flex':'none'}">
|
||||
@@ -113,7 +114,6 @@ import * as apitaskadd from "../../api/indexTaskadd";
|
||||
import { message } from "ant-design-vue";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
import dayjs from "dayjs";
|
||||
// const router = useRouter();
|
||||
export default {
|
||||
name: "AddEval",
|
||||
components: {
|
||||
@@ -165,15 +165,16 @@ export default {
|
||||
time: undefined,
|
||||
EvalId: null,
|
||||
//子传回来的参数
|
||||
evaluationTypeId: 0,
|
||||
evaluationTypeName: "",
|
||||
evaluationTypeId: null,
|
||||
evaluationTypeName: '',
|
||||
description: "",
|
||||
EvalListVisible: false,
|
||||
// addLoading:false,
|
||||
});
|
||||
const checkFinish = (value)=> {
|
||||
state.evaluationTypeId = value.quiz_kid
|
||||
state.evaluationTypeName = value.title
|
||||
state.evaluationTypeId = value.quiz_kid ? value.quiz_kid : null
|
||||
state.evaluationTypeName = value.title ? value.title : ""
|
||||
console.log(state.evaluationTypeId,'state.evaluationTypeId',state.evaluationTypeName,'state.evaluationTypeName');
|
||||
}
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addevalVisible", false);
|
||||
@@ -264,15 +265,17 @@ export default {
|
||||
api
|
||||
.queryEvaluationDetailById(objqi)
|
||||
.then((res) => {
|
||||
console.log(res,'获取到的信息');
|
||||
message.destroy()
|
||||
message.success("获取测评信息成功");
|
||||
state.inputV1 = res.data.data.evaluationName
|
||||
state.evaluationTypeName = res.data.data.evaluationTypeName
|
||||
state.evaluationTypeId = res.data.data.evaluationTypeId;
|
||||
state.time = [
|
||||
state.time = res.data.data.evaluationStartTime ? [
|
||||
dayjs(res.data.data.evaluationStartTime, "YYYY-MM-DD"),
|
||||
dayjs(res.data.data.evaluationEndTime, "YYYY-MM-DD"),
|
||||
];
|
||||
] : undefined ;
|
||||
state.description = res.data.data.evaluationExplain
|
||||
})
|
||||
.catch((err) => {
|
||||
message.destroy()
|
||||
@@ -298,12 +301,12 @@ export default {
|
||||
}
|
||||
let objei = {
|
||||
evaluationName: state.inputV1,
|
||||
evaluationEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
|
||||
evaluationEndTime: state.time ? dayjs(state.time[1]).format("YYYY-MM-DD") : "",
|
||||
evaluationId: props.edit ? Number(props.EditEvalId) : 0,
|
||||
evaluationStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
|
||||
evaluationStartTime: state.time ? dayjs(state.time[0]).format("YYYY-MM-DD") : "",
|
||||
evaluationTypeId: state.evaluationTypeId,
|
||||
evaluationTypeName: state.evaluationTypeName,
|
||||
evaluationFlag: "",
|
||||
evaluationFlag: state.description,
|
||||
evaluationPictureAddress: "",
|
||||
evaluationTag: "",
|
||||
updateTime: "",
|
||||
@@ -315,8 +318,7 @@ export default {
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err,'errrrrrrrrrrrrrrrrrrrrr');
|
||||
.catch(() => {
|
||||
});
|
||||
}
|
||||
//创建测评信息
|
||||
@@ -331,11 +333,12 @@ export default {
|
||||
}
|
||||
let obj = {
|
||||
evaluationName: state.inputV1,
|
||||
evaluationEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
|
||||
evaluationEndTime: state.time ? dayjs(state.time[1]).format("YYYY-MM-DD") : "",
|
||||
evaluationId: props.evaluationId ,
|
||||
evaluationStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
|
||||
evaluationStartTime: state.time ? dayjs(state.time[0]).format("YYYY-MM-DD") : "",
|
||||
evaluationTypeId: state.evaluationTypeId,
|
||||
evaluationTypeName: state.evaluationTypeName,
|
||||
evaluationExplain:state.description,
|
||||
evaluationFlag: "",
|
||||
evaluationPictureAddress: "",
|
||||
evaluationTag: "",
|
||||
|
||||
Reference in New Issue
Block a user