* Finish screen view for draft.

This commit is contained in:
qixinzhi
2023-03-02 14:39:12 +08:00
parent 3013013eb7
commit c76b01e68d
3 changed files with 150 additions and 11 deletions
+1
View File
@@ -44,6 +44,7 @@ class screen extends control
if($screenID == 3) $this->locate($this->createLink('report', 'annualData'));
$screen = $this->screen->getByID($screenID, $year, $dept, $account);
$this->view->title = $screen->name;
$this->view->screen = $screen;
+142
View File
@@ -0,0 +1,142 @@
{
"editCanvasConfig": {
"projectName": "1",
"width": 1920,
"height": 1080,
"filterShow": false,
"hueRotate": 0,
"saturate": 1,
"contrast": 1,
"brightness": 1,
"opacity": 1,
"rotateZ": 0,
"rotateX": 0,
"rotateY": 0,
"skewX": 0,
"skewY": 0,
"blendMode": "normal",
"selectColor": true,
"chartThemeColor": "dark",
"chartThemeSetting": {
"title": {
"show": true,
"textStyle": {
"color": "#BFBFBF",
"fontSize": 18
},
"subtextStyle": {
"color": "#A2A2A2",
"fontSize": 14
}
},
"xAxis": {
"show": true,
"name": "",
"nameGap": 15,
"nameTextStyle": {
"color": "#B9B8CE",
"fontSize": 12
},
"inverse": false,
"axisLabel": {
"show": true,
"fontSize": 12,
"color": "#B9B8CE",
"rotate": 0
},
"position": "bottom",
"axisLine": {
"show": true,
"lineStyle": {
"color": "#B9B8CE",
"width": 1
},
"onZero": true
},
"axisTick": {
"show": true,
"length": 5
},
"splitLine": {
"show": false,
"lineStyle": {
"color": "#484753",
"width": 1,
"type": "solid"
}
}
},
"yAxis": {
"show": true,
"name": "",
"nameGap": 15,
"nameTextStyle": {
"color": "#B9B8CE",
"fontSize": 12
},
"inverse": false,
"axisLabel": {
"show": true,
"fontSize": 12,
"color": "#B9B8CE",
"rotate": 0
},
"position": "left",
"axisLine": {
"show": true,
"lineStyle": {
"color": "#B9B8CE",
"width": 1
},
"onZero": true
},
"axisTick": {
"show": true,
"length": 5
},
"splitLine": {
"show": true,
"lineStyle": {
"color": "#484753",
"width": 1,
"type": "solid"
}
}
},
"legend": {
"show": true,
"top": "5%",
"textStyle": {
"color": "#B9B8CE"
}
},
"grid": {
"show": false,
"left": "10%",
"top": "60",
"right": "10%",
"bottom": "60"
},
"dataset": null
},
"previewScaleType": "fit"
},
"componentList": [
],
"requestGlobalConfig": {
"requestDataPond": [],
"requestOriginUrl": "",
"requestInterval": 30,
"requestIntervalUnit": "second",
"requestParams": {
"Body": {
"form-data": {},
"x-www-form-urlencoded": {},
"json": "",
"xml": ""
},
"Header": {},
"Params": {}
}
}
}
+7 -11
View File
@@ -66,6 +66,7 @@ class screenModel extends model
$this->filter->charts = array();
$screen = $this->dao->select('*')->from(TABLE_SCREEN)->where('id')->eq($screenID)->fetch();
if(!isset($screen->scheme) or empty($screen->scheme)) $screen->scheme = file_get_contents(__DIR__ . '/json/screen.json');
$screen->chartData = $this->genChartData($screen, $year, $dept, $account);
return $screen;
@@ -83,6 +84,8 @@ class screenModel extends model
*/
public function genChartData($screen)
{
if(!$screen->builtin) return json_decode($screen->scheme);
$config = new stdclass();
$config->width = 1300;
$config->height = 1080;
@@ -116,17 +119,10 @@ class screenModel extends model
}
$config->height += 50;
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);
}
$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;
}