门诊安排弹窗层级问题

This commit is contained in:
xiaoxiao
2025-07-29 17:25:09 +08:00
parent 7c2db724a5
commit 8ac8d11256
3 changed files with 112 additions and 45 deletions
@@ -47,6 +47,13 @@ export struct AddAndEditRecordComp {
onRemoveImg() {
this.photos.splice(this.removeIndex, 1)
this.maxSelectNumber = 8 - this.photos.length;
ChangeUtil.convertUrisOrUrlsToBase64(this.photos).then(base64Array => {
console.info('转换结果:', base64Array+'转换个数:'+base64Array.length)
this.base64Array = base64Array
}).catch((err:BusinessError) => {
console.error('批量转换失败:', err)
})
}
aboutToAppear(): void {
@@ -117,6 +124,28 @@ export struct AddAndEditRecordComp {
})
}
deleteTecordData() {
const entity = {
"uuid": this.recordUuid
} as Record<string,string>
this.dialog.open()
hdHttp.post<string>(BasicConstant.delConditionRecord, entity).then(async (res: HdResponse<string>) => {
this.dialog.close();
logger.info('Response delConditionRecord'+res);
let json:Record<string,string | Record<string,string> | Array<Record<string,string>>> = JSON.parse(res+'') as Record<string,string | Record<string,string> | Array<Record<string,string>>>;
if(json.code == '1') {
HMRouterMgr.pop({param:{"isRefresh":"1"}})
promptAction.showToast({ message:'删除病情记录成功', duration: 1000 })
} else {
console.error('删除病情记录信息失败:'+json.message)
promptAction.showToast({ message: String(json.message), duration: 1000 })
}
}).catch((err: BusinessError) => {
this.dialog.close();
console.error(`Response fails: ${err}`);
})
}
build() {
Column() {
HdNav({title:'病情记录',isLeftAction:true,showRightIcon:false,showRightText:true,rightText:'提交',rightItemAction:()=>{
@@ -125,6 +154,23 @@ export struct AddAndEditRecordComp {
HMRouterMgr.pop()
}})
this.contentView()
if (this.params){
if (this.params["model"]) {
Text('删除该条记录')
.textAlign(TextAlign.Center)
.fontSize(16)
.fontColor(Color.White)
.backgroundColor($r('app.color.main_color'))
.width('90%')
.height(50)
.borderRadius(5)
.margin({left:10,right:10,bottom:20})
.onClick(()=>{
this.deleteTecordData()
})
}
}
}
.width('100%')
}
@@ -176,6 +222,8 @@ export struct AddAndEditRecordComp {
.padding({top:10})
.backgroundColor('#f4f4f4')
Blank()
.layoutWeight(1)
}
changeToImg( imgListurl:string[]) {
@@ -187,15 +235,13 @@ export struct AddAndEditRecordComp {
return imgListtmps
}
changeToImgs( imgListurl:string[])
{
changeToImgs( imgListurl:string[]) {
let imgListtmps:string[]=[]
imgListurl.forEach((url: string) => {
let item = BasicConstant.urlHtml + url
imgListtmps.push(item)
})
return imgListtmps
}
private initPhotoDialog() {
@@ -212,9 +258,6 @@ export struct AddAndEditRecordComp {
}
this.photos.push(...selectedUris);
this.maxSelectNumber = 8 - this.photos.length
// ChangeUtil.convertUriToBase64(selectedUris[0]).then((base64)=>{
// this.base64Array = [base64]
// })
ChangeUtil.convertUrisOrUrlsToBase64(selectedUris).then(base64Array => {
console.info('转换结果:', base64Array+'转换个数:'+base64Array.length)
this.base64Array = base64Array