Compare commits

...

2 Commits

Author SHA1 Message Date
wyw
0d96842248 Merge branch 'main' of http://121.41.2.71:3000/ykx/jy-safe-app 2026-04-16 15:06:58 +08:00
wyw
f39c072e93 提示框如果没有文本 不提示
三级安全教育 数据获取修改
重考处理
2026-04-16 15:06:09 +08:00
2 changed files with 33 additions and 9 deletions

View File

@ -120,7 +120,12 @@
methods: { methods: {
loadData() { loadData() {
let json = initFilter(this.ORG_ID); let json = initFilter(this.ORG_ID);
extendRule(json, 'RECORD_ID', 1, this.model.ID); if (this.TaskID) {
extendRule(json, 'TEXT_ID', 1, this.model.ID);
} else {
extendRule(json, 'RECORD_ID', 1, this.model.ID);
}
// extendRule(json, 'RECORD_ID', 1, this.model.ID);
extendInclude(json, 'Nav_User'); extendInclude(json, 'Nav_User');
getRequest(json, "/SE/SENewUsers/GetUsers").then(res => { getRequest(json, "/SE/SENewUsers/GetUsers").then(res => {
if (res && res.length > 0) { if (res && res.length > 0) {
@ -147,11 +152,17 @@
return; return;
} }
const json = initFilter(this.ORG_ID, "", "") const json = initFilter(this.ORG_ID, "", "")
extendRule(json, 'RECORD_ID', 1, this.model.ID); if (this.TaskID) {
extendRule(json, 'TEXT_ID', 1, this.model.ID);
} else {
extendRule(json, 'RECORD_ID', 1, this.model.ID);
}
// extendRule(json, 'RECORD_ID', 1, this.model.ID);
extendRule(json, 'USER_ID', 1, SelUsrID); extendRule(json, 'USER_ID', 1, SelUsrID);
extendInclude(json, 'Nav_Test'); extendInclude(json, 'Nav_Test');
extendInclude(json, 'Nav_Record.Nav_User'); extendInclude(json, 'Nav_Record.Nav_User');
extendInclude(json, 'Nav_User'); extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_Text');
getRequest(json, "/SE/SENewUsers/GetUserPapers").then(res => { getRequest(json, "/SE/SENewUsers/GetUserPapers").then(res => {
this.model = res this.model = res
if (res && res.Nav_Papers && res.Nav_Papers.length > 0) { if (res && res.Nav_Papers && res.Nav_Papers.length > 0) {
@ -161,9 +172,14 @@
let config = res.Nav_Config; let config = res.Nav_Config;
let safe = res.Nav_Papers[0].Nav_Record; let safe = res.Nav_Papers[0].Nav_Record;
let hasAnswered = false; let hasAnswered = false;
for (let i = 0; i < res.Nav_Papers.length; i++) { if (!this.TaskID) {
if (res.Nav_Papers[i].ANSWER !== 0) { hasAnswered = true
hasAnswered = true; }
if (!hasAnswered) {
for (let i = 0; i < res.Nav_Papers.length; i++) {
if (res.Nav_Papers[i].ANSWER !== 0) {
hasAnswered = true;
}
} }
} }
this.papers = papers; this.papers = papers;
@ -279,6 +295,7 @@
Nav_Config: JSON.parse(JSON.stringify(this.config)), Nav_Config: JSON.parse(JSON.stringify(this.config)),
Nav_Papers: JSON.parse(JSON.stringify(this.papers)), Nav_Papers: JSON.parse(JSON.stringify(this.papers)),
TaskID: this.TaskID, TaskID: this.TaskID,
TEXT_ID: this.papers[0].TEXT_ID,
ORG_ID: this.ORG_ID ORG_ID: this.ORG_ID
} }
for (let i = 0; i < data.Nav_Papers.length; i++) { for (let i = 0; i < data.Nav_Papers.length; i++) {
@ -293,6 +310,11 @@
uni.navigateBack() uni.navigateBack()
}, 'success', 1000) }, 'success', 1000)
} }
}).catch((error) => {
//error
uni.$showMsgFunc("", () => {
uni.navigateBack()
}, 'fail', 3000)
}) })
}, },
} }

View File

@ -25,10 +25,12 @@ uni.$showMsgFunc = function(title, func, icon, duration) {
title = '操作成功!' title = '操作成功!'
setTimeout(() => { setTimeout(() => {
uni.showToast({ if (title != undefined && title.length > 0) {
title: title, uni.showToast({
icon: icon title: title,
}); icon: icon
});
}
setTimeout(() => { setTimeout(() => {
uni.hideToast(); uni.hideToast();
func(); func();