|
@@ -10,8 +10,11 @@
|
|
|
<BookTwoTone v-if="item.action === 'OPEN_CUSTOMER_WINDOW'" />
|
|
<BookTwoTone v-if="item.action === 'OPEN_CUSTOMER_WINDOW'" />
|
|
|
<ContainerTwoTone v-if="item.action === 'OPEN_HTML_WINDOW'" />
|
|
<ContainerTwoTone v-if="item.action === 'OPEN_HTML_WINDOW'" />
|
|
|
<FileTextTwoTone v-if="item.action === 'EXPORT'" />
|
|
<FileTextTwoTone v-if="item.action === 'EXPORT'" />
|
|
|
|
|
+ <ReloadOutlined v-if="item.action === 'REFRESH'" />
|
|
|
<BellTwoTone v-if="item.action === 'NOTICE'" />
|
|
<BellTwoTone v-if="item.action === 'NOTICE'" />
|
|
|
- <HddOutlined v-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'" />
|
|
|
|
|
|
|
+ <HddOutlined
|
|
|
|
|
+ v-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
<span v-if="item.action === 'CREATE'" @click="create">{{
|
|
<span v-if="item.action === 'CREATE'" @click="create">{{
|
|
|
item.name
|
|
item.name
|
|
@@ -22,12 +25,13 @@
|
|
|
<span v-else-if="item.action === 'EXPORT'" @click="exportConfirm">{{
|
|
<span v-else-if="item.action === 'EXPORT'" @click="exportConfirm">{{
|
|
|
item.name
|
|
item.name
|
|
|
}}</span>
|
|
}}</span>
|
|
|
- <span
|
|
|
|
|
- v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
|
|
|
|
|
- @click="openRemotCompoentModule(item)"
|
|
|
|
|
- >{{
|
|
|
|
|
|
|
+ <span v-else-if="item.action === 'REFRESH'" @click="refresh">{{
|
|
|
item.name
|
|
item.name
|
|
|
}}</span>
|
|
}}</span>
|
|
|
|
|
+ <span
|
|
|
|
|
+ v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
|
|
|
|
|
+ @click="openRemoteComponentModule(item)"
|
|
|
|
|
+ >{{ item.name }}</span>
|
|
|
<span v-else>{{ item.name }}</span>
|
|
<span v-else>{{ item.name }}</span>
|
|
|
</a-breadcrumb-item>
|
|
</a-breadcrumb-item>
|
|
|
|
|
|
|
@@ -50,7 +54,10 @@
|
|
|
<ContainerTwoTone v-if="item.action === 'OPEN_HTML_WINDOW'" />
|
|
<ContainerTwoTone v-if="item.action === 'OPEN_HTML_WINDOW'" />
|
|
|
<FileTextTwoTone v-if="item.action === 'EXPORT'" />
|
|
<FileTextTwoTone v-if="item.action === 'EXPORT'" />
|
|
|
<BellTwoTone v-if="item.action === 'NOTICE'" />
|
|
<BellTwoTone v-if="item.action === 'NOTICE'" />
|
|
|
- <HddOutlined v-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'" />
|
|
|
|
|
|
|
+ <ReloadOutlined v-if="item.action === 'REFRESH'" />
|
|
|
|
|
+ <HddOutlined
|
|
|
|
|
+ v-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
|
|
|
|
|
+ />
|
|
|
<span v-if="item.action === 'CREATE'" @click="create">{{
|
|
<span v-if="item.action === 'CREATE'" @click="create">{{
|
|
|
item.name
|
|
item.name
|
|
|
}}</span>
|
|
}}</span>
|
|
@@ -60,9 +67,13 @@
|
|
|
<span v-else-if="item.action === 'EXPORT'" @click="exportConfirm">{{
|
|
<span v-else-if="item.action === 'EXPORT'" @click="exportConfirm">{{
|
|
|
item.name
|
|
item.name
|
|
|
}}</span>
|
|
}}</span>
|
|
|
- <span v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'" @click="openRemotCompoentModule(item)">{{
|
|
|
|
|
|
|
+ <span v-else-if="item.action === 'REFRESH'" @click="refresh">{{
|
|
|
item.name
|
|
item.name
|
|
|
}}</span>
|
|
}}</span>
|
|
|
|
|
+ <span
|
|
|
|
|
+ v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
|
|
|
|
|
+ @click="openRemoteComponentModule(item)"
|
|
|
|
|
+ >{{ item.name }}</span>
|
|
|
<span
|
|
<span
|
|
|
v-else-if="item.action === 'NOTICE'"
|
|
v-else-if="item.action === 'NOTICE'"
|
|
|
@click="notificationModal = true"
|
|
@click="notificationModal = true"
|
|
@@ -91,14 +102,20 @@
|
|
|
</template>
|
|
</template>
|
|
|
</Modal>
|
|
</Modal>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<a-modal v-model:open="modal1Open">
|
|
<a-modal v-model:open="modal1Open">
|
|
|
<component :is="modal1Component" v-model:open="modal1Open" />
|
|
<component :is="modal1Component" v-model:open="modal1Open" />
|
|
|
</a-modal>
|
|
</a-modal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref, defineProps, defineEmits, watch, getCurrentInstance, defineAsyncComponent } from 'vue';
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ ref,
|
|
|
|
|
+ defineProps,
|
|
|
|
|
+ defineEmits,
|
|
|
|
|
+ watch,
|
|
|
|
|
+ getCurrentInstance,
|
|
|
|
|
+ defineAsyncComponent,
|
|
|
|
|
+} from 'vue';
|
|
|
import Common from '../../common/Common';
|
|
import Common from '../../common/Common';
|
|
|
import DownloadService from '../../resource/file/DownloadService.js';
|
|
import DownloadService from '../../resource/file/DownloadService.js';
|
|
|
import NotificationPanel from '../../customer/NotificationPanel.vue';
|
|
import NotificationPanel from '../../customer/NotificationPanel.vue';
|
|
@@ -119,6 +136,7 @@ import {
|
|
|
FileTextTwoTone,
|
|
FileTextTwoTone,
|
|
|
ContainerTwoTone,
|
|
ContainerTwoTone,
|
|
|
ControlTwoTone,
|
|
ControlTwoTone,
|
|
|
|
|
+ ReloadOutlined,
|
|
|
} from '@ant-design/icons-vue';
|
|
} from '@ant-design/icons-vue';
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
window: {
|
|
window: {
|
|
@@ -163,7 +181,11 @@ const props = defineProps({
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-const emit = defineEmits(['createRecordInWindowEdit', 'deleteRecords']);
|
|
|
|
|
|
|
+const emit = defineEmits([
|
|
|
|
|
+ 'createRecordInWindowEdit',
|
|
|
|
|
+ 'deleteRecords',
|
|
|
|
|
+ 'refreshDatas',
|
|
|
|
|
+]);
|
|
|
|
|
|
|
|
const tabButtons = ref([]);
|
|
const tabButtons = ref([]);
|
|
|
const leftTabButton = ref([]);
|
|
const leftTabButton = ref([]);
|
|
@@ -175,9 +197,6 @@ const modal1Open = ref(false);
|
|
|
// 模态框的组件
|
|
// 模态框的组件
|
|
|
const modal1Component = ref(null);
|
|
const modal1Component = ref(null);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
const { proxy } = getCurrentInstance(); //访问this
|
|
const { proxy } = getCurrentInstance(); //访问this
|
|
|
// 新建数据
|
|
// 新建数据
|
|
|
const create = () => {
|
|
const create = () => {
|
|
@@ -188,6 +207,11 @@ const deleteData = () => {
|
|
|
emit('deleteRecords');
|
|
emit('deleteRecords');
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+// 刷新
|
|
|
|
|
+const refresh = () => {
|
|
|
|
|
+ emit('refreshDatas', false);
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 导出确认
|
|
* 导出确认
|
|
|
*/
|
|
*/
|
|
@@ -408,10 +432,9 @@ const isEmpty = obj => {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取字符串的哈希值
|
|
* 获取字符串的哈希值
|
|
|
- * @param input
|
|
|
|
|
|
|
+ * @param input
|
|
|
*/
|
|
*/
|
|
|
const getHash = function (input) {
|
|
const getHash = function (input) {
|
|
|
let hash = 0;
|
|
let hash = 0;
|
|
@@ -420,22 +443,20 @@ const getHash = function (input) {
|
|
|
}
|
|
}
|
|
|
for (let i = 0; i < input.length; i++) {
|
|
for (let i = 0; i < input.length; i++) {
|
|
|
const char = input.charCodeAt(i);
|
|
const char = input.charCodeAt(i);
|
|
|
- hash = ((hash << 5) - hash) + char;
|
|
|
|
|
|
|
+ hash = (hash << 5) - hash + char;
|
|
|
hash = hash & hash; // 确保返回值是一个32位有符号整数
|
|
hash = hash & hash; // 确保返回值是一个32位有符号整数
|
|
|
}
|
|
}
|
|
|
return Math.abs(hash).toString();
|
|
return Math.abs(hash).toString();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 远程加载ES VUE组件模块,并在模态框中打开。
|
|
|
|
|
- * @param jsUrl js路径
|
|
|
|
|
- * @param cssUrl css路径
|
|
|
|
|
- */
|
|
|
|
|
-const openRemotCompoentModule = async function(tabButton){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ * 远程加载ES VUE组件模块,并在模态框中打开。
|
|
|
|
|
+ * @param jsUrl js路径
|
|
|
|
|
+ * @param cssUrl css路径
|
|
|
|
|
+ */
|
|
|
|
|
+const openRemoteComponentModule = async function (tabButton) {
|
|
|
let jsUrl = tabButton.remoteComponentModuleJsUrl;
|
|
let jsUrl = tabButton.remoteComponentModuleJsUrl;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
let cssUrl = tabButton.remoteComponentModuleCssUrl;
|
|
let cssUrl = tabButton.remoteComponentModuleCssUrl;
|
|
|
|
|
|
|
|
// 显示模态框
|
|
// 显示模态框
|
|
@@ -443,7 +464,7 @@ const openRemotCompoentModule = async function(tabButton){
|
|
|
//let jsUrl = './static/client-eam-module-v3/dist/AssetCheckCreate.js';
|
|
//let jsUrl = './static/client-eam-module-v3/dist/AssetCheckCreate.js';
|
|
|
//let cssUrl = './static/client-eam-module-v3/dist/AssetCheckCreate.css';
|
|
//let cssUrl = './static/client-eam-module-v3/dist/AssetCheckCreate.css';
|
|
|
|
|
|
|
|
- if(cssUrl != null && cssUrl.length > 0){
|
|
|
|
|
|
|
+ if (cssUrl != null && cssUrl.length > 0) {
|
|
|
let cssUrlHash = getHash(cssUrl);
|
|
let cssUrlHash = getHash(cssUrl);
|
|
|
CssUtil.dynamicLoadCss(cssUrl, cssUrlHash);
|
|
CssUtil.dynamicLoadCss(cssUrl, cssUrlHash);
|
|
|
}
|
|
}
|
|
@@ -451,9 +472,9 @@ const openRemotCompoentModule = async function(tabButton){
|
|
|
// const testAsyncRemoteComponent = await import(/* webpackIgnore: true */ jsUrl);
|
|
// const testAsyncRemoteComponent = await import(/* webpackIgnore: true */ jsUrl);
|
|
|
|
|
|
|
|
// console.log(testAsyncRemoteComponent);
|
|
// console.log(testAsyncRemoteComponent);
|
|
|
- if(jsUrl != null && jsUrl.length > 0){
|
|
|
|
|
|
|
+ if (jsUrl != null && jsUrl.length > 0) {
|
|
|
const testAsyncRemoteComponent = defineAsyncComponent({
|
|
const testAsyncRemoteComponent = defineAsyncComponent({
|
|
|
- // 加载函数
|
|
|
|
|
|
|
+ // 加载函数
|
|
|
loader: () => {
|
|
loader: () => {
|
|
|
return import(/* webpackIgnore: true */ jsUrl);
|
|
return import(/* webpackIgnore: true */ jsUrl);
|
|
|
},
|
|
},
|
|
@@ -471,10 +492,7 @@ const openRemotCompoentModule = async function(tabButton){
|
|
|
modal1Component.value = testAsyncRemoteComponent;
|
|
modal1Component.value = testAsyncRemoteComponent;
|
|
|
modal1Open.value = true;
|
|
modal1Open.value = true;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|