fix:删除12个抽屉的console

This commit is contained in:
Ggysh-7
2022-11-18 07:16:59 +08:00
parent 0acb1f027d
commit c95540a401
19 changed files with 146 additions and 392 deletions

View File

@@ -71,31 +71,13 @@
</a-drawer>
</template>
<script>
import { reactive, toRefs, ref } from "vue";
import { reactive, toRefs } from "vue";
import * as api from "../../api/indexDiscuss";
import * as apiTask from "../../api/indexTaskadd";
import { RouterEditTask } from "@/api/indexTask";
import { message } from "ant-design-vue";
const rowSelection = ref({
checkStrictly: false,
onChange: (selectedRowKeys, selectedRows) => {
console.log(
`selectedRowKeys: ${selectedRowKeys}`,
"selectedRows: ",
selectedRows
);
},
onSelect: (record, selected, selectedRows) => {
console.log(record, selected, selectedRows);
},
onSelectAll: (selected, selectedRows, changeRows) => {
console.log(selected, selectedRows, changeRows);
},
});
export default {
name: "AddDiscuss",
// components: {
// },
props: {
adddiscussVisible: {
type: Boolean,
@@ -147,7 +129,6 @@ export default {
},
},
setup(props, ctx) {
console.log("学习路径", props.isStudiscuss);
const state = reactive({
inputV1: "",
inputV2: "",
@@ -162,11 +143,6 @@ export default {
} else {
state.discussSettings = "false";
}
console.log(
"state.checkedC1=====",
state.discussSettings,
state.discussSettings == "true"
);
};
const closeDrawer = () => {
ctx.emit("update:adddiscussVisible", false);
@@ -174,7 +150,6 @@ export default {
state.inputV1 = "";
state.textV1 = "";
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
// ctx.emit("changeData", false);
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
};
@@ -184,22 +159,13 @@ export default {
api
.getDiscussDetail({ discussId: props.EditDiscussId })
.then((res) => {
console.log("获取讨论信息成功", res.data.data);
//更新讨论信息
state.inputV1 = res.data.data.discussName;
state.textV1 = res.data.data.discussExplain;
state.checkedC1 =
res.data.data.discussSettings == "true" ? true : false;
console.log(
"props.EditDiscussId",
res.data.data.discussSettings,
"===",
res.data.data.discussSettings == "true",
state.checkedC1
);
})
.catch((err) => {
console.log("获取讨论信息失败", err);
.catch(() => {
});
}
};
@@ -218,11 +184,11 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 8,
})
.then((res) => {
console.log("新增关卡任务失败", res);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
})
.catch((err) => {
console.log("新增关卡任务失败", err);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
apiTask.addTask({
@@ -233,7 +199,7 @@ export default {
type: 8,
});
} else if (props.isLevel == 3) {
console.log("模板库任务");
console.log("");
}
};
const updateDiscussInfo = () => {
@@ -248,7 +214,6 @@ export default {
discussId: props.edit ? props.EditDiscussId : 0, //讨论Id
projectId: 0, //项目id,接口多余字段,
};
console.log("dianwanle -======", String(state.checkedC1));
if (props.edit) {
api
.updateDiscuss(obj)
@@ -256,11 +221,8 @@ export default {
updateTask(res);
closeDrawer();
ctx.emit("changeData", false);
console.log("更新成功", res);
console.log("项目任务ID", props.projectTaskId);
})
.catch((err) => {
console.log("更新失败", err);
.catch(() => {
});
} else {
api
@@ -269,11 +231,8 @@ export default {
updateTask(res);
closeDrawer();
ctx.emit("changeData", false);
console.log("创建成功", res);
console.log("项目任务ID", props.projectTaskId);
})
.catch((err) => {
console.log("创建失败", err);
.catch(() => {
});
}
};
@@ -281,7 +240,6 @@ export default {
...toRefs(state),
afterVisibleChange,
closeDrawer,
rowSelection,
updateDiscussInfo,
checkRadio,
};