business-audit.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <template>
  2. <view class="content">
  3. <view class="title">
  4. <view class="item" :class="active_item == 0?'active':''" @click="click_btn(0)">待审核</view>
  5. <view class="item" :class="active_item == 1?'active':''" @click="click_btn(1)">已审核</view>
  6. </view>
  7. <view class="list" v-if="active_item == 0">
  8. <view class="item" v-for="(item,index) in list" :key="index" v-if="item.staff_state == 0">
  9. <view class="top">
  10. <view class="user">
  11. <view class="info">
  12. <view class="text">{{item.name}}</view>
  13. <view class="text">编号: #{{item.id}} {{item.created_at}}</view>
  14. </view>
  15. </view>
  16. <view class="state">{{item.status}}</view>
  17. </view>
  18. <view class="inner">
  19. <view class="class_name">{{item.classify}}</view>
  20. <view class="name">{{item.title}}</view>
  21. <view class="tip">{{item.introduce}}</view>
  22. </view>
  23. <view class="bottom">
  24. <view class="btn" @click="go_shenhe(item.id,item.title)">审核</view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="list" v-if="active_item == 1">
  29. <view class="item" v-for="(item,index) in list" :key="index" v-if="item.staff_state == 1" :style="item.state == 3?'border-top: 2px solid red;':''">
  30. <view class="top">
  31. <view class="user">
  32. <view class="info">
  33. <view class="text">{{item.name}}</view>
  34. <view class="text">编号: #{{item.id}} {{item.created_at}}</view>
  35. </view>
  36. </view>
  37. <view class="state" v-if="item.state == 2" style="color: #00D983;">{{item.status}}</view>
  38. <view class="state" v-if="item.state == 3" style="color: red;">{{item.status}}</view>
  39. </view>
  40. <view class="inner">
  41. <view class="class_name">{{item.classify}}</view>
  42. <view class="name">{{item.title}}</view>
  43. <view class="tip">{{item.introduce}}</view>
  44. </view>
  45. <view class="bottom">
  46. <view class="btn" style="background-color: #009FE8;" @click="go_chakan(item.id,item.title)">查看</view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. data() {
  55. return {
  56. active_item:0,
  57. list:[],
  58. page:1,
  59. page_size:20,
  60. state:0
  61. };
  62. },
  63. onLoad() {
  64. // this.get_worksheet_check_listmei()
  65. },
  66. onShow() {
  67. // this.active_item = 0
  68. // this.state = 0
  69. console.log(this.state)
  70. this.page = 1
  71. this.list = []
  72. this.get_worksheet_check_listmei()
  73. },
  74. onReachBottom(){
  75. this.page++
  76. this.get_worksheet_check_listmei()
  77. },
  78. methods:{
  79. // 切换列表
  80. click_btn(item){
  81. this.active_item = item
  82. this.state = item
  83. this.page = 1
  84. this.list = []
  85. // 刷新数据
  86. this.get_worksheet_check_listmei()
  87. },
  88. go_shenhe(id,title){
  89. uni.navigateTo({
  90. url:"shenhe/shenhe?id=" + id + "&title=" + title
  91. })
  92. },
  93. go_chakan(id,title){
  94. uni.navigateTo({
  95. url:"chakan/chakan?id=" + id + "&title=" + title
  96. })
  97. },
  98. get_worksheet_check_listmei(){
  99. uni.showLoading({
  100. mask:true
  101. })
  102. this.$api.worksheet_check_listmei({
  103. page:this.page,
  104. size:this.page_size,
  105. state:this.state,
  106. }).then((res)=>{
  107. console.log(res)
  108. console.log(res.data.data)
  109. this.list = this.list.concat(res.data.data)
  110. uni.hideLoading()
  111. })
  112. },
  113. }
  114. }
  115. </script>
  116. <style lang="scss">
  117. .content{
  118. width: 749rpx;
  119. }
  120. .title{
  121. position: fixed;
  122. top: 1;
  123. left: 0rpx;
  124. z-index: 999;
  125. background-color: #FFFFFF;
  126. height: 43px;
  127. display: flex;
  128. border-bottom: 1px solid #E4E4E4;
  129. .item{
  130. width: 374rpx;
  131. line-height: 43px;
  132. text-align: center;
  133. font-size: 16px;
  134. color: #BDC3C7;
  135. }
  136. .active{
  137. border-bottom: 2px solid #16A085;
  138. color: #16A085;
  139. }
  140. }
  141. .list{
  142. box-sizing: border-box;
  143. padding: 24rpx;
  144. padding-top: 53px;
  145. .item{
  146. width: 700rpx;
  147. border-radius: 6px;
  148. border: 1px solid #EDEFF9;
  149. border-top: 2px solid #00D983;
  150. box-sizing: border-box;
  151. padding: 10px 25rpx;
  152. margin-bottom: 15px;
  153. .top{
  154. display: flex;
  155. justify-content: space-between;
  156. .user{
  157. display: flex;
  158. .img{
  159. width: 60px;
  160. height: 60px;
  161. border-radius: 50%;
  162. overflow: hidden;
  163. image{
  164. width: 60px;
  165. height: 60px;
  166. }
  167. }
  168. .info{
  169. margin-left: 10rpx;
  170. height: 60px;
  171. .text{
  172. line-height: 25px;
  173. font-size: 12px;
  174. }
  175. }
  176. }
  177. .state{
  178. width: 150rpx;
  179. text-align: right;
  180. line-height: 25px;
  181. font-size: 12px;
  182. color: #2ECC71;
  183. }
  184. }
  185. .inner{
  186. margin: 10px auto;
  187. width: 650rpx;
  188. border: 1px solid #EDEFF9;
  189. border-radius: 6px;
  190. box-sizing: border-box;
  191. padding: 10px;
  192. font-size: 12px;
  193. .class_name{
  194. line-height: 20px;
  195. color: #3498DB;
  196. }
  197. .name{
  198. line-height: 20px;
  199. }
  200. .tip{
  201. line-height: 20px;
  202. text-indent: 2em;
  203. }
  204. }
  205. .bottom{
  206. text-align: right;
  207. .btn{
  208. display: inline-block;
  209. width: 80px;
  210. text-align: center;
  211. line-height: 30px;
  212. font-size: 12px;
  213. color: #FFFFFF;
  214. background-color: #16A085;
  215. }
  216. }
  217. }
  218. }
  219. </style>