选课调整

This commit is contained in:
hebo 2025-08-13 16:35:20 +08:00
parent 24de489ba8
commit f02f5d06e5
10 changed files with 260 additions and 215 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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
}); });
} }
}); });

View File

@ -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() {

View File

@ -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
});
} }
}) })

View File

@ -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: '请选择月份',
}, },
}, },

View File

@ -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>

View File

@ -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 () => {

View File

@ -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(), //
}, },
}, },
{ {