Browse Source

3.0 2-3阶段联调

2.0
kola-web 2 weeks ago
parent
commit
87553b6f01
  1. 4
      package.json
  2. 23
      pnpm-lock.yaml
  3. 4
      src/components/calendar/theme/theme-geneB.wxss
  4. 21
      src/components/popup/index.ts
  5. 20
      src/components/popup/index.wxml
  6. 91
      src/components/uploadFile/index.js
  7. 23
      src/components/uploadFile/index.scss
  8. 27
      src/components/uploadFile/index.wxml
  9. 4
      src/doctor/pages/changeTel/index.wxml
  10. 2
      src/doctor/pages/my/index.ts
  11. BIN
      src/images/doc.png
  12. BIN
      src/images/docx.png
  13. BIN
      src/images/file.png
  14. BIN
      src/images/icon97.png
  15. BIN
      src/images/pdf.png
  16. BIN
      src/images/ppt.png
  17. BIN
      src/images/pptx.png
  18. BIN
      src/images/xls.png
  19. BIN
      src/images/xlsx.png
  20. 14
      src/miniprogram_npm/a-calc/index.js
  21. 1
      src/miniprogram_npm/a-calc/index.js.map
  22. 4
      src/miniprogram_npm/dayjs/index.js
  23. 4
      src/miniprogram_npm/echarts/index.js
  24. 4
      src/miniprogram_npm/number-precision/index.js
  25. 47
      src/patient/pages/bbmRemark/index.ts
  26. 11
      src/patient/pages/bbmRemark/index.wxml
  27. 82
      src/patient/pages/bbmReport/index.ts
  28. 40
      src/patient/pages/bbmReport/index.wxml
  29. 7
      src/patient/pages/course/index.scss
  30. 71
      src/patient/pages/course/index.ts
  31. 81
      src/patient/pages/course/index.wxml
  32. 3
      src/patient/pages/index/index.ts
  33. 76
      src/patient/pages/inhibitorsManage/index.ts
  34. 27
      src/patient/pages/inhibitorsManage/index.wxml
  35. 60
      src/patient/pages/inhibitorsManageList/index.ts
  36. 31
      src/patient/pages/inhibitorsManageList/index.wxml
  37. 130
      src/patient/pages/injectDate/index.ts
  38. 8
      src/patient/pages/injectDate/index.wxml
  39. 49
      src/patient/pages/preDiagnosisReport/index.ts
  40. 82
      src/patient/pages/preDiagnosisReport/index.wxml
  41. 6
      src/patient/pages/userInfo/index.ts
  42. 2
      src/patient/pages/userInfo/index.wxml

4
package.json

@ -12,11 +12,11 @@ @@ -12,11 +12,11 @@
"dependencies": {
"@miniprogram-component-plus/video-swiper": "^1.0.1",
"@vant/weapp": "^1.11.2",
"a-calc": "^2.2.14",
"dayjs": "^1.11.10",
"echarts": "^5.4.3",
"miniprogram-licia": "^1.39.2",
"mp-html": "^2.4.2",
"number-precision": "^1.6.0"
"mp-html": "^2.4.2"
},
"devDependencies": {
"@antfu/eslint-config": "^3.2.0",

23
pnpm-lock.yaml

@ -14,6 +14,9 @@ importers: @@ -14,6 +14,9 @@ importers:
'@vant/weapp':
specifier: ^1.11.2
version: 1.11.7
a-calc:
specifier: ^2.2.14
version: 2.2.14
dayjs:
specifier: ^1.11.10
version: 1.11.13
@ -26,9 +29,6 @@ importers: @@ -26,9 +29,6 @@ importers:
mp-html:
specifier: ^2.4.2
version: 2.5.1
number-precision:
specifier: ^1.6.0
version: 1.6.0
devDependencies:
'@antfu/eslint-config':
specifier: ^3.2.0
@ -561,6 +561,9 @@ packages: @@ -561,6 +561,9 @@ packages:
'@vue/shared@3.5.14':
resolution: {integrity: sha512-oXTwNxVfc9EtP1zzXAlSlgARLXNC84frFYkS0HHz0h3E4WZSP9sywqjqzGCP9Y34M8ipNmd380pVgmMuwELDyQ==}
a-calc@2.2.14:
resolution: {integrity: sha512-Lp6xxnZ1G+qgO4EeLGSYjKRYrYR5qnxE566sYo37KO2dIKYe+ZY5tQJ2MetR3uFhfyC2KcgeDDBH1AKg/rKdyA==}
acorn-jsx@5.3.2:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
@ -1421,9 +1424,6 @@ packages: @@ -1421,9 +1424,6 @@ packages:
nth-check@2.1.1:
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
number-precision@1.6.0:
resolution: {integrity: sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ==}
once@1.4.0:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
@ -1718,6 +1718,9 @@ packages: @@ -1718,6 +1718,9 @@ packages:
resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==}
engines: {node: '>=8'}
typescript-treasure@0.0.9:
resolution: {integrity: sha512-QPmpqJvQqZ7rt2iVNzPrtQNSFs1zVuTuP+jzE3np7qytEUcfSKtAW8RTDslldeAwaJjVJa0UM3ps1uVddpEMqQ==}
typescript@5.8.3:
resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}
engines: {node: '>=14.17'}
@ -2398,6 +2401,10 @@ snapshots: @@ -2398,6 +2401,10 @@ snapshots:
'@vue/shared@3.5.14': {}
a-calc@2.2.14:
dependencies:
typescript-treasure: 0.0.9
acorn-jsx@5.3.2(acorn@8.14.1):
dependencies:
acorn: 8.14.1
@ -3468,8 +3475,6 @@ snapshots: @@ -3468,8 +3475,6 @@ snapshots:
dependencies:
boolbase: 1.0.0
number-precision@1.6.0: {}
once@1.4.0:
dependencies:
wrappy: 1.0.2
@ -3727,6 +3732,8 @@ snapshots: @@ -3727,6 +3732,8 @@ snapshots:
type-fest@0.8.1: {}
typescript-treasure@0.0.9: {}
typescript@5.8.3: {}
ufo@1.6.1: {}

4
src/components/calendar/theme/theme-geneB.wxss

