教师档案调整
This commit is contained in:
parent
7a05e5e544
commit
f60f7c759e
@ -122,7 +122,9 @@ const schema = reactive<FormsSchema[]>([
|
||||
field: "qqtime",
|
||||
label: "起聘时间",
|
||||
component: "BasicDateTimes",
|
||||
componentProps: {},
|
||||
componentProps: {
|
||||
mode: "year-month",
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "pywjh",
|
||||
|
||||
@ -19,27 +19,10 @@ import { dicApi, findDicTreeByPidApi } from "@/api/system/dic";
|
||||
import { useDataStore } from "@/store/modules/data";
|
||||
import { map } from "lodash";
|
||||
import dayjs from "dayjs";
|
||||
import chinaCitys from "@/api/base/ChinaCitys.json";
|
||||
|
||||
const { getFile, setFile } = useDataStore();
|
||||
const jsjg = ref("");
|
||||
|
||||
// 转换省市区数据为树形结构
|
||||
const cityTreeData = computed(() => {
|
||||
return chinaCitys.map(province => ({
|
||||
text: province.province,
|
||||
value: province.code,
|
||||
children: province.citys.map(city => ({
|
||||
text: city.city,
|
||||
value: city.code,
|
||||
children: city.areas.map(area => ({
|
||||
text: area.area,
|
||||
value: area.code
|
||||
}))
|
||||
}))
|
||||
}));
|
||||
});
|
||||
|
||||
// 计算日期与当前日期相差的年数
|
||||
const calculateYearDiff = (startDate: string) => {
|
||||
if (!startDate) return "";
|
||||
@ -82,15 +65,15 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
||||
label: "籍贯",
|
||||
component: "BasicDataPicker",
|
||||
componentProps: {
|
||||
range: cityTreeData.value,
|
||||
rangeKey: "text",
|
||||
savaKey: "value",
|
||||
api: findDicTreeByPidApi,
|
||||
param: { pid: 100 },
|
||||
rangeKey: "dictionaryValue",
|
||||
savaKey: "dictionaryCode",
|
||||
onChange: (e: any) => {
|
||||
const selectedNodes = e.detail.data;
|
||||
if (selectedNodes && selectedNodes.length > 0) {
|
||||
jsjg.value = selectedNodes.map((node: any) => node.text).join("");
|
||||
}
|
||||
}
|
||||
jsjg.value = map(e.detail.value, (item) => {
|
||||
return item.text;
|
||||
}).join("");
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -175,12 +158,12 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
||||
},
|
||||
{
|
||||
field: "jsTime",
|
||||
label: "任教开始时间",
|
||||
label: "教龄计算时间",
|
||||
component: "BasicDateTime",
|
||||
componentProps: {
|
||||
mode: "year-month",
|
||||
ok: (e: any) => {
|
||||
const yearDiff = calculateYearDiff(e);
|
||||
const yearDiff = calculateYearDiff(e.value);
|
||||
setValue({ jl: yearDiff });
|
||||
},
|
||||
},
|
||||
@ -266,7 +249,7 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
||||
component: "BasicInput",
|
||||
componentProps: {},
|
||||
},
|
||||
/*{
|
||||
/* {
|
||||
field: "gwjbId",
|
||||
label: "岗位级别",
|
||||
component: "BasicPicker",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user