hy-dispatch-ui-v3 0.2.47 → 0.2.48
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/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +20 -2
- package/es/components/hyDialog/dialog.vue.mjs +63 -45
- package/es/components/hyTree/js/index.mjs +62 -33
- package/es/components/hyTree/tree.vue.mjs +14 -0
- package/es/static/hy-svg-icons/hy-icon-layout-sidenav-parameter-settings.js +8 -0
- package/es/version.mjs +1 -1
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +20 -2
- package/lib/components/hyDialog/dialog.vue.js +63 -45
- package/lib/components/hyTree/js/index.js +62 -33
- package/lib/components/hyTree/tree.vue.js +14 -0
- package/lib/static/hy-svg-icons/hy-icon-layout-sidenav-parameter-settings.js +8 -0
- package/lib/version.js +1 -1
- package/package.json +1 -1
|
@@ -86,7 +86,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
86
86
|
"reset",
|
|
87
87
|
"validate",
|
|
88
88
|
"submitting",
|
|
89
|
-
"submit"
|
|
89
|
+
"submit",
|
|
90
|
+
"onMinimized",
|
|
91
|
+
"onDialogMousedown"
|
|
90
92
|
], ["update:modelValue"]),
|
|
91
93
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
92
94
|
const emits = __emit;
|
|
@@ -96,6 +98,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
96
98
|
const isSubmitting = ref(false);
|
|
97
99
|
const failedCount = ref(0);
|
|
98
100
|
const failedStatus = ref(null);
|
|
101
|
+
const HyDialogRef = useTemplateRef("HyDialogRef");
|
|
102
|
+
function setDragLevelIndex(dragLevel) {
|
|
103
|
+
HyDialogRef.value.setDragLevelIndex(dragLevel);
|
|
104
|
+
}
|
|
105
|
+
function onMinimized(e) {
|
|
106
|
+
emits("onMinimized", e);
|
|
107
|
+
}
|
|
108
|
+
function onDialogMousedown(e) {
|
|
109
|
+
emits("onDialogMousedown", e);
|
|
110
|
+
}
|
|
99
111
|
async function show() {
|
|
100
112
|
visible.value = true;
|
|
101
113
|
showSubmit.value = false;
|
|
@@ -144,6 +156,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
144
156
|
}
|
|
145
157
|
__expose({
|
|
146
158
|
show,
|
|
159
|
+
setDragLevelIndex,
|
|
147
160
|
getTableDataSource: () => {
|
|
148
161
|
return batchTableFormRef.value.getTableDataSource();
|
|
149
162
|
},
|
|
@@ -156,6 +169,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
156
169
|
});
|
|
157
170
|
return (_ctx, _cache) => {
|
|
158
171
|
return openBlock(), createBlock(unref(HyDialog), mergeProps({
|
|
172
|
+
ref_key: "HyDialogRef",
|
|
173
|
+
ref: HyDialogRef,
|
|
159
174
|
modelValue: visible.value,
|
|
160
175
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
161
176
|
loading: isSubmitting.value,
|
|
@@ -168,7 +183,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
168
183
|
"show-cancel": !isSubmitting.value,
|
|
169
184
|
ifShrink: __props.ifShrink,
|
|
170
185
|
ifDraggable: __props.ifDraggable
|
|
171
|
-
}, _ctx.$attrs
|
|
186
|
+
}, _ctx.$attrs, {
|
|
187
|
+
onOnMinimized: onMinimized,
|
|
188
|
+
onOnDialogMousedown: onDialogMousedown
|
|
189
|
+
}), createSlots({
|
|
172
190
|
"operate-left-box": withCtx(() => [
|
|
173
191
|
failedCount.value ? (openBlock(), createElementBlock("div", {
|
|
174
192
|
key: 0,
|
|
@@ -24,6 +24,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
24
24
|
type: String,
|
|
25
25
|
default: ""
|
|
26
26
|
},
|
|
27
|
+
operateClass: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ""
|
|
30
|
+
},
|
|
27
31
|
top: String,
|
|
28
32
|
// 是否可缩小化
|
|
29
33
|
ifShrink: { type: Boolean, default: false },
|
|
@@ -40,7 +44,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
40
44
|
default: "default"
|
|
41
45
|
},
|
|
42
46
|
cancelText: {
|
|
43
|
-
type: String
|
|
47
|
+
type: String,
|
|
48
|
+
default: () => {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
submitText: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: () => {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
44
57
|
},
|
|
45
58
|
showSubmit: {
|
|
46
59
|
type: Boolean,
|
|
@@ -56,9 +69,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
56
69
|
return "1000px";
|
|
57
70
|
}
|
|
58
71
|
},
|
|
59
|
-
submitText: {
|
|
60
|
-
type: String
|
|
61
|
-
},
|
|
62
72
|
onClose: Function,
|
|
63
73
|
onCancel: Function,
|
|
64
74
|
onSubmit: Function
|
|
@@ -259,47 +269,55 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
259
269
|
key: 0,
|
|
260
270
|
class: "flex items-center flex-row-reverse justify-between p-5 pr-[26px] mt-auto box-border"
|
|
261
271
|
}, [
|
|
262
|
-
createElementVNode(
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
)
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
)
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
272
|
+
createElementVNode(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
class: normalizeClass([__props.operateClass, "flex items-center"])
|
|
276
|
+
},
|
|
277
|
+
[
|
|
278
|
+
renderSlot(_ctx.$slots, "operate", {}, () => [
|
|
279
|
+
__props.showCancel ? (openBlock(), createBlock(unref(HyButton), {
|
|
280
|
+
key: 0,
|
|
281
|
+
type: __props.cancelType,
|
|
282
|
+
disabled: loading.value,
|
|
283
|
+
class: "!min-w-[120px]",
|
|
284
|
+
onMousedown: withModifiers(() => {
|
|
285
|
+
}, ["stop"]),
|
|
286
|
+
onClick: onCancelHandler
|
|
287
|
+
}, {
|
|
288
|
+
default: withCtx(() => [
|
|
289
|
+
createTextVNode(
|
|
290
|
+
toDisplayString(__props.cancelText || unref(t)("dialog.cancel")),
|
|
291
|
+
1
|
|
292
|
+
/* TEXT */
|
|
293
|
+
)
|
|
294
|
+
]),
|
|
295
|
+
_: 1
|
|
296
|
+
/* STABLE */
|
|
297
|
+
}, 8, ["type", "disabled", "onMousedown"])) : createCommentVNode("v-if", true),
|
|
298
|
+
__props.showSubmit ? (openBlock(), createBlock(unref(HyButton), {
|
|
299
|
+
key: 1,
|
|
300
|
+
type: __props.submitType,
|
|
301
|
+
disabled: loading.value,
|
|
302
|
+
class: "!min-w-[120px]",
|
|
303
|
+
onClick: onSubmitHandler
|
|
304
|
+
}, {
|
|
305
|
+
default: withCtx(() => [
|
|
306
|
+
createTextVNode(
|
|
307
|
+
toDisplayString(__props.submitText || unref(t)("dialog.confirm")),
|
|
308
|
+
1
|
|
309
|
+
/* TEXT */
|
|
310
|
+
)
|
|
311
|
+
]),
|
|
312
|
+
_: 1
|
|
313
|
+
/* STABLE */
|
|
314
|
+
}, 8, ["type", "disabled"])) : createCommentVNode("v-if", true)
|
|
315
|
+
]),
|
|
316
|
+
renderSlot(_ctx.$slots, "operate-right-box")
|
|
317
|
+
],
|
|
318
|
+
2
|
|
319
|
+
/* CLASS */
|
|
320
|
+
),
|
|
303
321
|
renderSlot(_ctx.$slots, "operate-left-box")
|
|
304
322
|
])) : createCommentVNode("v-if", true)
|
|
305
323
|
])
|
|
@@ -105,7 +105,8 @@ const useAppTreeWrapper = (hy) => {
|
|
|
105
105
|
return false;
|
|
106
106
|
}
|
|
107
107
|
return false;
|
|
108
|
-
}
|
|
108
|
+
},
|
|
109
|
+
...props.treeProps
|
|
109
110
|
},
|
|
110
111
|
rowSelection: {
|
|
111
112
|
type: props.showCheckbox ? "checkbox" : "radio",
|
|
@@ -121,6 +122,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
121
122
|
cancelable: true,
|
|
122
123
|
// 选中回调
|
|
123
124
|
onCheckChange: (data, info, checked) => {
|
|
125
|
+
console.log("onCheckChange", info);
|
|
124
126
|
if (data.dataType === 3 && !checked) {
|
|
125
127
|
emits("on-click-delete", JSON.parse(JSON.stringify(data)));
|
|
126
128
|
} else if (data.dataType === 3) {
|
|
@@ -128,7 +130,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
128
130
|
}
|
|
129
131
|
emits(
|
|
130
132
|
"on-check-tree",
|
|
131
|
-
JSON.parse(
|
|
133
|
+
JSON.parse(
|
|
134
|
+
JSON.stringify(info.checkedBusinessNodes || info.checkedNodes)
|
|
135
|
+
)
|
|
132
136
|
);
|
|
133
137
|
}
|
|
134
138
|
},
|
|
@@ -136,7 +140,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
136
140
|
filterMethod: ({ filterValue: filterValue2 }, data) => {
|
|
137
141
|
let isFilter = true;
|
|
138
142
|
if (filterValue2) {
|
|
139
|
-
isFilter = isFilter && !!filterNodeMethod(data, filterValue2
|
|
143
|
+
isFilter = isFilter && !!filterNodeMethod(data, filterValue2, {
|
|
144
|
+
treeFilterParam: props.treeFilterParam
|
|
145
|
+
});
|
|
140
146
|
}
|
|
141
147
|
return isFilter;
|
|
142
148
|
},
|
|
@@ -369,23 +375,29 @@ const useAppTreeWrapper = (hy) => {
|
|
|
369
375
|
emits("on-addDevice");
|
|
370
376
|
}
|
|
371
377
|
function singleRemovalFn(row) {
|
|
372
|
-
if (props.treeType === "
|
|
373
|
-
virtualTree.setChecked(row.id, false, true);
|
|
374
|
-
} else {
|
|
378
|
+
if (props.treeType === "device") {
|
|
375
379
|
virtualTree.setChecked(row.deviceId, false, true);
|
|
380
|
+
} else if (props.treeType) {
|
|
381
|
+
virtualTree.setChecked(row.id, false, true);
|
|
382
|
+
} else if (!props.treeType && props.treeProps) {
|
|
383
|
+
virtualTree.setChecked(row[`${props.treeProps.value}`], false, true);
|
|
376
384
|
}
|
|
377
385
|
}
|
|
378
386
|
function setCheckedKeys(dataList) {
|
|
379
|
-
if (props.treeType === "
|
|
387
|
+
if (props.treeType === "device") {
|
|
380
388
|
virtualTree?.setCheckedKeys(
|
|
381
|
-
dataList.map((v) => v.
|
|
389
|
+
dataList.map((v) => v.deviceId),
|
|
382
390
|
true
|
|
383
391
|
);
|
|
384
|
-
} else {
|
|
392
|
+
} else if (props.treeType) {
|
|
385
393
|
virtualTree?.setCheckedKeys(
|
|
386
|
-
dataList.map((v) => v.
|
|
394
|
+
dataList.map((v) => v.id),
|
|
387
395
|
true
|
|
388
396
|
);
|
|
397
|
+
} else if (!props.treeType && props.treeProps) {
|
|
398
|
+
virtualTree?.setCheckedKeys(
|
|
399
|
+
dataList.map((v) => v[`${props.treeProps.value}`])
|
|
400
|
+
);
|
|
389
401
|
}
|
|
390
402
|
if (props.isBackDefaultSelected) {
|
|
391
403
|
setTimeout(() => {
|
|
@@ -395,10 +407,12 @@ const useAppTreeWrapper = (hy) => {
|
|
|
395
407
|
}
|
|
396
408
|
}
|
|
397
409
|
function setChecked(data, type) {
|
|
398
|
-
if (props.treeType === "
|
|
399
|
-
virtualTree?.setChecked(data.id, type, true);
|
|
400
|
-
} else {
|
|
410
|
+
if (props.treeType === "device") {
|
|
401
411
|
virtualTree?.setChecked(data.deviceId, type, true);
|
|
412
|
+
} else if (props.treeType) {
|
|
413
|
+
virtualTree?.setChecked(data.id, type, true);
|
|
414
|
+
} else if (!props.treeType && props.treeProps) {
|
|
415
|
+
virtualTree?.setChecked(data[`${props.treeProps.value}`], type, true);
|
|
402
416
|
}
|
|
403
417
|
}
|
|
404
418
|
function setSelectedOrg(deviceList) {
|
|
@@ -498,31 +512,46 @@ const useAppTreeWrapper = (hy) => {
|
|
|
498
512
|
getSelectedDataList
|
|
499
513
|
};
|
|
500
514
|
};
|
|
501
|
-
function filterNodeMethod(data, value, selectFilterType) {
|
|
515
|
+
function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [] }) {
|
|
502
516
|
let type = data.dataType;
|
|
517
|
+
if (selectFilterType) type = selectFilterType;
|
|
503
518
|
const includesValue = (field) => {
|
|
504
519
|
return field && field.toString().includes(value.toString());
|
|
505
520
|
};
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
521
|
+
if (!type) {
|
|
522
|
+
let filterType = false;
|
|
523
|
+
for (let i = 0; i < treeFilterParam.length; i++) {
|
|
524
|
+
const item = treeFilterParam[i];
|
|
525
|
+
if (!filterType) {
|
|
526
|
+
filterType = includesValue(data[`${item}`]);
|
|
527
|
+
if (filterType) {
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
512
530
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
531
|
+
}
|
|
532
|
+
return filterType;
|
|
533
|
+
} else {
|
|
534
|
+
switch (type) {
|
|
535
|
+
case 7:
|
|
536
|
+
if (data.typeName === "workOrderList") {
|
|
537
|
+
return includesValue(data.workTimeName);
|
|
538
|
+
} else {
|
|
539
|
+
return includesValue(data.dailyCheckName);
|
|
540
|
+
}
|
|
541
|
+
case 6:
|
|
542
|
+
return includesValue(data.deviceUserName) || includesValue(data.item?.deviceId);
|
|
543
|
+
case 5:
|
|
544
|
+
return includesValue(data.jobNum) || includesValue(data.name) || includesValue(data.phone);
|
|
545
|
+
case 4:
|
|
546
|
+
case 11:
|
|
547
|
+
return includesValue(data.groupName);
|
|
548
|
+
case 8:
|
|
549
|
+
return includesValue(data.sname);
|
|
550
|
+
case 3:
|
|
551
|
+
return includesValue(data.deviceId) || includesValue(data.devName) || includesValue(data.name) || includesValue(data.deviceCode) || includesValue(data.imei);
|
|
552
|
+
default:
|
|
553
|
+
return includesValue(data.companyName) || includesValue(data.orgName);
|
|
554
|
+
}
|
|
526
555
|
}
|
|
527
556
|
}
|
|
528
557
|
|
|
@@ -77,6 +77,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
77
77
|
return treeTypeConfig.device;
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
+
// 树形 props 类型 (treeType null时生效)
|
|
81
|
+
treeProps: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: () => {
|
|
84
|
+
return {};
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
// 树形 过滤参数 类型 (treeType null时生效)
|
|
88
|
+
treeFilterParam: {
|
|
89
|
+
type: Array,
|
|
90
|
+
default: () => {
|
|
91
|
+
return [];
|
|
92
|
+
}
|
|
93
|
+
},
|
|
80
94
|
// 是否显示通道节点的选择框
|
|
81
95
|
isShowChannelSelect: {
|
|
82
96
|
type: Boolean,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: 'hy-icon-layout-sidenav-parameter-settings',
|
|
3
|
+
symbol: `<symbol id="hy-icon-layout-sidenav-parameter-settings" viewBox="0 0 20 20">
|
|
4
|
+
<g id="hy-icon-layout-sidenav-parameter-settings-menu/ParameterSettings" stroke="none" stroke-width="1" fill-rule="evenodd">
|
|
5
|
+
<path d="M15.8266599,2 L4.1733401,2 C2.97313737,2 2,2.97313735 2,4.17334008 L2,15.8266599 C2,17.0268626 2.97313735,18 4.1733401,18 L15.8266599,18 C17.0268627,18 18,17.0268627 18,15.8266599 L18,4.17334008 C17.9959453,2.97313735 17.0228079,2 15.8266599,2 Z M15.4941713,14.1033958 L13.6087177,14.1033958 C13.2924481,14.7602636 12.6234161,15.2184491 11.8449062,15.2184491 C11.0663964,15.2184491 10.3973644,14.7643183 10.0810948,14.1033958 L4.80993411,14.1033958 C4.34769387,14.1033958 3.97060315,13.7263051 3.97060315,13.2640649 C3.97060315,12.8018246 4.34769387,12.4247339 4.80993411,12.4247339 L10.0851495,12.4247339 C10.4014192,11.7678662 11.0704511,11.3096807 11.848961,11.3096807 C12.6274709,11.3096807 13.2965028,11.7638115 13.6127724,12.4247339 L15.4941713,12.4247339 C15.9564116,12.4247339 16.3335347,12.8018246 16.3335347,13.2640649 C16.337557,13.7303599 15.9604663,14.1033958 15.4941713,14.1033958 Z M15.4941713,7.57121135 L9.95945262,7.57121135 C9.64318298,8.22807907 8.97415105,8.68626458 8.19564115,8.68626458 C7.41713125,8.68626458 6.74809933,8.23213381 6.4318297,7.57121135 L4.80993411,7.57121135 C4.34769387,7.57121135 3.97060315,7.19412063 3.97060315,6.73188038 C3.97060315,6.26964014 4.34769387,5.89254941 4.80993411,5.89254941 L6.43588444,5.89254941 C6.75215408,5.2356817 7.42118601,4.77749619 8.1996959,4.77749619 C8.97820578,4.77749619 9.64723771,5.23162695 9.96350735,5.89254941 L15.4941713,5.89254941 C15.9564116,5.89254941 16.3335347,6.26964014 16.3335347,6.73188038 C16.337557,7.19412061 15.9604663,7.57121134 15.4941713,7.57121135 Z" id="hy-icon-layout-sidenav-parameter-settings-形状" fill-rule="nonzero"></path>
|
|
6
|
+
</g>
|
|
7
|
+
</symbol>`,
|
|
8
|
+
};
|
package/es/version.mjs
CHANGED
|
@@ -90,7 +90,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
90
90
|
"reset",
|
|
91
91
|
"validate",
|
|
92
92
|
"submitting",
|
|
93
|
-
"submit"
|
|
93
|
+
"submit",
|
|
94
|
+
"onMinimized",
|
|
95
|
+
"onDialogMousedown"
|
|
94
96
|
], ["update:modelValue"]),
|
|
95
97
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
96
98
|
const emits = __emit;
|
|
@@ -100,6 +102,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
100
102
|
const isSubmitting = vue.ref(false);
|
|
101
103
|
const failedCount = vue.ref(0);
|
|
102
104
|
const failedStatus = vue.ref(null);
|
|
105
|
+
const HyDialogRef = vue.useTemplateRef("HyDialogRef");
|
|
106
|
+
function setDragLevelIndex(dragLevel) {
|
|
107
|
+
HyDialogRef.value.setDragLevelIndex(dragLevel);
|
|
108
|
+
}
|
|
109
|
+
function onMinimized(e) {
|
|
110
|
+
emits("onMinimized", e);
|
|
111
|
+
}
|
|
112
|
+
function onDialogMousedown(e) {
|
|
113
|
+
emits("onDialogMousedown", e);
|
|
114
|
+
}
|
|
103
115
|
async function show() {
|
|
104
116
|
visible.value = true;
|
|
105
117
|
showSubmit.value = false;
|
|
@@ -148,6 +160,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
148
160
|
}
|
|
149
161
|
__expose({
|
|
150
162
|
show,
|
|
163
|
+
setDragLevelIndex,
|
|
151
164
|
getTableDataSource: () => {
|
|
152
165
|
return batchTableFormRef.value.getTableDataSource();
|
|
153
166
|
},
|
|
@@ -160,6 +173,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
160
173
|
});
|
|
161
174
|
return (_ctx, _cache) => {
|
|
162
175
|
return vue.openBlock(), vue.createBlock(vue.unref(index.HyDialog), vue.mergeProps({
|
|
176
|
+
ref_key: "HyDialogRef",
|
|
177
|
+
ref: HyDialogRef,
|
|
163
178
|
modelValue: visible.value,
|
|
164
179
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
165
180
|
loading: isSubmitting.value,
|
|
@@ -172,7 +187,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
172
187
|
"show-cancel": !isSubmitting.value,
|
|
173
188
|
ifShrink: __props.ifShrink,
|
|
174
189
|
ifDraggable: __props.ifDraggable
|
|
175
|
-
}, _ctx.$attrs
|
|
190
|
+
}, _ctx.$attrs, {
|
|
191
|
+
onOnMinimized: onMinimized,
|
|
192
|
+
onOnDialogMousedown: onDialogMousedown
|
|
193
|
+
}), vue.createSlots({
|
|
176
194
|
"operate-left-box": vue.withCtx(() => [
|
|
177
195
|
failedCount.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
178
196
|
key: 0,
|
|
@@ -28,6 +28,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
28
28
|
type: String,
|
|
29
29
|
default: ""
|
|
30
30
|
},
|
|
31
|
+
operateClass: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
31
35
|
top: String,
|
|
32
36
|
// 是否可缩小化
|
|
33
37
|
ifShrink: { type: Boolean, default: false },
|
|
@@ -44,7 +48,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
44
48
|
default: "default"
|
|
45
49
|
},
|
|
46
50
|
cancelText: {
|
|
47
|
-
type: String
|
|
51
|
+
type: String,
|
|
52
|
+
default: () => {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
submitText: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: () => {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
48
61
|
},
|
|
49
62
|
showSubmit: {
|
|
50
63
|
type: Boolean,
|
|
@@ -60,9 +73,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
60
73
|
return "1000px";
|
|
61
74
|
}
|
|
62
75
|
},
|
|
63
|
-
submitText: {
|
|
64
|
-
type: String
|
|
65
|
-
},
|
|
66
76
|
onClose: Function,
|
|
67
77
|
onCancel: Function,
|
|
68
78
|
onSubmit: Function
|
|
@@ -263,47 +273,55 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
263
273
|
key: 0,
|
|
264
274
|
class: "flex items-center flex-row-reverse justify-between p-5 pr-[26px] mt-auto box-border"
|
|
265
275
|
}, [
|
|
266
|
-
vue.createElementVNode(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
vue.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
)
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
)
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
276
|
+
vue.createElementVNode(
|
|
277
|
+
"div",
|
|
278
|
+
{
|
|
279
|
+
class: vue.normalizeClass([__props.operateClass, "flex items-center"])
|
|
280
|
+
},
|
|
281
|
+
[
|
|
282
|
+
vue.renderSlot(_ctx.$slots, "operate", {}, () => [
|
|
283
|
+
__props.showCancel ? (vue.openBlock(), vue.createBlock(vue.unref(index.HyButton), {
|
|
284
|
+
key: 0,
|
|
285
|
+
type: __props.cancelType,
|
|
286
|
+
disabled: loading.value,
|
|
287
|
+
class: "!min-w-[120px]",
|
|
288
|
+
onMousedown: vue.withModifiers(() => {
|
|
289
|
+
}, ["stop"]),
|
|
290
|
+
onClick: onCancelHandler
|
|
291
|
+
}, {
|
|
292
|
+
default: vue.withCtx(() => [
|
|
293
|
+
vue.createTextVNode(
|
|
294
|
+
vue.toDisplayString(__props.cancelText || vue.unref(t)("dialog.cancel")),
|
|
295
|
+
1
|
|
296
|
+
/* TEXT */
|
|
297
|
+
)
|
|
298
|
+
]),
|
|
299
|
+
_: 1
|
|
300
|
+
/* STABLE */
|
|
301
|
+
}, 8, ["type", "disabled", "onMousedown"])) : vue.createCommentVNode("v-if", true),
|
|
302
|
+
__props.showSubmit ? (vue.openBlock(), vue.createBlock(vue.unref(index.HyButton), {
|
|
303
|
+
key: 1,
|
|
304
|
+
type: __props.submitType,
|
|
305
|
+
disabled: loading.value,
|
|
306
|
+
class: "!min-w-[120px]",
|
|
307
|
+
onClick: onSubmitHandler
|
|
308
|
+
}, {
|
|
309
|
+
default: vue.withCtx(() => [
|
|
310
|
+
vue.createTextVNode(
|
|
311
|
+
vue.toDisplayString(__props.submitText || vue.unref(t)("dialog.confirm")),
|
|
312
|
+
1
|
|
313
|
+
/* TEXT */
|
|
314
|
+
)
|
|
315
|
+
]),
|
|
316
|
+
_: 1
|
|
317
|
+
/* STABLE */
|
|
318
|
+
}, 8, ["type", "disabled"])) : vue.createCommentVNode("v-if", true)
|
|
319
|
+
]),
|
|
320
|
+
vue.renderSlot(_ctx.$slots, "operate-right-box")
|
|
321
|
+
],
|
|
322
|
+
2
|
|
323
|
+
/* CLASS */
|
|
324
|
+
),
|
|
307
325
|
vue.renderSlot(_ctx.$slots, "operate-left-box")
|
|
308
326
|
])) : vue.createCommentVNode("v-if", true)
|
|
309
327
|
])
|
|
@@ -107,7 +107,8 @@ const useAppTreeWrapper = (hy) => {
|
|
|
107
107
|
return false;
|
|
108
108
|
}
|
|
109
109
|
return false;
|
|
110
|
-
}
|
|
110
|
+
},
|
|
111
|
+
...props.treeProps
|
|
111
112
|
},
|
|
112
113
|
rowSelection: {
|
|
113
114
|
type: props.showCheckbox ? "checkbox" : "radio",
|
|
@@ -123,6 +124,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
123
124
|
cancelable: true,
|
|
124
125
|
// 选中回调
|
|
125
126
|
onCheckChange: (data, info, checked) => {
|
|
127
|
+
console.log("onCheckChange", info);
|
|
126
128
|
if (data.dataType === 3 && !checked) {
|
|
127
129
|
emits("on-click-delete", JSON.parse(JSON.stringify(data)));
|
|
128
130
|
} else if (data.dataType === 3) {
|
|
@@ -130,7 +132,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
130
132
|
}
|
|
131
133
|
emits(
|
|
132
134
|
"on-check-tree",
|
|
133
|
-
JSON.parse(
|
|
135
|
+
JSON.parse(
|
|
136
|
+
JSON.stringify(info.checkedBusinessNodes || info.checkedNodes)
|
|
137
|
+
)
|
|
134
138
|
);
|
|
135
139
|
}
|
|
136
140
|
},
|
|
@@ -138,7 +142,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
138
142
|
filterMethod: ({ filterValue: filterValue2 }, data) => {
|
|
139
143
|
let isFilter = true;
|
|
140
144
|
if (filterValue2) {
|
|
141
|
-
isFilter = isFilter && !!filterNodeMethod(data, filterValue2
|
|
145
|
+
isFilter = isFilter && !!filterNodeMethod(data, filterValue2, {
|
|
146
|
+
treeFilterParam: props.treeFilterParam
|
|
147
|
+
});
|
|
142
148
|
}
|
|
143
149
|
return isFilter;
|
|
144
150
|
},
|
|
@@ -371,23 +377,29 @@ const useAppTreeWrapper = (hy) => {
|
|
|
371
377
|
emits("on-addDevice");
|
|
372
378
|
}
|
|
373
379
|
function singleRemovalFn(row) {
|
|
374
|
-
if (props.treeType === "
|
|
375
|
-
virtualTree.setChecked(row.id, false, true);
|
|
376
|
-
} else {
|
|
380
|
+
if (props.treeType === "device") {
|
|
377
381
|
virtualTree.setChecked(row.deviceId, false, true);
|
|
382
|
+
} else if (props.treeType) {
|
|
383
|
+
virtualTree.setChecked(row.id, false, true);
|
|
384
|
+
} else if (!props.treeType && props.treeProps) {
|
|
385
|
+
virtualTree.setChecked(row[`${props.treeProps.value}`], false, true);
|
|
378
386
|
}
|
|
379
387
|
}
|
|
380
388
|
function setCheckedKeys(dataList) {
|
|
381
|
-
if (props.treeType === "
|
|
389
|
+
if (props.treeType === "device") {
|
|
382
390
|
virtualTree?.setCheckedKeys(
|
|
383
|
-
dataList.map((v) => v.
|
|
391
|
+
dataList.map((v) => v.deviceId),
|
|
384
392
|
true
|
|
385
393
|
);
|
|
386
|
-
} else {
|
|
394
|
+
} else if (props.treeType) {
|
|
387
395
|
virtualTree?.setCheckedKeys(
|
|
388
|
-
dataList.map((v) => v.
|
|
396
|
+
dataList.map((v) => v.id),
|
|
389
397
|
true
|
|
390
398
|
);
|
|
399
|
+
} else if (!props.treeType && props.treeProps) {
|
|
400
|
+
virtualTree?.setCheckedKeys(
|
|
401
|
+
dataList.map((v) => v[`${props.treeProps.value}`])
|
|
402
|
+
);
|
|
391
403
|
}
|
|
392
404
|
if (props.isBackDefaultSelected) {
|
|
393
405
|
setTimeout(() => {
|
|
@@ -397,10 +409,12 @@ const useAppTreeWrapper = (hy) => {
|
|
|
397
409
|
}
|
|
398
410
|
}
|
|
399
411
|
function setChecked(data, type) {
|
|
400
|
-
if (props.treeType === "
|
|
401
|
-
virtualTree?.setChecked(data.id, type, true);
|
|
402
|
-
} else {
|
|
412
|
+
if (props.treeType === "device") {
|
|
403
413
|
virtualTree?.setChecked(data.deviceId, type, true);
|
|
414
|
+
} else if (props.treeType) {
|
|
415
|
+
virtualTree?.setChecked(data.id, type, true);
|
|
416
|
+
} else if (!props.treeType && props.treeProps) {
|
|
417
|
+
virtualTree?.setChecked(data[`${props.treeProps.value}`], type, true);
|
|
404
418
|
}
|
|
405
419
|
}
|
|
406
420
|
function setSelectedOrg(deviceList) {
|
|
@@ -500,31 +514,46 @@ const useAppTreeWrapper = (hy) => {
|
|
|
500
514
|
getSelectedDataList
|
|
501
515
|
};
|
|
502
516
|
};
|
|
503
|
-
function filterNodeMethod(data, value, selectFilterType) {
|
|
517
|
+
function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [] }) {
|
|
504
518
|
let type = data.dataType;
|
|
519
|
+
if (selectFilterType) type = selectFilterType;
|
|
505
520
|
const includesValue = (field) => {
|
|
506
521
|
return field && field.toString().includes(value.toString());
|
|
507
522
|
};
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
523
|
+
if (!type) {
|
|
524
|
+
let filterType = false;
|
|
525
|
+
for (let i = 0; i < treeFilterParam.length; i++) {
|
|
526
|
+
const item = treeFilterParam[i];
|
|
527
|
+
if (!filterType) {
|
|
528
|
+
filterType = includesValue(data[`${item}`]);
|
|
529
|
+
if (filterType) {
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
514
532
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
533
|
+
}
|
|
534
|
+
return filterType;
|
|
535
|
+
} else {
|
|
536
|
+
switch (type) {
|
|
537
|
+
case 7:
|
|
538
|
+
if (data.typeName === "workOrderList") {
|
|
539
|
+
return includesValue(data.workTimeName);
|
|
540
|
+
} else {
|
|
541
|
+
return includesValue(data.dailyCheckName);
|
|
542
|
+
}
|
|
543
|
+
case 6:
|
|
544
|
+
return includesValue(data.deviceUserName) || includesValue(data.item?.deviceId);
|
|
545
|
+
case 5:
|
|
546
|
+
return includesValue(data.jobNum) || includesValue(data.name) || includesValue(data.phone);
|
|
547
|
+
case 4:
|
|
548
|
+
case 11:
|
|
549
|
+
return includesValue(data.groupName);
|
|
550
|
+
case 8:
|
|
551
|
+
return includesValue(data.sname);
|
|
552
|
+
case 3:
|
|
553
|
+
return includesValue(data.deviceId) || includesValue(data.devName) || includesValue(data.name) || includesValue(data.deviceCode) || includesValue(data.imei);
|
|
554
|
+
default:
|
|
555
|
+
return includesValue(data.companyName) || includesValue(data.orgName);
|
|
556
|
+
}
|
|
528
557
|
}
|
|
529
558
|
}
|
|
530
559
|
|
|
@@ -81,6 +81,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
81
81
|
return treeConfig.treeTypeConfig.device;
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
+
// 树形 props 类型 (treeType null时生效)
|
|
85
|
+
treeProps: {
|
|
86
|
+
type: Object,
|
|
87
|
+
default: () => {
|
|
88
|
+
return {};
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
// 树形 过滤参数 类型 (treeType null时生效)
|
|
92
|
+
treeFilterParam: {
|
|
93
|
+
type: Array,
|
|
94
|
+
default: () => {
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
},
|
|
84
98
|
// 是否显示通道节点的选择框
|
|
85
99
|
isShowChannelSelect: {
|
|
86
100
|
type: Boolean,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: 'hy-icon-layout-sidenav-parameter-settings',
|
|
3
|
+
symbol: `<symbol id="hy-icon-layout-sidenav-parameter-settings" viewBox="0 0 20 20">
|
|
4
|
+
<g id="hy-icon-layout-sidenav-parameter-settings-menu/ParameterSettings" stroke="none" stroke-width="1" fill-rule="evenodd">
|
|
5
|
+
<path d="M15.8266599,2 L4.1733401,2 C2.97313737,2 2,2.97313735 2,4.17334008 L2,15.8266599 C2,17.0268626 2.97313735,18 4.1733401,18 L15.8266599,18 C17.0268627,18 18,17.0268627 18,15.8266599 L18,4.17334008 C17.9959453,2.97313735 17.0228079,2 15.8266599,2 Z M15.4941713,14.1033958 L13.6087177,14.1033958 C13.2924481,14.7602636 12.6234161,15.2184491 11.8449062,15.2184491 C11.0663964,15.2184491 10.3973644,14.7643183 10.0810948,14.1033958 L4.80993411,14.1033958 C4.34769387,14.1033958 3.97060315,13.7263051 3.97060315,13.2640649 C3.97060315,12.8018246 4.34769387,12.4247339 4.80993411,12.4247339 L10.0851495,12.4247339 C10.4014192,11.7678662 11.0704511,11.3096807 11.848961,11.3096807 C12.6274709,11.3096807 13.2965028,11.7638115 13.6127724,12.4247339 L15.4941713,12.4247339 C15.9564116,12.4247339 16.3335347,12.8018246 16.3335347,13.2640649 C16.337557,13.7303599 15.9604663,14.1033958 15.4941713,14.1033958 Z M15.4941713,7.57121135 L9.95945262,7.57121135 C9.64318298,8.22807907 8.97415105,8.68626458 8.19564115,8.68626458 C7.41713125,8.68626458 6.74809933,8.23213381 6.4318297,7.57121135 L4.80993411,7.57121135 C4.34769387,7.57121135 3.97060315,7.19412063 3.97060315,6.73188038 C3.97060315,6.26964014 4.34769387,5.89254941 4.80993411,5.89254941 L6.43588444,5.89254941 C6.75215408,5.2356817 7.42118601,4.77749619 8.1996959,4.77749619 C8.97820578,4.77749619 9.64723771,5.23162695 9.96350735,5.89254941 L15.4941713,5.89254941 C15.9564116,5.89254941 16.3335347,6.26964014 16.3335347,6.73188038 C16.337557,7.19412061 15.9604663,7.57121134 15.4941713,7.57121135 Z" id="hy-icon-layout-sidenav-parameter-settings-形状" fill-rule="nonzero"></path>
|
|
6
|
+
</g>
|
|
7
|
+
</symbol>`,
|
|
8
|
+
};
|
package/lib/version.js
CHANGED