fix: 优化了一些工具方法
This commit is contained in:
parent
7df1bab099
commit
c4623c8345
@ -1,91 +0,0 @@
|
||||
/*
|
||||
* 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: 'CommonConstants.db' };
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'accountTable',
|
||||
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, ' +
|
||||
// 'zkzmbh TEXT, sfzmhm TEXT,xm TEXT,xb TEXT,kszp TEXT,ksmjzp TEXT,ykxm TEXT,kslx TEXT,kscx TEXT,jxmc TEXT,ksy1 TEXT,ksy1sfzmhm TEXT,kssycs TEXT,kchp TEXT,ksxl TEXT,kszt TEXT,xh TEXT,filedId TEXT)',
|
||||
// columns: ['id', 'kaoShengXinXi', 'lsh', 'sfzmhm', 'xm', 'xb', 'kszp', 'ksmjzp','ykxm','kslx','kscx','jxmc','ksy1','ksy1sfzmhm','ksy2','ksy2sfzmhm','kssycs','kchp','ksxl','kszt','xh','filedId']
|
||||
// {
|
||||
// sfzmhm: '',
|
||||
// xm: '',
|
||||
// lsh: '',
|
||||
// ksy1: '',
|
||||
// id: '',
|
||||
// kszp:'',
|
||||
// ksmjzp:'',
|
||||
// bz1:'',
|
||||
// jxmc:'',
|
||||
// kchp:'',
|
||||
// kscx:'',
|
||||
// ksdd:'',
|
||||
// kssycs:'',
|
||||
// ksxl:'',
|
||||
// ksy1sfzmhm:'',
|
||||
// kszt:'',
|
||||
// xb:'',
|
||||
// xh:'',
|
||||
// xldm:'',
|
||||
// yycs:''
|
||||
// }
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* 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: 'mapDatabase.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'DeviceInfoTable',
|
||||
sqlCreate: 'CREATE TABLE IF NOT EXISTS DeviceInfoTable(id TEXT,deviceId TEXT)',
|
||||
columns: ['id', 'deviceId']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,72 +0,0 @@
|
||||
/*
|
||||
* 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: 'ES_CARINFO.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'ES_CARINFO',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
/*
|
||||
* 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: 'ES_CAR_VIDEO_PARAMETER.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'ES_CAR_VIDEO_PARAMETER',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* 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: 'ES_EXAMPOINTDETAIL.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'ES_EXAMPOINTDETAIL',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* 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: 'IpConfigTable.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'IpConfigTable',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_CDSBINFO.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_CDSBINFO',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_ITEMINFO.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_ITEMINFO',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_MAP_COLLECT.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_MAP_COLLECT',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_MAP_COLLECT_SHAPE.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_MAP_COLLECT_SHAPE',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_MAP_ITEMCLASS.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_MAP_ITEMCLASS',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_MAP_POINT.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_MAP_POINT',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_MAP_POINT_ITEM.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_MAP_POINT_ITEM',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_MAP_ROAD.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_MAP_ROAD',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_MAP_ROAD_LANE.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_MAP_ROAD_LANE',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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: 'MAP_SUBITEM.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MAP_SUBITEM',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,72 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_MARKRULE.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_MARKRULE',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_MARKRULESET.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_MARKRULESET',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_SYSSET.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_SYSSET',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_SYSTEMPARM.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_SYSTEMPARM',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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: 'MA_T_CARPARMSET.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'MA_T_CARPARMSET',
|
||||
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']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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: 'USER.db'
|
||||
};
|
||||
|
||||
/**
|
||||
* Account table config.
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'USER',
|
||||
sqlCreate: 'CREATE TABLE IF NOT EXISTS USER(id TEXT,sfzmhm TEXT,xm CHAR(20), lsh TEXT, kszp TEXT,ksdd TEXT,kssycs TEXT,kslx TEXT,kscx TEXT,ksxl TEXT,ksy1 TEXT,ksmjzp TEXT,ksy2 TEXT,xldm TEXT,ksy2sfzmhm TEXT,bz1 TEXT,kchp TEXT,xb TEXT,xh TEXT,yycs TEXT,jxmc TEXT,ksy1sfzmhm TEXT,kszt TEXT)',
|
||||
columns: ['id', 'sfzmhm', 'xm', 'lsh', 'kszp', 'ksdd', 'kssycs', 'kslx', 'kscx', 'ksxl', 'ksy1', 'ksmjzp', 'ksy2',
|
||||
'xldm', 'ksy2sfzmhm', 'bz1', 'kchp', 'xb', 'xh', 'yycs', 'jxmc', 'ksy1sfzmhm', 'kszt']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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,ksmjzp TEXT,ksy2 TEXT,xldm TEXT,ksy2sfzmhm TEXT,bz1 TEXT,kchp TEXT,xb TEXT,xh TEXT,yycs TEXT,jxmc TEXT,ksy1sfzmhm TEXT,kszt TEXT)',
|
||||
columns: ['id', 'sfzmhm', 'xm', 'lsh', 'kszp', 'ksdd', 'kssycs', 'kslx', 'kscx', 'ksxl', 'ksy1', 'ksmjzp', 'ksy2',
|
||||
'xldm', 'ksy2sfzmhm', 'bz1', 'kchp', 'xb', 'xh', 'yycs', 'jxmc', 'ksy1sfzmhm', 'kszt']
|
||||
};
|
||||
|
||||
/**
|
||||
* 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]';
|
||||
}
|
||||
@ -1,229 +0,0 @@
|
||||
import relationalStore from '@ohos.data.relationalStore'
|
||||
import common from '@ohos.app.ability.common'
|
||||
import { BusinessError } from '@ohos.base'
|
||||
|
||||
export interface ColumnInfo {
|
||||
name: string,
|
||||
columnName: string,
|
||||
type: ColumnType,
|
||||
}
|
||||
|
||||
export enum ColumnType {
|
||||
LONG,
|
||||
STRING
|
||||
}
|
||||
|
||||
class DbUtils {
|
||||
rdbStore: relationalStore.RdbStore | undefined = undefined
|
||||
|
||||
// 初始化
|
||||
init(context: common.UIAbilityContext) {
|
||||
let config: relationalStore.StoreConfig = {
|
||||
name: 'car.db',
|
||||
securityLevel: relationalStore.SecurityLevel.S1
|
||||
}
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
relationalStore.getRdbStore(context, config)
|
||||
.then(rdbStore => {
|
||||
this.rdbStore = rdbStore
|
||||
console.info("db rdbStore init success")
|
||||
resolve()
|
||||
})
|
||||
.catch((err: any) => {
|
||||
console.error(`db rdbStore init fail reason:${err}`);
|
||||
reject(err)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 创建表
|
||||
createTable(createSql: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.rdbStore) {
|
||||
this.rdbStore?.executeSql(createSql)
|
||||
.then(() => {
|
||||
console.info("sql createTable success")
|
||||
resolve()
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(`sql createTable fail err:${JSON.stringify(err)}`);
|
||||
reject(err)
|
||||
})
|
||||
} else {
|
||||
reject('rdbStore is null')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 请空表
|
||||
clearTable(tableName: string): Promise<void> {
|
||||
let sql = `DELETE FROM ${tableName}`
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.rdbStore) {
|
||||
this.rdbStore?.executeSql(sql).then(() => {
|
||||
resolve()
|
||||
})
|
||||
} else {
|
||||
reject('rdbStore is null')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 执行sql
|
||||
executeSql(sql: string): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.rdbStore) {
|
||||
this.rdbStore?.executeSql(sql).then(() => {
|
||||
resolve("")
|
||||
}).catch((err) => {
|
||||
reject(err)
|
||||
})
|
||||
} else {
|
||||
reject('rdbStore is null')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 插入数据
|
||||
insertData(tableName: string, obj: any): Promise<number> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.rdbStore) {
|
||||
this.rdbStore?.insert(tableName, obj, (err, res) => {
|
||||
if (err) {
|
||||
console.error(`sql insertData fail err:${JSON.stringify(err)}`);
|
||||
reject(err)
|
||||
} else {
|
||||
console.info(`sql insertData success res:${res}`);
|
||||
resolve(res)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
reject('rdbStore is null')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 插入表数据
|
||||
// insertData(tableName: string, obj: object, columns: ColumnInfo[]): Promise<number> {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// if(this.)
|
||||
// })
|
||||
//
|
||||
// }
|
||||
|
||||
// 查找
|
||||
queryCount<T extends string | number | boolean>(sql: string): Promise<T> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.rdbStore) {
|
||||
this.rdbStore.querySql(sql, []).then((res: relationalStore.ResultSet) => {
|
||||
console.log("sql query", JSON.stringify(res))
|
||||
if (res.rowCount <= 0) {
|
||||
resolve(null)
|
||||
} else {
|
||||
res.goToNextRow()
|
||||
resolve(res.getLong(0) as unknown as T)
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.error(`sql queryCount fail err:${JSON.stringify(err)}`);
|
||||
reject(err)
|
||||
})
|
||||
} else {
|
||||
reject('rdbStore is null')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查找数据
|
||||
queryList<T>(predicates: relationalStore.RdbPredicates, columns: ColumnInfo[]): Promise<T[]> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.rdbStore) {
|
||||
this.rdbStore?.query(predicates, columns.map(info => info.columnName), (err, result) => {
|
||||
if (err) {
|
||||
console.error(`sql queryForList fail err:${JSON.stringify(err)}`);
|
||||
reject(err)
|
||||
} else {
|
||||
console.info(`sql queryForList success rows: ${result.rowCount.toString()}`)
|
||||
resolve(this.parseResultSet(result, columns))
|
||||
}
|
||||
})
|
||||
} else {
|
||||
reject('rdbStore is null')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取表列表数据
|
||||
queryListBySql<T>(sql: string, columns: ColumnInfo[]): Promise<T[]> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.rdbStore) {
|
||||
this.rdbStore?.querySql(sql, [], (err, result) => {
|
||||
if (err) {
|
||||
console.error(`sql queryForListBySql fail err:${JSON.stringify(err)}`);
|
||||
reject(err)
|
||||
} else {
|
||||
resolve(this.parseResultSet(result, columns))
|
||||
}
|
||||
})
|
||||
} else {
|
||||
reject('rdbStore is null')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
parseResultSet<T>(result: relationalStore.ResultSet, columns: ColumnInfo[]): T[] {
|
||||
// 1.声明最终返回的结果
|
||||
let arr: T[] = [];
|
||||
// 2.判断是否有结果
|
||||
if (result.rowCount <= 0) {
|
||||
return arr;
|
||||
}
|
||||
// 3.处理结果
|
||||
while (!result.isAtLastRow) {
|
||||
// 3.1.去下一行
|
||||
result.goToNextRow();
|
||||
// 3.2.解析这行数据,转为对象
|
||||
let obj: Record<string, string | number> = {};
|
||||
columns.forEach(info => {
|
||||
let val: string | number;
|
||||
switch (info.type) {
|
||||
case ColumnType.LONG:
|
||||
val = result.getLong(result.getColumnIndex(info.columnName));
|
||||
break;
|
||||
case ColumnType.STRING:
|
||||
val = result.getString(result.getColumnIndex(info.columnName));
|
||||
break;
|
||||
}
|
||||
obj[info.name] = val;
|
||||
});
|
||||
// 3.3.将对象填入结果数组
|
||||
arr.push(obj as unknown as T); // 将 obj 断言为 T 类型
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
// 删除表数据
|
||||
delete(predicates: relationalStore.RdbPredicates): Promise<number> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.rdbStore) {
|
||||
this.rdbStore?.delete(predicates)
|
||||
.then(rows => {
|
||||
console.info(`DbUtil delete success rows: ${rows.toString()}`)
|
||||
resolve(rows)
|
||||
})
|
||||
.catch((err: BusinessError) => {
|
||||
console.error(`DbUtil delete fail err:${JSON.stringify(err)}`);
|
||||
reject(err)
|
||||
})
|
||||
} else {
|
||||
reject('rdbStore is null')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
let DB: DbUtils = new DbUtils()
|
||||
|
||||
export default DB
|
||||
@ -1,254 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import data_rdb from '@ohos.data.rdb';
|
||||
import CommonConstants from '../constants/CommonConstants';
|
||||
import AccountTable from '../database/tables/AccountTable';
|
||||
import MA_MARKRULE from '../constants/MA_MARKRULE';
|
||||
import MA_SYSTEMPARM from '../constants/MA_SYSTEMPARM';
|
||||
import MA_MAP_COLLECT from '../constants/MA_MAP_COLLECT';
|
||||
import MA_MAP_COLLECT_SHAPE from '../constants/MA_MAP_COLLECT_SHAPE';
|
||||
import MA_MAP_ITEMCLASS from '../constants/MA_MAP_ITEMCLASS';
|
||||
import MA_MAP_POINT from '../constants/MA_MAP_POINT';
|
||||
import MA_MAP_POINT_ITEM from '../constants/MA_MAP_POINT_ITEM';
|
||||
import MA_MAP_ROAD from '../constants/MA_MAP_ROAD';
|
||||
import MA_MAP_ROAD_LANE from '../constants/MA_MAP_ROAD_LANE';
|
||||
import MA_MAP_SUBITEM from '../constants/MA_MAP_SUBITEM';
|
||||
import MA_SYSSET from '../constants/MA_SYSSET';
|
||||
import ES_CARINFO from '../constants/ES_CARINFO';
|
||||
import ES_EXAMPOINTDETAIL from '../constants/ES_EXAMPOINTDETAIL';
|
||||
import MA_MARKRULESET from '../constants/MA_MARKRULESET';
|
||||
import MA_CDSBINFO from '../constants/MA_CDSBINFO';
|
||||
import MA_ITEMINFO from '../constants/MA_ITEMINFO';
|
||||
import MA_T_CARPARMSET from '../constants/MA_T_CARPARMSET';
|
||||
import ES_CAR_VIDEO_PARAMETER from '../constants/ES_CAR_VIDEO_PARAMETER';
|
||||
import IpConfigTable from '../constants/IpConfigTable';
|
||||
import DeviceInfoTable from '../constants/DeviceInfoTable'
|
||||
import USER from '../constants/USER'
|
||||
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;
|
||||
private tableName: string;
|
||||
private sqlCreateTable: string;
|
||||
private columns: Array<string>;
|
||||
|
||||
constructor(tableName: string, sqlCreateTable: string, columns: Array<string>) {
|
||||
this.tableName = tableName;
|
||||
this.sqlCreateTable = sqlCreateTable;
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
getRdbStore(callback?,content?) {
|
||||
if (!callback || typeof callback == 'undefined' || callback == undefined) {
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'getRdbStore() has no callback!');
|
||||
return;
|
||||
}
|
||||
if (this.rdbStore != null) {
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'The rdbStore exists.');
|
||||
callback();
|
||||
return
|
||||
}
|
||||
let context
|
||||
if(content){
|
||||
context=content
|
||||
}else{
|
||||
context=getContext(this)
|
||||
}
|
||||
// let context = getContext(this) as common.UIAbilityContext;
|
||||
// let context = contextConstant(this);
|
||||
const map = {
|
||||
'MA_MARKRULE': MA_MARKRULE,
|
||||
'MA_SYSTEMPARM': MA_SYSTEMPARM,
|
||||
'MA_MAP_COLLECT': MA_MAP_COLLECT,
|
||||
'MA_MAP_COLLECT_SHAPE': MA_MAP_COLLECT_SHAPE,
|
||||
'MA_MAP_ITEMCLASS': MA_MAP_ITEMCLASS,
|
||||
'MA_MAP_POINT': MA_MAP_POINT,
|
||||
'MA_MAP_POINT_ITEM': MA_MAP_POINT_ITEM,
|
||||
'MA_MAP_ROAD': MA_MAP_ROAD,
|
||||
'MA_MAP_ROAD_LANE': MA_MAP_ROAD_LANE,
|
||||
'MAP_SUBITEM': MA_MAP_SUBITEM,
|
||||
'MA_SYSSET': MA_SYSSET,
|
||||
'ES_CARINFO': ES_CARINFO,
|
||||
'ES_EXAMPOINTDETAIL': ES_EXAMPOINTDETAIL,
|
||||
'MA_MARKRULESET': MA_MARKRULESET,
|
||||
'MA_CDSBINFO': MA_CDSBINFO,
|
||||
'MA_ITEMINFO': MA_ITEMINFO,
|
||||
'MA_T_CARPARMSET': MA_T_CARPARMSET,
|
||||
'ES_CAR_VIDEO_PARAMETER': ES_CAR_VIDEO_PARAMETER,
|
||||
'USER':USER,
|
||||
'USERLIST':USERLIST,
|
||||
'IpConfigTable':IpConfigTable,
|
||||
'DeviceInfoTable':DeviceInfoTable,
|
||||
'CommonConstants':CommonConstants
|
||||
}
|
||||
try {
|
||||
data_rdb.getRdbStore(context,map[this.tableName].STORE_CONFIG, 1, (err, rdb) => {
|
||||
console.log('getRdbStoregetRdbStore',err)
|
||||
if (err) {
|
||||
// Logger.error(`${CommonConstants.RDB_TAG}`, 'gerRdbStore() failed, err: ' + err);
|
||||
return;
|
||||
}
|
||||
console.log('this.sqlCreateTable',this.sqlCreateTable)
|
||||
this.rdbStore = rdb;
|
||||
this.rdbStore.executeSql(this.sqlCreateTable);
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'getRdbStore() finished.');
|
||||
callback();
|
||||
});
|
||||
} catch (e) {
|
||||
console.log("sql error: " + JSON.stringify(e));
|
||||
}
|
||||
}
|
||||
|
||||
deleteTableData(callback,name,content?){
|
||||
if (!callback || typeof callback == 'undefined' || callback == undefined) {
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'getRdbStore() has no callback!');
|
||||
return;
|
||||
}
|
||||
if (this.rdbStore != null) {
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'The rdbStore exists.');
|
||||
callback();
|
||||
return
|
||||
}
|
||||
let context
|
||||
if(content){
|
||||
context=content
|
||||
}else{
|
||||
context=getContext(this)
|
||||
}
|
||||
// let context = getContext(this);
|
||||
const map = {
|
||||
'MA_MARKRULE': MA_MARKRULE,
|
||||
'MA_SYSTEMPARM': MA_SYSTEMPARM,
|
||||
'MA_MAP_COLLECT': MA_MAP_COLLECT,
|
||||
'MA_MAP_COLLECT_SHAPE': MA_MAP_COLLECT_SHAPE,
|
||||
'MA_MAP_ITEMCLASS': MA_MAP_ITEMCLASS,
|
||||
'MA_MAP_POINT': MA_MAP_POINT,
|
||||
'MA_MAP_POINT_ITEM': MA_MAP_POINT_ITEM,
|
||||
'MA_MAP_ROAD': MA_MAP_ROAD,
|
||||
'MA_MAP_ROAD_LANE': MA_MAP_ROAD_LANE,
|
||||
'MAP_SUBITEM': MA_MAP_SUBITEM,
|
||||
'MA_SYSSET': MA_SYSSET,
|
||||
'ES_CARINFO': ES_CARINFO,
|
||||
'ES_EXAMPOINTDETAIL': ES_EXAMPOINTDETAIL,
|
||||
'MA_MARKRULESET': MA_MARKRULESET,
|
||||
'MA_CDSBINFO': MA_CDSBINFO,
|
||||
'MA_ITEMINFO': MA_ITEMINFO,
|
||||
'MA_T_CARPARMSET': MA_T_CARPARMSET,
|
||||
'ES_CAR_VIDEO_PARAMETER': ES_CAR_VIDEO_PARAMETER,
|
||||
'CommonConstants':CommonConstants,
|
||||
'USER':USER,
|
||||
'USERLIST':USERLIST,
|
||||
'IpConfigTable':IpConfigTable,
|
||||
'DeviceInfoTable':DeviceInfoTable
|
||||
}
|
||||
// 获取context后调用deleteRdbStore
|
||||
data_rdb.deleteRdbStore(context,map[this.tableName].STORE_CONFIG.name, function (err) {
|
||||
if (err) {
|
||||
callback(false)
|
||||
console.info("Delete RdbStore failed, err: " + err)
|
||||
return
|
||||
}
|
||||
callback(true)
|
||||
console.log("Delete RdbStore successfully.")
|
||||
})
|
||||
}
|
||||
insertData(data, callback) {
|
||||
if (!callback || typeof callback == 'undefined' || callback == undefined) {
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'insertData() has no callback!');
|
||||
return;
|
||||
}
|
||||
let resFlag: boolean = false;
|
||||
const valueBucket = data;
|
||||
this.rdbStore.insert(this.tableName, valueBucket, function (err, ret) {
|
||||
if (err) {
|
||||
// Logger.error(`${CommonConstants.RDB_TAG}`, 'insertData() failed, err: ' + err);
|
||||
callback(resFlag);
|
||||
return;
|
||||
}
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'insertData() finished: ' + ret);
|
||||
callback(ret);
|
||||
});
|
||||
}
|
||||
async sqlOperate(str,name,callback) {
|
||||
this.rdbStore.executeSql(str,(err)=>{
|
||||
if (err) {
|
||||
console.info("ExecuteSql failed, err: "+name + JSON.stringify(err))
|
||||
callback(false)
|
||||
return
|
||||
}
|
||||
console.log('ExecuteSqlsuccess')
|
||||
callback(true)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
deleteData(predicates, callback) {
|
||||
if (!callback || typeof callback == 'undefined' || callback == undefined) {
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'deleteData() has no callback!');
|
||||
return;
|
||||
}
|
||||
let resFlag: boolean = false;
|
||||
this.rdbStore.delete(predicates, function (err, ret) {
|
||||
if (err) {
|
||||
// Logger.error(`${CommonConstants.RDB_TAG}`, 'deleteData() failed, err: ' + err);
|
||||
callback(resFlag);
|
||||
return;
|
||||
}
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'deleteData() finished: ' + ret);
|
||||
callback(!resFlag);
|
||||
});
|
||||
}
|
||||
|
||||
updateData(predicates, data, callback) {
|
||||
if (!callback || typeof callback == 'undefined' || callback == undefined) {
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'updateDate() has no callback!');
|
||||
return;
|
||||
}
|
||||
let resFlag: boolean = false;
|
||||
const valueBucket = data;
|
||||
this.rdbStore.update(valueBucket, predicates, function (err, ret) {
|
||||
if (err) {
|
||||
// Logger.error(`${CommonConstants.RDB_TAG}`, 'updateData() failed, err: ' + err);
|
||||
callback(resFlag);
|
||||
return;
|
||||
}
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'updateData() finished: ' + ret);
|
||||
callback(!resFlag);
|
||||
});
|
||||
}
|
||||
|
||||
query(predicates, callback) {
|
||||
if (!callback || typeof callback == 'undefined' || callback == undefined) {
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'query() has no callback!');
|
||||
return;
|
||||
}
|
||||
this.rdbStore.query(predicates, this.columns, function (err, resultSet) {
|
||||
if (err) {
|
||||
// Logger.error(`${CommonConstants.RDB_TAG}`, 'query() failed, err: ' + err);
|
||||
return;
|
||||
}
|
||||
// Logger.verbose(`${CommonConstants.RDB_TAG}`, 'query() finished.');
|
||||
callback(resultSet);
|
||||
resultSet.close();
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1,107 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import data_rdb from '@ohos.data.rdb';
|
||||
import Rdb from '../Rdb';
|
||||
|
||||
export default class AccountTable {
|
||||
// private accountTable = new Rdb(CommonConstants.ACCOUNT_TABLE.tableName, CommonConstants.ACCOUNT_TABLE.sqlCreate,
|
||||
// CommonConstants.ACCOUNT_TABLE.columns);
|
||||
private commonConstants
|
||||
private accountTable: Rdb
|
||||
|
||||
// private CommonConstants
|
||||
constructor(callback: Function = () => {
|
||||
}, Constants, context?) {
|
||||
this.accountTable = new Rdb(Constants.ACCOUNT_TABLE.tableName, Constants.ACCOUNT_TABLE.sqlCreate,
|
||||
Constants.ACCOUNT_TABLE.columns)
|
||||
// this.CommonConstants=Constants
|
||||
this.commonConstants = Constants
|
||||
this.accountTable.getRdbStore(callback, context);
|
||||
}
|
||||
|
||||
getRdbStore(callback: Function = () => {
|
||||
}, context?) {
|
||||
this.accountTable.getRdbStore(callback, context);
|
||||
}
|
||||
|
||||
//删除全部数据
|
||||
deleteTableData(callback: Function, name, context?) {
|
||||
this.accountTable.deleteTableData(callback, name, context);
|
||||
}
|
||||
|
||||
insertData(account, callback: Function) {
|
||||
const valueBucket = generateBucket(this.commonConstants, account);
|
||||
this.accountTable.insertData(valueBucket, callback);
|
||||
}
|
||||
|
||||
sqlOperate(str, name, callback: Function) {
|
||||
// const valueBucket = generateBucket(this.commonConstants,account);
|
||||
this.accountTable.sqlOperate(str, name, callback);
|
||||
}
|
||||
|
||||
deleteData(account, callback: Function) {
|
||||
let predicates = new data_rdb.RdbPredicates(this.commonConstants.ACCOUNT_TABLE.tableName)
|
||||
const key = this.commonConstants.ACCOUNT_TABLE.columns[0];
|
||||
predicates.equalTo(key, account[key]);
|
||||
this.accountTable.deleteData(predicates, callback);
|
||||
}
|
||||
|
||||
updateData(account, callback: Function) {
|
||||
const valueBucket = generateBucket(this.commonConstants, account);
|
||||
let predicates = new data_rdb.RdbPredicates(this.commonConstants.ACCOUNT_TABLE.tableName);
|
||||
const key = this.commonConstants.ACCOUNT_TABLE.columns[0]
|
||||
predicates.equalTo(key, account[key]);
|
||||
this.accountTable.updateData(predicates, valueBucket, callback);
|
||||
}
|
||||
|
||||
query(id: string, callback: Function, isAll: boolean = true) {
|
||||
let predicates = new data_rdb.RdbPredicates(this.commonConstants.ACCOUNT_TABLE.tableName);
|
||||
if (!isAll) {
|
||||
const key = this.commonConstants.ACCOUNT_TABLE.columns[0]
|
||||
predicates.equalTo(key, id);
|
||||
}
|
||||
const that = this
|
||||
this.accountTable.query(predicates, function (resultSet) {
|
||||
let count = resultSet.rowCount;
|
||||
if (count === 0 || typeof count === 'string') {
|
||||
console.log(`${that.commonConstants.TABLE_TAG}` + 'Query no results!');
|
||||
callback([]);
|
||||
} else {
|
||||
resultSet.goToFirstRow();
|
||||
const result = [];
|
||||
for (let i = 0; i < count; i++) {
|
||||
let tmp = {}
|
||||
that.commonConstants.ACCOUNT_TABLE.columns.map(res => {
|
||||
tmp[res] = resultSet.getString(resultSet.getColumnIndex(res))
|
||||
})
|
||||
result[i] = tmp;
|
||||
resultSet.goToNextRow();
|
||||
}
|
||||
callback(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function generateBucket(CommonConstants, account) {
|
||||
let obj = {};
|
||||
CommonConstants.ACCOUNT_TABLE.columns.forEach((item) => {
|
||||
if (item != 'id') {
|
||||
obj[item] = account[item];
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
import fs from '@ohos.file.fs';
|
||||
|
||||
/*
|
||||
* params: '/test'
|
||||
* */
|
||||
export async function makedir(params) {
|
||||
const baseInfo=AppStorage.get('baseInfo')
|
||||
let dirPath = baseInfo.pathDir + params;
|
||||
fs.mkdir(dirPath).then(() => {
|
||||
console.info("jiangsong mkdir succeed");
|
||||
}).catch((err) => {
|
||||
console.info("jiangsong mkdir failed with error message: " + err.message + ", error code: " + err.code);
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* params: '/test' or /test.txt
|
||||
* */
|
||||
export async function findFile(params) {
|
||||
const baseInfo=AppStorage.get('baseInfo')
|
||||
let filePath = baseInfo.pathDir + params;
|
||||
fs.access(filePath).then((res) => {
|
||||
if (res) {
|
||||
console.info("file exists");
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.info("access failed with error message: " + err.message + ", error code: " + err.code);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* params: '/test' or /test.txt
|
||||
* */
|
||||
export async function writeFile(params) {
|
||||
const baseInfo=AppStorage.get('baseInfo')
|
||||
let filePath = baseInfo.pathDir + "/testFile" + params.fileName;
|
||||
let file = fs.openSync(filePath, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE);
|
||||
await fs.write(file.fd, params.buffer, params.option).then((writeLen) => {
|
||||
console.info("jiangsong write data to file succeed and size is:" + writeLen);
|
||||
fs.closeSync(file);
|
||||
|
||||
}).catch((err) => {
|
||||
console.info("jiangsong write data to file failed with error message: " + err.message + ", error code: " + err.code);
|
||||
return false
|
||||
});
|
||||
|
||||
|
||||
return filePath
|
||||
}
|
||||
@ -3,17 +3,15 @@ import hilog from '@ohos.hilog';
|
||||
import window from '@ohos.window';
|
||||
import relationalStore from '@ohos.data.relationalStore'
|
||||
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
|
||||
// import featureAbility from '@ohos.ability.featureAbility'
|
||||
import { makedir } from '../common/service/fileService'
|
||||
import { Array2Byte } from '../common/utils/tools'
|
||||
import { GlobalConfig } from '../config/global'
|
||||
import { tcpUtil } from '../common/utils/TcpRequest';
|
||||
import DB from '../common/database/DbSql';
|
||||
import { initTable } from '../common/service/initable';
|
||||
import { centerUDPClient, lightUDPClient, objUDPClient } from '../utils/UdpUtils';
|
||||
import Want from '@ohos.app.ability.Want';
|
||||
import AbilityConstant from '@ohos.app.ability.AbilityConstant';
|
||||
import { BaseInfoType, CarInfoType, ExaminerInfoType } from '../model';
|
||||
import DB from '../utils/DbSql';
|
||||
|
||||
export default class EntryAbility extends UIAbility {
|
||||
async onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
|
||||
@ -100,6 +98,5 @@ export default class EntryAbility extends UIAbility {
|
||||
}
|
||||
|
||||
creatFiles() {
|
||||
makedir('/testFile');
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,6 @@ import common from '@ohos.app.ability.common';
|
||||
import router from '@ohos.router';
|
||||
|
||||
import { getCurrentTime, string2Bytes } from '../common/utils/tools';
|
||||
import { FileHelper } from '../common/service/FileHelper';
|
||||
import { getEsCarModel, getSyncData, } from '../common/service/initable';
|
||||
import { getUDP, getUDP2 } from '../common/utils/GlobalUdp';
|
||||
import { initJudgeUdp } from '../common/utils/UdpJudge';
|
||||
@ -20,6 +19,7 @@ import { GetCarInfo, GetDeviceInfo, SetCurrentTime, SetSerialNumber, UseAuth } f
|
||||
import { GetSyncData, InitializeTheCentralTable } from '../utils/table/Operation';
|
||||
import { BusinessError } from '@ohos.base';
|
||||
import { delPic } from '../utils/Video';
|
||||
import { FileHelper } from '../utils/FileHelp';
|
||||
|
||||
|
||||
@Entry
|
||||
|
||||
@ -1,21 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Shenzhen Kaihong Digital Industry Development 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.
|
||||
*/
|
||||
|
||||
import photoAccessHelper from '@ohos.file.photoAccessHelper';
|
||||
import dataSharePredicates from '@ohos.data.dataSharePredicates';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import { BusinessError } from '@ohos.base';
|
||||
|
||||
export class FileHelper {
|
||||
FILE_ASSET_FETCH_COLUMNS = [
|
||||
@ -43,12 +29,12 @@ export class FileHelper {
|
||||
this.userFileMgr = photoAccessHelper.getPhotoAccessHelper(context);
|
||||
}
|
||||
|
||||
public async queryPhotoByDisplayName(displayName) {
|
||||
public async queryPhotoByDisplayName(displayName: string) {
|
||||
console.log('baoyihu queryPhotoByDisplayName begin DISPLAY_NAME:' + displayName);
|
||||
try {
|
||||
let predicates = new dataSharePredicates.DataSharePredicates();
|
||||
predicates.equalTo(photoAccessHelper.PhotoKeys.DISPLAY_NAME, displayName)
|
||||
let fetchOptions = {
|
||||
let fetchOptions: photoAccessHelper.FetchOptions = {
|
||||
fetchColumns: this.FILE_ASSET_FETCH_COLUMNS,
|
||||
predicates: predicates
|
||||
};
|
||||
@ -75,7 +61,7 @@ export class FileHelper {
|
||||
console.log('getUserAlbumItemByDisplayName');
|
||||
let predicates = new dataSharePredicates.DataSharePredicates();
|
||||
predicates.equalTo(photoAccessHelper.AlbumKeys.ALBUM_NAME, displayName)
|
||||
let fetchOptions = {
|
||||
let fetchOptions: photoAccessHelper.FetchOptions = {
|
||||
fetchColumns: [],
|
||||
predicates: predicates
|
||||
};
|
||||
@ -96,13 +82,13 @@ export class FileHelper {
|
||||
return album;
|
||||
}
|
||||
|
||||
public async addAssetToAlbum(albumName, file_uri) {
|
||||
public async addAssetToAlbum(albumName: string, file_uri: string) {
|
||||
console.log('baoyihu addAssetToAlbum begin albumName ' + albumName + ', file_uri:' + file_uri);
|
||||
try {
|
||||
let album = await this.getUserAlbumItemByDisplayName(albumName);
|
||||
let predicates = new dataSharePredicates.DataSharePredicates();
|
||||
predicates.equalTo(photoAccessHelper.PhotoKeys.URI, file_uri)
|
||||
let fetchOptions = {
|
||||
let fetchOptions: photoAccessHelper.FetchOptions = {
|
||||
fetchColumns: this.FILE_ASSET_FETCH_COLUMNS,
|
||||
predicates: predicates
|
||||
};
|
||||
@ -121,21 +107,21 @@ export class FileHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public async deleteFileOfAlbum(album_Name, file_type): Promise<void> {
|
||||
public async deleteFileOfAlbum(album_Name: string, file_type: number | string | boolean): Promise<void> {
|
||||
console.log('baoyihu deletePictureOfAlbum album_Name:' + album_Name);
|
||||
var photoFetchResult = null;
|
||||
let photoFetchResult: photoAccessHelper.FetchResult<photoAccessHelper.PhotoAsset> = null;
|
||||
try {
|
||||
let album = await this.getUserAlbumItemByName(album_Name);
|
||||
let predicates = new dataSharePredicates.DataSharePredicates();
|
||||
predicates.equalTo(photoAccessHelper.PhotoKeys.PHOTO_TYPE, file_type)
|
||||
let fetchOptions = {
|
||||
let fetchOptions: photoAccessHelper.FetchOptions = {
|
||||
fetchColumns: this.FILE_ASSET_FETCH_COLUMNS,
|
||||
predicates: predicates
|
||||
};
|
||||
photoFetchResult = await album.getAssets(fetchOptions)
|
||||
var all_fileAsset = await photoFetchResult.getAllObjects();
|
||||
let all_fileAsset = await photoFetchResult.getAllObjects();
|
||||
|
||||
var uri_array = []
|
||||
let uri_array: string[] = []
|
||||
console.log('baoyihu deletePictureOfAlbum iterator begin', album_Name);
|
||||
for (let onfile of all_fileAsset) {
|
||||
console.log(album_Name,
|
||||
@ -145,7 +131,7 @@ export class FileHelper {
|
||||
}
|
||||
await this.userFileMgr.deleteAssets(uri_array);
|
||||
|
||||
let albumFetchResult = null;
|
||||
let albumFetchResult: photoAccessHelper.FetchResult<photoAccessHelper.Album> = null;
|
||||
try {
|
||||
albumFetchResult =
|
||||
await this.userFileMgr.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.TRASH);
|
||||
@ -153,7 +139,7 @@ export class FileHelper {
|
||||
let trashAlbum = await albumFetchResult.getFirstObject();
|
||||
trashAlbum.deleteAssets(all_fileAsset).then(() => {
|
||||
console.log('baoyihu deletePictureOfAlbum trash ok : ', album_Name);
|
||||
}).catch((err) => {
|
||||
}).catch((err: BusinessError) => {
|
||||
console.log('baoyihu deletePictureOfAlbum trash faild : ', album_Name);
|
||||
});
|
||||
} catch (err) {
|
||||
@ -176,21 +162,19 @@ export class FileHelper {
|
||||
|
||||
public async deleteAllPictures(): Promise<void> {
|
||||
console.log('baoyihu deleteAllPictures');
|
||||
let photoFetchResult = null;
|
||||
let photoFetchResult: photoAccessHelper.FetchResult<photoAccessHelper.PhotoAsset> = null;
|
||||
try {
|
||||
let predicates = new dataSharePredicates.DataSharePredicates();
|
||||
let fetchOptions = {
|
||||
let fetchOptions: photoAccessHelper.FetchOptions = {
|
||||
fetchColumns: this.FILE_ASSET_FETCH_COLUMNS,
|
||||
predicates: predicates
|
||||
};
|
||||
photoFetchResult = await this.userFileMgr.getAssets(fetchOptions);
|
||||
|
||||
var all_fileAsset = await photoFetchResult.getAllObjects();
|
||||
var uri_array = []
|
||||
let all_fileAsset = await photoFetchResult.getAllObjects();
|
||||
let uri_array: string[] = []
|
||||
console.log('baoyihu batch delete begin');
|
||||
for (let onfile of all_fileAsset) {
|
||||
console.log('baoyihu push one uri : ' + onfile.uri + ', photoType : ' + onfile.photoType + ', displayName : ' +
|
||||
onfile.displayName + ', file_size: ' + onfile.size);
|
||||
uri_array.push(onfile.uri);
|
||||
}
|
||||
// await album.removeAssets(all_fileAsset);
|
||||
@ -239,7 +223,7 @@ export class FileHelper {
|
||||
console.log('getUserAlbumItemByName');
|
||||
let predicates = new dataSharePredicates.DataSharePredicates();
|
||||
predicates.equalTo(photoAccessHelper.AlbumKeys.ALBUM_NAME, albumName)
|
||||
let fetchOptions = {
|
||||
let fetchOptions: photoAccessHelper.FetchOptions = {
|
||||
fetchColumns: [],
|
||||
predicates: predicates
|
||||
};
|
||||
@ -262,7 +246,7 @@ export class FileHelper {
|
||||
}
|
||||
|
||||
|
||||
public async createAlbum(albumName): Promise<string> {
|
||||
public async createAlbum(albumName: string): Promise<string> {
|
||||
try {
|
||||
console.log("baoyihu createAlbum beging");
|
||||
let albumAsset = await this.userFileMgr.createAlbum(albumName);
|
||||
@ -282,7 +266,7 @@ export class FileHelper {
|
||||
subType: photoAccessHelper.AlbumSubtype): Promise<void> {
|
||||
console.log('baoyihu createPhotoAsset enter ');
|
||||
try {
|
||||
let createOptions = { subtype: photoAccessHelper.PhotoSubtype.SCREENSHOT };
|
||||
let createOptions: photoAccessHelper.PhotoCreateOptions = { subtype: photoAccessHelper.PhotoSubtype.SCREENSHOT };
|
||||
await this.userFileMgr.createAsset("picture2.jpg", createOptions, (err, photoResult) => {
|
||||
console.log('baoyihu createPhotoAsset return uri: ' + photoResult.uri + ', photoType: ' + photoResult.photoType
|
||||
+ ', displayName: ' + photoResult.displayName);
|
||||
@ -306,14 +290,14 @@ export class FileHelper {
|
||||
+ ', Name: ' + albumAsset.albumName + ', Uri: ' + albumAsset.albumUri + ', coverUri: ' + albumAsset.coverUri);
|
||||
|
||||
let predicates = new dataSharePredicates.DataSharePredicates();
|
||||
let fetchOptions = {
|
||||
let fetchOptions: photoAccessHelper.FetchOptions = {
|
||||
fetchColumns: this.FILE_ASSET_FETCH_COLUMNS,
|
||||
predicates: predicates
|
||||
};
|
||||
let photoFetchResult = await albumAsset.getAssets(fetchOptions);
|
||||
let count = photoFetchResult.getCount();
|
||||
console.log('baoyihu queryAlbum photoFetchResult count: ' + count);
|
||||
var all_fileAsset = await photoFetchResult.getAllObjects();
|
||||
let all_fileAsset = await photoFetchResult.getAllObjects();
|
||||
// var uri_array=[]
|
||||
|
||||
for (let onfile of all_fileAsset) {
|
||||
@ -352,7 +336,7 @@ export class FileHelper {
|
||||
console.log('baoyihu_ get one Album name : ' + albumAsset.albumName);
|
||||
try {
|
||||
let predicates = new dataSharePredicates.DataSharePredicates();
|
||||
let fetchOptions = {
|
||||
let fetchOptions: photoAccessHelper.FetchOptions = {
|
||||
fetchColumns: this.FILE_ASSET_FETCH_COLUMNS,
|
||||
predicates: predicates
|
||||
};
|
||||
@ -360,7 +344,7 @@ export class FileHelper {
|
||||
photoFetchResult = await albumAsset.getAssets(fetchOptions);
|
||||
count = photoFetchResult.getCount();
|
||||
console.log('baoyihu_ photoFetchResult count: ' + count);
|
||||
var all_fileAsset = await photoFetchResult.getAllObjects();
|
||||
let all_fileAsset = await photoFetchResult.getAllObjects();
|
||||
/*
|
||||
var uri_array=[]
|
||||
console.log( 'baoyihu batch delete begin' );
|
||||
@ -1,6 +1,6 @@
|
||||
import socket from '@ohos.net.socket'
|
||||
import common from '@ohos.app.ability.common'
|
||||
import FileUtils from './fileUtils'
|
||||
import FileUtils from './FileUtils'
|
||||
import promptAction from '@ohos.promptAction'
|
||||
import { CarInfoType } from '../model'
|
||||
|
||||
|
||||
@ -5,12 +5,12 @@ import promptAction from '@ohos.promptAction';
|
||||
import { GetCurrentTime, IsDaysAgo } from './Common';
|
||||
import { RecordHandleType, TakePhotoCallbackData, VideoConfig } from '../model';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import { FileHelper } from '../common/service/FileHelper';
|
||||
import FileUtil from '../common/utils/File';
|
||||
import dayTs from './Date';
|
||||
import { GlobalConfig, VideoTag } from '../config';
|
||||
import { BusinessError } from '@ohos.base';
|
||||
import { VideoConfigData } from '../mock';
|
||||
import { FileHelper } from './FileHelp';
|
||||
|
||||
const rtsp_server = record.createServer();
|
||||
//开始录屏
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user