list.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <view>
  3. <u-navbar title="公文审批">
  4. </u-navbar>
  5. <u-tabs :list="tabslist" :is-scroll="false" :current="current" @change="change"></u-tabs>
  6. <view class="list1">
  7. <view class="item" v-for="(item,i) in list" @click="ckInfo(item.id)" :key="i">
  8. <view class="group">
  9. <view class="group1">
  10. <view class="name">
  11. 公文类型:
  12. </view>
  13. <view class="value">
  14. {{item.name}}
  15. </view>
  16. </view>
  17. <view class="group2">
  18. <view class="title">
  19. <span :style="{color:recordStatusColor(item.status)}">{{item.statusN}}</span>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="group">
  24. <view class="group1">
  25. <view class="name">
  26. 提交时间:
  27. </view>
  28. <view class="value">
  29. {{item.time}}
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. <u-divider v-if="formData.recordsTotal==list.length"
  35. :isnone="formData.recordsTotal==0" nonetext="没有找到相关内容"
  36. border-color="#CFD2D5">已经到底了</u-divider>
  37. </view>
  38. <!-- <view class="bottom">
  39. <u-button type="primary" @click="addInfo">公文提报</u-button>
  40. </view> -->
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data() {
  46. return {
  47. oatype:"",
  48. formData:{
  49. pageIndex: 1,
  50. pageSize: 20,
  51. recordsTotal: 0,
  52. },
  53. tabslist:[{
  54. name:"未处理",
  55. },{
  56. name:"已处理"
  57. },],
  58. current:0,
  59. list: [
  60. {
  61. name:"abcd",
  62. time:"2021-03-12 14:00:00",
  63. status:"1",
  64. statusN:"待审批"
  65. },
  66. {
  67. name:"abcd",
  68. time:"2021-03-12 14:00:00",
  69. status:"1",
  70. statusN:"待审批"
  71. }
  72. ],
  73. }
  74. },
  75. onLoad(op){
  76. this.oatype=op.oatype;
  77. },
  78. onReachBottom() {
  79. if (this.list.length < this.formData.recordsTotal) {
  80. this.myLoadmore();
  81. }
  82. },
  83. methods: {
  84. change(index) {
  85. this.current = index;
  86. },
  87. recordStatusColor(val){
  88. var retu = ""
  89. val=val+''
  90. switch (val) {
  91. case '-1':
  92. retu = '#f29a38'
  93. break;
  94. case '0':
  95. retu = '#f29a38'
  96. break;
  97. case '1':
  98. retu = '#52b56b'
  99. break;
  100. case '2':
  101. retu = '#c94031'
  102. break;
  103. case '3':
  104. retu = '#3a3bc2'
  105. break;
  106. case '5':
  107. retu = '#c94031'
  108. break;
  109. case '6':
  110. retu = '#c94031'
  111. case '9':
  112. retu = '#c94031'
  113. break;
  114. default:
  115. retu = '#52b56b'
  116. break;
  117. }
  118. return retu
  119. },
  120. getList(){
  121. },
  122. addInfo(){
  123. uni.navigateTo({
  124. url:"/pages/oawork/business/add?oatype="+this.oatype
  125. })
  126. },
  127. myLoadmore() {
  128. this.formData.pageIndex += 1;
  129. this.getList();
  130. },
  131. }
  132. }
  133. </script>
  134. <style lang="scss" scoped>
  135. page {
  136. padding-bottom: 100rpx;
  137. }
  138. .head {
  139. background: linear-gradient(180deg, rgba(190, 211, 240, 1) 0%, rgba(244, 244, 246, 1) 100%) !important;
  140. /deep/.u-navbar {
  141. //background: 0!important;
  142. background: linear-gradient(180deg, rgba(190, 211, 240, 1) 0%, rgba(244, 244, 246, 1) 100%) !important;
  143. height: 210rpx;
  144. //padding: 0 32rpx;
  145. }
  146. /deep/.u-border-bottom:after {
  147. height: 0;
  148. }
  149. .tabs {
  150. padding: 0 32rpx
  151. }
  152. }
  153. .tabs {
  154. display: flex;flex-wrap: wrap;
  155. justify-content: space-between;
  156. align-items: center;
  157. /deep/.u-tabs {
  158. background: 0 !important;
  159. width: 250rpx;
  160. }
  161. /deep/.u-tab-bar {
  162. background-color: #2A8EFB !important;
  163. }
  164. .screen {
  165. color: #415058;
  166. position: relative;
  167. font-family: Microsoft Yahei;
  168. /deep/.uicon-arrow-down {
  169. margin-left: 4rpx;
  170. }
  171. }
  172. .options {
  173. width: 120rpx;
  174. height: 60rpx;
  175. line-height: 60rpx;
  176. text-align: center;
  177. background-color: #fff;
  178. color: rgba(65, 80, 88, 1);
  179. font-family: Microsoft Yahei;
  180. position: absolute;
  181. top: 160rpx;
  182. right: 24rpx;
  183. box-shadow: 5px 5px 10px gray;
  184. }
  185. }
  186. .list1,
  187. .list2 {
  188. margin:12px;
  189. padding-bottom: 60px;
  190. .item {
  191. border-radius: 8px;
  192. background-color: rgba(255, 255, 255, 1);
  193. padding: 24rpx;
  194. margin-bottom: 24rpx;
  195. .group {
  196. display: flex;
  197. flex-wrap: wrap;
  198. justify-content: space-between;
  199. color: rgba(119, 119, 119, 1);
  200. // margin-top: 16rpx;
  201. font-weight: bold;
  202. .name{
  203. color:#777777;
  204. }
  205. .value{
  206. color:#333333;
  207. }
  208. .group1{
  209. display: flex;flex-wrap: wrap;
  210. }
  211. .group2{
  212. }
  213. }
  214. }
  215. }
  216. .bottom {
  217. position: fixed;
  218. bottom: 0;
  219. left: 0;
  220. right: 0;
  221. //background-color: #fff;
  222. padding: 16rpx 32rpx;
  223. uni-button {
  224. height: 88rpx;
  225. line-height: 88rpx;
  226. border-radius: 8px;
  227. background: linear-gradient(180deg, rgba(22, 119, 255, 1) 0%, rgba(16, 98, 213, 1) 100%);
  228. color: rgba(255, 255, 255, 1);
  229. font-size: 32rpx;
  230. font-family: Microsoft Yahei;
  231. }
  232. }
  233. </style>