From 85d23c150443024ea5fc7cad057f2897295c135a Mon Sep 17 00:00:00 2001 From: XiuYun CHEN Date: Fri, 25 Jul 2025 13:23:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E8=AF=8A=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/ets/constants/BasicConstant.ets | 8 + .../src/main/ets/utils/TimestampUtil.ets | 23 + .../resources/base/media/addoutpa_true.png | Bin 0 -> 2189 bytes .../main/resources/base/media/check_true.png | Bin 0 -> 2518 bytes .../main/resources/base/media/data_sign.png | Bin 0 -> 1716 bytes .../main/resources/base/media/delete_icon.png | Bin 0 -> 1249 bytes .../resources/base/media/delete_notice.png | Bin 0 -> 1633 bytes .../main/resources/base/media/edit_icon.png | Bin 0 -> 1532 bytes .../main/resources/base/media/send_feed.png | Bin 0 -> 4818 bytes .../mypage/src/main/ets/view/OneSection.ets | 2 +- features/netease/Index.ets | 4 +- .../main/ets/components/ItemCompArrange.ets | 236 +++++++ .../src/main/ets/components/ItemCompStop.ets | 175 ++++++ .../main/ets/model/ListOutPatientModel.ets | 41 ++ .../src/main/ets/model/PatientNoticeModel.ets | 14 + .../ets/model/StopOutPatientListModel.ets | 25 + .../src/main/ets/view/AddOutpatient.ets | 488 +++++++++++++++ .../src/main/ets/view/ArrangementsComp.ets | 181 ++++++ .../src/main/ets/view/MyOpinionComp.ets | 2 +- .../src/main/ets/view/OutpatientComp.ets | 29 + .../main/ets/view/OutpatientInformation.ets | 153 +++++ .../src/main/ets/view/PatientListComp.ets | 130 +++- .../src/main/ets/view/ReleaseOutpatient.ets | 577 ++++++++++++++++++ .../src/main/ets/view/StopNoticeComp.ets | 141 +++++ .../src/main/ets/view/TabBarOutComp.ets | 175 ++++++ .../main/ets/pages/Netease/OutpatientPage.ets | 38 ++ .../resources/base/profile/main_pages.json | 4 +- 27 files changed, 2422 insertions(+), 24 deletions(-) create mode 100644 commons/basic/src/main/resources/base/media/addoutpa_true.png create mode 100644 commons/basic/src/main/resources/base/media/check_true.png create mode 100644 commons/basic/src/main/resources/base/media/data_sign.png create mode 100644 commons/basic/src/main/resources/base/media/delete_icon.png create mode 100644 commons/basic/src/main/resources/base/media/delete_notice.png create mode 100644 commons/basic/src/main/resources/base/media/edit_icon.png create mode 100644 commons/basic/src/main/resources/base/media/send_feed.png create mode 100644 features/netease/src/main/ets/components/ItemCompArrange.ets create mode 100644 features/netease/src/main/ets/components/ItemCompStop.ets create mode 100644 features/netease/src/main/ets/model/ListOutPatientModel.ets create mode 100644 features/netease/src/main/ets/model/PatientNoticeModel.ets create mode 100644 features/netease/src/main/ets/model/StopOutPatientListModel.ets create mode 100644 features/netease/src/main/ets/view/AddOutpatient.ets create mode 100644 features/netease/src/main/ets/view/ArrangementsComp.ets create mode 100644 features/netease/src/main/ets/view/OutpatientComp.ets create mode 100644 features/netease/src/main/ets/view/OutpatientInformation.ets create mode 100644 features/netease/src/main/ets/view/ReleaseOutpatient.ets create mode 100644 features/netease/src/main/ets/view/StopNoticeComp.ets create mode 100644 features/netease/src/main/ets/view/TabBarOutComp.ets create mode 100644 products/expert/src/main/ets/pages/Netease/OutpatientPage.ets diff --git a/commons/basic/src/main/ets/constants/BasicConstant.ets b/commons/basic/src/main/ets/constants/BasicConstant.ets index b12abd8..68d0e43 100644 --- a/commons/basic/src/main/ets/constants/BasicConstant.ets +++ b/commons/basic/src/main/ets/constants/BasicConstant.ets @@ -95,6 +95,14 @@ export class BasicConstant { static readonly patientVideoType= BasicConstant.urlExpertApp +"patientVideoType";// 患者视频类型列表 static readonly patientVideoByName= BasicConstant.urlExpertApp +"patientVideoByName";//患教视频科普分享 static readonly patientListByGBK= BasicConstant.urlExpertApp +"patientListByGBK";// 我的患者列表 + static readonly deleteStopOutPatient= BasicConstant.urlExpertApp +"deleteStopOutPatient";// 删除停诊 + static readonly mailanNoticeGet= BasicConstant.urlExpertAPI+ "mailanNoticeGet";//获取患教公告 + static readonly mailanNoticeUpate= BasicConstant.urlExpertAPI+"mailanNoticeUpate";//修改患教公告 + static readonly mailanNoticeAdd= BasicConstant.urlExpertAPI+"mailanNoticeAdd";//添加患教公告 + static readonly addOutPatientA= BasicConstant.urlExpertApp+"addOutPatientA";//添加门诊安排 + static readonly addStopOutPatient= BasicConstant.urlExpertApp+"addStopOutPatient";//添加停诊安排 + static readonly deleteOutPatient= BasicConstant.urlExpertApp+"deleteOutPatient";//删除门诊安排 + static readonly listWorkPlace= BasicConstant.urlExpertApp+"listWorkPlace";//执业地点-列表 static readonly province=['全国','北京市','天津市','河北省','山西省' ,'内蒙古自治区','辽宁省','吉林省','黑龙江省','上海市','江苏省','浙江省' ,'安徽省','福建省','江西省','山东省','河南省','湖北省','湖南省','广东省', diff --git a/commons/basic/src/main/ets/utils/TimestampUtil.ets b/commons/basic/src/main/ets/utils/TimestampUtil.ets index 36365dd..a088426 100644 --- a/commons/basic/src/main/ets/utils/TimestampUtil.ets +++ b/commons/basic/src/main/ets/utils/TimestampUtil.ets @@ -21,6 +21,29 @@ export class TimestampUtil { return result; } + static getTodayChinese() + { + // 获取今天日期字符串 yyyy-MM-dd + let today = new Date(); + let yyyy = today.getFullYear(); + let mm = (today.getMonth() + 1).toString().padStart(2, '0'); + let dd = today.getDate().toString().padStart(2, '0'); + let todayStr = `${yyyy}年${mm}月${dd}日`; + return todayStr + + } + static getToday() + { + // 获取今天日期字符串 yyyy-MM-dd + let today = new Date(); + let yyyy = today.getFullYear(); + let mm = (today.getMonth() + 1).toString().padStart(2, '0'); + let dd = today.getDate().toString().padStart(2, '0'); + let todayStr = `${yyyy}-${mm}-${dd}`; + return todayStr + + } + static isToday(dateStr: string): boolean { try { // 1. 解析目标日期字符串 → Date对象 diff --git a/commons/basic/src/main/resources/base/media/addoutpa_true.png b/commons/basic/src/main/resources/base/media/addoutpa_true.png new file mode 100644 index 0000000000000000000000000000000000000000..fd9db32b72d1773472f7a210eec35bd024ea3d85 GIT binary patch literal 2189 zcma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49*<4bSN4!BwX_{NY*{L4-sPN*;17wu0g=dKV1 z=(r|By!7a`7LD>XXZ`n{i$3r=RMPQ}8Juf=)4MbDVTWHINbG--+i}N^JZBSY3~pF? z@_tZtN#IpRiCud$Wfs9VZ}CjMQ+_IS4=M>Ke8!RN{GtEcN_$tzvvFu$lrq@DP}+`D z4`nPousI~ssVVvCMGNW&-O-5FnVSG0=i}Sx^hub=TKa0c7>gTV0(W*zokoB1cG Cl!@Q~ literal 0 HcmV?d00001 diff --git a/commons/basic/src/main/resources/base/media/check_true.png b/commons/basic/src/main/resources/base/media/check_true.png new file mode 100644 index 0000000000000000000000000000000000000000..b854d5b16e2c43a56e773fab5bd701bfffa63df6 GIT binary patch literal 2518 zcmaJ@dpMM7A0Cp#runQLVzgsOQRaZmfoW()Of^n9C1IEsW14x#%wUKd+7=0+C`FO; zIr@^yp)D*WeU?g0isX5dwj% zquEd$CEs5q+fPAWawgk8m7I_bLMu1nKG07X%HRVKOD5<8AZQ$hKi~*3m|;QffH?%R zN{{8_CUm3kCHjIK6hn$Zi8wqd9b!%v@ff~rK#1@G{8?NQ^6iZ#B!a~xAzioAF?1dU z2w>TS^MQTgwobm`Y+nKsN#21l7ZD`_96-oGh&YG10-}h7{G>~i*wSY-67dNlWRsA8 z1?5J!M^HdMfY^>QHT1(HH_6YhsAO5-|iK28;N-kP>fv zrXSIfy6dwq$&G{z5DIxjG&(di6cuWW0{Q-EEP+5kV~o&7MurlEp&*PaWQYv80-Y5F zDj@LXvv@)l$VEsM89rdJkc5;(`d11Z-WOS};B%QI1w)G%JTw-Ck*2f)q|^UDl*9Rg z76=`IzvKN!VS!T^4?sHt0x+2GD`}jcj?@*8NZ|tvA;@D~q;?U_t8do4>aD4$9m4uY2pja#>k+RbWkHH#IFjmG?EY^x(X@tk& zO)YU0f)S32v!bqWsi1E#2jB`1oxYrfkY`vIkp9@`mzmv(i5DDF;rxdB2$$yK%XegoiZm6}NsX7YmaHo99v;2qhMqIGy+9Wk z=(svezcis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ources/base/media/delete_icon.png b/commons/basic/src/main/resources/base/media/delete_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9151f760c357e666c96a3f551a435980f68411c9 GIT binary patch literal 1249 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nAI{vB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxOgGuk*h0bFQqR!T z(!$6@N5ROz&`jUJQs2--*TB%qz|zXVPyq^*fVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD$Tv3bSNU;+l1ennz|zM-B0$V)JVzP|XC=H|jx7ncO3BHWAB;NpiyW)Z+ZoqGVvir744~DzI`cN=+=uFAB-e&w+(vKt_H^esM;Afr7I$DAddqG{Q6U zQu51-HNkp(eXTt6ic1pnl2bihY?Xkf=w)W6Sh*OQxtbd~n;Td-x)~a}T3VVK89BRJ zn3}r+gWu5945rs5Ke;qFHLnDwHwB^B0;gV3a>y+J+U$~Alv$RV;#QQOs{r=4RVHq? znBp`Ksy79kAyGCag)h%uuEWi^!|v% z36GxsOvZ=>jxU*($Z)Lq>%3&hDAfy+6@wmn2tP)I8xepgQI%~gGq+EaPmft zDbo%sZI|otXW&h77rxJTBz@xw@rGwIl}S2nq73mHPaM>Fav}N{;Z@QlTm!owRbN8N)`C ztvbh6ylPl`SSE+7@zF(=sAWAzSWJzl)cLoXd=Z^)`{R*C3zrzX^UM85SiW*<#B$`8 z?^V1UdrT8|94}9uN}0e^6y&%Ho15+R`ViV!41Ebg5s*SRo#VJ(X@U02-9d|z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-2>>VWsBA$ghhAkllzd@MKe+^Lc!==E_-J z=pjvi$5TC+q6+S-`>ELGKu%RFkKYiu7t}?4QuWc*lTGfmn;Umk&fgZYB9q!-Z@jke zciWD|c^~GjVX5KFbtHUOy{PGW*aCf3bDQ)%b4-};mtjYncn4gPgcfP)SDK+S7r&R8 zdeSlp4&37%_@m<&3iH}`)t?G^?%>nsILqX zN&_{zb#1<_Ij$pR_T>3E`E}hL{^6Wt7teC=^H#gzYrkUMO vPM6QNN{?=-=xU3q(d0INJ95zJjPUYj)Tr&<4Gxs;`ROMrQshUa*=7F%YpHG- literal 0 HcmV?d00001 diff --git a/commons/basic/src/main/resources/base/media/edit_icon.png b/commons/basic/src/main/resources/base/media/edit_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fdc4996efa013c45d32c59617bd8a2649080f91c GIT binary patch literal 1532 zcmaJ>drT8|9KXPV(y3#D_?Uz9KnG}hy_Q$c7A$>GkTQf$nTl|)(N^59K*n@&e($|T5qJ#3ZB!sH zlFHU+z$(T9;22S?(1=On;W(KHi;=}kqL;xEF&2x8WhfRc6l1tphKn(H{6Y9=7E=M9 zsn(9i;!g^skmFb!MQt{l$R-sr7Bh;;WHMANK_wC)j}Tf*XpXQ8X=~Vof*M$j7Lw&i zhK9Y0L_Sl@DG)x>7bQ^aq%3V6Zxi1z)K0J{CK7u~ngHtc{|}|8Nwk&A1TXXbPhqQ} zgav3OurkFKBR{x;FmEUpS6KkTF%|>E6isw7qmbbkYazqJDwVfuad5;Mk~T3mYvdS5 zug6npD@V{qkfK%~yo!h-T>iEW2{T+<7|h=fJA=OM%Vp>k>96ogWW%ej0eB-xyURD^~;O z;l`#b!AZXTmCIB8?%t_=_12)`(S<{g>r$sx8%`(hsX9|OFFMrK)!lZpI@TSvaNv1c zZ`l4-4!_?*)=5;J)Z>CUBB(oW$7oT$pyQkV12?Ll?9DlReNI4#d#SFnkM(%uS~kad zN_S=3eOb9nT9DZJVgCK{wHI!j@2E;gaZl>>VX<$yX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%4 zK-=?8N_LagkENayBE8E$n=6v$Od(eWiiIxc^U=OOcOFD;uG!HXKec)gQ)CnFzP@g0 z*{~8t#~5wS+I5i_s(6}}-26P%S8vLM5N+V-`NjWIA-(pCDsDQ;Z2Y%J3o>o9!>v3l z-;T?rFJtq%a{39_m7L6myRW}5>?P0-JUk4i?l0$7t!`A+=h~)aJ^jXX@3yx7OuGB3 zTj#uE;|_zAI{EEd$3oNnJMksrGQ*_UO;cy#WZ%BMsF`a;`{!b7&iVvmNgcHbXES(P~w z(&yq{OnWfoQ)X4yIN392`^{9y0Y%b>+q%ZB9b5|g`Kp$07ljq~_)x}Y1rWzkI})rg z`t+OM?YOFFuLP$bbD-L*3I>rYGt)!%V7NtY&~}xg*hN?7{E7$7OeJAmW-9ejYkSV7 zPzT`s?H_+(aK#htC6(~?ad@SRchRkjMl1(V#l1>XJ- zC-$X<#ak?v*>`V|8>j;VvXhAeC%q6y#vj*zUy0FkO=kr#peWI-lUu1_?kTa`!5qx?}~1> { diff --git a/features/netease/Index.ets b/features/netease/Index.ets index d9a6837..9e2ac6d 100644 --- a/features/netease/Index.ets +++ b/features/netease/Index.ets @@ -14,4 +14,6 @@ export { InterrogationDetailComp } from './src/main/ets/view/InterrogationDetail export { PatientSimplyComp } from './src/main/ets/view/PatientSimplyComp' -export { MyOpinionComp } from './src/main/ets/view/MyOpinionComp' \ No newline at end of file +export { MyOpinionComp } from './src/main/ets/view/MyOpinionComp' + +export { OutpatientComp } from './src/main/ets/view/OutpatientComp' \ No newline at end of file diff --git a/features/netease/src/main/ets/components/ItemCompArrange.ets b/features/netease/src/main/ets/components/ItemCompArrange.ets new file mode 100644 index 0000000..6466be1 --- /dev/null +++ b/features/netease/src/main/ets/components/ItemCompArrange.ets @@ -0,0 +1,236 @@ +import { HMRouterMgr } from '@hadss/hmrouter'; +import { BasicConstant, TimestampUtil } from '@itcast/basic'; +import { formatDate } from '@itcast/basic/src/main/ets/utils/DateUtils'; +import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet'; +import { LengthMetrics, router } from '@kit.ArkUI' +import { StringIsEmpty } from '@nimkit/common'; +import { ListOut } from '../model/ListOutPatientModel'; + + +@Preview +@Component +export struct ItemCompArrange { + @Prop item:ListOut; + @State week:string='' + @State outpatientType:string='' + @State daytime:string='' + @Link deleteUuid:string + @Link delete: boolean + deleteCallBack: (uuid:string) => void = () => {}; + @State lineHeight:Length=10; + aboutToAppear(): void { + this.initDialog() + this.getWeek() + this. getoutpatientType() + this.getdayTime() + } + private dialog!:CustomDialogController; + @State inputPlaceholder:string='您确定删除此条信息吗' + initDialog() { + this.dialog = new CustomDialogController({ + builder:PerfactInputSheet({ + controller:this.dialog, + inputTitle:'删除提示', + inputPlaceholder:this.inputPlaceholder, + style:'2', + okText:'确定', + okColor:$r('app.color.top_title'), + inputCallBack:(input: string,title:string)=>{ + + this.deleteUuid=this.item.uuid + this.delete=!this.delete + } + }), + keyboardAvoidDistance: LengthMetrics.vp(0), // 设置弹窗底部与键盘顶部间距(单位:vp) + alignment: DialogAlignment.Center, + customStyle: true, + autoCancel: false, + backgroundColor: ('rgba(0,0,0,0.5)'), + height: '100%' + }) + } + build() { + + Column() + { + + Row() + { + Column() { + + Text(this.week) + .fontColor($r('app.color.top_title')) + .fontSize(15) + .width(100) + .textAlign(TextAlign.Center) + + Text(this.daytime) + .width(100) + .fontColor($r('app.color.common_gray_03')).padding({ top: 10 }) + .fontSize(15) + .textAlign(TextAlign.Center) + + } + .width(100) + .backgroundColor(Color.White) + .borderRadius({ + topLeft: 4, + topRight: 0, + bottomRight: 0, + bottomLeft: 4 + }) + .justifyContent(FlexAlign.Center) // 垂直居中 + .alignItems(HorizontalAlign.Center) // 子组件水平居中 + .height(this.lineHeight) + + Column() { + Text(this.item.hospital_name) + .fontColor($r('app.color.common_gray_01')) + .fontSize(18) + .margin({top:10}) + Text(this.item.office_name) + .fontColor($r('app.color.common_gray_03')) + .fontSize(14) + .margin({top:10}) + Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap, space: { cross: LengthMetrics.vp(10) } }) + { + Text(this.item.location) .fontColor($r('app.color.common_gray_03')).fontSize(14).maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis }) + .ellipsisMode(EllipsisMode.END) + .padding({right:3}) + Text(this.outpatientType) + .fontSize(12) + .borderColor($r('app.color.top_title')) + .fontColor($r('app.color.top_title')) + .borderRadius(8) + .borderWidth(1) + .padding({ left: 4,right:4,top:2,bottom:2 }) + } + .margin({top:10}) + } + .padding({left:10,right:10,bottom:10}) + .alignItems(HorizontalAlign.Start) + .layoutWeight(1) + .borderRadius({ + topLeft: 0, + topRight: 4, + bottomRight: 0, + bottomLeft: 4 + }) + .margin({left:2}) + .backgroundColor(Color.White) + .onAreaChange((oldVal, newVal) => { + this.lineHeight = newVal.height + + }) + } + .width('95%') + // .padding(10) + .alignSelf(ItemAlign.Center) + // .backgroundColor(Color.White) + .borderRadius(4) + .margin({left:10,right:10}) + + Row() + { + Blank() + Row() + { + Image($r('app.media.edit_icon')).width(15).height(15).margin({right:5}) + Text('编辑') + .fontColor($r('app.color.common_gray_01')) + .fontSize(14) + } + .margin({right:30}) + + Row() + { + Image($r('app.media.delete_icon')).width(15).height(15).margin({right:5}) + Text('删除') + .fontColor($r('app.color.common_gray_01')) + .fontSize(14) + } + .onClick(()=>{ + this.dialog.open() + }) + + + }.width('95%') + .padding(10) + .backgroundColor(Color.White) + .margin({top:2}) + .borderRadius(4) + } + + + + } + + getWeek() { + switch (this.item.week) { + case 1: + this.week = '周一' + break + case 2: + this.week = '周二' + break + case 3: + this.week = '周三' + break + case 4: + this.week = '周四' + break + case 5: + this.week = '周五' + break + case 6: + this.week = '周六' + break + case 7: + this.week = '周日' + break + } + } + getoutpatientType() + { + switch (this.item.type) + { + case 1: + this.outpatientType='普通门诊' + break + case 2: + this.outpatientType='专家门诊' + break + case 3: + this.outpatientType='特需门诊' + break + case 4: + this.outpatientType='专科/专病门诊' + break + + } + } + getdayTime() + { + switch (this.item.day) + { + case "a": + this.daytime='上午' + break + case "b": + this.daytime='下午' + break + case "c": + this.daytime='晚上' + break + case "d": + this.daytime='全天' + break + + } + } + + + + +} + diff --git a/features/netease/src/main/ets/components/ItemCompStop.ets b/features/netease/src/main/ets/components/ItemCompStop.ets new file mode 100644 index 0000000..bc86647 --- /dev/null +++ b/features/netease/src/main/ets/components/ItemCompStop.ets @@ -0,0 +1,175 @@ +import { HMRouterMgr } from '@hadss/hmrouter'; +import { BasicConstant, TimestampUtil } from '@itcast/basic'; +import { formatDate } from '@itcast/basic/src/main/ets/utils/DateUtils'; +import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet'; +import { LengthMetrics, router } from '@kit.ArkUI' +import { StringIsEmpty } from '@nimkit/common'; +import { StopOutPatientList } from '../model/StopOutPatientListModel'; + + +@Preview +@Component +export struct ItemCompStop { + @Prop item:StopOutPatientList; + @State reason:string='' + @Link deleteUuid:string + @Link delete: boolean + deleteCallBack: (uuid:string) => void = () => {}; + + aboutToAppear(): void { + this.initDialog() + this.getReason() + } + private dialog!:CustomDialogController; + @State inputPlaceholder:string='您确定删除此条信息吗' + initDialog() { + this.dialog = new CustomDialogController({ + builder:PerfactInputSheet({ + controller:this.dialog, + inputTitle:'删除提示', + inputPlaceholder:this.inputPlaceholder, + style:'2', + okText:'确定', + okColor:$r('app.color.top_title'), + inputCallBack:(input: string,title:string)=>{ + + this.deleteUuid=this.item.uuid + this.delete=!this.delete + } + }), + keyboardAvoidDistance: LengthMetrics.vp(0), // 设置弹窗底部与键盘顶部间距(单位:vp) + alignment: DialogAlignment.Center, + customStyle: true, + autoCancel: false, + backgroundColor: ('rgba(0,0,0,0.5)'), + height: '100%' + }) + } + build() { + + Column() + { + Stack() + { + + Row() + { + Column() { + Row() { + Text('停诊原因:') + .fontColor($r('app.color.common_gray_01')) + .fontSize(17) + Text(this.reason) + .fontColor($r('app.color.common_gray_03')).padding({ left: 3 }) + .fontSize(17) + } + .margin({ + top: 31 + }) + + Row() { + Text('停诊时间:') + .fontColor($r('app.color.common_gray_01')) + .fontSize(17) + Text(this.item.date_list[0].param1 + " ~ " + this.item.date_list[0].param2) + .fontColor($r('app.color.common_gray_03')).padding({ left: 3 }) + .fontSize(17) + }.margin({ top: 10 }) + + if (this.item.date_list.length > 1) { + Row() { + Text('停诊时间:') + .fontColor($r('app.color.common_gray_01')) + .fontSize(17) + .visibility(Visibility.Hidden) + Text(this.item.date_list[1].param1 + " ~ " + this.item.date_list[1].param2) + .fontColor($r('app.color.common_gray_03')).padding({ left: 3 }) + .fontSize(17) + }.margin({ top: 10 }) + } + + if (this.item.date_list.length > 2) { + Row() { + Text('停诊时间:') + .fontColor($r('app.color.common_gray_01')) + .fontSize(17) + .visibility(Visibility.Hidden) + Text(this.item.date_list[2].param1 + " ~ " + this.item.date_list[2].param2) + .fontColor($r('app.color.common_gray_03')).padding({ left: 3 }) + .fontSize(17) + }.margin({ top: 10 }) + } + } + .alignItems(HorizontalAlign.Start) + .layoutWeight(1) + Image($r('app.media.delete_notice')).width(17).height(17) + .onClick(() => { + this.dialog.open() + }) + .margin({left:10}) + .alignSelf(ItemAlign.Center) + } + .width('95%') + .padding(10) + .alignSelf(ItemAlign.Start) + .backgroundColor(Color.White) + .borderRadius(4) + .margin({left:10,right:10}) + + Text(formatDate(new Date(this.item.expire_date*1000),'YYYY-MM-DD')).fontColor(Color.White).fontSize(16) + .textAlign(TextAlign.Center) + .padding({bottom:7,left:10}) + .backgroundImage($r('app.media.data_sign')) + .backgroundImageSize(ImageSize.FILL) + .width(120).height(32) + .margin({top:5,left:4}) + .position({x:0,y:0}) + + } + Row() + { + Text('备注:') + .fontColor($r('app.color.common_gray_01')) + .fontSize(14) + .width(50) + Text(this.item.note) + .fontColor($r('app.color.common_gray_01')) + .fontSize(14) + .layoutWeight(1) + }.width('95%') + .alignItems(VerticalAlign.Top) + .padding(10) + .backgroundColor(Color.White) + .margin({top:2}) + .borderRadius(4) + } + + + + } + + getReason() + { + switch (this.item.type) + { + case 1: + this.reason='出差' + break + case 2: + this.reason='休假' + break + case 3: + this.reason='临时安排' + break + case 4: + this.reason='其他' + break + } + } + + + + + +} + diff --git a/features/netease/src/main/ets/model/ListOutPatientModel.ets b/features/netease/src/main/ets/model/ListOutPatientModel.ets new file mode 100644 index 0000000..ec1fd43 --- /dev/null +++ b/features/netease/src/main/ets/model/ListOutPatientModel.ets @@ -0,0 +1,41 @@ +export interface ListOutPatientModel { + code:string; + data:ListOutPatientBean; + message:string; + note:NoteBean + +} +export interface NoteBean{ + + uuid:string; + note:string; +} +export interface ListOutPatientBean{ + + totalPage:number; + list:ListOut[]; +} +export interface ListWorkPlaceBean { + code:string; + list:ListOut[]; + message:string; + + +} + +export interface ListOut{ + + office_name:string; + week:number; + workplace_uuid:string; + type:number; + location:string; + uuid:string; + day:string; + hospital_address:string; + hospital_name:string; + +} + + + diff --git a/features/netease/src/main/ets/model/PatientNoticeModel.ets b/features/netease/src/main/ets/model/PatientNoticeModel.ets new file mode 100644 index 0000000..0e10dca --- /dev/null +++ b/features/netease/src/main/ets/model/PatientNoticeModel.ets @@ -0,0 +1,14 @@ +export interface PatientNoticeModel { + code:string; + data:NoticeModel; + message:string; + +} + + + +export interface NoticeModel{ + + uuid:string; + notice:string; +} \ No newline at end of file diff --git a/features/netease/src/main/ets/model/StopOutPatientListModel.ets b/features/netease/src/main/ets/model/StopOutPatientListModel.ets new file mode 100644 index 0000000..f22f8b3 --- /dev/null +++ b/features/netease/src/main/ets/model/StopOutPatientListModel.ets @@ -0,0 +1,25 @@ +export interface StopOutPatientListModel { + code:string; + data:StopOutPatientList[]; + message:string; + +} + +export interface StopOutPatientList{ + + uuid:string; + expire_date:number; + user_uuid:string; + status:number; + type:number; + note:string; + date_list:DateListBean[] + +} + +export interface DateListBean +{ + param1:string; + param2:string; +} + diff --git a/features/netease/src/main/ets/view/AddOutpatient.ets b/features/netease/src/main/ets/view/AddOutpatient.ets new file mode 100644 index 0000000..61ddb3a --- /dev/null +++ b/features/netease/src/main/ets/view/AddOutpatient.ets @@ -0,0 +1,488 @@ +import { hdHttp, HdResponse, BasicConstant, ExpertData, authStore, BaseBean, HdLoadingDialog, + TimestampUtil, + preferenceStore} from '@itcast/basic' +import { BusinessError } from '@kit.BasicServicesKit'; +import promptAction from '@ohos.promptAction'; +import { HdNav ,DatePickerDialog} from '@itcast/basic'; +import { LengthMetrics, router } from '@kit.ArkUI'; +import { HMRouter, HMRouterMgr } from '@hadss/hmrouter'; +import { HashMap } from '@kit.ArkTS'; +import { StringIsEmpty } from '@nimkit/common'; +import { DateListBean } from '../model/StopOutPatientListModel'; +import { data } from '@kit.TelephonyKit'; +import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet'; +import { ListOut, ListWorkPlaceBean } from '../model/ListOutPatientModel'; + + +@HMRouter({ pageUrl: 'AddOutpatient' }) +@Component +export struct AddOutpatient { + @State locaIndex: number = -1 + @State uuid: string = '' + @State data: ListOut[] = []; + weekOptions: string[] = ['周一', '周二', '周三', '周四', '周五', '周六', '周日', ''] + controller: TextAreaController = new TextAreaController(); + @State timeIndex: number = -1 + @State timePeriodOptions: string[] = ['上午', '下午', '晚上', '全天'] + @State weekIndexList: number[] = [] // 新增多选星期索引 + // 新增 weekOptions 多选(每行4个,自动换行) + weekChunks = this.chunkArray(this.weekOptions, 4); + + chunkArray(arr: T[], size: number): T[][] { + const result: T[][] = []; + for (let i = 0; i < arr.length; i += size) { + result.push(arr.slice(i, i + size)); + } + return result; + } + + dialog: CustomDialogController = new CustomDialogController({ + builder: HdLoadingDialog({ message: '加载中...' }), + customStyle: true, + alignment: DialogAlignment.Center + }) + + getList() { + this.dialog.open() + const hashMap: HashMap = new HashMap(); + hdHttp.httpReq(BasicConstant.listWorkPlace, hashMap).then(async (res: HdResponse) => { + this.dialog.close(); + let json: ListWorkPlaceBean = JSON.parse(res + '') as ListWorkPlaceBean; + if (json.code == '200') { + this.data = [] + if (json.list != null) { + this.data = json.list; + } + + } else { + + promptAction.showToast({ message: json.message, duration: 1000 }) + } + }).catch((err: BusinessError) => { + this.dialog.close(); + console.info(`Response fails: ${err}`); + }) + + + } + + addStopOutPatient() { + this.dialog.open() + // const hashMap: HashMap = new HashMap(); + // hashMap.set('type',this.reasonIndex+1+'') + // hashMap.set('note',this.noteText) + // hashMap.set('date_list', this.reasonIndex === 2 ? this.date_list_temp : this.date_list_normal) + // hdHttp.httpReqObject(BasicConstant.addStopOutPatient,hashMap).then(async (res: HdResponse) => { + // this.dialog.close() + // let json:BaseBean = JSON.parse(res+'') as BaseBean; + // if(json.code == '200') { + // HMRouterMgr.pop() + // } else { + // promptAction.showToast({ message: json.message }) + // } + // }).catch((err: BusinessError) => { + // + // console.info(`Response fails: ${err}`); + // }) + + } + + private dialogPublish!: CustomDialogController; + + initDialog() { + this.dialogPublish = new CustomDialogController({ + builder: PerfactInputSheets({ + controller: this.dialogPublish, + // reasonOptions:this.reasonOptions[this.reasonIndex], + // noteText:this.noteText, + // date_list:this.reasonIndex === 2 ? this.date_list_temp : this.date_list_normal, + inputCallBack: () => { + this.addStopOutPatient() + + // HMRouterMgr.pop() + + + } + }), + keyboardAvoidDistance: LengthMetrics.vp(0), // 设置弹窗底部与键盘顶部间距(单位:vp) + alignment: DialogAlignment.Center, + customStyle: true, + autoCancel: false, + backgroundColor: ('rgba(0,0,0,0.5)'), + height: '100%' + }) + } + + aboutToAppear(): void { + + this.initDialog() + this.getList() + + } + + build() { + Column() { + HdNav({ + title: '增加门诊安排', + showRightIcon: false, + hasBorder: true, + isLeftAction: true, + leftItemAction: () => { + + HMRouterMgr.pop() + + } + }) + Column() { + Text('门诊时间 *') + .fontSize(17) + .fontColor($r('app.color.top_title')) + .padding(10) + .width('100%') + .textAlign(TextAlign.Start) + + ForEach(this.weekChunks, (row: string[], rowIndex: number) => { + Row() { + ForEach(row, (item: string, index: number) => { + + Row() { + if (item !== "") { + Text(item) + .fontSize(16) + .fontColor(this.weekIndexList.indexOf(rowIndex * 4 + index) !== -1 ? $r('app.color.top_title') : + $r('app.color.999999')) + .height(42) + .layoutWeight(1) + .textAlign(TextAlign.Center) + .backgroundImageSize(ImageSize.Contain) + .backgroundImagePosition(Alignment.Center) + .backgroundImage(this.weekIndexList.indexOf(rowIndex * 4 + index) !== -1 ? + $r('app.media.check_true') : undefined) + .borderColor(this.weekIndexList.indexOf(rowIndex * 4 + index) !== -1 ? Color.Transparent : + $r('app.color.999999')) + .borderWidth(1) + .borderRadius(4) + .margin({ right: 10, top: 10 }) + .onClick(() => { + if (this.weekIndexList.indexOf(rowIndex * 4 + index) !== -1) { + this.weekIndexList = this.weekIndexList.filter(i => i !== rowIndex * 4 + index) + } else { + this.weekIndexList = [...this.weekIndexList, rowIndex * 4 + index] + } + }) + } else { + Text('').height(42).layoutWeight(1) // 空占位 + } + + + }.layoutWeight(1) + }) + }.padding({ left: 10 }).width('100%').margin({ left: 10, right: 10 }) + }) + + Text() + .height(1) + .width('95%') + .padding({ left: 10, right: 10 }) + .backgroundColor($r('app.color.999999')) + .margin({ top: 10 }) + + Row() { + ForEach(this.timePeriodOptions, (item: string, index: number) => { + Row() { + Text(item) + .fontSize(16) + .fontColor(this.timeIndex === index ? $r('app.color.top_title') : $r('app.color.999999')) + .height(42) + .layoutWeight(1) + .textAlign(TextAlign.Center) + .backgroundImageSize(ImageSize.Contain) + .backgroundImagePosition(Alignment.Center) + .backgroundImage(this.timeIndex === index ? $r('app.media.check_true') : undefined) + .borderColor(this.timeIndex === index ? Color.Transparent : $r('app.color.999999')) + .borderWidth(1) + .borderRadius(4) + .margin({ right: 10, top: 10 }) + .onClick(() => { + this.timeIndex = index + }) + }.layoutWeight(1) + }) + }.padding({ left: 10 }).width('100%') + .margin({ left: 10, right: 10 }) + + Text('门诊地点 *') + .fontSize(17) + .fontColor($r('app.color.top_title')) + .padding(10) + .width('100%') + .textAlign(TextAlign.Start) + List() { + ForEach(this.data, (item: ListOut, index) => { + ListItem() { + Stack() + { + Column() { + Text(item.hospital_name) + .fontColor($r('app.color.common_gray_01')) + .fontSize(18) + .margin({ top: 10 }) + Text(item.office_name) + .fontColor($r('app.color.common_gray_03')) + .fontSize(14) + .margin({ top: 10 }) + Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap, space: { cross: LengthMetrics.vp(10) } }) { + Text(item.location) + .fontColor($r('app.color.common_gray_03')) + .fontSize(14) + .maxLines(1) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .ellipsisMode(EllipsisMode.END) + .padding({ right: 3 }) + Text(this.getoutpatientType(item.type)) + .fontSize(12) + .borderColor($r('app.color.top_title')) + .fontColor($r('app.color.top_title')) + .borderRadius(8) + .borderWidth(1) + .padding({ + left: 4, + right: 4, + top: 2, + bottom: 2 + }) + } + .margin({ top: 10 }) + } + .onClick(()=>{ + this.locaIndex=index + }) + .id('locationlist'+index) + .padding({ left: 10, right: 10, bottom: 10 }) + .alignItems(HorizontalAlign.Start) + .borderWidth(1) + .borderRadius(4) + .borderColor(this.locaIndex==index ?$r('app.color.top_title'): + $r('app.color.999999')) + Image($r('app.media.addoutpa_true')) + .width(38) + .height(38) + .position({ x: 0, y: '5%' }) // 右下角 + // .offset({ x: -10, y: -10 }) // 距离右下角10px + } + + + } + + }) + } + .layoutWeight(1) + .width('95%') + .divider({ + strokeWidth: 5, + color:Color.White + }) + .edgeEffect(EdgeEffect.None) + .layoutWeight(1) + .clip(true) + + } .backgroundColor(Color.White) + .width('100%') + + Blank() + Column() { + Text('确定发布') + .height(42) + .width(168) + .fontSize(17) + .backgroundColor($r('app.color.top_title')) + .fontColor($r('app.color.white')) + .textAlign(TextAlign.Center) + .borderRadius(4) + .margin({ top: 8 }) + } + .width('100%') + .height(57) + .backgroundColor(Color.White) + .onClick(() => { + + this.dialogPublish.open() + + }) + + } + .width('100%') + .height('100%') + .backgroundColor($r('app.color.home_gray')) + } + getoutpatientType(type:number) + { + switch (type) + { + case 1: + return '普通门诊' + break + case 2: + return '专家门诊' + break + case 3: + return '特需门诊' + break + case 4: + return '专科/专病门诊' + break + + } + return '' + } +} + +@CustomDialog +export struct PerfactInputSheets { + controller:CustomDialogController; + + @Prop inputTitle:string = '公告内容'; + @Prop inputPlaceholder:string = '' + + // 添加回调函数属性 + @State okColor:ResourceStr=$r('app.color.top_title') + @State cancelColor:ResourceStr='#333333' + @State okText:ResourceStr='确定发布' + @State cancelText:ResourceStr='返回修改' + @State reasonOptions:string='' + @State noteText:string='' + + @State date_list: DateListBean[] = [] + private inputCallBack: () => void = () => {}; + @State needcancelCallBack:boolean=false + // 修改构造函数 + constructor(controller: CustomDialogController, inputCallBack: () => void) { + super(); + this.controller = controller; + this.inputCallBack = inputCallBack; + } + + build() { + + Row(){ + Column() { + Text(this.inputTitle) + .fontSize(18) + .padding(20) + .width('100%') + .textAlign(TextAlign.Center) + .fontColor('#444444') + + + Text('停诊原因:' + this.reasonOptions) + .fontSize(14) + .fontColor('#444444') + .backgroundColor(Color.White) + .padding({ left: 10, right: 10 }) + .width('79%') + + Row() { + Text('停诊时间:') + .fontColor('#444444') + .fontSize(14) + Text(this.date_list[0].param1 + ' 至 ' + this.date_list[0].param2) + .fontColor($r('app.color.common_gray_03')).padding({ left: 3 }) + .fontSize(14) + }.margin({ top: 10 }).padding({ left: 10, right: 10 }) + .width('79%') + if (this.date_list.length > 1) { + Row() { + Text('停诊时间:') + .fontColor('#444444') + .fontSize(14) + .visibility(Visibility.Hidden) + Text(this.date_list[1].param1 + " 至 " + this.date_list[1].param2) + .fontColor('#444444').padding({ left: 3 }) + .fontSize(14) + }.margin({ top: 10 }).padding({ left: 10, right: 10 }) + .width('79%') + } + + if (this.date_list.length > 2) { + Row() { + Text('停诊时间:') + .fontColor('#444444') + .fontSize(14) + .visibility(Visibility.Hidden) + Text(this.date_list[2].param1 + " 至 " + this.date_list[2].param2) + .fontColor('#444444').padding({ left: 3 }) + .fontSize(14) + } + .width('79%') + .margin({ top: 10 }).padding({ left: 10, right: 10 }) + } + + Row() { + Text() + { + Span('备').fontColor('#444444') + Span('备注').fontColor(Color.Transparent) + Span('注:').fontColor('#444444') + } + .fontColor('#444444') + .fontSize(14) + + Text(this.noteText) + .fontColor('#444444').padding({ left: 3 }) + .fontSize(14) + .textAlign(TextAlign.Start) + .layoutWeight(1) + }.margin({ top: 10 }).padding({ left: 10, right: 10 }) + .alignItems(VerticalAlign.Top) + .width('79%') + .visibility(this.noteText?Visibility.Visible:Visibility.None) + + Text().width(20).height(20) + Row() { + Text('停诊时间:') + .fontColor('#444444') + .fontSize(14) + .visibility(Visibility.Hidden) + Text(TimestampUtil.getTodayChinese()+'由医生本人发布') + .fontColor($r('app.color.common_gray_03')).padding({ left: 3 }) + .fontSize(14) + } + .margin({ top: 10 }).padding({ left: 10, right: 10 }) + Text('').height(1).width('100%') + .backgroundColor($r('app.color.home_gray')).margin({ top: 10 }) + Row() { + Text(this.cancelText) + .fontSize(15) + .fontColor(this.cancelColor) + .textAlign(TextAlign.Center) + + .height(30) + .layoutWeight(1) + .onClick(() => { + + this.controller.close() + }) + Text('').height(30).width(1) + .backgroundColor($r('app.color.home_gray')) + Text(this.okText) + .textAlign(TextAlign.Center) + .fontColor(this.okColor) + .fontSize(15) + .onClick(() => { + + this.controller.close() + this.inputCallBack(); + }) + + .height(30) + .layoutWeight(1) + + + }.margin({ top: 10, bottom: 10 }).width('100%') + } + + .width('80%').backgroundColor(Color.White) + }.borderRadius(24) + + } +} diff --git a/features/netease/src/main/ets/view/ArrangementsComp.ets b/features/netease/src/main/ets/view/ArrangementsComp.ets new file mode 100644 index 0000000..33c6d4d --- /dev/null +++ b/features/netease/src/main/ets/view/ArrangementsComp.ets @@ -0,0 +1,181 @@ +import { + BaseBean, + BasicConstant, EmptyViewComp, hdHttp, HdLoadingDialog, HdNav, HdResponse, HdSearchNav } from '@itcast/basic' +import { HMRouter, HMRouterMgr, HMRouterPathCallback, HMRouterPathInfo } from '@hadss/hmrouter' +import { PullToRefreshLayout, RefreshController } from 'refreshlib' +import { HashMap } from '@kit.ArkTS'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { promptAction } from '@kit.ArkUI'; +import { StringIsEmpty } from '@nimkit/common'; +import { ListOut, ListOutPatientModel } from '../model/ListOutPatientModel'; +import { ItemCompArrange } from '../components/ItemCompArrange'; + +@HMRouter({ pageUrl: 'ArrangementsComp' }) +@Component +export struct ArrangementsComp { + dialog: CustomDialogController = new CustomDialogController({ + builder: HdLoadingDialog({ message: '加载中...' }), + customStyle: true, + alignment: DialogAlignment.Center + }) + @State pageNumber:number = 1; + @State totalPageNumer:number = 1; + @State data:ListOut[]=[]; + @State isEmptyViewVisible: boolean = false; // 控制显隐的状态变量 + @State + @Watch('deleteOutPatient') + delete: boolean=false + @State deleteUuid:string='' + aboutToAppear() { + this.getList(); + } + getList() { + const hashMap: HashMap = new HashMap(); + hashMap.set('page',this.pageNumber.toString()); + this.dialog.open() + hdHttp.httpReq(BasicConstant.listOutPatient,hashMap).then(async (res: HdResponse) => { + this.dialog.close(); + let json:ListOutPatientModel = JSON.parse(res+'') as ListOutPatientModel; + if(json.code == '200') { + if(this.pageNumber==1) + { + this.data=[] + if(json.data!=null) + { + this.data = json.data.list; + } + + } + else if(this.pageNumber>1) + { + this.data.push(...json.data.list) + } + + this.totalPageNumer =json.data.totalPage; + if (this.data.length > 0) { + this.isEmptyViewVisible = false; + } else { + this.isEmptyViewVisible = true; + } + } else { + + promptAction.showToast({ message: json.message, duration: 1000 }) + } + }).catch((err: BusinessError) => { + this.dialog.close(); + this.controller.refreshError(); + console.info(`Response fails: ${err}`); + }) + } + public controller:RefreshController = new RefreshController(); + scroller = new Scroller(); + @State Sorts:string='最新' + @State Imgs:ResourceStr=$r('app.media.cb_new') + @State inputText:string='' + @State + @Watch('onRefresh') + sort:string='1' + + onRefresh() + { + this.pageNumber = 1; + this.getList(); + } + build() { + Column(){ + + Text().height(20).width('100%').backgroundColor($r('app.color.home_gray')) + if (this.isEmptyViewVisible){ + EmptyViewComp({promptText:'暂无门诊安排',isVisibility:this.isEmptyViewVisible}).layoutWeight(1) + + } + else + { + PullToRefreshLayout({ + scroller:this.scroller, + viewKey:"ListPage", + controller:this.controller, + contentView:()=>{ + this.contentView() + }, + + onRefresh:()=>{ + this.pageNumber = 1; + this.getList(); + setTimeout(() => { + this.controller.refreshSuccess() + }, 1000) + }, + onCanPullRefresh:()=>{ + if (!this.scroller.currentOffset()) { + /*处理无数据,为空的情况*/ + return true + } + //如果列表到顶,返回true,表示可以下拉,返回false,表示无法下拉 + return this.scroller.currentOffset().yOffset <= 0 + }, + onLoad:()=>{ + this.pageNumber++; + this.getList(); + setTimeout(() => { + this.controller.loadSuccess() + }, 1000) + + }, + onCanPullLoad: () => { + if (this.pageNumber >= this.totalPageNumer) { + return false; + } else { + return true; + } + } + }).width('100%').layoutWeight(1).clip(true) + } + + } + .width('100%') + .height('100%') + .backgroundColor($r('app.color.home_gray')) + } + + @Builder + contentView(){ + List({ scroller: this.scroller }) { + ForEach(this.data, (item: ListOut, index) => { + ListItem() { + ItemCompArrange({item:item,deleteUuid:this.deleteUuid,delete:this.delete}) + } + }) + } + .divider({ + strokeWidth: 5, + }) + .width('100%') + .height('100%') + .edgeEffect(EdgeEffect.None) + + } + deleteOutPatient() { + this.dialog.open() + + const hashMap: HashMap = new HashMap(); + hashMap.set('uuid',this.deleteUuid) + hdHttp.httpReq(BasicConstant.deleteOutPatient,hashMap).then(async (res: HdResponse) => { + this.dialog.close(); + let json:BaseBean = JSON.parse(res+'') as BaseBean; + if(json.code == '200') { + this.getList(); + } else { + + promptAction.showToast({ message: json.message, duration: 1000 }) + } + }).catch((err: BusinessError) => { + this.dialog.close(); + console.info(`Response fails: ${err}`); + }) + + + } + +} + diff --git a/features/netease/src/main/ets/view/MyOpinionComp.ets b/features/netease/src/main/ets/view/MyOpinionComp.ets index 1ea84ad..9e6e693 100644 --- a/features/netease/src/main/ets/view/MyOpinionComp.ets +++ b/features/netease/src/main/ets/view/MyOpinionComp.ets @@ -38,7 +38,7 @@ export struct MyOpinionComp { { this.photos.splice(this.removeIndex, 1) this.maxSelectNumber =6- this.photos.length; - let a= this.maxSelectNumber + } private custom!:CustomDialogController; dialog: CustomDialogController = new CustomDialogController({ diff --git a/features/netease/src/main/ets/view/OutpatientComp.ets b/features/netease/src/main/ets/view/OutpatientComp.ets new file mode 100644 index 0000000..e78319f --- /dev/null +++ b/features/netease/src/main/ets/view/OutpatientComp.ets @@ -0,0 +1,29 @@ +import { HMRouter } from '@hadss/hmrouter'; +import { BasicConstant,HdNav } from '@itcast/basic' +import { TabBarOutComp } from './TabBarOutComp'; + + +@Component +export struct OutpatientComp { + @State + @Watch('onChangeIndex') + activeIndex: number = 0 + + + onChangeIndex() { + } + build() { + + Column() { + + TabBarOutComp({activeIndex:this.activeIndex}); + + + + + }.width('100%') + .height('100%') + + + } +} \ No newline at end of file diff --git a/features/netease/src/main/ets/view/OutpatientInformation.ets b/features/netease/src/main/ets/view/OutpatientInformation.ets new file mode 100644 index 0000000..85f58e3 --- /dev/null +++ b/features/netease/src/main/ets/view/OutpatientInformation.ets @@ -0,0 +1,153 @@ +import { hdHttp, HdResponse, BasicConstant, ExpertData, authStore, BaseBean, HdLoadingDialog } from '@itcast/basic' +import { BusinessError } from '@kit.BasicServicesKit'; +import promptAction from '@ohos.promptAction'; +import { HdNav } from '@itcast/basic'; +import { router } from '@kit.ArkUI'; +import { HMRouter, HMRouterMgr } from '@hadss/hmrouter'; +import { HashMap } from '@kit.ArkTS'; +import { StringIsEmpty } from '@nimkit/common'; + + +@HMRouter({ pageUrl: 'OutpatientInformation' }) +@Component +export struct OutpatientInformation { + @State feedbackText: string = '' + @State noteText: string = '' + @State uuid: string = '' + controller:TextAreaController = new TextAreaController(); + @State params:Record= HMRouterMgr.getCurrentParam() as Record; + + dialog: CustomDialogController = new CustomDialogController({ + builder: HdLoadingDialog({ message: '加载中...' }), + customStyle: true, + alignment: DialogAlignment.Center + }) + addOutPatientA() { + const hashMap: HashMap = new HashMap(); + hashMap.set('workplace_uuid','') + hashMap.set('week','') + hashMap.set('day','') + hashMap.set('type','2') + hashMap.set('uuid',this.uuid) + hashMap.set('note',this.feedbackText) + hdHttp.httpReq(BasicConstant.addOutPatientA,hashMap).then(async (res: HdResponse) => { + + }).catch((err: BusinessError) => { + + console.info(`Response fails: ${err}`); + }) + + } + + mailanNoticeAdd() { + this.dialog.open() + const hashMap: HashMap = new HashMap(); + hashMap.set('notice',this.feedbackText) + hdHttp.httpReq(BasicConstant.mailanNoticeAdd,hashMap).then(async (res: HdResponse) => { + this.dialog.close() + let json:BaseBean = JSON.parse(res+'') as BaseBean; + if(json.code == '200') { + HMRouterMgr.pop() + } else { + promptAction.showToast({ message: json.message }) + } + }).catch((err: BusinessError) => { + + console.info(`Response fails: ${err}`); + }) + + } + mailanNoticeUpate() { + this.dialog.open() + const hashMap: HashMap = new HashMap(); + hashMap.set('uuid',this.uuid) + hashMap.set('notice',this.feedbackText) + hdHttp.httpReq(BasicConstant.mailanNoticeUpate,hashMap).then(async (res: HdResponse) => { + this.dialog.close() + let json:BaseBean = JSON.parse(res+'') as BaseBean; + if(json.code == '200') { + HMRouterMgr.pop() + } else { + promptAction.showToast({ message: json.message }) + } + }).catch((err: BusinessError) => { + + console.info(`Response fails: ${err}`); + }) + + } + + aboutToAppear(): void { + this.noteText=this.params.note + this.feedbackText=this.noteText+'' + this.uuid=this.params.uuid + } + + build() { + Column() { + HdNav({ title: '门诊信息', showRightIcon: false, hasBorder: true, isLeftAction:true,leftItemAction:()=>{ + HMRouterMgr.pop() + } }) + // 输入框区域 + TextArea({ + placeholder:'您可以在这里填写想告诉患者的停诊补充信息,最多填写300个字哦~', + controller:this.controller, + text: $$this.feedbackText + }) + + .placeholderFont({size:16}) + .placeholderColor('#999999') + .width('95%') + .height(230) + .margin(10) + .fontSize(16) + .backgroundColor(Color.White) + .borderRadius(5) + .border({ + width:1, + color:'#999999' + }) + + // 提交按钮 + Button({ type: ButtonType.Normal }){ + Text('提交') + } + .width('90%') + .height(53) + .position({x:'5%',y:'91%'}) + .backgroundColor('#ffffff') + .borderColor($r('app.color.main_color')) + .borderRadius(8) + .borderWidth(1) + .fontColor($r('app.color.main_color')) + .onClick(() => { + if (this.feedbackText.length <= 0 || !this.feedbackText) { + promptAction.showToast({message:'请输入信息'}) + return + } + if(this.noteText==this.feedbackText.trim()) + { + promptAction.showToast({message:'未修改信息内容'}) + return + } + if (this.feedbackText.length > 200) { + promptAction.showToast({message:'内容不能大于300字'}) + return + } + this.addOutPatientA() + if(StringIsEmpty(this.noteText)) + { + this.mailanNoticeAdd(); + } + else + { + this.mailanNoticeUpate(); + } + + }) + } + .width('100%') + .height('100%') + .backgroundColor(Color.White) + } +} \ No newline at end of file diff --git a/features/netease/src/main/ets/view/PatientListComp.ets b/features/netease/src/main/ets/view/PatientListComp.ets index c9db3db..63bbb26 100644 --- a/features/netease/src/main/ets/view/PatientListComp.ets +++ b/features/netease/src/main/ets/view/PatientListComp.ets @@ -3,12 +3,14 @@ import { applyListModel, authStore, BasicConstant, ChangeUtil, - hdHttp, HdLoadingDialog,HdNav, HdResponse, patientDbManager, + hdHttp, HdLoadingDialog,HdNav, HdResponse, + PatientData, + patientDbManager, PatientListModel, PatientsData, preferenceStore} from '@itcast/basic' import { Groups } from '../model/Groups'; -import { display } from '@kit.ArkUI'; +import { display, promptAction } from '@kit.ArkUI'; import { StringIsEmpty } from '@nimkit/common'; import I18n from '@ohos.i18n'; import Intl from '@ohos.intl'; @@ -42,6 +44,25 @@ export struct PatientListComp { @State old:number=preferenceStore.getItemNumber('old_patient_num') @State applyArray:applyListModel[] = []; @State needShow:boolean=false + @State delectuuid:string='' + @State delectname:string='' + @State positionDelete:number = 0 + + dialogDelete = new CustomDialogController({ + builder: DelectDialog( + { + name:this.delectname, + CallBack:()=>{ + + // regionDataGroupsList + // this.applyArray.splice(this.positionDelete,1) + this.deletePatientAction(this.delectuuid) + } + } + ), + cornerRadius: 4, + width: '70%', + }) aboutToAppear() { this. PatientsData() @@ -263,7 +284,7 @@ export struct PatientListComp { ListItemGroup({ header: this.itemHead(regionDataGroups.title) }) { - ForEach(regionDataGroups.regionDataList, (regionData: PatientsData, index?: number) => { + ForEach(regionDataGroups.regionDataList, (regionData: PatientsData, index: number) => { ListItem() { Column() { @@ -276,7 +297,7 @@ export struct PatientListComp { .borderRadius(8) Column() { - Text(regionData.realName) + Text(regionData.nickname) .fontSize(16) .fontColor($r('app.color.common_gray_01')) .width('100%') @@ -322,15 +343,24 @@ export struct PatientListComp { .width('100%') Text().height(1).width('100%').backgroundColor( $r('sys.color.ohos_id_color_panel_bg')) } - - } - // .height(100) .width('100%') .align(Alignment.Start) .onClick(() => { }) + .gesture( + LongPressGesture({ + duration: 1000, // 设置长按触发时间为1秒 + repeat: true // 允许连续触发回调 + }) + .onAction((event: GestureEvent) => { + this.delectuuid=regionData.uuid + this.delectname=regionData.realName + this.positionDelete=index + this.dialogDelete.open() + }) + ) }) } @@ -420,9 +450,6 @@ export struct PatientListComp { }.width('100%') .height('100%') - - // .backgroundColor($r('app.color.white')) - } private collationData(regionRequestData: PatientsData[]) { @@ -449,15 +476,7 @@ export struct PatientListComp { if (this.indexList.indexOf(index) === -1) { let regionDataGroups: Groups = new Groups(); - // if(this.normalIndexValue.includes(index)) - // { - regionDataGroups.title = index; - // } - // else - // { - // regionDataGroups.title = '#'; - // } - + regionDataGroups.title = index; this.indexList.push(index); regionDataGroups.regionDataList.push(value); this.regionDataGroupsList.push(regionDataGroups); @@ -488,7 +507,80 @@ export struct PatientListComp { } return 0; } + + deletePatientAction(patientUuid:string) { + this.dialog.open() + hdHttp.post(BasicConstant.cancelRes, { + "expertUuid": authStore.getUser().uuid, + "patientUuid":patientUuid + } as Record).then(async (res: HdResponse) => { + this.dialog.close(); + let json:Record> = JSON.parse(res+'') as Record> + promptAction.showToast({ message: String(json.message), duration: 1000 }) + if(json.code == '1') { + + const singlePatient: PatientData = { + uuid:patientUuid, + nickname: '', + mobile: '', + realName: '', + nation: '', + sex: 0, + type: 2, + photo: '', + expertUuid: authStore.getUser().uuid + } + const success = await patientDbManager.updatePatientByData(singlePatient) + + if (success) { + console.info('修改成功') + } else { + console.info('修改失败') + } + this.PatientsData() + } else { + console.error('获取患者信息失败:'+json.message) + } + }).catch((err: BusinessError) => { + this.dialog.close(); + console.error(`Response fails: ${err}`); + }) + } } + interface updateExtraData { expertUuid: string } +@CustomDialog +struct DelectDialog { + controller: CustomDialogController + CallBack: () => void = () => {}; + name:string='' + build() { + Column() { + Text('解除随访患者') + .fontSize(17) + .fontColor('#444444') + .padding(15) + Text('').height(1).width('100%') + .backgroundColor($r('app.color.home_gray')) + Text('解除['+this.name+']的随访关系') + .fontSize(16).fontColor($r('app.color.common_gray_03')) + .padding(10).width('100%').textAlign(TextAlign.Start) + .onClick(() => { + + if (this.controller != undefined) { + this.controller.close() + this.CallBack(); + } + }) + Text('').height(1).width('100%') + .backgroundColor($r('app.color.home_gray')) + .margin({bottom:10}) + } + + + .backgroundColor($r('app.color.white')) + + } +} \ No newline at end of file diff --git a/features/netease/src/main/ets/view/ReleaseOutpatient.ets b/features/netease/src/main/ets/view/ReleaseOutpatient.ets new file mode 100644 index 0000000..de49edf --- /dev/null +++ b/features/netease/src/main/ets/view/ReleaseOutpatient.ets @@ -0,0 +1,577 @@ +import { hdHttp, HdResponse, BasicConstant, ExpertData, authStore, BaseBean, HdLoadingDialog, + TimestampUtil, + preferenceStore} from '@itcast/basic' +import { BusinessError } from '@kit.BasicServicesKit'; +import promptAction from '@ohos.promptAction'; +import { HdNav ,DatePickerDialog} from '@itcast/basic'; +import { LengthMetrics, router } from '@kit.ArkUI'; +import { HMRouter, HMRouterMgr } from '@hadss/hmrouter'; +import { HashMap } from '@kit.ArkTS'; +import { StringIsEmpty } from '@nimkit/common'; +import { DateListBean } from '../model/StopOutPatientListModel'; +import { data } from '@kit.TelephonyKit'; +import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet'; + + +@HMRouter({ pageUrl: 'ReleaseOutpatient' }) +@Component +export struct ReleaseOutpatient { + + @State noteText: string =preferenceStore.getItemString('ReleaseOutpatient') + @State uuid: string = '' + @State reasonIndex: number = -1 + reasonOptions: string[] = ['出差', '休假', '临时安排', '其他'] + controller:TextAreaController = new TextAreaController(); + @State date_list_normal: DateListBean[] = [{ param1: '', param2: '' }] + @State date_list_temp: DateListBean[] = [{ param1: '', param2: '' }] + @State tmp_list: DateListBean[] = [] + @State private datePickerType: 'start' | 'end' = 'start' + @State private datePickerIndex: number = 0 + @State selected:string=TimestampUtil.getToday() + @State timePeriodOptions: string[] = ['上午', '下午', '晚上', '全天'] + @State showTimePeriodDropdown: number = -1 // 当前下拉的index,-1为无 + dialog: CustomDialogController = new CustomDialogController({ + builder: HdLoadingDialog({ message: '加载中...' }), + customStyle: true, + alignment: DialogAlignment.Center + }) + private datePickerDialog!: CustomDialogController; + addStopOutPatient() { + this.dialog.open() + const hashMap: HashMap = new HashMap(); + hashMap.set('type',this.reasonIndex+1+'') + hashMap.set('note',this.noteText) + hashMap.set('date_list', this.reasonIndex === 2 ? this.date_list_temp : this.date_list_normal) + hdHttp.httpReqObject(BasicConstant.addStopOutPatient,hashMap).then(async (res: HdResponse) => { + this.dialog.close() + let json:BaseBean = JSON.parse(res+'') as BaseBean; + if(json.code == '200') { + HMRouterMgr.pop() + } else { + promptAction.showToast({ message: json.message }) + } + }).catch((err: BusinessError) => { + + console.info(`Response fails: ${err}`); + }) + + } + + private dialogPublish!:CustomDialogController; + + initDialog() { + this.dialogPublish = new CustomDialogController({ + builder:PerfactInputSheets({ + controller:this.dialogPublish, + reasonOptions:this.reasonOptions[this.reasonIndex], + noteText:this.noteText, + date_list:this.reasonIndex === 2 ? this.date_list_temp : this.date_list_normal, + inputCallBack:()=>{ + this.addStopOutPatient() + + // HMRouterMgr.pop() + + + } + }), + keyboardAvoidDistance: LengthMetrics.vp(0), // 设置弹窗底部与键盘顶部间距(单位:vp) + alignment: DialogAlignment.Center, + customStyle: true, + autoCancel: false, + backgroundColor: ('rgba(0,0,0,0.5)'), + height: '100%' + }) + } + private initDatePickerDialog() { + this.datePickerDialog = new CustomDialogController({ + builder: DatePickerDialog({ + controller:this.datePickerDialog, + title:'选择开始日期', + dateOptions: { + start: new Date('1930-01-01'), + end: new Date('2100-01-01'), + selected: new Date(this.selected), + }, + dateSelected:(date:string) => { + let isTemp = this.reasonIndex === 2 + this.tmp_list = isTemp ? [...this.date_list_temp] : [...this.date_list_normal] + + + if (this.datePickerType === 'start') { + if (date < TimestampUtil.getToday()|| date > this.tmp_list[this.datePickerIndex].param2) { + if (date < TimestampUtil.getToday()) + { + promptAction.showToast({ message: '不能发布过期时间' }); + } + else + { + promptAction.showToast({ message: '结束时间不能早于开始日期' }); + } + this.tmp_list[this.datePickerIndex].param1 = '' + } else { + let list = isTemp ? this.date_list_temp : this.date_list_normal + let isDuplicate = list.some((item, idx) => idx != this.datePickerIndex && item.param2 == this.tmp_list[this.datePickerIndex].param2 && item.param1 == date); + if (isDuplicate) { + promptAction.showToast({ message: '已存在相同停诊时间' }); + this.tmp_list[this.datePickerIndex].param1 = '' + } + else + { + this.tmp_list[this.datePickerIndex].param1 = date + } + + + } + + } else { + // 选择开始日期时校验 + let list = isTemp ? this.date_list_temp : this.date_list_normal + let isDuplicate = list.some((item, idx) => idx != this.datePickerIndex && item.param1 == this.tmp_list[this.datePickerIndex].param1 && item.param2 == date); + if (isDuplicate) { + promptAction.showToast({ message: '已存在相同停诊时间' }); + this.tmp_list[this.datePickerIndex].param2 = '' + } else { + if (date < TimestampUtil.getToday() || date < this.tmp_list[this.datePickerIndex].param1) { + promptAction.showToast({ message: '不能发布过期时间' }); + this.tmp_list[this.datePickerIndex].param2 = '' + } else { + this.tmp_list[this.datePickerIndex].param2 = date + } + } + } + if(isTemp) { + this.date_list_temp = this.tmp_list + } else { + this.date_list_normal = this.tmp_list + } + } + }), + alignment: DialogAlignment.Bottom, + customStyle: true, + autoCancel: false, + backgroundColor: ('rgba(0,0,0,0.5)'), + height: '100%' + }); + } + private custom!:CustomDialogController; + initDialogcustom() { + this.custom = new CustomDialogController({ + builder:PerfactInputSheet({ + controller:this.custom, + inputTitle:'提示', + okText:'保存', + needcancelCallBack:true, + okColor:$r('app.color.top_title'), + inputPlaceholder:'您有未发布的内容,是否保存?', + style:'2', + inputCallBack:(input: string,title:string)=>{ + if(title=='needcancelCallBack') + { + preferenceStore.setItemString('ReleaseOutpatient','') + } + else + { + preferenceStore.setItemString('ReleaseOutpatient',this.noteText) + } + + HMRouterMgr.pop() + + + } + }), + alignment: DialogAlignment.Center, + customStyle: true, + autoCancel: false, + backgroundColor: ('rgba(0,0,0,0.5)'), + height: '100%' + }) + } + + aboutToAppear(): void { + this.initDatePickerDialog() + this.initDialog() + this.initDialogcustom() + } + + build() { + Column() { + HdNav({ title: '发布停诊', showRightIcon: false, hasBorder: true, isLeftAction:true,leftItemAction:()=>{ + if(this.noteText.trim()!='') + { + this.custom.open() + } + else + { + HMRouterMgr.pop() + } + + } }) + Column() + { + Text('停诊原因 *').fontSize(17).fontColor($r('app.color.top_title')).padding(10).width('100%').textAlign(TextAlign.Start) + Row() { + ForEach(this.reasonOptions, (item: string, index: number) => { + Row() { + Text(item) + .fontSize(16) + .fontColor(this.reasonIndex === index ? $r('app.color.top_title') : $r('app.color.999999')) + .height(42) + .layoutWeight(1) + .textAlign(TextAlign.Center) + .backgroundImageSize(ImageSize.Contain) + .backgroundImagePosition(Alignment.Center) + .backgroundImage(this.reasonIndex === index ? $r('app.media.check_true') : undefined) + .borderColor(this.reasonIndex === index ? Color.Transparent : $r('app.color.999999') ) + .borderWidth(1) + .borderRadius(4) + .margin({ right: 10 }) + .onClick(() => { + this.reasonIndex = index + }) + }.layoutWeight(1) + }) + }.padding({ left: 10}).width('100%') + Row() + { + Text('停诊时间 *').fontSize(17).fontColor($r('app.color.top_title')).padding(10).width('100%').textAlign(TextAlign.Start).layoutWeight(1) + Text() { + Span("+").fontColor($r('app.color.top_title')) + Span("再次添加").fontColor($r('app.color.common_gray_03')) + }.fontSize(16) + .visibility((this.reasonIndex === 2 ? this.date_list_temp.length : this.date_list_normal.length) < 3 ? Visibility.Visible : Visibility.None) + .onClick(() => { + let list = this.reasonIndex === 2 ? this.date_list_temp : this.date_list_normal + let hasempty = list.some((item, idx) => item.param1 == '' || item.param2 == ''); + if(hasempty) { + promptAction.showToast({ message: '请选择停诊时间' }); + } else { + if(this.reasonIndex === 2) { + this.date_list_temp = [...this.date_list_temp, { param1: '', param2: '' }] + } else { + this.date_list_normal = [...this.date_list_normal, { param1: '', param2: '' }] + } + } + }) + } + + .margin({ left: 10, right: 10 }).width('100%') + + Column() { + ForEach(this.reasonIndex === 2 ? this.date_list_temp : this.date_list_normal, (item: DateListBean, index: number) => { + Row() { + Text(item.param1 ? item.param1 : '选择开始日期') + .fontSize(16) + .fontColor(item.param1 ? $r('app.color.common_gray_03') : $r('app.color.999999')) + .height(42) + .textAlign(TextAlign.Center) + .borderColor($r('app.color.999999')) + .layoutWeight(1) + .borderWidth(1) + .borderRadius(4) + .onClick(() => { + if(this.reasonIndex < 0) { + promptAction.showToast({ message: '请先选择停诊原因' }); + return; + } + this.datePickerType = 'start' + this.datePickerIndex = index + this.selected = item.param1 ? item.param1 : TimestampUtil.getToday() + this.datePickerDialog.open() + }) + Text('至') + .fontSize(16) + .fontColor($r('app.color.999999')) + .textAlign(TextAlign.Center) + .visibility(this.reasonIndex === 2?Visibility.Hidden:Visibility.Visible) + .margin({left:10,right:10}) + // 临时安排特殊处理 + if (this.reasonIndex === 2) { + // 下拉选择时段 + Column() { + Text(item.param2 ? item.param2 : '请选择时段') + .fontSize(16) + .fontColor(item.param2 ? $r('app.color.common_gray_03') : $r('app.color.999999')) + .height(42) + .textAlign(TextAlign.Center) + .borderColor($r('app.color.999999')) + .borderWidth(1) + .width('100%') + .borderRadius(4) + .onClick(() => { + if(this.reasonIndex < 0) { + promptAction.showToast({ message: '请先选择停诊原因' }); + return; + } + this.showTimePeriodDropdown = index + + + }) + // 悬浮下拉菜单 + if (this.showTimePeriodDropdown === index) { + Column() { + ForEach(this.timePeriodOptions, (period: string, pidx: number) => { + Text(period) + .fontSize(16) + .fontColor($r('app.color.common_gray_03')) + .padding(8) + .onClick(() => { + let newList = [...this.date_list_temp] + let isDuplicate = this.date_list_temp.some((item, idx) => idx != this.datePickerIndex && item.param1 == this.tmp_list[this.datePickerIndex].param1 && item.param2 == period); + if (isDuplicate) { + promptAction.showToast({ message: '已存在相同停诊时间' }); + newList[index]. param2= '' + } else { + newList[index]. param2= period + } + + + this.date_list_temp = newList + this.showTimePeriodDropdown = -1 + }) + }) + } + .backgroundColor(Color.Red) + .borderColor($r('app.color.999999')) + .borderWidth(1) + .borderRadius(4) + .width('100%') + .zIndex(199) + .position({ x: 0, y: 0 }) + } + }.layoutWeight(1) + + } else { + Text(item.param2 ? item.param2 : '选择结束日期') + .fontSize(16) + .fontColor(item.param2 ? $r('app.color.common_gray_03') : $r('app.color.999999')) + .height(42) + .layoutWeight(1) + .textAlign(TextAlign.Center) + .borderColor($r('app.color.999999')) + .borderWidth(1) + .borderRadius(4) + .onClick(() => { + if(this.reasonIndex < 0) { + promptAction.showToast({ message: '请先选择停诊原因' }); + return; + } + this.datePickerType = 'end' + this.datePickerIndex = index + this.selected = item.param2 ? item.param2 : TimestampUtil.getToday() + this.datePickerDialog.open() + }) + } + Image($r('app.media.delete_notice')).width(17).height(17).margin({left:10}) + .visibility(index > 0 && (this.reasonIndex === 2 ? this.date_list_temp.length : this.date_list_normal.length) > 1 ? Visibility.Visible : Visibility.Hidden) + .onClick(() => { + if (index > 0 && (this.reasonIndex === 2 ? this.date_list_temp.length : this.date_list_normal.length) > 1) { + if(this.reasonIndex === 2) { + let newList = [...this.date_list_temp] + newList.splice(index, 1) + this.date_list_temp = newList + } else { + let newList = [...this.date_list_normal] + newList.splice(index, 1) + this.date_list_normal = newList + } + } + }) + } + .padding({ left: 10, bottom: 10, right: 10 }).width('100%') + }) + } + + + Text('备注').fontSize(17).fontColor($r('app.color.top_title')).padding(10).width('100%').textAlign(TextAlign.Start) + TextArea({ placeholder: '您可以在这里填写想告诉患者的停诊补充信息,最多填写300个字哦~', text: $$this.noteText }) + .fontColor($r('app.color.common_gray_03')) + .height(100) + .textAlign(TextAlign.Start) + .fontSize(14).padding(9).margin({left:10,right:10,bottom:10}) + .backgroundColor($r('app.color.home_gray')).borderRadius(8) + } .backgroundColor($r('app.color.white')) + Blank() + Column() + { + Text('确定发布').height(42).width(168).fontSize(17) + .backgroundColor($r('app.color.top_title')) + .fontColor($r('app.color.white')) + .textAlign(TextAlign.Center) + .borderRadius(4) + .margin({top:8}) + } + .width('100%') + .height(57) + .backgroundColor(Color.White) + .onClick(() => { + if(this.reasonIndex < 0) { + promptAction.showToast({ message: '请先选择停诊原因' }); + return; + } + let list = this.reasonIndex === 2 ? this.date_list_temp : this.date_list_normal + let hasempty = list.some((item, idx) => item.param1 == '' || item.param2 == ''); + if(hasempty) { + promptAction.showToast({ message: '请选择停诊时间' }); + return + } + this.dialogPublish.open() + + }) + } + .width('100%') + .height('100%') + .backgroundColor($r('app.color.home_gray')) + } + + +} + +@CustomDialog +export struct PerfactInputSheets { + controller:CustomDialogController; + + @Prop inputTitle:string = '公告内容'; + @Prop inputPlaceholder:string = '' + + // 添加回调函数属性 + @State okColor:ResourceStr=$r('app.color.top_title') + @State cancelColor:ResourceStr='#333333' + @State okText:ResourceStr='确定发布' + @State cancelText:ResourceStr='返回修改' + @State reasonOptions:string='' + @State noteText:string='' + + @State date_list: DateListBean[] = [] + private inputCallBack: () => void = () => {}; + @State needcancelCallBack:boolean=false + // 修改构造函数 + constructor(controller: CustomDialogController, inputCallBack: () => void) { + super(); + this.controller = controller; + this.inputCallBack = inputCallBack; + } + + build() { + + Row(){ + Column() { + Text(this.inputTitle) + .fontSize(18) + .padding(20) + .width('100%') + .textAlign(TextAlign.Center) + .fontColor('#444444') + + + Text('停诊原因:' + this.reasonOptions) + .fontSize(14) + .fontColor('#444444') + .backgroundColor(Color.White) + .padding({ left: 10, right: 10 }) + .width('79%') + + Row() { + Text('停诊时间:') + .fontColor('#444444') + .fontSize(14) + Text(this.date_list[0].param1 + ' 至 ' + this.date_list[0].param2) + .fontColor($r('app.color.common_gray_03')).padding({ left: 3 }) + .fontSize(14) + }.margin({ top: 10 }).padding({ left: 10, right: 10 }) + .width('79%') + if (this.date_list.length > 1) { + Row() { + Text('停诊时间:') + .fontColor('#444444') + .fontSize(14) + .visibility(Visibility.Hidden) + Text(this.date_list[1].param1 + " 至 " + this.date_list[1].param2) + .fontColor('#444444').padding({ left: 3 }) + .fontSize(14) + }.margin({ top: 10 }).padding({ left: 10, right: 10 }) + .width('79%') + } + + if (this.date_list.length > 2) { + Row() { + Text('停诊时间:') + .fontColor('#444444') + .fontSize(14) + .visibility(Visibility.Hidden) + Text(this.date_list[2].param1 + " 至 " + this.date_list[2].param2) + .fontColor('#444444').padding({ left: 3 }) + .fontSize(14) + } + .width('79%') + .margin({ top: 10 }).padding({ left: 10, right: 10 }) + } + + Row() { + Text() + { + Span('备').fontColor('#444444') + Span('备注').fontColor(Color.Transparent) + Span('注:').fontColor('#444444') + } + .fontColor('#444444') + .fontSize(14) + + Text(this.noteText) + .fontColor('#444444').padding({ left: 3 }) + .fontSize(14) + .textAlign(TextAlign.Start) + .layoutWeight(1) + }.margin({ top: 10 }).padding({ left: 10, right: 10 }) + .alignItems(VerticalAlign.Top) + .width('79%') + .visibility(this.noteText?Visibility.Visible:Visibility.None) + + Text().width(20).height(20) + Row() { + Text('停诊时间:') + .fontColor('#444444') + .fontSize(14) + .visibility(Visibility.Hidden) + Text(TimestampUtil.getTodayChinese()+'由医生本人发布') + .fontColor($r('app.color.common_gray_03')).padding({ left: 3 }) + .fontSize(14) + } + .margin({ top: 10 }).padding({ left: 10, right: 10 }) + Text('').height(1).width('100%') + .backgroundColor($r('app.color.home_gray')).margin({ top: 10 }) + Row() { + Text(this.cancelText) + .fontSize(15) + .fontColor(this.cancelColor) + .textAlign(TextAlign.Center) + + .height(30) + .layoutWeight(1) + .onClick(() => { + + this.controller.close() + }) + Text('').height(30).width(1) + .backgroundColor($r('app.color.home_gray')) + Text(this.okText) + .textAlign(TextAlign.Center) + .fontColor(this.okColor) + .fontSize(15) + .onClick(() => { + + this.controller.close() + this.inputCallBack(); + }) + + .height(30) + .layoutWeight(1) + + + }.margin({ top: 10, bottom: 10 }).width('100%') + } + + .width('80%').backgroundColor(Color.White) + }.borderRadius(24) + + } +} diff --git a/features/netease/src/main/ets/view/StopNoticeComp.ets b/features/netease/src/main/ets/view/StopNoticeComp.ets new file mode 100644 index 0000000..d8f2577 --- /dev/null +++ b/features/netease/src/main/ets/view/StopNoticeComp.ets @@ -0,0 +1,141 @@ +import { + BaseBean, + BasicConstant, EmptyViewComp, hdHttp, HdLoadingDialog, HdNav, HdResponse, HdSearchNav } from '@itcast/basic' +import { HMRouter, HMRouterMgr } from '@hadss/hmrouter' +import { HashMap } from '@kit.ArkTS'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { promptAction } from '@kit.ArkUI'; +import { StopOutPatientList, StopOutPatientListModel } from '../model/StopOutPatientListModel'; +import { ItemCompStop } from '../components/ItemCompStop'; + +@HMRouter({ pageUrl: 'StopNoticeComp' }) +@Component +export struct StopNoticeComp { + dialog: CustomDialogController = new CustomDialogController({ + builder: HdLoadingDialog({ message: '加载中...' }), + customStyle: true, + alignment: DialogAlignment.Center + }) + @State params:Record= HMRouterMgr.getCurrentParam() as Record; + @State data:StopOutPatientList[]=[]; + @State isEmptyViewVisible: boolean = false; // 控制显隐的状态变量 + @State empty:string='暂无数据' + @Link stopnum:number + aboutToAppear() { + + this.getList(); + + + } + @State + @Watch('deleteStopOutPatient') + delete: boolean=false + @State deleteUuid:string='' + getList() { + this.dialog.open() + this.empty='暂无停诊公告' + const hashMap: HashMap = new HashMap(); + hdHttp.httpReq(BasicConstant.stopOutPatientList,hashMap).then(async (res: HdResponse) => { + this.dialog.close(); + let json:StopOutPatientListModel = JSON.parse(res+'') as StopOutPatientListModel; + if(json.code == '200') { + this.data=[] + if(json.data!=null) + { + this.data = json.data; + this.stopnum=json.data.length + } + + if (this.data.length > 0) { + this.isEmptyViewVisible = false; + } else { + this.isEmptyViewVisible = true; + } + } else { + + promptAction.showToast({ message: json.message, duration: 1000 }) + } + }).catch((err: BusinessError) => { + this.dialog.close(); + console.info(`Response fails: ${err}`); + }) + + + } + scroller = new Scroller(); + + @State inputText:string='' + + + + build() { + Column(){ + + Text().height(20).width('100%').backgroundColor($r('app.color.home_gray')) + if (this.isEmptyViewVisible){ + EmptyViewComp({promptText:this.empty,isVisibility:this.isEmptyViewVisible}).layoutWeight(1) + } + else + { + List({ scroller: this.scroller }) { + + ForEach(this.data, (item: StopOutPatientList, index) => { + ListItem() { + ItemCompStop({item:item,deleteUuid:this.deleteUuid,delete:this.delete}) + } + }) + + } + .width('100%') + .divider({ + strokeWidth: 5, + + }) + + .edgeEffect(EdgeEffect.None) + .layoutWeight(1).clip(true) + } + // Column() + // { + // Text('发布新的停诊').height(42).width(168).fontSize(17) + // .backgroundColor($r('app.color.top_title')) + // .fontColor($r('app.color.white')) + // .textAlign(TextAlign.Center) + // .borderRadius(4) + // .margin({top:8}) + // + // } + // .width('100%') + // .height(57) + // .backgroundColor(Color.White) + } + .width('100%') + .height('100%') + .backgroundColor($r('app.color.home_gray')) + } + + + deleteStopOutPatient() { + this.dialog.open() + + const hashMap: HashMap = new HashMap(); + hashMap.set('uuid',this.deleteUuid) + hdHttp.httpReq(BasicConstant.deleteStopOutPatient,hashMap).then(async (res: HdResponse) => { + this.dialog.close(); + let json:BaseBean = JSON.parse(res+'') as BaseBean; + if(json.code == '200') { + this.getList(); + } else { + + promptAction.showToast({ message: json.message, duration: 1000 }) + } + }).catch((err: BusinessError) => { + this.dialog.close(); + console.info(`Response fails: ${err}`); + }) + + + } + +} + diff --git a/features/netease/src/main/ets/view/TabBarOutComp.ets b/features/netease/src/main/ets/view/TabBarOutComp.ets new file mode 100644 index 0000000..51375dd --- /dev/null +++ b/features/netease/src/main/ets/view/TabBarOutComp.ets @@ -0,0 +1,175 @@ +import { TabBarCompModel } from '../model/TabBarCompModel' +import { BasicConstant, hdHttp,HdNav, HdResponse } from '@itcast/basic' +import { ListCompPublic } from '../components/ListCompPublic' +import { ListCompMany } from '../components/ListCompMany' +import { StopNoticeComp } from './StopNoticeComp' +import { HMRouterMgr } from '@hadss/hmrouter' +import { HashMap } from '@kit.ArkTS' +import { BusinessError } from '@kit.BasicServicesKit' +import { PatientNoticeModel } from '../model/PatientNoticeModel' +import { promptAction } from '@kit.ArkUI' +import { ArrangementsComp } from './ArrangementsComp' + +@Component +export struct TabBarOutComp { + + @StorageProp('bottomHeight') + bottomHeight: number = 0 + @Link activeIndex: number + @State note:string='' + @State uuid:string='' + @State textInfo:string='发布新的停诊' + @State stopnum: number = 0 + aboutToAppear() { + this.mailanNoticeGet() + } + + + @Builder + TabBarBuilder(item: TabBarCompModel, index: number) { + Row() { + Text(item.label) + .fontSize(16) + .fontColor(this.activeIndex === index ? $r('app.color.top_title'):$r('app.color.common_gray_03') ) + .animation({ duration: 300 }) + .textAlign(TextAlign.Center) + .layoutWeight(1) + if (index < TabBarItems.length - 1) { + // 竖线 + Text('|').fontColor($r('app.color.common_gray_02')) // 可选:左右留点间距 + + } + } + } + + build() { + RelativeContainer() + { + Column() + { + HdNav({ title: '出/停诊公告', showLeftIcon: true, showRightIcon: false}) + Tabs({ + index: this.activeIndex + }) { + ForEach(TabBarItems, (item: TabBarCompModel, index: number) => { + TabContent() { + if (index==0) + { + + StopNoticeComp({stopnum:this.stopnum}) + + } + else if(index==1) + { + ArrangementsComp() + + } + + } + .tabBar(this.TabBarBuilder(item, index)) + + + }) + } + .layoutWeight(1) + .divider({ strokeWidth: $r('app.float.common_border_width'), color: $r('app.color.common_gray_border') }) + .barPosition(BarPosition.Start) + .barHeight(50) + .scrollable(false) + .onTabBarClick((index) => { + this.activeIndex = index + if (index==0) + { + this.textInfo='发布新的停诊' + } + else if(index==1) + { + this.textInfo='增加门诊安排' + } + + + }) + Column() + { + Text(this.textInfo).height(42).width(168).fontSize(17) + .backgroundColor($r('app.color.top_title')) + .fontColor($r('app.color.white')) + .textAlign(TextAlign.Center) + .borderRadius(4) + .margin({top:8}) + } + .width('100%') + .height(57) + .backgroundColor(Color.White) + .onClick(() => { + if (this.activeIndex==0) + { + if(this.stopnum==2) + { + promptAction.showToast({ message: "有效停诊公告最多只能两个", duration: 1000 }) + } + else + { + HMRouterMgr.push({ pageUrl: 'ReleaseOutpatient' }) + } + + } + else if(this.activeIndex==1) + { + HMRouterMgr.push({ pageUrl: 'AddOutpatient' }) + } + + + }) + + } + Image($r('app.media.send_feed')).width(50).height(50) + .alignRules({ + right: { anchor: "__container__", align: HorizontalAlign.End }, + bottom:{ anchor: "__container__", align:VerticalAlign.Bottom} + }) + .margin({bottom:100,right:30}) + .onClick(() => { + HMRouterMgr.push({ pageUrl: 'OutpatientInformation' , param: { + note:this.note, + uuid:this.uuid + } }) + + }) + } + + } + + mailanNoticeGet() { + + + const hashMap: HashMap = new HashMap(); + hdHttp.httpReq(BasicConstant.mailanNoticeGet,hashMap).then(async (res: HdResponse) => { + + let json:PatientNoticeModel = JSON.parse(res+'') as PatientNoticeModel; + if(json.code == '200') { + this.uuid=json.data.uuid + this.note=json.data.notice + + } else { + + } + }).catch((err: BusinessError) => { + + console.info(`Response fails: ${err}`); + }) + + + } +} + +export const TabBarItems: TabBarCompModel[] = [ + { + + label: '停诊公告' + }, + { + + label: '门诊安排' + } +] \ No newline at end of file diff --git a/products/expert/src/main/ets/pages/Netease/OutpatientPage.ets b/products/expert/src/main/ets/pages/Netease/OutpatientPage.ets new file mode 100644 index 0000000..1df784b --- /dev/null +++ b/products/expert/src/main/ets/pages/Netease/OutpatientPage.ets @@ -0,0 +1,38 @@ +import { OutpatientComp } from 'netease' +import { AttributeUpdater } from '@kit.ArkUI'; +import { HMDefaultGlobalAnimator, HMNavigation } from '@hadss/hmrouter'; + +class NavModifier extends AttributeUpdater { + initializeModifier(instance: NavigationAttribute): void { + instance.mode(NavigationMode.Stack); + instance.navBarWidth('100%'); + instance.hideTitleBar(true); + instance.hideToolBar(true); + } +} + +@Entry +@Component +struct OutpatientPage { + modifier: NavModifier = new NavModifier(); + + build() { + RelativeContainer() { + HMNavigation({ + navigationId:"OutpatientPageNavigation", + homePageUrl:'OutpatientPage', + options:{ + standardAnimator:HMDefaultGlobalAnimator.STANDARD_ANIMATOR, + dialogAnimator:HMDefaultGlobalAnimator.DIALOG_ANIMATOR, + modifier:this.modifier + } + }) + { + OutpatientComp() + } + + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/products/expert/src/main/resources/base/profile/main_pages.json b/products/expert/src/main/resources/base/profile/main_pages.json index b8eb675..4e852fe 100644 --- a/products/expert/src/main/resources/base/profile/main_pages.json +++ b/products/expert/src/main/resources/base/profile/main_pages.json @@ -43,7 +43,7 @@ "pages/Netease/MyOpinionPage", "pages/PatientsPage/GroupManagementPage", "pages/WebView/WebPageSnapshot", - "pages/VideoPage/PLVMediaPlayerOnlyVideoPage" - + "pages/VideoPage/PLVMediaPlayerOnlyVideoPage", + "pages/Netease/OutpatientPage" ] } \ No newline at end of file