equipmentStatusList.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. <!-- 机器状态页面 -->
  2. <template>
  3. <view v-if="merchantList.length>1">
  4. <uni-collapse :accordion="true">
  5. <view class="titleFlag">
  6. <image class="img" src="../../static/img/red.png"></image>
  7. <font class="wenziT">红色代表机器报警</font>
  8. <image class="img" src="../../static/img/green.png"></image>
  9. <font class="wenziT">绿色代表机器正常</font>
  10. </view>
  11. <view class="titlelist" v-for="(merchant,index) in merchantList" :key="merchant.id">
  12. <uni-collapse-item :title="getMerchantTitle(merchant)" :open="index===0">
  13. <view style="padding: 20upx;background-color: aliceblue;">
  14. <view v-if="merchant.equipmentList.length==0" style="text-align: center;">暂无数据</view>
  15. <view v-if="merchant.equipmentList.length>0">
  16. <uni-collapse :show-animation="true">
  17. <view style="position: relative;" v-for="equipment in merchant.equipmentList" :key="equipment.id">
  18. <span class="status-css" :class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
  19. <uni-collapse-item :title="getEquipmentTitle(equipment)">
  20. <view style="padding: 20upx;background-color: antiquewhite;">
  21. <view class="swithBox" v-if="equipment.isSleep">
  22. <view class="swichFont">睡眠状态:机器已睡眠</view>
  23. <view class="switch">
  24. <switch style="transform:scale(0.65)" checked @change="change(equipment.id,0)" />
  25. </view>
  26. </view>
  27. <view class="swithBox" v-else>
  28. <view class="swichFont">睡眠状态:未睡眠</view>
  29. <view class="switch">
  30. <switch style="transform:scale(0.65)" :checked="sleepChecked" @change="change(equipment.id,1)" />
  31. </view>
  32. </view>
  33. <view class="line1"></view>
  34. <view class="swithBox" v-if="equipment.eqeStatus==0">
  35. <view class="swichFont">关机:已关机</view>
  36. <view class="switch">
  37. <switch style="transform:scale(0.65)" checked @change="OnOff(equipment.id,1)" />
  38. </view>
  39. </view>
  40. <view class="swithBox" v-else>
  41. <view class="swichFont">关机:未关机</view>
  42. <view class="switch">
  43. <switch style="transform:scale(0.65)" :checked="onffChecked" @change="OnOff(equipment.id,0)" />
  44. </view>
  45. </view>
  46. <view class="line1"></view>
  47. <view><span>机器唯一码:</span><span>{{equipment.clientId}}</span></view>
  48. <view><span>所在地:</span><span>{{equipment.fullName?equipment.fullName:''}}</span></view>
  49. <view><span>炉头温度:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
  50. <view><span>柜内湿度:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
  51. <view><span>柜内温度:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
  52. <view v-if="equipment.hasTodayAlarm">
  53. <view><span>报警内容:</span></view>
  54. <view v-for="(alarm,index) in equipment.alarmList" :key="index">
  55. <view><span class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}} {{alarm.alarmContent}}
  56. <button v-if="alarm.isEliminate==1" style="color:#BEBEBE;" @click="eliminate(alarm.id)" class="eliminateButton">
  57. <p class="p">已消除</p>
  58. </button>
  59. <button v-if="alarm.isEliminate!=1" type="primary" @click="eliminate(alarm.id)" class="eliminateButton">
  60. <p class="p">消除</p>
  61. </button>
  62. </span></view>
  63. </view>
  64. </view>
  65. <view v-else>
  66. <view><span>报警内容:</span><span>{{equipment.occurrenceTime?equipment.occurrenceTime:''}}
  67. {{equipment.alarmContent}}</span></view>
  68. </view>
  69. </view>
  70. </uni-collapse-item>
  71. </view>
  72. </uni-collapse>
  73. </view>
  74. </view>
  75. </uni-collapse-item>
  76. </view>
  77. </uni-collapse>
  78. </view>
  79. <view v-else>
  80. <uni-collapse :show-animation="true">
  81. <view class="titleFlag">
  82. <image class="img" src="../../static/img/red.png"></image>
  83. <font class="wenziT">{{$t('equipmentStatusList.red')}}</font>
  84. <image class="img" src="../../static/img/green.png"></image>
  85. <font class="wenziT">{{$t('equipmentStatusList.green')}}</font>
  86. </view>
  87. <view class="titlelist" style="position: relative;" v-for="equipment in merchantList[0].equipmentList" :key="equipment.id">
  88. <span class="status-css" :class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
  89. <uni-collapse-item :title="getEquipmentTitle(equipment)">
  90. <!-- 睡眠 -->
  91. <view style="padding: 20upx;background-color: antiquewhite;">
  92. <view class="swithBox" v-if="equipment.isSleep">
  93. <view class="swichFont">{{$t('equipmentStatusList.sleep')}}</view>
  94. <view class="switch">
  95. <switch style="transform:scale(0.65)" checked @change="change(equipment.id,0)" />
  96. </view>
  97. </view>
  98. <view class="swithBox" v-else>
  99. <view class="swichFont">{{$t('equipmentStatusList.unsleep')}}</view>
  100. <view class="switch">
  101. <switch style="transform:scale(0.65)" :checked="sleepChecked" @change="change(equipment.id,1)" />
  102. </view>
  103. </view>
  104. <view class="line1"></view>
  105. <!-- 一键重启 -->
  106. <view class="opendoor"><span>{{$t('equipmentStatusList.reboot')}}:</span>
  107. <view class="">
  108. <button type="primary" @click="reboot(equipment.id)" class="button">
  109. <p class="p">{{$t('equipmentStatusList.reset')}}</p>
  110. </button>
  111. </view>
  112. </view>
  113. <view class="line1"></view>
  114. <!-- 关机 -->
  115. <view class="" v-if="globalUser.open==0">
  116. <!-- 已关机 -->
  117. <view class="swithBox" v-if="equipment.eqeStatus==0">
  118. <view class="swichFont1">{{$t('equipmentStatusList.off')}}</view>
  119. <view class="switch1">
  120. <!-- <switch style="transform:scale(0.65)" checked @change="OnOff(equipment.id,1)" /> -->
  121. <button style="color:#BEBEBE;" @click="OnOff(equipment.id,1)" class="button">
  122. <p class="p">{{$t('equipmentStatusList.kaiqi')}}</p>
  123. </button>
  124. <button type="primary" @click="OnOff(equipment.id,0)" class="button">
  125. <p class="p">{{$t('equipmentStatusList.guanbi')}}</p>
  126. </button>
  127. </view>
  128. </view>
  129. <!-- 已开机 -->
  130. <view class="swithBox" v-else>
  131. <view class="swichFont1">{{$t('equipmentStatusList.on')}}</view>
  132. <view class="switch1">
  133. <!-- <switch style="transform:scale(0.65)" :checked="onffChecked" @change="OnOff(equipment.id,0)" /> -->
  134. <button type="primary" @click="OnOff(equipment.id,1)" class="button">
  135. <p class="p">{{$t('equipmentStatusList.kaiqi')}}</p>
  136. </button>
  137. <button style="color:#BEBEBE;" @click="OnOff(equipment.id,0)" class="button">
  138. <p class="p">{{$t('equipmentStatusList.guanbi')}}</p>
  139. </button>
  140. </view>
  141. </view>
  142. </view>
  143. <view class="line1"></view>
  144. <!-- 一键重启 -->
  145. <!-- <view class="opendoor"><span>{{$t('equipmentStatusList.reboot')}}:</span>
  146. <view class="">
  147. <button type="primary" @click="reboot(equipment.id)" class="button">
  148. <p class="p">{{$t('equipmentStatusList.reset')}}</p>
  149. </button>
  150. </view>
  151. </view>
  152. <view class="line1"></view> -->
  153. <!-- 远程开门 -->
  154. <view class="opendoor"><span>{{$t('equipmentStatusList.door')}}:</span>
  155. <view class="">
  156. <button type="primary" @click="openDoor(equipment.id)" class="button">
  157. <p class="p">{{$t('equipmentStatusList.open')}}</p>
  158. </button>
  159. </view>
  160. </view>
  161. <!-- 查看定位 -->
  162. <view class="opendoor"><span>{{$t('equipmentStatusList.gps')}}:</span>
  163. <view class="">
  164. <button type="primary" @click="lookMap(equipment.id,equipment.longitude,equipment.latitude)" class="button">
  165. <p class="p">{{$t('equipmentStatusList.look')}}</p>
  166. </button>
  167. </view>
  168. </view>
  169. <view><span>{{$t('equipmentStatusList.equipmentNo')}}:</span><span>{{equipment.clientId}}</span></view>
  170. <view><span>{{$t('equipmentStatusList.area')}}:</span><span>{{equipment.fullName?equipment.fullName:''}}</span></view>
  171. <view><span>{{$t('equipmentStatusList.temperature')}}:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
  172. <view><span>{{$t('equipmentStatusList.humidity')}}:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
  173. <view><span>{{$t('equipmentStatusList.equipmentTemperature')}}:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
  174. <view><span>最近刷新时间:</span><span>{{equipment.lastUpdateTime}}</span></view>
  175. <view><span>音量:</span><span>{{equipment.volume?equipment.volume:''}}</span></view>
  176. <view class="" v-if="equipment.hasTodayAlarm">
  177. <view><span>{{$t('equipmentStatusList.alarm')}}:</span></view>
  178. <view v-for="(alarm,index) in equipment.alarmList" :key="index">
  179. <view>
  180. <span class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}} {{alarm.alarmContent}}
  181. <button v-if="alarm.isEliminate==1" style="color:#BEBEBE;" @click="eliminate(alarm.id)" class="eliminateButton">
  182. <p class="p">{{$t('equipmentStatusList.yixiaochu')}}</p>
  183. </button>
  184. <button v-if="alarm.isEliminate!=1" type="primary" @click="eliminate(alarm.id)" class="eliminateButton">
  185. <p class="p">{{$t('equipmentStatusList.xiaochu')}}</p>
  186. </button>
  187. </span>
  188. </view>
  189. </view>
  190. </view>
  191. <view class="" v-else>
  192. <view><span>{{$t('equipmentStatusList.alarm')}}:</span><span>{{equipment.occurrenceTime?equipment.occurrenceTime:''}}
  193. {{equipment.alarmContent}}</span></view>
  194. </view>
  195. </view>
  196. </uni-collapse-item>
  197. </view>
  198. </uni-collapse>
  199. </view>
  200. </template>
  201. <script>
  202. import {
  203. mapState,
  204. mapActions,
  205. mapMutations
  206. } from 'vuex'
  207. import uniCollapse from '@/components/uni-collapse/uni-collapse.vue'
  208. import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue'
  209. import uniList from '@/components/uni-list/uni-list.vue'
  210. import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
  211. import {
  212. dateUtils
  213. } from '@/common/util.js';
  214. export default {
  215. components: {
  216. uniCollapse,
  217. uniCollapseItem,
  218. uniList,
  219. uniListItem,
  220. },
  221. data() {
  222. return {
  223. globalUser: {},
  224. merchantList: [{
  225. equipmentList: []
  226. }],
  227. extraIcon: {
  228. color: '#4cd964',
  229. size: '22',
  230. type: 'spinner'
  231. },
  232. statusNormal: 'status-normal',
  233. statusError: 'status-error',
  234. sleepChecked: null,
  235. onffChecked: null,
  236. time: null,
  237. timeAll: {
  238. },
  239. input: 0,
  240. }
  241. },
  242. computed: {
  243. ...mapState(['loginUser']),
  244. },
  245. onPullDownRefresh() {
  246. this.getEquipmentListData();
  247. },
  248. onShow() {
  249. this.input = this.input + 1;
  250. this.globalUser = uni.getStorageSync("globalUser");
  251. uni.setNavigationBarTitle({
  252. title: this.$t('equipmentStatusList.title')
  253. });
  254. uni.setTabBarItem({
  255. index: 3,
  256. text: this.$t('tabs.tab4')
  257. });
  258. var token = uni.getStorageSync("token");
  259. if (token.length > 1) {
  260. this.getEquipmentListData();
  261. } else {
  262. uni.reLaunch({
  263. url: '../Login/Login',
  264. });
  265. }
  266. },
  267. methods: {
  268. ...mapActions('chart', ['getEquipmentListByUser']),
  269. getMerchantTitle(merchant) {
  270. return merchant.name ? merchant.name : merchant.username;
  271. },
  272. getEquipmentTitle(equipment) {
  273. return equipment.name ? equipment.name : '暂无名称';
  274. },
  275. getEquipmentListData() {
  276. this.getEquipmentListByUser(this.globalUser)
  277. .then(data => {
  278. this.merchantList = data;
  279. var listName = data[0].equipmentList;
  280. var times = new Map;
  281. if (this.input == 1) {
  282. for (var i = 0; i < listName.length; i++) {
  283. var k = listName[i].id;
  284. times.set(k, null);
  285. }
  286. this.timeAll = times;
  287. }
  288. var listId = data[0].id;
  289. if (listId != null && listId != '1') {
  290. uni.setStorageSync("listName", listName);
  291. }
  292. uni.stopPullDownRefresh();
  293. }, _ => void uni.stopPullDownRefresh());
  294. },
  295. //查看经纬度
  296. lookMap(id,longitude,latitude){
  297. var item={};
  298. item["id"] = id;
  299. item["longitude"] = longitude;
  300. item["latitude"] = latitude;
  301. uni.navigateTo({
  302. // url:'map?item='+ encodeURIComponent(JSON.stringify(item))
  303. url:'../../packageA/pages/equipmentStatus/map?item='+ encodeURIComponent(JSON.stringify(item))
  304. // url:'GoogleMap?item='+ encodeURIComponent(JSON.stringify(item))
  305. // url: '/pages/user/map?item='+ encodeURIComponent(JSON.stringify(item))
  306. });
  307. },
  308. //一键重启
  309. reboot(id){
  310. var that = this;
  311. uni.showModal({
  312. title: that.$t('equipmentStatusList.tip'),
  313. content: that.$t('equipmentStatusList.rebootTip'),
  314. success: function(res) {
  315. var serverurl = that.serverurl;
  316. var code = "1";
  317. var equipmentId = id;
  318. var token = uni.getStorageSync("token");
  319. uni.request({
  320. url: serverurl + '/TEquipment/onOff',
  321. data: {
  322. "adminId": code,
  323. "equipmentId": equipmentId
  324. },
  325. method: "POST",
  326. header: {
  327. 'token': token
  328. },
  329. success: (res) => {
  330. var list = res.data.data;
  331. if (list == "SUCCESS") {
  332. uni.showModal({
  333. title: that.$t('equipmentStatusList.kaiji'),
  334. content: '发送成功',
  335. success: function(res) {
  336. }
  337. })
  338. } else {
  339. uni.showModal({
  340. title: that.$t('equipmentStatusList.error'),
  341. content: that.$t('equipmentStatusList.kaijierror'),
  342. success: function(res) {
  343. }
  344. })
  345. }
  346. }
  347. });
  348. }
  349. })
  350. },
  351. OnOff(id, code) {
  352. var that = this;
  353. // var token = uni.getStorageSync("token");
  354. // uni.request({
  355. // url: that.serverurl + '/TEquipment/onoffStatus',
  356. // data: {
  357. // "equipmentId": id
  358. // },
  359. // header:{
  360. // 'token':token
  361. // },
  362. // method: "POST",
  363. // success: (res) => {
  364. // },
  365. // });
  366. var ddd = this.timeAll.get(id);
  367. if (that.timeAll.get(id) != null) {
  368. var stamp = Date.parse(new Date());
  369. var t = (stamp - that.timeAll.get(id)) / 1000;
  370. if (t < 30) {
  371. var s = 30 - t;
  372. uni.showModal({
  373. title: that.$t('equipmentStatusList.onoff'),
  374. content: that.$t('equipmentStatusList.remainingtime') + s + "s",
  375. success: function(res) {
  376. that.getEquipmentListData();
  377. }
  378. });
  379. return;
  380. }
  381. }
  382. var code1 = code;
  383. if (code1 == 0) {
  384. uni.showModal({
  385. title: that.$t('equipmentStatusList.tip'),
  386. content: that.$t('equipmentStatusList.onoffTip'),
  387. success: function(res) {
  388. if (res.confirm) {
  389. var serverurl = that.serverurl;
  390. var code2 = code1;
  391. var equipmentId = id;
  392. var token = uni.getStorageSync("token");
  393. uni.request({
  394. url: serverurl + '/TEquipment/onOff',
  395. data: {
  396. "adminId": code2,
  397. "equipmentId": equipmentId
  398. },
  399. method: "POST",
  400. header: {
  401. 'token': token
  402. },
  403. success: (res) => {
  404. var list = res.data.data;
  405. that.input = 2;
  406. var timestamp = Date.parse(new Date());
  407. that.timeAll.set(id, timestamp);
  408. var oo = that.timeAll;
  409. // that.time = timestamp;
  410. that.getEquipmentListData();
  411. if (list == 'SUCCESS') {
  412. uni.showModal({
  413. title: that.$t('equipmentStatusList.guanji'),
  414. content: that.$t('equipmentStatusList.tishi'),
  415. success: function(res) {
  416. that.getEquipmentListData();
  417. setTimeout(function() {
  418. that.network(id);
  419. }, 7000);
  420. }
  421. })
  422. } else {
  423. uni.showModal({
  424. title: that.$t('equipmentStatusList.error'),
  425. content: that.$t('equipmentStatusList.guanjierror'),
  426. success: function(res) {
  427. that.onffChecked = true;
  428. that.getEquipmentListData();
  429. }
  430. })
  431. }
  432. }
  433. });
  434. } else if (res.cancel) {
  435. that.onffChecked = false;
  436. that.getEquipmentListData();
  437. }
  438. }
  439. });
  440. } else {
  441. var serverurl = that.serverurl;
  442. var code = code;
  443. var equipmentId = id;
  444. var token = uni.getStorageSync("token");
  445. uni.request({
  446. url: serverurl + '/TEquipment/onOff',
  447. data: {
  448. "adminId": code,
  449. "equipmentId": equipmentId
  450. },
  451. method: "POST",
  452. header: {
  453. 'token': token
  454. },
  455. success: (res) => {
  456. that.input = 2;
  457. var list = res.data.data;
  458. that.getEquipmentListData();
  459. var timestamp = Date.parse(new Date());
  460. that.timeAll.set(id, timestamp);
  461. var oo = that.timeAll;
  462. // that.time = timestamp;
  463. if (list == "SUCCESS") {
  464. uni.showModal({
  465. title: that.$t('equipmentStatusList.kaiji'),
  466. content: that.$t('equipmentStatusList.tishi'),
  467. success: function(res) {
  468. that.getEquipmentListData();
  469. setTimeout(function() {
  470. that.network(id);
  471. }, 7000);
  472. }
  473. })
  474. } else {
  475. uni.showModal({
  476. title: that.$t('equipmentStatusList.error'),
  477. content: that.$t('equipmentStatusList.kaijierror'),
  478. success: function(res) {
  479. that.onffChecked = false;
  480. that.getEquipmentListData();
  481. }
  482. })
  483. }
  484. }
  485. });
  486. }
  487. },
  488. eliminate(id) {
  489. var token = uni.getStorageSync("token");
  490. uni.request({
  491. url: this.serverurl + '/TEquipment/eliminate',
  492. data: {
  493. "id": id
  494. },
  495. method: "POST",
  496. header: {
  497. 'token': token
  498. },
  499. success: (res) => {
  500. uni.showToast({
  501. title: "发送成功",
  502. icon: 'none',
  503. duration: 1000
  504. });
  505. this.getEquipmentListData();
  506. }
  507. });
  508. },
  509. network(id) {
  510. console.log("network");
  511. var token = uni.getStorageSync("token");
  512. var equipmentId = id;
  513. uni.request({
  514. url: this.serverurl + '/TEquipment/checkStatus',
  515. data: {
  516. "equipmentId": id
  517. },
  518. method: "POST",
  519. header: {
  520. 'token': token
  521. },
  522. success: (res) => {
  523. var data = res.data.data;
  524. if (data == 'fail') {
  525. uni.showToast({
  526. title: this.$t('equipmentStatusList.network'),
  527. icon: 'none',
  528. duration: 3000
  529. });
  530. this.getEquipmentListData();
  531. }
  532. }
  533. });
  534. },
  535. openDoor(id) {
  536. var token = uni.getStorageSync("token");
  537. uni.request({
  538. url: this.serverurl + '/TEquipment/openDoor',
  539. data: {
  540. "equipmentId": id
  541. },
  542. method: "POST",
  543. header: {
  544. 'token': token
  545. },
  546. success: (res) => {
  547. uni.showModal({
  548. title: this.$t('equipmentStatusList.open'),
  549. content: this.$t('equipmentStatusList.opensuccess'),
  550. success: function(res) {
  551. }
  552. })
  553. }
  554. });
  555. },
  556. change(id, code) {
  557. var that = this;
  558. var code1 = code;
  559. if (code1 == 1) {
  560. uni.showModal({
  561. title: that.$t('equipmentStatusList.tip'),
  562. content: that.$t('equipmentStatusList.sleepTip'),
  563. success: function(res) {
  564. if (res.confirm) {
  565. var serverurl = that.serverurl;
  566. var code2 = code1;
  567. var equipmentId = id;
  568. var token = uni.getStorageSync("token");
  569. uni.request({
  570. url: serverurl + '/TEquipment/sleep',
  571. data: {
  572. "adminId": code2,
  573. "equipmentId": equipmentId
  574. },
  575. method: "POST",
  576. header: {
  577. 'token': token
  578. },
  579. success: (res) => {
  580. var list = res.data.data;
  581. that.getEquipmentListData();
  582. }
  583. });
  584. } else if (res.cancel) {
  585. that.sleepChecked = false;
  586. that.getEquipmentListData();
  587. }
  588. }
  589. });
  590. } else {
  591. var serverurl = that.serverurl;
  592. var code = code;
  593. var equipmentId = id;
  594. var token = uni.getStorageSync("token");
  595. uni.request({
  596. url: serverurl + '/TEquipment/sleep',
  597. data: {
  598. "adminId": code,
  599. "equipmentId": equipmentId
  600. },
  601. method: "POST",
  602. header: {
  603. 'token': token
  604. },
  605. success: (res) => {
  606. var list = res.data.data;
  607. that.getEquipmentListData();
  608. }
  609. });
  610. }
  611. },
  612. }
  613. }
  614. </script>
  615. <style>
  616. .status-css {
  617. position: absolute;
  618. width: 30upx;
  619. height: 30upx;
  620. right: 86upx;
  621. top: 30upx;
  622. border-radius: 30upx;
  623. color: "#596D83";
  624. font-size: 12upx;
  625. }
  626. .status-error {
  627. background-color: #dd524d
  628. }
  629. .status-normal {
  630. background-color: #4cd964
  631. }
  632. .baojing {
  633. display: flex;
  634. flex-direction: row;
  635. padding-left: 20upx;
  636. }
  637. .titleFlag {
  638. height: 56upx;
  639. background-color: #F8F8F8;
  640. color: #8C959F;
  641. font-size: 22upx;
  642. display: flex;
  643. flex-direction: row;
  644. }
  645. .opendoor {
  646. /* #ifdef H5 */
  647. /* #endif */
  648. padding-top: 10upx;
  649. padding-bottom: 10upx;
  650. /* text-align: center; */
  651. display: flex;
  652. flex-direction: row;
  653. }
  654. .button {
  655. /* #ifdef H5 */
  656. text-align: center;
  657. height: 50upx;
  658. weight: 20upx;
  659. /* #endif */
  660. padding-left: 15upx;
  661. /* padding-top: 2upx; */
  662. }
  663. .eliminateButton {
  664. /* #ifdef H5 */
  665. text-align: center;
  666. height: 50upx;
  667. weight: 20upx;
  668. /* #endif */
  669. padding-left: 15upx;
  670. /* padding-top: 2upx; */
  671. }
  672. .p {
  673. /* #ifdef H5 */
  674. font-size: 28upx;
  675. height: 50upx;
  676. weight: 20upx;
  677. transform: translateY(-14upx);
  678. /* text-align: center; */
  679. /* #endif */
  680. /* padding-bottom: 50upx; */
  681. text-align: center;
  682. padding-left: 13upx;
  683. }
  684. .img {
  685. padding-top: 20upx;
  686. padding-left: 30upx;
  687. width: 15upx;
  688. height: 15upx;
  689. }
  690. .wenziT {
  691. padding-top: 10upx;
  692. padding-left: 10upx;
  693. }
  694. .titlelist {
  695. color: #363D44;
  696. font-size: 16upx;
  697. font-family: "PingFang-SC-Medium";
  698. }
  699. .swithBox {
  700. display: flex;
  701. flex-direction: row;
  702. padding-bottom: 15upx;
  703. padding-top: 5upx;
  704. }
  705. .switch {
  706. width: 100upx;
  707. height: 22upx;
  708. }
  709. .switch1 {
  710. display: flex;
  711. flex-direction: row;
  712. width: 35%;
  713. height: 42upx;
  714. padding-top: 13upx;
  715. padding-left: 72upx;
  716. }
  717. .swichFont {
  718. width: 85%;
  719. padding-top: 12upx;
  720. }
  721. .swichFont1 {
  722. width: 55%;
  723. padding-top: 12upx;
  724. }
  725. .line1 {
  726. width: 100%;
  727. height: 3upx;
  728. background: #000000;
  729. }
  730. </style>