Sfoglia il codice sorgente

dashboard细节调整

xiaoct 7 anni fa
parent
commit
6516680339
3 ha cambiato i file con 28 aggiunte e 7 eliminazioni
  1. 2 2
      app/components/common/navigator.jsx
  2. 1 1
      app/index.js
  3. 25 4
      app/models/dashboard.js

+ 2 - 2
app/components/common/navigator.jsx

@@ -19,10 +19,10 @@ class Navigator extends React.Component {
             <Menu.Item key="mypage">
                 <Link to='/home'><Icon type="home" />我的</Link>
             </Menu.Item>
-            <Menu.Item key="dashboards">
+            <Menu.Item key="dashboard">
                 <Link to='/dashboard'><Icon type="desktop" />看板与报告</Link>
             </Menu.Item>
-            <Menu.Item key="charts">
+            <Menu.Item key="chart">
                 <Link to='/chartdesigner'><Icon type="area-chart" />图表</Link>
             </Menu.Item>
             <Menu.Item key="datasource">

+ 1 - 1
app/index.js

@@ -27,7 +27,7 @@ app.model(main); // 通用action
 app.model(chartDesigner); // 图表
 app.model(dataSource); // 数据源
 app.model(dataConnect); // 数据连接
-app.model(dashboard);
+app.model(dashboard);  //报告与看板
 
 // 4. Router
 app.router(require('./routes/router'));

+ 25 - 4
app/models/dashboard.js

@@ -7,8 +7,9 @@ export default {
     namespace: 'dashboard',
     state: {
         newOne: {},
-        myDynamicDashboardList: [{
+        myDynamicDashboardList: [{            //Dynamic Dashboard指看板(动态)
             dashboardID: 1,
+            type: 'dynamic',
             title: 'Card 1',
             url: '',
             description: 'Description 1',
@@ -19,6 +20,7 @@ export default {
     
         },{
             dashboardID: 2,
+            type: 'dynamic',
             title: 'Card 2',
             url: '',
             description: 'Description 1',
@@ -28,7 +30,8 @@ export default {
     
         },{
             dashboardID: 3,
-            title: 'Card 1',
+            type: 'dynamic',
+            title: 'Card 3',
             url: '',
             description: 'Description 1',
             coverImg:'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png',
@@ -37,10 +40,28 @@ export default {
         }
     
         ],
-        myStaticDashboardList: [
+        myStaticDashboardList: [{            //Static Dashboard指报告(静态)
+            dashboardID: 4,
+            type: 'static',
+            title: 'Card 4',
+            url: '',
+            description: 'Description 1',
+            coverImg:'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png',
+            coverAlt: '',
+            avatar:{}
+        },{
+            dashboardID: 5,
+            type: 'static',
+            title: 'Card 5',
+            url: '',
+            description: 'Description 1',
+            coverImg:'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png',
+            coverAlt: '',
+            avatar:{}
+        }
 
         ],
-        myRecentDashboardList: [
+        myRecentDashboardList: [            //最近打开的Dashboard
             
         ]
     },