调整任职任教
This commit is contained in:
parent
87d90244aa
commit
d603640764
@ -202,4 +202,9 @@ export const drpkkbApi = async (params: any) => {
|
||||
return await get("/mobile/js/pkkb/drpkkb", params);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 获取任职任教信息
|
||||
*/
|
||||
export const getRzRjApi = async (params: any) => {
|
||||
return await get("/mobile/js/getRzRj", params);
|
||||
};
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="content">
|
||||
<!-- 党政职务 -->
|
||||
<!-- 党政职务 -->
|
||||
<view class="section">
|
||||
<view class="section-title">党政职务:</view>
|
||||
<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 }}
|
||||
</text>
|
||||
<text class="empty" v-if="!dzZwList || !dzZwList.length">无</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -15,9 +16,10 @@
|
||||
<view class="section">
|
||||
<view class="section-title">其他职务</view>
|
||||
<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 }}
|
||||
</text>
|
||||
<text class="empty" v-if="!qtZwList || !qtZwList.length">无</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -26,7 +28,7 @@
|
||||
<view class="info-item" v-for="item in teachingInfo" :key="item.key">
|
||||
<view class="info-label">{{ item.label }}</view>
|
||||
<view class="info-value">
|
||||
<text :class="{ empty: item.isEmpty }">{{ item.value }}</text>
|
||||
<text :class="{ empty: item.isEmpty }">{{ item.value || '无' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -36,15 +38,12 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
const { getJs } = useUserStore();
|
||||
import { zwGetListByLxApi, getRzRjApi } from "@/api/base/server";
|
||||
|
||||
// 党政职务数据
|
||||
const partyPositions = ref([
|
||||
{ id: 1, name: "党委(总支)书记" },
|
||||
{ id: 2, name: "党委(总支)副书记" },
|
||||
]);
|
||||
|
||||
// 其他职务数据
|
||||
const otherPositions = ref([{ id: 1, name: "党支部支委" }]);
|
||||
const dzZwList = ref<any[]>([]);
|
||||
const qtZwList = ref<any[]>([]);
|
||||
|
||||
// 任教任职信息
|
||||
const teachingInfo = ref([
|
||||
@ -79,17 +78,81 @@ const teachingInfo = ref([
|
||||
isEmpty: false,
|
||||
},
|
||||
{
|
||||
key: "headTeacherClass",
|
||||
key: "bzrBj",
|
||||
label: "所任班主任班级",
|
||||
value: "8班",
|
||||
isEmpty: false,
|
||||
},
|
||||
{
|
||||
key: "fBzrBj",
|
||||
label: "所任副班主任班级",
|
||||
value: "8班",
|
||||
isEmpty: false,
|
||||
},
|
||||
]);
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
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>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@ -157,18 +220,21 @@ const goBack = () => {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
.info-value {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
|
||||
&.empty {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
text.empty {
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user