1、修复跳转不到登录界面,2、修复点名界面显示数据问题
This commit is contained in:
parent
a068cd122b
commit
3fd776b750
@ -13,8 +13,8 @@
|
||||
<!-- 考勤统计 -->
|
||||
<view class="attendance-stats flex-row">
|
||||
<view class="stat-item flex-col items-center">
|
||||
<text class="font-18 font-bold">{{ numInfo.yd }}</text>
|
||||
<text class="font-12 cor-666 mt-3">应到</text>
|
||||
<text class="font-18 font-bold">{{ numInfo.zg }}</text>
|
||||
<text class="font-12 cor-666 mt-3">总人数</text>
|
||||
</view>
|
||||
<view class="stat-item flex-col items-center">
|
||||
<text class="font-18 font-bold cor-primary">{{ numInfo.sd }}</text>
|
||||
@ -28,10 +28,6 @@
|
||||
<text class="font-18 font-bold cor-danger">{{ numInfo.qq }}</text>
|
||||
<text class="font-12 cor-666 mt-3">缺勤</text>
|
||||
</view>
|
||||
<view class="stat-circle flex-col flex-center ml-auto">
|
||||
<text class="font-20 font-bold">{{ numInfo.zg }}</text>
|
||||
<text class="font-10 cor-666">总人数</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -81,6 +77,7 @@
|
||||
|
||||
<!-- 状态选择弹窗 -->
|
||||
<u-picker
|
||||
:defaultIndex="defSel"
|
||||
:show="statusPickerVisible"
|
||||
:columns="[statusOptions]"
|
||||
@confirm="confirmStatus"
|
||||
@ -138,6 +135,7 @@ const xsList = ref<any>([
|
||||
const statusPickerVisible = ref(false);
|
||||
const statusOptions = ref<Array<{ text: string, value: string }>>([]);
|
||||
const curXs = ref<any>(null);
|
||||
const defSel = ref<any>([]);
|
||||
|
||||
// 获取状态对应的样式类
|
||||
const getStatusClass = (status: string) => {
|
||||
@ -183,6 +181,11 @@ const loadXsList = async () => {
|
||||
});
|
||||
if (res && res.resultCode === 1) {
|
||||
xsList.value = res.result || [];
|
||||
rebuildNumInfo();
|
||||
}
|
||||
};
|
||||
|
||||
const rebuildNumInfo = () => {
|
||||
let sd = 0;
|
||||
let qj = 0;
|
||||
let qq = 0;
|
||||
@ -208,14 +211,19 @@ const loadXsList = async () => {
|
||||
yd: xsList.value.length - qj,
|
||||
sd: sd,
|
||||
qj: qj,
|
||||
qq: qj
|
||||
qq: qq
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// 打开状态选择器
|
||||
const openStatusPicker = (xs: any) => {
|
||||
curXs.value = xs;
|
||||
for (let i = 0; i < statusOptions.value.length; i++) {
|
||||
if (statusOptions.value[i].text === xs.xszt) {
|
||||
defSel.value = [i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
statusPickerVisible.value = true;
|
||||
};
|
||||
|
||||
@ -230,6 +238,7 @@ const confirmStatus = (e: any) => {
|
||||
// 更新当前学生状态
|
||||
curXs.value.xszt = selectedStatus.text;
|
||||
}
|
||||
rebuildNumInfo();
|
||||
}
|
||||
statusPickerVisible.value = false;
|
||||
};
|
||||
|
||||
@ -59,14 +59,18 @@ onLoad(async (data: any) => {
|
||||
afterLoginAction(res.result);
|
||||
// 跳转页面
|
||||
goByJs(res.result.js)
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
uni.reLaunch({
|
||||
url: "/pages/system/login/login",
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {});
|
||||
.catch((err) => {
|
||||
uni.reLaunch({
|
||||
url: "/pages/system/login/login"
|
||||
})
|
||||
});
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: "/pages/system/login/login"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user