Просмотр исходного кода

Merge branch 'yx' of http://61.161.152.110:10101/r/electronic-map into yx

chenminghua 3 лет назад
Родитель
Сommit
ee1bb5f912

+ 1 - 1
package.json

@@ -12,6 +12,7 @@
   "dependencies": {
     "@antv/x6": "^1.24.4",
     "@arcgis/core": "^4.19.3",
+    "@open-wc/webpack-import-meta-loader": "^0.4.7",
     "animate.css": "3.5",
     "axios": "^0.21.1",
     "cesium": "^1.78.0",
@@ -40,7 +41,6 @@
     "xlsx": "^0.17.0"
   },
   "devDependencies": {
-    "@open-wc/webpack-import-meta-loader": "^0.4.7",
     "@vue/cli-plugin-babel": "~4.5.0",
     "@vue/cli-plugin-eslint": "~4.5.0",
     "@vue/cli-plugin-router": "~4.5.0",

+ 1 - 1
src/App.vue

@@ -404,7 +404,7 @@ body {
     height: calc(100vh - @headerHeight);
     top: @headerHeight;
     background-color: fade(#192a26, 75%);
-    z-index: 99;
+    z-index: 3000;
     opacity: 0;
     transition: opacity 0.2s;
     transition-timing-function: ease-in;

+ 13 - 0
src/components/chart/radar/normal-radar-chart.vue

@@ -43,6 +43,10 @@ export default {
         ];
       },
     },
+    showLegend: {
+      type: Boolean,
+      default: true,
+    },
   },
   data() {
     return {
@@ -120,6 +124,15 @@ export default {
             fontSize: util.vh(16),
           },
         },
+        legend: {
+          show: this.showLegend,
+          bottom: 16,
+          inactiveColor: partten.getColor("gray"),
+          textStyle: {
+            color: partten.getColor("grayl"),
+            fontSize: 12,
+          },
+        },
         radar: [
           // 最低层 80
           {

+ 10 - 1
src/components/coms/table/table2.vue

@@ -17,6 +17,7 @@
       :width="col.width"
       :min-width="col.minWidth"
       :sortable="col.sortable"
+      :sort-orders="sortOrder"
       :show-overflow-tooltip="!col.slot"
       :fixed="col.fixed"
       :align="'center'"
@@ -40,7 +41,7 @@
     v-if="pageable"
     @current-change="handleCurrentChange"
     :current-page="currentPage"
-    :page-size="pageSize"
+    v-modal:page-size="selfPageSize"
     :total="data.total"
     v-bind="elPaggingProps"
   >
@@ -141,6 +142,12 @@ export default {
       if (this.pageable) return this.currentPage * this.pageSize;
       else return this.data.data.length;
     },
+    sortOrder:{
+      type:Array,
+      default:()  =>{
+        return ['descending', 'ascending', null]
+      }
+    }
   },
   // 函数
   methods: {
@@ -171,6 +178,8 @@ export default {
   },
   created() {
     // 创建后
+    this.selfPageSize = this.pageSize
+
   },
   beforeMount() {
     // 渲染前

+ 22 - 22
src/components/other/cesium/index.vue

@@ -50,29 +50,29 @@
 </template>
  
 <script>
-import addCircleWave from "./static/CiecleScan";
-import Windy from "./static/wind/Windy";
-import response from "./static/2017121300";
-import wtTree from "./static/fj";
+// import addCircleWave from "./static/CiecleScan";
+// import Windy from "./static/wind/Windy";
+// import response from "./static/2017121300";
+// import wtTree from "./static/fj";
 
-import h337 from "./static/heatmap";
+// import h337 from "./static/heatmap";
 
-import $ from "jquery";
+// import $ from "jquery";
 
-import {
-  createSnowStage,
-  createRainStage,
-} from "./static/postProcessController";
+// import {
+//   createSnowStage,
+//   createRainStage,
+// } from "./static/postProcessController";
 
-const Cesium = require("cesium/Cesium");
-const widgets = require("cesium/Widgets/widgets.css");
+// const Cesium = require("cesium/Cesium");
+// const widgets = require("cesium/Widgets/widgets.css");
 
 export default {
   data() {
     return {
       viewer: null,
-      url: "http://localhost:8888/tiles",
-      // url: "http://localhost:8889",
+      url: "http://localhost:8080/static/cesium/Assets/Textures/NaturalEarthII",
+      // url: "http://localhost:8082/static/cesium/Assets/Textures/NaturalEarthII",
       publicPath: "./",
       initPosition: [106.0231304, 37.73323706, 0],
 
@@ -107,9 +107,9 @@ export default {
   created() {},
 
   mounted() {
-    this.initMap();
-    this.handleCommand("b");
-    this.flyto(1600000);
+    // this.initMap();
+    // this.handleCommand("b");
+    // this.flyto(1600000);
   },
 
   computed: {},
@@ -132,11 +132,11 @@ export default {
         scene3DOnly: false, //每个几何实例将只能以3D渲染以节省GPU内存
         sceneMode: 3, //初始场景模式 1 2D模式 2 2D循环模式 3 3D模式  Cesium.SceneMode
         fullscreenElement: document.body, //全屏时渲染的HTML元素 暂时没发现用处
-        // imageryProvider: new Cesium.TileMapServiceImageryProvider({
-        //   url: that.url,
-        //   fileExtension: "jpg",
-        //   maximumLevel: 13,
-        // }),
+        imageryProvider: new Cesium.TileMapServiceImageryProvider({
+          url: that.url,
+          fileExtension: "jpg",
+          maximumLevel: 13,
+        }),
       });
 
       // 设置初始位置

+ 3 - 1
src/views/Demo.vue

@@ -230,7 +230,9 @@
     </table-2>
 
     <h3>table</h3>
-    <Table :data="tableData" :height="'200px'" :canScroll="true" :pageSize="40" :showHover="false" @onPagging="tableonPagging" />
+    <Table :data="tableData" :height="'200px'" :canScroll="true" :pageSize="40" :showHover="false" @onPagging="tableonPagging"
+    
+     />
     <h3>table</h3>
     <check-table :data="tableData" :height="'200px'" :canScroll="true" :pageSize="40" :showHover="false" @onPagging="tableonPagging" @check="CheckTableonCheck" />
 

+ 1 - 1
src/views/alarmCenter/boosterAlarm.vue

@@ -70,7 +70,7 @@ export default {
     let that = this;
     return {
       ChangZhan: [],
-      stationId: "XS_FDC",
+      stationId: "MHS_FDC",
       startDate: "",
       endDate: "",
       tableLoading: true,

+ 1 - 1
src/views/alarmCenter/customAlarm.vue

@@ -89,7 +89,7 @@ export default {
     let that = this;
     return {
       ChangZhan: [],
-      stationId: "XS_FDC",
+      stationId: "MHS_FDC",
       windturbines: [],
       wtId: "",
       startDate: "",

+ 1 - 1
src/views/alarmCenter/customStatistics.vue

@@ -104,7 +104,7 @@ export default {
     let that = this;
     return {
       ChangZhan: [],
-      stationId: "XS_FDC",
+      stationId: "MHS_FDC",
       startDate: "",
       endDate: "",
       tableData: [],

+ 1 - 1
src/views/alarmCenter/scadaAlarm.vue

@@ -145,7 +145,7 @@ export default {
     let that = this;
     return {
       ChangZhan: [],
-      stationId: "XS_FDC",
+      stationId: "MHS_FDC",
       windturbines: [],
       wtId: "",
       alarmDesc: "",

+ 49 - 38
src/views/report/weather.vue

@@ -33,9 +33,16 @@
 		</div>
 		<div class="table-box">
 			<div class="title">升压站报警</div>
-			<ComTable ref="curRef" :data="tableData" :pageSize="pageSize" @onPagging="onChangePage" height="50vh"
-				v-loading="tableLoading" element-loading-text="拼命加载中.." element-loading-background="rgba(0, 0, 0, 0.8)">
-			</ComTable>
+			<ComTable
+			  ref="curRef"
+			  :data="tableData"
+			  :pageSize="pageSize"
+			  @onPagging="onChangePage"
+			  height="68vh"
+			  v-loading="tableLoading"
+			  element-loading-text="拼命加载中.."
+			  element-loading-background="rgba(0, 0, 0, 0.8)"
+			></ComTable>
 		</div>
 	</div>
 </template>
@@ -52,12 +59,12 @@
 			let that = this;
 			return {
 				ChangZhan: [],
-				stationId: "XS_FDC",
+				stationId: "MHS_FDC",
 				startDate: "",
 				endDate: "",
 				tableLoading: true,
-				pageNum: 1,
-				pageSize: [20],
+				pageIndex: 1,
+				pageSize: 20,
 				tableData: {
 					column: [{
 						name: "记录日期",
@@ -221,41 +228,46 @@
 					method: "GET",
 					subUrl: "weather/history/list",
 					data: {
-						wpId: this.stationId,
-						startTs: this.startDate,
-						endTs: this.endDate,
-						pageNum: this.pageNum,
-						pageSize: 20,
+						wpId: that.stationId,
+						startTs: that.startDate,
+						endTs: that.endDate,
+						pageNum: that.pageIndex,
+						pageSize: that.pageSize,
 					},
 					success(res) {
 						console.log(res)
 						var dataTab = [];
-						res.data.list.forEach(item => {
-							dataTab.push({ //表格
-								recodedata: that.formatTime(item.recodedata),
-								region: item.region,
-								weather: item.weather,
-								maximumtem: item.maximumtem,
-								minimumtem: item.minimumtem,
-								sunrise: item.sunrise,
-								sunset: item.sunset,
-								weather1: item.weather1,
-								weather2: item.weather2,
-								temperature1: item.temperature1,
-								temperature2: item.temperature2,
-								realfeel1: item.realfeel1,
-								realfeel2: item.realfeel2,
-								precipitation1: item.precipitation1,
-								precipitation2: item.precipitation2,
-								winddirection1: item.winddirection1,
-								winddirection2: item.winddirection2,
-								speed1: item.speed1,
-								speed2: item.speed2
-							})
-						})
-						that.tableData.data = dataTab;
+						if (res.data) {
+						  res.data.list.forEach(item => {
+						  	dataTab.push({ //表格
+						  		recodedata: that.formatTime(item.recodedata),
+						  		region: item.region,
+						  		weather: item.weather,
+						  		maximumtem: item.maximumtem,
+						  		minimumtem: item.minimumtem,
+						  		sunrise: item.sunrise,
+						  		sunset: item.sunset,
+						  		weather1: item.weather1,
+						  		weather2: item.weather2,
+						  		temperature1: item.temperature1,
+						  		temperature2: item.temperature2,
+						  		realfeel1: item.realfeel1,
+						  		realfeel2: item.realfeel2,
+						  		precipitation1: item.precipitation1,
+						  		precipitation2: item.precipitation2,
+						  		winddirection1: item.winddirection1,
+						  		winddirection2: item.winddirection2,
+						  		speed1: item.speed1,
+						  		speed2: item.speed2
+						  	})
+						  })
+						  that.tableData.data = dataTab;
+						  that.tableData.total = res.data.total;
+						} else {
+						  that.tableData.data = [];
+						  that.tableData.total = 0;
+						}
 						that.tableLoading = false;
-						that.tableData.total = res.data.total;
 					}
 				});
 			},
@@ -273,8 +285,7 @@
 				}
 			},
 			onChangePage(params) {
-				console.log(params)
-				this.pageNum = params.pageNum;
+				this.pageIndex = params.pageIndex;
 				this.pageSize = params.pageSize;
 				this.getTable();
 			},

+ 5 - 2
vue.config.js

@@ -75,7 +75,7 @@ module.exports = {
       new CopyWebpackPlugin([{ from: path.join(cesiumSource, 'ThirdParty/Workers'), to: 'ThirdParty/Workers' }]),
       new webpack.DefinePlugin({
         CESIUM_BASE_URL: JSON.stringify('./')
-      })
+      }),
     ]
   },
 
@@ -102,7 +102,10 @@ module.exports = {
     const types = ['vue-modules', 'vue', 'normal-modules', 'normal'];
     types.forEach(type => addStyleResource(config.module.rule('less').oneOf(type)));
 
-    config.module.rule('meta-loader').test(/\.js$/).use('@open-wc/webpack-import-meta-loader').loader('@open-wc/webpack-import-meta-loader');
+    // const metaLoaderRule = config.module.rule('meta-loader');
+    // metaLoaderRule.test(/\.js$/)
+    //   .use('@open-wc/webpack-import-meta-loader')
+    //   .loader('@open-wc/webpack-import-meta-loader');
 
     // svg 雪碧图
     config.module // 排除其他svg-loader