hy-dispatch-ui-v3 0.2.77 → 0.2.78
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/tailwind.css +91 -8
- package/es/api/common.mjs +28 -0
- package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation2.vue.mjs +5 -8
- package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong2.vue.mjs +108 -125
- package/es/bussiness/hyDepartmentTypeOperation/locale/en_US.mjs +7 -7
- package/es/bussiness/hyDepartmentTypeOperation/locale/zh_CN.mjs +6 -6
- package/es/bussiness/hyDisplayQueryAddress/displayQueryAddress.vue.mjs +5 -0
- package/es/bussiness/hyDisplayQueryAddress/displayQueryAddress2.install.mjs +6 -0
- package/es/bussiness/hyDisplayQueryAddress/displayQueryAddress2.vue.mjs +182 -0
- package/es/bussiness/hyDisplayQueryAddress/index.mjs +8 -0
- package/es/bussiness/hyDisplayQueryAddress/locale/en_US.mjs +7 -0
- package/es/bussiness/hyDisplayQueryAddress/locale/index.mjs +2 -0
- package/es/bussiness/hyDisplayQueryAddress/locale/zh_CN.mjs +7 -0
- package/es/bussiness/hyDisplayQueryAddress/style/dialog.scss +0 -0
- package/es/bussiness/hyFilePlayback/cpns/audioDetail.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/cpns/audioDetail2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/cpns/audioDetail2.vue.mjs +247 -0
- package/es/bussiness/hyFilePlayback/cpns/picDetail.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/cpns/picDetail2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/cpns/picDetail2.vue.mjs +206 -0
- package/es/bussiness/hyFilePlayback/cpns/videoDetail.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/cpns/videoDetail2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/cpns/videoDetail2.vue.mjs +238 -0
- package/es/bussiness/hyFilePlayback/filePlayback.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/filePlayback2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/filePlayback2.vue.mjs +166 -0
- package/es/bussiness/hyFilePlayback/index.mjs +8 -0
- package/es/bussiness/hyFilePlayback/locale/en_US.mjs +22 -0
- package/es/bussiness/hyFilePlayback/locale/index.mjs +2 -0
- package/es/bussiness/hyFilePlayback/locale/zh_CN.mjs +22 -0
- package/es/bussiness/hyFilePlayback/style/filePlayback.scss +2 -0
- package/es/bussiness/index.mjs +2 -0
- package/es/components/hyCutter/cutter.vue.mjs +2 -2
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +2 -2
- package/es/components/hyForm/cpns/formItem.vue.mjs +3 -2
- package/es/components/hyForm/js/index.mjs +2 -8
- package/es/components/hySearch/cpns/searchItem.vue.mjs +57 -67
- package/es/components/hySearch/js/index.mjs +1 -35
- package/es/components/hySearch/js/useAppSearch.mjs +3 -3
- package/es/components/hySearch/style/search.scss +1 -0
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +5 -5
- package/es/components/hyTable/js/index.mjs +44 -4
- package/es/components/hyTable/js/search.mjs +0 -6
- package/es/components/hyTable/table.vue.mjs +47 -30
- package/es/components/hyTooltip/tooltip.vue.mjs +14 -6
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +1 -1
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +3 -3
- package/es/components-map.mjs +2 -0
- package/es/hooks/useBaseMainStore.mjs +16 -5
- package/es/hooks/useCurrentBus.mjs +5 -4
- package/es/hooks/useDialog.mjs +2 -2
- package/es/hooks/useGlobalConfig.mjs +19 -18
- package/es/index.mjs +5 -2
- package/es/locale/en_US.mjs +1 -0
- package/es/locale/zh_CN.mjs +1 -0
- package/es/style/index.scss +2 -2
- package/es/utils/file.mjs +1 -2
- package/es/utils/form.mjs +59 -5
- package/es/utils/index.mjs +3 -2
- package/es/utils/map/hook/leafletjs.mjs +4 -0
- package/es/utils/map/index.mjs +4 -0
- package/es/utils/timeUtils.mjs +95 -0
- package/es/version.mjs +1 -1
- package/lib/api/common.js +33 -0
- package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation2.vue.js +3 -6
- package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong2.vue.js +107 -124
- package/lib/bussiness/hyDepartmentTypeOperation/locale/en_US.js +7 -7
- package/lib/bussiness/hyDepartmentTypeOperation/locale/zh_CN.js +6 -6
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress.install.js +6 -0
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress.vue.js +9 -0
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress2.install.js +6 -0
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress2.vue.js +186 -0
- package/lib/bussiness/hyDisplayQueryAddress/index.js +13 -0
- package/lib/bussiness/hyDisplayQueryAddress/locale/en_US.js +11 -0
- package/lib/bussiness/hyDisplayQueryAddress/locale/index.js +9 -0
- package/lib/bussiness/hyDisplayQueryAddress/locale/zh_CN.js +11 -0
- package/lib/bussiness/hyDisplayQueryAddress/style/dialog.scss +0 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail2.vue.js +251 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail2.vue.js +210 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail2.vue.js +242 -0
- package/lib/bussiness/hyFilePlayback/filePlayback.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/filePlayback.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/filePlayback2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/filePlayback2.vue.js +170 -0
- package/lib/bussiness/hyFilePlayback/index.js +13 -0
- package/lib/bussiness/hyFilePlayback/locale/en_US.js +26 -0
- package/lib/bussiness/hyFilePlayback/locale/index.js +9 -0
- package/lib/bussiness/hyFilePlayback/locale/zh_CN.js +26 -0
- package/lib/bussiness/hyFilePlayback/style/filePlayback.scss +2 -0
- package/lib/bussiness/index.js +18 -14
- package/lib/components/hyCutter/cutter.vue.js +2 -2
- package/lib/components/hyForm/cpns/arrayItem.vue.js +2 -2
- package/lib/components/hyForm/cpns/formItem.vue.js +3 -2
- package/lib/components/hyForm/js/index.js +0 -7
- package/lib/components/hySearch/cpns/searchItem.vue.js +64 -74
- package/lib/components/hySearch/js/index.js +0 -36
- package/lib/components/hySearch/js/useAppSearch.js +3 -3
- package/lib/components/hySearch/style/search.scss +1 -0
- package/lib/components/hyTable/cpns/virtualTable.vue.js +4 -4
- package/lib/components/hyTable/js/index.js +45 -3
- package/lib/components/hyTable/js/search.js +0 -6
- package/lib/components/hyTable/table.vue.js +46 -29
- package/lib/components/hyTooltip/tooltip.vue.js +13 -5
- package/lib/components/hyUserAvatar/userAvatar.vue.js +1 -1
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +3 -3
- package/lib/components-map.js +2 -0
- package/lib/hooks/useBaseMainStore.js +15 -4
- package/lib/hooks/useCurrentBus.js +4 -3
- package/lib/hooks/useDialog.js +2 -2
- package/lib/hooks/useGlobalConfig.js +18 -17
- package/lib/index.js +70 -55
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/zh_CN.js +1 -0
- package/lib/style/index.scss +2 -2
- package/lib/utils/file.js +1 -2
- package/lib/utils/form.js +61 -4
- package/lib/utils/index.js +12 -1
- package/lib/utils/map/hook/leafletjs.js +4 -0
- package/lib/utils/map/index.js +4 -0
- package/lib/utils/timeUtils.js +105 -0
- package/lib/version.js +1 -1
- package/package.json +14 -1
package/lib/locale/zh_CN.js
CHANGED
package/lib/style/index.scss
CHANGED
|
@@ -74,8 +74,8 @@ video {
|
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
text-overflow: ellipsis;
|
|
76
76
|
display: -webkit-box;
|
|
77
|
-
-webkit-line-clamp:
|
|
78
|
-
line-clamp:
|
|
77
|
+
-webkit-line-clamp: var(--line-clamp);
|
|
78
|
+
line-clamp: var(--line-clamp);
|
|
79
79
|
-webkit-box-orient: vertical;
|
|
80
80
|
word-break: break-all;
|
|
81
81
|
}
|
package/lib/utils/file.js
CHANGED
|
@@ -40,11 +40,10 @@ async function fileFormUpload(file) {
|
|
|
40
40
|
try {
|
|
41
41
|
const formData = new FormData();
|
|
42
42
|
formData.append("file", file);
|
|
43
|
-
|
|
43
|
+
return await vue.unref(api).post("/file/upload", formData, {
|
|
44
44
|
otherUrl: true,
|
|
45
45
|
xAmzAcl: false
|
|
46
46
|
});
|
|
47
|
-
return res;
|
|
48
47
|
} catch (err) {
|
|
49
48
|
return Promise.reject(err);
|
|
50
49
|
}
|
package/lib/utils/form.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var dayjs = require('dayjs');
|
|
3
4
|
var vue = require('vue');
|
|
4
5
|
require('../hooks/index.js');
|
|
5
6
|
var is = require('./is.js');
|
|
@@ -130,14 +131,22 @@ const columnLabelHandler = (column, model) => {
|
|
|
130
131
|
}
|
|
131
132
|
return label;
|
|
132
133
|
};
|
|
134
|
+
const columnnoDataTextHandler = (column, model) => {
|
|
135
|
+
const { type, attrs = {} } = column || {};
|
|
136
|
+
const label = vue.unref(attrs.noDataText);
|
|
137
|
+
if (is.isEmpty(label)) return "";
|
|
138
|
+
if (is.isFunction(label)) {
|
|
139
|
+
return label(column, model);
|
|
140
|
+
}
|
|
141
|
+
return label;
|
|
142
|
+
};
|
|
133
143
|
function columnPlaceholderHandler(column, model) {
|
|
134
144
|
const { type, attrs = {} } = column || {};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return
|
|
145
|
+
let placeholder = vue.unref(attrs.placeholder);
|
|
146
|
+
if (is.isFunction(placeholder)) {
|
|
147
|
+
return placeholder(column, model);
|
|
138
148
|
}
|
|
139
149
|
const label = columnLabelHandler(column, model);
|
|
140
|
-
let placeholder = attrs.placeholder;
|
|
141
150
|
switch (type) {
|
|
142
151
|
case "input":
|
|
143
152
|
case "input-number":
|
|
@@ -156,12 +165,60 @@ function columnPlaceholderHandler(column, model) {
|
|
|
156
165
|
}
|
|
157
166
|
return placeholder;
|
|
158
167
|
}
|
|
168
|
+
function columnHelpHandler(props, column) {
|
|
169
|
+
const help = vue.unref(column.help);
|
|
170
|
+
if (is.isString(help)) return help;
|
|
171
|
+
if (is.isFunction(help)) return help(column, props.model);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
function genColumnShortcuts(column) {
|
|
175
|
+
if (!["datetimerange", "daterange", "monthrange", "yearrange"].includes(column.attrs?.type) || !is.isArray(column.field) || !column.timeRangeOptions?.length) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const timeRangeFill = !!(column.attrs && column.attrs.timeRangeFill);
|
|
179
|
+
return column.timeRangeOptions.map((item) => {
|
|
180
|
+
return {
|
|
181
|
+
text: item.label,
|
|
182
|
+
options: {
|
|
183
|
+
...item,
|
|
184
|
+
type: column.attrs.type,
|
|
185
|
+
timeRangeFill
|
|
186
|
+
},
|
|
187
|
+
value: genShortcutItem
|
|
188
|
+
};
|
|
189
|
+
});
|
|
190
|
+
function genShortcutItem() {
|
|
191
|
+
const format = "YYYY-MM-DD";
|
|
192
|
+
const date = dayjs(Date.now());
|
|
193
|
+
const { value, unit, type } = this.options;
|
|
194
|
+
const timeRangeFill2 = this.options.timeRangeFill || type === "datetimerange";
|
|
195
|
+
if (unit === "day" && value === 1) {
|
|
196
|
+
return [
|
|
197
|
+
date.format(`${format}${timeRangeFill2 ? " 00:00:00" : ""}`),
|
|
198
|
+
date.format(`${format}${timeRangeFill2 ? " 23:59:59" : ""}`)
|
|
199
|
+
];
|
|
200
|
+
} else if (unit === "day") {
|
|
201
|
+
return [
|
|
202
|
+
date.subtract(value - 1, unit).format(`${format}${timeRangeFill2 ? " 00:00:00" : ""}`),
|
|
203
|
+
date.format(`${format}${timeRangeFill2 ? " 23:59:59" : ""}`)
|
|
204
|
+
];
|
|
205
|
+
} else {
|
|
206
|
+
return [
|
|
207
|
+
date.subtract(value, unit).format(`${format}${timeRangeFill2 ? " 00:00:00" : ""}`),
|
|
208
|
+
date.format(`${format}${timeRangeFill2 ? " 23:59:59" : ""}`)
|
|
209
|
+
];
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
159
213
|
|
|
160
214
|
exports.clearSpace = clearSpace;
|
|
215
|
+
exports.columnHelpHandler = columnHelpHandler;
|
|
161
216
|
exports.columnLabelHandler = columnLabelHandler;
|
|
162
217
|
exports.columnPlaceholderHandler = columnPlaceholderHandler;
|
|
163
218
|
exports.columnRuleHandler = columnRuleHandler;
|
|
219
|
+
exports.columnnoDataTextHandler = columnnoDataTextHandler;
|
|
164
220
|
exports.genColumnDefaultLabel = genColumnDefaultLabel;
|
|
221
|
+
exports.genColumnShortcuts = genColumnShortcuts;
|
|
165
222
|
exports.genRuleRequiredMsgHandler = genRuleRequiredMsgHandler;
|
|
166
223
|
exports.genValueByProp = genValueByProp;
|
|
167
224
|
exports.getValueByProp = getValueByProp;
|
package/lib/utils/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var permission = require('./permission.js');
|
|
|
12
12
|
var index = require('./map/index.js');
|
|
13
13
|
require('./tree.js');
|
|
14
14
|
var sharedContent = require('./sharedContent.js');
|
|
15
|
+
var timeUtils = require('./timeUtils.js');
|
|
15
16
|
var hyVirtualTree = require('hy-virtual-tree');
|
|
16
17
|
|
|
17
18
|
|
|
@@ -53,10 +54,13 @@ exports.fileUpload = file.fileUpload;
|
|
|
53
54
|
exports.presignedUrl = file.presignedUrl;
|
|
54
55
|
exports.sizeToTextHandler = file.sizeToTextHandler;
|
|
55
56
|
exports.clearSpace = form.clearSpace;
|
|
57
|
+
exports.columnHelpHandler = form.columnHelpHandler;
|
|
56
58
|
exports.columnLabelHandler = form.columnLabelHandler;
|
|
57
59
|
exports.columnPlaceholderHandler = form.columnPlaceholderHandler;
|
|
58
60
|
exports.columnRuleHandler = form.columnRuleHandler;
|
|
61
|
+
exports.columnnoDataTextHandler = form.columnnoDataTextHandler;
|
|
59
62
|
exports.genColumnDefaultLabel = form.genColumnDefaultLabel;
|
|
63
|
+
exports.genColumnShortcuts = form.genColumnShortcuts;
|
|
60
64
|
exports.genRuleRequiredMsgHandler = form.genRuleRequiredMsgHandler;
|
|
61
65
|
exports.genValueByProp = form.genValueByProp;
|
|
62
66
|
exports.getValueByProp = form.getValueByProp;
|
|
@@ -64,7 +68,6 @@ exports.setValueByProp = form.setValueByProp;
|
|
|
64
68
|
exports.enterNumbersRrLetters = input.enterNumbersRrLetters;
|
|
65
69
|
exports.enterTheMumber = input.enterTheMumber;
|
|
66
70
|
exports.filterSpaces = input.filterSpaces;
|
|
67
|
-
exports.formatNumber = input.formatNumber;
|
|
68
71
|
exports.formatTimeFn = input.formatTimeFn;
|
|
69
72
|
exports.getPublicFileSize = input.getPublicFileSize;
|
|
70
73
|
exports.inputForbidden = input.inputForbidden;
|
|
@@ -75,6 +78,14 @@ exports.InitMap = index.InitMap;
|
|
|
75
78
|
exports.setMapServer = index.setMapServer;
|
|
76
79
|
exports.setPoiServer = index.setPoiServer;
|
|
77
80
|
exports.loadingSvg = sharedContent.loadingSvg;
|
|
81
|
+
exports.formatDay = timeUtils.formatDay;
|
|
82
|
+
exports.formatHoursToHM = timeUtils.formatHoursToHM;
|
|
83
|
+
exports.formatSeconds = timeUtils.formatSeconds;
|
|
84
|
+
exports.formatTime = timeUtils.formatTime;
|
|
85
|
+
exports.getBeforeDays = timeUtils.getBeforeDays;
|
|
86
|
+
exports.getCurDtm = timeUtils.getCurDtm;
|
|
87
|
+
exports.getNextDays = timeUtils.getNextDays;
|
|
88
|
+
exports.getToday = timeUtils.getToday;
|
|
78
89
|
Object.defineProperty(exports, "setGlobalTreeConfig", {
|
|
79
90
|
enumerable: true,
|
|
80
91
|
get: function () { return hyVirtualTree.setGlobalTreeConfig; }
|
package/lib/utils/map/index.js
CHANGED
|
@@ -329,6 +329,10 @@ class InitMap extends events.EventEmitter {
|
|
|
329
329
|
layerGroup(map, markers = []) {
|
|
330
330
|
return this.map.layerGroup(map, markers);
|
|
331
331
|
}
|
|
332
|
+
// 获取esri对象(仅leftlet地图类型)
|
|
333
|
+
esriFn() {
|
|
334
|
+
return this.map.esriFn ? this.map.esriFn() : null;
|
|
335
|
+
}
|
|
332
336
|
}
|
|
333
337
|
|
|
334
338
|
exports.InitMap = InitMap;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function formatNumber(n) {
|
|
4
|
+
n = n.toString();
|
|
5
|
+
return n[1] ? n : "0" + n;
|
|
6
|
+
}
|
|
7
|
+
function getToday(cutOff = "-") {
|
|
8
|
+
const dateObj = /* @__PURE__ */ new Date();
|
|
9
|
+
return formatDay(dateObj).join(cutOff);
|
|
10
|
+
}
|
|
11
|
+
function getNextDays({ today, daysCount, cutOff = "-" }) {
|
|
12
|
+
if (!today) {
|
|
13
|
+
today = getToday("/");
|
|
14
|
+
}
|
|
15
|
+
const dateObj = new Date(today);
|
|
16
|
+
const arr = [formatDay(dateObj).join(cutOff)];
|
|
17
|
+
for (let i = 0; i < daysCount; i++) {
|
|
18
|
+
const days = dateObj.setDate(dateObj.getDate() + 1);
|
|
19
|
+
arr.push(formatDay(new Date(days)).join(cutOff));
|
|
20
|
+
}
|
|
21
|
+
return arr;
|
|
22
|
+
}
|
|
23
|
+
function getBeforeDays({ today, daysCount, cutOff = "-" }) {
|
|
24
|
+
if (!today) {
|
|
25
|
+
today = getToday("/");
|
|
26
|
+
}
|
|
27
|
+
const dateObj = new Date(today);
|
|
28
|
+
const arr = [formatDay(dateObj).join(cutOff)];
|
|
29
|
+
for (let i = 0; i < daysCount; i++) {
|
|
30
|
+
const days = dateObj.setDate(dateObj.getDate() - 1);
|
|
31
|
+
arr.push(formatDay(new Date(days)).join(cutOff));
|
|
32
|
+
}
|
|
33
|
+
return arr;
|
|
34
|
+
}
|
|
35
|
+
function formatDay(dateObj) {
|
|
36
|
+
const year = dateObj.getFullYear();
|
|
37
|
+
const month = formatNumber(dateObj.getMonth() + 1);
|
|
38
|
+
const date = formatNumber(dateObj.getDate());
|
|
39
|
+
return [year, month, date];
|
|
40
|
+
}
|
|
41
|
+
function formatTime(dateObj) {
|
|
42
|
+
const h = dateObj.getHours();
|
|
43
|
+
let m = dateObj.getMinutes();
|
|
44
|
+
let s = dateObj.getSeconds();
|
|
45
|
+
if (m < 10) {
|
|
46
|
+
m = "0" + m;
|
|
47
|
+
}
|
|
48
|
+
if (s < 10) {
|
|
49
|
+
s = "0" + s;
|
|
50
|
+
}
|
|
51
|
+
return [h, m, s];
|
|
52
|
+
}
|
|
53
|
+
function getCurDtm(cutOff = "-") {
|
|
54
|
+
return getToday(cutOff) + " " + formatTime(/* @__PURE__ */ new Date()).join(":");
|
|
55
|
+
}
|
|
56
|
+
function formatSeconds(value) {
|
|
57
|
+
let theTime = parseInt(value);
|
|
58
|
+
let middle = 0;
|
|
59
|
+
let hour = 0;
|
|
60
|
+
if (theTime > 60) {
|
|
61
|
+
middle = parseInt(theTime / 60);
|
|
62
|
+
theTime = parseInt(theTime % 60);
|
|
63
|
+
if (middle > 60) {
|
|
64
|
+
hour = parseInt(middle / 60);
|
|
65
|
+
middle = parseInt(middle % 60);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
let result = "" + parseInt(theTime);
|
|
69
|
+
if (theTime < 10) {
|
|
70
|
+
result = `00:0${parseInt(theTime)}`;
|
|
71
|
+
} else {
|
|
72
|
+
result = `00:${parseInt(theTime)}`;
|
|
73
|
+
}
|
|
74
|
+
if (middle > 0) {
|
|
75
|
+
result = `${parseInt(theTime)}`;
|
|
76
|
+
if (middle < 10) {
|
|
77
|
+
result = "0" + parseInt(middle) + ":" + result;
|
|
78
|
+
} else {
|
|
79
|
+
result = "" + parseInt(middle) + ":" + result;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (hour > 0) {
|
|
83
|
+
result = "" + parseInt(hour) + ":" + result;
|
|
84
|
+
}
|
|
85
|
+
return result;
|
|
86
|
+
}
|
|
87
|
+
function formatHoursToHM(hours) {
|
|
88
|
+
hours = parseFloat(hours);
|
|
89
|
+
if (hours == null || isNaN(hours)) {
|
|
90
|
+
return { hour: 0, minute: 0 };
|
|
91
|
+
}
|
|
92
|
+
const hour = Math.floor(hours);
|
|
93
|
+
const minute = Math.floor((hours - hour) * 60);
|
|
94
|
+
return { hour, minute };
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
exports.formatDay = formatDay;
|
|
98
|
+
exports.formatHoursToHM = formatHoursToHM;
|
|
99
|
+
exports.formatNumber = formatNumber;
|
|
100
|
+
exports.formatSeconds = formatSeconds;
|
|
101
|
+
exports.formatTime = formatTime;
|
|
102
|
+
exports.getBeforeDays = getBeforeDays;
|
|
103
|
+
exports.getCurDtm = getCurDtm;
|
|
104
|
+
exports.getNextDays = getNextDays;
|
|
105
|
+
exports.getToday = getToday;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hy-dispatch-ui-v3",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.78",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"scripts": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"leaflet.markercluster": "^1.5.3",
|
|
39
39
|
"leaflet.motion": "^0.3.2",
|
|
40
40
|
"leaflet.pm": "^2.2.0",
|
|
41
|
+
"lodash-es": "^4.18.1",
|
|
41
42
|
"lodash-unified": "^1.0.3",
|
|
42
43
|
"mitt": "^3.0.1",
|
|
43
44
|
"mysql": "^2.18.1",
|
|
@@ -168,6 +169,12 @@
|
|
|
168
169
|
"./lib/bussiness/hyDeviceTree/deviceTree": {
|
|
169
170
|
"require": "./lib/bussiness/hyDeviceTree/deviceTree.install.js"
|
|
170
171
|
},
|
|
172
|
+
"./es/bussiness/hyDisplayQueryAddress/displayQueryAddress": {
|
|
173
|
+
"import": "./es/bussiness/hyDisplayQueryAddress/displayQueryAddress2.install.mjs"
|
|
174
|
+
},
|
|
175
|
+
"./lib/bussiness/hyDisplayQueryAddress/displayQueryAddress": {
|
|
176
|
+
"require": "./lib/bussiness/hyDisplayQueryAddress/displayQueryAddress2.install.js"
|
|
177
|
+
},
|
|
171
178
|
"./es/bussiness/hyElectronicFence/electronicFence": {
|
|
172
179
|
"import": "./es/bussiness/hyElectronicFence/electronicFence.install.mjs"
|
|
173
180
|
},
|
|
@@ -192,6 +199,12 @@
|
|
|
192
199
|
"./lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog": {
|
|
193
200
|
"require": "./lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.install.js"
|
|
194
201
|
},
|
|
202
|
+
"./es/bussiness/hyFilePlayback/filePlayback": {
|
|
203
|
+
"import": "./es/bussiness/hyFilePlayback/filePlayback2.install.mjs"
|
|
204
|
+
},
|
|
205
|
+
"./lib/bussiness/hyFilePlayback/filePlayback": {
|
|
206
|
+
"require": "./lib/bussiness/hyFilePlayback/filePlayback2.install.js"
|
|
207
|
+
},
|
|
195
208
|
"./es/bussiness/hyMapAearchPlace/mapAearchPlace": {
|
|
196
209
|
"import": "./es/bussiness/hyMapAearchPlace/mapAearchPlace.install.mjs"
|
|
197
210
|
},
|