Browse Source

医生端页面开发

dev
kola-web 3 weeks ago
parent
commit
829b4ff2f8
  1. 7
      .vscode/css-data.json
  2. 3
      .vscode/settings.json
  3. 39
      project.private.config.json
  4. 4
      src/app.json
  5. 343
      src/app.ts
  6. 25
      src/components/patient-tab-bar/index.ts
  7. 4
      src/gift/pages/myHealthRecord/index.ts
  8. BIN
      src/images/icon4.png
  9. BIN
      src/images/icon45.png
  10. BIN
      src/images/icon46.png
  11. BIN
      src/images/icon47.png
  12. BIN
      src/images/icon48.png
  13. BIN
      src/images/icon49.png
  14. BIN
      src/images/icon5.png
  15. BIN
      src/images/icon50.png
  16. BIN
      src/images/icon51.png
  17. BIN
      src/images/icon52.png
  18. BIN
      src/images/icon53.png
  19. BIN
      src/images/icon54.png
  20. BIN
      src/images/icon55.png
  21. BIN
      src/images/icon56.png
  22. BIN
      src/images/icon57.png
  23. BIN
      src/images/icon58.png
  24. BIN
      src/images/icon59.png
  25. BIN
      src/images/icon6.png
  26. BIN
      src/images/icon60.png
  27. BIN
      src/images/icon61.png
  28. BIN
      src/images/icon62.png
  29. BIN
      src/images/icon63.png
  30. BIN
      src/images/icon64.png
  31. BIN
      src/images/icon65.png
  32. BIN
      src/images/icon66.png
  33. BIN
      src/images/icon67.png
  34. BIN
      src/images/invite-card.png
  35. BIN
      src/images/start.png
  36. BIN
      src/images/title7.png
  37. BIN
      src/images/title8.png
  38. BIN
      src/images/title9.png
  39. 3
      src/pages/d_interactive/index.json
  40. 71
      src/pages/d_interactive/index.scss
  41. 16
      src/pages/d_interactive/index.wxml
  42. 3
      src/pages/d_interactiveDoctor/index.json
  43. 197
      src/pages/d_interactiveDoctor/index.scss
  44. 255
      src/pages/d_interactiveDoctor/index.ts
  45. 145
      src/pages/d_interactiveDoctor/index.wxml
  46. 7
      src/pages/d_invite/index.json
  47. 29
      src/pages/d_invite/index.scss
  48. 114
      src/pages/d_invite/index.ts
  49. 6
      src/pages/d_invite/index.wxml
  50. 9
      src/pages/d_patient/index.json
  51. 344
      src/pages/d_patient/index.scss
  52. 212
      src/pages/d_patient/index.ts
  53. 46
      src/pages/d_patient/index.wxml
  54. 12
      src/pages/d_patient/index.wxs
  55. 5
      src/pages/d_patientDetail/index.json
  56. 629
      src/pages/d_patientDetail/index.scss
  57. 342
      src/pages/d_patientDetail/index.ts
  58. 476
      src/pages/d_patientDetail/index.wxml
  59. 57
      src/pages/d_userInfo/index.scss
  60. 116
      src/pages/d_userInfo/index.ts
  61. 16
      src/pages/d_userInfo/index.wxml
  62. 51
      src/pages/home/index.scss
  63. 184
      src/pages/home/index.ts
  64. 63
      src/pages/home/index.wxml
  65. 96
      src/pages/login/index.ts
  66. 8
      src/pages/my/index.scss
  67. 66
      src/pages/my/index.ts
  68. 11
      src/pages/my/index.wxml
  69. 4
      src/pages/start/index.scss
  70. 1
      src/pages/start/index.wxml
  71. 2
      src/patient/pages/adlResult/index.ts
  72. 2
      src/patient/pages/adlShare/index.ts
  73. 1
      src/patient/pages/cancellation/index.scss
  74. 2
      src/patient/pages/cancellation/index.ts
  75. 2
      src/patient/pages/cancellation/index.wxml
  76. 179
      src/patient/pages/certReslove/index.scss
  77. 96
      src/patient/pages/certReslove/index.ts
  78. 2
      src/patient/pages/certReslove/index.wxml
  79. 2
      src/patient/pages/doctor/index.ts
  80. 11
      src/patient/pages/doctorDetail/index.scss
  81. 2
      src/patient/pages/doctorDetail/index.ts
  82. 21
      src/patient/pages/doctorDetail/index.wxml
  83. 6
      src/patient/pages/enterInfo/index.scss
  84. 48
      src/patient/pages/enterInfo/index.ts
  85. 54
      src/patient/pages/enterInfo/index.wxml
  86. 2
      src/patient/pages/hospital/index.ts
  87. 1
      src/patient/pages/index/index.json
  88. 13
      src/patient/pages/index/index.scss
  89. 93
      src/patient/pages/index/index.ts
  90. 8
      src/patient/pages/index/index.wxml
  91. 2
      src/patient/pages/interactivePatient/index.scss
  92. 6
      src/patient/pages/interactivePatient/index.wxml
  93. 2
      src/patient/pages/live/index.ts
  94. 12
      src/patient/pages/live/index.wxml
  95. 7
      src/patient/pages/liveDetail/index.scss
  96. 2
      src/patient/pages/liveDetail/index.ts
  97. 8
      src/patient/pages/liveDetail/index.wxml
  98. 9
      src/patient/pages/liveResult/index.ts
  99. 4
      src/patient/pages/liveResult/index.wxml
  100. 105
      src/patient/pages/login/index.ts
  101. Some files were not shown because too many files have changed in this diff Show More

7
.vscode/css-data.json vendored

@ -0,0 +1,7 @@
{
"version": 1.1,
"properties": [{ "name": "foo", "description": "Foo property" }],
"atDirectives": [{ "name": "@foo", "description": "Foo at directive" }],
"pseudoClasses": [{ "name": ":foo", "description": "Foo pseudo class" }],
"pseudoElements": [{ "name": "::foo", "description": "Foo pseudo elements" }]
}

3
.vscode/settings.json vendored

@ -7,4 +7,7 @@
"css.intUnit": "rpx", "css.intUnit": "rpx",
"css.floatUnit": "rpx" "css.floatUnit": "rpx"
}, },
"css.customData": [
".vscode/css-data.json"
],
} }

39
project.private.config.json

@ -23,11 +23,46 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "start",
"pathName": "pages/start/index",
"query": "",
"scene": null,
"launchMode": "default"
},
{
"name": "医生-患者列表",
"pathName": "pages/d_patient/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "医生-个人信息",
"pathName": "pages/d_userInfo/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "患者-直播详情页",
"pathName": "patient/pages/liveDetail/index",
"query": "id=5",
"launchMode": "default",
"scene": null
},
{
"name": "医生-患者详情",
"pathName": "pages/d_patientDetail/index",
"query": "id=10",
"launchMode": "default",
"scene": null
},
{
"name": "患者-直播结果页", "name": "患者-直播结果页",
"pathName": "patient/pages/liveResult/index", "pathName": "patient/pages/liveResult/index",
"query": "id=5", "query": "id=5",
"scene": null, "launchMode": "default",
"launchMode": "default" "scene": null
}, },
{ {
"name": "患者-医生详情", "name": "患者-医生详情",

4
src/app.json

@ -12,7 +12,9 @@
"pages/d_interactive/index", "pages/d_interactive/index",
"pages/d_interactiveDoctor/index", "pages/d_interactiveDoctor/index",
"pages/d_patientDetail/index", "pages/d_patientDetail/index",
"pages/d_userInfo/index" "pages/d_userInfo/index",
"pages/d_invite/index",
"pages/d_patient/index"
], ],
"subPackages": [ "subPackages": [
{ {

343
src/app.ts

@ -1,15 +1,15 @@
import component from '@/utils/component'; import component from '@/utils/component'
import relativeTime from '@/utils/dayjs/relativeTime.js'; import relativeTime from '@/utils/dayjs/relativeTime.js'
import page from '@/utils/page'; import page from '@/utils/page'
import { request } from '@/utils/request'; import { request } from '@/utils/request'
import { parseScene } from './utils/util'; import { parseScene } from './utils/util'
const dayjs = require('dayjs'); const dayjs = require('dayjs')
const licia = require('miniprogram-licia'); const licia = require('miniprogram-licia')
require('/utils/dayjs/day-zh-cn.js'); require('/utils/dayjs/day-zh-cn.js')
dayjs.locale('zh-cn'); // 全局使用 dayjs.locale('zh-cn') // 全局使用
dayjs.extend(relativeTime); dayjs.extend(relativeTime)
App<IAppOption>({ App<IAppOption>({
globalData: { globalData: {
@ -30,6 +30,7 @@ App<IAppOption>({
isLogin: 0, isLogin: 0,
isNewReg: 0, isNewReg: 0,
loginType: 0, loginType: 0,
anyWhere: false,
scene: {}, scene: {},
@ -98,21 +99,21 @@ App<IAppOption>({
}, },
}, },
onLaunch() { onLaunch() {
Page = page as WechatMiniprogram.Page.Constructor; Page = page as WechatMiniprogram.Page.Constructor
Component = component as WechatMiniprogram.Component.Constructor; Component = component as WechatMiniprogram.Component.Constructor
wx.ajax = licia.curry(request)({ gUrl: this.globalData.url }); wx.ajax = licia.curry(request)({ gUrl: this.globalData.url })
this.startLogin(); this.startLogin()
wx.setInnerAudioOption({ wx.setInnerAudioOption({
obeyMuteSwitch: false, obeyMuteSwitch: false,
mixWithOther: false, mixWithOther: false,
}); })
}, },
onShow(options) { onShow(options) {
if (options.query.scene) { if (options.query.scene) {
this.globalData.scene = parseScene(options.query.scene); this.globalData.scene = parseScene(options.query.scene)
} }
}, },
startLogin(callback) { startLogin(callback) {
@ -125,16 +126,16 @@ App<IAppOption>({
code: res.code, code: res.code,
}, },
}).then((res: any) => { }).then((res: any) => {
this.globalData.loginState = res.loginState; this.globalData.loginState = res.loginState
this.globalData.isLogin = res.isLogin; this.globalData.isLogin = res.isLogin
this.globalData.isNewReg = res.isNewReg; this.globalData.isNewReg = res.isNewReg
this.globalData.loginType = res.loginType; this.globalData.loginType = res.loginType
if (callback) { if (callback) {
callback(); callback()
} }
}); })
}, },
}); })
}, },
updateLoginInfo(callback?: (any) => void) { updateLoginInfo(callback?: (any) => void) {
wx.ajax({ wx.ajax({
@ -142,87 +143,95 @@ App<IAppOption>({
url: '?r=xd/user/get-account-info', url: '?r=xd/user/get-account-info',
data: {}, data: {},
}).then((res) => { }).then((res) => {
this.globalData.isLogin = res.isLogin; this.globalData.isLogin = res.isLogin
this.globalData.loginType = res.loginType; this.globalData.loginType = res.loginType
this.globalData.isNewReg = res.isNewReg; this.globalData.isNewReg = res.isNewReg
if (callback) { if (callback) {
callback(res); callback(res)
} }
}); })
}, },
waitLogin({ type = [0] } = { type: 'any' }) { waitLogin({ type = [0] } = { type: 'any' }) {
return new Promise((resolve) => { return new Promise((resolve) => {
const checkLogin = () => { const checkLogin = () => {
if (this.globalData.loginState) { if (this.globalData.loginState) {
if (this.checkLoginType(type as pageType[] | 'any')) { if (this.checkLoginType(type as pageType[] | 'any')) {
resolve(); resolve()
} }
return; return
} }
setTimeout(() => { setTimeout(() => {
checkLogin(); checkLogin()
}, 500); }, 500)
}; }
checkLogin(); checkLogin()
}); })
}, },
checkLoginType(type) { checkLoginType(type, backPath = '') {
const { loginType, isLogin, isNewReg } = this.globalData; const { loginType, isLogin, isNewReg } = this.globalData
if(backPath){
app.globalData.backPath = backPath
}
if (type === 'any') { if (type === 'any') {
return true; return true
} }
if (isLogin !== 1) { if (isLogin !== 1) {
if (type.includes(0) && [0, 1].includes(loginType)) { if (type.includes(0) && [0, 1].includes(loginType)) {
return true; return true
} }
if (loginType === 1) { if ([0, 1].includes(loginType)) {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/login/index', url: '/patient/pages/login/index',
}); })
return false
} }
if (loginType === 2) { if (loginType === 2) {
wx.reLaunch({ wx.reLaunch({
url: '/pages/login/index', url: '/pages/login/index',
}); })
return false
} }
return false; return false
} }
if (isNewReg !== 1) { if (isNewReg !== 1) {
const typePageUrl = { const typePageUrl = {
1: '/patient/pages/entryInfo/index', 1: '/patient/pages/enterInfo/index',
2: '/pages/login/index', 2: '/pages/login/index',
}[loginType as 1 | 2]; }[loginType as 1 | 2]
wx.reLaunch({ wx.reLaunch({
url: typePageUrl, url: typePageUrl,
}); fail(err) {
return false; console.log(err)
},
})
return false
} }
if (!type.includes(loginType)) { if (!type.includes(loginType)) {
const typePageUrl = { const typePageUrl = {
1: '/patient/pages/index/index', 1: '/patient/pages/index/index',
2: '/pages/home/index', 2: '/pages/home/index',
}[loginType as 1 | 2]; }[loginType as 1 | 2]
wx.reLaunch({ wx.reLaunch({
url: typePageUrl, url: typePageUrl,
}); })
return false; return false
} }
return true; return true
}, },
getUserInfo(type: 0 | 1 | 2): Promise<never> { getUserInfo(type: 0 | 1 | 2): Promise<never> {
const url = { const url = {
2: '?r=xd/doctor/index/get-doctor', 2: '?r=xd/doctor/index/get-doctor',
}[type]; }[type]
return wx.ajax({ return wx.ajax({
method: 'GET', method: 'GET',
url, url,
data: {}, data: {},
}) as Promise<never>; }) as Promise<never>
}, },
mpBehavior(data) { mpBehavior(data) {
wx.ajax({ wx.ajax({
@ -231,23 +240,23 @@ App<IAppOption>({
data, data,
loading: false, loading: false,
showMsg: false, showMsg: false,
}); })
}, },
getMenuInfo(self) { getMenuInfo(self) {
const menuButtonInfo = wx.getMenuButtonBoundingClientRect(); const menuButtonInfo = wx.getMenuButtonBoundingClientRect()
self.setData({ self.setData({
menuButtonInfo, menuButtonInfo,
}); })
}, },
// zd相关函数 // zd相关函数
zdMpBehavior(data: { PageName: string; doctor?: boolean }) { zdMpBehavior(data: { PageName: string; doctor?: boolean }) {
const { loginType } = this.globalData; const { loginType } = this.globalData
if (loginType === 0) return; if (loginType === 0) return
let url = '?r=zd/mp-behavior/add'; let url = '?r=zd/mp-behavior/add'
if (data.doctor) { if (data.doctor) {
url = '?r=zd/doctor/mp-behavior/add'; url = '?r=zd/doctor/mp-behavior/add'
} }
delete data.doctor; delete data.doctor
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url, url,
@ -255,90 +264,90 @@ App<IAppOption>({
loading: false, loading: false,
showMsg: false, showMsg: false,
}).then((res) => { }).then((res) => {
console.log('res: ', res); console.log('res: ', res)
}); })
}, },
zdGetTheme() { zdGetTheme() {
return new Promise((resolve) => { return new Promise((resolve) => {
resolve('PATIENT'); resolve('PATIENT')
}); })
}, },
zdWaitLogin({ isReg = true, loginPage = false, pub = false } = { isReg: true, loginPage: false, pub: false }) { zdWaitLogin({ isReg = true, loginPage = false, pub = false } = { isReg: true, loginPage: false, pub: false }) {
let time: number; let time: number
const regFun = (resolve) => { const regFun = (resolve) => {
if (this.zdVerifySys(pub)) { if (this.zdVerifySys(pub)) {
if (this.globalData.loginType === 1) { if (this.globalData.loginType === 1) {
this.zdRegistrationVerification(() => resolve(), loginPage); this.zdRegistrationVerification(() => resolve(), loginPage)
} else { } else {
resolve(); resolve()
} }
} }
}; }
const unRegFun = (resolve) => { const unRegFun = (resolve) => {
if (!this.zdVerifySys(pub)) return; if (!this.zdVerifySys(pub)) return
resolve(); resolve()
}; }
return new Promise((resolve: (value?) => void) => { return new Promise((resolve: (value?) => void) => {
if (isReg) { if (isReg) {
if (Object.keys(this.globalData.zdUserInfo).length) { if (Object.keys(this.globalData.zdUserInfo).length) {
regFun(resolve); regFun(resolve)
return; return
} }
time = setInterval(() => { time = setInterval(() => {
if (Object.keys(this.globalData.zdUserInfo).length) { if (Object.keys(this.globalData.zdUserInfo).length) {
clearInterval(time); clearInterval(time)
regFun(resolve); regFun(resolve)
} }
}, 500); }, 500)
return; return
} }
this.globalData.anyWhere = true; this.globalData.anyWhere = true
if (this.globalData.loginState) { if (this.globalData.loginState) {
unRegFun(resolve); unRegFun(resolve)
return; return
} }
time = setInterval(() => { time = setInterval(() => {
if (this.globalData.loginState) { if (this.globalData.loginState) {
clearInterval(time); clearInterval(time)
unRegFun(resolve); unRegFun(resolve)
} }
}, 500); }, 500)
}); })
}, },
zdRegistrationVerification(callback: () => void, loginPage = false) { zdRegistrationVerification(callback: () => void, loginPage = false) {
// 1-空白用户,2-注册用户,3-疾病患者,4-用药患者 // 1-空白用户,2-注册用户,3-疾病患者,4-用药患者
const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo; const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo
const { anyWhere, first } = this.globalData; const { anyWhere, first } = this.globalData
if (loginPage || (anyWhere && first)) { if (loginPage || (anyWhere && first)) {
callback(); callback()
return; return
} }
if (UserType == 4) { if (UserType == 4) {
this.globalData.first = false; this.globalData.first = false
callback(); callback()
return; return
} }
if (UserType == 1) { if (UserType == 1) {
this.globalData.registChannel = 0; this.globalData.registChannel = 0
this.globalData.first = false; this.globalData.first = false
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/login/index', url: '/patient/pages/login/index',
}); })
return; return
} }
let urlKey = ''; let urlKey = ''
if (!PatientId) { if (!PatientId) {
urlKey = 'enterInfo'; urlKey = 'enterInfo'
} else if (AuditStatus == 0) { } else if (AuditStatus == 0) {
urlKey = 'noCert'; urlKey = 'noCert'
} else if (AuditStatus == 1) { } else if (AuditStatus == 1) {
urlKey = isFollow ? 'nopending' : 'pending'; urlKey = isFollow ? 'nopending' : 'pending'
} else if (AuditStatus == 2) { } else if (AuditStatus == 2) {
urlKey = 'reject'; urlKey = 'reject'
} }
let navUrl = { let navUrl = {
enterInfo: '/patient/pages/enterInfo/index', enterInfo: '/patient/pages/enterInfo/index',
@ -346,29 +355,29 @@ App<IAppOption>({
reject: '/patient/pages/enterInfo/index', reject: '/patient/pages/enterInfo/index',
pending: '/patient/pages/enterInfo/index', pending: '/patient/pages/enterInfo/index',
nopending: '/patient/pages/enterInfo/index', nopending: '/patient/pages/enterInfo/index',
}[urlKey]; }[urlKey]
if (navUrl && first) { if (navUrl && first) {
this.globalData.registChannel = 0; this.globalData.registChannel = 0
this.globalData.first = false; this.globalData.first = false
wx.reLaunch({ wx.reLaunch({
url: navUrl, url: navUrl,
}); })
this.globalData.first = false; this.globalData.first = false
return; return
} }
this.globalData.first = false; this.globalData.first = false
callback(); callback()
}, },
zdVerifySys(pub = false) { zdVerifySys(pub = false) {
// 1:患者 2:医生 // 1:患者 2:医生
const { loginType, isLogin, anyWhere } = this.globalData; const { loginType, isLogin, anyWhere } = this.globalData
const pages = getCurrentPages(); const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]; const currentPage = pages[pages.length - 1]
const url = currentPage.route; const url = currentPage.route
const options = currentPage.options; const options = currentPage.options
const ignorePath = ['pages/start/index']; const ignorePath = ['pages/start/index']
// 未登录用户 // 未登录用户
if (!isLogin) { if (!isLogin) {
@ -376,80 +385,80 @@ App<IAppOption>({
if (url.includes('doctor/pages')) { if (url.includes('doctor/pages')) {
wx.reLaunch({ wx.reLaunch({
url: '/doctor/pages/d_login/index', url: '/doctor/pages/d_login/index',
}); })
return false; return false
} }
// 患者端随便看看 // 患者端随便看看
if (anyWhere) { if (anyWhere) {
return true; return true
} }
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/login/index', url: '/patient/pages/login/index',
}); })
return false; return false
} }
if (ignorePath.includes(url)) return true; if (ignorePath.includes(url)) return true
if (loginType === 1) { if (loginType === 1) {
if (url.includes('doctor/pages')) { if (url.includes('doctor/pages')) {
wx.reLaunch({ wx.reLaunch({
url: '/pages/index/index', url: '/pages/index/index',
}); })
return false; return false
} else { } else {
return true; return true
} }
} }
if (loginType === 2 && !pub) { if (loginType === 2 && !pub) {
if (url.includes('doctor/pages')) { if (url.includes('doctor/pages')) {
return true; return true
} else { } else {
const params = Object.entries(options) const params = Object.entries(options)
.map(([key, value]) => `${key}=${value}`) .map(([key, value]) => `${key}=${value}`)
.join('&'); .join('&')
wx.reLaunch({ wx.reLaunch({
url: '/doctor/pages/d_trans/index?path=' + encodeURIComponent(`/${url}?${params}`), url: '/doctor/pages/d_trans/index?path=' + encodeURIComponent(`/${url}?${params}`),
}); })
return false; return false
} }
} }
return true; return true
}, },
zdPermissionVerification(grade = 1, registChannel = 0, backPage = null, regBusinessId = '') { zdPermissionVerification(grade = 1, registChannel = 0, backPage = null, regBusinessId = '') {
// 1-空白用户,2-注册用户,3-疾病患者,4-用药患者 // 1-空白用户,2-注册用户,3-疾病患者,4-用药患者
const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo; const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo
const that = this; const that = this
this.globalData.registChannel = registChannel; this.globalData.registChannel = registChannel
this.globalData.regBusinessId = regBusinessId; this.globalData.regBusinessId = regBusinessId
let isReject = false; let isReject = false
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (grade == 2 && Number(UserType) < 2) { if (grade == 2 && Number(UserType) < 2) {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/login/index', url: '/patient/pages/login/index',
}); })
isReject = true; isReject = true
} }
if (grade == 3 && Number(UserType) < 3) { if (grade == 3 && Number(UserType) < 3) {
if (UserType == 1) { if (UserType == 1) {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/login/index', url: '/patient/pages/login/index',
}); })
isReject = true; isReject = true
} }
if (UserType == 2) { if (UserType == 2) {
let urlKey = ''; let urlKey = ''
if (!PatientId) { if (!PatientId) {
urlKey = 'enterInfo'; urlKey = 'enterInfo'
} else if (AuditStatus == 0) { } else if (AuditStatus == 0) {
urlKey = 'noCert'; urlKey = 'noCert'
} else if (AuditStatus == 1) { } else if (AuditStatus == 1) {
if (backPage && (backPage as string).includes('liveResult')) { if (backPage && (backPage as string).includes('liveResult')) {
urlKey = 'liveResult'; urlKey = 'liveResult'
} else { } else {
urlKey = isFollow ? 'nopending' : 'pending'; urlKey = isFollow ? 'nopending' : 'pending'
} }
} else if (AuditStatus == 2) { } else if (AuditStatus == 2) {
urlKey = 'reject'; urlKey = 'reject'
} }
let navUrl = { let navUrl = {
enterInfo: '/patient/pages/enterInfo/index', enterInfo: '/patient/pages/enterInfo/index',
@ -458,55 +467,55 @@ App<IAppOption>({
pending: '/patient/pages/enterInfo/index', pending: '/patient/pages/enterInfo/index',
nopending: '/patient/pages/enterInfo/index', nopending: '/patient/pages/enterInfo/index',
liveResult: backPage, liveResult: backPage,
}[urlKey]; }[urlKey]
if (urlKey == 'liveResult') { if (urlKey == 'liveResult') {
wx.navigateTo({ wx.navigateTo({
url: navUrl as string, url: navUrl as string,
}); })
} else { } else {
wx.reLaunch({ wx.reLaunch({
url: navUrl as string, url: navUrl as string,
}); })
} }
isReject = true; isReject = true
} }
} }
if (grade == 4 && Number(UserType) < 4) { if (grade == 4 && Number(UserType) < 4) {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/vipLogin/index', url: '/patient/pages/vipLogin/index',
}); })
isReject = true; isReject = true
} }
if (isReject) { if (isReject) {
that.globalData.backPage = backPage; that.globalData.backPage = backPage
reject(null); reject(null)
return; return
} }
resolve(null); resolve(null)
}); })
}, },
getZdUserInfo(self, update = false, callback = (_zdUserInfo) => {}) { getZdUserInfo(self, update = false, callback = (_zdUserInfo) => {}) {
if (this.globalData.zdUserInfo?.UserId && !update) { if (this.globalData.zdUserInfo?.UserId && !update) {
self?.setData({ self?.setData({
zdUserInfo: this.globalData.zdUserInfo, zdUserInfo: this.globalData.zdUserInfo,
}); })
callback(this.globalData.zdUserInfo); callback(this.globalData.zdUserInfo)
return; return
} }
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/account/info', url: '?r=zd/account/info',
showMsg: false, showMsg: false,
}).then((res) => { }).then((res) => {
res.UserType = res.UserType || 1; res.UserType = res.UserType || 1
if (res.UserType > 2) { if (res.UserType > 2) {
this.globalData.anyWhere = false; this.globalData.anyWhere = false
} }
this.globalData.zdUserInfo = res; this.globalData.zdUserInfo = res
self?.setData({ self?.setData({
zdUserInfo: res, zdUserInfo: res,
}); })
const { doctorId, inviteChan } = this.globalData.scene; const { doctorId, inviteChan } = this.globalData.scene
if (doctorId && res.InviteDoctorId != doctorId && this.globalData.isLogin && res.PatientId) { if (doctorId && res.InviteDoctorId != doctorId && this.globalData.isLogin && res.PatientId) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -515,9 +524,9 @@ App<IAppOption>({
inviteDoctorId: doctorId, inviteDoctorId: doctorId,
inviteChannel: inviteChan, inviteChannel: inviteChan,
}, },
}); })
} }
callback(res); callback(res)
}); })
}, },
}); })

