diff --git a/src/api/base/server.ts b/src/api/base/server.ts
index 083ba3a..7a88904 100644
--- a/src/api/base/server.ts
+++ b/src/api/base/server.ts
@@ -83,11 +83,27 @@ export const mobilejllistApi = async (params: any) => {
return res.result;
};
+export const getByJlIdApi = async (params: any) => {
+ const res = await get("/mobile/jl/getByJlId", params);
+ return res.result;
+};
+
// 提交点名信息
export const jsdXkdmListApi = async (params: any) => {
return await post("/mobile/js/xkdm/add", params);
};
+// 推送清单相关API
+// 根据接龙ID获取学生信息
+export const jlzxFindByJlParamsApi = async (params: { jlId: string }) => {
+ return await get("/api/jlzx/findByJlParams", params);
+};
+
+// 保存推送信息
+export const xxtsSaveByJlzxParamsApi = async (params: { jlId: string }) => {
+ return await post("/api/xxts/saveByJlzxParams", params);
+};
+
// 获取待办列表
export const dbListApi = async (params: any) => {
return await get("/api/db/findPage", params);
diff --git a/src/components/BasicListLayout/ListLayout.vue b/src/components/BasicListLayout/ListLayout.vue
index 1ed0509..2451bc8 100644
--- a/src/components/BasicListLayout/ListLayout.vue
+++ b/src/components/BasicListLayout/ListLayout.vue
@@ -5,7 +5,7 @@
-
+
暂无数据...
@@ -29,7 +29,7 @@
diff --git a/src/components/BasicListLayout/hooks/useLayout.ts b/src/components/BasicListLayout/hooks/useLayout.ts
index e298721..33df640 100644
--- a/src/components/BasicListLayout/hooks/useLayout.ts
+++ b/src/components/BasicListLayout/hooks/useLayout.ts
@@ -1,5 +1,5 @@
import {isFunction} from "lodash";
-import {Ref} from "vue";
+import {Ref, ref, nextTick} from "vue";
import {hideLoading, showLoading} from "@/utils/uniapp";
import type {
LayoutCallback,
@@ -13,21 +13,46 @@ import type {
export function useLayout(options: LayoutOptions): UseLayoutInterfaceReturn {
let methods: Ref
+ let dataListRef: Ref | undefined
+
+ // 强制设置concat为false,使用完整数据模式
+ if (!options.componentProps) options.componentProps = {};
+ options.componentProps.concat = false;
+
+ // 用于维护所有已加载数据
+ const allData = ref([]);
async function requestApi(pageNo: number, pageSize: number) {
if (isFunction(options.api)) {
try {
const result = await options.api(Object.assign({}, {
- rows: pageSize,
- page: pageNo
+ pageNo: pageNo,
+ pageSize: pageSize
}, options.param))
await nextTick()
if (methods.value) {
- // @ts-ignore
- await methods.value.complete(result[options.resultKey || 'rows'])
+ let newList = result[options.resultKey || 'rows'] || [];
+ if (pageNo === 1) {
+ allData.value = [...newList];
+ if (dataListRef) dataListRef.value = allData.value;
+ } else {
+ // 合并去重
+ const map = new Map();
+ [...allData.value, ...newList].forEach(item => {
+ map.set(item.id, item);
+ });
+ allData.value = Array.from(map.values());
+ if (dataListRef) dataListRef.value = allData.value;
+ }
+ const hasMoreData = newList.length > 0;
+ if (!hasMoreData) {
+ await methods.value.completeByNoMore(allData.value as any, true);
+ return;
+ } else {
+ await methods.value.complete(allData.value as any);
+ }
}
} catch (err) {
- console.log('err', err)
if (methods.value) {
await methods.value.complete(false);
}
@@ -39,8 +64,9 @@ export function useLayout(options: LayoutOptions): UseLayoutInterfaceReturn {
options.query = requestApi
}
- const register = (callback: LayoutCallback, pagingRef: Ref) => {
+ const register = (callback: LayoutCallback, pagingRef: Ref, listRef?: Ref) => {
methods = pagingRef
+ dataListRef = listRef
callback(options)
}
return [register,
diff --git a/src/components/BasicListLayout/type/useLayout.d.ts b/src/components/BasicListLayout/type/useLayout.d.ts
index 1dcf5b4..d449e22 100644
--- a/src/components/BasicListLayout/type/useLayout.d.ts
+++ b/src/components/BasicListLayout/type/useLayout.d.ts
@@ -16,6 +16,7 @@ interface LayoutOptions {
createdReload?: boolean //组件created时立即触发reload(可解决一些情况下先看到页面再看到loading的问题),auto为true时有效。为否时将在mounted+nextTick后触发reload
autoCleanListWhenReload?: boolean //reload时立即自动清空原list,若立即自动清空,则在reload之后、请求回调之前页面是空白的
fixed?: boolean //z-paging是否使用fixed布局,若使用fixed布局,则z-paging的父view无需固定高度,z-paging高度默认铺满屏幕,页面中的view请放在z-paging标签内,需要固定在顶部的view使用slot="top"包住,需要固定在底部的view使用slot="bottom"包住。
+ concat?: boolean //自动拼接complete中传过来的数组
}
}
diff --git a/src/components/BasicTree/Tree.vue b/src/components/BasicTree/Tree.vue
index 6bc7359..ddb190f 100644
--- a/src/components/BasicTree/Tree.vue
+++ b/src/components/BasicTree/Tree.vue
@@ -170,10 +170,10 @@ export default {
parentArr = [...parents]
delete parentArr.children
parentid.push(item[this.idKey]);
- parentArr.push({
- [this.idKey]: item[this.idKey],
- [this.rangeKey]: item[this.rangeKey]
- })
+ // 保留所有原始字段,而不仅仅是 key 和 title
+ const parentItem = { ...item };
+ delete parentItem.children; // 移除 children 字段避免循环引用
+ parentArr.push(parentItem);
this._renderTreeList(item.children, rank + 1, parentid, parentArr);
} else {
this.treeList[this.treeList.length - 1].lastRank = true;
diff --git a/src/config.ts b/src/config.ts
index bf5bbad..04ccbcc 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -1,5 +1,5 @@
-// const ip: string = "192.168.239.1:8897";
-const ip: string = "yufangzc.com";
+const ip: string = "127.0.0.1:8897";
+// const ip: string = "yufangzc.com";
// const ip: string = "yufangzc.com";
const fwqip: string = "yufangzc.com";
//打包服务器接口代理标识
diff --git a/src/pages.json b/src/pages.json
index 4f18545..d3c7bb7 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -377,6 +377,13 @@
"enablePullDownRefresh": false
}
},
+ {
+ "path": "pages/view/notice/push-list",
+ "style": {
+ "navigationBarTitleText": "推送清单",
+ "enablePullDownRefresh": false
+ }
+ },
{
"path": "pages/view/notice/selectStudents",
"style": {
diff --git a/src/pages/system/login/login.vue b/src/pages/system/login/login.vue
index 200b894..2f0e8bf 100644
--- a/src/pages/system/login/login.vue
+++ b/src/pages/system/login/login.vue
@@ -166,8 +166,7 @@ function toHome(data: any) {
}
}
-const {afterLoginAction} = useUserStore();
-const {setFile} = useDataStore();
+const {afterLoginAction, setJs} = useUserStore();
const handleVerify = async () => {
if (
@@ -191,6 +190,21 @@ const handleVerify = async () => {
if (result.result) {
afterLoginAction(result.result);
uni.showToast({title: "验证成功", icon: "success"});
+
+ // 立即获取教师信息并存储到jsData中
+ try {
+ const findJsByPhoneResult = await findJsByPhoneApi({
+ phone: formData.phone,
+ });
+ if (findJsByPhoneResult.resultCode == 1 && findJsByPhoneResult.result) {
+ // 将教师信息存储到jsData中
+ setJs(findJsByPhoneResult.result);
+ console.log("教师信息已存储到jsData:", findJsByPhoneResult.result);
+ }
+ } catch (error) {
+ console.error("获取教师信息失败:", error);
+ }
+
if (getGlobal.type == 1) {
toHome(getGlobal);
} else {
@@ -202,7 +216,7 @@ const handleVerify = async () => {
if (findJsByPhoneResult.result["confirmStatus"] == "A") {
toHome(getGlobal);
} else {
- setFile(findJsByPhoneResult.result);
+ setJs(findJsByPhoneResult.result);
setTimeout(() => {
uni.reLaunch({
url: "/pages/view/hr/teacherProfile/index",
@@ -386,6 +400,3 @@ input::placeholder {
font-size: 14px;
}
-
-function updateUserApi(arg0: { loginName: string; phone: string; code: string;
-avatarUrl: string; }) { throw new Error("Function not implemented."); }
diff --git a/src/pages/view/notice/detail.vue b/src/pages/view/notice/detail.vue
index 0cd246e..a770a0c 100644
--- a/src/pages/view/notice/detail.vue
+++ b/src/pages/view/notice/detail.vue
@@ -6,79 +6,60 @@
-
-
+
-
-
- 暂无封面
+ {{ noticeDetail.jlmc }}
+
+
+
+ 发布人: {{ noticeDetail.jsxm }}
+ 结束时间: {{ noticeDetail.jljstime || noticeDetail.endTime }}
-
- {{ noticeDetail.title }}
-
-
- {{ noticeDetail.content }}
-
-
-
-
- 附件:
-
-
- {{ att.name }}
+
+ {{ descPreview }}
+ 更多
+
+
+
+ 收起
-
-
+
+
+ 附件
+
+
+
+ {{ getFileName(noticeDetail.jlfj) }}
+
+
+
+
- 反馈完成情况 ({{ receivedCount }}/{{ totalStudents }})
+ 接龙完成情况 ({{ receivedCount }}/{{ totalStudents }})
- {{ student.name }}
-
-
+ {{ stu.xsxm || stu.name }}
+
+
-
-
-
-
-
-
-
-
- 结束时间
-
- {{ noticeDetail.endTime }}
-
@@ -93,167 +74,135 @@
\ No newline at end of file