inl-app-manager 1.5.43 → 1.5.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clientUtils/index.d.ts +355 -0
- package/dist/elements/index.d.ts +153 -0
- package/dist/elements/index.js +139 -50
- package/dist/index.d.ts +567 -0
- package/dist/index.js +139 -50
- package/package.json +6 -5
- package/rollup.config.cjs +2 -0
- package/rollup.config.ts +1 -1
- package/.history/.gitignore_20231113150352 +0 -11
- package/.history/.gitignore_20240627161831 +0 -12
- package/.history/.gitignore_20240627161832 +0 -12
- package/entry.js +0 -14
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import * as three from 'three';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
import * as axios from 'axios';
|
|
4
|
+
import * as ofetch_dist_shared_ofetch_441891d5 from 'ofetch/dist/shared/ofetch.441891d5';
|
|
5
|
+
import _ from 'lodash';
|
|
6
|
+
import dayjs from 'dayjs';
|
|
7
|
+
import * as G2 from '@antv/g2';
|
|
8
|
+
import * as vueUse from '@vueuse/core';
|
|
9
|
+
import * as antdv from 'ant-design-vue';
|
|
10
|
+
import * as vant from 'vant';
|
|
11
|
+
import * as iconsVue from '@ant-design/icons-vue';
|
|
12
|
+
import * as inl from 'inl-ui';
|
|
13
|
+
import Decimal from 'decimal.js';
|
|
14
|
+
|
|
15
|
+
declare const queryOnDutyPerson: () => Promise<void>;
|
|
16
|
+
|
|
17
|
+
declare const __app_common_queryOnDutyPerson: typeof queryOnDutyPerson;
|
|
18
|
+
declare namespace __app_common {
|
|
19
|
+
export {
|
|
20
|
+
__app_common_queryOnDutyPerson as queryOnDutyPerson,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface POINTCODE extends thingPropertyValueVoList {
|
|
25
|
+
value: string;
|
|
26
|
+
unit: string;
|
|
27
|
+
groupName?: string;
|
|
28
|
+
historyDataList?: Array<any>;
|
|
29
|
+
thingEntity?: ThingEntity;
|
|
30
|
+
thingCode?: string;
|
|
31
|
+
thingInstId?: string;
|
|
32
|
+
stateImg?: string;
|
|
33
|
+
}
|
|
34
|
+
interface thingPropertyValueVoList {
|
|
35
|
+
alarmAvailable: Boolean;
|
|
36
|
+
alarmId: string;
|
|
37
|
+
colorTrans: string;
|
|
38
|
+
colspan: number;
|
|
39
|
+
displayType: string;
|
|
40
|
+
displayValue: string | number | boolean;
|
|
41
|
+
eventEnable: Boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 属性label名称
|
|
44
|
+
*/
|
|
45
|
+
label: string;
|
|
46
|
+
/**
|
|
47
|
+
* 属性长度
|
|
48
|
+
*/
|
|
49
|
+
linkUrl: null;
|
|
50
|
+
/**
|
|
51
|
+
* 属性长度
|
|
52
|
+
*/
|
|
53
|
+
listInfo: "";
|
|
54
|
+
/**
|
|
55
|
+
* 属性类型
|
|
56
|
+
*/
|
|
57
|
+
listType: "";
|
|
58
|
+
/**
|
|
59
|
+
* 是否需要报警
|
|
60
|
+
*/
|
|
61
|
+
needColorTrans: Boolean;
|
|
62
|
+
/**
|
|
63
|
+
* 是否需要跳转
|
|
64
|
+
*/
|
|
65
|
+
needLink: Boolean;
|
|
66
|
+
pointCode: null;
|
|
67
|
+
pointCode2: null;
|
|
68
|
+
/**
|
|
69
|
+
* 属性类型
|
|
70
|
+
*/
|
|
71
|
+
propertyType: keyof typeof propertyType;
|
|
72
|
+
/**
|
|
73
|
+
* 刷新频率
|
|
74
|
+
*/
|
|
75
|
+
refresh: null;
|
|
76
|
+
/**
|
|
77
|
+
* 关联属性code
|
|
78
|
+
*/
|
|
79
|
+
relationThingCode: null;
|
|
80
|
+
/**
|
|
81
|
+
* 是否必填
|
|
82
|
+
*/
|
|
83
|
+
selectRequest: Boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 属性排序
|
|
86
|
+
*/
|
|
87
|
+
sort: number;
|
|
88
|
+
/**
|
|
89
|
+
* 属性code
|
|
90
|
+
*/
|
|
91
|
+
thingPropertyCode: string;
|
|
92
|
+
/**
|
|
93
|
+
* 属性id
|
|
94
|
+
*/
|
|
95
|
+
thingPropertyId: string;
|
|
96
|
+
/**
|
|
97
|
+
* 属性实例id
|
|
98
|
+
*/
|
|
99
|
+
thingPropertyInstId: null;
|
|
100
|
+
/**
|
|
101
|
+
* 属性名称
|
|
102
|
+
*/
|
|
103
|
+
thingPropertyName: string;
|
|
104
|
+
/**
|
|
105
|
+
* 属性单位
|
|
106
|
+
*/
|
|
107
|
+
unit: string;
|
|
108
|
+
/**
|
|
109
|
+
* 属性值
|
|
110
|
+
*/
|
|
111
|
+
value: string | null;
|
|
112
|
+
}
|
|
113
|
+
declare enum propertyType {
|
|
114
|
+
/**
|
|
115
|
+
* unknown
|
|
116
|
+
* */
|
|
117
|
+
NONE = "NONE",
|
|
118
|
+
/**
|
|
119
|
+
* 物实例属性
|
|
120
|
+
* */
|
|
121
|
+
ATTRIBUTE = "ATTRIBUTE",
|
|
122
|
+
/**
|
|
123
|
+
* 静态属性
|
|
124
|
+
* */
|
|
125
|
+
PROPERTY = "PROPERTY",
|
|
126
|
+
/**
|
|
127
|
+
* 动态属性
|
|
128
|
+
* */
|
|
129
|
+
METRIC = "METRIC",
|
|
130
|
+
/**
|
|
131
|
+
* 动作下发
|
|
132
|
+
* */
|
|
133
|
+
ACTION = "ACTION",
|
|
134
|
+
/**
|
|
135
|
+
* 下发参数
|
|
136
|
+
* */
|
|
137
|
+
PARAMETER = "PARAMETER",
|
|
138
|
+
/**
|
|
139
|
+
* 报警属性
|
|
140
|
+
* */
|
|
141
|
+
ALARM = "ALARM",
|
|
142
|
+
/**
|
|
143
|
+
* 逻辑属性
|
|
144
|
+
* */
|
|
145
|
+
LOGIC = "LOGIC",
|
|
146
|
+
/**
|
|
147
|
+
* 关系属性
|
|
148
|
+
*/
|
|
149
|
+
RELATION = "RELATION",
|
|
150
|
+
/**
|
|
151
|
+
* 设定参数
|
|
152
|
+
*/
|
|
153
|
+
SETTING = "SETTING"
|
|
154
|
+
}
|
|
155
|
+
type detailGroupList = {
|
|
156
|
+
/**
|
|
157
|
+
* 设备详情组名称
|
|
158
|
+
*/
|
|
159
|
+
groupName: string;
|
|
160
|
+
/**
|
|
161
|
+
* 设备详情组类型
|
|
162
|
+
*/
|
|
163
|
+
groupType: string;
|
|
164
|
+
/**
|
|
165
|
+
* 设备详情组属性列表
|
|
166
|
+
*/
|
|
167
|
+
thingPropertyValueVoList: Array<thingPropertyValueVoList>;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* 物模型 详情
|
|
171
|
+
*/
|
|
172
|
+
interface ThingEntity {
|
|
173
|
+
catalogCode: string;
|
|
174
|
+
catalogName: string;
|
|
175
|
+
children: null;
|
|
176
|
+
code: string;
|
|
177
|
+
createTime: string;
|
|
178
|
+
createUser: null;
|
|
179
|
+
id: string;
|
|
180
|
+
img2dAlarm: string;
|
|
181
|
+
img2dPoweroff: string;
|
|
182
|
+
img2dPoweron: string;
|
|
183
|
+
img2dRun: string;
|
|
184
|
+
img25dAlarm: string;
|
|
185
|
+
img25dPoweroff: string;
|
|
186
|
+
img25dPoweron: string;
|
|
187
|
+
img25dRun: string;
|
|
188
|
+
industryCode: string;
|
|
189
|
+
industryName: string;
|
|
190
|
+
name: string;
|
|
191
|
+
parentCode: string;
|
|
192
|
+
parentId: string;
|
|
193
|
+
photo: string;
|
|
194
|
+
remark: string;
|
|
195
|
+
sort: number;
|
|
196
|
+
tableName: string;
|
|
197
|
+
thingKind: string;
|
|
198
|
+
thingType: string;
|
|
199
|
+
updateTime: string;
|
|
200
|
+
updateUser: string;
|
|
201
|
+
validEnable: true;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* 设备实例详情
|
|
205
|
+
*/
|
|
206
|
+
interface thingInstanceDetail {
|
|
207
|
+
/**
|
|
208
|
+
* 设备详情组
|
|
209
|
+
*/
|
|
210
|
+
detailGroupList: Array<detailGroupList>;
|
|
211
|
+
functionCode: "WEB";
|
|
212
|
+
listPropertyList: any;
|
|
213
|
+
thingInstCode: string;
|
|
214
|
+
/**
|
|
215
|
+
* 物模型Code
|
|
216
|
+
*/
|
|
217
|
+
thingEntity: ThingEntity;
|
|
218
|
+
thingCode: string;
|
|
219
|
+
thingInstId: string;
|
|
220
|
+
thingInstName: string;
|
|
221
|
+
thingInstPhoto: string;
|
|
222
|
+
thingName: string;
|
|
223
|
+
stateImg: string;
|
|
224
|
+
}
|
|
225
|
+
interface RequestParams {
|
|
226
|
+
token?: string;
|
|
227
|
+
requestType: string | null;
|
|
228
|
+
thingCode: string | null;
|
|
229
|
+
functionCode: "web" | "topo" | "3dTopo";
|
|
230
|
+
}
|
|
231
|
+
type Downsample = {
|
|
232
|
+
timeNum: number;
|
|
233
|
+
timeUnit: "SECOND" | "MINUTE" | "HOUR" | "DAY" | "WEEK" | "MONTH" | "YEAR";
|
|
234
|
+
aggregator: "AVG" | "MIN" | "MAX" | "SUM" | "COUNT" | "FIRST" | "LAST" | "AVGALL" | "INTERP";
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
type historyDataList = {
|
|
238
|
+
alarmFlag: boolean;
|
|
239
|
+
formatValue: string;
|
|
240
|
+
lastScanTIme: string;
|
|
241
|
+
lastValue: number;
|
|
242
|
+
originValue: number;
|
|
243
|
+
prePointCode: string;
|
|
244
|
+
saveTime: string;
|
|
245
|
+
scanTIme: string;
|
|
246
|
+
state: number;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* @description 创建历史数据查询任务
|
|
250
|
+
* @param codes 设备实例code
|
|
251
|
+
* @param pcs 设备实例属性code
|
|
252
|
+
* @param params 请求参数
|
|
253
|
+
* @returns (* @param startTime 开始时间,@param endTime 结束时间, @param downsample 间隔时间Downsample) => 历史数据
|
|
254
|
+
*/
|
|
255
|
+
declare const createGetHistoryData: (codes: Array<string>, pcs: Array<string>, params: RequestParams) => Promise<(startTime: string, endTime: string, downsample: Downsample) => Promise<Record<string, Record<string, POINTCODE>>>>;
|
|
256
|
+
|
|
257
|
+
interface DeviceStateData {
|
|
258
|
+
displayValue: string | number | boolean;
|
|
259
|
+
thingCode: string;
|
|
260
|
+
thingInstCode: string;
|
|
261
|
+
thingInstId: string;
|
|
262
|
+
thingPropertyCode: string;
|
|
263
|
+
unit: string;
|
|
264
|
+
value: string;
|
|
265
|
+
stateImg?: string;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* @description 创建设备状态查询 任务
|
|
269
|
+
* @param code 设备实例code
|
|
270
|
+
*/
|
|
271
|
+
declare const getThingInstanceStatus: (code: Array<string>) => Promise<Record<string, DeviceStateData>>;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @description 获取设备实例详细信息
|
|
275
|
+
* @param codes 设备实例code
|
|
276
|
+
* @param params 请求参数
|
|
277
|
+
* @param Markers 标记是通过id还是code查询
|
|
278
|
+
* @param filterDataByEventEnable 是否过滤无用属性根据eventEnable
|
|
279
|
+
* @returns
|
|
280
|
+
*/
|
|
281
|
+
declare const getThingInstanceDetail: (codes: Array<string>, params: RequestParams, Markers: "id" | "code", filterDataByEventEnable?: boolean) => Promise<Record<string, thingInstanceDetail>>;
|
|
282
|
+
/**
|
|
283
|
+
* @description 创建查询设备详情方法
|
|
284
|
+
* @param codes 设备实例code
|
|
285
|
+
* @param params 请求参数
|
|
286
|
+
* @param proptypeCodes 需要查询的属性code
|
|
287
|
+
* @param Markers 标记是通过id还是code查询
|
|
288
|
+
* @param filterDataByEventEnable 是否过滤无用属性根据eventEnable
|
|
289
|
+
* @returns
|
|
290
|
+
*/
|
|
291
|
+
declare const createGetThingInstanceDetail: (opt: {
|
|
292
|
+
codes: Array<string>;
|
|
293
|
+
params: RequestParams;
|
|
294
|
+
markers: "id" | "code";
|
|
295
|
+
proptypeCodes?: Array<string>;
|
|
296
|
+
filterDataByEventEnable?: boolean;
|
|
297
|
+
}) => any;
|
|
298
|
+
|
|
299
|
+
type __app_thing_DeviceStateData = DeviceStateData;
|
|
300
|
+
declare const __app_thing_createGetHistoryData: typeof createGetHistoryData;
|
|
301
|
+
declare const __app_thing_createGetThingInstanceDetail: typeof createGetThingInstanceDetail;
|
|
302
|
+
declare const __app_thing_getThingInstanceDetail: typeof getThingInstanceDetail;
|
|
303
|
+
declare const __app_thing_getThingInstanceStatus: typeof getThingInstanceStatus;
|
|
304
|
+
type __app_thing_historyDataList = historyDataList;
|
|
305
|
+
declare namespace __app_thing {
|
|
306
|
+
export {
|
|
307
|
+
__app_thing_DeviceStateData as DeviceStateData,
|
|
308
|
+
__app_thing_createGetHistoryData as createGetHistoryData,
|
|
309
|
+
__app_thing_createGetThingInstanceDetail as createGetThingInstanceDetail,
|
|
310
|
+
__app_thing_getThingInstanceDetail as getThingInstanceDetail,
|
|
311
|
+
__app_thing_getThingInstanceStatus as getThingInstanceStatus,
|
|
312
|
+
__app_thing_historyDataList as historyDataList,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
declare const clientUtils: {
|
|
317
|
+
http: {
|
|
318
|
+
ofetch: ofetch_dist_shared_ofetch_441891d5.$;
|
|
319
|
+
axios: axios.AxiosStatic;
|
|
320
|
+
};
|
|
321
|
+
G2: typeof G2;
|
|
322
|
+
app: {
|
|
323
|
+
thing: typeof __app_thing;
|
|
324
|
+
common: typeof __app_common;
|
|
325
|
+
};
|
|
326
|
+
tools: {
|
|
327
|
+
_: _.LoDashStatic;
|
|
328
|
+
vueUse: typeof vueUse;
|
|
329
|
+
dayjs: typeof dayjs;
|
|
330
|
+
onMounted: (hook: () => any, target?: vue.ComponentInternalInstance) => false | Function;
|
|
331
|
+
three: {
|
|
332
|
+
three: typeof three;
|
|
333
|
+
Stats: any;
|
|
334
|
+
};
|
|
335
|
+
antdv: typeof antdv;
|
|
336
|
+
vant: typeof vant;
|
|
337
|
+
iconsVue: typeof iconsVue;
|
|
338
|
+
Decimal: typeof Decimal;
|
|
339
|
+
createId: () => string;
|
|
340
|
+
DEVICESTATE: "DEVICE_STATE";
|
|
341
|
+
propertyType: typeof propertyType;
|
|
342
|
+
paramsToString: (obj: Record<string, any>) => any;
|
|
343
|
+
resetHeader: (token: string) => {
|
|
344
|
+
token: string;
|
|
345
|
+
"Content-Type": string;
|
|
346
|
+
};
|
|
347
|
+
filterDataByEventEnableFun: (data: thingInstanceDetail) => thingInstanceDetail;
|
|
348
|
+
dataToPointCode: (data: Record<string, thingInstanceDetail>, pcs?: string[]) => Record<string, Record<string, POINTCODE>>;
|
|
349
|
+
getThingStateImg: (v: string | number, d: ThingEntity) => string;
|
|
350
|
+
filterThingInstanceDetailByPc: (res: Record<string, thingInstanceDetail>, pcs: string[]) => Promise<Record<string, Record<string, POINTCODE>>>;
|
|
351
|
+
inl: typeof inl;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
export { clientUtils as default };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { PropOptions } from 'ant-design-vue/lib/_util/type';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
import { PropType } from 'vue';
|
|
4
|
+
|
|
5
|
+
type CardPropTypes =
|
|
6
|
+
/**
|
|
7
|
+
* 字符串
|
|
8
|
+
*/
|
|
9
|
+
"string"
|
|
10
|
+
/**
|
|
11
|
+
* 数字
|
|
12
|
+
*/
|
|
13
|
+
| "number"
|
|
14
|
+
/**
|
|
15
|
+
* 物模型
|
|
16
|
+
*/
|
|
17
|
+
| "thing"
|
|
18
|
+
/**
|
|
19
|
+
* 物模型
|
|
20
|
+
*/
|
|
21
|
+
| "flowSelect"
|
|
22
|
+
/**
|
|
23
|
+
* 布尔类型
|
|
24
|
+
*/
|
|
25
|
+
| "boolean"
|
|
26
|
+
/**
|
|
27
|
+
* jsx
|
|
28
|
+
*/
|
|
29
|
+
| "jsx"
|
|
30
|
+
/**
|
|
31
|
+
* 富文本
|
|
32
|
+
*/
|
|
33
|
+
| "richText"
|
|
34
|
+
/**
|
|
35
|
+
* tabs 标签页
|
|
36
|
+
*/
|
|
37
|
+
| "tabs"
|
|
38
|
+
/**
|
|
39
|
+
* 单选
|
|
40
|
+
*/
|
|
41
|
+
| "radio"
|
|
42
|
+
/**
|
|
43
|
+
* checkBox
|
|
44
|
+
*/
|
|
45
|
+
| "checkBox"
|
|
46
|
+
/**
|
|
47
|
+
* 二次确认
|
|
48
|
+
*/
|
|
49
|
+
| "confirm"
|
|
50
|
+
/**
|
|
51
|
+
* 事件
|
|
52
|
+
*/
|
|
53
|
+
| "event"
|
|
54
|
+
/**
|
|
55
|
+
* 视频选择弹窗
|
|
56
|
+
*/
|
|
57
|
+
| "VideoSelect"
|
|
58
|
+
/**
|
|
59
|
+
* 表格
|
|
60
|
+
*/
|
|
61
|
+
| "table"
|
|
62
|
+
/**
|
|
63
|
+
* 下拉选项
|
|
64
|
+
*/
|
|
65
|
+
| "select"
|
|
66
|
+
/**
|
|
67
|
+
* 树选择
|
|
68
|
+
*/
|
|
69
|
+
| "treeSelect"
|
|
70
|
+
/**
|
|
71
|
+
* 系统选择
|
|
72
|
+
*/
|
|
73
|
+
| "systemSelect"
|
|
74
|
+
/**
|
|
75
|
+
* 文字样式
|
|
76
|
+
*/
|
|
77
|
+
| "textStyle"
|
|
78
|
+
/**
|
|
79
|
+
* 图标选择
|
|
80
|
+
*/
|
|
81
|
+
| "icon"
|
|
82
|
+
/**
|
|
83
|
+
* 代码
|
|
84
|
+
*/
|
|
85
|
+
| "code"
|
|
86
|
+
/**
|
|
87
|
+
* 流程图
|
|
88
|
+
*/
|
|
89
|
+
| "flowsheet"
|
|
90
|
+
/**
|
|
91
|
+
* 颜色
|
|
92
|
+
*/
|
|
93
|
+
| "color";
|
|
94
|
+
|
|
95
|
+
type cardDefaultPropType = PropType<any> | true | null | any;
|
|
96
|
+
/**
|
|
97
|
+
* @description: 卡片组件的props
|
|
98
|
+
*/
|
|
99
|
+
type defaultDictionary = Array<{
|
|
100
|
+
name: string;
|
|
101
|
+
id: string;
|
|
102
|
+
}> | Array<{
|
|
103
|
+
label: string;
|
|
104
|
+
value: string;
|
|
105
|
+
}> | any;
|
|
106
|
+
interface cardDefaultProps<T = CardPropTypes, D = defaultDictionary> extends PropOptions {
|
|
107
|
+
type: cardDefaultPropType;
|
|
108
|
+
default: cardDefaultPropType | string;
|
|
109
|
+
label: string;
|
|
110
|
+
state: T;
|
|
111
|
+
code?: string;
|
|
112
|
+
hide?: boolean;
|
|
113
|
+
value?: any;
|
|
114
|
+
description?: string;
|
|
115
|
+
dataDictionary?: D;
|
|
116
|
+
controlInstId?: string;
|
|
117
|
+
stateConfig?: any;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare const cardTypeEnum: {
|
|
121
|
+
form: string;
|
|
122
|
+
custom: string;
|
|
123
|
+
aboutThing: string;
|
|
124
|
+
standard: string;
|
|
125
|
+
};
|
|
126
|
+
declare const cardCode: {
|
|
127
|
+
pcCard: string;
|
|
128
|
+
controlItem: string;
|
|
129
|
+
phoneCard: string;
|
|
130
|
+
};
|
|
131
|
+
interface cardCompInfo {
|
|
132
|
+
comp: any;
|
|
133
|
+
cname: string;
|
|
134
|
+
pageControlId: string;
|
|
135
|
+
isCustomCard?: boolean;
|
|
136
|
+
tags?: Array<string>;
|
|
137
|
+
config?: Array<cardDefaultProps>;
|
|
138
|
+
code: keyof typeof cardCode;
|
|
139
|
+
cardType?: keyof typeof cardTypeEnum;
|
|
140
|
+
thumbnail?: string;
|
|
141
|
+
preview?: () => JSX.Element;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @description: 卡片组件信息
|
|
146
|
+
*/
|
|
147
|
+
declare const _default: {
|
|
148
|
+
install(app: vue.App<any>): void;
|
|
149
|
+
cards: Record<string, cardCompInfo>;
|
|
150
|
+
version: string;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export { _default as default };
|