hy-dispatch-ui-v3 0.2.53 → 0.2.55
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 +53 -0
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +39 -10
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +12 -22
- package/es/components/hyDialog/dialog.vue.mjs +9 -7
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +5 -5
- package/es/components/hyForm/cpns/extraItem.vue.mjs +6 -1
- package/es/components/hyForm/cpns/formItem.vue.mjs +29 -14
- package/es/components/hyForm/js/index.mjs +29 -25
- package/es/components/hyForm/js/useAppForm.mjs +15 -30
- package/es/components/hyIconBox/iconBox.vue.mjs +1 -1
- package/es/components/hyIconBox/style/iconBox.scss +1 -1
- package/es/components/hyMap/index.mjs +6 -0
- package/es/components/hyMap/js/index.mjs +59 -0
- package/es/components/hyMap/map.vue.mjs +59 -0
- package/es/components/hyOrgCascader/js/index.mjs +53 -0
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +22 -25
- package/es/components/hySearch/search.vue.mjs +6 -8
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +10 -18
- package/es/components/hyTable/table.vue.mjs +8 -11
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +6 -3
- package/es/components/hyTableForm/batchTableForm.vue.mjs +182 -135
- package/es/components/hyTableForm/js/index.mjs +2 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +29 -20
- package/es/components/hyTooltip/tooltip.vue.mjs +1 -1
- package/es/components/hyTree/js/index.mjs +5 -4
- package/es/components/hyTree/tree.vue.mjs +5 -0
- package/es/components/index.mjs +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useApi.mjs +11 -5
- package/es/hooks/useAudioPlayerConfig.mjs +13 -5
- package/es/hooks/useEnsureHyIcon.mjs +11 -5
- package/es/hooks/useLocale.mjs +6 -5
- package/es/hooks/usePermissionMap.mjs +13 -5
- package/es/hooks/useSubscribe.mjs +28 -0
- package/es/hooks/useTooltipConfig.mjs +11 -5
- package/es/hooks/useUserAvatarMap.mjs +13 -5
- package/es/hooks/useVideoPlayerConfig.mjs +13 -5
- package/es/index.mjs +3 -2
- package/es/static/map/CFCASIPInput.min.js +258 -0
- package/es/static/map/MarkerCluster.css +75 -0
- package/es/static/map/bigemap.css +838 -0
- package/es/static/map/bigemap.js +5 -0
- package/es/static/map/bm.geometryutil.js +754 -0
- package/es/static/map/bmDraw.css +329 -0
- package/es/static/map/bmDraw.js +181 -0
- package/es/static/map/car.png +0 -0
- package/es/static/map/markercluster.js +2679 -0
- package/es/static/map/moveMarker.js +74 -0
- package/es/utils/form.mjs +38 -2
- package/es/utils/index.mjs +1 -2
- package/es/utils/map/hook/bigMap.mjs +1136 -0
- package/es/utils/map/hook/gaode.mjs +683 -0
- package/es/utils/map/hook/leafletjs.mjs +1336 -0
- package/es/utils/map/index.mjs +291 -0
- package/es/utils/map/js/mapProxy.mjs +38 -0
- package/es/utils/map/js/webgis.mjs +153 -0
- package/es/version.mjs +1 -1
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +40 -11
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +13 -23
- package/lib/components/hyDialog/dialog.vue.js +9 -7
- package/lib/components/hyForm/cpns/arrayItem.vue.js +4 -4
- package/lib/components/hyForm/cpns/extraItem.vue.js +6 -1
- package/lib/components/hyForm/cpns/formItem.vue.js +26 -11
- package/lib/components/hyForm/js/index.js +29 -23
- package/lib/components/hyForm/js/useAppForm.js +14 -29
- package/lib/components/hyIconBox/iconBox.vue.js +1 -1
- package/lib/components/hyIconBox/style/iconBox.scss +1 -1
- package/lib/components/hyMap/index.js +11 -0
- package/lib/components/hyMap/js/index.js +61 -0
- package/lib/components/hyMap/map.vue.js +63 -0
- package/lib/components/hyOrgCascader/js/index.js +56 -0
- package/lib/components/hyOrgCascader/orgCascader.vue.js +21 -24
- package/lib/components/hySearch/search.vue.js +4 -6
- package/lib/components/hyTable/cpns/columnSelect.vue.js +12 -20
- package/lib/components/hyTable/table.vue.js +17 -20
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +5 -2
- package/lib/components/hyTableForm/batchTableForm.vue.js +181 -134
- package/lib/components/hyTableForm/js/index.js +1 -1
- package/lib/components/hyTableForm/tableForm.vue.js +29 -20
- package/lib/components/hyTooltip/tooltip.vue.js +1 -1
- package/lib/components/hyTree/js/index.js +5 -4
- package/lib/components/hyTree/tree.vue.js +5 -0
- package/lib/components/index.js +22 -20
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/useApi.js +10 -4
- package/lib/hooks/useAudioPlayerConfig.js +12 -4
- package/lib/hooks/useEnsureHyIcon.js +10 -4
- package/lib/hooks/useLocale.js +5 -4
- package/lib/hooks/usePermissionMap.js +12 -4
- package/lib/hooks/useSubscribe.js +31 -0
- package/lib/hooks/useTooltipConfig.js +10 -4
- package/lib/hooks/useUserAvatarMap.js +12 -4
- package/lib/hooks/useVideoPlayerConfig.js +12 -4
- package/lib/index.js +27 -22
- package/lib/static/map/CFCASIPInput.min.js +258 -0
- package/lib/static/map/MarkerCluster.css +75 -0
- package/lib/static/map/bigemap.css +838 -0
- package/lib/static/map/bigemap.js +5 -0
- package/lib/static/map/bm.geometryutil.js +754 -0
- package/lib/static/map/bmDraw.css +329 -0
- package/lib/static/map/bmDraw.js +181 -0
- package/lib/static/map/car.png +0 -0
- package/lib/static/map/markercluster.js +2679 -0
- package/lib/static/map/moveMarker.js +74 -0
- package/lib/utils/form.js +38 -0
- package/lib/utils/index.js +2 -2
- package/lib/utils/map/hook/bigMap.js +1140 -0
- package/lib/utils/map/hook/gaode.js +687 -0
- package/lib/utils/map/hook/leafletjs.js +1360 -0
- package/lib/utils/map/index.js +298 -0
- package/lib/utils/map/js/mapProxy.js +44 -0
- package/lib/utils/map/js/webgis.js +162 -0
- package/lib/version.js +1 -1
- package/package.json +16 -1
- package/es/utils/bus.mjs +0 -5
- package/lib/utils/bus.js +0 -7
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
BM.Marker.addInitHook(function () {
|
|
2
|
+
this.moveOptions = {
|
|
3
|
+
origin: null,
|
|
4
|
+
timer: null,
|
|
5
|
+
done: 0,
|
|
6
|
+
path: null,
|
|
7
|
+
length: 0,
|
|
8
|
+
replay: true
|
|
9
|
+
};
|
|
10
|
+
this.setSpeed = function (speed) {
|
|
11
|
+
this.moveOptions.speed = isNaN(parseFloat(speed)) || parseFloat(speed) <= 0 ? 200 : parseFloat(speed);
|
|
12
|
+
};
|
|
13
|
+
this.getSpeed = function () {
|
|
14
|
+
return this.moveOptions.speed;
|
|
15
|
+
};
|
|
16
|
+
this.moveAlong = function (path, speed, param) {
|
|
17
|
+
path = path instanceof BM.Polyline ? path : new BM.Polyline(path);
|
|
18
|
+
this.moveOptions.path = path;
|
|
19
|
+
this.moveOptions.replay = typeof param.replay === 'boolean'? param.replay : true;
|
|
20
|
+
this.moveOptions.length = BM.GeometryUtil.length(path);
|
|
21
|
+
this.moveOptions.speed = isNaN(parseFloat(speed)) || parseFloat(speed <= 0) ? 200 : parseFloat(speed);
|
|
22
|
+
this._move();
|
|
23
|
+
setTimeout(()=>{
|
|
24
|
+
console.log(this);
|
|
25
|
+
},5000)
|
|
26
|
+
};
|
|
27
|
+
this.pauseMove = function () {
|
|
28
|
+
clearInterval(this.moveOptions.timer);
|
|
29
|
+
this.moveOptions.timer = null;
|
|
30
|
+
};
|
|
31
|
+
this.resumeMove = function () {
|
|
32
|
+
if(!this.moveOptions.path){
|
|
33
|
+
throw('鏈鍏ヨ矾寰�');
|
|
34
|
+
}
|
|
35
|
+
this._move();
|
|
36
|
+
};
|
|
37
|
+
this.stopMove = function () {
|
|
38
|
+
this.pauseMove();
|
|
39
|
+
this.moveOptions.done = 0;
|
|
40
|
+
};
|
|
41
|
+
this._move = function () {
|
|
42
|
+
if (this.moveOptions.timer) return;
|
|
43
|
+
let _t = this;
|
|
44
|
+
this.moveOptions.timer = setInterval(function () {
|
|
45
|
+
let done = _t.moveOptions.done;
|
|
46
|
+
done += _t.moveOptions.speed / 1000 * 20;
|
|
47
|
+
let radio = done / _t.moveOptions.length;
|
|
48
|
+
if (_t.moveOptions.replay) {
|
|
49
|
+
radio >= 1 ? (radio = 0, done = 0) : true;
|
|
50
|
+
} else {
|
|
51
|
+
if (radio >= 1) {
|
|
52
|
+
let p = BM.GeometryUtil.interpolateOnLine(_t._map, _t.moveOptions.path, true);
|
|
53
|
+
p.predecessor+=1;
|
|
54
|
+
let passed = _t.moveOptions.path.getLatLngs().slice(0, p.predecessor+1);
|
|
55
|
+
_t.fire('update_position', { path: passed, index: p.predecessor });
|
|
56
|
+
_t.stopMove();
|
|
57
|
+
return
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
_t.moveOptions.done = done;
|
|
61
|
+
let p = BM.GeometryUtil.interpolateOnLine(_t._map, _t.moveOptions.path, radio);
|
|
62
|
+
_t.setLatLng(p.latLng);
|
|
63
|
+
let pre_p = _t.moveOptions.path.getLatLngs()[p.predecessor];
|
|
64
|
+
if (pre_p) {
|
|
65
|
+
let passed = _t.moveOptions.path.getLatLngs().slice(0, p.predecessor + 1);
|
|
66
|
+
passed.push(p.latLng);
|
|
67
|
+
_t.fire('update_position', { path: passed, index: p.predecessor });
|
|
68
|
+
let deg = BM.GeometryUtil.computeAngle(_t._map.project(pre_p), _t._map.project(p.latLng))
|
|
69
|
+
_t._icon.style.transformOrigin = '50% 50%';
|
|
70
|
+
_t._icon.style.transform += ' rotateZ(' + deg + 'deg)';
|
|
71
|
+
}
|
|
72
|
+
}, 20);
|
|
73
|
+
}
|
|
74
|
+
});
|
package/lib/utils/form.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var vue = require('vue');
|
|
3
4
|
var is = require('./is.js');
|
|
5
|
+
var useLocale = require('../hooks/useLocale.js');
|
|
4
6
|
|
|
5
7
|
function getValueByProp(model, prop) {
|
|
6
8
|
if (is.isString(prop)) {
|
|
@@ -50,8 +52,44 @@ function clearSpace(value, type = "between") {
|
|
|
50
52
|
}
|
|
51
53
|
return value;
|
|
52
54
|
}
|
|
55
|
+
const genRuleRequiredMsgHandler = (config) => {
|
|
56
|
+
const { t } = useLocale.useLocale();
|
|
57
|
+
const { type, prop, label } = config || {};
|
|
58
|
+
if (!prop || !prop?.length) return "";
|
|
59
|
+
switch (type) {
|
|
60
|
+
case "input":
|
|
61
|
+
case "input-number":
|
|
62
|
+
return t("hy.pleaseEnterPlaceholder", [label]);
|
|
63
|
+
case "select":
|
|
64
|
+
case "radio":
|
|
65
|
+
case "checkbox":
|
|
66
|
+
case "date-picker":
|
|
67
|
+
return t("hy.pleaseSelectPlaceholder", [label]);
|
|
68
|
+
default:
|
|
69
|
+
return t("hy.cannotBeEmpty", [label]);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const requiredHandler = (column, model) => {
|
|
73
|
+
const required = vue.unref(column.required);
|
|
74
|
+
if (is.isBoolean(required)) return required;
|
|
75
|
+
if (is.isFunction(required)) return required(column, model);
|
|
76
|
+
return false;
|
|
77
|
+
};
|
|
78
|
+
const columnRuleHandler = (column, model) => {
|
|
79
|
+
let { rules } = column;
|
|
80
|
+
rules = is.isArray(rules) ? [...rules] : is.isObject(rules) ? [rules] : [];
|
|
81
|
+
if (column.required) {
|
|
82
|
+
rules.unshift({
|
|
83
|
+
required: requiredHandler(column, model),
|
|
84
|
+
message: genRuleRequiredMsgHandler(column)
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return rules;
|
|
88
|
+
};
|
|
53
89
|
|
|
54
90
|
exports.clearSpace = clearSpace;
|
|
91
|
+
exports.columnRuleHandler = columnRuleHandler;
|
|
92
|
+
exports.genRuleRequiredMsgHandler = genRuleRequiredMsgHandler;
|
|
55
93
|
exports.genValueByProp = genValueByProp;
|
|
56
94
|
exports.getValueByProp = getValueByProp;
|
|
57
95
|
exports.setValueByProp = setValueByProp;
|
package/lib/utils/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var adaptive = require('./adaptive.js');
|
|
4
|
-
var bus = require('./bus.js');
|
|
5
4
|
var crypto = require('./crypto.js');
|
|
6
5
|
var is = require('./is.js');
|
|
7
6
|
var handler = require('./handler.js');
|
|
@@ -16,7 +15,6 @@ exports.parseRem = adaptive.parseRem;
|
|
|
16
15
|
exports.pxTorem = adaptive.pxTorem;
|
|
17
16
|
exports.remToPx = adaptive.remToPx;
|
|
18
17
|
exports.vwToPx = adaptive.vwToPx;
|
|
19
|
-
exports.bus = bus.bus;
|
|
20
18
|
exports.base64Decrypt = crypto.base64Decrypt;
|
|
21
19
|
exports.encryptToBase64 = crypto.encryptToBase64;
|
|
22
20
|
exports.generateRandomCode = crypto.generateRandomCode;
|
|
@@ -50,6 +48,8 @@ exports.fileUpload = file.fileUpload;
|
|
|
50
48
|
exports.presignedUrl = file.presignedUrl;
|
|
51
49
|
exports.sizeToTextHandler = file.sizeToTextHandler;
|
|
52
50
|
exports.clearSpace = form.clearSpace;
|
|
51
|
+
exports.columnRuleHandler = form.columnRuleHandler;
|
|
52
|
+
exports.genRuleRequiredMsgHandler = form.genRuleRequiredMsgHandler;
|
|
53
53
|
exports.genValueByProp = form.genValueByProp;
|
|
54
54
|
exports.getValueByProp = form.getValueByProp;
|
|
55
55
|
exports.setValueByProp = form.setValueByProp;
|