From 73a5e692e3401695dea8d602cca3cadbc2934db9 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 05 九月 2024 15:38:08 +0800 Subject: [PATCH] 集成 amis编辑 --- src/components/amis/AMISRenderer.vue | 44 ++++++++++++++++++++++++++++++-------------- 1 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/components/amis/AMISRenderer.vue b/src/components/amis/AMISRenderer.vue index 8436d11..edc1dd5 100644 --- a/src/components/amis/AMISRenderer.vue +++ b/src/components/amis/AMISRenderer.vue @@ -13,10 +13,8 @@ import qs from 'qs'; function loadScript(callback) { - console.log('馃殌 ~ load script',); window.eventList.amisSdkJsPromise .then(() => { - console.log('馃殌 ~ load',); callback(); }) .catch((error) => { @@ -153,18 +151,36 @@ // 鍏ㄥ眬 api 閫傞厤鍣ㄣ�� // 鍙﹀鍦� amis 閰嶇疆椤逛腑鐨� api 涔熷彲浠ラ厤缃�傞厤鍣紝閽堝鏌愪釜鐗瑰畾鎺ュ彛鍗曠嫭澶勭悊銆� responseAdaptor(api, payload, query, request, response) { - return { - data: { - rows: [ - { - warn_type: '瓒呴潤鎬侀槇鍊笺�愬崟鎸囨爣銆�', - warn_title: - 'UTHU2000004鍘嬪姏 浠�2024-08-26 09:50:00(0.270MPa)鍒�10:10:00(0.274MPa)鏈熼棿瓒呰秺涓婇檺[涓嬮檺: 0.240MPa,涓婇檺0.260MPa]', - warn_time: '2024-08-26 10:11:45', - }, - ], - }, - }; + // { + // "json_ok": true, + // "sections": [ + // { + // "section_id": "knowledge_base", + // "section_name": "姘村姟鐭ヨ瘑搴�", + // "section_title": "鎷ユ湁姘村姟琛屼笟鐩稿叧鐨勯�氱敤鐭ヨ瘑锛屽寘鎷細娉曞緥娉曡銆佽璁¤鑼冦�佺粰鎺掓按鐩稿叧鐭ヨ瘑绛夌瓑" + // }, + // { + // "section_id": "office_assistant", + // "section_name": "鍔炲叕鍔╂墜", + // "section_title": "鍔炲叕鍔╂墜鑳藉杈呭姪鍐欎細璁�氱煡銆佽鍋囨潯銆佸伐浣滄�荤粨銆丳PT绛夊伐浣溿��" + // }, + // { + // "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 -- Gitblit v1.9.3