调整工作量

This commit is contained in:
ywyonui 2025-07-17 16:07:37 +08:00
parent 01f8d740b9
commit fb1a9c3d96
3 changed files with 23 additions and 34 deletions

View File

@ -4,7 +4,10 @@
<uni-section title="排课工作量" type="line" titleFontSize="16px" padding> <uni-section title="排课工作量" type="line" titleFontSize="16px" padding>
<view v-if="pkList.length"> <view v-if="pkList.length">
<view class="section-sub-card r-md" v-for="(pk, index) in pkList" :key="index"> <view class="section-sub-card r-md" v-for="(pk, index) in pkList" :key="index">
<view class="card-title">{{ pk.kmMc }}</view> <view class="card-title">
<span>{{ (pk.njmc || "无年级") + " " + (pk.bjmc || "无班级") + " " + pk.kmMc }}</span>
<span style="color: red;" v-if="pk.srcJsId && pk.srcJsId.length">( 代课 )</span>
</view>
<view class="card-body"> <view class="card-body">
<view class="summary-stats-card"> <view class="summary-stats-card">
<view class="stats-grid"> <view class="stats-grid">
@ -29,18 +32,18 @@
<text>无工作量</text> <text>无工作量</text>
</view> </view>
</uni-section> </uni-section>
<uni-section title="职务工作量" type="line" titleFontSize="16px" padding> <uni-section title="自定义工作量" type="line" titleFontSize="16px" padding>
<view class="section-sub-card r-md" v-if="zwList.length"> <view class="section-sub-card r-md" v-if="zdyList.length">
<view class="card-body"> <view class="card-body">
<view class="score-table"> <view class="score-table">
<view class="table-header"> <view class="table-header">
<view class="th">职务名称</view> <view class="th">项目名称</view>
<view class="th flex-80">周工作量</view> <view class="th flex-80">周工作量</view>
</view> </view>
<view class="table-body"> <view class="table-body">
<view class="table-row" v-for="(zw, index) in zwList" :key="index"> <view class="table-row" v-for="(zdy, index) in zdyList" :key="index">
<view class="td">{{ zw.zwMc }}</view> <view class="td">{{ zdy.xmMc }}</view>
<view class="td flex-80">{{ zw.ks }}</view> <view class="td flex-80">{{ zdy.ks }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -50,7 +53,7 @@
<text>无工作量</text> <text>无工作量</text>
</view> </view>
</uni-section> </uni-section>
<uni-section title="班主任工作量" type="line" titleFontSize="16px" padding> <!-- <uni-section title="班主任工作量" type="line" titleFontSize="16px" padding>
<view v-if="bzrList.length"> <view v-if="bzrList.length">
<view class="section-sub-card r-md" v-for="(bzr, index) in bzrList" :key="index"> <view class="section-sub-card r-md" v-for="(bzr, index) in bzrList" :key="index">
<view class="card-title">{{ bzr.njmc }}-{{ bzr.bjmc }}</view> <view class="card-title">{{ bzr.njmc }}-{{ bzr.bjmc }}</view>
@ -73,7 +76,7 @@
<view class="section-empty" v-else> <view class="section-empty" v-else>
<text>无工作量</text> <text>无工作量</text>
</view> </view>
</uni-section> </uni-section> -->
</view> </view>
<template #bottom> <template #bottom>
<view class="bottom-container"> <view class="bottom-container">
@ -84,11 +87,11 @@
</view> </view>
<view class="stat-item"> <view class="stat-item">
<text class="label">校平均工作量</text> <text class="label">校平均工作量</text>
<text class="value success">{{ pjGzl }}</text> <text class="value success">{{ gzl.pjks }}</text>
</view> </view>
<view class="stat-item"> <view class="stat-item">
<text class="label">达标率</text> <text class="label">工作量比例</text>
<text class="value">{{ dbl }}%</text> <text class="value">{{ gzl.bl }}%</text>
</view> </view>
</view> </view>
</view> </view>
@ -102,38 +105,25 @@ import BasicLayout from "@/components/BasicLayout/Layout.vue";
import { useUserStore } from "@/store/modules/user"; import { useUserStore } from "@/store/modules/user";
const { getJs } = useUserStore(); const { getJs } = useUserStore();
const gzl = ref<any>({});
const pjGzl = ref(1.0);
const dbl = ref(100.0);
const gzl = ref<any>({
zks: 20.0
});
const pkList = ref<any[]>([ const pkList = ref<any[]>([
{ id: 1, kmMc: "语文", xs: 1.0, ks: 5.0 }, { id: 1, kmMc: "语文", xs: 1.0, ks: 5.0 },
{ id: 2, kmMc: "数学", xs: 1.0, ks: 4.0 }, { id: 2, kmMc: "数学", xs: 1.0, ks: 4.0 },
{ id: 3, kmMc: "英语", xs: 1.0, ks: 3.0 }, { id: 3, kmMc: "英语", xs: 1.0, ks: 3.0 },
]); ]);
const zwList = ref<any[]>([
{ id: 1, zwMc: "书记", ks: 5.0 },
{ id: 2, zwMc: "校长", ks: 4.0 },
]);
const bzrList = ref<any[]>([ const bzrList = ref<any[]>([
{ id: 1, njmc: "一年级", bjmc: "1班", zb: 0.33, ks: 2.0 }, { id: 1, njmc: "一年级", bjmc: "1班", zb: 0.33, ks: 2.0 },
{ id: 2, njmc: "二年级", bjmc: "1班", zb: 0.5, ks: 3.0 }, { id: 2, njmc: "二年级", bjmc: "1班", zb: 0.5, ks: 3.0 },
{ id: 3, njmc: "二年级", bjmc: "2班", zb: 1.0, ks: 6.0 }, { id: 3, njmc: "二年级", bjmc: "2班", zb: 1.0, ks: 6.0 },
]); ]);
const zdyList = ref<any[]>([
{ id: 1, xmMc: "书记", ks: 5.0 },
{ id: 2, xmMc: "校长", ks: 4.0 },
]);
onMounted(async () => { onMounted(async () => {
{
const res = await getJsPjGzlApi();
pjGzl.value = parseFloat((res.result || '1.0'));
}
{ {
const res = await gzlFindPageApi({ jsId: getJs.id }); const res = await gzlFindPageApi({ jsId: getJs.id });
if (!res.rows || !res.rows.length) { if (!res.rows || !res.rows.length) {
@ -141,9 +131,8 @@ onMounted(async () => {
} }
gzl.value = res.rows[0] || {}; gzl.value = res.rows[0] || {};
pkList.value = gzl.value.gzlPkList || []; pkList.value = gzl.value.gzlPkList || [];
zwList.value = gzl.value.gzlZwList || [];
bzrList.value = gzl.value.gzlBzrList || []; bzrList.value = gzl.value.gzlBzrList || [];
dbl.value = gzl.value.zks * 100.0 / pjGzl.value; zdyList.value = gzl.value.gzlZdyList || [];
} }
}); });
</script> </script>

View File

@ -77,7 +77,7 @@ const categoryList = ref([
const curType = ref<any>(); const curType = ref<any>();
const curNj = ref<any>(); const curNj = ref<any>();
const curCe = ref<any>(); const curCe = ref<any>();
const curCategory = ref<any>(); const curCategory = ref<any>(categoryList.value[0]);
const selectType = (type: any) => { const selectType = (type: any) => {
curType.value = type; curType.value = type;

View File

@ -79,7 +79,7 @@ const clearSearch = () => {
const downloadResouce = (item: any) => { const downloadResouce = (item: any) => {
const finalUrl = imagUrl(item.resourUrl); const finalUrl = imagUrl(item.resourUrl);
const fileName = item.resourName + '.' + item.resSuf; const fileName = item.resourName + '.' + item.resSuf;
downloadForWeb(finalUrl, fileName); download(finalUrl, fileName);
resourcesAddNumByTypeApi({ resourcesAddNumByTypeApi({
id: item.id, id: item.id,
type: 'down' type: 'down'