表更新 #18
@ -18,14 +18,14 @@ CommonConstants {
|
|||||||
/**
|
/**
|
||||||
* Rdb database config.
|
* Rdb database config.
|
||||||
*/
|
*/
|
||||||
static readonly STORE_CONFIG = { name: 'MA_MAP_SUBITEM.db' };
|
static readonly STORE_CONFIG = { name: 'MAP_SUBITEM.db' };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account table config.
|
* Account table config.
|
||||||
*/
|
*/
|
||||||
static readonly ACCOUNT_TABLE = {
|
static readonly ACCOUNT_TABLE = {
|
||||||
tableName: 'MA_MAP_SUBITEM',
|
tableName: 'MAP_SUBITEM',
|
||||||
sqlCreate: 'CREATE TABLE IF NOT EXISTS MA_MAP_SUBITEM(id INTEGER PRIMARY KEY AUTOINCREMENT,itemno TEXT,posx1 TEXT, posx2 TEXT, ' +
|
sqlCreate: 'CREATE TABLE IF NOT EXISTS MAP_SUBITEM(id INTEGER PRIMARY KEY AUTOINCREMENT,itemno TEXT,posx1 TEXT, posx2 TEXT, ' +
|
||||||
'posx3 TEXT, posx4 TEXT,posy1 TEXT,posy2 TEXT,posy3 TEXT,posy4 TEXT,sno TEXT,subname 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']
|
columns: ['id','itemno', 'posx1', 'posx2', 'posx3', 'posx4', 'posy1', 'posy2', 'posy3', 'posy4', 'sno', 'subname']
|
||||||
};
|
};
|
||||||
|
|||||||
@ -83,7 +83,7 @@ export default class Rdb {
|
|||||||
'MA_MAP_POINT_ITEM': MA_MAP_POINT_ITEM,
|
'MA_MAP_POINT_ITEM': MA_MAP_POINT_ITEM,
|
||||||
'MA_MAP_ROAD': MA_MAP_ROAD,
|
'MA_MAP_ROAD': MA_MAP_ROAD,
|
||||||
'MA_MAP_ROAD_LANE': MA_MAP_ROAD_LANE,
|
'MA_MAP_ROAD_LANE': MA_MAP_ROAD_LANE,
|
||||||
'MA_MAP_SUBITEM': MA_MAP_SUBITEM,
|
'MAP_SUBITEM': MA_MAP_SUBITEM,
|
||||||
'MA_SYSSET': MA_SYSSET,
|
'MA_SYSSET': MA_SYSSET,
|
||||||
'ES_CARINFO': ES_CARINFO,
|
'ES_CARINFO': ES_CARINFO,
|
||||||
'ES_EXAMPOINTDETAIL': ES_EXAMPOINTDETAIL,
|
'ES_EXAMPOINTDETAIL': ES_EXAMPOINTDETAIL,
|
||||||
@ -92,10 +92,10 @@ export default class Rdb {
|
|||||||
'MA_ITEMINFO': MA_ITEMINFO,
|
'MA_ITEMINFO': MA_ITEMINFO,
|
||||||
'MA_T_CARPARMSET': MA_T_CARPARMSET,
|
'MA_T_CARPARMSET': MA_T_CARPARMSET,
|
||||||
'ES_CAR_VIDEO_PARAMETER': ES_CAR_VIDEO_PARAMETER,
|
'ES_CAR_VIDEO_PARAMETER': ES_CAR_VIDEO_PARAMETER,
|
||||||
'CommonConstants':CommonConstants,
|
|
||||||
'USER':USER,
|
'USER':USER,
|
||||||
'IpConfigTable':IpConfigTable,
|
'IpConfigTable':IpConfigTable,
|
||||||
'DeviceInfoTable':DeviceInfoTable
|
'DeviceInfoTable':DeviceInfoTable,
|
||||||
|
'CommonConstants':CommonConstants
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ export default class Rdb {
|
|||||||
'MA_MAP_POINT_ITEM': MA_MAP_POINT_ITEM,
|
'MA_MAP_POINT_ITEM': MA_MAP_POINT_ITEM,
|
||||||
'MA_MAP_ROAD': MA_MAP_ROAD,
|
'MA_MAP_ROAD': MA_MAP_ROAD,
|
||||||
'MA_MAP_ROAD_LANE': MA_MAP_ROAD_LANE,
|
'MA_MAP_ROAD_LANE': MA_MAP_ROAD_LANE,
|
||||||
'MA_MAP_SUBITEM': MA_MAP_SUBITEM,
|
'MAP_SUBITEM': MA_MAP_SUBITEM,
|
||||||
'MA_SYSSET': MA_SYSSET,
|
'MA_SYSSET': MA_SYSSET,
|
||||||
'ES_CARINFO': ES_CARINFO,
|
'ES_CARINFO': ES_CARINFO,
|
||||||
'ES_EXAMPOINTDETAIL': ES_EXAMPOINTDETAIL,
|
'ES_EXAMPOINTDETAIL': ES_EXAMPOINTDETAIL,
|
||||||
|
|||||||
@ -93,9 +93,9 @@ function sqlInsertCommonFn(tableName,resultArr,context?){
|
|||||||
let str='('
|
let str='('
|
||||||
map[tableName].ACCOUNT_TABLE.columns.map((res,index)=>{
|
map[tableName].ACCOUNT_TABLE.columns.map((res,index)=>{
|
||||||
if(map[tableName].ACCOUNT_TABLE.columns.length-1==index){
|
if(map[tableName].ACCOUNT_TABLE.columns.length-1==index){
|
||||||
str+=`"${data[res]||'0'}"`
|
str+=data[res]?`"${data[res]}"`:'NULL'
|
||||||
}else{
|
}else{
|
||||||
str+=`"${data[res]||'0'}"`+','
|
str+=(data[res]?`"${data[res]}"`:'NULL')+','
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if(i==resultArr.length-1){
|
if(i==resultArr.length-1){
|
||||||
@ -425,6 +425,7 @@ function setSyncCenterSqlData(key,res,param){
|
|||||||
}else{
|
}else{
|
||||||
arrList=[res.initializationRsp.body[key].record]
|
arrList=[res.initializationRsp.body[key].record]
|
||||||
}
|
}
|
||||||
|
console.log('mapName[key]',mapName[key],key)
|
||||||
sqlInsertCommonFn(mapName[key],arrList,param.context).then((result)=>{
|
sqlInsertCommonFn(mapName[key],arrList,param.context).then((result)=>{
|
||||||
console.log(key,'表建立成功')
|
console.log(key,'表建立成功')
|
||||||
if(result){
|
if(result){
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import { getSyncData } from '../../common/service/initable'
|
|||||||
|
|
||||||
//获取设备信息
|
//获取设备信息
|
||||||
export async function getDeviceInfo() {
|
export async function getDeviceInfo() {
|
||||||
globalThis.deviceNo = '153216400880'; //科目三设备
|
// globalThis.deviceNo = '153216400880'; //科目三设备
|
||||||
// globalThis.deviceNo = '150667400235'; //科目三设备
|
globalThis.deviceNo = '150667400235'; //科目三设备
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getSyncData('DeviceInfoTable').then((result: Array<any>) => {
|
getSyncData('DeviceInfoTable').then((result: Array<any>) => {
|
||||||
|
|||||||
@ -221,23 +221,11 @@ struct Index {
|
|||||||
globalThis.ratio= 1700 / 960
|
globalThis.ratio= 1700 / 960
|
||||||
this.angle = 0
|
this.angle = 0
|
||||||
this.loading = false
|
this.loading = false
|
||||||
// let workerInstance = new worker.ThreadWorker('entry/ets/pages/worker.ts', {
|
|
||||||
// name: 'FriendsMoments Worker'
|
|
||||||
// });
|
|
||||||
// this.workerInstance.onmessage = function(e) {
|
|
||||||
// console.log("onerror")
|
|
||||||
// router.pushUrl({
|
|
||||||
// url: 'pages/ExaminerLogin',
|
|
||||||
// }, router.RouterMode.Single)
|
|
||||||
// this.loading=false
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
async testXMLToJSONInWorker(){
|
async testXMLToJSONInWorker(){
|
||||||
let workerInstance = new worker.ThreadWorker('entry/ets/workers/worker.ts', {
|
let workerInstance = new worker.ThreadWorker('entry/ets/workers/worker.ts', {
|
||||||
name: 'FriendsMoments Worker'
|
name: 'FriendsMoments Worker'
|
||||||
});
|
});
|
||||||
var xmlStr='123'
|
|
||||||
console.log("baoyihu before postMessage :");
|
|
||||||
const param={
|
const param={
|
||||||
carId:globalThis.carInfo?.carId,
|
carId:globalThis.carInfo?.carId,
|
||||||
examinationRoomId:globalThis.carInfo?.examinationRoomId,
|
examinationRoomId:globalThis.carInfo?.examinationRoomId,
|
||||||
@ -249,11 +237,12 @@ struct Index {
|
|||||||
}
|
}
|
||||||
workerInstance.postMessage(param);
|
workerInstance.postMessage(param);
|
||||||
workerInstance.onmessage = (e: MessageEvents): void => {
|
workerInstance.onmessage = (e: MessageEvents): void => {
|
||||||
console.log("baoyihu after postMessage :",e.data);
|
console.log("baoyihu after postMessage :",JSON.stringify(e.data));
|
||||||
console.log("onerror")
|
if(e.data.isComplete){
|
||||||
router.pushUrl({
|
router.pushUrl({
|
||||||
url: 'pages/ExaminerLogin',
|
url: 'pages/ExaminerLogin',
|
||||||
}, router.RouterMode.Single)
|
}, router.RouterMode.Single)
|
||||||
|
}
|
||||||
this.loading=false
|
this.loading=false
|
||||||
// let workData: WorkData = e.data;
|
// let workData: WorkData = e.data;
|
||||||
// if (workData) {
|
// if (workData) {
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { getSyncData} from '../common/service/initable'
|
|||||||
@Entry
|
@Entry
|
||||||
@Component
|
@Component
|
||||||
struct Index {
|
struct Index {
|
||||||
@State textList1: string[] = ['差分服务器Ip','响应端口','中心服务器IP','响应端口', '子网掩码','默认网关','dns','后置机IP ', '响应端口','前置机IP','本地端口','平台服务器Ip','响应端口']
|
@State textList1: string[] = ['差分服务器Ip','响应端口','中心服务器IP','响应端口', '子网掩码','默认网关','dns','后置机IP ', '响应端口','前置机IP','本地端口']
|
||||||
// @State textList2: string[] = []
|
// @State textList2: string[] = []
|
||||||
@State ratio: number = 1700 / 960
|
@State ratio: number = 1700 / 960
|
||||||
@State inputFontSize:number=12 //12
|
@State inputFontSize:number=12 //12
|
||||||
@ -19,7 +19,7 @@ struct Index {
|
|||||||
// @State inputTextList2: string[] = ['192.168.7.124','20022']
|
// @State inputTextList2: string[] = ['192.168.7.124','20022']
|
||||||
|
|
||||||
|
|
||||||
@State inputTextList1: string[] = ['172.37.55.191','18782','172.37.55.191','8082','255.255.255.0','192.168.7.1','114.114.114.114','192.168.7.124','20022','192.168.7.170','20122','172.37.55.191','11050']
|
@State inputTextList1: string[] = ['172.37.55.191','18782','172.37.55.191','8082','255.255.255.0','192.168.7.1','114.114.114.114','192.168.7.124','20022','192.168.7.170','20122']
|
||||||
// @State inputTextList2: string[] = []
|
// @State inputTextList2: string[] = []
|
||||||
// 112.80.35.83 11052
|
// 112.80.35.83 11052
|
||||||
// @State inputTextList1: string[] = ['192.168.36.2','8084','192.168.36.200','20122','255.255.255.0','192.168.36.1','','','114.114.114.114','192.168.36.139','8000']
|
// @State inputTextList1: string[] = ['192.168.36.2','8084','192.168.36.200','20122','255.255.255.0','192.168.36.1','','','114.114.114.114','192.168.36.139','8000']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user