index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. <template>
  2. <view>
  3. <view class="status_bar"></view>
  4. <view class="" style="position: relative;top: 40px;">
  5. <!-- <view style="position: fixed;z-index: 100;">
  6. <uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="灌溉控制系统" right-icon="search"
  7. @clickRight="clickRight" size="16"></uni-nav-bar>
  8. <view class="inputs" :style="{'width':width+'rpx'}">
  9. <input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp"
  10. class="inputbox" :clearable="false" />
  11. <u-icon name="search" size="40" class="icon" @click="search"></u-icon>
  12. </view>
  13. </view> -->
  14. <view style="position: fixed;z-index: 100;">
  15. <uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回"
  16. size="16">
  17. <view class="bases_search">
  18. <view class="bases_search_text" @click="search">
  19. <u-icon name="search" class="search"></u-icon>
  20. <input type="text" v-model="imports" placeholder="设备ID搜索" disabled @input="searchinp"/>
  21. </view>
  22. </view>
  23. </uni-nav-bar>
  24. </view>
  25. <image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/irrigate/1.png'" mode="" class="image">
  26. </image>
  27. <view class="loading" v-if="loadingtf">
  28. <image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
  29. </view>
  30. <view class="tab-box">
  31. <view v-for="(item,index) in equipArr" :key="item.type" v-if="item.tf"
  32. @click="tabClick(index,item.type)" :class="['tab-item',active==index?'active':'']">
  33. <text>{{item.name}}</text>
  34. <text class="bottom-line"></text>
  35. </view>
  36. </view>
  37. <view class="prevents">
  38. <view class="prevents_item" v-for="(item,index) in eqlistdata" :key="item.d_id" @click="eqdetails(item, index)">
  39. <view class="" v-if="side_type == 18">
  40. <image
  41. :src="item.device_status==1?'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png':'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'"
  42. mode="" class="prevents_item_img"></image>
  43. <view class="prevents_item_top">
  44. <p>设备名称:{{item.device_name}}</p>
  45. <view class="" style="display: flex;">
  46. <view class="" :style="{'margin-right': '10rpx','color':item.status2?'#00B075':'#f00'}">
  47. {{item.status2?"已启用":"已禁用"}}
  48. </view>
  49. <!-- <u-switch v-model="item.status2" size="35" activeColor="#00B075"
  50. style="margin-top: 10rpx;" inactiveColor="#f00"
  51. @change="switchchange2($event,item.d_id,index)">
  52. </u-switch> -->
  53. <switch @change="switchchange2($event,item.d_id,index)" v-if="$QueryPermission(256)" color="#00B075" :checked="item.status2" style="zoom:0.6" />
  54. </view>
  55. </view>
  56. <view class="prevents_item_bot">
  57. <view class="prevents_item_bot_item">
  58. <p>设备 ID:{{item.device_id}}</p>
  59. <p @click="newdata(item)" v-if="$QueryPermission(205)">数据查看</p>
  60. </view>
  61. <p style="color:#909696;height: 60rpx;line-height: 60rpx;">
  62. 设备状态:{{item.device_status==1?"在线":"离线"}}</p>
  63. <p style="color:#909696;height: 60rpx;line-height: 60rpx;">设备备注:{{item.device_notes}}
  64. <u-icon name="edit-pen" size="36" color="#00B075" @click="changeremark(item,index)">
  65. </u-icon>
  66. </p>
  67. <view class="prevents_item_bot_item">
  68. <p>地址:{{item.city}}</p>
  69. <u-icon name="map" size="40" color="#00B075"
  70. @click="selectaddress(item.city,item.device_name)"></u-icon>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="" v-if="side_type == 17">
  75. <image src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png" mode=""
  76. class="prevents_item_img"></image>
  77. <view class="prevents_item_top">
  78. <p>设备名称:{{item.device_name}}</p>
  79. <view class="" style="display: flex;">
  80. <view class=""
  81. :style="{'margin-right': '10rpx','color':item.water_pump_switch2?'#00B075':'#f00'}">
  82. {{item.water_pump_switch2?"已开泵":"已关泵"}}
  83. </view>
  84. <!-- <u-switch v-model="item.water_pump_switch2" size="35" active-color="#00B075"
  85. inactive-color="#f00" style="margin-top: 10rpx;"
  86. @change="switchchange($event,item.device_id,index)">
  87. </u-switch> -->
  88. <switch @change="switchchange($event,item.d_id,index)" v-if="$QueryPermission(254)" color="#00B075" :checked="item.water_pump_switch2" style="zoom:0.6" />
  89. </view>
  90. </view>
  91. <view class="prevents_item_bot">
  92. <view class="prevents_item_bot_item">
  93. <p>设备 ID:{{item.device_id}}</p>
  94. <p @click="newdata(item)" v-if="item.water_pump_switch2">实时数据</p>
  95. </view>
  96. <p style="color:#909696;height: 60rpx;line-height: 60rpx;">
  97. 设备状态:{{item.device_status==1?"在线":"离线"}}</p>
  98. <p style="color:#909696;height: 60rpx;line-height: 60rpx;">设备备注:{{item.device_notes}}
  99. <u-icon name="edit-pen" size="36" color="#00B075" @click="changeremark(item,index)">
  100. </u-icon>
  101. </p>
  102. <view class="prevents_item_bot_item">
  103. <p>地址:{{item.city}}</p>
  104. <u-icon name="map" size="40" color="#00B075"
  105. @click="selectaddress(item.city,item.device_name)"></u-icon>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="" v-if="side_type == 13 || side_type=='xph'">
  110. <image src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png" mode=""
  111. class="prevents_item_img"></image>
  112. <view class="prevents_item_top">
  113. <p>设备名称:{{item.device_name}}</p>
  114. </view>
  115. <view class="prevents_item_bot">
  116. <p>设备 ID:{{item.equip_id || item.device_id}}</p>
  117. <p>最新上报时间:{{item.uptime|timeFormat()}}</p>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. <u-modal v-model="show" :showCancelButton="true" title="请设置开泵时间" @confirm="modalconfirm" @cancel="modalcancel">
  124. <view class="slot-content">
  125. <u-input v-model="timevalue" type="number" style="width: 80%;"/>
  126. <p style="font-size: 12px;">分钟</p>
  127. </view>
  128. </u-modal>
  129. <u-modal v-model="showremark" :showCancelButton="true" title="请填写设备备注" @confirm="modalconfirmremark"
  130. @cancel="modalcancelremark">
  131. <view class="slot-contentremark">
  132. <u-input v-model="timevalueremark" maxlength="12" />
  133. </view>
  134. </u-modal>
  135. <view class="top">
  136. <view class="backtop" @click="top" v-if="isTop">
  137. <image src="../../static/images/1.png" mode="" class="img0"></image>
  138. </view>
  139. </view>
  140. </view>
  141. </template>
  142. <script>
  143. import {
  144. Debounce
  145. } from "../../util/anitthro.js"
  146. export default {
  147. data() {
  148. return {
  149. page: 1,
  150. size: 10,
  151. eqlistdata: [],
  152. isTop: false,
  153. filtrateTF: false,
  154. device_status: "",
  155. width: 0, //顶部搜索栏宽度
  156. imports: "", //搜索设备id
  157. loadingtf: false,
  158. equipArr: [{
  159. name: '机井水电双控',
  160. type: 17, //5 环境监测 15 管式墒情
  161. list: [],
  162. pageIndex: 1,
  163. tf: false,
  164. }, {
  165. name: '水肥一体化(L)',
  166. type: 18, //5 环境监测 15 管式墒情
  167. list: [],
  168. pageIndex: 1,
  169. tf: false,
  170. }, {
  171. name: '水肥一体化(X)',
  172. type: 13, //5 环境监测 15 管式墒情
  173. list: [],
  174. pageIndex: 1,
  175. tf: false,
  176. }, {
  177. name: '水肥一体化',
  178. type: 'xph', //5 环境监测 15 管式墒情
  179. list: [],
  180. pageIndex: 1,
  181. tf: false,
  182. }],
  183. active: 0, //tab选中的下标
  184. side_type: 17, //当前选中的设备类型
  185. show: false,
  186. timevalue: "",
  187. selindex: "", //选中的设备index
  188. selid: "", //选中的设备id
  189. showremark: false,
  190. timevalueremark: "",
  191. key: true
  192. }
  193. },
  194. methods: {
  195. async xphlist() {
  196. this.loadingtf = true
  197. const res = await this.$myRequest({
  198. url: '/api/api_gateway?method=xphsp.views.all_devices',
  199. data: {
  200. page: this.page,
  201. page_size: "10",
  202. device_id: this.imports,
  203. }
  204. })
  205. this.loadingtf = false
  206. this.eqlistdata = this.eqlistdata.concat(res.data)
  207. console.log(this.eqlistdata)
  208. },
  209. async eqlist() { //设备列表 水肥一体化 L
  210. this.loadingtf = true
  211. const res = await this.$myRequest({
  212. url: '/api/api_gateway?method=irrigation_system.waterfertilizer.water_fertilizer_list',
  213. data: {
  214. page: this.page,
  215. page_size: 10,
  216. content: this.imports
  217. }
  218. })
  219. console.log(res)
  220. this.loadingtf = false
  221. for (var i = 0; i < res.data.length; i++) {
  222. res.data[i]["status2"] = res.data[i].status == 1 ? true : false
  223. }
  224. this.eqlistdata = this.eqlistdata.concat(res.data)
  225. },
  226. async tubulareqlist() { //水电双计
  227. this.loadingtf = true
  228. const res = await this.$myRequest({
  229. url: '/api/api_gateway?method=irrigation_system.hydropower.hydropower_list',
  230. data: {
  231. page: this.page,
  232. page_size: 10,
  233. content: this.imports
  234. }
  235. })
  236. console.log(res)
  237. this.loadingtf = false
  238. for (var i = 0; i < res.data.length; i++) {
  239. res.data[i]["water_pump_switch2"] = res.data[i].water_pump_switch == 1 ? true : false
  240. }
  241. this.eqlistdata = this.eqlistdata.concat(res.data)
  242. console.log(this.eqlistdata)
  243. },
  244. async sfeqlist() { //设备列表
  245. this.loadingtf = true
  246. const res = await this.$myRequest({
  247. url: '/api/api_gateway?method=weather.weather.sf_page',
  248. data: {
  249. page: this.page,
  250. page_size: "10",
  251. device_id: this.imports,
  252. }
  253. })
  254. this.loadingtf = false
  255. this.eqlistdata = this.eqlistdata.concat(res.ids)
  256. console.log(this.eqlistdata)
  257. },
  258. clickRight() {
  259. this.width = 600
  260. },
  261. clickLeft() {
  262. uni.switchTab({
  263. url: "../index/index"
  264. })
  265. },
  266. eqdetails(data, index) {
  267. if (this.side_type == 13) {
  268. uni.navigateTo({
  269. url: "../waterandfer/datails?shebei=" + JSON.stringify(data)
  270. })
  271. } else if(this.side_type == 'xph') {
  272. uni.navigateTo({
  273. url: "../waterandfernew/details?shebei=" + JSON.stringify(this.eqlistdata[index])
  274. })
  275. }
  276. },
  277. top() {
  278. uni.pageScrollTo({
  279. scrollTop: 0,
  280. duration: 500
  281. })
  282. },
  283. search() { //搜索按钮搜索
  284. // this.searchinp()
  285. console.log(111)
  286. uni.navigateTo({
  287. url:"./search?side_type="+this.side_type
  288. })
  289. },
  290. searchinp() { //自动搜索
  291. Debounce(() => {
  292. this.page = 1
  293. this.eqlistdata = []
  294. if (this.side_type == 18) {
  295. this.eqlist()
  296. } else if (this.side_type == 17) {
  297. this.tubulareqlist()
  298. } else if (this.side_type == 13) {
  299. this.sfeqlist()
  300. } else if (this.side_type == 'xph') {
  301. this.xphlist()
  302. }
  303. }, 1000)()
  304. },
  305. tabClick(index, type) {
  306. this.active = index
  307. this.side_type = type
  308. this.page = 1
  309. if (type == 18) {
  310. this.eqlistdata = []
  311. this.eqlist()
  312. } else if (type == 17) {
  313. this.eqlistdata = []
  314. this.tubulareqlist()
  315. } else if (type == 13) {
  316. this.eqlistdata = []
  317. this.sfeqlist()
  318. } else if (type == 'xph') {
  319. this.eqlistdata = []
  320. this.xphlist()
  321. }
  322. },
  323. timezhuan(time) {
  324. function fun(a) {
  325. return String(a).length == 1 ? '0' + a : a
  326. }
  327. let date = new Date(time * 1000)
  328. let y = date.getFullYear()
  329. let m = date.getMonth() + 1
  330. let d = date.getDate()
  331. let h = date.getHours()
  332. let min = date.getMinutes()
  333. let sec = date.getSeconds()
  334. return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`
  335. },
  336. newdata(item) {
  337. if (this.side_type == 17) {
  338. uni.navigateTo({
  339. url: "realtimedata?item=" + JSON.stringify(item)
  340. })
  341. } else {
  342. uni.navigateTo({
  343. url: "weathdata?item=" + JSON.stringify(item)
  344. })
  345. }
  346. },
  347. selectaddress(city, name) { //获取分布位置
  348. uni.request({
  349. type: "GET",
  350. url: "https://restapi.amap.com/v3/geocode/geo?address=" + city +
  351. "&key=78ce288400f4fc6d9458989875c833c2",
  352. dataType: "json",
  353. complete: ress => {
  354. console.log(ress)
  355. if (ress.data.status == 1) {
  356. // ress.data.geocodes[0].location
  357. uni.navigateTo({
  358. url: "./irrmap?lnglat=" + ress.data.geocodes[0].location +
  359. "&basename=" + name
  360. })
  361. } else {
  362. uni.showToast({
  363. title: "地址编译失败",
  364. icon: "none"
  365. })
  366. }
  367. }
  368. });
  369. },
  370. async pumpcontrol(en) { //水肥开关
  371. console.log(en)
  372. const res = await this.$myRequest({
  373. url: '/api/api_gateway?method=irrigation_system.hydropower.water_pump_control',
  374. data: {
  375. times: Math.floor(this.timevalue * 60),
  376. device_id: this.selid,
  377. status: en ? 1 : 0
  378. }
  379. })
  380. console.log(res)
  381. if (res.code == 200) {
  382. uni.showToast({
  383. title: "操作成功",
  384. icon: "none"
  385. })
  386. } else {
  387. uni.showToast({
  388. title: res.msg,
  389. icon: "none"
  390. })
  391. this.eqlistdata[this.selindex].water_pump_switch2 = !this.eqlistdata[this.selindex]
  392. .water_pump_switch2
  393. }
  394. this.timevalue = ""
  395. },
  396. switchchange(e, id, index) { //水肥 开关
  397. // console.log(e.detail.value)
  398. // console.log(this.eqlistdata[index].water_pump_switch2)
  399. this.eqlistdata[index].water_pump_switch2 = e.detail.value
  400. if (e.detail.value) {
  401. this.show = true
  402. this.selindex = index
  403. this.selid = id
  404. } else {
  405. this.selid = id
  406. this.pumpcontrol(false)
  407. }
  408. },
  409. async switchchange2(e, id, index) { //水电开关
  410. console.log(id)
  411. const res = await this.$myRequest({
  412. url: '/api/api_gateway?method=irrigation_system.waterfertilizer.water_fertilizer_control',
  413. data: {
  414. device_ids: id,
  415. isopen: e ? 1 : 0
  416. }
  417. })
  418. console.log(res)
  419. if (res.info == "ok") {
  420. uni.showToast({
  421. title: "操作成功",
  422. icon: "none"
  423. })
  424. } else {
  425. uni.showToast({
  426. title: res.msg,
  427. icon: "none"
  428. })
  429. this.eqlistdata[index].status2 = !this.eqlistdata[index].status2
  430. }
  431. },
  432. modalcancel() { //水肥开关 确定
  433. this.eqlistdata[this.selindex].water_pump_switch2 = !this.eqlistdata[this.selindex].water_pump_switch2
  434. this.timevalue = ""
  435. },
  436. modalconfirm() { //水肥开关 取消
  437. this.show = true
  438. if (this.timevalue == "") {
  439. uni.showToast({
  440. title: "请输入开泵时间",
  441. icon: "none"
  442. })
  443. } else {
  444. this.show = false
  445. this.pumpcontrol(true)
  446. }
  447. },
  448. changeremark(item, index) { //修改备注
  449. this.timevalueremark = item.device_notes
  450. this.showremark = true
  451. this.selindex = index
  452. this.selid = item.device_id
  453. },
  454. modalcancelremark() { //修改备注 取消
  455. },
  456. modalconfirmremark() { //修改备注 确定
  457. this.showremark = true
  458. if (this.timevalueremark == "") {
  459. uni.showToast({
  460. title: "请输入设备备注",
  461. icon: "none"
  462. })
  463. } else {
  464. this.showremark = false
  465. this.setchangeremark()
  466. }
  467. },
  468. async setchangeremark() { //水肥开关
  469. const res = await this.$myRequest({
  470. url: '/api/api_gateway?method=irrigation_system.hydropower.water_pump_modify_device_notes',
  471. data: {
  472. device_id: this.selid,
  473. content: this.timevalueremark
  474. }
  475. })
  476. console.log(res)
  477. if (res) {
  478. uni.showToast({
  479. title: "操作成功",
  480. icon: "none"
  481. })
  482. this.eqlistdata[this.selindex].device_notes = this.timevalueremark
  483. }
  484. },
  485. },
  486. onLoad() {
  487. // this.tubulareqlist()
  488. uni.getStorage({
  489. key: "jurisdiction",
  490. success: (res) => {
  491. let items = JSON.parse(res.data).filter((item) => {
  492. return item.pur_id == 202
  493. })
  494. var itemarr = items[0].children
  495. console.log(itemarr)
  496. for (var i = 0; i < itemarr.length; i++) {
  497. switch (itemarr[i].pur_id) {
  498. case 203:
  499. this.equipArr[0].tf = true
  500. break
  501. case 204:
  502. this.equipArr[1].tf = true
  503. break
  504. case 195:
  505. this.equipArr[2].tf = true
  506. break;
  507. case 288:
  508. this.equipArr[3].tf = true
  509. break;
  510. }
  511. }
  512. for (var i = 0; i < this.equipArr.length; i++) {
  513. if (this.equipArr[i].tf) {
  514. if (i == 0) {
  515. this.tubulareqlist();
  516. } else if (i == 1) {
  517. this.eqlist();
  518. } else if (i == 2) {
  519. this.sfeqlist();
  520. } else {
  521. this.xphlist();
  522. }
  523. this.active = i
  524. this.side_type = this.equipArr[i].type
  525. break
  526. }
  527. }
  528. }
  529. })
  530. },
  531. onReachBottom() {
  532. this.page++
  533. // this.eqlist()
  534. if (this.side_type == 18) {
  535. this.eqlist()
  536. } else if (this.side_type == 17) {
  537. this.tubulareqlist()
  538. } else if (this.side_type == 13) {
  539. this.sfeqlist()
  540. } else if (this.side_type == 'xph') {
  541. this.xphlist()
  542. }
  543. },
  544. onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
  545. if (e.scrollTop > 200) { //距离大于200时显示
  546. this.isTop = true
  547. } else { //距离小于200时隐藏
  548. this.isTop = false
  549. }
  550. },
  551. }
  552. </script>
  553. <style lang="scss">
  554. page {
  555. background: $uni-bg-color-grey;
  556. }
  557. .bases_search {
  558. width: 60%;
  559. background-color: #FFFFFF;
  560. position: absolute;
  561. top: 10rpx;
  562. left: 50%;
  563. margin-left: -33%;
  564. .bases_search_text {
  565. width: 90%;
  566. margin: 0 auto;
  567. background-color: #F8F8F8;
  568. height: 60rpx;
  569. border-radius: 30rpx;
  570. display: flex;
  571. line-height: 60rpx;
  572. .search {
  573. padding: 0 20rpx;
  574. font-size: 34rpx;
  575. }
  576. input {
  577. width: 80%;
  578. margin-top: 10rpx;
  579. font-size: 28rpx;
  580. }
  581. }
  582. }
  583. .inputs {
  584. height: 54rpx;
  585. background-color: #E4E4E4;
  586. border-radius: 27rpx;
  587. position: absolute;
  588. right: 20rpx;
  589. top: 20rpx;
  590. transition: width 0.5s;
  591. overflow: hidden;
  592. padding-top: 8rpx;
  593. box-sizing: border-box;
  594. .inputbox {
  595. width: 85%;
  596. text-indent: 1rem;
  597. font-size: 26rpx;
  598. }
  599. .icon {
  600. position: absolute;
  601. top: 8rpx;
  602. right: 26rpx;
  603. }
  604. }
  605. /deep/.uni-icons {
  606. font-size: 40rpx !important;
  607. }
  608. .image {
  609. position: fixed;
  610. top: 84px;
  611. width: 100%;
  612. height: 160rpx;
  613. z-index: 555;
  614. }
  615. .loading {
  616. position: fixed;
  617. top: 440px;
  618. width: 95%;
  619. left: 2.5%;
  620. text-align: center;
  621. z-index: 9;
  622. .img {
  623. width: 300rpx;
  624. height: 40rpx;
  625. }
  626. }
  627. .tab-box {
  628. position: fixed;
  629. top: 164px;
  630. display: flex;
  631. justify-content: space-around;
  632. font-size: 24rpx;
  633. line-height: 80rpx;
  634. background-color: #FFFFFF;
  635. width: 100%;
  636. z-index: 2;
  637. .tab-item {
  638. cursor: pointer;
  639. position: relative;
  640. }
  641. ;
  642. .tab-item.active {
  643. .bottom-line {
  644. bottom: 0;
  645. position: absolute;
  646. display: inline-block;
  647. width: 90rpx;
  648. height: 6rpx;
  649. left: 0;
  650. right: 0;
  651. margin: auto;
  652. background: $uni-color-success;
  653. }
  654. }
  655. }
  656. .prevents {
  657. width: 100%;
  658. position: absolute;
  659. top: 180px;
  660. .prevents_item {
  661. width: 95%;
  662. margin: 0 auto 30rpx;
  663. border-radius: 10rpx;
  664. box-shadow: 0 0 10rpx #bcb9ca;
  665. padding: 20rpx 40rpx 20rpx 80rpx;
  666. box-sizing: border-box;
  667. position: relative;
  668. background-color: #fff;
  669. .prevents_item_img {
  670. width: 30rpx;
  671. height: 50rpx;
  672. position: absolute;
  673. top: -4rpx;
  674. left: 30rpx;
  675. }
  676. .prevents_item_top {
  677. display: flex;
  678. justify-content: space-between;
  679. height: 60rpx;
  680. border-bottom: 2rpx solid #F4F4F4;
  681. line-height: 60rpx;
  682. font-size: 26rpx;
  683. .red {
  684. color: #ff0000;
  685. }
  686. .green {
  687. color: #7DBB91;
  688. }
  689. }
  690. .prevents_item_bot {
  691. margin-top: 20rpx;
  692. font-size: 26rpx;
  693. color: #BDBDBD;
  694. .prevents_item_bot_item {
  695. height: 60rpx;
  696. line-height: 60rpx;
  697. display: flex;
  698. justify-content: space-between;
  699. color: #909696;
  700. p:first-child {
  701. width: 80%;
  702. overflow: hidden; //溢出隐藏
  703. white-space: nowrap; //禁止换行
  704. text-overflow: ellipsis; //...
  705. }
  706. p:nth-child(2) {
  707. height: 45rpx;
  708. color: #00B075;
  709. border-bottom: 1px solid #00B075;
  710. }
  711. }
  712. .prevents_item_bot_sapn0 {
  713. color: #00B075;
  714. }
  715. .prevents_item_bot_sapn1 {
  716. color: #FF4747;
  717. }
  718. .prevents_item_bot_sapn2 {
  719. color: #FFAB00;
  720. }
  721. }
  722. }
  723. }
  724. .top {
  725. position: fixed;
  726. right: 10px;
  727. bottom: 40px;
  728. z-index: 100;
  729. image {
  730. width: 100rpx;
  731. height: 100rpx;
  732. }
  733. .backtop {
  734. display: flex;
  735. justify-content: flex-end;
  736. margin-bottom: 10rpx;
  737. }
  738. .more {
  739. display: flex;
  740. }
  741. .box {
  742. width: 80rpx;
  743. height: 80rpx;
  744. background-color: rgba(161, 161, 161, 0.45);
  745. border-radius: 50%;
  746. text-align: center;
  747. line-height: 80rpx;
  748. box-sizing: border-box;
  749. margin: 14rpx 10rpx 0 0;
  750. color: #fff;
  751. }
  752. }
  753. .slot-content {
  754. width: 60%;
  755. margin: 30rpx auto;
  756. display: flex;
  757. line-height: 70rpx;
  758. }
  759. .slot-contentremark {
  760. width: 70%;
  761. margin: 30rpx auto;
  762. display: flex;
  763. line-height: 70rpx;
  764. }
  765. </style>