患者分组代码优化,解决大数据问题
This commit is contained in:
parent
8d0f7452b5
commit
58931fcf2e
334
features/patient/src/main/ets/components/CopyPatientGroups.ets
Normal file
334
features/patient/src/main/ets/components/CopyPatientGroups.ets
Normal file
@ -0,0 +1,334 @@
|
|||||||
|
import { authStore, HdNav, PositionSelectedSheet } from '@itcast/basic';
|
||||||
|
import { promptAction } from '@kit.ArkUI'
|
||||||
|
import { HdLoadingDialog } from '@itcast/basic'
|
||||||
|
import { BasicConstant,hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
|
||||||
|
import { BusinessError } from '@kit.BasicServicesKit';
|
||||||
|
import HashMap from '@ohos.util.HashMap';
|
||||||
|
import { groupRequest,groupRequestCall,groupModel,patientListModel } from '../models/PatientsGroupModel'
|
||||||
|
import { HMRouterMgr, HMRouterPathInfo, HMRouterPathCallback, HMRouter } from "@hadss/hmrouter"
|
||||||
|
|
||||||
|
@HMRouter({ pageUrl: 'CopyPatientGroups' })
|
||||||
|
@Component
|
||||||
|
export struct CopyPatientGroups {
|
||||||
|
@State groupSort: string = '分组排序'
|
||||||
|
@State innerSort: string = '组内排序'
|
||||||
|
@State groupSortList:sortModel[] = [];
|
||||||
|
@State innerSortList:sortModel[] = [];
|
||||||
|
@State groupSortSelected: boolean = false//是否展开
|
||||||
|
@State innerSortSelected: boolean = false//是否展开
|
||||||
|
@State isGroupSelected: boolean = false//是否选中
|
||||||
|
@State IsInnerSelected: boolean = false//是否选中
|
||||||
|
@State isMaiLanHidden:boolean = false;//麦兰项目是否显示
|
||||||
|
@State group_sort:string = '0'
|
||||||
|
@State list_sort:string = '0'
|
||||||
|
@State groupListArray: groupModel[] = []
|
||||||
|
private params: ESObject = HMRouterMgr.getCurrentParam()
|
||||||
|
|
||||||
|
dialog: CustomDialogController = new CustomDialogController({
|
||||||
|
builder: HdLoadingDialog({ message: '加载中...' }),
|
||||||
|
customStyle: true,
|
||||||
|
alignment: DialogAlignment.Center
|
||||||
|
})
|
||||||
|
|
||||||
|
aboutToAppear(): void {
|
||||||
|
this.getGroupData()
|
||||||
|
this.getIsMaiLanData()
|
||||||
|
this.groupSortList = [{"name":"按首字母","isSeleted":false} as sortModel,{"name":"分组人数","isSeleted":false} as sortModel]
|
||||||
|
this.innerSortList = [{"name":"按首字母","isSeleted":false} as sortModel,{"name":"随访时间","isSeleted":false} as sortModel]
|
||||||
|
}
|
||||||
|
|
||||||
|
getGroupData(){
|
||||||
|
this.dialog.open()
|
||||||
|
hdHttp.post<string>(BasicConstant.groupList, {
|
||||||
|
expert_uuid: authStore.getUser().uuid,
|
||||||
|
group_sort:this.group_sort,
|
||||||
|
list_sort:this.list_sort
|
||||||
|
} as groupRequest).then(async (res: HdResponse<string>) => {
|
||||||
|
this.dialog.close();
|
||||||
|
this.groupListArray = []
|
||||||
|
logger.info('Response groupList'+res);
|
||||||
|
let json:groupRequestCall = JSON.parse(res+'') as groupRequestCall;
|
||||||
|
if(json.code == 1) {
|
||||||
|
this.groupListArray = json.data
|
||||||
|
} else {
|
||||||
|
console.error('患者分组列表失败:'+json.message)
|
||||||
|
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||||
|
}
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
this.dialog.close();
|
||||||
|
console.error(`Response fails: ${err}`);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getIsMaiLanData() {
|
||||||
|
const hashMap: HashMap<string, string> = new HashMap();
|
||||||
|
this.dialog.open()
|
||||||
|
hdHttp.httpReq<string>(BasicConstant.isMaiLanExpert,hashMap).then(async (res: HdResponse<string>) => {
|
||||||
|
this.dialog.close();
|
||||||
|
logger.info('Response isMaiLanExpert'+res);
|
||||||
|
let json:Record<string,string> = JSON.parse(res+'') as Record<string,string>;
|
||||||
|
if(json.code == '200') {
|
||||||
|
let isMaiLanExpert:string = json.isMaiLanExpert;
|
||||||
|
if (isMaiLanExpert == '1') {
|
||||||
|
this.isMaiLanHidden = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.error('麦兰:'+json.message)
|
||||||
|
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||||
|
}
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
this.dialog.close();
|
||||||
|
console.info(`Response fails: ${err}`);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
Column() {
|
||||||
|
HdNav({
|
||||||
|
title: '患者分组',
|
||||||
|
showRightIcon: false,
|
||||||
|
hasBorder: true,
|
||||||
|
rightText: '新建',
|
||||||
|
showRightText: true,
|
||||||
|
isLeftAction:this.params?true:false,
|
||||||
|
leftItemAction:()=>{
|
||||||
|
HMRouterMgr.pop()
|
||||||
|
},
|
||||||
|
rightItemAction: () => {
|
||||||
|
HMRouterMgr.push({pageUrl:'BuildOrEditGroupPage',param:{"title":"新建分组"}})
|
||||||
|
// router.pushUrl({
|
||||||
|
// url: 'pages/PatientsPage/BuildOrEditGroupPage',
|
||||||
|
// params:{"title":"新建分组"}
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
Stack() {
|
||||||
|
Row() {
|
||||||
|
Row() {
|
||||||
|
Text(this.groupSort)
|
||||||
|
.fontSize(16).fontColor(this.isGroupSelected ? $r('app.color.main_color') : '#333333')
|
||||||
|
Image(this.isGroupSelected ?$r('app.media.triangle_green_theme'):$r('app.media.triangle_normal')).width(10).height(10)
|
||||||
|
}
|
||||||
|
.width('50%')
|
||||||
|
.height(48)
|
||||||
|
.backgroundColor(Color.White)
|
||||||
|
.justifyContent(FlexAlign.Center)
|
||||||
|
.onClick(() => {
|
||||||
|
this.groupSortSelected = !this.groupSortSelected
|
||||||
|
this.innerSortSelected = false
|
||||||
|
})
|
||||||
|
|
||||||
|
Blank()
|
||||||
|
.width(1).height(20).margin({ top: 15 })
|
||||||
|
Row() {
|
||||||
|
Text(this.innerSort)
|
||||||
|
.fontSize(16).fontColor(this.IsInnerSelected ? $r('app.color.main_color') : '#333333')
|
||||||
|
Image(this.IsInnerSelected ?$r('app.media.triangle_green_theme'):$r('app.media.triangle_normal')).width(10).height(10)
|
||||||
|
}
|
||||||
|
.width('50%')
|
||||||
|
.height(48)
|
||||||
|
.backgroundColor(Color.White)
|
||||||
|
.justifyContent(FlexAlign.Center)
|
||||||
|
.onClick(() => {
|
||||||
|
this.innerSortSelected = !this.innerSortSelected
|
||||||
|
this.groupSortSelected = false
|
||||||
|
})
|
||||||
|
}.width('100%').height(55).backgroundColor('#f4f4f4')
|
||||||
|
|
||||||
|
List() {
|
||||||
|
ForEach(this.groupListArray, (sectionModel: groupModel,index:number) => {
|
||||||
|
ListItemGroup({ header: this.itemHeaderView(sectionModel,index) }) {
|
||||||
|
ForEach(sectionModel.isShow ? sectionModel.patientList : [], (rowModel: patientListModel) => {
|
||||||
|
ListItem() {
|
||||||
|
Stack() {
|
||||||
|
Row({ space: 15 }) {
|
||||||
|
Image(BasicConstant.urlImage + rowModel.photo)
|
||||||
|
.alt($r('app.media.userPhoto_default'))
|
||||||
|
.width(54)
|
||||||
|
.height(54)
|
||||||
|
.borderRadius(6)
|
||||||
|
.margin({ left: 15 })
|
||||||
|
Text(rowModel.nickname ? rowModel.nickname : rowModel.realName)
|
||||||
|
.fontSize(16).fontColor('#666666')
|
||||||
|
if (Number(rowModel.type) === 0) {
|
||||||
|
Image($r('app.media.group_vip'))
|
||||||
|
.objectFit(ImageFit.Cover)
|
||||||
|
.width(10).height(10)
|
||||||
|
}
|
||||||
|
}.width('100%').height(80)
|
||||||
|
|
||||||
|
Text('随访于' + rowModel.join_date?.substring(0, 10))
|
||||||
|
.fontSize(14)
|
||||||
|
.fontColor('#999999')
|
||||||
|
.textAlign(TextAlign.End)
|
||||||
|
.margin({ right: 15 })
|
||||||
|
.height(30)
|
||||||
|
Row()
|
||||||
|
.width('95%').height(0.5)
|
||||||
|
.backgroundColor('#999999')
|
||||||
|
}.width('100%').height(80).alignContent(Alignment.BottomEnd)
|
||||||
|
.onClick(()=>{
|
||||||
|
HMRouterMgr.push({pageUrl:'PatientDetailsComp',param:{"patient_uuid":rowModel.uuid}})
|
||||||
|
// router.pushUrl({
|
||||||
|
// url:'pages/PatientsPage/PatientDetailsPage',
|
||||||
|
// params:{"patient_uuid":rowModel.uuid}
|
||||||
|
// })
|
||||||
|
})
|
||||||
|
}.width('100%')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
.width('100%')
|
||||||
|
.height('calc(100% - 55vp - 56vp)')
|
||||||
|
.backgroundColor('#f4f4f4')
|
||||||
|
.scrollBar(BarState.Off)
|
||||||
|
.sticky(StickyStyle.Header)
|
||||||
|
.margin({top:55})
|
||||||
|
|
||||||
|
List() {
|
||||||
|
ForEach(this.groupSortList, (item: sortModel) => {
|
||||||
|
ListItem() {
|
||||||
|
Column() {
|
||||||
|
Row() {
|
||||||
|
Text(item.name)
|
||||||
|
.fontSize(16)
|
||||||
|
.fontColor(item.isSeleted ? $r('app.color.main_color') : 'rgba(144,144,144)')
|
||||||
|
.margin({ left: 20 })
|
||||||
|
Blank()
|
||||||
|
if (item.isSeleted) {
|
||||||
|
Image($r('app.media.chose_card'))
|
||||||
|
.width(20).height(20).margin({ right: 25 })
|
||||||
|
}
|
||||||
|
}.width('100%').height(50).backgroundColor(Color.White)
|
||||||
|
|
||||||
|
Blank()
|
||||||
|
.width('100%').height(1).backgroundColor($r('app.color.main_color')).margin({left:20})
|
||||||
|
}.onClick(()=>{
|
||||||
|
this.isGroupSelected = true;
|
||||||
|
this.innerSortSelected = false
|
||||||
|
this.groupSortSelected = false
|
||||||
|
this.groupSort = String(item.name);
|
||||||
|
this.group_sort = item.name == '按首字母' ? '0' : '1'
|
||||||
|
this.groupSortList.forEach((element: sortModel) => {
|
||||||
|
element.isSeleted = false
|
||||||
|
})
|
||||||
|
const indexof = this.groupSortList.indexOf(item)
|
||||||
|
if (indexof !== -1) {
|
||||||
|
this.groupSortList[indexof].isSeleted = true
|
||||||
|
}
|
||||||
|
this.groupSortList = [...this.groupSortList]
|
||||||
|
this.getGroupData()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}.width('100%').height('calc(100% - 55vp)').backgroundColor('rgba(0,0,0,0.5)').margin({top:55})
|
||||||
|
.visibility(this.groupSortSelected?Visibility.Visible:Visibility.Hidden)
|
||||||
|
|
||||||
|
List() {
|
||||||
|
ForEach(this.innerSortList, (item: sortModel) => {
|
||||||
|
ListItem() {
|
||||||
|
Column() {
|
||||||
|
Row() {
|
||||||
|
Text(item.name)
|
||||||
|
.fontSize(16)
|
||||||
|
.fontColor(item.isSeleted ? $r('app.color.main_color') : 'rgba(144,144,144)')
|
||||||
|
.margin({ left: 20 })
|
||||||
|
Blank()
|
||||||
|
if (item.isSeleted) {
|
||||||
|
Image($r('app.media.chose_card'))
|
||||||
|
.width(20).height(20).margin({ right: 25 })
|
||||||
|
}
|
||||||
|
}.width('100%').height(50).backgroundColor(Color.White)
|
||||||
|
|
||||||
|
Blank()
|
||||||
|
.width('95%').height(1).backgroundColor($r('app.color.main_color'))
|
||||||
|
}
|
||||||
|
.onClick(()=>{
|
||||||
|
this.IsInnerSelected = true
|
||||||
|
this.innerSortSelected = false
|
||||||
|
this.groupSortSelected = false
|
||||||
|
this.innerSort = String(item.name);
|
||||||
|
this.list_sort = item.name == '按首字母' ? '0' : '1'
|
||||||
|
this.innerSortList.forEach((element: sortModel) => {
|
||||||
|
element.isSeleted = false
|
||||||
|
});
|
||||||
|
const indexof = this.innerSortList.indexOf(item)
|
||||||
|
if (indexof !== -1) {
|
||||||
|
this.innerSortList[indexof].isSeleted = true
|
||||||
|
}
|
||||||
|
this.innerSortList = [...this.innerSortList]
|
||||||
|
this.getGroupData()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}.width('100%').height('calc(100% - 55vp)').backgroundColor('rgba(0,0,0,0.5)').margin({top:55})
|
||||||
|
.visibility(this.innerSortSelected?Visibility.Visible:Visibility.Hidden)
|
||||||
|
|
||||||
|
Image($r('app.media.lifetime_right_icon'))
|
||||||
|
.width(76).height(40)
|
||||||
|
.position({ x: '80%', y: '80%' }) // 定位到右下角
|
||||||
|
.visibility(this.isMaiLanHidden?Visibility.Visible:Visibility.Hidden)
|
||||||
|
|
||||||
|
}.width('100%').height('calc(100% - 56vp)').backgroundColor('#f4f4f4').alignContent(Alignment.TopStart)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
itemHeaderView(model:groupModel,index:number) {
|
||||||
|
Column() {
|
||||||
|
Row() {
|
||||||
|
Image(model.isShow ? $r('app.media.group_turnDown') : $r('app.media.group_turnRight'))
|
||||||
|
.width(model.isShow ? 10 : 5).height(model.isShow ? 5 : 10).margin({ left: 15 })
|
||||||
|
Text(model.name + ' | ' + model.patientNum)
|
||||||
|
.fontSize(16)
|
||||||
|
.fontColor('#333333')
|
||||||
|
.margin({ left: 15 })
|
||||||
|
.layoutWeight(1)
|
||||||
|
Text('编辑')
|
||||||
|
.width(60)
|
||||||
|
.height(60)
|
||||||
|
.fontSize(15)
|
||||||
|
.fontColor('#981308')
|
||||||
|
.margin({ right: 15 })
|
||||||
|
.textAlign(TextAlign.End)
|
||||||
|
.visibility(model.name != '待分组患者'?Visibility.Visible:Visibility.Hidden)
|
||||||
|
.onClick(()=>{
|
||||||
|
const pathInfo1: HMRouterPathInfo = {
|
||||||
|
pageUrl: 'BuildOrEditGroupPage',
|
||||||
|
param:{"title":"编辑分组","group_uuid":model.uuid,"group_name":model.name}
|
||||||
|
};
|
||||||
|
const callback: HMRouterPathCallback = {
|
||||||
|
onResult: (popInfo: PopInfo) => {
|
||||||
|
const result = popInfo.result as Record<string,string>
|
||||||
|
const isFreash = Boolean(result.nameString)
|
||||||
|
if (isFreash) {
|
||||||
|
this.getGroupData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
HMRouterMgr.push(pathInfo1,callback)
|
||||||
|
// router.pushUrl({
|
||||||
|
// url: 'pages/PatientsPage/BuildOrEditGroupPage',
|
||||||
|
// params:{"title":"编辑分组","group_uuid":model.uuid,"group_name":model.name}
|
||||||
|
// })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
.width('100%')
|
||||||
|
.height(60)
|
||||||
|
.onClick(() => {
|
||||||
|
let newModel = new groupModel(model);
|
||||||
|
newModel.isShow = !model.isShow;
|
||||||
|
this.groupListArray[index] = newModel;
|
||||||
|
this.groupListArray = [...this.groupListArray];
|
||||||
|
})
|
||||||
|
Blank()
|
||||||
|
.width('100%').height(1).backgroundColor('#666666')
|
||||||
|
}.width('100%').height(61).backgroundColor(Color.White)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class sortModel {
|
||||||
|
name?:string;
|
||||||
|
isSeleted:boolean = false;
|
||||||
|
}
|
||||||
@ -1,28 +1,32 @@
|
|||||||
import { authStore, HdNav, PositionSelectedSheet } from '@itcast/basic';
|
import { authStore, HdNav, PositionSelectedSheet } from '@itcast/basic';
|
||||||
import { promptAction } from '@kit.ArkUI'
|
import { promptAction } from '@kit.ArkUI'
|
||||||
import { HdLoadingDialog } from '@itcast/basic'
|
import { HdLoadingDialog } from '@itcast/basic'
|
||||||
import { BasicConstant,hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
|
import { BasicConstant, hdHttp, HdResponse, logger } from '@itcast/basic/Index'
|
||||||
import { BusinessError } from '@kit.BasicServicesKit';
|
import { BusinessError } from '@kit.BasicServicesKit';
|
||||||
import HashMap from '@ohos.util.HashMap';
|
import HashMap from '@ohos.util.HashMap';
|
||||||
import { groupRequest,groupRequestCall,groupModel,patientListModel } from '../models/PatientsGroupModel'
|
import { groupRequest, groupRequestCall, groupModel, patientListModel,PatientDataSource } from '../models/PatientsGroupModel'
|
||||||
import { HMRouterMgr, HMRouterPathInfo, HMRouterPathCallback, HMRouter } from "@hadss/hmrouter"
|
import { HMRouterMgr, HMRouterPathInfo, HMRouterPathCallback, HMRouter, HMLifecycleState } from "@hadss/hmrouter"
|
||||||
|
|
||||||
@HMRouter({ pageUrl: 'PatientsGroup' })
|
@HMRouter({ pageUrl: 'PatientsGroup' })
|
||||||
@Component
|
@Component
|
||||||
export struct PatientsGroup {
|
export struct PatientsGroup {
|
||||||
@State groupSort: string = '分组排序'
|
@State groupSort: string = '分组排序'
|
||||||
@State innerSort: string = '组内排序'
|
@State innerSort: string = '组内排序'
|
||||||
@State groupSortList:sortModel[] = [];
|
@State groupSortList: sortModel[] = [];
|
||||||
@State innerSortList:sortModel[] = [];
|
@State innerSortList: sortModel[] = [];
|
||||||
@State groupSortSelected: boolean = false//是否展开
|
@State groupSortSelected: boolean = false //是否展开
|
||||||
@State innerSortSelected: boolean = false//是否展开
|
@State innerSortSelected: boolean = false //是否展开
|
||||||
@State isGroupSelected: boolean = false//是否选中
|
@State isGroupSelected: boolean = false //是否选中
|
||||||
@State IsInnerSelected: boolean = false//是否选中
|
@State IsInnerSelected: boolean = false //是否选中
|
||||||
@State isMaiLanHidden:boolean = false;//麦兰项目是否显示
|
@State isMaiLanHidden: boolean = false; //麦兰项目是否显示
|
||||||
@State group_sort:string = '0'
|
@State group_sort: string = '0'
|
||||||
@State list_sort:string = '0'
|
@State list_sort: string = '0'
|
||||||
@State groupListArray: groupModel[] = []
|
@State groupListArray: groupModel[] = []
|
||||||
private params: ESObject = HMRouterMgr.getCurrentParam()
|
private params: ESObject = HMRouterMgr.getCurrentParam()
|
||||||
|
private lifecycleOwner = HMRouterMgr.getCurrentLifecycleOwner()
|
||||||
|
private handleCallback = () => {
|
||||||
|
this.getGroupData()
|
||||||
|
}
|
||||||
|
|
||||||
dialog: CustomDialogController = new CustomDialogController({
|
dialog: CustomDialogController = new CustomDialogController({
|
||||||
builder: HdLoadingDialog({ message: '加载中...' }),
|
builder: HdLoadingDialog({ message: '加载中...' }),
|
||||||
@ -31,27 +35,37 @@ export struct PatientsGroup {
|
|||||||
})
|
})
|
||||||
|
|
||||||
aboutToAppear(): void {
|
aboutToAppear(): void {
|
||||||
this.getGroupData()
|
// this.getGroupData()
|
||||||
this.getIsMaiLanData()
|
// this.getIsMaiLanData()
|
||||||
this.groupSortList = [{"name":"按首字母","isSeleted":false} as sortModel,{"name":"分组人数","isSeleted":false} as sortModel]
|
this.groupSortList = [{ "name": "按首字母", "isSeleted": false } as sortModel, { "name": "分组人数", "isSeleted": false } as sortModel]
|
||||||
this.innerSortList = [{"name":"按首字母","isSeleted":false} as sortModel,{"name":"随访时间","isSeleted":false} as sortModel]
|
this.innerSortList = [{ "name": "按首字母", "isSeleted": false } as sortModel, { "name": "随访时间", "isSeleted": false } as sortModel]
|
||||||
|
this.lifecycleOwner?.addObserver(HMLifecycleState.onShown,this.handleCallback)
|
||||||
}
|
}
|
||||||
|
|
||||||
getGroupData(){
|
aboutToDisappear(): void {
|
||||||
|
this.lifecycleOwner?.removeObserver(HMLifecycleState.onShown,this.handleCallback)
|
||||||
|
}
|
||||||
|
|
||||||
|
getGroupData() {
|
||||||
this.dialog.open()
|
this.dialog.open()
|
||||||
|
this.groupListArray = []
|
||||||
hdHttp.post<string>(BasicConstant.groupList, {
|
hdHttp.post<string>(BasicConstant.groupList, {
|
||||||
expert_uuid: authStore.getUser().uuid,
|
expert_uuid: authStore.getUser().uuid,
|
||||||
group_sort:this.group_sort,
|
group_sort: this.group_sort,
|
||||||
list_sort:this.list_sort
|
list_sort: this.list_sort
|
||||||
} as groupRequest).then(async (res: HdResponse<string>) => {
|
} as groupRequest).then(async (res: HdResponse<string>) => {
|
||||||
this.dialog.close();
|
this.dialog.close();
|
||||||
this.groupListArray = []
|
logger.info('Response groupList' + res);
|
||||||
logger.info('Response groupList'+res);
|
let json: groupRequestCall = JSON.parse(res + '') as groupRequestCall;
|
||||||
let json:groupRequestCall = JSON.parse(res+'') as groupRequestCall;
|
if (json.code == 1) {
|
||||||
if(json.code == 1) {
|
// 初始化每个分组的数据源
|
||||||
this.groupListArray = json.data
|
this.groupListArray = json.data.map(group => {
|
||||||
|
group.isShow = false
|
||||||
|
group.dataSource = new PatientDataSource(group.patientList || [])
|
||||||
|
return group
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
console.error('患者分组列表失败:'+json.message)
|
console.error('患者分组列表失败:' + json.message)
|
||||||
promptAction.showToast({ message: json.message, duration: 1000 })
|
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||||
}
|
}
|
||||||
}).catch((err: BusinessError) => {
|
}).catch((err: BusinessError) => {
|
||||||
@ -63,17 +77,17 @@ export struct PatientsGroup {
|
|||||||
getIsMaiLanData() {
|
getIsMaiLanData() {
|
||||||
const hashMap: HashMap<string, string> = new HashMap();
|
const hashMap: HashMap<string, string> = new HashMap();
|
||||||
this.dialog.open()
|
this.dialog.open()
|
||||||
hdHttp.httpReq<string>(BasicConstant.isMaiLanExpert,hashMap).then(async (res: HdResponse<string>) => {
|
hdHttp.httpReq<string>(BasicConstant.isMaiLanExpert, hashMap).then(async (res: HdResponse<string>) => {
|
||||||
this.dialog.close();
|
this.dialog.close();
|
||||||
logger.info('Response isMaiLanExpert'+res);
|
logger.info('Response isMaiLanExpert' + res);
|
||||||
let json:Record<string,string> = JSON.parse(res+'') as Record<string,string>;
|
let json: Record<string, string> = JSON.parse(res + '') as Record<string, string>;
|
||||||
if(json.code == '200') {
|
if (json.code == '200') {
|
||||||
let isMaiLanExpert:string = json.isMaiLanExpert;
|
let isMaiLanExpert: string = json.isMaiLanExpert;
|
||||||
if (isMaiLanExpert == '1') {
|
if (isMaiLanExpert == '1') {
|
||||||
this.isMaiLanHidden = true;
|
this.isMaiLanHidden = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error('麦兰:'+json.message)
|
console.error('麦兰:' + json.message)
|
||||||
promptAction.showToast({ message: json.message, duration: 1000 })
|
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||||
}
|
}
|
||||||
}).catch((err: BusinessError) => {
|
}).catch((err: BusinessError) => {
|
||||||
@ -90,16 +104,12 @@ export struct PatientsGroup {
|
|||||||
hasBorder: true,
|
hasBorder: true,
|
||||||
rightText: '新建',
|
rightText: '新建',
|
||||||
showRightText: true,
|
showRightText: true,
|
||||||
isLeftAction:this.params?true:false,
|
isLeftAction: this.params ? true : false,
|
||||||
leftItemAction:()=>{
|
leftItemAction: () => {
|
||||||
HMRouterMgr.pop()
|
HMRouterMgr.pop()
|
||||||
},
|
},
|
||||||
rightItemAction: () => {
|
rightItemAction: () => {
|
||||||
HMRouterMgr.push({pageUrl:'BuildOrEditGroupPage',param:{"title":"新建分组"}})
|
HMRouterMgr.push({ pageUrl: 'BuildOrEditGroupPage', param: { "title": "新建分组" } })
|
||||||
// router.pushUrl({
|
|
||||||
// url: 'pages/PatientsPage/BuildOrEditGroupPage',
|
|
||||||
// params:{"title":"新建分组"}
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Stack() {
|
Stack() {
|
||||||
@ -107,7 +117,7 @@ export struct PatientsGroup {
|
|||||||
Row() {
|
Row() {
|
||||||
Text(this.groupSort)
|
Text(this.groupSort)
|
||||||
.fontSize(16).fontColor(this.isGroupSelected ? $r('app.color.main_color') : '#333333')
|
.fontSize(16).fontColor(this.isGroupSelected ? $r('app.color.main_color') : '#333333')
|
||||||
Image(this.isGroupSelected ?$r('app.media.triangle_green_theme'):$r('app.media.triangle_normal')).width(10).height(10)
|
Image(this.isGroupSelected ? $r('app.media.triangle_green_theme') : $r('app.media.triangle_normal')).width(10).height(10)
|
||||||
}
|
}
|
||||||
.width('50%')
|
.width('50%')
|
||||||
.height(48)
|
.height(48)
|
||||||
@ -123,7 +133,7 @@ export struct PatientsGroup {
|
|||||||
Row() {
|
Row() {
|
||||||
Text(this.innerSort)
|
Text(this.innerSort)
|
||||||
.fontSize(16).fontColor(this.IsInnerSelected ? $r('app.color.main_color') : '#333333')
|
.fontSize(16).fontColor(this.IsInnerSelected ? $r('app.color.main_color') : '#333333')
|
||||||
Image(this.IsInnerSelected ?$r('app.media.triangle_green_theme'):$r('app.media.triangle_normal')).width(10).height(10)
|
Image(this.IsInnerSelected ? $r('app.media.triangle_green_theme') : $r('app.media.triangle_normal')).width(10).height(10)
|
||||||
}
|
}
|
||||||
.width('50%')
|
.width('50%')
|
||||||
.height(48)
|
.height(48)
|
||||||
@ -136,46 +146,54 @@ export struct PatientsGroup {
|
|||||||
}.width('100%').height(55).backgroundColor('#f4f4f4')
|
}.width('100%').height(55).backgroundColor('#f4f4f4')
|
||||||
|
|
||||||
List() {
|
List() {
|
||||||
ForEach(this.groupListArray, (sectionModel: groupModel,index:number) => {
|
ForEach(this.groupListArray, (sectionModel: groupModel, index: number) => {
|
||||||
ListItemGroup({ header: this.itemHeaderView(sectionModel,index) }) {
|
ListItemGroup({ header: this.itemHeaderView(sectionModel, index) }) {
|
||||||
ForEach(sectionModel.isShow ? sectionModel.patientList : [], (rowModel: patientListModel) => {
|
// 仅当分组展开时才渲染患者列表
|
||||||
ListItem() {
|
if (sectionModel.isShow) {
|
||||||
Stack() {
|
// 使用LazyForEach渲染大量数据
|
||||||
Row({ space: 15 }) {
|
LazyForEach(sectionModel.dataSource as PatientDataSource, (rowModel: patientListModel, rowIndex: number) => {
|
||||||
Image(BasicConstant.urlImage + rowModel.photo)
|
ListItem() {
|
||||||
.alt($r('app.media.userPhoto_default'))
|
Stack() {
|
||||||
.width(54)
|
Row({ space: 15 }) {
|
||||||
.height(54)
|
Image(BasicConstant.urlImage + rowModel.photo)
|
||||||
.borderRadius(6)
|
.alt($r('app.media.userPhoto_default'))
|
||||||
.margin({ left: 15 })
|
.width(54)
|
||||||
Text(rowModel.nickname ? rowModel.nickname : rowModel.realName)
|
.height(54)
|
||||||
.fontSize(16).fontColor('#666666')
|
.borderRadius(6)
|
||||||
if (Number(rowModel.type) === 0) {
|
.margin({ left: 15 })
|
||||||
Image($r('app.media.group_vip'))
|
Text(rowModel.nickname ? rowModel.nickname : rowModel.realName)
|
||||||
.objectFit(ImageFit.Cover)
|
.fontSize(16).fontColor('#666666')
|
||||||
.width(10).height(10)
|
if (Number(rowModel.type) === 0) {
|
||||||
}
|
Image($r('app.media.group_vip'))
|
||||||
}.width('100%').height(80)
|
.objectFit(ImageFit.Cover)
|
||||||
|
.width(10).height(10)
|
||||||
|
}
|
||||||
|
}.width('100%').height(80)
|
||||||
|
|
||||||
Text('随访于' + rowModel.join_date?.substring(0, 10))
|
Text('随访于' + rowModel.join_date?.substring(0, 10))
|
||||||
.fontSize(14)
|
.fontSize(14)
|
||||||
.fontColor('#999999')
|
.fontColor('#999999')
|
||||||
.textAlign(TextAlign.End)
|
.textAlign(TextAlign.End)
|
||||||
.margin({ right: 15 })
|
.margin({ right: 15 })
|
||||||
.height(30)
|
.height(30)
|
||||||
Row()
|
Row()
|
||||||
.width('95%').height(0.5)
|
.width('95%').height(0.5)
|
||||||
.backgroundColor('#999999')
|
.backgroundColor('#999999')
|
||||||
}.width('100%').height(80).alignContent(Alignment.BottomEnd)
|
}.width('100%').height(80).alignContent(Alignment.BottomEnd)
|
||||||
.onClick(()=>{
|
.onClick(() => {
|
||||||
HMRouterMgr.push({pageUrl:'PatientDetailsComp',param:{"patient_uuid":rowModel.uuid}})
|
HMRouterMgr.push({
|
||||||
// router.pushUrl({
|
pageUrl: 'PatientDetailsComp',
|
||||||
// url:'pages/PatientsPage/PatientDetailsPage',
|
param: { "patient_uuid": rowModel.uuid }
|
||||||
// params:{"patient_uuid":rowModel.uuid}
|
}, {
|
||||||
// })
|
onResult: () => {
|
||||||
})
|
// 从详情页返回时刷新整个列表
|
||||||
}.width('100%')
|
this.getGroupData();
|
||||||
})
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}.width('100%')
|
||||||
|
}, (rowModel: patientListModel) => rowModel.uuid)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -184,7 +202,7 @@ export struct PatientsGroup {
|
|||||||
.backgroundColor('#f4f4f4')
|
.backgroundColor('#f4f4f4')
|
||||||
.scrollBar(BarState.Off)
|
.scrollBar(BarState.Off)
|
||||||
.sticky(StickyStyle.Header)
|
.sticky(StickyStyle.Header)
|
||||||
.margin({top:55})
|
.margin({ top: 55 })
|
||||||
|
|
||||||
List() {
|
List() {
|
||||||
ForEach(this.groupSortList, (item: sortModel) => {
|
ForEach(this.groupSortList, (item: sortModel) => {
|
||||||
@ -203,8 +221,8 @@ export struct PatientsGroup {
|
|||||||
}.width('100%').height(50).backgroundColor(Color.White)
|
}.width('100%').height(50).backgroundColor(Color.White)
|
||||||
|
|
||||||
Blank()
|
Blank()
|
||||||
.width('100%').height(1).backgroundColor($r('app.color.main_color')).margin({left:20})
|
.width('100%').height(1).backgroundColor($r('app.color.main_color')).margin({ left: 20 })
|
||||||
}.onClick(()=>{
|
}.onClick(() => {
|
||||||
this.isGroupSelected = true;
|
this.isGroupSelected = true;
|
||||||
this.innerSortSelected = false
|
this.innerSortSelected = false
|
||||||
this.groupSortSelected = false
|
this.groupSortSelected = false
|
||||||
@ -222,8 +240,8 @@ export struct PatientsGroup {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}.width('100%').height('calc(100% - 55vp)').backgroundColor('rgba(0,0,0,0.5)').margin({top:55})
|
}.width('100%').height('calc(100% - 55vp)').backgroundColor('rgba(0,0,0,0.5)').margin({ top: 55 })
|
||||||
.visibility(this.groupSortSelected?Visibility.Visible:Visibility.Hidden)
|
.visibility(this.groupSortSelected ? Visibility.Visible : Visibility.Hidden)
|
||||||
|
|
||||||
List() {
|
List() {
|
||||||
ForEach(this.innerSortList, (item: sortModel) => {
|
ForEach(this.innerSortList, (item: sortModel) => {
|
||||||
@ -244,7 +262,7 @@ export struct PatientsGroup {
|
|||||||
Blank()
|
Blank()
|
||||||
.width('95%').height(1).backgroundColor($r('app.color.main_color'))
|
.width('95%').height(1).backgroundColor($r('app.color.main_color'))
|
||||||
}
|
}
|
||||||
.onClick(()=>{
|
.onClick(() => {
|
||||||
this.IsInnerSelected = true
|
this.IsInnerSelected = true
|
||||||
this.innerSortSelected = false
|
this.innerSortSelected = false
|
||||||
this.groupSortSelected = false
|
this.groupSortSelected = false
|
||||||
@ -262,20 +280,20 @@ export struct PatientsGroup {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}.width('100%').height('calc(100% - 55vp)').backgroundColor('rgba(0,0,0,0.5)').margin({top:55})
|
}.width('100%').height('calc(100% - 55vp)').backgroundColor('rgba(0,0,0,0.5)').margin({ top: 55 })
|
||||||
.visibility(this.innerSortSelected?Visibility.Visible:Visibility.Hidden)
|
.visibility(this.innerSortSelected ? Visibility.Visible : Visibility.Hidden)
|
||||||
|
|
||||||
Image($r('app.media.lifetime_right_icon'))
|
Image($r('app.media.lifetime_right_icon'))
|
||||||
.width(76).height(40)
|
.width(76).height(40)
|
||||||
.position({ x: '80%', y: '80%' }) // 定位到右下角
|
.position({ x: '80%', y: '80%' }) // 定位到右下角
|
||||||
.visibility(this.isMaiLanHidden?Visibility.Visible:Visibility.Hidden)
|
.visibility(this.isMaiLanHidden ? Visibility.Visible : Visibility.Hidden)
|
||||||
|
|
||||||
}.width('100%').height('calc(100% - 56vp)').backgroundColor('#f4f4f4').alignContent(Alignment.TopStart)
|
}.width('100%').height('calc(100% - 56vp)').backgroundColor('#f4f4f4').alignContent(Alignment.TopStart)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Builder
|
@Builder
|
||||||
itemHeaderView(model:groupModel,index:number) {
|
itemHeaderView(model: groupModel, index: number) {
|
||||||
Column() {
|
Column() {
|
||||||
Row() {
|
Row() {
|
||||||
Image(model.isShow ? $r('app.media.group_turnDown') : $r('app.media.group_turnRight'))
|
Image(model.isShow ? $r('app.media.group_turnDown') : $r('app.media.group_turnRight'))
|
||||||
@ -292,35 +310,34 @@ export struct PatientsGroup {
|
|||||||
.fontColor('#981308')
|
.fontColor('#981308')
|
||||||
.margin({ right: 15 })
|
.margin({ right: 15 })
|
||||||
.textAlign(TextAlign.End)
|
.textAlign(TextAlign.End)
|
||||||
.visibility(model.name != '待分组患者'?Visibility.Visible:Visibility.Hidden)
|
.visibility(model.name != '待分组患者' ? Visibility.Visible : Visibility.Hidden)
|
||||||
.onClick(()=>{
|
.onClick(() => {
|
||||||
const pathInfo1: HMRouterPathInfo = {
|
const pathInfo1: HMRouterPathInfo = {
|
||||||
pageUrl: 'BuildOrEditGroupPage',
|
pageUrl: 'BuildOrEditGroupPage',
|
||||||
param:{"title":"编辑分组","group_uuid":model.uuid,"group_name":model.name}
|
param: { "title": "编辑分组", "group_uuid": model.uuid, "group_name": model.name }
|
||||||
};
|
};
|
||||||
const callback: HMRouterPathCallback = {
|
const callback: HMRouterPathCallback = {
|
||||||
onResult: (popInfo: PopInfo) => {
|
onResult: (popInfo: PopInfo) => {
|
||||||
const result = popInfo.result as Record<string,string>
|
const result = popInfo.result as Record<string, string>
|
||||||
const isFreash = Boolean(result.nameString)
|
const isFreash = Boolean(result.nameString)
|
||||||
if (isFreash) {
|
if (isFreash) {
|
||||||
this.getGroupData()
|
this.getGroupData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
HMRouterMgr.push(pathInfo1,callback)
|
HMRouterMgr.push(pathInfo1, callback)
|
||||||
// router.pushUrl({
|
|
||||||
// url: 'pages/PatientsPage/BuildOrEditGroupPage',
|
|
||||||
// params:{"title":"编辑分组","group_uuid":model.uuid,"group_name":model.name}
|
|
||||||
// })
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
.width('100%')
|
.width('100%')
|
||||||
.height(60)
|
.height(60)
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
let newModel = new groupModel(model);
|
// 找到对应的分组并更新状态
|
||||||
newModel.isShow = !model.isShow;
|
const groupIndex = this.groupListArray.findIndex(group => group.uuid === model.uuid)
|
||||||
this.groupListArray[index] = newModel;
|
if (groupIndex !== -1) {
|
||||||
this.groupListArray = [...this.groupListArray];
|
this.groupListArray[groupIndex].isShow = !this.groupListArray[groupIndex].isShow
|
||||||
|
// 强制触发UI更新
|
||||||
|
this.groupListArray = [...this.groupListArray]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
Blank()
|
Blank()
|
||||||
.width('100%').height(1).backgroundColor('#666666')
|
.width('100%').height(1).backgroundColor('#666666')
|
||||||
@ -329,6 +346,6 @@ export struct PatientsGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class sortModel {
|
export class sortModel {
|
||||||
name?:string;
|
name?: string;
|
||||||
isSeleted:boolean = false;
|
isSeleted: boolean = false;
|
||||||
}
|
}
|
||||||
@ -1,63 +1,188 @@
|
|||||||
|
// export interface groupRequest {
|
||||||
|
// expert_uuid:string,
|
||||||
|
// group_sort:string,
|
||||||
|
// list_sort:string,
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// export interface groupRequestCall {
|
||||||
|
// code:number,
|
||||||
|
// msg:string,
|
||||||
|
// data:groupModel[],
|
||||||
|
// message:string,
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// export class groupModel {
|
||||||
|
// patientList:patientListModel[] = []
|
||||||
|
// patientNum:number = 0
|
||||||
|
// expert_uuid:string = ''
|
||||||
|
// name:string = ''
|
||||||
|
// type:number = 0
|
||||||
|
// uuid:string = ''
|
||||||
|
// isShow:boolean = false
|
||||||
|
// isSelected:boolean = false
|
||||||
|
//
|
||||||
|
// constructor(data: groupModel) {
|
||||||
|
// this.patientList = data.patientList
|
||||||
|
// this.patientNum = data.patientNum
|
||||||
|
// this.expert_uuid = data.expert_uuid
|
||||||
|
// this.name = data.name
|
||||||
|
// this.type = data.type
|
||||||
|
// this.uuid = data.uuid
|
||||||
|
// this.isShow = data.isShow
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// export class patientListModel {
|
||||||
|
// nickname?:string;
|
||||||
|
// is_start?:string;
|
||||||
|
// join_date?:string;
|
||||||
|
// note?:string;
|
||||||
|
// type?:string;
|
||||||
|
// photo?:string;
|
||||||
|
// birthDate?:string;
|
||||||
|
// uuid?:string;
|
||||||
|
// isEnable?:string;
|
||||||
|
// height?:string;
|
||||||
|
// ctdidId?:string;
|
||||||
|
// mobile?:string;
|
||||||
|
// nation?:string;
|
||||||
|
// bloodType?:string;
|
||||||
|
// fixedTelephone?:string;
|
||||||
|
// mailingAddress?:string;
|
||||||
|
// postalCode?:string;
|
||||||
|
// detailed_address?:string;
|
||||||
|
// weight?:string;
|
||||||
|
// diagnosis?:string;
|
||||||
|
// sex?:string;
|
||||||
|
// provId?:string;
|
||||||
|
// countyId?:string;
|
||||||
|
// cityId?:string;
|
||||||
|
// realName?:string;
|
||||||
|
// realname?:string;
|
||||||
|
// isSelected:boolean = false;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// PatientsGroupModel.ts 文件
|
||||||
export interface groupRequest {
|
export interface groupRequest {
|
||||||
expert_uuid:string,
|
expert_uuid: string;
|
||||||
group_sort:string,
|
group_sort: string;
|
||||||
list_sort:string,
|
list_sort: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface groupRequestCall {
|
export interface groupRequestCall {
|
||||||
code:number,
|
code: number;
|
||||||
msg:string,
|
msg: string;
|
||||||
data:groupModel[],
|
data: groupModel[];
|
||||||
message:string,
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 定义患者列表数据源接口
|
||||||
|
interface IDataSource {
|
||||||
|
totalCount(): number;
|
||||||
|
getData(index: number): patientListModel;
|
||||||
|
registerDataChangeListener(listener: DataChangeListener): void;
|
||||||
|
unregisterDataChangeListener(listener: DataChangeListener): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 实现患者列表数据源
|
||||||
|
export class PatientDataSource implements IDataSource {
|
||||||
|
private patients: patientListModel[] = [];
|
||||||
|
private listeners: DataChangeListener[] = [];
|
||||||
|
|
||||||
|
constructor(patients: patientListModel[]) {
|
||||||
|
this.patients = patients || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
totalCount(): number {
|
||||||
|
return this.patients.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
getData(index: number): patientListModel {
|
||||||
|
return this.patients[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
registerDataChangeListener(listener: DataChangeListener): void {
|
||||||
|
this.listeners.push(listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
unregisterDataChangeListener(listener: DataChangeListener): void {
|
||||||
|
const pos = this.listeners.indexOf(listener);
|
||||||
|
if (pos >= 0) {
|
||||||
|
this.listeners.splice(pos, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyDataReload(): void {
|
||||||
|
this.listeners.forEach(listener => {
|
||||||
|
listener.onDataReloaded?.();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
updatePatients(newPatients: patientListModel[]): void {
|
||||||
|
this.patients = newPatients || [];
|
||||||
|
this.notifyDataReload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class groupModel {
|
export class groupModel {
|
||||||
patientList:patientListModel[] = []
|
patientList: patientListModel[] = [];
|
||||||
patientNum:number = 0
|
patientNum: number = 0;
|
||||||
expert_uuid:string = ''
|
expert_uuid: string = '';
|
||||||
name:string = ''
|
name: string = '';
|
||||||
type:number = 0
|
type: number = 0;
|
||||||
uuid:string = ''
|
uuid: string = '';
|
||||||
isShow:boolean = false
|
isShow: boolean = false;
|
||||||
isSelected:boolean = false
|
isSelected: boolean = false;
|
||||||
|
|
||||||
|
// 添加数据源属性
|
||||||
|
dataSource: PatientDataSource = new PatientDataSource([]);
|
||||||
|
|
||||||
constructor(data: groupModel) {
|
constructor(data: groupModel) {
|
||||||
this.patientList = data.patientList
|
this.patientList = data.patientList || [];
|
||||||
this.patientNum = data.patientNum
|
this.patientNum = data.patientNum || 0;
|
||||||
this.expert_uuid = data.expert_uuid
|
this.expert_uuid = data.expert_uuid || '';
|
||||||
this.name = data.name
|
this.name = data.name || '';
|
||||||
this.type = data.type
|
this.type = data.type || 0;
|
||||||
this.uuid = data.uuid
|
this.uuid = data.uuid || '';
|
||||||
this.isShow = data.isShow
|
this.isShow = data.isShow || false;
|
||||||
|
|
||||||
|
// 初始化数据源
|
||||||
|
this.dataSource = new PatientDataSource(this.patientList);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加更新患者列表的方法
|
||||||
|
updatePatientList(patients: patientListModel[]): void {
|
||||||
|
this.patientList = patients || [];
|
||||||
|
this.dataSource.updatePatients(this.patientList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class patientListModel {
|
export class patientListModel {
|
||||||
nickname?:string;
|
nickname?: string;
|
||||||
is_start?:string;
|
is_start?: string;
|
||||||
join_date?:string;
|
join_date?: string;
|
||||||
note?:string;
|
note?: string;
|
||||||
type?:string;
|
type?: string;
|
||||||
photo?:string;
|
photo?: string;
|
||||||
birthDate?:string;
|
birthDate?: string;
|
||||||
uuid?:string;
|
uuid?: string;
|
||||||
isEnable?:string;
|
isEnable?: string;
|
||||||
height?:string;
|
height?: string;
|
||||||
ctdidId?:string;
|
ctdidId?: string;
|
||||||
mobile?:string;
|
mobile?: string;
|
||||||
nation?:string;
|
nation?: string;
|
||||||
bloodType?:string;
|
bloodType?: string;
|
||||||
fixedTelephone?:string;
|
fixedTelephone?: string;
|
||||||
mailingAddress?:string;
|
mailingAddress?: string;
|
||||||
postalCode?:string;
|
postalCode?: string;
|
||||||
detailed_address?:string;
|
detailed_address?: string;
|
||||||
weight?:string;
|
weight?: string;
|
||||||
diagnosis?:string;
|
diagnosis?: string;
|
||||||
sex?:string;
|
sex?: string;
|
||||||
provId?:string;
|
provId?: string;
|
||||||
countyId?:string;
|
countyId?: string;
|
||||||
cityId?:string;
|
cityId?: string;
|
||||||
realName?:string;
|
realName?: string;
|
||||||
realname?:string;
|
realname?: string;
|
||||||
isSelected:boolean = false;
|
isSelected: boolean = false;
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user