平安校园
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

624 lignes
13 KiB

  1. <template>
  2. <view class="inspectionCenter">
  3. <view class="searchBox">
  4. <view class="searchLine" @click="openSearch">
  5. <!-- <view class="searchShow"> -->
  6. <view class="searchLabels">
  7. <image v-show="isShowSearch==false" src="@/static/image/earlyWarning/group.png" mode="">
  8. </image>
  9. <image v-show="isShowSearch" src="@/static/image/earlyWarning/group2.png" mode="">
  10. </image>
  11. <text class="labels">选择分组</text>
  12. <view class="values">一号楼/厨房</view>
  13. </view>
  14. <view class="arrow">
  15. <image v-show="isShowSearch==false" src="@/static/image/earlyWarning/arrow1.png" mode="">
  16. </image>
  17. <image v-show="isShowSearch" src="@/static/image/earlyWarning/arrow2.png" mode=""></image>
  18. </view>
  19. <!-- </view> -->
  20. </view>
  21. <view @click="isShowSearch=false" class="searchDialog" v-if="isShowSearch">
  22. <view class="content" @click.stop="isSelect">
  23. <u-row justify="space-between" gutter="10">
  24. <u-col span="7">
  25. <view class="demo-layout" @click="toOpen">
  26. <view class="left-layout">
  27. <text>{{searchForm.alarmType}}</text>
  28. </view>
  29. <view class="right-layout">
  30. <image style="width: 30rpx;height:30rpx;"
  31. src="@/static/image/earlyWarning/arrowRight.png" mode=""></image>
  32. </view>
  33. </view>
  34. <!-- <jp-select-plus ref="selectPlus" :isShow="false" color="#2388FF" placeholder="请选择"
  35. isSearch v-model="va3" :list="listc"></jp-select-plus> -->
  36. </u-col>
  37. <u-col span="5">
  38. <view class="demo-layout" @click="toOpenSelect">
  39. <view class="left-layout">
  40. <text>{{searchForm.warnHand}}</text>
  41. </view>
  42. <view class="right-layout">
  43. <image style="width: 30rpx;height:30rpx;"
  44. src="@/static/image/earlyWarning/arrowRight.png" mode=""></image>
  45. </view>
  46. </view>
  47. </u-col>
  48. </u-row>
  49. <u-row style="margin-top:10px;" justify="space-between" gutter="10">
  50. <u-col span="12">
  51. <uni-datetime-picker v-model="searchForm.tick" type="datetimerange">
  52. <view class="demo-layout">
  53. <view class="startBox">
  54. {{searchForm.StartTick}}
  55. </view>
  56. <text>至</text>
  57. <view class="endBox">
  58. {{searchForm.EndTick}}
  59. </view>
  60. <view class="timeIcon">
  61. <image style="width: 30rpx;height:30rpx;"
  62. src="@/static/image/earlyWarning/calendar.png" mode=""></image>
  63. </view>
  64. </view>
  65. </uni-datetime-picker>
  66. </u-col>
  67. </u-row>
  68. <view class="btnBox">
  69. <view class="leftBtn">
  70. 重置
  71. </view>
  72. <view class="rightBtn">
  73. 确认
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="tableBox">
  80. <u-empty marginTop="100rpx" :show="false" mode="warnList" text="暂无数据"></u-empty>
  81. <u-list @scrolltolower="scrolltolower" style="height: calc(100% - 0rpx);">
  82. <u-list-item v-for="(item, index) in warnList" :key="index">
  83. <view class="liBox">
  84. <view class="topCard">
  85. <view class="pic">
  86. <image src="@/static/image/earlyWarning/warnBack.png" mode="aspectFill"></image>
  87. <view class="resolvingPower">
  88. 2560*1440
  89. </view>
  90. </view>
  91. <view class="rightCard">
  92. <view class="firstCard">
  93. <view class="schoolName">
  94. 摄像头ID:SXT001
  95. </view>
  96. </view>
  97. <view class="secondCard">
  98. <view class="txt">
  99. 摄像头名称:厨房(良景)
  100. </view>
  101. </view>
  102. <view class="thirdCard">
  103. <view class="txt">
  104. 设备IP:192.168.10.130
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="btoCard">
  110. <view class="leftBox btoBox">
  111. <image src="@/static/image/earlyWarning/school.png" mode=""></image>
  112. <view class="txt">
  113. 所属学校:演示学校
  114. </view>
  115. </view>
  116. <view class="rightBox btoBox" @click="deleteClick">
  117. <view class="txt">
  118. 播放
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. </u-list-item>
  124. <u-loadmore :status="status" />
  125. </u-list>
  126. </view>
  127. <u-modal :show="showDelete" :title="deleteTitle" :showCancelButton="true" @confirm="confirmDelete"
  128. @cancel="cancelDelete">
  129. <view class="slot-content">
  130. <text style="text-align: center;">是否确定删除该预警吗?</text>
  131. </view>
  132. </u-modal>
  133. <selectSearch ref="selectSearchBox" :cellVisible="false" :value.sync="searchForm.alarmType"
  134. :options="[{value:1,label:'qinshi1'},{value:2,label:'qinshi2'}]" title="预警类型" search-place-holder="预警类型" />
  135. <selectRadio ref="selectRadioBox" :cellVisible="false" :value.sync="searchForm.warnHand"
  136. :options="[{value:1,label:'loudong1'},{value:2,label:'loudong2'}]" title="楼栋" />
  137. </view>
  138. </template>
  139. <script>
  140. import selectRadio from "@/components/selectRadio.vue"
  141. import selectSearch from "@/components/selectSearch.vue"
  142. export default {
  143. components: {
  144. selectRadio,
  145. selectSearch,
  146. },
  147. data() {
  148. return {
  149. showDelete: false,
  150. deleteTitle: '提示',
  151. deleteContent: '是否确定删除该预警吗?',
  152. isShowSearch: false,
  153. searchForm: {
  154. alarmType: '警告类型',
  155. warnHand: '处理状态',
  156. tick: [],
  157. StartTick: '开始时间',
  158. EndTick: '结束时间',
  159. },
  160. warnList: [{
  161. warnHand: 1
  162. }, {
  163. warnHand: 0
  164. }, {
  165. warnHand: 1
  166. }, {
  167. warnHand: 1
  168. }, {
  169. warnHand: 1
  170. }, {}, {}, {}, {}, ],
  171. isLoading: false,
  172. status: 'loadmore', //loading正在加载 loadmore加载更多 nomore没有更多了
  173. listc: [{
  174. code: 1,
  175. name: 'dasda'
  176. }, {
  177. code: 2,
  178. name: 'dasda'
  179. },
  180. {
  181. code: 3,
  182. name: 'dasda'
  183. },
  184. {
  185. code: 4,
  186. name: 'dasda'
  187. },
  188. {
  189. code: 5,
  190. name: 'dasda'
  191. },
  192. {
  193. code: 6,
  194. name: 'dasda'
  195. },
  196. {
  197. code: 7,
  198. name: 'dasda'
  199. },
  200. {
  201. code: 8,
  202. name: 'dasda'
  203. },
  204. {
  205. code: 9,
  206. name: 'dasda'
  207. },
  208. {
  209. code: 10,
  210. name: 'dasda'
  211. },
  212. {
  213. code: 11,
  214. name: 'dasda'
  215. },
  216. {
  217. code: 12,
  218. name: 'dasda'
  219. },
  220. {
  221. code: 13,
  222. name: '你好'
  223. }
  224. ]
  225. }
  226. },
  227. watch: {
  228. "searchForm.tick"() {
  229. console.log('日期时间:', this.searchForm.tick);
  230. if (this.searchForm.tick && this.searchForm.tick.length > 0) {
  231. this.searchForm.StartTick = this.searchForm.tick[0]
  232. this.searchForm.EndTick = this.searchForm.tick[1]
  233. }
  234. },
  235. },
  236. filters: {
  237. // statusChange(val) {
  238. // switch (val) {
  239. // case 'todo':
  240. // return '我的待办'
  241. // break;
  242. // case 'send':
  243. // return '由我发起'
  244. // break;
  245. // case 'done':
  246. // return '我的已办'
  247. // break;
  248. // default:
  249. // }
  250. // },
  251. },
  252. onLoad() {
  253. // 隐藏导航栏
  254. this.loadmore()
  255. },
  256. methods: {
  257. cancelDelete() {
  258. this.showDelete = false;
  259. },
  260. deleteClick() {
  261. this.showDelete = true;
  262. },
  263. confirmDelete() {
  264. this.showDelete = false;
  265. },
  266. // 跳转处理页面
  267. toHandle(row) {
  268. if (row.warnHand == 1) {
  269. uni.navigateTo({
  270. url: '/pages/earlyWarning/handlingSuggestions'
  271. });
  272. }
  273. },
  274. // 跳转详情页面
  275. toDetail(row) {
  276. uni.navigateTo({
  277. url: '/pages/earlyWarning/detail'
  278. });
  279. },
  280. // 预警类型弹框筛选
  281. toOpen() {
  282. this.$refs.selectSearchBox.show = true;
  283. },
  284. // 处理情况筛选
  285. toOpenSelect() {
  286. this.$refs.selectRadioBox.show = true;
  287. },
  288. // 打开筛选框
  289. openSearch() {
  290. this.isShowSearch = !this.isShowSearch;
  291. },
  292. isSelect() {
  293. },
  294. scrolltolower() {
  295. this.loadmore()
  296. },
  297. loadmore() {
  298. if (this.status != 'loadmore') return
  299. this.status = 'loading'
  300. setTimeout(() => {
  301. for (let i = 0; i < 1; i++) {
  302. this.warnList.push({}, {})
  303. }
  304. // 获取到的总条数>=接口总条数
  305. if (this.warnList.length >= 14) {
  306. this.status = 'nomore'
  307. } else {
  308. this.status = 'loadmore'
  309. }
  310. }, 2000)
  311. }
  312. }
  313. }
  314. </script>
  315. <style lang="scss" scoped>
  316. // .contentBox {
  317. // height: calc(100% - 375rpx);
  318. .inspectionCenter {
  319. width: 100%;
  320. height: 100%;
  321. .u-modal__title {
  322. color: #000000;
  323. }
  324. }
  325. .searchBox {
  326. // height: calc(100% - 360rpx);
  327. position: relative;
  328. .searchLine {
  329. height: 88rpx;
  330. display: flex;
  331. align-items: center;
  332. justify-content: space-between;
  333. padding: 0 15px;
  334. box-sizing: border-box;
  335. background: #fff;
  336. font-size: 28rpx;
  337. .searchLabels {
  338. display: flex;
  339. align-items: center;
  340. width: calc(100% - 34rpx);
  341. image {
  342. width: 40rpx;
  343. height: 40rpx;
  344. flex-shrink: 1;
  345. }
  346. .labels {
  347. width: 120rpx;
  348. display: block;
  349. color: #333333;
  350. margin-left: 10rpx;
  351. flex-shrink: 1;
  352. }
  353. .values {
  354. width: calc(100% - 40rpx - 120rpx);
  355. color: #2388FF;
  356. font-weight: 700;
  357. margin-left: 18rpx;
  358. overflow: hidden;
  359. word-wrap: break-word;
  360. white-space: pre-wrap;
  361. display: -webkit-box;
  362. -webkit-box-orient: vertical;
  363. -webkit-line-clamp: 1;
  364. }
  365. }
  366. .arrow {
  367. // text-align: right;
  368. // flex-shrink: 1;
  369. image {
  370. width: 34rpx;
  371. height: 34rpx;
  372. }
  373. }
  374. .leftSearchBox {
  375. display: flex;
  376. align-items: center;
  377. width: calc(100% - 40px);
  378. .searchLabel {
  379. flex-shrink: 1;
  380. color: #333333;
  381. width: 80px;
  382. }
  383. .searchValue {
  384. width: calc(100% - 60px);
  385. margin-left: 10px;
  386. color: #2388FF;
  387. overflow: hidden;
  388. word-wrap: break-word;
  389. white-space: pre-wrap;
  390. display: -webkit-box;
  391. -webkit-box-orient: vertical;
  392. -webkit-line-clamp: 1;
  393. }
  394. }
  395. }
  396. .searchDialog {
  397. position: absolute;
  398. z-index: 990;
  399. top: 89rpx;
  400. width: 100%;
  401. height: calc(100vh - 375rpx - 100rpx);
  402. font-size: 26rpx;
  403. background: rgba(0, 0, 0, 0.2);
  404. .content {
  405. background: #FFFFFF;
  406. padding: 15px;
  407. box-sizing: border-box;
  408. border-top: 1px solid rgba(0, 0, 0, 0.1);
  409. .demo-layout {
  410. height: 80rpx;
  411. border-radius: 8rpx;
  412. background: #F5F5F5;
  413. display: flex;
  414. justify-content: space-between;
  415. align-items: center;
  416. padding: 0 10px;
  417. box-sizing: border-box;
  418. .left-layout {
  419. color: #777777;
  420. }
  421. .right-layout {}
  422. .startBox {
  423. color: #777777;
  424. }
  425. text {
  426. color: #777777;
  427. }
  428. .endBox {
  429. color: #777777;
  430. }
  431. .timeIcon {}
  432. }
  433. }
  434. .btnBox {
  435. display: flex;
  436. align-items: center;
  437. margin-top: 15px;
  438. .leftBtn {
  439. width: 50%;
  440. height: 74rpx;
  441. line-height: 74rpx;
  442. border: 1px solid #BABABA;
  443. border-radius: 12rpx;
  444. color: #333333;
  445. text-align: center;
  446. }
  447. .rightBtn {
  448. width: 50%;
  449. height: 74rpx;
  450. line-height: 74rpx;
  451. border: 1px solid #2388FF;
  452. border-radius: 12rpx;
  453. color: #fff;
  454. text-align: center;
  455. background: #2388FF;
  456. margin-left: 15rpx;
  457. }
  458. }
  459. }
  460. }
  461. .tableBox {
  462. height: 100%;
  463. padding: 10px;
  464. box-sizing: border-box;
  465. // height: 600px;
  466. padding-bottom: 30px;
  467. .liBox {
  468. background: #fff;
  469. padding: 20px 15px;
  470. box-sizing: border-box;
  471. border-radius: 20px;
  472. margin-bottom: 10px;
  473. .topCard {
  474. display: flex;
  475. .pic {
  476. position: relative;
  477. image {
  478. width: 300rpx;
  479. height: 220rpx;
  480. border-radius: 4px;
  481. }
  482. .resolvingPower {
  483. position: absolute;
  484. top: 15rpx;
  485. right: 15rpx;
  486. background: #000000;
  487. color: #fff;
  488. padding: 8rpx;
  489. box-sizing: border-box;
  490. font-size: 20rpx;
  491. border-radius: 4rpx;
  492. }
  493. }
  494. .rightCard {
  495. margin-left: 20rpx;
  496. margin-top: 15rpx;
  497. .firstCard {
  498. display: flex;
  499. justify-content: space-between;
  500. align-items: center;
  501. margin-bottom: 60rpx;
  502. .schoolName {
  503. font-size: 32rpx;
  504. font-weight: 700;
  505. color: #333333;
  506. overflow: hidden;
  507. word-wrap: break-word;
  508. white-space: pre-wrap;
  509. // font-size: 14px;
  510. display: -webkit-box;
  511. -webkit-box-orient: vertical;
  512. -webkit-line-clamp: 1;
  513. }
  514. }
  515. .secondCard,
  516. .thirdCard {
  517. display: flex;
  518. align-items: center;
  519. margin-top: 18rpx;
  520. .txt {
  521. font-size: 26rpx;
  522. color: #333333;
  523. }
  524. }
  525. }
  526. }
  527. .midCard {
  528. font-size: 28rpx;
  529. .midContent {
  530. margin-top: 18rpx;
  531. }
  532. }
  533. .btoCard {
  534. border-top: 1px solid rgba(0, 0, 0, 0.1);
  535. margin-top: 30rpx;
  536. padding: 18px 0 0 0;
  537. display: flex;
  538. justify-content: space-between;
  539. align-items: center;
  540. .btoBox {
  541. // width: 33.3%;
  542. display: flex;
  543. justify-content: center;
  544. align-items: center;
  545. position: relative;
  546. image {
  547. width: 40rpx;
  548. height: 40rpx;
  549. margin-right: 15rpx;
  550. }
  551. }
  552. .rightBox {
  553. width: 180rpx;
  554. height: 74rpx;
  555. background: #2388FF;
  556. color: #fff;
  557. border-radius: 80rpx;
  558. }
  559. }
  560. }
  561. }
  562. // }
  563. </style>