Forecast.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  1. <template>
  2. <view class="content">
  3. <!-- <third-comp :key="menuKey"></third-comp> -->
  4. <view v-if="toggleSwitch==false">
  5. <view>
  6. <cu-custom bgColor="bg-blacks" :isBack="false">
  7. <block slot="right"><image src="../../static/picture/fourLine.png" style="width: 30px;height: 30px;margin-left: 2%;" @tap="openDrawer"></image></block>
  8. <block slot="right">
  9. <view class="icon cuIcon-notice text-white" v-if="badge != 0" style="margin-left: -70%;">
  10. <view class="cu-tag looknumber" style="margin-top: -2%;">
  11. <block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block>
  12. </view>
  13. </view>
  14. </block>
  15. <block slot="right"></block>
  16. <block slot="content">{{ address }}</block>
  17. <block slot="right"><view class="plus" @tap="showModal" data-target="viewModal">+</view></block>
  18. </cu-custom>
  19. </view>
  20. <!-- 地图组件 -->
  21. <view>
  22. <div><drawer ref="drawer" ></drawer></div>
  23. <div class="plusDrawer" @tap="hideModal"><plusDrawer ref="plusDrawer"></plusDrawer></div>
  24. <view class="page-body">
  25. <view class="page-section page-section-gap">
  26. <map style="width:10%; height: 300px;"
  27. :controls="controls"
  28. :circles="circles"
  29. :polyline="polyline"
  30. :scale="scale"
  31. :latitude="latitude"
  32. :longitude="longitude"
  33. :markers="covers"
  34. ></map>
  35. </view>
  36. </view>
  37. </view>
  38. <!--经纬度组件-->
  39. <view class="InformationCard">
  40. <view class="informationCardAll">
  41. <view class="informationCardTextOne">
  42. <view class="informationCardText">
  43. <view class="textSilver">经度:</view>
  44. <view class="textWhite">{{ mapEnd_1 }}</view>
  45. </view>
  46. </view>
  47. <view class="informationCardTextOne">
  48. <view class="informationCardText">
  49. <view class="textSilver">纬度:</view>
  50. <view class="textWhite">{{ mapEnd_2 }}</view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 个人信息组件 -->
  56. <view class="Personal_information_W">
  57. <view class="name">姓名:李占国</view>
  58. <view class="history" @click="mapDate"> <span class="navigation"></span> </view>
  59. <view class="skills">技能:电力类,机械类</view>
  60. </view>
  61. <!-- 历史曲线组件 -->
  62. <view class="curve">
  63. <view class="curve_l">健康情况</view>
  64. <view class="curve_r" @tap="common.navTo('/components/bracelet/braceletHistoryCurve?braceletCurve=' + braceletCurve)">历史曲线</view>
  65. <div class="greater"></div>
  66. </view>
  67. <!-- 健康详情组件 -->
  68. <view class="healthy">
  69. <view class="healthy_H">
  70. <view class="details_z">{{xtpl_computed}}<!-- ({{ bracelet[deviceName][targetName_xtpl][targetName_xtpl_size].value }}) --></view>
  71. <view class="details_m">{{bs_computed}}</view>
  72. <view class="details_y">{{ssxy_computed}}</view>
  73. </view>
  74. <view class="healthy_N">
  75. <view class="details_z">{{szxy_computed}}<!-- ({{ bracelet[deviceName][targetName_szxy][targetName_szxy_size].value }}) --></view>
  76. <view class="details_m">{{pld_computed}}<!-- ({{ bracelet[deviceName][targetName_pld][targetName_pld_size].value }}) --></view>
  77. <view class="details_y">{{xynd_computed}}<!-- ({{ bracelet[deviceName][targetName_xynd][targetName_xynd_size].value }}) --></view>
  78. </view>
  79. </view>
  80. </view>
  81. <view v-if="toggleSwitch==true">
  82. <WeatherProphethomepage ref="r1"></WeatherProphethomepage>
  83. </view>
  84. </view>
  85. </template>
  86. <script>
  87. import res from '../../common/data.json';
  88. import drawer from '../../components/drawer/forecastThreeLineDrawer.vue';
  89. import plusDrawer from '../../components/drawer/plusDrawer.vue';
  90. import WeatherProphethomepage from '../../components/weatherProphethomepage/WeatherProphethomepage.vue';
  91. var _self;
  92. export default {
  93. components: {
  94. drawer: drawer,
  95. plusDrawer: plusDrawer,
  96. WeatherProphethomepage:WeatherProphethomepage
  97. },
  98. data: function() {
  99. return {
  100. bs_computed:'',
  101. xtpl_computed:'',
  102. ssxy_computed:'',
  103. szxy_computed:'',
  104. pld_computed:'',
  105. xynd_computed:'',
  106. WeatherProphethomepagebool:true,
  107. toggleSwitch:false,
  108. menuKey:1,
  109. pointKey: 'MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0087',
  110. socketTask_bracelet: '',
  111. socketTask_close_bracelet: '',
  112. deviceName: 'Y1-A0BC',
  113. deviceNamePld: 'Y1-A0BC_PLD',
  114. deviceNameBs: 'Y1-A0BC_BS',
  115. deviceNameSsxy: 'Y1-A0BC_SSXY',
  116. deviceNameXtpl: 'Y1-A0BC_XTPL',
  117. deviceNameXynd: 'Y1-A0BC_XYND',
  118. deviceNameSzxy: 'Y1-A0BC_SZXY',
  119. deviceNameLng: 'Y1-A0BC_LNG',
  120. deviceNameLat: 'Y1-A0BC_LAT',
  121. bracelet: {
  122. deviceName: '',
  123. deviceNamePld: '',
  124. deviceNameBs: '',
  125. deviceNameSsxy: '',
  126. deviceNameXtpl: '',
  127. deviceNameXynd: '',
  128. deviceNameSzxy: '',
  129. },
  130. braceletCurve: {},
  131. mapBegin_1:'',
  132. mapEnd_1:'',
  133. mapBegin_2:'',
  134. mapEnd_2:'',
  135. points:[
  136. {
  137. latitude:'',
  138. longitude:''
  139. },
  140. {
  141. latitude:'',
  142. longitude:''
  143. }
  144. ],
  145. list:{},
  146. braceletCurve_SSXY: [],
  147. braceletCurve_PLD: [],
  148. braceletCurve_SZXY: [],
  149. braceletCurve_XTPL: [],
  150. braceletCurve_BS: [],
  151. braceletCurve_XYND: [],
  152. braceletCurve_LNG: [],
  153. braceletCurve_LAT: [],
  154. /* targetdetail_visable: { targetdetail_target: true, targetdetail_curve: true, targetdetail_histogram: true},
  155. targetdetail: { targetdetail_target: '', targetdetail_curve: '', targetdetail_histogram: ''}, */
  156. targetName: '日发电量',
  157. targetUnit: '万kwh',
  158. bool:true,
  159. pld: '',
  160. ssxy: '',
  161. lng: '',
  162. szxy: '',
  163. lat: '',
  164. xtpl: '',
  165. bs: '',
  166. xynd: '',
  167. device_nam: '',
  168. title: 'map',
  169. latitude: 39.907,//定位中心
  170. longitude: 116.39742,//
  171. covers: [
  172. {
  173. latitude:39.909 , //纬度坐标点
  174. longitude:116.39742 , //经度
  175. iconPath: '../../static/picture/forcast/DingWei.png', //显示的图标
  176. title: '阿打算', //标注点名
  177. label: {
  178. //为标记点旁边增加标签
  179. content: '', //文本1
  180. color: '#F76350', //文本颜色
  181. anchorX: 0, //label的坐标,原点是 marker 对应的经纬度
  182. anchorY: -80, //label的坐标,原点是 marker 对应的经纬度
  183. // x:39.909,//这个组件微信在1.2.0以后就废弃了
  184. // y:116.39742,
  185. bgColor: '#fff', //背景色
  186. padding: 5, //文本边缘留白
  187. borderWidth: 1, //边框宽度
  188. borderColor: '#D84C29', //边框颜色
  189. textAlign: 'right' //文本对齐方式。
  190. },
  191. callout: {
  192. //自定义标记点上方的气泡窗口 点击有效
  193. content: '地点1',
  194. color: '#F76350',
  195. fontSize: 12,
  196. borderRadius: 5
  197. }
  198. // anchor:{//经纬度在标注图标的锚点,默认底边中点
  199. // x:5,
  200. // y:1,
  201. // }
  202. } , {
  203. latitude:39.90 ,//最后点
  204. longitude: 116.399,//
  205. iconPath: '../../static/picture/forcast/DingWei.png',
  206. title:'阿迪达斯',
  207. x:'',//
  208. y: '',//116.399
  209. label:{
  210. content:'',
  211. color:'#F76350',
  212. bgColor:'#fff',
  213. padding:5,
  214. borderRadius:4,
  215. },
  216. callout:{
  217. content:'地点2',
  218. color:'#F76350',
  219. fontSize:12
  220. }
  221. }
  222. ],
  223. scale: 15, //地图层级
  224. controls: [
  225. {
  226. //在地图上显示控件,控件不随着地图移动
  227. id: 1, //控件id
  228. /* iconPath: '../../static/picture/forcast/DingWei.png', *///显示的图标
  229. position: {
  230. //控件在地图的位置
  231. left: 15,
  232. top: 15,
  233. width: 40,
  234. height: 40
  235. }
  236. }
  237. ],
  238. circles: [
  239. {
  240. //在地图上显示圆
  241. latitude: 39.9,
  242. longitude: 116.39,
  243. fillColor: '#FFC41F', //填充颜色
  244. color: '#12A1DD', //描边的颜色
  245. radius: 0, //半径
  246. strokeWidth: 2 //描边的宽度
  247. }
  248. ],
  249. polyline: [
  250. { /* .polyline[0].points */
  251. points:[{}],
  252. //指定一系列坐标点,从数组第一项连线至最后一项
  253. /* points: [{ latitude:this.mapBegin_1, longitude:this.mapBegin_2 }, { latitude: this.mapEnd_1, longitude:this.mapEnd_2 }], */
  254. /* points: [{ latitude: 0, longitude: 0 }, { latitude: 0, longitude: 0 }], */
  255. color: '#0000AA', //线的颜色
  256. width: 2, //线的宽度
  257. dottedLine: true, //是否虚线
  258. arrowLine: true //带箭头的线 开发者工具暂不支持该属性
  259. }
  260. ],
  261. badge: 22,
  262. inconList: ['form', 'favor', 'question', 'edit'],
  263. modalName: null,
  264. address: '宁夏新能源公司',
  265. drawerList: [
  266. {
  267. name: '气象预测'
  268. }
  269. /* {
  270. "name": ""
  271. },
  272. {
  273. "name": ""
  274. },
  275. {
  276. "name": ""
  277. },
  278. {
  279. "name": ""
  280. }, */
  281. ],
  282. plusDrawerList: [
  283. {
  284. name: '宁夏新能源公司',
  285. windPowerStationId: 'NINGXIAXINNENGYUANGONGSI'
  286. },
  287. {
  288. name: '牛首山风电场',
  289. windPowerStationId: 'NSS_FDC'
  290. },
  291. {
  292. name: '香山风电场',
  293. windPowerStationId: 'XS_FDC'
  294. },
  295. {
  296. name: '石板泉风电场',
  297. windPowerStationId: 'SBQ_FDC'
  298. },
  299. {
  300. name: '青山风电场',
  301. windPowerStationId: 'QS_FDC'
  302. },
  303. {
  304. name: '麻黄山风电场',
  305. windPowerStationId: 'MHS_FDC'
  306. }
  307. ]
  308. };
  309. },
  310. mounted() {
  311. //document.querySelector('body').setAttribute('style', 'background-color:#000000');
  312. },
  313. onHide() {
  314. this.$refs.drawer.closeDrawer();
  315. this.hideModal();
  316. },
  317. onShow() {
  318. this.windPowerStationId = uni.getStorageSync('windPowerStationId');
  319. this.address = this.getWindPowerStationNameToSessionStorage();
  320. },
  321. onLoad(pointKey) {
  322. let _this = this;
  323. this.pointKey = pointKey.pointKey;
  324. this.targetName = pointKey.callTargetName;
  325. this.targetUnit = pointKey.callTargetUnit;
  326. this.braceletData();
  327. /* console.log(_this.bracelet[_this.deviceName]);
  328. console.log(_this.bracelet[_this.deviceName][_this.targetName_pld][0]); */
  329. /* uni.getLocation({//获取当前的位置坐标
  330. type: 'wgs84',
  331. success: function (res) {
  332. console.log('当前位置的经度:' + res.longitude);
  333. console.log('当前位置的纬度:' + res.latitude);
  334. }
  335. }); */
  336. },
  337. onReady() {},
  338. computed: {
  339. targetName_xtpl: function() {
  340. return this.deviceName + '_XTPL';
  341. },
  342. targetName_xtpl_size: function() {
  343. return this.bracelet[this.deviceName][this.targetName_xtpl].length - 1;
  344. },
  345. targetName_pld: function() {
  346. return this.deviceName + '_PLD';
  347. },
  348. targetName_pld_size: function() {
  349. return this.bracelet[this.deviceName][this.targetName_pld].length - 1;
  350. },
  351. targetName_bs: function() {
  352. return this.deviceName + '_BS';
  353. },
  354. targetName_bs_size: function() {
  355. return this.bracelet[this.deviceName][this.targetName_bs].length - 1;
  356. },
  357. targetName_ssxy: function() {
  358. return this.deviceName + '_SSXY';
  359. },
  360. targetName_ssxy_size: function() {
  361. return this.bracelet[this.deviceName][this.targetName_ssxy].length - 1;
  362. },
  363. targetName_szxy: function() {
  364. return this.deviceName + '_SZXY';
  365. },
  366. targetName_szxy_size: function() {
  367. return this.bracelet[this.deviceName][this.targetName_szxy].length - 1;
  368. },
  369. targetName_xynd: function() {
  370. return this.deviceName + '_XYND';
  371. },
  372. targetName_xynd_size: function() {
  373. return this.bracelet[this.deviceName][this.targetName_xynd].length - 1;
  374. },
  375. backStageIp: function() {
  376. return this.$store.state.wholeSituationBackStageIp;
  377. },
  378. backStagePort: function() {
  379. return this.$store.state.wholeSituationBackStagePort;
  380. },
  381. windpowerstationNameToId: function() {
  382. return this.$store.state.windpowerstationNameToId;
  383. }
  384. },
  385. methods: {
  386. mapDate(){
  387. if(this.bool){
  388. this.$delete(this.polyline[0],'points');
  389. this.braceletCurve_LNG = this.bracelet[this.deviceName][this.deviceNameLng];
  390. this.braceletCurve_LAT = this.bracelet[this.deviceName][this.deviceNameLat];
  391. this.points[0].longitude=this.bracelet[this.deviceName][this.deviceNameLng][0].value;
  392. this.points[0].latitude=this.bracelet[this.deviceName][this.deviceNameLat][0].value;
  393. this.points[1].longitude=this.bracelet[this.deviceName][this.deviceNameLng][this.braceletCurve_LNG.length-1].value;
  394. this.points[1].latitude=this.bracelet[this.deviceName][this.deviceNameLat][this.braceletCurve_LAT.length-1].value;
  395. for(let val of this.polyline){
  396. this.$set(val,'points',this.points);
  397. this.bool = false;
  398. console.log("true");
  399. }
  400. /* 定义地图经纬度中心 */
  401. var lat= parseFloat(this.mapBegin_2)+parseFloat(this.mapEnd_2);
  402. var lng= parseFloat(this.mapBegin_1)+parseFloat(this.mapEnd_1);
  403. this.latitude = lat/2;
  404. this.longitude = lng/2;
  405. }else{
  406. /* this.braceletCurve_LNG = this.bracelet[this.deviceName][this.deviceNameLng];
  407. this.braceletCurve_LAT = this.bracelet[this.deviceName][this.deviceNameLat];
  408. this.points[0].longitude=this.bracelet[this.deviceName][this.deviceNameLng][0].value;
  409. this.points[0].latitude=this.bracelet[this.deviceName][this.deviceNameLat][0].value;
  410. this.points[1].longitude=this.bracelet[this.deviceName][this.deviceNameLng][this.braceletCurve_LNG.length-1].value;
  411. this.points[1].latitude=this.bracelet[this.deviceName][this.deviceNameLat][this.braceletCurve_LAT.length-1].value;
  412. */
  413. this.$delete(this.polyline[0],'points');
  414. /* this.latitude = this.mapBegin_2+this.mapEnd_2/2;
  415. this.longitude = this.mapBegin_1+this.mapEnd_1/2; */
  416. console.log("false");
  417. /* 还原定位中心位置 */
  418. this.latitude = this.mapBegin_2;
  419. this.longitude = this.mapBegin_1;
  420. this.bool = true;
  421. }
  422. this.$forceUpdate();
  423. },
  424. openDrawer: function() {
  425. this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList);
  426. },
  427. closeDrawer: function() {
  428. this.drawerIsShow = false;
  429. },
  430. pushWindPowerStationNameToSessionStorage(windpowerstationName) {
  431. uni.setStorageSync('windpowerstationName', windpowerstationName);
  432. //sessionStorage.setItem('windpowerstationName', windpowerstationName);
  433. //alert("v"+ sessionStorage.getItem("windpowerstationName"));
  434. //this.common.goback('/pages/index/Index');
  435. },
  436. getWindPowerStationNameToSessionStorage() {
  437. uni.getStorageSync('windpowerstationName');
  438. return uni.getStorageSync('windpowerstationName');
  439. },
  440. showModal(e) {
  441. this.modalName = e.currentTarget.dataset.target;
  442. this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName);
  443. },
  444. hideModal() {
  445. this.modalName = null;
  446. this.$refs.plusDrawer.hideModal(this.modalName);
  447. },
  448. braceletData() {
  449. let _this = this;
  450. let ip;
  451. uni.request({
  452. url: 'http://' + _this.backStageIp + ':' + _this.backStagePort + '/bracelet/bracelet?beginDate=2020-04-20 09:26:27&&endDate=2020-04-25 09:26:29',
  453. success: res => {
  454. ip = res.data;
  455. }
  456. });
  457. // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
  458. this.socketTask_bracelet = uni.connectSocket({
  459. /* 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】 */
  460. url: 'ws://' + _this.backStageIp + ':' + _this.backStagePort + '/websocket/pageNumber_9/functionNumber_1',
  461. success(data) {
  462. console.log('websocket连接成功');
  463. }
  464. });
  465. // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
  466. this.socketTask_bracelet.onOpen(res => {
  467. console.log('WebSocket连接正常打开中...!');
  468. _this.is_open_socket = true;
  469. // 注:只有连接正常打开中 ,才能正常收到消息
  470. _this.socketTask_bracelet.onMessage(res => {
  471. //console.log("收到服务器内容:" + res.data);
  472. _this.bracelet = JSON.parse(res.data)[ip];
  473. _this.braceletCurve = JSON.stringify(_this.bracelet[_this.deviceName]);
  474. /* 获取起始经纬度 */
  475. _this.braceletCurve_LNG = _this.bracelet[_this.deviceName][_this.deviceNameLng];
  476. _this.braceletCurve_LAT = _this.bracelet[_this.deviceName][_this.deviceNameLat];
  477. _this.mapBegin_1 = (_this.bracelet[_this.deviceName][_this.deviceNameLng][0].value);
  478. _this.mapBegin_2 = (_this.bracelet[_this.deviceName][_this.deviceNameLat][0].value);
  479. _this.mapEnd_1 = (_this.bracelet[_this.deviceName][_this.deviceNameLng][_this.braceletCurve_LNG.length-1].value);
  480. _this.mapEnd_2 = (_this.bracelet[_this.deviceName][_this.deviceNameLat][_this.braceletCurve_LAT.length-1].value);
  481. _this.latitude = _this.mapBegin_2;
  482. _this.longitude = _this.mapBegin_1;
  483. _this.covers[0].latitude = _this.mapBegin_2;
  484. _this.covers[0].longitude = _this.mapBegin_1;
  485. _this.covers[1].latitude = _this.mapEnd_2;
  486. _this.covers[1].longitude = _this.mapEnd_1;
  487. _this.bs_computed = _this.bracelet[_this.deviceName][_this.targetName_bs][_this.targetName_bs_size].value;
  488. _this.xtpl_computed = _this.bracelet[_this.deviceName][_this.targetName_xtpl][_this.targetName_xtpl_size].value;
  489. _this.ssxy_computed = _this.bracelet[_this.deviceName][_this.targetName_ssxy][_this.targetName_ssxy_size].value;
  490. _this.szxy_computed = _this.bracelet[_this.deviceName][_this.targetName_szxy][_this.targetName_szxy_size].value;
  491. _this.pld_computed = _this.bracelet[_this.deviceName][_this.targetName_pld][_this.targetName_pld_size].value;
  492. _this.xynd_computed = _this.bracelet[_this.deviceName][_this.targetName_xynd][_this.targetName_xynd_size].value;
  493. /* this.braceletCurve_LNG = this.bracelet[this.deviceName][this.deviceNameLng];
  494. this.braceletCurve_LAT = this.bracelet[this.deviceName][this.deviceNameLat];
  495. this.points[0].longitude=this.bracelet[this.deviceName][this.deviceNameLng][0].value;
  496. this.points[0].latitude=this.bracelet[this.deviceName][this.deviceNameLat][0].value;
  497. this.points[1].longitude=this.bracelet[this.deviceName][this.deviceNameLng][this.braceletCurve_LNG.length-1].value;
  498. this.points[1].latitude=this.bracelet[this.deviceName][this.deviceNameLat][this.braceletCurve_LAT.length-1].value; */
  499. /* _this.mapDate(); */
  500. /* _this.polyline[0].points[0].latitude=_this.mapBegin_2;
  501. _this.polyline[0].points[0].longitude=_this.mapBegin_1;
  502. _this.polyline[0].points[1].latitude=_this.mapEnd_2;
  503. _this.polyline[0].points[1].longitude=_this.mapEnd_1; */
  504. /* _this.braceletCurve_SSXY = _this.bracelet[_this.deviceName][_this.deviceNameSsxy];
  505. _this.braceletCurve_SZXY = _this.bracelet[_this.deviceName][_this.deviceNameSzxy];
  506. _this.braceletCurve_XYND = _this.bracelet[_this.deviceName][_this.deviceNameXynd];
  507. _this.braceletCurve_XTPL = _this.bracelet[_this.deviceName][_this.deviceNameXtpl];
  508. _this.braceletCurve_BS = _this.bracelet[_this.deviceName][_this.deviceNameBs];
  509. console.log(_this.braceletCurve_BS[0].value); */
  510. });
  511. });
  512. // 这里仅是事件监听【如果socket关闭了会执行】
  513. this.socketTask_bracelet.onClose(() => {
  514. uni.request({
  515. url: 'http://' + _this.backStageIp + ':' + _this.backStagePort + '/bracelet/close_bracelet?pointKey=' + _this.pointKey,
  516. success: res => {}
  517. });
  518. });
  519. }
  520. }
  521. };
  522. </script>
  523. <style>
  524. body {
  525. font-family: '方正兰亭细黑_GBK';
  526. font-size: 15px;
  527. color: silver;
  528. background: #000;
  529. }
  530. @font-face {
  531. font-family: '方正兰亭细黑_GBK';
  532. src: url(../../static/fzltxh.TTF);
  533. }
  534. .content{
  535. //background-color: #000000;
  536. }
  537. page {
  538. background-color: #1f1f1f;
  539. font-family: '方正兰亭细黑_GBK';
  540. overflow-x: hidden;
  541. }
  542. .top {
  543. width: 100%;
  544. height: 130upx;
  545. padding-top: 5upx;
  546. background-color: #1f1f1f;
  547. position: fixed;
  548. top: 0px;
  549. left: 0px;
  550. z-index: 100;
  551. }
  552. .threeLine {
  553. width: 50px;
  554. height: 45px;
  555. float: left;
  556. }
  557. .text {
  558. width: calc(100% - 100px);
  559. height: 45px;
  560. float: left;
  561. user-select: text;
  562. -webkit-user-select: text;
  563. -moz-user-select: text;
  564. -ms-user-select: text;
  565. color: silver;
  566. line-height: 45px;
  567. margin-top: 11px;
  568. font-size: 18px;
  569. }
  570. .notice {
  571. width: 50px;
  572. height: 45px;
  573. float: left;
  574. }
  575. .plus {
  576. width: 30px;
  577. height: 45px;
  578. float: right;
  579. color: white;
  580. font-size: 35px;
  581. line-height: 45px;
  582. text-align: right;
  583. margin-right: 2.5%;
  584. }
  585. .textWindpowerstation {
  586. width: 180px;
  587. height: 45px;
  588. float: left;
  589. text-align: center;
  590. margin-left: 18px;
  591. }
  592. .InformationCard {
  593. position: absolute;
  594. top: 50px;
  595. left: 0px;
  596. margin-top: 0px;
  597. width: 50%;
  598. height: 8%;
  599. background: rgba(0, 0, 0, 0);
  600. float: left;
  601. }
  602. .informationCardAll {
  603. width: 95%;
  604. margin-left: 2.5%;
  605. margin-top: 10px;
  606. height: 60px;
  607. float: left;
  608. }
  609. .informationCardTextOne {
  610. width: 100%;
  611. height: 35px;
  612. float: left;
  613. margin-top: -10px;
  614. }
  615. .informationCardText {
  616. /* margin-left: 2%; */
  617. width: 65px;
  618. height: 35px;
  619. line-height: 35px;
  620. user-select: text;
  621. -webkit-user-select: text;
  622. -moz-user-select: text;
  623. -ms-user-select: text;
  624. color: silver;
  625. font-size: 10px;
  626. transform: scale(0.975);
  627. float: left;
  628. font-weight: 1000;
  629. }
  630. .textSilver {
  631. user-select: text;
  632. -webkit-user-select: text;
  633. -moz-user-select: text;
  634. -ms-user-select: text;
  635. color: black;
  636. float: left;
  637. }
  638. .textWhite {
  639. color: black;
  640. float: right;
  641. width: 24px;
  642. font-size: 10px;
  643. margin-right: 13%;
  644. transform: scale(0.975);
  645. /* text-align: right; */
  646. }
  647. .Personal_information_W {
  648. position: relative;
  649. margin-top: 3%;
  650. width: 90%;
  651. height: 80px;/*
  652. background-color: #242424; */
  653. border-bottom: #BDBDBD solid 0.5px;
  654. transform: translateX(-50%);
  655. left: 50%;
  656. color: #B8B7B7;
  657. }
  658. .name{
  659. position: absolute;
  660. height: 30px;
  661. width: 130px;
  662. left: 3%;
  663. /* background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%); */
  664. text-align: left;
  665. line-height: 30px;
  666. margin-top: 1%;
  667. font-weight: 1000;
  668. }
  669. .history {
  670. position: absolute;
  671. margin-top: 6%;
  672. right: 3%;
  673. height: 30px;
  674. height: 20px;
  675. text-align: center;
  676. line-height: 30px;
  677. }
  678. .skills {
  679. position: absolute;
  680. top: 56%;
  681. left: 3%;
  682. height: 25px;
  683. width: 180px;/*
  684. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%); */
  685. text-align: left;
  686. line-height: 30px;
  687. }
  688. .curve{
  689. position: relative;
  690. width: 90%;
  691. transform: translateX(-50%);
  692. left: 50%;
  693. height: 30px;
  694. margin-top: 3%;
  695. color: #B8B7B7;
  696. font-weight: 1000;
  697. }
  698. .curve_l{
  699. position: absolute;
  700. left: 3%;
  701. }
  702. .curve_r{
  703. position: absolute;
  704. right: 3%;
  705. }
  706. .healthy {
  707. /* margin-top: 6%; */
  708. margin-left: 3%;
  709. height: 180px;
  710. width: 95%;
  711. margin-bottom: 100px;
  712. text-align: center;
  713. color: #B8B7B7;
  714. font-size: 12px;
  715. line-height:65px ;
  716. font-weight: 1000;
  717. }
  718. .healthy_H,
  719. .healthy_N,
  720. .healthy_W {
  721. background-color:#242424;
  722. position: relative;
  723. width: 100%;
  724. height: 42%;
  725. text-align: center;
  726. /* padding-bottom: 1%; */
  727. }
  728. .details_z {
  729. position: absolute;
  730. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
  731. width: 30%;
  732. left:3%;
  733. height: 60px;
  734. top: 3%;
  735. margin-top: 2%;
  736. }
  737. .details_m {
  738. position: absolute;
  739. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
  740. width: 30%;
  741. left: 35.5%;
  742. height: 60px;
  743. top: 3%;
  744. margin-top: 2%;
  745. }
  746. .details_y {
  747. position: absolute;
  748. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
  749. width: 30%;
  750. left: 68%;
  751. height: 60px;
  752. top: 3%;
  753. margin-top: 2%;
  754. /* margin-bottom: 0.6%;
  755. margin-top: 0.6%;
  756. float: right;
  757. margin-left: 0.2%;
  758. margin-right: 1.2%;
  759. width: 31%;
  760. height: 100%;
  761. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
  762. color: silver;
  763. text-align: center;
  764. padding-top: 10px;
  765. background-color: #ffffff;
  766. font-size: 12px;
  767. padding-bottom: 4px;
  768. line-height: 13px;
  769. border-radius: 5px;
  770. padding-top: 8px; */
  771. }
  772. .navigation::after {
  773. content: url(../../static/picture/forcast/position.png);
  774. }
  775. /* .greater {
  776. position: relative;
  777. width: 249px;
  778. height: 35px;
  779. border: 1px solid #000;
  780. } */
  781. .greater{
  782. float: right;
  783. content: "";
  784. margin-top: 0.8%;
  785. margin-right: 0.8%;
  786. /* position: absolute; */
  787. /* top: 8px;
  788. right: 15px; */
  789. width: 8px;
  790. height: 8px;
  791. border-right: 2px solid #fff;
  792. border-bottom: 2px solid #fff;
  793. transform: rotate(-45deg);
  794. }
  795. </style>