Browse Source

产品走查问题处理

dev
kola-web 4 days ago
parent
commit
8d12f615f7
  1. 6
      src/doctor/pages/d_createTask/index.scss
  2. 16
      src/doctor/pages/d_createTask/index.ts
  3. 5
      src/doctor/pages/d_createTask/index.wxml
  4. 4
      src/gift/pages/recordDetail/index.ts
  5. 28
      src/gift/pages/recordList/index.ts
  6. 3
      src/pages/index/index.ts
  7. 15
      src/pages/mySave/index.ts
  8. 2
      src/pages/personalInformation/index.ts
  9. 7
      src/pages/qaForm/index.ts
  10. 6
      src/pages/qaFormDetail/index.ts
  11. 14
      src/pages/qaFormDetail/index.wxml

6
src/doctor/pages/d_createTask/index.scss

@ -398,14 +398,8 @@ page {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.total { .total {
display: flex;
align-items: center;
font-size: 32rpx; font-size: 32rpx;
color: rgba(34, 34, 34, 1); color: rgba(34, 34, 34, 1);
.resource {
margin-left: 26rpx;
color: rgba(22, 121, 203, 1);
}
} }
.clear { .clear {
display: flex; display: flex;

16
src/doctor/pages/d_createTask/index.ts

@ -103,12 +103,7 @@ Page({
PushTemplateId: 0, PushTemplateId: 0,
}) })
}, },
getTaskNum(e?: any) { getTaskNum() {
let btn = 0
if (typeof e === 'object') {
btn = e?.currentTarget?.dataset?.btn
}
return wx return wx
.ajax({ .ajax({
method: 'GET', method: 'GET',
@ -120,7 +115,6 @@ Page({
ConfirmedIgg4: this.data.ConfirmedIgg4, ConfirmedIgg4: this.data.ConfirmedIgg4,
MedicationType: this.data.MedicationType.join(','), MedicationType: this.data.MedicationType.join(','),
}, },
loading: true,
}) })
.then((res) => { .then((res) => {
this.setData({ this.setData({
@ -152,6 +146,7 @@ Page({
this.setData({ this.setData({
[`${key}`]: data[index].id, [`${key}`]: data[index].id,
}) })
this.getTaskNum()
}, },
handleCheckbox(e: any) { handleCheckbox(e: any) {
const { index, key } = e.currentTarget.dataset const { index, key } = e.currentTarget.dataset
@ -160,8 +155,9 @@ Page({
const oldValue = this.data[`${key}`] const oldValue = this.data[`${key}`]
if (!clickedId) { if (!clickedId) {
// 点击"全部":清空其他选择 // 点击“全部”:清空其他选择
this.setData({ [`${key}`]: [] }) this.setData({ [`${key}`]: [] })
this.getTaskNum()
return return
} }
@ -170,11 +166,15 @@ Page({
: [...oldValue.filter((item: any) => item !== 0), clickedId] // 选具体选项时移除"全部" : [...oldValue.filter((item: any) => item !== 0), clickedId] // 选具体选项时移除"全部"
this.setData({ [`${key}`]: value }) this.setData({ [`${key}`]: value })
this.getTaskNum()
}, },
handleSelectAll() { handleSelectAll() {
this.setData({ SelectAll: this.data.SelectAll === 1 ? 0 : 1 }) this.setData({ SelectAll: this.data.SelectAll === 1 ? 0 : 1 })
this.getTaskNum() this.getTaskNum()
}, },
handleBindDateChange() {
this.getTaskNum()
},
handleDay(e) { handleDay(e) {
const { value } = e.currentTarget.dataset const { value } = e.currentTarget.dataset
const isAfter19 = dayjs().format('HH:mm') >= '19:00' const isAfter19 = dayjs().format('HH:mm') >= '19:00'

5
src/doctor/pages/d_createTask/index.wxml

@ -36,13 +36,13 @@
<view class="form-item"> <view class="form-item">
<view class="f-title">绑定时间</view> <view class="f-title">绑定时间</view>
<view class="date"> <view class="date">
<picker class="picker" model:value="{{BindStartDate}}" end="{{BindEndDate}}" mode="date"> <picker class="picker" model:value="{{BindStartDate}}" end="{{BindEndDate}}" mode="date" bindchange="handleBindDateChange">
<view class="d-item"> <view class="d-item">
<view class="content" data-place="选择开始时间">{{BindStartDate}}</view> <view class="content" data-place="选择开始时间">{{BindStartDate}}</view>
<image class="icon" src="{{imageUrl}}icon110.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon110.png?t={{Timestamp}}"></image>
</view> </view>
</picker> </picker>
<picker class="picker" model:value="{{BindEndDate}}" start="{{BindStartDate}}" mode="date"> <picker class="picker" model:value="{{BindEndDate}}" start="{{BindStartDate}}" mode="date" bindchange="handleBindDateChange">
<view class="d-item"> <view class="d-item">
<view class="content" data-place="选择结束时间">{{BindEndDate}}</view> <view class="content" data-place="选择结束时间">{{BindEndDate}}</view>
<image class="icon" src="{{imageUrl}}icon110.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon110.png?t={{Timestamp}}"></image>
@ -158,7 +158,6 @@
<view class="total-line"> <view class="total-line">
<view class="total"> <view class="total">
共筛选出 {{PatientNum}}人 共筛选出 {{PatientNum}}人
<view class="resource" bind:tap="getTaskNum" data-btn="1">刷新</view>
</view> </view>
<view class="clear" bind:tap="handleReset"> <view class="clear" bind:tap="handleReset">
<image class="icon" src="{{imageUrl}}icon111.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon111.png?t={{Timestamp}}"></image>

4
src/gift/pages/recordDetail/index.ts

@ -77,7 +77,7 @@ Page({
const medicationsLabel = (res.medicationsUsed || []) const medicationsLabel = (res.medicationsUsed || [])
.map((id: number) => { .map((id: number) => {
if (id === 99 && res.medicationsUsedOtherText) return `其他:${res.medicationsUsedOtherText}` if (id === 99 && res.medicationsUsedOtherText) return `其他:${res.medicationsUsedOtherText}`
if (id === 99) return '' if (id === 99) return '其他'
return medicationsMap[id] return medicationsMap[id]
}) })
.filter(Boolean) .filter(Boolean)
@ -85,7 +85,7 @@ Page({
const immunosuppressantLabel = (res.immunosuppressantName || []) const immunosuppressantLabel = (res.immunosuppressantName || [])
.map((id: number) => { .map((id: number) => {
if (id === 99 && res.immunosuppressantNameOtherText) return `其他:${res.immunosuppressantNameOtherText}` if (id === 99 && res.immunosuppressantNameOtherText) return `其他:${res.immunosuppressantNameOtherText}`
if (id === 99) return '' if (id === 99) return '其他'
return immunosuppressantMap[id] return immunosuppressantMap[id]
}) })
.filter(Boolean) .filter(Boolean)

28
src/gift/pages/recordList/index.ts

@ -44,11 +44,16 @@ Page({
}) })
_app.waitLogin().then(() => { _app.waitLogin().then(() => {
_app.permissionVerification(3, 0, '/gift/pages/recordList/index').then(() => { _app.permissionVerification(3, 0, '/gift/pages/recordList/index').then(() => {
wx.showLoading({ title: '加载中', mask: true })
_app.mpBehavior({ PageName: 'PG_PatientRecordList' }) _app.mpBehavior({ PageName: 'PG_PatientRecordList' })
this.getEnums().then(() => { this.getEnums().then(() => {
this.getLatestRecord() Promise.all([
this.getList() this.getLatestRecord(),
this.getIndicatorHistory() this.getList(),
this.getIndicatorHistory(),
]).finally(() => {
wx.hideLoading()
})
}) })
}) })
}) })
@ -59,9 +64,14 @@ Page({
this.__loaded = true this.__loaded = true
return return
} }
this.getLatestRecord() wx.showLoading({ title: '加载中', mask: true })
this.getList(true) Promise.all([
this.getIndicatorHistory() this.getLatestRecord(),
this.getList(true),
this.getIndicatorHistory(),
]).finally(() => {
wx.hideLoading()
})
}, },
// ========== API ========== // ========== API ==========
@ -90,7 +100,7 @@ Page({
const page = reset ? 1 : this.data.pagination.page const page = reset ? 1 : this.data.pagination.page
const data: Record<string, any> = { page, pageSize: 10 } const data: Record<string, any> = { page, pageSize: 10 }
wx.ajax({ return wx.ajax({
method: 'GET', method: 'GET',
url: '?r=igg4/medical-visit/list', url: '?r=igg4/medical-visit/list',
data, data,
@ -125,7 +135,7 @@ Page({
}, },
getLatestRecord() { getLatestRecord() {
wx.ajax({ return wx.ajax({
method: 'GET', method: 'GET',
url: '?r=igg4/medical-visit/get-latest-record', url: '?r=igg4/medical-visit/get-latest-record',
}).then((res: any) => { }).then((res: any) => {
@ -146,7 +156,7 @@ Page({
data.yearEnd = Number(endDate.substring(0, 4)) data.yearEnd = Number(endDate.substring(0, 4))
} }
wx.ajax({ return wx.ajax({
method: 'GET', method: 'GET',
url: '?r=igg4/medical-visit/indicator-history', url: '?r=igg4/medical-visit/indicator-history',
data, data,

3
src/pages/index/index.ts

@ -61,6 +61,7 @@ Page({
}) })
}, },
onShow() { onShow() {
wx.showLoading({ title: '加载中', mask: true })
app.waitLogin({}).then(() => { app.waitLogin({}).then(() => {
app.mpBehavior({ PageName: 'PG_PatientHome' }) app.mpBehavior({ PageName: 'PG_PatientHome' })
this.setData({ this.setData({
@ -250,6 +251,8 @@ Page({
this.getActivity(item.configId, item.showNum, 'liveDownList') this.getActivity(item.configId, item.showNum, 'liveDownList')
} }
}) })
}).finally(() => {
wx.hideLoading()
}) })
}, },
async getPopup() { async getPopup() {

15
src/pages/mySave/index.ts

@ -13,6 +13,7 @@ Page({
}, },
onLoad() { onLoad() {
app.waitLogin().then(() => { app.waitLogin().then(() => {
wx.showLoading({ title: '加载中', mask: true })
app.mpBehavior({ PageName: 'PG_PatientMySave' }) app.mpBehavior({ PageName: 'PG_PatientMySave' })
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
@ -21,22 +22,24 @@ Page({
this.setData({ this.setData({
config: res, config: res,
}) })
this.getList() return this.getList()
}).finally(() => {
wx.hideLoading()
}) })
}) })
}, },
getList() { getList() {
this.getInfoList() return this.getInfoList(1, false)
}, },
getInfoList(newPage = 1) { getInfoList(newPage = 1, loading = true) {
wx.ajax({ return wx.ajax({
method: 'GET', method: 'GET',
url: '?r=igg4/pic-text/collection-list', url: '?r=igg4/pic-text/collection-list',
data: { data: {
page: newPage, page: newPage,
count: 10, count: 10,
}, },
loading: true, loading,
}).then((res: any) => { }).then((res: any) => {
const list = res.page == 1 ? res.list : [...this.data.list, ...res.list] const list = res.page == 1 ? res.list : [...this.data.list, ...res.list]
this.setData({ this.setData({

2
src/pages/personalInformation/index.ts

@ -31,6 +31,7 @@ Page({
}) })
app.waitLogin().then(() => { app.waitLogin().then(() => {
wx.showLoading({ title: '加载中', mask: true })
app.mpBehavior({ PageName: 'PG_PatientPersonalInfo' }) app.mpBehavior({ PageName: 'PG_PatientPersonalInfo' })
const that = this const that = this
app.getUserInfo(that, true, that.formatUserInfo.bind(that)) app.getUserInfo(that, true, that.formatUserInfo.bind(that))
@ -38,6 +39,7 @@ Page({
}, },
formatUserInfo(res) { formatUserInfo(res) {
wx.hideLoading()
this.formatBorn(res.Birth) this.formatBorn(res.Birth)
}, },
formatBorn(Birth) { formatBorn(Birth) {

7
src/pages/qaForm/index.ts

@ -41,6 +41,7 @@ Page({
backPage: options.backPage || '', backPage: options.backPage || '',
}) })
app.waitLogin({}).then(() => { app.waitLogin({}).then(() => {
wx.showLoading({ title: '加载中', mask: true })
app.mpBehavior({ PageName: 'PG_PatientQaForm' }) app.mpBehavior({ PageName: 'PG_PatientQaForm' })
this.loadQuestionnaire() this.loadQuestionnaire()
}) })
@ -86,12 +87,14 @@ Page({
}) })
this.setData({ questions }) this.setData({ questions })
this.updateVisibility() this.updateVisibility()
this.loadAnswers() return this.loadAnswers()
}).finally(() => {
wx.hideLoading()
}) })
}, },
loadAnswers() { loadAnswers() {
wx.ajax({ return wx.ajax({
method: 'GET', method: 'GET',
url: '?r=igg4/health-question/get-patient-questionnaire', url: '?r=igg4/health-question/get-patient-questionnaire',
data: {}, data: {},

6
src/pages/qaFormDetail/index.ts

@ -135,9 +135,9 @@ Page({
if (!found) return if (!found) return
let answer = found.Answer let answer = found.Answer
if (answer === null || answer === undefined) return if (answer === null || answer === undefined) return
if (Array.isArray(answer)) { // if (Array.isArray(answer)) {
answer = answer.filter((item) => item != 99) // answer = answer.filter((item) => item != 99)
} // }
if (q.QuestionType === 1) { if (q.QuestionType === 1) {
updates[`questions[${i}].Answer`] = Number(answer) updates[`questions[${i}].Answer`] = Number(answer)
updates[`questions[${i}].answerText`] = this.getAnswerText(q, Number(answer)) updates[`questions[${i}].answerText`] = this.getAnswerText(q, Number(answer))

14
src/pages/qaFormDetail/index.wxml

@ -14,10 +14,14 @@
<view wx:if="{{item.QuestionType === 2 && item.answerText}}" class="answer-text"> <view wx:if="{{item.QuestionType === 2 && item.answerText}}" class="answer-text">
<view class="answer-tag" wx:for="{{item.Answer}}" wx:for-item="val" wx:key="*this"> <view class="answer-tag" wx:for="{{item.Answer}}" wx:for-item="val" wx:key="*this">
{{item.Options[val] || ''}} <block wx:if="{{val!=99}}">{{item.Options[val] || ''}}</block>
</view> </view>
</view> </view>
<view wx:if="{{item.QuestionType === 2 && item.OtherText}}" class="other-text">其他:{{item.OtherText}}</view> <view wx:if="{{item.QuestionType === 2 && tools.eq(99, item.Answer)}}" class="other-text">
其他
<block wx:if="{{item.OtherText}}">:</block>
{{item.OtherText}}
</view>
<view wx:if="{{item.QuestionType === 3 && item.DateValue}}" class="answer-text"> <view wx:if="{{item.QuestionType === 3 && item.DateValue}}" class="answer-text">
<view class="answer-tag">{{item.DateValue}}</view> <view class="answer-tag">{{item.DateValue}}</view>
@ -43,10 +47,12 @@
</view> </view>
<view <view
wx:if="{{item.QuestionType === 1 && item.HasOther === 1 && tools.eq(99, item.Answer) && item.OtherText}}" wx:if="{{item.QuestionType === 1 && item.HasOther === 1 && tools.eq(99, item.Answer)}}"
class="other-text" class="other-text"
> >
其他:{{item.OtherText}} 其他
<block wx:if="{{item.OtherText}}">:</block>
{{item.OtherText}}
</view> </view>
</view> </view>
</block> </block>

Loading…
Cancel
Save