会议提交测试
This commit is contained in:
parent
c8184e2b32
commit
da5a1b603c
File diff suppressed because it is too large
Load Diff
@ -86,10 +86,10 @@ export struct HdList {
|
|||||||
.width('100%')
|
.width('100%')
|
||||||
.height('100%')
|
.height('100%')
|
||||||
.padding({ left: BasicConstant.SPACE_LG, right: BasicConstant.SPACE_LG })
|
.padding({ left: BasicConstant.SPACE_LG, right: BasicConstant.SPACE_LG })
|
||||||
.divider({
|
// .divider({
|
||||||
strokeWidth: $r('app.float.common_border_width'),
|
// strokeWidth: $r('app.float.common_border_width'),
|
||||||
color: $r('app.color.common_gray_border')
|
// color: $r('app.color.common_gray_border')
|
||||||
})
|
// })
|
||||||
.onReachEnd(() => {
|
.onReachEnd(() => {
|
||||||
if (this.loading || this.refreshing || this.finished) {
|
if (this.loading || this.refreshing || this.finished) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -15,4 +15,5 @@ export class BasicConstant {
|
|||||||
|
|
||||||
|
|
||||||
static readonly getStartpage=BasicConstant.urlapp + "startpage";
|
static readonly getStartpage=BasicConstant.urlapp + "startpage";
|
||||||
|
static readonly meetingListV2=BasicConstant.urlmyLan + "meetingListV2";
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "hd_list_finished",
|
"name": "hd_list_finished",
|
||||||
"value": "没有更多了~"
|
"value": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "hd_clock_in",
|
"name": "hd_clock_in",
|
||||||
|
|||||||
@ -1,13 +1,26 @@
|
|||||||
|
|
||||||
import { MeetingItemModel,ItemModel } from '../model/ItemModel'
|
import { MeetingItemModel,ItemModel } from '../model/ItemModel'
|
||||||
|
@Preview
|
||||||
@Component
|
@Component
|
||||||
export struct ItemComp {
|
export struct ItemComp {
|
||||||
item: MeetingItemModel = new MeetingItemModel({} as ItemModel)
|
item: MeetingItemModel = new MeetingItemModel({} as ItemModel)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
Column({ space: 12 }) {
|
Column() {
|
||||||
|
if(this.item.count==0)
|
||||||
|
{
|
||||||
|
Text(this.item.begin_date.substring(0, 4)
|
||||||
|
+ "年"
|
||||||
|
+ this.item.begin_date.substring(5, 7)
|
||||||
|
+ "月").fontSize(14).fontColor('app.color.333333').height(35)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Text(this.item.count+'')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
}.backgroundColor($r('app.color.e4e4e4')).width('100%')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,14 +1,16 @@
|
|||||||
import { ItemComp } from './ItemComp'
|
import { ItemComp } from './ItemComp'
|
||||||
import { MeetingItemModel } from '../model/ItemModel'
|
import { MeetingItemModel,MeetingModel,MeetingModels,ItemModel } from '../model/ItemModel'
|
||||||
import { HdList, HdListController,BasicConstant } from '@itcast/basic/Index'
|
import { HdList, HdListController,BasicConstant,hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
|
||||||
import promptAction from '@ohos.promptAction'
|
import { promptAction, router } from '@kit.ArkUI'
|
||||||
|
import { BusinessError } from '@kit.BasicServicesKit';
|
||||||
|
|
||||||
import HashMap from '@ohos.util.HashMap';
|
import HashMap from '@ohos.util.HashMap';
|
||||||
import { hdHttp } from '@itcast/basic'
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export struct ListComp {
|
export struct ListComp {
|
||||||
@State
|
@State
|
||||||
list: MeetingItemModel[] = []
|
list: ItemModel[] = []
|
||||||
controller = new HdListController()
|
controller = new HdListController()
|
||||||
@State
|
@State
|
||||||
page: number = 1
|
page: number = 1
|
||||||
@ -30,29 +32,7 @@ export struct ListComp {
|
|||||||
|
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
this.page = 1
|
this.page = 1
|
||||||
this.hashMap.clear();
|
this.initData(0)
|
||||||
// this.hashMap.set('mobile',this.mobile)
|
|
||||||
//
|
|
||||||
// this.hashMap.set('current_spec','hongmeng')
|
|
||||||
// hdHttp.httpReq<string>(this.loginUrl,this.hashMap).then(async (res: HdResponse<string>) => {
|
|
||||||
// this.loading = false
|
|
||||||
// logger.info('Response login'+res);
|
|
||||||
// console.info(`Response login succeeded: ${res}`);
|
|
||||||
// let json:LoginInfo = JSON.parse(res+'') as LoginInfo;
|
|
||||||
//
|
|
||||||
// if(json.code=='1')
|
|
||||||
// {
|
|
||||||
// this.getSaveUserInfor(1,json)
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// promptAction.showToast({ message: json.message, duration: 1000 })
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }).catch((err: BusinessError) => {
|
|
||||||
// this.loading = false
|
|
||||||
// console.info(`Response login fail: ${err}`);
|
|
||||||
// })
|
|
||||||
// InterviewService.findInterviewList({
|
// InterviewService.findInterviewList({
|
||||||
// questionBankType: 9,
|
// questionBankType: 9,
|
||||||
// page: this.page,
|
// page: this.page,
|
||||||
@ -70,6 +50,58 @@ export struct ListComp {
|
|||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initData(type:number)
|
||||||
|
{
|
||||||
|
this.hashMap.clear();
|
||||||
|
this.hashMap.set('page', this.page+"")
|
||||||
|
hdHttp.httpReq<string>(BasicConstant.meetingListV2,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||||
|
logger.info('Response meetingListV2'+res);
|
||||||
|
let json:MeetingModels = JSON.parse(res+'') as MeetingModels;
|
||||||
|
|
||||||
|
if(type==0)
|
||||||
|
{
|
||||||
|
this.controller.refreshed()
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.controller.loaded()
|
||||||
|
}
|
||||||
|
if(this.page==1&&json.data.list!=null&&json.data.list.length>0)
|
||||||
|
{
|
||||||
|
this.list = json.data.list
|
||||||
|
}
|
||||||
|
else if(this.page>1)
|
||||||
|
{
|
||||||
|
this.list.push(...json.data.list)
|
||||||
|
}
|
||||||
|
this.getPosition()
|
||||||
|
if (this.page >= json.data.pages) {
|
||||||
|
this.controller.finished()
|
||||||
|
} else {
|
||||||
|
this.page++
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getPosition() {
|
||||||
|
let DatasList:string[] = [];
|
||||||
|
let count = 0;
|
||||||
|
for (let i = 0; i <this.list.length; i++) {
|
||||||
|
if (!DatasList.includes(this.list[i].begin_date
|
||||||
|
.substring(0, 7))) {
|
||||||
|
DatasList.push(this.list[i].begin_date.substring(0, 7));
|
||||||
|
count = 0;
|
||||||
|
this.list[i].count=count;
|
||||||
|
} else {
|
||||||
|
count++;
|
||||||
|
this.list[i].count=count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
build() {
|
build() {
|
||||||
HdList({
|
HdList({
|
||||||
lw: 1,
|
lw: 1,
|
||||||
@ -78,20 +110,8 @@ export struct ListComp {
|
|||||||
this.onRefresh()
|
this.onRefresh()
|
||||||
},
|
},
|
||||||
onLoad: () => {
|
onLoad: () => {
|
||||||
// InterviewService.findInterviewList({
|
this.initData(1)
|
||||||
// questionBankType: 9,
|
|
||||||
// page: this.page,
|
|
||||||
// sort: this.sort,
|
|
||||||
// keyword: this.keyword
|
|
||||||
// }).then(res => {
|
|
||||||
// this.list.push(...res.data.rows)
|
|
||||||
// this.controller.loaded()
|
|
||||||
// if (this.page >= res.data.pageTotal) {
|
|
||||||
// this.controller.finished()
|
|
||||||
// } else {
|
|
||||||
// this.page++
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}) {
|
}) {
|
||||||
ForEach(this.list, (item: MeetingItemModel) => {
|
ForEach(this.list, (item: MeetingItemModel) => {
|
||||||
|
|||||||
76
features/Home/src/main/ets/model/ItemModel.ets
Normal file
76
features/Home/src/main/ets/model/ItemModel.ets
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
import { List } from '@kit.ArkTS';
|
||||||
|
export interface ItemModel {
|
||||||
|
count:number;
|
||||||
|
title:string;
|
||||||
|
uuid:string;
|
||||||
|
end_date:string;
|
||||||
|
begin_date:string;
|
||||||
|
sort:string;
|
||||||
|
// status (0 无直播 1 待直播 2 直播中 3 已结束)
|
||||||
|
status:string;
|
||||||
|
location:string;
|
||||||
|
type:string;
|
||||||
|
path:string;
|
||||||
|
content:string;
|
||||||
|
// liveimg (直播图片)
|
||||||
|
liveimg:string;
|
||||||
|
// liveurl (直播地址)
|
||||||
|
liveurl:string;
|
||||||
|
// spareurl (备用地址)
|
||||||
|
spareurl:string;
|
||||||
|
tags:string;
|
||||||
|
}
|
||||||
|
export interface MeetingModel {
|
||||||
|
code:string;
|
||||||
|
message:string;
|
||||||
|
totalPage:number;
|
||||||
|
pageNumber:number;
|
||||||
|
pageSize:number;
|
||||||
|
totalRow:number;
|
||||||
|
pages:number;
|
||||||
|
list: ItemModel[] ;
|
||||||
|
}
|
||||||
|
export interface MeetingModels {
|
||||||
|
code:string;
|
||||||
|
message:string;
|
||||||
|
data:MeetingModel
|
||||||
|
|
||||||
|
}
|
||||||
|
export class MeetingItemModel implements ItemModel
|
||||||
|
{
|
||||||
|
count: number=0;
|
||||||
|
title: string='';
|
||||||
|
uuid: string='';
|
||||||
|
end_date: string='';
|
||||||
|
begin_date: string='';
|
||||||
|
sort: string='';
|
||||||
|
status: string='';
|
||||||
|
location: string='';
|
||||||
|
type: string='';
|
||||||
|
path: string='';
|
||||||
|
content: string='';
|
||||||
|
liveimg: string='';
|
||||||
|
liveurl: string='';
|
||||||
|
spareurl: string='';
|
||||||
|
tags: string='';
|
||||||
|
|
||||||
|
constructor(model:ItemModel) {
|
||||||
|
this.count = model.count;
|
||||||
|
this.title = model.title;
|
||||||
|
this.uuid = model.uuid;
|
||||||
|
this.end_date = model.end_date;
|
||||||
|
this.begin_date = model.begin_date;
|
||||||
|
this.sort = model.sort;
|
||||||
|
this.status = model.status;
|
||||||
|
this.location = model.location;
|
||||||
|
this.type = model.type;
|
||||||
|
this.path = model.path;
|
||||||
|
this.content = model.content;
|
||||||
|
this.liveimg = model.liveimg;
|
||||||
|
this.liveurl = model.liveurl;
|
||||||
|
this.spareurl = model.spareurl;
|
||||||
|
this.tags = model.tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,15 +1,5 @@
|
|||||||
import { HdNav } from '@itcast/basic'
|
import { HdNav } from '@itcast/basic'
|
||||||
|
import { ListComp } from '../components/ListComp'
|
||||||
class RdbData{
|
|
||||||
key:string = ''
|
|
||||||
value:string = ''
|
|
||||||
|
|
||||||
constructor(key:string,value:string) {
|
|
||||||
this.key = key
|
|
||||||
this.value = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Entry
|
@Entry
|
||||||
@Component
|
@Component
|
||||||
@ -21,7 +11,7 @@ export struct VideoPage {
|
|||||||
@State timePosition:number=-1;
|
@State timePosition:number=-1;
|
||||||
@State tlistStatus:boolean=false;
|
@State tlistStatus:boolean=false;
|
||||||
@State timeText:string='会议时间';
|
@State timeText:string='会议时间';
|
||||||
@State rdbDataArray:RdbData[] = []
|
|
||||||
onPageShow(): void {
|
onPageShow(): void {
|
||||||
console.log('VideoPage onPageShow!');
|
console.log('VideoPage onPageShow!');
|
||||||
}
|
}
|
||||||
@ -72,43 +62,48 @@ export struct VideoPage {
|
|||||||
Blank()
|
Blank()
|
||||||
}.width('100%').height(45)
|
}.width('100%').height(45)
|
||||||
Text().Line()
|
Text().Line()
|
||||||
if(this.tlistStatus)
|
Stack({ }) {
|
||||||
{
|
ListComp()
|
||||||
List() {
|
if(this.tlistStatus)
|
||||||
ForEach(this.monthWords, (item: string,index:number) => {
|
{
|
||||||
ListItem() {
|
List() {
|
||||||
Column() {
|
ForEach(this.monthWords, (item: string,index:number) => {
|
||||||
|
ListItem() {
|
||||||
|
Column() {
|
||||||
|
|
||||||
if(this.timePosition==index)
|
if(this.timePosition==index)
|
||||||
{
|
|
||||||
Row()
|
|
||||||
{
|
{
|
||||||
Text(item).customStyle().height(40).fontColor($r('app.color.top_title'))
|
Row()
|
||||||
Blank()
|
{
|
||||||
Image($r('app.media.chose_card')).width(22).margin({right:25})
|
Text(item).customStyle().height(40).fontColor($r('app.color.top_title'))
|
||||||
|
Blank()
|
||||||
|
Image($r('app.media.chose_card')).width(22).margin({right:25})
|
||||||
|
|
||||||
|
}
|
||||||
|
.width('100%')
|
||||||
|
.alignSelf(ItemAlign.Start)
|
||||||
|
Text().Line().backgroundColor($r('app.color.top_title'))
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Text(item).customStyle().height(40).alignSelf(ItemAlign.Start)
|
||||||
|
Text().Line()
|
||||||
}
|
}
|
||||||
.width('100%')
|
|
||||||
.alignSelf(ItemAlign.Start)
|
|
||||||
Text().Line().backgroundColor($r('app.color.top_title'))
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Text(item).customStyle().height(40).alignSelf(ItemAlign.Start)
|
|
||||||
Text().Line()
|
|
||||||
}
|
|
||||||
|
|
||||||
}.padding({left:22})
|
}.padding({left:22})
|
||||||
.width('100%')
|
.width('100%')
|
||||||
.justifyContent(FlexAlign.Start)
|
.justifyContent(FlexAlign.Start)
|
||||||
.onClick(()=>{
|
.onClick(()=>{
|
||||||
this.timePosition=index
|
this.timePosition=index
|
||||||
this.tlistStatus=false
|
this.tlistStatus=false
|
||||||
this.timeText=item
|
this.timeText=item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, (item: string) => JSON.stringify(item))
|
}, (item: string) => JSON.stringify(item))
|
||||||
|
} .width('100%')
|
||||||
|
.height('100%').backgroundColor(Color.White)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,14 @@
|
|||||||
{
|
{
|
||||||
"name": "top_bg",
|
"name": "top_bg",
|
||||||
"value": "#FFEFEFEF"
|
"value": "#FFEFEFEF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "e4e4e4",
|
||||||
|
"value": "#e4e4e4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "333333",
|
||||||
|
"value": "#333333"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user