efficiencyProgress.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8. <title>党建系统</title>
  9. <link href="../../css/mui.min.css" rel="stylesheet" />
  10. <link href="../../css/OA-style.css" rel="stylesheet" />
  11. </head>
  12. <body>
  13. <header class="mui-bar mui-bar-nav ">
  14. <a href="" class="mui-action-back back mui-pull-left"><img src="../../images/back.png"></a>
  15. <h1 id="title" class="mui-title">反馈详情</h1>
  16. </header>
  17. <div class="mui-content" >
  18. <div id="pullrefresh" class="mui-content mui-scroll-wrapper" style="">
  19. <div class="mui-scroll">
  20. <div class="mui-card" v-for="item in items">
  21. <a href="javascript:;" :data-id="item.id" @tap="open_detail(item)">
  22. <div class="list_gg">
  23. <div class="list_gg_item mui-clearfix">
  24. <h1>{{item.duban_name}}</h1>
  25. <h2 style="font-size: 16px;">督办人:{{item.name}}</h2>
  26. <h2 style="font-size: 16px;">反馈内容:{{item.content}}</h2>
  27. <h2 style="font-size: 16px;">反馈时间:{{item.fankui_date}}</h2>
  28. <h2 style="font-size: 16px;">状态:
  29. <font v-if="'0'==item.state">待签收</font>
  30. <font v-if="'1'==item.state || '4'==item.state">已签收</font>
  31. <font v-if="'2'==item.state" color="#FFB400">进行中</font>
  32. <font v-if="'3'==item.state" color="#008000">办结</font>
  33. </h2>
  34. </div>
  35. </div>
  36. </a>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <script src="../../js/jquery-1.11.2.min.js"></script>
  42. <script src="../../js/mui.min.js"></script>
  43. <script src="../../js/config.js"></script>
  44. <script src="../../js/app.js"></script>
  45. <script src="../../js/dj/article/list.js"></script>
  46. <script src="../../js/vue.min.js"></script>
  47. <script>
  48. var pageDetail = null;
  49. var id = "";
  50. mui.init({
  51. pullRefresh: {
  52. container: '#pullrefresh',
  53. down: {
  54. style: 'circle', //必选,下拉刷新样式,目前支持原生5+ ‘circle’ 样式
  55. color: '#2BD009', //可选,默认“#2BD009” 下拉刷新控件颜色
  56. height: '50px', //可选,默认50px.下拉刷新控件的高度,
  57. range: '100px', //可选 默认100px,控件可下拉拖拽的范围
  58. offset: '0px', //可选 默认0px,下拉刷新控件的起始位置
  59. // auto: true, //可选,默认false.首次加载自动上拉刷新一次
  60. callback: reloadNews //必选,刷新函数,根据具体业务来编写,比如通过ajax从服务器获取新数据;
  61. },
  62. up: {
  63. contentrefresh: '正在加载...',
  64. auto: true, //可选,默认false.自动上拉加载一次
  65. callback: pullupRefresh
  66. }
  67. },
  68. statusBarBackground: '#FFFFFF', //设置状态栏颜色,仅iOS可用
  69. // preloadLimit:5,
  70. });
  71. mui.plusReady(function() {
  72. var self = plus.webview.currentWebview();
  73. id = self.xiaolv_id;
  74. });
  75. var vmA = new Vue({
  76. el: '#pullrefresh',
  77. data: {
  78. items: [] //列表信息流数据
  79. }
  80. });
  81. /**
  82. * 下拉刷新具体业务实现
  83. */
  84. function reloadNews() {
  85. pageNo = 1;
  86. vmA.items = [];
  87. // var table = document.body.querySelector('.mui-table-view');
  88. // table.innerHTML = "";
  89. addData();
  90. }
  91. var pageNo = 1;
  92. var jump_type = 0;
  93. /**
  94. * 上拉加载具体业务实现
  95. */
  96. function pullupRefresh() {
  97. addData();
  98. }
  99. function addData() {
  100. var url = API.API_URL();
  101. var serviceId = "oa_efficiency_2018V0010PHONE009";
  102. var state = app.getState(); //获取登陆信息
  103. var staffId = state.user.useId;
  104. var obj = {
  105. xiaolv_id: id ,
  106. pSize: APP.PageSize,
  107. p: pageNo
  108. };
  109. app.ajax(serviceId,obj, function(data) {
  110. //服务器返回响应
  111. console.log(JSON.stringify(data))
  112. var result = data.returnParams;
  113. var totalRow = data.total;
  114. var totalPage = Math.ceil(totalRow / APP.PageSize);
  115. var list = data.list;
  116. console.log(list.length);
  117. if(list.length > 0) {
  118. vmA.items = vmA.items.concat(convert(list));
  119. }
  120. pageNo = endPull(totalPage, pageNo);
  121. });
  122. }
  123. /**
  124. * 1、将服务端返回数据,转换成前端需要的格式
  125. * 2、若服务端返回格式和前端所需格式相同,则不需要改功能
  126. *
  127. * @param {Array} items
  128. */
  129. function convert(items) {
  130. var newItems = [];
  131. items.forEach(function(item) {
  132. newItems.push({
  133. name: item.name,
  134. fankui_date:item.fankui_date,
  135. duban_name: item.duban_name,
  136. state:item.state,
  137. content: item.content == null ? "" : item.content.substr(0, 70)
  138. });
  139. });
  140. return newItems;
  141. }
  142. </script>
  143. </body>
  144. </html>