electronicMonitoringWater.vue 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681
  1. <template>
  2. <view>
  3. <view class="background"
  4. :class="{
  5. backgroundref:ref
  6. }"
  7. >
  8. <!-- 日期选择器 -->
  9. <u-picker-select title="日期选择" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index" :endYear="endYear"
  10. mode="time" :params="params" :noselect="false" @confirm="selector2confirm" @cancel="selector2cancel"
  11. @reset="selector2reset">
  12. </u-picker-select>
  13. <view class="navbar-c">
  14. <view class="back" @click="backDataMonitoringList">
  15. <u-icon name="arrow-left" color="#fff" size="36"></u-icon>
  16. </view>
  17. <view class="title">
  18. {{tabsFrom.title}}
  19. </view>
  20. </view>
  21. <!-- <u-navbar :title="tabsFrom.title" title-color="#101010">
  22. </u-navbar> -->
  23. </view>
  24. <!-- 设备选择器 -->
  25. <u-select title="设备选择" v-model="tabsFrom.show1" :list="tabsFrom.selector1"
  26. @confirm="selector1confirm" cancel-text="重置" @cancel="selector1cancel">
  27. </u-select>
  28. <!-- 用电量 -->
  29. <view class="electricity-consumption" >
  30. <!-- 统计 -->
  31. <view class="statistics-content">
  32. <!-- @click="gotoUrl('/pages/equipmentDataMonitoring/electricityConsumptionDetail?id='
  33. +FormData.meterId+'&name='+tabsFrom.title+'&type='+FormData.type)"
  34. -->
  35. <view class="statistics-item"
  36. >
  37. <view class="item-title">
  38. <image class="img" src="@/assets/img/meterStatistics@3x.png"></image>统计用水量 (m³)
  39. </view>
  40. <view class="item-value">
  41. <text>{{electricity}}</text>
  42. <u-icon name="arrow-right" v-if="0"
  43. color="#cccccc" size="24" ></u-icon>
  44. </view>
  45. </view>
  46. <view class="statistics-item" >
  47. <view class="item-title item-title2">
  48. <image class="img" src="@/assets/img/electricityStatistics@3x.png"></image>水费统计(元)
  49. </view>
  50. <view class="item-value">
  51. {{fee}}
  52. </view>
  53. </view>
  54. </view>
  55. <view class="radio">
  56. <u-radio-group v-model="value" @change="radioGroupChange">
  57. <u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.id"
  58. :disabled="item.disabled">
  59. {{item.name}}
  60. </u-radio>
  61. </u-radio-group>
  62. </view>
  63. </view>
  64. <!-- 远程控制电源开关 -->
  65. <view class="control"
  66. v-if="codes&&codes.indexOf('switch')!=-1&&(meterDetail.type!=6)&&meterDetail.allowSwitch">
  67. <!-- @click="gotoUrl('/pages/tenantList/switchDetail?id='+meterDetail.id)" -->
  68. <view class="text">
  69. 智能监控用水
  70. <u-icon name="arrow-right" v-if="false" color="#cccccc" size="24" ></u-icon>
  71. </view>
  72. <view class="icon" >
  73. <!-- <span>关</span>
  74. <u-switch size="32" @change="switchBtnApi(meterDetail,$event)"
  75. v-model="meterDetail.switchStatus" inactive-color="#ff9900" ></u-switch >
  76. <span>开</span> -->
  77. <u-switch-jp size="42"
  78. :obj="{
  79. width: '4em',
  80. transform:'translateX(300%)',
  81. sz:['已关闭','已开启'],
  82. fontSize:'32rpx'
  83. }"
  84. @change="switchBtnApi(meterDetail,$event)"
  85. v-model="meterDetail.switchStatus" inactive-color="#ff9900" ></u-switch-jp >
  86. </view>
  87. </view>
  88. <!-- 各时段用电量 -->
  89. <view class="electricity-chart" >
  90. <view class="title">
  91. <view class="icon">
  92. </view>
  93. <view class="text">
  94. 各时段用水量 (m³)
  95. </view>
  96. <view class="more" @click="tabsFrom.show2=true,params.day=true">
  97. {{queryDay}}<u-icon name="arrow-down" color="#bbbbbb"></u-icon>
  98. </view>
  99. </view>
  100. <view class="content"
  101. style="display: flex;justify-content: center;margin: 40px 0;"
  102. v-if="hourMap==null">
  103. <div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
  104. <i class="uni-icon_toast uni-loading"
  105. style="
  106. width: 80rpx;
  107. height: 80rpx;
  108. "
  109. ></i><p class="uni-toast__content"> </p>加载中...</div>
  110. </view>
  111. <view class="chart">
  112. <view id="barEcharts" style="min-height:440rpx;">
  113. </view>
  114. </view>
  115. <view class="total" >
  116. <view class="total-item">
  117. 当日用水量合计:{{sumQuantity}} m³
  118. </view>
  119. <view class="total-item" v-if="meterDetail&&meterDetail.price">
  120. 当日水费合计:{{(sumQuantity*meterDetail.price).toFixed(2)}}元
  121. </view>
  122. </view>
  123. </view>
  124. <!-- 异常告警 -->
  125. <!-- 数据分析 -->
  126. <view class="data-analysis" >
  127. <view class="title">
  128. <view class="icon">
  129. </view>
  130. <view class="text">
  131. 数据分析
  132. </view>
  133. </view>
  134. <view class="grid">
  135. <u-grid :col="3" :border="false">
  136. <u-grid-item @click="gotoInfo('chartYoYwater','','')">
  137. <view class="icon icon7">
  138. <image class="img" src="@/assets/img/Image@7.png" mode=""></image>
  139. </view>
  140. <view class="grid-text">同比分析</view>
  141. </u-grid-item>
  142. <u-grid-item @click="gotoInfo('chartMoMwater','','')">
  143. <view class="icon icon8">
  144. <image class="img" src="@/assets/img/Image@8.png" mode=""></image>
  145. </view>
  146. <view class="grid-text">环比分析</view>
  147. </u-grid-item>
  148. <u-grid-item @click="gotoUrl('/pages/equipmentDataMonitoring/electricityStatisticsWater?id='+meterId)">
  149. <view class="icon icon9">
  150. <image class="img" src="@/assets/img/Image@9.svg" mode=""></image>
  151. </view>
  152. <view class="grid-text">用水统计</view>
  153. </u-grid-item>
  154. </u-grid>
  155. </view>
  156. </view>
  157. <view class="equipment-information" >
  158. <view class="title">
  159. <view class="icon">
  160. </view>
  161. <view class="text">
  162. 设备信息
  163. </view>
  164. <view class="more" @click="equipmentInfosShow=true">
  165. 查看全部<u-icon name="arrow-right" size="24" color="#d4d4d4"></u-icon>
  166. </view>
  167. </view>
  168. <view class="infos">
  169. <view class="item" style="width: 40%;" v-if="dtuInfo&&dtuInfo.id">
  170. <view class="item-title">
  171. 通讯模块
  172. </view>
  173. <view class="item-value">
  174. {{dtuInfo.name}}
  175. </view>
  176. </view>
  177. <view class="item" style="width: 20%;" v-else >
  178. <view class="item-title">
  179. 使用单位
  180. </view>
  181. <view class="item-value">
  182. {{meterDetail.customer}}
  183. </view>
  184. </view>
  185. <view class="border">
  186. </view>
  187. <view class="item" style="width: 40%;">
  188. <view class="item-title">
  189. 设备编号
  190. </view>
  191. <view class="item-value">
  192. {{meterDetail.deviceNo}}
  193. </view>
  194. </view>
  195. <view class="border">
  196. </view>
  197. <view class="item" style="width: 30%;">
  198. <view class="item-title">
  199. 水价
  200. </view>
  201. <view class="item-value">
  202. {{meterDetail.price}}吨/元
  203. </view>
  204. </view>
  205. </view>
  206. </view>
  207. <!-- 设备信息弹窗 -->
  208. <view class="equipment-popup">
  209. <u-popup v-model="equipmentInfosShow" mode="bottom" border-radius="12">
  210. <view class="content">
  211. <view class="headline">
  212. 设备信息
  213. </view>
  214. <view class="infos">
  215. <view class="item">
  216. <view class="item-title">
  217. 设备名称
  218. </view>
  219. <view class="item-value">
  220. {{meterDetail.name}}
  221. </view>
  222. </view>
  223. <view class="item" v-if="false">
  224. <view class="item-title">
  225. 设备类型
  226. </view>
  227. <view class="item-value">
  228. {{meterDetail.deviceTypeN}}
  229. </view>
  230. </view>
  231. <view class="item">
  232. <view class="item-title">
  233. 设备编号
  234. </view>
  235. <view class="item-value">
  236. {{meterDetail.deviceNo}}
  237. </view>
  238. </view>
  239. <view class="item">
  240. <view class="item-title">
  241. 产权单位
  242. </view>
  243. <view class="item-value">
  244. {{meterDetail.companyFullName}}
  245. </view>
  246. </view>
  247. <view class="item" @click="toMeterLocation">
  248. <view class="item-title">
  249. 设备地址
  250. </view>
  251. <view class="item-value">
  252. <span>{{meterDetail.installationAddress}}</span>
  253. <image class="img" v-if="0"
  254. src="@/assets/img/riFill-navigation-fill 1.svg"></image>
  255. </view>
  256. </view>
  257. <view class="item">
  258. <view class="item-title">
  259. 地址简称
  260. </view>
  261. <view class="item-value">
  262. {{meterDetail.installationAddressSimple}}
  263. </view>
  264. </view>
  265. <view class="item">
  266. <view class="item-title">
  267. 使用单位
  268. </view>
  269. <view class="item-value">
  270. {{meterDetail.customer}}
  271. </view>
  272. </view>
  273. <view class="item">
  274. <view class="item-title">
  275. 水价
  276. </view>
  277. <view class="item-value">
  278. {{meterDetail.price}}吨/元
  279. </view>
  280. </view>
  281. <view class="item">
  282. <view class="item-title">
  283. 启用时间
  284. </view>
  285. <view class="item-value">
  286. {{meterDetail.enablingTime}}
  287. </view>
  288. </view>
  289. <view class="item" v-if="dtuInfo&&dtuInfo.id">
  290. <view class="item-title">
  291. 通讯模块
  292. </view>
  293. <view class="item-value">
  294. {{dtuInfo.name}} {{dtuInfo.imei}}({{meterDetail.address?meterDetail.address:'无'}})
  295. </view>
  296. </view>
  297. </view>
  298. <button class="get" @click="equipmentInfosShow=false">知道了</button>
  299. </view>
  300. </u-popup>
  301. </view>
  302. </view>
  303. </template>
  304. <script>
  305. import {
  306. parseUnixTime,
  307. beforeTimeStamp,
  308. getWeek
  309. } from '@/apis/utils'
  310. import * as echarts from 'echarts';
  311. import * as API_water from '@/apis/pagejs/water.js'
  312. import * as API from '@/apis/pagejs/index.js'
  313. import * as API_energyManage from '@/apis/pagejs/energyManage.js'
  314. import * as API_electricityMeter from '@/apis/pagejs/electricityMeter.js'
  315. // import * as WxJsApi from '@/apis/utils/wxJsApi.js'
  316. export default {
  317. data() {
  318. return {
  319. meterDetail: {}, //设备信息
  320. electricity: 0, //电量统计
  321. fee: 0, //电费统计
  322. abnormalRecordsList: [], //异常list
  323. companyId: '', //企业id
  324. meterId: '', //设备id
  325. titleName: '',
  326. clickType: -1,
  327. sumQuantity: 0,
  328. sumFee: 0,
  329. equipmentInfosShow: false,
  330. kWhList: [],
  331. queryDay: '',
  332. showTop: [0, 0, 0, 0, 0, 0, 0, 0],
  333. FormData: {
  334. queryDate: '',
  335. meterId: '',
  336. type: 0
  337. },
  338. codes:"",
  339. FormData2: {
  340. queryDate: '',
  341. meterId: ''
  342. },
  343. myChart: null,
  344. endYear: '',
  345. equipmentShow: false,
  346. multiSelector: [],
  347. equipmentList: [],
  348. params: {
  349. year: true,
  350. month: true,
  351. day: true,
  352. hour: false,
  353. minute: false,
  354. second: false
  355. },
  356. tabsFrom: {
  357. show1: false,
  358. show1Index: 0,
  359. show2Index: '',
  360. show2: false,
  361. show1Text: "全部类型",
  362. show2Text: "全部时间",
  363. selector1: [{
  364. label: '全部类型',
  365. value: '',
  366. },
  367. {
  368. label: '线上充值',
  369. value: '1',
  370. },
  371. {
  372. label: '线下充值',
  373. value: '2',
  374. },
  375. ]
  376. },
  377. background: {
  378. backgroundColor: '#1677FF',
  379. },
  380. list: [{
  381. id: 1,
  382. name: '本月',
  383. disabled: false
  384. }, {
  385. id: 4,
  386. name: '今日',
  387. disabled: false
  388. }, {
  389. id: 2,
  390. name: '上月',
  391. disabled: false
  392. }, {
  393. id: 3,
  394. name: '本年',
  395. disabled: false
  396. }, {
  397. id: 0,
  398. name: '合计',
  399. disabled: false
  400. }, {
  401. id: 10,
  402. name: '指定月份',
  403. disabled: false
  404. }],
  405. value: '4',
  406. intervalId: null, // 用于存储间隔ID
  407. intervalReady: true, // 用于存储间隔ID
  408. ref:false,
  409. dtuInfo:{},
  410. hourMap:null,
  411. };
  412. },
  413. onLoad(op) {
  414. this.init(op)
  415. },
  416. onReady() {
  417. // WxJsApi.getWxConfig(['getLocation', 'openLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  418. // // //(res)
  419. // }).catch(error => {
  420. // //(res)
  421. // })
  422. },
  423. beforeDestroy() {
  424. this.clearTimer(); // 组件销毁前清除定时器
  425. this.intervalReady = false;
  426. //console.log("组件销毁前清除定时器")
  427. },
  428. methods: {
  429. init(op){
  430. if (op.id) {
  431. this.ref=op.ref;
  432. this.FormData.meterId = op.id;
  433. this.FormData2.meterId = op.id;
  434. this.tabsFrom.title = this.replaceLastTwoWords(op.name);
  435. this.meterId = op.id;
  436. this.titleName = this.replaceLastTwoWords(op.name);
  437. this.companyId = op.companyId;
  438. }
  439. this.endYear = new Date().getFullYear();
  440. this.FormData.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  441. this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  442. this.FormData.type = 4;
  443. this.getElectricityStatistics();
  444. this.getTimeSlotStatistics();
  445. //this.getCompanyInfoList();
  446. //this.getAbnormalAlarmRecord();
  447. this.getMeterDetails(this.meterId);
  448. },
  449. switchBtnApiMethod(node,key){
  450. uni.showLoading({
  451. title: "加载中",
  452. mask: true,
  453. })
  454. API_water.remoteSwitch({
  455. meterId:node.id,
  456. enabled:key
  457. }).then((res) => {
  458. uni.hideLoading();
  459. node.switchStatus=key
  460. }).catch(error => {
  461. uni.showToast({
  462. title: error,
  463. icon: "none"
  464. })
  465. })
  466. },
  467. switchBtnApi(node,key){
  468. uni.showModal({
  469. confirmColor:`${key?'#3CC51F':'red'}`,
  470. confirmText:`${key?'开启':'关闭'}`,
  471. content: `确认是否要"${key?'开启':'关闭'}"${this.replaceLastTwoWords(node.name)}`,
  472. title: "提示",
  473. success:res=> {
  474. if(res.confirm){
  475. this.switchBtnApiMethod(node,key);
  476. }else{
  477. node.switchStatus=!key
  478. }
  479. }
  480. })
  481. console.log(node,key)
  482. },
  483. toMeterLocation() {
  484. // WxJsApi.openLocation({
  485. // latitude: parseFloat(this.meterDetail.latitude), //目的地latitude
  486. // longitude: parseFloat(this.meterDetail.longitude), //目的地longitude
  487. // name: this.meterDetail.name,
  488. // address: this.meterDetail.installationAddress,
  489. // scale: 15, //地图缩放大小,可根据情况具体调整
  490. // success(res) {
  491. // uni.hideLoading()
  492. // },
  493. // complete() {
  494. // // uni.hideLoading()
  495. // }
  496. // });
  497. },
  498. getMeterDetails(meterId) {
  499. uni.showLoading({
  500. title: "加载中",
  501. mask: true,
  502. })
  503. API_water.meterDetails({
  504. meterId: meterId
  505. }).then((res) => {
  506. uni.hideLoading();
  507. this.meterDetail = res.data.meter;
  508. this.dtuInfo = res.data.dtuInfo;
  509. this.meterDetail.name=this.replaceLastTwoWords(this.meterDetail.name)
  510. this.codes =this.carhelp.getPersonInfo().codes;
  511. }).catch(error => {
  512. uni.showToast({
  513. title: error,
  514. icon: "none"
  515. })
  516. })
  517. },
  518. clearTimer() {
  519. if (this.intervalId) {
  520. clearInterval(this.intervalId); // 清除定时器
  521. this.intervalId = null; // 重置定时器ID
  522. }
  523. },
  524. startInterval() {
  525. return
  526. this.clearTimer(); // 组件销毁前清除定时器
  527. this.intervalId = setInterval(() => {
  528. // 每隔5秒运行的代码
  529. // console.log('这段代码每隔5秒运行一次');
  530. this.getElectricityStatistics(true)
  531. this.getTimeSlotStatistics(true)
  532. }, 60000);
  533. },
  534. gotoInfo(path, type, name) {
  535. if (!this.FormData.meterId) {
  536. uni.showToast({
  537. title: "未查询到水表",
  538. icon: "none"
  539. })
  540. return
  541. }
  542. uni.navigateTo({
  543. url: "/pages/equipmentDataMonitoring/" + path + "?id=" + this.FormData.meterId + "&type=" + type +
  544. "&typeName=" + name+"&title="+this.tabsFrom.title
  545. })
  546. },
  547. // 异常告警记录
  548. getAbnormalAlarmRecord() {
  549. var queryDate = parseUnixTime(new Date(), '{y}-{m}');
  550. uni.showLoading({
  551. title: "加载中",
  552. mask: true,
  553. })
  554. API.alarmRecord({
  555. queryDate: queryDate,
  556. configId: '',
  557. pageIndex: 1,
  558. pageSize: 2,
  559. companyId: this.companyId,
  560. meterId: this.meterId
  561. }).then((res) => {
  562. uni.hideLoading();
  563. this.abnormalRecordsList = res.data.data;
  564. }).catch(error => {
  565. uni.showToast({
  566. title: error,
  567. icon: "none"
  568. })
  569. })
  570. },
  571. titleCk() {
  572. if(this.tabsFrom.selector1.length){
  573. this.tabsFrom.show1 = true
  574. }
  575. },
  576. selector1confirm(e) {
  577. console.log(e)
  578. // var index = e[2];
  579. // this.tabsFrom.show1Index = index;
  580. if (e[2].value != null) {
  581. this.tabsFrom.show1Text = e[2].label;
  582. this.tabsFrom.title = e[2].label;
  583. this.FormData.meterId = e[2].value;
  584. this.FormData.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  585. this.FormData2.meterId = e[2].value;
  586. this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  587. //this.meterId =e[2].value;
  588. this.FormData.type = 4;
  589. this.value = '4';
  590. this.getTimeSlotStatistics();
  591. this.getElectricityStatistics();
  592. this.getMeterDetails(e[2].value);
  593. }
  594. },
  595. selector1cancel() {
  596. this.tabsFrom.show1Text = this.titleName;
  597. this.tabsFrom.title = this.titleName;
  598. this.FormData.meterId = this.meterId;
  599. this.FormData.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  600. this.FormData2.meterId = this.meterId;
  601. this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  602. this.FormData.type = 4;
  603. this.value = '4';
  604. this.getTimeSlotStatistics();
  605. this.getElectricityStatistics();
  606. this.getMeterDetails(this.meterId);
  607. },
  608. queryDate(queryTime, day) {
  609. if (day) {
  610. this.FormData2.queryDate = queryTime;
  611. //this.FormData2.type =day?"9":"10"
  612. //this.value="-1"
  613. this.getTimeSlotStatistics();
  614. } else {
  615. this.FormData.queryDate = queryTime + "-01";
  616. this.FormData.type = 10;
  617. this.value = "10";
  618. this.list[5].name = queryTime;
  619. this.getElectricityStatistics();
  620. }
  621. },
  622. getCompanyInfoList() {
  623. },
  624. getTimeSlotStatistics(interval) {
  625. if (!interval) {
  626. uni.showLoading({
  627. title: "加载中",
  628. mask: true,
  629. })
  630. }
  631. this.queryDay = parseUnixTime(new Date(this.FormData2.queryDate), '{y}年{m}月{d}日');
  632. API_water.timeSlotStatistics(this.FormData2).then((response) => {
  633. if (!interval) {
  634. uni.hideLoading();
  635. }
  636. this.hourMap = response.data.hourMap;
  637. this.sumQuantity = response.data.consumptionMap.consumption;
  638. this.getBarCharts(this.hourMap, interval);
  639. if (!interval) {
  640. this.startInterval(); // 组件挂载后开始间隔
  641. }
  642. }).catch(error => {
  643. uni.showToast({
  644. title: error,
  645. icon: "none"
  646. })
  647. })
  648. },
  649. getElectricityStatistics(interval) {
  650. if (!interval) {
  651. uni.showLoading({
  652. title: "加载中",
  653. mask: true,
  654. })
  655. }
  656. var obj = {
  657. ...this.FormData
  658. }
  659. if (obj.type != 10) {
  660. this.list[5].name = '指定月份';
  661. }
  662. // if(obj.type==10){
  663. // obj.queryDate+="-01"
  664. // }
  665. API_water.waterQuantityStatistics(obj).then((response) => {
  666. if (!interval) {
  667. uni.hideLoading();
  668. }
  669. this.showTop = [0, 0, 0, 0, 0, 0, 0, 0]
  670. var electricity = response.data.consumptionMap.consumption + "";
  671. this.electricity = response.data.consumptionMap.consumption;
  672. this.fee = response.data.amount;
  673. if (electricity) {
  674. var sz = electricity.split(".")
  675. var str1 = sz[0];
  676. var str2 = [];
  677. if (sz.length > 1) {
  678. str2 = sz[1];
  679. this.showTop[7] = str2[0];
  680. }
  681. var j = 0;
  682. for (var i in str1) {
  683. if (i != undefined) {
  684. this.showTop[6 - str1.length + j + 1] = str1[i]
  685. }
  686. j++;
  687. }
  688. this.$forceUpdate()
  689. }
  690. if (!interval) {
  691. this.startInterval(); // 组件挂载后开始间隔
  692. }
  693. }).catch(error => {
  694. uni.showToast({
  695. title: error,
  696. icon: "none"
  697. })
  698. })
  699. },
  700. getBarCharts(list, interval) {
  701. if (!this.myChart) {
  702. this.myChart = echarts.init(document.getElementById('barEcharts'), null, {
  703. // width: uni.upx2px(700),
  704. height: uni.upx2px(480)
  705. });
  706. }
  707. if (!interval) {
  708. this.myChart.clear();
  709. }
  710. var data1 = [];
  711. var data2 = [];
  712. var data3 = [];
  713. // var sumQuantity=0
  714. for (var i in list) {
  715. data1.push(i)
  716. data2.push(list[i].consumption)
  717. data3.push(list[i].consumptionAverage)
  718. // sumQuantity+=list[i]
  719. }
  720. var axisLabel = {
  721. rotate: 40,
  722. interval: 0,
  723. textStyle: {
  724. color: "#333"
  725. }
  726. }
  727. if (data1.length < 4) {
  728. axisLabel = {
  729. interval: 0,
  730. textStyle: {
  731. color: "#333"
  732. },
  733. }
  734. }
  735. // this.sumQuantity = sumQuantity.toFixed(2);
  736. var headitemby = "";
  737. var showkey = "";
  738. var option = {
  739. tooltip: {
  740. trigger: 'axis',
  741. axisPointer: {
  742. type: 'shadow'
  743. },
  744. formatter: (value) => {
  745. var name = value[0].name;
  746. var obj=list[name]
  747. var text= `<p>${name}</p>`
  748. if(this.meterDetail.price){
  749. text += `<p>水价:`+this.meterDetail.price+`元/m³</p>`
  750. }
  751. if (obj.consumption != undefined) {
  752. text += `<p>用水量:${obj.consumption} m³</p>`
  753. text += `<p>平均水量:${obj.consumptionAverage} m³</p>`
  754. }
  755. if (obj.amount != undefined) {
  756. text += ` <p>水费:${obj.amount}元</p>`
  757. }
  758. return text
  759. }
  760. },
  761. legend: {
  762. },
  763. grid: {
  764. top: 60,
  765. left: 5,
  766. right: 10,
  767. bottom: 20,
  768. containLabel: true
  769. },
  770. xAxis: {
  771. type: 'category',
  772. data: data1,
  773. axisLabel: axisLabel,
  774. },
  775. yAxis: {
  776. type: 'value',
  777. },
  778. series: [{
  779. name: '用水量',
  780. data: data2,
  781. type: 'bar',
  782. barGap:"0%",
  783. label: {
  784. show: true,
  785. position: 'top',
  786. color: '#5C7BD9'
  787. }
  788. },
  789. {
  790. name: '平均用水量',
  791. data: data3,
  792. type: 'bar',
  793. label: {
  794. show: true,
  795. position: 'top',
  796. color: '#5C7BD9'
  797. }
  798. }
  799. ]
  800. }
  801. console.log(option)
  802. this.myChart.setOption(option);
  803. },
  804. selector2confirm(e) {
  805. this.tabsFrom.show2Text = e.year + "年" + e.month + "月"
  806. this.tabsFrom.show2Index = e.year + "-" + e.month
  807. if (e.day) {
  808. this.tabsFrom.show2Text += e.day + "日"
  809. this.tabsFrom.show2Index += '-' + e.day
  810. this.queryDate(this.tabsFrom.show2Index, true)
  811. } else {
  812. this.queryDate(this.tabsFrom.show2Index, false)
  813. }
  814. },
  815. selector2cancel() {
  816. if(this.clickType != -1) {
  817. }
  818. this.value = this.clickType;
  819. },
  820. selector2reset(e) {
  821. console.log(e)
  822. this.tabsFrom.show2Text = '全部时间'
  823. this.tabsFrom.show2Index = '';
  824. if (e.day) {
  825. this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  826. this.queryDay = parseUnixTime(new Date(this.FormData2.queryDate), '{y}年{m}月{d}日');
  827. this.getTimeSlotStatistics();
  828. } else {
  829. this.clickType="4"
  830. this.FormData.type = this.clickType;
  831. this.value = this.clickType;
  832. this.getElectricityStatistics();
  833. }
  834. },
  835. // 选中某个单选框时,由radio时触发
  836. radioChange(e) {
  837. console.log(`选择前的值: ${this.value}`);
  838. },
  839. // 选中任一radio时,由radio-group触发
  840. radioGroupChange(e) {
  841. console.log(e)
  842. this.clickType = this.FormData.type;
  843. this.FormData.type = e;
  844. if (e == 10) {
  845. this.tabsFrom.show2 = true;
  846. this.params.day = false;
  847. } else {
  848. this.list[5].name = '指定月份'
  849. this.getElectricityStatistics();
  850. }
  851. },
  852. backDataMonitoringList() {
  853. uni.navigateBack()
  854. },
  855. }
  856. };
  857. </script>
  858. <style lang="scss" scoped>
  859. /deep/.u-select__header__title {
  860. font-size: 36rpx;
  861. font-weight: bold;
  862. }
  863. .navbar-c {
  864. background-color: rgba(22, 119, 255, 1);
  865. position: fixed;
  866. top: 0;
  867. left: 0;
  868. right: 0;
  869. z-index: 999;
  870. .back {
  871. z-index: 999;
  872. width: 200rpx;
  873. }
  874. .title {
  875. color: #fff;
  876. display: flex;
  877. align-items: center;
  878. justify-content: center;
  879. }
  880. .right {
  881. .img {
  882. width: 48rpx;
  883. height: 48rpx;
  884. }
  885. }
  886. }
  887. .navbar-d {
  888. background-color: rgba(22, 119, 255, 1);
  889. position: relative;
  890. top: -240rpx;
  891. left: 0;
  892. right: 0;
  893. z-index: 999;
  894. .back {
  895. z-index: 999;
  896. width: 200rpx;
  897. }
  898. .title {
  899. font-size: 36rpx;
  900. color: #fff;
  901. display: flex;
  902. align-items: center;
  903. justify-content: center;
  904. }
  905. .right {
  906. .img {
  907. width: 48rpx;
  908. height: 48rpx;
  909. }
  910. }
  911. }
  912. // /deep/.uicon-nav-back {
  913. // color: #fff !important;
  914. // }
  915. .background {
  916. background-color: rgba(22, 119, 255, 1);
  917. padding-top: 88rpx;
  918. height: 300rpx;
  919. //padding-bottom: 100rpx;
  920. position: relative;
  921. /deep/.u-border-bottom:after {
  922. border: none;
  923. }
  924. .u-nav-slot {
  925. margin-right: 32rpx;
  926. .img {
  927. width: 48rpx;
  928. height: 48rpx;
  929. vertical-align: middle;
  930. }
  931. }
  932. }
  933. .background::after {
  934. content: '';
  935. position: absolute;
  936. bottom:-39rpx;
  937. width: 100%;
  938. height: 40rpx; /* 弧形的高度 */
  939. background-color: rgba(22, 119, 255, 1); /* 弧形的颜色 */
  940. border-radius: 50%; /* 创建圆形 */
  941. border-top-left-radius: 0;
  942. border-top-right-radius: 0;
  943. }
  944. .backgroundref{
  945. height: 220rpx;
  946. background-color: #f2f4f6;
  947. }
  948. .backgroundref::after {
  949. background-color: #f2f4f6;
  950. }
  951. // // 日期
  952. .date-box {
  953. display: flex;
  954. align-items: center;
  955. justify-content: space-between;
  956. margin: 24rpx 32rpx;
  957. .item {
  958. border-radius: 8px;
  959. background-color: rgba(255, 255, 255, 0.1);
  960. border: 1px solid rgba(255, 255, 255, 0.15);
  961. width: 120rpx;
  962. height: 120rpx;
  963. color: #fff;
  964. text-align: center;
  965. display: flex;
  966. flex-direction: column;
  967. justify-content: center;
  968. .date {
  969. font-size: 40rpx;
  970. }
  971. }
  972. .item-today {
  973. background-color: rgba(255, 255, 255, 1);
  974. position: relative;
  975. .date {
  976. color: rgba(22, 119, 255, 1);
  977. }
  978. .week {
  979. color: rgba(16, 16, 16, 1);
  980. }
  981. .dot {
  982. width: 10rpx;
  983. height: 10rpx;
  984. background-color: rgba(255, 150, 0, 1);
  985. border-radius: 999px;
  986. position: absolute;
  987. bottom: -5rpx;
  988. left: 50%;
  989. transform: translateX(-50%);
  990. }
  991. }
  992. }
  993. // 用电量
  994. .electricity-consumption {
  995. background-color: #fff;
  996. padding: 32rpx 32rpx 0rpx;
  997. border-radius: 8px;
  998. margin: -188rpx 32rpx 0;
  999. position: relative;
  1000. border: 1px solid rgba(255,255,255,1);
  1001. background: linear-gradient(180deg, rgba(187,216,255,1) 0%,rgba(255,255,255,1) 63%);
  1002. // 统计
  1003. .statistics-content{
  1004. display: flex;
  1005. align-items: center;
  1006. justify-content: space-between;
  1007. .statistics-item{
  1008. width: 300rpx;
  1009. padding: 24rpx 0 24rpx 24rpx;
  1010. border-radius: 8px;
  1011. box-shadow: 0px 0px 8px 0px rgba(22,119,255,0.3);
  1012. background-color: #fff;
  1013. }
  1014. .item-title{
  1015. color: rgba(22,119,255,1);
  1016. font-size: 32rpx;
  1017. display: flex;
  1018. align-items: center;
  1019. font-weight: bold;
  1020. .img{
  1021. width: 32rpx;
  1022. height: 32rpx;
  1023. vertical-align: middle;
  1024. margin-right: 4rpx;
  1025. }
  1026. }
  1027. .item-title2{
  1028. color: rgba(129,97,255,1);
  1029. }
  1030. .item-value{
  1031. color: rgba(16,16,16,1);
  1032. font-size: 48rpx;
  1033. font-weight: bold;
  1034. margin-top: 8rpx;
  1035. overflow: hidden;
  1036. white-space: nowrap;
  1037. text-overflow: ellipsis;
  1038. text{
  1039. display: inline-block;
  1040. width: 80%;
  1041. margin-right: 4rpx;
  1042. }
  1043. }
  1044. }
  1045. .title {
  1046. color: rgba(16, 16, 16, 1);
  1047. font-size: 36rpx;
  1048. }
  1049. .degree {
  1050. display: flex;
  1051. margin-top: 32rpx;
  1052. .item {
  1053. margin-right: 6rpx;
  1054. text-align: center;
  1055. .item-text {
  1056. color: rgba(16, 16, 16, 1);
  1057. }
  1058. .item-number {
  1059. margin-top: 24rpx;
  1060. width: 72rpx;
  1061. height: 96rpx;
  1062. background-color: rgba(16, 16, 16, 1);
  1063. color: #fff;
  1064. font-size: 72rpx;
  1065. }
  1066. .decimal {
  1067. background-color: #900005;
  1068. }
  1069. }
  1070. }
  1071. // .tab {
  1072. // width: 240rpx;
  1073. // height: 0;
  1074. // border-width: 0px 48rpx 72rpx 0px;
  1075. // border-radius: 8px 8px 0 0;
  1076. // border-style: none solid solid none;
  1077. // border-color: transparent transparent #fff;
  1078. // position: absolute;
  1079. // top: -72rpx;
  1080. // left: 0rpx;
  1081. // right: 0rpx;
  1082. // color: #101010;
  1083. // color: rgba(16, 16, 16, 1);
  1084. // text-align: center;
  1085. // line-height: 72rpx;
  1086. // z-index: 999;
  1087. // text-indent: 16rpx;
  1088. // }
  1089. // .tab2 {
  1090. // width: 240rpx;
  1091. // height: 0;
  1092. // border-width: 0px 48rpx 72rpx 0px;
  1093. // border-radius: 8px 8px 0 0;
  1094. // border-style: none solid solid none;
  1095. // border-color: transparent transparent #D4DBE4;
  1096. // position: absolute;
  1097. // top: -72rpx;
  1098. // left: 210rpx;
  1099. // right: 0rpx;
  1100. // color: #777777;
  1101. // text-align: center;
  1102. // line-height: 72rpx;
  1103. // text-indent: 16rpx;
  1104. // }
  1105. .radio {
  1106. margin-top: 24rpx;
  1107. padding-left: 8rpx;
  1108. /deep/.u-radio {
  1109. margin-bottom: 8px;
  1110. min-width: 25% !important;
  1111. }
  1112. /deep/.u-radio__label{
  1113. margin-left: 24rpx;
  1114. font-size: 28rpx; ;
  1115. }
  1116. }
  1117. }
  1118. // 远程控制电源开关
  1119. .control{
  1120. display: flex;
  1121. align-items: center;
  1122. justify-content: space-between;
  1123. margin: 24rpx 32rpx;
  1124. padding: 40rpx 32rpx;
  1125. background-color: #fff;
  1126. border-radius: 8px;
  1127. .text{
  1128. color: rgba(51,51,51,1);
  1129. font-size: 36rpx;
  1130. font-weight: bold;
  1131. }
  1132. .icon{
  1133. img{
  1134. width: 64rpx;
  1135. height: 64rpx;
  1136. }
  1137. }
  1138. }
  1139. //各时段用电量
  1140. .electricity-chart {
  1141. margin: 24rpx 32rpx;
  1142. padding: 40rpx 0rpx;
  1143. background-color: #fff;
  1144. border-radius: 8px;
  1145. .title {
  1146. display: flex;
  1147. align-items: center;
  1148. justify-content: space-between;
  1149. padding: 0 32rpx;
  1150. margin-bottom: 40rpx;
  1151. .icon {
  1152. width: 36rpx;
  1153. height: 36rpx;
  1154. background-color: rgba(182, 212, 255, 1);
  1155. border: 6px solid rgba(22, 119, 255, 1);
  1156. border-radius: 100px;
  1157. }
  1158. .text {
  1159. color: rgba(51, 51, 51, 1);
  1160. font-size: 36rpx;
  1161. margin-left: 16rpx;
  1162. font-weight: bold;
  1163. }
  1164. .more {
  1165. margin-left: auto;
  1166. border: 1px solid rgba(187,187,187,1);
  1167. border-radius: 4px;
  1168. padding: 8rpx;
  1169. font-size: 24rpx;
  1170. }
  1171. }
  1172. .total{
  1173. text-align: center;
  1174. color: rgba(51,51,51,1);
  1175. font-weight: bold;
  1176. }
  1177. .chart {
  1178. width: 100%;
  1179. height: 500rpx;
  1180. .img {
  1181. width: 100%;
  1182. height: 440rpx;
  1183. }
  1184. }
  1185. }
  1186. .equipment-information {
  1187. margin: 24rpx 32rpx;
  1188. padding: 40rpx 0rpx;
  1189. background-color: #fff;
  1190. border-radius: 8px;
  1191. .title {
  1192. display: flex;
  1193. align-items: center;
  1194. padding: 0 32rpx;
  1195. margin-bottom: 40rpx;
  1196. .icon {
  1197. width: 36rpx;
  1198. height: 36rpx;
  1199. background-color: rgba(182, 212, 255, 1);
  1200. border: 6px solid rgba(22, 119, 255, 1);
  1201. border-radius: 100px;
  1202. }
  1203. .text {
  1204. display: flex;
  1205. align-items: center;
  1206. color: rgba(51, 51, 51, 1);
  1207. font-size: 36rpx;
  1208. margin-left: 16rpx;
  1209. font-weight: bold;
  1210. }
  1211. .date {
  1212. margin-left: auto;
  1213. }
  1214. .more {
  1215. color: #838383;
  1216. font-size: 24rpx;
  1217. margin-left: auto;
  1218. }
  1219. }
  1220. .chart {
  1221. width: 100%;
  1222. height: 440rpx;
  1223. .img {
  1224. width: 100%;
  1225. height: 440rpx;
  1226. }
  1227. }
  1228. .infos {
  1229. padding: 0 32rpx;
  1230. display: flex;
  1231. justify-content: space-between;
  1232. text-align: center;
  1233. .border {
  1234. margin: auto 0;
  1235. height: 70rpx;
  1236. width: 2rpx;
  1237. background-color: rgba(204, 204, 204, 1);
  1238. ;
  1239. }
  1240. .item-title {
  1241. color: rgba(119, 119, 119, 1);
  1242. }
  1243. .item-value {
  1244. color: rgba(16, 16, 16, 1);
  1245. font-size: 32rpx;
  1246. margin-top: 16rpx;
  1247. overflow: hidden;
  1248. // white-space: nowrap;
  1249. // text-overflow: ellipsis;
  1250. }
  1251. }
  1252. }
  1253. // 异常告警
  1254. .abnormal {
  1255. margin: 24rpx 32rpx;
  1256. padding: 40rpx 32rpx;
  1257. background-color: #fff;
  1258. border-radius: 8px;
  1259. .headline {
  1260. display: flex;
  1261. align-items: center;
  1262. justify-content: space-between;
  1263. }
  1264. .title {
  1265. display: flex;
  1266. align-items: center;
  1267. font-weight: bold;
  1268. .icon {
  1269. width: 36rpx;
  1270. height: 36rpx;
  1271. background-color: rgba(182, 212, 255, 1);
  1272. border: 6px solid rgba(22, 119, 255, 1);
  1273. border-radius: 100px;
  1274. }
  1275. .text {
  1276. color: rgba(51, 51, 51, 1);
  1277. font-size: 36rpx;
  1278. margin-left: 16rpx;
  1279. }
  1280. }
  1281. .more {
  1282. color: #838383;
  1283. font-size: 24rpx
  1284. }
  1285. .details {
  1286. margin-top: 40rpx;
  1287. .item {
  1288. display: flex;
  1289. align-items: center;
  1290. justify-content: space-between;
  1291. margin-top: 32rpx;
  1292. .name {
  1293. color: rgba(51, 51, 51, 1);
  1294. }
  1295. .time {
  1296. color: rgba(119, 119, 119, 1);
  1297. font-size: 24rpx;
  1298. display: flex;
  1299. align-items: center;
  1300. .more{
  1301. margin-left: 4rpx;
  1302. }
  1303. }
  1304. }
  1305. }
  1306. }
  1307. // 能源监测
  1308. .energy-inspection,
  1309. .data-analysis {
  1310. margin: 24rpx 32rpx;
  1311. padding: 40rpx 32rpx;
  1312. background-color: #fff;
  1313. border-radius: 8px;
  1314. .title {
  1315. display: flex;
  1316. align-items: center;
  1317. font-weight: bold;
  1318. .icon {
  1319. width: 36rpx;
  1320. height: 36rpx;
  1321. background-color: rgba(182, 212, 255, 1);
  1322. border: 6px solid rgba(22, 119, 255, 1);
  1323. border-radius: 100px;
  1324. }
  1325. .text {
  1326. color: rgba(51, 51, 51, 1);
  1327. font-size: 36rpx;
  1328. margin-left: 16rpx;
  1329. }
  1330. }
  1331. .grid {
  1332. .icon {
  1333. width: 128rpx;
  1334. height: 128rpx;
  1335. border-radius: 12px;
  1336. background-color: rgba(35, 186, 178, 1);
  1337. display: flex;
  1338. align-items: center;
  1339. justify-content: center;
  1340. margin-bottom: 16rpx;
  1341. .img {
  1342. width: 80rpx;
  1343. height: 80rpx;
  1344. }
  1345. }
  1346. .icon2 {
  1347. background-color: rgba(42, 186, 72, 1);
  1348. }
  1349. .icon3 {
  1350. background-color: rgba(78, 96, 246, 1);
  1351. }
  1352. .icon4 {
  1353. background-color: rgba(22, 119, 255, 1);
  1354. }
  1355. .icon5 {
  1356. background-color: rgba(35, 186, 178, 1);
  1357. }
  1358. .icon6 {
  1359. background-color: rgba(42, 186, 72, 1);
  1360. }
  1361. .icon7 {
  1362. background-color: rgba(22, 119, 255, 1);
  1363. }
  1364. .icon8 {
  1365. background-color: rgba(35, 186, 178, 1);
  1366. }
  1367. .icon9 {
  1368. background-color: rgba(42, 186, 72, 1);
  1369. }
  1370. .grid-text {
  1371. color: #333333;
  1372. }
  1373. }
  1374. }
  1375. // 设备信息弹窗
  1376. .equipment-popup {
  1377. .content {
  1378. padding: 32rpx;
  1379. .headline {
  1380. color: rgba(16, 16, 16, 1);
  1381. font-size: 36rpx;
  1382. text-align: center;
  1383. font-weight: bold;
  1384. margin-bottom: 24rpx;
  1385. }
  1386. .infos {
  1387. //padding-bottom: 100rpx;
  1388. .item:last-of-type {
  1389. border: none;
  1390. }
  1391. .item {
  1392. display: flex;
  1393. align-items: center;
  1394. //line-height: 48rpx;
  1395. padding: 20rpx 0;
  1396. border-bottom: 1px solid #cccccc;
  1397. .item-title {
  1398. color: rgba(51, 51, 51, 1);
  1399. width: 200rpx;
  1400. }
  1401. .item-value {
  1402. color: #666666;
  1403. flex: 1;
  1404. margin-left: 16rpx;
  1405. display: flex;
  1406. align-items: center;
  1407. justify-content: space-between;
  1408. .img{
  1409. width: 32rpx;
  1410. height: 32rpx;
  1411. transform: rotate(90deg);
  1412. margin-left: 96rpx;
  1413. }
  1414. }
  1415. }
  1416. }
  1417. .get {
  1418. height: 80rpx;
  1419. line-height: 80rpx;
  1420. border-radius: 4px;
  1421. background-color: rgba(22, 119, 255, 1);
  1422. color: rgba(255, 255, 255, 1);
  1423. font-size: 32rpx;
  1424. }
  1425. }
  1426. }
  1427. // 创建工单
  1428. .create-order {
  1429. width: 120rpx;
  1430. height: 120rpx;
  1431. border-radius: 20px;
  1432. background: linear-gradient(180.29deg, rgba(255, 124, 112, 1) 0.9%, rgba(255, 79, 63, 1) 100.4%);
  1433. box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
  1434. text-align: center;
  1435. display: flex;
  1436. flex-direction: column;
  1437. justify-content: center;
  1438. align-items: center;
  1439. position: fixed;
  1440. right: 32rpx;
  1441. bottom: 64rpx;
  1442. .img {
  1443. width: 56rpx;
  1444. height: 56rpx;
  1445. vertical-align: middle;
  1446. }
  1447. .text {
  1448. color: rgba(255, 255, 255, 1);
  1449. font-size: 22rpx;
  1450. }
  1451. }
  1452. </style>