Browse Source

打印模板及scada查询调整

liangluogis 1 year ago
parent
commit
6dac06b252

File diff suppressed because it is too large
+ 3 - 2
public/config.js


+ 1 - 0
src/views/currentSystem/regionalMetering/components/widgetGroup/widget.vue

@@ -84,6 +84,7 @@ export default {
             return action
           }
           mapViewD.TF_printToJson = (mapView, extent, scale, title, author, company) => {
+            debugger
             var result = {
               'mapOptions': {
                 'extent': extent.toJSON(),

+ 11 - 7
src/views/zhpt/scada/scadaDayilyReport/widget.vue

@@ -20,7 +20,7 @@
       </el-select>
       &nbsp;&nbsp;
       <span class="title2">设备名称:</span>
-      <el-select ref="site" v-model="deviceType" style="display: inline-block; margin-right: 5px" size="small" placeholder="请选择" @change="bindTsNameChange">
+      <el-select ref="site" v-model="deviceId" style="display: inline-block; margin-right: 5px" size="small" placeholder="请选择" @change="bindTsNameChange">
         <el-option v-for="item in isSeletcSite" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
       &nbsp;&nbsp;
@@ -139,7 +139,7 @@ export default {
         }
       ],
       categoryName: '1',
-      deviceType: '',
+      deviceId: '',
       isSeletcSite: [],
       type: '',
       types: [],
@@ -169,12 +169,16 @@ export default {
       // }
       // const nextDate = new Date(this.endTime + ' 24:00:00')
       // const endDate = nextDate.getFullYear() + '-' + (nextDate.getMonth() + 1) + '-' + (nextDate.getDate() > 9 ? nextDate.getDate() : '0' + nextDate.getDate()) + ' 00:00:00'
+      let temp=this.indexName;
+      if(this.indexName.length==0&&this.indexNames.length>0){
+        temp=this.indexNames.map(e=>{return e.id})
+      }
       const data = {
         type: this.categoryName,
-        deviceType: this.deviceType,
+        deviceId: this.deviceId,
         censusDate: this.monthTime,
         censusDateType: '3', // 按天查询
-        indexId: this.indexName + ''
+        indexId: temp + ''
       }
       Object.assign(data, this.pageInfo)
       reportFormCensus(data).then(res => {
@@ -228,7 +232,7 @@ export default {
       this.types = []
       this.indexNames = []
       this.targetIndex = {}
-      this.deviceType = ''
+      this.deviceId = ''
       this.type = ''
       this.indexName = []
       this.dataList = []
@@ -248,14 +252,14 @@ export default {
       })
     },
     queryIndexType() {
-      queryIndexConfiguration({ deviceId: this.deviceType, size: 10000 }).then(res => {
+      queryIndexConfiguration({ deviceId: this.deviceId, size: 10000 }).then(res => {
         const arr = this.process(res.result.records)
         this.types = arr
         console.log(this.types)
       })
     },
     queryIndexConfiguration() {
-      queryIndexConfiguration({ deviceId: this.deviceType, type: this.type, size: 10000 }).then(res => {
+      queryIndexConfiguration({ deviceId: this.deviceId, type: this.type, size: 10000 }).then(res => {
         this.indexNames = res.result.records
         var index = this.targetIndex = {}
         res.result.records.map(e => {

+ 11 - 8
src/views/zhpt/scada/scadaMonthlyReport/widget.vue

@@ -17,7 +17,7 @@
       </el-select>
       &nbsp;&nbsp;
       <span class="title2">设备名称:</span>
-      <el-select ref="site" v-model="deviceType" style="display: inline-block; margin-right: 5px" size="small" placeholder="请选择" @change="bindTsNameChange">
+      <el-select ref="site" v-model="deviceId" style="display: inline-block; margin-right: 5px" size="small" placeholder="请选择" @change="bindTsNameChange">
         <el-option v-for="item in isSeletcSite" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
       &nbsp;&nbsp;
@@ -170,7 +170,7 @@ export default {
         }
       ],
       categoryName: '1',
-      deviceType: '',
+      deviceId: '',
       isSeletcSite: [],
       type: '',
       types: [],
@@ -206,13 +206,16 @@ export default {
       }
       // 月底截止日期
       // const endDate = this.getCurrentMonthLast(this.monthTime) + ' 23:59:59'
-
+    let temp=this.indexName;
+      if(this.indexName.length==0&&this.indexNames.length>0){
+        temp=this.indexNames.map(e=>{return e.id})
+      }
       const data = {
         type: this.categoryName,
-        deviceType: this.deviceType,
+        deviceId: this.deviceId,
         censusDate: this.yearTime,
         censusDateType: '2', // 按yue查询
-        indexId: this.indexName + ''
+        indexId: temp + ''
       }
       Object.assign(data, this.pageInfo)
 
@@ -403,7 +406,7 @@ export default {
       this.types = []
       this.indexNames = []
       this.targetIndex = {}
-      this.deviceType = ''
+      this.deviceId = ''
       this.type = ''
       this.indexName = []
       this.dataList = []
@@ -423,14 +426,14 @@ export default {
       })
     },
     queryIndexType() {
-      queryIndexConfiguration({ deviceId: this.deviceType, size: 10000 }).then(res => {
+      queryIndexConfiguration({ deviceId: this.deviceId, size: 10000 }).then(res => {
         const arr = this.process(res.result.records)
         this.types = arr
         console.log(this.types)
       })
     },
     queryIndexConfiguration() {
-      queryIndexConfiguration({ deviceId: this.deviceType, type: this.type, size: 10000 }).then(res => {
+      queryIndexConfiguration({ deviceId: this.deviceId, type: this.type, size: 10000 }).then(res => {
         this.indexNames = res.result.records
         var index = this.targetIndex = {}
         res.result.records.map(e => {

+ 11 - 8
src/views/zhpt/scada/scadaYearReport/widget.vue

@@ -17,7 +17,7 @@
       </el-select>
       &nbsp;
       <span class="title2">设备名称:</span>
-      <el-select ref="site" v-model="deviceType" style="display: inline-block; margin-right: 5px" size="small" placeholder="请选择" @change="bindTsNameChange">
+      <el-select ref="site" v-model="deviceId" style="display: inline-block; margin-right: 5px" size="small" placeholder="请选择" @change="bindTsNameChange">
         <el-option v-for="item in isSeletcSite" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
       &nbsp;
@@ -187,7 +187,7 @@ export default {
         }
       ],
       categoryName: '1',
-      deviceType: '',
+      deviceId: '',
       isSeletcSite: [],
       type: '',
       types: [],
@@ -225,14 +225,17 @@ export default {
 
       // // 月底截止日期
       // const endDate = this.yearTime + '-12-31 23:59:59'
-
+    let temp=this.indexName;
+      if(this.indexName.length==0&&this.indexNames.length>0){
+        temp=this.indexNames.map(e=>{return e.id})
+      }
       const data = {
         type: this.categoryName,
-        deviceType: this.deviceType,
+        deviceId: this.deviceId,
         startDate: this.startTime,
         endDate: this.endTime,
         censusDateType: '1', // 按yue查询
-        indexId: this.indexName + ''
+        indexId: temp + ''
       }
       Object.assign(data, this.pageInfo)
       this.dataList = []
@@ -399,7 +402,7 @@ export default {
       this.types = []
       this.indexNames = []
       this.targetIndex = {}
-      this.deviceType = ''
+      this.deviceId = ''
       this.type = ''
       this.indexName = []
       this.dataList = []
@@ -419,14 +422,14 @@ export default {
       })
     },
     queryIndexType() {
-      queryIndexConfiguration({ deviceId: this.deviceType, size: 10000 }).then(res => {
+      queryIndexConfiguration({ deviceId: this.deviceId, size: 10000 }).then(res => {
         const arr = this.process(res.result.records)
         this.types = arr
         console.log(this.types)
       })
     },
     queryIndexConfiguration() {
-      queryIndexConfiguration({ deviceId: this.deviceType, type: this.type, size: 10000 }).then(res => {
+      queryIndexConfiguration({ deviceId: this.deviceId, type: this.type, size: 10000 }).then(res => {
         this.indexNames = res.result.records
         var index = this.targetIndex = {}
         res.result.records.map(e => {

+ 1 - 1
src/views/zhpt/tongyonggongju/printForUserSetting/widget.vue

@@ -255,7 +255,7 @@ export default {
         return
       }
       var extent = this.rectExtent
-      var str = this.mapView.TF_printToJson(this.mapView, extent, undefined,
+      var str = this.mapView.TF_printToJson(this.mapView, extent, this.scaleBar||undefined,
         this.title, this.person || this.$store.state.user.name, this.source || '拓源')
       var newPrint = { name: this.title, poj: '.' + this.typeName.toLowerCase(), state: undefined }
       this.printData.push(newPrint)

+ 1 - 0
src/views/zhpt/tongyonggongju/widgetGroup/widget.vue

@@ -84,6 +84,7 @@ export default {
             return action
           }
           mapViewD.TF_printToJson = (mapView, extent, scale, title, author, company) => {
+            debugger
             var result = {
               'mapOptions': {
                 'extent': extent.toJSON(),