diff --git a/src/pages/base/groupTeaching/dmXkkcDetail.vue b/src/pages/base/groupTeaching/dmXkkcDetail.vue
index 86afac4..60c89e3 100644
--- a/src/pages/base/groupTeaching/dmXkkcDetail.vue
+++ b/src/pages/base/groupTeaching/dmXkkcDetail.vue
@@ -13,8 +13,8 @@
- {{ numInfo.yd }}
- 应到
+ {{ numInfo.zg }}
+ 总人数
{{ numInfo.sd }}
@@ -28,10 +28,6 @@
{{ numInfo.qq }}
缺勤
-
- {{ numInfo.zg }}
- 总人数
-
@@ -81,6 +77,7 @@
([
const statusPickerVisible = ref(false);
const statusOptions = ref>([]);
const curXs = ref(null);
+const defSel = ref([]);
// 获取状态对应的样式类
const getStatusClass = (status: string) => {
@@ -183,39 +181,49 @@ const loadXsList = async () => {
});
if (res && res.resultCode === 1) {
xsList.value = res.result || [];
- let sd = 0;
- let qj = 0;
- let qq = 0;
- // 循环统计状态对应的人数
- for (let i = 0; i < xsList.value.length; i++) {
- const xs = xsList.value[i];
- switch (xs.xszt) {
- case "正常":
- sd++;
- break;
- case "请假":
- qj++;
- break;
- case "缺勤":
- qq++;
- break;
- default:
- break;
- }
- }
- numInfo.value = {
- zg: xsList.value.length,
- yd: xsList.value.length - qj,
- sd: sd,
- qj: qj,
- qq: qj
- };
+ rebuildNumInfo();
}
};
+const rebuildNumInfo = () => {
+ let sd = 0;
+ let qj = 0;
+ let qq = 0;
+ // 循环统计状态对应的人数
+ for (let i = 0; i < xsList.value.length; i++) {
+ const xs = xsList.value[i];
+ switch (xs.xszt) {
+ case "正常":
+ sd++;
+ break;
+ case "请假":
+ qj++;
+ break;
+ case "缺勤":
+ qq++;
+ break;
+ default:
+ break;
+ }
+ }
+ numInfo.value = {
+ zg: xsList.value.length,
+ yd: xsList.value.length - qj,
+ sd: sd,
+ qj: 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;
};
diff --git a/src/pages/system/launchPage/launchPage.vue b/src/pages/system/launchPage/launchPage.vue
index 15aec7f..55d58cf 100644
--- a/src/pages/system/launchPage/launchPage.vue
+++ b/src/pages/system/launchPage/launchPage.vue
@@ -59,14 +59,18 @@ onLoad(async (data: any) => {
afterLoginAction(res.result);
// 跳转页面
goByJs(res.result.js)
- } else {
- uni.reLaunch({
- url: "/pages/system/login/login",
- });
+ 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"