123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- import store from '../common/store.js'
- class Dataprocessing {
- constructor() {
- }
- //
- putWindPowerStationName(windPowerStationName) {
- uni.setStorageSync('windpowerstationName', windPowerStationName);
- }
- putWindPowerStationId(windPowerStationId) {
- uni.setStorageSync('windPowerStationId', windPowerStationId);
- }
- getWindPowerStationName() {
- return uni.getStorageSync('windpowerstationName');
- }
- getWindPowerStationId() {
- return uni.getStorageSync('windPowerStationId');
- }
- getWindPowerStationNameById(name) {
- if (name == '宁夏新能源公司') {
- let wpId = '0';
- return wpId;
- } else if (name == '麻黄山风电场') {
- let wpId = 'MHS_FDC';
- return wpId;
- } else if (name == '牛首山风电场') {
- let wpId = 'NSS_FDC';
- return wpId;
- } else if (name == '石板泉风电场') {
- let wpId = 'SBQ_FDC';
- return wpId;
- } else if (name == '青山风电场') {
- let wpId = 'QS_FDC';
- return wpId;
- } else if (name == '香山风电场') {
- let wpId = 'XS_FDC';
- return wpId;
- } else if (name == '河北能源集团') {
- let wpId = '0';
- return wpId;
- } else if (name == '崇礼风电场') {
- let wpId = 'CL_FDC';
- return wpId;
- } else if (name == '康保风电场') {
- let wpId = 'KB_FDC';
- return wpId;
- } else if (name == '代县风电场') {
- let wpId = 'DX_FDC';
- return wpId;
- }
- }
- getWindPowerStationNameByWeatherId(name) {
- if (name == '宁夏新能源公司') {
- let wpId = 'MHS_FDC';
- return wpId;
- } else if (name == '麻黄山风电场') {
- let wpId = 'MHS_FDC';
- return wpId;
- } else if (name == '牛首山风电场') {
- let wpId = 'NSS_FDC';
- return wpId;
- } else if (name == '石板泉风电场') {
- let wpId = 'SBQ_FDC';
- return wpId;
- } else if (name == '青山风电场') {
- let wpId = 'QS_FDC';
- return wpId;
- } else if (name == '香山风电场') {
- let wpId = 'XS_FDC';
- return wpId;
- } else if (name == '河北能源集团') {
- let wpId = 'CL_FDC';
- return wpId;
- } else if (name == '崇礼风电场') {
- let wpId = 'CL_FDC';
- return wpId;
- } else if (name == '康保风电场') {
- let wpId = 'KB_FDC';
- return wpId;
- } else if (name == '代县风电场') {
- let wpId = 'DX_FDC';
- return wpId;
- }
- }
- getWindPowerStationNameByNames(name) {
- if (name == '宁夏新能源公司') {
- let windStations = ['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
- return windStations;
- } else if (name == '麻黄山风电场') {
- let windStations = ['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
- return windStations;
- } else if (name == '牛首山风电场') {
- let windStations = ['牛首山风电场', '麻黄山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
- return windStations;
- } else if (name == '石板泉风电场') {
- let windStations = ['石板泉风电场', '麻黄山风电场', '牛首山风电场', '青山风电场', '香山风电场'];
- return windStations;
- } else if (name == '香山风电场') {
- let windStations = ['香山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场'];
- return windStations;
- } else if (name == '青山风电场') {
- let windStations = ['青山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '香山风电场'];
- return windStations;
- } else if (name == '河北能源集团') {
- let windStations = ['崇礼风电场', '康保风电场', '代县风电场'];
- return windStations;
- } else if (name == '崇礼风电场') {
- let windStations = ['崇礼风电场', '康保风电场', '代县风电场'];
- return windStations;
- } else if (name == '康保风电场') {
- let windStations = ['康保风电场', '崇礼风电场', '代县风电场'];
- return windStations;
- } else if (name == '代县风电场') {
- let windStations = ['代县风电场', '康保风电场', '崇礼风电场'];
- return windStations;
- }
- }
- viewUserid() {
- let userid = uni.getStorageSync('userid');
- let ip = store.state.wholeSituationBackStageIp;
- let port = store.state.wholeSituationBackStagePort;
- uni.request({
- url: 'http://' + ip + ':' + port + '/GyeeorganController/GyeeOrganList?userid=' + userid,
- data: {},
- method: 'GET',
- success: function(res) {
- let plusDrawerList = [];
- let plusDrawerList_weather = [];
- for (let j = 0; j < res.data.data.length; j++) {
- var obj = {};
- obj.name = res.data.data[j].describes;
- obj.windId = res.data.data[j].name;
- plusDrawerList.push(obj);
- }
- for (let j = 0; j < res.data.data.length; j++) {
- var obj = {};
- obj.name = res.data.data[j].describes;
- if (res.data.data[j].describes == '宁夏新能源公司') {
- obj.windId = 'MHS_FDC';
- } else if (res.data.data[j].describes == '河北能源集团') {
- obj.windId = 'CL_FDC';
- } else {
- obj.windId = res.data.data[j].name;
- }
- plusDrawerList_weather.push(obj);
- }
- uni.setStorageSync('plusList', plusDrawerList);
- uni.setStorageSync('plusList_we', plusDrawerList_weather);
- }
- })
- }
- monitoringAuthority() {
- let userid = uni.getStorageSync('userid');
- let ip = store.state.wholeSituationBackStageIp;
- let port = store.state.wholeSituationBackStagePort;
- uni.request({
- url: 'http://' + ip + ':' + port + '/GyeepermissionController/GyeePermissionList?userid=' + userid,
- data: {},
- method: 'GET',
- success: function(res) {
- let leftlist1 = [];
- let leftlist2 = [];
- let leftlist3 = [];
- let leftlist4 = [];
- let leftlist5 = [];
- for (let j = 0; j < res.data.data.length; j++) {
- let gyeePermissionList = res.data.data[j].gyeePermissionList;
- if (j == 0) {
- for (let k = 0; k < gyeePermissionList.length; k++) {
- var obj = {};
- obj.name = gyeePermissionList[k].permisssionname;
- obj.remark1 = gyeePermissionList[k].remark1;
- leftlist1.push(obj);
- }
- } else if (j == 1) {
- for (let k = 0; k < gyeePermissionList.length; k++) {
- var obj = {};
- obj.name = gyeePermissionList[k].permisssionname;
- obj.remark1 = gyeePermissionList[k].remark1;
- leftlist2.push(obj);
- }
- } else if (j == 2) {
- for (let k = 0; k < gyeePermissionList.length; k++) {
- var obj = {};
- obj.name = gyeePermissionList[k].permisssionname;
- obj.remark1 = gyeePermissionList[k].remark1;
- leftlist3.push(obj);
- }
- } else if (j == 3) {
- for (let k = 0; k < gyeePermissionList.length; k++) {
- var obj = {};
- obj.name = gyeePermissionList[k].permisssionname;
- obj.remark1 = gyeePermissionList[k].remark1;
- leftlist4.push(obj);
- }
- } else if (j == 4) {
- for (let k = 0; k < gyeePermissionList.length; k++) {
- var obj = {};
- obj.name = gyeePermissionList[k].permisssionname;
- obj.remark1 = gyeePermissionList[k].remark1;
- leftlist5.push(obj);
- }
- }
- }
- uni.setStorageSync('leftlist1', leftlist1);
- uni.setStorageSync('leftlist2', leftlist2);
- uni.setStorageSync('leftlist3', leftlist3);
- uni.setStorageSync('leftlist4', leftlist4);
- uni.setStorageSync('leftlist5', leftlist5);
- }
- })
- }
- }
- let dataprocessing = new Dataprocessing();
- export default dataprocessing;
|