Shannon_mu 3 سال پیش
والد
کامیت
46a03cef73

+ 7 - 7
commandCenter/src/main.js

@@ -38,14 +38,14 @@ Vue.use(ElementUI, {
 });
 
 //使用钩子函数对路由进行权限跳转
-router.beforeEach((to, from, next) => {
-  if (to.path == '/') {
-    next('/homeIndex')
-  } else {
-    next()
-  }
+// router.beforeEach((to, from, next) => {
+//   if (to.path == '/') {
+//     next('/homeIndex')
+//   } else {
+//     next()
+//   }
 
-});
+// });
 new Vue({
   router,
   store,

+ 2 - 1
commandCenter/src/views/commandDispatch/pop/dottingEquipment.vue

@@ -145,10 +145,11 @@ export default {
                 .post('/sc-community/parkingCar/findChannelInfo', parameter)
                 .then(({ status, data, msg }) => {
                     let arrs = [];
+                    debugger;
                     if (status == 0) {
                         data.list.map((item) => {
                             arrs.push({
-                                id: item.parkId,
+                                id: `${item.id},${item.parkId}`,
                                 name: item.nodeName,
                                 address: item.parkName
                             });

+ 3 - 2
commandCenter/src/views/commandDispatch/pop/tableList.vue

@@ -9,13 +9,14 @@
 </template>
 <script>
 import list from '@/utils/list.js';
-
+import envConfig from '@/config';
 export default {
     mixins: [list],
     props: ['params'],
     data() {
         return {
             tableData: [],
+            envConfig: envConfig,
             cols: [
                 {
                     label: '告警名称',
@@ -91,7 +92,7 @@ export default {
                 .catch(() => {});
         },
         submit() {
-            window.open('http://114.135.61.186:21020/sc-operation/workOrders/index?showPop');
+            window.open(`${envConfig}/sc-operation/workOrders/index?showPop`);
         },
         getList() {
             const { deviceType } = this.params.row;

+ 12 - 10
commandCenter/src/views/commandDispatch/pop/typeCard.vue

@@ -27,18 +27,18 @@ export default {
                 parkName: '',
                 totalNum: '',
                 freeSpaceNum: '',
+                parkId: '',
+                nodeId: ''
             }
         };
     },
     methods: {
-        getData() {
-            debugger;
+        getData(id) {
             this.$http
-                .get('/sc-community/parkingCar/queryParkingLot', { parkId: this.params.row.deviceId })
+                .get('/sc-community/parkingCar/queryParkingLot', { parkId: id})
                 .then(({ status, data, msg }) => {
                     if (status == 0) {
-                        // this.formData = data;
-                        console.log(data);
+                        Object.assign(this.formData,data)
                     } else {
                         this.$message.error(msg);
                     }
@@ -46,11 +46,10 @@ export default {
                 .catch(() => {});
         },
         openType(formData) {
-            debugger;
-            this.$msgBox(`远程开门`, `是否远程开闸?`)
+            this.$msgBox(`远程开闸`, `是否远程开闸?`)
                 .then(() => {
                     this.$http
-                        .post('/sc-community/parkingCar/operateChannel', { nodeId: '', parkId: formData.parkId, type: 0 })
+                        .post('/sc-community/parkingCar/operateChannel', { nodeId: formData.nodeId, parkId: formData.parkId, type: 0 })
                         .then(({ status, data, msg }) => {
                             if (0 === status) {
                                 this.$message({
@@ -66,8 +65,11 @@ export default {
         }
     },
     created() {
-        this.getData();
-        // console.log(this.params.row);
+        let ids = JSON.parse(JSON.stringify(this.params.row.deviceId));
+        let newIds = ids.split(',');
+        this.formData.nodeId = newIds[0];
+        this.formData.parkId = newIds[1];
+        this.getData(newIds[1]);
     }
 };
 </script>

+ 1 - 1
commandCenter/src/views/commandDispatch/pop/typeHydropower.vue

@@ -48,7 +48,7 @@ export default {
                 .catch(() => {});
         },
         valveToggle(satus, id) {
-            this.$msgBox(`远程开门`, `是否远程开关阀?`)
+            this.$msgBox(`远程${satus ==0 ?'开':'关'}阀`, `是否远程${satus ==0 ?'开':'关'}阀?`)
                 .then(() => {
                     this.$http
                         .post('/sc-energy/device/batchValve', {

+ 2 - 2
commandCenter/src/views/smallModule/powerConsumption.vue

@@ -34,7 +34,7 @@ export default {
             clientOptions: columnOptionsChart(
                 '(度)',
                 ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07'],
-                [{ data: [10, 35, 5, 20, 7, 10, 40], name: '用电量' }],
+                [{ data: [0, 0, 0, 0, 0, 0, 0], name: '用电量' }],
                 [],
                 10
             )
@@ -45,7 +45,7 @@ export default {
             this.$http
                 .get('/sc-energy/overview/getCommunityQuantityTrend', this.mixins_query)
                 .then(({ status, data, msg }) => {
-                    if (status == 0 && !!data) {
+                    if (status == 0 && data.length !== 0) {
                         let times = [],
                             datas = [];
 

+ 3 - 3
commandCenter/src/views/smallModule/waterConsumption.vue

@@ -34,7 +34,7 @@ export default {
             clientOptions: columnOptionsChart(
                 '(吨)',
                 ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07'],
-                [{ data: [10, 35, 5, 20, 7, 10, 40], name: '用水量' }],
+                [{ data: [0, 0, 0, 0, 0, 0, 0], name: '用水量' }],
                 [],
                 10
             )
@@ -45,12 +45,12 @@ export default {
             this.$http
                 .get('/sc-energy/overview/getCommunityQuantityTrend', this.mixins_query)
                 .then(({ status, data, msg }) => {
-                    if (status == 0 && !!data) {
+                    if (status == 0 && data.length !== 0) {
                         let times = [],
                             datas = [];
 
                         data.map((item) => {
-                            times.push(this.$moment(item.date, "YYYY-MM-DD").format('MM-DD '));
+                            times.push(this.$moment(item.date, 'YYYY-MM-DD').format('MM-DD '));
                             datas.push(item.value);
                         });
                         this.clientOptions = columnOptionsChart('(吨)', times, [{ data: datas, name: '用水量' }], [], 10);