选课调整
This commit is contained in:
parent
24de489ba8
commit
f02f5d06e5
@ -52,6 +52,8 @@ import {navigateBack, navigateTo} from "@/utils/uniapp";
|
|||||||
import { gzjlFindPageApi } from "@/api/base/gzjlApi";
|
import { gzjlFindPageApi } from "@/api/base/gzjlApi";
|
||||||
import {cloneDeep, map} from "lodash";
|
import {cloneDeep, map} from "lodash";
|
||||||
import { useUserStore } from "@/store/modules/user";
|
import { useUserStore } from "@/store/modules/user";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { showToast, showLoading, hideLoading } from "@/utils/uniapp";
|
||||||
const { getJs, setJs } = useUserStore();
|
const { getJs, setJs } = useUserStore();
|
||||||
|
|
||||||
const schema = reactive<FormsSchema[]>([
|
const schema = reactive<FormsSchema[]>([
|
||||||
@ -61,6 +63,8 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
field: "gzjstime",
|
field: "gzjstime",
|
||||||
@ -68,6 +72,8 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -99,6 +105,7 @@ function deleteMemberFamily(index: number, item: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
|
showLoading({ title: "正在加载家庭成员信息..." });
|
||||||
setJs({
|
setJs({
|
||||||
...getJs,
|
...getJs,
|
||||||
gzjlList: map(education.xl, (item) => {
|
gzjlList: map(education.xl, (item) => {
|
||||||
@ -106,6 +113,7 @@ function submit() {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
navigateTo("/pages/view/hr/teacherProfile/FamilyInfo");
|
navigateTo("/pages/view/hr/teacherProfile/FamilyInfo");
|
||||||
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
@ -121,6 +129,20 @@ onMounted(async () => {
|
|||||||
education.xl = map(getJs.gzjlList, (item) => {
|
education.xl = map(getJs.gzjlList, (item) => {
|
||||||
return { value: item };
|
return { value: item };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 显示数据加载完成提示
|
||||||
|
showToast({
|
||||||
|
title: `已加载 ${getJs.gzjlList.length} 条工作经历信息`,
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 显示无数据提示
|
||||||
|
showToast({
|
||||||
|
title: "暂无工作经历信息,请添加",
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -52,6 +52,7 @@ import { cloneDeep, map } from "lodash";
|
|||||||
import { jtcyFindPageApi } from "@/api/base/jtcyApi";
|
import { jtcyFindPageApi } from "@/api/base/jtcyApi";
|
||||||
import { useUserStore } from "@/store/modules/user";
|
import { useUserStore } from "@/store/modules/user";
|
||||||
import { useDicStore } from "@/store/modules/dic";
|
import { useDicStore } from "@/store/modules/dic";
|
||||||
|
import { showToast, showLoading, hideLoading } from "@/utils/uniapp";
|
||||||
const { findByPid } = useDicStore();
|
const { findByPid } = useDicStore();
|
||||||
const { getJs, setJs } = useUserStore();
|
const { getJs, setJs } = useUserStore();
|
||||||
|
|
||||||
@ -113,6 +114,7 @@ function deleteMemberFamily(index: number, item: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
|
showLoading({ title: "正在加载档案材料信息..." });
|
||||||
setJs({
|
setJs({
|
||||||
...getJs,
|
...getJs,
|
||||||
jtcyList: map(education.xl, (item) => {
|
jtcyList: map(education.xl, (item) => {
|
||||||
@ -121,6 +123,7 @@ function submit() {
|
|||||||
});
|
});
|
||||||
// navigateTo("/pages/view/hr/teacherProfile/PersonalHonor");
|
// navigateTo("/pages/view/hr/teacherProfile/PersonalHonor");
|
||||||
navigateTo("/pages/view/hr/teacherProfile/RecordMaterials");
|
navigateTo("/pages/view/hr/teacherProfile/RecordMaterials");
|
||||||
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -137,6 +140,20 @@ onMounted(async () => {
|
|||||||
education.xl = map(getJs.jtcyList, (item) => {
|
education.xl = map(getJs.jtcyList, (item) => {
|
||||||
return { value: item };
|
return { value: item };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 显示数据加载完成提示
|
||||||
|
showToast({
|
||||||
|
title: `已加载 ${getJs.jtcyList.length} 条家庭成员信息`,
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 显示无数据提示
|
||||||
|
showToast({
|
||||||
|
title: "暂无家庭成员信息,请添加",
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -54,6 +54,7 @@ import { gwqkFindPageApi } from "@/api/base/gwqkApi";
|
|||||||
import { cloneDeep, map } from "lodash";
|
import { cloneDeep, map } from "lodash";
|
||||||
import { useUserStore } from "@/store/modules/user";
|
import { useUserStore } from "@/store/modules/user";
|
||||||
import { useDicStore } from "@/store/modules/dic";
|
import { useDicStore } from "@/store/modules/dic";
|
||||||
|
import { showToast, showLoading, hideLoading } from "@/utils/uniapp";
|
||||||
const { findByPid } = useDicStore();
|
const { findByPid } = useDicStore();
|
||||||
const { getJs, setJs } = useUserStore();
|
const { getJs, setJs } = useUserStore();
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
@ -110,6 +111,8 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
ok: (e: any, attrs: any) => {
|
ok: (e: any, attrs: any) => {
|
||||||
console.log("岗位聘用开始时间选择:", e, attrs);
|
console.log("岗位聘用开始时间选择:", e, attrs);
|
||||||
const formIndex = attrs.index;
|
const formIndex = attrs.index;
|
||||||
@ -137,6 +140,8 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
ok: (e: any, attrs: any) => {
|
ok: (e: any, attrs: any) => {
|
||||||
console.log("岗位聘用结束时间选择:", e, attrs);
|
console.log("岗位聘用结束时间选择:", e, attrs);
|
||||||
const formIndex = attrs.index;
|
const formIndex = attrs.index;
|
||||||
@ -169,64 +174,33 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
placeholder: "请选择岗位聘用时间",
|
placeholder: "请选择岗位聘用时间",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// field: "zrxk",
|
|
||||||
// label: "主任学科",
|
|
||||||
// component: "BasicInput",
|
|
||||||
// componentProps: {},
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// field: "jrxk",
|
|
||||||
// label: "兼任学科",
|
|
||||||
// component: "BasicInput",
|
|
||||||
// componentProps: {},
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// field: "bzrBjId",
|
|
||||||
// label: "班主任班级",
|
|
||||||
// component: "BasicDataPicker",
|
|
||||||
// componentProps: {
|
|
||||||
// api: findAllNjBjTreeApi,
|
|
||||||
// rangeKey: "title",
|
|
||||||
// savaKey: "key",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
/*{
|
|
||||||
field: "dzzw",
|
|
||||||
label: "职务",
|
|
||||||
component: "BasicPicker",
|
|
||||||
componentProps: {
|
|
||||||
api: findByPid,
|
|
||||||
param: { pid: 1063530116 },
|
|
||||||
rangeKey: "dictionaryValue",
|
|
||||||
savaKey: "dictionaryCode",
|
|
||||||
},
|
|
||||||
},*/
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const education = reactive<any>({
|
const education = reactive<any>({
|
||||||
xl: [{ value: {} }],
|
xl: [{ value: {} }],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (getJs.rgqkList && getJs.rgqkList.length > 0) {
|
// 移除这段提前执行的代码
|
||||||
education.xl = map(getJs.rgqkList, (item) => {
|
// if (getJs.rgqkList && getJs.rgqkList.length > 0) {
|
||||||
return { value: item };
|
// education.xl = map(getJs.rgqkList, (item) => {
|
||||||
});
|
// return { value: item };
|
||||||
|
// });
|
||||||
|
|
||||||
// 回显数据后,直接使用数据库返回的gwrznx值,不重新计算
|
// // 回显数据后,直接使用数据库返回的gwrznx值,不重新计算
|
||||||
nextTick(() => {
|
// nextTick(() => {
|
||||||
education.xl.forEach((item: any, index: number) => {
|
// education.xl.forEach((item: any, index: number) => {
|
||||||
console.log(`回显数据-表单项${index}数据:`, {
|
// console.log(`回显数据-表单项${index}数据:`, {
|
||||||
gwrzkstime: item.value.gwrzkstime,
|
// gwrzkstime: item.value.gwrzkstime,
|
||||||
gwrzjstime: item.value.gwrzjstime,
|
// gwrzjstime: item.value.gwrzjstime,
|
||||||
gwrznx: item.value.gwrznx, // 直接使用数据库返回的值
|
// gwrznx: item.value.gwrznx, // 直接使用数据库返回的值
|
||||||
来源: "数据库回显",
|
// 来源: "数据库回显",
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
// 强制重新渲染确保界面更新
|
// // 强制重新渲染确保界面更新
|
||||||
forceUpdateKey.value++;
|
// forceUpdateKey.value++;
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
function addEducation() {
|
function addEducation() {
|
||||||
education.xl.push({ value: {} });
|
education.xl.push({ value: {} });
|
||||||
@ -243,6 +217,7 @@ function deleteMemberFamily(index: number, item: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
|
showLoading({ title: "正在加载工作经历信息..." });
|
||||||
setJs({
|
setJs({
|
||||||
...getJs,
|
...getJs,
|
||||||
rgqkList: map(education.xl, (item) => {
|
rgqkList: map(education.xl, (item) => {
|
||||||
@ -250,6 +225,7 @@ function submit() {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
navigateTo("/pages/view/hr/teacherProfile/ExperienceInfo");
|
navigateTo("/pages/view/hr/teacherProfile/ExperienceInfo");
|
||||||
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 组件挂载完成后处理回显数据
|
// 组件挂载完成后处理回显数据
|
||||||
@ -262,18 +238,33 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
getJs.rgqkList = res.rows || [];
|
getJs.rgqkList = res.rows || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getJs.rgqkList && getJs.rgqkList.length > 0) {
|
if (getJs.rgqkList && getJs.rgqkList.length > 0) {
|
||||||
nextTick(() => {
|
// 设置数据到表单
|
||||||
console.log("组件挂载后处理回显数据,直接使用数据库返回的gwrznx值");
|
education.xl = map(getJs.rgqkList, (item) => {
|
||||||
education.xl.forEach((item: any, index: number) => {
|
return { value: item };
|
||||||
console.log(`挂载后-表单项${index}数据:`, {
|
|
||||||
gwrzkstime: item.value.gwrzkstime,
|
|
||||||
gwrzjstime: item.value.gwrzjstime,
|
|
||||||
gwrznx: item.value.gwrznx, // 直接使用数据库返回的值
|
|
||||||
来源: "数据库回显-挂载后",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("数据回显成功,共", getJs.rgqkList.length, "条记录");
|
||||||
|
console.log("回显的数据:", getJs.rgqkList);
|
||||||
|
|
||||||
|
// 显示数据加载完成提示
|
||||||
|
showToast({
|
||||||
|
title: `已加载 ${getJs.rgqkList.length} 条岗位情况信息`,
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 强制重新渲染确保界面更新
|
||||||
forceUpdateKey.value++;
|
forceUpdateKey.value++;
|
||||||
|
} else {
|
||||||
|
console.log("没有岗位情况数据,使用默认空表单");
|
||||||
|
|
||||||
|
// 显示无数据提示
|
||||||
|
showToast({
|
||||||
|
title: "暂无岗位情况信息,请添加",
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import {
|
|||||||
hideLoading,
|
hideLoading,
|
||||||
navigateBack,
|
navigateBack,
|
||||||
showLoading,
|
showLoading,
|
||||||
|
showToast,
|
||||||
} from "@/utils/uniapp";
|
} from "@/utils/uniapp";
|
||||||
const signCompRef = ref<any>(null);
|
const signCompRef = ref<any>(null);
|
||||||
import { imagUrl } from "@/utils";
|
import { imagUrl } from "@/utils";
|
||||||
@ -139,6 +140,13 @@ const srcData = {
|
|||||||
|
|
||||||
setValue(srcData);
|
setValue(srcData);
|
||||||
|
|
||||||
|
// 显示数据加载完成提示
|
||||||
|
showToast({
|
||||||
|
title: "档案材料信息已加载",
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
|
||||||
const sign_file = ref<string>("");
|
const sign_file = ref<string>("");
|
||||||
|
|
||||||
async function submit() {
|
async function submit() {
|
||||||
|
|||||||
@ -52,6 +52,8 @@ import { cloneDeep, get, map } from "lodash";
|
|||||||
import { zcxxFindPageApi } from "@/api/base/zcxxApi";
|
import { zcxxFindPageApi } from "@/api/base/zcxxApi";
|
||||||
import { useUserStore } from "@/store/modules/user";
|
import { useUserStore } from "@/store/modules/user";
|
||||||
import { useDicStore } from "@/store/modules/dic";
|
import { useDicStore } from "@/store/modules/dic";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { showToast, showLoading, hideLoading } from "@/utils/uniapp";
|
||||||
const { findByPid } = useDicStore();
|
const { findByPid } = useDicStore();
|
||||||
const { getJs, setJs } = useUserStore();
|
const { getJs, setJs } = useUserStore();
|
||||||
|
|
||||||
@ -102,6 +104,8 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -127,6 +131,8 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -136,7 +142,7 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
componentProps: {},
|
componentProps: {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "sczczs",
|
field: "zczs",
|
||||||
label: "上传职称证书",
|
label: "上传职称证书",
|
||||||
component: "BasicUpload",
|
component: "BasicUpload",
|
||||||
itemProps: {
|
itemProps: {
|
||||||
@ -144,7 +150,7 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
},
|
},
|
||||||
componentProps: {},
|
componentProps: {},
|
||||||
}, {
|
}, {
|
||||||
field: "pywjh",
|
field: "rzwj",
|
||||||
label: "上传任职文件",
|
label: "上传任职文件",
|
||||||
component: "BasicUpload",
|
component: "BasicUpload",
|
||||||
itemProps: {
|
itemProps: {
|
||||||
@ -153,7 +159,7 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
componentProps: {},
|
componentProps: {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "pywjh",
|
field: "pywj",
|
||||||
label: "上传聘用文件",
|
label: "上传聘用文件",
|
||||||
component: "BasicUpload",
|
component: "BasicUpload",
|
||||||
itemProps: {
|
itemProps: {
|
||||||
@ -178,6 +184,7 @@ function deleteMemberFamily(index: number, item: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
|
showLoading({ title: "正在加载岗位情况信息..." });
|
||||||
setJs({
|
setJs({
|
||||||
...getJs,
|
...getJs,
|
||||||
zcxxList: map(education.xl, (item) => {
|
zcxxList: map(education.xl, (item) => {
|
||||||
@ -185,6 +192,7 @@ function submit() {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
navigateTo("/pages/view/hr/teacherProfile/PositionInfo");
|
navigateTo("/pages/view/hr/teacherProfile/PositionInfo");
|
||||||
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
@ -200,6 +208,20 @@ onMounted(async () => {
|
|||||||
education.xl = map(getJs.zcxxList, (item) => {
|
education.xl = map(getJs.zcxxList, (item) => {
|
||||||
return { value: item };
|
return { value: item };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 显示数据加载完成提示
|
||||||
|
showToast({
|
||||||
|
title: `已加载 ${getJs.zcxxList.length} 条职称信息`,
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 显示无数据提示
|
||||||
|
showToast({
|
||||||
|
title: "暂无职称信息,请添加",
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import { navigateBack, navigateTo } from "@/utils/uniapp";
|
|||||||
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
||||||
import { useUserStore } from "@/store/modules/user";
|
import { useUserStore } from "@/store/modules/user";
|
||||||
import { useDicStore } from "@/store/modules/dic";
|
import { useDicStore } from "@/store/modules/dic";
|
||||||
|
import dayjs from "dayjs";
|
||||||
const { findByPid } = useDicStore();
|
const { findByPid } = useDicStore();
|
||||||
const { getJs, setJs } = useUserStore();
|
const { getJs, setJs } = useUserStore();
|
||||||
|
|
||||||
@ -51,9 +52,11 @@ const [register, { getValue, setValue }] = useForm({
|
|||||||
{
|
{
|
||||||
field: 'dybynytime',
|
field: 'dybynytime',
|
||||||
label: '全日制学历毕业年月',
|
label: '全日制学历毕业年月',
|
||||||
component: 'BasicDateTimes',
|
component: 'BasicDateTime',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: 'month',
|
mode: 'year-month',
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
placeholder: '请选择月份',
|
placeholder: '请选择月份',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -82,9 +85,11 @@ const [register, { getValue, setValue }] = useForm({
|
|||||||
{
|
{
|
||||||
field: 'zhbynytime',
|
field: 'zhbynytime',
|
||||||
label: '最后毕业年月',
|
label: '最后毕业年月',
|
||||||
component: 'BasicDateTimes',
|
component: 'BasicDateTime',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: 'month',
|
mode: 'year-month',
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
placeholder: '请选择月份',
|
placeholder: '请选择月份',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -29,7 +29,6 @@ const calculateYearDiff = (startDate: string) => {
|
|||||||
if (!startDate) return "";
|
if (!startDate) return "";
|
||||||
const start = dayjs(startDate);
|
const start = dayjs(startDate);
|
||||||
const now = dayjs();
|
const now = dayjs();
|
||||||
console.log(now.diff(start, "year"));
|
|
||||||
return now.diff(start, "year");
|
return now.diff(start, "year");
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -61,6 +60,18 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
savaKey: "dictionaryCode",
|
savaKey: "dictionaryCode",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: "age",
|
||||||
|
label: "年龄",
|
||||||
|
component: "BasicInput",
|
||||||
|
componentProps: {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "cstime",
|
||||||
|
label: "出生日期",
|
||||||
|
component: "BasicDateTimes",
|
||||||
|
componentProps: {},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: "jsjgId",
|
field: "jsjgId",
|
||||||
label: "籍贯",
|
label: "籍贯",
|
||||||
@ -94,18 +105,7 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
component: "BasicInput",
|
component: "BasicInput",
|
||||||
componentProps: {},
|
componentProps: {},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: "age",
|
|
||||||
label: "年龄",
|
|
||||||
component: "BasicInput",
|
|
||||||
componentProps: {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: "cstime",
|
|
||||||
label: "出生日期",
|
|
||||||
component: "BasicDateTimes",
|
|
||||||
componentProps: {},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: "zzmmId",
|
field: "zzmmId",
|
||||||
label: "政治面貌",
|
label: "政治面貌",
|
||||||
@ -123,6 +123,8 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -143,6 +145,8 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
ok: (e: any) => {
|
ok: (e: any) => {
|
||||||
const yearDiff = calculateYearDiff(e.value);
|
const yearDiff = calculateYearDiff(e.value);
|
||||||
setValue({ jsgl: yearDiff });
|
setValue({ jsgl: yearDiff });
|
||||||
@ -163,6 +167,8 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
ok: (e: any) => {
|
ok: (e: any) => {
|
||||||
const yearDiff = calculateYearDiff(e.value);
|
const yearDiff = calculateYearDiff(e.value);
|
||||||
setValue({ jl: yearDiff });
|
setValue({ jl: yearDiff });
|
||||||
@ -174,8 +180,8 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
label: "教龄",
|
label: "教龄",
|
||||||
component: "BasicInput",
|
component: "BasicInput",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
disabled: true,
|
|
||||||
placeholder: "请选择教龄时间",
|
placeholder: "请选择教龄时间",
|
||||||
|
disabled: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -184,6 +190,8 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
ok: (e: any) => {
|
ok: (e: any) => {
|
||||||
const yearDiff = calculateYearDiff(e.value);
|
const yearDiff = calculateYearDiff(e.value);
|
||||||
setValue({ jrdwnx: yearDiff });
|
setValue({ jrdwnx: yearDiff });
|
||||||
@ -232,7 +240,15 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
rangeKey: "dictionaryValue",
|
rangeKey: "dictionaryValue",
|
||||||
savaKey: "dictionaryCode",
|
savaKey: "dictionaryCode",
|
||||||
ok: (e: any, form: any, attrs: any) => {
|
ok: (e: any, form: any, attrs: any) => {
|
||||||
if (attrs[e].dictionaryValue == "调出") {
|
const selectedValue = form?.value;
|
||||||
|
if (selectedValue === "调出") {
|
||||||
|
setSchema([
|
||||||
|
{
|
||||||
|
field: "dcyy",
|
||||||
|
ifShow: true,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
setSchema([
|
setSchema([
|
||||||
{
|
{
|
||||||
field: "dcyy",
|
field: "dcyy",
|
||||||
@ -246,32 +262,12 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
{
|
{
|
||||||
field: "dcyy",
|
field: "dcyy",
|
||||||
label: "调出原因",
|
label: "调出原因",
|
||||||
ifShow: true,
|
|
||||||
component: "BasicInput",
|
component: "BasicInput",
|
||||||
componentProps: {},
|
|
||||||
},
|
|
||||||
/* {
|
|
||||||
field: "gwjbId",
|
|
||||||
label: "岗位级别",
|
|
||||||
component: "BasicPicker",
|
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: findByPid,
|
placeholder: "请输入调出原因",
|
||||||
param: { pid: 260783972 },
|
|
||||||
rangeKey: "dictionaryValue",
|
|
||||||
savaKey: "dictionaryCode",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: "xqxjId",
|
|
||||||
label: "薪级",
|
|
||||||
component: "BasicPicker",
|
|
||||||
componentProps: {
|
|
||||||
api: findByPid,
|
|
||||||
param: { pid: 434953981 },
|
|
||||||
rangeKey: "dictionaryValue",
|
|
||||||
savaKey: "dictionaryCode",
|
|
||||||
},
|
|
||||||
},*/
|
|
||||||
{
|
{
|
||||||
field: "sbkh",
|
field: "sbkh",
|
||||||
label: "社保卡号",
|
label: "社保卡号",
|
||||||
@ -290,7 +286,12 @@ if (getJs.zdqkId == "调出") {
|
|||||||
ifShow: false,
|
ifShow: false,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}else setSchema([
|
||||||
|
{
|
||||||
|
field: "dcyy",
|
||||||
|
ifShow: true,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
async function submit() {
|
async function submit() {
|
||||||
try {
|
try {
|
||||||
@ -309,3 +310,5 @@ async function submit() {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
import { navigateBack, navigateTo } from "@/utils/uniapp";
|
import { navigateBack, navigateTo } from "@/utils/uniapp";
|
||||||
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
||||||
import { useUserStore } from "@/store/modules/user";
|
import { useUserStore } from "@/store/modules/user";
|
||||||
|
import { showLoading, hideLoading } from "@/utils/uniapp";
|
||||||
const { getJs, setJs } = useUserStore();
|
const { getJs, setJs } = useUserStore();
|
||||||
import { zwGetListByLxApi, findAllXxXqNjTree } from "@/api/base/server";
|
import { zwGetListByLxApi, findAllXxXqNjTree } from "@/api/base/server";
|
||||||
|
|
||||||
@ -55,46 +56,6 @@ const formSchema: any = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// field: "zrxk",
|
|
||||||
// label: "主任学科",
|
|
||||||
// component: "BasicPicker",
|
|
||||||
// componentProps: {
|
|
||||||
// api: kmFindAllApi,
|
|
||||||
// rangeKey: "kmmc",
|
|
||||||
// savaKey: "id",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// field: "zrbj",
|
|
||||||
// label: "主任班级",
|
|
||||||
// component: "BasicPicker",
|
|
||||||
// componentProps: {
|
|
||||||
// api: findAllNjBjTreeApi,
|
|
||||||
// rangeKey: "title",
|
|
||||||
// savaKey: "key",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// field: "jrxk",
|
|
||||||
// label: "兼任学科",
|
|
||||||
// component: "BasicPicker",
|
|
||||||
// componentProps: {
|
|
||||||
// api: kmFindAllApi,
|
|
||||||
// rangeKey: "kmmc",
|
|
||||||
// savaKey: "id",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// field: "jrbj",
|
|
||||||
// label: "兼任班级",
|
|
||||||
// component: "BasicPicker",
|
|
||||||
// componentProps: {
|
|
||||||
// api: findAllNjBjTreeApi,
|
|
||||||
// rangeKey: "title",
|
|
||||||
// savaKey: "key",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
field: "njId",
|
field: "njId",
|
||||||
label: "所属年级",
|
label: "所属年级",
|
||||||
@ -139,9 +100,23 @@ async function submit() {
|
|||||||
if (Array.isArray(value.qtzw)) {
|
if (Array.isArray(value.qtzw)) {
|
||||||
value.qtzw = value.qtzw.join(',');
|
value.qtzw = value.qtzw.join(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 保存数据
|
||||||
setJs({ ...getJs, ...value });
|
setJs({ ...getJs, ...value });
|
||||||
|
|
||||||
|
// 显示加载提示
|
||||||
|
showLoading("正在加载职称信息...");
|
||||||
|
|
||||||
|
// 延迟跳转,让用户看到加载提示
|
||||||
|
setTimeout(() => {
|
||||||
|
hideLoading();
|
||||||
navigateTo("/pages/view/hr/teacherProfile/TitleInfo");
|
navigateTo("/pages/view/hr/teacherProfile/TitleInfo");
|
||||||
} catch (error) { }
|
}, 500);
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
hideLoading();
|
||||||
|
console.error("提交失败:", error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
@ -70,6 +70,8 @@ const [register, { getValue, setValue }] = useForm({
|
|||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
minDate: dayjs('1950-01-01').valueOf(), // 转换为时间戳
|
||||||
|
maxDate: dayjs().valueOf(), // 当前年月
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user