提交 bbbadb29 编写于 作者: U unknown

删除多余文件

上级 8ca072b9
......@@ -117,5 +117,8 @@
},
"njCliConfig": {
"templateType": "multi-page"
},
"dependencies": {
"antd": "^3.7.3"
}
}
......@@ -20,9 +20,6 @@
<div class="fjb-pagecontainer">
<fjb-Header no=history />
<section class="fjb-body">
<aside class="fjb-aside">
<Sider />
</aside>
<section class="fjb-main">
<section class="fjb-content {styles.content}">
<DataTable />
......
......@@ -20,9 +20,6 @@
<div class="fjb-pagecontainer">
<fjb-Header no=ledgers />
<section class="fjb-body">
<aside class="fjb-aside">
<Sider />
</aside>
<section class="fjb-main">
<section class="fjb-content {styles.content}">
<DataTable />
......
<!DOCTYPE html>
<html>
<% if (web) { %>
@@include('./common/headElements.html')
<% } else { %>
<$include src="./common/headElements.html" />
<% } %>
<body>
<% if (web) { %>
@@include('./common/resourceElements.html')
<% } else { %>
<$include src="./common/resourceElements.html" />
<% } %>
<link href="/resources/app/css/common.css?ver=<%=ver%>" rel="stylesheet" />
<link href="/resources/app/css/pages/page1/container.css?ver=<%=ver%>" rel="stylesheet" />
<section id="container"></section>
<script type="text/nornj" data-auto data-target="#container">
<Container>
<#tmpl>
<div class="fjb-pagecontainer">
<fjb-Header no=1 />
<section class="fjb-body">
<aside class="fjb-aside">
<Sider />
</aside>
<section class="fjb-main">
<ant-Breadcrumb>
<ant-BreadcrumbItem>Home</ant-BreadcrumbItem>
<ant-BreadcrumbItem>List</ant-BreadcrumbItem>
<ant-BreadcrumbItem>Page 1</ant-BreadcrumbItem>
</ant-Breadcrumb>
<section class="fjb-content {styles.content}">
<DataTable />
</section>
</section>
</section>
</div>
</#tmpl>
</Container>
</script>
<% if (web) { %>
@@include('./common/bottomElements.html')
<% } else { %>
<$include src="./common/bottomElements.html" />
<% } %>
<script src="/resources/app/pages/page1/container.js?ver=<%=ver%>"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<% if (web) { %>
@@include('./common/headElements.html')
<% } else { %>
<$include src="./common/headElements.html" />
<% } %>
<body>
<% if (web) { %>
@@include('./common/resourceElements.html')
<% } else { %>
<$include src="./common/resourceElements.html" />
<% } %>
<link href="/resources/app/css/common.css?ver=<%=ver%>" rel="stylesheet" />
<link href="/resources/app/css/pages/page2/container.css?ver=<%=ver%>" rel="stylesheet" />
<section id="container"></section>
<script type="text/nornj" data-auto data-target="#container">
<Container>
<#tmpl>
<div class="fjb-pagecontainer">
<fjb-Header no=2 />
<section class="fjb-body">
<aside class="fjb-aside">
<Sider />
</aside>
<section class="fjb-main">
<ant-Breadcrumb>
<ant-BreadcrumbItem>Home</ant-BreadcrumbItem>
<ant-BreadcrumbItem>List</ant-BreadcrumbItem>
<ant-BreadcrumbItem>page2</ant-BreadcrumbItem>
</ant-Breadcrumb>
<section class="fjb-content {styles.content}">
<DataTable />
</section>
</section>
</section>
</div>
</#tmpl>
</Container>
</script>
<% if (web) { %>
@@include('./common/bottomElements.html')
<% } else { %>
<$include src="./common/bottomElements.html" />
<% } %>
<script src="/resources/app/pages/page2/container.js?ver=<%=ver%>"></script>
</body>
</html>
\ No newline at end of file
......@@ -20,9 +20,6 @@
<div class="fjb-pagecontainer">
<fjb-Header no=search />
<section class="fjb-body">
<aside class="fjb-aside">
<Sider />
</aside>
<section class="fjb-main">
<section class="fjb-content {styles.content}">
<DataTable />
......
......@@ -16,7 +16,6 @@ html {
height: 70px;
width: 100%;
background-image: linear-gradient(-90deg, #5A77D3 2%, #3C4C9C 100%);
position: fixed;
top: 0;
left: 0;
z-index: 101;
......@@ -25,7 +24,6 @@ html {
.fjb-body {
padding-top: 70px;
padding-left: 200px;
background-color: #f2f3f5;
.fj-util-border-box;
}
......
......@@ -32,4 +32,7 @@
font-size: 16px;
line-height: 60px;
}
// 自定义菜单样式-end
\ No newline at end of file
// 自定义菜单样式-end
.ant-menu-item-selected{
border-bottom-color: #fff !important;
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import { registerTmpl } from 'nornj-react';
import { autobind } from 'core-decorators';
import 'flarej/lib/components/antd/menu';
import 'flarej/lib/components/antd/select';
import 'flarej/lib/components/antd/icon';
import { Select } from 'flarej/lib/components/antd/select';
import styles from './header.m.less';
import template from './header.t.html';
......@@ -65,7 +66,7 @@ export default class Header extends Component {
@autobind
onSelect({ item, key, selectedKeys }) {
location.href = '/pages/page' + key+'.html';
location.href = key;
}
render() {
......
ul.nav {
font-size: 0.875rem;
margin-top: 10px;
margin-left: 15px;
float: left;
height: 70px;
background: unset;
color: #fff;
border: 0;
line-height: 68px;
li{
color: #fff !important;
&:hover{
border-bottom-color: #fff !important;
}
}
}
.note{
color: #fff;
float:right;
padding-right: 30px;
.value{
width: 472px;
width: 200px;
border: 1px solid #ADC6FF;
border-radius: 4px;
}
......
......@@ -5,11 +5,13 @@
<!-- 区块链浏览器 -->
<!-- <img src="../../../resources/images/logo.png" alt="xxx"> -->
<!-- </div> -->
<!-- <ant-Menu theme="dark" mode="horizontal" class="{styles.nav}" defaultSelectedKeys="{[no]}" {onSelect}>
<ant-MenuItem key="1">page1</ant-MenuItem>
<ant-MenuItem key="2">page2</ant-MenuItem>
<ant-MenuItem key="3">page3</ant-MenuItem>
</ant-Menu> -->
<ant-Menu mode="horizontal" class="{styles.nav}" {onSelect}>
<ant-MenuItem key="../../pages/search.html"> <ant-Icon type="home" />首页</ant-MenuItem>
<ant-MenuItem key="../../pages/ledgers.html"> <ant-Icon type="switcher" />数据账户</ant-MenuItem>
<ant-MenuItem key="../../pages/history.html"> <ant-Icon type="block" />区块</ant-MenuItem>
<ant-MenuItem key="4"> <ant-Icon type="swap" />交易</ant-MenuItem>
<ant-MenuItem key="5"> <ant-Icon type="user" />用户</ant-MenuItem>
</ant-Menu>
<div class={styles.note}>
账本:
<!-- <ant-Select placeholder="请选择账本" class={styles.value} >
......
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<link href="/resources/libs/font-awesome/css/font-awesome.min.css?ver=20171107" rel="stylesheet" />
<body>
<!--loading遮罩层-->
<style type="text/css">
.fjb-vertical-center1 {
display: table;
overflow: hidden;
}
.fjb-vertical-center2 {
vertical-align: middle;
display: table-cell;
}
#fjb_loading-mask_main {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 20000000;
background-color: #fff;
}
#fjb_loading_main img {
margin-bottom: 2px;
width: 79px;
height: 4px;
vertical-align: middle;
}
#fjb_loading_main i {
font-size: 1.2rem;
color: #48a3e7;
}
#fjb_loading_main span {
margin-left: 3px;
}
#fjb_loading_main .fjb-vertical-center1 {
width: 100%;
height: 100%;
}
#fjb_loading_main {
background-color: #fff;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
text-align: center;
padding: 0;
z-index: 20000001;
color: #555;
font: bold 14px "Helvetica Neue", Helvetica, Arial, sans-serif;
}
</style>
<div id="fjb_loading-mask_main">&#160;</div>
<div id="fjb_loading_main">
<div class="fjb-vertical-center1">
<div class="fjb-vertical-center2">
<i class="fa fa-spinner fa-pulse"></i><span>正在加载中,请稍候...</span>
</div>
</div>
</div>
<link href="/resources/app/css/common.css?ver=20171107" rel="stylesheet" />
<link href="/resources/app/css/pages/page1/container.css?ver=20171107" rel="stylesheet" />
<section id="container"></section>
<script type="text/nornj" data-auto data-target="#container">
<Container>
<#tmpl>
<div class="fjb-pagecontainer">
<fjb-Header no=1 />
<section class="fjb-body">
<aside class="fjb-aside">
<Sider />
</aside>
<section class="fjb-main">
<ant-Breadcrumb>
<ant-BreadcrumbItem>Home</ant-BreadcrumbItem>
<ant-BreadcrumbItem>List</ant-BreadcrumbItem>
<ant-BreadcrumbItem>Page 1</ant-BreadcrumbItem>
</ant-Breadcrumb>
<section class="fjb-content {styles.content}">
<DataTable />
</section>
</section>
</section>
</div>
</#tmpl>
</Container>
</script>
<!--[if lte IE 9]>
<script src="/resources/libs/media.match.min.js?ver=20171107"></script>
<![endif]-->
<script src="/resources/libs/js.cookie.js?ver=20171107"></script>
<script src="/resources/libs/jquery.min.js?ver=20171107"></script>
<script src="/resources/libs/babelHelpers.min.js?ver=20171107"></script>
<script src="/resources/libs/es6-promise.min.js?ver=20171107"></script>
<script src="/resources/app/common.js?ver=20171107"></script>
<script src="/resources/app/pages/page1/container.js?ver=20171107"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<link href="/resources/libs/font-awesome/css/font-awesome.min.css?ver=20171107" rel="stylesheet" />
<body>
<!--loading遮罩层-->
<style type="text/css">
.fjb-vertical-center1 {
display: table;
overflow: hidden;
}
.fjb-vertical-center2 {
vertical-align: middle;
display: table-cell;
}
#fjb_loading-mask_main {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 20000000;
background-color: #fff;
}
#fjb_loading_main img {
margin-bottom: 2px;
width: 79px;
height: 4px;
vertical-align: middle;
}
#fjb_loading_main i {
font-size: 1.2rem;
color: #48a3e7;
}
#fjb_loading_main span {
margin-left: 3px;
}
#fjb_loading_main .fjb-vertical-center1 {
width: 100%;
height: 100%;
}
#fjb_loading_main {
background-color: #fff;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
text-align: center;
padding: 0;
z-index: 20000001;
color: #555;
font: bold 14px "Helvetica Neue", Helvetica, Arial, sans-serif;
}
</style>
<div id="fjb_loading-mask_main">&#160;</div>
<div id="fjb_loading_main">
<div class="fjb-vertical-center1">
<div class="fjb-vertical-center2">
<i class="fa fa-spinner fa-pulse"></i><span>正在加载中,请稍候...</span>
</div>
</div>
</div>
<link href="/resources/app/css/common.css?ver=20171107" rel="stylesheet" />
<link href="/resources/app/css/pages/page2/container.css?ver=20171107" rel="stylesheet" />
<section id="container"></section>
<script type="text/nornj" data-auto data-target="#container">
<Container>
<#tmpl>
<div class="fjb-pagecontainer">
<fjb-Header no=2 />
<section class="fjb-body">
<aside class="fjb-aside">
<Sider />
</aside>
<section class="fjb-main">
<ant-Breadcrumb>
<ant-BreadcrumbItem>Home</ant-BreadcrumbItem>
<ant-BreadcrumbItem>List</ant-BreadcrumbItem>
<ant-BreadcrumbItem>page2</ant-BreadcrumbItem>
</ant-Breadcrumb>
<section class="fjb-content {styles.content}">
<DataTable />
</section>
</section>
</section>
</div>
</#tmpl>
</Container>
</script>
<!--[if lte IE 9]>
<script src="/resources/libs/media.match.min.js?ver=20171107"></script>
<![endif]-->
<script src="/resources/libs/js.cookie.js?ver=20171107"></script>
<script src="/resources/libs/jquery.min.js?ver=20171107"></script>
<script src="/resources/libs/babelHelpers.min.js?ver=20171107"></script>
<script src="/resources/libs/es6-promise.min.js?ver=20171107"></script>
<script src="/resources/app/common.js?ver=20171107"></script>
<script src="/resources/app/pages/page2/container.js?ver=20171107"></script>
</body>
</html>
\ No newline at end of file
......@@ -86,9 +86,6 @@
<div class="fjb-pagecontainer">
<fjb-Header no=search />
<section class="fjb-body">
<aside class="fjb-aside">
<Sider />
</aside>
<section class="fjb-main">
<section class="fjb-content {styles.content}">
<DataTable />
......
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Global_pages/page1/container",[],t):"object"==typeof exports?exports["Global_pages/page1/container"]=t():e["Global_pages/page1/container"]=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpGlobal__name_([6],{964:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,i,r,o,l,s,p=n(1),u=(n.n(p),n(27)),c=(n(9),n(28)),d=(n.n(c),n(54),n(55)),b=(n.n(d),n(104)),f=(n.n(b),n(92)),y=(n.n(f),n(88)),g=(n.n(y),n(21)),h=(n.n(g),n(69),n(71),n(57)),v=n(965),x=n.n(v),m=n(967),z=n.n(m),j=n(968),k=new j.a,I=(a=Object(u.inject)("store"))(i=Object(u.observer)(i=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,e.apply(this,arguments))}return babelHelpers.inherits(t,e),t.prototype.componentDidMount=function(){var e=y.Message.loading("正在加载数据...",0);this.props.store.getTableData(1,this.props.store.pageSize).then(function(){return e()})},t.prototype.render=function(){return this.props.tmpls[0](this,{styles:x.a})},t}(p.Component))||i)||i;Object(h.a)("Container",I,k);r=Object(c.registerTmpl)("DataTable"),o=Object(u.inject)("store"),r(l=o(l=Object(u.observer)((s=function(e){function t(){var n,a,i;babelHelpers.classCallCheck(this,t);for(var r=arguments.length,o=Array(r),l=0;r>l;l++)o[l]=arguments[l];return n=a=babelHelpers.possibleConstructorReturn(this,e.call.apply(e,[this].concat(o))),a.state={columns:[{title:"测试1",dataIndex:"test1",key:"test1"},{title:"测试2",dataIndex:"test2",key:"test2"},{title:"测试3",dataIndex:"test3",key:"test3",children:[{title:"测试4",dataIndex:"test4",key:"test4"},{title:"测试5",dataIndex:"test5",key:"test5"},{title:"测试6",dataIndex:"test6",key:"test6"}]},{title:"测试7",dataIndex:"test7",key:"test7",children:[{title:"测试8",dataIndex:"test8",key:"test8"},{title:"测试9",dataIndex:"test9",key:"test9"},{title:"测试10",dataIndex:"test10",key:"test10"},{title:"测试11",dataIndex:"test11",key:"test11"},{title:"测试12",dataIndex:"test12",key:"test12"}]},{title:"测试13",dataIndex:"test13",key:"test13",children:[{title:"测试14",dataIndex:"test14",key:"test14"},{title:"测试15",dataIndex:"test15",key:"test15"},{title:"测试16",dataIndex:"test16",key:"test16"},{title:"测试17",dataIndex:"test17",key:"test17"},{title:"测试18",dataIndex:"test18",key:"test18"}]}]},i=n,babelHelpers.possibleConstructorReturn(a,i)}return babelHelpers.inherits(t,e),t.prototype.onPageChange=function(e,t){var n=y.Message.loading("正在加载数据...",0);this.props.store.getTableData(e,t).then(function(){return n()})},t.prototype.render=function(){return z.a.dataTable(this.state,this.props,this,{styles:x.a})},t}(p.Component),function(e,t,n,a,i){var r={};return Object.keys(a).forEach(function(e){r[e]=a[e]}),r.enumerable=!!r.enumerable,r.configurable=!!r.configurable,("value"in r||r.initializer)&&(r.writable=!0),r=n.slice().reverse().reduce(function(n,a){return a(e,t,n)||n},r),i&&void 0!==r.initializer&&(r.value=r.initializer?r.initializer.call(i):void 0,r.initializer=undefined),void 0===r.initializer&&(Object.defineProperty(e,t,r),r=null),r}(s.prototype,"onPageChange",[g.autobind],Object.getOwnPropertyDescriptor(s.prototype,"onPageChange"),s.prototype),l=s))||l)||l)},965:function(e,t,n){var a=n(966);"string"==typeof a&&(a=[[e.i,a,""]]);n(48)(a,{});a.locals&&(e.exports=a.locals)},966:function(e,t,n){t=e.exports=n(47)(),t.push([e.i,"",""])},967:function(e,t,n){"use strict";e.exports={dataTable:n(9).compileH({_njTmplKey:-757632400,useString:!1,main:function(e,t,n,a,i){var r,o,l=e.e("ant-table",e,"ant-Table",t),s=null,p=t.d("toJS",0,!0);if(o=p?p.val:e.f.toJS){var u=t.d("store"),c=e.f["."];c?(r=c.apply(t,[u,"tableData"]),u=r):e.wn(".","f"),r=o.apply(p?p._njCtx:t,[u]),s=r}else e.wn("toJS","f");var d=null,b=e.f.obj;if(b){var f="current",y=e.f[":"];if(y){var g=t.d("store"),h=e.f["."];h?(r=h.apply(t,[g,"pageIndex"]),g=r):e.wn(".","f"),r=y.apply(t,[f,g]),f=r}else e.wn(":","f");var v="pageSize",x=e.f[":"];if(x){var m=t.d("store"),z=e.f["."];z?(r=z.apply(t,[m,"pageSize"]),m=r):e.wn(".","f"),r=x.apply(t,[v,m]),v=r}else e.wn(":","f");var j="total",k=e.f[":"];if(k){var I=t.d("store"),w=e.f["."];w?(r=w.apply(t,[I,"count"]),I=r):e.wn(".","f"),r=k.apply(t,[j,I]),j=r}else e.wn(":","f");var C="onChange",O=e.f[":"];O?(r=O.apply(t,[C,t.d("onPageChange")]),C=r):e.wn(":","f"),r=b.apply(t,[f,v,j,C]),d=r}else e.wn("obj","f");return e.H([l,{dataSource:s,rowKey:"test1",columns:t.d("columns"),bordered:!0,pagination:d}])}})}},968:function(e,t,n){"use strict";function a(e,t,n,a){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(a):void 0})}function i(e,t,n,a,i){var r={};return Object.keys(a).forEach(function(e){r[e]=a[e]}),r.enumerable=!!r.enumerable,r.configurable=!!r.configurable,("value"in r||r.initializer)&&(r.writable=!0),r=n.slice().reverse().reduce(function(n,a){return a(e,t,n)||n},r),i&&void 0!==r.initializer&&(r.value=r.initializer?r.initializer.call(i):void 0,r.initializer=undefined),void 0===r.initializer&&(Object.defineProperty(e,t,r),r=null),r}n.d(t,"a",function(){return f});var r,o,l,s,p,u=n(18),c=n(58),d=(n.n(c),n(21)),b=(n.n(d),n(73)),f=(n.n(b),r=function(){function e(){babelHelpers.classCallCheck(this,e),a(this,"pageIndex",o,this),a(this,"pageSize",l,this),a(this,"count",s,this),a(this,"tableData",p,this)}return e.prototype.getTableData=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.pageIndex,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.pageSize;return Object(c.fetchData)("/page1/getTableData",function(a){Object(u.transaction)(function(){a.success?(e.pageIndex=t,e.pageSize=n,e.count=a.totalCount,e.tableData=a.data):(e.pageIndex=1,e.pageSize=10,e.count=0,e.tableData=[],b.Notification.error({description:"获取表格数据出错,异常是:"+a.msg,duration:null}))})},{currentPage:t,pageSize:n},{method:"post"})["catch"](function(e){b.Notification.error({description:"获取表格数据出错,错误是:"+e,duration:null})})},e}(),o=i(r.prototype,"pageIndex",[u.observable],{enumerable:!0,initializer:function(){return 1}}),l=i(r.prototype,"pageSize",[u.observable],{enumerable:!0,initializer:function(){return 10}}),s=i(r.prototype,"count",[u.observable],{enumerable:!0,initializer:function(){return 0}}),p=i(r.prototype,"tableData",[u.observable],{enumerable:!0,initializer:function(){return[]}}),i(r.prototype,"getTableData",[d.autobind,u.action],Object.getOwnPropertyDescriptor(r.prototype,"getTableData"),r.prototype),r)}},[964])});
//# sourceMappingURL=container.js.map
\ No newline at end of file
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Global_pages/page2/container",[],t):"object"==typeof exports?exports["Global_pages/page2/container"]=t():e["Global_pages/page2/container"]=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpGlobal__name_([5],{969:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,i,r,o,l,s,p=n(1),u=(n.n(p),n(27)),c=(n(9),n(28)),d=(n.n(c),n(54),n(55)),b=(n.n(d),n(104)),f=(n.n(b),n(92)),y=(n.n(f),n(88)),g=(n.n(y),n(21)),h=(n.n(g),n(69),n(71),n(57)),v=n(970),x=n.n(v),m=n(972),z=n.n(m),j=n(973),k=new j.a,I=(a=Object(u.inject)("store"))(i=Object(u.observer)(i=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,e.apply(this,arguments))}return babelHelpers.inherits(t,e),t.prototype.componentDidMount=function(){var e=y.Message.loading("正在加载数据...",0);this.props.store.getTableData(1,this.props.store.pageSize).then(function(){return e()})},t.prototype.render=function(){return this.props.tmpls[0](this,{styles:x.a})},t}(p.Component))||i)||i;Object(h.a)("Container",I,k);r=Object(c.registerTmpl)("DataTable"),o=Object(u.inject)("store"),r(l=o(l=Object(u.observer)((s=function(e){function t(){var n,a,i;babelHelpers.classCallCheck(this,t);for(var r=arguments.length,o=Array(r),l=0;r>l;l++)o[l]=arguments[l];return n=a=babelHelpers.possibleConstructorReturn(this,e.call.apply(e,[this].concat(o))),a.state={columns:[{title:"测试1",dataIndex:"test1",key:"test1"},{title:"测试2",dataIndex:"test2",key:"test2"},{title:"测试3",dataIndex:"test3",key:"test3",children:[{title:"测试4",dataIndex:"test4",key:"test4"},{title:"测试5",dataIndex:"test5",key:"test5"},{title:"测试6",dataIndex:"test6",key:"test6"}]},{title:"测试7",dataIndex:"test7",key:"test7",children:[{title:"测试8",dataIndex:"test8",key:"test8"},{title:"测试9",dataIndex:"test9",key:"test9"},{title:"测试10",dataIndex:"test10",key:"test10"},{title:"测试11",dataIndex:"test11",key:"test11"},{title:"测试12",dataIndex:"test12",key:"test12"}]},{title:"测试13",dataIndex:"test13",key:"test13",children:[{title:"测试14",dataIndex:"test14",key:"test14"},{title:"测试15",dataIndex:"test15",key:"test15"},{title:"测试16",dataIndex:"test16",key:"test16"},{title:"测试17",dataIndex:"test17",key:"test17"},{title:"测试18",dataIndex:"test18",key:"test18"}]}]},i=n,babelHelpers.possibleConstructorReturn(a,i)}return babelHelpers.inherits(t,e),t.prototype.onPageChange=function(e,t){var n=y.Message.loading("正在加载数据...",0);this.props.store.getTableData(e,t).then(function(){return n()})},t.prototype.render=function(){return z.a.dataTable(this.state,this.props,this,{styles:x.a})},t}(p.Component),function(e,t,n,a,i){var r={};return Object.keys(a).forEach(function(e){r[e]=a[e]}),r.enumerable=!!r.enumerable,r.configurable=!!r.configurable,("value"in r||r.initializer)&&(r.writable=!0),r=n.slice().reverse().reduce(function(n,a){return a(e,t,n)||n},r),i&&void 0!==r.initializer&&(r.value=r.initializer?r.initializer.call(i):void 0,r.initializer=undefined),void 0===r.initializer&&(Object.defineProperty(e,t,r),r=null),r}(s.prototype,"onPageChange",[g.autobind],Object.getOwnPropertyDescriptor(s.prototype,"onPageChange"),s.prototype),l=s))||l)||l)},970:function(e,t,n){var a=n(971);"string"==typeof a&&(a=[[e.i,a,""]]);n(48)(a,{});a.locals&&(e.exports=a.locals)},971:function(e,t,n){t=e.exports=n(47)(),t.push([e.i,"",""])},972:function(e,t,n){"use strict";e.exports={dataTable:n(9).compileH({_njTmplKey:-757632400,useString:!1,main:function(e,t,n,a,i){var r,o,l=e.e("ant-table",e,"ant-Table",t),s=null,p=t.d("toJS",0,!0);if(o=p?p.val:e.f.toJS){var u=t.d("store"),c=e.f["."];c?(r=c.apply(t,[u,"tableData"]),u=r):e.wn(".","f"),r=o.apply(p?p._njCtx:t,[u]),s=r}else e.wn("toJS","f");var d=null,b=e.f.obj;if(b){var f="current",y=e.f[":"];if(y){var g=t.d("store"),h=e.f["."];h?(r=h.apply(t,[g,"pageIndex"]),g=r):e.wn(".","f"),r=y.apply(t,[f,g]),f=r}else e.wn(":","f");var v="pageSize",x=e.f[":"];if(x){var m=t.d("store"),z=e.f["."];z?(r=z.apply(t,[m,"pageSize"]),m=r):e.wn(".","f"),r=x.apply(t,[v,m]),v=r}else e.wn(":","f");var j="total",k=e.f[":"];if(k){var I=t.d("store"),w=e.f["."];w?(r=w.apply(t,[I,"count"]),I=r):e.wn(".","f"),r=k.apply(t,[j,I]),j=r}else e.wn(":","f");var C="onChange",O=e.f[":"];O?(r=O.apply(t,[C,t.d("onPageChange")]),C=r):e.wn(":","f"),r=b.apply(t,[f,v,j,C]),d=r}else e.wn("obj","f");return e.H([l,{dataSource:s,rowKey:"test1",columns:t.d("columns"),bordered:!0,pagination:d}])}})}},973:function(e,t,n){"use strict";function a(e,t,n,a){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(a):void 0})}function i(e,t,n,a,i){var r={};return Object.keys(a).forEach(function(e){r[e]=a[e]}),r.enumerable=!!r.enumerable,r.configurable=!!r.configurable,("value"in r||r.initializer)&&(r.writable=!0),r=n.slice().reverse().reduce(function(n,a){return a(e,t,n)||n},r),i&&void 0!==r.initializer&&(r.value=r.initializer?r.initializer.call(i):void 0,r.initializer=undefined),void 0===r.initializer&&(Object.defineProperty(e,t,r),r=null),r}n.d(t,"a",function(){return f});var r,o,l,s,p,u=n(18),c=n(58),d=(n.n(c),n(21)),b=(n.n(d),n(73)),f=(n.n(b),r=function(){function e(){babelHelpers.classCallCheck(this,e),a(this,"pageIndex",o,this),a(this,"pageSize",l,this),a(this,"count",s,this),a(this,"tableData",p,this)}return e.prototype.getTableData=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.pageIndex,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.pageSize;return Object(c.fetchData)("/page2/getTableData",function(a){Object(u.transaction)(function(){a.success?(e.pageIndex=t,e.pageSize=n,e.count=a.totalCount,e.tableData=a.data):(e.pageIndex=1,e.pageSize=10,e.count=0,e.tableData=[],b.Notification.error({description:"获取表格数据出错,异常是:"+a.msg,duration:null}))})},{currentPage:t,pageSize:n},{method:"post"})["catch"](function(e){b.Notification.error({description:"获取表格数据出错,错误是:"+e,duration:null})})},e}(),o=i(r.prototype,"pageIndex",[u.observable],{enumerable:!0,initializer:function(){return 1}}),l=i(r.prototype,"pageSize",[u.observable],{enumerable:!0,initializer:function(){return 10}}),s=i(r.prototype,"count",[u.observable],{enumerable:!0,initializer:function(){return 0}}),p=i(r.prototype,"tableData",[u.observable],{enumerable:!0,initializer:function(){return[]}}),i(r.prototype,"getTableData",[d.autobind,u.action],Object.getOwnPropertyDescriptor(r.prototype,"getTableData"),r.prototype),r)}},[969])});
//# sourceMappingURL=container.js.map
\ No newline at end of file
import React, { Component } from 'react';
import { observer, inject } from 'mobx-react';
import nj from 'nornj';
import { registerTmpl } from 'nornj-react';
import '../../common/containerConfig';
import 'flarej/lib/components/antd/button';
import 'flarej/lib/components/antd/breadcrumb';
import 'flarej/lib/components/antd/table';
import { Message } from 'flarej/lib/components/antd/message';
import { autobind } from 'core-decorators';
import '../../components/header';
import '../../components/sider';
import ContainerHoc from '../../components/higherOrders/container';
import styles from './page1.m.less';
import tmpls from './page1.t.html';
import Page1Store from '../../stores/Page1Store';
const page1Store = new Page1Store();
//页面容器组件
@inject('store')
@observer
class Container extends Component {
componentDidMount() {
const closeLoading = Message.loading('正在加载数据...', 0);
this.props.store.getTableData(1, this.props.store.pageSize).then(() => closeLoading());
}
render() {
return this.props.tmpls[0](this, {
styles
});
}
}
ContainerHoc('Container', Container, page1Store);
@registerTmpl('DataTable')
@inject('store')
@observer
class DataTable extends Component {
state = {
columns: [{
title: '测试1',
dataIndex: 'test1',
key: 'test1',
}, {
title: '测试2',
dataIndex: 'test2',
key: 'test2',
}, {
title: '测试3',
dataIndex: 'test3',
key: 'test3',
children: [{
title: '测试4',
dataIndex: 'test4',
key: 'test4',
}, {
title: '测试5',
dataIndex: 'test5',
key: 'test5',
}, {
title: '测试6',
dataIndex: 'test6',
key: 'test6',
}]
}, {
title: '测试7',
dataIndex: 'test7',
key: 'test7',
children: [{
title: '测试8',
dataIndex: 'test8',
key: 'test8',
}, {
title: '测试9',
dataIndex: 'test9',
key: 'test9',
}, {
title: '测试10',
dataIndex: 'test10',
key: 'test10',
}, {
title: '测试11',
dataIndex: 'test11',
key: 'test11',
}, {
title: '测试12',
dataIndex: 'test12',
key: 'test12',
}]
}, {
title: '测试13',
dataIndex: 'test13',
key: 'test13',
children: [{
title: '测试14',
dataIndex: 'test14',
key: 'test14',
}, {
title: '测试15',
dataIndex: 'test15',
key: 'test15',
}, {
title: '测试16',
dataIndex: 'test16',
key: 'test16',
}, {
title: '测试17',
dataIndex: 'test17',
key: 'test17',
}, {
title: '测试18',
dataIndex: 'test18',
key: 'test18',
}]
}]
};
@autobind
onPageChange(page, pageSize) {
const closeLoading = Message.loading('正在加载数据...', 0);
this.props.store.getTableData(page, pageSize).then(() => closeLoading());
}
render() {
return tmpls.dataTable(this.state, this.props, this, {
styles
});
}
}
if (module.hot) {
module.hot.accept();
njr.renderTmplTag({ target: '#container' });
}
\ No newline at end of file
.content {
}
\ No newline at end of file
<template name="dataTable">
<ant-Table dataSource={toJS(store.tableData)}
rowKey="test1"
{columns}
bordered
:pagination="{
current: store.pageIndex,
pageSize: store.pageSize,
total: store.count,
onChange: onPageChange
}"/>
</template>
\ No newline at end of file
import React, { Component } from 'react';
import { observer, inject } from 'mobx-react';
import nj from 'nornj';
import { registerTmpl } from 'nornj-react';
import '../../common/containerConfig';
import 'flarej/lib/components/antd/button';
import 'flarej/lib/components/antd/breadcrumb';
import 'flarej/lib/components/antd/table';
import { Message } from 'flarej/lib/components/antd/message';
import { autobind } from 'core-decorators';
import '../../components/header';
import '../../components/sider';
import ContainerHoc from '../../components/higherOrders/container';
import styles from './page2.m.less';
import tmpls from './page2.t.html';
import Page2Store from '../../stores/Page2Store';
const page2Store = new Page2Store();
//页面容器组件
@inject('store')
@observer
class Container extends Component {
componentDidMount() {
const closeLoading = Message.loading('正在加载数据...', 0);
this.props.store.getTableData(1, this.props.store.pageSize).then(() => closeLoading());
}
render() {
return this.props.tmpls[0](this, {
styles
});
}
}
ContainerHoc('Container', Container, page2Store);
@registerTmpl('DataTable')
@inject('store')
@observer
class DataTable extends Component {
state = {
columns: [{
title: '测试1',
dataIndex: 'test1',
key: 'test1',
}, {
title: '测试2',
dataIndex: 'test2',
key: 'test2',
}, {
title: '测试3',
dataIndex: 'test3',
key: 'test3',
children: [{
title: '测试4',
dataIndex: 'test4',
key: 'test4',
}, {
title: '测试5',
dataIndex: 'test5',
key: 'test5',
}, {
title: '测试6',
dataIndex: 'test6',
key: 'test6',
}]
}, {
title: '测试7',
dataIndex: 'test7',
key: 'test7',
children: [{
title: '测试8',
dataIndex: 'test8',
key: 'test8',
}, {
title: '测试9',
dataIndex: 'test9',
key: 'test9',
}, {
title: '测试10',
dataIndex: 'test10',
key: 'test10',
}, {
title: '测试11',
dataIndex: 'test11',
key: 'test11',
}, {
title: '测试12',
dataIndex: 'test12',
key: 'test12',
}]
}, {
title: '测试13',
dataIndex: 'test13',
key: 'test13',
children: [{
title: '测试14',
dataIndex: 'test14',
key: 'test14',
}, {
title: '测试15',
dataIndex: 'test15',
key: 'test15',
}, {
title: '测试16',
dataIndex: 'test16',
key: 'test16',
}, {
title: '测试17',
dataIndex: 'test17',
key: 'test17',
}, {
title: '测试18',
dataIndex: 'test18',
key: 'test18',
}]
}]
};
@autobind
onPageChange(page, pageSize) {
const closeLoading = Message.loading('正在加载数据...', 0);
this.props.store.getTableData(page, pageSize).then(() => closeLoading());
}
render() {
return tmpls.dataTable(this.state, this.props, this, {
styles
});
}
}
if (module.hot) {
module.hot.accept();
njr.renderTmplTag({ target: '#container' });
}
\ No newline at end of file
.content {
}
\ No newline at end of file
<template name="dataTable">
<ant-Table dataSource={toJS(store.tableData)}
rowKey="test1"
{columns}
bordered
:pagination="{
current: store.pageIndex,
pageSize: store.pageSize,
total: store.count,
onChange: onPageChange
}"/>
</template>
\ No newline at end of file
......@@ -11,7 +11,6 @@ import 'flarej/lib/components/antd/tabs';
import 'flarej/lib/components/antd/pagination';
import { autobind } from 'core-decorators';
import '../../components/header';
import '../../components/sider';
import { Input, Select, Icon, Message } from 'antd';
import ContainerHoc from '../../components/higherOrders/container';
import styles from './search.m.less';
......
import { observable, computed, action, transaction } from 'mobx';
import { fetchData } from 'flarej/lib/utils/fetchConfig';
import { autobind } from 'core-decorators';
import { Notification } from 'flarej/lib/components/antd/notification';
export default class Page1Store {
@observable pageIndex = 1;
@observable pageSize = 10;
@observable count = 0;
@observable tableData = [];
@autobind
@action
getTableData(currentPage = this.pageIndex, pageSize = this.pageSize) {
return fetchData(`${G_WEB_DOMAIN}/page1/getTableData`, result => {
transaction(() => {
if (result.success) {
this.pageIndex = currentPage;
this.pageSize = pageSize;
this.count = result.totalCount;
this.tableData = result.data;
} else {
this.pageIndex = 1;
this.pageSize = 10;
this.count = 0;
this.tableData = [];
Notification.error({ description: '获取表格数据出错,异常是:' + result.msg, duration: null });
}
});
}, {
currentPage,
pageSize,
}, { method: 'post' }).catch((ex) => {
Notification.error({ description: '获取表格数据出错,错误是:' + ex, duration: null });
});
}
}
\ No newline at end of file
import { observable, computed, action, transaction } from 'mobx';
import { fetchData } from 'flarej/lib/utils/fetchConfig';
import { autobind } from 'core-decorators';
import { Notification } from 'flarej/lib/components/antd/notification';
export default class Page2Store {
@observable pageIndex = 1;
@observable pageSize = 10;
@observable count = 0;
@observable tableData = [];
@autobind
@action
getTableData(currentPage = this.pageIndex, pageSize = this.pageSize) {
return fetchData(`${G_WEB_DOMAIN}/page2/getTableData`, result => {
transaction(() => {
if (result.success) {
this.pageIndex = currentPage;
this.pageSize = pageSize;
this.count = result.totalCount;
this.tableData = result.data;
} else {
this.pageIndex = 1;
this.pageSize = 10;
this.count = 0;
this.tableData = [];
Notification.error({ description: '获取表格数据出错,异常是:' + result.msg, duration: null });
}
});
}, {
currentPage,
pageSize,
}, { method: 'post' }).catch((ex) => {
Notification.error({ description: '获取表格数据出错,错误是:' + ex, duration: null });
});
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册