hy-dispatch-ui-v3 0.2.59 → 0.2.61
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 +131 -6
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/api/index.mjs +137 -0
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +365 -0
- package/es/bussiness/hyAddDepartmentType/index.mjs +6 -0
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/es/bussiness/index.mjs +1 -1
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -36
- package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +106 -43
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +358 -0
- package/es/components/hyForm/form.vue.mjs +83 -31
- package/es/components/hyForm/js/index.mjs +9 -2
- package/es/components/hyForm/js/useAppForm.mjs +6 -36
- package/es/components/hyMap/map.vue.mjs +3 -3
- package/es/components/hyMenu/menu.vue.mjs +38 -23
- package/es/components/hyMenu/style/menu.scss +3 -1
- package/es/components/hyOrgCascader/js/index.mjs +2 -2
- package/es/components/hyRadioGroup/index.mjs +6 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
- package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
- package/es/components/hySearch/js/useAppSearch.mjs +3 -33
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
- package/es/components/hyTable/js/index.mjs +6 -3
- package/es/components/hyTable/js/search.mjs +1 -0
- package/es/components/hyTable/table.vue.mjs +11 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
- package/es/components/hyTree/js/index.mjs +69 -53
- package/es/components/hyTree/tree.vue.mjs +36 -1
- package/es/components/hyVideoPlayer/js/index.mjs +0 -1
- package/es/components/index.mjs +1 -0
- package/es/hooks/useApi.mjs +2 -2
- package/es/hooks/useGlobalConfig.mjs +1 -1
- package/es/index.mjs +4 -1
- package/es/locale/en.mjs +17 -1
- package/es/locale/zh_CN.mjs +17 -1
- package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/es/style/index.scss +53 -0
- package/es/style/theme.scss +0 -53
- package/es/utils/form.mjs +56 -7
- package/es/utils/handler.mjs +5 -0
- package/es/utils/index.mjs +2 -1
- package/es/utils/map/hook/bigMap.mjs +4 -0
- package/es/utils/map/hook/gaode.mjs +3 -0
- package/es/utils/map/hook/leafletjs.mjs +10 -10
- package/es/utils/map/index.mjs +27 -7
- package/es/utils/tree.mjs +1 -0
- package/es/version.mjs +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
- package/lib/api/index.js +147 -0
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
- package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/lib/bussiness/index.js +5 -0
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
- package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
- package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
- package/lib/components/hyForm/form.vue.js +79 -27
- package/lib/components/hyForm/js/index.js +9 -1
- package/lib/components/hyForm/js/useAppForm.js +5 -35
- package/lib/components/hyMap/map.vue.js +3 -3
- package/lib/components/hyMenu/menu.vue.js +37 -22
- package/lib/components/hyMenu/style/menu.scss +3 -1
- package/lib/components/hyOrgCascader/js/index.js +2 -2
- package/lib/components/hyRadioGroup/index.js +11 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
- package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
- package/lib/components/hySearch/js/useAppSearch.js +2 -32
- package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
- package/lib/components/hyTable/js/index.js +6 -3
- package/lib/components/hyTable/js/search.js +1 -0
- package/lib/components/hyTable/table.vue.js +43 -36
- package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
- package/lib/components/hyTableForm/tableForm.vue.js +6 -0
- package/lib/components/hyTree/js/index.js +69 -53
- package/lib/components/hyTree/tree.vue.js +36 -1
- package/lib/components/hyVideoPlayer/js/index.js +0 -1
- package/lib/components/index.js +14 -12
- package/lib/hooks/useApi.js +2 -2
- package/lib/index.js +61 -49
- package/lib/locale/en.js +17 -1
- package/lib/locale/zh_CN.js +17 -1
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/lib/style/index.scss +53 -0
- package/lib/style/theme.scss +0 -53
- package/lib/utils/form.js +57 -5
- package/lib/utils/handler.js +5 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/map/hook/bigMap.js +4 -0
- package/lib/utils/map/hook/gaode.js +3 -0
- package/lib/utils/map/hook/leafletjs.js +10 -10
- package/lib/utils/map/index.js +26 -6
- package/lib/utils/tree.js +10 -0
- package/lib/version.js +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, nextTick, unref, openBlock, createBlock, mergeProps, withCtx, createElementVNode, normalizeStyle, createCommentVNode, createElementBlock, Fragment, renderList, normalizeClass, toDisplayString, createVNode, createSlots, renderSlot } from 'vue';
|
|
1
|
+
import { defineComponent, useTemplateRef, computed, ref, nextTick, unref, openBlock, createBlock, mergeProps, withCtx, createElementVNode, normalizeStyle, createCommentVNode, createElementBlock, Fragment, renderList, normalizeClass, toDisplayString, createVNode, createSlots, renderSlot } from 'vue';
|
|
2
2
|
import { ElForm, ElDivider } from 'element-plus';
|
|
3
|
-
import _sfc_main$
|
|
3
|
+
import _sfc_main$4 from './cpns/formItem.vue.mjs';
|
|
4
4
|
import _sfc_main$1 from './cpns/extraItem.vue.mjs';
|
|
5
5
|
import _sfc_main$2 from './cpns/arrayItem.vue.mjs';
|
|
6
|
-
import
|
|
6
|
+
import _sfc_main$3 from './cpns/locationSelect.vue.mjs';
|
|
7
|
+
import { columnShowHandler, columnItemStyle } from './js/index.mjs';
|
|
7
8
|
import { resetAppFormValue } from './js/useAppForm.mjs';
|
|
8
9
|
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
9
10
|
import { isArray, isNumber } from '../../utils/is.mjs';
|
|
@@ -49,7 +50,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
49
50
|
// 'large' | 'default' | 'small'
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
|
-
|
|
53
|
+
emits: ["on-allMapSelect"],
|
|
54
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
55
|
+
const emit = __emit;
|
|
53
56
|
const props = __props;
|
|
54
57
|
const { t } = useLocale();
|
|
55
58
|
const formTemplateRef = useTemplateRef("formTemplateRef");
|
|
@@ -69,6 +72,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
69
72
|
gridTemplateColumns: `repeat(${columnNum}, minmax(0, 1fr))`
|
|
70
73
|
};
|
|
71
74
|
});
|
|
75
|
+
const locationSelectRef = useTemplateRef("locationSelectRef");
|
|
76
|
+
const allMapSelect = ref(false);
|
|
77
|
+
function setMapSize() {
|
|
78
|
+
allMapSelect.value = !allMapSelect.value;
|
|
79
|
+
emit("on-allMapSelect", allMapSelect.value);
|
|
80
|
+
}
|
|
72
81
|
__expose({
|
|
73
82
|
validate: async (callback) => {
|
|
74
83
|
await nextTick();
|
|
@@ -100,6 +109,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
100
109
|
getField: async (fields) => {
|
|
101
110
|
await nextTick();
|
|
102
111
|
return unref(formTemplateRef).getField(fields);
|
|
112
|
+
},
|
|
113
|
+
setMarker: (latlng) => {
|
|
114
|
+
if (locationSelectRef.value) {
|
|
115
|
+
isArray(locationSelectRef.value) ? locationSelectRef.value.map((item) => item.setMarker(latlng)) : locationSelectRef.value.setMarker(latlng);
|
|
116
|
+
}
|
|
103
117
|
}
|
|
104
118
|
// setInitialValue: async (value) => {
|
|
105
119
|
// await nextTick()
|
|
@@ -121,7 +135,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
121
135
|
createElementVNode(
|
|
122
136
|
"div",
|
|
123
137
|
{
|
|
124
|
-
class: "hy-form-container",
|
|
138
|
+
class: "hy-form-container h-full",
|
|
125
139
|
style: normalizeStyle(containerStyle.value)
|
|
126
140
|
},
|
|
127
141
|
[
|
|
@@ -138,29 +152,40 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
138
152
|
[
|
|
139
153
|
createCommentVNode(" \u6807\u9898 "),
|
|
140
154
|
column.type === "title" ? (openBlock(), createElementBlock(
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
key: 0,
|
|
144
|
-
class: normalizeClass(["w-full flex items-center text-theme whitespace-nowrap relative mb-3 mt-1", [__props.size === "small" ? "text-xs" : "text-sm"]]),
|
|
145
|
-
style: normalizeStyle(unref(columnItemStyle)(props, column))
|
|
146
|
-
},
|
|
155
|
+
Fragment,
|
|
156
|
+
{ key: 0 },
|
|
147
157
|
[
|
|
148
|
-
|
|
149
|
-
"
|
|
150
|
-
{
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
unref(columnShowHandler)(props, column) ? (openBlock(), createElementBlock(
|
|
159
|
+
"div",
|
|
160
|
+
{
|
|
161
|
+
key: 0,
|
|
162
|
+
class: normalizeClass(["w-full flex items-center text-theme whitespace-nowrap relative mb-3 mt-1", [
|
|
163
|
+
__props.size === "small" ? "text-xs" : "text-sm",
|
|
164
|
+
allMapSelect.value ? "hidden" : ""
|
|
165
|
+
]]),
|
|
166
|
+
style: normalizeStyle(unref(columnItemStyle)(props, column))
|
|
167
|
+
},
|
|
168
|
+
[
|
|
169
|
+
createElementVNode(
|
|
170
|
+
"span",
|
|
171
|
+
{ class: "mr-2" },
|
|
172
|
+
toDisplayString(column.label),
|
|
173
|
+
1
|
|
174
|
+
/* TEXT */
|
|
175
|
+
),
|
|
176
|
+
createVNode(unref(ElDivider), {
|
|
177
|
+
"content-position": "left",
|
|
178
|
+
"border-style": "dashed",
|
|
179
|
+
class: "border-[rgba(var(--hy-theme),0.5)] my-0"
|
|
180
|
+
}),
|
|
181
|
+
createElementVNode("div", { class: "absolute top-1/2 -left-1.5 transform -translate-x-full -translate-y-1/2 w-0.5 h-3 bg-theme" })
|
|
182
|
+
],
|
|
183
|
+
6
|
|
184
|
+
/* CLASS, STYLE */
|
|
185
|
+
)) : createCommentVNode("v-if", true)
|
|
161
186
|
],
|
|
162
|
-
|
|
163
|
-
/*
|
|
187
|
+
64
|
|
188
|
+
/* STABLE_FRAGMENT */
|
|
164
189
|
)) : column.type === "extra" && !_ctx.$slots[column.slot] ? (openBlock(), createElementBlock(
|
|
165
190
|
Fragment,
|
|
166
191
|
{ key: 1 },
|
|
@@ -168,6 +193,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
168
193
|
createCommentVNode(" \u8865\u5145\u4FE1\u606F\u8868\u5355 "),
|
|
169
194
|
unref(columnShowHandler)(props, column) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
170
195
|
key: 0,
|
|
196
|
+
class: normalizeClass([allMapSelect.value ? "hidden" : ""]),
|
|
171
197
|
model: __props.model,
|
|
172
198
|
column,
|
|
173
199
|
rules: __props.rules,
|
|
@@ -188,7 +214,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
188
214
|
])
|
|
189
215
|
};
|
|
190
216
|
})
|
|
191
|
-
]), 1032, ["model", "column", "rules", "columnNum", "loading", "disabled", "readonly", "style"])) : createCommentVNode("v-if", true)
|
|
217
|
+
]), 1032, ["class", "model", "column", "rules", "columnNum", "loading", "disabled", "readonly", "style"])) : createCommentVNode("v-if", true)
|
|
192
218
|
],
|
|
193
219
|
64
|
|
194
220
|
/* STABLE_FRAGMENT */
|
|
@@ -199,6 +225,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
199
225
|
createCommentVNode(" \u8868\u5355\u6570\u7EC4 "),
|
|
200
226
|
unref(columnShowHandler)(props, column) ? (openBlock(), createBlock(_sfc_main$2, {
|
|
201
227
|
key: 0,
|
|
228
|
+
class: normalizeClass([allMapSelect.value ? "hidden" : ""]),
|
|
202
229
|
model: __props.model,
|
|
203
230
|
column,
|
|
204
231
|
rules: __props.rules,
|
|
@@ -220,16 +247,41 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
220
247
|
])
|
|
221
248
|
};
|
|
222
249
|
})
|
|
223
|
-
]), 1032, ["model", "column", "rules", "columnNum", "loading", "disabled", "readonly", "size", "style"])) : createCommentVNode("v-if", true)
|
|
250
|
+
]), 1032, ["class", "model", "column", "rules", "columnNum", "loading", "disabled", "readonly", "size", "style"])) : createCommentVNode("v-if", true)
|
|
224
251
|
],
|
|
225
252
|
64
|
|
226
253
|
/* STABLE_FRAGMENT */
|
|
227
|
-
)) : (openBlock(), createElementBlock(
|
|
254
|
+
)) : column.type === "location-select" ? (openBlock(), createElementBlock(
|
|
228
255
|
Fragment,
|
|
229
256
|
{ key: 3 },
|
|
257
|
+
[
|
|
258
|
+
unref(columnShowHandler)(props, column) ? (openBlock(), createBlock(_sfc_main$3, {
|
|
259
|
+
key: 0,
|
|
260
|
+
ref_for: true,
|
|
261
|
+
ref_key: "locationSelectRef",
|
|
262
|
+
ref: locationSelectRef,
|
|
263
|
+
model: __props.model,
|
|
264
|
+
column,
|
|
265
|
+
rules: __props.rules,
|
|
266
|
+
columnNum: __props.columnNum,
|
|
267
|
+
loading: __props.loading,
|
|
268
|
+
disabled: __props.disabled,
|
|
269
|
+
readonly: __props.readonly,
|
|
270
|
+
size: __props.size,
|
|
271
|
+
style: normalizeStyle(unref(columnItemStyle)(props, column)),
|
|
272
|
+
allMapSelect: allMapSelect.value,
|
|
273
|
+
onSetMapSize: setMapSize
|
|
274
|
+
}, null, 8, ["model", "column", "rules", "columnNum", "loading", "disabled", "readonly", "size", "style", "allMapSelect"])) : createCommentVNode("v-if", true)
|
|
275
|
+
],
|
|
276
|
+
64
|
|
277
|
+
/* STABLE_FRAGMENT */
|
|
278
|
+
)) : (openBlock(), createElementBlock(
|
|
279
|
+
Fragment,
|
|
280
|
+
{ key: 4 },
|
|
230
281
|
[
|
|
231
282
|
createCommentVNode(" \u8868\u5355 "),
|
|
232
|
-
createVNode(_sfc_main$
|
|
283
|
+
createVNode(_sfc_main$4, {
|
|
284
|
+
class: normalizeClass([allMapSelect.value ? "hidden" : ""]),
|
|
233
285
|
model: __props.model,
|
|
234
286
|
column,
|
|
235
287
|
rules: __props.rules,
|
|
@@ -248,7 +300,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
248
300
|
])
|
|
249
301
|
};
|
|
250
302
|
})
|
|
251
|
-
]), 1032, ["model", "column", "rules", "loading", "disabled", "readonly"])
|
|
303
|
+
]), 1032, ["class", "model", "column", "rules", "loading", "disabled", "readonly"])
|
|
252
304
|
],
|
|
253
305
|
64
|
|
254
306
|
/* STABLE_FRAGMENT */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unref } from 'vue';
|
|
2
|
+
import { isBoolean, isFunction, isNumber, isArray, isObject, isString } from '../../../utils/is.mjs';
|
|
2
3
|
import { funRunHandler } from '../../../utils/handler.mjs';
|
|
3
|
-
import { isNumber, isBoolean, isFunction, isArray, isObject, isString } from '../../../utils/is.mjs';
|
|
4
4
|
import { columnRuleHandler, getValueByProp } from '../../../utils/form.mjs';
|
|
5
5
|
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
6
6
|
|
|
@@ -15,6 +15,7 @@ function columnItemStyle(props, column) {
|
|
|
15
15
|
case "title":
|
|
16
16
|
case "extra":
|
|
17
17
|
case "array":
|
|
18
|
+
case "location-select":
|
|
18
19
|
style["grid-column"] = `span ${props.columnNum}`;
|
|
19
20
|
break;
|
|
20
21
|
}
|
|
@@ -27,6 +28,12 @@ function columnShowHandler(props, column) {
|
|
|
27
28
|
if (isFunction(show)) return show(column, props.model);
|
|
28
29
|
return true;
|
|
29
30
|
}
|
|
31
|
+
function columnVisibleHandler(props, column) {
|
|
32
|
+
const visible = unref(column.visible);
|
|
33
|
+
if (isBoolean(visible)) return visible;
|
|
34
|
+
if (isFunction(visible)) return visible(column, props.model);
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
30
37
|
function columnHelpHandler(props, column) {
|
|
31
38
|
const help = unref(column.help);
|
|
32
39
|
if (isString(help)) return help;
|
|
@@ -110,4 +117,4 @@ function optionsHandler(props, column) {
|
|
|
110
117
|
return [];
|
|
111
118
|
}
|
|
112
119
|
|
|
113
|
-
export { columnHelpHandler, columnItemStyle, columnShowHandler, isDisabled, isReadonly, isRequired, optionsHandler, renderAddLabel, renderArrayItemLabel, renderText };
|
|
120
|
+
export { columnHelpHandler, columnItemStyle, columnShowHandler, columnVisibleHandler, isDisabled, isReadonly, isRequired, optionsHandler, renderAddLabel, renderArrayItemLabel, renderText };
|
|
@@ -1,41 +1,11 @@
|
|
|
1
1
|
import { unref, toRef } from 'vue';
|
|
2
2
|
import { funRunHandler, mergeDeep } from '../../../utils/handler.mjs';
|
|
3
3
|
import { isArray } from '../../../utils/is.mjs';
|
|
4
|
-
import { genValueByProp } from '../../../utils/form.mjs';
|
|
5
|
-
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
4
|
+
import { genValueByProp, genColumnDefaultLabel } from '../../../utils/form.mjs';
|
|
6
5
|
|
|
7
|
-
const genDefaultLabel = (config) => {
|
|
8
|
-
if (config.label) return config.label;
|
|
9
|
-
const { t } = useLocale();
|
|
10
|
-
switch (config.type) {
|
|
11
|
-
// 部门级联选择框
|
|
12
|
-
case "org-cascader":
|
|
13
|
-
return t("form.department");
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
const genPlaceholderHandler = (config) => {
|
|
17
|
-
const { t } = useLocale();
|
|
18
|
-
const { type, label, attrs = {} } = config || {};
|
|
19
|
-
let placeholder = attrs.placeholder, startPlaceholder = attrs.startPlaceholder, endPlaceholder = attrs.endPlaceholder;
|
|
20
|
-
switch (type) {
|
|
21
|
-
case "input":
|
|
22
|
-
case "input-number":
|
|
23
|
-
placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
|
|
24
|
-
break;
|
|
25
|
-
case "select":
|
|
26
|
-
case "date-picker":
|
|
27
|
-
case "time-picker":
|
|
28
|
-
placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
|
|
29
|
-
break;
|
|
30
|
-
default:
|
|
31
|
-
placeholder = placeholder || label;
|
|
32
|
-
}
|
|
33
|
-
return { placeholder, startPlaceholder, endPlaceholder };
|
|
34
|
-
};
|
|
35
6
|
function appFormItemHandler(column = {}) {
|
|
36
|
-
const label =
|
|
37
|
-
const
|
|
38
|
-
const attrs = { ...column.attrs || {}, placeholder };
|
|
7
|
+
const label = genColumnDefaultLabel(column);
|
|
8
|
+
const attrs = { ...column.attrs || {} };
|
|
39
9
|
column = mergeDeep(
|
|
40
10
|
{ ...column },
|
|
41
11
|
{
|
|
@@ -55,7 +25,7 @@ function appFormItemHandler(column = {}) {
|
|
|
55
25
|
...attrs
|
|
56
26
|
}
|
|
57
27
|
};
|
|
58
|
-
} else if (/^(radio|checkbox|select)$/.test(column.type)) {
|
|
28
|
+
} else if (/^(radio|radio-group|checkbox|select)$/.test(column.type)) {
|
|
59
29
|
return {
|
|
60
30
|
...column,
|
|
61
31
|
attrs: {
|
|
@@ -69,7 +39,7 @@ function appFormItemHandler(column = {}) {
|
|
|
69
39
|
}
|
|
70
40
|
}
|
|
71
41
|
};
|
|
72
|
-
} else if (/^(extra)$/.test(column.type)) {
|
|
42
|
+
} else if (/^(extra)$/.test(column.type) || /^(location-select)$/.test(column.type)) {
|
|
73
43
|
return {
|
|
74
44
|
...column,
|
|
75
45
|
children: (column.children || []).map((item) => appFormItemHandler(item))
|
|
@@ -105,7 +75,7 @@ const resetAppFormValue = (columns = [], obj = {}) => {
|
|
|
105
75
|
const childValue = resetAppFormValue(item.children);
|
|
106
76
|
obj[item.prop] = [childValue];
|
|
107
77
|
}
|
|
108
|
-
} else if (item.type === "extra") {
|
|
78
|
+
} else if (item.type === "extra" || item.type === "location-select") {
|
|
109
79
|
resetAppFormValue(item.children, obj);
|
|
110
80
|
} else if (Array.isArray(item.prop)) {
|
|
111
81
|
for (let i = 0; i < item.prop.length; i++) {
|
|
@@ -16,7 +16,7 @@ const _sfc_main = {
|
|
|
16
16
|
type: Object,
|
|
17
17
|
default: () => ({})
|
|
18
18
|
},
|
|
19
|
-
// 地图类型 gaode
|
|
19
|
+
// 地图类型 gaode leafletjs bugMap
|
|
20
20
|
mapType: {
|
|
21
21
|
type: String,
|
|
22
22
|
default: "gaode"
|
|
@@ -27,7 +27,7 @@ const _sfc_main = {
|
|
|
27
27
|
const props = __props;
|
|
28
28
|
const emits = __emit;
|
|
29
29
|
const mapRef = ref();
|
|
30
|
-
const { newMap } = useMixins(
|
|
30
|
+
const { newMap, map, hyMap } = useMixins(
|
|
31
31
|
{
|
|
32
32
|
props,
|
|
33
33
|
emits,
|
|
@@ -39,7 +39,7 @@ const _sfc_main = {
|
|
|
39
39
|
newMap(props.mapType);
|
|
40
40
|
});
|
|
41
41
|
return (_ctx, _cache) => {
|
|
42
|
-
return openBlock(), createElementBlock("div", { class: "w-full h-full
|
|
42
|
+
return openBlock(), createElementBlock("div", { class: "w-full h-full box-border border-border border relative" }, [
|
|
43
43
|
createElementVNode(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useModel, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, unref, withCtx, withModifiers, createVNode, toDisplayString,
|
|
2
|
-
import { ElIcon } from 'element-plus';
|
|
3
|
-
import { Download } from '@element-plus/icons-vue';
|
|
1
|
+
import { defineComponent, useModel, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, unref, withCtx, withModifiers, createVNode, toDisplayString, createCommentVNode, mergeModels } from 'vue';
|
|
4
2
|
import { HyTooltip } from '../hyTooltip/index.mjs';
|
|
5
3
|
import { HyIcon } from '../hyIcon/index.mjs';
|
|
6
4
|
|
|
@@ -21,7 +19,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
21
19
|
},
|
|
22
20
|
showShrink: {
|
|
23
21
|
type: Boolean,
|
|
24
|
-
default:
|
|
22
|
+
default: true
|
|
25
23
|
}
|
|
26
24
|
}, {
|
|
27
25
|
"expand": { type: Boolean, default: true },
|
|
@@ -66,18 +64,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
66
64
|
}, [
|
|
67
65
|
createElementVNode("div", { class: "operator-label clickBox" }, [
|
|
68
66
|
createVNode(unref(HyIcon), {
|
|
69
|
-
"svg-name": `${item.iconName}`,
|
|
70
|
-
"class-name": "!w-
|
|
67
|
+
"svg-name": `${item.iconNameV3 || item.iconName}`,
|
|
68
|
+
"class-name": "!w-4 !h-4 flex-shrink-0"
|
|
71
69
|
}, null, 8, ["svg-name"]),
|
|
72
70
|
createElementVNode(
|
|
73
71
|
"div",
|
|
74
72
|
{
|
|
75
|
-
class: normalizeClass([{
|
|
73
|
+
class: normalizeClass([{
|
|
74
|
+
"ml-4 mr-3": expand.value,
|
|
75
|
+
"text-center mt-1": !expand.value
|
|
76
|
+
}, "over_one_line w-full"])
|
|
76
77
|
},
|
|
77
78
|
toDisplayString(expand.value ? item.label : item.tip || item.label),
|
|
78
79
|
3
|
|
79
80
|
/* TEXT, CLASS */
|
|
80
|
-
)
|
|
81
|
+
),
|
|
82
|
+
expand.value && __props.modelValue === item.path ? (openBlock(), createBlock(unref(HyIcon), {
|
|
83
|
+
key: 0,
|
|
84
|
+
"svg-name": "analytics-v3-card-bili",
|
|
85
|
+
class: "text-theme",
|
|
86
|
+
"class-name": "!w-3 !h-3 flex-shrink-0"
|
|
87
|
+
})) : createCommentVNode("v-if", true)
|
|
81
88
|
])
|
|
82
89
|
], 10, ["onClick"])
|
|
83
90
|
]),
|
|
@@ -91,23 +98,31 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
91
98
|
]),
|
|
92
99
|
__props.showShrink ? (openBlock(), createElementBlock("div", {
|
|
93
100
|
key: 0,
|
|
94
|
-
class: normalizeClass(["w-full h-[44px] border-t border-border box-border cursor-pointer relative", { "justify-end pr-3": expand.value, "justify-center": !expand.value }]),
|
|
101
|
+
class: normalizeClass(["w-full h-[44px] border-t border-border box-border cursor-pointer relative flex items-center", { "justify-end pr-3": expand.value, "justify-center": !expand.value }]),
|
|
95
102
|
onClick: ($event) => onExpandHandler()
|
|
96
103
|
}, [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
expand.value ? (openBlock(), createBlock(unref(HyIcon), {
|
|
105
|
+
key: 0,
|
|
106
|
+
"svg-name": "ops-linear-shouqi",
|
|
107
|
+
"class-name": "!w-4 !h-4 flex-shrink-0"
|
|
108
|
+
})) : (openBlock(), createBlock(unref(HyIcon), {
|
|
109
|
+
key: 1,
|
|
110
|
+
"svg-name": "ops-linear-zhankai",
|
|
111
|
+
"class-name": "!w-4 !h-4 flex-shrink-0"
|
|
112
|
+
})),
|
|
113
|
+
createCommentVNode(" <el-icon"),
|
|
114
|
+
createCommentVNode(' size="20"'),
|
|
115
|
+
createCommentVNode(' :style="{'),
|
|
116
|
+
createCommentVNode(" transform: expand"),
|
|
117
|
+
createCommentVNode(" ? 'translate(0px, -50%) rotateY(0deg) rotateZ(90deg)'"),
|
|
118
|
+
createCommentVNode(" : 'translate(50%, -50%) rotateY(-180deg) rotateZ(90deg)',"),
|
|
119
|
+
createCommentVNode(" transition: 'all 0.3s linear',"),
|
|
120
|
+
createCommentVNode(' }"'),
|
|
121
|
+
createCommentVNode(' class="absolute top-1/2"'),
|
|
122
|
+
createCommentVNode(` :class="{ 'right-3': expand, 'right-1/2': !expand }"`),
|
|
123
|
+
createCommentVNode(" >"),
|
|
124
|
+
createCommentVNode(" <Download />"),
|
|
125
|
+
createCommentVNode(" </el-icon>")
|
|
111
126
|
], 10, ["onClick"])) : createCommentVNode("v-if", true)
|
|
112
127
|
],
|
|
113
128
|
2
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
left: 0;
|
|
54
54
|
top: 50%;
|
|
55
55
|
transform: translateY(-50%);
|
|
56
|
+
border-radius: 10px;
|
|
56
57
|
background-color: rgba(var(--hy-theme));
|
|
57
58
|
}
|
|
58
59
|
.operator-label {
|
|
@@ -115,6 +116,7 @@
|
|
|
115
116
|
left: 0;
|
|
116
117
|
top: 50%;
|
|
117
118
|
transform: translateY(-50%);
|
|
119
|
+
border-radius: 10px;
|
|
118
120
|
background-color: rgba(var(--hy-theme));
|
|
119
121
|
}
|
|
120
122
|
.operator-label {
|
|
@@ -138,7 +140,7 @@
|
|
|
138
140
|
rgba(var(--hy-theme), 0) 2%,
|
|
139
141
|
rgba(var(--hy-theme), 0.4) 100%
|
|
140
142
|
);
|
|
141
|
-
border-radius: 0px 4px 4px 0px;
|
|
143
|
+
//border-radius: 0px 4px 4px 0px;
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Axios from 'axios';
|
|
2
2
|
import { unref } from 'vue';
|
|
3
3
|
import { useApi } from '../../../hooks/useApi.mjs';
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ function getOrgTreeSimple() {
|
|
|
10
10
|
if (cancelSource) {
|
|
11
11
|
cancelSource.cancel("\u4E2D\u65AD\u8BF7\u6C42");
|
|
12
12
|
}
|
|
13
|
-
cancelSource =
|
|
13
|
+
cancelSource = Axios.CancelToken.source();
|
|
14
14
|
throttleFn = new Promise((resolve, reject) => {
|
|
15
15
|
unref(api).post(
|
|
16
16
|
"organization/orgTreeSimple",
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { useModel, useTemplateRef, ref, computed, watch, openBlock, createElementBlock, normalizeClass, Fragment, renderList, renderSlot, createTextVNode, toDisplayString, normalizeStyle, createCommentVNode, mergeModels, defineComponent, nextTick } from 'vue';
|
|
2
|
+
|
|
3
|
+
import "./style/radioGroup.scss";
|
|
4
|
+
|
|
5
|
+
const __default__ = defineComponent({
|
|
6
|
+
name: "HyRadioGroup"
|
|
7
|
+
});
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
9
|
+
props: /* @__PURE__ */ mergeModels({
|
|
10
|
+
options: {
|
|
11
|
+
type: Array,
|
|
12
|
+
default: () => []
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: () => ({})
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "default"
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
"modelValue": {
|
|
24
|
+
type: [String, Number, Boolean]
|
|
25
|
+
},
|
|
26
|
+
"modelModifiers": {}
|
|
27
|
+
}),
|
|
28
|
+
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
29
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const emits = __emit;
|
|
32
|
+
const modelValue = useModel(__props, "modelValue");
|
|
33
|
+
const sliderRef = useTemplateRef("sliderRef");
|
|
34
|
+
const selectIndex = ref(0);
|
|
35
|
+
const radioProps = computed(() => {
|
|
36
|
+
return {
|
|
37
|
+
value: "value",
|
|
38
|
+
label: "label",
|
|
39
|
+
disabled: "disabled",
|
|
40
|
+
...props.props || {}
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
function switchSelect(target) {
|
|
44
|
+
modelValue.value = target[radioProps.value.value];
|
|
45
|
+
emits("change", modelValue.value);
|
|
46
|
+
}
|
|
47
|
+
async function sliderHandler() {
|
|
48
|
+
selectIndex.value = props.options.findIndex((item) => {
|
|
49
|
+
return item[radioProps.value.value] === modelValue.value;
|
|
50
|
+
});
|
|
51
|
+
await nextTick();
|
|
52
|
+
const slider = sliderRef.value;
|
|
53
|
+
if (slider) {
|
|
54
|
+
const proportion = 100 / props.options.length;
|
|
55
|
+
const left = selectIndex.value > 0 ? selectIndex.value * proportion : 0;
|
|
56
|
+
console.log("proportion", proportion, left, selectIndex.value);
|
|
57
|
+
slider.style.left = `${left}%`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
watch(
|
|
61
|
+
() => [modelValue.value, props.options],
|
|
62
|
+
() => {
|
|
63
|
+
sliderHandler();
|
|
64
|
+
},
|
|
65
|
+
{ immediate: true }
|
|
66
|
+
);
|
|
67
|
+
__expose({});
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return openBlock(), createElementBlock(
|
|
70
|
+
"ul",
|
|
71
|
+
{
|
|
72
|
+
class: normalizeClass(["w-full flex text-xs rounded border border-border box-border relative", [
|
|
73
|
+
__props.size === "large" ? "h-[40px]" : __props.size === "small" ? "h-[24px]" : "h-[32px]",
|
|
74
|
+
__props.size === "small" ? "text-xs" : "text-sm"
|
|
75
|
+
]])
|
|
76
|
+
},
|
|
77
|
+
[
|
|
78
|
+
(openBlock(true), createElementBlock(
|
|
79
|
+
Fragment,
|
|
80
|
+
null,
|
|
81
|
+
renderList(__props.options, (item, index) => {
|
|
82
|
+
return openBlock(), createElementBlock("li", {
|
|
83
|
+
key: index,
|
|
84
|
+
class: "w-0 flex-1 flex items-center justify-center text-main clickBox",
|
|
85
|
+
onClick: ($event) => switchSelect(item)
|
|
86
|
+
}, [
|
|
87
|
+
renderSlot(_ctx.$slots, "default", {
|
|
88
|
+
item,
|
|
89
|
+
index
|
|
90
|
+
}, () => [
|
|
91
|
+
createTextVNode(
|
|
92
|
+
toDisplayString(item[radioProps.value.label]),
|
|
93
|
+
1
|
|
94
|
+
/* TEXT */
|
|
95
|
+
)
|
|
96
|
+
])
|
|
97
|
+
], 8, ["onClick"]);
|
|
98
|
+
}),
|
|
99
|
+
128
|
|
100
|
+
/* KEYED_FRAGMENT */
|
|
101
|
+
)),
|
|
102
|
+
selectIndex.value >= 0 ? (openBlock(), createElementBlock(
|
|
103
|
+
"li",
|
|
104
|
+
{
|
|
105
|
+
key: 0,
|
|
106
|
+
ref_key: "sliderRef",
|
|
107
|
+
ref: sliderRef,
|
|
108
|
+
class: "slider rounded box-border absolute h-full top-0 left-0 z-0 duration-500 border border-theme shadow-[0_0_6px_0] shadow-theme",
|
|
109
|
+
style: normalizeStyle([{ width: `calc(100% / ${__props.options.length})` }, { "background": "linear-gradient(180deg, #2a4968 0%, #0ea0bb 100%)" }])
|
|
110
|
+
},
|
|
111
|
+
null,
|
|
112
|
+
4
|
|
113
|
+
/* STYLE */
|
|
114
|
+
)) : createCommentVNode("v-if", true)
|
|
115
|
+
],
|
|
116
|
+
2
|
|
117
|
+
/* CLASS */
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
export { _sfc_main as default };
|
|
File without changes
|