authorizationRecord.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. <template>
  2. <view id="authorizationRecord">
  3. <view class="top-max-big-box">
  4. <view class="search-box">
  5. <img class="img-view" :src="imagesUrl('commonality/icon_aqjc_ss.png')">
  6. <input type="text" v-model="data1" placeholder="姓名/学工号" maxlength="20">
  7. <view class="button-view" @click="searchButton()">搜索</view>
  8. </view>
  9. <view class="check-button-max-box">
  10. <view class="check-button-box" style="width:260rpx;">
  11. <view class="picker-min-box" @click="checkSubButton()">
  12. <view class="picker-name">{{subId?subName:'实验室'}}</view>
  13. <img class="picker-img" :src="imagesUrl('commonality/icon_06.png')">
  14. </view>
  15. </view>
  16. <view class="check-button-box" style="width:200rpx;">
  17. <picker @change="buttonChange" :range-key="'typeName'" :value="typeId" :range="typeList">
  18. <view class="picker-min-box">
  19. <view class="picker-name">{{typeListIndex?typeList[typeListIndex].typeName:'开门状态'}}</view>
  20. <img class="picker-img" :src="imagesUrl('commonality/icon_06.png')">
  21. </view>
  22. </picker>
  23. </view>
  24. <view class="check-button-box" style="width:230rpx;">
  25. <picker mode="date" v-model="validBeginTime" :start="currentDate" fields="day" @change="beginDateChange">
  26. <view class="picker-min-box">
  27. <view class="picker-name">{{validBeginTime?validBeginTime:'开始时间'}}</view>
  28. <img class="picker-img" :src="imagesUrl('commonality/icon_06.png')">
  29. </view>
  30. </picker>
  31. </view>
  32. </view>
  33. </view>
  34. <scroll-view scroll-y @scrolltolower="scrollGet" class="list">
  35. <view class="for-max-big-box" v-for="(item,index) in dataList" :key="index">
  36. <view class="for-top-box">
  37. <view class="for-title-box">
  38. <view class="for-title">{{item.data1}}</view>
  39. <view class="for-button-box">
  40. <view class="for-button-null-p"></view>
  41. <view class="for-button-p" v-if="!item.data3" @click="delButton(item)">删除</view>
  42. <view class="for-button-null-p"></view>
  43. </view>
  44. </view>
  45. <view class="for-border-box"></view>
  46. <view class="position-left"></view>
  47. <view class="position-right"></view>
  48. <img v-if="item.data3" class="position-top-right" :src="imagesUrl('commonality/img_sqjl_yk@1x.png')">
  49. <img v-if="!item.data3" class="position-top-right" :src="imagesUrl('commonality/img_sqjl_wk@1x.png')">
  50. </view>
  51. <view class="for-bottom-box">
  52. <view class="for-user-box">
  53. <view class="for-user-left-box">
  54. <img :src="imagesUrl('commonality/icon_sqjl_bsqr@1x.png')">
  55. <view>被授权人:</view>
  56. <view>{{item.data4}}</view>
  57. </view>
  58. <view class="for-user-right-box">
  59. <img :src="imagesUrl('commonality/icon_sqjl_sqr@1x.png')">
  60. <view>授权人:</view>
  61. <view>{{item.data5}}</view>
  62. </view>
  63. </view>
  64. <view class="for-time-box">
  65. <img :src="imagesUrl('commonality/icon_aqbj_sj.png')">
  66. <view>开门时间:</view>
  67. <view><span style="margin-right:30rpx;">{{item.data6}}</span><span>{{item.data7}}</span></view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
  72. <view class="get-data-null-p" v-else="getDataType">- 滑动加载更多 -</view>
  73. </scroll-view>
  74. </view>
  75. </template>
  76. <script>
  77. export default {
  78. data() {
  79. return {
  80. data1: '',
  81. subId: '',
  82. subName: '',
  83. typeList: [{
  84. typeId: '1',
  85. typeName: '已开'
  86. },
  87. {
  88. typeId: '0',
  89. typeName: '未开'
  90. },
  91. ],
  92. typeListIndex: "",
  93. typeId: '',
  94. validBeginTime: '', //申请期限开始
  95. currentDate: '', //当前日期
  96. getDataType: false,
  97. getData: {
  98. page: 1,
  99. pageSize: 20,
  100. },
  101. dataList: [{
  102. data1: '实验室名称',
  103. data2: '209',
  104. data3: true,
  105. data4: '李呀呀同学',
  106. data5: '张呀呀老师',
  107. data6: '2025-10-10',
  108. data7: '08:00 - 10:00',
  109. },
  110. {
  111. data1: '实验室名称',
  112. data2: '209',
  113. data3: false,
  114. data4: '李呀呀同学',
  115. data5: '张呀呀老师',
  116. data6: '2025-10-10',
  117. data7: '08:00 - 10:00',
  118. }, {
  119. data1: '实验室名称实验室名称实验室名称实验室名称实验室名称实验室名称',
  120. data2: '209',
  121. data3: true,
  122. data4: '李呀呀同学',
  123. data5: '张呀呀老师',
  124. data6: '2025-10-10',
  125. data7: '08:00 - 10:00',
  126. },
  127. {
  128. data1: '实验室名称实验室名称实验室名称实验室名称实验室名称',
  129. data2: '209',
  130. data3: false,
  131. data4: '李呀呀同学',
  132. data5: '张呀呀老师',
  133. data6: '2025-10-10',
  134. data7: '08:00 - 10:00',
  135. },
  136. ],
  137. total: 0,
  138. }
  139. },
  140. onLoad(option) {
  141. if (option.item) {
  142. //选中实验室返回
  143. let subData = JSON.parse(decodeURIComponent(option.item));
  144. this.$set(this, 'subId', subData.subId);
  145. this.$set(this, 'subName', subData.subName);
  146. }
  147. },
  148. onShow() {
  149. },
  150. mounted() {
  151. },
  152. methods: {
  153. //删除按钮
  154. delButton(item){
  155. let self = this;
  156. uni.showModal({
  157. content: '是否确认删除?',
  158. cancelColor: "#999",
  159. confirmColor: "#0183FA",
  160. success: function(res) {
  161. if (res.confirm) {
  162. } else if (res.cancel) {}
  163. }
  164. });
  165. },
  166. //滚动加载事件
  167. scrollGet() {
  168. let self = this;
  169. if (self.total / self.getData.pageSize <= self.getData.page) {
  170. this.$set(this, 'getDataType', true);
  171. } else {
  172. this.getData.page += 1;
  173. this.$nextTick(() => {
  174. this.getList();
  175. })
  176. }
  177. },
  178. //获取实验室
  179. async getList() {
  180. let self = this;
  181. let obj = JSON.parse(JSON.stringify(this.getData))
  182. const {
  183. data
  184. } = await systemSubjectGetAppSubject(obj);
  185. if (data.code == 200) {
  186. if (self.getData.page == 1) {
  187. this.dataList = data.data.records;
  188. this.total = data.data.total;
  189. if (data.data.total / self.getData.pageSize <= self.getData.page) {
  190. this.$set(this, 'getDataType', true);
  191. }
  192. } else {
  193. this.dataList = [...this.dataList, ...data.data.records]
  194. this.total = data.data.total;
  195. if (data.data.total / self.getData.pageSize <= self.getData.page) {
  196. this.$set(this, 'getDataType', true);
  197. }
  198. }
  199. }
  200. },
  201. // 打开实验室查询
  202. checkSubButton() {
  203. uni.navigateTo({
  204. url: '/pages_manage/views/accessControl/searchSub'
  205. });
  206. },
  207. // 搜索按钮
  208. searchButton() {
  209. },
  210. //状态选择
  211. buttonChange(e) {
  212. this.typeListIndex = e.mp.detail.value;
  213. this.typeId = this.typeList[this.typeListIndex].typeId;
  214. this.laboratoryAppletOutCheckList()
  215. },
  216. //时间选择触发-开始
  217. beginDateChange(data) {
  218. this.validBeginTime = data.detail.value;
  219. },
  220. }
  221. }
  222. </script>
  223. <style lang="stylus" scoped>
  224. #authorizationRecord {
  225. height: 100%;
  226. display flex;
  227. flex-direction column;
  228. .top-max-big-box {
  229. width: 750rpx;
  230. height: 180rpx;
  231. background: #FFFFFF;
  232. padding: 20rpx 30rpx;
  233. box-sizing: border-box;
  234. .search-box {
  235. width: 690rpx;
  236. height: 78rpx;
  237. border: 1rpx solid #E0E0E0;
  238. border-radius: 50rpx;
  239. display: flex;
  240. .img-view {
  241. display: inline-block;
  242. margin: 27rpx 17rpx 0 37rpx;
  243. width: 26rpx;
  244. height: 26rpx;
  245. }
  246. input {
  247. height: 78rpx;
  248. line-height: 78rpx;
  249. flex: 1;
  250. font-size: 24rpx;
  251. }
  252. .button-view {
  253. width: 100rpx;
  254. line-height: 78rpx;
  255. text-align: center;
  256. font-size: 24rpx;
  257. color: #0183FA;
  258. }
  259. }
  260. }
  261. .check-button-max-box {
  262. display: flex;
  263. .check-button-box {
  264. .picker-min-box {
  265. display: flex;
  266. .picker-name {
  267. line-height: 80rpx;
  268. flex: 1;
  269. text-align: right;
  270. display: block;
  271. overflow: hidden;
  272. text-overflow: ellipsis;
  273. white-space: nowrap;
  274. font-size:28rpx;
  275. }
  276. .picker-img {
  277. margin: 34rpx 0 0 20rpx;
  278. width: 24rpx;
  279. height: 12rpx;
  280. }
  281. }
  282. }
  283. }
  284. .list {
  285. flex: 1;
  286. overflow-y scroll;
  287. padding: 0 30rpx;
  288. box-sizing: border-box;
  289. .for-max-big-box {
  290. background-color: #fff;
  291. border-radius: 20rpx;
  292. overflow: hidden;
  293. margin-top: 20rpx;
  294. .for-top-box {
  295. position: relative;
  296. .for-title-box {
  297. display: flex;
  298. .for-title {
  299. flex: 1;
  300. line-height: 42rpx;
  301. padding: 20rpx 37rpx;
  302. font-size: 30rpx;
  303. }
  304. .for-button-box {
  305. width: 100rpx;
  306. display: flex;
  307. flex-direction: column;
  308. margin-right: 75rpx;
  309. .for-button-null-p {
  310. flex: 1;
  311. }
  312. .for-button-p {
  313. width: 100rpx;
  314. height: 50rpx;
  315. line-height: 50rpx;
  316. text-align: center;
  317. font-size: 28rpx;
  318. color: #fff;
  319. background-color: #0183FA;
  320. border-radius: 10rpx;
  321. }
  322. }
  323. }
  324. .for-border-box {
  325. height: 37rpx;
  326. margin: 0 40rpx;
  327. border-top: 1rpx dashed #E0E0E0;
  328. }
  329. .position-left {
  330. width: 50rpx;
  331. height: 50rpx;
  332. border-radius: 50%;
  333. background-color: #E0E0E0;
  334. position: absolute;
  335. left: -25rpx;
  336. bottom: 13rpx;
  337. }
  338. .position-right {
  339. width: 50rpx;
  340. height: 50rpx;
  341. border-radius: 50%;
  342. background-color: #E0E0E0;
  343. position: absolute;
  344. right: -25rpx;
  345. bottom: 13rpx;
  346. }
  347. .position-top-right {
  348. position: absolute;
  349. top: 0;
  350. right: 0;
  351. width: 64rpx;
  352. height: 57rpx;
  353. }
  354. }
  355. .for-bottom-box {
  356. font-size: 28rpx;
  357. padding: 0 0 22rpx 40rpx;
  358. .for-user-box {
  359. display: flex;
  360. margin-bottom: 35rpx;
  361. .for-user-left-box {
  362. display: flex;
  363. flex: 1;
  364. img {
  365. width: 30rpx;
  366. height: 30rpx;
  367. margin-right:18rpx;
  368. }
  369. view {
  370. height: 30rpx;
  371. line-height: 30rpx;
  372. font-size: 28rpx;
  373. }
  374. }
  375. .for-user-right-box {
  376. display: flex;
  377. width:320rpx;
  378. img {
  379. width: 30rpx;
  380. height: 30rpx;
  381. margin-right:18rpx;
  382. }
  383. view {
  384. height: 30rpx;
  385. line-height: 30rpx;
  386. font-size: 28rpx;
  387. }
  388. }
  389. }
  390. .for-time-box {
  391. display: flex;
  392. img {
  393. width: 30rpx;
  394. height: 30rpx;
  395. margin-right:18rpx;
  396. }
  397. view {
  398. height: 30rpx;
  399. line-height: 30rpx;
  400. font-size: 28rpx;
  401. }
  402. }
  403. }
  404. }
  405. .get-data-null-p {
  406. text-align: center;
  407. line-height: 100rpx;
  408. padding-bottom: 80px;
  409. color: #999;
  410. }
  411. }
  412. }
  413. </style>