25
src/components/patient-tab-bar/index.ts

@ -71,29 +71,12 @@ Component({
onChange() {}, onChange() {},
handleNav(e) { handleNav(e) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const { list, config } = this.data const { list } = this.data
const pagePath = list[index].pagePath const pagePath = list[index].pagePath
app.globalData.BeginnerCardId = '' app.globalData.BeginnerCardId = ''
if (pagePath == '/patient/pages/my/index') { wx.reLaunch({
app.zdPermissionVerification(2, 0, `/patient/pages/index/index`).then(() => { url: pagePath,
wx.reLaunch({ })
url: pagePath,
})
})
} else if (pagePath == '/patient/pages/repository/index' && config.picTextEbookStatus == 1) {
app.zdPermissionVerification(2, 0, `/pages/repository/index`).then(() => {
const webviewUrl = encodeURIComponent(
`${app.globalData.url}/zdcare/#/cover?loginState=${app.globalData.loginState}`,
)
wx.navigateTo({
url: `/patient/pages/webview/index?url=${webviewUrl}`,
})
})
} else {
wx.reLaunch({
url: pagePath,
})
}
}, },
}, },
}) })

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

@ -991,7 +991,7 @@ Page({
if (index != 0) return; if (index != 0) return;
wx.showModal({ wx.showModal({
title: '确认删除?', title: '确认删除?',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
wx.ajax({ wx.ajax({
@ -1048,7 +1048,7 @@ Page({
} }
wx.showModal({ wx.showModal({
title: '确认删除?', title: '确认删除?',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
wx.ajax({ wx.ajax({

BIN
src/images/icon4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon45.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
src/images/icon46.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/icon47.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/icon48.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/icon49.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/icon5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon50.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon51.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/icon52.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
src/images/icon53.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
src/images/icon54.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
src/images/icon55.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon56.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/images/icon57.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/images/icon58.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/icon59.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
src/images/icon6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/images/icon60.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
src/images/icon61.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/icon62.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/images/icon63.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/images/icon64.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/images/icon65.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/images/icon66.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/images/icon67.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/images/invite-card.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
src/images/start.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
src/images/title7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
src/images/title8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
src/images/title9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

3
src/pages/d_interactive/index.json

@ -1,5 +1,6 @@
{ {
"navigationStyle": "custom", "navigationBarTitleText": "互动",
"navigationStyle": "default",
"usingComponents": { "usingComponents": {
"zd-navBar": "/components/zd-navBar/navBar", "zd-navBar": "/components/zd-navBar/navBar",
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",

71
src/pages/d_interactive/index.scss

@ -1,5 +1,5 @@
page { page {
background-color: rgba(242, 244, 245, 1); background-color: rgba(246, 248, 249, 1);
padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
} }
.page { .page {
@ -7,20 +7,19 @@ page {
.page-header { .page-header {
position: sticky; position: sticky;
top: 0; top: 0;
padding: 30rpx; padding: 32rpx 40rpx;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
z-index: 10; z-index: 10;
background-color: rgba(246, 248, 249, 1);
.wrap { .wrap {
display: flex; display: flex;
align-items: center; align-items: center;
.search { .search {
flex: 1; flex: 1;
padding: 18rpx 32rpx; padding: 12rpx 32rpx;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 16rpx; gap: 16rpx;
background: linear-gradient(to top, #ffffff 0%, #ebf3f4 100%); background: #ffffff;
box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 140rpx 140rpx 140rpx 140rpx; border-radius: 140rpx 140rpx 140rpx 140rpx;
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
.icon { .icon {
@ -37,60 +36,16 @@ page {
} }
.clear { .clear {
margin-left: 32rpx; margin-left: 32rpx;
width: 44rpx; width: 56rpx;
height: 44rpx; height: 56rpx;
}
}
.navbar {
margin-top: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
.nav {
position: relative;
flex: 1;
text-align: center;
font-size: 32rpx;
color: rgba(103, 113, 114, 1);
transition: all 0.3s;
.dot {
padding: 0 4rpx;
position: absolute;
left: 50%;
transform: translateX(35rpx);
top: 0;
min-width: 18rpx;
height: 26rpx;
font-size: 18rpx;
line-height: 26rpx;
color: rgba(255, 255, 255, 1);
border-radius: 50%;
background: rgba(215, 108, 108, 1);
}
&.active {
font-size: 32rpx;
color: rgba(98, 190, 208, 1);
font-weight: bold;
&::after {
position: absolute;
bottom: -30rpx;
left: 50%;
transform: translateX(-50%);
content: '';
width: 52rpx;
height: 8rpx;
border-radius: 24rpx 24rpx 0 0;
background: #62bed0;
}
}
} }
} }
} }
.list { .list {
margin: 30rpx; margin: 30rpx 40rpx;
.list-item { .list-item {
margin-bottom: 24rpx; margin-bottom: 24rpx;
padding: 30rpx; padding: 32rpx;
border-radius: 24rpx; border-radius: 24rpx;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
@ -123,8 +78,8 @@ page {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.name { .name {
font-size: 32rpx; font-size: 36rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
font-weight: bold; font-weight: bold;
} }
.date { .date {
@ -147,10 +102,10 @@ page {
} }
} }
.content { .content {
margin-top: 20rpx; margin-top: 16rpx;
max-width: 18em; max-width: 18em;
font-size: 28rpx; font-size: 28rpx;
color: rgba(154, 161, 162, 1); color: rgba(105, 104, 110, 1);
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;

16
src/pages/d_interactive/index.wxml

@ -1,28 +1,20 @@
<view class="page"> <view class="page">
<view <view class="page-header">
class="page-header"
style="background:#fff url({{imageUrl}}za-images/doctor/d_patient-bg.png?t={{Timestamp}}) no-repeat top center/100% 456rpx"
>
<zd-navBar title="互动" back home="{{false}}" bind:back="handleBack"></zd-navBar>
<view class="wrap"> <view class="wrap">
<view class="search"> <view class="search">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-search.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon48.png?t={{Timestamp}}"></image>
<input <input
type="text" type="text"
class="input" class="input"
placeholder-class="input-place" placeholder-class="input-place"
placeholder="搜索姓名、手机号" placeholder="可根据姓名、手机号搜索患者"
model:value="{{search}}" model:value="{{search}}"
confirm-type="search" confirm-type="search"
bindconfirm="handleSearch" bindconfirm="handleSearch"
bind:tap="handleTapSearch" bind:tap="handleTapSearch"
/> />
</view> </view>
<image <!-- <image class="clear" src="{{imageUrl}}icon47.png?t={{Timestamp}}" bind:tap="hancleClaer"></image> -->
class="clear"
src="{{imageUrl}}za-images/doctor/icon-clear.png?t={{Timestamp}}"
bind:tap="hancleClaer"
></image>
</view> </view>
<!-- <view class="navbar"> --> <!-- <view class="navbar"> -->
<!-- <view class="nav {{!active && 'active'}}" bind:tap="handleNav" data-active=""> --> <!-- <view class="nav {{!active && 'active'}}" bind:tap="handleNav" data-active=""> -->

3
src/pages/d_interactiveDoctor/index.json

@ -1,8 +1,9 @@
{ {
"navigationBarTitleText": "互动", "navigationBarTitleText": "互动",
"navigationStyle": "default", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"navbar": "/components/navbar/index",
"van-popup": "@vant/weapp/popup/index" "van-popup": "@vant/weapp/popup/index"
} }
} }

197
src/pages/d_interactiveDoctor/index.scss

@ -3,20 +3,23 @@ page {
} }
.page { .page {
height: 100vh; height: 100vh;
box-sizing: border-box;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.page-header { .page-header {
margin: 0 30rpx;
padding-bottom: 30rpx; padding-bottom: 30rpx;
border-radius: 0 0 24rpx 24rpx; background: linear-gradient(53deg, #ffffff 0%, rgba(255, 255, 255, 0.46) 100%);
background-color: #fff; border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff;
.user { .user {
flex-shrink: 0; flex-shrink: 0;
padding: 36rpx 30rpx 0; padding: 36rpx 30rpx 0;
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
align-items: center;
.avatar { .avatar {
width: 104rpx; width: 104rpx;
height: 104rpx; height: 104rpx;
@ -24,147 +27,32 @@ page {
} }
.wrap { .wrap {
flex: 1; flex: 1;
padding: 0 20rpx; padding: 0 16rpx;
.name { .name {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 40rpx; font-size: 40rpx;
color: rgba(40, 48, 49, 1); color: rgba(40, 48, 49, 1);
font-weight: bold; font-weight: bold;
.tip { .edc {
display: block; margin-left: 10rpx;
padding: 2rpx 16rpx; display: inline-block;
padding: 0 8rpx;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: rgba(255, 255, 255, 1);
border-radius: 0 30rpx 30rpx 30rpx;
background-color: #67baca;
}
.detail {
flex-shrink: 0;
font-size: 28rpx;
color: rgba(103, 186, 202, 1);
font-weight: normal; font-weight: normal;
background-color: rgba(185, 130, 255, 1);
} }
} }
.tags { .date {
margin-top: 20rpx; margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
gap: 12rpx;
.tag {
padding: 4rpx 16rpx;
font-size: 22rpx;
color: rgba(103, 113, 114, 1);
border-radius: 8rpx;
background-color: rgba(242, 244, 245, 1);
}
}
}
}
.adl {
margin: 32rpx 30rpx 0;
background: #ffffff;
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
.a-header {
display: flex;
align-items: flex-start;
flex-direction: column;
.content {
border-radius: 24rpx 0 24rpx 0;
padding: 14rpx 28rpx;
font-size: 28rpx; font-size: 28rpx;
line-height: 1; color: rgba(105, 104, 110, 1);
color: rgba(98, 190, 208, 1);
background-color: rgba(242, 248, 249, 1);
}
.box {
width: 40rpx;
height: 40rpx;
background-color: rgba(242, 248, 249, 1);
} }
} }
.a-content { .detail {
position: relative; flex-shrink: 0;
z-index: 1; font-size: 28rpx;
margin-top: -40rpx; color: rgba(185, 130, 255, 1);
padding: 32rpx 30rpx; font-weight: normal;
background-color: #fff;
border-radius: 24rpx;
.row {
display: flex;
align-items: center;
gap: 20rpx;
&:first-of-type {
margin-bottom: 24rpx;
}
.label {
flex-shrink: 0;
font-size: 28rpx;
color: rgba(154, 161, 162, 1);
}
.num {
min-width: 3em;
font-size: 28rpx;
color: rgba(40, 48, 49, 1);
}
.tag {
display: flex;
align-items: center;
background-color: rgba(232, 245, 248, 1);
border-radius: 12rpx;
.t-label {
padding: 8rpx 12rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
background-color: rgba(103, 186, 202, 1);
border-radius: 12rpx;
display: flex;
align-items: center;
gap: 8rpx;
flex-shrink: 0;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.t-content {
padding: 0 16rpx 0 8rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgba(103, 186, 202, 1);
display: flex;
align-items: center;
gap: 4rpx;
flex-shrink: 0;
.icon {
width: 24rpx;
height: 28rpx;
}
}
&.tag-warn {
background-color: rgba(227, 220, 64, 0.1);
.t-label {
background-color: rgba(225, 217, 45, 1);
}
.t-content {
color: rgba(225, 217, 45, 1);
}
}
&.tag-error {
background-color: rgba(248, 234, 234, 1);
.t-label {
background-color: rgba(215, 108, 108, 1);
}
.t-content {
color: rgba(215, 108, 108, 1);
}
}
}
}
} }
} }
} }
@ -200,7 +88,7 @@ page {
.guide { .guide {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 32rpx 30rpx; padding: 32rpx 30rpx;
border-radius: 0 32rpx 32rpx; border-radius: 32rpx;
background: linear-gradient(13deg, #ffffff 8%, #e8f0f1 100%); background: linear-gradient(13deg, #ffffff 8%, #e8f0f1 100%);
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
.title { .title {
@ -252,7 +140,7 @@ page {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 26rpx 32rpx; padding: 26rpx 32rpx;
background-color: #fff; background-color: #fff;
border-radius: 0 32rpx 32rpx; border-radius: 32rpx;
font-size: 32rpx; font-size: 32rpx;
color: rgba(40, 48, 49, 1); color: rgba(40, 48, 49, 1);
white-space: pre-line; white-space: pre-line;
@ -321,8 +209,8 @@ page {
.guide { .guide {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 32rpx 30rpx; padding: 32rpx 30rpx;
border-radius: 32rpx 0 32rpx 32rpx; border-radius: 32rpx 32rpx;
background: linear-gradient(13deg, #ffffff 8%, #e8f0f1 100%); background: linear-gradient(180deg, #f6efff 0%, #ffffff 100%);
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
.title { .title {
font-size: 32rpx; font-size: 32rpx;
@ -337,10 +225,13 @@ page {
.list { .list {
.l-item { .l-item {
display: flex; display: flex;
align-items: center;
gap: 16rpx; gap: 16rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
&:last-of-type {
margin-bottom: 0;
}
.order { .order {
margin-top: 6rpx;
flex-shrink: 0; flex-shrink: 0;
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
@ -350,11 +241,11 @@ page {
justify-content: center; justify-content: center;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
border-radius: 6rpx; border-radius: 6rpx;
background: #67baca; background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
} }
.content { .content {
font-size: 32rpx; font-size: 32rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
} }
} }
} }
@ -372,8 +263,8 @@ page {
.message { .message {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 26rpx 32rpx; padding: 26rpx 32rpx;
background: #67baca; background: rgba(185, 130, 255, 1);
border-radius: 32rpx 0 32rpx 32rpx; border-radius: 32rpx;
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;
white-space: pre-line; white-space: pre-line;
@ -382,10 +273,10 @@ page {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 26rpx 32rpx; padding: 26rpx 32rpx;
background-color: #fff; background-color: #fff;
border-radius: 32rpx 0 32rpx 32rpx; border-radius: 32rpx;
.w-title { .w-title {
font-size: 32rpx; font-size: 32rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
text-align: right; text-align: right;
} }
.w-container { .w-container {
@ -408,7 +299,7 @@ page {
justify-content: center; justify-content: center;
font-size: 32rpx; font-size: 32rpx;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
background-color: rgba(103, 186, 202, 1); background-color: rgba(185, 130, 255, 1);
} }
.content { .content {
width: 156rpx; width: 156rpx;
@ -417,8 +308,8 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 32rpx; font-size: 32rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
background-color: rgba(242, 244, 245, 1); background-color: rgba(234, 238, 240, 1);
} }
&:first-of-type { &:first-of-type {
.label { .label {
@ -439,13 +330,21 @@ page {
&:not(:last-of-type) { &:not(:last-of-type) {
border-bottom: 2rpx solid #fff; border-bottom: 2rpx solid #fff;
} }
&:nth-of-type(2n) {
.label {
background-color: rgba(214, 181, 255, 1);
}
.content {
background-color: rgba(246, 248, 249, 1);
}
}
} }
} }
} }
.adl { .adl {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 32rpx 156rpx 34rpx 30rpx; padding: 32rpx 156rpx 34rpx 30rpx;
border-radius: 0 32rpx 32rpx; border-radius: 32rpx;
background: linear-gradient(141deg, #edfcff 0%, #d4f3f9 100%); background: linear-gradient(141deg, #edfcff 0%, #d4f3f9 100%);
border: 2rpx solid #fff; border: 2rpx solid #fff;
.title { .title {
@ -478,7 +377,7 @@ page {
.audio { .audio {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 22rpx 24rpx; padding: 22rpx 24rpx;
border-radius: 32rpx 0 32rpx 32rpx; border-radius: 32rpx;
background: #67baca; background: #67baca;
min-width: 218rpx; min-width: 218rpx;
font-size: 32rpx; font-size: 32rpx;
@ -497,7 +396,7 @@ page {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 26rpx 32rpx; padding: 26rpx 32rpx;
background-color: #fff; background-color: #fff;
border-radius: 32rpx 0 32rpx 32rpx; border-radius: 32rpx;
.content { .content {
font-size: 28rpx; font-size: 28rpx;
color: #283031; color: #283031;

255
src/pages/d_interactiveDoctor/index.ts

@ -1,23 +1,23 @@
import dayjs from 'dayjs'; import dayjs from 'dayjs'
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
interface IMessageItem { interface IMessageItem {
msgId: string; msgId: string
msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'; // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息 msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息
msgContent: any; msgContent: any
msgVisitTime: string; msgVisitTime: string
msgVisitTimeType?: string; msgVisitTimeType?: string
msgFromType: '1' | '2'; // 1: 患者 2: 医生 msgFromType: '1' | '2' // 1: 患者 2: 医生
isPlay?: boolean; isPlay?: boolean
msgCreateTime: string; // 消息创建时间 msgCreateTime: string // 消息创建时间
msgCreateTimeName?: string; // 消息创建时间 msgCreateTimeName?: string // 消息创建时间
showTime?: boolean; showTime?: boolean
} }
interface Item { interface Item {
wordId: string; wordId: string
word: string; word: string
} }
Page({ Page({
@ -47,23 +47,23 @@ Page({
onLoad(options) { onLoad(options) {
this.innerAudioContext = wx.createInnerAudioContext({ this.innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: true, useWebAudioImplement: true,
}); })
this.setData({ this.setData({
patientId: options.patientId, patientId: options.patientId,
}); })
}, },
onShow() { onShow() {
app.waitLogin({ type: [2] }).then((_res) => { app.waitLogin({ type: [2] }).then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONDETAIL' }); app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONDETAIL' })
this.getDoctorDetail(); this.getDoctorDetail()
this.getPatientDetail(); this.getPatientDetail()
this.getMessageList(); this.getMessageList()
this.getWordList(); this.getWordList()
}); })
}, },
onUnload() { onUnload() {
if (this.innerAudioContext) { if (this.innerAudioContext) {
this.innerAudioContext.stop(); this.innerAudioContext.stop()
} }
}, },
getDoctorDetail() { getDoctorDetail() {
@ -74,8 +74,8 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
doctor: res.doctor, doctor: res.doctor,
}); })
}); })
}, },
getPatientDetail() { getPatientDetail() {
wx.ajax({ wx.ajax({
@ -86,19 +86,19 @@ Page({
}, },
}).then((res) => { }).then((res) => {
if (res.LastAdlTime) { if (res.LastAdlTime) {
res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', ''); res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '')
} }
this.setData({ this.setData({
patientDetail: res, patientDetail: res,
}); })
}); })
}, },
getMessageList() { getMessageList() {
if (this.data.isLoad || this.data.isFinish) return; if (this.data.isLoad || this.data.isFinish) return
this.setData({ this.setData({
isLoad: true, isLoad: true,
}); })
const nextMsgId = this.data.nextMsgId; const nextMsgId = this.data.nextMsgId
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/doctor/message-interact/doctor-get-message-list', url: '?r=zd/doctor/message-interact/doctor-get-message-list',
@ -109,21 +109,21 @@ Page({
}).then((res) => { }).then((res) => {
res.messageList.map((item) => { res.messageList.map((item) => {
if (item.msgContentType === '4') { if (item.msgContentType === '4') {
item.msgContent = JSON.parse(item.msgContent); item.msgContent = JSON.parse(item.msgContent)
} }
if (item.msgContentType === '2') { if (item.msgContentType === '2') {
item.msgVisitTime = item.msgVisitTimeType == 2 ? item.msgVisitTime : JSON.parse(item.msgVisitTime); item.msgVisitTime = item.msgVisitTimeType == 2 ? item.msgVisitTime : JSON.parse(item.msgVisitTime)
} }
if (item.msgContentType === '5') { if (item.msgContentType === '5') {
item.welcomeMsg = JSON.parse(item.welcomeMsg); item.welcomeMsg = JSON.parse(item.welcomeMsg)
} }
if (item.msgContentType === '9') { if (item.msgContentType === '9') {
item.ReVisitInfo = JSON.parse(item.ReVisitInfo); item.ReVisitInfo = JSON.parse(item.ReVisitInfo)
item.ReVisitInfo.visitDateName = dayjs(item.ReVisitInfo.visitDate).format('YYYY年M月DD日'); item.ReVisitInfo.visitDateName = dayjs(item.ReVisitInfo.visitDate).format('YYYY年M月DD日')
} }
return item; return item
}); })
if (!this.data.nextMsgId && !res.messageList.length) { if (!this.data.nextMsgId && !res.messageList.length) {
res.messageList = [ res.messageList = [
{ {
@ -133,7 +133,7 @@ Page({
msgVisitTime: '', msgVisitTime: '',
msgFromType: '2', msgFromType: '2',
}, },
]; ]
} }
this.setData({ this.setData({
messageList: [...res.messageList.reverse(), ...this.data.messageList], messageList: [...res.messageList.reverse(), ...this.data.messageList],
@ -144,16 +144,16 @@ Page({
adlMsgId: res.adlMsgId, adlMsgId: res.adlMsgId,
isLoad: false, isLoad: false,
isFinish: nextMsgId === res.nextMsgId, isFinish: nextMsgId === res.nextMsgId,
}); })
this.filterCreateTime(); this.filterCreateTime()
if (!nextMsgId) { if (!nextMsgId) {
this.handleView(); this.handleView()
} }
}); })
}, },
scrolltoupper(e) { scrolltoupper(e) {
if (e.detail.direction === 'top') { if (e.detail.direction === 'top') {
this.getMessageList(); this.getMessageList()
} }
}, },
getWordList() { getWordList() {
@ -164,15 +164,15 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
wordList: res, wordList: res,
}); })
}); })
}, },
handleSendDate() { handleSendDate() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILMYCLINICTIME' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILMYCLINICTIME' })
const { const {
messageList, messageList,
doctor: { Clinic }, doctor: { Clinic },
} = this.data; } = this.data
if (!Clinic || (Array.isArray(Clinic) && !Clinic.length)) { if (!Clinic || (Array.isArray(Clinic) && !Clinic.length)) {
wx.showModal({ wx.showModal({
title: '完善出诊时间?', title: '完善出诊时间?',
@ -183,11 +183,11 @@ Page({
if (res.confirm) { if (res.confirm) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/d_userInfo/index', url: '/pages/d_userInfo/index',
}); })
} }
}, },
}); })
return; return
} }
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
@ -208,40 +208,40 @@ Page({
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}, },
], ],
}); })
this.filterCreateTime(); this.filterCreateTime()
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/doctor/message-interact/send-visit-time', url: '?r=zd/doctor/message-interact/send-visit-time',
data: { data: {
patientId: this.data.patientId, patientId: this.data.patientId,
}, },
}); })
this.handleView(); this.handleView()
} }
}, },
}); })
}, },
handleSendShow() { handleSendShow() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILSENDMESSAGE' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILSENDMESSAGE' })
this.setData({ this.setData({
messageListShow: true, messageListShow: true,
}); })
}, },
handlePopupMessageClose() { handlePopupMessageClose() {
this.setData({ this.setData({
messageListShow: false, messageListShow: false,
}); })
}, },
handleWord(e) { handleWord(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
this.setData({ this.setData({
wordIndex: index, wordIndex: index,
}); })
}, },
handleSendWord() { handleSendWord() {
const { messageList, wordList, wordIndex } = this.data; const { messageList, wordList, wordIndex } = this.data
const { wordId, word } = wordList[wordIndex]; const { wordId, word } = wordList[wordIndex]
this.setData({ this.setData({
messageList: [ messageList: [
...messageList, ...messageList,
@ -254,10 +254,10 @@ Page({
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}, },
], ],
}); })
this.filterCreateTime(); this.filterCreateTime()
this.handlePopupMessageClose(); this.handlePopupMessageClose()
this.handleView(); this.handleView()
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/doctor/message-interact/send-word-message', url: '?r=zd/doctor/message-interact/send-word-message',
@ -265,30 +265,30 @@ Page({
patientId: this.data.patientId, patientId: this.data.patientId,
wordId, wordId,
}, },
}); })
}, },
handleSendUserConform(e) { handleSendUserConform(e) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset
const title = { const title = {
6: '发送后患者将收到补充姓名通知', 6: '发送后患者将收到补充姓名通知',
7: '发送后患者将收到完善信息通知', 7: '发送后患者将收到完善信息通知',
}[id]; }[id]
wx.showModal({ wx.showModal({
title, title,
confirmColor: '#62bed0', confirmColor: '#62bed0',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
this.handleSendUser(id); this.handleSendUser(id)
} }
}, },
}); })
}, },
handleSendUser(id) { handleSendUser(id) {
const { messageList } = this.data; const { messageList } = this.data
const content = { const content = {
6: '请完善您的真实姓名,以便我清楚了解您的病情', 6: '请完善您的真实姓名,以便我清楚了解您的病情',
7: '请完善您的个人信息,以便我清楚了解您的病情', 7: '请完善您的个人信息,以便我清楚了解您的病情',
}[id]; }[id]
this.setData({ this.setData({
messageList: [ messageList: [
...messageList, ...messageList,
@ -301,110 +301,110 @@ Page({
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}, },
], ],
}); })
this.filterCreateTime(); this.filterCreateTime()
this.handlePopupMessageClose(); this.handlePopupMessageClose()
this.handleView(); this.handleView()
const url = { const url = {
6: '?r=zd/doctor/message-interact/send-remind-name', 6: '?r=zd/doctor/message-interact/send-remind-name',
7: '?r=zd/doctor/message-interact/send-remind-init', 7: '?r=zd/doctor/message-interact/send-remind-init',
}[id]; }[id]
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url, url,
data: { data: {
patientId: this.data.patientId, patientId: this.data.patientId,
}, },
}); })
}, },
formatTime(date: string) { formatTime(date: string) {
let msgCreateTimeName = ''; let msgCreateTimeName = ''
if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) { if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) {
msgCreateTimeName = dayjs(date).format('HH:mm'); msgCreateTimeName = dayjs(date).format('HH:mm')
} else if (dayjs().format('YYYY-MM-DD') === dayjs(date).add(1, 'day').format('YYYY-MM-DD')) { } else if (dayjs().format('YYYY-MM-DD') === dayjs(date).add(1, 'day').format('YYYY-MM-DD')) {
msgCreateTimeName = `昨天 ${dayjs(date).format('HH:mm')}`; msgCreateTimeName = `昨天 ${dayjs(date).format('HH:mm')}`
} else if (dayjs().diff(date, 'day') < 7) { } else if (dayjs().diff(date, 'day') < 7) {
msgCreateTimeName = dayjs(date).format(`dddd HH:mm`); msgCreateTimeName = dayjs(date).format(`dddd HH:mm`)
} else { } else {
msgCreateTimeName = dayjs(date).format('YYYY-MM-DD HH:mm'); msgCreateTimeName = dayjs(date).format('YYYY-MM-DD HH:mm')
} }
return msgCreateTimeName; return msgCreateTimeName
}, },
filterCreateTime() { filterCreateTime() {
const gapTime = 5 * 60 * 1000; const gapTime = 5 * 60 * 1000
const { messageList } = this.data; const { messageList } = this.data
let preTime = 0; let preTime = 0
messageList.forEach((item, index) => { messageList.forEach((item, index) => {
if (index === 0) { if (index === 0) {
item.showTime = true; item.showTime = true
preTime = dayjs(item.msgCreateTime).valueOf(); preTime = dayjs(item.msgCreateTime).valueOf()
item.msgCreateTimeName = this.formatTime(item.msgCreateTime); item.msgCreateTimeName = this.formatTime(item.msgCreateTime)
} else { } else {
const curTime = dayjs(item.msgCreateTime).valueOf(); const curTime = dayjs(item.msgCreateTime).valueOf()
if (curTime - preTime > gapTime) { if (curTime - preTime > gapTime) {
item.showTime = true; item.showTime = true
item.msgCreateTimeName = this.formatTime(item.msgCreateTime); item.msgCreateTimeName = this.formatTime(item.msgCreateTime)
preTime = dayjs(item.msgCreateTime).valueOf(); preTime = dayjs(item.msgCreateTime).valueOf()
} }
} }
}); })
this.setData({ this.setData({
messageList, messageList,
}); })
}, },
handleView(index = -1) { handleView(index = -1) {
this.setData({ this.setData({
scrollIntoView: index > -1 ? `view${index}` : `place`, scrollIntoView: index > -1 ? `view${index}` : `place`,
}); })
}, },
handlePatientDetail() { handlePatientDetail() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILPATIENTFILE' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILPATIENTFILE' })
wx.navigateTo({ wx.navigateTo({
url: `/pages/d_patientDetail/index?id=${this.data.patientId}`, url: `/pages/d_patientDetail/index?id=${this.data.patientId}`,
}); })
}, },
handleAudio(e) { handleAudio(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
const { messageList } = this.data; const { messageList } = this.data
const messageItem = messageList[index]; const messageItem = messageList[index]
const { url } = messageItem.msgContent[0]; const { url } = messageItem.msgContent[0]
if (this.innerAudioContext) { if (this.innerAudioContext) {
if (messageItem.isPlay) { if (messageItem.isPlay) {
this.innerAudioContext.stop(); this.innerAudioContext.stop()
messageItem.isPlay = false; messageItem.isPlay = false
this.setData({ this.setData({
messageList, messageList,
}); })
return; return
} }
this.innerAudioContext.stop(); this.innerAudioContext.stop()
this.innerAudioContext.src = url; this.innerAudioContext.src = url
this.innerAudioContext.play(); this.innerAudioContext.play()
messageItem.isPlay = true; messageItem.isPlay = true
this.innerAudioContext.onEnded(() => { this.innerAudioContext.onEnded(() => {
messageItem.isPlay = false; messageItem.isPlay = false
this.setData({ this.setData({
messageList, messageList,
}); })
}); })
this.innerAudioContext.onStop(() => { this.innerAudioContext.onStop(() => {
messageItem.isPlay = false; messageItem.isPlay = false
this.setData({ this.setData({
messageList, messageList,
}); })
}); })
this.setData({ this.setData({
messageList, messageList,
}); })
} }
}, },
handleAdl() { handleAdl() {
wx.showToast({ wx.showToast({
title: '患者点击此按钮可进入ADL测评页面', title: '患者点击此按钮可进入ADL测评页面',
icon: 'none', icon: 'none',
}); })
}, },
handleReferral() { handleReferral() {
wx.showModal({ wx.showModal({
@ -433,11 +433,14 @@ Page({
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}, },
], ],
}); })
this.handleView(); this.handleView()
}); })
} }
}, },
}); })
}, },
}); handleBack() {
wx.navigateBack()
},
})

