business_approval.vue 3.9 KB

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