Commit 46f11aa6 by huangqy

系统维护

parent 8a864a00
...@@ -4,4 +4,3 @@ export { GridConstants } from './src/main/ets/constants/GridConstants'; ...@@ -4,4 +4,3 @@ export { GridConstants } from './src/main/ets/constants/GridConstants';
export { StyleConstants } from './src/main/ets/constants/StyleConstants'; export { StyleConstants } from './src/main/ets/constants/StyleConstants';
export { CommonDataSource } from './src/main/ets/utils/CommonDataSource'; export { CommonDataSource } from './src/main/ets/utils/CommonDataSource';
export { Logger } from './src/main/ets/utils/Logger'; export { Logger } from './src/main/ets/utils/Logger';
export { TitleBar } from './src/main/ets/utils/TitleBar';
import router from '@ohos.router';
@Component
export struct TitleBar {
// 左边图标是否显示
private isShowLeft = true
// 左边图标
private leftIcon = $r('app.media.back_white')
// 左边点击事件,默认返回上一页
private leftClickEvent = () => {
router.back()
}
// 标题
private title = '标题'
// 右边图标是否显示
private isShowRight = false
// 右边图标
private rightIcon = $r('app.media.back_white')
// 左边点击事件
private rightClickEvent: () => void
build() {
Column() {
Stack() {
Text(this.title).fontSize(20).fontColor('#ffffff')
Row() {
if (this.isShowLeft) {
Image(this.leftIcon).size({ width: 55, height: 55 }).padding(15)
.onClick(() => this.leftClickEvent())
}
Blank()
if (this.isShowRight) {
Image(this.rightIcon).size({ width: 55, height: 55 }).padding(15)
.onClick(this.rightClickEvent)
}
}.width('100%')
}.width('100%').height(0).layoutWeight(1)
.backgroundColor($r("app.color.title_background"))
Divider().color('#4c9a6b')
}.width('100%').height(55)
}
}
\ No newline at end of file
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
{ {
"name": "page_show", "name": "page_show",
"value": "page from npm package" "value": "page from npm package"
},
{
"name": "http_response_error",
"value": "Request error, please check if there is a network."
} }
] ]
} }
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
{ {
"name": "page_show", "name": "page_show",
"value": "page from npm package" "value": "page from npm package"
},
{
"name": "http_response_error",
"value": "Request error, please check if there is a network."
} }
] ]
} }
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
{ {
"name": "page_show", "name": "page_show",
"value": "page from npm package" "value": "page from npm package"
},
{
"name": "http_response_error",
"value": "请求出错,请检查是否有网络"
} }
] ]
} }
import { BasicTable } from '../../view/BasicTable/BasicTable'
import { TitleBar } from '../../view/title/TitleBar'
@Entry
@Component
export struct Unit {
@State searchValue: string = ''
controller: SearchController = new SearchController()
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "单位查看" })
Row() {
Search({ value: this.searchValue, placeholder: '请输入管理单位名称', controller: this.controller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.onChange((value: string) => {
this.searchValue = value
})
.margin(20)
}
}
}.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [['#36a3c0', 0.0], ['#97c6a6', 1.0], ['#c7d799', 2.0]]
})
}
}
\ No newline at end of file
import { BasicTable } from '../../view/BasicTable/BasicTable'
import { TitleBar } from '../../view/title/TitleBar'
@Entry
@Component
export struct Warehouse {
@State searchValue: string = ''
controller: SearchController = new SearchController()
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "库房查看" })
Row() {
Search({ value: this.searchValue, placeholder: '请输入库房名称', controller: this.controller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.onChange((value: string) => {
this.searchValue = value
})
.margin(20)
}
Column() {
BasicTable({ dataSource: [] })
}
}
}.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [['#36a3c0', 0.0], ['#97c6a6', 1.0], ['#c7d799', 2.0]]
})
}
}
\ No newline at end of file
...@@ -38,8 +38,8 @@ export struct BasicTable { ...@@ -38,8 +38,8 @@ export struct BasicTable {
@Builder renderEmpty() { @Builder renderEmpty() {
Flex({justifyContent:FlexAlign.Center,alignItems:ItemAlign.Center}) { Flex({justifyContent:FlexAlign.Center,alignItems:ItemAlign.Center}) {
Column() { Column() {
Image($r("app.media.empty")).width("30%") Image($r("app.media.empty")).width("42%")
Text("暂无数据").fontSize(22).fontColor("#fff") Text("暂无数据").fontSize(22).fontColor("#fff").margin({top: 5})
} }
}.height('100%') }.height('100%')
} }
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
"pages/metailmange/WzInvPage", "pages/metailmange/WzInvPage",
"pages/metailmange/WzPositionPage", "pages/metailmange/WzPositionPage",
"pages/metailmange/WzReversePage", "pages/metailmange/WzReversePage",
"pages/metailmange/AddConversionPage" "pages/metailmange/AddConversionPage",
"pages/metailmange/WzReversePage",
"pages/sub_systemMaintenance/Unit",
"pages/sub_systemMaintenance/Warehouse"
] ]
} }
import router from '@ohos.router';
import { UniListItem, uniInitList } from '../model/UniInitList';
@Component @Component
export struct SystemMaintenance { export struct SystemMaintenance {
@State message: string = 'SystemMaintenance'
build() { build() {
Row() { Row() {
Column() { Flex({direction:FlexDirection.Column}) {
Text(this.message) Image($r("app.media.systemMaintenance")).width('100%')
.fontSize(50) List({ space: 2 }) {
.fontWeight(FontWeight.Bold) ForEach(uniInitList, (item: UniListItem) => {
ListItem() {
Row() {
Row() {
Image(item?.extraIcon)
.width(24)
.height(24)
.margin({ right: 8 })
Text(item?.title).fontSize(20).fontColor('#3b4144')
}
.width('70%')
Blank()
.layoutWeight(1)
Image($r('app.media.right_grey')).width(8).height(16)
} }
.width('100%') .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)' }) // 每行之间的分界线
}
.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [['#97c6a6', 0.0], ['#e8f5c2', 1.0]]
})
} }
.height('100%') .height('100%')
} }
......
import { UniListItem } from '../model/UniInitList'
export const formatParams = (params: UniListItem) => {
return JSON.stringify(params)
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论