SunZehao hace 4 meses
padre
commit
951ac3fec6

+ 3 - 3
components.d.ts

@@ -20,7 +20,7 @@ declare module 'vue' {
     CalculationModelConfiguration: typeof import('./src/components/powerPredictionComponent/configPage/calculationModelConfiguration.vue')['default']
     Card1: typeof import('./src/components/coms/cards/card-1.vue')['default']
     CheckTable: typeof import('./src/components/coms/table/check-table.vue')['default']
-    Col: typeof import('./src/components/homeComponent/grid/col.vue')['default']
+    Col: typeof import('./src/components/coms/grid/col.vue')['default']
     CollapseList: typeof import('./src/components/coms/collapse/collapse-list.vue')['default']
     CollectionLineManagement: typeof import('./src/components/powerPredictionComponent/configPage/stationFlode/collectionLineManagement.vue')['default']
     CommonHeaders: typeof import('./src/components/commonHeaders.vue')['default']
@@ -154,7 +154,7 @@ declare module 'vue' {
     RoleManagement: typeof import('./src/components/powerPredictionComponent/configPage/roleManagement.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']
-    Row: typeof import('./src/components/homeComponent/grid/row.vue')['default']
+    Row: typeof import('./src/components/coms/grid/row.vue')['default']
     SBQ: typeof import('./src/components/powerPredictionComponent/configPage/configDesignVue/SBQ.vue')['default']
     ScatterLineChart: typeof import('./src/components/chart/combination/scatter-line-chart.vue')['default']
     SimpleLineChart: typeof import('./src/components/chart/line/simple-line-chart.vue')['default']
@@ -166,7 +166,7 @@ declare module 'vue' {
     StrightLineChart: typeof import('./src/components/chart/line/stright-line-chart.vue')['default']
     SubmitBtn: typeof import('./src/components/generatingCapacityComponent/SubmitBtn.vue')['default']
     SvgDraw: typeof import('./src/components/coms/icon/svg-draw.vue')['default']
-    SvgIcon: typeof import('./src/components/powerPredictionComponent/svgIcon/index.vue')['default']
+    SvgIcon: typeof import('./src/components/coms/icon/svg-icon.vue')['default']
     SvgPageShow: typeof import('./src/components/powerPredictionComponent/powerControlSvg/svgPageShow.vue')['default']
     Tab: typeof import('./src/components/coms/tabs/tab.vue')['default']
     Table: typeof import('./src/components/generatingCapacityComponent/table.vue')['default']

+ 23 - 11
src/components/generatingCapacityComponent/table.vue

@@ -15,7 +15,7 @@
         viewBox="0 -120 1024 1024"
         version="1.1"
         style="cursor: pointer"
-        @click="handlefilesExport"
+        @click="handlefilesExport(tableId)"
         xmlns="http://www.w3.org/2000/svg"
         p-id="2706"
         width="35"
@@ -170,20 +170,32 @@ export default {
         if (typeof console !== "undefined") console.error(e);
       }
     },
-    handlefilesExport() {
+    handlefilesExport(id) {
         ElMessageBox.confirm("确认导出当前节点的所有数据?", "导出", {
             confirmButtonText: "确认",
             cancelButtonText: "取消",
             type: "warning",
           }).then(() => {
-            const a = document.createElement("a");
-            let childs = [];
-            const url = "/export/files?filename="
-            a.href =
-              process.env.VUE_APP_GENERAT_URL + url + this.tableFilePath;
-            a.download = "";
-            a.target = "_blank";
-            a.click();
+            if (id === "1") {
+                this.handleExport()
+            } else {
+                // const a = document.createElement("a");
+                // let childs = [];
+                // const url = "/export/files?filename="
+                // a.href =
+                //   process.env.VUE_APP_GENERAT_URL + url + this.tableFilePath;
+                // a.download = "";
+                // a.target = "_blank";
+                // a.click();
+                const a = document.createElement("a");
+                const url = "/data/option/download?ids="
+                a.href =
+                  // config.baseURL + url + childs.join(",");
+                  process.env.VUE_APP_GENERAT_URL + url + id;
+                a.download = "";
+                a.target = "_blank";
+                a.click();
+            }
           });
     },
   },
@@ -202,7 +214,7 @@ export default {
     display: flex;
 
     p {
-      width: 5%;
+      width: 7%;
       text-overflow: ellipsis;
       white-space: nowrap;
       overflow: hidden;

+ 1 - 0
src/components/generatingCapacityComponent/tree.vue

@@ -349,6 +349,7 @@ export default {
               this.type === "wind"
                 ? "/data/option/download?ids="
                 : "/export/files?filename=";
+
             a.href =
               // config.baseURL + url + childs.join(",");
               process.env.VUE_APP_GENERAT_URL + url + childs.join(",");

+ 2 - 2
src/views/generatingCapacity/dataAnalysis/agcAnalysis/index.vue

@@ -246,7 +246,7 @@ const createMark = (markInfo) => {
 const funSubmit = async (params) => {
   activeTab.value = "2";
   tableShowId.value = "";
-  tableName.value = "AGC曲线分析";
+  tableName.value = "AGC";
   tableLoading.value = true;
   const res = await httpRequest.get("/agc/deviate", {
     params: params,
@@ -473,7 +473,7 @@ const abnormalPoint = ref([]);
 const initPageData = () => {
   activeTab.value = "2";
   tableShowId.value = "";
-  tableName.value = "AGC曲线分析";
+  tableName.value = "AGC";
   tableLoading.value = true;
   const res = JSON.parse(JSON.stringify(jsonData.deviateData));
   // const res = agcJson

+ 8 - 5
src/views/generatingCapacity/dataAnalysis/angleAnalysis/index.vue

@@ -45,7 +45,7 @@
                 :column="tableColumn"
                 :theme="theme"
                 :height="tableHeight"
-                tableId="1"
+                :tableId="tableShowId"
                 :tableName="tableName"
                 :rowstyle="true"
               ></table-cop>
@@ -156,7 +156,8 @@ const funExcelChange = async (obj) => {
   funSubmit({
     ids: obj.id,
   });
-  tableName.value = obj.name;
+  tableShowId.value = obj.id
+  tableName.value = obj.name.substring(0, obj.name.indexOf('_'));
   getSpeedLine({
     ids: obj.id,
   });
@@ -194,8 +195,9 @@ const funRepeatMap = (arr, type) => {
 };
 
 const funGetTree = async () => {
-  const res = await httpRequest.get("/power/prepare/treepitch");
-  treeData.value = funRepeatMap(res.data, "prepare");
+//   const res = await httpRequest.get("/power/prepare/treepitch");
+  const res = await httpRequest.get("/power/process/tree");
+  treeData.value = funRepeatMap(res.data, "process");
   excelList.value = [];
   if (actTreeNode.value) {
     funCurrentChange({
@@ -536,7 +538,8 @@ const initPageData = () => {
       },
     ];
 
-    tableName.value = obj.name;
+    tableShowId.value = obj.id
+    tableName.value = obj.name.substring(0, obj.name.indexOf('_'));
 
     let xAsis = [];
     let series = [];

+ 36 - 37
src/views/generatingCapacity/dataAnalysis/combine/index.vue

@@ -16,7 +16,7 @@
             @refresh="funGetTree"
           >
           </tree-cop>
-          <div style="padding: 5px 0;border-radius: 5px;" :style="theme === false ? 'background: #181A1E' : 'background: #cdcdde'" >
+          <div style="padding: 5px 0;border-radius: 5px;" :style="!theme ? 'background: #181A1E' : 'background: #cdcdde'" >
             <tree-cop
                 :dropdownMenu="['export', 'delete', 'save']"
                 :data="processTreeData"
@@ -153,32 +153,28 @@
         </el-tab-pane>
         <el-tab-pane label="故障" name="problem">
           <el-table :data="faultData" row-key="id" :max-height="550">
-            <el-table-column property="deviceId" align="center" label="风机" />
+            <el-table-column property="wtid" align="center" label="风机" />
             <el-table-column
-              property="ts"
+              property="time"
               sortable
               :width="160"
               align="center"
               label="时间"
-            >
-              <template v-slot="scope">
-                {{ new Date(scope.row.ts).formatDate("yyyy-MM-dd hh:mm:ss") }}
-              </template>
-            </el-table-column>
+            />
             <el-table-column
-              property="characteristic"
+              property="tx"
               sortable
               align="center"
               label="特性"
             />
             <el-table-column
-              property="components"
+              property="bj"
               sortable
               align="center"
               label="部件"
             />
             <el-table-column
-              property="description"
+              property="alarmname"
               sortable
               align="center"
               label="描述"
@@ -187,32 +183,28 @@
         </el-tab-pane>
         <el-tab-pane label="预警" name="warning">
           <el-table :data="warnData" row-key="id" :max-height="550">
-            <el-table-column property="deviceId" align="center" label="风机" />
+            <el-table-column property="wtid" align="center" label="风机" />
             <el-table-column
-              property="ts"
+              property="time"
               sortable
               :width="160"
               align="center"
               label="时间"
-            >
-              <template v-slot="scope">
-                {{ new Date(scope.row.ts).formatDate("yyyy-MM-dd hh:mm:ss") }}
-              </template>
-            </el-table-column>
+            />
             <el-table-column
-              property="characteristic"
+              property="tx"
               sortable
               align="center"
               label="特性"
             />
             <el-table-column
-              property="components"
+              property="bj"
               sortable
               align="center"
               label="部件"
             />
             <el-table-column
-              property="description"
+              property="alarmname"
               sortable
               align="center"
               label="描述"
@@ -625,6 +617,7 @@ const chartRef = ref(); //chart 的ref
 const seriesData = ref([]);
 const isChartArea = ref(false); // 用来控制图表是否区域划分
 const dataSet = ref("");
+const allpowerFittingData = ref([])
 const funChartSelect = async (batch) => {
   const wDataArr = [];
   const yDataArr = [];
@@ -654,6 +647,14 @@ const funChartSelect = async (batch) => {
           only: dataRadom.value,
         },
       });
+      allpowerFittingData.value = []
+      wtRes.data.forEach(it =>{
+        let obj = {
+            wtId: it.wtId,
+            time: it.time
+        }
+        allpowerFittingData.value.push(obj)
+    })
       if (wtRes.code === 200) {
         let id = 1;
         const tempArr = []; //用于以风机id 聚合dataArr
@@ -835,25 +836,23 @@ const handleClick = (val) => {
 
 //故障数据
 const faultDataFn = async () => {
-  let params = {
-    only: dataRadom.value,
-    table: "alarmWt",
-  };
-  const faultRes = await httpRequest.get("/power/fitting/alarms", {
-    params: params,
-  });
-  faultData.value = faultRes.data;
+    let params = {
+        // only: dataRadom.value,
+        alarmList: allpowerFittingData.value,
+        table: "alarmWt",
+    };
+    const faultRes = await httpRequest.post("/power/fitting/alarms", params);
+    faultData.value = faultRes.data;
 };
 //预警数据
 const warnDataFn = async () => {
-  let params = {
-    only: dataRadom.value,
-    table: "alarmCt",
-  };
-  const warnRes = await httpRequest.get("/power/fitting/alarms", {
-    params: params,
-  });
-  warnData.value = warnRes.data;
+    let params = {
+        // only: dataRadom.value,
+        alarmList: allpowerFittingData.value,
+        table: "alarmCt",
+    };
+    const warnRes = await httpRequest.post("/power/fitting/alarms", params);
+    warnData.value = warnRes.data;
 };
 
 /**dialog 数据 */

+ 4 - 1
src/views/generatingCapacity/dataAnalysis/hotAnalysis/index.vue

@@ -138,7 +138,7 @@
                     :column="tableColumn"
                     :theme="theme"
                     :height="tableHeight"
-                    tableId="1"
+                    :tableId="tableShowId"
                     :tableName="tableName"
                     :tableFilePath="tableFilePath"
                   ></table-cop>
@@ -317,12 +317,14 @@ const tableDataGet = async () => {
 const excelCheckboxShow = ref(false);
 const excelCheckIds = ref([]);
 const excelList = ref([]);
+const tableShowId = ref("");
 const tableName = ref("");
 const tableFilePath = ref("");
 const funExcelChange = async (obj) => {
   //点击excel项时
   /**次代码供温度功率曲线分析使用 */
   excelCheckIds.value = [obj.id]; //当为单选展示风机图表时
+  tableShowId.value = obj.id
   let tableX = ["未满发样板机", "满发样板机", "未满发", "满发" ]
   tableX.forEach(it =>{
     if (obj.name.indexOf(it) !== -1) {
@@ -1183,6 +1185,7 @@ const initPageData = () => {
     currentNodeKey.value = actTreeNode.value?.id || "";
 
     excelCheckIds.value = [obj.id]; //当为单选展示风机图表时
+    tableShowId.value = obj.id
     let tableX = ["未满发样板机", "满发样板机", "未满发", "满发" ]
     tableX.forEach(it =>{
         if (obj.name.indexOf(it) !== -1) {

+ 2 - 1
src/views/generatingCapacity/dataAnalysis/lineAnalysis/index.vue

@@ -95,6 +95,7 @@
             :xAxis="barxAxis"
             :yAxis="baryAxis"
             :series="barSeries"
+            :colors="['#22a6b3', '#05bc4c', '#C531C7', '#4b55ae', '#fa8c16', '#1DA0D7','#DD5044']"
           >
           </bar-chart-cop>
         </div>
@@ -107,7 +108,7 @@
             ]" -->
           <bar-chart-cop
             height="600px"
-            :colors="['#05bb4c', '#C531C7', '#4b55ae', '#fa8c16', '#1DA0D7', '#DD5044', '#323E6F']"
+            :colors="['#22a6b3', '#05bc4c', '#C531C7', '#4b55ae', '#fa8c16', '#1DA0D7','#DD5044', '#be2edd', '#323E6F']"
             width="100%"
             :xAxis="barxAxis"
             :yAxis="baryAxis"

+ 16 - 2
src/views/generatingCapacity/dataAnalysis/rateAnalysis/index.vue

@@ -39,8 +39,9 @@
                 :column="tableColumn"
                 :theme="theme"
                 :height="tableHeight"
-                tableId="1"
-                tableName="对风偏差分析"
+                :tableId="tableShowId"
+                :tableName="tableName"
+                :tableFilePath="tableFilePath"
               ></table-cop>
             </div>
             <el-row v-if="activeTab === '1'" :style="{ height: tableHeight }">
@@ -287,10 +288,16 @@ const tableHeight = ref(window.innerHeight - 170 + "px");
 const activeTab = ref("1");
 const excelCheckIds = ref([]);
 const excelList = ref([]);
+const tableShowId = ref("");
+const tableName = ref("");
+const tableFilePath = ref("");
 const currentNodeKey = ref("");
 //点击excel项时
 const funExcelChange = async (obj) => {
   excelCheckIds.value = [obj.id]; //当为单选展示风机图表时
+  tableShowId.value = obj.id
+  tableName.value = obj.code ? obj.code : obj.name.substring(0, obj.name.indexOf('_'));
+  tableFilePath.value = obj.path;
   chartExcelList.value = excelList.value.map((o) => {
     return {
       ...o,
@@ -356,6 +363,8 @@ const funGetTree = async () => {
     });
     funExcelChange({
       id: actTreeNode.value.childs[0].id,
+      code: actTreeNode.value.childs[0].code,
+      path: actTreeNode.value.childs[0].path
     });
     currentNodeKey.value = actTreeNode.value?.id || "";
   }
@@ -1166,9 +1175,14 @@ const initPageData = () => {
 
     const obj = {
       id: actTreeNode.value.childs[0].id,
+      code: actTreeNode.value.childs[0].code,
+      path: actTreeNode.value.childs[0].path
     };
 
     excelCheckIds.value = [obj.id]; //当为单选展示风机图表时
+    tableShowId.value = obj.id
+    tableName.value = obj.code;
+    tableFilePath.value = obj.path;
     chartExcelList.value = excelList.value.map((o) => {
       return {
         ...o,

+ 3 - 2
src/views/generatingCapacity/dataAnalysis/spaceAnalysis/index.vue

@@ -98,6 +98,7 @@
         <el-form-item label="" class="!mb-0">
           <el-select
             v-model="queryForm.checkIds"
+            style="width: 120px"
             clearable
             @clear="checkAll = false"
             collapse-tags
@@ -345,7 +346,7 @@ const funSubmit = async () => {
 /**lineChart */
 const linexAxis = reactive({
   type: "category",
-  name: "",
+  name: "",
   data: [],
   splitLine: {
     show: false,
@@ -475,7 +476,7 @@ const funChartSelect = async (batch) => {
 /**barChart */
 const barxAxis = reactive({
   type: "category",
-  name: "",
+  name: "",
   data: [],
   splitLine: {
     show: false,

+ 5 - 7
src/views/generatingCapacity/dataAnalysis/windAnalysis/index.vue

@@ -133,7 +133,6 @@ const funSubmit = async () => {
   }
   tableLoading.value = true;
   tableData.value = [];
-  tableShowId.value = "";
   barData.value = {
     area: [],
     legend: [],
@@ -251,7 +250,6 @@ const funSubmit = async () => {
   }
 
   tableLoading.value = false;
-  tableShowId.value = "1";
   activeTab.value = "1";
 };
 /**barlineChart 开始 */
@@ -281,7 +279,7 @@ const excelList = ref([]);
 const funExcelChange = async (obj) => {
   //点击excel项时
 //   return false;
-tableName.value = obj.name.substring(0, obj.name.indexOf('_'));
+tableName.value = "损失电量";
 tableFilePath.value = obj.path;
 };
 const funExcelCheckChange = ({ checkArr, data }) => {
@@ -314,7 +312,7 @@ const funRepeatMap = (arr) => {
 };
 const funGetTree = async () => {
   actTreeNode.value = null;
-  const res = await httpRequest.get("/power/prepare/tree");
+  const res = await httpRequest.get("/power/process/tree");
   treeData.value = funRepeatMap(res.data);
   excelList.value = [];
   if (actTreeNode.value) {
@@ -325,6 +323,7 @@ const funGetTree = async () => {
     if (treeCopRef.value) {
       treeCopRef.value.$refs.tree.setCheckedKeys([actTreeNode.value.id]);
       excelCheckIds.value = actTreeNode.value.childs.map((o) => o.id);
+      tableShowId.value = excelCheckIds.value.join(',');
       funSubmit();
     }
   }
@@ -425,16 +424,16 @@ const initPageData = () => {
         child.path.indexOf(child.station + "_") + (child.station + "_").length
       ),
     };
-    tableName.value = obj.name.substring(0, obj.name.indexOf('_'));
+    tableName.value = "损失电量"
     tableFilePath.value = obj.path;
 
     if (treeCopRef.value) {
       treeCopRef.value.$refs.tree.setCheckedKeys([actTreeNode.value.id]);
       excelCheckIds.value = actTreeNode.value.childs.map((o) => o.id);
+      tableShowId.value = excelCheckIds.value.join(',');
 
       tableLoading.value = true;
       tableData.value = [];
-      tableShowId.value = "";
       barData.value = {
         area: [],
         legend: [],
@@ -530,7 +529,6 @@ const initPageData = () => {
       }
 
       tableLoading.value = false;
-      tableShowId.value = "1";
       activeTab.value = "1";
     }
   }

+ 1 - 1
src/views/generatingCapacity/dataFilter/process/index.vue

@@ -20,7 +20,7 @@
             @checkChange="funTreeCheckChange"
           >
           </tree-cop>
-          <div style="padding: 5px 0;border-radius: 5px;" :style="theme === false ? 'background: #181A1E' : 'background: #cdcdde'" >
+          <div style="padding: 5px 0;border-radius: 5px;" :style="!theme ? 'background: #181A1E' : 'background: #cdcdde'" >
             <tree-cop
                 :data="processTreeData"
                 :height="treeHeight"