diff --git a/src/gift/pages/recordList/index.wxml b/src/gift/pages/recordList/index.wxml index a723caa..c19cc36 100644 --- a/src/gift/pages/recordList/index.wxml +++ b/src/gift/pages/recordList/index.wxml @@ -89,9 +89,7 @@ - - 暂无就诊记录 - + 新增就诊记录 diff --git a/src/pages/qaFormDetail/index.ts b/src/pages/qaFormDetail/index.ts index b5f75b1..ea1f8fe 100644 --- a/src/pages/qaFormDetail/index.ts +++ b/src/pages/qaFormDetail/index.ts @@ -33,6 +33,7 @@ Page({ data: { questions: [] as IQuestion[], hasData: false, + showPage: false, caseReportList: [ { icon: 'icon126.png', @@ -63,15 +64,12 @@ Page({ ], }, - onLoad() { - app.waitLogin({}).then(() => { - this.loadData() - }) - }, + onLoad() {}, onShow() { - if (this.data.questions.length) { + this.setData({ questions: [], hasData: false, showPage: false }) + app.waitLogin().then(() => { this.loadData() - } + }) }, loadData() { @@ -134,8 +132,11 @@ Page({ questions.forEach((q, i) => { const found = answers.find((a: any) => a.QuestionNo === q.QuestionNo) if (!found) return - const answer = found.Answer + let answer = found.Answer if (answer === null || answer === undefined) return + if (Array.isArray(answer)) { + answer = answer.filter((item) => item != 99) + } if (q.QuestionType === 1) { updates[`questions[${i}].Answer`] = Number(answer) updates[`questions[${i}].answerText`] = this.getAnswerText(q, Number(answer)) @@ -206,6 +207,7 @@ Page({ } }) if (Object.keys(updates).length) { + updates.showPage = true this.setData(updates) } }, @@ -226,4 +228,10 @@ Page({ url: '/pages/qaForm/index', }) }, + handleDetail(e) { + const { name, imagefield } = e.currentTarget.dataset + wx.navigateTo({ + url: `/pages/caseReport/index?name=${name}&imageField=${imagefield}`, + }) + }, }) diff --git a/src/pages/qaFormDetail/index.wxml b/src/pages/qaFormDetail/index.wxml index 151badf..cbe639d 100644 --- a/src/pages/qaFormDetail/index.wxml +++ b/src/pages/qaFormDetail/index.wxml @@ -3,7 +3,10 @@ - {{item.displayNo}}. {{item.QuestionContent}} + + {{item.displayNo}}. + {{item.QuestionContent}} + {{item.answerText}} @@ -60,8 +63,19 @@ - - + + {{item.name}}