diff --git a/src/doctor/pages/d_createTask/index.scss b/src/doctor/pages/d_createTask/index.scss index f4d5abb..f201fce 100644 --- a/src/doctor/pages/d_createTask/index.scss +++ b/src/doctor/pages/d_createTask/index.scss @@ -398,14 +398,8 @@ page { justify-content: space-between; align-items: center; .total { - display: flex; - align-items: center; font-size: 32rpx; color: rgba(34, 34, 34, 1); - .resource { - margin-left: 26rpx; - color: rgba(22, 121, 203, 1); - } } .clear { display: flex; diff --git a/src/doctor/pages/d_createTask/index.ts b/src/doctor/pages/d_createTask/index.ts index 3cb7a1c..a32b34e 100644 --- a/src/doctor/pages/d_createTask/index.ts +++ b/src/doctor/pages/d_createTask/index.ts @@ -103,12 +103,7 @@ Page({ PushTemplateId: 0, }) }, - getTaskNum(e?: any) { - let btn = 0 - if (typeof e === 'object') { - btn = e?.currentTarget?.dataset?.btn - } - + getTaskNum() { return wx .ajax({ method: 'GET', @@ -120,7 +115,6 @@ Page({ ConfirmedIgg4: this.data.ConfirmedIgg4, MedicationType: this.data.MedicationType.join(','), }, - loading: true, }) .then((res) => { this.setData({ @@ -152,6 +146,7 @@ Page({ this.setData({ [`${key}`]: data[index].id, }) + this.getTaskNum() }, handleCheckbox(e: any) { const { index, key } = e.currentTarget.dataset @@ -160,8 +155,9 @@ Page({ const oldValue = this.data[`${key}`] if (!clickedId) { - // 点击"全部":清空其他选择 + // 点击“全部”:清空其他选择 this.setData({ [`${key}`]: [] }) + this.getTaskNum() return } @@ -170,11 +166,15 @@ Page({ : [...oldValue.filter((item: any) => item !== 0), clickedId] // 选具体选项时移除"全部" this.setData({ [`${key}`]: value }) + this.getTaskNum() }, handleSelectAll() { this.setData({ SelectAll: this.data.SelectAll === 1 ? 0 : 1 }) this.getTaskNum() }, + handleBindDateChange() { + this.getTaskNum() + }, handleDay(e) { const { value } = e.currentTarget.dataset const isAfter19 = dayjs().format('HH:mm') >= '19:00' diff --git a/src/doctor/pages/d_createTask/index.wxml b/src/doctor/pages/d_createTask/index.wxml index 5608dae..64ed807 100644 --- a/src/doctor/pages/d_createTask/index.wxml +++ b/src/doctor/pages/d_createTask/index.wxml @@ -36,13 +36,13 @@ 绑定时间 - + {{BindStartDate}} - + {{BindEndDate}} @@ -158,7 +158,6 @@ 共筛选出 {{PatientNum}}人 - 刷新 diff --git a/src/gift/pages/recordDetail/index.ts b/src/gift/pages/recordDetail/index.ts index e3e481a..9e1b4ec 100644 --- a/src/gift/pages/recordDetail/index.ts +++ b/src/gift/pages/recordDetail/index.ts @@ -77,7 +77,7 @@ Page({ const medicationsLabel = (res.medicationsUsed || []) .map((id: number) => { if (id === 99 && res.medicationsUsedOtherText) return `其他:${res.medicationsUsedOtherText}` - if (id === 99) return '' + if (id === 99) return '其他' return medicationsMap[id] }) .filter(Boolean) @@ -85,7 +85,7 @@ Page({ const immunosuppressantLabel = (res.immunosuppressantName || []) .map((id: number) => { if (id === 99 && res.immunosuppressantNameOtherText) return `其他:${res.immunosuppressantNameOtherText}` - if (id === 99) return '' + if (id === 99) return '其他' return immunosuppressantMap[id] }) .filter(Boolean) diff --git a/src/gift/pages/recordList/index.ts b/src/gift/pages/recordList/index.ts index 42afd2b..1a48ed4 100644 --- a/src/gift/pages/recordList/index.ts +++ b/src/gift/pages/recordList/index.ts @@ -44,11 +44,16 @@ Page({ }) _app.waitLogin().then(() => { _app.permissionVerification(3, 0, '/gift/pages/recordList/index').then(() => { + wx.showLoading({ title: '加载中', mask: true }) _app.mpBehavior({ PageName: 'PG_PatientRecordList' }) this.getEnums().then(() => { - this.getLatestRecord() - this.getList() - this.getIndicatorHistory() + Promise.all([ + this.getLatestRecord(), + this.getList(), + this.getIndicatorHistory(), + ]).finally(() => { + wx.hideLoading() + }) }) }) }) @@ -59,9 +64,14 @@ Page({ this.__loaded = true return } - this.getLatestRecord() - this.getList(true) - this.getIndicatorHistory() + wx.showLoading({ title: '加载中', mask: true }) + Promise.all([ + this.getLatestRecord(), + this.getList(true), + this.getIndicatorHistory(), + ]).finally(() => { + wx.hideLoading() + }) }, // ========== API ========== @@ -90,7 +100,7 @@ Page({ const page = reset ? 1 : this.data.pagination.page const data: Record = { page, pageSize: 10 } - wx.ajax({ + return wx.ajax({ method: 'GET', url: '?r=igg4/medical-visit/list', data, @@ -125,7 +135,7 @@ Page({ }, getLatestRecord() { - wx.ajax({ + return wx.ajax({ method: 'GET', url: '?r=igg4/medical-visit/get-latest-record', }).then((res: any) => { @@ -146,7 +156,7 @@ Page({ data.yearEnd = Number(endDate.substring(0, 4)) } - wx.ajax({ + return wx.ajax({ method: 'GET', url: '?r=igg4/medical-visit/indicator-history', data, diff --git a/src/pages/index/index.ts b/src/pages/index/index.ts index 08a50d8..6152d72 100644 --- a/src/pages/index/index.ts +++ b/src/pages/index/index.ts @@ -61,6 +61,7 @@ Page({ }) }, onShow() { + wx.showLoading({ title: '加载中', mask: true }) app.waitLogin({}).then(() => { app.mpBehavior({ PageName: 'PG_PatientHome' }) this.setData({ @@ -250,6 +251,8 @@ Page({ this.getActivity(item.configId, item.showNum, 'liveDownList') } }) + }).finally(() => { + wx.hideLoading() }) }, async getPopup() { diff --git a/src/pages/mySave/index.ts b/src/pages/mySave/index.ts index b3e71b7..faea941 100644 --- a/src/pages/mySave/index.ts +++ b/src/pages/mySave/index.ts @@ -13,6 +13,7 @@ Page({ }, onLoad() { app.waitLogin().then(() => { + wx.showLoading({ title: '加载中', mask: true }) app.mpBehavior({ PageName: 'PG_PatientMySave' }) wx.ajax({ method: 'GET', @@ -21,22 +22,24 @@ Page({ this.setData({ config: res, }) - this.getList() + return this.getList() + }).finally(() => { + wx.hideLoading() }) }) }, getList() { - this.getInfoList() + return this.getInfoList(1, false) }, - getInfoList(newPage = 1) { - wx.ajax({ + getInfoList(newPage = 1, loading = true) { + return wx.ajax({ method: 'GET', url: '?r=igg4/pic-text/collection-list', data: { page: newPage, count: 10, - }, - loading: true, + }, + loading, }).then((res: any) => { const list = res.page == 1 ? res.list : [...this.data.list, ...res.list] this.setData({ diff --git a/src/pages/personalInformation/index.ts b/src/pages/personalInformation/index.ts index d6adbbb..746dfc5 100644 --- a/src/pages/personalInformation/index.ts +++ b/src/pages/personalInformation/index.ts @@ -31,6 +31,7 @@ Page({ }) app.waitLogin().then(() => { + wx.showLoading({ title: '加载中', mask: true }) app.mpBehavior({ PageName: 'PG_PatientPersonalInfo' }) const that = this app.getUserInfo(that, true, that.formatUserInfo.bind(that)) @@ -38,6 +39,7 @@ Page({ }, formatUserInfo(res) { + wx.hideLoading() this.formatBorn(res.Birth) }, formatBorn(Birth) { diff --git a/src/pages/qaForm/index.ts b/src/pages/qaForm/index.ts index 19872b3..ef1853a 100644 --- a/src/pages/qaForm/index.ts +++ b/src/pages/qaForm/index.ts @@ -41,6 +41,7 @@ Page({ backPage: options.backPage || '', }) app.waitLogin({}).then(() => { + wx.showLoading({ title: '加载中', mask: true }) app.mpBehavior({ PageName: 'PG_PatientQaForm' }) this.loadQuestionnaire() }) @@ -86,12 +87,14 @@ Page({ }) this.setData({ questions }) this.updateVisibility() - this.loadAnswers() + return this.loadAnswers() + }).finally(() => { + wx.hideLoading() }) }, loadAnswers() { - wx.ajax({ + return wx.ajax({ method: 'GET', url: '?r=igg4/health-question/get-patient-questionnaire', data: {}, diff --git a/src/pages/qaFormDetail/index.ts b/src/pages/qaFormDetail/index.ts index 0566b43..7258b92 100644 --- a/src/pages/qaFormDetail/index.ts +++ b/src/pages/qaFormDetail/index.ts @@ -135,9 +135,9 @@ Page({ if (!found) return let answer = found.Answer if (answer === null || answer === undefined) return - if (Array.isArray(answer)) { - answer = answer.filter((item) => item != 99) - } + // 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)) diff --git a/src/pages/qaFormDetail/index.wxml b/src/pages/qaFormDetail/index.wxml index 43e80a3..263b725 100644 --- a/src/pages/qaFormDetail/index.wxml +++ b/src/pages/qaFormDetail/index.wxml @@ -14,10 +14,14 @@ - {{item.Options[val] || ''}} + {{item.Options[val] || ''}} - 其他:{{item.OtherText}} + + 其他 + + {{item.OtherText}} + {{item.DateValue}} @@ -43,10 +47,12 @@ - 其他:{{item.OtherText}} + 其他 + + {{item.OtherText}}