123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830 |
- <template>
-
- <!-- 抽屉组件 -->
-
- <!-- 地图组件 -->
-
- <view>
- <view>
- <!-- <web-view :webview-styles="webviewStyles" :src=socketurl></web-view> -->
- </view>
- <!-- <view class="DrawerClose" :class="modalName == 'viewModal' ? 'show' : ''" @tap="hideModal"><text class="cuIcon-pullright"></text></view> -->
- </view>
- </template>
- <script>
- import res from '../../../common/data.json';
- var _self;
- export default {
- components: {
-
- },
- data: function() {
- return {
-
- conflict:false,
- kg:true,
- leftNavigationtitle:'预测功能分组',
- leftbarkg:false,
- bs_computed:'',
- xtpl_computed:'',
- ssxy_computed:'',
- szxy_computed:'',
- pld_computed:'',
- xynd_computed:'',
- WeatherProphethomepagebool:true,
- toggleSwitch:false,
- socketurl:'',
- inconList: ['form', 'favor', 'question', 'edit'],
- modalName: null,
- address: '',
- drawerList: [],
- plusDrawerList: [],
- permissionsInformation:[]
- };
- },
- mounted() {
-
- },created: function() {
-
- this.viewUserid();
- this.monitoringAuthority();
-
- this.address = this.dataprocessing.getWindPowerStationName();
- this.FDC=this.dataprocessing.getWindPowerStationId();
- this.windPowerStationId =this.dataprocessing.getWindPowerStationId();
-
- let userid=uni.getStorageSync("userid")
-
- this.socketurl="https://192.168.3.24:4397/websocket/usercontroller/view?userid="+userid;
- this.$nextTick(function() {
-
-
- });
- this.cWidth = uni.upx2px(2000);
- this.cHeight = uni.upx2px(350);
- this.cWidth40 = uni.upx2px(5000);
- this.cHeight40 = uni.upx2px(350);
-
-
- this.windStation =this.dataprocessing.getWindPowerStationNameByNames(this.address);
- this.windStationName = this.windStation[0].replace('风电场', '');
-
-
-
- },
-
- onLoad(pointKey) {
- let _this = this;
- this.pointKey = pointKey.pointKey;
- this.targetName = pointKey.callTargetName;
- this.targetUnit = pointKey.callTargetUnit;
- this.braceletData();
-
-
- },
- onReady() {},
- computed: {
-
- targetName_xtpl: function() {
- return this.deviceName + '_XTPL';
- },
- targetName_xtpl_size: function() {
- return this.bracelet[this.deviceName][this.targetName_xtpl].length - 1;
- },
- targetName_pld: function() {
- return this.deviceName + '_PLD';
- },
- targetName_pld_size: function() {
- return this.bracelet[this.deviceName][this.targetName_pld].length - 1;
- },
- targetName_bs: function() {
- return this.deviceName + '_BS';
- },
- targetName_bs_size: function() {
- return this.bracelet[this.deviceName][this.targetName_bs].length - 1;
- },
- targetName_ssxy: function() {
- return this.deviceName + '_SSXY';
- },
- targetName_ssxy_size: function() {
- return this.bracelet[this.deviceName][this.targetName_ssxy].length - 1;
- },
- targetName_szxy: function() {
- return this.deviceName + '_SZXY';
- },
- targetName_szxy_size: function() {
- return this.bracelet[this.deviceName][this.targetName_szxy].length - 1;
- },
- targetName_xynd: function() {
- return this.deviceName + '_XYND';
- },
- targetName_xynd_size: function() {
- return this.bracelet[this.deviceName][this.targetName_xynd].length - 1;
- },
- backStageIp: function() {
- return this.$store.state.wholeSituationBackStageIp;
- },
- backStagePort: function() {
- return this.$store.state.wholeSituationBackStagePort;
- },
- windpowerstationNameToId: function() {
- return this.$store.state.windpowerstationNameToId;
- }
- },
-
- methods: {
- viewUserid: function() {
- this.plusDrawerList=uni.getStorageSync('plusList');
- },
- monitoringAuthority: function() {
- this.drawerList=uni.getStorageSync('leftlist3');
- },
- mapdelete(){
-
-
- if(this.bool){
-
- this.$delete(this.polyline[0],'points');
- this.braceletCurve_LNG = this.bracelet[this.deviceName][this.deviceNameLng];
- this.braceletCurve_LAT = this.bracelet[this.deviceName][this.deviceNameLat];
-
- this.points[0].longitude=this.bracelet[this.deviceName][this.deviceNameLng][0].value;
- this.points[0].latitude=this.bracelet[this.deviceName][this.deviceNameLat][0].value;
- this.points[1].longitude=this.bracelet[this.deviceName][this.deviceNameLng][this.braceletCurve_LNG.length-1].value;
- this.points[1].latitude=this.bracelet[this.deviceName][this.deviceNameLat][this.braceletCurve_LAT.length-1].value;
- for(let val of this.polyline){
-
- this.$set(val,'points',this.points);
- this.bool = false;
- console.log("true");
-
- }
-
- var lat= parseFloat(this.mapBegin_2)+parseFloat(this.mapEnd_2);
- var lng= parseFloat(this.mapBegin_1)+parseFloat(this.mapEnd_1);
-
- this.latitude = lat/2;
- this.longitude = lng/2;
- }else{
-
-
-
-
-
-
- console.log("false");
-
- this.latitude = this.mapBegin_2;
- this.longitude = this.mapBegin_1;
-
- this.bool = true;
- }
- this.$forceUpdate();
-
-
-
-
- if(this.bool){
-
- this.$delete(this.polyline[0],'points');
- this.braceletCurve_LNG = this.bracelet[this.deviceName][this.deviceNameLng];
- this.braceletCurve_LAT = this.bracelet[this.deviceName][this.deviceNameLat];
-
- this.points[0].longitude=this.bracelet[this.deviceName][this.deviceNameLng][0].value;
- this.points[0].latitude=this.bracelet[this.deviceName][this.deviceNameLat][0].value;
- this.points[1].longitude=this.bracelet[this.deviceName][this.deviceNameLng][this.braceletCurve_LNG.length-1].value;
- this.points[1].latitude=this.bracelet[this.deviceName][this.deviceNameLat][this.braceletCurve_LAT.length-1].value;
- for(let val of this.polyline){
-
- this.$set(val,'points',this.points);
- this.bool = false;
- console.log("true");
-
- }
-
- var lat= parseFloat(this.mapBegin_2)+parseFloat(this.mapEnd_2);
- var lng= parseFloat(this.mapBegin_1)+parseFloat(this.mapEnd_1);
-
- this.latitude = lat/2;
- this.longitude = lng/2;
- }else{
-
-
- this.$delete(this.polyline[0],'points');
-
-
-
- console.log("false");
-
- this.latitude = this.mapBegin_2;
- this.longitude = this.mapBegin_1;
-
- this.bool = true;
- }
- this.$forceUpdate();
-
- },
- mapDate(){
-
-
-
-
-
- },
- openDrawer: function() {
- this.monitoringAuthority();
- this.kg=false;
- if(this.$refs.drawer != undefined){
- this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList,this.leftNavigationtitle);
- }else{
- console.log('雷霆嘎巴');
- }
- },
- closeDrawer: function() {
-
- this.drawerIsShow = false;
-
- },
-
- pushWindPowerStationNameToSessionStorage(windpowerstationName) {
- uni.setStorageSync('windpowerstationName', windpowerstationName);
-
-
-
- },
- getWindPowerStationNameToSessionStorage() {
- uni.getStorageSync('windpowerstationName');
- return uni.getStorageSync('windpowerstationName');
- },
- leftbar(){
-
- this.kg=true;
-
-
- },
- onHide() {
-
- this.$refs.drawer.closeDrawer();
- this.hideModal();
- },
- onShow: function() {
- this.leftbar();
- this.windPowerStationId = uni.getStorageSync('windPowerStationId');
- this.address = this.getWindPowerStationNameToSessionStorage();
-
- this.viewUserid();
- this.monitoringAuthority();
- },
- showModal(e) {
- this.conflict = true;
- this.viewUserid();
- this.kg=false;
- this.modalName = e.currentTarget.dataset.target;
- this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName);
- },
- hideModal() {
- this.conflict = false;
- this.leftbar();
- this.modalName = null;
-
-
- },
- braceletData() {
- let _this = this;
- let ip;
-
-
-
- uni.request({
- url: 'http://' + _this.backStageIp + ':' + _this.backStagePort + '/bracelet/bracelet?beginDate=2020-04-20%2009:26:27&&endDate=2020-04-25%2009:26:29',
- success: res => {
- ip = res.data;
- }
- });
-
- this.socketTask_bracelet = uni.connectSocket({
-
- url: 'ws://' + _this.backStageIp + ':' + _this.backStagePort + '/websocket/pageNumber_9/functionNumber_1/all',
- success(data) {
- console.log('websocket连接成功');
- }
- });
-
- this.socketTask_bracelet.onOpen(res => {
- console.log('WebSocket连接正常打开中...!');
- _this.is_open_socket = true;
-
- _this.socketTask_bracelet.onMessage(res => {
-
- _this.bracelet = JSON.parse(res.data)[ip];
- _this.braceletCurve = JSON.stringify(_this.bracelet[_this.deviceName]);
-
- _this.braceletCurve_LNG = _this.bracelet[_this.deviceName][_this.deviceNameLng];
- _this.braceletCurve_LAT = _this.bracelet[_this.deviceName][_this.deviceNameLat];
- _this.mapBegin_1 = (_this.bracelet[_this.deviceName][_this.deviceNameLng][0].value);
- _this.mapBegin_2 = (_this.bracelet[_this.deviceName][_this.deviceNameLat][0].value);
- _this.mapEnd_1 = (_this.bracelet[_this.deviceName][_this.deviceNameLng][_this.braceletCurve_LNG.length-1].value);
- _this.mapEnd_2 = (_this.bracelet[_this.deviceName][_this.deviceNameLat][_this.braceletCurve_LAT.length-1].value);
-
-
-
- _this.latitude = _this.mapBegin_2;
- _this.longitude = _this.mapBegin_1;
-
- _this.covers[0].latitude = _this.mapBegin_2;
- _this.covers[0].longitude = _this.mapBegin_1;
- _this.covers[1].latitude = _this.mapEnd_2;
- _this.covers[1].longitude = _this.mapEnd_1;
-
- _this.bs_computed = _this.bracelet[_this.deviceName][_this.targetName_bs][_this.targetName_bs_size].value;
- _this.xtpl_computed = _this.bracelet[_this.deviceName][_this.targetName_xtpl][_this.targetName_xtpl_size].value;
- _this.ssxy_computed = _this.bracelet[_this.deviceName][_this.targetName_ssxy][_this.targetName_ssxy_size].value;
- _this.szxy_computed = _this.bracelet[_this.deviceName][_this.targetName_szxy][_this.targetName_szxy_size].value;
- _this.pld_computed = _this.bracelet[_this.deviceName][_this.targetName_pld][_this.targetName_pld_size].value;
- _this.xynd_computed = _this.bracelet[_this.deviceName][_this.targetName_xynd][_this.targetName_xynd_size].value;
-
-
-
-
- });
- });
-
- this.socketTask_bracelet.onClose(() => {
- uni.request({
- url: 'http://' + _this.backStageIp + ':' + _this.backStagePort + '/bracelet/close_bracelet?pointKey=' + _this.pointKey,
- success: res => {}
- });
- });
- }
- }
- };
- </script>
- <style>
- body {
- font-family: '方正兰亭细黑_GBK';
- font-size: 15px;
- color: silver;
- background: #000;
- }
- @font-face {
- font-family: '方正兰亭细黑_GBK';
- src: url(../../../static/fzltxh.TTF);
- }
- .content{
-
- }
- page {
- background-color: #1f1f1f;
- font-family: '方正兰亭细黑_GBK';
- overflow-x: hidden;
- }
- .top {
- width: 100%;
- height: 130upx;
- padding-top: 5upx;
- background-color: #1f1f1f;
- position: fixed;
- top: 0px;
- left: 0px;
- z-index: 100;
- }
- .threeLine {
- width: 50px;
- height: 45px;
- float: left;
- }
- .text {
- width: calc(100% - 100px);
- height: 45px;
- float: left;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- color: silver;
- line-height: 45px;
- margin-top: 11px;
- font-size: 18px;
- }
- .notice {
- width: 50px;
- height: 45px;
- float: left;
- }
- .plus {
- width: 30px;
- height: 45px;
- float: right;
- color: white;
- font-size: 35px;
- line-height: 45px;
- text-align: right;
- margin-right: 2.5%;
- }
- .textWindpowerstation {
- width: 180px;
- height: 45px;
- float: left;
- text-align: center;
- margin-left: 18px;
- }
- .InformationCard {
- position: absolute;
- top: 50px;
- left: 0px;
- margin-top: 0px;
- width: 50%;
- height: 8%;
- background: rgba(0, 0, 0, 0);
- float: left;
- }
- .informationCardAll {
- width: 95%;
- margin-left: 2.5%;
- margin-top: 10px;
- height: 60px;
- float: left;
- }
- .informationCardTextOne {
- width: 100%;
- height: 35px;
- float: left;
- margin-top: -10px;
- }
- .informationCardText {
-
- width: 65px;
- height: 35px;
- line-height: 35px;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- color: silver;
- font-size: 10px;
- transform: scale(0.975);
- float: left;
- font-weight: 1000;
- }
- .textSilver {
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- color: black;
- float: left;
- }
- .textWhite {
- color: black;
- float: right;
- width: 24px;
- font-size: 10px;
- margin-right: 13%;
- transform: scale(0.975);
-
- }
- .Personal_information_W {
- position: relative;
-
- width: 90%;
- height: 80px;
- border-bottom: #BDBDBD solid 0.5px;
- transform: translateX(-50%);
- left: 50%;
- color: #B8B7B7;
- }
- .name{
- position: absolute;
- height: 30px;
- width: 130px;
- left: 3%;
-
- text-align: left;
- line-height: 30px;
- margin-top: 1%;
- font-weight: 1000;
-
- }
- .history {
- position: absolute;
- margin-top: 6%;
- right: 3%;
- height: 30px;
- height: 20px;
- text-align: center;
- line-height: 30px;
- }
- .skills {
- position: absolute;
- top: 56%;
- left: 3%;
- height: 25px;
- width: 180px;
- text-align: left;
- line-height: 30px;
- }
- .curve{
- position: relative;
- width: 90%;
- transform: translateX(-50%);
- left: 50%;
- height: 30px;
- margin-top: 3%;
- color: #B8B7B7;
- font-weight: 1000;
- }
- .curve_l{
- position: absolute;
- left: 3%;
- }
- .curve_r{
- position: absolute;
- right: 3%;
- }
- .healthy {
- margin-left: 3%;
- height: 180px;
- width: 95%;
- margin-bottom: 100px;
- text-align: center;
- color: #B8B7B7;
- font-size: 12px;
- line-height:65px ;
- font-weight: 1000;
-
- }
- .healthy_H,
- .healthy_N,
- .healthy_W {
- background-color:#242424;
- position: relative;
- width: 100%;
- height: 42%;
- text-align: center;
-
- }
- .details_z {
- position: absolute;
- background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
- width: 30%;
- left:3%;
- height: 60px;
- top: 3%;
- margin-top: 2%;
- }
- .details_m {
- position: absolute;
- background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
- width: 30%;
- left: 35.5%;
- height: 60px;
- top: 3%;
- margin-top: 2%;
- }
- .details_y {
- position: absolute;
- background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
- width: 30%;
- left: 68%;
- height: 60px;
- top: 3%;
- margin-top: 2%;
-
- }
- .navigation::after {
- content: url(../../../static/picture/forcast/position.png);
- }
-
- .greater{
- float: right;
- content: "";
- margin-top: 0.8%;
- margin-right: 0.8%;
-
-
- width: 8px;
- height: 8px;
- border-right: 2px solid #fff;
- border-bottom: 2px solid #fff;
- transform: rotate(-45deg);
-
- }
- .windStationNameAndChoice {
- clear: both;
- width: 100%;
- height: 30px;
- margin-top: 1%;
- color: silver;
-
- }
-
- .windStationName {
- width: 50%;
- height: 100%;
- float: left;
- line-height: 30px;
- font-size: 14px;
- margin-left: 9.5%;
- }
-
- .windStationChoice {
- width: 20%;
- height: 100%;
- float: right;
- text-align: right;
- line-height: 30px;
- font-size: 14px;
- margin-right: 5%;
- }
-
- .s-popup-wrapper {
- width: 500rpx;
- background-color: #f0f0f0;
-
- }
-
- .s-popup-title {
- width: 100%;
- height: 50px;
- background-color: #211E21;
- }
-
- .s-popup-word {
- width: calc(100% - 65px);
- height: 50px;
- font-size: 14px;
- color: white;
- line-height: 50px;
- float: left;
- margin-left: 25px;
- }
-
- .s-popup-cha {
- width: 40px;
- height: 50px;
- text-align: center;
- line-height: 50px;
- float: right;
- font-size: 24px;
- }
-
- .windStationItemContainer {
- width: 100%;
- }
-
- .windStationItemContainerBlack {
- width: 100%;
- background-color: grey;
- color: white;
- }
-
- .windStationItem {
- width: 80%;
- height: 50px;
- border-bottom: 1px solid #c8c8c8;
- text-align: left;
- line-height: 50px;
- margin-left: 10%;
- color: #333333;
- }
- .DrawerPage {
- position: fixed;
- width: 100vw;
- height: 100vh;
- left: 0vw;
- background-color: #1f1f1f;
- transition: all 0.4s;
- }
-
- .DrawerPage.show {
- transform: scale(0.9, 0.9);
- left: 85vw;
- box-shadow: 0 0 60upx rgba(0, 0, 0, 0.2);
- transform-origin: 0;
- }
- .DrawerPage .cu-bar.tabbar .action button.cuIcon {
- width: 64upx;
- height: 64upx;
- line-height: 64upx;
- margin: 0;
- display: inline-block;
- }
-
- .DrawerPage .cu-bar.tabbar .action .cu-avatar {
- margin: 0;
- }
-
- .DrawerPage .nav {
- flex: 1;
- }
-
- .DrawerPage .nav .cu-item.cur {
- border-bottom: 0;
- position: relative;
- }
-
- .DrawerPage .nav .cu-item.cur::after {
- content: '';
- width: 10upx;
- height: 10upx;
- background-color: currentColor;
- position: absolute;
- bottom: 10upx;
- border-radius: 10upx;
- left: 0;
- right: 0;
- margin: auto;
- }
-
- .DrawerPage .cu-bar.tabbar .action {
- flex: initial;
- }
- </style>
|