143 lines
3.0 KiB
Vue
Raw Normal View History

2025-06-10 16:27:34 +08:00
<template>
<BasicLayout>
<view class="px-15 pb-15">
<BasicForm @register="register"> </BasicForm>
</view>
<template #bottom>
<view class="flex-row items-center pb-10 pt-5">
<u-button
text="上一步"
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 setup lang="ts">
import { navigateBack, navigateTo } from "@/utils/uniapp";
import { useForm } from "@/components/BasicForm/hooks/useForm";
import { dicApi } from "@/api/system/dic";
import { useDataStore } from "@/store/modules/data";
import {
findAllNjBjTree,
findAllXxXqNjTree,
kmFindAllApi,
} from "@/api/base/server";
const { getFile, setFile } = useDataStore();
const [register, { getValue, setValue }] = useForm({
schema: [
{
field: "dzzw",
label: "党政职务:",
component: "BasicCheckbox",
itemProps: {
labelPosition: "top",
},
componentProps: {
api: dicApi,
multiple: true,
param: { pid: 1063530116 },
rangeKey: "dictionaryValue",
savaKey: "dictionaryCode",
},
},
{
field: "qtzw",
label: "其他职务",
component: "BasicInput",
componentProps: {},
},
{
field: "zrxk",
label: "主任学科",
component: "BasicPicker",
componentProps: {
api: kmFindAllApi,
rangeKey: "kmmc",
savaKey: "id",
},
},
{
field: "zrbj",
label: "主任班级",
component: "BasicPicker",
componentProps: {
api: kmFindAllApi,
rangeKey: "kmmc",
savaKey: "id",
},
},
{
field: "jrxk",
label: "兼任学科",
component: "BasicPicker",
componentProps: {
api: kmFindAllApi,
rangeKey: "kmmc",
savaKey: "id",
},
},
{
field: "jrbj",
label: "兼任班级",
component: "BasicPicker",
componentProps: {
api: kmFindAllApi,
rangeKey: "kmmc",
savaKey: "id",
},
},
{
field: "njId",
label: "所属年级",
component: "BasicTree",
componentProps: {
api: findAllXxXqNjTree,
rangeKey: "title",
savaKey: "key",
},
},
{
field: "bzrBjId",
label: "班主任班级",
component: "BasicTree",
componentProps: {
api: findAllNjBjTree,
rangeKey: "title",
savaKey: "key",
},
},
],
});
setValue(getFile);
async function submit() {
try {
const value = await getValue();
setFile({ ...getFile, ...value });
navigateTo("/pages/view/hr/teacherProfile/TitleInfo");
} catch (error) {}
}
</script>
<style lang="scss" scoped>
.delete-icon {
position: absolute;
right: 0;
top: 0;
z-index: 1;
}
</style>