hy-dispatch-ui-v3 0.2.74 → 0.2.76

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.
Files changed (54) hide show
  1. package/dist/tailwind.css +12 -12
  2. package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation.vue.mjs +6 -0
  3. package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation2.vue.mjs +352 -0
  4. package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong.vue.mjs +6 -0
  5. package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong2.vue.mjs +352 -0
  6. package/es/bussiness/hyDepartmentTypeOperation/index.mjs +8 -0
  7. package/es/bussiness/hyDepartmentTypeOperation/locale/en_US.mjs +15 -0
  8. package/es/bussiness/hyDepartmentTypeOperation/locale/index.mjs +2 -0
  9. package/es/bussiness/hyDepartmentTypeOperation/locale/zh_CN.mjs +15 -0
  10. package/es/bussiness/hyDepartmentTypeOperation/style/departmentTypeOperation.scss +58 -0
  11. package/es/bussiness/hyDepartmentTypeOperation/tiantong.mjs +8 -0
  12. package/es/bussiness/index.mjs +2 -1
  13. package/es/components/hyCutter/cutter.vue.mjs +18 -6
  14. package/es/components/hyOrgCascader/js/index.mjs +2 -2
  15. package/es/components-map.mjs +12 -0
  16. package/es/hooks/index.mjs +1 -1
  17. package/es/hooks/useApi.mjs +2 -2
  18. package/es/hooks/useDialog.mjs +1 -1
  19. package/es/hooks/useGlobalConfig.mjs +3 -0
  20. package/es/hooks/useLocale.mjs +29 -1
  21. package/es/index.mjs +3 -2
  22. package/es/utils/handler.mjs +0 -1
  23. package/es/version.mjs +1 -1
  24. package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation.vue.js +10 -0
  25. package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation2.vue.js +356 -0
  26. package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong.vue.js +10 -0
  27. package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong2.vue.js +356 -0
  28. package/lib/bussiness/hyDepartmentTypeOperation/index.js +13 -0
  29. package/lib/bussiness/hyDepartmentTypeOperation/locale/en_US.js +19 -0
  30. package/lib/bussiness/hyDepartmentTypeOperation/locale/index.js +9 -0
  31. package/lib/bussiness/hyDepartmentTypeOperation/locale/zh_CN.js +19 -0
  32. package/lib/bussiness/hyDepartmentTypeOperation/style/departmentTypeOperation.scss +58 -0
  33. package/lib/bussiness/hyDepartmentTypeOperation/tiantong.js +13 -0
  34. package/lib/bussiness/index.js +9 -7
  35. package/lib/components/hyCutter/cutter.vue.js +18 -6
  36. package/lib/components/hyOrgCascader/js/index.js +2 -2
  37. package/lib/components-map.js +12 -0
  38. package/lib/hooks/index.js +2 -0
  39. package/lib/hooks/useApi.js +2 -2
  40. package/lib/hooks/useDialog.js +1 -1
  41. package/lib/hooks/useGlobalConfig.js +3 -0
  42. package/lib/hooks/useLocale.js +30 -0
  43. package/lib/index.js +28 -24
  44. package/lib/utils/handler.js +0 -1
  45. package/lib/version.js +1 -1
  46. package/package.json +70 -6
  47. package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
  48. package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +0 -367
  49. package/es/bussiness/hyAddDepartmentType/index.mjs +0 -7
  50. package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +0 -31
  51. package/lib/_virtual/_plugin-vue_export-helper.js +0 -13
  52. package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +0 -371
  53. package/lib/bussiness/hyAddDepartmentType/index.js +0 -12
  54. package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +0 -31
package/es/index.mjs CHANGED
@@ -3,14 +3,13 @@ import './utils/index.mjs';
3
3
  import './components/index.mjs';
4
4
  import './bussiness/index.mjs';
5
5
  import './hooks/index.mjs';
6
- export { $t, buildLocaleContext, buildTranslator, getLang, getLanguage, lang, localeContextKey, setLang, translate, useLocale } from './hooks/useLocale.mjs';
6
+ export { $t, buildLocaleContext, buildTranslator, getLang, getLanguage, lang, localeContextKey, registerComponentLocale, setLang, translate, unregisterComponentLocale, useLocale } from './hooks/useLocale.mjs';
7
7
  export { ElDatePicker, HyDatePicker } from './components/hyDatePicker/index.mjs';
