调整任职任教
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);
|
return await get("/mobile/js/pkkb/drpkkb", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取任职任教信息
|
||||||
|
*/
|
||||||
|
export const getRzRjApi = async (params: any) => {
|
||||||
|
return await get("/mobile/js/getRzRj", params);
|
||||||
|
};
|
||||||
|
|||||||
@ -5,9 +5,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 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">
|
||||||
@ -164,11 +227,14 @@ const goBack = () => {
|
|||||||
text {
|
text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
|
||||||
&.empty {
|
&.empty {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
text.empty {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user