Explorar el Código

Merge branch 'dev' of http://192.168.2.241:3000/wanghai/bimgis_sx into dev

yj hace 3 años
padre
commit
768177ddc8

+ 4 - 4
public/config.js

@@ -2,14 +2,14 @@
  *公司初始化配置
 */
 export const esriConfig = {
-  'baseUrl': 'http://192.168.2.238:8080/arcgis_js_api/v416/arcgis_js_api/library/4.16/dojo/dojo.js',
-  'baseCssUrl': 'http://192.168.2.238:8080/arcgis_js_api/v416/arcgis_js_api/library/4.16/esri/css/main.css',
-  'font_url': 'http://192.168.2.238:8080/arcgis_js_api/v416/arcgis_js_api/library/fonts/',
+  'baseUrl': 'http://221.182.8.141:8080/arcgis_js_api/v416/arcgis_js_api/library/4.16/dojo/dojo.js',
+  'baseCssUrl': 'http://221.182.8.141:8080/arcgis_js_api/v416/arcgis_js_api/library/4.16/esri/css/main.css',
+  'font_url': 'http://221.182.8.141:8080/arcgis_js_api/v416/arcgis_js_api/library/fonts/',
 }
 
 export const iserverConfig = {
   // 'baseUrl': 'http://117.174.10.73:8090/iserver/'
-  'baseUrl': 'http://192.168.2.238:8090/iserver/'
+  'baseUrl': 'http://221.182.8.141:8090/iserver/'
 }
 
 export const appconfig = {

+ 9 - 9
src/config/bigScreenConfig.js

@@ -12,7 +12,7 @@ export const appconfig = {
         {
           "dixing": {
             "name": "地形",
-            "url": "http://192.168.2.238:8090/iserver/services/3D-sxgk_dem/rest/realspace/datas/TF_PAPN_DEM@sxgk_base"
+            "url": "http://221.182.8.141:8090/iserver/services/3D-sxgk_dem/rest/realspace/datas/TF_PAPN_DEM@sxgk_base"
             // "url": "https://yeepms.yeec.com.cn/iserver/services/3D-sxgk_dem/rest/realspace/datas/TF_PAPN_DEM@sxgk_base"
           }
         }
@@ -24,7 +24,7 @@ export const appconfig = {
           "chinavec2d": {
             "name": "中国电子地图",
             // "url": "https://yeepms.yeec.com.cn/iserver/services/map-citymap/rest/maps/citymap_yc"
-            "url": "http://192.168.2.20:8090/iserver/services/map-citymap-2/rest/maps/citymap_yc"
+            "url": "http://221.182.8.141:8090/iserver/services/map-citymap-2/rest/maps/citymap_yc"
           }
         }
       },
@@ -34,17 +34,17 @@ export const appconfig = {
         "config": {
           "wscj": {
             "name": "污水厂",
-            "url": "http://192.168.2.20:8090/iserver/services/3D-liduershuichang/rest/realspace"
+            "url": "http://221.182.8.141:8090/iserver/services/3D-liduershuichang/rest/realspace"
           },
           "jzcj": {
             "name": "建筑场景",
             // "url": "https://yeepms.yeec.com.cn/iserver/services/3D-TF_PAPN_BUILD/rest/realspace"
-            "url": "http://192.168.2.238:8090/iserver/services/3D-TF_PAPN_BUILD/rest/realspace"
+            "url": "http://221.182.8.141:8090/iserver/services/3D-TF_PAPN_BUILD/rest/realspace"
           },
           "gcgdcj": {
             "name": "设计管网",
-            // "url": "http://192.168.2.238:8090/iserver/services/3D-hbyc_sj/rest/realspace"
-            "url": "http://192.168.2.20:8090/iserver/services/3D-hbyc_sj_20220808/rest/realspace"
+            // "url": "http://221.182.8.141:8090/iserver/services/3D-hbyc_sj/rest/realspace"
+            "url": "http://221.182.8.141:8090/iserver/services/3D-hbyc_sj_20220808/rest/realspace"
 
           }
         }
@@ -55,7 +55,7 @@ export const appconfig = {
         "config": {
           "sjdt": {
             "name": "设计管线",
-            "url": "http://192.168.2.20:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_sj"
+            "url": "http://221.182.8.141:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_sj"
           },
         }
       },
@@ -65,11 +65,11 @@ export const appconfig = {
         "config": {
           "sjfw": {
             "name": "宜昌数据服务",
-            "url": "http://192.168.2.20:8090/iserver/services/data-sxgk_yc/rest/data"
+            "url": "http://221.182.8.141:8090/iserver/services/data-sxgk_yc/rest/data"
           },
           "bjsmidfw": {
             "name": "部件SMID查询",
-            "url": "http://192.168.2.20:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_query"
+            "url": "http://221.182.8.141:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_query"
           },
         }
       },

+ 2 - 2
src/config/configure.js

@@ -1,5 +1,5 @@
 export const iserverConfig = {
-    baseUrl: 'http://192.168.2.238:8090/iserver/'
+    baseUrl: 'http://221.182.8.141:8090/iserver/'
 }
 var AppX = {
     // 应用配置
@@ -123,7 +123,7 @@ var AppX = {
                         "url": iserverConfig.baseUrl + "services/map-sxgk/rest/maps/hnyy_type"
                     },
                     "pcdtps": {
-                        "isDisplay": "0",
+                        "isDisplay": "1",
                         "name": "排水存量管线(岳阳)",
                         "url": iserverConfig.baseUrl + "services/map-sxgk/rest/maps/hnyy_pc_ps"
                     }

+ 14 - 11
src/views/groupPageDataManagement/IndexManagement/widget.vue

@@ -69,21 +69,22 @@ export default class IndexManagement extends Vue {
       params = {
         indexName: data ? data.keyword : ''
       }
-      if (data.latest) {
-        params['isNew'] = 0
-      }
-      if (data.notlatest) {
-        params['isNew'] = 1
-      }
-      if (data.latest && data.notlatest) {
-        delete params['isNew']
-      }
+      params['isNew'] = data.islatest ? 1 : 0
+      // if (data.latest) {
+      //   params['isNew'] = 1
+      // }
+      // if (data.notlatest) {
+      //   params['isNew'] = 0
+      // }
+      // if (data.latest && data.notlatest) {
+      //   delete params['isNew']
+      // }
     }
     getIndexList(params).then((res) => {
       try {
         this.tableData = res.result.map((item) => {
           Object.keys(item).forEach((val) => (item[val] = item[val] || '/'))
-          return { ...item, source: item.source == '1' ? '本地导入' : '', isNew: item.isNew == '0' ? '是' : '否' }
+          return { ...item, source: item.source == '1' ? '本地导入' : '', isNew: item.isNew == '1' ? '是' : '否' }
         })
       } catch (error) {
         console.log(error)
@@ -118,6 +119,7 @@ export default class IndexManagement extends Vue {
 
   async onSubmit(data) {
     this.loading[data.id ? 'update' : 'add'] = true
+    data['isNew'] = data['isNew'] == '是' ? 1 : 0
     try {
       const { result } = await (data.id ? editIndexData({ ...data }) : addIndexData({ ...data }))
       this.$message[result ? 'success' : 'error'](`${data.id ? '修改' : '新增'}指标${result ? '成功!' : '失败!'}`)
@@ -170,7 +172,7 @@ export default class IndexManagement extends Vue {
       })
   }
 
-  onExport() {
+  onExport(data) {
     this.loading.export = true
     axios
       .request({
@@ -180,6 +182,7 @@ export default class IndexManagement extends Vue {
         },
         method: 'get',
         url: exporUrl,
+        params: { isNew: 1, indexName: data ? data.keyword : '' },
         responseType: 'blob'
       })
       .then((res) => {

+ 3 - 2
src/views/groupPageDataManagement/commonAPI/common.ts

@@ -1,7 +1,8 @@
 export interface IActionType {
     keyword: string,
-    latest?: boolean,
-    notlatest?: boolean
+    islatest: boolean,
+    // latest?: boolean,
+    // notlatest?: boolean
 }
 export interface ILoading {
     search: boolean

+ 10 - 5
src/views/groupPageDataManagement/components/ActionHeader.vue

@@ -15,8 +15,10 @@
     </el-form-item>
     <template v-if="!onlySearch">
       <el-form-item label="是否最新">
-        <el-checkbox v-model="formData.latest">是</el-checkbox>
-        <el-checkbox v-model="formData.notlatest">否</el-checkbox>
+        <!-- <el-checkbox v-model="formData.latest">是</el-checkbox>
+        <el-checkbox v-model="formData.notlatest">否</el-checkbox> -->
+        <el-radio v-model="formData.islatest" :label="true">是</el-radio>
+        <el-radio v-model="formData.islatest" :label="false">否</el-radio>
       </el-form-item>
       <el-form-item style="position: absolute; right: 0">
         <el-button type="primary" size="small" @click="$emit('add')" icon="el-icon-plus"> 新增 </el-button>
@@ -44,7 +46,7 @@
         <el-button
           type="primary"
           size="small"
-          @click="$emit('export')"
+          @click="$emit('export', { ...formData })"
           icon="el-icon-upload2"
           :loading="loading.export"
         >
@@ -59,7 +61,6 @@
 import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
 import { IActionType } from '../commonAPI/common'
 import { ILoading } from '../commonAPI/common'
-import axios from '@/utils/request'
 @Component({ name: 'ActionHeader' })
 export default class ActionHeader extends Vue {
   @Prop({ type: Object, default: () => ({}) }) loading!: ILoading
@@ -73,7 +74,11 @@ export default class ActionHeader extends Vue {
       this.$emit('search', { ...this.formData })
     }
   }
-  formData: Partial<IActionType> = { notlatest: true }
+  @Watch('formData.islatest')
+  onDataChange(n, o) {
+    this.$emit('search', { ...this.formData })
+  }
+  formData: Partial<IActionType> = { islatest: true }
   get ids() {
     return this.selected.map((item) => item.id).join()
   }

+ 38 - 18
src/views/spectrum/reform/statistics/DayAndHourChart.vue

@@ -21,12 +21,20 @@
   import emptyImg from '@/assets/icon/null.png'
   import { IPointTarget } from '../../configuration/api/common'
 
-  @Component({ name: 'ChartItem' })
-  export default class ChartItem extends Vue {
+  const toFixed2 = (num: number | string) => Math.floor(Number(num) * 100) / 100
+
+  const toXAxis = (dateStr: string) => {
+    const [date, time] = String(dateStr).split(' ')
+    if (!time) return dateStr
+    return `${date} ${time.length === 1 ? '0' : ''}${time}:00`
+  }
+
+  @Component({ name: 'DayAndHourChart' })
+  export default class DayAndHourChart extends Vue {
     @Prop({ type: String }) title!: string
     @Prop({ type: Object, default: () => ({}) }) data!: IStatisticsDayNHour
     @Prop({ type: Array, default: () => [] }) standards!: IPointTarget['showVos']
-    @Prop({ type: String, default: 'rfallTotal' }) rainfallKey!: string
+    @Prop({ type: String, default: 'rfallTotal' }) rainfallKey!: keyof IStatisticsDayNHour['rainFallVos'][0]
     emptyImg = emptyImg
 
     getCodeName(code) {
@@ -39,13 +47,27 @@
       const dataset = [
         {
           id: 'rainfall',
-          source: (rainFallVos || []).filter((item) => !!item[this.rainfallKey])
+          source: (rainFallVos || [])
+            .filter((item) => !!item[this.rainfallKey])
+            .map(({ xposition, [this.rainfallKey]: val }) => {
+              return {
+                xposition: toXAxis(xposition),
+                [this.rainfallKey]: toFixed2(val)
+              }
+            })
         },
         ...datas.map(({ checkCode, statisticalData }) => ({
           id: checkCode,
-          source: statisticalData
+          source: statisticalData.map(({ avgValue, maxValue, minValue, xposition }) => {
+            return {
+              avgValue: toFixed2(avgValue),
+              maxValue: toFixed2(maxValue),
+              minValue: toFixed2(minValue),
+              xposition: toXAxis(xposition)
+            }
+          })
         }))
-      ]
+      ].map((item) => ({ ...item, source: item.source.sort((a, b) => a.xposition.localeCompare(b.xposition)) }))
       const series = dataset
         .map(({ id }, index) => {
           return index === 0
@@ -53,9 +75,11 @@
                 name: '降雨量',
                 dimensions: ['xposition', this.rainfallKey],
                 datasetIndex: index,
-                type: 'line',
-                symbol: 'circle',
-                smooth: true,
+                // type: 'line',
+                // symbol: 'circle',
+                // smooth: true,
+                type: 'bar',
+                barMaxWidth: 30,
                 yAxisIndex: 1
               }
             : [
@@ -87,16 +111,11 @@
               ...new Set(
                 dataset.map((item) => (item.source as { xposition: string }[]).map((item) => item.xposition)).flat()
               )
-            ].sort((a, b) => {
-              const reg = /(?<=\d{4}年)(\d)(?=月)/
-              const left = a.replace(reg, `0$1`)
-              const right = b.replace(reg, `0$1`)
-              return left.localeCompare(right)
-            })
+            ].sort((a, b) => a.localeCompare(b))
           }
         ],
         yAxis: [
-          { type: 'value', boundaryGap: false },
+          { type: 'value', boundaryGap: false, offset: 15 },
           {
             type: 'value',
             boundaryGap: false,
@@ -104,7 +123,8 @@
             alignTicks: true,
             position: 'right',
             name: '降雨量',
-            nameLocation: 'start'
+            nameLocation: 'start',
+            offset: 15
           }
         ],
         dataZoom: dataset.some(({ source }) => source.length > 100) && [
@@ -112,7 +132,7 @@
           { start: 0, end: 100 }
         ],
         legend: { show: true, type: 'scroll', width: '80%' },
-        grid: { top: 45, left: 45, right: 45, bottom: 45, containLabel: true },
+        grid: { top: 45, left: 50, right: 50, bottom: 45, containLabel: true },
         toolbox: { show: true, feature: { restore: { show: true }, saveAsImage: { show: true } } },
         dataset,
         series

+ 23 - 1
src/views/widgets/miniMap/index.vue

@@ -366,7 +366,29 @@ export default {
 
       imagelayers.addImageryProvider(poilayer, 2)
     },
-    handelClose() {}
+    handelClose() {},
+    /**
+     * 添加单个坐标点
+     */
+    addMarker(coordinate) {
+      // const icon = getSiteIcon(deviceItem)
+      if (coordinate.length > 1) {
+        const position = Cesium.Cartesian3.fromDegrees(coordinate[0], coordinate[1], 0)
+        let entity = new Cesium.Entity({
+          // id: deviceItem.id,
+          position: position,
+          billboard: {
+            image: require('@/views/spectrum/common/images/location.png'),
+            width: 40,
+            height: 70,
+            heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+            eyeOffset: Cesium.Cartesian3.ZERO
+          }
+        })
+        this._viewer.entities.add(entity)
+        this._viewer.flyTo(entity)
+      }
+    }
   }
 }
 </script>