出诊计划相关
This commit is contained in:
parent
f73ed8ccad
commit
431758516a
145
features/netease/src/main/ets/view/AddLocation.ets
Normal file
145
features/netease/src/main/ets/view/AddLocation.ets
Normal file
@ -0,0 +1,145 @@
|
||||
import { HMRouter, HMRouterMgr } from "@hadss/hmrouter";
|
||||
import { HdNav } from "@itcast/basic";
|
||||
|
||||
@HMRouter({ pageUrl: 'AddLocation' })
|
||||
@Component
|
||||
export struct AddLocation{
|
||||
@State typeIndex: number = -1
|
||||
typeOptions: string[] = ['普通门诊', '专家门诊', '特需门诊', '专科/专病门诊']
|
||||
@State hospital_name:string=''
|
||||
build() {
|
||||
|
||||
Column()
|
||||
{
|
||||
HdNav({
|
||||
title: '新增执业地点',
|
||||
showRightIcon: false,
|
||||
hasBorder: true,
|
||||
isLeftAction: true,
|
||||
leftItemAction: () => {
|
||||
|
||||
HMRouterMgr.pop()
|
||||
|
||||
}
|
||||
})
|
||||
Column()
|
||||
{
|
||||
Row(){
|
||||
Text()
|
||||
{
|
||||
Span('医院').fontColor($r('app.color.common_gray_01'))
|
||||
Span('*').fontColor(Color.Red)
|
||||
|
||||
}
|
||||
.fontSize(18)
|
||||
TextInput({ placeholder: '请输入您的医院', text: $$this.hospital_name })
|
||||
.customStyle()
|
||||
|
||||
}
|
||||
.customStyleR()
|
||||
Text().customStyleT()
|
||||
Row(){
|
||||
Text()
|
||||
{
|
||||
Span('科室').fontColor($r('app.color.common_gray_01'))
|
||||
Span('*').fontColor(Color.Red)
|
||||
|
||||
}
|
||||
.fontSize(18)
|
||||
TextInput({ placeholder: '请输入您的科室', text: $$this.hospital_name })
|
||||
.customStyle()
|
||||
}
|
||||
.customStyleR()
|
||||
Text().customStyleT()
|
||||
Row(){
|
||||
Text()
|
||||
{
|
||||
Span('地址').fontColor($r('app.color.common_gray_01'))
|
||||
Span('*').fontColor(Color.Red)
|
||||
|
||||
}
|
||||
.fontSize(18)
|
||||
TextInput({ placeholder: '如门诊楼东侧502室', text: $$this.hospital_name })
|
||||
.customStyle()
|
||||
}
|
||||
.customStyleR()
|
||||
Text().customStyleT()
|
||||
|
||||
Text('门诊类型 *').fontSize(17).fontColor($r('app.color.top_title')).padding(10).width('100%').textAlign(TextAlign.Start)
|
||||
Row() {
|
||||
ForEach(this.typeOptions, (item: string, index: number) => {
|
||||
Row() {
|
||||
Text(item)
|
||||
.fontSize(16)
|
||||
.fontColor(this.typeIndex === 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.typeIndex === index ? $r('app.media.check_true') : undefined)
|
||||
.borderColor(this.typeIndex === index ? Color.Transparent : $r('app.color.999999') )
|
||||
.borderWidth(1)
|
||||
.borderRadius(4)
|
||||
.margin({ right: 10 })
|
||||
.onClick(() => {
|
||||
this.typeIndex = index
|
||||
})
|
||||
}.layoutWeight(1)
|
||||
})
|
||||
}.padding({ left: 10}).width('100%')
|
||||
}
|
||||
.backgroundColor(Color.White)
|
||||
.width('100%')
|
||||
|
||||
|
||||
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(() => {
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.backgroundColor($r('app.color.home_gray'))
|
||||
}
|
||||
|
||||
}
|
||||
@Extend(TextInput)
|
||||
function customStyle() {
|
||||
.placeholderColor('#C3C3C5')
|
||||
.height(45)
|
||||
.borderRadius(0)
|
||||
.backgroundColor($r('app.color.white'))
|
||||
.margin({right:10})
|
||||
.layoutWeight(1)
|
||||
.maxLines(1)
|
||||
}
|
||||
@Extend(Row)
|
||||
function customStyleR() {
|
||||
.margin({right:10,left:10})
|
||||
.width("95%")
|
||||
.height(53)
|
||||
|
||||
}
|
||||
|
||||
@Extend(Text)
|
||||
function customStyleT() {
|
||||
.margin({right:10,left:10})
|
||||
.width("95%")
|
||||
.height(0.5)
|
||||
.backgroundColor($r('app.color.home_gray'))
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user