deviceDetail.vue 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593
  1. <template>
  2. <!-- 设备详情 -->
  3. <view class="content">
  4. <view class="name_box">
  5. <view class="name_content">{{ devInfo.devName }}</view>
  6. </view>
  7. <view class="radar-box">
  8. <view
  9. :style="{
  10. width: `${length / 200}px`,
  11. height: `${width / 200}px`,
  12. position: 'relative',
  13. overflow: 'hidden',
  14. }"
  15. :class="[
  16. width < 25500 && length < 25000 ? 'tranStyle' : 'center',
  17. ]"
  18. >
  19. <view
  20. v-for="(item, index) in modules"
  21. :key="index"
  22. class="moduleContent"
  23. >
  24. <view
  25. :class="item.type"
  26. :style="{
  27. width: `${item.width / 2}px`,
  28. height: `${item.length / 2}px`,
  29. top: `${item.top / 2}px`,
  30. left: `${item.left / 2}px`,
  31. transform: `rotate(${item.rotate}deg)`,
  32. 'transform-origin': 'center center',
  33. }"
  34. >
  35. <image
  36. class="module-img"
  37. :src="`../../static/furnitures/${item.type}.png`"
  38. mode=""
  39. />
  40. </view>
  41. </view>
  42. <template v-if="devType == 'LNB'">
  43. <view v-for="item in targetPoints" :key="item.id">
  44. <image
  45. class="action-icon-M"
  46. :style="{
  47. position: 'absolute',
  48. transform: `translate3d(${
  49. item.displayX / 2 + 100
  50. }px, ${
  51. -item.displayY / 2 + 100
  52. }px, 0) translate(-50%, -50%)`,
  53. zIndex: 9999,
  54. transition: 'transform 1s linear',
  55. willChange: 'transform',
  56. }"
  57. :src="`../../static/${lnbAction}.png`"
  58. mode=""
  59. />
  60. </view>
  61. </template>
  62. <template v-else>
  63. <image
  64. v-if="actionName"
  65. class="action-icon-G"
  66. :style="{
  67. top: `${top / 200}px`,
  68. left: `${left / 200}px`,
  69. }"
  70. :src="`../../images/furnitures/${actionName}.png`"
  71. mode=""
  72. />
  73. </template>
  74. </view>
  75. <!-- <image
  76. class="redar-pic"
  77. src="../../static/rander.png"
  78. mode=""
  79. :style="{
  80. transform:
  81. 'translate(' +
  82. -xOffset / 100 +
  83. 'rpx,' +
  84. -yOffset / 100 +
  85. 'rpx)',
  86. }"
  87. /> -->
  88. </view>
  89. <view class="switchBox">
  90. <text class="name">呼吸灯</text>
  91. <switch
  92. :value="statusLight"
  93. @change="handleLightChange"
  94. :active-value="1"
  95. :inactive-value="0"
  96. size="24px"
  97. active-color="#07c160"
  98. inactive-color="#eeeff1"
  99. style="transform: scale(0.8)"
  100. />
  101. </view>
  102. <view class="notice-info">
  103. <view class="notice_title" @click="discrepancy">
  104. <text style="color: #95a4b3; font-size: 28rpx">{{
  105. todayDate
  106. }}</text>
  107. <image src="../../static/rightArrow.png"></image>
  108. </view>
  109. <view
  110. @click="getFrenEcharts()"
  111. class="title"
  112. v-if="
  113. devInfo.installPosition == 'Bedroom' ||
  114. (breathRate === 0 && breathRate !== '')
  115. "
  116. >
  117. <view
  118. class="title-text"
  119. style="color: #111111; font-size: 30rpx"
  120. >当前呼吸率</view
  121. >
  122. <view
  123. style="
  124. display: flex;
  125. justify-content: center;
  126. align-items: center;
  127. "
  128. >
  129. <view
  130. class="title-btn"
  131. style="color: #111111; font-size: 30rpx"
  132. v-if="breathRate !== ''"
  133. >
  134. {{ breathRate }}次/分钟</view
  135. >
  136. <view
  137. v-else
  138. class="title-btn"
  139. style="color: #111111; font-size: 30rpx"
  140. >
  141. 暂无
  142. </view>
  143. <image
  144. src="../../static/rightArrow.png"
  145. style="margin-left: auto; width: 30rpx; height: 30rpx"
  146. ></image>
  147. </view>
  148. </view>
  149. <view class="title" v-if="devInfo.installPosition == 'Toilet'">
  150. <view class="title-text" style="color: #22dea7"
  151. >今日卫生间使用频次</view
  152. >
  153. <view class="title-btn" style="color: #22dea7"
  154. >{{
  155. freQuenceList.length == "" ? "0" : freQuenceList.length
  156. }}次</view
  157. >
  158. </view>
  159. <view class="title" v-if="devInfo.installPosition != 'Toilet'">
  160. <view class="title-text" style="color: #22dea7"
  161. >今日进出频次</view
  162. >
  163. <view class="title-btn" style="color: #22dea7"
  164. >{{
  165. freQuenceList.length == "" ? "0" : freQuenceList.length
  166. }}次</view
  167. >
  168. </view>
  169. <view
  170. class="stayDetail"
  171. v-if="freQuenceList.length > 0 && freQuenceList.length == 1"
  172. >
  173. <view v-for="item in freQuenceList" :key="item.id">
  174. <view class="stayDetail-item">
  175. <view class="stayDetail-text"
  176. >{{
  177. item.info.start_time.slice(11, 16)
  178. }}目标进入</view
  179. >
  180. <view class="stayDetail-btn"
  181. >{{
  182. item.info.end_time.slice(11, 16)
  183. }}目标离开</view
  184. >
  185. </view>
  186. </view>
  187. </view>
  188. <view
  189. class="stayDetail"
  190. v-if="freQuenceList.length > 0 && freQuenceList.length > 1"
  191. >
  192. <swiper
  193. class="auto-scroll-swiper"
  194. :indicator-dots="false"
  195. :autoplay="false"
  196. :interval="3000"
  197. :circular="true"
  198. :display-multiple-items="1"
  199. :vertical="false"
  200. :current="currentIndex"
  201. @change="onSwiperChange"
  202. >
  203. <swiper-item
  204. v-for="item in freQuenceList"
  205. :key="item.id"
  206. class="stayDetail-item"
  207. >
  208. <view class="stayDetail-text"
  209. >{{
  210. item.info.start_time.slice(11, 16)
  211. }}目标进入</view
  212. >
  213. <view class="stayDetail-btn"
  214. >{{
  215. item.info.end_time.slice(11, 16)
  216. }}目标离开</view
  217. >
  218. </swiper-item>
  219. </swiper>
  220. </view>
  221. <!-- <view class="title" v-if="devInfo.installPosition == 'Toilet'">
  222. <view class="title-text" style="color: #ff976a"
  223. >昨日卫生间使用频次</view
  224. >
  225. <view class="title-btn" style="color: #ff976a"
  226. >{{
  227. freQuenceList.length == "" ? "0" : freQuenceList.length
  228. }}次</view
  229. >
  230. </view>
  231. <view class="title" v-else>
  232. <view class="title-text" style="color: #ff976a"
  233. >昨日进出频次</view
  234. >
  235. <view class="title-btn" style="color: #ff976a"
  236. >{{
  237. freQuenceList.length == "" ? "0" : freQuenceList.length
  238. }}次</view
  239. >
  240. </view> -->
  241. </view>
  242. <view class="box" v-if="!breathShow">
  243. <view class="handle-btn">
  244. <view class="btn1" @click="shareDevice">分享</view>
  245. <view class="btn1" @click="gotoSetting">设置</view>
  246. <view class="btn2" @click="healthAlarm">守护计划</view>
  247. </view>
  248. </view>
  249. <view class="box" v-else>
  250. <view class="handle-btn">
  251. <view class="closeBreath" @click="breathShow = false"
  252. >关闭呼吸率曲线图</view
  253. >
  254. <view class="btn2" @click="saveBreath"> 保存呼吸率曲线图 </view>
  255. </view>
  256. </view>
  257. <!-- 遮罩层 -->
  258. <view class="mask" v-if="shareModel" @click="shareModel = false"></view>
  259. <!-- 弹窗内容 -->
  260. <view class="share-modal" v-if="shareModel">
  261. <view class="modal-header">
  262. <text class="cancel-btn" @click="shareModel = false">取消</text>
  263. <text class="modal-title">分享</text>
  264. <text class="confirm-btn" @click="onShareConfirm()">确认</text>
  265. </view>
  266. <view class="modal-body">
  267. <view class="info-row">
  268. <view class="label">设备序列号:</view>
  269. <view class="value">{{ devInfo.clientId }}</view>
  270. </view>
  271. <view class="info-row">
  272. <view class="label">设备名称:</view>
  273. <view class="value">{{ devInfo.devName }}</view>
  274. </view>
  275. <view class="input-row phoneInfo">
  276. <view>被分享人</view>
  277. <input
  278. class="input"
  279. placeholder="请输入手机号"
  280. type="number"
  281. v-model="sharedPhone"
  282. />
  283. </view>
  284. <view class="funChoice">
  285. <view class="funItem" @click="smChange()">
  286. <label class="simple-radio">
  287. <radio
  288. :value="messageFlag"
  289. color="#7c5345"
  290. :checked="messageFlag == true"
  291. class="hide-original"
  292. />
  293. <text>短信权限</text>
  294. </label>
  295. </view>
  296. <view class="funItem">
  297. <label class="simple-radio" @click="snChange()">
  298. <radio
  299. :value="serviceNumberFlag"
  300. color="#7c5345"
  301. :checked="serviceNumberFlag == true"
  302. class="hide-original"
  303. />
  304. <text>服务号通知</text>
  305. </label>
  306. </view>
  307. <view class="funItem">
  308. <label class="simple-radio" @click="vfChange()">
  309. <radio
  310. :value="voipFlag"
  311. color="#7c5345"
  312. :checked="voipFlag == true"
  313. class="hide-original"
  314. />
  315. <text>语音通话</text>
  316. </label>
  317. </view>
  318. </view>
  319. </view>
  320. </view>
  321. <view class="modal-mask" v-if="choiceVisible" @click="closeChoice">
  322. <view class="modal-container">
  323. <view class="modal-header">
  324. <text class="title">请选择分享方式</text>
  325. </view>
  326. <view class="modal-buttons">
  327. <!-- 手机号分析按钮 -->
  328. <button class="btn phone-btn" @click="handlePhoneAnalysis">
  329. <text>手机号分享</text>
  330. </button>
  331. <!-- 链接分享按钮 -->
  332. <button class="btn link-btn" @click="handleLinkShare">
  333. <text>链接分享</text>
  334. </button>
  335. </view>
  336. </view>
  337. </view>
  338. <!-- ECharts图标模块 -->
  339. <view v-if="breathShow" class="echartsClass">
  340. <image
  341. src="../../static/closePng.png"
  342. class="closePng"
  343. @click="breathShow = false"
  344. ></image>
  345. <l-echart
  346. id="chart-canvas"
  347. canvas-id="chart-canvas"
  348. ref="chartRef"
  349. @finished="initChart"
  350. v-if="breathShow"
  351. @click="breathShow = false"
  352. ></l-echart>
  353. </view>
  354. <!-- <alarModel
  355. v-if="isInitAlarm"
  356. :clientIdProp="clientIdProp"
  357. @sendChange="receptionChange"
  358. @sendHealth="receptHealth"
  359. /> -->
  360. <alarModel
  361. v-if="isInitAlarm"
  362. @sendChange="receptionChange"
  363. @sendHealth="receptHealth"
  364. />
  365. </view>
  366. </template>
  367. <script>
  368. import * as echarts from "../../uni_modules/lime-echart/static/echarts.min";
  369. import mqtt from "../../utils/mqtt";
  370. export default {
  371. data() {
  372. return {
  373. width: 0, //检测区域宽度
  374. length: 0, //检测区域长度
  375. xOffset: 0,
  376. yOffset: 0,
  377. devInfo: "",
  378. actionName: "",
  379. startDate: "",
  380. endDate: "",
  381. softWare: "",
  382. statusLight: 0,
  383. currentDate: new Date().getTime(),
  384. lnbAction: "action8",
  385. wsj: false,
  386. todayWcTimes: "",
  387. stayDetail: "",
  388. todayDate: "",
  389. dev_id: "",
  390. nowTime: "",
  391. devName: "",
  392. devType: "",
  393. localPhone: uni.getStorageSync("phone"),
  394. startArr: [],
  395. freQuenceList: [],
  396. // mqtt相关
  397. currentIndex: 0,
  398. modules: [],
  399. autoPlayinterval: "",
  400. choiceVisible: "",
  401. // 手机号分享授权模块
  402. shareModel: false,
  403. alarmModel: false,
  404. sharedPhone: "",
  405. messageFlag: true,
  406. serviceNumberFlag: true,
  407. voipFlag: true,
  408. isInitAlarm: "",
  409. // mqtt模块
  410. targetPoints: {},
  411. inactivityTimer: null,
  412. left: 0,
  413. top: 0,
  414. clientIdProp: null,
  415. breathRate: "",
  416. breathShow: false,
  417. breathRpmList: [],
  418. option: {
  419. title: [
  420. {
  421. text: "呼吸率曲线",
  422. left: "center",
  423. top: 20,
  424. textStyle: { fontSize: 14 },
  425. },
  426. {
  427. text: "BPM: 0 次/分钟",
  428. left: "center",
  429. top: 50,
  430. textStyle: { fontSize: 12, color: "#805246" },
  431. },
  432. {
  433. text: "时间 (秒)",
  434. left: "right",
  435. top: "bottom",
  436. textStyle: { fontSize: 12, color: "#888888" },
  437. },
  438. ],
  439. grid: { left: 60, right: 20, top: 80, bottom: 50 },
  440. xAxis: {
  441. type: "category",
  442. data: Array.from({ length: 60 }, (_, i) => i + 1),
  443. boundaryGap: false,
  444. splitLine: { show: false },
  445. },
  446. yAxis: {
  447. type: "value",
  448. min: 0,
  449. max: 40,
  450. name: "呼吸率(次)",
  451. nameLocation: "end",
  452. nameGap: 20,
  453. nameTextStyle: { fontSize: 12, color: "#888888" },
  454. splitLine: { show: true },
  455. },
  456. series: [
  457. {
  458. type: "line",
  459. smooth: true,
  460. symbol: "none",
  461. lineStyle: { color: "#805246", width: 2 },
  462. data: Array(60).fill(0),
  463. },
  464. ],
  465. animation: true,
  466. animationDuration: 100,
  467. },
  468. index: 0,
  469. loopTimer: null,
  470. mqttClienTwoFlag: false,
  471. mqttClientOne: false,
  472. };
  473. },
  474. computed: {},
  475. methods: {
  476. getdevInfo(devId) {
  477. this.$http
  478. .get(`wap/device/queryDeviceInfoById`, {
  479. devId: devId,
  480. })
  481. .then((res) => {
  482. if (res.data.data) {
  483. this.devInfo = res.data.data;
  484. this.devType = this.devInfo.devType;
  485. this.width =
  486. Math.abs(
  487. this.devInfo.yyEnd - this.devInfo.yyStart
  488. ) * 100;
  489. this.length =
  490. Math.abs(
  491. this.devInfo.xxEnd - this.devInfo.xxStart
  492. ) * 100;
  493. this.xOffset =
  494. (this.devInfo.xxStart + this.devInfo.xxEnd) * 50;
  495. this.yOffset =
  496. -(this.devInfo.yyStart + this.devInfo.yyEnd) * 50;
  497. this.statusLight = this.devInfo.statusLight;
  498. }
  499. })
  500. .catch((err) => {});
  501. },
  502. getdevRoomInfo(devId) {
  503. this.$http
  504. .get(`wap/room/readRoom`, {
  505. devId: devId,
  506. })
  507. .then((res) => {
  508. if (res.data.data) {
  509. this.modules = res.data.data.furnitures;
  510. }
  511. });
  512. },
  513. handleLightChange(e) {
  514. let newValue = e.detail.value == true ? 1 : 0;
  515. this.$http
  516. .post(`wap/device/statusLight`, {
  517. statusLight: newValue,
  518. devId: this.devInfo.devId,
  519. })
  520. .then((res) => {
  521. if (res.data.code == 200) {
  522. uni.showToast({
  523. title: "操作成功",
  524. icon: "success",
  525. });
  526. this.statusLight = newValue;
  527. } else {
  528. wx.showToast({
  529. title: res.data.message,
  530. icon: "none",
  531. });
  532. }
  533. });
  534. },
  535. parseDeviceItem(devItemStr) {
  536. try {
  537. const devItem = JSON.parse(devItemStr);
  538. if (!devItem || !devItem.devId || !devItem.clientId) {
  539. throw new Error("设备信息不完整");
  540. }
  541. return devItem;
  542. } catch (e) {
  543. throw new Error("设备信息解析失败: " + e.message);
  544. }
  545. },
  546. // 分享功能模块
  547. shareDevice() {
  548. this.choiceVisible = true;
  549. },
  550. onShareConfirm() {
  551. if (!this.sharedPhone) {
  552. uni.showModal({
  553. content: "请填写手机号!",
  554. showCancel: false,
  555. });
  556. return;
  557. }
  558. let reg_tel =
  559. /^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\d{8}$/;
  560. if (!reg_tel.test(this.sharedPhone)) {
  561. uni.showModal({
  562. content: "请填写正确手机号!",
  563. showCancel: false,
  564. });
  565. return;
  566. }
  567. let shareParam = {
  568. sharerUserId: uni.getStorageSync("userId"),
  569. devId: this.devInfo.devId,
  570. sharerPhone: uni.getStorageSync("phone"),
  571. sharedUserId: "",
  572. sharedPhone: this.sharedPhone,
  573. messageFlag: this.messageFlag == true ? 0 : 1,
  574. serviceNumberFlag: this.serviceNumberFlag == true ? 0 : 1,
  575. voipFlag: this.voipFlag == true ? 0 : 1,
  576. };
  577. this.$http
  578. .post("wap/share/deviceShare", shareParam, {
  579. header: {
  580. "Content-Type": "application/json;charset=UTF-8",
  581. },
  582. })
  583. .then((res) => {
  584. if (res.data.code == 200) {
  585. uni.showToast({
  586. title: "分享成功",
  587. icon: "success",
  588. duration: 1500,
  589. });
  590. } else {
  591. uni.showToast({
  592. title: res.data.message,
  593. icon: "none",
  594. duration: 1500,
  595. });
  596. }
  597. });
  598. this.shareModel = false;
  599. },
  600. closeChoice() {
  601. this.choiceVisible = false;
  602. },
  603. handlePhoneAnalysis() {
  604. this.choiceVisible = false;
  605. this.shareModel = true;
  606. },
  607. handleLinkShare() {
  608. this.choiceVisible = false;
  609. uni.navigateTo({
  610. url:
  611. "/pagesA/linkShare/linkShare?devInfo=" +
  612. JSON.stringify(this.devInfo),
  613. });
  614. },
  615. smChange() {
  616. this.messageFlag = !this.messageFlag;
  617. },
  618. snChange() {
  619. this.serviceNumberFlag = !this.serviceNumberFlag;
  620. },
  621. vfChange() {
  622. this.voipFlag = !this.voipFlag;
  623. },
  624. gotoSetting() {
  625. uni.navigateTo({
  626. url:
  627. "/pagesA/deviceSetting/deviceSetting?devInfo=" +
  628. JSON.stringify(this.devInfo),
  629. });
  630. },
  631. getFrequency(clientId) {
  632. this.$http
  633. .post(`wap/stats/alarmEventsQuery`, {
  634. clientId: clientId,
  635. createTimeStart: this.$time(new Date()),
  636. createTimeEnd: this.$time(new Date()),
  637. eventType: 1,
  638. })
  639. .then((res) => {
  640. if (res.data.code == 200) {
  641. if (res.data.data.rows.length > 0) {
  642. this.freQuenceList = this.parseJsonToObjects(
  643. res.data.data.rows
  644. );
  645. } else {
  646. this.freQuenceList = [];
  647. }
  648. } else {
  649. wx.showToast({
  650. title: res.data.message,
  651. icon: "none",
  652. });
  653. }
  654. });
  655. },
  656. parseJsonToObjects(jsonArray) {
  657. return jsonArray.map((item) => {
  658. // 解析info字段的JSON字符串
  659. let infoData = {};
  660. try {
  661. infoData = JSON.parse(item.info);
  662. } catch (e) {
  663. console.error("Failed to parse info JSON:", e);
  664. }
  665. return {
  666. id: item.id,
  667. clientId: item.clientId,
  668. tenantId: item.tenantId,
  669. devName: item.devName,
  670. uuid: item.uuid,
  671. planUuid: item.planUuid,
  672. eventType: item.eventType,
  673. info: infoData,
  674. isHandle: item.isHandle,
  675. createTime: item.createTime,
  676. remark: item.remark,
  677. };
  678. });
  679. },
  680. // 健康闹钟方法
  681. healthAlarm() {
  682. uni.navigateTo({
  683. url:
  684. "/pagesA/healthAlarm/healthAlarm?devInfo=" +
  685. JSON.stringify(this.devInfo),
  686. });
  687. },
  688. onSwiperChange(event) {
  689. const current = event.detail.current;
  690. const totalItems = this.freQuenceList.length;
  691. if (current === totalItems - 1) {
  692. this.autoplay = false;
  693. }
  694. this.currentIndex = current;
  695. },
  696. autoSwipe() {
  697. if (this.freQuenceList && this.freQuenceList.length > 0) {
  698. setInterval(() => {
  699. let nextIndex = this.currentIndex + 1;
  700. if (nextIndex >= this.freQuenceList.length) {
  701. nextIndex = 0; // 循环到第一个项目
  702. }
  703. this.currentIndex = nextIndex;
  704. }, 3000); // 每3秒自动滚动一次
  705. }
  706. },
  707. discrepancy() {
  708. uni.navigateTo({
  709. url:
  710. "/pagesA/discrepancy/discrepancy?freQuenceList=" +
  711. JSON.stringify(this.freQuenceList),
  712. });
  713. },
  714. getCurrentDate() {
  715. const now = new Date();
  716. this.currentDate = `${now.getFullYear()}-${
  717. now.getMonth() + 1
  718. }月${now.getDate().toString().padStart(2, "0")}日`;
  719. },
  720. receptionChange(val) {
  721. this.targetPoints = val;
  722. },
  723. receptHealth(val) {
  724. this.breathRate = val;
  725. this.setEcharts(val);
  726. },
  727. // echarts图表模块
  728. getOption(list) {
  729. // 固定 X 轴 [0 ~ 60]
  730. const xData = Array.from({ length: 61 }, (_, i) => i);
  731. const recent = list.slice(-61);
  732. const data = new Array(61).fill(null);
  733. for (let i = 0; i < recent.length; i++) {
  734. data[i] = recent[i];
  735. }
  736. return {
  737. title: [
  738. { text: "呼吸率曲线", left: "center", top: 20 },
  739. {
  740. text: `BPM: ${recent[recent.length - 1] || 0} 次/分钟`,
  741. left: "center",
  742. top: 50,
  743. textStyle: { fontSize: 12, color: "#805246" },
  744. },
  745. {
  746. text: "时间 (秒)",
  747. left: "right",
  748. top: "bottom",
  749. textStyle: {
  750. fontSize: 10,
  751. color: "#888888",
  752. fontWeight: "normal",
  753. },
  754. },
  755. ],
  756. grid: { left: 60, right: 20, top: 80, bottom: 50 },
  757. xAxis: {
  758. type: "category",
  759. data: xData,
  760. boundaryGap: false,
  761. },
  762. yAxis: {
  763. type: "value",
  764. min: 0,
  765. max: 40,
  766. name: "呼吸率(次)",
  767. nameLocation: "end",
  768. nameGap: 20,
  769. nameTextStyle: {
  770. fontSize: 10,
  771. color: "#888888",
  772. fontWeight: "normal",
  773. },
  774. splitLine: { show: true },
  775. },
  776. series: [
  777. {
  778. type: "line",
  779. smooth: true,
  780. symbol: "none",
  781. data: data,
  782. showSymbol: false,
  783. lineStyle: { color: "#7a4e42", width: 2 },
  784. },
  785. ],
  786. };
  787. },
  788. getFrenEcharts() {
  789. if (this.breathRate === "" || this.breathRate === null) {
  790. uni.showToast({
  791. title: "暂无呼吸率",
  792. icon: "none",
  793. duration: 1500,
  794. });
  795. return;
  796. }
  797. this.breathShow = true;
  798. this.$nextTick(() => {
  799. this.initChart();
  800. });
  801. },
  802. initChart() {
  803. if (!this.$refs.chartRef) return;
  804. if (this.chartInstance) {
  805. this.chartInstance.dispose();
  806. this.chartInstance = null;
  807. }
  808. this.$refs.chartRef.init(echarts, (chart) => {
  809. this.chartInstance = chart;
  810. chart.setOption(this.option, true);
  811. });
  812. },
  813. setEcharts(val) {
  814. if (!Array.isArray(this.breathRpmList)) {
  815. this.breathRpmList = [];
  816. }
  817. this.breathRpmList.push(val);
  818. if (!this.chartInstance) return;
  819. const option = this.getOption(this.breathRpmList);
  820. this.chartInstance.setOption(option, { notMerge: true });
  821. },
  822. saveBreath() {
  823. const chart = this.$refs.chartRef;
  824. if (!chart) {
  825. uni.showToast({ title: "图表未渲染", icon: "none" });
  826. return;
  827. }
  828. chart.canvasToTempFilePath({
  829. success: (res) => {
  830. uni.saveImageToPhotosAlbum({
  831. filePath: res.tempFilePath,
  832. success: () => {
  833. uni.showToast({
  834. title: "保存成功",
  835. icon: "success",
  836. });
  837. },
  838. fail: (err) => {
  839. console.error("保存失败:", err);
  840. uni.showToast({
  841. title: "保存失败",
  842. icon: "none",
  843. });
  844. },
  845. });
  846. },
  847. fail: (err) => {
  848. console.error("导出失败:", err);
  849. uni.showToast({
  850. title: "导出失败",
  851. icon: "none",
  852. });
  853. },
  854. });
  855. },
  856. // 订阅mqtt实时点位
  857. connectMqtt() {
  858. if (this.mqttClienTwoFlag) {
  859. console.log("主题已订阅");
  860. return;
  861. }
  862. const THRESHOLD = 2;
  863. const params = {
  864. keepalive: 6000,
  865. clean: true,
  866. connectTimeout: 30 * 1000,
  867. clientId:
  868. "xcx_mqtt_data1" +
  869. this.clientIdProp +
  870. Date.now() +
  871. "_" +
  872. Math.random().toString(16).substring(2, 8),
  873. username: "admin",
  874. password: "public",
  875. // 微信小程序特定配置
  876. wsOptions: {
  877. WebSocket: function (url) {
  878. return wx.connectSocket({
  879. url: url,
  880. header: {
  881. "content-type": "application/json",
  882. },
  883. protocols: ["mqtt"],
  884. });
  885. },
  886. },
  887. reconnectPeriod: 0,
  888. rejectUnauthorized: false,
  889. };
  890. let clientTwo = "";
  891. let selectedService = uni.getStorageSync("sercviceChoice");
  892. if (!selectedService || selectedService == "aloneServe") {
  893. if (__wxConfig.envVersion == "develop") {
  894. clientTwo = mqtt.connect(
  895. "wxs://data.radar-power.cn/mqtt",
  896. params
  897. );
  898. }
  899. if (__wxConfig.envVersion == "trial") {
  900. clientTwo = mqtt.connect(
  901. "wxs://data.radar-power.cn/mqtt",
  902. params
  903. );
  904. }
  905. }
  906. // 存储client引用以便后续操作
  907. this.mqttClientOne = clientTwo;
  908. clientTwo.on("connect", () => {
  909. console.log("MQTT连接成功");
  910. this.mqttClienTwoFlag = true;
  911. let userId = uni.getStorageSync("userId");
  912. if (this.clientIdProp !== null) {
  913. clientTwo.subscribe(
  914. `/dev/${this.clientIdProp}/tracker_targets`,
  915. (err) => {
  916. if (err) {
  917. console.error("订阅clientId失败", err);
  918. } else {
  919. console.log(
  920. `成功订阅设备主题: /dev/${this.clientIdProp}/dsp_data`
  921. );
  922. }
  923. }
  924. );
  925. }
  926. console.log(this.clientIdProp);
  927. });
  928. clientTwo.on("disconnect", () => {
  929. console.log("MQTT不在连接");
  930. });
  931. clientTwo.on("error", (err) => {
  932. this.mqttClienTwoFlag = false;
  933. setTimeout(() => {
  934. this.connectMqtt();
  935. }, 1000);
  936. });
  937. clientTwo.on("reconnect", () => {});
  938. clientTwo.on("close", () => {});
  939. clientTwo.on("message", (topic, message) => {
  940. console.log(JSON.parse(message.toString()), "8870");
  941. // 处理点位消息
  942. if (this.clientIdProp !== null) {
  943. this.handleMessage(topic, message, this.clientIdProp);
  944. }
  945. });
  946. },
  947. handleMessage(topic, message, clientId) {
  948. // 清除不活动定时器
  949. clearTimeout(this.inactivityTimer);
  950. this.inactivityTimer = setTimeout(() => {
  951. this.targetPoints = {};
  952. }, 1500);
  953. // 验证topic格式
  954. const match = topic.match(/^\/dev\/(.+)\/dsp_data$/);
  955. if (!match || match[1] !== clientId) return;
  956. try {
  957. const data = JSON.parse(message.toString());
  958. if (data.health) {
  959. if (
  960. data.health.breath_rpm ||
  961. data.health.breath_rpm === 0
  962. ) {
  963. this.receptHealth(Math.floor(data.health.breath_rpm));
  964. // this.$emit(
  965. // "sendHealth",
  966. // Math.floor(data.health.breath_rpm)
  967. // );
  968. } else {
  969. // this.$emit("sendHealth", 0);
  970. }
  971. }
  972. this.processTrackerData(data.tracker_targets);
  973. } catch (e) {
  974. console.error("MQTT消息解析失败", e);
  975. }
  976. },
  977. processTrackerData(arr) {
  978. if (Array.isArray(arr) && arr.length > 0 && Array.isArray(arr[0])) {
  979. this.targetPoints = {};
  980. const currentIds = new Set();
  981. const newTargetPoints = {};
  982. // 处理每个追踪目标
  983. arr.forEach((item) => {
  984. if (!Array.isArray(item) || item.length < 4) return;
  985. const [x, y, z, id] = item;
  986. currentIds.add(id.toString());
  987. // 处理新点或更新现有点
  988. if (!this.targetPoints[id]) {
  989. newTargetPoints[id] = this.createNewTargetPoint(
  990. x,
  991. y,
  992. z,
  993. id
  994. );
  995. } else {
  996. newTargetPoints[id] = this.updateExistingTargetPoint(
  997. this.targetPoints[id],
  998. x,
  999. y,
  1000. z,
  1001. 2
  1002. );
  1003. }
  1004. });
  1005. // 移除不存在的点
  1006. Object.keys(this.targetPoints).forEach((id) => {
  1007. if (!currentIds.has(id)) {
  1008. delete this.targetPoints[id];
  1009. }
  1010. });
  1011. // 更新目标点
  1012. this.targetPoints = {
  1013. ...this.targetPoints,
  1014. ...newTargetPoints,
  1015. };
  1016. if (Array.isArray(this.targetPoints)) {
  1017. this.targetPoints = this.targetPoints.filter(
  1018. (item) => item !== null && item !== undefined
  1019. );
  1020. }
  1021. console.log("当前目标点11111", this.targetPoints);
  1022. }
  1023. },
  1024. createNewTargetPoint(x, y, z, id) {
  1025. return {
  1026. x,
  1027. y,
  1028. z,
  1029. id,
  1030. displayX: x,
  1031. displayY: y,
  1032. lastX: x,
  1033. lastY: y,
  1034. };
  1035. },
  1036. updateExistingTargetPoint(existingPoint, x, y, z, THRESHOLD) {
  1037. const dx = x - existingPoint.lastX;
  1038. const dy = y - existingPoint.lastY;
  1039. const distance = Math.sqrt(dx * dx + dy * dy);
  1040. if (distance > THRESHOLD) {
  1041. return {
  1042. ...existingPoint,
  1043. x,
  1044. y,
  1045. z,
  1046. lastX: x,
  1047. lastY: y,
  1048. displayX: x,
  1049. displayY: y,
  1050. };
  1051. }
  1052. return existingPoint;
  1053. },
  1054. closemqtTwo() {
  1055. this.mqttClienTwoFlag = false;
  1056. if (this.mqttClientOne) {
  1057. this.mqttClientOne.end();
  1058. this.mqttClientOne = null;
  1059. console.log("MQTT连接已断开");
  1060. }
  1061. },
  1062. },
  1063. onShow() {
  1064. this.clientIdProp = uni.getStorageSync("clientIDetail");
  1065. this.isInitAlarm = true;
  1066. this.todayDate = this.$time(new Date(), 2);
  1067. this.connectMqtt();
  1068. },
  1069. onLoad(options) {
  1070. const devItem = this.parseDeviceItem(options.devItem);
  1071. const { devId, clientId } = devItem;
  1072. this.getFrequency(clientId);
  1073. this.getdevInfo(devId);
  1074. this.getdevRoomInfo(devId);
  1075. this.autoPlayinterval = setTimeout(() => {
  1076. this.autoSwipe();
  1077. }, 3000);
  1078. this.getCurrentDate();
  1079. },
  1080. onUnload() {
  1081. this.isInitAlarm = false;
  1082. this.inactivityTimer = null;
  1083. this.autoPlayinterval = null;
  1084. this.closemqtTwo();
  1085. },
  1086. onHide() {
  1087. this.inactivityTimer = null;
  1088. this.autoPlayinterval = null;
  1089. this.isInitAlarm = false;
  1090. this.closemqtTwo();
  1091. },
  1092. };
  1093. </script>
  1094. <style lang="less" scoped>
  1095. .content {
  1096. height: 100vh;
  1097. background: linear-gradient(180deg, #faede2 0%, #f4f4f4 100%);
  1098. box-sizing: border-box;
  1099. padding-top: 20rpx;
  1100. .name_box {
  1101. display: flex;
  1102. justify-content: center;
  1103. align-items: center;
  1104. margin: 0 auto 37rpx 0;
  1105. .name_content {
  1106. display: inline-flex;
  1107. background: rgba(255, 255, 255, 0.65);
  1108. border-radius: 37rpx;
  1109. padding: 6rpx 18rpx;
  1110. }
  1111. }
  1112. .radar-box {
  1113. margin: 0 auto;
  1114. position: relative;
  1115. display: flex;
  1116. align-items: center;
  1117. justify-content: center;
  1118. width: 710rpx;
  1119. height: 710rpx;
  1120. background: #ffffff;
  1121. border-radius: 37.5rpx;
  1122. box-sizing: border-box;
  1123. .center {
  1124. position: absolute;
  1125. background-color: #fff;
  1126. border: 14rpx solid #333333;
  1127. background-image: url("http://jkld.radar-power.com//uploadFiles/framework/file/20250620/toilet_bg.png");
  1128. background-repeat: no-repeat;
  1129. background-position: center;
  1130. transform: scale(1.3);
  1131. .moduleContent {
  1132. position: relative;
  1133. view {
  1134. position: absolute;
  1135. }
  1136. .module-img {
  1137. width: 100%;
  1138. height: 100%;
  1139. display: block;
  1140. }
  1141. }
  1142. }
  1143. .tranStyle {
  1144. position: absolute;
  1145. background-color: #fff;
  1146. border: 9rpx solid #333333;
  1147. background-image: url("http://jkld.radar-power.com//uploadFiles/framework/file/20250620/toilet_bg.png");
  1148. background-repeat: no-repeat;
  1149. background-position: center;
  1150. transform: scale(2.2);
  1151. .moduleContent {
  1152. overflow: hidden;
  1153. // position: relative;
  1154. view {
  1155. position: absolute;
  1156. }
  1157. .module-img {
  1158. width: 100%;
  1159. height: 100%;
  1160. display: block;
  1161. }
  1162. }
  1163. }
  1164. .action-icon-G {
  1165. position: absolute;
  1166. width: 100rpx;
  1167. height: 100rpx;
  1168. }
  1169. .action-icon-M {
  1170. // position: absolute;
  1171. width: 50rpx;
  1172. height: 50rpx;
  1173. }
  1174. .redar-pic {
  1175. position: absolute;
  1176. left: 50%;
  1177. top: 50%;
  1178. width: 40rpx;
  1179. height: 40rpx;
  1180. transform: translate(-50%, -50%); /* 先居中 */
  1181. }
  1182. }
  1183. .switchBox {
  1184. width: 710rpx;
  1185. height: 94rpx;
  1186. margin: 18rpx auto;
  1187. padding: 0 37rpx;
  1188. display: flex;
  1189. align-items: center;
  1190. background: #ffffff;
  1191. border-radius: 37rpx;
  1192. box-sizing: border-box;
  1193. .name {
  1194. color: #111111;
  1195. font-size: 32rpx;
  1196. }
  1197. }
  1198. .notice-info {
  1199. width: 710rpx;
  1200. max-height: 300rpx;
  1201. overflow: hidden;
  1202. padding: 30rpx 37rpx 10rpx 37rpx;
  1203. background: #ffffff;
  1204. border-radius: 37rpx;
  1205. box-sizing: border-box;
  1206. margin: 0 auto;
  1207. .notice_title {
  1208. display: flex;
  1209. align-items: space-between;
  1210. image {
  1211. margin-left: auto;
  1212. width: 30rpx;
  1213. height: 30rpx;
  1214. }
  1215. }
  1216. .title {
  1217. margin-top: 10rpx;
  1218. margin-bottom: 10rpx;
  1219. font-family: PingFang SC, PingFang SC;
  1220. font-weight: 500;
  1221. font-size: 34rpx;
  1222. color: #1757dd;
  1223. display: flex;
  1224. align-items: center;
  1225. justify-content: space-between;
  1226. .title-text {
  1227. font-size: 28rpx;
  1228. font-weight: 500;
  1229. color: #1757dd;
  1230. }
  1231. .title-btn {
  1232. font-size: 28rpx;
  1233. font-weight: 500;
  1234. color: #5a5a5a;
  1235. }
  1236. }
  1237. .stayDetail {
  1238. height: 80rpx;
  1239. overflow: hidden;
  1240. margin-top: 10rpx;
  1241. margin-bottom: 10rpx;
  1242. padding-left: 20rpx;
  1243. font-family: PingFang SC, PingFang SC;
  1244. font-weight: 500;
  1245. font-size: 34rpx;
  1246. .stayDetail-item {
  1247. display: flex;
  1248. padding-bottom: 5rpx !important;
  1249. padding-top: 10rpx !important;
  1250. box-sizing: border-box;
  1251. line-height: 60rpx;
  1252. .stayDetail-text {
  1253. width: 40%;
  1254. font-size: 28rpx;
  1255. height: 30rpx !important;
  1256. }
  1257. .stayDetail-btn {
  1258. padding-left: 30rpx;
  1259. font-size: 28rpx;
  1260. height: 30rpx !important;
  1261. }
  1262. }
  1263. }
  1264. }
  1265. .box {
  1266. position: fixed;
  1267. bottom: 0;
  1268. left: 0;
  1269. width: 100vw;
  1270. height: 168rpx;
  1271. padding: 0 37rpx;
  1272. background: #ffffff;
  1273. box-sizing: border-box;
  1274. .handle-btn {
  1275. margin-top: 40rpx;
  1276. display: flex;
  1277. align-items: center;
  1278. justify-content: space-between;
  1279. .btn1 {
  1280. display: flex;
  1281. align-items: center;
  1282. justify-content: center;
  1283. width: 155rpx;
  1284. height: 94rpx;
  1285. background: #ffebe4;
  1286. border-radius: 28rpx;
  1287. font-weight: 500;
  1288. color: #111111;
  1289. font-size: 32rpx;
  1290. text-align: center;
  1291. }
  1292. .btn2 {
  1293. display: flex;
  1294. align-items: center;
  1295. justify-content: center;
  1296. width: 328rpx;
  1297. height: 94rpx;
  1298. background: linear-gradient(
  1299. 105.95deg,
  1300. #a27867 0%,
  1301. #74483d 100%
  1302. );
  1303. border-radius: 28rpx;
  1304. box-shadow: 0rpx 4.69rpx 18.75rpx rgba(72, 41, 29, 0.15),
  1305. 0rpx 9.38rpx 9.38rpx rgba(154, 132, 89, 0.2),
  1306. 0rpx -4.69rpx 28.13rpx 4.69rpx #a16647 inset;
  1307. font-family: MiSans;
  1308. font-weight: 500;
  1309. color: #ffffff;
  1310. font-size: 32rpx;
  1311. }
  1312. .closeBreath {
  1313. display: flex;
  1314. align-items: center;
  1315. justify-content: center;
  1316. width: 328rpx;
  1317. height: 94rpx;
  1318. background: #ffebe4;
  1319. border-radius: 28rpx;
  1320. font-weight: 500;
  1321. color: #111111;
  1322. font-size: 32rpx;
  1323. text-align: center;
  1324. }
  1325. }
  1326. }
  1327. /* 弹窗部分样式 */
  1328. .mask {
  1329. position: fixed;
  1330. left: 0;
  1331. top: 0;
  1332. right: 0;
  1333. bottom: 0;
  1334. background: rgba(0, 0, 0, 0.3);
  1335. z-index: 100;
  1336. }
  1337. .share-modal {
  1338. position: fixed;
  1339. left: 0;
  1340. right: 0;
  1341. bottom: 0;
  1342. background: #fff;
  1343. border-radius: 24rpx 24rpx 0 0;
  1344. z-index: 101;
  1345. height: 750rpx;
  1346. .modal-header {
  1347. display: flex;
  1348. justify-content: space-between;
  1349. align-items: center;
  1350. padding: 32rpx 32rpx 0 32rpx;
  1351. font-size: 30rpx;
  1352. .cancel-btn {
  1353. color: #888;
  1354. font-size: 32rpx;
  1355. }
  1356. .modal-title {
  1357. color: #111111;
  1358. font-size: 36rpx;
  1359. }
  1360. .confirm-btn {
  1361. color: #996e5f;
  1362. font-size: 32rpx;
  1363. }
  1364. }
  1365. .modal-body {
  1366. padding: 50rpx;
  1367. .info-row {
  1368. display: flex;
  1369. margin-bottom: 24rpx;
  1370. font-size: 28rpx;
  1371. padding: 0 20rpx;
  1372. .label {
  1373. color: #111111;
  1374. width: 200rpx;
  1375. font-size: 32rpx;
  1376. text-align-last: justify;
  1377. }
  1378. .value {
  1379. text-align: right;
  1380. width: 65%;
  1381. color: #111111;
  1382. font-size: 32rpx;
  1383. }
  1384. }
  1385. .input-row {
  1386. display: flex;
  1387. align-items: center;
  1388. margin-top: 32rpx;
  1389. border-radius: 40rpx;
  1390. background: #f7f7f7;
  1391. padding: 0 24rpx;
  1392. height: 80rpx;
  1393. .input {
  1394. text-align: right;
  1395. flex: 1;
  1396. border: none;
  1397. background: transparent;
  1398. font-size: 28rpx;
  1399. color: #333;
  1400. }
  1401. }
  1402. .funChoice {
  1403. .funItem {
  1404. .simple-radio {
  1405. display: flex;
  1406. align-items: center;
  1407. padding: 20rpx 0;
  1408. }
  1409. }
  1410. }
  1411. }
  1412. }
  1413. // 分享弹窗样式
  1414. .modal-mask {
  1415. position: fixed;
  1416. top: 0;
  1417. left: 0;
  1418. right: 0;
  1419. bottom: 0;
  1420. background: rgba(0, 0, 0, 0.5);
  1421. display: flex;
  1422. justify-content: center;
  1423. align-items: center;
  1424. z-index: 333;
  1425. .modal-container {
  1426. width: 80%;
  1427. background: #fff;
  1428. border-radius: 16rpx;
  1429. overflow: hidden;
  1430. animation: fadeIn 0.3s;
  1431. .modal-header {
  1432. padding: 30rpx;
  1433. text-align: center;
  1434. border-bottom: 1rpx solid #f5f5f5;
  1435. .title {
  1436. font-size: 36rpx;
  1437. display: block;
  1438. margin-bottom: 10rpx;
  1439. }
  1440. }
  1441. .modal-buttons {
  1442. display: flex;
  1443. flex-direction: column;
  1444. padding: 20rpx;
  1445. .btn {
  1446. flex: 1;
  1447. height: 90rpx;
  1448. margin: 15rpx 0;
  1449. border-radius: 45rpx;
  1450. display: flex;
  1451. align-items: center;
  1452. justify-content: center;
  1453. font-size: 32rpx;
  1454. border: none;
  1455. background: none;
  1456. position: relative;
  1457. }
  1458. .btn-icon {
  1459. width: 40rpx;
  1460. height: 40rpx;
  1461. margin-right: 15rpx;
  1462. }
  1463. .phone-btn {
  1464. background: linear-gradient(
  1465. 105.95deg,
  1466. #ba978a 0%,
  1467. #a27867 100%
  1468. );
  1469. color: white;
  1470. }
  1471. .link-btn {
  1472. background: linear-gradient(
  1473. 105.95deg,
  1474. #a27867 0%,
  1475. #74483d 100%
  1476. );
  1477. color: white;
  1478. }
  1479. }
  1480. }
  1481. }
  1482. .echartsClass {
  1483. position: absolute;
  1484. width: 650rpx;
  1485. height: 600rpx;
  1486. top: -8%;
  1487. left: -37%;
  1488. transform: translate(50%, 50%);
  1489. background: #ffffff;
  1490. .closePng {
  1491. width: 40rpx;
  1492. height: 40rpx;
  1493. position: fixed;
  1494. top: 10rpx;
  1495. right: 10rpx;
  1496. z-index: 999;
  1497. }
  1498. }
  1499. }
  1500. </style>