Commit 5970ea7a by huangqy

功能介绍

parent 7da054f2
import { BasicTable } from '../../view/BasicTable/BasicTable' import promptAction from '@ohos.promptAction'
import { documentList, UniListItem } from '@ohos/system/src/main/ets/model/UniInitList'
import router from '@ohos.router'
import { TitleBar } from '../../view/title/TitleBar' import { TitleBar } from '../../view/title/TitleBar'
@Entry @Entry
@Component @Component
export struct FunctionIntroduction { export struct FunctionIntroduction {
@State searchValue: string = ''
controller: SearchController = new SearchController() @State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize(20)
.lineHeight(36)
}
.width('100%')
.height(45)
.border({ width: 2, color: 'rgb(15, 169, 131)' })
.borderRadius(3)
.backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000')
}
build() { build() {
Column() { Column() {
Flex({ direction: FlexDirection.Column }) { Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "功能介绍" }) TitleBar({ title: "功能介绍" })
// Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
// TabContent() { TabContent() {
// Column(){ Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Start }){
// this.VoucherRow() Column() {
// }.width("100%").margin({top:15}) Image($rawfile('version/ck.jpg'))
// .height(156)
// }.tabBar(this.TabBuilder(0, '凭证信息')) .width('100%')
// TabContent() { .borderRadius({ topLeft:6, topRight: 6 })
// Column(){ Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween }) {
// this.WzInfoRow() Text('被装仓库作业终端主要更新').fontSize(14)
// }.width("100%").margin({top:15}) Text('2023-04-07').fontSize(14)
// }.tabBar(this.TabBuilder(1, '物资信息')) }
// } .backgroundColor('#fff')
// .margin(15) .margin({ bottom: 8 })
// .onChange((index: number) => { .padding({ top: 8, bottom: 8, left: 6, right: 6 })
// this.currentIndex = index .borderRadius({ bottomLeft:6, bottomRight: 6 })
// }) }.onClick(() => {
promptAction.showToast({
message: '请前往被装业务信息系统2.0下载',
duration: 2000,
});
})
Column() {
Image($rawfile('version/gq.jpg'))
.height(156)
.width('100%')
.borderRadius({ topLeft: 6, topRight: 6 })
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween }) {
Text('被装仓库作业终端作业刻录机主要更新').fontSize(14)
Text('2023-06-21').fontSize(14)
}
.backgroundColor('#fff')
.margin({ bottom: 8 })
.padding({ top: 8, bottom: 8, left: 6, right: 6 })
.borderRadius({ bottomLeft: 6, bottomRight: 6 })
}.onClick(() => {
promptAction.showToast({
message: '请前往被装业务信息系统2.0下载',
duration: 2000,
});
})
}.width("100%").margin({top:10})
}.tabBar(this.TabBuilder(0, '视频功能介绍'))
TabContent() {
Flex({direction: FlexDirection.Column,justifyContent: FlexAlign.Start}){
List({ space: 2 }) {
ForEach(documentList, (item: UniListItem) => {
ListItem() {
Row() {
Row() {
Text(item?.title).fontSize(14).fontColor('#3b4144')
}
.width('64%')
Blank()
.layoutWeight(1)
Text(item.targetValue)
.fontSize(13)
.flexGrow(1)
.align(Alignment.End)
.margin({ right: 8 })
.fontColor('#999')
Image($r('app.media.right_grey')).width(8).height(16)
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 12, right: 18 })
}
.height('7%')
.onClick(() => {
router.pushUrl({
url: item.url
})
})
})
}
.width('100%')
.backgroundColor('#fff')
.divider({ strokeWidth: 1, color: 'rgb(242,242,242)' }) // 每行之间的分界线
}.width("100%")
}.tabBar(this.TabBuilder(1, '文档功能解释'))
}
.margin(15)
.onChange((index: number) => {
this.currentIndex = index
})
} }
}.linearGradient({ }.linearGradient({
direction: GradientDirection.RightBottom, direction: GradientDirection.RightBottom,
repeating: true, repeating: true,
colors: [['#36a3c0', 0.0], ['#97c6a6', 1.0], ['#c7d799', 2.0]] colors: [['#36a3c0', 0.0], ['#97c6a6', 0.6], ['#c7d799', 2.0]]
}) })
} }
......
...@@ -179,3 +179,23 @@ export const generalInitList: UniListItem[] = [ ...@@ -179,3 +179,23 @@ export const generalInitList: UniListItem[] = [
description: '模式推送方式' description: '模式推送方式'
}, },
] ]
export const documentList: UniListItem[] = [
{
title: '被装仓库作业终端主要更新',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
targetValue: '2023-04-07',
description: ''
},
{
title: '被装仓库作业终端刻录机主要更新',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
targetValue: '2023-06-21',
description: ''
},
]
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论