145
src/pages/d_interactiveDoctor/index.wxml

@ -1,4 +1,10 @@
<view class="page"> <navbar fixed title="互动" custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view
class="page"
style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+21}}px;"
>
<view class="page-header"> <view class="page-header">
<view class="user"> <view class="user">
<image class="avatar" src="{{patientDetail.userAvatar}}"></image> <image class="avatar" src="{{patientDetail.userAvatar}}"></image>
@ -6,117 +12,12 @@
<view class="name"> <view class="name">
<view class="left"> <view class="left">
{{patientDetail.patientName}} {{patientDetail.patientName}}
<view <view class="edc">EDC患者</view>
class="tip"
wx:if="{{patientDetail.patientNameInit==='2'}}"
bind:tap="handleSendUserConform"
data-id="6"
>
提醒补充真实姓名
</view>
</view>
<view class="detail" bind:tap="handlePatientDetail">
患者档案
<van-icon name="arrow" />
</view>
</view>
<view class="tags">
<view class="tag" wx:for="{{patientDetail.Tags}}" wx:for-item="tag" wx:for-index="tIndex" wx:key="tIndex">
{{tag}}
</view>
</view>
</view>
</view>
<view class="adl" wx:if="{{patientDetail.LastAdlTime}}">
<view class="a-header">
<view class="content">最近一次测评:{{patientDetail.LastAdlTimeName}}</view>
<view class="box"></view>
</view>
<view class="a-content">
<view class="row" wx:if="{{patientDetail.AdlScore}}">
<view class="label">最新ADL评分</view>
<view class="num">{{patientDetail.AdlScore}}</view>
<view class="tag" wx:if="{{patientDetail.AdlScore<=1}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{patientDetail.TotalScoreChange*1!=0}}">
<image
wx:if="{{patientDetail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{patientDetail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-warn" wx:elif="{{patientDetail.AdlScore<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-warn.png?t={{Timestamp}}"></image>
接近达标
</view>
<view class="t-content" wx:if="{{patientDetail.TotalScoreChange*1!=0}}">
<image
wx:if="{{patientDetail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-warn.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-warn.png?t={{Timestamp}}"></image>
{{patientDetail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{patientDetail.TotalScoreChange*1!=0}}">
<image
wx:if="{{patientDetail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{patientDetail.TotalScoreChange}}
</view>
</view>
</view>
<view class="row" wx:if="{{patientDetail.SteroidDailyDose}}">
<view class="label">最新激素用量</view>
<view class="num">{{patientDetail.SteroidDailyDose}}mg</view>
<view class="tag" wx:if="{{patientDetail.SteroidDailyDose<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{patientDetail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{patientDetail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{patientDetail.SteroidDailyDoseChange}}mg
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{patientDetail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{patientDetail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{patientDetail.SteroidDailyDoseChange}}mg
</view>
</view> </view>
</view> </view>
<view class="date">上次就诊时间:2025-08-10</view>
</view> </view>
<view class="detail" bind:tap="handlePatientDetail">查看档案</view>
</view> </view>
</view> </view>
<view class="page-container" id="page-container"> <view class="page-container" id="page-container">
@ -144,17 +45,23 @@
</view> </view>
<view class="p-container"> <view class="p-container">
<view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view> <view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="referral-replay" wx:if="{{message.msgContentType==='9'}}"> <view class="referral-replay" wx:if="{{message.msgContentType==='9'}}">
<view class="title">我最近一次复诊时间是{{message.ReVisitInfo.visitDateName}}</view> <view class="title">我最近一次复诊时间是{{message.ReVisitInfo.visitDateName}}</view>
<view class="sub-title">我的方案是</view> <view class="sub-title">我的方案是</view>
<view class="r-list"> <view class="r-list">
<view class="item" wx:if="{{message.ReVisitInfo.hormone==1}}">1.激素</view> <view class="item" wx:if="{{message.ReVisitInfo.hormone==1}}">1.激素</view>
<view class="item" wx:if="{{message.ReVisitInfo.traditionalInhibitor==1}}">2.传统免疫抑制剂(如他克莫司、吗 替麦考酚酯等)</view> <view class="item" wx:if="{{message.ReVisitInfo.traditionalInhibitor==1}}">
2.传统免疫抑制剂(如他克莫司、吗 替麦考酚酯等)
</view>
<view class="item" wx:if="{{message.ReVisitInfo.gammaGlobulin==1}}">3.静脉输注丙种球蛋白</view> <view class="item" wx:if="{{message.ReVisitInfo.gammaGlobulin==1}}">3.静脉输注丙种球蛋白</view>
<view class="item" wx:if="{{message.ReVisitInfo.plasmaExchange==1}}">4.血浆置换</view> <view class="item" wx:if="{{message.ReVisitInfo.plasmaExchange==1}}">4.血浆置换</view>
<view class="item" wx:if="{{message.ReVisitInfo.bCellInhibitor==1}}">5.B细胞抑制剂(如:利妥昔单抗、泰 它西普、伊奈利珠单抗)</view> <view class="item" wx:if="{{message.ReVisitInfo.bCellInhibitor==1}}">
5.B细胞抑制剂(如:利妥昔单抗、泰 它西普、伊奈利珠单抗)
</view>
<view class="item" wx:if="{{message.ReVisitInfo.fcRnAntagonists==1}}">6.FcRn拮抗剂(如:艾加莫德)</view> <view class="item" wx:if="{{message.ReVisitInfo.fcRnAntagonists==1}}">6.FcRn拮抗剂(如:艾加莫德)</view>
<view class="item" wx:if="{{message.ReVisitInfo.c5ComplementInhibitor==1}}">7.C5补体抑制剂(如:依库珠单抗)</view> <view class="item" wx:if="{{message.ReVisitInfo.c5ComplementInhibitor==1}}">
7.C5补体抑制剂(如:依库珠单抗)
</view>
<view class="item" wx:if="{{message.ReVisitInfo.chineseMedicine==1}}">8.中药或中成药</view> <view class="item" wx:if="{{message.ReVisitInfo.chineseMedicine==1}}">8.中药或中成药</view>
<view class="item" wx:if="{{message.ReVisitInfo.other==1}}">9.其他</view> <view class="item" wx:if="{{message.ReVisitInfo.other==1}}">9.其他</view>
</view> </view>
@ -172,10 +79,6 @@
<view class="content">{{item.question}}</view> <view class="content">{{item.question}}</view>
</view> </view>
</view> </view>
<view class="tip">
{{message.welcomeMsg.guideClick}}
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-down1.png?t={{Timestamp}}"></image>
</view>
</view> </view>
<view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view> <view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="week" wx:elif="{{message.msgContentType==='2'}}"> <view class="week" wx:elif="{{message.msgContentType==='2'}}">
@ -252,18 +155,10 @@
</view> </view>
<view class="page-footer"> <view class="page-footer">
<view class="send" bind:tap="handleSendShow">发送消息</view> <view class="send" bind:tap="handleSendShow">发送消息</view>
<view class="send-date" wx:if="{{patientDetail.patientInit==='2'}}" bind:tap="handleSendUserConform" data-id="7">
<image class="icon" src="{{imageUrl}}za-images/3/icon-user.png?t={{Timestamp}}"></image>
<view>完善个人信息</view>
</view>
<view class="send-date" bind:tap="handleSendDate"> <view class="send-date" bind:tap="handleSendDate">
<image class="icon" src="{{imageUrl}}za-images/3/icon-send-date.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}za-images/3/icon-send-date.png?t={{Timestamp}}"></image>
<view>我的出诊时间</view> <view>我的出诊时间</view>
</view> </view>
<view class="send-date" bind:tap="handleReferral">
<image class="icon" src="{{imageUrl}}za-images/5/icon-referral.png?t={{Timestamp}}"></image>
<view style="color: #67baca">复诊提醒</view>
</view>
</view> </view>
</view> </view>

7
src/pages/d_invite/index.json

@ -0,0 +1,7 @@
{
"navigationBarTitleText": "重症肌无力医生端",
"navigationStyle": "default",
"usingComponents": {
"customPoster": "/components/customPoster/index"
}
}

29
src/pages/d_invite/index.scss

@ -0,0 +1,29 @@
page{
background-color: #c65174;
}
.page {
position: relative;
height: 1448rpx;
.poster {
width: 100%;
height: 100%;
}
.btn {
position: absolute;
bottom: 88rpx;
left: 50%;
transform: translateX(-50%);
margin: 36rpx auto;
padding: 18rpx 44rpx;
font-size: 36rpx;
line-height: 48rpx;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 1);
border-radius: 64rpx 64rpx 64rpx 64rpx;
border: 1px solid rgba(255, 255, 255, 1);
box-sizing: border-box;
}
}

114
src/pages/d_invite/index.ts

@ -0,0 +1,114 @@
const app = getApp<IAppOption>()
Page({
data: {
doctor: {},
hospital: {},
qrCode: '',
posterUrl: '',
params: {},
},
onLoad() {
const SystemInfo = app.globalSystemInfo
if (SystemInfo) {
const { bottom } = SystemInfo.capsulePosition
this.setData({
bottom,
})
}
app.waitLogin().then((_res) => {
wx.showLoading({
title: '加载中',
})
app.mpBehavior({ doctor: true, PageName: 'PG_DOCTORINVITEPATIENT' })
this.getDetail()
})
},
getDetail() {
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/account/info',
data: {},
}).then((res) => {
this.setData({
doctor: res.doctor,
hospital: res.hospital,
})
this.getPrepare(res.doctor.Id)
})
},
getPrepare(id) {
wx.ajax({
method: 'POST',
url: '?r=poster/prepare',
data: {
posterId: 'doctor_mini',
doctorId: id,
},
}).then((res) => {
this.setData({
params: res,
})
})
},
getQrCode() {
this.setData({
qrCode: `${app.globalData.url}?r=zd/doctor/account/mp-info&loginState=${app.globalData.loginState}`,
})
},
handleDownload() {
wx.showToast({
title: '请长按海报图片进行保存',
icon: 'none',
})
// wx.showLoading({
// title: '加载中',
// })
// wx.downloadFile({
// url: this.data.posterUrl,
// success: (res) => {
// if (res.statusCode === 200) {
// wx.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success: () => {
// wx.hideLoading()
// wx.showToast({
// title: '保存成功,请到相册中查看',
// })
// },
// fail: () => {
// wx.hideLoading()
// wx.showToast({
// icon: 'none',
// title: '保存失败,请稍后重试',
// })
// },
// })
// } else {
// wx.hideLoading()
// wx.showToast({
// icon: 'none',
// title: '下载失败,请稍后重试',
// })
// }
// },
// fail: () => {
// wx.hideLoading()
// wx.showToast({
// icon: 'none',
// title: '下载失败,请稍后重试',
// })
// },
// })
},
handlePosterFinish(e: any) {
this.setData({
posterUrl: e.detail,
})
wx.hideLoading()
},
handleBack() {
wx.navigateBack()
},
})

6
src/pages/d_invite/index.wxml

@ -0,0 +1,6 @@
<view class="page">
<image class="poster" show-menu-by-longpress src="{{posterUrl}}"></image>
<view class="btn" bind:tap="handleDownload">长按图片保存</view>
</view>
<customPoster params="{{params}}" bind:finish="handlePosterFinish"></customPoster>

9
src/pages/d_patient/index.json

@ -0,0 +1,9 @@
{
"navigationStyle": "default",
"navigationBarTitleText": "患者列表",
"usingComponents": {
"navbar": "/components/navbar/index",
"van-icon": "@vant/weapp/icon/index",
"van-popup": "@vant/weapp/popup/index"
}
}

344
src/pages/d_patient/index.scss

@ -0,0 +1,344 @@
page {
background-color: rgba(242, 244, 245, 1);
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
}
.page {
min-height: 100vh;
.page-header {
position: sticky;
top: 0;
padding: 30rpx;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
background-color: #fff;
z-index: 10;
.search {
padding: 12rpx 32rpx;
display: flex;
align-items: center;
gap: 16rpx;
background: rgba(246, 248, 249, 1);
border-radius: 140rpx 140rpx 140rpx 140rpx;
.icon {
width: 40rpx;
height: 40rpx;
}
.input {
flex: 1;
font-size: 28rpx;
}
.input-place {
color: rgba(173, 179, 180, 1);
}
}
.navbar {
margin-top: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
.nav {
position: relative;
flex: 1;
text-align: center;
font-size: 32rpx;
color: rgba(105, 104, 110, 1);
transition: all 0.3s;
.dot {
padding: 0 4rpx;
position: absolute;
left: 50%;
transform: translateX(35rpx);
top: 0;
min-width: 18rpx;
height: 26rpx;
font-size: 18rpx;
line-height: 26rpx;
color: rgba(255, 255, 255, 1);
border-radius: 50%;
background: rgba(215, 108, 108, 1);
}
&.active {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
&::after {
position: absolute;
bottom: -30rpx;
left: 50%;
transform: translateX(-50%);
content: '';
width: 38rpx;
height: 8rpx;
border-radius: 12rpx;
background: rgba(185, 130, 255, 1);
}
}
}
}
}
.total-line {
padding: 34rpx 30rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
.wrap {
display: flex;
align-items: center;
gap: 20rpx;
.user {
font-size: 32rpx;
color: rgba(154, 161, 162, 1);
.num {
margin-left: 10rpx;
color: rgba(43, 160, 184, 1);
}
}
.message {
font-size: 32rpx;
color: rgba(43, 160, 184, 1);
}
}
.btn {
padding: 10rpx 32rpx;
font-size: 32rpx;
line-height: 1;
color: rgba(98, 190, 208, 1);
background: #ffffff;
border-radius: 80rpx 80rpx 80rpx 80rpx;
border: 2rpx solid #62bed0;
display: flex;
align-items: center;
.icon {
width: 32rpx;
height: 32rpx;
}
}
}
.list {
margin: 0 30rpx;
.list-item {
margin-top: 24rpx;
padding: 32rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
display: flex;
align-items: center;
.avatar {
flex-shrink: 0;
.avatar-img {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
.container {
flex: 1;
padding-left: 20rpx;
.title {
display: flex;
align-items: center;
justify-content: space-between;
.name {
font-size: 36rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
.edc {
margin-left: 16rpx;
display: inline-block;
padding: 0 8rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
border-radius: 4rpx;
font-weight: normal;
background-color: rgba(185, 130, 255, 1);
}
}
}
.replay-date {
margin-top: 16rpx;
font-size: 28rpx;
color: #9aa1a2;
}
}
.send {
padding: 8rpx 22rpx;
font-size: 24rpx;
color: rgba(185, 130, 255, 1);
line-height: 1;
border-radius: 32rpx 32rpx 32rpx 32rpx;
border: 2rpx solid rgba(185, 130, 255, 1);
display: flex;
align-items: center;
gap: 8rpx;
.icon {
width: 28rpx;
height: 28rpx;
}
}
}
}
}
.popup {
padding: 92rpx 30rpx calc(30rpx + env(safe-area-inset-bottom));
.form {
max-height: 60vh;
overflow-y: auto;
overflow-x: hidden;
.form-item {
margin-bottom: 48rpx;
.f-title {
font-size: 36rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.select {
margin-top: 24rpx;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16rpx;
.s-item {
padding: 18rpx 0;
text-align: center;
border-radius: 12rpx;
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
background: #f2f4f5;
&.active {
color: #fff;
background-color: rgba(103, 186, 202, 1);
}
}
}
.custom {
margin-top: 16rpx;
display: flex;
align-items: center;
gap: 12rpx;
.c-item {
padding: 18rpx 24rpx;
display: flex;
align-items: center;
font-size: 32rpx;
color: rgba(103, 113, 114, 1);
border-radius: 12rpx;
background-color: rgba(242, 244, 245, 1);
.input {
padding: 0;
margin: 0;
width: 3em;
font-size: 32rpx;
line-height: 1;
}
.input-place {
color: rgba(194, 201, 202, 1);
line-height: 1;
}
}
}
.date {
margin-top: 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
.picker {
flex: 1;
.d-item {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 18rpx 32rpx;
background: #f7f8f9;
border-radius: 12rpx 12rpx 12rpx 12rpx;
.icon {
width: 32rpx;
height: 32rpx;
}
.content {
font-size: 32rpx;
color: #677172;
&:empty::after {
content: attr(data-place);
color: rgba(194, 201, 202, 1);
}
}
}
}
.sion {
flex-shrink: 0;
margin: 0 14rpx;
font-size: 32rpx;
color: #677172;
}
}
}
}
.p-footer {
margin-top: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
gap: 26rpx;
.reset {
flex: 1;
height: 84rpx;
font-size: 36rpx;
color: rgba(103, 186, 202, 1);
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
background: #ffffff;
border-radius: 98rpx 98rpx 98rpx 98rpx;
border: 2rpx solid #67baca;
}
.submit {
flex: 1;
height: 84rpx;
font-size: 36rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
background: rgba(103, 186, 202, 1);
border-radius: 98rpx 98rpx 98rpx 98rpx;
}
}
}

212
src/pages/d_patient/index.ts

@ -0,0 +1,212 @@
import dayjs from 'dayjs'
const filterColumns = {}
const app = getApp<IAppOption>()
Page({
data: {
active: 0,
list: [] as any[],
total: 0,
pagination: {
page: 1,
pages: 1,
count: 1,
},
// form
Search: '',
HasAdl: 0,
DoubleStandard: 0,
AdlTime: 0,
AdlScore: [] as any,
AdlScoreChange: [],
AdlScoreChangeType: 0,
AdlScoreChangeMax: '',
AdlScoreChangeMin: '',
SteroidDailyDose: [] as any,
SteroidDailyDoseChange: [] as any,
IsThisWeekAdl: 0,
PharyngealSymptoms: 0,
AntibodyType: 0,
ThyroidAbnormal: 0,
PreviousConvulsion: 0,
TraditionalImmunosuppressant: 0,
MedicalInsuranceType: 0,
BindStartDate: '',
BindEndDate: '',
HasAdlIndex: 0,
HasAdlName: '全部',
DoubleStandardIndex: 0,
DoubleStandardName: '全部',
AdlTimeIndex: 0,
AdlTimeName: '全部',
...filterColumns,
},
onLoad(options) {
this.setData({
BindStartDate: options.BindStartDate || '',
BindEndDate: options.BindEndDate || '',
HasAdl: Number(options.HasAdl || ''),
DoubleStandard: Number(options.DoubleStandard || ''),
AdlScore: options.AdlScore ? options.AdlScore.split('-').map(Number) : [],
SteroidDailyDose: options.SteroidDailyDose ? options.SteroidDailyDose.split('-').map(Number) : [],
IsThisWeekAdl: Number(options.IsThisWeekAdl || ''),
})
},
onShow() {
app.waitLogin().then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTLIST' })
this.getList()
})
},
handleReset() {
this.setData({
Search: '',
HasAdl: 0,
HasAdlIndex: 0,
HasAdlName: '全部',
DoubleStandard: 0,
DoubleStandardIndex: 0,
DoubleStandardName: '全部',
AdlTime: 0,
AdlTimeName: '全部',
AdlScore: [],
AdlScoreChange: [],
AdlScoreChangeType: 0,
AdlScoreChangeMax: '',
AdlScoreChangeMin: '',
SteroidDailyDose: [],
SteroidDailyDoseChange: [],
IsThisWeekAdl: 0,
PharyngealSymptoms: 0,
AntibodyType: 0,
ThyroidAbnormal: 0,
PreviousConvulsion: 0,
TraditionalImmunosuppressant: 0,
MedicalInsuranceType: 0,
BindStartDate: '',
BindEndDate: '',
})
this.getList()
},
handleTapSearch() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTSEARCH' })
},
handleNav(e) {
const { active } = e.currentTarget.dataset
this.setData({
active,
})
this.handleSearch()
},
handleSearch() {
this.getList()
},
getList(newPage = 1) {
const { active } = this.data
const params = {
search: this.data.Search,
}
const url = {
0: '?r=zd/doctor/patient/get-my-list',
1: '?r=zd/doctor/patient/get-my-list&IsEDC=1',
}[active] as string
wx.ajax({
method: 'GET',
url,
data: {
page: newPage,
...params,
},
}).then((res) => {
res.list.forEach((item) => {
if (item.BecomePatientTime) {
item.BecomePatientTime = dayjs(item.BecomePatientTime).format('YYYY-MM-DD')
}
})
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list]
this.setData({
total: res.count,
list,
pagination: {
page: res.page,
pages: res.pages,
count: res.count,
},
})
})
},
onReachBottom() {
const { page, pages } = this.data.pagination
if (pages > page) {
this.getList(page + 1)
}
},
handlePickerChange(e: any) {
const { key } = e.currentTarget.dataset
const index = e.detail.value
const data = this.data[`${key}Column`]
this.setData({
[`${key}Index`]: index,
[`${key}Name`]: data[index].value,
[`${key}`]: data[index].id,
})
this.handleSearch()
},
handleRadio(e: any) {
const { key, index } = e.currentTarget.dataset
const data = this.data[`${key}Column`]
this.setData({
[`${key}`]: data[index].id,
[`${key}Name`]: data[index].value,
[`${key}Index`]: index,
})
},
handleCheckbox(e: any) {
const { index, key } = e.currentTarget.dataset
const data = this.data[`${key}Column`]
const oldValue = this.data[`${key}`]
const value = oldValue.includes(data[index].id)
? oldValue.filter((item: any) => item !== data[index].id)
: [...oldValue, data[index].id]
this.setData({
[`${key}`]: data[index].id ? value : [],
})
},
handleDetail(e: any) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTVIEW' })
const { index } = e.currentTarget.dataset
const item = this.data.list[index]
wx.navigateTo({
url: `/pages/d_patientDetail/index?id=${item.PatientId}`,
})
},
handleSend(e) {
const { index } = e.currentTarget.dataset
wx.navigateTo({
url: `/pages/d_interactiveDoctor/index?patientId=${this.data.list[index].PatientId}`,
})
},
handleSendGroup() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTMASSMESSAGE' })
wx.navigateTo({
url: '/pages/d_taskList/index',
})
},
onShareAppMessage() {
return {
title: '重症肌无力加油站,重拾生活掌控感!',
path: '/pages/d_patient/index',
}
},
handleBack() {
wx.navigateBack()
},
})

