|
@@ -6,16 +6,16 @@ const props = defineProps({
|
|
|
});
|
|
|
|
|
|
let form = $ref({
|
|
|
- zjhx_sm_id:'',
|
|
|
- jgtId:'',
|
|
|
- bindClassNum:'',
|
|
|
- partClassNum:'',
|
|
|
- centerNum:'',
|
|
|
- partNum:'',
|
|
|
- studentNum:'',
|
|
|
- teacherNum:'',
|
|
|
- subNum:'',
|
|
|
- time:'',
|
|
|
+ zjhx_sm_id: "",
|
|
|
+ jgtId: "",
|
|
|
+ bindClassNum: "",
|
|
|
+ partClassNum: "",
|
|
|
+ centerNum: "",
|
|
|
+ partNum: "",
|
|
|
+ studentNum: "",
|
|
|
+ teacherNum: "",
|
|
|
+ subNum: "",
|
|
|
+ time: "",
|
|
|
});
|
|
|
let time = $ref("");
|
|
|
let timeList = $ref([
|
|
@@ -54,7 +54,7 @@ async function getSchool() {
|
|
|
ElMessage.warning("用户所在学校异常,请联系管理员处理");
|
|
|
} else {
|
|
|
form.zjhx_sm_id = res.data.page_data[index].szyx_sm_id;
|
|
|
- handleChangeSm(form.zjhx_sm_id)
|
|
|
+ handleChangeSm(form.zjhx_sm_id);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -77,7 +77,7 @@ function handleChangeSm(e) {
|
|
|
}).then((res) => {
|
|
|
if (res.code == "1") {
|
|
|
subSchoolList = res.data.page_data;
|
|
|
- form.jgtId = subSchoolList[0].jgtId
|
|
|
+ form.jgtId = subSchoolList[0].jgtId;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -140,53 +140,48 @@ const rules = {
|
|
|
time: [{ required: true, message: "请选择考核周期", trigger: "submit" }],
|
|
|
};
|
|
|
|
|
|
-let isRead = $ref(false);
|
|
|
let formRef = $ref();
|
|
|
function handleSubmit() {
|
|
|
console.log("form :>> ", form);
|
|
|
- if (isRead) {
|
|
|
- formRef.validate().then((res) => {
|
|
|
- console.log("res :>> ", res);
|
|
|
- if (res === true) {
|
|
|
- let zjhx_sm_name;
|
|
|
- let smIndex = schoolList.findIndex(
|
|
|
- (el) => el.szyx_sm_id == form.zjhx_sm_id
|
|
|
- );
|
|
|
- if (smIndex > -1) zjhx_sm_name = schoolList[smIndex].szyx_sm_name;
|
|
|
- let jgtId_name;
|
|
|
- let subIndex = subSchoolList.findIndex((el) => el.jgtId == form.jgtId);
|
|
|
- if (subIndex > -1) jgtId_name = subSchoolList[subIndex].jgtId_name;
|
|
|
- request({
|
|
|
- url: `/sjsb/zjh_yshlw_xxtj/${props.id ? "edit" : "add"}`,
|
|
|
- data: {
|
|
|
- szyx_id: props.id,
|
|
|
- sjsb_zjh_yshlw_xxtj: {
|
|
|
- zjhx_sm_id:form.zjhx_sm_id,
|
|
|
- jgtId:form.jgtId,
|
|
|
- bindClassNum:form.bindClassNum,
|
|
|
- partClassNum:form.partClassNum,
|
|
|
- centerNum:form.centerNum,
|
|
|
- partNum:form.partNum,
|
|
|
- studentNum:form.studentNum,
|
|
|
- teacherNum:form.teacherNum,
|
|
|
- subNum:form.subNum,
|
|
|
- startTime: form.time.split("~")[0],
|
|
|
- endTime: form.time.split("~")[1],
|
|
|
- zjhx_sm_name,
|
|
|
- jgtId_name,
|
|
|
- },
|
|
|
+ formRef.validate().then((res) => {
|
|
|
+ console.log("res :>> ", res);
|
|
|
+ if (res === true) {
|
|
|
+ let zjhx_sm_name;
|
|
|
+ let smIndex = schoolList.findIndex(
|
|
|
+ (el) => el.szyx_sm_id == form.zjhx_sm_id
|
|
|
+ );
|
|
|
+ if (smIndex > -1) zjhx_sm_name = schoolList[smIndex].szyx_sm_name;
|
|
|
+ let jgtId_name;
|
|
|
+ let subIndex = subSchoolList.findIndex((el) => el.jgtId == form.jgtId);
|
|
|
+ if (subIndex > -1) jgtId_name = subSchoolList[subIndex].jgtId_name;
|
|
|
+ request({
|
|
|
+ url: `/sjsb/zjh_yshlw_xxtj/${props.id ? "edit" : "add"}`,
|
|
|
+ data: {
|
|
|
+ szyx_id: props.id,
|
|
|
+ sjsb_zjh_yshlw_xxtj: {
|
|
|
+ zjhx_sm_id: form.zjhx_sm_id,
|
|
|
+ jgtId: form.jgtId,
|
|
|
+ bindClassNum: form.bindClassNum,
|
|
|
+ partClassNum: form.partClassNum,
|
|
|
+ centerNum: form.centerNum,
|
|
|
+ partNum: form.partNum,
|
|
|
+ studentNum: form.studentNum,
|
|
|
+ teacherNum: form.teacherNum,
|
|
|
+ subNum: form.subNum,
|
|
|
+ startTime: form.time.split("~")[0],
|
|
|
+ endTime: form.time.split("~")[1],
|
|
|
+ zjhx_sm_name,
|
|
|
+ jgtId_name,
|
|
|
},
|
|
|
- }).then((res) => {
|
|
|
- if (res.code === "1") {
|
|
|
- ElMessage.success(res.msg);
|
|
|
- handleBack();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- ElMessage.warning("请先勾选协议");
|
|
|
- }
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === "1") {
|
|
|
+ ElMessage.success(res.msg);
|
|
|
+ handleBack();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
const router = useRouter();
|
|
@@ -215,7 +210,7 @@ function handleBack() {
|
|
|
<el-select
|
|
|
v-model="form.zjhx_sm_id"
|
|
|
clearable
|
|
|
- :disabled="isEdit || user_role=='xj'"
|
|
|
+ :disabled="isEdit || user_role == 'xj'"
|
|
|
@change="handleChangeSm"
|
|
|
>
|
|
|
<el-option
|
|
@@ -272,12 +267,6 @@ function handleBack() {
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <el-checkbox
|
|
|
- v-model="isRead"
|
|
|
- label="已阅读并同意《约课协议》"
|
|
|
- size="large"
|
|
|
- />
|
|
|
-
|
|
|
<div class="flex justify-around items-center text-sm mt-8">
|
|
|
<div
|
|
|
class="w-166px h-50px flex_center rounded bg-hex-00A3FF text-white cursor-pointer"
|