bug修复

This commit is contained in:
李东进1
2023-02-19 23:49:19 +08:00
parent aacafc2828
commit e83decf74d

View File

@@ -138,7 +138,7 @@
v-model:validate="validate" v-model:validate="validate"
:maxlength="20" :maxlength="20"
show-count show-count
:type="2" :type="3"
></NameInput> ></NameInput>
<!-- <a-input--> <!-- <a-input-->
<!-- v-model:value="xzinputV1"--> <!-- v-model:value="xzinputV1"-->
@@ -839,12 +839,12 @@
<span style="margin-right: 3px">开课名称</span> <span style="margin-right: 3px">开课名称</span>
</div> </div>
<div class="b_input"> <div class="b_input">
<a-input <NameInput
maxlength="30" maxlength="30"
v-model:value="xjkkinputV1" v-model:value="xjkkinputV1" v-model:validate="validate" show-count :id="offcourseId" :type="2"
style="width: 440px; height: 40px; border-radius: 8px" style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入开课名称" placeholder="请输入开课名称"
/> ></NameInput>
</div> </div>
</div> </div>
<div class="cstm_items"> <div class="cstm_items">
@@ -1539,6 +1539,7 @@ import {
newFile, newFile,
getdateToDate, getdateToDate,
} from "../../utils/utils"; } from "../../utils/utils";
import { validateName } from "@/api/index1";
import {fileUp} from "../../api/indexEval"; import {fileUp} from "../../api/indexEval";
import * as api1 from "../../api/index1"; import * as api1 from "../../api/index1";
@@ -1949,7 +1950,7 @@ const columns6 = [
align: "center", align: "center",
ellipsis: true, ellipsis: true,
customRender: ({text}) => { customRender: ({text}) => {
return text ? text : "-"; return text ? text : "0";
}, },
}, },
{ {
@@ -3639,13 +3640,28 @@ export default defineComponent({
}; };
//保存开课 //保存开课
const handleSureStu = () => { const handleSureStu = async() => {
let startTime, let startTime,
endTime = 0; endTime = 0;
if (state.xjkkinputV3) { if (state.xjkkinputV3) {
startTime = dayjs(state.xjkkinputV3[0]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000); startTime = dayjs(state.xjkkinputV3[0]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000);
endTime = dayjs(state.xjkkinputV3[1]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000); endTime = dayjs(state.xjkkinputV3[1]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000);
} }
// console.log("state.validate", state.validate);
// if (!state.validate) {
// message.destroy();
// return message.warning("该开课名称已存在");
// }
const offName = await validateName({ name: state.xjkkinputV1, type: 5 }).then(res => {
console.log(res,res.data.data);
return res.data.data === 1;
});
console.log('校验重复',offName)
if (offName) {
message.destroy();
return message.warning("开课名称重复,请重新填写");
}
let t = state.signCom ? "1," : "0,"; let t = state.signCom ? "1," : "0,";
let p = state.comLeave ? "1" : "0"; let p = state.comLeave ? "1" : "0";
let type = t.concat(p); let type = t.concat(p);
@@ -3767,7 +3783,7 @@ export default defineComponent({
const handelGuan = (itm) => { const handelGuan = (itm) => {
console.log("开课信息", itm); console.log("开课信息", itm);
state.offcourseId = itm.id; state.offcourseId = itm.id;
state.offcoursePlanId = itm.offcoursePlanId; state.offcoursePlanId = itm.id;
state.studentId = itm.studentId; state.studentId = itm.studentId;
state.studentItem = itm; state.studentItem = itm;