46
src/pages/d_patient/index.wxml

@ -0,0 +1,46 @@
<wxs src="./index.wxs" module="tools" />
<view class="page">
<view class="page-header">
<navBar title="患者列表" back home="{{false}}" bind:back="handleBack"></navBar>
<view class="search">
<image class="icon" src="{{imageUrl}}icon48.png?t={{Timestamp}}"></image>
<input
type="text"
model:value="{{Search}}"
class="input"
placeholder-class="input-place"
placeholder="可根据姓名、手机号搜索患者"
confirm-type="search"
bindconfirm="handleSearch"
bind:tap="handleTapSearch"
/>
</view>
<view class="navbar">
<view class="nav {{active===0 && 'active'}}" bind:tap="handleNav" data-active="{{0}}">
我的患者
<view class="dot" wx:if="{{unReadCount>0}}">{{unReadCount}}</view>
</view>
<view class="nav {{active===1 && 'active'}}" bind:tap="handleNav" data-active="{{1}}">EDC患者</view>
</view>
</view>
<view class="list">
<view class="list-item" wx:for="{{list}}" wx:key="index" bind:tap="handleDetail" data-index="{{index}}">
<view class="avatar">
<image class="avatar-img" src="{{item.UserImg}}"></image>
</view>
<view class="container">
<view class="title">
<view class="name">
{{item.Name}}
<view class="edc" wx:if="{{item.IsEDC==1}}">EDC患者</view>
</view>
</view>
<view class="replay-date">入组时间:{{item.BecomePatientTime}}</view>
</view>
<view class="send" catch:tap="handleSend" data-index="{{index}}">消息</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>
</view>
<tabbar active="{{1}}"></tabbar>

12
src/pages/d_patient/index.wxs

@ -0,0 +1,12 @@
function include(value, arr) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] === value) {
return true
}
}
return false
}
module.exports = {
include: include,
}

5
src/pages/d_patientDetail/index.json

@ -1,10 +1,9 @@
{ {
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"zd-navBar": "/components/zd-navBar/navBar", "navbar": "/components/navbar/index",
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"ec-canvas": "/components/ec-canvas/ec-canvas", "ec-canvas": "/components/ec-canvas/ec-canvas"
"toast": "/components/toast/index"
} }
} }

629
src/pages/d_patientDetail/index.scss

@ -1,15 +1,16 @@
page { page {
background-color: rgba(242, 244, 245, 1); background-color: rgba(246, 248, 249, 1);
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
} }
.page { .page {
width: 100vw; width: 100vw;
overflow-x: hidden; overflow-x: hidden;
min-height: 100vh; min-height: 100vh;
.banner { .banner {
margin: 40rpx 30rpx 32rpx; margin: 40rpx 30rpx 0;
padding: 36rpx 20rpx; padding: 0 20rpx;
background: #ffffff; background: linear-gradient(53deg, #ffffff 0%, rgba(255, 255, 255, 0.46) 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
position: relative; position: relative;
.watermark { .watermark {
@ -26,55 +27,74 @@ page {
} }
} }
.banner-container { .banner-container {
.user { position: relative;
display: flex; z-index: 3;
.avatar { padding: 120rpx 0 38rpx;
.avatar-img { .avatar {
width: 100rpx; position: absolute;
height: 100rpx; left: 50%;
border-radius: 50%; top: 0;
transform: translate(-50%, -50%);
.avatar-img {
width: 174rpx;
height: 174rpx;
border-radius: 50%;
}
.icon {
position: absolute;
bottom: 0;
right: 0;
width: 40rpx;
height: 40rpx;
}
}
.w-header {
text-align: center;
.name {
font-size: 48rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
.age {
display: inline;
color: rgba(173, 172, 178, 1);
font-weight: normal;
.sub {
font-size: 28rpx;
}
} }
} }
.tel {
margin-top: 28rpx;
font-size: 28rpx;
color: rgba(33, 29, 46, 1);
display: flex;
align-items: center;
justify-content: center;
.tel-icon {
margin-left: 10rpx;
width: 40rpx;
height: 40rpx;
}
}
.date {
margin-top: 28rpx;
font-size: 28rpx;
color: rgba(105, 104, 110, 1);
}
.send {
margin-left: 32rpx;
width: 92rpx;
height: 32rpx;
font-size: 22rpx;
color: rgba(103, 186, 202, 1);
text-align: center;
border: 1px solid #67baca;
border-radius: 58rpx 58rpx 58rpx 58rpx;
}
}
.user {
.wrap { .wrap {
padding-left: 20rpx; padding-left: 20rpx;
.w-header {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8rpx;
.name {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.icon {
width: 32rpx;
height: 32rpx;
}
.tel {
position: relative;
z-index: 3;
font-size: 32rpx;
color: rgba(154, 161, 162, 1);
display: flex;
align-items: center;
.tel-icon {
margin-left: 10rpx;
width: 32rpx;
height: 32rpx;
}
}
.send {
margin-left: 32rpx;
width: 92rpx;
height: 32rpx;
font-size: 22rpx;
color: rgba(103, 186, 202, 1);
text-align: center;
border: 1px solid #67baca;
border-radius: 58rpx 58rpx 58rpx 58rpx;
}
}
.w-tags { .w-tags {
margin-top: 28rpx; margin-top: 28rpx;
display: flex; display: flex;
@ -307,463 +327,66 @@ page {
} }
} }
} }
.info-card {
.chart-container { margin: 24rpx 30rpx 0;
margin: 30rpx; padding: 0 32rpx;
padding: 30rpx; background: linear-gradient(53deg, #ffffff 0%, rgba(255, 255, 255, 0.87) 100%);
border-radius: 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
background-color: #fff; border: 2rpx solid #ffffff;
position: relative; .row {
.watermark { padding: 32rpx;
position: absolute; display: flex;
top: 80rpx; border-bottom: 1px solid rgba(173, 172, 178, 0.1);
z-index: 2; &:last-of-type {
font-size: 36rpx; border: none;
line-height: 58rpx;
color: rgba(0, 0, 0, 0.05);
transform: rotate(-12deg);
text-align: center;
.p {
max-width: 90vw;
white-space: wrap;
}
}
.container {
.c-nav {
position: relative;
z-index: 3;
display: flex;
padding: 8rpx;
border-radius: 98rpx;
background-color: #f2f4f5;
.nav-item {
flex: 1;
padding: 12rpx;
font-size: 32rpx;
color: #677172;
text-align: center;
&.active {
color: #fff;
border-radius: 62rpx;
background-color: #62bed0;
}
}
}
.filter {
position: relative;
z-index: 3;
margin-top: 32rpx;
display: flex;
gap: 16rpx;
align-items: center;
border-radius: 80rpx 80rpx 80rpx 80rpx;
.type {
padding: 10rpx 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
background-color: rgba(242, 244, 245, 1);
border-radius: 34rpx;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.range {
padding: 10rpx 32rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
border-radius: 34rpx;
background-color: rgba(242, 244, 245, 1);
.icon {
width: 24rpx;
height: 24rpx;
}
}
} }
.card { .label {
margin: 32rpx 0 0; width: 11em;
padding: 20rpx; font-size: 32rpx;
background: #ffffff; color: rgba(173, 172, 178, 1);
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
.pie {
height: 376rpx;
}
.line {
border-top: 1px dashed rgba(242, 244, 245, 1);
}
.w-header {
padding-top: 32rpx;
display: flex;
justify-content: space-between;
.title {
font-size: 32rpx;
color: #484848;
}
.legend {
display: flex;
align-items: center;
gap: 25rpx;
.item {
font-size: 20rpx;
color: #4f4f4f;
display: flex;
align-items: center;
.logo {
margin-right: 8rpx;
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #cf5375;
&.hormone {
background-color: #3192a1;
}
}
.icon {
margin-right: 8rpx;
width: 17rpx;
height: 24rpx;
}
}
}
}
.column {
height: 400rpx;
}
} }
.module { .content {
margin-top: 30rpx; font-size: 32rpx;
.module-header { color: rgba(33, 29, 46, 1);
display: flex;
.date {
flex-shrink: 0;
font-size: 24rpx;
color: #333333;
}
.tags {
margin-left: 14rpx;
flex: 1;
display: flex;
flex-wrap: nowrap;
overflow-x: scroll;
white-space: nowrap;
&::-webkit-scrollbar {
display: none;
}
.tag1 {
margin-left: 14rpx;
padding: 0 12rpx;
background: #d86687;
border-radius: 6rpx;
font-size: 24rpx;
line-height: 36rpx;
text-align: center;
color: #ffffff;
}
.tag2 {
margin-left: 14rpx;
padding: 0 12rpx;
background: #0b184f;
border-radius: 6rpx;
font-size: 24rpx;
line-height: 36rpx;
text-align: center;
color: #ffffff;
}
.tag3 {
margin-left: 14rpx;
padding: 0 12rpx;
background: #24d8c8;
border-radius: 6rpx;
font-size: 24rpx;
line-height: 36rpx;
text-align: center;
color: #ffffff;
}
}
}
.module-container {
margin-top: 24rpx;
display: flex;
.aside {
margin-right: 30rpx;
padding-left: 14rpx;
border-right: 1px dashed #dddddd;
}
.m-card {
flex: 1;
box-shadow: 0 4rpx 29rpx 0rpx rgba(207, 83, 116, 0.25);
border-radius: 24rpx;
.card-header {
padding: 20rpx 18rpx 4rpx 48rpx;
border-radius: 24rpx 24rpx 0 0;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 8rpx 8rpx 16rpx 0rpx rgba(143, 217, 226, 0.1);
&.grade1 {
background: linear-gradient(90deg, #26dac9 7%, rgba(143, 217, 226, 0) 70%, rgba(143, 217, 226, 0) 100%);
}
&.grade2 {
background: linear-gradient(
90deg,
rgba(235, 111, 87, 1) 7%,
rgba(143, 217, 226, 0) 70%,
rgba(143, 217, 226, 0) 100%
);
}
&.grade3 {
background: linear-gradient(
90deg,
rgba(207, 83, 117, 1) 7%,
rgba(143, 217, 226, 0) 70%,
rgba(143, 217, 226, 0) 100%
);
}
.num {
display: flex;
align-items: baseline;
font-size: 96rpx;
line-height: 1;
color: #ffffff;
letter-spacing: 4rpx;
.sub {
font-size: 24rpx;
color: #fff;
}
}
.num-detail {
display: flex;
.n-item {
width: 73rpx;
&.active {
.box {
background-color: #cf5375;
}
}
.box {
width: 45rpx;
height: 45rpx;
width: 45rpx;
height: 45rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 45rpx;
background: #333333;
border-radius: 12rpx 12rpx 12rpx 12rpx;
}
.name {
font-size: 24rpx;
line-height: 48rpx;
color: rgba(51, 51, 51, 0.5);
}
}
}
.status {
font-size: 24rpx;
color: #989898;
text-align: right;
.s-num {
font-size: 32rpx;
}
.s-core {
font-size: 24rpx;
color: #989898;
// background: #484848;
border-radius: 6rpx;
}
}
}
.card-container {
padding: 8rpx 23rpx 20rpx;
border-radius: 0 0 24rpx 24rpx;
background-color: #fff;
.cc-title {
text-indent: 22rpx;
font-size: 24rpx;
color: rgba(79, 79, 79, 1);
}
.cc-content {
margin-top: 12rpx;
padding: 16rpx 20rpx;
border-radius: 24rpx;
background-color: rgba(249, 249, 249, 1);
.line {
font-size: 24rpx;
color: #666666;
line-height: 36rpx;
.dot {
color: #666666;
font-weight: bold;
}
.red {
color: #cf5375;
}
.green {
color: #25d9c8;
}
}
}
.fold {
margin-top: 16rpx;
.fold-header {
display: flex;
justify-content: flex-end;
font-size: 24rpx;
color: rgba(204, 204, 204, 1);
}
.fold-container {
padding-top: 10rpx;
height: 500rpx;
overflow: hidden;
transition: all 0.5s;
&.hide {
padding: 0;
height: 0;
}
.fold-img {
width: 100%;
}
.scurt {
width: 100%;
border: 1px solid rgba(0, 0, 0, 0.1);
box-sizing: border-box;
.s-header {
display: flex;
height: 40rpx;
margin-bottom: -1px;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
.none {
flex-shrink: 0;
width: 226rpx;
background-color: rgba(228, 228, 228, 1);
}
.bar {
flex: 1;
display: flex;
.num {
flex: 1;
text-align: center;
font-size: 24rpx;
color: #fff;
line-height: 40rpx;
}
}
}
.s-body {
display: flex;
.s-aside {
width: 28rpx;
background-color: rgba(102, 102, 102, 0.15);
flex-shrink: 0;
.sa-item {
display: flex;
text-align: center;
justify-content: center;
align-items: center;
font-size: 18rpx;
color: rgba(102, 102, 102, 1);
line-height: 1;
overflow: hidden;
&:not(:last-of-type) {
margin-bottom: -1px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
}
.sa-item1 {
height: 158rpx;
}
.sa-item2 {
height: 54rpx;
}
.sa-item3 {
height: 106rpx;
}
.sa-item4 {
height: 108rpx;
}
}
.s-container {
flex: 1;
.sc-row {
display: flex;
height: 54rpx;
overflow: hidden;
.sc-title {
width: 198rpx;
font-size: 18rpx;
color: rgba(102, 102, 102, 1);
text-align: center;
line-height: 53rpx;
}
.sc-col {
margin-left: -1px;
border-left: 1px solid rgba(0, 0, 0, 0.1);
flex: 1;
text-align: center;
.icon {
margin-top: 11rpx;
width: 32rpx;
height: 32rpx;
}
}
}
.sc-row:not(:last-of-type) {
margin-bottom: -1px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.sc-row:nth-of-type(2n-1) {
background-color: rgba(217, 217, 217, 0.2);
}
}
}
}
}
}
}
}
.drug-card {
margin-top: 30rpx;
flex: 1;
box-shadow: 0 4rpx 29rpx 0rpx rgba(207, 83, 116, 0.25);
border-radius: 24rpx;
.d-header {
border-radius: 24rpx 0 0 0;
padding: 20rpx 50rpx;
display: flex;
align-items: center;
justify-content: space-between;
background: linear-gradient(95deg, #26dac9 7%, rgba(143, 217, 226, 0) 100%);
.name {
font-size: 28rpx;
color: #ffffff;
}
.status {
font-size: 22rpx;
color: #5b6363;
.num {
font-size: 22rpx;
color: #cf5375;
}
}
}
.content {
padding: 20rpx 50rpx;
font-size: 22rpx;
color: #666666;
}
}
}
} }
} }
} }
.edc-card {
margin: 24rpx 30rpx 0;
padding: 30rpx 32rpx;
display: flex;
align-items: center;
gap: 24rpx;
background-color: #fff;
border-radius: 24rpx;
.icon {
width: 48rpx;
height: 48rpx;
}
.content {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
}
}
.footer {
margin: 60rpx 30rpx 0;
display: flex;
align-items: center;
gap: 26rpx;
.btn {
flex: 1;
height: 88rpx;
background: #ffffff;
font-size: 32rpx;
color: rgba(185, 130, 255, 1);
display: flex;
align-items: center;
justify-content: center;
border-radius: 48rpx 48rpx 48rpx 48rpx;
border: 2rpx solid #b982ff;
}
}
} }
.popup-remark { .popup-remark {
@ -882,3 +505,5 @@ page {
} }
} }
} }

342
src/pages/d_patientDetail/index.ts

@ -1,14 +1,9 @@
import dayjs from 'dayjs'; import dayjs from 'dayjs'
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
let echarts: any = null;
Page({ Page({
data: { data: {
toastShow: false,
toastType: 'patientDetailSafeDoctor',
toastParams: {} as any,
showTel: false, showTel: false,
doctor: {}, doctor: {},
@ -166,26 +161,16 @@ Page({
count: 1, count: 1,
}, },
}, },
ecDataTrendComponent1: null as any,
ecDataTrendComponent2: null as any,
ecDataTrendComponent3: null as any,
ecDataTrendComponent4: null as any,
async onLoad(option) { async onLoad(option) {
this.setData({ this.setData({
id: option.id, id: option.id,
}); })
echarts = await require.async('../../gift/compontnts/echart/echarts.js');
this.ecDataTrendComponent1 = this.selectComponent('#chart1');
this.ecDataTrendComponent2 = this.selectComponent('#chart2');
this.ecDataTrendComponent3 = this.selectComponent('#chart3');
this.ecDataTrendComponent4 = this.selectComponent('#chart4');
app.waitLogin({ type: [2] }).then(async (_res) => { app.waitLogin({ type: [2] }).then(async (_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTDETAIL' }); app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTDETAIL' })
this.getDoctorDetail(); this.getDoctorDetail()
await this.getDetail(); await this.getDetail()
this.handleNav({ currentTarget: { dataset: { index: '0' } } }, false); })
});
}, },
getDoctorDetail() { getDoctorDetail() {
wx.ajax({ wx.ajax({
@ -196,14 +181,8 @@ Page({
this.setData({ this.setData({
doctor: res.doctor, doctor: res.doctor,
hospital: res.hospital, hospital: res.hospital,
toastShow: true, })
toastType: 'patientDetailSafeDoctor', })
toastParams: {
Name: res.doctor.Name,
HospitalName: res.hospital.Name,
},
});
});
}, },
getDetail() { getDetail() {
return wx return wx
@ -214,57 +193,57 @@ Page({
}) })
.then((res) => { .then((res) => {
if (res.LastAdlTime) { if (res.LastAdlTime) {
res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', ''); res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '')
} }
if (res.LastUseDrugsTime) { if (res.LastUseDrugsTime) {
res.LastUseDrugsTimeName = res.LastUseDrugsTimeName =
dayjs().format('YYYY-MM-DD') === res.LastUseDrugsTime dayjs().format('YYYY-MM-DD') === res.LastUseDrugsTime
? '' ? ''
: dayjs(res.LastUseDrugsTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', ''); : dayjs(res.LastUseDrugsTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '')
} }
this.setData({ this.setData({
detail: { detail: {
...res, ...res,
hideName: res.Name.replace(/^(.)(.*)$/, (_, first, rest) => first + '*'.repeat(rest.length)), hideName: res.Name.replace(/^(.)(.*)$/, (_, first, rest) => first + '*'.repeat(rest.length)),
}, },
}); })
}); })
}, },
handleTypeChange(e) { handleTypeChange(e) {
const index = e.detail.value; const index = e.detail.value
const { typeRange, nav } = this.data; const { typeRange, nav } = this.data
const type = typeRange[index].id; const type = typeRange[index].id
const typeName = typeRange[index].value; const typeName = typeRange[index].value
let EndDate = ''; let EndDate = ''
let StartDate = ''; let StartDate = ''
if (type === '1') { if (type === '1') {
EndDate = dayjs().format('YYYY-MM-DD'); EndDate = dayjs().format('YYYY-MM-DD')
StartDate = dayjs().subtract(6, 'd').format('YYYY-MM-DD'); StartDate = dayjs().subtract(6, 'd').format('YYYY-MM-DD')
} else if (type === '2') { } else if (type === '2') {
EndDate = dayjs().format('YYYY-MM'); EndDate = dayjs().format('YYYY-MM')
StartDate = dayjs().subtract(1, 'M').format('YYYY-MM'); StartDate = dayjs().subtract(1, 'M').format('YYYY-MM')
} else if (type === '3') { } else if (type === '3') {
EndDate = dayjs().format('YYYY'); EndDate = dayjs().format('YYYY')
StartDate = dayjs().subtract(1, 'y').format('YYYY'); StartDate = dayjs().subtract(1, 'y').format('YYYY')
} }
this.setData({ this.setData({
type, type,
typeName, typeName,
EndDate, EndDate,
StartDate, StartDate,
}); })
if (nav === '0') { if (nav === '0') {
this.getGraph(); this.getGraph()
} else { } else {
this.getAdlList(); this.getAdlList()
} }
}, },
handleChange() { handleChange() {
const { nav } = this.data; const { nav } = this.data
if (nav === '0') { if (nav === '0') {
this.getGraph(); this.getGraph()
} else { } else {
this.getAdlList(); this.getAdlList()
} }
}, },
getGraph() { getGraph() {
@ -279,50 +258,50 @@ Page({
count: 0, count: 0,
}, },
}).then(async (res) => { }).then(async (res) => {
this.initChart1(res.adlSummary); this.initChart1(res.adlSummary)
this.initChart2(res.adlSummary); this.initChart2(res.adlSummary)
const medication = res.medication.map((item) => { const medication = res.medication.map((item) => {
return { return {
Date: item.InjectionDate, Date: item.InjectionDate,
...item, ...item,
}; }
}); })
const list = res.list; const list = res.list
const newList: any[] = this.mergeArr(list, medication); const newList: any[] = this.mergeArr(list, medication)
const chart3 = await this.initChart3(newList as never[]); const chart3 = await this.initChart3(newList as never[])
const chart4 = await this.initChart4(newList as never[]); const chart4 = await this.initChart4(newList as never[])
echarts.connect([chart3, chart4]); echarts.connect([chart3, chart4])
}); })
}, },
mergeArr(array1: any[] = [], array2: any[] = []) { mergeArr(array1: any[] = [], array2: any[] = []) {
// 合并两个数组中相同Date字段的对象 // 合并两个数组中相同Date字段的对象
const mergedArray: any[] = []; const mergedArray: any[] = []
const mergedMap = new Map(); const mergedMap = new Map()
array1.concat(array2).forEach((obj) => { array1.concat(array2).forEach((obj) => {
const date = obj.Date; const date = obj.Date
if (mergedMap.has(date)) { if (mergedMap.has(date)) {
mergedMap.get(date).push(obj); mergedMap.get(date).push(obj)
} else { } else {
mergedMap.set(date, [obj]); mergedMap.set(date, [obj])
} }
}); })
mergedMap.forEach((objs: any) => { mergedMap.forEach((objs: any) => {
if (objs.length === 1) { if (objs.length === 1) {
mergedArray.push(objs[0]); mergedArray.push(objs[0])
} else { } else {
const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur })); const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur }))
mergedArray.push(mergedObj); mergedArray.push(mergedObj)
} }
}); })
// 按照Date字段对合并后的数组进行排序 // 按照Date字段对合并后的数组进行排序
mergedArray.sort((a, b) => { mergedArray.sort((a, b) => {
return a.Date.localeCompare(b.Date); return a.Date.localeCompare(b.Date)
}); })
return mergedArray; return mergedArray
}, },
initChart1(adlSummary = {}) { initChart1(adlSummary = {}) {
this.ecDataTrendComponent1.init((canvas, width, height, dpr) => { this.ecDataTrendComponent1.init((canvas, width, height, dpr) => {
@ -330,8 +309,8 @@ Page({
width, width,
height, height,
devicePixelRatio: dpr, // new devicePixelRatio: dpr, // new
}); })
canvas.setChart(chart); canvas.setChart(chart)
const option = { const option = {
tooltip: { tooltip: {
@ -369,13 +348,13 @@ Page({
maxSurfaceAngle: 80, maxSurfaceAngle: 80,
}, },
labelLayout(params) { labelLayout(params) {
const isLeft = params.labelRect.x < chart.getWidth() / 2; const isLeft = params.labelRect.x < chart.getWidth() / 2
const points = params.labelLinePoints; const points = params.labelLinePoints
// Update the end point. // Update the end point.
points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width; points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width
return { return {
labelLinePoints: points, labelLinePoints: points,
}; }
}, },
data: [ data: [
{ value: adlSummary.adlNearNum, name: 'ADL接近达标' }, { value: adlSummary.adlNearNum, name: 'ADL接近达标' },
@ -391,11 +370,11 @@ Page({
}, },
}, },
], ],
}; }
chart.setOption(option); chart.setOption(option)
return chart; return chart
}); })
}, },
initChart2(adlSummary = {}) { initChart2(adlSummary = {}) {
this.ecDataTrendComponent2.init((canvas, width, height, dpr) => { this.ecDataTrendComponent2.init((canvas, width, height, dpr) => {
@ -403,8 +382,8 @@ Page({
width, width,
height, height,
devicePixelRatio: dpr, // new devicePixelRatio: dpr, // new
}); })
canvas.setChart(chart); canvas.setChart(chart)
const option = { const option = {
tooltip: { tooltip: {
@ -442,13 +421,13 @@ Page({
maxSurfaceAngle: 80, maxSurfaceAngle: 80,
}, },
labelLayout(params) { labelLayout(params) {
const isLeft = params.labelRect.x < chart.getWidth() / 2; const isLeft = params.labelRect.x < chart.getWidth() / 2
const points = params.labelLinePoints; const points = params.labelLinePoints
// Update the end point. // Update the end point.
points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width; points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width
return { return {
labelLinePoints: points, labelLinePoints: points,
}; }
}, },
data: [ data: [
{ value: adlSummary.SteroidDailyDoseUnStandardNum, name: '激素未达标' }, { value: adlSummary.SteroidDailyDoseUnStandardNum, name: '激素未达标' },
@ -463,24 +442,24 @@ Page({
}, },
}, },
], ],
}; }
chart.setOption(option); chart.setOption(option)
return chart; return chart
}); })
}, },
initChart3(defaultList = []) { initChart3(defaultList = []) {
const { userInfo } = this.data; const { userInfo } = this.data
const list: any = defaultList; const list: any = defaultList
return new Promise((reslove) => { return new Promise((reslove) => {
this.ecDataTrendComponent3.init((canvas, width, height, dpr) => { this.ecDataTrendComponent3.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
width, width,
height, height,
devicePixelRatio: dpr, // new devicePixelRatio: dpr, // new
}); })
canvas.setChart(chart); canvas.setChart(chart)
const option: any = { const option: any = {
tooltip: { tooltip: {
@ -528,7 +507,7 @@ Page({
data: list.map((item) => dayjs(item.Date).format('MM-DD')), data: list.map((item) => dayjs(item.Date).format('MM-DD')),
axisLabel: { axisLabel: {
formatter() { formatter() {
return ''; return ''
}, },
}, },
}, },
@ -601,7 +580,7 @@ Page({
endValue: list.length - 1, endValue: list.length - 1,
filterMode: 'none', filterMode: 'none',
}, },
}; }
if (this.data.detail.UserType === 4) { if (this.data.detail.UserType === 4) {
const markLineData = list const markLineData = list
@ -623,8 +602,8 @@ Page({
color: '#25D9C8', color: '#25D9C8',
offset: [60, 0], offset: [60, 0],
}, },
}; }
}); })
option.series.push({ option.series.push({
name: '用药', name: '用药',
data: list.map((item) => (item.InjectionBottles ? 0 : null)), data: list.map((item) => (item.InjectionBottles ? 0 : null)),
@ -647,7 +626,7 @@ Page({
symbol: ['none', 'none'], symbol: ['none', 'none'],
data: markLineData, data: markLineData,
}, },
}); })
// option.series.push({ // option.series.push({
// name: "用药时间", // name: "用药时间",
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
@ -669,23 +648,23 @@ Page({
// }); // });
} }
chart.setOption(option); chart.setOption(option)
reslove(chart); reslove(chart)
return chart; return chart
}); })
}); })
}, },
initChart4(defaultList = []) { initChart4(defaultList = []) {
const { userInfo } = this.data; const { userInfo } = this.data
const list: any = defaultList; const list: any = defaultList
return new Promise((reslove) => { return new Promise((reslove) => {
this.ecDataTrendComponent4.init((canvas, width, height, dpr) => { this.ecDataTrendComponent4.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
width, width,
height, height,
devicePixelRatio: dpr, // new devicePixelRatio: dpr, // new
}); })
canvas.setChart(chart); canvas.setChart(chart)
const option: any = { const option: any = {
tooltip: { tooltip: {
@ -738,12 +717,12 @@ Page({
type: 'value', type: 'value',
minInterval: 1, minInterval: 1,
max(value) { max(value) {
return value.max + 20 > 999 ? 999 : value.max + 20; return value.max + 20 > 999 ? 999 : value.max + 20
}, },
axisLabel: { axisLabel: {
// width: 20, // width: 20,
formatter(value: number) { formatter(value: number) {
return value; return value
}, },
}, },
}, },
@ -765,7 +744,7 @@ Page({
color: '#18474e', color: '#18474e',
z: 11, z: 11,
formatter({ value }) { formatter({ value }) {
return `${value}mg`; return `${value}mg`
}, },
}, },
itemStyle: { itemStyle: {
@ -829,7 +808,7 @@ Page({
endValue: list.length - 1, endValue: list.length - 1,
filterMode: 'none', filterMode: 'none',
}, },
}; }
if (this.data.detail.UserType === 4) { if (this.data.detail.UserType === 4) {
const markLineData = list const markLineData = list
.filter((item) => item.InjectionBottles) .filter((item) => item.InjectionBottles)
@ -849,9 +828,9 @@ Page({
color: '#25D9C8', color: '#25D9C8',
offset: [60, 0], offset: [60, 0],
}, },
}; }
}); })
const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose)); const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose))
option.series.push({ option.series.push({
name: '用药', name: '用药',
data: list.map((item) => (item.InjectionBottles ? 0 : null)), data: list.map((item) => (item.InjectionBottles ? 0 : null)),
@ -874,7 +853,7 @@ Page({
symbol: ['none', 'none'], symbol: ['none', 'none'],
data: markLineData, data: markLineData,
}, },
}); })
// option.series.push({ // option.series.push({
// name: "用药时间", // name: "用药时间",
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
@ -896,37 +875,37 @@ Page({
// }); // });
} }
chart.setOption(option); chart.setOption(option)
reslove(chart); reslove(chart)
return chart; return chart
}); })
}); })
}, },
handleRemark() { handleRemark() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREMARK' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREMARK' })
this.setData({ this.setData({
popupRemarkShow: true, popupRemarkShow: true,
remark: this.data.detail.DoctorRemark, remark: this.data.detail.DoctorRemark,
}); })
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
remarkFocus: true, remarkFocus: true,
}); })
}, 300); }, 300)
}, },
handleRemarkClose() { handleRemarkClose() {
this.setData({ this.setData({
popupRemarkShow: false, popupRemarkShow: false,
remarkFocus: false, remarkFocus: false,
remark: '', remark: '',
}); })
}, },
handleRemarkSubmit() { handleRemarkSubmit() {
if (!this.data.remark) { if (!this.data.remark) {
wx.showToast({ wx.showToast({
icon: 'none', icon: 'none',
title: '请输入备注', title: '请输入备注',
}); })
} }
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -936,34 +915,34 @@ Page({
DoctorRemark: this.data.remark, DoctorRemark: this.data.remark,
}, },
}).then((_res) => { }).then((_res) => {
this.handleRemarkClose(); this.handleRemarkClose()
this.getDetail(); this.getDetail()
}); })
}, },
handleEditUser() { handleEditUser() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILEDIT' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILEDIT' })
this.setData({ this.setData({
popupEditShow: true, popupEditShow: true,
}); })
}, },
handleUserCancel() { handleUserCancel() {
this.setData({ this.setData({
popupEditShow: false, popupEditShow: false,
}); })
}, },
handleUserSubmit() { handleUserSubmit() {
this.handleUserCancel(); this.handleUserCancel()
this.handlePatientUpdate(); this.handlePatientUpdate()
}, },
handleRadio(e) { handleRadio(e) {
const { id, key } = e.currentTarget.dataset; const { id, key } = e.currentTarget.dataset
this.setData({ this.setData({
[`detail.${key}`]: id, [`detail.${key}`]: id,
}); })
}, },
handlePatientUpdate() { handlePatientUpdate() {
const { detail } = this.data; const { detail } = this.data
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/doctor/patient/update', url: '?r=zd/doctor/patient/update',
@ -979,35 +958,35 @@ Page({
wx.showToast({ wx.showToast({
icon: 'none', icon: 'none',
title: '更新成功', title: '更新成功',
}); })
this.getDetail(); this.getDetail()
}); })
}, },
handleBack() { handleBack() {
wx.navigateBack(); wx.navigateBack()
}, },
handleSend() { handleSend() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILMESSAGE' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILMESSAGE' })
wx.navigateTo({ wx.navigateTo({
url: `/pages/d_interactiveDoctor/index?patientId=${this.data.detail.PatientId}`, url: `/pages/d_interactiveDoctor/index?patientId=${this.data.detail.PatientId}`,
}); })
}, },
handleNav(e, mp = true) { handleNav(e, mp = true) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
if (index == 0 && mp) { if (index == 0 && mp) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREPORTGUIDE' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREPORTGUIDE' })
} }
if (index == 1 && mp) { if (index == 1 && mp) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILNOTEGUIDE' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILNOTEGUIDE' })
} }
this.setData({ this.setData({
nav: index, nav: index,
}); })
this.handleTypeChange({ detail: { value: '2' } }); this.handleTypeChange({ detail: { value: '2' } })
}, },
getAdlList(newPage = 1) { getAdlList(newPage = 1) {
const { detail, EndDate, StartDate, type } = this.data; const { detail, EndDate, StartDate, type } = this.data
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/doctor/patient/adl-list', url: '?r=zd/doctor/patient/adl-list',
@ -1020,20 +999,20 @@ Page({
}, },
}).then((res) => { }).then((res) => {
res.list.map((item) => { res.list.map((item) => {
let grade = 1; let grade = 1
if (item.TotalScore < 5) { if (item.TotalScore < 5) {
grade = 1; grade = 1
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { } else if (item.TotalScore >= 5 && item.TotalScore < 15) {
grade = 2; grade = 2
} else { } else {
grade = 3; grade = 3
} }
item.grade = grade; item.grade = grade
item.fold = false; item.fold = false
return item; return item
}); })
const adlList = res.page === 1 ? res.list : [...this.data.adlList, ...res.list]; const adlList = res.page === 1 ? res.list : [...this.data.adlList, ...res.list]
this.setData({ this.setData({
adlList, adlList,
pagination: { pagination: {
@ -1041,35 +1020,46 @@ Page({
pages: res.pages, pages: res.pages,
count: res.count, count: res.count,
}, },
}); })
}); })
}, },
onReachBottom() { onReachBottom() {
const { page, pages } = this.data.pagination; const { page, pages } = this.data.pagination
const nav = this.data.nav; const nav = this.data.nav
if (pages > page && nav === '1') { if (pages > page && nav === '1') {
this.getAdlList(page + 1); this.getAdlList(page + 1)
} }
}, },
handleFold(e) { handleFold(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
this.setData({ this.setData({
[`adlList[${index}].fold`]: !this.data.adlList[index].fold, [`adlList[${index}].fold`]: !this.data.adlList[index].fold,
}); })
}, },
handleAdlDetail() {}, handleAdlDetail() {},
handleToastOk() { handleToastOk() {
this.setData({ this.setData({
toastShow: false, toastShow: false,
}); })
}, },
handleToastCancel() { handleToastCancel() {
wx.navigateBack(); wx.navigateBack()
}, },
handleToggleTel() { handleToggleTel() {
console.log(11111); console.log(11111)
this.setData({ this.setData({
showTel: !this.data.showTel, showTel: !this.data.showTel,
}); })
},
handleEDC() {
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/patient/set-edc',
data: { patientId: this.data.detail.PatientId },
}).then((res) => {
this.setData({
['detail.IsEDC']: this.data.detail.IsEDC == 1 ? 2 : 1,
})
})
}, },
}); })

