dong пре 3 месеци
родитељ
комит
854a5ce231
2 измењених фајлова са 25 додато и 11 уклоњено
  1. 2
    2
      src/views/powerconfiguration/index.vue
  2. 23
    9
      src/views/reportforms/index.vue

+ 2
- 2
src/views/powerconfiguration/index.vue Прегледај датотеку

74
         <el-table-column prop="value" label="设备启停控制" align="center" width="200">
74
         <el-table-column prop="value" label="设备启停控制" align="center" width="200">
75
           <template #default="scope">
75
           <template #default="scope">
76
             <el-switch
76
             <el-switch
77
-              v-model="scope.row.binding"
77
+              v-model="scope.row.value"
78
               active-value="1"
78
               active-value="1"
79
               inactive-value="0"
79
               inactive-value="0"
80
               @change="changeswitch(scope.row)"
80
               @change="changeswitch(scope.row)"
359
 
359
 
360
 const changeswitch = async (row: { eid: any; value: string }) => {
360
 const changeswitch = async (row: { eid: any; value: string }) => {
361
   // console.log("Switch value:", newValue);
361
   // console.log("Switch value:", newValue);
362
-  console.log("Switch value:", row);
362
+  console.log("Switch value:", row.value);
363
 
363
 
364
   if (row.value == "0") {
364
   if (row.value == "0") {
365
     Switchvalue.value = "确定关闭设备吗?";
365
     Switchvalue.value = "确定关闭设备吗?";

+ 23
- 9
src/views/reportforms/index.vue Прегледај датотеку

77
                   <el-button size="large" type="primary" plain>{{ $t("reportforms.export") }}</el-button>
77
                   <el-button size="large" type="primary" plain>{{ $t("reportforms.export") }}</el-button>
78
                   <template #dropdown>
78
                   <template #dropdown>
79
                     <el-dropdown-menu v-for="(item, index) in columnList" :key="index">
79
                     <el-dropdown-menu v-for="(item, index) in columnList" :key="index">
80
-                      <el-dropdown-item>
80
+                      <el-dropdown-item v-if="item.label != '并网点'">
81
                         <el-checkbox @change="oncheck" v-model="item.ifcolumn" :label="item.label" size="large" />
81
                         <el-checkbox @change="oncheck" v-model="item.ifcolumn" :label="item.label" size="large" />
82
                         <template v-if="item.children">
82
                         <template v-if="item.children">
83
                           <template v-for="(items, i) in item.children" :key="i">
83
                           <template v-for="(items, i) in item.children" :key="i">
96
             &ensp;&ensp;
96
             &ensp;&ensp;
97
             <el-table :data="tableData.list" style="width: 100%" align="center" :show-overflow-tooltip="true">
97
             <el-table :data="tableData.list" style="width: 100%" align="center" :show-overflow-tooltip="true">
98
               <!-- <el-table-column type="selection" width="55" /> -->
98
               <!-- <el-table-column type="selection" width="55" /> -->
99
+
99
               <template v-for="(item, index) in columnList" :key="index">
100
               <template v-for="(item, index) in columnList" :key="index">
100
-                <el-table-column v-if="item.ifcolumn" :label="item.label" :prop="item.prop" align="center">
101
+                <el-table-column
102
+                  v-if="item.ifcolumn && item.label != '并网点'"
103
+                  :label="item.label"
104
+                  :prop="item.prop"
105
+                  align="center"
106
+                >
101
                   <template v-if="item.children">
107
                   <template v-if="item.children">
102
                     <template v-for="(items, i) in item.children" :key="i">
108
                     <template v-for="(items, i) in item.children" :key="i">
103
                       <el-table-column v-if="items.ifcolumn" :label="items.label" :prop="items.prop" align="center">
109
                       <el-table-column v-if="items.ifcolumn" :label="items.label" :prop="items.prop" align="center">
106
                   </template>
112
                   </template>
107
                 </el-table-column>
113
                 </el-table-column>
108
               </template>
114
               </template>
115
+
109
               <!-- <el-table-column prop="stationName" label="站点名称" width="150" align="center" />
116
               <!-- <el-table-column prop="stationName" label="站点名称" width="150" align="center" />
110
               <el-table-column label="充电量(kWh)" align="center">
117
               <el-table-column label="充电量(kWh)" align="center">
111
                 <el-table-column prop="chargeSharp" label="尖" align="center" />
118
                 <el-table-column prop="chargeSharp" label="尖" align="center" />
535
 // 汇总表头
542
 // 汇总表头
536
 const columnList = ref([
543
 const columnList = ref([
537
   {
544
   {
545
+    prop: "grid",
546
+    label: "并网点",
547
+    ifcolumn: true,
548
+    children: null
549
+  },
550
+  {
538
     prop: "stationName",
551
     prop: "stationName",
539
     label: "日期",
552
     label: "日期",
540
     ifcolumn: true,
553
     ifcolumn: true,
620
     ifcolumn: true,
633
     ifcolumn: true,
621
     children: null
634
     children: null
622
   },
635
   },
636
+
623
   {
637
   {
624
     prop: "",
638
     prop: "",
625
     label: "充电量(kWh)",
639
     label: "充电量(kWh)",
1137
   if (columnList.value) {
1151
   if (columnList.value) {
1138
     for (const column of columnList.value) {
1152
     for (const column of columnList.value) {
1139
       if (column?.ifcolumn) {
1153
       if (column?.ifcolumn) {
1140
-        if (column.prop) {
1154
+        if (column.prop && column.prop != "grid") {
1141
           obj.push(column.prop);
1155
           obj.push(column.prop);
1142
         }
1156
         }
1143
         if (column.children) {
1157
         if (column.children) {
1346
     endDate: StateGrid.value[1]
1360
     endDate: StateGrid.value[1]
1347
   };
1361
   };
1348
   const { data } = await stategriddayURL(obj, stategridSite.value);
1362
   const { data } = await stategriddayURL(obj, stategridSite.value);
1349
-  data.total.stationName = "总计";
1363
+  // data.total.stationName = "总计";
1350
 
1364
 
1351
-  data.list.push(data.total);
1365
+  // data.list.push(data.total);
1352
   GridReportdata.value = data;
1366
   GridReportdata.value = data;
1353
 };
1367
 };
1354
 // 月份
1368
 // 月份
1358
     endYearMonth: StateGrid.value[1]
1372
     endYearMonth: StateGrid.value[1]
1359
   };
1373
   };
1360
   const { data } = await stategridmonthURL(obj, stategridSite.value);
1374
   const { data } = await stategridmonthURL(obj, stategridSite.value);
1361
-  data.total.stationName = "总计";
1375
+  // data.total.stationName = "总计";
1362
 
1376
 
1363
-  data.list.push(data.total);
1377
+  // data.list.push(data.total);
1364
   GridReportdata.value = data;
1378
   GridReportdata.value = data;
1365
 };
1379
 };
1366
 // 年份
1380
 // 年份
1370
     endYear: StateGrid.value[1]
1384
     endYear: StateGrid.value[1]
1371
   };
1385
   };
1372
   const { data } = await stategridyearURL(obj, stategridSite.value);
1386
   const { data } = await stategridyearURL(obj, stategridSite.value);
1373
-  data.total.stationName = "总计";
1387
+  // data.total.stationName = "总计";
1374
 
1388
 
1375
-  data.list.push(data.total);
1389
+  // data.list.push(data.total);
1376
   GridReportdata.value = data;
1390
   GridReportdata.value = data;
1377
 };
1391
 };
1378
 
1392
 

Loading…
Откажи
Сачувај