8
8
  export { ElInput, HyInput, HyInputSearch } from './components/hyInput/index.mjs';
9
9
  export { ElLoading, ElLoading as HyLoading } from './components/hyLoading/index.mjs';
10
10
  export { ElTimePicker, HyTimePicker } from './components/hyTimePicker/index.mjs';
11
11
  export { ElTooltip, HyTooltip } from './components/hyTooltip/index.mjs';
12
12
  export { HyAcquisitionStationTree } from './bussiness/hyAcquisitionStationTree/index.mjs';
13
- export { HyAddDepartmentType } from './bussiness/hyAddDepartmentType/index.mjs';
14
13
  export { HyAddElectronicFenceDialog, HyBatchSetElectronicFenceUserDialog, HyElectronicFence, HyElectronicFenceAssociatedUsersDialog } from './bussiness/hyElectronicFence/index.mjs';
15
14
  export { HyAudioPlayer } from './components/hyAudioPlayer/index.mjs';
16
15
  export { HyBatchTableForm, HyTableForm } from './components/hyTableForm/index.mjs';
@@ -20,6 +19,8 @@ export { HyCheckboxGroup } from './components/hyCheckboxGroup/index.mjs';
20
19
  export { HyConfigProvider } from './components/hyConfigProvider/index.mjs';
21
20
  export { HyConfirmDialog } from './components/hyConfirmDialog/index.mjs';
22
21
  export { HyCutter } from './components/hyCutter/index.mjs';
22
+ export { HyDepartmentTypeOperation } from './bussiness/hyDepartmentTypeOperation/index.mjs';
23
+ export { HyDepartmentTypeOperationTiantonmg } from './bussiness/hyDepartmentTypeOperation/tiantong.mjs';
23
24
  export { HyDeviceTree } from './bussiness/hyDeviceTree/index.mjs';
24
25
  export { HyDialog } from './components/hyDialog/index.mjs';
25
26
  export { HyDrawer } from './components/hyDrawer/index.mjs';
@@ -1,7 +1,6 @@
1
1
  import 'vue';
2
2
  import { ElMessage } from 'element-plus';
3
3
  import { isFunction, isVueProxy, isArray, isObject, isEmpty } from './is.mjs';
4
- import '../index.mjs';
5
4
  import { $t } from '../hooks/useLocale.mjs';
6
5
 