476
src/pages/d_patientDetail/index.wxml

@ -1,453 +1,61 @@
<navbar fixed title="患者档案" custom-style="background:{{background}}" z-index="10">
<van-icon name="arrow-left" slot="left" color="#000" bind:tap="handleBack" />
</navbar>
<view <view
class="page" class="page"
style="background: url({{imageUrl}}za-images/doctor/d_patient-detail-bg.png?t={{Timestamp}}) no-repeat top center/100% 640rpx" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+70}}px;"
> >
<zd-navBar background="{{background}}" title="患者档案" back bind:back="handleBack"></zd-navBar>
<view class="banner"> <view class="banner">
<view class="watermark"> <view class="watermark">
<view class="p">本页面内容涉及患者个人信息</view> <view class="p">本页面内容涉及患者个人信息</view>
<view class="p">仅用于{{hospital.Name}}{{doctor.Name}}医生进行患者随访管理</view> <view class="p">仅用于{{hospital.Name}}{{doctor.Name}}医生进行患者随访管理</view>
<view class="p">不可用于其他用途</view> <view class="p">不可用于其他用途</view>
<view class="p">【gMG给力加油站】</view>
</view> </view>
<view class="banner-container"> <view class="banner-container">
<view class="user"> <view class="avatar">
<view class="avatar"> <image class="avatar-img" src="{{detail.UserImg}}"></image>
<image class="avatar-img" src="{{detail.UserImg}}"></image> <image wx:if="{{detail.Gender==='1'}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
</view> <image wx:if="{{detail.Gender==='2'}}" class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="w-header">
<view class="name">{{showTel ? detail.Name : detail.hideName}}</view>
<image
wx:if="{{detail.Gender==='1'}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-man.png?t={{Timestamp}}"
></image>
<image
wx:if="{{detail.Gender==='2'}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-woman.png?t={{Timestamp}}"
></image>
<view class="tel" bind:tap="handleToggleTel">
{{showTel ? detail.Telephone : '***********'}}
<image wx:if="{{showTel}}" class="tel-icon" src="{{imageUrl}}za-images/5/eye2.png?t={{Timestamp}}"></image>
<image wx:else class="tel-icon" src="{{imageUrl}}za-images/5/eye1.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="w-tags">
<image
wx:if="{{detail.UserType===4}}"
class="label"
src="{{imageUrl}}za-images/doctor/drug-label.png?t={{Timestamp}}"
></image>
<view class="tag" wx:for="{{detail.Tags}}" wx:for-item="tag" wx:for-index="tIndex" wx:key="tIndex">
{{tag}}
</view>
</view>
</view>
</view> </view>
<view class="adl" wx:if="{{detail.LastAdlTime}}"> <view class="w-header">
<view class="a-header"> <view class="name">
<view class="content"> {{showTel ? detail.Name : detail.hideName}}
<view class="sub-content1">最近一次测评:{{detail.LastAdlTimeName}}</view> <view class="age">{{detail.AgeRangeName}}</view>
<view class="sub-content2" wx:if="{{detail.LastAdlNeedFollowStatus==1}}">需随访</view>
</view>
<view class="box"></view>
</view> </view>
<view class="a-content"> <view class="tel" bind:tap="handleToggleTel">
<view class="row" wx:if="{{detail.AdlScore}}"> {{showTel ? detail.Telephone : '***********'}}
<view class="label">最新ADL评分</view> <image wx:if="{{showTel}}" class="tel-icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
<view class="num">{{detail.AdlScore}}</view> <image wx:else class="tel-icon" src="{{imageUrl}}icon62.png?t={{Timestamp}}"></image>
<view class="tag" wx:if="{{detail.AdlScore<=1}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{detail.TotalScoreChange*1!=0}}">
<image
wx:if="{{detail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{detail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-warn" wx:elif="{{detail.AdlScore<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-warn.png?t={{Timestamp}}"></image>
接近达标
</view>
<view class="t-content" wx:if="{{detail.TotalScoreChange*1!=0}}">
<image
wx:if="{{detail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-warn.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-warn.png?t={{Timestamp}}"></image>
{{detail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{detail.TotalScoreChange*1!=0}}">
<image
wx:if="{{detail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{detail.TotalScoreChange}}
</view>
</view>
</view>
<view class="row" wx:if="{{detail.SteroidDailyDose}}">
<view class="label">最新激素用量</view>
<view class="num">{{detail.SteroidDailyDose}}mg</view>
<view class="tag" wx:if="{{detail.SteroidDailyDose<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{detail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{detail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{detail.SteroidDailyDoseChange}}mg
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{detail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{detail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{detail.SteroidDailyDoseChange}}mg
</view>
</view>
</view>
<view class="d-row" wx:if="{{detail.LastUseDrugsTime}}">
<view class="label">最近用药</view>
<view class="content">
{{detail.LastUseDrugsTime}}
<block wx:if="{{detail.LastUseDrugsTimeName}}">({{detail.LastUseDrugsTimeName}})</block>
</view>
</view>
<view class="d-row" wx:if="{{detail.DoctorRemark}}">
<view class="label">备注</view>
<view class="content">{{detail.DoctorRemark}}</view>
</view>
</view>
</view>
<view class="info-card">
<view class="ic-item">
<view class="label">抗体类型:</view>
<view class="content">{{antibodyTypeRangeList[detail.AntibodyType-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">既往发生危象:</view>
<view class="content">{{previousConvulsionRangeList[detail.PreviousConvulsion-1].value}}</view>
</view> </view>
<view class="ic-item"> <view class="date">入组时间:2025-08-10</view>
<view class="label">胸腺异常:</view>
<view class="content">{{thyroidAbnormalRangeList[detail.ThyroidAbnormal-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">医保类型:</view>
<view class="content">{{medicalInsuranceTypeRangeList[detail.MedicalInsuranceType-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">免疫抑制剂:</view>
<view class="content">
{{traditionalImmunosuppressantRangeList[detail.TraditionalImmunosuppressant-1].value}}
</view>
</view>
<view class="edit" bind:tap="handleEditUser">
<image class="icon" src="{{imageUrl}}za-images/3/icon-edit-white.png?t={{Timestamp}}"></image>
编辑
</view>
</view>
<view class="b-footer">
<view class="send" bind:tap="handleSend">发消息</view>
<view class="remark" bind:tap="handleRemark">备注</view>
</view> </view>
</view> </view>
</view> </view>
<view class="chart-container">
<view class="watermark"> <view class="info-card">
<view class="p">本页面内容涉及患者个人信息</view> <view class="row">
<view class="p">仅用于{{hospital.Name}}{{doctor.Name}}医生进行患者随访管理</view> <view class="label">Graves病病史</view>
<view class="p">不可用于其他用途</view> <view class="content">{{detail.IsGravesName}}</view>
<view class="p">【gMG给力加油站】</view>
</view> </view>
<view class="container"> <view class="row">
<view class="c-nav"> <view class="label">
<view class="nav-item {{nav ==='0' && 'active'}}" data-index="0" bind:tap="handleNav">双达标测评报告</view> TED(甲状腺眼突)
<view class="nav-item {{nav ==='1' && 'active'}}" data-index="1" bind:tap="handleNav">双达标笔记</view> <view></view>
</view> 及其相关眼部手术史
<view class="filter">
<picker class="type" mode="selector" range="{{typeRange}}" range-key="value" bind:change="handleTypeChange">
{{typeName}}
<image class="icon" src="{{imageUrl}}za-images/doctor/triangle-down.png?t={{Timestamp}}"></image>
</picker>
<view class="range">
<picker
mode="date"
end="{{EndDate}}"
fields="{{fields[type]}}"
mode="date"
model:value="{{StartDate}}"
bindchange="handleChange"
>
{{StartDate}}
</picker>
~
<picker
mode="date"
start="{{StartDate}}"
fields="{{fields[type]}}"
mode="date"
model:value="{{EndDate}}"
bindchange="handleChange"
>
{{EndDate}}
</picker>
<image class="icon" src="{{imageUrl}}za-images/doctor/triangle-down.png?t={{Timestamp}}"></image>
</view>
</view>
<view hidden="{{nav!=='0'}}">
<view class="card">
<view class="w-header">
<view class="title">ADL评分记录曲线</view>
<view class="legend">
<view class="item">
<view class="logo"></view>
ADL分数
</view>
<view class="item">
<image class="icon" src="{{imageUrl}}za-imagesdouble-standard/adl-cure.png?t={{Timestamp}}"></image>
用药时间
</view>
</view>
</view>
<view class="column">
<ec-canvas id="chart3" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="w-header">
<view class="title">激素日用量记录曲线</view>
<view class="legend">
<view class="item">
<view class="logo hormone"></view>
激素用量
</view>
</view>
</view>
<view class="column">
<ec-canvas id="chart4" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="card">
<view class="pie">
<ec-canvas id="chart1" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="line"></view>
<view class="pie">
<ec-canvas id="chart2" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
</view>
</view>
<view hidden="{{nav !== '1'}}">
<view class="module" wx:for="{{adlList}}" wx:key="index">
<view class="module-header">
<view class="date">{{item.CreateTime || item.InjectionDate}}</view>
<view class="tags">
<view class="tag3" wx:if="{{item.IsInsuranceProject==1}}">商保项目记录</view>
</view>
</view>
<view class="module-container">
<view class="aside"></view>
<view style="flex: 1">
<view
class="m-card"
bind:tap="handleAdlDetail"
data-id="{{item.Id}}"
data-isi="{{item.IsInsuranceProject}}"
data-index="{{index}}"
>
<view class="card-header grade{{item.grade}}">
<view class="num">
{{item.TotalScore}}
<view class="sub">分</view>
</view>
<view class="num-detail">
<view class="n-item {{item.MedullaTypeScore >=7 && 'active'}}">
<view class="box">{{item.MedullaTypeScore}}</view>
<view class="name">延髓</view>
</view>
<view class="n-item {{item.BreathTypeScore>=3 && 'active'}}">
<view class="box">{{item.BreathTypeScore}}</view>
<view class="name">呼吸</view>
</view>
<view class="n-item {{item.LimbsTypeScore>=5 && 'active'}}">
<view class="box">{{item.LimbsTypeScore}}</view>
<view class="name">四肢</view>
</view>
<view class="n-item {{item.EyeTypeScore >=5 && 'active'}}">
<view class="box">{{item.EyeTypeScore}}</view>
<view class="name">眼睛</view>
</view>
</view>
</view>
<view class="card-container">
<view class="cc-title">注意事项</view>
<view class="cc-content">
<view class="line" wx:if="{{item.TotalScore < 5}}">
1 总分
<text decode="true ">&lt;</text>
<text class="red">5分</text>
,日常请注意观察
</view>
<view class="line" wx:elif="{{item.TotalScore >= 5}}">
1 总分
<text decode="true ">&gt;=</text>
<text class="red">5分</text>
,您的症状控制欠佳,建议必要时就医
</view>
<block wx:if="{{item.LastTotalScore !== null}}">
<view class="line" wx:if="{{item.TotalScore - item.LastTotalScore < 0 }}">
2 较上次得分变化
<text class="green">{{item.TotalScore - item.LastTotalScore }},有进步,加油!</text>
</view>
<view class="line" wx:elif="{{item.TotalScore - item.LastTotalScore == 0 }}">
2 与上次得分一致,请继续保持
</view>
<view class="line" wx:elif="{{item.TotalScore - item.LastTotalScore == 1 }}">
2 较上次得分变化
<text class="red">+{{item.TotalScore - item.LastTotalScore }},请继续关注!</text>
</view>
<view class="line" wx:elif="{{item.TotalScore - item.LastTotalScore >= 0 }}">
2 较上次得分变化
<text class="red">+{{item.TotalScore - item.LastTotalScore }},需要重点关注!</text>
</view>
</block>
<view class="line" wx:if="{{item.EyeTypeScore / item.TotalScore < 0.5}}">
{{item.LastTotalScore === null ? 2 : 3}} 您的眼肌类占比
<text decode="true ">&lt;</text>
50%,以全身症状为主,应注意休息警惕病情加重
</view>
<view class="line" wx:elif="{{item.EyeTypeScore / item.TotalScore > 0.5}}">
{{item.LastTotalScore === null ? 2 : 3}} 您的眼肌类占比
<text decode="true ">&gt;</text>
50%,危象风险不高,请继续关注
</view>
<view class="line" wx:elif="{{item.EyeTypeScore / item.TotalScore == 0.5}}">
{{item.LastTotalScore === null ? 2 : 3}} 您的眼肌类占比=50%,危象风险不高,请继续关注
</view>
</view>
<view class="fold" wx:if="{{item.ResultsImgUrl}}">
<view class="fold-header" catch:tap="handleFold" data-index="{{index}}">
{{item.fold ? '展开':'收起'}}详细评测报告
<van-icon name="arrow-{{!item.fold ? 'up' : 'down'}}" />
</view>
<view class="fold-container {{item.fold && 'hide'}}">
<!-- <image class="fold-img" mode="widthFix" src="{{item.ResultsImgUrl}}" show-menu-by-longpress></image> -->
<view class="scurt">
<view class="s-header">
<view class="none"></view>
<view
class="bar"
style="background: url({{imageUrl}}za-images/1/adl-scurt.png?t={{Timestamp}}) no-repeat center / 100% 100% ;"
>
<view class="num">0分</view>
<view class="num">1分</view>
<view class="num">2分</view>
<view class="num">3分</view>
</view>
</view>
<view class="s-body">
<view class="s-aside">
<view class="sa-item sa-item1">延髓</view>
<view class="sa-item sa-item2">呼吸</view>
<view class="sa-item sa-item3">四肢</view>
<view class="sa-item sa-item4">眼肌</view>
</view>
<view class="s-container">
<view class="sc-row" wx:for="{{tableData}}" wx:for-item="subItem" wx:key="index">
<view class="sc-title">{{subItem.title}}</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 0}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 1}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 2}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 3}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class="drug-card"
wx:if="{{item.SteroidDailyDose}}"
bind:tap="handleAdlDetail"
data-id="{{item.Id}}"
data-isi="{{item.IsInsuranceProject}}"
data-index="{{index}}"
>
<view class="d-header">
<view class="name">激素用量</view>
<view class="status">
本次激素用量为
<text class="num">{{item.SteroidDailyDose}}mg</text>
/天
</view>
</view>
<view class="content" wx:if="{{item.SteroidDailyDose>5}}">距离达标还需努力,请遵医嘱规律治疗</view>
<view class="content" wx:else>恭喜达标,您的激素用量已少于95% 的患友</view>
</view>
</view>
</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view> </view>
<view class="content">{{detail.HasTedSurgeryName}}</view>
</view> </view>
</view> </view>
<view class="edc-card" bind:tap="handleEDC">
<image wx:if="{{detail.IsEDC==1}}" class="icon" src="{{imageUrl}}icon50.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon66.png?t={{Timestamp}}"></image>
<view class="content">标识为EDC患者</view>
</view>
<view class="footer">
<view class="btn" bind:tap="handleSend">发消息</view>
<view class="btn" bind:tap="handleRemark">备注</view>
</view>
</view> </view>
<van-popup <van-popup
@ -578,11 +186,3 @@
</view> </view>
</view> </view>
</van-popup> </van-popup>
<toast
bind:cancel="handleToastCancel"
bind:ok="handleToastOk"
show="{{toastShow}}"
type="{{toastType}}"
params="{{toastParams}}"
></toast>

57
src/pages/d_userInfo/index.scss

@ -2,48 +2,21 @@ page {
background: #f2f4f5; background: #f2f4f5;
} }
.page { .page {
padding: 164rpx 30rpx 40rpx; padding: 32rpx 30rpx 40rpx;
.container { .container {
position: relative; position: relative;
padding: 92rpx 30rpx 64rpx; padding: 0 32rpx 64rpx;
background: #ffffff; background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
.avatar {
position: absolute;
top: -90rpx;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.avatar-user {
flex-shrink: 0;
width: 156rpx;
height: 156rpx;
border-radius: 50%;
}
.edit {
margin-top: -15rpx;
padding: 8rpx 24rpx;
background: #f2f4f5;
border-radius: 108rpx 108rpx 108rpx 108rpx;
font-size: 24rpx;
color: rgba(40, 48, 49, 1);
display: flex;
align-items: center;
line-height: 1;
.icon {
margin-right: 8rpx;
width: 24rpx;
height: 24rpx;
}
}
}
.row { .row {
margin-top: 64rpx; padding: 32rpx 0;
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid rgba(173, 172, 178, 0.1);
&:last-of-type {
border: none;
}
.label { .label {
flex-shrink: 0; flex-shrink: 0;
font-size: 32rpx; font-size: 32rpx;
@ -51,16 +24,24 @@ page {
width: 6em; width: 6em;
} }
.switch-row { .switch-row {
flex: 1;
display: flex; display: flex;
justify-content: flex-end;
.switch { .switch {
transform: scale(0.8); transform: scale(0.8);
} }
} }
.avatar {
flex: 1;
.avatar-user {
width: 156rpx;
height: 156rpx;
border-radius: 50%;
}
}
.content { .content {
flex: 1; flex: 1;
font-size: 32rpx; font-size: 32rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
} }
.option { .option {
flex-shrink: 0; flex-shrink: 0;
@ -68,7 +49,7 @@ page {
align-items: center; align-items: center;
.change { .change {
font-size: 32rpx; font-size: 32rpx;
color: rgba(98, 190, 208, 1); color: rgba(185, 130, 255, 1);
} }
.icon { .icon {
color: #d4d9da; color: #d4d9da;

116
src/pages/d_userInfo/index.ts

@ -1,4 +1,4 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
Page({ Page({
data: { data: {
@ -57,9 +57,9 @@ Page({
onLoad() {}, onLoad() {},
onShow() { onShow() {
app.waitLogin({ type: [2] }).then((_res) => { app.waitLogin({ type: [2] }).then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPERSONALINFO' }); app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPERSONALINFO' })
this.getDetail(); this.getDetail()
}); })
}, },
getDetail() { getDetail() {
wx.ajax({ wx.ajax({
@ -67,28 +67,28 @@ Page({
url: '?r=zd/doctor/account/info', url: '?r=zd/doctor/account/info',
data: {}, data: {},
}).then((res) => { }).then((res) => {
const { ClinicList } = this.data; const { ClinicList } = this.data
let weekName = ''; let weekName = ''
if (res.doctor.ClinicType == 2) { if (res.doctor.ClinicType == 2) {
weekName = res.doctor.Clinic; weekName = res.doctor.Clinic
} else { } else {
(res.doctor.Clinic ? res.doctor.Clinic : []).forEach((subItem: any) => { ;(res.doctor.Clinic ? res.doctor.Clinic : []).forEach((subItem: any) => {
if (subItem.timeType == 1) { if (subItem.timeType == 1) {
ClinicList[subItem.weekday - 1].timeTypeActive1 = true; ClinicList[subItem.weekday - 1].timeTypeActive1 = true
} }
if (subItem.timeType == 2) { if (subItem.timeType == 2) {
ClinicList[subItem.weekday - 1].timeTypeActive2 = true; ClinicList[subItem.weekday - 1].timeTypeActive2 = true
} }
}); })
weekName = (res.doctor.Clinic ? res.doctor.Clinic : []) weekName = (res.doctor.Clinic ? res.doctor.Clinic : [])
.map((subItem: { weekday: string | number; timeType: string | number }) => { .map((subItem: { weekday: string | number; timeType: string | number }) => {
const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']; const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
const timeDay = { 1: '上午', 2: '下午' }; const timeDay = { 1: '上午', 2: '下午' }
return `${week[Number(subItem.weekday) - 1]}${timeDay[subItem.timeType]}`; return `${week[Number(subItem.weekday) - 1]}${timeDay[subItem.timeType]}`
}) })
.join(','); .join(',')
} }
this.setData({ this.setData({
@ -99,68 +99,68 @@ Page({
}, },
hospital: res.hospital, hospital: res.hospital,
ClinicList, ClinicList,
}); })
}); })
}, },
handleChangeClinicType(e) { handleChangeClinicType(e) {
const value = e.detail.value; const value = e.detail.value
if (value) { if (value) {
this.setData({ this.setData({
'doctor.ClinicType': 2, 'doctor.ClinicType': 2,
'doctor.Clinic': '', 'doctor.Clinic': '',
'doctor.weekName': '', 'doctor.weekName': '',
}); })
} else { } else {
this.setData({ this.setData({
'doctor.ClinicType': 1, 'doctor.ClinicType': 1,
'doctor.Clinic': [], 'doctor.Clinic': [],
'doctor.weekName': '', 'doctor.weekName': '',
}); })
} }
this.handleWeekIntroduceSubmit(); this.handleWeekIntroduceSubmit()
}, },
handleChangePhone() { handleChangePhone() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOCHANGEPHONE' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOCHANGEPHONE' })
wx.navigateTo({ wx.navigateTo({
url: '/doctor/pages/d_changePhone/index', url: '/doctor/pages/d_changePhone/index',
}); })
}, },
handleWeek() { handleWeek() {
const { doctor } = this.data; const { doctor } = this.data
this.setData({ this.setData({
PopupClinic: Array.isArray(doctor.Clinic) ? '' : doctor.Clinic, PopupClinic: Array.isArray(doctor.Clinic) ? '' : doctor.Clinic,
popupDateShow: true, popupDateShow: true,
}); })
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
popupDateFocus: true, popupDateFocus: true,
}); })
}, 300); }, 300)
}, },
handleWeekSelect(e) { handleWeekSelect(e) {
const { type, index } = e.currentTarget.dataset; const { type, index } = e.currentTarget.dataset
const ClinicList = this.data.ClinicList; const ClinicList = this.data.ClinicList
ClinicList[index][`timeTypeActive${type}`] = !ClinicList[index][`timeTypeActive${type}`]; ClinicList[index][`timeTypeActive${type}`] = !ClinicList[index][`timeTypeActive${type}`]
this.setData({ this.setData({
ClinicList, ClinicList,
}); })
}, },
handleWeekIntroduceSubmit() { handleWeekIntroduceSubmit() {
const { doctor, PopupClinic } = this.data; const { doctor, PopupClinic } = this.data
let Clinic = ''; let Clinic = ''
if (doctor.ClinicType == 2) { if (doctor.ClinicType == 2) {
Clinic = PopupClinic; Clinic = PopupClinic
} else { } else {
const ClinicList = this.data.ClinicList; const ClinicList = this.data.ClinicList
Clinic = ClinicList.reduce((pre, cur) => { Clinic = ClinicList.reduce((pre, cur) => {
if (cur.timeTypeActive1) { if (cur.timeTypeActive1) {
pre.push({ weekday: cur.weekday, timeType: 1 }); pre.push({ weekday: cur.weekday, timeType: 1 })
} }
if (cur.timeTypeActive2) { if (cur.timeTypeActive2) {
pre.push({ weekday: cur.weekday, timeType: 2 }); pre.push({ weekday: cur.weekday, timeType: 2 })
} }
return pre; return pre
}, [] as any); }, [] as any)
} }
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -171,25 +171,25 @@ Page({
ClinicType: doctor.ClinicType, ClinicType: doctor.ClinicType,
}, },
}).then(() => { }).then(() => {
this.onClose(); this.onClose()
}); })
}, },
handleBrief() { handleBrief() {
this.setData({ this.setData({
popupBriefShow: true, popupBriefShow: true,
}); })
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
popupBriefFocus: true, popupBriefFocus: true,
}); })
}, 300); }, 300)
}, },
handleBriefInput(e) { handleBriefInput(e) {
const doctor = this.data.doctor; const doctor = this.data.doctor
doctor.Introduce = e.detail.value; doctor.Introduce = e.detail.value
this.setData({ this.setData({
doctor, doctor,
}); })
}, },
onClose() { onClose() {
this.setData({ this.setData({
@ -197,14 +197,14 @@ Page({
popupBriefShow: false, popupBriefShow: false,
popupBriefFocus: false, popupBriefFocus: false,
popupDateFocus: false, popupDateFocus: false,
}); })
this.getDetail(); this.getDetail()
}, },
handleSwitch() { handleSwitch() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOSWITCHACCOUNT' }); app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOSWITCHACCOUNT' })
wx.navigateTo({ wx.navigateTo({
url: '/doctor/pages/d_changeDoctor/index', url: '/doctor/pages/d_changeDoctor/index',
}); })
}, },
handleLoginOut() { handleLoginOut() {
wx.showModal({ wx.showModal({
@ -217,15 +217,15 @@ Page({
url: '?r=zd/doctor/account/reg-logout', url: '?r=zd/doctor/account/reg-logout',
data: {}, data: {},
}).then((_res) => { }).then((_res) => {
app.globalData.loginType = 1; app.globalData.loginType = 1
app.globalData.anyWhere = true; app.globalData.anyWhere = true
app.globalData.first = true; app.globalData.first = true
wx.reLaunch({ wx.reLaunch({
url: '/pages/login/index', url: '/pages/login/index',
}); })
}); })
} }
}, },
}); })
}, },
}); })

