wujingjing
2024-09-05 73a5e692e3401695dea8d602cca3cadbc2934db9
集成 amis编辑
已修改3个文件
65 ■■■■ 文件已修改
src/api/login/UserMenuData.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/amis/AMISRenderer.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.ts 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/login/UserMenuData.ts
@@ -24,7 +24,7 @@
                Permission: '',
                Icon: 'ywifont ywicon-a-appround15',
                IsIframe: true,
                OutLink: '/amis-editor/index.html',
                OutLink: '/amis-editor/index.html?session={token}',
                IsHide: false,
                Weight: 0,
                SortCode: 2,
src/components/amis/AMISRenderer.vue
@@ -151,36 +151,36 @@
                // 全局 api 适配器。
                // 另外在 amis 配置项中的 api 也可以配置适配器,针对某个特定接口单独处理。
                responseAdaptor(api, payload, query, request, response) {
//                     {
//   "json_ok": true,
//   "sections": [
//     {
//       "section_id": "knowledge_base",
//       "section_name": "水务知识库",
//       "section_title": "拥有水务行业相关的通用知识,包括:法律法规、设计规范、给排水相关知识等等"
//     },
//     {
//       "section_id": "office_assistant",
//       "section_name": "办公助手",
//       "section_title": "办公助手能够辅助写会议通知、请假条、工作总结、PPT等工作。"
//     },
//     {
//       "section_id": "customer_service",
//       "section_name": "客户服务",
//       "section_title": "针对水务企业对外客户服务相关的内容,包括:抄表、开账、收费,以及热线相关"
//     },
//     {
//       "section_id": "network_operation",
//       "section_name": "管网运行",
//       "section_title": "针对水务企业管网运行与维护管理、水质管理等相关"
//     },
//     {
//       "section_id": "waterworks_operation",
//       "section_name": "水厂运行",
//       "section_title": "针对水务企业水厂运日常运营管理服务,包括:水厂工艺流程、水泵运行调度"
//     }
//   ]
// }
                    //                     {
                    //   "json_ok": true,
                    //   "sections": [
                    //     {
                    //       "section_id": "knowledge_base",
                    //       "section_name": "水务知识库",
                    //       "section_title": "拥有水务行业相关的通用知识,包括:法律法规、设计规范、给排水相关知识等等"
                    //     },
                    //     {
                    //       "section_id": "office_assistant",
                    //       "section_name": "办公助手",
                    //       "section_title": "办公助手能够辅助写会议通知、请假条、工作总结、PPT等工作。"
                    //     },
                    //     {
                    //       "section_id": "customer_service",
                    //       "section_name": "客户服务",
                    //       "section_title": "针对水务企业对外客户服务相关的内容,包括:抄表、开账、收费,以及热线相关"
                    //     },
                    //     {
                    //       "section_id": "network_operation",
                    //       "section_name": "管网运行",
                    //       "section_title": "针对水务企业管网运行与维护管理、水质管理等相关"
                    //     },
                    //     {
                    //       "section_id": "waterworks_operation",
                    //       "section_name": "水厂运行",
                    //       "section_title": "针对水务企业水厂运日常运营管理服务,包括:水厂工艺流程、水泵运行调度"
                    //     }
                    //   ]
                    // }
                    return payload;
                },
                // 覆盖 amis env
src/utils/request.ts
@@ -37,11 +37,12 @@
    clearAccessTokens();
    window.location.reload();
});
window.handleNoAuth = handleNoAuth;
let requestNum = 0;
let loadingInstance: ReturnType<typeof ElLoadingService>;
const addLoading = () => {
    // 增加loading 如果pending请求数量等于1,弹出loading, 防止重复弹出
    // 增加loading 如果pending请求数量等于1,弹出loading, 防止重复弹出F
    requestNum++;
    if (requestNum == 1) {
        loadingInstance = ElLoadingService({