index.vue 21 KB

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