sceneInspect.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <!-- 现场检查 -->
  2. <template>
  3. <view class="sceneInspect">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="college">
  6. <picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" :range-key="'deptName'">
  7. <view class="college-l">{{queryParams.deptName?queryParams.deptName:'请选择学院单位'}}</view>
  8. </picker>
  9. <img class="college-r" @click="resetQuery" :src="imagesUrl('commonality/icon_aqjc_ss.png')">
  10. </view>
  11. <view class="memorandum">
  12. <view>备忘录</view>
  13. <view>08-26 08:36
  14. <img :src="imagesUrl('commonality/icon_wd_gd@1x.png')">
  15. </view>
  16. </view>
  17. <view class="memorandum">
  18. <view>备忘录</view>
  19. <view style="color: #0183FA;">2</view>
  20. </view>
  21. <uni-swipe-action>
  22. <uni-swipe-action-item :right-options="options" @click="onClick" @change="swipeChange"
  23. v-for="(item,index) in dataList">
  24. <view class="list-li">
  25. <img class="list-li-l" :src="imagesUrl('safetyCheck/icon_xcjc_ld@1x.png')">
  26. <view class="list-li-r">
  27. <view>{{item.name}}</view>
  28. <view>{{item.time}}</view>
  29. </view>
  30. </view>
  31. </uni-swipe-action-item>
  32. </uni-swipe-action>
  33. </scroll-view>
  34. </view>
  35. </template>
  36. <script>
  37. import {
  38. config
  39. } from '@/api/request/config.js'
  40. import {
  41. systemDeptDropList,
  42. } from '@/pages/api/index.js'
  43. export default {
  44. name: "sceneInspect",
  45. components: {
  46. },
  47. data() {
  48. return {
  49. baseUrl: config.base_url,
  50. pageType: 0,
  51. collegeArray: [],
  52. collegeIndex: 0,
  53. // 查询参数
  54. queryParams: {
  55. page: 1,
  56. pageSize: 10,
  57. deptId: '',
  58. deptName: '',
  59. },
  60. dataList: [{
  61. name: '楼栋名称房间号',
  62. time: '2024-08-26 09:33',
  63. },
  64. {
  65. name: '楼栋名称房间号',
  66. time: '2024-08-26 09:33',
  67. },
  68. ],
  69. options: [{
  70. text: '编辑',
  71. style: {
  72. backgroundColor: '#0183fa'
  73. }
  74. }, {
  75. text: '删除',
  76. style: {
  77. backgroundColor: '#FD5C5C'
  78. }
  79. }]
  80. }
  81. },
  82. onLoad(option) {
  83. },
  84. onShow() {
  85. },
  86. mounted() {
  87. this.systemDeptDropList();
  88. },
  89. methods: {
  90. //滚动事件
  91. scrollGet() {},
  92. collegeChange(e) {
  93. let self = this;
  94. self.collegeArray.forEach(function(item, index) {
  95. if (index == e.detail.value) {
  96. console.log(item)
  97. self.$set(self.queryParams, 'deptId', item.deptId)
  98. self.$set(self.queryParams, 'deptName', item.deptName)
  99. }
  100. })
  101. },
  102. resetQuery() {
  103. this.$set(this.queryParams, 'deptId', '')
  104. this.$set(this.queryParams, 'deptName', '')
  105. },
  106. onClick(e) {
  107. uni.showToast({
  108. title: `点击了${e.position === 'left' ? '左侧' : '右侧'} ${e.content.text}按钮`,
  109. icon: 'none'
  110. });
  111. //点击选项按钮时触发事件
  112. //e = {content,index} ,content(点击内容)、index(下标)、position (位置信息)
  113. },
  114. swipeChange(e) {
  115. //组件打开或关闭时触发
  116. // left:左侧 ,right:右侧,none:关闭
  117. },
  118. //获取院系
  119. async systemDeptDropList() {
  120. const {
  121. data
  122. } = await systemDeptDropList({
  123. deptName: '',
  124. level: 2,
  125. deptType: 1
  126. });
  127. if (data.code == 200) {
  128. this.collegeArray = data.data
  129. }
  130. },
  131. }
  132. }
  133. </script>
  134. <style lang="stylus" scoped>
  135. .sceneInspect {
  136. height: 100%;
  137. display flex;
  138. box-sizing: border-box;
  139. .college {
  140. width: 750rpx;
  141. height: 80rpx;
  142. background: #FFFFFF;
  143. padding: 0 30rpx;
  144. box-sizing: border-box;
  145. display: flex;
  146. justify-content: flex-start;
  147. align-items: center;
  148. margin-bottom: 20rpx;
  149. .college-l {
  150. font-size: 30rpx;
  151. color: #333333;
  152. line-height: 80rpx;
  153. text-align: left;
  154. }
  155. .college-r {
  156. width: 30rpx;
  157. height: 30rpx;
  158. margin-left: 20rpx;
  159. }
  160. }
  161. .memorandum {
  162. width: 750rpx;
  163. height: 80rpx;
  164. background: #FFFFFF;
  165. border-bottom: 1rpx solid #E0E0E0;
  166. padding: 0 30rpx;
  167. box-sizing: border-box;
  168. display: flex;
  169. justify-content: space-between;
  170. align-items: center;
  171. >view:nth-of-type(1) {
  172. font-size: 28rpx;
  173. color: #333333;
  174. line-height: 39rpx;
  175. text-align: left;
  176. }
  177. >view:nth-of-type(2) {
  178. font-size: 28rpx;
  179. color: #666666;
  180. line-height: 39rpx;
  181. text-align: left;
  182. display: flex;
  183. justify-content: flex-start;
  184. align-items: center;
  185. >img {
  186. width: 24rpx;
  187. height: 24rpx;
  188. margin-left: 12rpx;
  189. }
  190. }
  191. }
  192. .list-li {
  193. width: 750rpx;
  194. height: 100rpx;
  195. background: #FFFFFF;
  196. border-bottom: 1rpx solid #E0E0E0;
  197. display: flex;
  198. justify-content: flex-start;
  199. align-items: center;
  200. padding: 0 30rpx;
  201. box-sizing: border-box;
  202. .list-li-l {
  203. width: 60rpx;
  204. height: 60rpx;
  205. margin-right: 24rpx;
  206. }
  207. .list-li-r {
  208. >view:nth-of-type(1) {
  209. font-size: 28rpx;
  210. color: #333333;
  211. line-height: 39rpx;
  212. text-align: left;
  213. }
  214. >view:nth-of-type(2) {
  215. font-size: 24rpx;
  216. color: #666666;
  217. line-height: 34rpx;
  218. text-align: left;
  219. margin-top: 6rpx;
  220. }
  221. }
  222. }
  223. }
  224. </style>