Compare commits

...

6 Commits

Author SHA1 Message Date
0c89302ef9 依赖删除 2024-06-04 16:19:20 +08:00
8e6ca1a051 合并 2024-06-04 16:01:54 +08:00
84dafffd17 Merge pull request 'fix:提交视频文件mock数据' (#15) from wangzhongjie into main
Reviewed-on: #15
2024-06-04 15:04:36 +08:00
wangzhongjie
d30b6d67ab fix:提交视频文件mock数据 2024-06-04 15:08:27 +08:00
wangzhongjie
8ec6377f77 fix:提交视频文件mock数据 2024-06-04 15:04:30 +08:00
cce66ee074 Merge pull request 'fix:提交视频文件mock数据' (#14) from wangzhongjie into main
Reviewed-on: #14
2024-06-04 15:01:04 +08:00
8 changed files with 127 additions and 151 deletions

View File

@ -1,4 +1,5 @@
import {User} from "../pages/interfaces"
// 候选人数据
export const CandidateData: Array<User> = [
{
sfzmhm: '342323199501470011',

View File

@ -0,0 +1,35 @@
import { VideoConfig } from '../pages/interfaces'
// 视频配置默认数据
export const VideoConfigData: VideoConfig = {
videoNum: '1',
spls: '1',
wz: '0,0',
faceFlag: false,
shuiying: true,
pztd: '2',
ljlx: '',
ip: '192.168.36.94',
port: '554',
userName: 'admin',
pwd: '12345qwe',
td1: '1',
td2: '2',
td3: '3',
td4: '4',
videoRecord1: false,
videoRecord2: true,
videoRecord3: false,
videoRecord4: false,
text1: '',
text2: '',
text3: '',
dolt: '',
fontSize: '',
rlls: '1',
spzd4: false,
spzd3: false,
spzd2: false,
spzd1: false,
zdyz: '5',
}

View File

@ -0,0 +1,3 @@
export * from "./CandidateData"
export * from "./VideoData"

View File

@ -21,6 +21,7 @@ import {
} from '../common/service/indexService';
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
import promptAction from '@ohos.promptAction';
import { VideoConfigData } from '../mock';
@Entry
@Component

View File

@ -92,9 +92,4 @@ export default struct Index {
outClick() {
}
saveLog() {
// this.FileLog.initFileLogo('d .0ateLog')
// this.FileLog.createFile('123')
}
}

View File

@ -19,7 +19,7 @@ import {string2Bytes} from '../common/utils/tools'
import { getSyncData } from '../common/service/initable'
@Entry
@Component
struct UserInfo {
export default struct UserInfo {
@State pageIndex: number = 0
@State ratio: number = 1700 / 960
@State index: number = 0

View File

@ -1,10 +1,12 @@
import TopLogo from './compontents/TopLogo'
import FileUtil from '../common/utils/File'
import { VideoConfig } from './interfaces'
import TopLogo from './compontents/topLogo';
import FileUtil from '../common/utils/File';
import { VideoConfig } from './interfaces';
import common from '@ohos.app.ability.common';
import promptAction from '@ohos.promptAction'
import { startRecordVideo, endRecordVideo,takePhoto } from '../common/service/videoService'
import { GlobalConfig } from '../config/index'
import promptAction from '@ohos.promptAction';
import { endRecordVideo, startRecordVideo, takePhoto } from '../common/service/videoService';
import { GlobalConfig } from '../config/index';
import { VideoConfigData } from '../mock';
@Entry
@Component
struct Index {
@ -21,74 +23,10 @@ struct Index {
}
@State isAutoPlay: boolean = true
@State showFlag: boolean = false
private vocObj = null;
@State showControls: boolean = false
private fileUtil: FileUtil
@State @Watch('outClick') outFlag: boolean = false;
@State oldParam: VideoConfig = {
videoNum:'1',
spls: '1',
wz: '0,0',
faceFlag: false,
shuiying: true,
pztd: '2',
ljlx: '',
ip: '192.168.36.94',
port: '554',
userName: 'admin',
pwd: '12345qwe',
td1: '1',
td2: '2',
td3: '3',
td4: '4',
videoRecord1: false,
videoRecord2: true,
videoRecord3: false,
videoRecord4: false,
text1: '',
text2: '',
text3: '',
dolt: '',
fontSize: '',
rlls: '1',
spzd4:false,
spzd3:false,
spzd2:false,
spzd1:false,
zdyz:'5',
}
@State param: VideoConfig = {
videoNum:'1',
spls: '1',
wz: '0,0',
faceFlag: false,
shuiying: true,
pztd: '2',
ljlx: '',
ip: '192.168.36.94',
port: '554',
userName: 'admin',
pwd: '12345qwe',
td1: '1',
td2: '2',
td3: '3',
td4: '4',
videoRecord1: false,
videoRecord2: true,
videoRecord3: false,
videoRecord4: false,
text1: '',
text2: '',
text3: '',
dolt: '',
fontSize: '',
rlls: '1',
spzd4:false,
spzd3:false,
spzd2:false,
spzd1:false,
zdyz:'5',
}
@State oldParam: VideoConfig = VideoConfigData
@State param: VideoConfig = VideoConfigData
@State openFlag: boolean = true
@State lsArr: Array<any> = [
{ key: '第一路' },
@ -96,7 +34,7 @@ struct Index {
{ key: '第三路' },
{ key: '第四路' },
]
private fileUtil: FileUtil
private context = getContext(this) as common.UIAbilityContext;
private controller1: VideoController = new VideoController()
private controller2: VideoController = new VideoController()
@ -319,7 +257,8 @@ struct Index {
.width(34 * this.ratio)
.height(26 * this.ratio)
.fontSize(this.inputFontSize * this.ratio)
.margin({ left: 10 * this.ratio, right: 15 * this.ratio }).onChange((value: string) => {
.margin({ left: 10 * this.ratio, right: 15 * this.ratio })
.onChange((value: string) => {
this.param.zdyz = value
})
// Text('k').fontColor('#333333').fontSize(16 * this.ratio)
@ -339,6 +278,7 @@ struct Index {
Row() {
Row() {
}.width(70 * this.ratio)
Text('IP地址')
.width(158 * this.ratio)
.fontSize(16 * this.ratio)
@ -620,14 +560,18 @@ struct Index {
this.fileUtil = fileUtil
this.getVideoConfig()
}
async getfilehandleCode(td) {
const record_handle = await startRecordVideo(this.param, td, this.context, 'lp')
this.rocordHandleObj['rocord_handle'+td] = record_handle
}
outClick() {
this.openFlag = false
}
sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay))
async onPageShow() {
}

View File

@ -7,9 +7,6 @@
"deviceTypes": [
"default",
"tablet",
"pad",
"wearable",
"car",
],
"deliveryWithInstall": true,
"installationFree": false,