Browse Source

6.19修改

ZIneen 1 year ago
parent
commit
7a00c5c840

+ 2 - 1
.gitignore

@@ -5,4 +5,5 @@ dist
 psjc
 psjcdev
 report.20*.json
-.doc*
+.doc*
+.history

+ 19 - 13
src/layout/components/Header/index.vue

@@ -49,7 +49,6 @@
             <!-- <el-dialog v-if="notificationDialog" :visible.sync="notificationDialog" title="消息" append-to-body>
               <notification @close-notification="handleCloseNotification" @reget-noti="handleMarked" />
             </el-dialog> -->
-            <warningPanel v-if="notificationDialog"/>
             <video ref="videoMsg" src="../../../assets/images/home/msg.mp3" style="display: none" />
             <!-- <audio autoplay="autoplay">
               <source src="/i/song.ogg" type="audio/ogg" />
@@ -153,7 +152,9 @@
 
       <user-info-edit v-if="userEdit" :show-apply.sync="userEdit" />
     </div>
+    <warningPanel v-show="notificationDialog" @toShowPanel="toShowPanel"> </warningPanel>
   </div>
+ 
 </template>
 
 <script lang="ts">
@@ -293,8 +294,8 @@ export default class Header extends Vue {
         this.getNotificationNum()
       }, 0)
     }, notificationInterval)
