Forecast.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013
  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. },onShow(){
  289. this.leftbar();
  290. },created: function() {
  291. // this.pushWindPowerStationNameToSessionStorage("麻黄山");
  292. this.viewUserid();
  293. this.monitoringAuthority();
  294. this.address = this.dataprocessing.getWindPowerStationName();
  295. this.FDC=this.dataprocessing.getWindPowerStationId();
  296. this.windPowerStationId =this.dataprocessing.getWindPowerStationId();
  297. this.$nextTick(function() {
  298. //this.getWeatherDataToday();
  299. //this.getWeatherData7();
  300. });
  301. this.cWidth = uni.upx2px(2000);
  302. this.cHeight = uni.upx2px(350);
  303. this.cWidth40 = uni.upx2px(5000);
  304. this.cHeight40 = uni.upx2px(350);
  305. this.windStation =this.dataprocessing.getWindPowerStationNameByNames(this.address);
  306. this.windStationName = this.windStation[0].replace('风电场', '');
  307. },
  308. onLoad(pointKey) {
  309. let _this = this;
  310. this.pointKey = pointKey.pointKey;
  311. this.targetName = pointKey.callTargetName;
  312. this.targetUnit = pointKey.callTargetUnit;
  313. this.braceletData();
  314. /* console.log(_this.bracelet[_this.deviceName]);
  315. console.log(_this.bracelet[_this.deviceName][_this.targetName_pld][0]); */
  316. /* uni.getLocation({//获取当前的位置坐标
  317. type: 'wgs84',
  318. success: function (res) {
  319. console.log('当前位置的经度:' + res.longitude);
  320. console.log('当前位置的纬度:' + res.latitude);
  321. }
  322. }); */
  323. },
  324. onReady() {},
  325. computed: {
  326. targetName_xtpl: function() {
  327. return this.deviceName + '_XTPL';
  328. },
  329. targetName_xtpl_size: function() {
  330. return this.bracelet[this.deviceName][this.targetName_xtpl].length - 1;
  331. },
  332. targetName_pld: function() {
  333. return this.deviceName + '_PLD';
  334. },
  335. targetName_pld_size: function() {
  336. return this.bracelet[this.deviceName][this.targetName_pld].length - 1;
  337. },
  338. targetName_bs: function() {
  339. return this.deviceName + '_BS';
  340. },
  341. targetName_bs_size: function() {
  342. return this.bracelet[this.deviceName][this.targetName_bs].length - 1;
  343. },
  344. targetName_ssxy: function() {
  345. return this.deviceName + '_SSXY';
  346. },
  347. targetName_ssxy_size: function() {
  348. return this.bracelet[this.deviceName][this.targetName_ssxy].length - 1;
  349. },
  350. targetName_szxy: function() {
  351. return this.deviceName + '_SZXY';
  352. },
  353. targetName_szxy_size: function() {
  354. return this.bracelet[this.deviceName][this.targetName_szxy].length - 1;
  355. },
  356. targetName_xynd: function() {
  357. return this.deviceName + '_XYND';
  358. },
  359. targetName_xynd_size: function() {
  360. return this.bracelet[this.deviceName][this.targetName_xynd].length - 1;
  361. },
  362. backStageIp: function() {
  363. return this.$store.state.wholeSituationBackStageIp;
  364. },
  365. backStagePort: function() {
  366. return this.$store.state.wholeSituationBackStagePort;
  367. },
  368. windpowerstationNameToId: function() {
  369. return this.$store.state.windpowerstationNameToId;
  370. }
  371. },
  372. methods: {
  373. viewUserid: function() {
  374. this.plusDrawerList=uni.getStorageSync('plusList');
  375. },
  376. monitoringAuthority: function() {
  377. this.drawerList=uni.getStorageSync('leftlist3');
  378. },
  379. mapDate(){
  380. if(this.bool){
  381. this.$delete(this.polyline[0],'points');
  382. this.braceletCurve_LNG = this.bracelet[this.deviceName][this.deviceNameLng];
  383. this.braceletCurve_LAT = this.bracelet[this.deviceName][this.deviceNameLat];
  384. this.points[0].longitude=this.bracelet[this.deviceName][this.deviceNameLng][0].value;
  385. this.points[0].latitude=this.bracelet[this.deviceName][this.deviceNameLat][0].value;
  386. this.points[1].longitude=this.bracelet[this.deviceName][this.deviceNameLng][this.braceletCurve_LNG.length-1].value;
  387. this.points[1].latitude=this.bracelet[this.deviceName][this.deviceNameLat][this.braceletCurve_LAT.length-1].value;
  388. for(let val of this.polyline){
  389. this.$set(val,'points',this.points);
  390. this.bool = false;
  391. console.log("true");
  392. }
  393. /* 定义地图经纬度中心 */
  394. var lat= parseFloat(this.mapBegin_2)+parseFloat(this.mapEnd_2);
  395. var lng= parseFloat(this.mapBegin_1)+parseFloat(this.mapEnd_1);
  396. this.latitude = lat/2;
  397. this.longitude = lng/2;
  398. }else{
  399. /* this.braceletCurve_LNG = this.bracelet[this.deviceName][this.deviceNameLng];
  400. this.braceletCurve_LAT = this.bracelet[this.deviceName][this.deviceNameLat];
  401. this.points[0].longitude=this.bracelet[this.deviceName][this.deviceNameLng][0].value;
  402. this.points[0].latitude=this.bracelet[this.deviceName][this.deviceNameLat][0].value;
  403. this.points[1].longitude=this.bracelet[this.deviceName][this.deviceNameLng][this.braceletCurve_LNG.length-1].value;
  404. this.points[1].latitude=this.bracelet[this.deviceName][this.deviceNameLat][this.braceletCurve_LAT.length-1].value;
  405. */
  406. this.$delete(this.polyline[0],'points');
  407. /* this.latitude = this.mapBegin_2+this.mapEnd_2/2;
  408. this.longitude = this.mapBegin_1+this.mapEnd_1/2; */
  409. console.log("false");
  410. /* 还原定位中心位置 */
  411. this.latitude = this.mapBegin_2;
  412. this.longitude = this.mapBegin_1;
  413. this.bool = true;
  414. }
  415. this.$forceUpdate();
  416. },
  417. openDrawer: function() {
  418. this.kg=false;
  419. this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList,this.leftNavigationtitle);
  420. },
  421. closeDrawer: function() {
  422. this.drawerIsShow = false;
  423. },
  424. pushWindPowerStationNameToSessionStorage(windpowerstationName) {
  425. uni.setStorageSync('windpowerstationName', windpowerstationName);
  426. //sessionStorage.setItem('windpowerstationName', windpowerstationName);
  427. //alert("v"+ sessionStorage.getItem("windpowerstationName"));
  428. //this.common.goback('/pages/index/Index');
  429. },
  430. getWindPowerStationNameToSessionStorage() {
  431. uni.getStorageSync('windpowerstationName');
  432. return uni.getStorageSync('windpowerstationName');
  433. },
  434. leftbar(){
  435. this.kg=true;
  436. },
  437. onHide() {
  438. this.$refs.drawer.closeDrawer();
  439. this.hideModal();
  440. },
  441. onShow() {
  442. this.windPowerStationId = uni.getStorageSync('windPowerStationId');
  443. this.address = this.getWindPowerStationNameToSessionStorage();
  444. },
  445. showModal(e) {
  446. this.kg=false;
  447. this.modalName = e.currentTarget.dataset.target;
  448. this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName);
  449. },
  450. hideModal() {
  451. this.leftbar();
  452. this.modalName = null;
  453. //this.$refs.plusDrawer.hideModal(this.modalName);
  454. },
  455. braceletData() {
  456. let _this = this;
  457. let ip;
  458. uni.request({
  459. url: 'http://' + _this.backStageIp + ':' + _this.backStagePort + '/bracelet/bracelet?beginDate=2020-04-20 09:26:27&&endDate=2020-04-25 09:26:29',
  460. success: res => {
  461. ip = res.data;
  462. }
  463. });
  464. // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
  465. this.socketTask_bracelet = uni.connectSocket({
  466. /* 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】 */
  467. url: 'ws://' + _this.backStageIp + ':' + _this.backStagePort + '/websocket/pageNumber_9/functionNumber_1',
  468. success(data) {
  469. console.log('websocket连接成功');
  470. }
  471. });
  472. // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
  473. this.socketTask_bracelet.onOpen(res => {
  474. console.log('WebSocket连接正常打开中...!');
  475. _this.is_open_socket = true;
  476. // 注:只有连接正常打开中 ,才能正常收到消息
  477. _this.socketTask_bracelet.onMessage(res => {
  478. //console.log("收到服务器内容:" + res.data);
  479. _this.bracelet = JSON.parse(res.data)[ip];
  480. _this.braceletCurve = JSON.stringify(_this.bracelet[_this.deviceName]);
  481. /* 获取起始经纬度 */
  482. _this.braceletCurve_LNG = _this.bracelet[_this.deviceName][_this.deviceNameLng];
  483. _this.braceletCurve_LAT = _this.bracelet[_this.deviceName][_this.deviceNameLat];
  484. _this.mapBegin_1 = (_this.bracelet[_this.deviceName][_this.deviceNameLng][0].value);
  485. _this.mapBegin_2 = (_this.bracelet[_this.deviceName][_this.deviceNameLat][0].value);
  486. _this.mapEnd_1 = (_this.bracelet[_this.deviceName][_this.deviceNameLng][_this.braceletCurve_LNG.length-1].value);
  487. _this.mapEnd_2 = (_this.bracelet[_this.deviceName][_this.deviceNameLat][_this.braceletCurve_LAT.length-1].value);
  488. _this.latitude = _this.mapBegin_2;
  489. _this.longitude = _this.mapBegin_1;
  490. _this.covers[0].latitude = _this.mapBegin_2;
  491. _this.covers[0].longitude = _this.mapBegin_1;
  492. _this.covers[1].latitude = _this.mapEnd_2;
  493. _this.covers[1].longitude = _this.mapEnd_1;
  494. _this.bs_computed = _this.bracelet[_this.deviceName][_this.targetName_bs][_this.targetName_bs_size].value;
  495. _this.xtpl_computed = _this.bracelet[_this.deviceName][_this.targetName_xtpl][_this.targetName_xtpl_size].value;
  496. _this.ssxy_computed = _this.bracelet[_this.deviceName][_this.targetName_ssxy][_this.targetName_ssxy_size].value;
  497. _this.szxy_computed = _this.bracelet[_this.deviceName][_this.targetName_szxy][_this.targetName_szxy_size].value;
  498. _this.pld_computed = _this.bracelet[_this.deviceName][_this.targetName_pld][_this.targetName_pld_size].value;
  499. _this.xynd_computed = _this.bracelet[_this.deviceName][_this.targetName_xynd][_this.targetName_xynd_size].value;
  500. /* this.braceletCurve_LNG = this.bracelet[this.deviceName][this.deviceNameLng];
  501. this.braceletCurve_LAT = this.bracelet[this.deviceName][this.deviceNameLat];
  502. this.points[0].longitude=this.bracelet[this.deviceName][this.deviceNameLng][0].value;
  503. this.points[0].latitude=this.bracelet[this.deviceName][this.deviceNameLat][0].value;
  504. this.points[1].longitude=this.bracelet[this.deviceName][this.deviceNameLng][this.braceletCurve_LNG.length-1].value;
  505. this.points[1].latitude=this.bracelet[this.deviceName][this.deviceNameLat][this.braceletCurve_LAT.length-1].value; */
  506. /* _this.mapDate(); */
  507. /* _this.polyline[0].points[0].latitude=_this.mapBegin_2;
  508. _this.polyline[0].points[0].longitude=_this.mapBegin_1;
  509. _this.polyline[0].points[1].latitude=_this.mapEnd_2;
  510. _this.polyline[0].points[1].longitude=_this.mapEnd_1; */
  511. /* _this.braceletCurve_SSXY = _this.bracelet[_this.deviceName][_this.deviceNameSsxy];
  512. _this.braceletCurve_SZXY = _this.bracelet[_this.deviceName][_this.deviceNameSzxy];
  513. _this.braceletCurve_XYND = _this.bracelet[_this.deviceName][_this.deviceNameXynd];
  514. _this.braceletCurve_XTPL = _this.bracelet[_this.deviceName][_this.deviceNameXtpl];
  515. _this.braceletCurve_BS = _this.bracelet[_this.deviceName][_this.deviceNameBs];
  516. console.log(_this.braceletCurve_BS[0].value); */
  517. });
  518. });
  519. // 这里仅是事件监听【如果socket关闭了会执行】
  520. this.socketTask_bracelet.onClose(() => {
  521. uni.request({
  522. url: 'http://' + _this.backStageIp + ':' + _this.backStagePort + '/bracelet/close_bracelet?pointKey=' + _this.pointKey,
  523. success: res => {}
  524. });
  525. });
  526. }
  527. }
  528. };
  529. </script>
  530. <style>
  531. body {
  532. font-family: '方正兰亭细黑_GBK';
  533. font-size: 15px;
  534. color: silver;
  535. background: #000;
  536. }
  537. @font-face {
  538. font-family: '方正兰亭细黑_GBK';
  539. src: url(../../static/fzltxh.TTF);
  540. }
  541. .content{
  542. //background-color: #000000;
  543. }
  544. page {
  545. background-color: #1f1f1f;
  546. font-family: '方正兰亭细黑_GBK';
  547. overflow-x: hidden;
  548. }
  549. .top {
  550. width: 100%;
  551. height: 130upx;
  552. padding-top: 5upx;
  553. background-color: #1f1f1f;
  554. position: fixed;
  555. top: 0px;
  556. left: 0px;
  557. z-index: 100;
  558. }
  559. .threeLine {
  560. width: 50px;
  561. height: 45px;
  562. float: left;
  563. }
  564. .text {
  565. width: calc(100% - 100px);
  566. height: 45px;
  567. float: left;
  568. user-select: text;
  569. -webkit-user-select: text;
  570. -moz-user-select: text;
  571. -ms-user-select: text;
  572. color: silver;
  573. line-height: 45px;
  574. margin-top: 11px;
  575. font-size: 18px;
  576. }
  577. .notice {
  578. width: 50px;
  579. height: 45px;
  580. float: left;
  581. }
  582. .plus {
  583. width: 30px;
  584. height: 45px;
  585. float: right;
  586. color: white;
  587. font-size: 35px;
  588. line-height: 45px;
  589. text-align: right;
  590. margin-right: 2.5%;
  591. }
  592. .textWindpowerstation {
  593. width: 180px;
  594. height: 45px;
  595. float: left;
  596. text-align: center;
  597. margin-left: 18px;
  598. }
  599. .InformationCard {
  600. position: absolute;
  601. top: 50px;
  602. left: 0px;
  603. margin-top: 0px;
  604. width: 50%;
  605. height: 8%;
  606. background: rgba(0, 0, 0, 0);
  607. float: left;
  608. }
  609. .informationCardAll {
  610. width: 95%;
  611. margin-left: 2.5%;
  612. margin-top: 10px;
  613. height: 60px;
  614. float: left;
  615. }
  616. .informationCardTextOne {
  617. width: 100%;
  618. height: 35px;
  619. float: left;
  620. margin-top: -10px;
  621. }
  622. .informationCardText {
  623. /* margin-left: 2%; */
  624. width: 65px;
  625. height: 35px;
  626. line-height: 35px;
  627. user-select: text;
  628. -webkit-user-select: text;
  629. -moz-user-select: text;
  630. -ms-user-select: text;
  631. color: silver;
  632. font-size: 10px;
  633. transform: scale(0.975);
  634. float: left;
  635. font-weight: 1000;
  636. }
  637. .textSilver {
  638. user-select: text;
  639. -webkit-user-select: text;
  640. -moz-user-select: text;
  641. -ms-user-select: text;
  642. color: black;
  643. float: left;
  644. }
  645. .textWhite {
  646. color: black;
  647. float: right;
  648. width: 24px;
  649. font-size: 10px;
  650. margin-right: 13%;
  651. transform: scale(0.975);
  652. /* text-align: right; */
  653. }
  654. .Personal_information_W {
  655. position: relative;
  656. margin-top: 3%;
  657. width: 90%;
  658. height: 80px;/*
  659. background-color: #242424; */
  660. border-bottom: #BDBDBD solid 0.5px;
  661. transform: translateX(-50%);
  662. left: 50%;
  663. color: #B8B7B7;
  664. }
  665. .name{
  666. position: absolute;
  667. height: 30px;
  668. width: 130px;
  669. left: 3%;
  670. /* background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%); */
  671. text-align: left;
  672. line-height: 30px;
  673. margin-top: 1%;
  674. font-weight: 1000;
  675. }
  676. .history {
  677. position: absolute;
  678. margin-top: 6%;
  679. right: 3%;
  680. height: 30px;
  681. height: 20px;
  682. text-align: center;
  683. line-height: 30px;
  684. }
  685. .skills {
  686. position: absolute;
  687. top: 56%;
  688. left: 3%;
  689. height: 25px;
  690. width: 180px;/*
  691. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%); */
  692. text-align: left;
  693. line-height: 30px;
  694. }
  695. .curve{
  696. position: relative;
  697. width: 90%;
  698. transform: translateX(-50%);
  699. left: 50%;
  700. height: 30px;
  701. margin-top: 3%;
  702. color: #B8B7B7;
  703. font-weight: 1000;
  704. }
  705. .curve_l{
  706. position: absolute;
  707. left: 3%;
  708. }
  709. .curve_r{
  710. position: absolute;
  711. right: 3%;
  712. }
  713. .healthy {
  714. /* margin-top: 6%; */
  715. margin-left: 3%;
  716. height: 180px;
  717. width: 95%;
  718. margin-bottom: 100px;
  719. text-align: center;
  720. color: #B8B7B7;
  721. font-size: 12px;
  722. line-height:65px ;
  723. font-weight: 1000;
  724. }
  725. .healthy_H,
  726. .healthy_N,
  727. .healthy_W {
  728. background-color:#242424;
  729. position: relative;
  730. width: 100%;
  731. height: 42%;
  732. text-align: center;
  733. /* padding-bottom: 1%; */
  734. }
  735. .details_z {
  736. position: absolute;
  737. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
  738. width: 30%;
  739. left:3%;
  740. height: 60px;
  741. top: 3%;
  742. margin-top: 2%;
  743. }
  744. .details_m {
  745. position: absolute;
  746. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
  747. width: 30%;
  748. left: 35.5%;
  749. height: 60px;
  750. top: 3%;
  751. margin-top: 2%;
  752. }
  753. .details_y {
  754. position: absolute;
  755. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
  756. width: 30%;
  757. left: 68%;
  758. height: 60px;
  759. top: 3%;
  760. margin-top: 2%;
  761. /* margin-bottom: 0.6%;
  762. margin-top: 0.6%;
  763. float: right;
  764. margin-left: 0.2%;
  765. margin-right: 1.2%;
  766. width: 31%;
  767. height: 100%;
  768. background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
  769. color: silver;
  770. text-align: center;
  771. padding-top: 10px;
  772. background-color: #ffffff;
  773. font-size: 12px;
  774. padding-bottom: 4px;
  775. line-height: 13px;
  776. border-radius: 5px;
  777. padding-top: 8px; */
  778. }
  779. .navigation::after {
  780. content: url(../../static/picture/forcast/position.png);
  781. }
  782. /* .greater {
  783. position: relative;
  784. width: 249px;
  785. height: 35px;
  786. border: 1px solid #000;
  787. } */
  788. .greater{
  789. float: right;
  790. content: "";
  791. margin-top: 0.8%;
  792. margin-right: 0.8%;
  793. /* position: absolute; */
  794. /* top: 8px;
  795. right: 15px; */
  796. width: 8px;
  797. height: 8px;
  798. border-right: 2px solid #fff;
  799. border-bottom: 2px solid #fff;
  800. transform: rotate(-45deg);
  801. }
  802. .windStationNameAndChoice {
  803. clear: both;
  804. width: 100%;
  805. height: 30px;
  806. margin-top: 1%;
  807. color: silver;
  808. /* border: 1px solid red; */
  809. }
  810. .windStationName {
  811. width: 50%;
  812. height: 100%;
  813. float: left;
  814. line-height: 30px;
  815. font-size: 14px;
  816. margin-left: 9.5%;
  817. }
  818. .windStationChoice {
  819. width: 20%;
  820. height: 100%;
  821. float: right;
  822. text-align: right;
  823. line-height: 30px;
  824. font-size: 14px;
  825. margin-right: 5%;
  826. }
  827. .s-popup-wrapper {
  828. width: 500rpx;
  829. background-color: #f0f0f0;
  830. }
  831. .s-popup-title {
  832. width: 100%;
  833. height: 50px;
  834. background-color: #211E21;
  835. }
  836. .s-popup-word {
  837. width: calc(100% - 65px);
  838. height: 50px;
  839. font-size: 14px;
  840. color: white;
  841. line-height: 50px;
  842. float: left;
  843. margin-left: 25px;
  844. }
  845. .s-popup-cha {
  846. width: 40px;
  847. height: 50px;
  848. text-align: center;
  849. line-height: 50px;
  850. float: right;
  851. font-size: 24px;
  852. }
  853. .windStationItemContainer {
  854. width: 100%;
  855. }
  856. .windStationItemContainerBlack {
  857. width: 100%;
  858. background-color: grey;
  859. color: white;
  860. }
  861. .windStationItem {
  862. width: 80%;
  863. height: 50px;
  864. border-bottom: 1px solid #c8c8c8;
  865. text-align: left;
  866. line-height: 50px;
  867. margin-left: 10%;
  868. color: #333333;
  869. }
  870. .DrawerPage {
  871. position: fixed;
  872. width: 100vw;
  873. height: 100vh;
  874. left: 0vw;
  875. background-color: #1f1f1f;
  876. transition: all 0.4s;
  877. }
  878. .DrawerPage.show {
  879. transform: scale(0.9, 0.9);
  880. left: 85vw;
  881. box-shadow: 0 0 60upx rgba(0, 0, 0, 0.2);
  882. transform-origin: 0;
  883. }
  884. .DrawerPage .cu-bar.tabbar .action button.cuIcon {
  885. width: 64upx;
  886. height: 64upx;
  887. line-height: 64upx;
  888. margin: 0;
  889. display: inline-block;
  890. }
  891. .DrawerPage .cu-bar.tabbar .action .cu-avatar {
  892. margin: 0;
  893. }
  894. .DrawerPage .nav {
  895. flex: 1;
  896. }
  897. .DrawerPage .nav .cu-item.cur {
  898. border-bottom: 0;
  899. position: relative;
  900. }
  901. .DrawerPage .nav .cu-item.cur::after {
  902. content: '';
  903. width: 10upx;
  904. height: 10upx;
  905. background-color: currentColor;
  906. position: absolute;
  907. bottom: 10upx;
  908. border-radius: 10upx;
  909. left: 0;
  910. right: 0;
  911. margin: auto;
  912. }
  913. .DrawerPage .cu-bar.tabbar .action {
  914. flex: initial;
  915. }
  916. </style>