Chatindex.vue 26 KB

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