首页重构

This commit is contained in:
lixiao 2025-09-28 16:03:16 +08:00
parent f5df84eddb
commit 75775836cd
7 changed files with 324 additions and 140 deletions

View File

@ -1,4 +1,2 @@
export * from './padController';
export * from './padController'; export * from './vehicleCollectionController';
export * from './vehicleCollectionController';

View File

@ -1,9 +1,56 @@
import { request } from '../utils/Request'; import { request } from '../utils/Request';
import { http } from '@kit.NetworkKit'; import { http } from '@kit.NetworkKit';
/** 08、获取Pad首页信息 GET /car-inspection-rest/pad/index/info */
export async function getPadIndexInfoUsingGet(params: API.getPadIndexInfoUsingGETParams) {
return request<API.RPadIndexInfoRsp>('/car-inspection-rest/pad/index/info', {
method: http.RequestMethod.GET,
params,
});
}
/** 04、获取查验预警列表 POST /car-inspection-rest/pad/inspect/alarm */
export async function getInspectAlarmUsingPost(body: API.InspectAlarmQueryReq) {
return request<API.RInspectAlarmItemRsp>('/car-inspection-rest/pad/inspect/alarm', {
method: http.RequestMethod.POST,
headers: {
'Content-Type': 'application/json',
},
data: body
});
}
/** 06、获取查验结果详情 GET /car-inspection-rest/pad/inspect/result/detail */
export async function getInspectResultDetailUsingGet(params: API.getInspectResultDetailUsingGETParams) {
return request<API.RInspectRecordDetailVo>('/car-inspection-rest/pad/inspect/result/detail', {
method: http.RequestMethod.GET,
params,
});
}
/** 05、获取查验结果列表 POST /car-inspection-rest/pad/inspect/result/list */
export async function getInspectResultListUsingPost(body: API.InspectRecordResultReq) {
return request<API.PageResultInspectRecordResultRsp>(
'/car-inspection-rest/pad/inspect/result/list',
{
method: http.RequestMethod.POST,
headers: {
'Content-Type': 'application/json',
},
data: body,
},
);
}
/** 03、获取查验线监控信息列表 GET /car-inspection-rest/pad/line/monitor */
export async function getLineMonitorInfoUsingGet() {
return request<API.RListBusiInspectVo>('/car-inspection-rest/pad/line/monitor', {
method: http.RequestMethod.GET,
});
}
/** 01、登录Pad POST /car-inspection-rest/pad/login */ /** 01、登录Pad POST /car-inspection-rest/pad/login */
export async function padLoginUsingPost(body: API.PadLoginReq) { export async function padLoginUsingPost(body: API.PadLoginReq,) {
return request<API.RPadLoginRsp>('/car-inspection-rest/pad/login', { return request<API.RPadLoginRsp>('/car-inspection-rest/pad/login', {
method: http.RequestMethod.POST, method: http.RequestMethod.POST,
headers: { headers: {
@ -14,58 +61,16 @@ export async function padLoginUsingPost(body: API.PadLoginReq) {
} }
/** 02、获取Pad记录信息 GET /car-inspection-rest/pad/record/info */ /** 02、获取Pad记录信息 GET /car-inspection-rest/pad/record/info */
export async function getPadRecordInfoUsingGet(params: API.getPadRecordInfoUsingGETParams,) { export async function getPadRecordInfoUsingGet(params: API.getPadRecordInfoUsingGETParams) {
return request<API.RPadRecordRsp>('/car-inspection-rest/pad/record/info', { return request<API.RPadRecordRsp>('/car-inspection-rest/pad/record/info', {
method: http.RequestMethod.GET,
params,
});
}
/** 03、获取查验线监控信息列表 GET /car-inspection-rest/pad/line/monitor */
export async function getLineMonitorInfoUsingGet() {
return request<API.RListBusiInspectVo>('/car-inspection-rest/pad/line/monitor', {
method: http.RequestMethod.GET,
});
}
/** 04、获取查验预警列表 POST /car-inspection-rest/pad/inspect/alarm */
export async function getInspectAlarmUsingPost(
body: API.InspectAlarmQueryReq,
) {
return request<API.RListInspectAlarmItemRsp>('/car-inspection-rest/pad/inspect/alarm', {
method: http.RequestMethod.POST,
headers: {
'Content-Type': 'application/json',
},
data: body,
});
}
/** 05、获取查验结果列表 POST /car-inspection-rest/pad/inspect/result/list */
export async function getInspectResultListUsingPost(body: API.InspectRecordResultReq,) {
return request<API.RListInspectRecordResultRsp>('/car-inspection-rest/pad/inspect/result/list', {
method: http.RequestMethod.POST,
headers: {
'Content-Type': 'application/json',
},
data: body,
});
}
/** 06、获取查验结果详情 GET /car-inspection-rest/pad/inspect/result/detail */
export async function getInspectResultDetailUsingGet(params: API.getInspectResultDetailUsingGETParams,) {
return request<API.RInspectRecordDetailVo>('/car-inspection-rest/pad/inspect/result/detail', {
method: http.RequestMethod.GET, method: http.RequestMethod.GET,
params params
}); });
} }
/** 07、获取流程阶段与步骤信息 GET /car-inspection-rest/pad/stage-step/info */ /** 07、获取流程阶段与步骤信息 GET /car-inspection-rest/pad/stage-step/info */
export async function getStageAndStepInfoUsingGet() { export async function getStageAndStepInfoUsingGet() {
return request<API.RListStageAndStepRsp>('/car-inspection-rest/pad/stage-step/info', { return request<API.RListStageAndStepRsp>('/car-inspection-rest/pad/stage-step/info', {
method: http.RequestMethod.GET, method: http.RequestMethod.GET
}); });
} }

View File

@ -1,5 +1,5 @@
declare namespace API { declare namespace API {
interface BusiInspectVo { interface BusiInspectVo {
/** 管理辖区 */ /** 管理辖区 */
administrativeJurisdiction?: string administrativeJurisdiction?: string
/** 申请日期 */ /** 申请日期 */
@ -55,12 +55,12 @@ declare namespace API {
vin?: string vin?: string
} }
interface GetCamaraConfigReq { interface GetCamaraConfigReq {
/** 设备唯一标识 */ /** 设备唯一标识 */
deviceNo?: string deviceNo?: string
} }
interface GetCamaraConfigRsp { interface GetCamaraConfigRsp {
/** 摄像头ID */ /** 摄像头ID */
id?: number id?: number
/** IP地址 */ /** IP地址 */
@ -75,24 +75,38 @@ declare namespace API {
username?: string username?: string
} }
interface getInspectResultDetailUsingGETParams { interface getInspectResultDetailUsingGETParams {
/** id */ /** id */
id: number id: number
} }
interface getPadRecordInfoUsingGETParams { interface getPadIndexInfoUsingGETParams {
/** imei */
imei: string
/** lineId */
lineId?: number
}
interface getPadRecordInfoUsingGETParams {
/** imei */ /** imei */
imei: string imei: string
} }
interface ImageBase64Req { interface ImageBase64Req {
/** Base64编码的图片 */ /** Base64编码的图片 */
imageBase64: string imageBase64: string
/** 图片格式 */ /** 图片格式 */
imageFormat?: string imageFormat?: string
} }
interface InspectAlarmItemRsp { interface InspectAlarmItemRsp {
/** 处理数量 */
dealNum?: number
/** 预警列表 */
page?: PageResultInspectAlarmItemVo
}
interface InspectAlarmItemVo {
/** 报警代码 */ /** 报警代码 */
alarmCode?: string alarmCode?: string
/** 报警信息 */ /** 报警信息 */
@ -111,32 +125,67 @@ declare namespace API {
stepName?: string stepName?: string
} }
interface InspectAlarmQueryReq { interface InspectAlarmQueryReq {
/** 报警结束时间 */ /** 报警结束时间 */
alarmEndTime?: string alarmEndTime?: string
/** 报警开始时间 */ /** 报警开始时间 */
alarmStartTime?: string alarmStartTime?: string
/** 报警状态 */ /** 报警状态 */
alarmStatus?: string alarmStatus?: string
isAsc?: string
/** 线路ID */ /** 线路ID */
lineId?: number lineId?: number
/** 流程ID */ orderByColumn?: string
pageNum?: number
pageSize?: number
reasonable?: boolean
/** 阶段ID */
stageId?: number stageId?: number
/** 查验站ID */
stationId?: number
/** 步骤ID */ /** 步骤ID */
stepId?: number stepId?: number
} }
interface InspectionInfo { interface InspectIndexCount {
/** 失败数量 */
fail?: number
/** 已完成数量 */
finish?: number
/** 今日查验总数 */
total?: number
/** 未完成数量 */
unfinish?: number
}
interface InspectionInfo {
/** 车辆类型 */ /** 车辆类型 */
carType?: string carType?: string
} }
interface InspectionVo { interface InspectionVo {
/** 流水Id */ /** 流水Id */
certificateId?: number certificateId?: number
} }
interface InspectPhotoVo { interface InspectLineInfoVo {
/** 电量示例字段默认90 */
battery?: number
/** 当前记录结束时间,未结束则为空 */
endTime?: string
/** 记录ID */
id?: number
/** 检测线ID */
lineId?: number
/** 检测线名称 */
lineName?: string
/** 检测线状态:未启动/使用中/告警 */
lineStatus?: string
/** 当前步骤名称 */
name?: string
}
interface InspectPhotoVo {
/** 主键ID */ /** 主键ID */
id?: number id?: number
/** 照片URL */ /** 照片URL */
@ -147,7 +196,7 @@ declare namespace API {
taskName?: string taskName?: string
} }
interface InspectRecordDetailVo { interface InspectRecordDetailVo {
/** 业务类型1新车注册登记 2二手车过户 3车辆年检 4车辆变更登记 5违法违规车辆 */ /** 业务类型1新车注册登记 2二手车过户 3车辆年检 4车辆变更登记 5违法违规车辆 */
businessType?: string businessType?: string
/** 创建时间 */ /** 创建时间 */
@ -186,26 +235,39 @@ declare namespace API {
vin?: string vin?: string
} }
interface InspectRecordResultReq { interface InspectRecordResultReq {
/** 查验日期 */ /** 查验结束日期 */
inspectDate?: string inspectEndDate?: string
/** 查验开始日期 */
inspectStartDate?: string
isAsc?: string
/** 查验线ID */ /** 查验线ID */
lineId?: string lineId?: string
orderByColumn?: string
pageNum?: number
pageSize?: number
reasonable?: boolean
/** 查验结果 */ /** 查验结果 */
results?: string results?: string
/** 当前阶段ID */ /** 当前阶段ID */
stageId?: string stageId?: string
/** 查询未采集列表 */
unMatch?: string
} }
interface InspectRecordResultRsp { interface InspectRecordResultRsp {
/** 品牌名称 */ /** 品牌名称 */
brandName?: string brandName?: string
/** 业务类型 */ /** 业务类型 */
businessType?: string businessType?: string
/** 创建时间 */ /** 创建时间 */
createTime?: string createTime?: string
/** 生产厂家 */
factoryName?: string
/** 查验记录id */ /** 查验记录id */
id?: string id?: string
/** 型号 */
model?: string
/** 查验线名称 */ /** 查验线名称 */
name?: string name?: string
/** 查验结果 */ /** 查验结果 */
@ -216,7 +278,7 @@ declare namespace API {
vin?: string vin?: string
} }
interface LoginRobotReq { interface LoginRobotReq {
/** imei号 */ /** imei号 */
imei?: string imei?: string
/** 密码 */ /** 密码 */
@ -225,7 +287,14 @@ declare namespace API {
username?: string username?: string
} }
interface PadLoginReq { interface PadIndexInfoRsp {
/** 首页统计信息 */
indexCount?: InspectIndexCount
/** 查验线状态列表 */
list?: InspectLineInfoVo[]
}
interface PadLoginReq {
/** pad唯一编号 */ /** pad唯一编号 */
imei?: string imei?: string
/** 密码 */ /** 密码 */
@ -234,11 +303,13 @@ declare namespace API {
username?: string username?: string
} }
interface PadLoginRsp { interface PadLoginRsp {
/** 线路 */ /** 线路 */
lines?: VcInspectionLine[] lines?: VcInspectionLine[]
/** 查验员姓名 */ /** 查验员姓名 */
name?: string name?: string
/** padId */
padId?: string
/** 检测站id */ /** 检测站id */
stationId?: string stationId?: string
/** 检测站名称 */ /** 检测站名称 */
@ -247,14 +318,47 @@ declare namespace API {
userId?: string userId?: string
} }
interface PadRecordRsp { interface PadRecordRsp {
/** imei */ /** imei */
imei?: string imei?: string
/** 线路 */ /** 线路 */
lines?: VcInspectionLine[] lines?: VcInspectionLine[]
} }
interface QueryVehicleKindRsp { interface PageResultInspectAlarmItemVo {
/** 消息状态码 */
code?: number
/** 消息内容 */
msg?: string
/** 列表数据 */
rows?: InspectAlarmItemVo[]
/** 总记录数 */
total?: number
}
interface PageResultInspectRecordResultRsp {
/** 消息状态码 */
code?: number
/** 消息内容 */
msg?: string
/** 列表数据 */
rows?: InspectRecordResultRsp[]
/** 总记录数 */
total?: number
}
interface PageResultVehicleCollectionRsp {
/** 消息状态码 */
code?: number
/** 消息内容 */
msg?: string
/** 列表数据 */
rows?: VehicleCollectionRsp[]
/** 总记录数 */
total?: number
}
interface QueryVehicleKindRsp {
/** 车架号遮挡描述:掀开主驾驶脚垫 */ /** 车架号遮挡描述:掀开主驾驶脚垫 */
blockInfo?: string blockInfo?: string
/** 充电口位置(快充) */ /** 充电口位置(快充) */
@ -273,61 +377,55 @@ declare namespace API {
slowChargingPortPosition?: string slowChargingPortPosition?: string
} }
interface R { interface R {
code?: number code?: number
data?: Record<string, object> data?: Record<string, any>
msg?: string msg?: string
} }
interface RInspectionInfo { interface RInspectAlarmItemRsp {
code?: number
data?: InspectAlarmItemRsp
msg?: string
}
interface RInspectionInfo {
code?: number code?: number
data?: InspectionInfo data?: InspectionInfo
msg?: string msg?: string
} }
interface RInspectionVo { interface RInspectionVo {
code?: number code?: number
data?: InspectionVo data?: InspectionVo
msg?: string msg?: string
} }
interface RInspectRecordDetailVo { interface RInspectRecordDetailVo {
code?: number code?: number
data?: InspectRecordDetailVo data?: InspectRecordDetailVo
msg?: string msg?: string
} }
interface RListBusiInspectVo { interface RListBusiInspectVo {
code?: number code?: number
data?: BusiInspectVo[] data?: BusiInspectVo[]
msg?: string msg?: string
} }
interface RListGetCamaraConfigRsp { interface RListGetCamaraConfigRsp {
code?: number code?: number
data?: GetCamaraConfigRsp[] data?: GetCamaraConfigRsp[]
msg?: string msg?: string
} }
interface RListInspectAlarmItemRsp { interface RListStageAndStepRsp {
code?: number
data?: InspectAlarmItemRsp[]
msg?: string
}
interface RListInspectRecordResultRsp {
code?: number
data?: InspectRecordResultRsp[]
msg?: string
}
interface RListStageAndStepRsp {
code?: number code?: number
data?: StageAndStepRsp[] data?: StageAndStepRsp[]
msg?: string msg?: string
} }
interface RobotInspectionInfoReq { interface RobotInspectionInfoReq {
/** 管理辖区 */ /** 管理辖区 */
administrativeJurisdiction?: string administrativeJurisdiction?: string
/** 申请日期 */ /** 申请日期 */
@ -408,7 +506,7 @@ declare namespace API {
wheelbase?: string wheelbase?: string
} }
interface RobotInspectionPhotoReq { interface RobotInspectionPhotoReq {
/** 合格证照片 */ /** 合格证照片 */
certConformityPhoto?: string certConformityPhoto?: string
/** 查验id */ /** 查验id */
@ -437,7 +535,7 @@ declare namespace API {
vinPhoto?: string vinPhoto?: string
} }
interface RobotInspectionVideoReq { interface RobotInspectionVideoReq {
/** 场地视频 */ /** 场地视频 */
areaVideo?: string areaVideo?: string
/** 查验id */ /** 查验id */
@ -462,7 +560,7 @@ declare namespace API {
vinVideo?: string vinVideo?: string
} }
interface RobotLoginRsp { interface RobotLoginRsp {
/** 机器人id */ /** 机器人id */
robotId?: string robotId?: string
/** 检测站id */ /** 检测站id */
@ -473,37 +571,43 @@ declare namespace API {
userId?: string userId?: string
} }
interface RPadLoginRsp { interface RPadIndexInfoRsp {
code?: number
data?: PadIndexInfoRsp
msg?: string
}
interface RPadLoginRsp {
code?: number code?: number
data?: PadLoginRsp data?: PadLoginRsp
msg?: string msg?: string
} }
interface RPadRecordRsp { interface RPadRecordRsp {
code?: number code?: number
data?: PadRecordRsp data?: PadRecordRsp
msg?: string msg?: string
} }
interface RQueryVehicleKindRsp { interface RQueryVehicleKindRsp {
code?: number code?: number
data?: QueryVehicleKindRsp data?: QueryVehicleKindRsp
msg?: string msg?: string
} }
interface RRobotLoginRsp { interface RRobotLoginRsp {
code?: number code?: number
data?: RobotLoginRsp data?: RobotLoginRsp
msg?: string msg?: string
} }
interface Rstring { interface RUploadPhotoRsp {
code?: number code?: number
data?: string data?: UploadPhotoRsp
msg?: string msg?: string
} }
interface StageAndStepRsp { interface StageAndStepRsp {
/** 阶段编号 */ /** 阶段编号 */
stageCode?: string stageCode?: string
/** 阶段id */ /** 阶段id */
@ -514,7 +618,7 @@ declare namespace API {
stepList?: StepVo[] stepList?: StepVo[]
} }
interface StepVo { interface StepVo {
code?: string code?: string
id?: number id?: number
name?: string name?: string
@ -522,14 +626,32 @@ declare namespace API {
stageId?: string stageId?: string
} }
interface UploadPhotoReq { interface UploadInspectReq {
/** 相关数据json格式的数据 */
data?: Record<string, any>
/** 设备唯一标识 */
deviceNo?: string
/** 任务编号 */
taskCode?: string
/** 任务类型例如LeftFrontResultRightRearResultTireResult。 */
taskType?: string
}
interface UploadPhotoReq {
/** base64的图片 */ /** base64的图片 */
base64?: string base64?: string
/** 查验线id可以不传。如果上传了这个参数那么同一个查验站的图片会保存在一个目录下 */ /** 查验线id可以不传。如果上传了这个参数那么同一个查验站的图片会保存在一个目录下 */
lineId?: string lineId?: string
} }
interface VcInspectionLine { interface UploadPhotoRsp {
/** 文件相对目录,传给平台的文件地址,使用这个地址!! */
path?: string
/** 访问地址前缀,文件访问时完整的目录为: url + path */
url?: string
}
interface VcInspectionLine {
code?: string code?: string
createBy?: string createBy?: string
createTime?: string createTime?: string
@ -538,7 +660,7 @@ declare namespace API {
doronCheckResult?: string doronCheckResult?: string
id?: number id?: number
name?: string name?: string
params?: Record<string, object> params?: Record<string, any>
remark?: string remark?: string
stationId?: number stationId?: number
status?: string status?: string
@ -546,7 +668,57 @@ declare namespace API {
updateTime?: string updateTime?: string
} }
interface VehicleCollectionReq { interface VehicleCollectionReq {
/** 车架号遮挡描述:掀开主驾驶脚垫 */
blockInfo?: string
/** 品牌 */
brandName?: string
/** 充电口图片 */
chargingPortPhotoUrl?: string
/** 充电口位置 */
chargingPortPosition?: string
/** 生产厂家 */
factoryName?: string
isAsc?: string
/** 型号 */
model?: string
/** 生产月份 */
month?: string
orderByColumn?: string
/** 其他移动:轮胎左侧转向、备胎移出等 */
otherMove?: string
/** padId */
padId?: number
pageNum?: number
pageSize?: number
/** 铭牌照片 */
platePhotoUrl?: string
/** 铭牌位置 */
platePosition?: string
/** 铭牌位置图片 */
platePositionUrl?: string
/** 车架号总体位置 */
position?: string
/** 车架号方位信息,类似左边、右边等 */
positionDirection?: string
/** 查询日期结束 */
queryEndDate?: string
/** 查询日期开始 */
queryStartDate?: string
reasonable?: boolean
/** 车架号座椅挪动 */
seatMove?: string
/** 慢充图片 */
slowChargingPortPhotoUrl?: string
/** 慢充位置 */
slowChargingPortPosition?: string
/** 车架号图片 */
vinPhotoUrl?: string
/** 生产年份 */
year?: string
}
interface VehicleCollectionRsp {
/** 车架号遮挡描述:掀开主驾驶脚垫 */ /** 车架号遮挡描述:掀开主驾驶脚垫 */
blockInfo?: string blockInfo?: string
/** 品牌 */ /** 品牌 */

View File

@ -1,8 +1,26 @@
import { request } from '../utils/Request'; import { request } from '../utils/Request';
import { http } from '@kit.NetworkKit'; import { http } from '@kit.NetworkKit';
/** 02、获取车型采集列表 POST /car-inspection-rest/pad/vehicleCollection/getVehicleCollectionList */
export async function getInspectAlarmUsingPost1(
body: API.VehicleCollectionReq,
) {
return request<API.PageResultVehicleCollectionRsp>(
'/car-inspection-rest/pad/vehicleCollection/getVehicleCollectionList',
{
method: http.RequestMethod.POST,
headers: {
'Content-Type': 'application/json',
},
data: body,
},
);
}
/** 01、保存车型采集信息 POST /car-inspection-rest/pad/vehicleCollection/saveCollection.do */ /** 01、保存车型采集信息 POST /car-inspection-rest/pad/vehicleCollection/saveCollection.do */
export async function saveVinPositionUsingPost(body: API.VehicleCollectionReq,) { export async function saveVinPositionUsingPost(
body: API.VehicleCollectionReq,
) {
return request<API.R>('/car-inspection-rest/pad/vehicleCollection/saveCollection.do', { return request<API.R>('/car-inspection-rest/pad/vehicleCollection/saveCollection.do', {
method: http.RequestMethod.POST, method: http.RequestMethod.POST,
headers: { headers: {

View File

@ -1,4 +1,5 @@
import router from '@ohos.router' import router from '@ohos.router'
import { padLoginUsingPost } from '../api'
import { getDeviceId } from '../utils/System' import { getDeviceId } from '../utils/System'
import Loading from './components/Loading/Index' import Loading from './components/Loading/Index'
@ -79,19 +80,20 @@ struct Index {
let deviceId = await getDeviceId() let deviceId = await getDeviceId()
// this.controller.open() this.controller.open()
// padLoginUsingPost({ padLoginUsingPost({
// username: this.account, username: this.account,
// password: this.password, password: this.password,
// imei: deviceId imei: deviceId
// }).then(() => { }).then((res) => {
router.pushUrl({ AppStorage.setOrCreate("padId", res.data?.padId!)
url: "pages/home/Index" router.pushUrl({
url: "pages/home/Index"
})
}).finally(() => {
this.controller.close()
}) })
// }).finally(() => {
// this.controller.close()
// })
} }
build() { build() {

View File

@ -6,6 +6,7 @@ import { CusButton } from '../components/button/Index'
import { Dropdown } from '../components/dropdown/Index' import { Dropdown } from '../components/dropdown/Index'
import { DateRangePicker } from '../components/date/Index' import { DateRangePicker } from '../components/date/Index'
import { CusInput } from '../components/input/Index' import { CusInput } from '../components/input/Index'
import { getInspectAlarmUsingPost } from '../../api/padController'
interface Test { interface Test {
date: string date: string
@ -90,6 +91,9 @@ struct Alarm {
} }
getData() { getData() {
getInspectAlarmUsingPost({
})
this.loading = true this.loading = true
setTimeout(() => { setTimeout(() => {
this.data = new Array(this.pageSize).fill({ this.data = new Array(this.pageSize).fill({

View File

@ -15,9 +15,9 @@ struct Home {
@State warn: number[] = [1, 2, 3, 4] @State warn: number[] = [1, 2, 3, 4]
@State select: number = 0 @State select: number = 0
@State ring: RingOptions[] = [ @State ring: RingOptions[] = [
{ color: 0xffcc31, count: 10 }, { color: 0xffcc31, count: 20 },
{ color: 0x33ff29, count: 20 }, { color: 0x33ff29, count: 60 },
{ color: 0xff3a48, count: 30 }, { color: 0xff3a48, count: 10 },
] ]
@State ring2: RingOptions[] = [ @State ring2: RingOptions[] = [
{ color: 0x034B61, count: 10, animate: false }, { color: 0x034B61, count: 10, animate: false },
@ -49,21 +49,6 @@ struct Home {
return true return true
} }
toDetail(index: number) {
const url: string[] = [
"pages/filing/Index",
"pages/monitor/Index",
"pages/alarm/Index",
"pages/result/Index",
"pages/control/Index",
"pages/vehicle/Index",
"pages/reboot/Index",
]
router.pushUrl({
url: url[index]
})
}
build() { build() {
Column() { Column() {
Row() { Row() {
@ -133,7 +118,7 @@ struct Home {
Row() { Row() {
Column() { Column() {
Text("正在查验数量").fontSize(24).fontColor(0xffffff).fontWeight(700).margin({ bottom: 6 }) Text("正在查验数量").fontSize(24).fontColor(0xffffff).fontWeight(700).margin({ bottom: 6 })
Text("40").fontSize(32).fontColor(0xFFCC31).fontWeight(700) Text(this.ring[0].count.toString()).fontSize(32).fontColor(0xFFCC31).fontWeight(700)
} }
.layoutWeight(1.8) .layoutWeight(1.8)
.justifyContent(FlexAlign.Center) .justifyContent(FlexAlign.Center)
@ -145,7 +130,7 @@ struct Home {
Column() { Column() {
Text("完成数量").fontSize(24).fontColor(0xffffff).fontWeight(700).margin({ bottom: 6 }) Text("完成数量").fontSize(24).fontColor(0xffffff).fontWeight(700).margin({ bottom: 6 })
Text("34").fontSize(32).fontColor(0x33FF29).fontWeight(700) Text(this.ring[1].count.toString()).fontSize(32).fontColor(0x33FF29).fontWeight(700)
} }
.layoutWeight(1.4) .layoutWeight(1.4)
.justifyContent(FlexAlign.Center) .justifyContent(FlexAlign.Center)
@ -157,7 +142,7 @@ struct Home {
Column() { Column() {
Text("失败").fontSize(24).fontColor(0xffffff).fontWeight(700).margin({ bottom: 6 }) Text("失败").fontSize(24).fontColor(0xffffff).fontWeight(700).margin({ bottom: 6 })
Text("12").fontSize(32).fontColor(0xFF3A48).fontWeight(700) Text(this.ring[2].count.toString()).fontSize(32).fontColor(0xFF3A48).fontWeight(700)
} }
.layoutWeight(1) .layoutWeight(1)
.justifyContent(FlexAlign.Center) .justifyContent(FlexAlign.Center)