Jelajahi Sumber

设置广场id

fujunwen 4 tahun lalu
induk
melakukan
06f82dcdb7

+ 8 - 3
src/views/analysis/CoreDeviceReport.vue

@@ -176,6 +176,7 @@ import { log } from "util";
 export default {
   data() {
     return {
+      plazaId: 1000423, // 广场id
       systemId: "", // 当前系统Id
       systemList: [], // 系统
       systemContentData: [
@@ -233,6 +234,10 @@ export default {
 
   computed: {},
 
+  beforeMount() {
+    let PLAZAID = localStorage.getItem('PLAZAID');
+    this.plazaId = Number(PLAZAID) || 1000423;
+  },
   mounted() {
     document.addEventListener('click', () => {
       setTimeout(() => {
@@ -284,7 +289,7 @@ export default {
      */
     getEquipmentOfSystem() {
       let param = {
-        plazaId: 1000423,
+        plazaId: this.plazaId,
         ccode: 1002347
       };
       if (this.systemId !== "") {
@@ -347,7 +352,7 @@ export default {
           return o.isActive;
         }).category_code
       };
-      let url = `/data/sms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}&orderBy=is_exception,0`;
+      let url = `/data/sms_asset/query?plazaId=${this.plazaId}3&page=${this.curPage}&size=${this.pageSize}&orderBy=is_exception,0`;
       if (_.trim(this.searchKey) !== "") {
         url = `${url}&keyword=${this.searchKey}:sbjc,sbjbm`;
       }
@@ -397,7 +402,7 @@ export default {
       let param = {
         page: this.hisCurPage,
         size: this.hisPageSize,
-        plazaId: 1000423,
+        plazaId: this.plazaId,
         assetnum: this.assetnum,
         // assetnum: 24071,
         startDate: this.startTime,

+ 7 - 2
src/views/analysis/GanttChart.vue

@@ -152,6 +152,7 @@ import ExpandArrow from "../../assets/svg/expand_arrow.svg";
 export default {
   data() {
     return {
+      plazaId: 1000423, // 广场id
       systemList: [], // 系统列表
       systemId: "", // 系统名称
       legends: [
@@ -229,6 +230,10 @@ export default {
 
   computed: {},
 
+  beforeMount() {
+    let PLAZAID = localStorage.getItem('PLAZAID');
+    this.plazaId = Number(PLAZAID) || 1000423;
+  },
   mounted() {
     document.addEventListener('click', () => {
       setTimeout(() => {
@@ -327,7 +332,7 @@ export default {
       let time = this.disQueryTime();
       let param = {
         smsxt: this.systemId,
-        plazaId: 1000423,
+        plazaId: this.plazaId,
         startDate: this.startTime, // time[0]
         endDate: this.endTime // time[1]
       };
@@ -440,7 +445,7 @@ export default {
      */
     getGanttDetailData() {
       let param = {
-        plazaId: 1000423,
+        plazaId: this.plazaId,
         type: 2,
         id: 1078467
       };

+ 7 - 3
src/views/analysis/SpecificationUpdateRecord.vue

@@ -50,6 +50,7 @@ import _ from 'lodash';
 export default {
   data () {
     return {
+      plazaId: 1000423, // 广场id
       incidentList: [], // 事件列表
       oraginIncidentList: [
         {id: 'all', name: '全部'},
@@ -72,7 +73,10 @@ export default {
   components: {},
 
   computed: {},
-
+  beforeMount() {
+    let PLAZAID = localStorage.getItem('PLAZAID');
+    this.plazaId = Number(PLAZAID) || 1000423;
+  },
   mounted() {
     this.initTimePicker();
     this.getEvenType();
@@ -97,7 +101,7 @@ export default {
           objtype: 'objtype'
         }
       }
-      queryEventypes(`/data/base/queryOptions?plazaId=1000423`, [query]).then((res) => {
+      queryEventypes(`/data/base/queryOptions?plazaId=${this.plazaId}`, [query]).then((res) => {
         const { result, data } = res;
         if (result === 'success') {
           let newData = [this.oraginIncidentList[0]];
@@ -119,7 +123,7 @@ export default {
       let param = {
         page: this.curPage,
         size: this.pageSize,
-        plazaId: 1000423,
+        plazaId: this.plazaId,
         // changeDateStartDate: 20171027000000,
         // changeDateEndDate: 20171028000000,
       }