mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-21 16:56:46 +08:00
课程库bug
This commit is contained in:
@@ -393,6 +393,7 @@ import {
|
||||
// onMounted,
|
||||
onUnmounted,
|
||||
} from "vue";
|
||||
import {validateName} from "@/api/index1";
|
||||
import {message} from "ant-design-vue";
|
||||
import {edit, detail, handle} from "@/api/indexCourse";
|
||||
import {fileUp} from "../../api/indexEval";
|
||||
@@ -405,6 +406,7 @@ import FJUpload from "@/components/common/FJUpload";
|
||||
import * as moment from "moment";
|
||||
import * as api2 from "../../api/indexAudit";
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
Editor,
|
||||
@@ -413,12 +415,18 @@ export default defineComponent({
|
||||
NameInput,
|
||||
ProjectManager,
|
||||
},
|
||||
props: {
|
||||
xzinputV1: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, {expose, emit}) {
|
||||
const state = reactive({
|
||||
hideshow: true,
|
||||
ft_eidt: false,
|
||||
attach: "",
|
||||
validate: true,
|
||||
validate:false,
|
||||
ft_hs: false,
|
||||
addLoading: false,
|
||||
statusJuJue: 0,
|
||||
@@ -575,6 +583,7 @@ export default defineComponent({
|
||||
state.ft_hs = true;
|
||||
state.ft_eidt = false;
|
||||
state.qdms_inputV1 = name;
|
||||
console.log(" state.qdms_inputV1 ",state.qdms_inputV1 );
|
||||
}
|
||||
};
|
||||
const visibleClose = () => {
|
||||
@@ -766,7 +775,8 @@ export default defineComponent({
|
||||
};
|
||||
|
||||
//保存面授课
|
||||
const handlePush = (param) => {
|
||||
const handlePush = async (param) => {
|
||||
|
||||
let files = "";
|
||||
if (state.imgList.length) {
|
||||
state.imgList.forEach((item) => {
|
||||
@@ -775,6 +785,15 @@ export default defineComponent({
|
||||
}
|
||||
files = files.slice(0, files.length - 1);
|
||||
console.log("filesfiles", files);
|
||||
|
||||
const offName = await validateName({name: state.qdms_inputV1, type:2, id:state.offcourseId}).then(res => {
|
||||
return res.data.data == 1;
|
||||
});
|
||||
if(offName){
|
||||
message.destroy();
|
||||
return message.warning("课程名称重复,请重新填写");
|
||||
}
|
||||
|
||||
const postData = {
|
||||
offcourseId: state.offcourseId, //不传代表新增
|
||||
name: state.qdms_inputV1,
|
||||
@@ -831,6 +850,9 @@ export default defineComponent({
|
||||
|
||||
//编辑面授课渲染绑定
|
||||
const handleEditInfo = async (offcourseId) => {
|
||||
console.log("jjjaj");
|
||||
state.validate =true;
|
||||
state.qdms_inputV1 = "";
|
||||
const item = await detail({
|
||||
offcourseId: Number(offcourseId),
|
||||
}).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user