|
@@ -6,7 +6,7 @@
|
|
|
<a-menu>
|
|
<a-menu>
|
|
|
<template v-if="group.children && group.children.length">
|
|
<template v-if="group.children && group.children.length">
|
|
|
<a-menu-item v-for="item in group.children" :key="item.name">
|
|
<a-menu-item v-for="item in group.children" :key="item.name">
|
|
|
- <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
|
|
|
|
+ <AuthImage v-if="item.icon" :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
<span v-if="item.action === 'RUN_PROCESS_REPORT'" @click="execute(item)">
|
|
<span v-if="item.action === 'RUN_PROCESS_REPORT'" @click="execute(item)">
|
|
|
{{ Language.getNameTrl($i18n.locale, item) }}
|
|
{{ Language.getNameTrl($i18n.locale, item) }}
|
|
|
</span>
|
|
</span>
|
|
@@ -37,7 +37,7 @@
|
|
|
</a-menu>
|
|
</a-menu>
|
|
|
</template>
|
|
</template>
|
|
|
<a-button>
|
|
<a-button>
|
|
|
- <AuthImage :auth-src="getSrc(group.info.icon)" class="auth_image" />
|
|
|
|
|
|
|
+ <AuthImage v-if="group.info.icon" :auth-src="getSrc(group.info.icon)" class="auth_image" />
|
|
|
{{ Language.getNameTrl($i18n.locale, group.info) }}
|
|
{{ Language.getNameTrl($i18n.locale, group.info) }}
|
|
|
<DownOutlined />
|
|
<DownOutlined />
|
|
|
</a-button>
|
|
</a-button>
|
|
@@ -46,36 +46,38 @@
|
|
|
<template v-if="otherButtons && otherButtons.length">
|
|
<template v-if="otherButtons && otherButtons.length">
|
|
|
<template v-for="(item, index) in otherButtons" :key="index">
|
|
<template v-for="(item, index) in otherButtons" :key="index">
|
|
|
<a-button v-if="item.action === 'RUN_PROCESS_REPORT'" @click="execute(item)">
|
|
<a-button v-if="item.action === 'RUN_PROCESS_REPORT'" @click="execute(item)">
|
|
|
|
|
+ <AuthImage v-if="item.icon" :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-button v-else-if="item.action === 'OPEN_CUSTOMER_WINDOW'" @click="execute(item)">
|
|
<a-button v-else-if="item.action === 'OPEN_CUSTOMER_WINDOW'" @click="execute(item)">
|
|
|
|
|
+ <AuthImage v-if="item.icon" :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-button v-else-if="item.action === 'OPEN_HTML_WINDOW'" @click="execute(item)">
|
|
<a-button v-else-if="item.action === 'OPEN_HTML_WINDOW'" @click="execute(item)">
|
|
|
|
|
+ <AuthImage v-if="item.icon" :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-button v-else-if="item.action === 'EXPORT'" @click="exportDatas">
|
|
<a-button v-else-if="item.action === 'EXPORT'" @click="exportDatas">
|
|
|
- <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
|
|
|
|
+ <AuthImage v-if="item.icon" :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-button v-else-if="item.action === 'REFRESH'" @click="refresh">
|
|
<a-button v-else-if="item.action === 'REFRESH'" @click="refresh">
|
|
|
- <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
|
|
|
|
+ <AuthImage v-if="item.icon" :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-button v-else-if="item.action === 'NOTICE'">
|
|
<a-button v-else-if="item.action === 'NOTICE'">
|
|
|
- <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
|
|
|
|
+ <AuthImage v-if="item.icon" :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-button
|
|
<a-button
|
|
|
v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
|
|
v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
|
|
|
@click=" openRemoteComponentModule(item)"
|
|
@click=" openRemoteComponentModule(item)"
|
|
|
>
|
|
>
|
|
|
- <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
|
|
|
|
+ <AuthImage v-if="item.icon" :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-button v-else>
|
|
<a-button v-else>
|
|
|
- <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <AuthImage v-if="item.icon" :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -116,6 +118,7 @@ const buttonGroup = ref([]);
|
|
|
const otherButtons = ref([]);
|
|
const otherButtons = ref([]);
|
|
|
const modal1Component = ref(null);
|
|
const modal1Component = ref(null);
|
|
|
const modal1Open = ref(false);
|
|
const modal1Open = ref(false);
|
|
|
|
|
+const infoButtons = ref([]);
|
|
|
|
|
|
|
|
watch(() => props.infoButtons, newValue => {
|
|
watch(() => props.infoButtons, newValue => {
|
|
|
if (newValue && newValue.length > 0) {
|
|
if (newValue && newValue.length > 0) {
|
|
@@ -125,18 +128,21 @@ watch(() => props.infoButtons, newValue => {
|
|
|
newValue.forEach(item => {
|
|
newValue.forEach(item => {
|
|
|
if (item.isOption) {
|
|
if (item.isOption) {
|
|
|
buttonGroup.value.push({ name: item.name, info: item, children: [] });
|
|
buttonGroup.value.push({ name: item.name, info: item, children: [] });
|
|
|
- }
|
|
|
|
|
- if (!item.isOption && item.infoButtonOptionNo) {
|
|
|
|
|
- buttonGroup.value.forEach(group => {
|
|
|
|
|
- if (group.name === item.infoButtonOptionNo) {
|
|
|
|
|
- group.children.push(item);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ infoButtons.value.push(item);
|
|
|
}
|
|
}
|
|
|
if (!item.isOption && !item.infoButtonOptionNo) {
|
|
if (!item.isOption && !item.infoButtonOptionNo) {
|
|
|
otherButtons.value.push(item);
|
|
otherButtons.value.push(item);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ infoButtons.value.forEach(button => {
|
|
|
|
|
+ buttonGroup.value.forEach(group => {
|
|
|
|
|
+ if (group.name === button.infoButtonOptionNo) {
|
|
|
|
|
+ group.children.push(button);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
};
|
|
};
|
|
|
}, { immediate: true, deep: true });
|
|
}, { immediate: true, deep: true });
|
|
|
|
|
|
|
@@ -232,13 +238,13 @@ const openRemoteComponentModule = async tabButton => {
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.auth_image {
|
|
.auth_image {
|
|
|
- width: 18px;
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
- margin-right: 4px;
|
|
|
|
|
- margin-bottom: 3px;
|
|
|
|
|
|
|
+ width: 18px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ margin-right: 8px;
|
|
|
|
|
+ margin-bottom: 3px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
:deep(.ant-btn) {
|
|
:deep(.ant-btn) {
|
|
|
- padding: 4px 8px;
|
|
|
|
|
|
|
+ padding: 4px 8px;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|