-    // 利用点击其他区域关闭报警信息弹窗
-    document.addEventListener("click", this.bodyCloseMenus)
+    // // 利用点击其他区域关闭报警信息弹窗
+    // document.addEventListener("click", this.bodyCloseMenus)
   }
   destroyed() {
     window.clearInterval(this.timer)
@@ -313,12 +314,17 @@ export default class Header extends Vue {
   beforeRemove(file, fileList) {
     return this.$confirm(`确定移除 ${file.name}?`)
   }
-    // 点击其他区域关闭报警信息弹窗 
-    bodyCloseMenus(){
-    let self=this
-    if(self.notificationDialog == true){
-      self.notificationDialog = false
-    }
+  //   // 点击其他区域关闭报警信息弹窗 
+  //   bodyCloseMenus(){
+  //   let self=this
+  //   if(self.notificationDialog == true){
+  //     self.notificationDialog = false
+  //   }
+  // }
+  // 关闭弹窗
+  toShowPanel(value){
+    console.log("子组件的值", value);
+    this.notificationDialog = false
   }
   // 地图跳转
   showMap(){
@@ -445,10 +451,10 @@ export default class Header extends Vue {
     //   }
     // })
   }
-  // 消息界面跳转到对应处理的位置后 关闭弹窗
-  handleCloseNotification() {
-    this.notificationDialog = false
-  }
+  // // 消息界面跳转到对应处理的位置后 关闭弹窗
+  // handleCloseNotification() {
+  //   this.notificationDialog = false
+  // }
   // 消息界面标记已读后 刷新条数
   handleMarked() {
     this.getNotificationNum()

+ 4 - 4
src/views/spectrum/configuration/utils.ts

@@ -7,8 +7,8 @@ export const deviceTypeCols: ColItem[] = [
   { type: 'selection', width: '50px' },
   { type: 'index', label: '序号', width: '60px' },
   { prop: 'deviceTypeName', label: '设备类型', minWidth: '220px', ...elTableAlignLeft() },
-  { prop: 'dataUploadTime', label: '数据刷新时间(min)', width: '140px' },
-  { prop: 'icon', label: '图标', width: '100px', _slot: true }
+  // { prop: 'dataUploadTime', label: '数据刷新时间(min)', width: '140px' },
+  // { prop: 'icon', label: '图标', width: '100px', _slot: true }
 ]
 
 export const deviceTypeParamCols: ColItem[] = [
@@ -37,8 +37,8 @@ export const standardCols: ColItem[] = [
   { type: 'index', label: '序号', width: '60px' },
   { prop: 'standardName', label: '指标标准名称', minWidth: '120px', ...elTableAlignLeft() },
   { prop: 'typeName', label: '设备类型', minWidth: '120px', ...elTableAlignLeft() },
-  { prop: 'createUserName', label: '创建人', minWidth: '120px', ...elTableAlignLeft() },
-  { prop: 'createTime', label: '创建时间', width: '170px' }
+  // { prop: 'createUserName', label: '创建人', minWidth: '120px', ...elTableAlignLeft() },
+  // { prop: 'createTime', label: '创建时间', width: '170px' }
 ]
 
 export const standardParamCols: ColItem[] = [

+ 63 - 1
src/views/spectrum/reform/afterAssess/widget.vue

@@ -562,11 +562,60 @@ export default {
       if (!id) return
       getProjectSchemeById(id).then(async (res) => {
         if (res.code != 1) return
+        console.log("回填的数据", res.result);
         const { monitorScheme, projectScheme } = res.result
         // 方案
         this.$set(this.form, 'projectName', projectScheme.projectName)
         this.$set(this.form, 'projectRemouldTarget', projectScheme.projectRemouldTarget)
         this.$set(this.form, 'id', projectScheme.id)
+
+        // this.$set(beforeRemouldDate1, beforeRemouldDate1, projectScheme.beforeRemouldDate1)
+        this.beforeRemouldDate1 = projectScheme.beforeRemouldStartDate
+        this.beforeRemouldDate2 = projectScheme.beforeRemouldEndDate
+        let dataCount = this.DateMinus(this.beforeRemouldDate1, this.beforeRemouldDate2)
+        console.log("相减的天数", dataCount);
+        let ljRain = 0
+        for(let i=0; i<this.selectData1.length; i++){
+          // debugger
+          if(this.selectData1[i].dayStr == this.beforeRemouldDate1.slice(0, 10)){
+            alert(11111)
+            console.log("相等的标号", i);
+            console.log("相等的标号前", this.selectData1[i-1]);
+            console.log("相等的标号中", this.selectData1[i]);
+            console.log("相等的标号后", this.selectData1[i+1]);
+            for(let j=i;j>=(i-dataCount);j--){
+              console.log("降雨量", this.selectData1[j]);
+              ljRain = ljRain + this.selectData1[j].rfall
+            }
+          }
+        }
+        console.log("累加的降雨量", ljRain);
+        this.addRain = ljRain
+
+        this.afterRemouldDate1 = projectScheme.afterRemouldStartDate
+        this.afterRemouldDate2 = projectScheme.afterRemouldEndDate
+
+        let dataCount2 = this.DateMinus(this.afterRemouldDate1, this.afterRemouldDate2)
+        console.log("相减的天数2", dataCount2);
+        let ljRain2 = 0
+        for(let i=0; i<this.selectData1.length; i++){
+          // debugger
+          if(this.selectData1[i].dayStr == this.afterRemouldDate1.slice(0, 10)){
+            alert(11111)
+            console.log("相等的标号", i);
+            console.log("相等的标号前", this.selectData1[i-1]);
+            console.log("相等的标号中", this.selectData1[i]);
+            console.log("相等的标号后", this.selectData1[i+1]);
+            for(let j=i;j>=(i-dataCount2);j--){
+              console.log("降雨量", this.selectData1[j]);
+              ljRain2 = ljRain2 + this.selectData1[j].rfall
+            }
+          }
+        }
+        console.log("累加的降雨量", ljRain2);
+        this.addRain2 = ljRain2
+
+
         // 方案站点指标
         let siteGroups = []
         if (monitorScheme) {
@@ -619,6 +668,19 @@ export default {
         this.$forceUpdate()
       })
     },
+
+    /**
+     * 通过日期字符串相减得到天数
+     */
+    DateMinus(date1, date2) {
+      //date1:小日期   date2:大日期
+      var sdate = new Date(date1);
+      var now = new Date(date2);
+      var days = now.getTime() - sdate.getTime();
+      var day = parseInt(days / (1000 * 60 * 60 * 24));
+      return day;
+    },
+
     /**
      * 曲线请求参数
      */
@@ -855,7 +917,7 @@ export default {
     getSelectData() {
       getSelectData1().then((res) => {
         if (res.code == 1) {
-          // console.log("改造前计算下拉框数据1"+JSON.stringify(res))
+          console.log("改造前计算下拉框数据1"+JSON.stringify(res))
           this.selectData1 = res.result
           for (let i = 0; i < this.selectData1.length; i++) {
             this.selectData1[i]['lable'] =

+ 17 - 5
src/views/widgets/miniMap/index.vue

@@ -421,9 +421,13 @@ export default {
         popup.style.whiteSpace = 'nowrap'
         this._viewer.container.appendChild(popup)
         this.renderCellback = this._viewer.scene.postRender.addEventListener((e) => {
-          const windowPosition = Cesium.SceneTransforms.wgs84ToWindowCoordinates(this._viewer.scene, position)
-          popup.style.left = windowPosition.x + 'px'
-          popup.style.top = windowPosition.y - popup.offsetHeight - 65 + 'px'
+          if (position) {
+            const windowPosition = Cesium.SceneTransforms.wgs84ToWindowCoordinates(this._viewer.scene, position)
+            if (windowPosition) {
+              popup.style.left = windowPosition.x + 'px'
+              popup.style.top = windowPosition.y - popup.offsetHeight - 65 + 'px'
+            }
+          }
         })
       }
       this._viewer.scene.screenSpaceCameraController.minimumZoomDistance = 1200;
@@ -553,14 +557,17 @@ export default {
   width: 100%;
   height: 100%;
   position: relative;
+
   .cesium-viewer-navigationContainer {
     display: none !important;
   }
+
   canvas {
     width: 100% !important;
     height: 100% !important;
     touch-action: none;
   }
+
   .cesium-viewer-bottom,
   .cesium-viewer-selectionIndicatorContainer,
   .cesium-viewer-infoBoxContainer,
@@ -568,10 +575,12 @@ export default {
   .cesium-viewer-zoomIndicatorContainer {
     display: none !important;
   }
-  >>> .cesium-viewer-navigationContainer {
+
+  >>>.cesium-viewer-navigationContainer {
     right: unset !important;
     left: 0 !important;
   }
+
   .top-bar {
     position: absolute;
     z-index: 990;
@@ -581,7 +590,8 @@ export default {
     border-radius: 4px;
     box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.4);
     background-color: #fff;
-    > div {
+
+    >div {
       width: 82px;
       height: 38px;
       line-height: 38px;
@@ -591,9 +601,11 @@ export default {
       cursor: pointer;
       color: #606266;
       position: relative;
+
       &:hover {
         color: #409eff;
       }
+
       &:nth-child(n + 2) {
         &::before {
           content: '';

+ 26 - 16
src/views/widgets/warningPanel/index.vue

@@ -6,13 +6,16 @@
 
          <div class="header1">
            <span style="color: #000000; font-size: 14px; margin-top: 10px; margin-left: 10px;">监测设备报警提醒({{ noReadNum }}/{{ alarmTotal }})</span>
-           <el-button type="text" style="float: right; margin-top: 0px; padding-top: 5px; margin-right: 10px;" @click="seeHistory">查看历史曲线</el-button>
-         </div>
+           <!-- <el-button type="text" style="float: right; margin-top: 0px; padding-top: 5px; margin-right: 10px;" @click="seeHistory">查看历史曲线</el-button> -->
+           <!-- <div icon="el-icon-close" @click="aa"></div> -->
+           <el-button type="text" icon="el-icon-close" style="float: right; margin-top: 0px; padding-top: 5px; margin-right: 10px;" @click="seeHistory"></el-button>
+          </div>
 
          <div class="header2">
           <el-checkbox  style="margin-left: 15px; font-size: 10px;" :indeterminate="indeterminate" @change="handleCheck" v-model="allCheck">全选</el-checkbox>
           <el-button type="primary" size="mini" style="float: right; margin-top: 0px; padding-top: 5px; margin-right: 10px;" @click="markRead">标记已读</el-button>
-         </div>
+          
+        </div>
 
         </div>
         <!-- 内容 -->
@@ -171,7 +174,7 @@ export default {
     this.getSites()
     this.getAlarmData()
     this.getNoReadHistory()
-    this.initClick()
+    // this.initClick()
   },
   destroyed() {
     window.viewer.entities.removeAll()
@@ -320,7 +323,7 @@ export default {
  * 双击定位
  */
     rowDbclick(site, column, event) {
-      // console.log("zuobiao"+JSON.stringify(site))
+      console.log("zuobiao", site)
       let siteTemp = site.siteVo
       let icon = getSiteIcon(site, false)
       let viewer = window.viewer
@@ -360,6 +363,11 @@ export default {
         this.popup.destroy()
       }
       this.getSiteNewData(siteTemp)
+      let sitId = site.siteId
+        this.$refs.historyCurves.show(sitId, {
+          beginDate: moment().subtract(1, 'months').format('YYYY-MM-DD HH:mm:ss'),
+          endDate: moment().format('YYYY-MM-DD HH:mm:ss')
+      })
     },
 
 //     /**
@@ -435,17 +443,18 @@ export default {
      * 查看历史曲线
      */
     seeHistory() {
-      if(this.multipleSelection.length == 0){
-        this.$message.error("请选择一条报警信息查看历史曲线!")
-      }else if(this.multipleSelection.length == 1){
-        let sitId = this.multipleSelection[0].siteId
-        this.$refs.historyCurves.show(sitId, {
-          beginDate: moment().subtract(1, 'months').format('YYYY-MM-DD HH:mm:ss'),
-          endDate: moment().format('YYYY-MM-DD HH:mm:ss')
-      })
-      }else if(this.multipleSelection.length > 1){
-        this.$message.error("一次只能选择一条报警信息查看历史曲线!")
-      }
+      this.$emit("toShowPanel", "false")
+      // if(this.multipleSelection.length == 0){
+      //   this.$message.error("请选择一条报警信息查看历史曲线!")
+      // }else if(this.multipleSelection.length == 1){
+      //   let sitId = this.multipleSelection[0].siteId
+      //   this.$refs.historyCurves.show(sitId, {
+      //     beginDate: moment().subtract(1, 'months').format('YYYY-MM-DD HH:mm:ss'),
+      //     endDate: moment().format('YYYY-MM-DD HH:mm:ss')
+      // })
+      // }else if(this.multipleSelection.length > 1){
+      //   this.$message.error("一次只能选择一条报警信息查看历史曲线!")
+      // }
     },
 
     getRowKey(row) {
@@ -564,6 +573,7 @@ export default {
   position:fixed;/* 将位置设置为层模型 */
   right:15px;/* 当前元素距离右端的距离 */
   top:150px;/* 当前元素距离顶部的距离 */
+  z-index: 999;
 }
 
 // 题目