Compare commits
6 Commits
664a4a91c6
...
0c89302ef9
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c89302ef9 | |||
| 8e6ca1a051 | |||
| 84dafffd17 | |||
|
|
d30b6d67ab | ||
|
|
8ec6377f77 | ||
| cce66ee074 |
@ -1,4 +1,5 @@
|
||||
import {User} from "../pages/interfaces"
|
||||
// 候选人数据
|
||||
export const CandidateData: Array<User> = [
|
||||
{
|
||||
sfzmhm: '342323199501470011',
|
||||
|
||||
35
entry/src/main/ets/mock/VideoData.ets
Normal file
35
entry/src/main/ets/mock/VideoData.ets
Normal 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',
|
||||
}
|
||||
3
entry/src/main/ets/mock/index.ets
Normal file
3
entry/src/main/ets/mock/index.ets
Normal file
@ -0,0 +1,3 @@
|
||||
export * from "./CandidateData"
|
||||
|
||||
export * from "./VideoData"
|
||||
@ -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
|
||||
|
||||
@ -92,9 +92,4 @@ export default struct Index {
|
||||
|
||||
outClick() {
|
||||
}
|
||||
|
||||
saveLog() {
|
||||
// this.FileLog.initFileLogo('d .0ateLog')
|
||||
// this.FileLog.createFile('123')
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
|
||||
@ -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() {
|
||||
}
|
||||
|
||||
|
||||
@ -7,9 +7,6 @@
|
||||
"deviceTypes": [
|
||||
"default",
|
||||
"tablet",
|
||||
"pad",
|
||||
"wearable",
|
||||
"car",
|
||||
],
|
||||
"deliveryWithInstall": true,
|
||||
"installationFree": false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user