mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
Merge branch 'master' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage
This commit is contained in:
@@ -91,7 +91,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
|
||||
@@ -183,6 +183,10 @@ export default {
|
||||
ctx.emit("update:addevalVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
state.inputV1 = "";
|
||||
state.time= undefined;
|
||||
state.description="";
|
||||
state.evaluationTypeId= 0,
|
||||
state.evaluationTypeName= "",
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
};
|
||||
@@ -194,6 +198,7 @@ export default {
|
||||
const showEvalDrawer = () => {
|
||||
state.EvalListVisible = true;
|
||||
};
|
||||
//向关卡或阶段渲染
|
||||
const updateTask = (value) => {
|
||||
if (props.isLevel == 1) {
|
||||
RouterEditTask({
|
||||
@@ -223,9 +228,11 @@ export default {
|
||||
type: 10,
|
||||
})
|
||||
.then(( ) => {
|
||||
message.destroy()
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(( ) => {
|
||||
message.destroy()
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
@@ -271,6 +278,60 @@ export default {
|
||||
message.error("获取测量平信息失败");
|
||||
});
|
||||
}
|
||||
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 = {
|
||||
// "createTime": "",
|
||||
// "createUser": 0,
|
||||
// "evaluationEndTime": "",
|
||||
// "evaluationFlag": "",
|
||||
// "evaluationId": "",
|
||||
// "evaluationName": "",
|
||||
// "evaluationPictureAddress": "",
|
||||
// "evaluationStartTime": "",
|
||||
// "evaluationTag": "",
|
||||
// "evaluationTypeId": 0,
|
||||
// "evaluationTypeName": "",
|
||||
// "updateTime": "",
|
||||
// "updateUser": 0
|
||||
evaluationName: state.inputV1,
|
||||
evaluationEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
|
||||
evaluationId: props.edit ? props.evaluationId : 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);
|
||||
console.log('编辑后的测评信息 编辑后的测评id还和之前一样么?',res.data.data);
|
||||
message.success("编辑测评信息成功");
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error("编辑测评信息创建失败");
|
||||
});
|
||||
}
|
||||
//创建测评信息
|
||||
const createEvalText = () => {
|
||||
if (!state.inputV1) {
|
||||
@@ -312,8 +373,10 @@ export default {
|
||||
checkFinish,
|
||||
closeDrawer,
|
||||
//增改
|
||||
creoredit,
|
||||
createEvalText,
|
||||
queryInvistById,
|
||||
editInvistText,
|
||||
showEvalDrawer,
|
||||
updateTask,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user