|
@@ -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="getImageSrc(item.icon)" style="width: 40px; cursor: pointer" /> -->
|
|
|
|
|
|
|
+ <AuthImage :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>
|
|
|
- <ProjectTwoTone />
|
|
|
|
|
|
|
+ <AuthImage :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>
|
|
@@ -45,37 +45,39 @@
|
|
|
</template>
|
|
</template>
|
|
|
<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'" :icon="h(ControlTwoTone)" @click="execute(item)">
|
|
|
|
|
|
|
+ <a-button v-if="item.action === 'RUN_PROCESS_REPORT'" @click="execute(item)">
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
- <a-button
|
|
|
|
|
- v-else-if="item.action === 'OPEN_CUSTOMER_WINDOW'" :icon="h(BookTwoTone)"
|
|
|
|
|
- @click="execute(item)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <a-button v-else-if="item.action === 'OPEN_CUSTOMER_WINDOW'" @click="execute(item)">
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
- <a-button
|
|
|
|
|
- v-else-if="item.action === 'OPEN_HTML_WINDOW'" :icon="h(ContainerTwoTone)"
|
|
|
|
|
- @click="execute(item)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <a-button v-else-if="item.action === 'OPEN_HTML_WINDOW'" @click="execute(item)">
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
- <a-button v-else-if="item.action === 'EXPORT'" :icon="h(DownloadOutlined)" @click="exportDatas">
|
|
|
|
|
|
|
+ <a-button v-else-if="item.action === 'EXPORT'" @click="exportDatas">
|
|
|
|
|
+ <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
- <a-button v-else-if="item.action === 'REFRESH'" :icon="h(ReloadOutlined)" @click="refresh">
|
|
|
|
|
|
|
+ <a-button v-else-if="item.action === 'REFRESH'" @click="refresh">
|
|
|
|
|
+ <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
- <a-button v-else-if="item.action === 'NOTICE'" :icon="h(BellTwoTone)">
|
|
|
|
|
|
|
+ <a-button v-else-if="item.action === 'NOTICE'">
|
|
|
|
|
+ <AuthImage :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'" :icon="h(HddOutlined)"
|
|
|
|
|
- @click="openRemoteComponentModule(item)"
|
|
|
|
|
|
|
+ v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
|
|
|
|
|
+ @click=" openRemoteComponentModule(item)"
|
|
|
>
|
|
>
|
|
|
|
|
+ <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
|
|
+ {{ item.name }}
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ <a-button v-else>
|
|
|
|
|
+ <AuthImage :auth-src="getSrc(item.icon)" class="auth_image" />
|
|
|
|
|
+
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-button>
|
|
</a-button>
|
|
|
- <a-button v-else :icon="h(LayoutTwoTone)">{{ item.name }}</a-button>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
</a-space>
|
|
</a-space>
|
|
@@ -86,26 +88,12 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { defineProps, defineEmits, defineAsyncComponent, ref, watch, h } from 'vue';
|
|
|
|
|
|
|
+import { defineProps, defineEmits, defineAsyncComponent, ref, watch } from 'vue';
|
|
|
import Language from '../../common/Language.js';
|
|
import Language from '../../common/Language.js';
|
|
|
-import {
|
|
|
|
|
- PlusSquareTwoTone,
|
|
|
|
|
- DeleteTwoTone,
|
|
|
|
|
- EditTwoTone,
|
|
|
|
|
- BookTwoTone,
|
|
|
|
|
- BellTwoTone,
|
|
|
|
|
- HddOutlined,
|
|
|
|
|
- FileTextTwoTone,
|
|
|
|
|
- ContainerTwoTone,
|
|
|
|
|
- ControlTwoTone,
|
|
|
|
|
- ReloadOutlined,
|
|
|
|
|
- LayoutTwoTone,
|
|
|
|
|
- DownOutlined, DownloadOutlined, ProjectTwoTone,
|
|
|
|
|
-} from '@ant-design/icons-vue';
|
|
|
|
|
|
|
+import { DownOutlined } from '@ant-design/icons-vue';
|
|
|
import { Spin as ASpin, Empty as AEmpty, message } from 'ant-design-vue';
|
|
import { Spin as ASpin, Empty as AEmpty, message } from 'ant-design-vue';
|
|
|
import CssUtil from '../../common/CssUtil.js';
|
|
import CssUtil from '../../common/CssUtil.js';
|
|
|
import AuthImage from '../../image/src/AuthImage.vue';
|
|
import AuthImage from '../../image/src/AuthImage.vue';
|
|
|
-import Common from '../../common/Common.js';
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['refreshDatas', 'executeExport', 'executeProcess']);
|
|
const emit = defineEmits(['refreshDatas', 'executeExport', 'executeProcess']);
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -117,9 +105,9 @@ const props = defineProps({
|
|
|
type: Object,
|
|
type: Object,
|
|
|
default: null,
|
|
default: null,
|
|
|
},
|
|
},
|
|
|
- infoWindowNo: {
|
|
|
|
|
|
|
+ iconSrc: {
|
|
|
type: String,
|
|
type: String,
|
|
|
- default: null,
|
|
|
|
|
|
|
+ default: '',
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -129,7 +117,6 @@ const otherButtons = ref([]);
|
|
|
const modal1Component = ref(null);
|
|
const modal1Component = ref(null);
|
|
|
const modal1Open = ref(false);
|
|
const modal1Open = ref(false);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
watch(() => props.infoButtons, newValue => {
|
|
watch(() => props.infoButtons, newValue => {
|
|
|
if (newValue && newValue.length > 0) {
|
|
if (newValue && newValue.length > 0) {
|
|
|
buttons.value = [];
|
|
buttons.value = [];
|
|
@@ -153,29 +140,10 @@ watch(() => props.infoButtons, newValue => {
|
|
|
};
|
|
};
|
|
|
}, { immediate: true, deep: true });
|
|
}, { immediate: true, deep: true });
|
|
|
|
|
|
|
|
-// const getImageSrc = icon => {
|
|
|
|
|
-// const params = {
|
|
|
|
|
-
|
|
|
|
|
-// };
|
|
|
|
|
-// if (icon) {
|
|
|
|
|
-
|
|
|
|
|
-// getSrc(params).then(
|
|
|
|
|
-// successData => {
|
|
|
|
|
-// if (successData.errorCode === 0) {
|
|
|
|
|
-// _self.iconSrc = Common.getRootPath() + successData.data;
|
|
|
|
|
-// } else {
|
|
|
|
|
-// message.warning(successData.errorMessage);
|
|
|
|
|
-// }
|
|
|
|
|
-// },
|
|
|
|
|
-// errorData => {
|
|
|
|
|
-// Common.processException(errorData);
|
|
|
|
|
-// },
|
|
|
|
|
-// );
|
|
|
|
|
-// return Common.getImageSrc(_self.className, item);
|
|
|
|
|
-// } else {
|
|
|
|
|
-// return '';
|
|
|
|
|
-// }
|
|
|
|
|
-// };
|
|
|
|
|
|
|
+const getSrc = icon => {
|
|
|
|
|
+ if (!icon) return '';
|
|
|
|
|
+ return props.iconSrc + icon;
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
// 执行导出
|
|
// 执行导出
|
|
|
const exportDatas = () => {
|
|
const exportDatas = () => {
|
|
@@ -262,4 +230,15 @@ const openRemoteComponentModule = async tabButton => {
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style scoped></style>
|
|
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.auth_image {
|
|
|
|
|
+ width: 18px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ margin-right: 4px;
|
|
|
|
|
+ margin-bottom: 3px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+:deep(.ant-btn) {
|
|
|
|
|
+ padding: 4px 8px;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|