efficiencyMyFeedback.html 4.7 KB

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