7
6
  function funRunHandler(target, ...args) {
package/es/version.mjs CHANGED
@@ -1,3 +1,3 @@
1
- const version = "0.2.73";
1
+ const version = "0.2.75";
2
2
 
3
3
  export { version };
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var departmentTypeOperation_vue_vue_type_script_setup_true_lang = require('./departmentTypeOperation2.vue.js');
6
+
7
+ import "./style/departmentTypeOperation.scss?vue&type=style&index=0&src=true&lang.css";
8
+
9
+
10
+ exports.default = departmentTypeOperation_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,356 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ var useDialog = require('../../hooks/useDialog.js');
7
+ require('../../hooks/index.js');
8
+ require('../../components/index.js');
9
+ var elementPlus = require('element-plus');
10
+ var index$1 = require('../../api/index.js');
11
+ require('../../utils/index.js');
12
+ var index = require('./locale/index.js');
13
+ var useLocale = require('../../hooks/useLocale.js');
14
+ var useCurrentBus = require('../../hooks/useCurrentBus.js');
15
+ var useAppForm = require('../../components/hyForm/js/useAppForm.js');
16
+ var file = require('../../utils/file.js');
17
+ var useMixins = require('../../hooks/useMixins.js');
18
+ var index$2 = require('../../components/hyDialog/index.js');
19
+ var index$3 = require('../../components/hyForm/index.js');
20
+ var index$4 = require('../../components/hyIcon/index.js');
21
+ var index$5 = require('../../components/hyCutter/index.js');
22
+
23
+ const __default__ = vue.defineComponent({
24
+ name: "HyDepartmentTypeOperation"
25
+ });
26
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
27
+ ...__default__,
28
+ emits: ["on-submit"],
29
+ setup(__props, { expose: __expose, emit: __emit }) {
30
+ useLocale.registerComponentLocale("HyDepartmentTypeOperation", index);
31
+ vue.onUnmounted(() => {
32
+ useLocale.unregisterComponentLocale("HyDepartmentTypeOperation");
33
+ });
34
+ const $t = (key, option) => useLocale.$t(`HyDepartmentTypeOperation.${key}`, option);
35
+ const emit = __emit;
36
+ function useDepartmentTypeOperation(hy) {
37
+ const { currentBus } = useCurrentBus.useCurrentBus();
38
+ const formRef2 = vue.ref(null);
39
+ const HyCutterRef2 = vue.useTemplateRef("HyCutterRef");
40
+ const HyDialogRef2 = vue.useTemplateRef("HyDialogRef");
41
+ const dialogVisible2 = vue.ref(false);
42
+ const loading2 = vue.ref(false);
43
+ const { formModel: formModel2, formColumns: formColumns2 } = useAppForm.useAppForm([
44
+ // 自定义插槽
45
+ {
46
+ span: 12,
47
+ prop: "companyName",
48
+ label: $t("departmentIcon"),
49
+ slot: "companyNameSlot"
50
+ },
51
+ // 输入框
52
+ {
53
+ span: 12,
54
+ type: "input",
55
+ prop: "typeName",
56
+ required: true,
57
+ label: $t("departmentTypeName"),
58
+ attrs: {
59
+ placeholder: $t("pleaseEnterTheDepartmentTypeName"),
60
+ clearable: true
61
+ }
62
+ }
63
+ ]);
64
+ function beforeAvatarUpload2(file) {
65
+ const width = 44;
66
+ const height = 44;
67
+ const _this = this;
68
+ const isLt2M = file.size / 1024 / 1024 < 2;
69
+ if (!isLt2M) {
70
+ elementPlus.ElMessage.error($t("imageUploadFailedLogoSizeWithin2M"));
71
+ return false;
72
+ }
73
+ hy.HyCutterRef.value.open({
74
+ file,
75
+ options: {
76
+ outputType: "png",
77
+ // 裁剪生成图片的格式
78
+ canScale: true,
79
+ // 图片是否允许滚轮缩放
80
+ fixedBox: true,
81
+ // 固定截图框大小 不允许改变
82
+ infoTrue: false,
83
+ // 是否开启截图框宽高固定比例
84
+ autoCropWidth: width,
85
+ autoCropHeight: height,
86
+ centerBox: false,
87
+ original: true,
88
+ fixed: false
89
+ },
90
+ onSubmit: (res) => {
91
+ hy.setHeadImg(res);
92
+ }
93
+ });
94
+ return false;
95
+ }
96
+ function setHeadImg2(res) {
97
+ if (!res) {
98
+ res = {
99
+ url: null,
100
+ key: null
101
+ };
102
+ }
103
+ hy.formModel.value.icon = res.url;
104
+ hy.formModel.value.iconKey = res.key;
105
+ }
106
+ async function handleHttpRequestImg2(object) {
107
+ await file.fileUpload(object.file).then((url) => {
108
+ hy.formModel.value.icon = url;
109
+ });
110
+ }
111
+ async function onSubmit2() {
112
+ const valid = await hy.formRef.value.validate();
113
+ if (!valid) throw new Error("Validation failed");
114
+ if (!hy.formModel.value.icon) {
115
+ hy.formModel.value.iconKey = null;
116
+ }
117
+ const res = await index$1.saveApi("organization/orgType", {
118
+ ...hy.formModel.value,
119
+ icon: null
120
+ });
121
+ if (!res || res.code !== 200) throw new Error(res?.msg || "Operation failed");
122
+ hy.dialogVisible.value = false;
123
+ elementPlus.ElMessage.success($t("operationSuccessful"));
124
+ vue.nextTick(() => {
125
+ emit("on-submit", hy.formModel.value.id ? null : 1);
126
+ currentBus.emit("departmentTypeOperation", {
127
+ method: "onSubmit",
128
+ param: hy.formModel.value.id ? null : 1
129
+ });
130
+ });
131
+ }
132
+ async function onClose2() {
133
+ await hy.watchPause("close");
134
+ hy.dialogVisible.value = false;
135
+ }
136
+ async function show2(row = {}) {
137
+ if (hy.loading.value) {
138
+ elementPlus.ElMessage.error("\u6570\u636E\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u52FF\u91CD\u590D\u70B9\u51FB");
139
+ return;
140
+ }
141
+ await hy.watchPause();
142
+ hy.loading.value = true;
143
+ hy.setDragLevelIndex("HyDialogRef");
144
+ hy.dialogVisible.value = true;
145
+ if (row && row.id) {
146
+ hy.formModel.value = { ...row };
147
+ } else {
148
+ hy.formModel.value = {
149
+ icon: null,
150
+ typeName: null
151
+ };
152
+ }
153
+ vue.nextTick(() => {
154
+ hy.formRef.value.clearValidate();
155
+ hy.loading.value = false;
156
+ hy.watchResume();
157
+ });
158
+ }
159
+ function getCacheData2() {
160
+ return {
161
+ formModel: hy.formModel.value
162
+ };
163
+ }
164
+ async function restoreCache2(data = {}) {
165
+ hy.formModel.value = {
166
+ ...data.formModel
167
+ };
168
+ hy.dialogVisible.value = true;
169
+ }
170
+ return {
171
+ formRef: formRef2,
172
+ HyCutterRef: HyCutterRef2,
173
+ HyDialogRef: HyDialogRef2,
174
+ dialogVisible: dialogVisible2,
175
+ loading: loading2,
176
+ beforeAvatarUpload: beforeAvatarUpload2,
177
+ setHeadImg: setHeadImg2,
178
+ handleHttpRequestImg: handleHttpRequestImg2,
179
+ onSubmit: onSubmit2,
180
+ onClose: onClose2,
181
+ show: show2,
182
+ getCacheData: getCacheData2,
183
+ restoreCache: restoreCache2,
184
+ formModel: formModel2,
185
+ formColumns: formColumns2
186
+ };
187
+ }
188
+ const {
189
+ HyCutterRef,
190
+ HyDialogRef,
191
+ beforeAvatarUpload,
192
+ confirmReplace,
193
+ dialogVisible,
194
+ formColumns,
195
+ formModel,
196
+ formRef,
197
+ getCacheData,
198
+ getIsEdit,
199
+ handleHttpRequestImg,
200
+ instance,
201
+ isEdit,
202
+ isWatchForm,
203
+ loading,
204
+ minimized,
205
+ minimizedClose,
206
+ minimizedRemove,
207
+ minimizedShow,
208
+ minimizedTitle,
209
+ onClose,
210
+ onMinimized,
211
+ onSubmit,
212
+ restoreCache,
213
+ setDragLevelIndex,
214
+ setHeadImg,
215
+ setIsEdit,
216
+ setWatchResume,
217
+ show,
218
+ watchPause,
219
+ watchResume
220
+ } = useMixins.useMixins({}, [useDialog.useDialog, useDialog.useDialogIsEdit, useDepartmentTypeOperation]);
221
+ __expose({
222
+ show,
223
+ setIsEdit,
224
+ minimizedShow
225
+ });
226
+ return (_ctx, _cache) => {
227
+ const _component_el_image = vue.resolveComponent("el-image");
228
+ const _component_el_upload = vue.resolveComponent("el-upload");
229
+ return vue.openBlock(), vue.createElementBlock(
230
+ vue.Fragment,
231
+ null,
232
+ [
233
+ vue.createTextVNode(" 111111111 "),
234
+ vue.createVNode(vue.unref(index$2.HyDialog), vue.mergeProps({
235
+ ref_key: "HyDialogRef",
236
+ ref: HyDialogRef,
237
+ modelValue: vue.unref(dialogVisible),
238
+ "onUpdate:modelValue": ($event) => vue.isRef(dialogVisible) ? dialogVisible.value = $event : null,
239
+ loading: vue.unref(loading),
240
+ "onUpdate:loading": ($event) => vue.isRef(loading) ? loading.value = $event : null,
241
+ "if-shrink": true,
242
+ width: "310px"
243
+ }, _ctx.$attrs, {
244
+ title: vue.unref(formModel).id ? $t("editDepartmentType") : $t("addDepartmentType"),
245
+ "on-submit": vue.unref(onSubmit),
246
+ "on-cancel": vue.unref(onClose),
247
+ "on-close": vue.unref(onClose),
248
+ "operate-class": "w-full justify-center",
249
+ onOnMinimized: vue.unref(onMinimized),
250
+ onOnDialogMousedown: ($event) => vue.unref(setDragLevelIndex)("HyDialogRef")
251
+ }), {
252
+ default: vue.withCtx(() => [
253
+ vue.createVNode(vue.unref(index$3.HyForm), {
254
+ ref_key: "formRef",
255
+ ref: formRef,
256
+ "column-num": 1,
257
+ model: vue.unref(formModel),
258
+ columns: vue.unref(formColumns)
259
+ }, {
260
+ companyNameSlot: vue.withCtx(() => [
261
+ vue.createElementVNode("div", { class: "flex flex-row departmentTypeOperation" }, [
262
+ vue.createVNode(_component_el_upload, {
263
+ class: "w-[80px] flex items-center justify-center upload_box",
264
+ accept: ".png,.jpg,.gif",
265
+ "before-upload": vue.unref(beforeAvatarUpload),
266
+ "http-request": vue.unref(handleHttpRequestImg),
267
+ action: "",
268
+ "show-file-list": false
269
+ }, {
270
+ default: vue.withCtx(() => [
271
+ vue.withDirectives(vue.createElementVNode("div", {
272
+ class: "delete_box flex items-center justify-center",
273
+ onClick: vue.withModifiers(($event) => vue.unref(setHeadImg)(null), ["stop"])
274
+ }, [
275
+ vue.createVNode(vue.unref(index$4.HyIcon), {
276
+ "svg-name": "ops-button-delete",
277
+ class: "svg_box"
278
+ })
279
+ ], 8, ["onClick"]), [
280
+ [vue.vShow, vue.unref(formModel).icon]
281
+ ]),
282
+ vue.createElementVNode("div", { class: "click-box emptyHead" }, [
283
+ vue.unref(formModel).icon ? (vue.openBlock(), vue.createBlock(_component_el_image, {
284
+ key: 0,
285
+ fit: "contain",
286
+ class: "w-[60px] h-[60px]",
287
+ src: vue.unref(formModel).icon
288
+ }, null, 8, ["src"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.HyIcon), {
289
+ key: 1,
290
+ "svg-name": "ops-file-empty-head",
291
+ class: "text-auxiliary !w-[60px] !h-[60px]"
292
+ })),
293
+ vue.createElementVNode(
294
+ "span",
295
+ { class: "uploadTips text-center" },
296
+ vue.toDisplayString($t("upload")),
297
+ 1
298
+ /* TEXT */
299
+ )
300
+ ])
301
+ ]),
302
+ _: 1
303
+ /* STABLE */
304
+ }, 8, ["before-upload", "http-request"]),
305
+ vue.createElementVNode("div", { class: "flex-grow leading-[20px] text-auxiliary text-xs text-center" }, [
306
+ vue.createElementVNode(
307
+ "div",
308
+ null,
309
+ vue.toDisplayString($t("pleaseUploadDepartmentTypeIcon")),
310
+ 1
311
+ /* TEXT */
312
+ ),
313
+ vue.createElementVNode(
314
+ "div",
315
+ null,
316
+ vue.toDisplayString($t("iconSize44px")) + "*44px",
317
+ 1
318
+ /* TEXT */
319
+ ),
320
+ vue.createElementVNode(
321
+ "div",
322
+ null,
323
+ vue.toDisplayString($t("ifNoIconUseTheDefaultIcon")),
324
+ 1
325
+ /* TEXT */
326
+ )
327
+ ])
328
+ ])
329
+ ]),
330
+ _: 1
331
+ /* STABLE */
332
+ }, 8, ["model", "columns"]),
333
+ vue.createVNode(
334
+ vue.unref(index$5.HyCutter),
335
+ {
336
+ ref_key: "HyCutterRef",
337
+ ref: HyCutterRef,
338
+ "show-upload": false
339
+ },
340
+ null,
341
+ 512
342
+ /* NEED_PATCH */
343
+ )
344
+ ]),
345
+ _: 1
346
+ /* STABLE */
347
+ }, 16, ["modelValue", "onUpdate:modelValue", "loading", "onUpdate:loading", "title", "on-submit", "on-cancel", "on-close", "onOnMinimized", "onOnDialogMousedown"])
348
+ ],
349
+ 64
350
+ /* STABLE_FRAGMENT */
351
+ );
352
+ };
353
+ }
354
+ });
355
+
356
+ exports.default = _sfc_main;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var departmentTypeOperation_tiantong_vue_vue_type_script_setup_true_lang = require('./departmentTypeOperation_tiantong2.vue.js');
6
+
7
+ import "./style/departmentTypeOperation.scss?vue&type=style&index=0&src=true&lang.css";
8
+
9
+
10
+ exports.default = departmentTypeOperation_tiantong_vue_vue_type_script_setup_true_lang.default;