123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- <!DOCTYPE html>
- <html lang="zh-cn">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
- <meta name="format-detection" content="telephone=no" />
- <meta name="format-detection" content="email=no" />
- <title>task</title>
- <link rel="stylesheet" href="../css/reset.css">
- <link rel="stylesheet" href="../css/style.css">
- <style>
- html,
- body {
- height: 100%;
- }
- .task {
- height: 100%;
- background-color: #f7f7f7;
- }
- .task_nav {
- border-bottom: 1px solid #efefef;
- }
- .task_nav li {
- width: 20%;
- height: 3rem;
- line-height: 3rem;
- text-align: center;
- background-color: #fff;
- float: left;
- }
- .task_nav li span {
- display: inline-block;
- height: 100%;
- color: #3d3d3d;
- font-size: 1.2rem;
- padding: 0 .4rem;
- -webkit-transition:color .3s;
- transition:color .3s;
- }
- .task_nav li.active span {
- color: #29aec1;
- border-bottom: 2px solid #29aec1;
- }
- .task_con {
- overflow: auto;
- }
- .task_con li {
- height: 8rem;
- margin-bottom: .3rem;
- background-color: #fff;
- }
- .task_con li>div {
- display: inline-block;
- }
- .task_status {
- width: 2rem;
- height: 100%;
- font-size: 1.1rem;
- text-align: center;
- white-space: pre-wrap;
- color: #fff;
- background-color: #f26522;
- }
- .task_status span {
- display: inline-block;
- -webkit-transform: translateY(50%);
- transform: translateY(50%);
- }
- .task_taskCon {
- padding: .7rem;
- }
- .task_taskCon p {
- margin-bottom: .5rem;
- color: #212121;
- font-size: 1.1rem;
- }
- .task_taskCon p:nth-of-type(3) {
- margin-bottom: .3rem;
- }
- .task_dbqk {
- color: #f26522;
- font-size: 1rem;
- border: 1px solid #f26522;
- border-radius: .3rem;
- padding: 0 .4rem;
- margin-left: .8rem;
- }
- .task_pssj,
- .task_wcsj {
- display: inline-block;
- height: 1.2rem;
- line-height: 1.2rem;
- font-size: .9rem;
- color: #fff;
- padding: 0 .3rem;
- border-radius: .3rem;
- }
- .task_pssj {
- background-color: #bd8cbf;
- margin-right: .5rem;
- }
- .task_wcsj {
- background-color: #65ba8e;
- }
- .task_jt {
- height: 100%;
- line-height: 8rem;
- font-size: 1.5rem;
- color: #b5b5b5;
- }
- </style>
- </head>
- <body>
- <div class="task flex-wrap flex-column">
- <div class="task_nav">
- <ul class="clearFix">
- <li><span>进行中</span></li>
- <li><span>未开始</span></li>
- <li><span>临期</span></li>
- <li><span>逾期</span></li>
- <li><span>已完结</span></li>
- </ul>
- </div>
- </div>
- <script src="../script/jquery-3.1.0.min.js"></script>
- <script type="text/javascript" src="../script/api.js"></script>
- <script>
- apiready = function() {
- try{
- api.closeFrameGroup({
- name: 'taskGroup'
- });
- }catch(e){}
- reload();
- document.body.onclick=function () {
- api.sendEvent({
- name: 'clInput'
- });
- }
- }
- function reload(num) {
- var navLi = $api.domAll(".task_nav li");
- var nav = $api.dom(".task_nav");
- var winData = JSON.parse(localStorage.getItem("window"));
- var thisIndex=null;
- // if (api.getPrefs({
- // sync: true,
- // key: 'taskOpen'
- // })) {
- // }
- var index = num || api.pageParam.index || 0;
- for (var i = 0; i < navLi.length; i++) {
- ! function(i) {
- navLi[i].onclick = function() {
- // $api.removeCls($api.dom(nav, 'li.active'), 'active');
- // $api.addCls(navLi[i], 'active');
- api.setFrameGroupIndex({
- name: 'taskGroup',
- index: i
- });
- }
- }(i)
- }
- $api.removeCls($api.dom(nav, 'li.active'), 'active');
- $api.addCls(navLi[index], 'active');
- api.openFrameGroup({
- name: 'taskGroup',
- rect: {
- x: 0,
- y: winData.headerH + $api.offset(nav).h,
- w: 'auto',
- h: winData.mainH - $api.offset(nav).h
- },
- index: index,
- preload: 5,
- frames: [{
- name: 'task-frame2',
- url: 'task-frame2.html',
- bgColor: '#f7f7f7',
- bounces: true
- }, {
- name: 'task-frame1',
- url: 'task-frame1.html',
- bgColor: '#f7f7f7',
- bounces: true
- }, {
- name: 'task-frame3',
- url: 'task-frame3.html',
- bgColor: '#f7f7f7',
- bounces: true
- }, {
- name: 'task-frame4',
- url: 'task-frame4.html',
- bgColor: '#f7f7f7',
- bounces: true
- }, {
- name: 'task-frame5',
- url: 'task-frame5.html',
- bgColor: '#f7f7f7',
- bounces: true
- }]
- }, function(ret, err) {
- if (index) {
- index=null;
- return;
- }
- thisIndex=index;
- $api.removeCls($api.dom(nav, 'li.active'), 'active');
- $api.addCls(navLi[ret.index], 'active');
- });
- api.setPrefs({
- key: 'taskOpen',
- value: true
- });
- api.addEventListener({name:"searchVal"},function (data) {
- switch ($(".task_nav li.active").index()){
- case 1:
- sendmsg("search1",data.value.val);
- break;
- case 0:
- sendmsg("search2",data.value.val);
- break;
- case 2:
- sendmsg("search3",data.value.val);
- break;
- case 3:
- sendmsg("search4",data.value.val);
- break;
- case 4:
- sendmsg("search5",data.value.val);
- break;
- }
- })
- function sendmsg(name,value) {
- api.sendEvent({
- name: name,
- extra: {val: value}
- });
- }
- }
- function closeGroup(num) {
- // var nav = $api.dom(".task_nav");
- // var navLi = $api.domAll(".task_nav li");
- // $api.removeCls($api.dom(nav, 'li.active'), 'active');
- // $api.addCls(navLi[num || 0], 'active');
- api.closeFrameGroup({
- name: 'taskGroup'
- });
- }
- </script>
- </body>
- </html>
|