Forecast.vue 28 KB

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