From 3013013eb7eadea484a394b9e6d6c98948d350f9 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Thu, 2 Mar 2023 10:47:47 +0800 Subject: [PATCH] * Add custom screen chart data paser. --- module/screen/model.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/module/screen/model.php b/module/screen/model.php index 460be2c737..ea2059d03a 100644 --- a/module/screen/model.php +++ b/module/screen/model.php @@ -116,10 +116,17 @@ class screenModel extends model } $config->height += 50; - $chartData = new stdclass(); - $chartData->editCanvasConfig = $config; - $chartData->componentList = $this->buildComponentList($componentList); - $chartData->requestGlobalConfig = json_decode('{ "requestDataPond": [], "requestOriginUrl": "", "requestInterval": 30, "requestIntervalUnit": "second", "requestParams": { "Body": { "form-data": {}, "x-www-form-urlencoded": {}, "json": "", "xml": "" }, "Header": {}, "Params": {} } return $chartData; }'); + if($screen->builtin) + { + $chartData = new stdclass(); + $chartData->editCanvasConfig = $config; + $chartData->componentList = $this->buildComponentList($componentList); + $chartData->requestGlobalConfig = json_decode('{ "requestDataPond": [], "requestOriginUrl": "", "requestInterval": 30, "requestIntervalUnit": "second", "requestParams": { "Body": { "form-data": {}, "x-www-form-urlencoded": {}, "json": "", "xml": "" }, "Header": {}, "Params": {} } }'); + } + else + { + return json_decode($screen->scheme); + } return $chartData; }