16
src/pages/d_userInfo/index.wxml

@ -1,11 +1,11 @@
<view class="page"> <view class="page">
<view class="container"> <view class="container">
<view class="avatar"> <view class="row">
<image class="avatar-user" mode="aspectFill" src="{{doctor.Img}}"></image> <view class="label">头像</view>
<!-- <view class="edit"> --> <view class="avatar">
<!-- <image class="icon" src="{{imageUrl}}/doctor/icon-edit.png?t={{Timestamp}}"></image> --> <image class="avatar-user" mode="aspectFill" src="{{doctor.Img}}"></image>
<!-- 更换 --> </view>
<!-- </view> --> <view class="option"></view>
</view> </view>
<view class="row"> <view class="row">
<view class="label">姓名</view> <view class="label">姓名</view>
@ -28,7 +28,7 @@
<switch <switch
class="switch" class="switch"
checked="{{doctor.ClinicType==2}}" checked="{{doctor.ClinicType==2}}"
color="#67baca" color="#b683fe"
bind:change="handleChangeClinicType" bind:change="handleChangeClinicType"
></switch> ></switch>
</view> </view>
@ -36,12 +36,10 @@
<view class="row" bind:tap="handleWeek"> <view class="row" bind:tap="handleWeek">
<view class="label">门诊时间</view> <view class="label">门诊时间</view>
<view class="content pre-line">{{doctor.weekName || '暂无'}}</view> <view class="content pre-line">{{doctor.weekName || '暂无'}}</view>
<view class="option"><van-icon class="icon" name="arrow" /></view>
</view> </view>
<view class="row" bind:tap="handleBrief"> <view class="row" bind:tap="handleBrief">
<view class="label">个人简介</view> <view class="label">个人简介</view>
<view class="content">{{doctor.Introduce || '暂无'}}</view> <view class="content">{{doctor.Introduce || '暂无'}}</view>
<view class="option"><van-icon class="icon" name="arrow" /></view>
</view> </view>
</view> </view>
<!-- <view class="switch-btn" bind:tap="handleSwitch">切换账号</view> --> <!-- <view class="switch-btn" bind:tap="handleSwitch">切换账号</view> -->

51
src/pages/home/index.scss

@ -57,6 +57,57 @@ page {
} }
} }
} }
.stat {
margin-top: 48rpx;
.s-header {
.title {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
}
}
.s-container {
margin-top: 24rpx;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 30rpx;
.card {
padding: 32rpx;
background-color: #fff;
border-radius: 24rpx;
display: flex;
gap: 22rpx;
.icon {
width: 84rpx;
height: 84rpx;
}
.content {
.text {
display: flex;
align-items: center;
gap: 8rpx;
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
line-height: 36rpx;
.question {
width: 28rpx;
height: 28rpx;
}
}
.num {
margin-top: 16rpx;
font-size: 48rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
.sub {
font-size: 24rpx;
color: rgba(173, 172, 178, 1);
}
}
}
}
}
}
.banner { .banner {
margin-top: 50rpx; margin-top: 50rpx;
display: grid; display: grid;

184
src/pages/home/index.ts

@ -1,6 +1,6 @@
import dayjs from 'dayjs'; import dayjs from 'dayjs'
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
Page({ Page({
data: { data: {
@ -39,18 +39,18 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin({ type: [2] }).then(() => { app.waitLogin({ type: [2] }).then(() => {
this.getNotice(); this.getNotice()
this.getBanner(); this.getBanner()
this.getBriefingList(); this.getBriefingList()
this.getSopList(); this.getSopList()
this.getList(); this.getList()
app.getUserInfo(2).then((userInfo) => { app.getUserInfo(2).then((userInfo) => {
this.setData({ this.setData({
userInfo, userInfo,
}); })
this.getTab(); this.getTab()
}); })
}); })
}, },
getTab() { getTab() {
wx.ajax({ wx.ajax({
@ -66,19 +66,19 @@ Page({
close: true, close: true,
...this.data.userInfo, ...this.data.userInfo,
}, },
}); })
} }
}); })
}, },
handleWebview() { handleWebview() {
// wx.showToast({ // wx.showToast({
// title: '访问路径:公众号“TED关爱中心”底部菜单栏', // title: '访问路径:公众号“TED关爱中心”底部菜单栏',
// icon: 'none', // icon: 'none',
// }); // });
const encodeUrl = encodeURIComponent('https://dct.meddb.cn'); const encodeUrl = encodeURIComponent('https://dct.meddb.cn')
wx.navigateTo({ wx.navigateTo({
url: `/pages/webview/index?url=${encodeUrl}`, url: `/pages/webview/index?url=${encodeUrl}`,
}); })
}, },
getNotice() { getNotice() {
wx.ajax({ wx.ajax({
@ -87,49 +87,49 @@ Page({
data: {}, data: {},
}).then((res) => { }).then((res) => {
if (res.list.length) { if (res.list.length) {
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: res.list[0].Id }); app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: res.list[0].Id })
} }
this.setData({ this.setData({
notice: res.list.map((item) => { notice: res.list.map((item) => {
item.year = dayjs(item.PublishDate).format('YYYY'); item.year = dayjs(item.PublishDate).format('YYYY')
item.month = dayjs(item.PublishDate).format('MM'); item.month = dayjs(item.PublishDate).format('MM')
item.day = dayjs(item.PublishDate).format('DD'); item.day = dayjs(item.PublishDate).format('DD')
return item; return item
}), }),
}); })
}); })
}, },
handleNotice() { handleNotice() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/message/index', url: '/pages/message/index',
}); })
}, },
handleNoticeDetail(e) { handleNoticeDetail(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
const { Id, Url } = this.data.notice[index]; const { Id, Url } = this.data.notice[index]
app.mpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id }); app.mpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id })
if (Url) { if (Url) {
wx.navigateTo({ wx.navigateTo({
url: Url, url: Url,
fail() { fail() {
wx.reLaunch({ wx.reLaunch({
url: Url, url: Url,
}); })
}, },
}); })
} else { } else {
this.handleNotice(); this.handleNotice()
} }
}, },
handleSwiperChange(e) { handleSwiperChange(e) {
const current = e.detail.current; const current = e.detail.current
this.setData({ this.setData({
current: e.detail.current, current: e.detail.current,
}); })
const { Id } = this.data.notice[current] || {}; const { Id } = this.data.notice[current] || {}
if (Id) { if (Id) {
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id }); app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id })
} }
}, },
getBanner() { getBanner() {
@ -142,21 +142,21 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
bannerList: res.list, bannerList: res.list,
}); })
}); })
}, },
handleBanner(e) { handleBanner(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
const { LinkUrl } = this.data.bannerList[index]; const { LinkUrl } = this.data.bannerList[index]
if (!LinkUrl) return; if (!LinkUrl) return
wx.navigateTo({ wx.navigateTo({
url: LinkUrl, url: LinkUrl,
fail() { fail() {
wx.switchTab({ wx.switchTab({
url: LinkUrl, url: LinkUrl,
}); })
}, },
}); })
}, },
getBriefingList() { getBriefingList() {
wx.ajax({ wx.ajax({
@ -168,12 +168,12 @@ Page({
}, },
}).then((res) => { }).then((res) => {
res.list.forEach((item) => { res.list.forEach((item) => {
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD'); item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD')
}); })
this.setData({ this.setData({
briefingList: res.list, briefingList: res.list,
}); })
}); })
}, },
getSopList() { getSopList() {
wx.ajax({ wx.ajax({
@ -185,12 +185,12 @@ Page({
}, },
}).then((res) => { }).then((res) => {
res.list.forEach((item) => { res.list.forEach((item) => {
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD'); item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD')
}); })
this.setData({ this.setData({
sopList: res.list, sopList: res.list,
}); })
}); })
}, },
getList() { getList() {
wx.ajax({ wx.ajax({
@ -202,44 +202,44 @@ Page({
}, },
}).then((res) => { }).then((res) => {
res.list.forEach((item) => { res.list.forEach((item) => {
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD'); item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD')
item.FileType = item.FileList[0]?.FileType || ''; item.FileType = item.FileList[0]?.FileType || ''
}); })
this.setData({ this.setData({
list: res.list, list: res.list,
}); })
}); })
}, },
handleBriefingDetail(e: any) { handleBriefingDetail(e: any) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset
wx.navigateTo({ wx.navigateTo({
url: `/pages/informationDetail/index?id=${id}`, url: `/pages/informationDetail/index?id=${id}`,
}); })
}, },
handleSop(e) { handleSop(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
const { Id, FileList } = this.data.sopList[index]; const { Id, FileList } = this.data.sopList[index]
const params: any = FileList[0]; const params: any = FileList[0]
if (!params) { if (!params) {
return; return
} }
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask: true, mask: true,
}); })
app.mpBehavior({ PositionId: '1', OperateType: '2', OperateId: Id as string }); app.mpBehavior({ PositionId: '1', OperateType: '2', OperateId: Id as string })
this.handleFile(params); this.handleFile(params)
}, },
handleDetail(e: any) { handleDetail(e: any) {
const { id, index } = e.currentTarget.dataset; const { id, index } = e.currentTarget.dataset
const params = this.data.list[index]; const params = this.data.list[index]
if (params.ContentType === '5' && params.FileList[0]) { if (params.ContentType === '5' && params.FileList[0]) {
app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string }); app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string })
this.handleFile(params.FileList[0]); this.handleFile(params.FileList[0])
} else { } else {
wx.navigateTo({ wx.navigateTo({
url: `/pages/informationDetail/index?id=${id}`, url: `/pages/informationDetail/index?id=${id}`,
}); })
} }
}, },
handleFile({ FileUrl, FileName }) { handleFile({ FileUrl, FileName }) {
@ -252,43 +252,49 @@ Page({
showMenu: false, showMenu: false,
filePath: res.filePath, filePath: res.filePath,
success: () => { success: () => {
wx.hideLoading(); wx.hideLoading()
}, },
fail: () => { fail: () => {
wx.showToast({ wx.showToast({
title: '下载文件失败', title: '下载文件失败',
icon: 'none', icon: 'none',
}); })
wx.hideLoading(); wx.hideLoading()
}, },
}); })
} else { } else {
wx.hideLoading(); wx.hideLoading()
wx.showToast({ wx.showToast({
title: '下载文件失败', title: '下载文件失败',
icon: 'none', icon: 'none',
}); })
} }
}, },
fail() { fail() {
wx.hideLoading(); wx.hideLoading()
wx.showToast({ wx.showToast({
title: '下载文件失败', title: '下载文件失败',
icon: 'none', icon: 'none',
}); })
}, },
}); })
}, },
handleMore() { handleMore() {
wx.switchTab({ wx.switchTab({
url: '/pages/information/index', url: '/pages/information/index',
}); })
},
handlePatient() {
wx.navigateTo({
url: '/pages/d_patient/index',
})
}, },
handlePopupOk() { handlePopupOk() {
const { popupType } = this.data; const { popupType } = this.data
}, },
handlePopupCancel() { handlePopupCancel() {
const { popupType } = this.data; const { popupType } = this.data
if (popupType === 'popup1') { if (popupType === 'popup1') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -299,28 +305,28 @@ Page({
popupShow: false, popupShow: false,
popupType: '', popupType: '',
popupParams: {}, popupParams: {},
}); })
}); })
return; return
} }
this.setData({ this.setData({
popupShow: false, popupShow: false,
}); })
}, },
onShareAppMessage(e) { onShareAppMessage(e) {
if (e.from === 'button') { if (e.from === 'button') {
const { Title, CoverImgUrl, Id } = e.target.dataset.params; const { Title, CoverImgUrl, Id } = e.target.dataset.params
app.mpBehavior({ PositionId: '1', OperateType: '3', OperateId: Id }); app.mpBehavior({ PositionId: '1', OperateType: '3', OperateId: Id })
return { return {
title: Title, title: Title,
path: `/pages/informationDetail/index?id=${Id}`, path: `/pages/informationDetail/index?id=${Id}`,
imageUrl: CoverImgUrl, imageUrl: CoverImgUrl,
}; }
} }
return { return {
imageUrl: `${app.globalData.imageUrl}share.png?t=${this.data.Timestamp}`, imageUrl: `${app.globalData.imageUrl}share.png?t=${this.data.Timestamp}`,
}; }
}, },
}); })
export {}; export {}

63
src/pages/home/index.wxml

@ -143,6 +143,65 @@
</view> </view>
</view> </view>
</view> </view>
<view class="stat" bind:tap="handlePatient">
<view class="s-header">
<view class="title">统计数据截止到昨天</view>
</view>
<view class="s-container">
<view class="card">
<image class="icon" src="{{imageUrl}}icon52.png?t={{Timestamp}}"></image>
<view class="content">
<view class="text">
总病例数
<image class="question" src="{{imageUrl}}icon46.png?t={{Timestamp}}"></image>
</view>
<view class="num">
100
<text class="sub">人</text>
</view>
</view>
</view>
<view class="card">
<image class="icon" src="{{imageUrl}}icon53.png?t={{Timestamp}}"></image>
<view class="content">
<view class="text">
总病例数
<image class="question" src="{{imageUrl}}icon46.png?t={{Timestamp}}"></image>
</view>
<view class="num">
10
<text class="sub">人</text>
</view>
</view>
</view>
<view class="card">
<image class="icon" src="{{imageUrl}}icon45.png?t={{Timestamp}}"></image>
<view class="content">
<view class="text">
总病例数
<image class="question" src="{{imageUrl}}icon46.png?t={{Timestamp}}"></image>
</view>
<view class="num">
100
<text class="sub">人</text>
</view>
</view>
</view>
<view class="card">
<image class="icon" src="{{imageUrl}}icon54.png?t={{Timestamp}}"></image>
<view class="content">
<view class="text">
总病例数
<image class="question" src="{{imageUrl}}icon46.png?t={{Timestamp}}"></image>
</view>
<view class="num">
100
<text class="sub">人</text>
</view>
</view>
</view>
</view>
</view>
<view class="ad" wx:if="{{bannerList.length > 0}}"> <view class="ad" wx:if="{{bannerList.length > 0}}">
<swiper <swiper
class="swiper" class="swiper"
@ -165,10 +224,6 @@
<view class="briefing" wx:if="{{briefingList.length > 0}}"> <view class="briefing" wx:if="{{briefingList.length > 0}}">
<view class="b-header"> <view class="b-header">
<image class="title" src="{{imageUrl}}title4.png?t={{Timestamp}}"></image> <image class="title" src="{{imageUrl}}title4.png?t={{Timestamp}}"></image>
<!-- <view class="more"> -->
<!-- 查看全部 -->
<!-- <van-icon name="arrow" /> -->
<!-- </view> -->
</view> </view>
<view class="scroll"> <view class="scroll">
<image <image

96
src/pages/login/index.ts

