修复教师档案反显问题

This commit is contained in:
ywyonui 2025-07-18 14:20:12 +08:00
parent 20d7d6c8c8
commit 26a32b8da5
18 changed files with 556 additions and 257 deletions

26
src/api/base/gwqkApi.ts Normal file
View File

@ -0,0 +1,26 @@
// 参数接口
// 响应接口
import { get, post } from "@/utils/request";
/**
*
*/
export function gwqkFindPageApi(params: any) {
return get('/api/gwqk/findPage', params);
}
/**
* /
*/
export function gwqkSaveApi(params: any) {
return post('/api/gwqk/save', params);
}
/**
* /
*/
export function gwqkLogicDeleteApi(params: any) {
return post('/api/gwqk/logicDelete', params);
}

66
src/api/base/gzjlApi.ts Normal file
View File

@ -0,0 +1,66 @@
// 参数接口
// 响应接口
import { get, post } from "@/utils/request";
/**
*
*/
export function gzjlFindPageApi(params: any) {
return get('/api/gzjl/findPage', params);
}
/**
* /
*/
export function gzjlSaveApi(params: any) {
return post('/api/gzjl/save', params);
}
/**
*
*/
export function gzjlLogicDeleteApi(params: any) {
return post('/api/gzjl/logicDelete', params);
}
/**
* id查询
*/
export function gzjlFindByIdApi(params: any) {
return get('/api/gzjl/findById', params);
}
/**
*
*/
export function gzjlFindAllApi() {
return get('/api/gzjl/findAll');
}
/**
*
*/
export function gzjlExportFieldChooseApi(params: any) {
return get('/api/gzjl/exportFieldChoose', params);
}
/**
*
*/
export function gzjlExportFileApi(params: any) {
return post('/api/gzjl/export', params);
}
/**
*
*/
export function gzjlImportDataApi(params: any) {
return post('/api/gzjl/importData', params);
}
/**
*
* @param {*} parameter
*/
export function gzjlDelApi(parameter: any) {
return post('/api/gzjl/delete', parameter);
}

66
src/api/base/jtcyApi.ts Normal file
View File

@ -0,0 +1,66 @@
// 参数接口
// 响应接口
import { get, post } from "@/utils/request";
/**
*
*/
export function jtcyFindPageApi(params: any) {
return get('/api/jtcy/findPage', params);
}
/**
* /
*/
export function jtcySaveApi(params: any) {
return post('/api/jtcy/save', params);
}
/**
*
*/
export function jtcyLogicDeleteApi(params: any) {
return post('/api/jtcy/logicDelete', params);
}
/**
* id查询
*/
export function jtcyFindByIdApi(params: any) {
return get('/api/jtcy/findById', params);
}
/**
*
*/
export function jtcyFindAllApi() {
return get('/api/jtcy/findAll');
}
/**
*
*/
export function jtcyExportFieldChooseApi(params: any) {
return get('/api/jtcy/exportFieldChoose', params);
}
/**
*
*/
export function jtcyExportFileApi(params: any) {
return post('/api/jtcy/export', params);
}
/**
*
*/
export function jtcyImportDataApi(params: any) {
return post('/api/jtcy/importData', params);
}
/**
*
* @param {*} parameter
*/
export function jtcyDelApi(parameter: any) {
return post('/api/jtcy/delete', parameter);
}

View File

