调整任职任教

This commit is contained in:
ywyonui 2025-07-21 20:24:23 +08:00
parent 87d90244aa
commit d603640764
2 changed files with 88 additions and 17 deletions

View File

@ -202,4 +202,9 @@ export const drpkkbApi = async (params: any) => {
return await get("/mobile/js/pkkb/drpkkb", params); return await get("/mobile/js/pkkb/drpkkb", params);
}; };
/**
*
*/
export const getRzRjApi = async (params: any) => {
return await get("/mobile/js/getRzRj", params);
};

View File

@ -1,13 +1,14 @@
<template> <template>
<view class="container"> <view class="container">
<view class="content"> <view class="content">
<!-- 党政职务 --> <!-- 党政职务 -->
<view class="section"> <view class="section">
<view class="section-title">党政职务</view> <view class="section-title">党政职务</view>
<view class="position-display"> <view class="position-display">
<text class="position-text" v-for="item in partyPositions" :key="item.id"> <text class="position-text" v-for="item in dzZwList" :key="item.id">
{{ item.name }} {{ item.name }}
</text> </text>
<text class="empty" v-if="!dzZwList || !dzZwList.length"></text>
</view> </view>
</view> </view>
@ -15,9 +16,10 @@
<view class="section"> <view class="section">
<view class="section-title">其他职务</view> <view class="section-title">其他职务</view>
<view class="position-display"> <view class="position-display">
<text class="position-text" v-for="item in otherPositions" :key="item.id"> <text class="position-text" v-for="item in qtZwList" :key="item.id">
{{ item.name }} {{ item.name }}
</text> </text>
<text class="empty" v-if="!qtZwList || !qtZwList.length"></text>
</view> </view>
</view> </view>
@ -26,7 +28,7 @@
<view class="info-item" v-for="item in teachingInfo" :key="item.key"> <view class="info-item" v-for="item in teachingInfo" :key="item.key">
<view class="info-label">{{ item.label }}</view> <view class="info-label">{{ item.label }}</view>
<view class="info-value"> <view class="info-value">
<text :class="{ empty: item.isEmpty }">{{ item.value }}</text> <text :class="{ empty: item.isEmpty }">{{ item.value || '无' }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -36,15 +38,12 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from "vue"; import { ref } from "vue";
import { useUserStore } from "@/store/modules/user";
const { getJs } = useUserStore();
import { zwGetListByLxApi, getRzRjApi } from "@/api/base/server";
// const dzZwList = ref<any[]>([]);
const partyPositions = ref([ const qtZwList = ref<any[]>([]);
{ id: 1, name: "党委(总支)书记" },
{ id: 2, name: "党委(总支)副书记" },
]);
//
const otherPositions = ref([{ id: 1, name: "党支部支委" }]);
// //
const teachingInfo = ref([ const teachingInfo = ref([
@ -79,17 +78,81 @@ const teachingInfo = ref([
isEmpty: false, isEmpty: false,
}, },
{ {
key: "headTeacherClass", key: "bzrBj",
label: "所任班主任班级", label: "所任班主任班级",
value: "8班", value: "8班",
isEmpty: false, isEmpty: false,
}, },
{
key: "fBzrBj",
label: "所任副班主任班级",
value: "8班",
isEmpty: false,
},
]); ]);
// //
const goBack = () => { const goBack = () => {
uni.navigateBack(); uni.navigateBack();
}; };
onMounted(async () => {
dzZwList.value = [];
qtZwList.value = [];
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(",");
}
{
const res = await zwGetListByLxApi({ zwlx: '党政职务' });
res.result.map((item: any) => {
const zw = dzZw.find((zw: any) => zw == item.id);
if (zw) {
dzZwList.value.push({ id: item.id, name: item.zwmc });
}
return item;
});
};
{
const res = await zwGetListByLxApi({ zwlx: '其他职务' });
res.result.map((item: any) => {
const zw = dzZw.find((zw: any) => zw == item.id);
if (zw) {
qtZwList.value.push({ id: item.id, name: item.zwmc });
}
return item;
});
};
{
const res = await getRzRjApi({ jsId: getJs.id });
const data = [
res.result.zkMcList,
res.result.zkBjmcList,
res.result.fkMcList,
res.result.fkBjmcList,
getJs.njmc,
res.result.bzrBjmcList,
res.result.fBzrBjmcList,
];
setTeachInfo(0, res.result.zkMcList);
setTeachInfo(1, res.result.zkBjmcList);
setTeachInfo(2, res.result.fkMcList);
setTeachInfo(3, res.result.fkBjmcList);
setTeachInfo(4, getJs.njmc + "(" + getJs.njbc + ")");
setTeachInfo(5, res.result.bzrBjmcList);
setTeachInfo(6, res.result.fBzrBjmcList);
}
});
const setTeachInfo = (index: number, value: string) => {
teachingInfo.value[index].value = value;
teachingInfo.value[index].isEmpty = !value || !value.length;
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -157,18 +220,21 @@ const goBack = () => {
flex-shrink: 0; flex-shrink: 0;
} }
.info-value { .info-value {
flex: 1; flex: 1;
text-align: right; text-align: right;
text { text {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
&.empty { &.empty {
color: #999; color: #999;
} }
} }
} }
} }
text.empty {
color: #999;
}
</style> </style>