hy-dispatch-ui-v3 0.2.70 → 0.2.71
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/es/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.mjs +6 -4
- package/es/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.mjs +10 -6
- package/es/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.mjs +26 -1
- package/es/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.mjs +25 -1
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +1 -1
- package/es/components/hyTable/js/useAppTable.mjs +2 -2
- package/es/components/hyTableForm/batchTableForm.vue.mjs +3 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +4 -4
- package/es/components/hyTree/js/index.mjs +5 -1
- package/es/hooks/useBaseMainStore.mjs +1 -1
- package/es/hooks/useDialog.mjs +5 -3
- package/es/version.mjs +1 -1
- package/lib/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.js +5 -3
- package/lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.js +9 -5
- package/lib/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.js +26 -1
- package/lib/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.js +25 -1
- package/lib/components/hyTable/cpns/columnSelect.vue.js +1 -1
- package/lib/components/hyTable/js/useAppTable.js +2 -2
- package/lib/components/hyTableForm/batchTableForm.vue.js +3 -2
- package/lib/components/hyTableForm/tableForm.vue.js +4 -4
- package/lib/components/hyTree/js/index.js +5 -1
- package/lib/hooks/useBaseMainStore.js +1 -1
- package/lib/hooks/useDialog.js +5 -3
- package/lib/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useTemplateRef, ref, computed, nextTick, shallowRef, openBlock, createBlock, unref, isRef, withCtx, createElementVNode, createVNode, mergeProps, createTextVNode, createElementBlock, createCommentVNode } from 'vue';
|
|
1
|
+
import { defineComponent, useTemplateRef, ref, computed, nextTick, shallowRef, openBlock, createBlock, unref, isRef, withCtx, createElementVNode, createVNode, mergeProps, createTextVNode, createElementBlock, createCommentVNode } from 'vue';
|
|
2
2
|
import { ElMessage, ElCheckbox } from 'element-plus';
|
|
3
3
|
import { selectApi, saveApi } from '../../../../api/index.mjs';
|
|
4
4
|
import { findAllMapRailLocationApi } from '../../../../api/mapRail.mjs';
|
|
@@ -20,8 +20,10 @@ import { HyMap } from '../../../../components/hyMap/index.mjs';
|
|
|
20
20
|
import { HyIcon } from '../../../../components/hyIcon/index.mjs';
|
|
21
21
|
import { HyButton } from '../../../../components/hyButton/index.mjs';
|
|
22
22
|
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const __default__ = defineComponent({
|
|
24
|
+
name: "HyAddElectronicFenceDialog"
|
|
25
|
+
});
|
|
26
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
25
27
|
props: {
|
|
26
28
|
ifDraggable: {
|
|
27
29
|
type: Boolean,
|
|
@@ -506,6 +508,6 @@ const _sfc_main = {
|
|
|
506
508
|
}, 8, ["modelValue", "onUpdate:modelValue", "loading", "onUpdate:loading", "title", "if-draggable", "if-shrink", "on-close", "on-cancel", "on-submit", "onOnMinimized", "onOnDialogMousedown"]);
|
|
507
509
|
};
|
|
508
510
|
}
|
|
509
|
-
};
|
|
511
|
+
});
|
|
510
512
|
|
|
511
513
|
export { _sfc_main as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useTemplateRef, ref, openBlock, createBlock, unref, withCtx, createCommentVNode, createElementVNode } from 'vue';
|
|
1
|
+
import { defineComponent, useTemplateRef, ref, openBlock, createBlock, unref, withCtx, createCommentVNode, createElementVNode } from 'vue';
|
|
2
2
|
import { batchMapRailUserSaveApi } from '../../../../api/mapRail.mjs';
|
|
3
3
|
import '../../../../hooks/index.mjs';
|
|
4
4
|
import '../../../../components/index.mjs';
|
|
@@ -9,8 +9,10 @@ import { useMixins } from '../../../../hooks/useMixins.mjs';
|
|
|
9
9
|
import { useDialog, useDialogIsEdit, useBatchDialog } from '../../../../hooks/useDialog.mjs';
|
|
10
10
|
import { HyBatchUploadDialog } from '../../../../components/hyBatchUploadDialog/index.mjs';
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const __default__ = defineComponent({
|
|
13
|
+
name: "HyBatchSetElectronicFenceUserDialog"
|
|
14
|
+
});
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
14
16
|
props: {
|
|
15
17
|
ifDraggable: {
|
|
16
18
|
type: Boolean,
|
|
@@ -127,6 +129,8 @@ const _sfc_main = {
|
|
|
127
129
|
minimizedShow,
|
|
128
130
|
onClose,
|
|
129
131
|
onMinimized,
|
|
132
|
+
onSubmitProgress,
|
|
133
|
+
onTableDataChange,
|
|
130
134
|
HyBatchUploadDialogRef,
|
|
131
135
|
tableColumns,
|
|
132
136
|
formColumns,
|
|
@@ -159,8 +163,8 @@ const _sfc_main = {
|
|
|
159
163
|
"on-cancel": unref(onClose),
|
|
160
164
|
"on-close": unref(onClose),
|
|
161
165
|
onSubmit: unref(onSubmit),
|
|
162
|
-
onSubmitProgress:
|
|
163
|
-
onTableDataChange:
|
|
166
|
+
onSubmitProgress: unref(onSubmitProgress),
|
|
167
|
+
onTableDataChange: unref(onTableDataChange),
|
|
164
168
|
onOnMinimized: unref(onMinimized),
|
|
165
169
|
onOnDialogMousedown: ($event) => unref(setDragLevelIndex)("HyBatchUploadDialogRef")
|
|
166
170
|
}, {
|
|
@@ -173,6 +177,6 @@ const _sfc_main = {
|
|
|
173
177
|
}, 8, ["title", "table-columns", "form-columns", "rules", "submit-handler", "if-draggable", "if-shrink", "on-cancel", "on-close", "onSubmit", "onSubmitProgress", "onTableDataChange", "onOnMinimized", "onOnDialogMousedown"]);
|
|
174
178
|
};
|
|
175
179
|
}
|
|
176
|
-
};
|
|
180
|
+
});
|
|
177
181
|
|
|
178
182
|
export { _sfc_main as default };
|
|
@@ -269,6 +269,27 @@ const _sfc_main = {
|
|
|
269
269
|
hy.loading.value = false;
|
|
270
270
|
hy.watchResume();
|
|
271
271
|
}
|
|
272
|
+
function getCacheData() {
|
|
273
|
+
return {
|
|
274
|
+
formModel: hy.formModel.value
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
async function restoreCache(data = {}) {
|
|
278
|
+
hy.formModel.value = {
|
|
279
|
+
ruleName: null,
|
|
280
|
+
stopHour: null,
|
|
281
|
+
gatherLimit: null,
|
|
282
|
+
ruleDateType: 1,
|
|
283
|
+
apStartDtm: null,
|
|
284
|
+
apEndDtm: null,
|
|
285
|
+
startDtm1: null,
|
|
286
|
+
endDtm1: null,
|
|
287
|
+
weekDate: [],
|
|
288
|
+
mapRailId: null,
|
|
289
|
+
...data.formModel || {}
|
|
290
|
+
};
|
|
291
|
+
hy.dialogVisible.value = true;
|
|
292
|
+
}
|
|
272
293
|
async function onSubmit2() {
|
|
273
294
|
await hy.formRef.value.validate();
|
|
274
295
|
const form = { ...hy.formModel.value };
|
|
@@ -342,6 +363,8 @@ const _sfc_main = {
|
|
|
342
363
|
tableColumns: tableColumns2,
|
|
343
364
|
rules: rules2,
|
|
344
365
|
show: show2,
|
|
366
|
+
getCacheData,
|
|
367
|
+
restoreCache,
|
|
345
368
|
onSubmit: onSubmit2,
|
|
346
369
|
formRef: formRef2,
|
|
347
370
|
setWeekDate: setWeekDate2,
|
|
@@ -353,8 +376,9 @@ const _sfc_main = {
|
|
|
353
376
|
};
|
|
354
377
|
};
|
|
355
378
|
const {
|
|
356
|
-
|
|
379
|
+
minimizedShow,
|
|
357
380
|
setDragLevelIndex,
|
|
381
|
+
onMinimized,
|
|
358
382
|
dialogVisible,
|
|
359
383
|
loading,
|
|
360
384
|
title,
|
|
@@ -381,6 +405,7 @@ const _sfc_main = {
|
|
|
381
405
|
);
|
|
382
406
|
__expose({
|
|
383
407
|
show,
|
|
408
|
+
minimizedShow,
|
|
384
409
|
setDragLevelIndex
|
|
385
410
|
});
|
|
386
411
|
return (_ctx, _cache) => {
|
|
@@ -240,6 +240,26 @@ const _sfc_main = {
|
|
|
240
240
|
hy.loading.value = false;
|
|
241
241
|
hy.watchResume();
|
|
242
242
|
}
|
|
243
|
+
function getCacheData() {
|
|
244
|
+
return {
|
|
245
|
+
formModel: hy.formModel.value
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
async function restoreCache(data = {}) {
|
|
249
|
+
hy.formModel.value = {
|
|
250
|
+
ruleName: null,
|
|
251
|
+
stopHour: null,
|
|
252
|
+
gatherLimit: null,
|
|
253
|
+
ruleDateType: 1,
|
|
254
|
+
apStartDtm: null,
|
|
255
|
+
apEndDtm: null,
|
|
256
|
+
startDtm1: null,
|
|
257
|
+
endDtm1: null,
|
|
258
|
+
weekDate: [],
|
|
259
|
+
...data.formModel || {}
|
|
260
|
+
};
|
|
261
|
+
hy.dialogVisible.value = true;
|
|
262
|
+
}
|
|
243
263
|
async function onSubmit2() {
|
|
244
264
|
await hy.formRef.value.validate();
|
|
245
265
|
const form = { ...hy.formModel.value };
|
|
@@ -282,14 +302,17 @@ const _sfc_main = {
|
|
|
282
302
|
formColumns: formColumns2,
|
|
283
303
|
rules: rules2,
|
|
284
304
|
show: show2,
|
|
305
|
+
getCacheData,
|
|
306
|
+
restoreCache,
|
|
285
307
|
onSubmit: onSubmit2,
|
|
286
308
|
formRef: formRef2,
|
|
287
309
|
setWeekDate: setWeekDate2
|
|
288
310
|
};
|
|
289
311
|
};
|
|
290
312
|
const {
|
|
291
|
-
|
|
313
|
+
minimizedShow,
|
|
292
314
|
setDragLevelIndex,
|
|
315
|
+
onMinimized,
|
|
293
316
|
dialogVisible,
|
|
294
317
|
loading,
|
|
295
318
|
title,
|
|
@@ -303,6 +326,7 @@ const _sfc_main = {
|
|
|
303
326
|
} = useMixins({ emits }, [useDialog, useDialogIsEdit, useRuleSettingDialog]);
|
|
304
327
|
__expose({
|
|
305
328
|
show,
|
|
329
|
+
minimizedShow,
|
|
306
330
|
setDragLevelIndex
|
|
307
331
|
});
|
|
308
332
|
return (_ctx, _cache) => {
|
|
@@ -47,7 +47,7 @@ const _sfc_main = {
|
|
|
47
47
|
}, 0);
|
|
48
48
|
});
|
|
49
49
|
function isShowColumn(column) {
|
|
50
|
-
return tableColumnShowHandler(column) && column.editable.
|
|
50
|
+
return tableColumnShowHandler(column) && column.editable.show;
|
|
51
51
|
}
|
|
52
52
|
function showPopover() {
|
|
53
53
|
initColumnsInfo(props.columns, props.columnsEditable);
|
|
@@ -68,7 +68,7 @@ function getColumnEditable(column, index) {
|
|
|
68
68
|
return {
|
|
69
69
|
index,
|
|
70
70
|
lock: false,
|
|
71
|
-
|
|
71
|
+
show: !type || type === "default",
|
|
72
72
|
checked: !!editable,
|
|
73
73
|
desc: void 0,
|
|
74
74
|
examples: []
|
|
@@ -76,7 +76,7 @@ function getColumnEditable(column, index) {
|
|
|
76
76
|
}
|
|
77
77
|
return {
|
|
78
78
|
lock: false,
|
|
79
|
-
|
|
79
|
+
show: !type || type === "default",
|
|
80
80
|
checked: !type || type !== "default" || type === "operator",
|
|
81
81
|
desc: void 0,
|
|
82
82
|
examples: [],
|
|
@@ -263,6 +263,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
263
263
|
errorMsg = data.errorMsg;
|
|
264
264
|
}
|
|
265
265
|
if (errorMsg && errorMsg.message) {
|
|
266
|
+
target.errorMsg = errorMsg;
|
|
266
267
|
continue;
|
|
267
268
|
}
|
|
268
269
|
try {
|
|
@@ -275,7 +276,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
275
276
|
prop: null,
|
|
276
277
|
message: res2.msg
|
|
277
278
|
};
|
|
278
|
-
if (submitModel.value === "
|
|
279
|
+
if (submitModel.value === "strict") {
|
|
279
280
|
break;
|
|
280
281
|
}
|
|
281
282
|
}
|
|
@@ -285,7 +286,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
285
286
|
message: err?.msg ? err.msg : err
|
|
286
287
|
};
|
|
287
288
|
console.error(err);
|
|
288
|
-
if (submitModel.value === "
|
|
289
|
+
if (submitModel.value === "strict") {
|
|
289
290
|
break;
|
|
290
291
|
}
|
|
291
292
|
}
|
|
@@ -218,8 +218,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
218
218
|
if (data && !data.errorMsg) {
|
|
219
219
|
data.errorMsg = errData;
|
|
220
220
|
} else if (data && !data.errorMsg.prop && !data.errorMsg.message) {
|
|
221
|
-
data.errorMsg.prop = errData.
|
|
222
|
-
data.errorMsg.message = errData.
|
|
221
|
+
data.errorMsg.prop = errData.prop;
|
|
222
|
+
data.errorMsg.message = errData.message;
|
|
223
223
|
}
|
|
224
224
|
errorMap.set(errData.prop, errData.message);
|
|
225
225
|
});
|
|
@@ -305,7 +305,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
305
305
|
setData(data) {
|
|
306
306
|
dataSource.value = cloneDeep(data, true);
|
|
307
307
|
dataSource.value.forEach((item) => {
|
|
308
|
-
item.onlyId = /* @__PURE__ */ Symbol("onlyId");
|
|
308
|
+
item.onlyId = item.onlyId || /* @__PURE__ */ Symbol("onlyId");
|
|
309
309
|
});
|
|
310
310
|
initValidateHandler(dataSource.value);
|
|
311
311
|
setData(dataSource.value);
|
|
@@ -334,7 +334,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
334
334
|
},
|
|
335
335
|
getTableDataSource() {
|
|
336
336
|
return dataSource.value.reduce((list, item) => {
|
|
337
|
-
const {
|
|
337
|
+
const { errorMsg, errorMap, children, ...data } = item;
|
|
338
338
|
list.push(data);
|
|
339
339
|
return list;
|
|
340
340
|
}, []);
|
|
@@ -350,7 +350,11 @@ const useAppTreeWrapper = (hy) => {
|
|
|
350
350
|
function setDisAbleSelectionMap() {
|
|
351
351
|
const map = /* @__PURE__ */ new Map();
|
|
352
352
|
props.disableSelection.forEach((v) => {
|
|
353
|
-
|
|
353
|
+
if (props.treeType === "device" || props.treeType === "channel") {
|
|
354
|
+
map.set(v.channelId || v.deviceId, true);
|
|
355
|
+
} else if (props.treeType) {
|
|
356
|
+
map.set(v.id, true);
|
|
357
|
+
}
|
|
354
358
|
});
|
|
355
359
|
hy.disableSelectionMap.value = map;
|
|
356
360
|
}
|
|
@@ -17,7 +17,7 @@ const useBaseMainStore = () => {
|
|
|
17
17
|
if (getCurrentInstance()) {
|
|
18
18
|
const baseMainStore = inject(localBaseMainStoreKey, ref());
|
|
19
19
|
return {
|
|
20
|
-
baseMainStore: unref(baseMainStore) ? unref(baseMainStore) : (unref(useGlobalConfig()).baseMainStore || defaultBaseMainStore)()
|
|
20
|
+
baseMainStore: unref(baseMainStore) ? unref(baseMainStore)() : (unref(useGlobalConfig()).baseMainStore || defaultBaseMainStore)()
|
|
21
21
|
};
|
|
22
22
|
} else {
|
|
23
23
|
return {
|
package/es/hooks/useDialog.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getCurrentInstance, ref, onMounted, watch } from 'vue';
|
|
2
2
|
import '../components/index.mjs';
|
|
3
|
-
import { useLocale } from './useLocale.mjs';
|
|
4
3
|
import './index.mjs';
|
|
5
4
|
import { useBaseMainStore } from './useBaseMainStore.mjs';
|
|
6
5
|
import { useCurrentBus } from './useCurrentBus.mjs';
|
|
@@ -58,6 +57,7 @@ function useDialog(hy) {
|
|
|
58
57
|
hy.setIsEdit(false);
|
|
59
58
|
await hy.restoreCache(value);
|
|
60
59
|
hy.setIsEdit(value.isEdit);
|
|
60
|
+
hy.setDragLevelIndex("HyDialogRef");
|
|
61
61
|
} else {
|
|
62
62
|
hy.setDragLevelIndex("HyDialogRef");
|
|
63
63
|
}
|
|
@@ -77,7 +77,6 @@ function useDialog(hy) {
|
|
|
77
77
|
return Promise.resolve();
|
|
78
78
|
}
|
|
79
79
|
function confirmReplace(type) {
|
|
80
|
-
const { t } = useLocale();
|
|
81
80
|
return new Promise((resolve, reject) => {
|
|
82
81
|
if (type === "close") {
|
|
83
82
|
HyConfirmDialog.confirm({
|
|
@@ -172,6 +171,9 @@ function useDialogIsEdit(hy) {
|
|
|
172
171
|
resolve({});
|
|
173
172
|
});
|
|
174
173
|
}
|
|
174
|
+
function setWatchResume(newWatchResume) {
|
|
175
|
+
hy.isWatchForm.value = newWatchResume;
|
|
176
|
+
}
|
|
175
177
|
function watchResume() {
|
|
176
178
|
hy.isWatchForm.value = true;
|
|
177
179
|
}
|
|
@@ -192,6 +194,7 @@ function useDialogIsEdit(hy) {
|
|
|
192
194
|
return {
|
|
193
195
|
isWatchForm,
|
|
194
196
|
watchPause,
|
|
197
|
+
setWatchResume,
|
|
195
198
|
watchResume
|
|
196
199
|
};
|
|
197
200
|
}
|
|
@@ -203,7 +206,6 @@ function useBatchDialog(hy) {
|
|
|
203
206
|
hy.tableDataChange.value = data;
|
|
204
207
|
}
|
|
205
208
|
function confirmReplace(type) {
|
|
206
|
-
const { t } = useLocale();
|
|
207
209
|
return new Promise((resolve, reject) => {
|
|
208
210
|
if (type === "close") {
|
|
209
211
|
HyConfirmDialog.confirm({
|
package/es/version.mjs
CHANGED
|
@@ -24,8 +24,10 @@ var index$5 = require('../../../../components/hyMap/index.js');
|
|
|
24
24
|
var index$6 = require('../../../../components/hyIcon/index.js');
|
|
25
25
|
var index$7 = require('../../../../components/hyButton/index.js');
|
|
26
26
|
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const __default__ = vue.defineComponent({
|
|
28
|
+
name: "HyAddElectronicFenceDialog"
|
|
29
|
+
});
|
|
30
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
29
31
|
props: {
|
|
30
32
|
ifDraggable: {
|
|
31
33
|
type: Boolean,
|
|
@@ -510,6 +512,6 @@ const _sfc_main = {
|
|
|
510
512
|
}, 8, ["modelValue", "onUpdate:modelValue", "loading", "onUpdate:loading", "title", "if-draggable", "if-shrink", "on-close", "on-cancel", "on-submit", "onOnMinimized", "onOnDialogMousedown"]);
|
|
511
513
|
};
|
|
512
514
|
}
|
|
513
|
-
};
|
|
515
|
+
});
|
|
514
516
|
|
|
515
517
|
exports.default = _sfc_main;
|
|
@@ -13,8 +13,10 @@ var useMixins = require('../../../../hooks/useMixins.js');
|
|
|
13
13
|
var useDialog = require('../../../../hooks/useDialog.js');
|
|
14
14
|
var index = require('../../../../components/hyBatchUploadDialog/index.js');
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const __default__ = vue.defineComponent({
|
|
17
|
+
name: "HyBatchSetElectronicFenceUserDialog"
|
|
18
|
+
});
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
18
20
|
props: {
|
|
19
21
|
ifDraggable: {
|
|
20
22
|
type: Boolean,
|
|
@@ -131,6 +133,8 @@ const _sfc_main = {
|
|
|
131
133
|
minimizedShow,
|
|
132
134
|
onClose,
|
|
133
135
|
onMinimized,
|
|
136
|
+
onSubmitProgress,
|
|
137
|
+
onTableDataChange,
|
|
134
138
|
HyBatchUploadDialogRef,
|
|
135
139
|
tableColumns,
|
|
136
140
|
formColumns,
|
|
@@ -163,8 +167,8 @@ const _sfc_main = {
|
|
|
163
167
|
"on-cancel": vue.unref(onClose),
|
|
164
168
|
"on-close": vue.unref(onClose),
|
|
165
169
|
onSubmit: vue.unref(onSubmit),
|
|
166
|
-
onSubmitProgress:
|
|
167
|
-
onTableDataChange:
|
|
170
|
+
onSubmitProgress: vue.unref(onSubmitProgress),
|
|
171
|
+
onTableDataChange: vue.unref(onTableDataChange),
|
|
168
172
|
onOnMinimized: vue.unref(onMinimized),
|
|
169
173
|
onOnDialogMousedown: ($event) => vue.unref(setDragLevelIndex)("HyBatchUploadDialogRef")
|
|
170
174
|
}, {
|
|
@@ -177,6 +181,6 @@ const _sfc_main = {
|
|
|
177
181
|
}, 8, ["title", "table-columns", "form-columns", "rules", "submit-handler", "if-draggable", "if-shrink", "on-cancel", "on-close", "onSubmit", "onSubmitProgress", "onTableDataChange", "onOnMinimized", "onOnDialogMousedown"]);
|
|
178
182
|
};
|
|
179
183
|
}
|
|
180
|
-
};
|
|
184
|
+
});
|
|
181
185
|
|
|
182
186
|
exports.default = _sfc_main;
|
|
@@ -273,6 +273,27 @@ const _sfc_main = {
|
|
|
273
273
|
hy.loading.value = false;
|
|
274
274
|
hy.watchResume();
|
|
275
275
|
}
|
|
276
|
+
function getCacheData() {
|
|
277
|
+
return {
|
|
278
|
+
formModel: hy.formModel.value
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
async function restoreCache(data = {}) {
|
|
282
|
+
hy.formModel.value = {
|
|
283
|
+
ruleName: null,
|
|
284
|
+
stopHour: null,
|
|
285
|
+
gatherLimit: null,
|
|
286
|
+
ruleDateType: 1,
|
|
287
|
+
apStartDtm: null,
|
|
288
|
+
apEndDtm: null,
|
|
289
|
+
startDtm1: null,
|
|
290
|
+
endDtm1: null,
|
|
291
|
+
weekDate: [],
|
|
292
|
+
mapRailId: null,
|
|
293
|
+
...data.formModel || {}
|
|
294
|
+
};
|
|
295
|
+
hy.dialogVisible.value = true;
|
|
296
|
+
}
|
|
276
297
|
async function onSubmit2() {
|
|
277
298
|
await hy.formRef.value.validate();
|
|
278
299
|
const form = { ...hy.formModel.value };
|
|
@@ -346,6 +367,8 @@ const _sfc_main = {
|
|
|
346
367
|
tableColumns: tableColumns2,
|
|
347
368
|
rules: rules2,
|
|
348
369
|
show: show2,
|
|
370
|
+
getCacheData,
|
|
371
|
+
restoreCache,
|
|
349
372
|
onSubmit: onSubmit2,
|
|
350
373
|
formRef: formRef2,
|
|
351
374
|
setWeekDate: setWeekDate2,
|
|
@@ -357,8 +380,9 @@ const _sfc_main = {
|
|
|
357
380
|
};
|
|
358
381
|
};
|
|
359
382
|
const {
|
|
360
|
-
|
|
383
|
+
minimizedShow,
|
|
361
384
|
setDragLevelIndex,
|
|
385
|
+
onMinimized,
|
|
362
386
|
dialogVisible,
|
|
363
387
|
loading,
|
|
364
388
|
title,
|
|
@@ -385,6 +409,7 @@ const _sfc_main = {
|
|
|
385
409
|
);
|
|
386
410
|
__expose({
|
|
387
411
|
show,
|
|
412
|
+
minimizedShow,
|
|
388
413
|
setDragLevelIndex
|
|
389
414
|
});
|
|
390
415
|
return (_ctx, _cache) => {
|
|
@@ -244,6 +244,26 @@ const _sfc_main = {
|
|
|
244
244
|
hy.loading.value = false;
|
|
245
245
|
hy.watchResume();
|
|
246
246
|
}
|
|
247
|
+
function getCacheData() {
|
|
248
|
+
return {
|
|
249
|
+
formModel: hy.formModel.value
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
async function restoreCache(data = {}) {
|
|
253
|
+
hy.formModel.value = {
|
|
254
|
+
ruleName: null,
|
|
255
|
+
stopHour: null,
|
|
256
|
+
gatherLimit: null,
|
|
257
|
+
ruleDateType: 1,
|
|
258
|
+
apStartDtm: null,
|
|
259
|
+
apEndDtm: null,
|
|
260
|
+
startDtm1: null,
|
|
261
|
+
endDtm1: null,
|
|
262
|
+
weekDate: [],
|
|
263
|
+
...data.formModel || {}
|
|
264
|
+
};
|
|
265
|
+
hy.dialogVisible.value = true;
|
|
266
|
+
}
|
|
247
267
|
async function onSubmit2() {
|
|
248
268
|
await hy.formRef.value.validate();
|
|
249
269
|
const form = { ...hy.formModel.value };
|
|
@@ -286,14 +306,17 @@ const _sfc_main = {
|
|
|
286
306
|
formColumns: formColumns2,
|
|
287
307
|
rules: rules2,
|
|
288
308
|
show: show2,
|
|
309
|
+
getCacheData,
|
|
310
|
+
restoreCache,
|
|
289
311
|
onSubmit: onSubmit2,
|
|
290
312
|
formRef: formRef2,
|
|
291
313
|
setWeekDate: setWeekDate2
|
|
292
314
|
};
|
|
293
315
|
};
|
|
294
316
|
const {
|
|
295
|
-
|
|
317
|
+
minimizedShow,
|
|
296
318
|
setDragLevelIndex,
|
|
319
|
+
onMinimized,
|
|
297
320
|
dialogVisible,
|
|
298
321
|
loading,
|
|
299
322
|
title,
|
|
@@ -307,6 +330,7 @@ const _sfc_main = {
|
|
|
307
330
|
} = useMixins.useMixins({ emits }, [useDialog.useDialog, useDialog.useDialogIsEdit, useRuleSettingDialog]);
|
|
308
331
|
__expose({
|
|
309
332
|
show,
|
|
333
|
+
minimizedShow,
|
|
310
334
|
setDragLevelIndex
|
|
311
335
|
});
|
|
312
336
|
return (_ctx, _cache) => {
|
|
@@ -51,7 +51,7 @@ const _sfc_main = {
|
|
|
51
51
|
}, 0);
|
|
52
52
|
});
|
|
53
53
|
function isShowColumn(column) {
|
|
54
|
-
return index.tableColumnShowHandler(column) && column.editable.
|
|
54
|
+
return index.tableColumnShowHandler(column) && column.editable.show;
|
|
55
55
|
}
|
|
56
56
|
function showPopover() {
|
|
57
57
|
initColumnsInfo(props.columns, props.columnsEditable);
|
|
@@ -70,7 +70,7 @@ function getColumnEditable(column, index) {
|
|
|
70
70
|
return {
|
|
71
71
|
index,
|
|
72
72
|
lock: false,
|
|
73
|
-
|
|
73
|
+
show: !type || type === "default",
|
|
74
74
|
checked: !!editable,
|
|
75
75
|
desc: void 0,
|
|
76
76
|
examples: []
|
|
@@ -78,7 +78,7 @@ function getColumnEditable(column, index) {
|
|
|
78
78
|
}
|
|
79
79
|
return {
|
|
80
80
|
lock: false,
|
|
81
|
-
|
|
81
|
+
show: !type || type === "default",
|
|
82
82
|
checked: !type || type !== "default" || type === "operator",
|
|
83
83
|
desc: void 0,
|
|
84
84
|
examples: [],
|
|
@@ -267,6 +267,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
267
267
|
errorMsg = data.errorMsg;
|
|
268
268
|
}
|
|
269
269
|
if (errorMsg && errorMsg.message) {
|
|
270
|
+
target.errorMsg = errorMsg;
|
|
270
271
|
continue;
|
|
271
272
|
}
|
|
272
273
|
try {
|
|
@@ -279,7 +280,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
279
280
|
prop: null,
|
|
280
281
|
message: res2.msg
|
|
281
282
|
};
|
|
282
|
-
if (submitModel.value === "
|
|
283
|
+
if (submitModel.value === "strict") {
|
|
283
284
|
break;
|
|
284
285
|
}
|
|
285
286
|
}
|
|
@@ -289,7 +290,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
289
290
|
message: err?.msg ? err.msg : err
|
|
290
291
|
};
|
|
291
292
|
console.error(err);
|
|
292
|
-
if (submitModel.value === "
|
|
293
|
+
if (submitModel.value === "strict") {
|
|
293
294
|
break;
|
|
294
295
|
}
|
|
295
296
|
}
|
|
@@ -222,8 +222,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
222
222
|
if (data && !data.errorMsg) {
|
|
223
223
|
data.errorMsg = errData;
|
|
224
224
|
} else if (data && !data.errorMsg.prop && !data.errorMsg.message) {
|
|
225
|
-
data.errorMsg.prop = errData.
|
|
226
|
-
data.errorMsg.message = errData.
|
|
225
|
+
data.errorMsg.prop = errData.prop;
|
|
226
|
+
data.errorMsg.message = errData.message;
|
|
227
227
|
}
|
|
228
228
|
errorMap.set(errData.prop, errData.message);
|
|
229
229
|
});
|
|
@@ -309,7 +309,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
309
309
|
setData(data) {
|
|
310
310
|
dataSource.value = handler.cloneDeep(data, true);
|
|
311
311
|
dataSource.value.forEach((item) => {
|
|
312
|
-
item.onlyId = /* @__PURE__ */ Symbol("onlyId");
|
|
312
|
+
item.onlyId = item.onlyId || /* @__PURE__ */ Symbol("onlyId");
|
|
313
313
|
});
|
|
314
314
|
initValidateHandler(dataSource.value);
|
|
315
315
|
setData(dataSource.value);
|
|
@@ -338,7 +338,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
338
338
|
},
|
|
339
339
|
getTableDataSource() {
|
|
340
340
|
return dataSource.value.reduce((list, item) => {
|
|
341
|
-
const {
|
|
341
|
+
const { errorMsg, errorMap, children, ...data } = item;
|
|
342
342
|
list.push(data);
|
|
343
343
|
return list;
|
|
344
344
|
}, []);
|
|
@@ -352,7 +352,11 @@ const useAppTreeWrapper = (hy) => {
|
|
|
352
352
|
function setDisAbleSelectionMap() {
|
|
353
353
|
const map = /* @__PURE__ */ new Map();
|
|
354
354
|
props.disableSelection.forEach((v) => {
|
|
355
|
-
|
|
355
|
+
if (props.treeType === "device" || props.treeType === "channel") {
|
|
356
|
+
map.set(v.channelId || v.deviceId, true);
|
|
357
|
+
} else if (props.treeType) {
|
|
358
|
+
map.set(v.id, true);
|
|
359
|
+
}
|
|
356
360
|
});
|
|
357
361
|
hy.disableSelectionMap.value = map;
|
|
358
362
|
}
|
|
@@ -19,7 +19,7 @@ const useBaseMainStore = () => {
|
|
|
19
19
|
if (vue.getCurrentInstance()) {
|
|
20
20
|
const baseMainStore = vue.inject(localBaseMainStoreKey, vue.ref());
|
|
21
21
|
return {
|
|
22
|
-
baseMainStore: vue.unref(baseMainStore) ? vue.unref(baseMainStore) : (vue.unref(useGlobalConfig.useGlobalConfig()).baseMainStore || defaultBaseMainStore)()
|
|
22
|
+
baseMainStore: vue.unref(baseMainStore) ? vue.unref(baseMainStore)() : (vue.unref(useGlobalConfig.useGlobalConfig()).baseMainStore || defaultBaseMainStore)()
|
|
23
23
|
};
|
|
24
24
|
} else {
|
|
25
25
|
return {
|
package/lib/hooks/useDialog.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
require('../components/index.js');
|
|
5
|
-
var useLocale = require('./useLocale.js');
|
|
6
5
|
require('./index.js');
|
|
7
6
|
var useBaseMainStore = require('./useBaseMainStore.js');
|
|
8
7
|
var useCurrentBus = require('./useCurrentBus.js');
|
|
@@ -60,6 +59,7 @@ function useDialog(hy) {
|
|
|
60
59
|
hy.setIsEdit(false);
|
|
61
60
|
await hy.restoreCache(value);
|
|
62
61
|
hy.setIsEdit(value.isEdit);
|
|
62
|
+
hy.setDragLevelIndex("HyDialogRef");
|
|
63
63
|
} else {
|
|
64
64
|
hy.setDragLevelIndex("HyDialogRef");
|
|
65
65
|
}
|
|
@@ -79,7 +79,6 @@ function useDialog(hy) {
|
|
|
79
79
|
return Promise.resolve();
|
|
80
80
|
}
|
|
81
81
|
function confirmReplace(type) {
|
|
82
|
-
const { t } = useLocale.useLocale();
|
|
83
82
|
return new Promise((resolve, reject) => {
|
|
84
83
|
if (type === "close") {
|
|
85
84
|
index.HyConfirmDialog.confirm({
|
|
@@ -174,6 +173,9 @@ function useDialogIsEdit(hy) {
|
|
|
174
173
|
resolve({});
|
|
175
174
|
});
|
|
176
175
|
}
|
|
176
|
+
function setWatchResume(newWatchResume) {
|
|
177
|
+
hy.isWatchForm.value = newWatchResume;
|
|
178
|
+
}
|
|
177
179
|
function watchResume() {
|
|
178
180
|
hy.isWatchForm.value = true;
|
|
179
181
|
}
|
|
@@ -194,6 +196,7 @@ function useDialogIsEdit(hy) {
|
|
|
194
196
|
return {
|
|
195
197
|
isWatchForm,
|
|
196
198
|
watchPause,
|
|
199
|
+
setWatchResume,
|
|
197
200
|
watchResume
|
|
198
201
|
};
|
|
199
202
|
}
|
|
@@ -205,7 +208,6 @@ function useBatchDialog(hy) {
|
|
|
205
208
|
hy.tableDataChange.value = data;
|
|
206
209
|
}
|
|
207
210
|
function confirmReplace(type) {
|
|
208
|
-
const { t } = useLocale.useLocale();
|
|
209
211
|
return new Promise((resolve, reject) => {
|
|
210
212
|
if (type === "close") {
|
|
211
213
|
index.HyConfirmDialog.confirm({
|
package/lib/version.js
CHANGED