2025-04-22 10:22:33 +08:00
|
|
|
<template>
|
2025-05-13 15:39:44 +08:00
|
|
|
<BasicLayout>
|
|
|
|
|
<view class="p-15">
|
|
|
|
|
<view v-if="education.xl.length > 0">
|
|
|
|
|
<template v-for="(item, index) in education.xl" :key="index">
|
|
|
|
|
<view class="po-re mb-15">
|
|
|
|
|
<BasicForm
|
|
|
|
|
v-model="item.value"
|
|
|
|
|
:schema="schema"
|
|
|
|
|
:formsProps="{ labelWidth: 100 }"
|
|
|
|
|
/>
|
|
|
|
|
<view
|
|
|
|
|
@click="deleteMemberFamily(index as number, item.value)"
|
|
|
|
|
class="delete-icon"
|
|
|
|
|
>
|
|
|
|
|
<BasicIcon type="clear" size="30" />
|
2025-04-22 10:22:33 +08:00
|
|
|
</view>
|
2025-05-13 15:39:44 +08:00
|
|
|
</view>
|
|
|
|
|
</template>
|
2025-04-22 10:22:33 +08:00
|
|
|
</view>
|
2025-05-13 15:39:44 +08:00
|
|
|
<view
|
|
|
|
|
class="flex-row items-center justify-center pb-10 pt-5"
|
|
|
|
|
style="border: 1px solid #e8e8e8"
|
|
|
|
|
@click="addEducation"
|
|
|
|
|
>
|
|
|
|
|
<uni-icons type="plus" size="16" color="#447ADE"></uni-icons>
|
|
|
|
|
<view class="ml-5 cor-447ADE">新增</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<template #bottom>
|
|
|
|
|
<view class="flex-row items-center pb-10 pt-5">
|
|
|
|
|
<u-button
|
2025-06-10 23:40:49 +08:00
|
|
|
text="上一步"
|
2025-05-13 15:39:44 +08:00
|
|
|
class="ml-15 mr-7"
|
|
|
|
|
:plain="true"
|
|
|
|
|
@click="navigateBack"
|
|
|
|
|
/>
|
|
|
|
|
<u-button
|
|
|
|
|
text="下一步"
|
|
|
|
|
class="mr-15 mr-7"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="submit"
|
|
|
|
|
/>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicLayout>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { navigateTo, navigateBack } from "@/utils/uniapp";
|
|
|
|
|
import { cloneDeep, map } from "lodash";
|
2025-07-18 14:20:12 +08:00
|
|
|
import { jtcyFindPageApi } from "@/api/base/jtcyApi";
|
|
|
|
|
import { useUserStore } from "@/store/modules/user";
|
2025-07-15 22:29:36 +08:00
|
|
|
import { useDicStore } from "@/store/modules/dic";
|
|
|
|
|
const { findByPid } = useDicStore();
|
2025-07-18 14:20:12 +08:00
|
|
|
const { getJs, setJs } = useUserStore();
|
2025-05-13 15:39:44 +08:00
|
|
|
|
|
|
|
|
const schema = reactive<FormsSchema[]>([
|
|
|
|
|
{
|
|
|
|
|
field: "jtcygxId",
|
|
|
|
|
label: "与本人关系",
|
|
|
|
|
component: "BasicPicker",
|
|
|
|
|
componentProps: {
|
2025-07-15 22:29:36 +08:00
|
|
|
api: findByPid,
|
2025-05-13 15:39:44 +08:00
|
|
|
param: { pid: 1066646708 },
|
|
|
|
|
rangeKey: "dictionaryValue",
|
|
|
|
|
savaKey: "dictionaryCode",
|
2025-04-22 10:22:33 +08:00
|
|
|
},
|
2025-05-13 15:39:44 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "xm",
|
|
|
|
|
label: "姓名",
|
|
|
|
|
component: "BasicInput",
|
|
|
|
|
componentProps: {},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "cstime",
|
|
|
|
|
label: "出生日期",
|
|
|
|
|
component: "BasicDateTimes",
|
|
|
|
|
componentProps: {},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "gzdw",
|
|
|
|
|
label: "工作单位",
|
|
|
|
|
component: "BasicInput",
|
|
|
|
|
componentProps: {},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "zw",
|
|
|
|
|
label: "职务",
|
|
|
|
|
component: "BasicInput",
|
|
|
|
|
componentProps: {},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "lxdh",
|
|
|
|
|
label: "联系电话",
|
|
|
|
|
component: "BasicInput",
|
|
|
|
|
componentProps: {},
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const education = reactive<any>({
|
|
|
|
|
xl: [{ value: {} }],
|
|
|
|
|
});
|
|
|
|
|
function addEducation() {
|
|
|
|
|
education.xl.push({ value: {} });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function deleteMemberFamily(index: number, item: any) {
|
|
|
|
|
const list = cloneDeep(education.xl);
|
|
|
|
|
list.splice(index, 1);
|
|
|
|
|
education.xl = list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function submit() {
|
2025-07-18 14:20:12 +08:00
|
|
|
setJs({
|
|
|
|
|
...getJs,
|
2025-05-13 15:39:44 +08:00
|
|
|
jtcyList: map(education.xl, (item) => {
|
|
|
|
|
return item.value;
|
|
|
|
|
}),
|
2025-04-22 10:22:33 +08:00
|
|
|
});
|
2025-06-11 23:35:00 +08:00
|
|
|
// navigateTo("/pages/view/hr/teacherProfile/PersonalHonor");
|
|
|
|
|
navigateTo("/pages/view/hr/teacherProfile/RecordMaterials");
|
2025-05-13 15:39:44 +08:00
|
|
|
}
|
2025-07-18 14:20:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
if (!getJs.jtcyList || !getJs.jtcyList.length) {
|
|
|
|
|
const res = await jtcyFindPageApi({
|
|
|
|
|
jsId: getJs.id,
|
|
|
|
|
page: 1,
|
|
|
|
|
size: 100,
|
|
|
|
|
});
|
|
|
|
|
getJs.jtcyList = res.rows || [];
|
|
|
|
|
}
|
|
|
|
|
if (getJs.jtcyList && getJs.jtcyList.length > 0) {
|
|
|
|
|
education.xl = map(getJs.jtcyList, (item) => {
|
|
|
|
|
return { value: item };
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-05-13 15:39:44 +08:00
|
|
|
</script>
|
|
|
|
|
<style>
|
|
|
|
|
.delete-icon {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: -13px;
|
|
|
|
|
top: -14px;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
}
|
|
|
|
|
</style>
|