修复调整代课

This commit is contained in:
ywyonui 2025-09-28 14:31:48 +08:00
parent d256372289
commit 66955f9ac7
2 changed files with 6 additions and 4 deletions

View File

@ -47,9 +47,7 @@
<view v-if="dkList.length > 0">
<view class="dk-card" v-for="(item, index) in dkList" :key="index">
<view class="card-header">
<text class="applicant-name">{{ item.dktime }}{{ QjPageUtils.wdNameList[item.xq - 1] }}{{
item.jcmc
}}</text>
<text class="applicant-name">{{ item.title }}</text>
</view>
<view class="card-body">
<view class="info-row">
@ -78,7 +76,7 @@
<view v-if="dkList && dkList.length">
<view class="dk-card" v-for="(item, index) in dkList" :key="index">
<view class="card-header">
<text class="applicant-name">{{ item.dktime }}{{ item.xqLabel }}{{ item.jcmc }}</text>
<text class="applicant-name">{{ item.title }}</text>
<text v-if="item.jsId === jsId" class="assigned-tag">我的代课</text>
</view>
<view class="card-body">

View File

@ -118,6 +118,8 @@ const rebuildDkList = (list: any, jsId: string) => {
const xq: number = item.xq - 1;
item.xqLabel = wdNameList[xq];
item.statusLabel = qrStatus[item.qrStatus] || "未知";
item.title = item.dktime + "(第" + item.zc + "周" + item.xqLabel + ")的" + item.jcmc;
console.log("item", item);
return item;
});
// 排序,将当前教师作为代课教师的代课数据,排在前面,并且添加一个标记
@ -137,6 +139,8 @@ const getDkList = async (qjId: string, jsId: string) => {
qjId: qjId,
page: 1,
rows: 1000,
sidx: "dktime",
sord: "asc",
});
const rows = (res && (res.rows || res.result || res.data)) || [];
if (!rows.length) {