@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
}
.geneb_choosed {
color: rgba(51, 51, 51, 1);
background-color: rgba(189, 189, 189, 0.3);
color:#fff;
background-color: rgba(246, 74, 58, 1);
}
.geneb_today {

21
src/components/popup/index.ts

@ -1,5 +1,3 @@ @@ -1,5 +1,3 @@
import { wxPromiseWrapper } from 'XrFrame/core/utils'
const app = getApp<IAppOption>()
Component({
@ -20,6 +18,8 @@ Component({ @@ -20,6 +18,8 @@ Component({
data: {
popup1Check1: false,
TCenterId: '',
imageUrl: app.globalData.imageUrl,
Timestamp: app.globalData.Timestamp,
},
@ -33,6 +33,17 @@ Component({ @@ -33,6 +33,17 @@ Component({
})
return
}
if (type === 'TCenter') {
if (!this.data.TCenterId) {
wx.showToast({
title: '请选择诊疗中心',
icon: 'none',
})
return
}
this.triggerEvent('ok', { id: this.data.TCenterId })
return
}
this.triggerEvent('ok')
},
handleCancel() {
@ -53,5 +64,11 @@ Component({ @@ -53,5 +64,11 @@ Component({
const { status } = e.currentTarget.dataset
this.triggerEvent('ok', { type: 'selectStatusComplete', status })
},
handleSelectTCenter(e) {
const { id } = e.currentTarget.dataset
this.setData({
TCenterId: id,
})
},
},
})

20
src/components/popup/index.wxml

@ -161,16 +161,26 @@ @@ -161,16 +161,26 @@
<view class="container">
<view class="title">请选择您的基于治疗中心</view>
<view class="list">
<view class="list-item" wx:for="{{6}}" wx:key="index">
<view
class="list-item"
wx:for="{{params.list}}"
wx:key="index"
bind:tap="handleSelectTCenter"
data-id="{{item.hospitalId}}"
>
<view class="radio">
<image class="r-icon" src="{{imageUrl}}icon34.png?t={{Timestamp}}"></image>
<image
class="r-icon"
wx:if="{{TCenterId == item.hospitalId}}"
src="{{imageUrl}}icon34.png?t={{Timestamp}}"
></image>
</view>
<view class="content">中国医学科学院血液病医院</view>
<view class="content">{{item.hospitalName}}</view>
</view>
</view>
<view class="footer">
<view class="cancel">重新选择</view>
<view class="submit">提交</view>
<view class="cancel" bind:tap="handleCancel">取消</view>
<view class="submit" bind:tap="handleOk">提交</view>
</view>
</view>
</view>

91
src/components/uploadFile/index.js

@ -53,20 +53,6 @@ Component({ @@ -53,20 +53,6 @@ Component({
name: '选择聊天文件',
},
],
fileTypenNum: {
image: 1,
video: 2,
audio: 3,
pdf: 4,
ppt: 7,
1: 'image',
2: 'video',
3: 'audio',
4: 'pdf',
7: 'ppt',
},
},
/**
@ -76,20 +62,49 @@ Component({ @@ -76,20 +62,49 @@ Component({
viewFile(e) {
const { index } = e.currentTarget.dataset
const { fileList } = this.properties
let sources = []
const params = fileList[index]
if (['image', 'video'].includes(params.fileType)) {
let sources = []
fileList.map((e) => {
const obj = {
url: e.fileUrl,
type: e.type, // image video
poster: e.imgUrl,
}
sources.push(obj)
})
wx.previewMedia({
current: index,
sources: sources,
})
fileList.forEach((item) => {
let obj = {}
if (item.fileType === 'image') {
obj = {
url: item.url,
type: item.fileType,
poster: item.url,
}
}
if (item.fileType === 'video') {
obj = {
url: item.vidoeUrl,
type: item.fileType,
poster: item.url,
}
}
sources.push(obj)
})
wx.previewMedia({
current: index,
sources: sources,
})
} else if (params.fileType !== 'audio') {
wx.downloadFile({
url: params.url,
success(res) {
wx.openDocument({
filePath: res.tempFilePath,
showMenu: true,
fail() {
wx.showToast({
title: '该文件无法预览',
icon: 'none',
})
},
})
},
})
}
},
deleteFile(e) {
const { index, item } = e.currentTarget.dataset
@ -135,16 +150,15 @@ Component({ @@ -135,16 +150,15 @@ Component({
})
},
uploadFile(item) {
const { fileTypenNum } = this.data
return new Promise((resolve, resject) => {
let url = `${app.globalData.upFileUrl}?r=file-service/upload-`
if (item.fileType === 'image') {
if (item.type === 'image') {
url += 'img'
}
if (item.fileType === 'video') {
if (item.type === 'video') {
url += 'video'
}
if (item.fileType === 'file') {
if (item.type === 'file') {
url += 'doc'
}
wx.uploadFile({
@ -155,18 +169,17 @@ Component({ @@ -155,18 +169,17 @@ Component({
let data = JSON.parse(res.data)
let expandJson = {
name: item.name,
extend: item.extend,
fnum: fileTypenNum[item.fileType],
fileType: item.fileType,
}
if (item.fileType === 'image') {
if (item.type === 'image') {
expandJson.url = data.data.Url
}
if (item.fileType === 'video') {
if (item.type === 'video') {
expandJson.url = data.data.SnapshotUrl
expandJson.videoUrl = data.data.Url
expandJson.duration = data.data.Duration
}
if (item.fileType === 'file') {
if (item.type === 'file') {
expandJson.url = data.data.Url
}
resolve(expandJson)
@ -242,6 +255,7 @@ Component({ @@ -242,6 +255,7 @@ Component({
e.name = e.tempFilePath
e.extend = this.GetExtensionFileName(e.tempFilePath)
e.tempFilePath = e.tempFilePath
e.type = e.fileType
e.fileType = e.fileType
})
this.upFile(res.tempFiles)
@ -259,10 +273,9 @@ Component({ @@ -259,10 +273,9 @@ Component({
extension: ['doc', 'docx', 'pdf', 'xlsx', 'xls', 'ppt', 'pptx'],
success: (res) => {
res.tempFiles.map((e) => {
e.fileType = 'file'
e.type = 'file'
e.tempFilePath = e.path
e.extend = this.GetExtensionFileName(e.path)
console.warn('DEBUGPRINT[62]: index.js:265: e=', e)
e.fileType = this.GetExtensionFileName(e.path)
})
this.upFile(res.tempFiles)
},

23
src/components/uploadFile/index.scss

@ -1,14 +1,18 @@ @@ -1,14 +1,18 @@
/* components/uploadFile/index.wxss */
.upload-list {
display: flex;
flex-wrap: wrap;
display: grid;
grid-template-columns: repeat(3, minmax(160rpx, 200rpx));
gap: 18rpx;
.item {
width: 180rpx;
height: 180rpx;
position: relative;
line-height: 0;
background-color: rgba(217, 217, 217, 1);
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
.item_mask {
position: absolute;
width: 100%;
@ -30,11 +34,16 @@ @@ -30,11 +34,16 @@
height: 100%;
border-radius: 12rpx;
}
.sub-image{
width: 104rpx;
height: 104rpx;
}
.clear {
position: absolute;
right: -22rpx;
top: -28rpx;
padding: 10rpx;
right: 0;
top: 0;
width: 36rpx;
height: 36rpx;
z-index: 9;
}
}
@ -42,7 +51,7 @@ @@ -42,7 +51,7 @@
.btn {
width: 188rpx;
height: 188rpx;
border-radius: 20rpx;
border-radius: 12rpx;
display: flex;
flex-direction: column;
justify-content: center;

27
src/components/uploadFile/index.wxml

@ -1,12 +1,25 @@ @@ -1,12 +1,25 @@
<!-- components/uploadFile/index.wxml -->
<view class="upload-list">
<view class="item" wx:for="{{fileList}}" wx:key="index" data-index="{{index}}" catchtap="viewFile">
<image class="image" mode="aspectFill" src="{{item.imgUrl}}"></image>
<view wx:if="{{item.type === 'video'}}" class="item_mask">
<van-icon size="48rpx" color="rgba(0,0,0,0.6)" name="play-circle" class="item_mask_icon" />
</view>
<view wx:if="{{canDelete}}" class="clear" catchtap="deleteFile" data-item="{{item}}" data-index="{{index}}">
<van-icon name="clear" />
<image wx:if="{{item.fileType==='image'}}" class="image" mode="aspectFill" src="{{item.url}}"></image>
<image wx:elif="{{item.fileType==='video'}}" class="image" mode="aspectFill" src="{{item.url}}"></image>
<image wx:elif="{{item.fileType==='audio'}}" class="sub-image" mode="aspectFill" src="/images/file.png"></image>
<image wx:else class="sub-image" mode="aspectFill" src="/images/{{item.fileType}}.png"></image>
<view class="item_mask">
<van-icon
wx:if="{{item.fileType === 'video'}}"
size="48rpx"
color="rgba(0,0,0,0.6)"
name="play-circle"
class="item_mask_icon"
/>
<image
class="clear"
src="/images/icon97.png"
wx:if="{{canDelete}}"
catchtap="deleteFile"
data-item="{{item}}"
data-index="{{index}}"
></image>
</view>
</view>
<view wx:if="{{upload && (maxNum === -1 || maxNum > fileList.length)}}" catchtap="handleAction">

4
src/doctor/pages/changeTel/index.wxml

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
<input
type="number"
class="input"
model:value="{{mobile}}"
maxlength="11"
placeholder-class="place-input"
placeholder="请输入新手机号"
@ -18,9 +19,10 @@ @@ -18,9 +19,10 @@
<input
type="number"
class="input"
model:value="{{code}}"
maxlength="6"
placeholder-class="place-input"
placeholder="请输入短信验证码"
placeholder="请输入验证码"
/>
<view class="btn" bind:tap="getCode">{{codeText}}</view>
</view>

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

@ -10,7 +10,7 @@ Page({ @@ -10,7 +10,7 @@ Page({
Days: '',
},
onLoad() {
app.waitLogin().then(() => {
app.waitLogin({ type: 2 }).then(() => {
app.getUserInfo(2).then((userInfo) => {
this.setData({
userInfo,

BIN
src/images/doc.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/images/docx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/images/file.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

BIN
src/images/icon97.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

BIN
src/images/pdf.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/ppt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/pptx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/xls.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/xlsx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

14
src/miniprogram_npm/a-calc/index.js

File diff suppressed because one or more lines are too long

1
src/miniprogram_npm/a-calc/index.js.map

File diff suppressed because one or more lines are too long

4
src/miniprogram_npm/dayjs/index.js

File diff suppressed because one or more lines are too long

4
src/miniprogram_npm/echarts/index.js

@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport @@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1748338798566, function(require, module, exports) {
__DEFINE__(1752627705493, function(require, module, exports) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
@ -85959,7 +85959,7 @@ __DEFINE__(1748338798566, function(require, module, exports) { @@ -85959,7 +85959,7 @@ __DEFINE__(1748338798566, function(require, module, exports) {
//# sourceMappingURL=echarts.js.map
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1748338798566);
return __REQUIRE__(1752627705493);
})()
//miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map

4
src/miniprogram_npm/number-precision/index.js

@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport @@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1748338798567, function(require, module, exports) {
__DEFINE__(1752627705494, function(require, module, exports) {
Object.defineProperty(exports, '__esModule', { value: true });
@ -171,7 +171,7 @@ exports.enableBoundaryChecking = enableBoundaryChecking; @@ -171,7 +171,7 @@ exports.enableBoundaryChecking = enableBoundaryChecking;
exports['default'] = index;
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1748338798567);
return __REQUIRE__(1752627705494);
})()
//miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map

47
src/patient/pages/bbmRemark/index.ts

@ -1,16 +1,55 @@ @@ -1,16 +1,55 @@
const _app = getApp<IAppOption>()
const app = getApp<IAppOption>()
Page({
data: {
active: 1,
injectionFeel: '',
injectionRemark: '',
},
onLoad() {
app.waitLogin().then(() => {
this.getDetail()
})
},
getDetail() {
wx.ajax({
method: 'GET',
url: '?r=wtx/treatment/get-injection-feel',
data: {},
}).then((res) => {
this.setData({
...res,
})
})
},
onLoad() {},
handleSelect(e) {
const { active } = e.currentTarget.dataset
this.setData({
active,
injectionFeel: active,
})
},
handleSubmit() {
const { injectionFeel, injectionRemark } = this.data
if (!injectionFeel && !injectionRemark) {
wx.showToast({
title: '请选择注射感受或者填写备注',
icon: 'none',
})
return
}
wx.ajax({
method: 'POST',
url: '?r=wtx/treatment/save-injection-feel',
data: {
injectionFeel,
injectionRemark,
},
}).then((res) => {
this.handleBack()
})
},
handleBack() {
wx.navigateBack()
},
})
export {}

11
src/patient/pages/bbmRemark/index.wxml

@ -3,16 +3,16 @@ @@ -3,16 +3,16 @@
<view class="label">整体治疗过程感受</view>
<view class="select">
<view class="s-item" bind:tap="handleSelect" data-active="{{1}}">
<image wx:if="{{active==1}}" class="icon" src="{{imageUrl}}icon44.png?t={{Timestamp}}"></image>
<image wx:if="{{injectionFeel==1}}" class="icon" src="{{imageUrl}}icon44.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon49.png?t={{Timestamp}}"></image>
</view>
<view class="s-item" bind:tap="handleSelect" data-active="{{2}}">
<image wx:if="{{active==2}}" class="icon" src="{{imageUrl}}icon42.png?t={{Timestamp}}"></image>
<image wx:if="{{injectionFeel==2}}" class="icon" src="{{imageUrl}}icon42.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon50.png?t={{Timestamp}}"></image>
</view>
<view class="s-item" bind:tap="handleSelect" data-active="{{3}}">
<image wx:if="{{active==3}}" class="icon" src="{{imageUrl}}icon43.png?t={{Timestamp}}"></image>
<image wx:if="{{injectionFeel==3}}" class="icon" src="{{imageUrl}}icon43.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon83.png?t={{Timestamp}}"></image>
</view>
</view>
@ -21,13 +21,14 @@ @@ -21,13 +21,14 @@
<view class="title">整体治疗过程备注</view>
<textarea
class="textarea"
model:value="{{injectionRemark}}"
placeholder-class="place-textarea"
disable-default-padding
placeholder="有什么想要记录的呢?"
></textarea>
</view>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">提交</view>
<view class="cancel" bind:tap="handleBack">取消</view>
<view class="submit" bind:tap="handleSubmit">提交</view>
</view>
</view>

82
src/patient/pages/bbmReport/index.ts

@ -1,8 +1,82 @@ @@ -1,8 +1,82 @@
const _app = getApp<IAppOption>();
const app = getApp<IAppOption>()
import { calc, fmt } from 'a-calc'
Page({
data: {},
onLoad() {},
});
data: {
injectionDate: '',
injectionWeight: '',
injectionDrugs: '',
injectionNum: '',
},
onLoad() {
app.waitLogin().then(() => {
this.getDetail()
})
},
handleWeight(e) {
const value = e.detail.value
if (value) {
const injectionDrugs = calc(`${value} * 1.25 | =0 ~+`)
const injectionNum = calc(`${value} * 1.25 / 2 | =0 ~+`)
this.setData({
injectionDrugs,
injectionNum,
})
}
},
handleChangeDate(e) {
const value = e.detail.value
wx.ajax({
method: 'POST',
url: '?r=wtx/treatment/save-injection-date',
data: {
injectionDate: value,
},
}).then((res) => {
console.log('res: ', res)
})
},
getDetail() {
wx.ajax({
method: 'GET',
url: '?r=wtx/treatment/get-injection-info',
data: {},
}).then((res) => {
this.setData({
...res,
})
})
},
handleBack() {
wx.navigateBack()
},
handleSubmit() {
const { injectionDate, injectionWeight } = this.data
if (!injectionDate) {
wx.showToast({
title: '请选择输注时间',
icon: 'none',
})
return
}
if (!injectionWeight) {
wx.showToast({
title: '请输入体重',
icon: 'none',
})
return
}
wx.ajax({
method: 'POST',
url: '?r=wtx/treatment/save-injection-info',
data: {
injectionWeight,
},
}).then(() => {
wx.navigateBack()
})
},
})
export {}

40
src/patient/pages/bbmReport/index.wxml

@ -5,19 +5,27 @@ @@ -5,19 +5,27 @@
<view class="row">
<view class="label">输注时间</view>
<view class="r-container">
<picker class="picker" mode="date">
<picker class="picker" model:value="{{injectionDate}}" mode="date" bindchange="handleChangeDate">
<view class="picker-content">
<view class="content" data-place="请选择"></view>
<view class="content" data-place="请选择">{{injectionDate}}</view>
<van-icon name="arrow-down" />
</view>
</picker>
</view>
</view>
<view class="row">
<view class="label">使用剂量</view>
<view class="label">体重</view>
<view class="r-container">
<view class="columns">
<input class="input" type="number" placeholder-class="input-place" type="" placeholder="请输入" />
<input
class="input"
model:value="{{injectionWeight}}"
type="number"
placeholder-class="input-place"
type=""
placeholder="请输入"
bindblur="handleWeight"
/>
<view class="sub">KG</view>
</view>
</view>
@ -29,7 +37,15 @@ @@ -29,7 +37,15 @@
<view class="label">用药体积</view>
<view class="r-container">
<view class="columns">
<input class="input" disabled type="number" placeholder-class="input-place" type="" placeholder="--" />
<input
class="input"
disabled
value="{{injectionDrugs}}"
type="number"
placeholder-class="input-place"
type=""
placeholder="--"
/>
<view class="sub">ml</view>
</view>
</view>
@ -38,14 +54,22 @@ @@ -38,14 +54,22 @@
<view class="label">预计瓶数</view>
<view class="r-container">
<view class="columns">
<input class="input" disabled type="number" placeholder-class="input-place" type="" placeholder="--" />
<input
class="input"
disabled
value="{{injectionNum}}"
type="number"
placeholder-class="input-place"
type=""
placeholder="--"
/>
<view class="sub">瓶</view>
</view>
</view>
</view>
</view>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">提交</view>
<view class="cancel" bind:tap="handleBack">取消</view>
<view class="submit" bind:tap="handleSubmit">提交</view>
</view>
</view>

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

@ -101,6 +101,13 @@ @@ -101,6 +101,13 @@
font-size: 32rpx;
color: rgba(1, 1, 5, 1);
font-weight: bold;
display: flex;
align-items: center;
.feel {
margin: -20rpx 0;
width: 96rpx;
height: 96rpx;
}
}
.hostipl-name {
margin-top: 4rpx;

71
src/patient/pages/course/index.ts

@ -18,12 +18,19 @@ Page({ @@ -18,12 +18,19 @@ Page({
periodInfo3: {} as any,
periodInfo4: {} as any,
},
onLoad(options) {
if (options.current) {
this.setData({
current: Number(options.current),
})
}
},
onShow() {
app.waitLogin({ type: 1 }).then(() => {
this.getPeriodInfo(1, 'periodInfo1')
this.getPeriodInfo(this.data.current + 1, `periodInfo${this.data.current + 1}`)
})
},
getPeriodInfo(period: 1 | 2 | 3 | 4, key: string) {
getPeriodInfo(period: number, key: string) {
wx.ajax({
method: 'GET',
url: '?r=wtx/treatment/get-period-info',
@ -40,6 +47,7 @@ Page({ @@ -40,6 +47,7 @@ Page({
this.setData({
current: e.detail.current,
})
this.getPeriodInfo(e.detail.current + 1, `periodInfo${this.data.current + 1}`)
},
handleSelectHostipal() {
wx.navigateTo({
@ -59,16 +67,25 @@ Page({ @@ -59,16 +67,25 @@ Page({
})
},
handleTCenter() {
this.setData({
popupShow: true,
popupType: 'TCenter',
popupParams: {},
wx.ajax({
method: 'GET',
url: '?r=wtx/common/get-treatment-center-list',
data: {},
}).then((res) => {
this.setData({
popupShow: true,
popupType: 'TCenter',
popupParams: {
list: res,
},
})
})
},
handlePreDiagnosisReport() {
const { periodInfo1 } = this.data
handlePreDiagnosisReport(e: any) {
const { period } = e.currentTarget.dataset
const { examId } = this.data[`periodInfo${period}`]
wx.navigateTo({
url: `/patient/pages/preDiagnosisReport/index?examid=${periodInfo1.examId}&period=1`,
url: `/patient/pages/preDiagnosisReport/index?examid=${examId}&period=${period}`,
})
},
handleAavReport() {
@ -91,9 +108,10 @@ Page({ @@ -91,9 +108,10 @@ Page({
url: '/patient/pages/injectDate/index',
})
},
handleInhibitorsManage() {
handleInhibitorsManage(e) {
const { period } = e.currentTarget.dataset
wx.navigateTo({
url: '/patient/pages/inhibitorsManageList/index',
url: `/patient/pages/inhibitorsManageList/index?period=${period}`,
})
},
handleFollowPlan() {
@ -122,22 +140,31 @@ Page({ @@ -122,22 +140,31 @@ Page({
})
},
handlePopupOk(e) {
const { type, status } = e.detail
if (type) {
this.setData({
popupShow: true,
popupType: type,
popupParams: {
status: status || '',
const { popupType } = this.data
const { id } = e.detail
if (popupType === 'TCenter') {
wx.ajax({
method: 'POST',
url: '?r=wtx/treatment/save-t-hospital',
data: {
hospitalId: id,
},
}).then(() => {
this.setData({
popupShow: true,
popupType: 'TCenterEnd',
popupParams: {
close: true,
},
})
})
return
}
this.setData({
popupShow: false,
})
},
handlePopupCancel() {
const { popupType } = this.data
if (popupType === 'TCenterEnd') {
this.getPeriodInfo(this.data.current + 1, `periodInfo${this.data.current + 1}`)
}
this.setData({
popupShow: false,
})

81
src/patient/pages/course/index.wxml

@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
</view>
</view>
</view>
<view class="row" bind:tap="handlePreDiagnosisReport">
<view class="row" bind:tap="handlePreDiagnosisReport" data-period="1">
<view class="aside">
<view class="slow-line"></view>
<image
@ -122,25 +122,34 @@ @@ -122,25 +122,34 @@
<view class="row" bind:tap="handleTCenter">
<view class="aside">
<view class="slow-line"></view>
<!-- <image class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image> -->
<image class="radio" src="{{imageUrl}}icon29.png?t={{Timestamp}}"></image>
<image
wx:if="{{periodInfo2.hospitalName}}"
class="radio"
src="{{imageUrl}}icon29.png?t={{Timestamp}}"
></image>
<image wx:else class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<view class="line"></view>
</view>
<view class="container">
<view class="c-body">
<view class="wrap">
<view class="content">1.治疗中心</view>
<view class="hostipl-name">中国医学科学院血液病院</view>
<view class="hostipl-name" wx:if="{{periodInfo2.hospitalName}}">{{periodInfo2.hospitalName}}</view>
</view>
<image class="icon" src="{{imageUrl}}icon30.png?t={{Timestamp}}"></image>
</view>
<view class="c-footer"></view>
</view>
</view>
<view class="row" bind:tap="handlePreDiagnosisReport">
<view class="row" bind:tap="handlePreDiagnosisReport" data-period="2">
<view class="aside">
<view class="slow-line"></view>
<image class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<image
wx:if="{{periodInfo2.isExamReport===1}}"
class="radio"
src="{{imageUrl}}icon29.png?t={{Timestamp}}"
></image>
<image wx:else class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<view class="line"></view>
</view>
<view class="container">
@ -185,25 +194,36 @@ @@ -185,25 +194,36 @@
<view class="row" bind:tap="hadnleInjectDate">
<view class="aside">
<view class="slow-line"></view>
<!-- <image class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image> -->
<image class="radio" src="{{imageUrl}}icon29.png?t={{Timestamp}}"></image>
<image
wx:if="{{periodInfo3.injectionDate}}"
class="radio"
src="{{imageUrl}}icon29.png?t={{Timestamp}}"
></image>
<image wx:else class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<view class="line"></view>
</view>
<view class="container">
<view class="c-body">
<view class="wrap">
<view class="content">1.录入您的注射日</view>
<view class="hostipl-name">2025年6月15日</view>
<view class="hostipl-name" wx:if="{{periodInfo3.injectionDate}}">
{{periodInfo3.injectionDate}}
</view>
</view>
<!-- <image class="icon" src="{{imageUrl}}icon30.png?t={{Timestamp}}"></image> -->
<image class="icon" src="{{imageUrl}}icon52.png?t={{Timestamp}}"></image>
</view>
</view>
</view>
<view class="row" bind:tap="handleInhibitorsManage">
<view class="row" bind:tap="handleInhibitorsManage" data-period="3">
<view class="aside">
<view class="slow-line"></view>
<image class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<image
wx:if="{{periodInfo3.immuneCount>0}}"
class="radio"
src="{{imageUrl}}icon29.png?t={{Timestamp}}"
></image>
<image wx:else class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<view class="line"></view>
</view>
<view class="container">
@ -214,9 +234,9 @@ @@ -214,9 +234,9 @@
<image class="icon" src="{{imageUrl}}icon30.png?t={{Timestamp}}"></image>
</view>
<view class="c-footer">
<view class="inhibitors-content">
<view class="inhibitors-content" wx:if="{{periodInfo3.immuneCount>0}}">
已记录
<text class="green">2</text>
<text class="green">{{periodInfo3.immuneCount}}</text>
</view>
</view>
@ -225,7 +245,12 @@ @@ -225,7 +245,12 @@
<view class="row" bind:tap="handleBbmReport">
<view class="aside">
<view class="slow-line"></view>
<image class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<image
wx:if="{{periodInfo3.isInjection==1}}"
class="radio"
src="{{imageUrl}}icon29.png?t={{Timestamp}}"
></image>
<image wx:else class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<view class="line"></view>
</view>
<view class="container">
@ -236,20 +261,42 @@ @@ -236,20 +261,42 @@
<image class="icon" src="{{imageUrl}}icon31.png?t={{Timestamp}}"></image>
</view>
<view class="c-footer">
<view class="content">已完成</view>
<view class="content" wx:if="{{periodInfo3.isInjection == 1}}">已完成</view>
</view>
</view>
</view>
<view class="row" bind:tap="handleBbmRemark">
<view class="aside">
<view class="slow-line"></view>
<image class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<image
wx:if="{{periodInfo3.isInjectionFeel==1}}"
class="radio"
src="{{imageUrl}}icon29.png?t={{Timestamp}}"
></image>
<image wx:else class="radio" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
<view class="line"></view>
</view>
<view class="container">
<view class="c-body">
<view class="wrap">
<view class="content">4.此次输注结果如何?</view>
<view class="content">
4.此次输注结果如何?
<image
wx:if="{{periodInfo3.injectionFeel==1}}"
class="feel"
src="{{imageUrl}}icon44.png?t={{Timestamp}}"
></image>
<image
wx:elif="{{periodInfo3.injectionFeel==2}}"
class="feel"
src="{{imageUrl}}icon42.png?t={{Timestamp}}"
></image>
<image
wx:elif="{{periodInfo3.injectionFeel==3}}"
class="feel"
src="{{imageUrl}}icon43.png?t={{Timestamp}}"
></image>
</view>
</view>
</view>
</view>

3
src/patient/pages/index/index.ts

@ -154,8 +154,9 @@ Page({ @@ -154,8 +154,9 @@ Page({
})
},
handleCourse() {
const { progress } = this.data
wx.navigateTo({
url: '/patient/pages/course/index',
url: `/patient/pages/course/index?current=${progress}`,
})
},
handleColtStat() {

76
src/patient/pages/inhibitorsManage/index.ts

@ -1,11 +1,20 @@ @@ -1,11 +1,20 @@
const _app = getApp<IAppOption>()
const app = getApp<IAppOption>()
Page({
data: {
popupShow: true,
popupShow: false,
popupType: 'inhibitors',
popupParams: {},
recordId: '',
period: '',
recordDate: '',
drugId: '',
drugName: '',
type: '',
dosage: '',
dosageUnit: '',
unitRange: [
{
id: '1',
@ -17,12 +26,73 @@ Page({ @@ -17,12 +26,73 @@ Page({
},
],
},
onLoad() {},
onLoad(options) {
console.log('DEBUGPRINT[71]: index.ts:29: options=', options)
this.setData({
period: options.period,
})
app.waitLogin({ type: 1 }).then(() => {
this.getDict()
if (options.id) {
this.getDetail(options.id)
}
})
},
getDict() {
wx.ajax({
method: 'GET',
url: '?r=wtx/treatment/get-dict',
data: {},
}).then((res) => {
console.log('res: ', res)
})
},
getDetail(id: string) {
wx.ajax({
method: 'GET',
url: '?r=wtx/immune/get-detail',
data: { recordId: id },
}).then((res) => {
this.setData({
...res,
})
})
},
handleDrug() {
console.log(111)
this.setData({
popupShow: true,
popupType: 'inhibitors',
popupParams: {
close: true,
list: [],
},
})
},
handlePopupOk() {
this.setData({
popupShow: false,
})
},
handlePopupCancel() {
this.setData({
popupShow: false,
})
},
handleSubmit() {},
handleDel() {
const { recordId } = this.data
wx.ajax({
method: 'GET',
url: '?r=wtx/immune/del',
data: { recordId },
}).then(() => {
this.handleBack()
})
},
handleBack() {
wx.navigateBack()
},
})
export {}

27
src/patient/pages/inhibitorsManage/index.wxml

@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
<view class="page">
<view class="card">
<view class="row">
<view class="row" bind:tap="handleDrug">
<view class="label">药物名称</view>
<view class="container">
<picker mode="date" class="date">
<view mode="date" class="date">
<view class="date-content">
<view class="content" data-place="请选择"></view>
<view class="content" data-place="请选择">{{drugName}}</view>
<van-icon name="arrow-down" />
</view>
</picker>
</view>
</view>
</view>
<view class="row">
@ -24,8 +24,14 @@ @@ -24,8 +24,14 @@
<view class="label">使用剂量</view>
<view class="container">
<view class="input-wrap">
<input class="input" placeholder-class="place-input" type="number" value="" placeholder="请输入" />
<picker mode="selector" range="{{unitRange}}" range-key="name" class="date">
<input
class="input"
placeholder-class="place-input"
type="number"
model:value="{{dosage}}"
placeholder="请输入"
/>
<picker mode="selector" model:value="{{dosageUnit}}" range="{{unitRange}}" range-key="name" class="date">
<view class="date-content">
<view class="content" data-place="请选择">mg/天</view>
<van-icon name="arrow-down" />
@ -37,9 +43,9 @@ @@ -37,9 +43,9 @@
<view class="row">
<view class="label">用药时间</view>
<view class="container">
<picker mode="date" class="date">
<picker mode="date" model:value="{{recordDate}}" class="date">
<view class="date-content">
<view class="content" data-place="请选择"></view>
<view class="content" data-place="请选择">{{recordDate}}</view>
<van-icon name="arrow-down" />
</view>
</picker>
@ -47,8 +53,9 @@ @@ -47,8 +53,9 @@
</view>
</view>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">提交</view>
<view wx:if="{{recordId}}" class="cancel" bind:tap="handleDel">删除</view>
<view wx:else class="cancel" bind:tap="handleBack">取消</view>
<view class="submit" bind:tap="handleSubmit">提交</view>
</view>
</view>

60
src/patient/pages/inhibitorsManageList/index.ts

@ -1,17 +1,63 @@ @@ -1,17 +1,63 @@
const _app = getApp<IAppOption>()
const app = getApp<IAppOption>()
Page({
data: {},
onLoad() {},
handleEdit(e) {
const {id} = e.currentTarget.dataset;
data: {
period: '',
list: [] as any[],
total: 0,
pagination: {
page: 1,
pages: 1,
count: 1,
},
},
onLoad(options) {
this.setData({
period: options.period,
})
},
onShow() {
app.waitLogin().then(() => {
this.getList()
})
},
getList(newPage = 1) {
wx.ajax({
method: 'GET',
url: '?r=wtx/immune/get-list',
data: {
page: newPage,
},
}).then((res) => {
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)
}
},
handleEdit(e: any) {
const { id, period } = e.currentTarget.dataset
wx.navigateTo({
url: `/patient/pages/inhibitorsManage/index?id=${id}`,
url: `/patient/pages/inhibitorsManage/index?id=${id}&peroid=${period}`,
})
},
handleAdd() {
const { period } = this.data
wx.navigateTo({
url: '/patient/pages/inhibitorsManage/index',
url: `/patient/pages/inhibitorsManage/index?period=${period}`,
})
},
})

31
src/patient/pages/inhibitorsManageList/index.wxml

@ -1,33 +1,40 @@ @@ -1,33 +1,40 @@
<view class="page">
<view class="empty" wx:if="{{false}}">
<image class="none-img" src="{{imageUrl}}none1.png?t={{Timestamp}}"></image>
<view class="title">您还没有记录信息哦~</view>
<view class="add">录入我的免疫制剂信息</view>
</view>
<view class="list" wx:else>
<view class="list" wx:if="{{total>0}}">
<view class="total">
已用药
<text class="red">2</text>
<text class="red">{{total}}</text>
</view>
<view class="list-card" bind:tap="handleEdit" data-id="1">
<view
class="list-card"
wx:for="{{list}}"
bind:tap="handleEdit"
data-id="{{item.recordId}}"
data-period="{{item.period}}"
>
<view class="item">
<view class="item-title">用药时间</view>
<view class="item-content">2025-06-13</view>
<view class="item-content">{{item.recordDate}}</view>
</view>
<view class="item">
<view class="item-title">药物名称</view>
<view class="item-content">2025-06-13</view>
<view class="item-content">{{item.drugName}}</view>
</view>
<view class="item">
<view class="item-title">用药方式</view>
<view class="item-content">2025-06-13</view>
<view class="item-content">{{item.typeName}}</view>
</view>
<view class="item">
<view class="item-title">用药剂量</view>
<view class="item-content">2025-06-13</view>
<view class="item-content">{{item.dosage}}{{item.dosageUnitName}}</view>
</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
<image class="add" src="{{imageUrl}}icon53.png?t={{Timestamp}}" bind:tap="handleAdd"></image>
</view>
<view class="empty" wx:else>
<image class="none-img" src="{{imageUrl}}none1.png?t={{Timestamp}}"></image>
<view class="title">您还没有记录信息哦~</view>
<view class="add" bind:tap="handleAdd">录入我的免疫制剂信息</view>
</view>
</view>

130
src/patient/pages/injectDate/index.ts

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
import dayjs from 'dayjs'
const licia = require('miniprogram-licia')
const app = getApp<IAppOption>()
@ -19,63 +21,56 @@ Page({ @@ -19,63 +21,56 @@ Page({
},
endGif: false,
gifPath: '',
gifPath: `${app.globalData.imageUrl}gif2.gif?t=${app.globalData.Timestamp}`,
injectionDate: '',
injectionDateName: '',
},
onLoad() {
this.loadGifImage()
app.waitLogin({type:1}).then(() => {
this.setArea()
app.waitLogin({ type: 1 }).then(() => {
this.getDetail()
})
},
setArea() {
// const calendar = this.selectComponent('#calendar').calendar
// calendar.chooseDateArea(['2025-06-10', '2025-06-20'])
},
takeoverTap() {
this.setData({
endGif: true,
getDetail() {
wx.ajax({
method: 'GET',
url: '?r=wtx/treatment/get-injection-date',
data: {},
}).then((res) => {
if (res.injectionDate) {
const [year, month, date] = dayjs(res.injectionDate).format('YYYY-MM-DD').split('-')
const calendar = this.selectComponent('#calendar').calendar
calendar.setSelectedDates([
{
year,
month,
date,
},
])
this.setData({
injectionDate: res.injectionDate,
injectionDateName: dayjs(res.injectionDate).format('YYYY年MM月DD日 ddd'),
})
}
})
},
setCalendarTodos({ bleedDate = [], injectionDate = [] }: { bleedDate: any[]; injectionDate: string[] }) {
takeoverTap(e) {
const { year, month, date } = e.detail
const injectionDate = dayjs(`${year}-${month}-${date}`).format('YYYY-MM-DD')
const injectionDateName = dayjs(`${year}-${month}-${date}`).format('YYYY年MM月DD日 ddd')
const calendar = this.selectComponent('#calendar').calendar
const dates: any[] = []
const intersectDate = licia.intersect(bleedDate, injectionDate)
const filterAdlDate = bleedDate.filter((item) => !intersectDate.includes(item))
const filterMedication = injectionDate.filter((item) => !intersectDate.includes(item))
filterAdlDate.forEach((Date: string) => {
dates.push({
year: Date.split('-')[0],
month: Date.split('-')[1],
date: Date.split('-')[2],
color: ['#FB787F'],
})
})
filterMedication.forEach((Date: string) => {
dates.push({
year: Date.split('-')[0],
month: Date.split('-')[1],
date: Date.split('-')[2],
color: ['#0030AE'],
})
})
intersectDate.forEach((Date: string) => {
dates.push({
year: Date.split('-')[0],
month: Date.split('-')[1],
date: Date.split('-')[2],
color: ['#FB787F', '#0030AE'],
})
})
calendar.setTodos({
// 待办点标记设置
pos: 'bottom', // 待办点标记位置 ['top', 'bottom']
dotColor: 'purple', // 待办点标记颜色
circle: false, // 待办圆圈标记设置(如圆圈标记已签到日期),该设置与点标记设置互斥
showLunar: true,
showLabelAlways: true, // 点击时是否显示待办事项(圆点/文字),在 circle 为 true 及当日历配置 showLunar 为 true 时,此配置失效
dates,
calendar.cancelSelectedDates()
calendar.setSelectedDates([
{
year,
month,
date,
},
])
this.setData({
injectionDate,
injectionDateName,
})
},
loadGifImage() {
@ -97,14 +92,35 @@ Page({ @@ -97,14 +92,35 @@ Page({
})
},
})
// wx.getImageInfo({
// src: `${app.globalData.imageUrl}gif2.gif?t=${app.globalData.Timestamp}`,
// success: (res) => {
// this.setData({
// gifPath: res.path,
// })
// },
// })
},
handleBack() {
wx.navigateBack()
},
handleSubmit() {
const { injectionDate } = this.data
if (!injectionDate) {
wx.showToast({
title: '请选择注射日期',
icon: 'none',
})
return
}
wx.ajax({
method: 'POST',
url: '?r=wtx/treatment/save-injection-date',
data: {
injectionDate,
},
}).then(() => {
this.setData({
endGif: true,
})
setTimeout(() => {
wx.navigateBack()
}, 3000)
})
},
})

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

@ -10,14 +10,14 @@ @@ -10,14 +10,14 @@
></calendar>
</view>
<view class="date-card">
<view class="date-card" wx:if="{{injectionDate}}">
<view class="col">您的注射日是</view>
<view class="col">2025年6月4日 周三</view>
<view class="col">{{injectionDateName}}</view>
</view>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">提交</view>
<view class="cancel" bind:tap="handleBack">取消</view>
<view class="submit" bind:tap="handleSubmit">提交</view>
</view>
</view>

49
src/patient/pages/preDiagnosisReport/index.ts

@ -209,8 +209,55 @@ Page({ @@ -209,8 +209,55 @@ Page({
setFile(e: any) {
console.log('DEBUGPRINT[63]: index.ts:189: e=', e)
const { type, key } = e.currentTarget.dataset
const { examId, period } = this.data
const detail = e.detail || []
detail.forEach((item: any) => {})
let apiArr: any[] = []
const fileList = this.data[key] || []
detail.forEach((item: any) => {
const params: any = {
examId,
period,
type,
fileType: item.fileType,
name: item.name,
url: item.url,
videoUrl: item.videoUrl,
duration: item.duration,
}
fileList.push(params)
apiArr.push(this.saveAttachment(params))
})
this.setData({
[key]: fileList,
})
Promise.all(apiArr).then((res) => {
console.log(res)
})
},
saveAttachment(params: any) {
return wx.ajax({
method: 'POST',
url: '?r=wtx/treatment/save-attachment',
data: params,
})
},
delFile(e: any) {
const { key } = e.currentTarget.dataset
const { index, item } = e.detail
if (item.attachmentId) {
wx.ajax({
method: 'POST',
url: '?r=wtx/treatment/del-attachment',
data: {
attachmentId: item.attachmentId,
},
})
}
const fileList = this.data[key]
const newFileList = fileList.filter((_, i) => i !== index)
this.setData({
[key]: newFileList,
})
},
})

82
src/patient/pages/preDiagnosisReport/index.wxml

@ -56,6 +56,7 @@ @@ -56,6 +56,7 @@
<view class="file-list">
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList1}}"
maxNum="{{9}}"
data-key="attachmentList1"
@ -135,7 +136,14 @@ @@ -135,7 +136,14 @@
</view>
<view class="m-title">请上传您的检查报告</view>
<view class="file-list">
<uploadFile></uploadFile>
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList2}}"
maxNum="{{9}}"
data-key="attachmentList2"
data-type="2"
></uploadFile>
</view>
</view>
</view>
@ -177,7 +185,14 @@ @@ -177,7 +185,14 @@
</view>
<view class="m-title">请上传您的检查报告</view>
<view class="file-list">
<uploadFile></uploadFile>
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList3}}"
maxNum="{{9}}"
data-key="attachmentList3"
data-type="3"
></uploadFile>
</view>
</view>
</view>
@ -219,7 +234,14 @@ @@ -219,7 +234,14 @@
</view>
<view class="m-title">可上传您的抑制物检查结果</view>
<view class="file-list">
<uploadFile></uploadFile>
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList4}}"
maxNum="{{9}}"
data-key="attachmentList4"
data-type="4"
></uploadFile>
</view>
</view>
</view>
@ -275,7 +297,14 @@ @@ -275,7 +297,14 @@
</view>
<view class="m-title">请上传乙型肝炎检查报告</view>
<view class="file-list">
<uploadFile></uploadFile>
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList5}}"
maxNum="{{9}}"
data-key="attachmentList5"
data-type="5"
></uploadFile>
</view>
</view>
</view>
@ -331,7 +360,14 @@ @@ -331,7 +360,14 @@
</view>
<view class="m-title">请上传丙型肝炎检查报告</view>
<view class="file-list">
<uploadFile></uploadFile>
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList6}}"
maxNum="{{9}}"
data-key="attachmentList6"
data-type="6"
></uploadFile>
</view>
</view>
</view>
@ -375,7 +411,14 @@ @@ -375,7 +411,14 @@
</view>
<view class="m-title">填提交您的HIV检测报告</view>
<view class="file-list">
<uploadFile></uploadFile>
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList7}}"
maxNum="{{9}}"
data-key="attachmentList7"
data-type="7"
></uploadFile>
</view>
</view>
</view>
@ -417,7 +460,14 @@ @@ -417,7 +460,14 @@
</view>
<view class="m-title">填提交您的AFP 检测报告</view>
<view class="file-list">
<uploadFile></uploadFile>
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList8}}"
maxNum="{{9}}"
data-key="attachmentList8"
data-type="8"
></uploadFile>
</view>
</view>
</view>
@ -461,7 +511,14 @@ @@ -461,7 +511,14 @@
</view>
<view class="m-title">填提交您的AAV检测报告</view>
<view class="file-list">
<uploadFile></uploadFile>
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList9}}"
maxNum="{{9}}"
data-key="attachmentList9"
data-type="9"
></uploadFile>
</view>
</view>
</view>
@ -498,7 +555,14 @@ @@ -498,7 +555,14 @@
></textarea>
<view class="m-title">填提交您的检测报告</view>
<view class="file-list">
<uploadFile></uploadFile>
<uploadFile
bind:setData="setFile"
bind:deleteFile="delFile"
fileList="{{attachmentList10}}"
maxNum="{{9}}"
data-key="attachmentList10"
data-type="10"
></uploadFile>
</view>
</view>
</view>

6
src/patient/pages/userInfo/index.ts

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
import dayjs from 'dayjs'
const app = getApp<IAppOption>()
Page({
@ -10,12 +12,14 @@ Page({ @@ -10,12 +12,14 @@ Page({
provinceName: '',
cityName: '',
end: dayjs().format('YYYY-MM-DD'),
PatientTel: '',
userInfo: {},
},
onShow() {
app.waitLogin({type:1}).then(() => {
app.waitLogin({ type: 1 }).then(() => {
app.getUserInfo(1).then((userInfo) => {
this.setData({
name: userInfo.PatientName,

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
<view class="row">
<view class="label">{{userInfo.RelationType == 1 ? '' : '亲友'}}出生年月</view>
<view class="container">
<picker class="picker" mode="date" model:value="{{birthMonth}}" fields="month" bind:change="handleUpdate">
<picker class="picker" mode="date" end="{{end}}" model:value="{{birthMonth}}" fields="month" bind:change="handleUpdate">
<view class="picker-content">
<view class="content" data-place="请选择">{{birthMonth}}</view>
</view>

Loading…
Cancel
Save