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

@@ -222,28 +222,12 @@
</a-drawer>
</template>
<script>
import { reactive, toRefs, ref } from "vue";
import { reactive, toRefs } from "vue";
import * as api from "../../api/indexActivity";
import * as apiTask from "../../api/indexTaskadd";
import { RouterEditTask } from "@/api/indexTask";
import { message } from "ant-design-vue";
import dayjs from "dayjs";
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: "AddActive",
// components: {
@@ -299,7 +283,6 @@ export default {
},
},
setup(props, ctx) {
//console.log("学习路径",props.isStudiscuss);
const state = reactive({
inputV1: "",
inputV2: "",
@@ -330,17 +313,9 @@ export default {
localStorage.setItem("chapterId", props.isactive);
};
const queryActive = () => {
console.log(
"props.EditActiveId======",
props.EditActiveId,
props.chooseStageId,
props.routerTaskId
);
api
.getActivity(props.EditActiveId)
.then((res) => {
console.log("获取讨论信息成功", res.data.data.standardSettings);
//更新讨论信息
state.inputV1 = res.data.data.activityName;
state.textV1 = res.data.data.activityNotice;
@@ -357,8 +332,7 @@ export default {
dayjs(res.data.data.activityEndTime, "YYYY-MM-DD"),
];
})
.catch((err) => {
console.log("获取讨论信息失败", err);
.catch(() => {
});
};
const afterVisibleChange = (bool) => {
@@ -382,11 +356,11 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 9,
})
.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
@@ -399,14 +373,14 @@ export default {
stageId: props.chooseStageId,
type: 9,
})
.then((res) => {
console.log("更新任务列表成功", res);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
})
.catch((err) => {
console.log("更新任务列表失败", err);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
console.log("模板库更新更新任务列表");
console.log("");
}
};
//创建活动
@@ -455,9 +429,10 @@ export default {
closeDrawer();
updateTask(res);
ctx.emit("changeData", false);
message.success("更新成功");
})
.catch((err) => {
console.log("更新失败", err);
.catch(() => {
message.error("更新失败");
});
} else {
//新建活动信息
@@ -469,8 +444,8 @@ export default {
updateTask(res);
ctx.emit("changeData", false);
})
.catch((err) => {
console.log("创建失败", err);
.catch(() => {
message.error("创建失败");
});
}
};
@@ -479,7 +454,6 @@ export default {
...toRefs(state),
afterVisibleChange,
closeDrawer,
rowSelection,
cloradio1,
updateActivityInfo,
};

View File

@@ -160,8 +160,7 @@ export default {
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
const afterVisibleChange = () => {
};
const tableDataFunc = () => {
const columns = [
@@ -192,16 +191,7 @@ export default {
return columns;
};
const rowSelection = {
onSelect: (selectedRows, selected, selectedRowKeys) => {
console.log(
"selectedRowKeys",
selectedRowKeys,
"selectedRows",
selectedRows,
"selected",
selected
);
console.log(selectedRows.assessmentId);
onSelect: (selectedRows) => {
state.assessmentId = selectedRows.assessmentId;
state.assessmentName = selectedRows.name;
},
@@ -238,18 +228,14 @@ export default {
.then((res) => {
let arr = res.data.data.rows;
if (res.status === 200) {
// console.log("获取案例信息", res.data.data);
getTableDate(arr);
state.tableDataTotal = Number(res.data.data.total);
}
})
.catch((err) => {
console.log("获取全部在线信息接口失败", err);
// state.createLoading = false;
.catch(() => {
});
};
const updateTask = () => {
console.log("jinlaile=================", state.assessmentName);
if (props.isLevel == 1) {
RouterEditTask({
chapterId: props.isactive,
@@ -259,18 +245,16 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 3,
})
.then((res) => {
console.log(res, 11111);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
closeDrawer();
state.addLoading = false;
})
.catch((err) => {
console.log(err, 1111);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
console.log("=========projectTaskId", props.projectTaskId);
apiTask
.addTask({
courseId: state.assessmentId,
@@ -280,16 +264,16 @@ export default {
stageId: props.chooseStageId,
type: 3,
})
.then((res) => {
console.log("调用项目添加接口后111", res.data, 11111);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
closeDrawer();
})
.catch((err) => {
console.log(err, 111111);
.catch(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 3) {
console.log("模板库");
console.log("");
}
};
//重置案例信息

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,
};

View File

@@ -188,13 +188,11 @@ export default {
};
const showEvalDrawer = () => {
state.EvalListVisible = true;
console.log("进来了吗");
};
const queryEval = () => {
api
.queryEvaluationDetailById({ evaluationId: props.evaluationId })
.then((res) => {
console.log("调用项目添加接口后", res.data.data);
state.inputV1 = res.data.data.evaluationName;
state.time = [
dayjs(res.data.data.evaluationStartTime, "YYYY-MM-DD"),
@@ -202,10 +200,8 @@ export default {
];
state.evaluationTypeId = res.data.data.evaluationTypeId;
state.evaluationTypeName = res.data.data.evaluationTypeName;
//state.description =
})
.catch((err) => {
console.log(err);
.catch(() => {
});
};
const updateTask = (res) => {
@@ -219,11 +215,11 @@ export default {
stageId: props.chooseStageId,
type: 10,
})
.then((res) => {
console.log("调用项目添加接口后", res.data);
.then(( ) => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
})
.catch((err) => {
console.log(err);
.catch(( ) => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
RouterEditTask({
@@ -234,14 +230,14 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 10,
})
.then((res) => {
console.log("调用项目添加接口后", res.data);
.then(( ) => {
message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
})
.catch((err) => {
console.log(err);
.catch(( ) => {
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
console.log("模板库任务");
console.log("");
}
};
//创建或编辑测评信息
@@ -266,7 +262,6 @@ export default {
evaluationStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
evaluationTypeId: state.evaluationTypeId,
evaluationTypeName: state.evaluationTypeName,
//state.description
};
if (props.edit) {
api
@@ -277,20 +272,20 @@ export default {
closeDrawer();
ctx.emit("changeData", false);
})
.catch((err) => {
console.log(err);
.catch(() => {
message.error("创建失败");
});
} else {
api
.updateEvaluation(obj)
.then((res) => {
updateTask(res);
message.success("创建成功");
message.success("编辑成功");
closeDrawer();
ctx.emit("changeData", false);
})
.catch((err) => {
console.log(err);
.catch(( ) => {
message.error("编辑失败");
});
}
};

View File

@@ -388,7 +388,6 @@ export default {
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
if (bool) {
queryFaceTeach();
}
@@ -418,8 +417,7 @@ export default {
const updateTask = () => {};
//新建或编辑面授
const updateFaceTeach = () => {};
const upDateTable = (data) => {
console.log("选择了课程", data);
const upDateTable = () => {
};
return {
...toRefs(state),

View File

@@ -117,26 +117,8 @@ import {
import { ProjectEditTask, RouterEditTask } from "@/api/indexTask";
import dayjs from "dayjs";
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: "AddHomework",
// components: {
// },
props: {
addhomeworkVisible: {
type: Boolean,
@@ -243,14 +225,12 @@ export default {
// span: 14,
// },
// };
const handleFinish = (values) => {
console.log(values);
const handleFinish = () => {
updteHomeWork();
};
const handleFinishFailed = (errors) => {
console.log(errors);
// message.error("handleFinishFailed");
const handleFinishFailed = () => {
message.error("handleFinishFailed");
};
const resetForm = () => {
@@ -283,12 +263,11 @@ export default {
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = (bool) => {
const afterVisibleChange = () => {
if (props.addhomeworkVisible && props.edit) {
// 该页面显示同时 edit为true 时,发送查询请求,
queryWork();
}
console.log("state", bool);
};
// 新增任务
@@ -327,16 +306,12 @@ export default {
state.addLoading = true;
queryWorkDetailById({ workId: props.EditWorkId })
.then((res) => {
console.log(
dayjs(res.data.data.submitStartTime).format("YYYY-MM-DD")
);
formState.workName = res.data.data.workName;
formState.workRequirement = res.data.data.workRequirement;
formState.choosedTime = [
dayjs(res.data.data.submitStartTime, "YYYY-MM-DD"),
dayjs(res.data.data.submitEndTime, "YYYY-MM-DD"),
];
console.log(res);
state.addLoading = false;
})
.catch(() => {
@@ -383,14 +358,13 @@ export default {
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
console.log("模板库更新更新任务列表");
console.log("");
}
};
return {
afterVisibleChange,
closeDrawer,
rowSelection,
handleChange,
fileList,
formState,

View File

@@ -143,7 +143,6 @@ export default {
});
const getCheckedAss = (ass) => {
state.assessment = ass;
console.log("checed===", state.assessment);
};
const closeDrawer = () => {
ctx.emit("update:addinvistVisible", false);
@@ -156,8 +155,7 @@ export default {
const checkAssDrawer = () => {
state.assessmentVisible = true;
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
const afterVisibleChange = () => {
state.assessmentId = null;
state.assessmentName = "";
state.assessment = null;
@@ -176,15 +174,14 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 11,
})
.then((res) => {
console.log(res, 11111);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
closeDrawer();
state.addLoading = false;
})
.catch((err) => {
console.log(err, 1111);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
apiTask
@@ -196,16 +193,16 @@ export default {
stageId: props.chooseStageId,
type: 11,
})
.then((res) => {
console.log("调用项目添加接口后111", res.data, 11111);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
closeDrawer();
})
.catch((err) => {
console.log(err, 111111);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 3) {
console.log("模板库更新更新任务列表");
console.log("");
}
};

View File

@@ -327,29 +327,8 @@ function getBase64(img, callback) {
reader.addEventListener("load", () => callback(reader.result));
reader.readAsDataURL(img);
}
const options1 = ref([
{
value: "value1",
label: "请选择状态",
},
]);
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: "AddLive",
props: {
@@ -430,7 +409,6 @@ export default {
const closeDrawer = () => {
ctx.emit("update:addliveVisible", false);
ctx.emit("update:edit", false);
console.log(props, "props");
state.radioV1 = "";
state.playback = false;
state.inputV6 = "";
@@ -449,8 +427,7 @@ export default {
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = (bool) => {
console.log("props.edit===================", props.edit, bool);
const afterVisibleChange = () => {
if (props.edit) {
queryLive();
}
@@ -464,23 +441,19 @@ export default {
searchStartTime: "",
})
.then((res) => {
console.log(res.data.data.rows, "获取全部评估信息");
res.data.data.rows.forEach((item) => {
let obj = item;
obj.value = item.assessmentId;
obj.label = item.assessmentName;
state.assessment.push(obj);
});
console.log("eeee", state.assessment);
});
};
const queryLive = () => {
let d = props.EditLiveId;
console.log("直播查询=======", d);
api
.getLiveBroadcastInfor({ liveId: d })
.then((res) => {
// console.log(dayjs(res.data.data.submitStartTime).format("YYYY-MM-DD"));
state.inputV1 = res.data.data.liveName;
state.time = [
dayjs(res.data.data.liveStartTime, "YYYY-MM-DD"),
@@ -498,7 +471,6 @@ export default {
state.radioV1 = res.data.data.standardSettings;
//state.= res.data.data
state.assessmentId = res.data.data.assessmentId;
console.log("查询成功=====inputv1", state.inputV1);
})
.catch(() => {
message.error(`查询失败`);
@@ -506,7 +478,6 @@ export default {
};
const cloradio1 = (value) => {
console.log(value.target._value); //点击的选项
if (state.radioV1 === value.target._value) {
state.radioV1 = "";
}
@@ -560,13 +531,12 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 6,
})
.then((res) => {
console.log(res, 11111);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
})
.catch((err) => {
console.log(err, 1111);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
apiTask
@@ -579,16 +549,15 @@ export default {
stageId: props.chooseStageId,
type: 6,
})
.then((res) => {
console.log("调用项目添加接口后", res.data);
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
})
.catch((err) => {
console.log(err);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
console.log("mobnku");
console.log("");
}
};
//创建直播
@@ -640,31 +609,25 @@ export default {
signOutTime: state.inputV8,
standardSettings: state.radioV1, //1或2
};
console.log("zhibo-==========", props.EditLiveId);
if (props.edit) {
api
.updateLiveBroadcastMessage(state.obj)
.then((res) => {
console.log("直播编辑成功", res.data.data);
message.success("提交成功");
updateTask(res);
closeDrawer();
})
.catch((err) => {
console.log(err, 2222);
.catch(() => {
});
} else {
api
.createLiveBroadcast(state.obj)
.then((res) => {
console.log("调用添加直播接口后", res.data.data);
// console.log(state, 2222);
message.success("提交成功");
updateTask(res);
closeDrawer();
})
.catch((err) => {
console.log(err, 2222);
.catch(() => {
});
}
};
@@ -685,26 +648,17 @@ export default {
} else {
state.discussSettings = "false";
}
console.log(
"state.checkedC1=====",
state.discussSettings,
state.discussSettings == "true"
);
};
const filterOption = (input, option) => {
return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};
const handleChangeAssessment = (value, option) => {
console.log("选择了", value, option);
const handleChangeAssessment = (option) => {
state.assessmentId = option.assessmentId;
};
return {
...toRefs(state),
afterVisibleChange,
closeDrawer,
options1,
// columns1,
rowSelection,
cloradio1,
handleChange,
beforeUpload,

View File

@@ -185,8 +185,7 @@ export default {
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
const afterVisibleChange = () => {
};
const tableDataFunc = () => {
const columns = [
@@ -240,23 +239,13 @@ export default {
const rowSelection = {
checkStrictly: false,
onSelectAll: (selected) => {
console.log(selected);
if (selected == true) {
state.RowsNum = state.tableDataTotal;
} else {
state.RowsNum = 0;
}
},
onSelect: (selectedRows, selected, selectedRowKeys) => {
console.log(
"selectedRowKeys",
selectedRowKeys,
"selectedRows",
selectedRows,
"selected",
selected
);
console.log(selectedRows.assessmentId);
onSelect: (selectedRows, selected) => {
if (selected == true) {
state.RowsNum++;
} else {
@@ -298,14 +287,11 @@ export default {
.then((res) => {
let arr = res.data.data.rows;
if (res.status === 200) {
// console.log("获取在线信息", res.data.data);
getTableDate(arr);
state.tableDataTotal = Number(res.data.data.total);
}
})
.catch((err) => {
console.log("获取全部在线信息接口失败", err);
// state.createLoading = false;
.catch(() => {
});
};
const updateTask = () => {
@@ -318,18 +304,16 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 1,
})
.then((res) => {
console.log(res, 11111);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
closeDrawer();
state.addLoading = false;
})
.catch((err) => {
console.log(err, 1111);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
console.log("=========projectTaskId", props.projectTaskId);
apiTask
.addTask({
courseId: state.assessmentId,
@@ -339,13 +323,13 @@ export default {
stageId: props.chooseStageId,
type: 1,
})
.then((res) => {
console.log("调用项目添加接口后111", res.data, 11111);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
closeDrawer();
})
.catch((err) => {
console.log(err, 111111);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
console.log("");

View File

@@ -87,32 +87,13 @@
</a-drawer>
</template>
<script>
import { reactive, toRefs, ref } from "vue";
import { reactive, toRefs } from "vue";
import * as api from "../../api/indexExternalChain";
import * as apiTask from "../../api/indexTaskadd";
import { message } from "ant-design-vue";
import { RouterEditTask } from "@/api/indexTask";
//import { query } from "express";
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: "AddRef",
// components: {
// },
props: {
addrefVisible: {
type: Boolean,
@@ -167,10 +148,8 @@ export default {
title: null,
});
const closeDrawer = () => {
console.log(props, 1111);
ctx.emit("update:addrefVisible", false);
ctx.emit("update:edit", false);
console.log("props", props.routerId);
state.inputV2 = "";
state.inputV1 = "";
state.textV1 = "";
@@ -179,8 +158,7 @@ export default {
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
const afterVisibleChange = () => {
if (props.edit) {
queryRef();
@@ -204,15 +182,14 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 7,
})
.then((res) => {
console.log(res, 11111);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
closeDrawer();
state.addLoading = false;
})
.catch((err) => {
console.log(err, 1111);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
apiTask
@@ -224,13 +201,13 @@ export default {
stageId: props.chooseStageId,
type: 7,
})
.then((res) => {
console.log("调用项目添加接口后111", res.data, 11111);
.then(() => {
message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
closeDrawer();
})
.catch((err) => {
console.log(err, 111111);
.catch(() => {
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
console.log("");
@@ -254,7 +231,6 @@ export default {
linkId: props.edit ? props.EditRefId : 0,
linkName: state.inputV1,
};
console.log("编辑的id========", props.EditRefId);
if (props.edit) {
api
.updateLinks(obj)
@@ -262,7 +238,9 @@ export default {
message.success("编辑成功");
updateTask(res);
})
.catch((err) => console.log(err));
.catch(() => {
});
} else {
api
.createExternalChain(obj)
@@ -270,7 +248,9 @@ export default {
message.success("提交成功");
updateTask(res);
})
.catch((err) => console.log(err));
.catch(() => {
});
}
};
// 查询任务
@@ -279,11 +259,9 @@ export default {
api
.getLink({ linkId: d })
.then((res) => {
// console.log(dayjs(res.data.data.submitStartTime).format("YYYY-MM-DD"));
state.inputV1 = res.data.data.linkName;
state.inputV2 = res.data.data.linkAddress;
state.textV1 = res.data.data.linkDescription;
console.log("查询成功=====inputv1", state.inputV1);
})
.catch(() => {
message.error(`查询失败`);
@@ -293,7 +271,6 @@ export default {
...toRefs(state),
afterVisibleChange,
closeDrawer,
rowSelection,
handleFinish,
handleFinishFailed,
updateRef,

View File

@@ -547,14 +547,12 @@ export default {
value: "eng",
},
]);
const handleFinish = (values) => {
console.log(values);
const handleFinish = () => {
updateTest();
};
const handleFinishFailed = (errors) => {
console.log(errors);
// message.error("handleFinishFailed");
const handleFinishFailed = () => {
message.error("handleFinishFailed");
};
const resetForm = () => {
@@ -573,17 +571,14 @@ export default {
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = (bool) => {
console.log(props.edit);
const afterVisibleChange = () => {
if (props.addtestVisible && props.edit) {
// 该页面显示同时 edit为true 时,发送查询请求,
queryTest();
}
console.log("formState", bool);
};
const queryTest = () => {
state.addLoading = true;
console.log(props.EditTestId);
queryExaminationDetailById({ examinationId: props.EditTestId })
.then((res) => {
formState.examinationName = res.data.data.examinationName;
@@ -610,7 +605,6 @@ export default {
} else {
formState.choosedTime = [];
}
console.log(res);
})
.catch(() => {
message.error(`查询失败`);
@@ -672,16 +666,14 @@ export default {
type: 5,
};
RouterEditTask(editObj1)
.then((res) => {
console.log(` 编辑关卡成功的打印 ${res}`);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
state.addLoading = false;
closeDrawer();
})
.catch((err) => {
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
console.log(` 编辑关卡失败的打印 ${err}`);
});
} else if (props.isLevel == 2) {
let editObj = {
@@ -730,7 +722,6 @@ export default {
}
};
const changeOuter = (value) => {
console.log(value);
state.isOuter = value;
};
const chooseTest = (index) => {

View File

@@ -168,8 +168,7 @@ export default {
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
const afterVisibleChange = () => {
};
const showDrawer = () => {

View File

@@ -166,20 +166,15 @@ export default {
});
};
const delQue = (value,index)=>{
console.log('gyd',value,index);
value.splice(value[index],1)
}
const addOpt = (value) => {
console.log(value);
value.push({
// title: "选项" + (value.length + 1 * 1),
title: "选项",
opvalue: "",
});
};
const delOpt = (value,index) => {
console.log('gys', value,index);
// delete value
value.splice(value[index],1)
}
const closeDrawer = () => {
@@ -202,8 +197,7 @@ export default {
],
ctx.emit("update:crevoteVisible", false);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
const afterVisibleChange = () => {
if (props.ballotId != 0) {
queryStemText()
}
@@ -237,14 +231,6 @@ export default {
}
}
}
// for (let i = 0; i < state.questions.length; i++) {
// for (let k = 0; k < state.questions[i].options.length; k++) {
// console.log('1111111111111111', state.questions);
// console.log('2222222222222222', state.questions[i]);
// console.log(' state.questions[i].inputV', state.questions[i].inputV,);
// console.log('state.questions[i].options[k].opvalue',state.questions[i].options[k].opvalue)
// }
// }
let obj = {
"ballotId": 0,
"ballotName": state.inputV1,
@@ -286,10 +272,6 @@ export default {
api
.createOptionMessage(obj)
.then((res) => {
console.log("创建成功", res);
// console.log('res.data.data[0].ascriptionId',res.data.data[0].ascriptionId);
// console.log('res.data.data[0].voteStemId',res.data.data[0].voteStemId);
// console.log('state.questions[0].inputV',state.questions[0].inputV);
message.success("创建成功");
let objstem = {
ballotName: state.inputV1,
@@ -301,8 +283,8 @@ export default {
ctx.emit("getData", objstem);
closeDrawer();
})
.catch((err) => {
console.log(err);
.catch(() => {
message.error("创建失败");
});
};
//删除选项信息
@@ -312,11 +294,11 @@ export default {
}
api
.deleteVoteStemOption(objdelopt)
.then((res) => {
console.log('删除选项信息成功', res);
.then(() => {
message.success("删除成功");
})
.catch((err) => {
console.log('删除选项信息失败', err);
.catch(() => {
message.error("创建失败");
});
}
//根据id获取题干信息
@@ -324,13 +306,9 @@ export default {
api
.queryStemByStemId({ballotId:props.ballotId})
.then((res) => {
console.log('获取题干信息成功', res);
state.inputV1 = res.data.data.voteName
})
.catch((err) => {
console.log('获取题干信息失败', err);
.catch(() => {
})
}
//编辑题干信息
@@ -372,11 +350,11 @@ export default {
]
}
api.updateStemMessage(objcst)
.then((res) => {
console.log('修改题干信息成功', res);
.then(() => {
message.success("修改题干信息成功")
})
.catch((err) => {
console.log('修改题干信息失败', err);
.catch(() => {
message.error("修改题干信息失败")
})
}
return {

View File

@@ -220,14 +220,12 @@ export default {
ctx.emit("update:addvoteVisible", false);
ctx.emit("update:edit", false);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
const afterVisibleChange = () => {
queryVoteInfo();
};
const showDrawerCreVote = () => {
state.createVoteVisible = true;
state.editChild = props.edit;
console.log("=======前")
};
const getStemId = (data) => {
@@ -245,8 +243,7 @@ export default {
voteStemId:state.voteStemId
}
api.deleteVoteStem(objdelstem)
.then((res) => {
console.log('删除题干信息成功', res)
.then(() => {
message.success('删除题干信息成功')
delBox()
})
@@ -284,14 +281,13 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 12,
})
.then((res) => {
console.log(res, 11111);
.then(() => {
message.success(`${props.edit ? '编辑' : '新增'}关卡任务成功`)
ctx.emit("changeData", false);
state.addLoading = false;
})
.catch((err) => {
console.log(err, 1111);
.catch(( ) => {
message.error(`${props.edit ? '编辑' : '新增'}关卡任务失败`)
});
}else if(props.isLevel ==2){
apiTask
@@ -303,12 +299,12 @@ export default {
stageId: props.chooseStageId,
type: 12,
})
.then((res) => {
console.log("调用项目添加接口后111", res.data, 11111);
.then(() => {
message.success(`${props.edit ? '编辑' : '新增'}阶段任务成功`)
ctx.emit("changeData", false);
})
.catch((err) => {
console.log(err, 111111);
.catch(() => {
message.error(`${props.edit ? '编辑' : '新增'}阶段任务失败`)
});
}else if(props.isLevel ==3){
console.log("");
@@ -347,10 +343,10 @@ export default {
.then((res) => {
updateToTask(res);
closeDrawer();
console.log('修改投票信息成功', res);
message.success("修改投票信息成功")
})
.catch((err) => {
console.log('修改投票信息失败', err);
.catch(() => {
message.error("修改投票信息失败")
})
}else{
api
@@ -358,10 +354,10 @@ export default {
.then((res) => {
updateToTask(res);
closeDrawer();
console.log('创建投票信息成功', res);
message.success("创建投票信息成功")
})
.catch((err) => {
console.log('创建投票信息失败', err);
.catch(() => {
message.error("创建投票信息失败")
})
}

View File

@@ -102,14 +102,11 @@ export default {
allFormsData: [],
});
const afterVisibleChange = (bool) => {
console.log("state======进来creates", bool);
const afterVisibleChange = () => {
handleTypes();
};
const closeDrawer = () => {
ctx.emit("update:createVoteVisible", false);
console.log("======关闭");
}
// 详情
const getInfoDate = async () => {
@@ -129,8 +126,6 @@ export default {
];
// sortBy(renderArr, "orderNumber"); //序号
state.allFormsData = parseData(renderArr); //类型
// console.log("state.allFormsData");
// console.log(state.allFormsData);
}
};
getInfoDate();
@@ -306,10 +301,9 @@ export default {
],
};
state.allFormsData.push(obj);
console.log("state.allFormsData=====", state.allFormsData, state.allFormsData.length);
};
const handleDel = ({ id, curItem }) => {
const handleDel = ({ id }) => {
state.allFormsData.forEach((item, index) => {
if (item.id === id) {
state.allFormsData.splice(index, 1);
@@ -319,7 +313,6 @@ export default {
item.id = index + 1;
return item;
});
console.log("curItem.orderNumber", curItem.orderNumber);
// orderNumber: curItem.orderNumber,
};

View File

@@ -107,12 +107,11 @@ export default {
}
});
};
const del = ({ id, optionId }) => {
const del = ({ id }) => {
curItem.value.singleList.forEach((item, index) => {
if (item.id === id) {
curItem.value.singleList.splice(index, 1);
}
console.log("删除=====",id,optionId);
});

View File

@@ -99,7 +99,6 @@ export default {
const formData = new FormData();
formData.append("file", file);
console.log(file);
fileUp(formData).then((res) => {
if (res.data.code === 200) {
state.hasImgName = file.name;

View File

@@ -1177,7 +1177,6 @@ export default {
WorkManage,
SeeStu
},
methods: {},
setup() {
// const routers = useRoute();
// const store = useStore();

View File

@@ -658,9 +658,14 @@
onChange: onSelectChange,
}"
/>
<!-- 列表无数据样式
<div
class="nostu"
:style="{ display: total > 0 ? 'none' : 'block' }"
> -->
<div
class="nostu"
style="display:none"
>
<div class="nostuimg"></div>
</div>