出诊计划相关
This commit is contained in:
@@ -93,4 +93,6 @@ export { PatientListModel,PatientsData } from './src/main/ets/models/PatientList
|
||||
|
||||
export { applyListCallBacl, applyListModel, applyHistoryCallBacl , historyObjectModel, historyModel } from './src/main/ets/models/ApplyModel'
|
||||
|
||||
export { TripleOptionDialog } from './src/main//ets/Views/TripleOptionDialog'
|
||||
export { TripleOptionDialog } from './src/main//ets/Views/TripleOptionDialog'
|
||||
|
||||
export { HdTwoNav } from './src/main/ets/components/HdTwoNav'
|
||||
@@ -0,0 +1,135 @@
|
||||
import { router } from '@kit.ArkUI'
|
||||
|
||||
@Builder
|
||||
function defaultBuilder(): void {
|
||||
|
||||
}
|
||||
|
||||
@Component
|
||||
export struct HdTwoNav {
|
||||
@StorageProp('topHeight')
|
||||
topHeight: number = 0
|
||||
@Prop
|
||||
title: string = ''
|
||||
@Prop
|
||||
textColor: ResourceStr = $r('app.color.top_title')
|
||||
@Prop
|
||||
bgColor: ResourceStr = $r('app.color.top_bg')
|
||||
@Prop
|
||||
hasBorder: boolean = false
|
||||
@Prop
|
||||
leftIcon: ResourceStr = $r('app.media.top_back')
|
||||
@Prop
|
||||
rightIcon: ResourceStr = $r('sys.media.ohos_ic_public_more')
|
||||
@Prop
|
||||
rightIcon2: ResourceStr = $r('sys.media.ohos_ic_public_more')
|
||||
@Prop
|
||||
showRightIcon: boolean = true
|
||||
@Prop
|
||||
showRightIcon2: boolean = true
|
||||
@Prop
|
||||
showLeftIcon: boolean = true
|
||||
@Prop
|
||||
showRightText: boolean = false
|
||||
@Prop
|
||||
rightText: string = ''
|
||||
@Prop
|
||||
rightBackColor:ResourceColor = this.bgColor
|
||||
@Prop
|
||||
rightTextColor:ResourceColor = this.textColor
|
||||
@BuilderParam
|
||||
titleBuilder: () => void = defaultBuilder
|
||||
@BuilderParam
|
||||
menuBuilder: () => void = defaultBuilder
|
||||
@Prop
|
||||
isLeftAction: boolean = false
|
||||
// 添加右侧点击函数
|
||||
private rightItemAction:()=> void = () => {};
|
||||
// 添加右侧点击函数
|
||||
private rightItemAction2:()=> void = () => {};
|
||||
// 添加左侧点击函数
|
||||
private leftItemAction:()=> void = () => {};
|
||||
|
||||
build() {
|
||||
Row() {
|
||||
if (this.showLeftIcon) {
|
||||
Row()
|
||||
{
|
||||
Image(this.leftIcon)
|
||||
.size({ width: 24, height: 24 })
|
||||
.onClick(() => this.isLeftAction? this.leftItemAction():router.back())
|
||||
.fillColor($r('app.color.black'))
|
||||
}
|
||||
.size({ width: 50, height: 50 })
|
||||
Blank()
|
||||
.width(50)
|
||||
|
||||
} else {
|
||||
Blank()
|
||||
.width(50)
|
||||
}
|
||||
Row() {
|
||||
if (this.title) {
|
||||
Text(this.title)
|
||||
.layoutWeight(1)
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontSize(20)
|
||||
.fontColor(this.textColor)
|
||||
.maxLines(1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
} else if (this.titleBuilder) {
|
||||
this.titleBuilder()
|
||||
}
|
||||
}
|
||||
.height(56)
|
||||
.width(150)
|
||||
.layoutWeight(1)
|
||||
|
||||
if (this.showRightIcon2) {
|
||||
Row()
|
||||
{
|
||||
Image(this.rightIcon2)
|
||||
.size({ width: 24, height: 24 })
|
||||
.objectFit(ImageFit.Contain)
|
||||
.bindMenu(this.menuBuilder)
|
||||
.onClick(()=>this.rightItemAction2())
|
||||
}
|
||||
.size({ width: 50, height: 50 }).justifyContent(FlexAlign.End)
|
||||
|
||||
}
|
||||
if (this.showRightIcon) {
|
||||
Row()
|
||||
{
|
||||
Image(this.rightIcon)
|
||||
.size({ width: 24, height: 24 })
|
||||
.objectFit(ImageFit.Contain)
|
||||
.bindMenu(this.menuBuilder)
|
||||
.onClick(()=>this.rightItemAction())
|
||||
}
|
||||
.size({ width: 50, height: 50 }).justifyContent(FlexAlign.End)
|
||||
|
||||
}
|
||||
else if (this.showRightText) {
|
||||
Text(this.rightText)
|
||||
.maxFontSize(16)
|
||||
.minFontSize(6)
|
||||
.maxLines(1)
|
||||
.fontColor(this.rightTextColor)
|
||||
.onClick(()=>this.rightItemAction())
|
||||
.width(50)
|
||||
.textAlign(TextAlign.Center)
|
||||
.borderRadius(5)
|
||||
.backgroundColor(this.rightBackColor)
|
||||
.height(35)
|
||||
// .margin({right:10})
|
||||
} else {
|
||||
Blank()
|
||||
.width(50)
|
||||
}
|
||||
}
|
||||
.padding({ left: 16, right: 16, top: this.topHeight })
|
||||
.height(56 + this.topHeight)
|
||||
.width('100%')
|
||||
.backgroundColor(this.bgColor)
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ export class BasicConstant {
|
||||
// static readonly wxUrl = "https://wx.igandan.com/";// 微信服务器地址
|
||||
// static readonly polvId = "21";//保利威视学员id
|
||||
|
||||
|
||||
static readonly getSystemTimeStamp = BasicConstant.urlImage+'manager/getSystemTimeStamp'
|
||||
static readonly addBonusPoints = BasicConstant.urlExpertApp+'addBonusPoints'
|
||||
static readonly indexV2 = BasicConstant.urlExpertAPI+'indexV2';//首页轮播
|
||||
static readonly applyList = BasicConstant.urlExpert+'applyList'
|
||||
@@ -113,6 +113,9 @@ export class BasicConstant {
|
||||
static readonly updateOutPatientA= BasicConstant.urlExpertApp+"updateOutPatientA";//修改门诊安排A
|
||||
static readonly addOutPatient= BasicConstant.urlExpertAPI+"addOutPatient";//添加门诊安排
|
||||
static readonly deleteWorkPlace= BasicConstant.urlExpertApp+"deleteWorkPlace";//执业地点-删除
|
||||
static readonly hospitalList= BasicConstant.urlExpertApp+"hospitalList";//添加职业地点-医院列表
|
||||
static readonly addWorkPlace= BasicConstant.urlExpertApp+"addWorkPlace";//执业地点-增加
|
||||
static readonly editWorkPlace= BasicConstant.urlExpertApp+"editWorkPlace";//执业地点-修改
|
||||
static readonly province=['全国','北京市','天津市','河北省','山西省'
|
||||
,'内蒙古自治区','辽宁省','吉林省','黑龙江省','上海市','江苏省','浙江省'
|
||||
,'安徽省','福建省','江西省','山东省','河南省','湖北省','湖南省','广东省',
|
||||
|
||||
@@ -10,6 +10,8 @@ import { i18n } from '@kit.LocalizationKit';
|
||||
import { connection } from '@kit.NetworkKit';
|
||||
import http from '@ohos.net.http'
|
||||
import {BasicConstant} from '../constants/BasicConstant'
|
||||
import { componentUtils } from '@kit.ArkUI';
|
||||
|
||||
export class ChangeUtil {
|
||||
/**
|
||||
* 将HashMap转成JsonString
|
||||
@@ -287,4 +289,27 @@ export class ChangeUtil {
|
||||
const pattern = /\.(jpg|jpeg|png|gif|bmp|webp)$/i;
|
||||
return pattern.test(path);
|
||||
}
|
||||
|
||||
static getColumnX(id:string):number {
|
||||
const componentInfo = componentUtils.getRectangleById(id)
|
||||
const screenX = componentInfo.screenOffset.x//3.38
|
||||
return screenX
|
||||
}
|
||||
|
||||
static getColumnY(id:string):number {
|
||||
const componentInfo = componentUtils.getRectangleById(id)
|
||||
const screenY = componentInfo.screenOffset.y//3.38
|
||||
return screenY
|
||||
}
|
||||
|
||||
static getColunmWidth(id:string):number {
|
||||
const componentInfo = componentUtils.getRectangleById(id)
|
||||
const width = componentInfo.size.width//3.38
|
||||
return width
|
||||
}
|
||||
static getColunmHeight(id:string):number {
|
||||
const componentInfo = componentUtils.getRectangleById(id)
|
||||
const height = componentInfo.size.height//3.38
|
||||
return height
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user