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 { @@ -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;

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

@ -103,12 +103,7 @@ Page({ @@ -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({ @@ -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({ @@ -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({ @@ -160,8 +155,9 @@ Page({
const oldValue = this.data[`${key}`]
if (!clickedId) {
// 点击"全部":清空其他选择
// 点击“全部”:清空其他选择
this.setData({ [`${key}`]: [] })
this.getTaskNum()
return
}
@ -170,11 +166,15 @@ Page({ @@ -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'

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

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

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

@ -77,7 +77,7 @@ Page({ @@ -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({ @@ -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)

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

@ -44,11 +44,16 @@ Page({ @@ -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({ @@ -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({ @@ -90,7 +100,7 @@ Page({
const page = reset ? 1 : this.data.pagination.page
const data: Record<string, any> = { page, pageSize: 10 }
wx.ajax({
return wx.ajax({
method: 'GET',
url: '?r=igg4/medical-visit/list',
data,
@ -125,7 +135,7 @@ Page({ @@ -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({ @@ -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,

3
src/pages/index/index.ts

@ -61,6 +61,7 @@ Page({ @@ -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({ @@ -250,6 +251,8 @@ Page({
this.getActivity(item.configId, item.showNum, 'liveDownList')
}
})
}).finally(() => {
wx.hideLoading()
})
},
async getPopup() {

15
src/pages/mySave/index.ts

@ -13,6 +13,7 @@ Page({ @@ -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({ @@ -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({

2
src/pages/personalInformation/index.ts

@ -31,6 +31,7 @@ Page({ @@ -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({ @@ -38,6 +39,7 @@ Page({
},
formatUserInfo(res) {
wx.hideLoading()
this.formatBorn(res.Birth)
},
formatBorn(Birth) {

7
src/pages/qaForm/index.ts

@ -41,6 +41,7 @@ Page({ @@ -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({ @@ -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: {},

6
src/pages/qaFormDetail/index.ts

@ -135,9 +135,9 @@ Page({ @@ -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))

14
src/pages/qaFormDetail/index.wxml

@ -14,10 +14,14 @@ @@ -14,10 +14,14 @@
<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">
{{item.Options[val] || ''}}
<block wx:if="{{val!=99}}">{{item.Options[val] || ''}}</block>
</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 class="answer-tag">{{item.DateValue}}</view>
@ -43,10 +47,12 @@ @@ -43,10 +47,12 @@
</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"
>
其他:{{item.OtherText}}
其他
<block wx:if="{{item.OtherText}}">:</block>
{{item.OtherText}}
</view>
</view>
</block>

Loading…
Cancel
Save