@ -1,5 +1,5 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
let timer = null as null | number; let timer = null as null | number
Page({ Page({
data: { data: {
@ -19,22 +19,22 @@ Page({
}, },
onLoad() {}, onLoad() {},
getCode() { getCode() {
if (timer) return; if (timer) return
const mobile = this.data.mobile; const mobile = this.data.mobile
if (!mobile) { if (!mobile) {
wx.showToast({ wx.showToast({
title: '手机号不能为空', title: '手机号不能为空',
icon: 'none', icon: 'none',
}); })
return; return
} }
// 验证手机号 // 验证手机号
if (!/^1[3-9,]\d{9}$/.test(mobile)) { if (!/^1[3-9,]\d{9}$/.test(mobile)) {
wx.showToast({ wx.showToast({
title: '手机号格式不正确', title: '手机号格式不正确',
icon: 'none', icon: 'none',
}); })
return; return
} }
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -46,56 +46,56 @@ Page({
wx.showToast({ wx.showToast({
icon: 'none', icon: 'none',
title: '验证码已发送~', title: '验证码已发送~',
}); })
let time = 60; let time = 60
timer = setInterval(() => { timer = setInterval(() => {
time--; time--
this.setData({ this.setData({
codeText: `${time}s后重新发送`, codeText: `${time}s后重新发送`,
}); })
if (time <= 0) { if (time <= 0) {
clearInterval(timer as number); clearInterval(timer as number)
timer = null; timer = null
this.setData({ this.setData({
codeText: '发送验证码', codeText: '发送验证码',
}); })
} }
}, 1000); }, 1000)
}); })
}, },
handleCheck() { handleCheck() {
this.setData({ this.setData({
check1: !this.data.check1, check1: !this.data.check1,
}); })
}, },
handleDocRule() { handleDocRule() {
const { check1 } = this.data; const { check1 } = this.data
return new Promise((resolve) => { return new Promise((resolve) => {
if (check1) { if (check1) {
return resolve(true); return resolve(true)
} }
wx.showToast({ wx.showToast({
title: '请同意相关协议', title: '请同意相关协议',
icon: 'none', icon: 'none',
}); })
}); })
}, },
async handleSubmit() { async handleSubmit() {
await this.handleDocRule(); await this.handleDocRule()
const { mobile, code } = this.data; const { mobile, code } = this.data
if (!mobile) { if (!mobile) {
wx.showToast({ wx.showToast({
title: '请输入手机号', title: '请输入手机号',
icon: 'none', icon: 'none',
}); })
return; return
} }
if (!code) { if (!code) {
wx.showToast({ wx.showToast({
title: '请输入验证码', title: '请输入验证码',
icon: 'none', icon: 'none',
}); })
return; return
} }
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -107,21 +107,21 @@ Page({
showMsg: false, showMsg: false,
}) })
.then(() => { .then(() => {
this.submitCallback(); this.submitCallback()
}) })
.catch((err) => { .catch((err) => {
if (err.data.code == 100) { if (err.data.code == 100) {
this.handleShowPopup(); this.handleShowPopup()
} else if (err.data.msg) { } else if (err.data.msg) {
wx.showToast({ wx.showToast({
title: err.data.msg, title: err.data.msg,
icon: 'none', icon: 'none',
}); })
} }
}); })
}, },
handleWxSubmit(e: WechatMiniprogram.CustomEvent) { handleWxSubmit(e: WechatMiniprogram.CustomEvent) {
const { iv, encryptedData } = e.detail; const { iv, encryptedData } = e.detail
if (iv && encryptedData) { if (iv && encryptedData) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -133,18 +133,18 @@ Page({
showMsg: false, showMsg: false,
}) })
.then(() => { .then(() => {
this.submitCallback(); this.submitCallback()
}) })
.catch((err) => { .catch((err) => {
if (err.data.code == 100) { if (err.data.code == 100) {
this.handleShowPopup(); this.handleShowPopup()
} else if (err.data.msg) { } else if (err.data.msg) {
wx.showToast({ wx.showToast({
title: err.data.msg, title: err.data.msg,
icon: 'none', icon: 'none',
}); })
} }
}); })
} }
}, },
submitCallback() { submitCallback() {
@ -153,19 +153,19 @@ Page({
if (res.loginType == 2) { if (res.loginType == 2) {
wx.reLaunch({ wx.reLaunch({
url: '/pages/home/index', url: '/pages/home/index',
}); })
} else { } else {
this.handleShowPopup(); this.handleShowPopup()
} }
} else { } else {
this.handleShowPopup(); this.handleShowPopup()
} }
}); })
}, },
handlePatient() { handlePatient() {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/login/index', url: '/patient/pages/login/index',
}); })
}, },
handleShowPopup() { handleShowPopup() {
this.setData({ this.setData({
@ -174,23 +174,23 @@ Page({
popupParams: { popupParams: {
close: true, close: true,
}, },
}); })
}, },
handleShowTel() { handleShowTel() {
this.setData({ this.setData({
showTel: !this.data.showTel, showTel: !this.data.showTel,
}); })
}, },
handleLink() { handleLink() {
wx.navigateTo({ wx.navigateTo({
url: '/doc/pages/doc1/index', url: '/doc/pages/doc1/index',
}); })
}, },
handlePopupCancel() { handlePopupCancel() {
this.setData({ this.setData({
popupShow: false, popupShow: false,
}); })
}, },
}); })
export {}; export {}

8
src/pages/my/index.scss

@ -44,7 +44,7 @@ page {
font-size: 24rpx; font-size: 24rpx;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
padding: 2rpx 10rpx; padding: 2rpx 10rpx;
background: #8c75d0; background: linear-gradient(90deg, #ffd650 0%, #f8a61a 100%);
border-radius: 8rpx 8rpx 8rpx 8rpx; border-radius: 8rpx 8rpx 8rpx 8rpx;
} }
} }
@ -55,6 +55,12 @@ page {
height: 48rpx; height: 48rpx;
} }
} }
.invite-card {
margin-top: 48rpx;
display: block;
width: 100%;
max-height: 200rpx;
}
.list { .list {
margin-top: 32rpx; margin-top: 32rpx;
padding: 0 32rpx; padding: 0 32rpx;

66
src/pages/my/index.ts

@ -1,4 +1,4 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
Page({ Page({
data: { data: {
@ -15,20 +15,20 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin({ type: [2] }).then(() => { app.waitLogin({ type: [2] }).then(() => {
this.getUserInfo(); this.getUserInfo()
}); })
}, },
getUserInfo() { getUserInfo() {
app.getUserInfo(2).then((userInfo) => { app.getUserInfo(2).then((userInfo) => {
this.setData({ this.setData({
userInfo, userInfo,
}); })
}); })
}, },
handleLogin() { handleLogin() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/login/index', url: '/pages/login/index',
}); })
}, },
handleLoginOut() { handleLoginOut() {
wx.showModal({ wx.showModal({
@ -44,31 +44,31 @@ Page({
app.startLogin(() => { app.startLogin(() => {
wx.reLaunch({ wx.reLaunch({
url: '/pages/start/index', url: '/pages/start/index',
}); })
}); })
}); })
} }
}, },
}); })
}, },
handleEditUser() { handleEditUser() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/userInfo/index', url: '/pages/userInfo/index',
}); })
}, },
onChooseAvatar(e) { onChooseAvatar(e) {
const { avatarUrl } = e.detail; const { avatarUrl } = e.detail
const url = `${app.globalData.upFileUrl}?r=file-service/upload-img`; const url = `${app.globalData.upFileUrl}?r=file-service/upload-img`
wx.showLoading({ wx.showLoading({
title: '上传中', title: '上传中',
}); })
wx.uploadFile({ wx.uploadFile({
url, url,
filePath: avatarUrl, filePath: avatarUrl,
name: 'file', name: 'file',
success: (res) => { success: (res) => {
const data = JSON.parse(res.data); const data = JSON.parse(res.data)
const avatarUrl = data.data.Url; const avatarUrl = data.data.Url
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=xd/doctor/index/update-doctor-img', url: '?r=xd/doctor/index/update-doctor-img',
@ -77,28 +77,28 @@ Page({
}, },
}) })
.then(() => { .then(() => {
wx.hideLoading(); wx.hideLoading()
wx.showToast({ wx.showToast({
title: '头像更新成功!', title: '头像更新成功!',
icon: 'none', icon: 'none',
}); })
this.setData({ this.setData({
'userInfo.Img': avatarUrl, 'userInfo.Img': avatarUrl,
}); })
}) })
.catch(() => { .catch(() => {
wx.hideLoading(); wx.hideLoading()
}); })
}, },
fail() { fail() {
wx.hideLoading(); wx.hideLoading()
}, },
}); })
}, },
handleDoc() { handleDoc() {
wx.navigateTo({ wx.navigateTo({
url: '/doc/pages/doc1/index', url: '/doc/pages/doc1/index',
}); })
}, },
handlePublic() { handlePublic() {
this.setData({ this.setData({
@ -107,7 +107,7 @@ Page({
popupParams: { popupParams: {
close: true, close: true,
}, },
}); })
}, },
handleQuestion() { handleQuestion() {
this.setData({ this.setData({
@ -116,11 +116,21 @@ Page({
popupParams: { popupParams: {
close: true, close: true,
}, },
}); })
},
handleUserInfo() {
wx.navigateTo({
url: '/pages/d_userInfo/index',
})
}, },
handlePopupCancel() { handlePopupCancel() {
this.setData({ this.setData({
popupShow: false, popupShow: false,
}); })
},
handleInvite() {
wx.navigateTo({
url: '/pages/d_invite/index',
})
}, },
}); })

11
src/pages/my/index.wxml

@ -1,8 +1,7 @@
<navbar fixed title="我的" custom-style="background:{{background}}" back> <navbar fixed title="我的" custom-style="background:{{background}}" back></navbar>
</navbar>
<view <view
class="page" class="page"
style="background: url('{{imageUrl}}bg1.png?t={{Timestamp}}') no-repeat top center/100% 602rpx;padding-top:{{pageTop+21}}px;" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+21}}px;"
> >
<view class="user"> <view class="user">
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar"> <button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
@ -17,7 +16,13 @@
</view> </view>
<!-- <image class="edit" src="{{imageUrl}}icon2.png?t={{Timestamp}}"></image> --> <!-- <image class="edit" src="{{imageUrl}}icon2.png?t={{Timestamp}}"></image> -->
</view> </view>
<image class="invite-card" mode="widthFix" src="{{imageUrl}}invite-card.png?t={{Timestamp}}" bind:tap="handleInvite"></image>
<view class="list"> <view class="list">
<view class="list-item" bind:tap="handleUserInfo">
<image class="icon" src="{{imageUrl}}icon51.png?t={{Timestamp}}"></image>
<view class="content">个人信息</view>
<image class="more" src="{{imageUrl}}icon3?t={{Timestamp}}"></image>
</view>
<view class="list-item" bind:tap="handleDoc"> <view class="list-item" bind:tap="handleDoc">
<image class="icon" src="{{imageUrl}}icon4.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon4.png?t={{Timestamp}}"></image>
<view class="content">隐私协议</view> <view class="content">隐私协议</view>

4
src/pages/start/index.scss

@ -0,0 +1,4 @@
.page{
width: 100vw;
height: 100vh;
}

1
src/pages/start/index.wxml

@ -0,0 +1 @@
<image class="page" mode="aspectFill" src="{{imageUrl}}start.png?t={{Timestamp}}"></image>

2
src/patient/pages/adlResult/index.ts

