123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- // #ifdef APP-ANDROID
- import {selectTableData, insertTableData} from '@/utils/sqlite'
- // #endif
- export type Download = {
- pdid : number,
- workorder : string,
- invname : string,
- productno : string,
- graphid : string,
- cardno : string,
- processno : string,
- ver : string,
- updatetime : string,
- progress : string,
- status : number
- }
- export type Record = {
- sxid : number,
- senum : number,
- photoitem : string,
- productno : string,
- part : string,
- descb : string,
- date : string,
- partno : string,
- num : number,
- status : string,
- urlspl : string
- imgname : string[],
- urlpdt : string[]
- }
- export type TaskProcess = {
- id : number
- name : string
- num : number
- step : number
- status : number
- }
- export function offlineData(data:UTSJSONObject):Promise<UTSJSONObject> {
- return new Promise((resolve, reject) => {
- let result = JSON.parseObject(JSON.stringify(data)) as UTSJSONObject
- resolve(result)
- });
- }
- export async function getList(tableName:string, condition?:string|null, value?:string|null, initData?:UTSJSONObject|null):Promise<UTSJSONObject> {
-
- // #ifdef APP-ANDROID
- const result = await selectTableData(tableName, condition, value, null, null);
- console.log(result);
- return result;
- // #endif
-
- // #ifdef H5
- return offlineData(initData)
- // #endif
- }
- /*
- export const onload=():Promise<UTSJSONObject>=> {
- return new Promise((resolve, reject) => {
- getInfo().then((res:UTSJSONObject) => {
- })
- })
- } */
|