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
@@ -32,6 +32,9 @@ function useGlobalConfig(key, defaultValue = void 0) {
32
32
  } else {
33
33
  return config;
34
34
  }
35
+ return {
36
+ config
37
+ };
35
38
  }
36
39
  const provideGlobalConfig = (props, app, global = false) => {
37
40
  const inSetup = !!vue.getCurrentInstance();
@@ -46,6 +46,34 @@ const $t = (path, option) => {
46
46
  const locale = index[lang.value] || zh_CN.default;
47
47
  return translate(path, option, locale);
48
48
  };
49
+ const registeredLocales = /* @__PURE__ */ new Map();
50
+ const registerComponentLocale = (componentName, localeMessages) => {
51
+ if (!componentName || !localeMessages) {
52
+ console.warn("[useLocale] registerComponentLocale: componentName and localeMessages are required");
53
+ return;
54
+ }
55
+ if (registeredLocales.has(componentName)) {
56
+ return;
57
+ }
58
+ registeredLocales.set(componentName, true);
59
+ Object.keys(localeMessages).forEach((langKey) => {
60
+ if (index[langKey]) {
61
+ if (!index[langKey][componentName]) {
62
+ index[langKey][componentName] = {};
63
+ }
64
+ Object.assign(index[langKey][componentName], localeMessages[langKey]);
65
+ }
66
+ });
67
+ };
68
+ const unregisterComponentLocale = (componentName) => {
69
+ if (!componentName) return;
70
+ registeredLocales.delete(componentName);
71
+ Object.keys(index).forEach((langKey) => {
72
+ if (index[langKey] && index[langKey][componentName]) {
73
+ delete index[langKey][componentName];
74
+ }
75
+ });
76
+ };
49
77
 
50
78
  exports.$t = $t;
51
79
  exports.buildLocaleContext = buildLocaleContext;
@@ -54,6 +82,8 @@ exports.getLang = getLang;
54
82
  exports.getLanguage = getLanguage;
55
83
  exports.lang = lang;
56
84
  exports.localeContextKey = localeContextKey;
85
+ exports.registerComponentLocale = registerComponentLocale;
57
86
  exports.setLang = setLang;
58
87
  exports.translate = translate;
88
+ exports.unregisterComponentLocale = unregisterComponentLocale;
59
89
  exports.useLocale = useLocale;
package/lib/index.js CHANGED
@@ -14,16 +14,17 @@ var index$2 = require('./components/hyLoading/index.js');
14
14
  var index$3 = require('./components/hyTimePicker/index.js');
15
15
  var index$4 = require('./components/hyTooltip/index.js');
16
16
  var index$5 = require('./bussiness/hyAcquisitionStationTree/index.js');
17
- var index$6 = require('./bussiness/hyAddDepartmentType/index.js');
18
- var index$7 = require('./bussiness/hyElectronicFence/index.js');
19
- var index$8 = require('./components/hyAudioPlayer/index.js');
20
- var index$9 = require('./components/hyTableForm/index.js');
21
- var index$a = require('./components/hyBatchUploadDialog/index.js');
22
- var index$b = require('./components/hyButton/index.js');
23
- var index$c = require('./components/hyCheckboxGroup/index.js');
24
- var index$d = require('./components/hyConfigProvider/index.js');
25
- var index$e = require('./components/hyConfirmDialog/index.js');
26
- var index$f = require('./components/hyCutter/index.js');
17
+ var index$6 = require('./bussiness/hyElectronicFence/index.js');
18
+ var index$7 = require('./components/hyAudioPlayer/index.js');
19
+ var index$8 = require('./components/hyTableForm/index.js');
20
+ var index$9 = require('./components/hyBatchUploadDialog/index.js');
21
+ var index$a = require('./components/hyButton/index.js');
22
+ var index$b = require('./components/hyCheckboxGroup/index.js');
23
+ var index$c = require('./components/hyConfigProvider/index.js');
24
+ var index$d = require('./components/hyConfirmDialog/index.js');
25
+ var index$e = require('./components/hyCutter/index.js');
26
+ var index$f = require('./bussiness/hyDepartmentTypeOperation/index.js');
27
+ var tiantong = require('./bussiness/hyDepartmentTypeOperation/tiantong.js');
27
28
  var index$g = require('./bussiness/hyDeviceTree/index.js');
28
29
  var index$h = require('./components/hyDialog/index.js');
29
30
  var index$i = require('./components/hyDrawer/index.js');
@@ -94,8 +95,10 @@ exports.getLang = useLocale.getLang;
94
95
  exports.getLanguage = useLocale.getLanguage;
95
96
  exports.lang = useLocale.lang;
96
97
  exports.localeContextKey = useLocale.localeContextKey;
98
+ exports.registerComponentLocale = useLocale.registerComponentLocale;
97
99
  exports.setLang = useLocale.setLang;
98
100
  exports.translate = useLocale.translate;
101
+ exports.unregisterComponentLocale = useLocale.unregisterComponentLocale;
99
102
  exports.useLocale = useLocale.useLocale;
100
103
  exports.ElDatePicker = index.ElDatePicker;
101
104
  exports.HyDatePicker = index.HyDatePicker;
@@ -109,20 +112,21 @@ exports.HyTimePicker = index$3.HyTimePicker;
109
112
  exports.ElTooltip = index$4.ElTooltip;
110
113
  exports.HyTooltip = index$4.HyTooltip;
111
114
  exports.HyAcquisitionStationTree = index$5.HyAcquisitionStationTree;
112
- exports.HyAddDepartmentType = index$6.HyAddDepartmentType;
113
- exports.HyAddElectronicFenceDialog = index$7.HyAddElectronicFenceDialog;
114
- exports.HyBatchSetElectronicFenceUserDialog = index$7.HyBatchSetElectronicFenceUserDialog;
115
- exports.HyElectronicFence = index$7.HyElectronicFence;
116
- exports.HyElectronicFenceAssociatedUsersDialog = index$7.HyElectronicFenceAssociatedUsersDialog;
117
- exports.HyAudioPlayer = index$8.HyAudioPlayer;
118
- exports.HyBatchTableForm = index$9.HyBatchTableForm;
119
- exports.HyTableForm = index$9.HyTableForm;
120
- exports.HyBatchUploadDialog = index$a.HyBatchUploadDialog;
121
- exports.HyButton = index$b.HyButton;
122
- exports.HyCheckboxGroup = index$c.HyCheckboxGroup;
123
- exports.HyConfigProvider = index$d.HyConfigProvider;
124
- exports.HyConfirmDialog = index$e.HyConfirmDialog;
125
- exports.HyCutter = index$f.HyCutter;
115
+ exports.HyAddElectronicFenceDialog = index$6.HyAddElectronicFenceDialog;
116
+ exports.HyBatchSetElectronicFenceUserDialog = index$6.HyBatchSetElectronicFenceUserDialog;
117
+ exports.HyElectronicFence = index$6.HyElectronicFence;
118
+ exports.HyElectronicFenceAssociatedUsersDialog = index$6.HyElectronicFenceAssociatedUsersDialog;
119
+ exports.HyAudioPlayer = index$7.HyAudioPlayer;
120
+ exports.HyBatchTableForm = index$8.HyBatchTableForm;
121
+ exports.HyTableForm = index$8.HyTableForm;
122
+ exports.HyBatchUploadDialog = index$9.HyBatchUploadDialog;
123
+ exports.HyButton = index$a.HyButton;
124
+ exports.HyCheckboxGroup = index$b.HyCheckboxGroup;
125
+ exports.HyConfigProvider = index$c.HyConfigProvider;
126
+ exports.HyConfirmDialog = index$d.HyConfirmDialog;
127
+ exports.HyCutter = index$e.HyCutter;
128
+ exports.HyDepartmentTypeOperation = index$f.HyDepartmentTypeOperation;
129
+ exports.HyDepartmentTypeOperationTiantonmg = tiantong.HyDepartmentTypeOperationTiantonmg;
126
130
  exports.HyDeviceTree = index$g.HyDeviceTree;
127
131
  exports.HyDialog = index$h.HyDialog;
128
132
  exports.HyDrawer = index$i.HyDrawer;
@@ -3,7 +3,6 @@
3
3
  require('vue');
4
4
  var elementPlus = require('element-plus');
5
5
  var is = require('./is.js');
6
- require('../index.js');
7
6
  var useLocale = require('../hooks/useLocale.js');
8
7
 
9
8
  function funRunHandler(target, ...args) {
package/lib/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "0.2.73";
3
+ const version = "0.2.75";
4
4
 
5
5
  exports.version = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-dispatch-ui-v3",
3
- "version": "0.2.74",
3
+ "version": "0.2.76",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "scripts": {
@@ -126,14 +126,74 @@
126
126
  "./es": {
127
127
  "import": "./es/index.mjs"
128
128
  },
129
- "./es/*": {
130
- "import": "./es/*/*.mjs"
131
- },
132
129
  "./lib": {
133
130
  "require": "./lib/index.js"
134
131
  },
132
+ "./es/bussiness/hyAcquisitionStationTree": {
133
+ "import": "./es/bussiness/hyAcquisitionStationTree/index.mjs"
134
+ },
135
+ "./es/bussiness/hyDepartmentTypeOperation": {
136
+ "import": "./es/bussiness/hyDepartmentTypeOperation/index.mjs"
137
+ },
138
+ "./es/bussiness/hyDeviceTree": {
139
+ "import": "./es/bussiness/hyDeviceTree/index.mjs"
140
+ },
141
+ "./es/bussiness/hyElectronicFence": {
142
+ "import": "./es/bussiness/hyElectronicFence/index.mjs"
143
+ },
144
+ "./es/bussiness/hyMapAearchPlace": {
145
+ "import": "./es/bussiness/hyMapAearchPlace/index.mjs"
146
+ },
147
+ "./es/bussiness/hyOrgGroupTree": {
148
+ "import": "./es/bussiness/hyOrgGroupTree/index.mjs"
149
+ },
150
+ "./es/bussiness/hyPlanGroupDeviceTree": {
151
+ "import": "./es/bussiness/hyPlanGroupDeviceTree/index.mjs"
152
+ },
153
+ "./es/bussiness/hyRuleSetting": {
154
+ "import": "./es/bussiness/hyRuleSetting/index.mjs"
155
+ },
156
+ "./es/bussiness/hyUserTree": {
157
+ "import": "./es/bussiness/hyUserTree/index.mjs"
158
+ },
159
+ "./lib/bussiness/hyAcquisitionStationTree": {
160
+ "require": "./lib/bussiness/hyAcquisitionStationTree/index.js"
161
+ },
162
+ "./lib/bussiness/hyDepartmentTypeOperation": {
163
+ "require": "./lib/bussiness/hyDepartmentTypeOperation/index.js"
164
+ },
165
+ "./lib/bussiness/hyDeviceTree": {
166
+ "require": "./lib/bussiness/hyDeviceTree/index.js"
167
+ },
168
+ "./lib/bussiness/hyElectronicFence": {
169
+ "require": "./lib/bussiness/hyElectronicFence/index.js"
170
+ },
171
+ "./lib/bussiness/hyMapAearchPlace": {
172
+ "require": "./lib/bussiness/hyMapAearchPlace/index.js"
173
+ },
174
+ "./lib/bussiness/hyOrgGroupTree": {
175
+ "require": "./lib/bussiness/hyOrgGroupTree/index.js"
176
+ },
177
+ "./lib/bussiness/hyPlanGroupDeviceTree": {
178
+ "require": "./lib/bussiness/hyPlanGroupDeviceTree/index.js"
179
+ },
180
+ "./lib/bussiness/hyRuleSetting": {
181
+ "require": "./lib/bussiness/hyRuleSetting/index.js"
182
+ },
183
+ "./lib/bussiness/hyUserTree": {
184
+ "require": "./lib/bussiness/hyUserTree/index.js"
185
+ },
186
+ "./es/bussiness/hyDepartmentTypeOperationTiantong": {
187
+ "import": "./es/bussiness/hyDepartmentTypeOperation/tiantong.mjs"
188
+ },
189
+ "./lib/bussiness/hyDepartmentTypeOperationTiantong": {
190
+ "require": "./lib/bussiness/hyDepartmentTypeOperation/tiantong.js"
191
+ },
192
+ "./es/*": {
193
+ "import": "./es/*/*.mjs"
194
+ },
135
195
  "./lib/*": {
136
- "import": "./lib/*/*.js"
196
+ "require": "./lib/*/*.js"
137
197
  },
138
198
  "./style": {
139
199
  "import": "./es/style/index.scss",
@@ -155,7 +215,11 @@
155
215
  "import": "./es/static/*",
156
216
  "require": "./lib/static/*"
157
217
  },
158
- "./tailwind.css": "./dist/tailwind.css"
218
+ "./tailwind.css": "./dist/tailwind.css",
219
+ "./components-map": {
220
+ "import": "./es/components-map.mjs",
221
+ "require": "./lib/components-map.js"
222
+ }
159
223
  },
160
224
  "peerDependencies": {
161
225
  "element-plus": ">=2.13.0",
@@ -1,9 +0,0 @@
1
- var _export_sfc = (sfc, props) => {
2
- const target = sfc.__vccOpts || sfc;
3
- for (const [key, val] of props) {
4
- target[key] = val;
5
- }
6
- return target;
7
- };
8
-
9
- export { _export_sfc as default };
@@ -1,367 +0,0 @@
1
- import { defineComponent, useTemplateRef, ref, resolveComponent, openBlock, createBlock, unref, isRef, withCtx, createCommentVNode, createElementVNode, createVNode, toDisplayString, createTextVNode } from 'vue';
2
- import '../../hooks/index.mjs';
3
- import { ElMessage, ElForm, ElFormItem, ElUpload, ElImage } from 'element-plus';
4
- import { saveApi } from '../../api/index.mjs';
5
- import '../../utils/index.mjs';
6
- import '../../components/index.mjs';
7
- import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
8
- import { $t } from '../../hooks/useLocale.mjs';
9
- import { fileUpload } from '../../utils/file.mjs';
10
- import { useMixins } from '../../hooks/useMixins.mjs';
11
- import { HyDialog } from '../../components/hyDialog/index.mjs';
12
- import { HyIcon } from '../../components/hyIcon/index.mjs';
13
- import { HyButton } from '../../components/hyButton/index.mjs';
14
- import { HyCutter } from '../../components/hyCutter/index.mjs';
15
-
16
- const __default__ = defineComponent({
17
- name: "HyAddDepartmentType"
18
- });
19
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
20
- props: {
21
- // 是否可缩小化
22
- ifShrink: { type: Boolean, default: false },
23
- // 是否拖拽
24
- ifDraggable: { type: Boolean, default: false }
25
- },
26
- emits: ["on-submit", "onMinimized", "onDialogMousedown"],
27
- setup(__props, { expose: __expose, emit: __emit }) {
28
- const props = __props;
29
- const emit = __emit;
30
- const HyCutterRef = useTemplateRef("HyCutterRef");
31
- function useAddDepartmentType(hy) {
32
- const { emit: emit2 } = hy;
33
- const formRef2 = ref(null);
34
- const HyDialogRef2 = ref();
35
- const visible2 = ref(false);
36
- const form2 = ref({
37
- icon: null,
38
- typeName: null
39
- });
40
- const rules2 = ref({
41
- typeName: [
42
- {
43
- required: true,
44
- message: $t("departmentType.pleaseEnterTheDepartmentTypeName"),
45
- trigger: "blur"
46
- }
47
- ]
48
- });
49
- const title2 = ref($t("departmentType.addDepartmentType"));
50
- function beforeAvatarUpload2(file) {
51
- const width = 44;
52
- const height = 44;
53
- const isLt2M = file.size / 1024 / 1024 < 2;
54
- if (!isLt2M) {
55
- ElMessage.error($t("departmentType.imageUploadFailedLogoSizeWithin2M"));
56
- return false;
57
- }
58
- HyCutterRef.value.open({
59
- file,
60
- options: {
61
- outputType: "png",
62
- // 裁剪生成图片的格式
63
- canScale: true,
64
- // 图片是否允许滚轮缩放
65
- fixedBox: true,
66
- // 固定截图框大小 不允许改变
67
- infoTrue: false,
68
- // 是否开启截图框宽高固定比例
69
- autoCropWidth: width,
70
- autoCropHeight: height,
71
- centerBox: false,
72
- original: true,
73
- fixed: false
74
- },
75
- onSubmit: ({ url, key }) => {
76
- hy.form.value.icon = url;
77
- hy.form.value.iconKey = key;
78
- }
79
- });
80
- return false;
81
- }
82
- async function handleHttpRequestImg2(object) {
83
- await fileUpload(object.file).then((url) => {
84
- hy.form.value.icon = url;
85
- });
86
- }
87
- function submit2() {
88
- hy.formRef.value?.validate((valid) => {
89
- if (valid) {
90
- if (!hy.form.value.icon) {
91
- hy.form.value.iconKey = null;
92
- }
93
- saveApi("organization/orgType", {
94
- ...hy.form.value,
95
- icon: null
96
- }).then((res) => {
97
- if (res.code === 200) {
98
- emit2("on-submit", hy.form.value.id ? null : 1);
99
- hy.visible.value = false;
100
- ElMessage.success($t("videoPlayer.operationSuccessful"));
101
- }
102
- });
103
- }
104
- });
105
- }
106
- function onClose2() {
107
- hy.visible.value = false;
108
- }
109
- function setDragLevelIndex2(dragLevel) {
110
- HyDialogRef2.value.setDragLevelIndex(dragLevel);
111
- }
112
- function onMinimized2(e) {
113
- emit2("onMinimized", e);
114
- }
115
- function onDialogMousedown2(e) {
116
- emit2("onDialogMousedown", e);
117
- }
118
- function show2(row) {
119
- if (row) {
120
- hy.form.value = { ...row };
121
- } else {
122
- hy.form.value = {
123
- icon: null,
124
- typeName: null
125
- };
126
- }
127
- hy.visible.value = true;
128
- }
129
- return {
130
- // HyCutterRef,
131
- formRef: formRef2,
132
- visible: visible2,
133
- form: form2,
134
- rules: rules2,
135
- beforeAvatarUpload: beforeAvatarUpload2,
136
- handleHttpRequestImg: handleHttpRequestImg2,
137
- submit: submit2,
138
- onClose: onClose2,
139
- show: show2,
140
- onDialogMousedown: onDialogMousedown2,
141
- onMinimized: onMinimized2,
142
- setDragLevelIndex: setDragLevelIndex2,
143
- title: title2,
144
- HyDialogRef: HyDialogRef2
145
- };
146
- }
147
- const {
148
- // HyCutterRef,
149
- formRef,
150
- visible,
151
- form,
152
- rules,
153
- beforeAvatarUpload,
154
- handleHttpRequestImg,
155
- submit,
156
- onClose,
157
- show,
158
- title,
159
- setDragLevelIndex,
160
- HyDialogRef,
161
- onMinimized,
162
- onDialogMousedown
163
- } = useMixins({ emit, props }, [useAddDepartmentType]);
164
- __expose({
165
- show,
166
- setDragLevelIndex
167
- });
168
- return (_ctx, _cache) => {
169
- const _component_el_input = resolveComponent("el-input");
170
- return openBlock(), createBlock(unref(HyDialog), {
171
- ref_key: "HyDialogRef",
172
- ref: HyDialogRef,
173
- modelValue: unref(visible),
174
- "onUpdate:modelValue": ($event) => isRef(visible) ? visible.value = $event : null,
175
- "if-shrink": props.ifShrink,
176
- "if-draggable": props.ifDraggable,
177
- width: "310px",
178
- title: unref(title),
179
- showOperate: false,
180
- "on-close": unref(onClose),
181
- onOnMinimized: unref(onMinimized),
182
- onOnDialogMousedown: unref(onDialogMousedown)
183
- }, {
184
- default: withCtx(() => [
185
- createCommentVNode(` <template #header>
186
- <div
187
- class="box-border w-full border-0 border-b border-solid border-background-3 px-4 py-[10px] text-main text-sm font-bold flex justify-between items-center relative"
188
- >
189
- <span v-if="form.id">{{ $t('editDepartmentType') }}</span>
190
- <span v-else>{{ $t('addDepartmentType') }}</span>
191
- <div class="text-lg absolute right-4 cursor-pointer text-danger-2">
192
- <HyIcon
193
- svg-name="layout-dialog-close-v2"
194
- class="!w-[20px] !h-[20px]"
195
- @click="onClose"
196
- />
197
- </div>
198
- </div>
199
- </template> `),
200
- createElementVNode("div", { class: "text-main" }, [
201
- createElementVNode("div", { class: "box-border" }, [
202
- createElementVNode("div", { class: "overflow-hidden" }, [
203
- createVNode(unref(ElForm), {
204
- ref_key: "formRef",
205
- ref: formRef,
206
- "label-position": "top",
207
- model: unref(form),
208
- rules: unref(rules),
209
- "label-width": "0px"
210
- }, {
211
- default: withCtx(() => [
212
- createVNode(unref(ElFormItem), { prop: "companyName" }, {
213
- label: withCtx(() => [
214
- createElementVNode(
215
- "span",
216
- { class: "form-label" },
217
- toDisplayString(unref($t)("departmentType.departmentIcon")),
218
- 1
219
- /* TEXT */
220
- )
221
- ]),
222
- default: withCtx(() => [
223
- createElementVNode("div", { class: "flex flex-row" }, [
224
- createVNode(unref(ElUpload), {
225
- class: "w-[80px] flex items-center justify-center",
226
- accept: ".png,.jpg,.gif",
227
- "before-upload": unref(beforeAvatarUpload),
228
- "http-request": unref(handleHttpRequestImg),
229
- action: "",
230
- "show-file-list": false
231
- }, {
232
- default: withCtx(() => [
233
- createElementVNode("div", { class: "click-box emptyHead" }, [
234
- unref(form).icon ? (openBlock(), createBlock(unref(ElImage), {
235
- key: 0,
236
- fit: "contain",
237
- class: "w-[44px] h-[44px]",
238
- src: unref(form).icon
239
- }, null, 8, ["src"])) : (openBlock(), createBlock(unref(HyIcon), {
240
- key: 1,
241
- "svg-name": "ops-file-empty-head",
242
- class: "text-auxiliary !w-[42px] !h-[42px]"
243
- })),
244
- createElementVNode(
245
- "span",
246
- { class: "uploadTips text-center" },
247
- toDisplayString(unref($t)("departmentType.upload")),
248
- 1
249
- /* TEXT */
250
- )
251
- ])
252
- ]),
253
- _: 1
254
- /* STABLE */
255
- }, 8, ["before-upload", "http-request"]),
256
- createElementVNode("div", { class: "flex-grow leading-[20px] text-auxiliary text-xs text-center" }, [
257
- createElementVNode(
258
- "div",
259
- null,
260
- toDisplayString(unref($t)("departmentType.pleaseUploadDepartmentTypeIcon")),
261
- 1
262
- /* TEXT */
263
- ),
264
- createElementVNode(
265
- "div",
266
- null,
267
- toDisplayString(unref($t)("departmentType.iconSize44px")) + "*44px",
268
- 1
269
- /* TEXT */
270
- ),
271
- createElementVNode(
272
- "div",
273
- null,
274
- toDisplayString(unref($t)("departmentType.ifNoIconUseTheDefaultIcon")),
275
- 1
276
- /* TEXT */
277
- )
278
- ])
279
- ])
280
- ]),
281
- _: 1
282
- /* STABLE */
283
- }),
284
- createVNode(unref(ElFormItem), { prop: "typeName" }, {
285
- label: withCtx(() => [
286
- createElementVNode(
287
- "span",
288
- { class: "form-label" },
289
- toDisplayString(unref($t)("departmentType.departmentTypeName")),
290
- 1
291
- /* TEXT */
292
- )
293
- ]),
294
- default: withCtx(() => [
295
- createVNode(_component_el_input, {
296
- modelValue: unref(form).typeName,
297
- "onUpdate:modelValue": ($event) => unref(form).typeName = $event,
298
- placeholder: unref($t)("departmentType.pleaseEnterTheDepartmentTypeName"),
299
- clearable: ""
300
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
301
- ]),
302
- _: 1
303
- /* STABLE */
304
- })
305
- ]),
306
- _: 1
307
- /* STABLE */
308
- }, 8, ["model", "rules"])
309
- ]),
310
- createElementVNode("div", { class: "flex items-center justify-center mt-5" }, [
311
- createVNode(unref(HyButton), {
312
- class: "!min-w-[120px]",
313
- onClick: unref(onClose)
314
- }, {
315
- default: withCtx(() => [
316
- createTextVNode(
317
- toDisplayString(unref($t)("departmentType.close")),
318
- 1
319
- /* TEXT */
320
- )
321
- ]),
322
- _: 1
323
- /* STABLE */
324
- }, 8, ["onClick"]),
325
- createVNode(unref(HyButton), {
326
- type: "primary",
327
- class: "!min-w-[120px]",
328
- onClick: unref(submit)
329
- }, {
330
- default: withCtx(() => [
331
- createTextVNode(
332
- toDisplayString(unref($t)("departmentType.save")),
333
- 1
334
- /* TEXT */
335
- )
336
- ]),
337
- _: 1
338
- /* STABLE */
339
- }, 8, ["onClick"])
340
- ])
341
- ])
342
- ]),
343
- unref(visible) ? (openBlock(), createBlock(
344
- unref(HyCutter),
345
- {
346
- key: 0,
347
- ref_key: "HyCutterRef",
348
- ref: HyCutterRef,
349
- "show-upload": false,
350
- "z-index": 1e4
351
- },
352
- null,
353
- 512
354
- /* NEED_PATCH */
355
- )) : createCommentVNode("v-if", true)
356
- ]),
357
- _: 1
358
- /* STABLE */
359
- }, 8, ["modelValue", "onUpdate:modelValue", "if-shrink", "if-draggable", "title", "on-close", "onOnMinimized", "onOnDialogMousedown"]);
360
- };
361
- }
362
- });
363
- import "./style/addDepartmentType.scss?vue&type=style&index=0&src=4cb686f4&scoped=4cb686f4&lang.css";
364
-
365
- var componnet = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4cb686f4"]]);
366
-
367
- export { componnet as default };
@@ -1,7 +0,0 @@
1
- import componnet from './addDepartmentType.vue.mjs';
2
- import '../../utils/index.mjs';
3
- import { withInstall } from '../../utils/handler.mjs';
4
-
5
- const HyAddDepartmentType = withInstall(componnet);
6
-
7
- export { HyAddDepartmentType, HyAddDepartmentType as default };
@@ -1,31 +0,0 @@
1
- .emptyHead {
2
- color: rgba(var(--hy-auxiliary), 1);
3
- height: 44px;
4
- width: 44px;
5
- background: var(--item-background-main-color);
6
- box-shadow: 0 0 10px 2px var(--background-auxiliary-color);
7
- border-radius: 6px;
8
- border: 1px solid #454b5f;
9
- position: relative;
10
- overflow: hidden;
11
- span.uploadTips {
12
- color: #fff;
13
- position: absolute;
14
- top: 50%;
15
- left: 50%;
16
- width: 44px;
17
- font-size: 12px;
18
- line-height: 20px;
19
- transform: translate(-50%, -50%);
20
- opacity: 0;
21
- transition: 0.5s;
22
- }
23
- }
24
- .emptyHead:hover {
25
- img {
26
- opacity: 0.5;
27
- }
28
- span.uploadTips {
29
- opacity: 1;
30
- }
31
- }
@@ -1,13 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _export_sfc = (sfc, props) => {
6
- const target = sfc.__vccOpts || sfc;
7
- for (const [key, val] of props) {
8
- target[key] = val;
9
- }
10
- return target;
11
- };
12
-
13
- exports.default = _export_sfc;