application_list.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <view>
  3. <view class="search">
  4. <view class="box" @click="go_search()">
  5. <view class="icon">
  6. <uni-icons type="search" size="16" color="#BBBBBB"></uni-icons>
  7. </view>
  8. <view class="text">搜索</view>
  9. </view>
  10. </view>
  11. <view class="content">
  12. <!-- <view class="title">
  13. <view class="tab" @click="change_tab_active(1)">
  14. <view class="text" :class="tab_active == 1?'active':''">最近常用</view>
  15. <view class="line" v-if="tab_active == 1"></view>
  16. </view>
  17. <view class="tab" @click="change_tab_active(2)">
  18. <view class="text" :class="tab_active == 2?'active':''">全部流程</view>
  19. <view class="line" v-if="tab_active == 2"></view>
  20. </view>
  21. </view> -->
  22. <!-- 暂时一个分类 -->
  23. <view class="title">
  24. <view class="tab">
  25. <view class="text" :class="tab_active == 1?'active':''">全部流程</view>
  26. <view class="line" v-if="tab_active == 1"></view>
  27. </view>
  28. </view>
  29. <view class="section" v-for="(item,index) in list" :key="index">
  30. <view class="box">
  31. <view class="item">
  32. <view class="left">
  33. <view class="icon" v-if="active == index" @click.stop="change_active(index)">
  34. <image src="./icon/close.png" mode=""></image>
  35. </view>
  36. <view class="icon" v-if="active != index" @click.stop="change_active(index)">
  37. <image src="./icon/open.png" mode=""></image>
  38. </view>
  39. <view class="text">{{item.type}} ({{item.count}})</view>
  40. </view>
  41. </view>
  42. <view class="list" v-if="active == index">
  43. <view class="item" v-for="(item_2,index_2) in item.list" :key="index_2"
  44. @click="go_detail_apply(item_2.name,item_2.flow_set_id)">
  45. <view class="left">
  46. <view class="text">{{item_2.name}}</view>
  47. </view>
  48. <view class="right">
  49. <uni-icons type="compose"></uni-icons>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. import {
  60. set_base_url
  61. } from '@/common/set_base_url.js'
  62. export default {
  63. data() {
  64. return {
  65. // 切换
  66. tab_active: 1,
  67. list: [],
  68. // 当前展开
  69. active: 99999999,
  70. };
  71. },
  72. onLoad() {
  73. this.get_list()
  74. },
  75. methods: {
  76. // 搜索
  77. go_search() {
  78. uni.navigateTo({
  79. url: "./search/search",
  80. animationType: "fade-in",
  81. animationDuration: 200
  82. })
  83. },
  84. change_tab_active(item) {
  85. this.tab_active = item
  86. },
  87. change_active(index) {
  88. if (this.active == index) {
  89. this.active = 99999999
  90. } else {
  91. this.active = index
  92. }
  93. },
  94. get_list() {
  95. this.$api.workflow_get_all_list({
  96. }).then((res) => {
  97. console.log(res)
  98. this.list = res.data.content.data
  99. })
  100. },
  101. go_detail_apply(name, flow_set_id) {
  102. uni.navigateTo({
  103. url: "./detail_apply/detail_apply?title=" + name + "&flow_set_id=" + flow_set_id
  104. })
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="scss">
  110. page {
  111. background-color: #F3F8F7;
  112. }
  113. .search {
  114. margin-bottom: 20rpx;
  115. background-color: #FFFFFF;
  116. box-sizing: border-box;
  117. padding: 25rpx 30rpx;
  118. .box {
  119. height: 80rpx;
  120. background-color: #F4F4F4;
  121. border-radius: 50rpx;
  122. display: flex;
  123. align-items: center;
  124. box-sizing: border-box;
  125. padding: 0 25rpx;
  126. .icon {
  127. margin-right: 10rpx;
  128. }
  129. .text {
  130. font-size: 30rpx;
  131. color: #BBBBBB;
  132. }
  133. }
  134. }
  135. .content {
  136. background-color: #FFFFFF;
  137. .title {
  138. height: 110rpx;
  139. display: flex;
  140. align-items: center;
  141. box-sizing: border-box;
  142. padding: 0 25rpx;
  143. border-bottom: 1rpx solid #F3F8F7;
  144. .tab {
  145. width: 350rpx;
  146. line-height: 110rpx;
  147. position: relative;
  148. .text {
  149. text-align: center;
  150. }
  151. .line {
  152. position: absolute;
  153. left: 50%;
  154. bottom: 0;
  155. transform: translateX(-40rpx);
  156. width: 80rpx;
  157. height: 4rpx;
  158. background-color: #00A0E8;
  159. }
  160. .active {
  161. color: #00A0E8;
  162. font-weight: 700;
  163. }
  164. }
  165. }
  166. .section {
  167. box-sizing: border-box;
  168. padding: 0 20rpx;
  169. .box {
  170. .item {
  171. height: 110rpx;
  172. display: flex;
  173. align-items: center;
  174. justify-content: space-between;
  175. margin-left: 20rpx;
  176. border-bottom: 1rpx solid #F3F8F7;
  177. .left {
  178. display: flex;
  179. align-items: center;
  180. .icon {
  181. line-height: 110rpx;
  182. width: 90rpx;
  183. text-align: center;
  184. image {
  185. width: 24rpx;
  186. height: 24rpx;
  187. }
  188. }
  189. .text {
  190. font-size: 32rpx;
  191. }
  192. }
  193. }
  194. .list {
  195. .item {
  196. height: 110rpx;
  197. display: flex;
  198. justify-content: space-between;
  199. align-items: center;
  200. margin-left: 108rpx;
  201. border-bottom: 1rpx solid #F3F8F7;
  202. .left {
  203. .text {
  204. margin-left: 18rpx;
  205. font-size: 30rpx;
  206. }
  207. }
  208. .right {
  209. line-height: 110rpx;
  210. width: 90rpx;
  211. text-align: center;
  212. }
  213. }
  214. }
  215. }
  216. }
  217. }
  218. </style>