Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jump_hm_warehouse
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
毛勇泽
jump_hm_warehouse
Commits
5f959268
Commit
5f959268
authored
Jan 16, 2024
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统通用配置等一些页面
parent
bd6f6dc7
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
225 行增加
和
8 行删除
+225
-8
General.ets
entry/src/main/ets/pages/sub_systemMaintenance/General.ets
+75
-0
Setting.ets
entry/src/main/ets/pages/sub_systemMaintenance/Setting.ets
+67
-0
main_pages.json
entry/src/main/resources/base/profile/main_pages.json
+3
-1
SystemMaintenance.ets
features/SystemMaintenance/src/main/ets/components/SystemMaintenance.ets
+1
-1
UniInitList.ets
features/SystemMaintenance/src/main/ets/model/UniInitList.ets
+79
-6
没有找到文件。
entry/src/main/ets/pages/sub_systemMaintenance/General.ets
0 → 100644
View file @
5f959268
import { generalInitList, UniListItem } from '@ohos/system/src/main/ets/model/UniInitList'
import { TitleBar } from '../../view/title/TitleBar'
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#fff')
.fontColor('#0fa983')
.borderRadius(10)
.type(ButtonType.Normal)
.stateEffect(true)
}
@Entry
@Component
export struct General {
build() {
Column() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.SpaceBetween}) {
TitleBar({ title: "通用" })
Column() {
List({ space: 2 }) {
ForEach(generalInitList, (item: UniListItem) => {
ListItem() {
Row() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center }) {
Text(item.title).fontSize(20).fontColor('#3b4144')
Text(item.description).fontSize(14).fontColor('#999').margin({ top: 3 })
}
.width('60%')
Blank()
.layoutWeight(1)
Text(item.targetValue)
.fontSize(16)
.flexGrow(1)
.align(Alignment.End)
.margin({ right: 8 })
.fontColor('#999')
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 12, right: 18 })
}
.height('8%')
.onClick(() => {
})
})
}
.width('100%')
.backgroundColor('#fff')
.divider({ strokeWidth: 1, color: 'rgb(242,242,242)' }) // 每行之间的分界线
}.margin({ top:5, bottom: 5 })
Row() {
Flex({ justifyContent: FlexAlign.SpaceAround }) {
Button("保存").CommonButtonStyle()
Button("重置").CommonButtonStyle()
}
}.height(80).backgroundColor('#97c6a6')
}
}.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [['#97c6a6', 0.0], ['#e8f5c2', 1.0]]
})
}
}
\ No newline at end of file
entry/src/main/ets/pages/sub_systemMaintenance/Setting.ets
0 → 100644
View file @
5f959268
import { TitleBar } from '../../view/title/TitleBar'
import router from '@ohos.router';
import { UniListItem, sysInitList } from '@ohos/system/src/main/ets/model/UniInitList';
@Entry
@Component
export struct Setting {
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "系统设置" })
Image($rawfile('system/system_header.jpg')).width('100%').height(187)
Column() {
List({ space: 2 }) {
ForEach(sysInitList, (item: UniListItem) => {
ListItem() {
Row() {
Row() {
Image(item?.extraIcon)
.width(24)
.height(24)
.margin({ right: 8 })
Text(item?.title).fontSize(20).fontColor('#3b4144')
}
.width('60%')
Blank()
.layoutWeight(1)
Text(item.targetValue)
.fontSize(16)
.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)' }) // 每行之间的分界线
}.margin({ top:5, bottom: 5 })
}
}.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [['#97c6a6', 0.0], ['#e8f5c2', 1.0]]
})
}
}
\ No newline at end of file
entry/src/main/resources/base/profile/main_pages.json
View file @
5f959268
...
...
@@ -16,6 +16,8 @@
"pages/sub_systemMaintenance/Unit"
,
"pages/sub_systemMaintenance/Warehouse"
,
"pages/sub_systemMaintenance/GoodsShelf"
,
"pages/sub_systemMaintenance/Pmhx"
"pages/sub_systemMaintenance/Pmhx"
,
"pages/sub_systemMaintenance/Setting"
,
"pages/sub_systemMaintenance/General"
]
}
features/SystemMaintenance/src/main/ets/components/SystemMaintenance.ets
View file @
5f959268
...
...
@@ -19,7 +19,7 @@ export struct SystemMaintenance {
.margin({ right: 8 })
Text(item?.title).fontSize(20).fontColor('#3b4144')
}
.width('
7
0%')
.width('
6
0%')
Blank()
.layoutWeight(1)
...
...
features/SystemMaintenance/src/main/ets/model/UniInitList.ets
View file @
5f959268
export interface UniListItem {
title: string;
showExtraIcon: boolean;
showArrow: boolean;
extraIcon?: Resource;
url: string;
title: string; // 标题
showExtraIcon: boolean; // 是否显示额外的图标
showArrow: boolean; // 右边箭头
extraIcon?: Resource; // 图标本体
url?: string; // 跳转的URL
targetValue?: string; // 右侧的值
description?: string; // 描述
}
export const uniInitList: UniListItem[] = [
...
...
@@ -47,6 +49,77 @@ export const uniInitList: UniListItem[] = [
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
url: 'setting'
url: 'pages/sub_systemMaintenance/Setting'
},
]
export const sysInitList: UniListItem[] = [
{
title: '通用',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
url: 'pages/sub_systemMaintenance/General',
targetValue: '基础设置信息'
},
{
title: '设备',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
url: '/Unit',
targetValue: '应用设备信息'
},
]
export const generalInitList: UniListItem[] = [
{
title: '2.0业务数据服务IP',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
targetValue: '',
description: '2.0业务数据服务IP'
},
{
title: '2.0业务终端IP',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
targetValue: '',
description: '2.0业务终端IP'
},
{
title: '2.0业务终端通讯端口',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
targetValue: '',
description: '通讯端口设置'
},
{
title: '传输方式',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
targetValue: '',
description: '数据传输方式'
},
{
title: '连接模式',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
targetValue: '',
description: '模式连接方式'
},
{
title: '推送模式',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
targetValue: '',
description: '模式推送方式'
},
]
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论