@ -200,7 +200,7 @@ Page({
wx.showModal({ wx.showModal({
title: '确认重新测试?', title: '确认重新测试?',
content: '重新测试后,此次评测结果将自动删除', content: '重新测试后,此次评测结果将自动删除',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
wx.ajax({ wx.ajax({

2
src/patient/pages/adlShare/index.ts

@ -64,7 +64,7 @@ Page({
wx.showModal({ wx.showModal({
title: '请求授权相册权限', title: '请求授权相册权限',
content: '需要保存海报到相册,请确认授权', content: '需要保存海报到相册,请确认授权',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success (res) { success (res) {
if (res.cancel) { if (res.cancel) {
//取消授权 //取消授权

1
src/patient/pages/cancellation/index.scss

@ -27,6 +27,7 @@ page {
border-radius: 24rpx; border-radius: 24rpx;
color: rgba(173, 172, 178, 1); color: rgba(173, 172, 178, 1);
background-color: #fff; background-color: #fff;
text-align: left;
} }
.footer { .footer {
margin-top: 80rpx; margin-top: 80rpx;

2
src/patient/pages/cancellation/index.ts

@ -21,7 +21,7 @@ Page({
wx.showModal({ wx.showModal({
title: '确认注销', title: '确认注销',
content: '', content: '',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
wx.ajax({ wx.ajax({

2
src/patient/pages/cancellation/index.wxml

@ -1,7 +1,7 @@
<view class="page"> <view class="page">
<view class="container"> <view class="container">
<view class="banner"> <view class="banner">
<image class="icon" src="/images/icon44.png"></image> <image class="icon" src="{{imageUrl}}icon44.png?t={{Timestamp}}"></image>
<view class="title">注销后数据不可恢复 请谨慎操作</view> <view class="title">注销后数据不可恢复 请谨慎操作</view>
<view class="tip"> <view class="tip">
注销账号后,系统会删除当前患者的全部信息和数据,包括基础信息数据,患者的健康记录数据,若您有亲友号绑定此患者,则亲友号也将同步自动注销。您注销后若重新注册,则为全新身份在平台内使用,原有的数据无法恢复。 注销账号后,系统会删除当前患者的全部信息和数据,包括基础信息数据,患者的健康记录数据,若您有亲友号绑定此患者,则亲友号也将同步自动注销。您注销后若重新注册,则为全新身份在平台内使用,原有的数据无法恢复。

179
src/patient/pages/certReslove/index.scss

@ -1,90 +1,89 @@
.page { .page {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
.bg { .bg {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
} }
.page-container { .page-container {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.navbar { .navbar {
flex-shrink: 0; flex-shrink: 0;
padding: 0 20rpx 0; padding: 0 20rpx 0;
display: flex; display: flex;
align-items: center; align-items: center;
.icon { .icon {
font-size: 40rpx; font-size: 40rpx;
margin-right: 40rpx; margin-right: 40rpx;
} }
.num { .num {
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
border-radius: 50%; border-radius: 50%;
border: 3rpx solid #e04876; border: 3rpx solid #e04876;
text-align: center; text-align: center;
line-height: 64rpx; line-height: 64rpx;
margin-right: 24rpx; margin-right: 24rpx;
font-size: 40rpx; font-size: 40rpx;
color: #e04876; color: #e04876;
font-weight: bold; font-weight: bold;
&.active { &.active {
background-color: #e04876; background-color: #e04876;
color: #fff; color: #fff;
} }
} }
} }
.page-icon { .page-icon {
margin: 240rpx auto 0; margin: 240rpx auto 0;
display: block; display: block;
width: 280rpx; width: 280rpx;
height: 280rpx; height: 280rpx;
border-radius: 50%; border-radius: 50%;
} }
.page-title { .page-title {
margin-top: 64rpx; margin-top: 64rpx;
font-size: 56rpx; font-size: 56rpx;
color: #333333; color: #333333;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
} }
.sub-title { .sub-title {
margin-top: 32rpx; margin-top: 32rpx;
font-size: 32rpx; font-size: 32rpx;
color: #aaaaaa; color: #aaaaaa;
text-align: center; text-align: center;
} }
.footer { .footer {
position: absolute; position: absolute;
left: 64rpx; left: 64rpx;
bottom: 62rpx; bottom: 62rpx;
flex-shrink: 0; flex-shrink: 0;
width: 622rpx; width: 622rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
> view:not(:last-of-type), > view:not(:last-of-type),
> image { > image {
margin-right: 30rpx; margin-right: 30rpx;
} }
.next { .next {
flex: 1; flex: 1;
text-align: center; text-align: center;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
text-align: center; text-align: center;
border: 2rpx solid #e04775; border-radius: 100rpx;
border-radius: 24rpx; font-size: 34rpx;
font-size: 34rpx; font-weight: bold;
font-weight: bold; background: linear-gradient( 197deg, #FFBCF9 0%, #B982FF 100%);
background-color: #e04775; color: #fff;
color: #fff; }
} }
} }
} }
}

96
src/patient/pages/certReslove/index.ts

@ -1,48 +1,48 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>();
let timer = null as null | number; let timer = null as null | number;
Page({ Page({
data: { data: {
message: "3秒后自动进入", message: "3秒后自动进入",
drug: false, drug: false,
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
drug: Boolean(options.drug), drug: Boolean(options.drug),
}); });
}, },
onReady() { onReady() {
setTimeout(() => { setTimeout(() => {
let time = 3; let time = 3;
timer = setInterval(() => { timer = setInterval(() => {
time--; time--;
this.setData({ this.setData({
message: time + "秒后自动进入", message: time + "秒后自动进入",
}); });
if (time === 0) { if (time === 0) {
clearInterval(timer as number); clearInterval(timer as number);
timer = null; timer = null;
this.setData({ this.setData({
message: "1秒后自动进入", message: "1秒后自动进入",
}); });
this.handleSubmit(); this.handleSubmit();
} }
}, 1000); }, 1000);
}, 1000); }, 1000);
}, },
handleSubmit() { handleSubmit() {
if (this.data.message != "1秒后自动进入") return; if (this.data.message != "1秒后自动进入") return;
if (app.globalData.backPage) { if (app.globalData.backPage) {
wx.reLaunch({ wx.reLaunch({
url: app.globalData.backPage, url: app.globalData.backPage,
}); });
app.globalData.backPage = null; app.globalData.backPage = null;
return; return;
} }
const backPage = app.globalData.backPage; const backPage = app.globalData.backPage;
app.globalData.backPage = ""; app.globalData.backPage = "";
wx.reLaunch({ wx.reLaunch({
url: backPage || "/patient/pages/index/index", url: backPage || "/patient/pages/index/index",
}); });
}, },
}); });

2
src/patient/pages/certReslove/index.wxml

@ -1,6 +1,6 @@
<view class="page"> <view class="page">
<!-- <image class="bg" mode="widthFix" src="{{imageUrl}}za-images/1/login-mask-bg.png?t={{Timestamp}}"></image> --> <!-- <image class="bg" mode="widthFix" src="{{imageUrl}}za-images/1/login-mask-bg.png?t={{Timestamp}}"></image> -->
<image class="bg" mode="aspectFill" src="{{imageUrl}}za-images/1/start.png?t={{Timestamp}}"></image> <image class="bg" mode="aspectFill" src="{{imageUrl}}start.png?t={{Timestamp}}"></image>
<view class="page-container"> <view class="page-container">
<!-- <pageNavbar drug="{{drug}}"></pageNavbar> --> <!-- <pageNavbar drug="{{drug}}"></pageNavbar> -->
<!-- <image class="page-icon" src="{{imageUrl}}za-images/1/cert-reslove.png?t={{Timestamp}}"></image> --> <!-- <image class="page-icon" src="{{imageUrl}}za-images/1/cert-reslove.png?t={{Timestamp}}"></image> -->

2
src/patient/pages/doctor/index.ts

@ -93,7 +93,7 @@ Page({
wx.showModal({ wx.showModal({
title: '请求授权当前位置', title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权', content: '需要获取您的地理位置,请确认授权',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success(res) { success(res) {
if (res.cancel) { if (res.cancel) {
//取消授权 //取消授权

11
src/patient/pages/doctorDetail/index.scss

@ -29,10 +29,14 @@ page {
font-weight: bold; font-weight: bold;
line-height: 48rpx; line-height: 48rpx;
.label { .label {
margin-left: 10rpx;
display: inline; display: inline;
font-weight: normal; font-weight: normal;
font-size: 28rpx; font-size: 28rpx;
color: rgba(105, 104, 110, 1); color: rgba(105, 104, 110, 1);
.line {
margin: 0 6rpx;
}
} }
} }
.hostipal { .hostipal {
@ -44,7 +48,7 @@ page {
margin-right: 12rpx; margin-right: 12rpx;
display: inline-block; display: inline-block;
flex-shrink: 0; flex-shrink: 0;
padding: 4rpx 12rpx; padding: 2rpx 12rpx;
font-size: 22rpx; font-size: 22rpx;
color: #fff; color: #fff;
border-radius: 8rpx; border-radius: 8rpx;
@ -81,14 +85,15 @@ page {
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
.r-title { .r-title {
width: 128rpx; width: 116rpx;
height: 32rpx; height: 42rpx;
} }
.r-content { .r-content {
margin-top: 16rpx; margin-top: 16rpx;
font-size: 28rpx; font-size: 28rpx;
color: rgba(105, 104, 110, 1); color: rgba(105, 104, 110, 1);
line-height: 44rpx; line-height: 44rpx;
white-space: pre-line;
} }
} }
} }

2
src/patient/pages/doctorDetail/index.ts

@ -38,7 +38,7 @@ Page({
wx.showModal({ wx.showModal({
title: '请求授权当前位置', title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权', content: '需要获取您的地理位置,请确认授权',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success(res) { success(res) {
if (res.cancel) { if (res.cancel) {
//取消授权 //取消授权

21
src/patient/pages/doctorDetail/index.wxml

@ -11,14 +11,17 @@
</view> </view>
<view class="name"> <view class="name">
{{detail.Name}} {{detail.Name}}
<view class="label">主任医生 | 眼科</view> <view class="label">
{{detail.JobTitle}}
<text class="line" wx:if="{{detail.JobTitle && detail.Department}}">|</text>
{{detail.Department}}
</view>
</view> </view>
<view class="hostipal"> <view class="hostipal">
<view class="tag">三级甲等</view> <view class="tag" wx:if="{{detail.hospital.HospitalClassificationName || detail.hospital.HospitalLevelName}}">
{{detail.hospital.HospitalClassificationName}}{{detail.hospital.HospitalLevelName}}
</view>
{{detail.hospital.Name}} {{detail.hospital.Name}}
<!-- <view class="tag" wx:if="{{detail.hospital.HospitalClassificationName || detail.hospital.HospitalLevelName}}"> -->
<!-- {{detail.hospital.HospitalClassificationName}}{{detail.hospital.HospitalLevelName}} -->
<!-- </view> -->
</view> </view>
<view class="card"> <view class="card">
<view <view
@ -26,25 +29,25 @@
bind:tap="handleOpenMap" bind:tap="handleOpenMap"
wx:if="{{detail.hospital.ProvinceName || detail.hospital.CityName || detail.hospital.CountyName || detail.hospital.Address}}" wx:if="{{detail.hospital.ProvinceName || detail.hospital.CityName || detail.hospital.CountyName || detail.hospital.Address}}"
> >
<image class="icon" src="/images/icon41.png"></image> <image class="icon" src="{{imageUrl}}icon41.png?t={{Timestamp}}"></image>
<view> <view>
{{detail.hospital.ProvinceName}}{{detail.hospital.CityName}}{{detail.hospital.CountyName}}{{detail.hospital.Address}} {{detail.hospital.ProvinceName}}{{detail.hospital.CityName}}{{detail.hospital.CountyName}}{{detail.hospital.Address}}
<view class="site-num">{{detail.hospital.dist}}</view> <view class="site-num">{{detail.hospital.dist}}</view>
</view> </view>
</view> </view>
<view class="c-row" bind:tap="handlePhone" wx:if="{{ detail.Telephone }}"> <view class="c-row" bind:tap="handlePhone" wx:if="{{ detail.Telephone }}">
<image class="icon" src="/images/icon42.png"></image> <image class="icon" src="{{imageUrl}}icon42.png?t={{Timestamp}}"></image>
{{ detail.Telephone }} {{ detail.Telephone }}
</view> </view>
</view> </view>
</view> </view>
<view class="info-card" wx:if="{{detail.Introduce}}"> <view class="info-card" wx:if="{{detail.Introduce}}">
<image class="r-title" src="{{imageUrl}}za-images//doctor/my-title1.png?t={{Timestamp}}"></image> <image class="r-title" src="{{imageUrl}}title8.png?t={{Timestamp}}"></image>
<view class="r-content">{{detail.Introduce}}</view> <view class="r-content">{{detail.Introduce}}</view>
</view> </view>
<view class="info-card" wx:if="{{detail.weekName}}"> <view class="info-card" wx:if="{{detail.weekName}}">
<image class="r-title" src="{{imageUrl}}za-images//doctor/my-title2.png?t={{Timestamp}}"></image> <image class="r-title" src="{{imageUrl}}title9.png?t={{Timestamp}}"></image>
<view class="r-content pre-line">{{detail.weekName}}</view> <view class="r-content pre-line">{{detail.weekName}}</view>
</view> </view>
</view> </view>

6
src/patient/pages/enterInfo/index.scss

@ -133,7 +133,7 @@
flex: 1; flex: 1;
padding: 12rpx 62rpx; padding: 12rpx 62rpx;
opacity: 1; opacity: 1;
border: 2rpx solid #cccccc; border: 2rpx solid rgba(246, 248, 249, 1);
font-size: 32rpx; font-size: 32rpx;
color: rgba(173, 172, 178, 1); color: rgba(173, 172, 178, 1);
display: flex; display: flex;
@ -163,10 +163,12 @@
justify-content: center; justify-content: center;
border-radius: 150rpx; border-radius: 150rpx;
box-sizing: border-box; box-sizing: border-box;
border: 2rpx solid #d2d2d2; border: 2rpx solid rgba(246, 248, 249, 1);
background-color: rgba(246, 248, 249, 1);
&.active { &.active {
color: rgba(185, 130, 255, 1); color: rgba(185, 130, 255, 1);
border-color: rgba(185, 130, 255, 1); border-color: rgba(185, 130, 255, 1);
background-color: transparent;
} }
} }
} }

48
src/patient/pages/enterInfo/index.ts

@ -10,6 +10,8 @@ Page({
ageRange: '', ageRange: '',
diagnosisTime: '', diagnosisTime: '',
diagnoseType: '', diagnoseType: '',
IsGraves: '',
HasTedSurgery: '',
diagnoseTypeShow: false, diagnoseTypeShow: false,
DiagnoseType: app.globalData.DiagnoseType, DiagnoseType: app.globalData.DiagnoseType,
@ -21,13 +23,16 @@ Page({
submiting: false, submiting: false,
proces: '0', proces: '0',
dict: {},
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
pagePath: options.page, pagePath: options.page,
proces: options.proces, proces: options.proces,
}) })
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => { app.waitLogin().then(() => {
this.getDict()
app.getZdUserInfo(this, true, (zdUserInfo) => { app.getZdUserInfo(this, true, (zdUserInfo) => {
this.setData({ this.setData({
relationType: zdUserInfo.RelationType || '1', relationType: zdUserInfo.RelationType || '1',
@ -39,6 +44,17 @@ Page({
app.zdMpBehavior({ PageName: 'PG_PATIENTINFOENTRY' }) app.zdMpBehavior({ PageName: 'PG_PATIENTINFOENTRY' })
}) })
}, },
getDict() {
wx.ajax({
method: 'GET',
url: '?r=xd/user/get-dict',
data: {},
}).then((res) => {
this.setData({
dict: res,
})
})
},
handleRelationType(e: WechatMiniprogram.CustomEvent) { handleRelationType(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset
this.setData({ this.setData({
@ -57,10 +73,22 @@ Page({
ageRange: id, ageRange: id,
}) })
}, },
handleSelectIsGraves(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset
this.setData({
IsGraves: id,
})
},
handleSelectHasTedSurgery(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset
this.setData({
HasTedSurgery: id,
})
},
handleSubmit() { handleSubmit() {
if (this.data.submiting) return if (this.data.submiting) return
app.zdMpBehavior({ PageName: 'BTN_PATIENTINFONEXT' }) app.zdMpBehavior({ PageName: 'BTN_PATIENTINFONEXT' })
const { name, gender, ageRange, relationType } = this.data const { name, gender, ageRange, relationType, IsGraves, HasTedSurgery } = this.data
const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData
const { doctorId, inviteChan } = app.globalData.scene const { doctorId, inviteChan } = app.globalData.scene
let toast = '' let toast = ''
@ -95,6 +123,8 @@ Page({
registrationSource, registrationSource,
registChannel, registChannel,
regBusinessId, regBusinessId,
IsGraves,
HasTedSurgery,
WorkerId, WorkerId,
inviteDoctorId: doctorId, inviteDoctorId: doctorId,
inviteChannel: inviteChan, inviteChannel: inviteChan,
@ -117,6 +147,20 @@ Page({
}) })
}) })
}, },
handleVisitors() {
wx.ajax({
method: 'POST',
url: '?r=zd/login/reg-logout',
data: {},
showMsg: false,
}).then(() => {
app.startLogin(() => {
wx.reLaunch({
url: '/patient/pages/index/index',
})
})
})
},
handleBack() { handleBack() {
wx.navigateBack({ wx.navigateBack({
fail() { fail() {

54
src/patient/pages/enterInfo/index.wxml

@ -1,20 +1,18 @@
<view class="page"> <view class="page">
<navbar fixed title="录入信息" custom-style="background:{{background}}"> <navbar fixed title="录入信息" custom-style="background:{{background}}"></navbar>
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" /> <image class="bg" src="{{imageUrl}}bg10.png?t={{Timestamp}}"></image>
</navbar>
<image class="bg" src="/images/bg10.png"></image>
<view class="page-container" style="padding-top:{{pageTop+24}}px;"> <view class="page-container" style="padding-top:{{pageTop+24}}px;">
<view class="content"> <view class="content">
<view class="switch"> <view class="switch">
<view class="item {{relationType==1 && 'active'}}" bind:tap="handleRelationType" data-id="1"> <view class="item {{relationType==1 && 'active'}}" bind:tap="handleRelationType" data-id="1">
<view class="icon-wrap"> <view class="icon-wrap">
<image class="icon" src="/images/icon28.png"></image> <image class="icon" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
</view> </view>
<view class="name">患者本人</view> <view class="name">患者本人</view>
</view> </view>
<view class="item {{relationType==2 && 'active'}}" bind:tap="handleRelationType" data-id="2"> <view class="item {{relationType==2 && 'active'}}" bind:tap="handleRelationType" data-id="2">
<view class="icon-wrap"> <view class="icon-wrap">
<image class="icon" src="/images/icon29.png"></image> <image class="icon" src="{{imageUrl}}icon29.png?t={{Timestamp}}"></image>
</view> </view>
<view class="name">患者亲友</view> <view class="name">患者亲友</view>
</view> </view>
@ -35,48 +33,64 @@
<view class="item {{gender==2 && 'active'}}" bind:tap="handleGender" data-id="2"> <view class="item {{gender==2 && 'active'}}" bind:tap="handleGender" data-id="2">
<image <image
class="icon" class="icon"
src="{{imageUrl}}za-images/1/woman{{gender==2 ? '-active' : ''}}.png?t={{Timestamp}}" src="{{imageUrl}}{{gender==2 ? 'icon57' : 'icon55'}}.png?t={{Timestamp}}"
></image> ></image>
女性用户 女性用户
</view> </view>
<view class="item {{gender==1 && 'active'}}" bind:tap="handleGender" data-id="1"> <view class="item {{gender==1 && 'active'}}" bind:tap="handleGender" data-id="1">
<image <image
class="icon" class="icon"
src="{{imageUrl}}za-images/1/man{{gender==1 ? '-active' : ''}}.png?t={{Timestamp}}" src="{{imageUrl}}{{gender==1 ? 'icon58' : 'icon56'}}.png?t={{Timestamp}}"
></image> ></image>
男性用户 男性用户
</view> </view>
</view> </view>
<view class="row-title">患者年龄范围</view> <view class="row-title">患者年龄范围</view>
<view class="row row-age"> <view class="row row-age">
<view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">18岁以下</view> <view
<view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">18岁-44岁</view> class="age-item {{ageRange==index && 'active'}}"
<view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">45岁-59岁</view> data-id="{{index}}"
<view class="age-item {{ageRange==3 && 'active'}}" data-id="3" bind:tap="handleSelectAge">60岁-74岁</view> wx:for="{{dict.AgeRange}}"
<view class="age-item {{ageRange==4 && 'active'}}" data-id="4" bind:tap="handleSelectAge">75岁以上</view> wx:key="index"
bind:tap="handleSelectAge"
>
{{item}}
</view>
</view> </view>
<view class="row-title"> <view class="row-title">
是否有Graves病病史 是否有Graves病病史
<div class="sub">(非必填)</div> <div class="sub">(非必填)</div>
</view> </view>
<view class="row row-age"> <view class="row row-age">
<view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">是</view> <view
<view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">否</view> class="age-item {{IsGraves==index && 'active'}}"
<view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">不确定</view> data-id="{{index}}"
wx:for="{{dict.IsGraves}}"
wx:key="index"
bind:tap="handleSelectIsGraves"
>
{{item}}
</view>
</view> </view>
<view class="row-title"> <view class="row-title">
是否有TED(甲状腺眼突)及其相关眼部手术史 是否有TED(甲状腺眼突)及其相关眼部手术史
<div class="sub">(非必填)</div> <div class="sub">(非必填)</div>
</view> </view>
<view class="row row-age"> <view class="row row-age">
<view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">是</view> <view
<view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">否</view> class="age-item {{HasTedSurgery==index && 'active'}}"
<view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">不确定</view> data-id="{{index}}"
wx:for="{{dict.HasTedSurgery}}"
wx:key="index"
bind:tap="handleSelectHasTedSurgery"
>
{{item}}
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<view bind:tap="handleSubmit" class="next">立即进入</view> <view bind:tap="handleSubmit" class="next">立即进入</view>
<view bind:tap="handleBack" class="cancel">取消</view> <view bind:tap="handleVisitors" class="cancel">随便看看</view>
</view> </view>
</view> </view>

2
src/patient/pages/hospital/index.ts

@ -45,7 +45,7 @@ Page({
wx.showModal({ wx.showModal({
title: '请求授权当前位置', title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权', content: '需要获取您的地理位置,请确认授权',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success(res) { success(res) {
if (res.cancel) { if (res.cancel) {
//取消授权 //取消授权

1
src/patient/pages/index/index.json

@ -2,6 +2,7 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"pageNavbar": "/components/pageNavbar/index", "pageNavbar": "/components/pageNavbar/index",
"navbar": "/components/navbar/index",
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"toast": "/components/toast/index", "toast": "/components/toast/index",
"referralFrom": "/components/referralFrom/index", "referralFrom": "/components/referralFrom/index",

13
src/patient/pages/index/index.scss

@ -3,13 +3,14 @@ page {
background-color: rgba(246, 248, 249, 1); background-color: rgba(246, 248, 249, 1);
} }
.page-title {
width: 226rpx;
height: 33rpx;
}
.page { .page {
position: relative; position: relative;
min-height: 100vh; min-height: 100vh;
.page-container { .page-container {
position: absolute;
left: 0;
top: 0;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 180rpx; padding-bottom: 180rpx;
@ -115,7 +116,7 @@ page {
font-size: 22rpx; font-size: 22rpx;
line-height: 1; line-height: 1;
color: #ffffff; color: #ffffff;
background: linear-gradient( 90deg, #FFD650 0%, #F8A61A 100%); background: linear-gradient(90deg, #ffd650 0%, #f8a61a 100%);
line-height: 24rpx; line-height: 24rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx; border-radius: 8rpx 8rpx 8rpx 8rpx;
} }
@ -208,7 +209,7 @@ page {
padding: 32rpx 0; padding: 32rpx 0;
background: #ffffff; background: #ffffff;
display: flex; display: flex;
border-bottom: 1px dotted rgba(39, 58, 101, 0.2); border-bottom: 1px dotted rgba(39, 58, 101, 0.2);
&:last-of-type { &:last-of-type {
border: none; border: none;
} }
@ -317,7 +318,7 @@ page {
justify-content: space-between; justify-content: space-between;
.title { .title {
font-size: 32rpx; font-size: 32rpx;
color: #474747; color: rgba(33, 29, 46, 1);
font-weight: bold; font-weight: bold;
} }
.more { .more {

93
src/patient/pages/index/index.ts

@ -80,7 +80,6 @@ Page({
zdUserInfo, zdUserInfo,
publicCard: zdUserInfo.isShowFollowGuide == 1, publicCard: zdUserInfo.isShowFollowGuide == 1,
}) })
this.getPopup()
this.getConfig(zdUserInfo) this.getConfig(zdUserInfo)
this.getSystemConfig() this.getSystemConfig()
if (zdUserInfo.ExclusiveDoctorId > 0) { if (zdUserInfo.ExclusiveDoctorId > 0) {
@ -178,98 +177,6 @@ Page({
}) })
}) })
}, },
async getPopup() {
const data5 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: {
Type: 5,
},
})
if (data5.showAlert) {
this.setData({
toastShow: data5.showAlert,
toastType: 'doubleStandards',
toastParams: data5,
})
return
}
const data4 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: {
Type: 4,
},
})
if (data4.showAlert) {
this.setData({
toastShow: data4.showAlert,
toastType: 'vipScan',
toastParams: {},
})
return
}
const data1 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: { Type: 1 },
})
if (!Array.isArray(data1)) {
this.setData({
toastShow: true,
toastType: 'healthCare',
toastParams: data1,
})
return
}
const data2 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: {
Type: 2,
},
})
if (data2.showAlert && this.data.zdUserInfo.UserType == 4) {
this.setData({
toastShow: data2.showAlert,
toastType: 'aldAlert',
toastParams: {
id: data2.articleId,
},
})
}
const data3 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: {
Type: 6,
},
})
if (data3.showAlert) {
this.setData({
toastShow: data3.showAlert,
toastType: 'dedicatedDoctor',
toastParams: {},
})
}
const data6 = await wx.ajax({
method: 'GET',
url: '?r=zd/re-visit/get-popup-show-status',
})
if (data6.showStatus === 1) {
this.setData({
toastShow: true,
toastType: 'referral-toast',
toastParams: {},
})
}
},
setPopupInfo() { setPopupInfo() {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',

8
src/patient/pages/index/index.wxml

@ -1,9 +1,11 @@
<navbar custom-style="background:{{background}}" fixed>
<image class="page-title" slot="left" src="{{imageUrl}}title7.png?t={{Timestamp}}"></image>
</navbar>
<view <view
class="page" class="page"
style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop}}px;"
> >
<view class="page-container"> <view class="page-container">
<pageNavbar></pageNavbar>
<!-- style="background: url({{imageUrl}}za-images/2/doctor-home{{theme === 'DRUG' ? '-drug':''}}-bg.png?t={{Timestamp}}) no-repeat 16rpx 9rpx/606rpx 173rpx,{{theme === 'DRUG'? 'linear-gradient( 360deg, #25D9C8 0%, #25D9C8 73%, #B5EFEA 100%)':'linear-gradient( 360deg, #CF5375 0%, #CF5375 74%, #EE9FB9 100%) no-repeat top center/100% 100%'}}" --> <!-- style="background: url({{imageUrl}}za-images/2/doctor-home{{theme === 'DRUG' ? '-drug':''}}-bg.png?t={{Timestamp}}) no-repeat 16rpx 9rpx/606rpx 173rpx,{{theme === 'DRUG'? 'linear-gradient( 360deg, #25D9C8 0%, #25D9C8 73%, #B5EFEA 100%)':'linear-gradient( 360deg, #CF5375 0%, #CF5375 74%, #EE9FB9 100%) no-repeat top center/100% 100%'}}" -->
<view <view
class="doctor" class="doctor"
@ -111,7 +113,7 @@
<view class="c-footer"> <view class="c-footer">
<view class="date">{{item.BeginTime}}</view> <view class="date">{{item.BeginTime}}</view>
<view class="btn"> <view class="btn">
<image class="icon" src="/images/icon30.png"></image> <image class="icon" src="{{imageUrl}}icon30.png?t={{Timestamp}}"></image>
{{item.Status==2?'参会':'查看'}} {{item.Status==2?'参会':'查看'}}
</view> </view>
</view> </view>

2
src/patient/pages/interactivePatient/index.scss

@ -108,7 +108,7 @@ page {
gap: 16rpx; gap: 16rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.order { .order {
margin-top: 6rpx; margin-top: 8rpx;
flex-shrink: 0; flex-shrink: 0;
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;

6
src/patient/pages/interactivePatient/index.wxml

@ -6,12 +6,12 @@
<view <view
class="page" class="page"
style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
> >
<view class="page-header" bind:tap="handleDoctorDetail"> <view class="page-header" bind:tap="handleDoctorDetail">
<image class="avatar" mode="aspectFill" src="{{doctorDetail.doctorAvatar}}"></image> <image class="avatar" mode="aspectFill" src="{{doctorDetail.doctorAvatar}}"></image>
<view class="wrap"> <view class="wrap">
<view class="naem">{{doctorDetail.doctorName}}</view> <view class="name">{{doctorDetail.doctorName}}</view>
<view class="content"> <view class="content">
{{doctorDetail.hospitalName}} {{doctorDetail.hospitalName}}
<view class="tag">{{doctorDetail.hospitalClassificationName}}{{doctorDetail.hospitalLevelName}}</view> <view class="tag">{{doctorDetail.hospitalClassificationName}}{{doctorDetail.hospitalLevelName}}</view>
@ -184,7 +184,7 @@
<view class="order">{{index+1}}</view> <view class="order">{{index+1}}</view>
<view class="content">{{item.question}}</view> <view class="content">{{item.question}}</view>
<view class="icon-wrap"> <view class="icon-wrap">
<image class="icon" src="/images/icon38.png"></image> <image class="icon" src="{{imageUrl}}icon38.png?t={{Timestamp}}"></image>
</view> </view>
</view> </view>
</view> </view>

2
src/patient/pages/live/index.ts

@ -124,7 +124,7 @@ Page({
wx.showModal({ wx.showModal({
title: '请求授权当前位置', title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权', content: '需要获取您的地理位置,请确认授权',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success(res) { success(res) {
if (res.cancel) { if (res.cancel) {
//取消授权 //取消授权

12
src/patient/pages/live/index.wxml

@ -1,13 +1,11 @@
<navbar fixed title="大咖说" custom-style="background:{{background}}"> <navbar fixed title="大咖说" custom-style="background:{{background}}" z-index="10"></navbar>
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view <view
class="page" class="page"
style="--name:#e04775;--tag-bg:rgba(224, 71, 117, 0.13);background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;" style="--name:#e04775;--tag-bg:rgba(224, 71, 117, 0.13);background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
> >
<view class="search"> <view class="search">
<image class="icon" src="{{imageUrl}}za-images/1/search.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon48.png?t={{Timestamp}}"></image>
<input <input
class="input" class="input"
model:value="{{Search}}" model:value="{{Search}}"
@ -47,8 +45,8 @@
</view> </view>
<view class="inner"> <view class="inner">
<view class="title">{{item.Name}}</view> <view class="title">{{item.Name}}</view>
<view class="labels" wx:if="{{item.doctorName}}"> <view class="labels" wx:if="{{item.DoctorName}}">
{{item.doctorName}} {{item.DoctorName}}
<text class="line" wx:if="{{item.MasterHosipital}}"></text> <text class="line" wx:if="{{item.MasterHosipital}}"></text>
{{item.MasterHosipital}} {{item.MasterHosipital}}
</view> </view>

7
src/patient/pages/liveDetail/index.scss

@ -158,8 +158,10 @@
position: fixed; position: fixed;
right: 14rpx; right: 14rpx;
bottom: 264rpx; bottom: 264rpx;
width: 104rpx; width: 84rpx;
height: 104rpx; height: 84rpx;
box-shadow: 0 4rpx 24rpx 0 rgba(51, 5, 109, 0.17);
border-radius: 50%;
} }
.custom-popup { .custom-popup {
@ -180,3 +182,4 @@
text-align: center; text-align: center;
} }
} }

2
src/patient/pages/liveDetail/index.ts

@ -232,7 +232,7 @@ Page({
wx.showModal({ wx.showModal({
title: '请求授权相册权限', title: '请求授权相册权限',
content: '需要保存海报到相册,请确认授权', content: '需要保存海报到相册,请确认授权',
confirmColor: '#cf5375', confirmColor: '#8c75d0',
success(res) { success(res) {
if (res.cancel) { if (res.cancel) {
//取消授权 //取消授权

8
src/patient/pages/liveDetail/index.wxml

@ -4,7 +4,7 @@
<view <view
class="page" class="page"
style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
> >
<image class="banner" mode="aspectFill" src="{{detail.IntroductionUrl}}"></image> <image class="banner" mode="aspectFill" src="{{detail.IntroductionUrl}}"></image>
<view class="page-container"> <view class="page-container">
@ -13,11 +13,11 @@
<view class="date">2025.7.15</view> <view class="date">2025.7.15</view>
<view class="stat"> <view class="stat">
<view class="s-item" wx:if="{{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}"> <view class="s-item" wx:if="{{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}">
<image class="icon" src="/images/icon40.png"></image> <image class="icon" src="{{imageUrl}}icon40.png?t={{Timestamp}}"></image>
{{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}次 {{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}次
</view> </view>
<view class="s-item" bind:tap="handleShare" wx:if="{{detail.ShareNum}}"> <view class="s-item" bind:tap="handleShare" wx:if="{{detail.ShareNum}}">
<image class="icon" src="/images/icon39.png"></image> <image class="icon" src="{{imageUrl}}icon39.png?t={{Timestamp}}"></image>
{{detail.ShareNum}}次 {{detail.ShareNum}}次
</view> </view>
</view> </view>
@ -120,7 +120,7 @@
<image <image
class="fixed-share" class="fixed-share"
wx:if="{{detail.PosterUrl}}" wx:if="{{detail.PosterUrl}}"
src="{{imageUrl}}za-images/1/fixed-share.png?t={{Timestamp}}" src="{{imageUrl}}icon67.png?t={{Timestamp}}"
bind:tap="handleShare" bind:tap="handleShare"
></image> ></image>

9
src/patient/pages/liveResult/index.ts

@ -74,6 +74,15 @@ Page({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}) })
}, },
handleBack() {
wx.navigateBack({
fail: () => {
wx.reLaunch({
url: '/pages/start/index',
})
},
})
},
onShareAppMessage() { onShareAppMessage() {
return { return {
title: this.data.detail.ActivityName, title: this.data.detail.ActivityName,

4
src/patient/pages/liveResult/index.wxml

@ -2,10 +2,10 @@
<van-icon name="arrow-left" slot="left" color="background=='#FFFFFF'?'#000':'#fff'" bind:tap="handleBack" /> <van-icon name="arrow-left" slot="left" color="background=='#FFFFFF'?'#000':'#fff'" bind:tap="handleBack" />
</navbar> </navbar>
<!-- padding-top:{{pageTop+22}}px; --> <!-- padding-top:{{pageTop+22}}px; -->
<view class="page" style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx"> <view class="page" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx">
<view class="bg"></view> <view class="bg"></view>
<view class="page-container" style="top:{{pageTop+30}}px;"> <view class="page-container" style="top:{{pageTop+30}}px;">
<image class="badge" mode="aspectFit" src="/images/icon43.png"></image> <image class="badge" mode="aspectFit" src="{{imageUrl}}icon43.png?t={{Timestamp}}"></image>
<view class="status">报名成功</view> <view class="status">报名成功</view>
<view class="tip">欢迎您参与此次活动</view> <view class="tip">欢迎您参与此次活动</view>
<view class="container"> <view class="container">

105
src/patient/pages/login/index.ts

@ -1,5 +1,5 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
let timer = null as null | number; let timer = null as null | number
Page({ Page({
data: { data: {
@ -15,28 +15,28 @@ Page({
onLoad(options: any) { onLoad(options: any) {
this.setData({ this.setData({
page: options.page, page: options.page,
}); })
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => { app.waitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTLOGIN' }); app.zdMpBehavior({ PageName: 'PG_PATIENTLOGIN' })
}); })
}, },
getCode() { getCode() {
if (timer) return; if (timer) return
const mobile = this.data.mobile; const mobile = this.data.mobile
if (!mobile) { if (!mobile) {
wx.showToast({ wx.showToast({
title: '手机号不能为空', title: '手机号不能为空',
icon: 'none', icon: 'none',
}); })
return; return
} }
// 验证手机号 // 验证手机号
if (!/^1[3-9,]\d{9}$/.test(mobile)) { if (!/^1[3-9,]\d{9}$/.test(mobile)) {
wx.showToast({ wx.showToast({
title: '手机号格式不正确', title: '手机号格式不正确',
icon: 'none', icon: 'none',
}); })
return; return
} }
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -48,27 +48,27 @@ Page({
wx.showToast({ wx.showToast({
icon: 'none', icon: 'none',
title: '验证码已发送~', title: '验证码已发送~',
}); })
let time = 60; let time = 60
timer = setInterval(() => { timer = setInterval(() => {
time--; time--
this.setData({ this.setData({
codeText: `${time}s后重新发送`, codeText: `${time}s后重新发送`,
}); })
if (time <= 0) { if (time <= 0) {
clearInterval(timer as number); clearInterval(timer as number)
timer = null; timer = null
this.setData({ this.setData({
codeText: '发送验证码', codeText: '发送验证码',
}); })
} }
}, 1000); }, 1000)
}); })
}, },
handleSubmit() { handleSubmit() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTLOGIN' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTLOGIN' })
const { mobile, code } = this.data; const { mobile, code } = this.data
const { registrationSource, registChannel, regBusinessId } = app.globalData; const { registrationSource, registChannel, regBusinessId } = app.globalData
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/login/reg-login', url: '?r=zd/login/reg-login',
@ -80,13 +80,13 @@ Page({
regBusinessId, regBusinessId,
}, },
}).then((_res) => { }).then((_res) => {
this.submitCallback(); this.submitCallback()
}); })
}, },
handleWxSubmit(e: WechatMiniprogram.CustomEvent) { handleWxSubmit(e: WechatMiniprogram.CustomEvent) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTQUICKPATIENTLOGIN' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTQUICKPATIENTLOGIN' })
const { iv, encryptedData } = e.detail; const { iv, encryptedData } = e.detail
const { registrationSource, registChannel, regBusinessId } = app.globalData; const { registrationSource, registChannel, regBusinessId } = app.globalData
if (iv && encryptedData) { if (iv && encryptedData) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -99,61 +99,58 @@ Page({
regBusinessId, regBusinessId,
}, },
}).then((_res) => { }).then((_res) => {
this.submitCallback(); this.submitCallback()
}); })
} }
}, },
handleWxCheck() { handleWxCheck() {
wx.showToast({ wx.showToast({
icon: 'none', icon: 'none',
title: '请先同意隐私政策', title: '请先同意隐私政策',
}); })
}, },
submitCallback() { submitCallback() {
app.globalData.loginType = 1; app.globalData.loginType = 1
app.globalData.isLogin = 1; app.globalData.isLogin = 1
app.updateLoginInfo((res) => { app.updateLoginInfo((res) => {
const { loginType, isNewReg, isLogin } = res; const { loginType, isNewReg, isLogin } = res
const backPage = app.globalData.backPage; const backPage = app.globalData.backPage
let url = backPage || '/patient/pages/index/index'; let url = backPage || '/patient/pages/index/index'
if (isNewReg === 0) { if (isNewReg === 0) {
url = '/patient/pages/enterInfo/index'; url = '/patient/pages/enterInfo/index'
wx.navigateTo({ wx.navigateTo({
url, url,
}); })
return; return
} }
wx.reLaunch({ wx.reLaunch({
url, url,
}); })
}); })
}, },
handleVisitors() { handleVisitors() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTLOOKAROUND' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTLOOKAROUND' })
app.globalData.anyWhere = true;
app.globalData.first = true;
app.globalData.loginType = 1;
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}); })
}, },
handleDoctor() { handleDoctor() {
wx.reLaunch({ wx.reLaunch({
url: '/pages/login/index', url: '/pages/login/index',
}); })
}, },
handleLink(e: any) { handleLink(e: any) {
const { url } = e.currentTarget.dataset; const { url } = e.currentTarget.dataset
wx.navigateTo({ wx.navigateTo({
url, url,
}); })
}, },
handleCheck(e: any) { handleCheck(e: any) {
const { key } = e.currentTarget.dataset; const { key } = e.currentTarget.dataset
this.setData({ this.setData({
[key]: !this.data[key], [key]: !this.data[key],
}); })
}, },
}); })
export {}; export {}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save