@ -55,6 +55,10 @@ export const fractionRuleApi1 = async () => {
);
};
export const zwGetListByLxApi = async (params: any) => {
return await get("/api/zw/getListByLx", params);
};
// 查询教师信息
export const jsdfindJsByPhoneApi = async (params: any) => {
return await get("/api/js/findJsByPhone", params);

26
src/api/base/zcxxApi.ts Normal file
View File

@ -0,0 +1,26 @@
// 参数接口
// 响应接口
import { get, post } from "@/utils/request";
/**
*
*/
export function zcxxFindPageApi(params: any) {
return get('/api/zcxx/findPage', params);
}
/**
* /
*/
export function zcxxSaveApi(params: any) {
return post('/api/zcxx/save', params);
}
/**
* /
*/
export function zcxxLogicDeleteApi(params: any) {
return post('/api/zcxx/logicDelete', params);
}

View File

@ -1,12 +1,12 @@
<template>
<view class="wh-full">
<BasicUpload v-bind="attrs.componentProps" v-model="newValue"></BasicUpload>
<BasicUpload v-bind="attrs.componentProps" v-model="newValue" :multiple="multiple"></BasicUpload>
</view>
</template>
<script setup lang="ts">
const attrs: any = useAttrs()
const props = defineProps(['modelValue'])
const props = defineProps(['modelValue', 'multiple'])
const emit = defineEmits(['update:modelValue'])
const newValue = computed({
get() {

View File

@ -68,7 +68,8 @@ async function afterRead(event: any) {
for (let i = 0; i < lists.length; i++) {
showLoading({title: '上传中'})
const {result} = await attachmentUpload(lists[i].url)
const res:any = await attachmentUpload(lists[i].url)
const result = res.result
hideLoading()
let item = data.fileList[fileListLen]
data.fileList.splice(fileListLen, 1, Object.assign(item, {

View File

@ -12,7 +12,8 @@ export const BASE_URL: string =
// WebSocket地址
export const BASE_WS_URL: string = `wss://${ip}`;
//图片地址
export const BASE_IMAGE_URL: string = process.env.NODE_ENV == "development" ? `https://${ip}` : `https://${fwqip}`;
// export const BASE_IMAGE_URL: string = process.env.NODE_ENV == "development" ? `https://${ip}` : `https://${fwqip}`;
export const BASE_IMAGE_URL = `http://${fwqip}`;
//存token的key
export const AUTH_KEY: string = "satoken";
//token过期返回状态码

View File

@ -237,7 +237,8 @@ const handleVerify = async () => {
async function afterRead(event: any) {
showLoading({title: "上传中"});
const {result} = await attachmentUpload(event.tempFilePaths[0]);
const res:any = await attachmentUpload(event.tempFilePaths[0]);
const result = res.result;
hideLoading();
formData.avatarUrl = result[0].filePath;
}

View File

@ -48,9 +48,11 @@
</template>
<script lang="ts" setup>
import {useDataStore} from "@/store/modules/data";
import {navigateBack, navigateTo} from "@/utils/uniapp";
import { gzjlFindPageApi } from "@/api/base/gzjlApi";
import {cloneDeep, map} from "lodash";
import { useUserStore } from "@/store/modules/user";
const { getJs, setJs } = useUserStore();
const schema = reactive<FormsSchema[]>([
{
@ -86,13 +88,6 @@ const education = reactive<any>({
xl: [{ value: {} }],
});
const { getFile, setFile } = useDataStore();
if (getFile.gzjlList && getFile.gzjlList.length > 0) {
education.xl = map(getFile.gzjlList, (item) => {
return { value: item };
});
}
function addEducation() {
education.xl.push({ value: {} });
}
@ -104,14 +99,30 @@ function deleteMemberFamily(index: number, item: any) {
}
function submit() {
setFile({
...getFile,
setJs({
...getJs,
gzjlList: map(education.xl, (item) => {
return item.value;
}),
});
navigateTo("/pages/view/hr/teacherProfile/FamilyInfo");
}
onMounted(async () => {
if (!getJs.gzjlList || !getJs.gzjlList.length) {
const res = await gzjlFindPageApi({
jsId: getJs.id,
page: 1,
size: 100,
});
getJs.gzjlList = res.rows || [];
}
if (getJs.gzjlList && getJs.gzjlList.length > 0) {
education.xl = map(getJs.gzjlList, (item) => {
return { value: item };
});
}
})
</script>
<style>
.delete-icon {

View File

@ -47,11 +47,13 @@
</template>
<script lang="ts" setup>
import { useDataStore } from "@/store/modules/data";
import { navigateTo, navigateBack } from "@/utils/uniapp";
import { cloneDeep, map } from "lodash";
import { jtcyFindPageApi } from "@/api/base/jtcyApi";
import { useUserStore } from "@/store/modules/user";
import { useDicStore } from "@/store/modules/dic";
const { findByPid } = useDicStore();
const { getJs, setJs } = useUserStore();
const schema = reactive<FormsSchema[]>([
{
@ -100,12 +102,6 @@ const schema = reactive<FormsSchema[]>([
const education = reactive<any>({
xl: [{ value: {} }],
});
const { getFile, setFile } = useDataStore();
if (getFile.jtcyList && getFile.jtcyList.length > 0) {
education.xl = map(getFile.jtcyList, (item) => {
return { value: item };
});
}
function addEducation() {
education.xl.push({ value: {} });
}
@ -117,8 +113,8 @@ function deleteMemberFamily(index: number, item: any) {
}
function submit() {
setFile({
...getFile,
setJs({
...getJs,
jtcyList: map(education.xl, (item) => {
return item.value;
}),
@ -126,6 +122,23 @@ function submit() {
// navigateTo("/pages/view/hr/teacherProfile/PersonalHonor");
navigateTo("/pages/view/hr/teacherProfile/RecordMaterials");
}
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 };
});
}
})
</script>
<style>
.delete-icon {

View File

@ -49,11 +49,13 @@
</template>
<script lang="ts" setup>
import { useDataStore } from "@/store/modules/data";
import { navigateBack, navigateTo } from "@/utils/uniapp";
import { gwqkFindPageApi } from "@/api/base/gwqkApi";
import { cloneDeep, map } from "lodash";
import { useUserStore } from "@/store/modules/user";
import { useDicStore } from "@/store/modules/dic";
const { findByPid } = useDicStore();
const { getJs, setJs } = useUserStore();
import dayjs from "dayjs";
//
@ -206,9 +208,8 @@ const education = reactive<any>({
xl: [{ value: {} }],
});
const { getFile, setFile } = useDataStore();
if (getFile.rgqkList && getFile.rgqkList.length > 0) {
education.xl = map(getFile.rgqkList, (item) => {
if (getJs.rgqkList && getJs.rgqkList.length > 0) {
education.xl = map(getJs.rgqkList, (item) => {
return { value: item };
});
@ -242,8 +243,8 @@ function deleteMemberFamily(index: number, item: any) {
}
function submit() {
setFile({
...getFile,
setJs({
...getJs,
rgqkList: map(education.xl, (item) => {
return item.value;
}),
@ -252,9 +253,16 @@ function submit() {
}
//
onMounted(() => {
// 使gwrznx
if (getFile.rgqkList && getFile.rgqkList.length > 0) {
onMounted(async () => {
if (!getJs.rgqkList || !getJs.rgqkList.length) {
const res = await gwqkFindPageApi({
jsId: getJs.id,
page: 1,
size: 100,
});
getJs.rgqkList = res.rows || [];
}
if (getJs.rgqkList && getJs.rgqkList.length > 0) {
nextTick(() => {
console.log("组件挂载后处理回显数据直接使用数据库返回的gwrznx值");
education.xl.forEach((item: any, index: number) => {

View File

@ -25,22 +25,27 @@
<script setup lang="ts">
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import {
hideLoading,
navigateBack,
navigateTo,
showLoading,
} from "@/utils/uniapp";
import { cloneDeep } from "lodash";
const leaveId = ref<string | null>(null);
const signCompRef = ref<any>(null);
import { imagUrl } from "@/utils";
import { useForm } from "@/components/BasicForm/hooks/useForm";
import { useDataStore } from "@/store/modules/data";
import { jsConfirmJsDataApi } from "@/api/base/server";
import { useUserStore } from "@/store/modules/user";
const { getJs, setJs } = useUserStore();
const { getGlobal } = useDataStore();
const signTitle = ref<string>("签名");
const componentProps = {
multiple: false, //
maxCount: 1 //
}
const [register, { getValue, setValue }] = useForm({
formsProps: {
labelWidth: 120,
@ -53,7 +58,7 @@ const [register, { getValue, setValue }] = useForm({
itemProps: {
labelPosition: "top",
},
componentProps: {},
componentProps: componentProps,
},
{
field: "sfzghy",
@ -62,7 +67,7 @@ const [register, { getValue, setValue }] = useForm({
itemProps: {
labelPosition: "top",
},
componentProps: {},
componentProps: componentProps,
},
{
field: "dyxlbyz",
@ -71,7 +76,7 @@ const [register, { getValue, setValue }] = useForm({
itemProps: {
labelPosition: "top",
},
componentProps: {},
componentProps: componentProps,
},
{
field: "dyxlxwz",
@ -80,7 +85,7 @@ const [register, { getValue, setValue }] = useForm({
itemProps: {
labelPosition: "top",
},
componentProps: {},
componentProps: componentProps,
},
{
field: "zgxlbyz",
@ -89,7 +94,7 @@ const [register, { getValue, setValue }] = useForm({
itemProps: {
labelPosition: "top",
},
componentProps: {},
componentProps: componentProps,
},
{
field: "zgxlxwz",
@ -98,7 +103,7 @@ const [register, { getValue, setValue }] = useForm({
itemProps: {
labelPosition: "top",
},
componentProps: {},
componentProps: componentProps,
},
{
field: "pthzm",
@ -107,7 +112,7 @@ const [register, { getValue, setValue }] = useForm({
itemProps: {
labelPosition: "top",
},
componentProps: {},
componentProps: componentProps,
},
{
field: "jszgz",
@ -116,13 +121,23 @@ const [register, { getValue, setValue }] = useForm({
itemProps: {
labelPosition: "top",
},
componentProps: {},
componentProps: componentProps,
},
],
});
const { getFile, setFile, getGlobal } = useDataStore();
setValue(getFile);
const srcData = {
sfzrxy: imagUrl(getJs.sfzrxy),
sfzghy: imagUrl(getJs.sfzghy),
dyxlbyz: imagUrl(getJs.dyxlbyz),
dyxlxwz: imagUrl(getJs.dyxlxwz),
zgxlbyz: imagUrl(getJs.zgxlbyz),
zgxlxwz: imagUrl(getJs.zgxlxwz),
pthzm: imagUrl(getJs.pthzm),
jszgz: imagUrl(getJs.jszgz),
}
setValue(srcData);
const sign_file = ref<string>("");
@ -134,11 +149,11 @@ async function submit() {
}
showLoading("提交中...");
const params = {
...getFile,
...getJs,
...value,
sign_file: sign_file.value,
};
setFile(params);
setJs(params);
const res = await jsConfirmJsDataApi(params);
hideLoading();
if (res.resultCode === 1) {

View File

@ -47,11 +47,14 @@
</template>
<script lang="ts" setup>
import { useDataStore } from "@/store/modules/data";
import { navigateBack, navigateTo } from "@/utils/uniapp";
import { cloneDeep, map } from "lodash";
import { cloneDeep, get, map } from "lodash";
import { zcxxFindPageApi } from "@/api/base/zcxxApi";
import { useUserStore } from "@/store/modules/user";
import { useDicStore } from "@/store/modules/dic";
const { findByPid } = useDicStore();
const { getJs, setJs } = useUserStore();
const schema = reactive<FormsSchema[]>([
{
field: "zcdjId",
@ -159,18 +162,11 @@ const schema = reactive<FormsSchema[]>([
componentProps: {},
},
]);
const { getFile, setFile } = useDataStore();
const education = reactive<any>({
xl: [{ value: {} }],
});
if (getFile.zcxxList && getFile.zcxxList.length > 0) {
education.xl = map(getFile.zcxxList, (item) => {
return { value: item };
});
}
function addEducation() {
education.xl.push({ value: {} });
}
@ -182,14 +178,31 @@ function deleteMemberFamily(index: number, item: any) {
}
function submit() {
setFile({
...getFile,
setJs({
...getJs,
zcxxList: map(education.xl, (item) => {
return item.value;
}),
});
navigateTo("/pages/view/hr/teacherProfile/PositionInfo");
}
onMounted(async () => {
if (!getJs.zcxxList || !getJs.zcxxList.length) {
const res = await zcxxFindPageApi({
jsId: getJs.id,
page: 1,
size: 100,
});
getJs.zcxxList = res.rows || [];
}
if (getJs.zcxxList && getJs.zcxxList.length > 0) {
education.xl = map(getJs.zcxxList, (item) => {
return { value: item };
});
}
})
</script>
<style>
.delete-icon {

View File

@ -5,18 +5,8 @@
</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"
/>
<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>
@ -25,95 +15,105 @@
<script setup lang="ts">
import { navigateBack, navigateTo } from "@/utils/uniapp";
import { useForm } from "@/components/BasicForm/hooks/useForm";
import {useDataStore} from "@/store/modules/data";
import { useUserStore } from "@/store/modules/user";
import { useDicStore } from "@/store/modules/dic";
const { findByPid } = useDicStore();
const { getJs, setJs } = useUserStore();
const { getFile, setFile } = useDataStore();
const [register, { getValue, setValue }] = useForm({
schema: [
{
field: "dyxlId",
label: "初始学历",
component: "BasicPicker",
title: '学历情况',
},
{
field: 'dyxlId',
label: '初始学历',
component: 'BasicPicker',
componentProps: {
range: [], // API
rangeKey: 'dictionaryValue',
savaKey: 'dictionaryCode',
api: findByPid,
param: { pid: 1914632204 },
rangeKey: "dictionaryValue",
savaKey: "dictionaryCode",
},
},
{
field: "dybyyx",
label: "全日制学历毕业院校",
component: "BasicInput",
componentProps: {},
field: 'dybyyx',
label: '全日制学历毕业院校',
component: 'BasicInput',
},
{
field: "dybyzy",
label: "全日制学历专业",
component: "BasicInput",
componentProps: {},
field: 'dybyzy',
label: '全日制学历专业',
component: 'BasicInput',
},
{
field: "zhxlId",
label: "最后学历",
component: "BasicPicker",
field: 'dybynytime',
label: '全日制学历毕业年月',
component: 'BasicDateTimes',
componentProps: {
mode: 'month',
placeholder: '请选择月份',
},
},
{
field: 'zhxlId',
label: '最后学历',
component: 'BasicPicker',
componentProps: {
range: [], // API
rangeKey: 'dictionaryValue',
savaKey: 'dictionaryCode',
api: findByPid,
param: { pid: 1914632204 },
rangeKey: "dictionaryValue",
savaKey: "dictionaryCode",
},
},
{
field: "zhbyyx",
label: "最后学历毕业院校",
component: "BasicInput",
componentProps: {},
field: 'zhbyyx',
label: '最后学历毕业院校',
component: 'BasicInput',
},
{
field: "zhbyzy",
label: "最后学历专业",
component: "BasicInput",
componentProps: {},
field: 'zhbyzy',
label: '最后学历专业',
component: 'BasicInput',
},
{
field: "zhbynytime",
label: "最后学历毕业年月",
component: "BasicDateTime",
field: 'zhbynytime',
label: '最后毕业年月',
component: 'BasicDateTimes',
componentProps: {
mode: "year-month",
mode: 'month',
placeholder: '请选择月份',
},
},
{
field: "xw",
label: "学位",
component: "BasicPicker",
defaultValue: "无",
field: 'xw',
label: '学位',
component: 'BasicPicker',
componentProps: {
range: [], // API
rangeKey: 'dictionaryValue',
savaKey: 'dictionaryCode',
api: findByPid,
param: { pid: 1513282965 },
rangeKey: "dictionaryValue",
savaKey: "dictionaryCode",
},
},
{
field: "xwzy",
label: "学位专业",
component: "BasicInput",
componentProps: {},
field: 'xwzy',
label: '学位专业',
component: 'BasicInput',
},
],
]
});
setValue(getFile);
setValue(getJs);
async function submit() {
try {
const value = await getValue();
setFile({ ...getFile, ...value });
setJs({ ...getJs, ...value });
navigateTo("/pages/view/hr/teacherProfile/qualification");
} catch (error) { }
}

View File

@ -16,13 +16,12 @@ import { navigateTo } from "@/utils/uniapp";
import { useForm } from "@/components/BasicForm/hooks/useForm";
import { findDicTreeByPidApi } from "@/api/system/dic";
import { useDataStore } from "@/store/modules/data";
import { map } from "lodash";
import dayjs from "dayjs";
import { useUserStore } from "@/store/modules/user";
import { useDicStore } from "@/store/modules/dic";
const { findByPid } = useDicStore();
const { getFile, setFile } = useDataStore();
const { getJs, setJs } = useUserStore();
const jsjg = ref("");
//
@ -281,8 +280,10 @@ const [register, { getValue, setValue, setSchema }] = useForm({
},
],
});
setValue(getFile);
if (getFile.zdqkId == "调出") {
setValue(getJs);
if (getJs.zdqkId == "调出") {
setSchema([
{
field: "dcyy",
@ -294,7 +295,7 @@ if (getFile.zdqkId == "调出") {
async function submit() {
try {
const value = await getValue();
setFile({ ...getFile, ...value, jsjg: jsjg.value });
setJs({ ...getJs, ...value, jsjg: jsjg.value });
navigateTo("/pages/view/hr/teacherProfile/education");
} catch (error) {}
}

View File

@ -5,18 +5,8 @@
</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"
/>
<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>
@ -25,19 +15,16 @@
<script setup lang="ts">
import { navigateBack, navigateTo } from "@/utils/uniapp";
import { useForm } from "@/components/BasicForm/hooks/useForm";
import { useDataStore } from "@/store/modules/data";
import { useDicStore } from "@/store/modules/dic";
const { findByPid } = useDicStore();
import {
findAllNjBjTreeApi,
findAllXxXqNjTree,
kmFindAllApi,
} from "@/api/base/server";
import { useUserStore } from "@/store/modules/user";
const { getJs, setJs } = useUserStore();
import { zwGetListByLxApi, findAllXxXqNjTree } from "@/api/base/server";
const { getFile, setFile } = useDataStore();
const [register, { getValue, setValue }] = useForm({
schema: [
let dzZwList: any = [];
let qtZwList: any = [];
const formSchema: any = [
{
title: "任职情况",
},
{
field: "dzzw",
label: "党政职务:",
@ -46,11 +33,11 @@ const [register, { getValue, setValue }] = useForm({
labelPosition: "top",
},
componentProps: {
api: findByPid,
data: [{ label: "书记", value: "1" }],
multiple: true,
param: { pid: 1063530116 },
rangeKey: "dictionaryValue",
savaKey: "dictionaryCode",
onChange(e: any) {
console.log(e);
}
},
},
{
@ -61,11 +48,11 @@ const [register, { getValue, setValue }] = useForm({
labelPosition: "top",
},
componentProps: {
api: findByPid,
data: [{ label: "书记", value: "1" }],
multiple: true,
param: { pid: 246682695 },
rangeKey: "dictionaryValue",
savaKey: "dictionaryCode",
onChange(e: any) {
console.log(e);
}
},
},
// {
@ -128,21 +115,18 @@ const [register, { getValue, setValue }] = useForm({
// savaKey: "key",
// },
// },
],
];
const [register, { getValue, setValue, setSchema }] = useForm({
schema: formSchema
});
if (getFile.dzzw && typeof getFile.dzzw == "string") {
setValue({
...getFile,
dzzw: getFile.dzzw.split(","),
qtzw: getFile.qtzw && typeof getFile.qtzw == "string" ? getFile.qtzw.split(",") : []
});
} else {
setValue({
...getFile,
dzzw: [],
qtzw: getFile.qtzw && typeof getFile.qtzw == "string" ? getFile.qtzw.split(",") : []
});
let dzZw: any = [];
let qtZw: any = [];
if (getJs.dzzw && typeof getJs.dzzw == "string") {
dzZw = getJs.dzzw.split(",");
}
if (getJs.qtzw && typeof getJs.qtzw == "string") {
qtZw = getJs.qtzw.split(",");
}
async function submit() {
@ -155,10 +139,71 @@ async function submit() {
if (Array.isArray(value.qtzw)) {
value.qtzw = value.qtzw.join(',');
}
setFile({ ...getFile, ...value });
setJs({ ...getJs, ...value });
navigateTo("/pages/view/hr/teacherProfile/TitleInfo");
} catch (error) { }
}
onMounted(async () => {
const updateSchema: any = [];
{
const res = await zwGetListByLxApi({ zwlx: '党政职务' });
dzZwList = res.result.map((item: any) => {
return {
label: item.zwmc,
value: item.id
};
});
updateSchema.push({
field: "dzzw",
label: "党政职务:",
component: "BasicCheckbox",
itemProps: {
labelPosition: "top",
},
componentProps: {
data: dzZwList,
multiple: true,
onChange(e: any) {
console.log(e);
}
},
})
};
{
const res = await zwGetListByLxApi({ zwlx: '其他职务' });
qtZwList = res.result.map((item: any) => {
return {
label: item.zwmc,
value: item.id
};
});
updateSchema.push({
field: "qtzw",
label: "其他职务:",
component: "BasicCheckbox",
itemProps: {
labelPosition: "top",
},
componentProps: {
data: qtZwList,
multiple: true,
onChange(e: any) {
console.log(e);
}
},
})
};
setSchema(updateSchema);
nextTick(() => {
setValue({
...getJs,
dzzw: dzZw,
qtzw: qtZw
});
});
});
</script>
<style lang="scss" scoped>

View File

@ -25,15 +25,17 @@
<script setup lang="ts">
import { navigateBack, navigateTo } from "@/utils/uniapp";
import { useForm } from "@/components/BasicForm/hooks/useForm";
import { useDataStore } from "@/store/modules/data";
import dayjs from "dayjs";
import { useUserStore } from "@/store/modules/user";
import { useDicStore } from "@/store/modules/dic";
const { findByPid } = useDicStore();
const { getFile, setFile } = useDataStore();
const { getJs, setJs } = useUserStore();
const [register, { getValue, setValue }] = useForm({
schema: [
{
title: "教师资格",
},
{
field: "zgxdId",
label: "教师资格学段",
@ -93,12 +95,12 @@ const [register, { getValue, setValue }] = useForm({
],
});
setValue(getFile);
setValue(getJs);
async function submit() {
try {
const value = await getValue();
setFile({ ...getFile, ...value });
setJs({ ...getJs, ...value });
navigateTo("/pages/view/hr/teacherProfile/position");
} catch (error) {}
}