修复教师档案反显问题

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) => { export const jsdfindJsByPhoneApi = async (params: any) => {
return await get("/api/js/findJsByPhone", params); 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> <template>
<view class="wh-full"> <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> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const attrs: any = useAttrs() const attrs: any = useAttrs()
const props = defineProps(['modelValue']) const props = defineProps(['modelValue', 'multiple'])
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])
const newValue = computed({ const newValue = computed({
get() { get() {

View File

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

View File

@ -12,7 +12,8 @@ export const BASE_URL: string =
// WebSocket地址 // WebSocket地址
export const BASE_WS_URL: string = `wss://${ip}`; 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 //存token的key
export const AUTH_KEY: string = "satoken"; export const AUTH_KEY: string = "satoken";
//token过期返回状态码 //token过期返回状态码

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -47,11 +47,14 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { useDataStore } from "@/store/modules/data";
import { navigateBack, navigateTo } from "@/utils/uniapp"; 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"; import { useDicStore } from "@/store/modules/dic";
const { findByPid } = useDicStore(); const { findByPid } = useDicStore();
const { getJs, setJs } = useUserStore();
const schema = reactive<FormsSchema[]>([ const schema = reactive<FormsSchema[]>([
{ {
field: "zcdjId", field: "zcdjId",
@ -159,18 +162,11 @@ const schema = reactive<FormsSchema[]>([
componentProps: {}, componentProps: {},
}, },
]); ]);
const { getFile, setFile } = useDataStore();
const education = reactive<any>({ const education = reactive<any>({
xl: [{ value: {} }], xl: [{ value: {} }],
}); });
if (getFile.zcxxList && getFile.zcxxList.length > 0) {
education.xl = map(getFile.zcxxList, (item) => {
return { value: item };
});
}
function addEducation() { function addEducation() {
education.xl.push({ value: {} }); education.xl.push({ value: {} });
} }
@ -182,14 +178,31 @@ function deleteMemberFamily(index: number, item: any) {
} }
function submit() { function submit() {
setFile({ setJs({
...getFile, ...getJs,
zcxxList: map(education.xl, (item) => { zcxxList: map(education.xl, (item) => {
return item.value; return item.value;
}), }),
}); });
navigateTo("/pages/view/hr/teacherProfile/PositionInfo"); 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> </script>
<style> <style>
.delete-icon { .delete-icon {

View File

@ -5,117 +5,117 @@
</view> </view>
<template #bottom> <template #bottom>
<view class="flex-row items-center pb-10 pt-5"> <view class="flex-row items-center pb-10 pt-5">
<u-button <u-button text="上一步" class="ml-15 mr-7" :plain="true" @click="navigateBack" />
text="上一步" <u-button text="下一步" class="mr-15 mr-7" type="primary" @click="submit" />
class="ml-15 mr-7"
:plain="true"
@click="navigateBack"
/>
<u-button
text="下一步"
class="mr-15 mr-7"
type="primary"
@click="submit"
/>
</view> </view>
</template> </template>
</BasicLayout> </BasicLayout>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
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 {useDataStore} from "@/store/modules/data"; import { useUserStore } from "@/store/modules/user";
import { useDicStore } from "@/store/modules/dic"; import { useDicStore } from "@/store/modules/dic";
const { findByPid } = useDicStore(); const { findByPid } = useDicStore();
const { getJs, setJs } = useUserStore();
const { getFile, setFile } = useDataStore();
const [register, { getValue, setValue }] = useForm({ const [register, { getValue, setValue }] = useForm({
schema: [ schema: [
{ {
field: "dyxlId", title: '学历情况',
label: "初始学历", },
component: "BasicPicker", {
field: 'dyxlId',
label: '初始学历',
component: 'BasicPicker',
componentProps: { componentProps: {
range: [], // API
rangeKey: 'dictionaryValue',
savaKey: 'dictionaryCode',
api: findByPid, api: findByPid,
param: { pid: 1914632204 }, param: { pid: 1914632204 },
rangeKey: "dictionaryValue",
savaKey: "dictionaryCode",
}, },
}, },
{ {
field: "dybyyx", field: 'dybyyx',
label: "全日制学历毕业院校", label: '全日制学历毕业院校',
component: "BasicInput", component: 'BasicInput',
componentProps: {},
}, },
{ {
field: "dybyzy", field: 'dybyzy',
label: "全日制学历专业", label: '全日制学历专业',
component: "BasicInput", component: 'BasicInput',
componentProps: {},
}, },
{ {
field: "zhxlId", field: 'dybynytime',
label: "最后学历", label: '全日制学历毕业年月',
component: "BasicPicker", component: 'BasicDateTimes',
componentProps: { componentProps: {
mode: 'month',
placeholder: '请选择月份',
},
},
{
field: 'zhxlId',
label: '最后学历',
component: 'BasicPicker',
componentProps: {
range: [], // API
rangeKey: 'dictionaryValue',
savaKey: 'dictionaryCode',
api: findByPid, api: findByPid,
param: { pid: 1914632204 }, param: { pid: 1914632204 },
rangeKey: "dictionaryValue",
savaKey: "dictionaryCode",
}, },
}, },
{ {
field: "zhbyyx", field: 'zhbyyx',
label: "最后学历毕业院校", label: '最后学历毕业院校',
component: "BasicInput", component: 'BasicInput',
componentProps: {},
}, },
{ {
field: "zhbyzy", field: 'zhbyzy',
label: "最后学历专业", label: '最后学历专业',
component: "BasicInput", component: 'BasicInput',
componentProps: {},
}, },
{ {
field: "zhbynytime", field: 'zhbynytime',
label: "最后学历毕业年月", label: '最后毕业年月',
component: "BasicDateTime", component: 'BasicDateTimes',
componentProps: { componentProps: {
mode: "year-month", mode: 'month',
placeholder: '请选择月份',
}, },
}, },
{ {
field: "xw", field: 'xw',
label: "学位", label: '学位',
component: "BasicPicker", component: 'BasicPicker',
defaultValue: "无",
componentProps: { componentProps: {
range: [], // API
rangeKey: 'dictionaryValue',
savaKey: 'dictionaryCode',
api: findByPid, api: findByPid,
param: { pid: 1513282965 }, param: { pid: 1513282965 },
rangeKey: "dictionaryValue",
savaKey: "dictionaryCode",
}, },
}, },
{ {
field: "xwzy", field: 'xwzy',
label: "学位专业", label: '学位专业',
component: "BasicInput", component: 'BasicInput',
componentProps: {},
}, },
], ]
}); });
setValue(getFile); setValue(getJs);
async function submit() { async function submit() {
try { try {
const value = await getValue(); const value = await getValue();
setFile({ ...getFile, ...value }); setJs({ ...getJs, ...value });
navigateTo("/pages/view/hr/teacherProfile/qualification"); navigateTo("/pages/view/hr/teacherProfile/qualification");
} catch (error) {} } catch (error) { }
} }
</script> </script>

View File

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

View File

@ -5,18 +5,8 @@
</view> </view>
<template #bottom> <template #bottom>
<view class="flex-row items-center pb-10 pt-5"> <view class="flex-row items-center pb-10 pt-5">
<u-button <u-button text="上一步" class="ml-15 mr-7" :plain="true" @click="navigateBack" />
text="上一步" <u-button text="下一步" class="mr-15 mr-7" type="primary" @click="submit" />
class="ml-15 mr-7"
:plain="true"
@click="navigateBack"
/>
<u-button
text="下一步"
class="mr-15 mr-7"
type="primary"
@click="submit"
/>
</view> </view>
</template> </template>
</BasicLayout> </BasicLayout>
@ -25,19 +15,16 @@
<script setup lang="ts"> <script setup lang="ts">
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 { useDataStore } from "@/store/modules/data"; import { useUserStore } from "@/store/modules/user";
import { useDicStore } from "@/store/modules/dic"; const { getJs, setJs } = useUserStore();
const { findByPid } = useDicStore(); import { zwGetListByLxApi, findAllXxXqNjTree } from "@/api/base/server";
import {
findAllNjBjTreeApi,
findAllXxXqNjTree,
kmFindAllApi,
} from "@/api/base/server";
const { getFile, setFile } = useDataStore(); let dzZwList: any = [];
let qtZwList: any = [];
const [register, { getValue, setValue }] = useForm({ const formSchema: any = [
schema: [ {
title: "任职情况",
},
{ {
field: "dzzw", field: "dzzw",
label: "党政职务:", label: "党政职务:",
@ -46,11 +33,11 @@ const [register, { getValue, setValue }] = useForm({
labelPosition: "top", labelPosition: "top",
}, },
componentProps: { componentProps: {
api: findByPid, data: [{ label: "书记", value: "1" }],
multiple: true, multiple: true,
param: { pid: 1063530116 }, onChange(e: any) {
rangeKey: "dictionaryValue", console.log(e);
savaKey: "dictionaryCode", }
}, },
}, },
{ {
@ -61,11 +48,11 @@ const [register, { getValue, setValue }] = useForm({
labelPosition: "top", labelPosition: "top",
}, },
componentProps: { componentProps: {
api: findByPid, data: [{ label: "书记", value: "1" }],
multiple: true, multiple: true,
param: { pid: 246682695 }, onChange(e: any) {
rangeKey: "dictionaryValue", console.log(e);
savaKey: "dictionaryCode", }
}, },
}, },
// { // {
@ -128,21 +115,18 @@ const [register, { getValue, setValue }] = useForm({
// savaKey: "key", // savaKey: "key",
// }, // },
// }, // },
], ];
const [register, { getValue, setValue, setSchema }] = useForm({
schema: formSchema
}); });
if (getFile.dzzw && typeof getFile.dzzw == "string") { let dzZw: any = [];
setValue({ let qtZw: any = [];
...getFile, if (getJs.dzzw && typeof getJs.dzzw == "string") {
dzzw: getFile.dzzw.split(","), dzZw = getJs.dzzw.split(",");
qtzw: getFile.qtzw && typeof getFile.qtzw == "string" ? getFile.qtzw.split(",") : [] }
}); if (getJs.qtzw && typeof getJs.qtzw == "string") {
} else { qtZw = getJs.qtzw.split(",");
setValue({
...getFile,
dzzw: [],
qtzw: getFile.qtzw && typeof getFile.qtzw == "string" ? getFile.qtzw.split(",") : []
});
} }
async function submit() { async function submit() {
@ -155,10 +139,71 @@ async function submit() {
if (Array.isArray(value.qtzw)) { if (Array.isArray(value.qtzw)) {
value.qtzw = value.qtzw.join(','); value.qtzw = value.qtzw.join(',');
} }
setFile({ ...getFile, ...value }); setJs({ ...getJs, ...value });
navigateTo("/pages/view/hr/teacherProfile/TitleInfo"); navigateTo("/pages/view/hr/teacherProfile/TitleInfo");
} catch (error) {} } 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

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