mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
合并
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
class="tag-style"
|
||||
v-if="evaluationTypeName != ''"
|
||||
:closable="true"
|
||||
@close="delTag"
|
||||
>{{ evaluationTypeName }}</a-tag
|
||||
>
|
||||
</span>
|
||||
@@ -91,7 +92,7 @@
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="createEvalText">确定</button>
|
||||
<button class="btn2" @click="creoredit">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<EvList
|
||||
@@ -150,11 +151,6 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: {
|
||||
// 要编辑的projectId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
@@ -184,7 +180,11 @@ export default {
|
||||
ctx.emit("update:addevalVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
state.inputV1 = "";
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
state.time = undefined;
|
||||
state.description = "";
|
||||
(state.evaluationTypeId = 0),
|
||||
(state.evaluationTypeName = ""),
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
@@ -195,6 +195,12 @@ export default {
|
||||
const showEvalDrawer = () => {
|
||||
state.EvalListVisible = true;
|
||||
};
|
||||
//删除标签要清除子组件传过来的参数
|
||||
const delTag = () => {
|
||||
state.evaluationTypeId = 0;
|
||||
state.evaluationTypeName = "";
|
||||
};
|
||||
//向关卡或阶段渲染
|
||||
const updateTask = (value) => {
|
||||
if (props.isLevel == 1) {
|
||||
RouterEditTask({
|
||||
@@ -269,9 +275,49 @@ export default {
|
||||
dayjs(res.data.data.evaluationEndTime, "YYYY-MM-DD"),
|
||||
];
|
||||
})
|
||||
.catch(() => {
|
||||
.catch((err) => {
|
||||
message.destroy();
|
||||
message.error("获取测量平信息失败");
|
||||
console.log(err, "erererrerererererer");
|
||||
});
|
||||
};
|
||||
const creoredit = () => {
|
||||
if (props.edit) {
|
||||
editInvistText();
|
||||
} else {
|
||||
createEvalText();
|
||||
}
|
||||
};
|
||||
const editInvistText = () => {
|
||||
if (!state.inputV1) {
|
||||
message.destroy();
|
||||
return message.info("请输入测评名称");
|
||||
}
|
||||
if (!state.evaluationTypeId) {
|
||||
message.destroy();
|
||||
return message.info("请选择测评");
|
||||
}
|
||||
let objei = {
|
||||
evaluationName: state.inputV1,
|
||||
evaluationEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
|
||||
evaluationId: props.edit ? Number(props.EditEvalId) : 0,
|
||||
evaluationStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
|
||||
evaluationTypeId: state.evaluationTypeId,
|
||||
evaluationTypeName: state.evaluationTypeName,
|
||||
evaluationFlag: "",
|
||||
evaluationPictureAddress: "",
|
||||
evaluationTag: "",
|
||||
updateTime: "",
|
||||
};
|
||||
api
|
||||
.updateEvaluation(objei)
|
||||
.then((res) => {
|
||||
updateTask(res.data.data);
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, "errrrrrrrrrrrrrrrrrrrrr");
|
||||
});
|
||||
};
|
||||
//创建测评信息
|
||||
@@ -287,7 +333,7 @@ export default {
|
||||
let obj = {
|
||||
evaluationName: state.inputV1,
|
||||
evaluationEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
|
||||
evaluationId: props.edit ? props.evaluationId : 0,
|
||||
evaluationId: props.evaluationId,
|
||||
evaluationStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
|
||||
evaluationTypeId: state.evaluationTypeId,
|
||||
evaluationTypeName: state.evaluationTypeName,
|
||||
@@ -314,9 +360,12 @@ export default {
|
||||
afterVisibleChange,
|
||||
checkFinish,
|
||||
closeDrawer,
|
||||
delTag,
|
||||
//增改
|
||||
creoredit,
|
||||
createEvalText,
|
||||
queryInvistById,
|
||||
editInvistText,
|
||||
showEvalDrawer,
|
||||
updateTask,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user