From b987be8dd8b6bc1fa01810daa1e1a60e58a3c921 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 04 九月 2020 17:24:36 +0800 Subject: [PATCH] 2020-09-04 --- src/tabviews/custom/index.jsx | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index b95e93a..e9c28fe 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -173,12 +173,14 @@ } } - component.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰 + if (component.setting) { + component.setting.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰 + } // format 鏁版嵁鏍煎紡 array 鎴� object // dataName 绯荤粺鐢熸垚鐨勬暟鎹簮鍚嶇О - // laypage 鏄惁鍒嗛〉锛岀粍浠跺睘鎬э紝涓嶅垎椤电殑缁勪欢鎵嶅彲浠ョ粺涓�鏌ヨ - if (component.format && component.dataName && !component.laypage && component.setting.interType === 'system' && component.setting.onload === 'true' && component.setting.sync === 'true') { + // pageable 鏄惁鍒嗛〉锛岀粍浠跺睘鎬э紝涓嶅垎椤电殑缁勪欢鎵嶅彲浠ョ粺涓�鏌ヨ + if (component.format && component.dataName && !component.pageable && component.setting.interType === 'system' && component.setting.onload === 'true' && component.setting.sync === 'true') { let param = this.getDefaultParam(component, mainSearch) params.push(param) } else { @@ -213,7 +215,7 @@ * @description 鑾峰彇绯荤粺瀛樺偍杩囩▼ sPC_Get_TableData 鐨勫弬鏁� */ getDefaultParam = (component, mainSearch) => { - const { columns, search, setting, dataName, format, customScript } = component + const { columns, search, setting, dataName, format } = component let searchlist = [] if (search && search.length > 0) { @@ -225,7 +227,7 @@ let arr_field = columns.map(col => col.field) let _dataresource = setting.dataresource - let _customScript = customScript + let _customScript = setting.customScript if (setting.queryType === 'statistics' || _customScript) { let allSearch = Utils.getAllSearchOptions(searchlist) -- Gitblit v1.8.0