free_car.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <view>
  3. <view class="list">
  4. <view class="btn_box">
  5. <view class="btn" @click="go_oa_url()">
  6. <view class="text">我的申请</view>
  7. <view class="icon">
  8. <uni-icons type="right" color="#fff" size="16"></uni-icons>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="item" v-for="(item,index) in list" :key="index">
  13. <div class="line">
  14. <view class="title">{{item.car_type}}</view>
  15. <view class="btn" @click="go_oa_url_2(item)">
  16. <view class="icon">
  17. <uni-icons type="list" color="#fff" size="16"></uni-icons>
  18. </view>
  19. <view class="text">申请</view>
  20. </view>
  21. </div>
  22. <div class="label_box">
  23. <view class="label" v-for="(item_2,index_2) in item.con" :key="index_2" v-if="item_2.is_show == 1">
  24. <view class="name">{{item_2.title}}</view>
  25. <view class="num">{{item_2.con}}</view>
  26. </view>
  27. </div>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. data() {
  35. return {
  36. mine_code:"",
  37. base_url:"http://oa_system.nxmy.com:8011",
  38. list: []
  39. };
  40. },
  41. onLoad(option) {
  42. console.log(uni.getStorageSync('mine_code'))
  43. if(uni.getStorageSync('mine_code').indexOf("_neiwang") != -1){
  44. console.log("内网")
  45. this.base_url = "http://oa_system.nxmy.com:8011"
  46. }else{
  47. console.log("公网")
  48. }
  49. console.log(option)
  50. uni.setNavigationBarTitle({
  51. title: option.title
  52. })
  53. },
  54. mounted() {
  55. this.get_list()
  56. },
  57. methods: {
  58. go_oa_url() {
  59. uni.navigateTo({
  60. url: "../../origanization/OA/h5/h5",
  61. success: (res) => {
  62. // 通过eventChannel向被打开页面传送数据
  63. res.eventChannel.emit('acceptDataFromOpenerPage', {
  64. url: this.base_url + "/?m=ying&d=we&mnum=rjz_car_apply&show=we&hideheader=true",
  65. title: "用车申请"
  66. })
  67. }
  68. })
  69. },
  70. go_oa_url_2(item) {
  71. console.log(item)
  72. uni.navigateTo({
  73. url: "../../origanization/OA/h5/h5",
  74. success: (res) => {
  75. // 通过eventChannel向被打开页面传送数据
  76. res.eventChannel.emit('acceptDataFromOpenerPage', {
  77. url: this.base_url + "/index.php?a=lum&m=input&d=flow&num=rjz_car_apply&hideheader=true&show=we&car_type="+item.car_type+"&free_con="+item.con[1].con,
  78. title: "用车申请"
  79. })
  80. }
  81. })
  82. },
  83. get_list() {
  84. uni.request({
  85. method: "GET",
  86. url: this.base_url + "/api.php?m=rjzcarlist&a=getFreeCarCon&ischeck=0",
  87. success: (res) => {
  88. console.log(res.data);
  89. this.list = res.data.data
  90. }
  91. })
  92. }
  93. }
  94. }
  95. </script>
  96. <style lang="scss">
  97. .list {
  98. box-sizing: border-box;
  99. padding: 25rpx;
  100. .btn_box {
  101. display: flex;
  102. justify-content: flex-end;
  103. margin-bottom: 30rpx;
  104. .btn {
  105. width: 230rpx;
  106. height: 60rpx;
  107. line-height: 60rpx;
  108. background: #00A0E8;
  109. border-radius: 32rpx;
  110. display: flex;
  111. align-items: center;
  112. justify-content: center;
  113. .text {
  114. font-size: 30rpx;
  115. color: #fff;
  116. font-weight: 700;
  117. margin-right: 10rpx;
  118. }
  119. .icon {
  120. font-weight: 700;
  121. }
  122. }
  123. }
  124. .item {
  125. margin-bottom: 30rpx;
  126. box-shadow: 1rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.13);
  127. border-radius: 20rpx;
  128. box-sizing: border-box;
  129. padding: 30rpx;
  130. .line {
  131. display: flex;
  132. justify-content: space-between;
  133. align-items: center;
  134. .title {
  135. font-size: 32rpx;
  136. font-weight: 700;
  137. border-bottom: 6rpx solid #009fe8;
  138. }
  139. .btn {
  140. width: 140rpx;
  141. height: 46rpx;
  142. background: #00A0E8;
  143. border-radius: 28rpx;
  144. display: flex;
  145. align-items: center;
  146. justify-content: center;
  147. .text {
  148. font-size: 26rpx;
  149. color: #fff;
  150. margin-left: 10rpx;
  151. }
  152. }
  153. }
  154. .label_box {
  155. margin-top: 30rpx;
  156. display: flex;
  157. justify-content: space-between;
  158. align-items: center;
  159. .label {
  160. text-align: center;
  161. .name {
  162. color: #6F6F6F;
  163. font-size: 24rpx;
  164. }
  165. .num {
  166. font-size: 26rpx;
  167. font-weight: 700;
  168. }
  169. }
  170. }
  171. }
  172. }
  173. </style>