index.vue 23 KB

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