Compare commits

...

6 Commits

Author SHA1 Message Date
05f31c4b7c 合并 2024-08-19 14:56:36 +08:00
9a618adeff 彈框userlist修改 2024-08-19 14:54:11 +08:00
fb8e7bc7c5 Merge branch 'dev' into lv_chengmai 2024-08-19 11:31:35 +08:00
b021e3221e 衝突解決 2024-08-19 10:19:53 +08:00
638477891c Merge branch 'main' into lv_chengmai 2024-08-19 09:33:50 +08:00
f414114cf1 table表修改 2024-08-19 09:32:41 +08:00
36 changed files with 446 additions and 149 deletions

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'accountTable',
sqlCreate: 'CREATE TABLE IF NOT EXISTS accountTable(sfzmhm INTEGER PRIMARY KEY AUTOINCREMENT,lsh TEXT, xm TEXT)',
sqlCreate: 'CREATE TABLE IF NOT EXISTS accountTable(sfzmhm TEXT,lsh TEXT, xm TEXT)',
columns: [ 'sfzmhm', 'xm','lsh']
};
// sqlCreate: 'CREATE TABLE IF NOT EXISTS accountTable(id INTEGER PRIMARY KEY AUTOINCREMENT,kaoShengXinXi TEXT, lsh TEXT, ' +

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'DeviceInfoTable',
sqlCreate: 'CREATE TABLE IF NOT EXISTS DeviceInfoTable(id INTEGER PRIMARY KEY AUTOINCREMENT,deviceId TEXT)',
sqlCreate: 'CREATE TABLE IF NOT EXISTS DeviceInfoTable(id TEXT,deviceId TEXT)',
columns: ['id','deviceId']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'ES_CARINFO',
sqlCreate: 'CREATE TABLE IF NOT EXISTS ES_CARINFO(id INTEGER PRIMARY KEY AUTOINCREMENT,car_mac TEXT,status TEXT, voiceip TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS ES_CARINFO(id TEXT,car_mac TEXT,status TEXT, voiceip TEXT, ' +
'carno TEXT, carcode TEXT,cartype TEXT,device_status TEXT,carip TEXT,pulse1 TEXT,pulse2 TEXT,isface TEXT,bk1 TEXT,ismapcollect TEXT,bk2 TEXT,exampointcode TEXT,software_version TEXT,typename TEXT,vin TEXT,voicetype TEXT,em TEXT,carclass TEXT,carid TEXT,flag TEXT,kscx TEXT,x_mch TEXT)',
columns: ['id','car_mac', 'status', 'voiceip', 'carno', 'carcode', 'cartype', 'device_status', 'carip', 'pulse1', 'pulse2', 'isface', 'bk1', 'ismapcollect', 'bk2', 'exampointcode', 'software_version', 'typename', 'vin', 'voicetype','em','carclass','carid','flag','kscx','x_mch']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'ES_CAR_VIDEO_PARAMETER',
sqlCreate: 'CREATE TABLE IF NOT EXISTS ES_CAR_VIDEO_PARAMETER(id INTEGER PRIMARY KEY AUTOINCREMENT,video_mode TEXT,video_channel TEXT, first_channel TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS ES_CAR_VIDEO_PARAMETER(id TEXT,video_mode TEXT,video_channel TEXT, first_channel TEXT, ' +
'second_port TEXT, first_port TEXT,third_ip TEXT,photo_overlay_text_size TEXT,second_ip TEXT,photo_overlay_text_content3 TEXT,video_range TEXT,fourth_port TEXT,line_type TEXT,third_port TEXT,fourth_channel TEXT,process_face_comparion_mode TEXT,second_password TEXT,first_username TEXT,third_username TEXT,photo_overlay_text_content2 TEXT,photo_overlay_text_content1 TEXT,process_face_comparion_enable TEXT,third_password TEXT,fourth_username TEXT,fourth_ip TEXT,first_password TEXT,second_username TEXT,video_synthesis_system_ip TEXT,photo_overlay_text_position TEXT,video_synthesis_server_port TEXT,car_mac TEXT,photo_overlay_text_enable TEXT,video_synthesis_system_port TEXT,second_channel TEXT,video_occlusion_range TEXT,fourth_password TEXT,photo_channel TEXT,video_synthesis_server_ip TEXT,photo_overlay_text_split TEXT,equipment_type TEXT,video_occlusion TEXT,third_channel TEXT,first_ip TEXT)',
columns: ['id','video_mode', 'video_channel','first_channel', 'second_port', 'first_port', 'third_ip', 'photo_overlay_text_size', 'second_ip', 'photo_overlay_text_content3', 'video_range', 'fourth_port', 'line_type', 'third_port', 'fourth_channel', 'process_face_comparion_mode', 'second_password', 'first_username', 'third_username','photo_overlay_text_content2','photo_overlay_text_content1','process_face_comparion_enable','third_password','fourth_username','fourth_ip','first_password','second_username','video_synthesis_system_ip','photo_overlay_text_position','video_synthesis_server_port','car_mac','photo_overlay_text_enable','video_synthesis_system_port','second_channel','video_occlusion_range','fourth_password','photo_channel','video_synthesis_server_ip','photo_overlay_text_split','equipment_type','video_occlusion','third_channel','first_ip']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'ES_EXAMPOINTDETAIL',
sqlCreate: 'CREATE TABLE IF NOT EXISTS ES_EXAMPOINTDETAIL(id INTEGER PRIMARY KEY AUTOINCREMENT,code TEXT,type TEXT, name TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS ES_EXAMPOINTDETAIL(id TEXT,code TEXT,type TEXT, name TEXT, ' +
'status TEXT, udpip TEXT,udpcommandport TEXT,udpvoiceport TEXT,udpdataport TEXT,fullname TEXT,exam_status TEXT,is_motor TEXT)',
columns: ['id','code', 'type', 'name','status','udpip', 'udpcommandport', 'udpvoiceport','udpdataport','fullname','exam_status','is_motor']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'IpConfigTable',
sqlCreate: 'CREATE TABLE IF NOT EXISTS IpConfigTable(id INTEGER PRIMARY KEY AUTOINCREMENT,udplocalIp TEXT,udplocalIpPort TEXT, udpOppositeIp TEXT, udpOppositeIpPort TEXT,tcplocalIp TEXT,tcplocalIpPort TEXT,tcpOppositeIp TEXT,tcpOppositePort TEXT,gateway TEXT,netMask TEXT,dnsServers TEXT,centerPort TEXT,centerIp TEXT)',
sqlCreate: 'CREATE TABLE IF NOT EXISTS IpConfigTable(id TEXT,udplocalIp TEXT,udplocalIpPort TEXT, udpOppositeIp TEXT, udpOppositeIpPort TEXT,tcplocalIp TEXT,tcplocalIpPort TEXT,tcpOppositeIp TEXT,tcpOppositePort TEXT,gateway TEXT,netMask TEXT,dnsServers TEXT,centerPort TEXT,centerIp TEXT)',
columns: ['id','udplocalIp', 'udplocalIpPort', 'udpOppositeIp','udpOppositeIpPort','tcplocalIp','tcplocalIpPort','tcpOppositeIp','tcpOppositePort','gateway','netMask','dnsServers','centerPort','centerIp']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_CDSBINFO',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_CDSBINFO(id INTEGER PRIMARY KEY AUTOINCREMENT,sbbm TEXT,itemsno TEXT, sbbh TEXT, kdid TEXT, bk3 TEXT)',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_CDSBINFO(id TEXT,sbbm TEXT,itemsno TEXT, sbbh TEXT, kdid TEXT, bk3 TEXT)',
columns: ['id','sbbm', 'itemsno', 'sbbh', 'kdid', 'bk3']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_ITEMINFO',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_ITEMINFO(id INTEGER PRIMARY KEY AUTOINCREMENT,cininfo TEXT,setup9 TEXT, nextinfo TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_ITEMINFO(id TEXT,cininfo TEXT,setup9 TEXT, nextinfo TEXT, ' +
'setup7 TEXT, setup8 TEXT,setup5 TEXT,carlist TEXT,setup6 TEXT,setup3 TEXT,setup4 TEXT,setup1 TEXT,setup2 TEXT,itemsno TEXT,end_cardsno TEXT,freqinfo TEXT)',
columns: ['id','cininfo', 'setup9', 'nextinfo', 'setup7', 'setup8', 'setup5', 'carlist', 'setup6', 'setup3', 'setup4', 'setup1', 'setup2', 'itemsno', 'end_cardsno', 'freqinfo']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_MAP_COLLECT',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_COLLECT(id INTEGER PRIMARY KEY AUTOINCREMENT,l_no TEXT,s_no TEXT, s_no1 TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_COLLECT(id TEXT,l_no TEXT,s_no TEXT, s_no1 TEXT, ' +
'road_code TEXT, gps_e TEXT,gps_n TEXT,posx TEXT,posy TEXT,l_type TEXT,line_type TEXT,next_s_no TEXT,next_s_no1 TEXT,lane_attr TEXT,gps_h TEXT)',
columns: ['id','l_no', 's_no', 's_no1', 'road_code', 'gps_e', 'gps_n','posx','posy','l_type','line_type','next_s_no','next_s_no1','lane_attr','gps_h']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_MAP_COLLECT_SHAPE',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_COLLECT_SHAPE(id INTEGER PRIMARY KEY AUTOINCREMENT,serial_no TEXT,l_no1 TEXT, l_no2 TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_COLLECT_SHAPE(id TEXT,serial_no TEXT,l_no1 TEXT, l_no2 TEXT, ' +
'l_no3 TEXT, l_no4 TEXT,attr_str TEXT,subtype TEXT)',
columns: ['id','serial_no', 'l_no1', 'l_no2', 'l_no3', 'l_no4', 'attr_str','subtype']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_MAP_ITEMCLASS',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_ITEMCLASS(id INTEGER PRIMARY KEY AUTOINCREMENT,itemno TEXT,itemno1 TEXT, itemname TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_ITEMCLASS(id TEXT,itemno TEXT,itemno1 TEXT, itemname TEXT, ' +
'itemname1 TEXT, item_type TEXT,enabled TEXT)',
columns: ['id','itemno', 'itemno1', 'itemname', 'itemname', 'itemname1', 'item_type','enabled']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_MAP_POINT',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_POINT(id INTEGER PRIMARY KEY AUTOINCREMENT,point_no TEXT,point_no_f TEXT, gps_e TEXT,' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_POINT(id TEXT,point_no TEXT,point_no_f TEXT, gps_e TEXT,' +
'gps_e_location TEXT,gps_n TEXT,gps_n_location TEXT,f_gps_e TEXT,f_gps_n TEXT,point_type TEXT,road_code TEXT,visible TEXT,passed TEXT)',
columns: ['id','point_no', 'point_no_f', 'gps_e', 'gps_e_location', 'gps_n', 'gps_n_location','f_gps_e','f_gps_n','point_type','road_code','visible','passed']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_MAP_POINT_ITEM',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_POINT_ITEM(id INTEGER PRIMARY KEY AUTOINCREMENT,point_no TEXT,itemno TEXT,itemno1 TEXT,' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_POINT_ITEM(id TEXT,point_no TEXT,itemno TEXT,itemno1 TEXT,' +
'subname TEXT)',
columns: ['id','point_no', 'itemno', 'itemno1', 'subname']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_MAP_ROAD',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_ROAD(id INTEGER PRIMARY KEY AUTOINCREMENT,road_code TEXT,road_code_no TEXT,lane_no TEXT,' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_ROAD(id TEXT,road_code TEXT,road_code_no TEXT,lane_no TEXT,' +
'point1y TEXT,point1x TEXT,point2y TEXT,point2x TEXT,pointmy TEXT,pointmx TEXT,point3y TEXT,point3x TEXT,point4y TEXT,point4x TEXT,pointny TEXT,pointnx TEXT)',
columns: ['id','road_code', 'road_code_no', 'lane_no', 'point1y', 'point1x', 'point2y','point2x','pointmy','pointmx','point3y','point3x','point4y','point4x','pointny','pointnx']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_MAP_ROAD_LANE',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_ROAD_LANE(id INTEGER PRIMARY KEY AUTOINCREMENT,road_code TEXT,road_code_no TEXT,lane_no TEXT,' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_ROAD_LANE(id TEXT,road_code TEXT,road_code_no TEXT,lane_no TEXT,' +
'line_type TEXT,lane_attr TEXT,line_width TEXT,rightline TEXT)',
columns: ['id','road_code', 'road_code_no', 'lane_no','line_type','lane_attr', 'line_width', 'rightline']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MAP_SUBITEM',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MAP_SUBITEM(id INTEGER PRIMARY KEY AUTOINCREMENT,itemno TEXT,posx1 TEXT, posx2 TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MAP_SUBITEM(id TEXT,itemno TEXT,posx1 TEXT, posx2 TEXT, ' +
'posx3 TEXT, posx4 TEXT,posy1 TEXT,posy2 TEXT,posy3 TEXT,posy4 TEXT,sno TEXT,subname TEXT)',
columns: ['id','itemno', 'posx1', 'posx2', 'posx3', 'posx4', 'posy1', 'posy2', 'posy3', 'posy4', 'sno', 'subname']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_MARKRULE',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MARKRULE(id INTEGER PRIMARY KEY AUTOINCREMENT,itemno TEXT,markserial TEXT, markdepend TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MARKRULE(id TEXT,itemno TEXT,markserial TEXT, markdepend TEXT, ' +
'markcatalog TEXT, markstandard TEXT,markreal TEXT,markshow TEXT,car_sid TEXT,gyro_sid TEXT,gps_sid TEXT,magnet_sid TEXT,simu_sid TEXT,close_sid TEXT,notes TEXT,onlyoneid TEXT,nocancelid TEXT,kfxh TEXT)',
columns: ['id','itemno', 'markserial', 'markdepend', 'markcatalog', 'markstandard', 'markreal', 'markshow', 'car_sid', 'gyro_sid', 'gps_sid', 'magnet_sid', 'simu_sid', 'close_sid', 'notes', 'onlyoneid', 'nocancelid', 'kfxh']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_MARKRULESET',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MARKRULESET(id INTEGER PRIMARY KEY AUTOINCREMENT,itemno TEXT,markserial TEXT, markdepend TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MARKRULESET(id TEXT,itemno TEXT,markserial TEXT, markdepend TEXT, ' +
'markcatalog TEXT, markstandard TEXT,markreal TEXT,markshow TEXT,txt1 TEXT,kfxh TEXT)',
columns: ['id','itemno', 'markserial', 'markdepend','markcatalog','markstandard', 'markreal', 'markshow', 'txt1', 'kfxh']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_SYSSET',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_SYSSET(id INTEGER PRIMARY KEY AUTOINCREMENT,v_no TEXT,v_name TEXT, v_value TEXT)',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_SYSSET(id TEXT,v_no TEXT,v_name TEXT, v_value TEXT)',
columns: ['id','v_no', 'v_name', 'v_value']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_SYSTEMPARM',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_SYSTEMPARM(id INTEGER PRIMARY KEY AUTOINCREMENT,no1 TEXT,no2 TEXT, no3 TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_SYSTEMPARM(id TEXT,no1 TEXT,no2 TEXT, no3 TEXT, ' +
'txt1 TEXT, txt2 TEXT,txt3 TEXT)',
columns: ['id','no1', 'no2', 'no3', 'txt1', 'txt2', 'txt3']
};

View File

@ -25,7 +25,7 @@ CommonConstants {
*/
static readonly ACCOUNT_TABLE = {
tableName: 'MA_T_CARPARMSET',
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_T_CARPARMSET(id INTEGER PRIMARY KEY AUTOINCREMENT,carid TEXT,itemname TEXT, parmdesc TEXT, ' +
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_T_CARPARMSET(id TEXT,carid TEXT,itemname TEXT, parmdesc TEXT, ' +
'parmname TEXT, pdefault TEXT,pvalue TEXT)',
columns: ['id','carid', 'itemname', 'parmdesc', 'parmname', 'pdefault', 'pvalue']
};

View File

@ -18,15 +18,15 @@ CommonConstants {
/**
* Rdb database config.
*/
static readonly STORE_CONFIG = { name: 'user.db' };
static readonly STORE_CONFIG = { name: 'USER.db' };
/**
* Account table config.
*/
static readonly ACCOUNT_TABLE = {
tableName: 'USER',
sqlCreate: 'CREATE TABLE IF NOT EXISTS USER(id INTEGER PRIMARY KEY AUTOINCREMENT,sfzmhm TEXT,xm CHAR(20), lsh TEXT, kszp TEXT,ksdd TEXT,kssycs TEXT,kslx TEXT,kscx TEXT,ksxl TEXT,xldm TEXT)',
columns: ['id','sfzmhm','xm','lsh','kszp','ksdd','kssycs','kslx','kscx','ksxl','xldm']
sqlCreate: 'CREATE TABLE IF NOT EXISTS USER(id INTEGER PRIMARY KEY AUTOINCREMENT,sfzmhm TEXT,xm CHAR(20), lsh TEXT, kszp TEXT,ksdd TEXT,kssycs TEXT,kslx TEXT,kscx TEXT,ksxl TEXT,ksy1 TEXT)',
columns: ['id','sfzmhm','xm','lsh','kszp','ksdd','kssycs','kslx','kscx','ksxl','ksy1']
};
/**

View File

@ -0,0 +1,68 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License,Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default class
CommonConstants {
/**
* Rdb database config.
*/
static readonly STORE_CONFIG = { name: 'USERLIST.db' };
/**
* Account table config.
*/
static readonly ACCOUNT_TABLE = {
tableName: 'USERLIST',
sqlCreate: 'CREATE TABLE IF NOT EXISTS USERLIST(id TEXT,sfzmhm TEXT,xm CHAR(20), lsh TEXT, kszp TEXT,ksdd TEXT,kssycs TEXT,kslx TEXT,kscx TEXT,ksxl TEXT,ksy1 TEXT)',
columns: ['id','sfzmhm','xm','lsh','kszp','ksdd','kssycs','kslx','kscx','ksxl','ksy1']
};
/**
* Search text of Search component.
*/
// static readonly SEARCH_TEXT = '搜索';
/**
* toast text of prompt component.
*/
// static readonly TOAST_TEXT_1 = '账目类型不能为空';
// static readonly TOAST_TEXT_2 = '账目金额不为正整数';
/**
* Component size.
*/
// static readonly FULL_WIDTH = '100%';
// static readonly FULL_HEIGHT = '100%';
// static readonly DIALOG_HEIGHT = '55%';
// static readonly TABS_HEIGHT = '45%';
// static readonly MINIMUM_SIZE = 0;
// static readonly FULL_SIZE = 1;
// static readonly PROMPT_BOTTOM = '70vp';
/**
* Component location.
*/
// static readonly EDIT_POSITION_X = '80%';
// static readonly EDIT_POSITION_Y = '90%';
// static readonly DELETE_POSITION_X = '50%';
// static readonly DELETE_POSITION_Y = '90%';
/**
* Log tag.
*/
static readonly RDB_TAG = '[Debug.Rdb]';
static readonly TABLE_TAG = '[Debug.AccountTable]';
static readonly INDEX_TAG = '[Debug.Index]';
}

View File

@ -42,6 +42,8 @@ import common from '@ohos.app.ability.common';
import contextConstant from '@ohos.app.ability.contextConstant';
import featureAbility from '@ohos.ability.featureAbility'
import USERLIST from '../constants/USERLIST';
// import { Logger } from '../utils/Logger';
export default class Rdb {
private rdbStore: any = null;
@ -93,6 +95,7 @@ export default class Rdb {
'MA_T_CARPARMSET': MA_T_CARPARMSET,
'ES_CAR_VIDEO_PARAMETER': ES_CAR_VIDEO_PARAMETER,
'USER':USER,
'USERLIST':USERLIST,
'IpConfigTable':IpConfigTable,
'DeviceInfoTable':DeviceInfoTable,
'CommonConstants':CommonConstants
@ -150,6 +153,7 @@ export default class Rdb {
'ES_CAR_VIDEO_PARAMETER': ES_CAR_VIDEO_PARAMETER,
'CommonConstants':CommonConstants,
'USER':USER,
'USERLIST':USERLIST,
'IpConfigTable':IpConfigTable,
'DeviceInfoTable':DeviceInfoTable
}

View File

@ -29,7 +29,6 @@ export default class AccountTable {
// this.CommonConstants=Constants
this.commonConstants=Constants
this.accountTable.getRdbStore(callback,context);
console.log('kkkkkkkk0')
}
getRdbStore(callback: Function = () => {},context?) {

View File

@ -5,7 +5,8 @@ import { examinerLogin,initCarInfoCache} from '../../api/index'
//考官登录信息
export async function examinerLoginService(params) {
let res:any = await examinerLogin(params)
globalThis.examinerInfo=res.examinerLoginRsp.body
globalThis.examinerInfo=res?.examinerLoginRsp?.body || {}
console.log('jiangsong1: examinerLoginService' + JSON.stringify(res))
//{"examinerLoginRsp":{"head":{"resultCode":"0","resultMessage":"%E8%80%83%E8%AF%95%E5%91%98%E7%99%BB%E5%BD%95-%E6%88%90%E5%8A%9F","time":"2023-06-01 10:06:39"},"body":{"code":"006","name":"%E8%80%836","statusRgpp":"1"}}}

View File

@ -24,6 +24,7 @@ import IpConfigTable from '../constants/IpConfigTable';
import CommonConstants from '../constants/CommonConstants';
import DeviceInfoTable from '../constants/DeviceInfoTable';
import USER from '../constants/USER';
import USERLIST from '../constants/USERLIST';
import util from '@ohos.util';
import FileModel from '../../pages/judgeSDK/utils/fileModel';
import FileUtil from '../../common/utils/File';
@ -52,6 +53,7 @@ const map = {
'MA_T_CARPARMSET': MA_T_CARPARMSET,
'ES_CAR_VIDEO_PARAMETER': ES_CAR_VIDEO_PARAMETER,
'USER': USER,
'USERLIST': USERLIST,
'IpConfigTable': IpConfigTable,
'DeviceInfoTable': DeviceInfoTable,
'CommonConstants': CommonConstants
@ -89,6 +91,11 @@ function sqlInsertCommonFn(tableName, resultArr, context?, delFlag = true) {
// console.log('表长度',result.length,tableName)
if (result.length == 0) {
console.log('sqlsqlinsert',resultArr.length)
if(resultArr.length==0){
resolve(false)
return
}
let INSERT_SQL = "INSERT INTO " + tableName
+ " (" + map[tableName].ACCOUNT_TABLE.columns.toString() + ") VALUES "
@ -97,9 +104,9 @@ function sqlInsertCommonFn(tableName, resultArr, context?, delFlag = true) {
let str = '('
map[tableName].ACCOUNT_TABLE.columns.map((res, index) => {
if (map[tableName].ACCOUNT_TABLE.columns.length - 1 == index) {
str += data[res] ? `"${data[res]}"` : 'NULL'
str += data[res] ? `'${data[res]}'` : 'NULL'
} else {
str += (data[res] ? `"${data[res]}"` : 'NULL') + ','
str += (data[res] ? `'${data[res]}'` : 'NULL') + ','
}
})
if (i == resultArr.length - 1) {
@ -334,15 +341,23 @@ export async function upDataZhongxinginitialization(param) {
resolve(false)
return
}
let flag=true
if (param.singlePlay) {
console.log('teststet0')
const fileUtil = new FileUtil(param.context)
const tableList = ['MA_SYSSET', 'MA_SYSTEMPARM', 'MA_MARKRULE', 'MA_MARKRULESET','ES_CARINFO','MA_MAP_ROAD','MA_MAP_ROAD_LANE','MAP_SUBITEM','MA_T_CARPARMSET','MA_MAP_ITEMCLASS','MA_MAP_POINT','MA_MAP_POINT_ITEM'];
for(let i=0;i<=tableList.length-1;i++){
const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableList[i]}.txt`);
await sqlInsertCommonFn(tableList[i], JSON.parse(data) || [], param.context)
const result=await sqlInsertCommonFn(tableList[i], JSON.parse(data) || [], param.context)
flag=flag?result:false
}
resolve(true)
if(flag){
prompt.showToast({
message: '本地文件初始化数据库失败',
duration: 3000
});
}
resolve(flag)
return
}
const str = {

View File

@ -12,7 +12,6 @@ export async function getDeviceInfo(context) {
return new Promise(async (resolve, reject) => {
const fileUtil = new FileUtil(context)
const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/deviceNo.txt');
console.log('globalThis.deviceNoglobalThis.deviceNo',data)
if (data === '' || data === undefined) {
promptAction.showToast({
message: `请先进行设备注册`,

View File

@ -39,6 +39,7 @@ export default class UdpClientByCenter {
private lsh: string = null
private context
private stashFn: StashFunction
private interval
private headLenth: number = 9
//消息头长度
private isWorking: Boolean = false
@ -200,7 +201,7 @@ export default class UdpClientByCenter {
onError_Callback(callback?) {
this.udp.on('error', async err => {
this.isWorking = false;
console.log('getUDPUdpClientByCenter onError err:' + JSON.stringify(err));
console.log('getUDPUdpClientByCenter onError err:' + JSON.stringify(err),this.oppositeIpPort);
callback && callback()
});
}
@ -245,6 +246,10 @@ export default class UdpClientByCenter {
callback({
id, length, body: list, sendId: this.sendId
})
this.interval=setInterval(()=>{
},3000)
});
}

View File

@ -75,7 +75,10 @@ export default async function request(req: any) {
if(res.head.resultCode === '0'){
return res
}else{
globalThis.type='1'
const resultMessage = res?.body?.resultMessage || res?.head?.resultMessage
AppStorage.SetOrCreate('errorMsg', 1);
globalThis.title=decodeURIComponent(resultMessage)
prompt.showToast({
message: decodeURIComponent(resultMessage),
duration: 3000
@ -90,10 +93,14 @@ export default async function request(req: any) {
if(resObj.resultCode === '0') {
return res
}else {
globalThis.type='1'
AppStorage.SetOrCreate('errorMsg', 1);
globalThis.title=decodeURIComponent(resObj.resultMessage)
prompt.showToast({
message: decodeURIComponent(resObj.resultMessage),
duration: 3000
});
return res
}
} catch (e) {
console.info('surenjun',JSON.stringify(e))
@ -101,7 +108,6 @@ export default async function request(req: any) {
return false
}
const code = e?.code;
prompt.showToast({
message: e?.message,
duration: 5000

View File

@ -3,6 +3,7 @@ import TopLogo from './compontents/TopLogo';
import { examinerLoginService } from '../common/service/ExaminerService';
import Md5 from '../common/utils/md5';
import promptAction from '@ohos.promptAction';
import errorMsgDialog from './compontents/errorMsgDialog'
@Entry
@Component
@ -15,7 +16,21 @@ export default struct Index {
@State currentInputIndex: number = 0
@State @Watch('outClick') outFlag: boolean = false;
private vocObj = null;
private title = ''
private type = '2'
errorDialog: CustomDialogController = new CustomDialogController({
builder: errorMsgDialog({
title: this.title,
type: this.type,
cancel: () => {
},
confirm: () => {
}
}),
customStyle: true,
alignment: DialogAlignment.Center,
},
)
build() {
Column() {
TopLogo({ outFlag: $outFlag })
@ -71,13 +86,27 @@ export default struct Index {
username: this.inputTextArr[0],
password: Md5.Instance.get_md5(this.inputTextArr[1])
}
this.type='2'
this.errorDialog.open()
console.log('carInfo', JSON.stringify(globalThis.carInfo))
examinerLoginService(param).then(res => {
console.log('res?.examinerLoginRsp?.head?.resultCode',res?.examinerLoginRsp?.head?.resultCode,JSON.stringify(res))
this.errorDialog.close()
if(res?.examinerLoginRsp?.head?.resultCode=='1'){
// this.type='1'
// this.title=decodeURIComponent(res.examinerLoginRsp.head.resultMessage)
// console.log('this.titlt',this.title)
// this.errorDialog.open()
return
}
router.pushUrl({
url: 'pages/UserInfo',
}, router.RouterMode.Single);
console.log('res11', JSON.stringify(res))
globalThis.username = this.inputTextArr[0]
}).catch(err=>{
console.log('jiangsong12',JSON.stringify(err))
})
})
} else {

View File

@ -10,12 +10,12 @@ import FileUtil from '../common/utils/File';
import { getUDP, getUDP2 } from '../common/utils/GlobalUdp';
import { initJudgeUdp } from '../common/utils/UdpJudge';
import { getTCP } from '../common/utils/GlobalTcp';
import { getliushuiNum, setliushuiNum,takePhotoFn } from '../common/service/indexService';
import { getliushuiNum, setliushuiNum, takePhotoFn } from '../common/service/indexService';
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
import worker, { MessageEvents } from '@ohos.worker';
import promptAction from '@ohos.promptAction'
import { voiceService } from '../common/service/voiceService';
// import errorMsgDialog from './compontents/errorMsgDialog'
import errorMsgDialog from './compontents/errorMsgDialog'
import { getSyncData } from '../common/service/initable';
@Entry
@ -40,22 +40,31 @@ struct Index {
private vocObj = null;
private workerInstance = null;
private context = getContext(this) as common.UIAbilityContext;
private title = ''
private type = '2'
errorDialog: CustomDialogController = new CustomDialogController({
builder: errorMsgDialog({
title: globalThis.title,
type: globalThis.type,
cancel: () => {
},
confirm: () => {
}
}),
customStyle: true,
alignment: DialogAlignment.Center,
},
)
@Styles
commStyle(){
.width(220 * this.ratio*this.dialogRatio)
.height(69 * this.ratio*this.dialogRatio)
.width(220 * this.ratio * this.dialogRatio)
.height(69 * this.ratio * this.dialogRatio)
.backgroundImage($r('app.media.button_nor'))
.backgroundImageSize({ width: '100%', height: '100%' })
.margin({ bottom: 12 * this.ratio})
.margin({ bottom: 12 * this.ratio })
}
// dialogController: CustomDialogController | null = new CustomDialogController({
// builder: errorMsgDialog(
// title,
// isDialog,
// // cancel: ()=> { },
// // confirm: ()=> { }
// })
build() {
Column() {
Column() {
@ -67,14 +76,15 @@ struct Index {
if (this.loading) {
return
}
router.pushUrl({
url: 'pages/Settings',
}, router.RouterMode.Single);
})
Image($r('app.media.btn_back')).width('14.4%').height('12.2%')
.onClick(() => {
this.dialogVisiable=true
return
this.dialogVisiable = true
// promptAction.showDialog({
// title: '提示',
// message: '确认是否退出应用',
@ -107,58 +117,70 @@ struct Index {
Column() {
Row() {
if (!this.isSingle) {
Image($r('app.media.index_lw')).width('28%').height('71%').margin({left:80 * globalThis.ratio}).onClick(async () => {
if (this.loading) {
return
}
this.loading = true
setTimeout(() => {
this.angle = 360
}, 1000)
this.angle = 0
if (!globalThis.timeInfo) {
promptAction.showToast({
message: `时间同步接口连接失败`,
duration: 3000
});
this.loading = false
return
}
this.testXMLToJSONInWorker()
Image($r('app.media.index_lw'))
.width('28%')
.height('71%')
.margin({ left: 80 * globalThis.ratio })
.onClick(async () => {
if (this.loading) {
return
}
this.loading = true
setTimeout(() => {
this.angle = 360
}, 1000)
this.angle = 0
if (!globalThis.timeInfo) {
promptAction.showToast({
message: `时间同步接口连接失败`,
duration: 3000
});
this.loading = false
return
}
this.testXMLToJSONInWorker()
})
})
}
if (this.isSingle) {
Image($r('app.media.index_dj')).width('28%').height('71%').margin({left:80 * globalThis.ratio}).onClick(() => {
Image($r('app.media.index_dj'))
.width('28%')
.height('71%')
.margin({ left: 80 * globalThis.ratio })
.onClick(() => {
if (this.loading) {
return
}
//判断数据库是否有表数据,有则直接跳转,没有则读取本地数据
getSyncData('MA_SYSSET').then(data => {
console.log('datadata', JSON.stringify(data))
if (data?.[0]) {
router.pushUrl({
url: 'pages/UserInfo',
}, router.RouterMode.Single)
} else {
this.loading = true
this.testXMLToJSONInWorker()
}
})
;
})
}
Image($r('app.media.index_zj'))
.width('28%')
.height('71%')
.margin({ right: 80 * globalThis.ratio })
.onClick(() => {
if (this.loading) {
return
}
//判断数据库是否有表数据,有则直接跳转,没有则读取本地数据
getSyncData('MA_SYSSET').then(data => {
console.log('datadata',JSON.stringify(data))
if (data?.[0]) {
router.pushUrl({
url:'pages/UserInfo',
}, router.RouterMode.Single)
}else{
this.loading=true
this.testXMLToJSONInWorker()
}
})
;
router.pushUrl({
url: 'pages/CarCheck'
}, router.RouterMode.Single);
})
}
Image($r('app.media.index_zj')).width('28%').height('71%').margin({right:80* globalThis.ratio}).onClick(() => {
if (this.loading) {
return
}
router.pushUrl({
url: 'pages/CarCheck'
}, router.RouterMode.Single);
})
}
.width('100%')
.justifyContent(FlexAlign.SpaceAround)
@ -202,35 +224,41 @@ struct Index {
//
if (this.dialogVisiable) {
Flex({justifyContent:FlexAlign.Center}) {
Flex({ justifyContent: FlexAlign.Center }) {
Text('确认是否退出应用')
.fontSize(28 * this.ratio*this.dialogRatio)
.margin({top:100*this.ratio*this.dialogRatio})
.fontSize(28 * this.ratio * this.dialogRatio)
.margin({ top: 100 * this.ratio * this.dialogRatio })
Row() {
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Text(' 取 消 ').fontSize(24 * this.ratio*this.dialogRatio).fontColor('#fff').width(100 * this.ratio*this.dialogRatio)
Text(' 取 消 ')
.fontSize(24 * this.ratio * this.dialogRatio)
.fontColor('#fff')
.width(100 * this.ratio * this.dialogRatio)
}
.commStyle()
.onClick(() => {
this.dialogVisiable = false
}).margin({right:10*this.ratio})
}).margin({ right: 10 * this.ratio })
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Text(' 确 定 ').fontSize(24 * this.ratio*this.dialogRatio).fontColor('#fff').width(100 * this.ratio*this.dialogRatio)
Text(' 确 定 ')
.fontSize(24 * this.ratio * this.dialogRatio)
.fontColor('#fff')
.width(100 * this.ratio * this.dialogRatio)
}
.commStyle()
.onClick(() => {
router.back()
})
}.position({ y: 265 * this.ratio*this.dialogRatio, x: 115 * this.ratio*this.dialogRatio })
}.position({ y: 265 * this.ratio * this.dialogRatio, x: 115 * this.ratio * this.dialogRatio })
}
.width(660 * this.ratio*this.dialogRatio)
.height(360 * this.ratio*this.dialogRatio)
.position({ x: 220 * this.ratio, y: 98 * this.ratio-265/2*(1-this.ratio*this.dialogRatio) })
.width(660 * this.ratio * this.dialogRatio)
.height(360 * this.ratio * this.dialogRatio)
.position({ x: 220 * this.ratio, y: 98 * this.ratio - 265 / 2 * (1 - this.ratio * this.dialogRatio) })
.backgroundColor('#E6E3DF')
//
.borderRadius(19 * this.ratio*this.dialogRatio)
.borderRadius(19 * this.ratio * this.dialogRatio)
}
if (this.loading) {
Column() {
@ -272,7 +300,7 @@ struct Index {
}
aboutToAppear() {
this.dialogVisiable=false
this.dialogVisiable = false
this.angle = 0
this.loading = false
globalThis.lsh = '1111111111111'
@ -288,9 +316,9 @@ struct Index {
paraKdid: globalThis.timeInfo?.paraKdid,
mode: globalThis.timeInfo?.mode,
context: this.context,
host:globalThis.host,
centerHost:globalThis.timeInfo.url,
singlePlay:globalThis.singlePlay
host: globalThis.host,
centerHost: globalThis.timeInfo.url,
singlePlay: globalThis.singlePlay
}
workerInstance.postMessage(param);
workerInstance.onmessage = (e: MessageEvents): void => {
@ -298,7 +326,7 @@ struct Index {
let workData: WorkData = e.data;
if (workData.isComplete) {
router.pushUrl({
url: globalThis.singlePlay?'pages/UserInfo':'pages/ExaminerLogin',
url: globalThis.singlePlay ? 'pages/UserInfo' : 'pages/ExaminerLogin',
}, router.RouterMode.Single)
}
this.loading = false
@ -324,7 +352,7 @@ struct Index {
carNo: globalThis.carInfo.carNo,
placeId: globalThis.carInfo.examinationRoomId
}
console.log('paramparam',JSON.stringify(param))
console.log('paramparam', JSON.stringify(param))
// globalThis.udpClient2.initHeartSendMsg(param,this.context)
if (globalThis.udpClient2.getStatus()) {
globalThis.udpClient2.sendMsgExt(param, this.context)
@ -332,14 +360,14 @@ struct Index {
}
async onPageShow() {
console.log('ttttt',1111)
console.log('ttttt', 1111)
this.userAuth();
console.log('ttttt2222',1111)
console.log('ttttt2222', 1111)
this.vocObj = new voiceService(async (status, val, next) => {
});
console.log('globalThis.singlePlay',globalThis.singlePlay)
console.log('globalThis.singlePlay', globalThis.singlePlay)
if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) {
this.vocObj.playAudio({
type: 1,
@ -351,7 +379,7 @@ struct Index {
this.loading = false
this.createAlbum()
this.num=0
this.num = 0
//
@ -394,29 +422,34 @@ struct Index {
async initParams() {
//设置plc udp 同步requesthost
await getUDP(this.context,false)
await getUDP(this.context, false)
this.loading = false
console.log('globalThis.deviceNo000')
await getDeviceInfo(this.context)
await getCarInfo()
await getUDP2(this.context,false)
await getUDP2(this.context, false)
getTCP()
this.deviceId= globalThis.carInfo.carNo
this.deviceId = globalThis.carInfo.carNo
await setCurrentTime();
this.carNum = globalThis.carInfo.plateNo;
this.version = globalThis.version;
this.hasAuth = globalThis.hasAuth;
initJudgeUdp()
takePhotoFn(this.context)
console.log('deviceIddeviceId',globalThis.deviceNo,this.deviceNo)
console.log('deviceIddeviceId', globalThis.deviceNo, this.deviceNo)
clearInterval(this.interval)
this.interval = setInterval(() => {
this.num++
setliushuiNum(this.context)
getliushuiNum(this.context)
if(this.num>=3){
if (this.num >= 3) {
this.heartMsg()
}
const data=AppStorage.Get('errorMsg'); // returns 47
console.log('1123',data)
if(data==1){
this.errorDialog.open()
}
}, 1000)
//下载模型
// await this.getModel()

View File

@ -22,6 +22,7 @@ import LoadingPopup from './compontents/judge/LoadingPopup';
import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
import { initJudgeUdp } from '../common/utils/UdpJudge';
import errorMsgDialog from './compontents/errorMsgDialog'
@Entry
@Component
@ -75,6 +76,9 @@ struct UserInfo {
@State FaceOpenStatue: string = '0'; //是否开启人脸识别
@State faceCatchImg: string = ''
@State Param803Str: string = ''
private title = ''
private type = '2'
// 过程照片拍照
getPhoto = async (empty?: boolean) => {
const singlePlay = globalThis.singlePlay
@ -100,7 +104,19 @@ struct UserInfo {
{ label: '待考次数', key: 'kssycs' },
{ label: '考官姓名', key: 'ksy1' },
]
errorDialog: CustomDialogController = new CustomDialogController({
builder: errorMsgDialog({
title: this.title,
type: this.type,
cancel: () => {
},
confirm: () => {
}
}),
customStyle: true,
alignment: DialogAlignment.Center,
},
)
async onPageShow() {
this.updateTimeLimit=false
console.log('响应头地址响应头地址')
@ -112,16 +128,52 @@ struct UserInfo {
this.initData()
//身份证读卡器初始化
// this.openDeviceByIDCard()
// @ts-ignore
this.list =await getSyncData('USERLIST')
// @ts-ignore
const data=await getSyncData('USER')
console.log('datadata',JSON.stringify(data));
console.log('datadata2',JSON.stringify(this.list))
const user=data[0]
if(user&&Number(user.kssycs)){
this.list.forEach(res=>{
if(res.sfzmhm==user.sfzmhm){
res.kssycs=user.kssycs
this.getCurrentStudent(res.sfzmhm)
}
})
}else if(user&&(user.kssycs=='0'||user.kssycs=='')){
console.log('datadatadatadata')
this.list=this.list.filter(res=>{
return res.sfzmhm!=user.sfzmhm
})
this.pageIndex=0
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
if(this.dataList.length){
this.currentUser=this.dataList[0]
}else{
this.currentUser=EmptyCandidateObject
}
}
this.list.forEach((res,index)=>{
res.id=index.toString()
})
await upDateTableByArray('USERLIST', this.list||[])
// 如果是单机模式则模拟假数据
//获取sysset表数据
this.initSysset()
//心跳处理
this.heartMsg()
getSyncData('USER').then(data => {
if (data?.[0]) {
this.getExaminationStudentInfoFn()
}
})
// if(user[0]){
// // @ts-ignore
// this.currentUser=user
// }
this.isExamStart = false
this.sczbkf = [];
this.avPlayer = new VoiceAnnounce();
@ -180,6 +232,7 @@ struct UserInfo {
})
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
if (!flag) {
globalThis.lsh = '0000000000000'
await upDateTableByArray('USER', [])
this.currentUser=this.list[0]
// promptAction.showToast({
@ -266,21 +319,10 @@ struct UserInfo {
this.lsh = this.currentUser.lsh
globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm
globalThis.lsh = this.lsh
} else {
// this.getExaminationStudentInfoFn()
}
const syssetParams = await getSyncData('MA_SYSSET');
// const syssetParams = await getSyncData('MA_SYSSET');
//@ts-ignore
syssetParams.forEach(sys => {
//364 绕车一周评判时机(1-开始考试后判 2-开始考试前判)
if (sys.v_no === '364' && decodeURIComponent(sys.v_value) == '2') {
this.isBoardPrePareSetPopupOpen = true;
}
// 开始考试前必须解开安全带或关车门
if (sys.v_no === '803') {
this.Param803Str = sys.v_value + '';
}
})
}
@ -331,6 +373,16 @@ struct UserInfo {
const openCheckFlag = openCheckFlagParam?.[0]?.v_value == '1' ? '1' : '0'
const faceParam = syssetParams.filter(sys => sys.v_no == '2413')
syssetParams.forEach(sys => {
//364 绕车一周评判时机(1-开始考试后判 2-开始考试前判)
if (sys.v_no === '364' && decodeURIComponent(sys.v_value) == '2') {
this.isBoardPrePareSetPopupOpen = true;
}
// 开始考试前必须解开安全带或关车门
if (sys.v_no === '803') {
this.Param803Str = sys.v_value + '';
}
})
// faceParam?.[0]?.v_value ||
// 1身份证读卡器 2指纹 3人脸
@ -341,11 +393,14 @@ struct UserInfo {
that.openDeviceByIDCard()
}
}
if(that.list.length){
return
}
//0不自动更新 1自动更新不限次数 2没有考生更新2次
if (that.studentRefreshStatue == '2') {
clearInterval(that.interval)
that.interval = setInterval(() => {
if (that.dataList.length == 0 && that.numCount < 3) {
if (that.list.length == 0 && that.numCount < 3) {
that.numCount++
that.getExaminationStudentInfoFn()
}
@ -353,12 +408,12 @@ struct UserInfo {
} else if (that.studentRefreshStatue == '1') {
clearInterval(that.interval)
that.interval = setInterval(() => {
if (that.dataList.length == 0) {
if (that.list.length == 0) {
that.getExaminationStudentInfoFn()
}
}, 5000)
} else {
this.getExaminationItemFn()
// this.getExaminationItemFn()
}
})
@ -370,6 +425,7 @@ struct UserInfo {
console.log('this.faceCompareSuces', this.faceCompareSucess, JSON.stringify(this.currentUser))
if (this.faceCompareSucess > 0) {
//人脸比对通过
globalThis.statue = 4
this.sfbdinterfaceFn()
}
}
@ -391,20 +447,21 @@ struct UserInfo {
}
//获取下载考生
getExaminationStudentInfoFn() {
async getExaminationStudentInfoFn() {
if (globalThis.singlePlay || this.updateTimeLimit) {
return
}
await upDateTableByArray('USER', [])
this.type='2'
this.errorDialog.open()
const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName></body></getExaminationStudentInfoReq>`
getExaminationStudentInfo(param).then(async (res) => {
this.errorDialog.close()
setTimeout(() => {
this.updateTimeLimit = true
}, 30000)
this.updateTimeLimit = false
if (!res) {
this.dataList = []
this.currentUser = EmptyCandidateObject
this.errorMsg = decodeURI(res.getExaminationStudentInfoRsp.head.resultMessage)
if (!res||res?.getExaminationStudentInfoRsp?.head?.resultCode=='1') {
return
}
let dataList = []
@ -423,13 +480,15 @@ struct UserInfo {
}
this.list = JSON.parse(JSON.stringify(dataList))
this.list.forEach(listData => {
this.list.forEach((listData,index) => {
listData.id=index.toString()
for (let i in listData) {
listData[i] = decodeURI(listData[i])
}
listData.kszp = this.photo + listData.kszp
listData.ksmjzp = this.photo + listData.ksmjzp
})
await upDateTableByArray('USERLIST', this.list||[])
dataList = this.list.length > 4 ? this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) : this.list;
this.dataList = dataList
@ -514,6 +573,7 @@ struct UserInfo {
//身份比对
async sfbdinterfaceFn() {
globalThis.statue = 4
this.stepFlag = true
const carInfo = globalThis.carInfo;
const {carId,examinationRoomId} = carInfo;
@ -542,8 +602,8 @@ struct UserInfo {
})
return
}
this.currentUser.id='0'
await upDateTableByArray('USER', [this.currentUser])
globalThis.statue = 4
this.stepFlag = false
this.isLoadingPopupVisible = false
router.pushUrl({
@ -831,6 +891,7 @@ struct UserInfo {
try {
await this.checkSignal()
this.isExamStart = true
this.currentUser.id='0'
await upDateTableByArray('USER', [this.currentUser])
globalThis.statue = 4
this.isBoardPrePareSetPopupShow = true;
@ -854,6 +915,7 @@ struct UserInfo {
}
if (globalThis.singlePlay) {
const {examSubject} = globalThis.carInfo;
this.currentUser.id='0'
await upDateTableByArray('USER', [this.currentUser])
router.pushUrl({
url: examSubject == 3 ? 'pages/Roads' : 'pages/Judge',

View File

@ -179,7 +179,7 @@ export default struct FaceCompare {
async faceComparFn() {
console.log('mmmmm0', 2)
this.param.pztd=this.param.rlls
const data=await takePhoto(this.param, this.context, 'jt/', 1,)
const data=await takePhoto(this.param, this.context, 'jt/', 1,)
this.base64=this.imageBase64 + data.base64
console.log('mmmmt',this.base64)
faceCompare({

View File

@ -0,0 +1,76 @@
@CustomDialog
export default struct errorMsgDialog {
private controller?: CustomDialogController
cancel: () => void = () => {
}
confirm: () => void = () => {
}
title?: string
type: string //1 tip 2loading 3Dialog
@State angle: number = 0
build() {
Column() {
if(this.title){
Text(this.title)
.fontSize(30)
.margin(120)
}
if (this.type=='3') {
Row() {
Button('取消')
.onClick(() => {
if (this.controller != undefined) {
this.confirm()
this.controller.close()
}
})
.margin(20)
Button('确定')
.onClick(() => {
if (this.controller != undefined) {
this.cancel()
this.controller.close()
}
})
.margin(20)
}
}
if (this.type=='2') {
Image($r('app.media.open_loading'))
.width(200)
.rotate({ angle: this.angle })
.height(200)
.animation({
duration: 5000, // 动画时长
curve: Curve.EaseOut, // 动画曲线
delay: 500, // 动画延迟
iterations: -1, // 播放次数
playMode: PlayMode.Normal, // 动画模式
})
.margin(50)
}
}.backgroundColor('#E6E3DF')
.borderRadius(19 * globalThis.ratio)
.constraintSize({ minWidth: 520 })
}
aboutToAppear() {
AppStorage.SetOrCreate('errorMsg', 0);
setTimeout(() => {
console.log('this.type',this.type,this.angle)
if (this.type=='2') {
this.angle = 360
}
},1000)
if(this.type=='1'){
setTimeout(()=>{
this.controller.close()
},2000)
}
}
aboutToDisappear() {
this.title=''
this.angle = 0
}
}

View File

@ -929,7 +929,7 @@ export default class Judge {
}
}
const USER = getSyncData('USER');
const USER =await getSyncData('USER');
await upDateTableByArray('USER', [{...USER[0],kssycs:kssycs == 2 ? 1 : 0}])
console.info(judgeTag, `考试成绩:${totalScore}`)