@utogether/udp-core 1.0.1-beta.27 → 1.0.1-beta.30
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/build/plugins.ts +37 -37
- package/dist/{403-A9aD_bZN.js → 403-DdjDWbkf.js} +1 -1
- package/dist/{404-DREd70aQ.js → 404-D9vF2gFz.js} +1 -1
- package/dist/{500-C5qVXkGt.js → 500-mVaDmUjL.js} +1 -1
- package/dist/{AuthorityInfo-CYO2IVau.js → AuthorityInfo-DOUJ_Zrj.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-V7e_KwWp.js → AuthorityInfo.vue_vue_type_style_index_0_lang-B12sAzqt.js} +1 -1
- package/dist/{Company-CaottHQO.js → Company-DY__kM9F.js} +3 -3
- package/dist/{CompanyPanel-B3hOiXqj.js → CompanyPanel-C5N8QcMA.js} +1 -1
- package/dist/{Department-CHkuRvJN.js → Department-DsuDZdy5.js} +3 -3
- package/dist/{DepartmentPanel-DieWfIxW.js → DepartmentPanel-CdwI7Rzu.js} +2 -2
- package/dist/{DesignPanel-REWXp3x4.js → DesignPanel-B50-g0TL.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-Df0xc5XP.js → DesignPanel.vue_vue_type_style_index_0_lang-KV8JOZ6v.js} +2 -2
- package/dist/{DictView-DnpDHskG.js → DictView-Be2Z5Obk.js} +1 -1
- package/dist/{InvOrganization-DoIsDrAx.js → InvOrganization-Lui1q3Ou.js} +1 -1
- package/dist/{Org-C4P5Cwia.js → Org-qO5ExsPN.js} +1 -1
- package/dist/{Preview-d90pQdFJ.js → Preview-Dq4dfV2D.js} +1 -1
- package/dist/{ReportDefine-DNrp4lFP.js → ReportDefine-DH3FvbS1.js} +1 -1
- package/dist/{ReportDesign-Ch8x6_mW.js → ReportDesign-Bou01Jbr.js} +2 -2
- package/dist/{ReportQuery-C1yR0ULS.js → ReportQuery-BBkmPPSw.js} +1 -1
- package/dist/{ReportQueryFrom-BKwf61CL.js → ReportQueryFrom-BCY8lTJ7.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-D2ddteNz.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CpktcM8J.js} +1 -1
- package/dist/{ReportTemplate-HLHli4Cc.js → ReportTemplate-C_yJXxQ-.js} +1 -1
- package/dist/{Role-4GbuIhk6.js → Role-CTatYsrC.js} +3 -3
- package/dist/{RoleAssign-FGrSCg5R.js → RoleAssign-Cqt3CelK.js} +3 -3
- package/dist/{RolePanel-Ce1eKsM8.js → RolePanel-C3JMpNu8.js} +1 -1
- package/dist/{RolePanel-BcCozGfv.js → RolePanel-brKRJIhD.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BiOcU5GE.js → RolePanel.vue_vue_type_script_setup_true_lang-DD8u9pq8.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CqER1M9Y.js → RolePanel.vue_vue_type_script_setup_true_lang-i6Gq4r5B.js} +3 -3
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-BbgS5f79.js → ScrollPanel.vue_vue_type_style_index_0_lang-CiWKyjm3.js} +1 -1
- package/dist/{Staff-CBt_0rqg.js → Staff-Cd3twQ6Y.js} +3 -3
- package/dist/{StaffInfo-RCdWZr1r.js → StaffInfo-DJp0a0qd.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-Dm8Yin3r.js → StaffInfo.vue_vue_type_script_setup_true_lang-Dp2AhJ4I.js} +1 -1
- package/dist/{StaffPanel-2ka-H3IV.js → StaffPanel-B93hClzs.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-B0u-PqTe.js → StaffPanel.vue_vue_type_script_setup_true_lang-CXjUzq7n.js} +2 -2
- package/dist/{SysUser-Cs7uN3HU.js → SysUser-BvI6vaqI.js} +2 -2
- package/dist/{SysUserPanel-Df3qGMep.js → SysUserPanel-C9V8X-Ek.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-ClwozbZE.js → SysUserPanel.vue_vue_type_script_setup_true_lang-bMqTui07.js} +1 -1
- package/dist/{SystemMenu-BMYVQd-E.js → SystemMenu-D4WME5d0.js} +2 -2
- package/dist/{UserInfo-DDk2iOqY.js → UserInfo-D-AfdfJs.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-CEccCnDi.js → UserInfo.vue_vue_type_style_index_0_lang-C-JQYIxe.js} +1 -1
- package/dist/{childView-C7u4Budn.js → childView--WMSo-wH.js} +1 -1
- package/dist/{childView-DFPGu0W-.js → childView-1MTl6Kaj.js} +1 -1
- package/dist/childView.vue_vue_type_style_index_0_lang-B8Losc4Y.js +170 -0
- package/dist/{childView.vue_vue_type_style_index_0_lang-B3fNaibG.js → childView.vue_vue_type_style_index_0_lang-BAVKNIXs.js} +1 -1
- package/dist/{code-rule-BcaRQ1zV.js → code-rule-D-RqrQB6.js} +40 -37
- package/dist/core.es.js +1 -1
- package/dist/{cron-task-DJQLZCsO.js → cron-task-D-X-KFZm.js} +1 -1
- package/dist/{frameView-uPEaJRC7.js → frameView-MAW_-GHJ.js} +1 -1
- package/dist/{index-D7BXpJPu.js → index-Bc9vCX7z.js} +45 -45
- package/dist/{layoutView-zw1-fplL.js → layoutView-De2QIEr2.js} +3 -3
- package/dist/{login-M-rLGYIn.js → login-rdZ0GPYc.js} +1 -1
- package/dist/{lov-view-BVfIna0M.js → lov-view-Ao7LMspL.js} +2 -2
- package/dist/{menuInfo-BTqoNOuZ.js → menuInfo-DmOcK6An.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-CHco0XcS.js → menuInfo.vue_vue_type_style_index_0_lang-Ln-zFWV7.js} +1 -1
- package/dist/{pda-app-BzzynCVk.js → pda-app-DY63mQ2T.js} +1 -1
- package/dist/{resource-CJQV7_75.js → resource-B21uV58T.js} +1 -1
- package/dist/{su-welcome-BxQYF4Ou.js → su-welcome-DgjzJeDF.js} +22 -19
- package/dist/{sys-config-DNFqTmvL.js → sys-config-DOtK2I32.js} +1 -1
- package/dist/udp-core.css +1 -1
- package/index.ts +49 -49
- package/package.json +3 -3
- package/src/components/SuScrollTree/ScrollPanel.vue +170 -170
- package/src/components/udp/content/index.vue +89 -0
- package/src/components/udp/form/form.vue +109 -109
- package/src/components/udp/grid/index.vue +524 -524
- package/src/components/udp/index.ts +2 -1
- package/src/components/udp/ut-stamp-badge/index.vue +272 -0
- package/src/components/udp/utils.ts +408 -408
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +94 -94
- package/src/layout/components/lay-tag/index.vue +596 -596
- package/src/layout/hooks/useTag.ts +227 -227
- package/src/main.ts +1 -1
- package/src/plugins/i18n/module/u-workflow.ts +71 -71
- package/src/plugins/vxe-table/index.ts +116 -116
- package/src/plugins/vxe-table/render.tsx +945 -945
- package/src/router/index.ts +187 -187
- package/src/router/modules/flow.ts +35 -35
- package/src/router/utils.ts +420 -420
- package/src/store/modules/multiTags.ts +110 -110
- package/src/store/modules/permission.ts +113 -113
- package/src/style/button.scss +85 -85
- package/src/style/vxetable.scss +348 -348
- package/src/views/organization/department/DepartmentPanel.vue +269 -269
- package/src/views/system/menu/SystemMenu.vue +185 -185
- package/src/views/system/menu/menuInfo.vue +384 -384
- package/src/views/system/sysUser/SysUserPanel.vue +348 -348
- package/src/views/udev/coderule/code-rule.vue +17 -5
- package/src/views/udev/dict/DictView.vue +118 -118
- package/src/views/udev/dict/childView.vue +69 -109
- package/src/views/udev/lov/childView.vue +174 -174
- package/src/views/uhome/components/menu-favorite.vue +1 -1
- package/src/views/upms/interface/log-in.vue +100 -100
- package/src/views/upms/user/login-log.vue +54 -54
- package/src/views/utask/flow-task.vue +18 -18
- package/dist/childView.vue_vue_type_style_index_0_lang-BUMcbqzM.js +0 -187
|
@@ -1,227 +1,227 @@
|
|
|
1
|
-
import { ref, unref, watch, computed, reactive, onMounted, type CSSProperties, getCurrentInstance } from 'vue';
|
|
2
|
-
import type { tagsViewsType } from '../types';
|
|
3
|
-
import { isEqual, isBoolean } from 'xe-utils';
|
|
4
|
-
import { useEventListener } from '@vueuse/core';
|
|
5
|
-
import { useRoute, useRouter } from 'vue-router';
|
|
6
|
-
import { storageLocal, toggleClass, hasClass } from '@utogether/utils';
|
|
7
|
-
import { transformI18n } from '../../plugins/i18n';
|
|
8
|
-
import { useSettingStoreHook } from '../../store/modules/settings';
|
|
9
|
-
import { responsiveStorageNameSpace } from '../../config';
|
|
10
|
-
import { useMultiTagsStoreHook } from '../../store/modules/multiTags';
|
|
11
|
-
|
|
12
|
-
export function useTags() {
|
|
13
|
-
const route = useRoute();
|
|
14
|
-
const router = useRouter();
|
|
15
|
-
const instance = getCurrentInstance();
|
|
16
|
-
const SuSetting = useSettingStoreHook();
|
|
17
|
-
|
|
18
|
-
const buttonTop = ref(0);
|
|
19
|
-
const buttonLeft = ref(0);
|
|
20
|
-
const translateX = ref(0);
|
|
21
|
-
const visible = ref(false);
|
|
22
|
-
const activeIndex = ref(-1);
|
|
23
|
-
// 当前右键选中的路由信息
|
|
24
|
-
const currentSelect = ref({});
|
|
25
|
-
|
|
26
|
-
/** 显示模式,默认灵动模式 */
|
|
27
|
-
const showModel = ref(storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.showModel || 'smart');
|
|
28
|
-
/** 是否隐藏标签页,默认显示 */
|
|
29
|
-
const showTags = ref(storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.hideTabs) ?? ref('false');
|
|
30
|
-
const multiTags: any = computed(() => {
|
|
31
|
-
return useMultiTagsStoreHook().multiTags;
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const tagsViews = reactive<Array<tagsViewsType>>([
|
|
35
|
-
{
|
|
36
|
-
icon: 'refresh-right',
|
|
37
|
-
text: 'message.udp.reload',
|
|
38
|
-
divided: false,
|
|
39
|
-
disabled: false,
|
|
40
|
-
show: true
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
icon: 'close',
|
|
44
|
-
text: 'message.udp.closeCurrentTab',
|
|
45
|
-
divided: false,
|
|
46
|
-
disabled: multiTags.value.length > 1 ? false : true,
|
|
47
|
-
show: true
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
icon: 'ri:text-direction-r',
|
|
51
|
-
text: 'message.udp.closeLeftTabs',
|
|
52
|
-
divided: true,
|
|
53
|
-
disabled: multiTags.value.length > 1 ? false : true,
|
|
54
|
-
show: true
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
icon: 'ri:text-direction-l',
|
|
58
|
-
text: 'message.udp.closeRightTabs',
|
|
59
|
-
divided: false,
|
|
60
|
-
disabled: multiTags.value.length > 1 ? false : true,
|
|
61
|
-
show: true
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
icon: 'ri:text-spacing',
|
|
65
|
-
text: 'message.udp.closeOtherTabs',
|
|
66
|
-
divided: true,
|
|
67
|
-
disabled: multiTags.value.length > 2 ? false : true,
|
|
68
|
-
show: true
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
icon: 'ri:subtract-line',
|
|
72
|
-
text: 'message.udp.closeAllTabs',
|
|
73
|
-
divided: false,
|
|
74
|
-
disabled: multiTags.value.length > 1 ? false : true,
|
|
75
|
-
show: true
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
icon: 'ri:fullscreen-fill',
|
|
79
|
-
text: 'message.udp.wholeFullScreen',
|
|
80
|
-
divided: true,
|
|
81
|
-
disabled: false,
|
|
82
|
-
show: true
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
icon: 'ri:fullscreen-fill',
|
|
86
|
-
text: 'message.udp.contentFullScreen',
|
|
87
|
-
divided: false,
|
|
88
|
-
disabled: false,
|
|
89
|
-
show: true
|
|
90
|
-
}
|
|
91
|
-
]);
|
|
92
|
-
|
|
93
|
-
function conditionHandle(item, previous, next) {
|
|
94
|
-
const currentName = route.name || '';
|
|
95
|
-
const itemName = item.name || '';
|
|
96
|
-
if (isBoolean(route?.meta?.showLink) && route?.meta?.showLink === false) {
|
|
97
|
-
if (Object.keys(route.query).length > 0) {
|
|
98
|
-
return currentName === itemName && isEqual(route.query, item.query) ? previous : next;
|
|
99
|
-
} else {
|
|
100
|
-
if (item.params) {
|
|
101
|
-
return currentName === itemName && isEqual(route.params, item.params) ? previous : next;
|
|
102
|
-
} else {
|
|
103
|
-
return currentName === itemName ? previous : next;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
} else {
|
|
107
|
-
return currentName === itemName ? previous : next;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const isFixedTag = computed(() => {
|
|
112
|
-
return item => {
|
|
113
|
-
return isBoolean(item?.meta?.fixedTag) && item?.meta?.fixedTag === true;
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
const iconIsActive = computed(() => {
|
|
118
|
-
return (item, index) => {
|
|
119
|
-
if (index === 0) return;
|
|
120
|
-
return conditionHandle(item, true, false);
|
|
121
|
-
};
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
const linkIsActive = computed(() => {
|
|
125
|
-
return item => {
|
|
126
|
-
return conditionHandle(item, 'is-active', '');
|
|
127
|
-
};
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
const scheduleIsActive = computed(() => {
|
|
131
|
-
return item => {
|
|
132
|
-
return conditionHandle(item, 'schedule-active', '');
|
|
133
|
-
};
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
const getTabStyle = computed((): CSSProperties => {
|
|
137
|
-
return {
|
|
138
|
-
transform: `translateX(${translateX.value}px)`
|
|
139
|
-
};
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
const getContextMenuStyle = computed((): CSSProperties => {
|
|
143
|
-
return { left: buttonLeft.value + 'px', top: buttonTop.value + 'px' };
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
const closeMenu = () => {
|
|
147
|
-
visible.value = false;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
/** 鼠标移入添加激活样式 */
|
|
151
|
-
function onMouseenter(index) {
|
|
152
|
-
if (index) activeIndex.value = index;
|
|
153
|
-
if (unref(showModel) === 'smart') {
|
|
154
|
-
if (hasClass(instance.refs['schedule' + index][0], 'schedule-active')) return;
|
|
155
|
-
toggleClass(true, 'schedule-in', instance.refs['schedule' + index][0]);
|
|
156
|
-
toggleClass(false, 'schedule-out', instance.refs['schedule' + index][0]);
|
|
157
|
-
} else {
|
|
158
|
-
if (hasClass(instance.refs['dynamic' + index][0], 'is-active')) return;
|
|
159
|
-
toggleClass(true, 'card-in', instance.refs['dynamic' + index][0]);
|
|
160
|
-
toggleClass(false, 'card-out', instance.refs['dynamic' + index][0]);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/** 鼠标移出恢复默认样式 */
|
|
165
|
-
function onMouseleave(index) {
|
|
166
|
-
activeIndex.value = -1;
|
|
167
|
-
if (unref(showModel) === 'smart') {
|
|
168
|
-
if (hasClass(instance.refs['schedule' + index][0], 'schedule-active')) return;
|
|
169
|
-
toggleClass(false, 'schedule-in', instance.refs['schedule' + index][0]);
|
|
170
|
-
toggleClass(true, 'schedule-out', instance.refs['schedule' + index][0]);
|
|
171
|
-
} else {
|
|
172
|
-
if (hasClass(instance.refs['dynamic' + index][0], 'is-active')) return;
|
|
173
|
-
toggleClass(false, 'card-in', instance.refs['dynamic' + index][0]);
|
|
174
|
-
toggleClass(true, 'card-out', instance.refs['dynamic' + index][0]);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function onContentFullScreen() {
|
|
179
|
-
SuSetting.hiddenSideBar
|
|
180
|
-
? SuSetting.changeSetting({ key: 'hiddenSideBar', value: false })
|
|
181
|
-
: SuSetting.changeSetting({ key: 'hiddenSideBar', value: true });
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
onMounted(() => {
|
|
185
|
-
if (!showModel.value) {
|
|
186
|
-
const configure = storageLocal.getItem(`${responsiveStorageNameSpace()}configure`);
|
|
187
|
-
configure.showModel = 'card';
|
|
188
|
-
storageLocal.setItem(`${responsiveStorageNameSpace()}configure`, configure);
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
watch(
|
|
193
|
-
() => visible.value,
|
|
194
|
-
() => {
|
|
195
|
-
useEventListener(document, 'click', closeMenu);
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
|
|
199
|
-
return {
|
|
200
|
-
route,
|
|
201
|
-
router,
|
|
202
|
-
visible,
|
|
203
|
-
showTags,
|
|
204
|
-
instance,
|
|
205
|
-
multiTags,
|
|
206
|
-
showModel,
|
|
207
|
-
tagsViews,
|
|
208
|
-
buttonTop,
|
|
209
|
-
buttonLeft,
|
|
210
|
-
translateX,
|
|
211
|
-
isFixedTag,
|
|
212
|
-
SuSetting,
|
|
213
|
-
activeIndex,
|
|
214
|
-
getTabStyle,
|
|
215
|
-
iconIsActive,
|
|
216
|
-
linkIsActive,
|
|
217
|
-
currentSelect,
|
|
218
|
-
scheduleIsActive,
|
|
219
|
-
getContextMenuStyle,
|
|
220
|
-
closeMenu,
|
|
221
|
-
onMounted,
|
|
222
|
-
onMouseenter,
|
|
223
|
-
onMouseleave,
|
|
224
|
-
transformI18n,
|
|
225
|
-
onContentFullScreen
|
|
226
|
-
};
|
|
227
|
-
}
|
|
1
|
+
import { ref, unref, watch, computed, reactive, onMounted, type CSSProperties, getCurrentInstance } from 'vue';
|
|
2
|
+
import type { tagsViewsType } from '../types';
|
|
3
|
+
import { isEqual, isBoolean } from 'xe-utils';
|
|
4
|
+
import { useEventListener } from '@vueuse/core';
|
|
5
|
+
import { useRoute, useRouter } from 'vue-router';
|
|
6
|
+
import { storageLocal, toggleClass, hasClass } from '@utogether/utils';
|
|
7
|
+
import { transformI18n } from '../../plugins/i18n';
|
|
8
|
+
import { useSettingStoreHook } from '../../store/modules/settings';
|
|
9
|
+
import { responsiveStorageNameSpace } from '../../config';
|
|
10
|
+
import { useMultiTagsStoreHook } from '../../store/modules/multiTags';
|
|
11
|
+
|
|
12
|
+
export function useTags() {
|
|
13
|
+
const route = useRoute();
|
|
14
|
+
const router = useRouter();
|
|
15
|
+
const instance = getCurrentInstance();
|
|
16
|
+
const SuSetting = useSettingStoreHook();
|
|
17
|
+
|
|
18
|
+
const buttonTop = ref(0);
|
|
19
|
+
const buttonLeft = ref(0);
|
|
20
|
+
const translateX = ref(0);
|
|
21
|
+
const visible = ref(false);
|
|
22
|
+
const activeIndex = ref(-1);
|
|
23
|
+
// 当前右键选中的路由信息
|
|
24
|
+
const currentSelect = ref({});
|
|
25
|
+
|
|
26
|
+
/** 显示模式,默认灵动模式 */
|
|
27
|
+
const showModel = ref(storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.showModel || 'smart');
|
|
28
|
+
/** 是否隐藏标签页,默认显示 */
|
|
29
|
+
const showTags = ref(storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.hideTabs) ?? ref('false');
|
|
30
|
+
const multiTags: any = computed(() => {
|
|
31
|
+
return useMultiTagsStoreHook().multiTags;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const tagsViews = reactive<Array<tagsViewsType>>([
|
|
35
|
+
{
|
|
36
|
+
icon: 'refresh-right',
|
|
37
|
+
text: 'message.udp.reload',
|
|
38
|
+
divided: false,
|
|
39
|
+
disabled: false,
|
|
40
|
+
show: true
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
icon: 'close',
|
|
44
|
+
text: 'message.udp.closeCurrentTab',
|
|
45
|
+
divided: false,
|
|
46
|
+
disabled: multiTags.value.length > 1 ? false : true,
|
|
47
|
+
show: true
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
icon: 'ri:text-direction-r',
|
|
51
|
+
text: 'message.udp.closeLeftTabs',
|
|
52
|
+
divided: true,
|
|
53
|
+
disabled: multiTags.value.length > 1 ? false : true,
|
|
54
|
+
show: true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
icon: 'ri:text-direction-l',
|
|
58
|
+
text: 'message.udp.closeRightTabs',
|
|
59
|
+
divided: false,
|
|
60
|
+
disabled: multiTags.value.length > 1 ? false : true,
|
|
61
|
+
show: true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
icon: 'ri:text-spacing',
|
|
65
|
+
text: 'message.udp.closeOtherTabs',
|
|
66
|
+
divided: true,
|
|
67
|
+
disabled: multiTags.value.length > 2 ? false : true,
|
|
68
|
+
show: true
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
icon: 'ri:subtract-line',
|
|
72
|
+
text: 'message.udp.closeAllTabs',
|
|
73
|
+
divided: false,
|
|
74
|
+
disabled: multiTags.value.length > 1 ? false : true,
|
|
75
|
+
show: true
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
icon: 'ri:fullscreen-fill',
|
|
79
|
+
text: 'message.udp.wholeFullScreen',
|
|
80
|
+
divided: true,
|
|
81
|
+
disabled: false,
|
|
82
|
+
show: true
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
icon: 'ri:fullscreen-fill',
|
|
86
|
+
text: 'message.udp.contentFullScreen',
|
|
87
|
+
divided: false,
|
|
88
|
+
disabled: false,
|
|
89
|
+
show: true
|
|
90
|
+
}
|
|
91
|
+
]);
|
|
92
|
+
|
|
93
|
+
function conditionHandle(item, previous, next) {
|
|
94
|
+
const currentName = route.name || '';
|
|
95
|
+
const itemName = item.name || '';
|
|
96
|
+
if (isBoolean(route?.meta?.showLink) && route?.meta?.showLink === false) {
|
|
97
|
+
if (Object.keys(route.query).length > 0) {
|
|
98
|
+
return currentName === itemName && isEqual(route.query, item.query) ? previous : next;
|
|
99
|
+
} else {
|
|
100
|
+
if (item.params) {
|
|
101
|
+
return currentName === itemName && isEqual(route.params, item.params) ? previous : next;
|
|
102
|
+
} else {
|
|
103
|
+
return currentName === itemName ? previous : next;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
return currentName === itemName ? previous : next;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const isFixedTag = computed(() => {
|
|
112
|
+
return item => {
|
|
113
|
+
return isBoolean(item?.meta?.fixedTag) && item?.meta?.fixedTag === true;
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const iconIsActive = computed(() => {
|
|
118
|
+
return (item, index) => {
|
|
119
|
+
if (index === 0) return;
|
|
120
|
+
return conditionHandle(item, true, false);
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
const linkIsActive = computed(() => {
|
|
125
|
+
return item => {
|
|
126
|
+
return conditionHandle(item, 'is-active', '');
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
const scheduleIsActive = computed(() => {
|
|
131
|
+
return item => {
|
|
132
|
+
return conditionHandle(item, 'schedule-active', '');
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
const getTabStyle = computed((): CSSProperties => {
|
|
137
|
+
return {
|
|
138
|
+
transform: `translateX(${translateX.value}px)`
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
const getContextMenuStyle = computed((): CSSProperties => {
|
|
143
|
+
return { left: buttonLeft.value + 'px', top: buttonTop.value + 'px' };
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const closeMenu = () => {
|
|
147
|
+
visible.value = false;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** 鼠标移入添加激活样式 */
|
|
151
|
+
function onMouseenter(index) {
|
|
152
|
+
if (index) activeIndex.value = index;
|
|
153
|
+
if (unref(showModel) === 'smart') {
|
|
154
|
+
if (hasClass(instance.refs['schedule' + index][0], 'schedule-active')) return;
|
|
155
|
+
toggleClass(true, 'schedule-in', instance.refs['schedule' + index][0]);
|
|
156
|
+
toggleClass(false, 'schedule-out', instance.refs['schedule' + index][0]);
|
|
157
|
+
} else {
|
|
158
|
+
if (hasClass(instance.refs['dynamic' + index][0], 'is-active')) return;
|
|
159
|
+
toggleClass(true, 'card-in', instance.refs['dynamic' + index][0]);
|
|
160
|
+
toggleClass(false, 'card-out', instance.refs['dynamic' + index][0]);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** 鼠标移出恢复默认样式 */
|
|
165
|
+
function onMouseleave(index) {
|
|
166
|
+
activeIndex.value = -1;
|
|
167
|
+
if (unref(showModel) === 'smart') {
|
|
168
|
+
if (hasClass(instance.refs['schedule' + index][0], 'schedule-active')) return;
|
|
169
|
+
toggleClass(false, 'schedule-in', instance.refs['schedule' + index][0]);
|
|
170
|
+
toggleClass(true, 'schedule-out', instance.refs['schedule' + index][0]);
|
|
171
|
+
} else {
|
|
172
|
+
if (hasClass(instance.refs['dynamic' + index][0], 'is-active')) return;
|
|
173
|
+
toggleClass(false, 'card-in', instance.refs['dynamic' + index][0]);
|
|
174
|
+
toggleClass(true, 'card-out', instance.refs['dynamic' + index][0]);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function onContentFullScreen() {
|
|
179
|
+
SuSetting.hiddenSideBar
|
|
180
|
+
? SuSetting.changeSetting({ key: 'hiddenSideBar', value: false })
|
|
181
|
+
: SuSetting.changeSetting({ key: 'hiddenSideBar', value: true });
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
onMounted(() => {
|
|
185
|
+
if (!showModel.value) {
|
|
186
|
+
const configure = storageLocal.getItem(`${responsiveStorageNameSpace()}configure`);
|
|
187
|
+
configure.showModel = 'card';
|
|
188
|
+
storageLocal.setItem(`${responsiveStorageNameSpace()}configure`, configure);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
watch(
|
|
193
|
+
() => visible.value,
|
|
194
|
+
() => {
|
|
195
|
+
useEventListener(document, 'click', closeMenu);
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
route,
|
|
201
|
+
router,
|
|
202
|
+
visible,
|
|
203
|
+
showTags,
|
|
204
|
+
instance,
|
|
205
|
+
multiTags,
|
|
206
|
+
showModel,
|
|
207
|
+
tagsViews,
|
|
208
|
+
buttonTop,
|
|
209
|
+
buttonLeft,
|
|
210
|
+
translateX,
|
|
211
|
+
isFixedTag,
|
|
212
|
+
SuSetting,
|
|
213
|
+
activeIndex,
|
|
214
|
+
getTabStyle,
|
|
215
|
+
iconIsActive,
|
|
216
|
+
linkIsActive,
|
|
217
|
+
currentSelect,
|
|
218
|
+
scheduleIsActive,
|
|
219
|
+
getContextMenuStyle,
|
|
220
|
+
closeMenu,
|
|
221
|
+
onMounted,
|
|
222
|
+
onMouseenter,
|
|
223
|
+
onMouseleave,
|
|
224
|
+
transformI18n,
|
|
225
|
+
onContentFullScreen
|
|
226
|
+
};
|
|
227
|
+
}
|
package/src/main.ts
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-12-23 17:33:20
|
|
4
|
-
* @LastEditors: wei.li
|
|
5
|
-
* @LastEditTime: 2024-06-28 11:52:44
|
|
6
|
-
* @Description: file content:
|
|
7
|
-
*/
|
|
8
|
-
const taski18n = {
|
|
9
|
-
zh: {
|
|
10
|
-
message: {
|
|
11
|
-
taskName: '任务名称',
|
|
12
|
-
processInstId: '任务编码',
|
|
13
|
-
taskTitle: '任务标题',
|
|
14
|
-
taskPhase: '流程阶段',
|
|
15
|
-
agreement: '审批意见',
|
|
16
|
-
description: '备注',
|
|
17
|
-
actuatorCode: '执行器编码',
|
|
18
|
-
actuatorName: '执行器名称',
|
|
19
|
-
actuatorType: '注册方式',
|
|
20
|
-
actuatorAddress: '机器地址'
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
en: {
|
|
24
|
-
message: {
|
|
25
|
-
taskName: 'taskName',
|
|
26
|
-
processInstId: 'processInstId',
|
|
27
|
-
taskTitle: 'taskTitle',
|
|
28
|
-
taskPhase: 'taskPhase',
|
|
29
|
-
agreement: 'agreement',
|
|
30
|
-
description: 'description',
|
|
31
|
-
actuatorCode: 'Actuator Code',
|
|
32
|
-
actuatorName: 'Actuator Name',
|
|
33
|
-
actuatorType: 'Actuator Type',
|
|
34
|
-
actuatorAddress: 'Actuator Adress'
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const definei18n = {
|
|
39
|
-
zh: {
|
|
40
|
-
message: {
|
|
41
|
-
flowId: '流程标识',
|
|
42
|
-
flowName: '流程名称',
|
|
43
|
-
flowCode: '流程业务',
|
|
44
|
-
description: '流程描述',
|
|
45
|
-
flowDesign: '流程设计',
|
|
46
|
-
version: '版本',
|
|
47
|
-
effectDate: '生效日期'
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
en: {
|
|
51
|
-
message: {
|
|
52
|
-
flowId: 'flowId',
|
|
53
|
-
flowName: 'flowName',
|
|
54
|
-
flowCode: 'flowCode',
|
|
55
|
-
description: 'description',
|
|
56
|
-
flowDesign: 'Flow Design'
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
const modules = [taski18n, definei18n];
|
|
61
|
-
|
|
62
|
-
const systemi18n = {
|
|
63
|
-
zh: {
|
|
64
|
-
...Object.assign({}, ...modules.map(v => v.zh.message))
|
|
65
|
-
},
|
|
66
|
-
en: {
|
|
67
|
-
...Object.assign({}, ...modules.map(v => v.en.message))
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export default systemi18n;
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-12-23 17:33:20
|
|
4
|
+
* @LastEditors: wei.li
|
|
5
|
+
* @LastEditTime: 2024-06-28 11:52:44
|
|
6
|
+
* @Description: file content:
|
|
7
|
+
*/
|
|
8
|
+
const taski18n = {
|
|
9
|
+
zh: {
|
|
10
|
+
message: {
|
|
11
|
+
taskName: '任务名称',
|
|
12
|
+
processInstId: '任务编码',
|
|
13
|
+
taskTitle: '任务标题',
|
|
14
|
+
taskPhase: '流程阶段',
|
|
15
|
+
agreement: '审批意见',
|
|
16
|
+
description: '备注',
|
|
17
|
+
actuatorCode: '执行器编码',
|
|
18
|
+
actuatorName: '执行器名称',
|
|
19
|
+
actuatorType: '注册方式',
|
|
20
|
+
actuatorAddress: '机器地址'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
en: {
|
|
24
|
+
message: {
|
|
25
|
+
taskName: 'taskName',
|
|
26
|
+
processInstId: 'processInstId',
|
|
27
|
+
taskTitle: 'taskTitle',
|
|
28
|
+
taskPhase: 'taskPhase',
|
|
29
|
+
agreement: 'agreement',
|
|
30
|
+
description: 'description',
|
|
31
|
+
actuatorCode: 'Actuator Code',
|
|
32
|
+
actuatorName: 'Actuator Name',
|
|
33
|
+
actuatorType: 'Actuator Type',
|
|
34
|
+
actuatorAddress: 'Actuator Adress'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const definei18n = {
|
|
39
|
+
zh: {
|
|
40
|
+
message: {
|
|
41
|
+
flowId: '流程标识',
|
|
42
|
+
flowName: '流程名称',
|
|
43
|
+
flowCode: '流程业务',
|
|
44
|
+
description: '流程描述',
|
|
45
|
+
flowDesign: '流程设计',
|
|
46
|
+
version: '版本',
|
|
47
|
+
effectDate: '生效日期'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
en: {
|
|
51
|
+
message: {
|
|
52
|
+
flowId: 'flowId',
|
|
53
|
+
flowName: 'flowName',
|
|
54
|
+
flowCode: 'flowCode',
|
|
55
|
+
description: 'description',
|
|
56
|
+
flowDesign: 'Flow Design'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const modules = [taski18n, definei18n];
|
|
61
|
+
|
|
62
|
+
const systemi18n = {
|
|
63
|
+
zh: {
|
|
64
|
+
...Object.assign({}, ...modules.map(v => v.zh.message))
|
|
65
|
+
},
|
|
66
|
+
en: {
|
|
67
|
+
...Object.assign({}, ...modules.map(v => v.en.message))
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export default systemi18n;
|