chenminghua il y a 2 ans
Parent
commit
6ae3e4ca61

+ 744 - 0
src/api/api.js

@@ -0,0 +1,744 @@
+import request from './axios.js'
+
+//获取服务端公钥
+export const getPublickey = query => {
+    return request({
+        url: 'info/publickey',
+    });
+}
+// login
+export const loginRequest = params => {
+    return request.post("user/login", params);
+};
+//register
+export const registerRequest = params => {
+    return request.post("user/registers", params);
+};
+// ----------------------------------------user------------------------------------------------
+export const getUserList = () => {
+    return request.get(`user/getall`);
+}
+export const editRequest = params => {
+    return request.post("user/edituser", params);
+};
+export const deleteUser = data => {
+    return request.delete(`user/${data}`);
+}
+// ----------------------------------------user------------------------------------------------
+
+
+//获取所有风场
+export const fetchStationList = () => {
+    return request({
+        url: 'info/station',
+        method: 'get'
+    });
+};
+//获取所有风场光伏
+export const fetchStationListAll = () => {
+    return request({
+        url: 'info/station',
+        method: 'get'
+    });
+};
+//根据风场id获取所有风机
+export const fetchWindturbineList = query => {
+    return request({
+        url: 'info/windturbine',
+        method: 'get',
+        params: {
+            stationId: query
+        }
+    });
+};
+// ----------------------------------------安全生产- 报警记录------------------------------------------------
+//查询历史报警
+export const alarm_history = (params) => {
+    return request({
+        url: `alarm/history/page2`,
+        params: params
+    });
+}
+//查报警
+export const alarm_snap = (params) => {
+    return request({
+        url: `alarm/snap`,
+        params: params
+    });
+}
+// ----------------------------------------安全生产- 实时报警------------------------------------------------
+
+//实时故障 最高级
+export const alarm_fault_recent = (params) => {
+    return request({
+        url: `fault/recent`,
+        params: params,
+        showLoading: {
+            statu: false
+        }
+    });
+}
+//实时故障 第一次请求
+export const alarm_fault_top = (params) => {
+    return request({
+        url: `fault/snap/top`,
+        params: params
+    });
+}
+//底下的实时报警 
+export const alarm_snap_top = (params) => {
+    return request({
+        url: `alarm/snap/top`,
+        params: params,
+        showLoading: {
+            statu: false
+        },
+        timeout: 1000
+
+    });
+}
+
+
+// ----------------------------------------安全生产- 实时数据查询------------------------------------------------
+
+// get 实时data
+export const getAdapterLatest = (stationId, AIlist) => {
+    return request({
+        url: `ts/latest?uniformCodes=${AIlist}&thingId=${stationId}&thingType=windturbine`,
+        baseURL: '/adapter/',
+        showLoading: {
+            statu: false,
+        },
+        timeout: 1000
+    });
+}
+// get 历史数据
+export const getAdapterHistory = (stationId, AIpoint, startTs, endTs) => {
+    return request({
+        url: `ts/history/raw?uniformCode=${AIpoint}&thingId=${stationId}&thingType=windturbine&startTs=${startTs}&endTs=${endTs}`,
+        baseURL: '/adapter/'
+    });
+}
+// get 历史数据
+export const getAdapterHistorysnap = (stationId, AIpoint, startTs, endTs, interval) => {
+    return request({
+        url: `ts/history/snap?uniformCode=${AIpoint}&thingId=${stationId}&thingType=windturbine&startTs=${startTs}&endTs=${endTs}&interval=${interval}`,
+        baseURL: '/adapter/'
+    });
+}
+// 批量导出
+export const AdapterHistoryExport = (activeAI, activeWT, startTs, endTs) => {
+    return request({
+        url: `ts/history/raw?uniformCode=${activeAI}&thingId=${activeWT}&thingType=windturbine&startTs=${startTs}&endTs=${endTs}`,
+        baseURL: '/adapter/'
+    });
+}
+// ----------------------------------------基础数据- 设备管理------------------------------------------------
+//查询全部设备型号接口
+export const device_list = () => {
+    return request.get(`device/model/list`);
+}
+//获取结构tree
+export function tree(params) {
+    return request({
+        url: 'device/structure/tree/windturbine',
+        method: 'get',
+    });
+}
+//根据结构获取测点
+export function point(code, pagenum, pagesize) {
+    return request.get(`device/metrics/page?pagenum=${pagenum}&pagesize=${pagesize}&deviceId=windturbine&structureCode=${code}`);
+}
+//测点新增
+export function metrics(params) {
+    return request.post(`device/metrics/single`, params);
+}
+//测点删除
+export function delmetrics(params) {
+    return request.delete(`device/metrics/single/delete/${params}`);
+}
+//测点导入
+
+
+//tree新增 添加一个设备结构节点
+export function treeAdd(params) {
+    return request.post(`device/structure`, params);
+}
+//tree删除 tree删除一个设备结构节点
+export function treeDel(params) {
+    return request.delete(`device/structure/delete/${params}`);
+}
+
+
+// 故障模式
+// get All
+export const faultmode_windturbine = () => {
+    return request.get(`device/faultmode/windturbine`);
+}
+// 根据 structurecode get
+export const faultmode_structurecode = params => {
+    return request.get(`device/faultmode/windturbine/${params}`);
+}
+// 根据 id delete
+export const faultmode_delete = params => {
+    return request.delete(`device/faultmode/delete/${params}`);
+}
+
+// 新增 修改
+export const faultmode_add_edit = data => {
+    return request.post(`device/faultmode`, data);
+}
+
+// ----------------------------------------end 基础数据- 风机管理------------------------------------------------
+
+
+// ---------------------------------------- 报警配置- 自定义预警------------------------------------------------
+export function custombj_fetchTableData(params) {
+    return request.get(`alertrule2/page/`, {
+        params: params
+    });
+}
+// 获取机型
+export function equipmentmodel_list(params) {
+    return request.get(`windpowerstation?id=${params}`);
+}
+// 获取机型new
+export function getTestingpointDI() {
+    return request.get(`testingpointDI/model`);
+}
+// 获取规则
+export function alertrule2_list() {
+    return request.get(`alertrule2/list/`);
+}
+//根据structcode获取AI.DI测点
+export const fetchAIDIPointList = (deviceId, structcode, stationId, windturbineId, pageNum, pageSize) => {
+    return request({
+        url: 'info/point',
+        method: 'get',
+        params: {
+            deviceId: deviceId,
+            structcode: structcode,
+            stationId: stationId,
+            windturbineId: windturbineId,
+            pageNum,
+            pageSize,
+        }
+    });
+};
+
+//根据场站编号,风机型号获取AI测点
+export const fetchAIPointList = (stationId, modelId) => {
+    return request({
+        url: 'info/testing_point_ai',
+        method: 'get',
+        params: {
+            stationId: stationId,
+            modelId: modelId
+        }
+    });
+};
+//根据场站编号,风机型号获取DI测点
+export const fetchDIPointList = (stationId, modelId) => {
+    return request({
+        url: 'info/testing_point_di',
+        method: 'get',
+        params: {
+            stationId: stationId,
+            modelId: modelId
+        }
+    });
+};
+//根据场站编号,风机型号获取DI测点new
+export const getDIPointList = (minModel) => {
+    return request({
+        url: 'testingpointDI/point',
+        method: 'get',
+        params: {
+            minModel
+        }
+    });
+};
+//根据场站编号,获取电气DI测点
+export const fetchElectricDIPointList = (stationId) => {
+    return request({
+        url: 'info/electrical_point_di',
+        method: 'get',
+        params: {
+            stationId: stationId
+        }
+    });
+};
+//根据电气测点,获取测点信息
+export const fetchElectricDIPointByPointId = (pointId) => {
+    return request({
+        url: 'info/electrical_point_di/byId',
+        method: 'get',
+        params: {
+            pointId: pointId
+        }
+    });
+};
+
+//获取风机关联部件列表
+export const fetchRelatePart = () => {
+    return request({
+        url: 'info/windturbine_parts',
+        method: 'get',
+    });
+};
+//根据风场编号获取电气AI测点
+export const fetch_electrical_point_ai = (stationId) => {
+    return request({
+        url: 'info/electrical_point_ai',
+        method: 'get',
+        params: {
+            stationId: stationId
+        }
+    });
+};
+//根据风场编号获取电气DI测点
+export const fetch_electrical_point_di = (stationId) => {
+    return request({
+        url: 'info/electrical_point_di',
+        method: 'get',
+        params: {
+            stationId: stationId
+        }
+    });
+};
+//获取报警类型
+export const fetchWarningType = () => {
+    return request({
+        url: 'info/warning_type',
+        method: 'get',
+    });
+};
+//获取报警种类
+export const fetchWarningClassify = () => {
+    return request({
+        url: 'info/warning_classify',
+        method: 'get',
+    });
+};
+export const custombj_batchImport = list => {
+    return request.post("alertrule2/save-batch", list);
+};
+export const custombj_postSave = form => {
+    return request.post("alertrule2/save", form)
+};
+
+//******************************end****************************************//
+
+
+//******************************升压站报警API************************************//
+
+export const scadabj_fetchTableData = query => {
+    return request({
+        url: 'scadabj/page',
+        method: 'get',
+        params: query,
+        timeout: 20000,
+    });
+};
+export const scadabj_postSave = objData => {
+    return request.post("scadabj/save", objData);
+};
+export const scadabj_batchImport = list => {
+    return request.post("scadabj/save-batch", list);
+};
+//********************************************end********************************//\
+
+//********************************************报警记录日志********************************//\
+export const fetchruleventLogs = (pagenum, pagesize, ruleName, ruleType) => {
+    return request({
+        url: 'rulevent/page',
+        method: 'get',
+        params: {
+            pagenum,
+            pagesize,
+            ruleName,
+            ruleType
+        }
+    });
+};
+
+//********************************************end********************************//\
+
+//******************************风机报警API************************************//
+export const windturbinebj_fetchTableData = query => {
+    return request({
+        url: 'warning2/page',
+        method: 'get',
+        params: query,
+        timeout: 20000,
+    });
+};
+export const windturbinebj_postSave = form => {
+    return request.post('warning2/save', form);
+};
+export const windturbinebj_batchImport = list => {
+    return request.post("warning2/save-batch", list);
+};
+
+export const fetchLeaf = () => {
+    return request({
+        url: 'warning2/page',
+        method: 'get',
+        params: {
+            pagenum: 1,
+            pagesize: 10000,
+            isLeaf: 0,
+        }
+    });
+};
+
+
+//根据风机型号获取DI测点统一编码相关数据 testingpointdi2
+export const getDIPointByModelId = query => {
+    return request({
+        url: 'info/testing_point_di',
+        method: 'get',
+        params: query
+    });
+};
+
+//******************************end*******************************************// 
+//******************************预警统计*******************************************//
+export const statistics_querymap = params => {
+    return request.get(`alarm/count/querymap2`, { params: params })
+};
+export const statistics_querybyname = params => {
+    return request.get('alarm/count/querybyname2', { params: params })
+};
+export const statistics_lineandproject = params => {
+    return request.get('alarm/count/lineandproject2', { params: params })
+};
+//******************************end*******************************************//
+
+//******************************预警分析*******************************************//
+export const warning_query_new = params => {
+    return request.get(`alarm/count/query/new2`, { params: params })
+};
+export const warning_detail = params => {
+    return request({
+        url: `analysis/detail`,
+        params: params,
+        timeout: 60000
+
+    });
+};
+// export const statistics_lineandproject = params => {
+//     return request.get('alarm/count/lineandproject', { params: params })
+// };
+
+
+//******************************end*******************************************//
+
+
+//*****************************诊断报告*******************************************//
+export const earlywarnscore_list = params => {
+    return request.get(`earlywarnscore/list`, { params: params })
+};
+export const warning_query_new3 = params => {
+    return request.get(`alarm/count/query/new3`, { params: params })
+};
+//******************************end*******************************************//
+
+//*****************************故障诊断*******************************************//
+
+// 获取配置
+export const getConfig = () => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/serverparam/list`,
+        timeout: 60000
+    });
+};
+
+// 获取配置详情
+export const getConfigDetails = params => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/hostparam/${params}`,
+        timeout: 60000
+    });
+};
+
+// 获取表数组
+export const getSQLTable = () => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/diagnose/tables`,
+        timeout: 60000
+    });
+};
+
+// 使用原始数据获取列 
+export const getColumnsno = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/diagnosepoint/list/`,
+        params,
+        timeout: 60000
+    });
+};
+
+// 执行 SQL
+export const executeSQLno = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/diagnose/data`,
+        params,
+        timeout: 60000
+    });
+};
+
+// 获取表格数据 SQL
+export const executeSQL = (data) => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `api/diagnose/pointdata`,
+        data,
+        timeout: 120000
+    });
+};
+export const executeSQLpredict = (data) => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `api/predict/pointdata`,
+        data,
+        timeout: 120000
+    });
+};
+
+// 不使用原始数据获取列 
+export const getColumns = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/diagnose/colmuns`,
+        params,
+        timeout: 120000
+    });
+};
+
+
+
+// 开始训练
+export const train = data => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `api/diagnose/trainfile`,
+        data,
+        timeout: 120000
+    });
+};
+export const trainpredict = data => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `api/predict/trainfile`,
+        data,
+        timeout: 120000
+    });
+};
+
+// 获取训练进度
+export const getProgress = () => {
+    return request({
+        baseURL: '/current/',
+        url: `api/diagnose/gettrainInfo`,
+        timeout: 100000,
+        showLoading: {
+            statu: false
+        }
+    });
+};
+
+// 预测
+export const forecastData = (data) => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `api/diagnose/forecasts`,
+        data,
+        timeout: 120000
+    });
+};
+
+// 获取预测模型
+export const getModel = () => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/diagnose/getHistory`,
+        timeout: 120000
+    });
+};
+
+// 获取所有场站
+export const getstationAll = () => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `basic/station/all`,
+        timeout: 120000
+    });
+};
+
+// 获取所有风机
+export const getWindturbineAll = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `basic/windturbine/all`,
+        params,
+    });
+};
+
+// 保存模型
+export const updateModel = (data) => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `/api/history/editHistory`,
+        data,
+        timeout: 120000
+    });
+};
+export const saveModel = (data) => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `/api/history/addHistory`,
+        data,
+        timeout: 120000
+    });
+};
+//******************************end*******************************************//
+
+//*****************************模型管理*******************************************//
+// 获取模型历史
+export const getModelHistoryList = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/history/getHistoryList`,
+        params
+    });
+};
+// 获取模型详情
+export const getModeldetail = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/diagnosereport/info`,
+        params
+    });
+};
+// 删除模型管理
+export const removeHistoryModel = (params) => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `api/history/removeHistory`,
+        params
+    });
+};
+//******************************end*******************************************//
+
+//*****************************实时故障诊断*******************************************//
+
+// 获取实时故障诊断表格数据
+export const getInstantDiagnosticTableData = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `case/faultalg/list`,
+        params,
+        showLoading: {
+            statu: false
+        }
+    });
+};
+
+// 获取故障时的报警信息
+export const getFaultWarningInfo = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/warning/info`,
+        params
+    });
+};
+
+// 获取诊断报告数据
+export const getAllReportMsg = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/diagnosereport/item`,
+        params
+    });
+}
+
+// 获取故障类型
+export const getFaultType = () => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `know/fault/type/all`,
+    });
+};
+
+// 确认故障
+export const confirmFault = (data) => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `case/faultalg/confirm`,
+        data,
+        timeout: 120000
+    });
+}
+
+// 获取离线故障诊断表格数据
+export const getOfflineTableData = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/diagnosefault/offline`,
+        params
+    });
+};
+
+// 获取离线启用的模型
+export const getOfflineHistoryList = (params) => {
+    return request({
+        method: "get",
+        baseURL: '/current/',
+        url: `api/history/getHistoryList`,
+        params
+    });
+};
+
+// 离线诊断
+export const offlineDiagnoseFault = (data) => {
+    return request({
+        method: "post",
+        baseURL: '/current/',
+        url: `/api/diagnosefault/offlinediagnose`,
+        data,
+        timeout: 120000
+    });
+};
+
+//******************************end*******************************************//

+ 2 - 2
src/api/config.js

@@ -1,6 +1,6 @@
 const config = {
-    baseURL: 'http://192.168.10.4:9002',
-    socketURL: 'ws://192.168.10.4:9002'
+    baseURL: 'http://192.168.1.5:9002',
+    socketURL: 'ws://192.168.1.5:9002'
 }
 
 export default config;

+ 21 - 3
src/pages/dataAnalysis/combine/components/current-scatter-chart.vue

@@ -101,6 +101,16 @@ export default {
         //     ? "rgba(0,0,0,0.4)"
         //     : "rgba(255,255,255,0.5)",
         //工具箱
+        color: [
+            "#FF8700",
+            "rgb(255,0,0)",
+            "#e6b600d9",
+            "#0098d9",
+            "#3D54BE",
+            "#005eaa",
+            "#cda819",
+            "#32a487"
+        ],
         toolbox: {
           show: true,
           x: "right",
@@ -109,14 +119,14 @@ export default {
           borderColor: partten.getColor("gray"),
           textStyle: {
             fontSize: util.vh(16),
-            color: "#fff",
+            color: partten.getColor("gray")
           },
           iconStyle: {
-            borderColor:"#fff",
+            borderColor:partten.getColor("gray")
           },
           emphasis: {
             iconStyle: {
-              borderColor: "#fff",
+              borderColor:partten.getColor("gray")
             },
           },
         },
@@ -201,6 +211,10 @@ export default {
         //x轴
         xAxis: [
           {
+            name: 'm/s',
+            nameTextStyle: {
+              color: '#B3B3B3'
+            },
             type: "value",
             boundaryGap: false,
             data: that.xAxisData || [],
@@ -226,6 +240,10 @@ export default {
           splitLine: { show: false },
           position: 'left',
           min: 0,
+          name: 'kW',
+          nameTextStyle: {
+            color: '#B3B3B3'
+          }
         }, {
           splitLine: { show: false },
           position: 'right',

+ 36 - 15
src/pages/dataAnalysis/combine/index.vue

@@ -70,9 +70,9 @@ const funExcelChange = async (obj) => { //点击excel项时
 
 	if (chartResponse && chartResponse.code === 200) {
 		chartRes = chartResponse.data
-		avgObj.cpavg = chartRes.obj.cpavg?.toFixed(2)
-		avgObj.frequency = chartRes.obj.frequency?.toFixed(2)
-		avgObj.pcratio = chartRes.obj.pcratio?.toFixed(2)
+		avgObj.cpavg = Number(chartRes.obj.cpavg).toFixed(2)
+		avgObj.frequency = Number(chartRes.obj.frequency).toFixed(2)
+		avgObj.pcratio = Number(chartRes.obj.pcratio).toFixed(2)
 		dataSet.value = JSON.stringify([
 			{
 				source: chartRes.wyd
@@ -159,18 +159,22 @@ const funExcelCheckChange = ({ checkArr, data }) => {   //bug
 const excelFitList = ref([])
 /**prepare tree 开始 */
 const treeData = ref([])
-const funRepeatMap = (arr) => {
+const actTreeNode = ref(null) //当前激活的treeNode
+const funRepeatMap = (arr, type='prepare') => {
 	return arr.map(o => {
 		if (o.children) {
 			const findIndex = o.children.findIndex(p => !!p.type)
 			if (findIndex !== -1) {
 				o.childs = o.children
 				o.children = []
+				if(!actTreeNode.value && type === 'process'){ //判断当且仅有process获取tree时 赋值
+					actTreeNode.value = o
+				}
 			}
 		}
 		return {
 			...o,
-			children: o.children ? funRepeatMap(o.children) : []
+			children: o.children ? funRepeatMap(o.children, type) : []
 		}
 	})
 }
@@ -215,9 +219,26 @@ const funTreeCheckChange = ({ current, checkedNodes, checkedKeys, halfCheckedNod
 
 /**process tree 开始 */
 const processTreeData = ref([])
-const funGetProcessTree = async () => {
+const funGetProcessTree = async (flag = true) => { //flag控制是否获取tree的第一项 true为可获取
+	actTreeNode.value = null
 	const res = await request.get("/power/fitting/tree")
-	processTreeData.value = funRepeatMap(res.data)
+	processTreeData.value = funRepeatMap(res.data, flag? 'process' : 'prepare') //flag控制对actTreeNode赋值
+	if(actTreeNode.value){
+		funProcessCurrentChange({current: actTreeNode.value, currentNode: null})
+		const child = actTreeNode.value.childs[0]
+		const obj = {
+			id: child.id,
+			interval: child.interval,
+			path: child.path,
+			prepareid: child.prepareid,
+			station: child.station,
+			time: child.time,
+			type: child.type,
+			windturbine: child.windturbine,
+			name: child.path.substring(child.path.indexOf(child.station + '_') + (child.station + '_').length)
+		}
+		funExcelChange(obj)
+	}
 }
 const funProcessCurrentChange = ({ current, currentNode }) => {
 	if (current.childs) {
@@ -259,7 +280,7 @@ const funSubmit = async (query) => {
 	const res = await request.get('/power/fitting/data', { params: params })
 	if (res.code === 200) {
 		ElMessage.success(res.msg)
-		funGetProcessTree()
+		funGetProcessTree(false) //阻止获取tree第一项数据及图表
 		const excelInfo = res.data
 
 		/**拟合完成后 显示右侧图表及数据 */
@@ -394,7 +415,7 @@ const funChartArea = () => {
 						data: [
 							[
 								{
-									name: `3~5m 偏差率: ${markDot.pcl5}`,
+									name: `3~5m 偏差率: ${markDot.pcl5}%`,
 									xAxis: 3,
 								},
 								{
@@ -403,7 +424,7 @@ const funChartArea = () => {
 							],
 							[
 								{
-									name: `5~10m 偏差率: ${markDot.pcl10}`,
+									name: `5~10m 偏差率: ${markDot.pcl10}%`,
 									xAxis: 5,
 								},
 								{
@@ -412,7 +433,7 @@ const funChartArea = () => {
 							],
 							[
 								{
-									name: `10~12m 偏差率: ${markDot.pcl12}`,
+									name: `10~12m 偏差率: ${markDot.pcl12}%`,
 									xAxis: 10,
 								},
 								{
@@ -421,7 +442,7 @@ const funChartArea = () => {
 							],
 							[
 								{
-									name: `12~25m 偏差率: ${markDot.pcl25}`,
+									name: `12~25m 偏差率: ${markDot.pcl25}%`,
 									xAxis: 12,
 								},
 								{
@@ -449,8 +470,8 @@ const wtTab = ref('table')
 /**tab  */
 const activeTab = ref('1')
 /**created */
-funGetTree()
-funGetProcessTree()
+// funGetTree()
+// funGetProcessTree()
 /**mounted */
 onMounted(() => {
 	tableHeight.value = window.innerHeight - 254 + 'px'
@@ -526,7 +547,7 @@ onActivated(() => {
 							<div v-show="activeTab === '2'"
 								:style="{ height: typeof tableHeight === 'string' ? tableHeight : tableHeight + 'px' }"
 								class="p-[10px]">
-								<CurrentScatterChart ref="chartRef" width="100%" height="calc( 100% - 20px )" :chartTitle="'平均Cp:'+avgObj.cpavg+'; 静风频率:'+avgObj.frequency+'; 曲线偏差率:'+avgObj.pcratio+'%'"
+								<CurrentScatterChart ref="chartRef" width="100%" height="calc( 100% - 20px )" :chartTitle="'平均Cp:'+avgObj.cpavg+'; 静风频率:'+avgObj.frequency+'%; 曲线偏差率:'+avgObj.pcratio+'%'"
 									:xAxisData="xAxisData" :yAxisData="{ splitLine: { show: false } }" :seriesData="seriesData"
 									:showLegend="true" :brushSelected="!isChartArea" :dataSet="dataSet" @getSelected="funChartSelect" />
 							</div>

+ 396 - 0
src/pages/dataAnalysis/lineAnalysis/components/chartTheme.json

@@ -0,0 +1,396 @@
+
+{
+	"color": [
+			"#db60c8",
+			"#c12e34",
+			"#e6b600d9",
+			"#0098d9",
+			"#465a83",
+			"#005eaa",
+			"#cda819",
+			"#32a487"
+	],
+	"backgroundColor": "rgba(0,0,0,0)",
+	"textStyle": {},
+	"title": {
+			"textStyle": {
+					"color": "#333333"
+			},
+			"subtextStyle": {
+					"color": "#aaaaaa"
+			}
+	},
+	"line": {
+			"itemStyle": {
+					"borderWidth": 1
+			},
+			"lineStyle": {
+					"width": 2
+			},
+			"symbolSize": 4,
+			"symbol": "emptyCircle",
+			"smooth": false
+	},
+	"radar": {
+			"itemStyle": {
+					"borderWidth": 1
+			},
+			"lineStyle": {
+					"width": 2
+			},
+			"symbolSize": 4,
+			"symbol": "emptyCircle",
+			"smooth": false
+	},
+	"bar": {
+			"itemStyle": {
+					"barBorderWidth": 0,
+					"barBorderColor": "#ccc"
+			}
+	},
+	"pie": {
+			"itemStyle": {
+					"borderWidth": 0,
+					"borderColor": "#ccc"
+			}
+	},
+	"scatter": {
+			"itemStyle": {
+					"borderWidth": 0,
+					"borderColor": "#ccc"
+			}
+	},
+	"boxplot": {
+			"itemStyle": {
+					"borderWidth": 0,
+					"borderColor": "#ccc"
+			}
+	},
+	"parallel": {
+			"itemStyle": {
+					"borderWidth": 0,
+					"borderColor": "#ccc"
+			}
+	},
+	"sankey": {
+			"itemStyle": {
+					"borderWidth": 0,
+					"borderColor": "#ccc"
+			}
+	},
+	"funnel": {
+			"itemStyle": {
+					"borderWidth": 0,
+					"borderColor": "#ccc"
+			}
+	},
+	"gauge": {
+			"itemStyle": {
+					"borderWidth": 0,
+					"borderColor": "#ccc"
+			}
+	},
+	"candlestick": {
+			"itemStyle": {
+					"color": "#c12e34",
+					"color0": "#2b821d",
+					"borderColor": "#c12e34",
+					"borderColor0": "#2b821d",
+					"borderWidth": 1
+			}
+	},
+	"graph": {
+			"itemStyle": {
+					"borderWidth": 0,
+					"borderColor": "#ccc"
+			},
+			"lineStyle": {
+					"width": 1,
+					"color": "#aaaaaa"
+			},
+			"symbolSize": 4,
+			"symbol": "emptyCircle",
+			"smooth": false,
+			"color": [
+					"#c12e34",
+					"#e6b600",
+					"#0098d9",
+					"#50ec39",
+					"#005eaa",
+					"#339ca8",
+					"#cda819",
+					"#32a487"
+			],
+			"label": {
+					"color": "#eeeeee"
+			}
+	},
+	"map": {
+			"itemStyle": {
+					"areaColor": "#ddd",
+					"borderColor": "#eee",
+					"borderWidth": 0.5
+			},
+			"label": {
+					"color": "#c12e34"
+			},
+			"emphasis": {
+					"itemStyle": {
+							"areaColor": "#e6b600",
+							"borderColor": "#ddd",
+							"borderWidth": 1
+					},
+					"label": {
+							"color": "#c12e34"
+					}
+			}
+	},
+	"geo": {
+			"itemStyle": {
+					"areaColor": "#ddd",
+					"borderColor": "#eee",
+					"borderWidth": 0.5
+			},
+			"label": {
+					"color": "#c12e34"
+			},
+			"emphasis": {
+					"itemStyle": {
+							"areaColor": "#e6b600",
+							"borderColor": "#ddd",
+							"borderWidth": 1
+					},
+					"label": {
+							"color": "#c12e34"
+					}
+			}
+	},
+	"categoryAxis": {
+			"axisLine": {
+					"show": true,
+					"lineStyle": {
+							"color": "#333"
+					}
+			},
+			"axisTick": {
+					"show": true,
+					"lineStyle": {
+							"color": "#333"
+					}
+			},
+			"axisLabel": {
+					"show": true,
+					"color": "#333"
+			},
+			"splitLine": {
+					"show": false,
+					"lineStyle": {
+							"color": [
+									"#ccc"
+							]
+					}
+			},
+			"splitArea": {
+					"show": false,
+					"areaStyle": {
+							"color": [
+									"rgba(250,250,250,0.3)",
+									"rgba(200,200,200,0.3)"
+							]
+					}
+			}
+	},
+	"valueAxis": {
+			"axisLine": {
+					"show": true,
+					"lineStyle": {
+							"color": "#333"
+					}
+			},
+			"axisTick": {
+					"show": true,
+					"lineStyle": {
+							"color": "#333"
+					}
+			},
+			"axisLabel": {
+					"show": true,
+					"color": "#333"
+			},
+			"splitLine": {
+					"show": true,
+					"lineStyle": {
+							"color": [
+									"#ccc"
+							]
+					}
+			},
+			"splitArea": {
+					"show": false,
+					"areaStyle": {
+							"color": [
+									"rgba(250,250,250,0.3)",
+									"rgba(200,200,200,0.3)"
+							]
+					}
+			}
+	},
+	"logAxis": {
+			"axisLine": {
+					"show": true,
+					"lineStyle": {
+							"color": "#333"
+					}
+			},
+			"axisTick": {
+					"show": true,
+					"lineStyle": {
+							"color": "#333"
+					}
+			},
+			"axisLabel": {
+					"show": true,
+					"color": "#333"
+			},
+			"splitLine": {
+					"show": true,
+					"lineStyle": {
+							"color": [
+									"#ccc"
+							]
+					}
+			},
+			"splitArea": {
+					"show": false,
+					"areaStyle": {
+							"color": [
+									"rgba(250,250,250,0.3)",
+									"rgba(200,200,200,0.3)"
+							]
+					}
+			}
+	},
+	"timeAxis": {
+			"axisLine": {
+					"show": true,
+					"lineStyle": {
+							"color": "#333"
+					}
+			},
+			"axisTick": {
+					"show": true,
+					"lineStyle": {
+							"color": "#333"
+					}
+			},
+			"axisLabel": {
+					"show": true,
+					"color": "#333"
+			},
+			"splitLine": {
+					"show": true,
+					"lineStyle": {
+							"color": [
+									"#ccc"
+							]
+					}
+			},
+			"splitArea": {
+					"show": false,
+					"areaStyle": {
+							"color": [
+									"rgba(250,250,250,0.3)",
+									"rgba(200,200,200,0.3)"
+							]
+					}
+			}
+	},
+	"toolbox": {
+			"iconStyle": {
+					"borderColor": "#06467c"
+			},
+			"emphasis": {
+					"iconStyle": {
+							"borderColor": "#4187c2"
+					}
+			}
+	},
+	"legend": {
+			"textStyle": {
+					"color": "#333333"
+			}
+	},
+	"tooltip": {
+			"axisPointer": {
+					"lineStyle": {
+							"color": "#cccccc",
+							"width": 1
+					},
+					"crossStyle": {
+							"color": "#cccccc",
+							"width": 1
+					}
+			}
+	},
+	"timeline": {
+			"lineStyle": {
+					"color": "#005eaa",
+					"width": 1
+			},
+			"itemStyle": {
+					"color": "#005eaa",
+					"borderWidth": 1
+			},
+			"controlStyle": {
+					"color": "#005eaa",
+					"borderColor": "#005eaa",
+					"borderWidth": 0.5
+			},
+			"checkpointStyle": {
+					"color": "#005eaa",
+					"borderColor": "#316bc2"
+			},
+			"label": {
+					"color": "#005eaa"
+			},
+			"emphasis": {
+					"itemStyle": {
+							"color": "#005eaa"
+					},
+					"controlStyle": {
+							"color": "#005eaa",
+							"borderColor": "#005eaa",
+							"borderWidth": 0.5
+					},
+					"label": {
+							"color": "#005eaa"
+					}
+			}
+	},
+	"visualMap": {
+			"color": [
+					"#1790cf",
+					"#a2d4e6"
+			]
+	},
+	"dataZoom": {
+			"backgroundColor": "rgba(47,69,84,0)",
+			"dataBackgroundColor": "rgba(47,69,84,0.3)",
+			"fillerColor": "rgba(167,183,204,0.4)",
+			"handleColor": "#a7b7cc",
+			"handleSize": "100%",
+			"textStyle": {
+					"color": "#333333"
+			}
+	},
+	"markPoint": {
+			"label": {
+					"color": "#eeeeee"
+			},
+			"emphasis": {
+					"label": {
+							"color": "#eeeeee"
+					}
+			}
+	}
+}

+ 73 - 58
src/pages/dataAnalysis/lineAnalysis/components/current-scatter-chart.vue

@@ -75,7 +75,7 @@ export default {
         "#c531c7",
         "#bd3338",
       ],
-      theme: 'dark'
+      theme: 'light'
     };
   },
   methods: {
@@ -101,41 +101,51 @@ export default {
         //     ? "rgba(0,0,0,0.4)"
         //     : "rgba(255,255,255,0.5)",
         //工具箱
+        color: [
+            "rgb(255,0,0)",
+            "#FF8700",
+            "#e6b600d9",
+            "#0098d9",
+            "#3D54BE",
+            "#005eaa",
+            "#cda819",
+            "#32a487"
+        ],
         toolbox: {
-          show: true,
+          show: false,
           x: "right",
           position: [10, 10],
           // backgroundColor:'rgba(0,0,0,0.4)',
           borderColor: partten.getColor("gray"),
           textStyle: {
             fontSize: util.vh(16),
-            color: "#fff",
+            color: partten.getColor("gray")
           },
           iconStyle: {
-            borderColor:"#fff",
+            borderColor:partten.getColor("gray")
           },
           emphasis: {
             iconStyle: {
-              borderColor: "#fff",
+              borderColor:partten.getColor("gray")
             },
           },
         },
         tooltip: {
-          trigger: "item",
+          trigger: "axis",
           axisPointer: {
             type: "cross",
           },
-          backgroundColor: "rgba(0,0,0,0.4)",
-          borderColor: partten.getColor("gray"),
-          textStyle: {
-            fontSize: util.vh(16),
-            color: "#fff",
-          },
-          formatter(params) {
-            return params.value?.x
-              ? `${params.seriesName}<br />风速:${params.value.x}m/s<br />功率:${params.value.y}kW`
-              : `${params.name}`;
-          },
+          // backgroundColor: "rgba(0,0,0,0.4)",
+          // borderColor: partten.getColor("gray"),
+          // textStyle: {
+          //   fontSize: util.vh(16),
+          //   color: partten.getColor("gray"),
+          // },
+          // formatter(params) {
+          //   return params.value?.x
+          //     ? `${params.seriesName}<br />风速:${params.value.x}m/s<br />功率:${params.value.y}kW`
+          //     : `${params.name}`;
+          // },
         },
         brush: {
           seriesIndex: [2,3],
@@ -174,8 +184,9 @@ export default {
         //图例-每一条数据的名字
         legend: {
           show: that.showLegend,
-          data: [ "拟合功率", "保证功率","无用点", "有用点", "Cp值"],
+          // data: [ "拟合功率", "保证功率","无用点", "有用点", "Cp值"],
           right: "120",
+          type: 'scroll',
           top: "5",
           // icon: "circle",
           itemWidth: 6,
@@ -193,7 +204,7 @@ export default {
           
         },
         grid: {
-          top: 48,
+          top: 58,
           left: 40,
           right: 40,
           bottom: 24,
@@ -201,6 +212,10 @@ export default {
         //x轴
         xAxis: [
           {
+            name: 'm/s',
+            nameTextStyle: {
+              color: '#B3B3B3'
+            },
             type: "value",
             boundaryGap: false,
             data: that.xAxisData || [],
@@ -213,6 +228,7 @@ export default {
             splitLine: {
               show: false,
             },
+            smooth: true,
             textStyle: {
               color:
                 that.theme === "dark"
@@ -226,10 +242,10 @@ export default {
           splitLine: { show: false },
           position: 'left',
           min: 0,
-        }, {
-          splitLine: { show: false },
-          position: 'right',
-          min: 0,
+          name: 'kW',
+          nameTextStyle: {
+            color: '#B3B3B3'
+          }
         }],
         animation: true,
         dataset: that.dataSet.length? JSON.parse(that.dataSet) : [],
@@ -244,47 +260,46 @@ export default {
       window.addEventListener("resize", that.resize);
 
       myChart.setOption(option);
-      if (that.brushSelected) {
-        myChart.dispatchAction({
-          type: "takeGlobalCursor",
-          // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
-          key: "brush",
-          brushOption: {
-            seriesIndex: [2,3],
-            yAxisIndex: 0,
-            transformable: true,
-            throttleType: "debounce",
-            throttleDelay: 1000,
-            removeOnClick: true,
-            brushType: "polygon",
-            brushMode: "multiple",
-            brushStyle: {
-              borderWidth: 1,
-              color: "rgba(255,36,36,0.2)",
-              borderColor: "#ff2424",
-            },
-          },
-        });
-      }
+      // if (that.brushSelected) {
+      //   myChart.dispatchAction({
+      //     type: "takeGlobalCursor",
+      //     // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
+      //     key: "brush",
+      //     brushOption: {
+      //       seriesIndex: [2,3],
+      //       yAxisIndex: 0,
+      //       transformable: true,
+      //       throttleType: "debounce",
+      //       throttleDelay: 1000,
+      //       removeOnClick: true,
+      //       brushType: "polygon",
+      //       brushMode: "multiple",
+      //       brushStyle: {
+      //         borderWidth: 1,
+      //         color: "rgba(255,36,36,0.2)",
+      //         borderColor: "#ff2424",
+      //       },
+      //     },
+      //   });
+      // }
       myChart.off("brushSelected");
       myChart.on("brushSelected", (params) => {
         that.$emit("getSelected", params.batch || []);
       });
       myChart.off('click')
       myChart.on('click', params => {
-          console.log(params)
-          if(params.componentType === 'markArea'){
-            myChart.dispatchAction({
-              type: 'brush',
-              areas: [
-                {
-                  xAxisIndex: 0,
-                  brushType: 'lineX',
-                  coordRange: [params.data.coord[0][0], params.data.coord[1][0]]
-                },
-              ]
-            });
-          }
+          // if(params.componentType === 'markArea'){
+          //   myChart.dispatchAction({
+          //     type: 'brush',
+          //     areas: [
+          //       {
+          //         xAxisIndex: 0,
+          //         brushType: 'lineX',
+          //         coordRange: [params.data.coord[0][0], params.data.coord[1][0]]
+          //       },
+          //     ]
+          //   });
+          // }
         })
     },
   },

+ 8 - 32
src/pages/dataAnalysis/lineAnalysis/components/search.vue

@@ -1,14 +1,14 @@
 <script setup name="search">
 import { reactive, ref } from 'vue'
-import submitBtn from '@com/submitBtn'
+import SubmitBtn from '@com/SubmitBtn.vue'
 
 const queryForm = reactive({
-	maxs: 25,
-	mins: 0,
-	maxp: 2500,
-	minp: 0,
-	dimension: 10,  //拟合维度
-	mode: 0   //拟合方式
+	// maxs: 25,
+	// mins: 0,
+	// maxp: 2500,
+	// minp: 0,
+	// dimension: 10,  //拟合维度
+	// mode: 0   //拟合方式
 })
 /**导出 */
 const emits = defineEmits(['submit'])
@@ -21,32 +21,8 @@ const funSubmit = async () => {
 	<div class="pl-[20px] flex items-center h-[80px] relative">
 		<div class="absolute top-[-7px] left-[20px] text-[#B3B3B3] text-[14px]">操作面板</div>
 		<el-form class="" :inline="true" :model="queryForm">
-			<el-form-item label="最大风速" class="!mb-0">
-				<el-input-number v-model="queryForm.maxs" size="small" :max="30"></el-input-number>
-			</el-form-item>
-			<el-form-item label="最小风速" class="!mb-0">
-				<el-input-number v-model="queryForm.mins" size="small" :min="0"></el-input-number>
-			</el-form-item>
-			<el-form-item label="最大功率" class="!mb-0">
-				<el-input-number v-model="queryForm.maxp" size="small"></el-input-number>
-			</el-form-item>
-			<el-form-item label="最小功率" class="!mb-0">
-				<el-input-number v-model="queryForm.minp" size="small" :min="0"></el-input-number>
-			</el-form-item>
-			<el-form-item label="多项式" class="!mb-0">
-				<el-select v-model="queryForm.dimension" class="w-[80px]">
-					<el-option v-for="item in 30" :key="item" :value="item" :label="item"></el-option>
-				</el-select>
-			</el-form-item>
-			<el-form-item label="拟合方式" class="!mb-0">
-				<el-select v-model="queryForm.mode" class="w-[120px]">
-					<el-option :value="0" label="单台拟合"></el-option>
-					<el-option :value="1" label="合并拟合"></el-option>
-					<el-option :value="2" label="同名拟合"></el-option>
-				</el-select>
-			</el-form-item>
 			<el-form-item class="!mb-0">
-				<submit-btn @click="funSubmit" desc="曲线拟合"></submit-btn>
+				<submit-btn @click="funSubmit" desc="执行"></submit-btn>
 			</el-form-item>
 		</el-form>
 	</div>

+ 185 - 158
src/pages/dataAnalysis/lineAnalysis/index.vue

@@ -2,10 +2,9 @@
 import searchCop from './components/search.vue'
 import excelCop from '@/components/excel.vue'
 import treeCop from '@/components/tree.vue'
-import tableCop from './components/table.vue'
-import submitBtn from '@/components/submitBtn'
+import SubmitBtn from '@/components/SubmitBtn.vue'
 import { ref, nextTick, onActivated, onMounted, reactive } from 'vue'
-import request from '@/utils/request'
+import request from '@/api/axios.js'
 import { ElMessage } from 'element-plus'
 import util from "@tools/util";
 import CurrentScatterChart from './components/current-scatter-chart.vue'
@@ -13,21 +12,16 @@ import CurrentScatterChart from './components/current-scatter-chart.vue'
 // import tableRes from '@/data/table.json'
 // import areaDataRes from '@/data/areaData.json'
 /**配置参数 */
-const treeHeight = ref((window.innerHeight - 210) / 2 + 'px') //tree高度
-const excelHeight = ref((window.innerHeight - 210) / 2 + 'px') //excel高度
-const tableHeight = ref(window.innerHeight - 254 + 'px')
+const treeHeight = ref(window.innerHeight - 200 + 'px') //tree高度
+const excelHeight = ref(window.innerHeight - 200 + 'px') //excel高度
+const tableHeight = ref(window.innerHeight - 200 + 'px')
 /**excel 开始 */
 const excelCheckboxShow = ref(false)
-const excelType = ref('')
 const excelCheckIds = ref([])
 const excelList = ref([])
 const funExcelChange = async (obj) => { //点击excel项时
-	activeTab.value = '1'
+	return false
 	isChartArea.value = false
-	tableShowId.value = obj.id
-	tableName.value = obj.name
-	excelType.value = obj.type // 接收excel的type 用于控制右侧tab展示
-
 	let res = null
 	let chartRes = {
 		scatterhs: [[]],
@@ -38,10 +32,7 @@ const funExcelChange = async (obj) => { //点击excel项时
 	}
 	let poiRes = null
 	let chartResponse = null
-	tableLoading.value = true
-	if (obj.type === 'process') {
-		res = await request.get('/power/process/show', { params: { id: obj.id } })
-	} else if (obj.type === 'fitting') {
+	if (obj.type === 'fitting') {
 		activeTab.value = '2'
 		res = await request.get('/power/fitting/show', { params: { id: obj.id } })
 		// res = tableRes
@@ -50,15 +41,6 @@ const funExcelChange = async (obj) => { //点击excel项时
 		poiRes = await request.get('/power/fitting/curve/ratio', {params: {id: obj.id}})
 		// poiRes = areaDataRes
 	}
-	tableColumn.value = res.data.title.map(o => {
-		return {
-			prop: o.key,
-			width: o.des==='时间'? 100: 80,
-			label: o.des,
-		}
-	})
-	tableData.value = res.data.data
-	tableLoading.value = false
 
 	// markDot 
 	if(poiRes && poiRes.code=== 200){
@@ -70,15 +52,17 @@ const funExcelChange = async (obj) => { //点击excel项时
 
 	if (chartResponse && chartResponse.code === 200) {
 		chartRes = chartResponse.data
-		avgObj.cpavg = chartRes.obj.cpavg?.toFixed(2)
-		avgObj.frequency = chartRes.obj.frequency?.toFixed(2)
-		avgObj.pcratio = chartRes.obj.pcratio?.toFixed(2)
+		avgObj.cpavg = Number(chartRes.obj.cpavg).toFixed(2)
+		avgObj.frequency = Number(chartRes.obj.frequency).toFixed(2)
+		avgObj.pcratio = Number(chartRes.obj.pcratio).toFixed(2)
 		dataSet.value = JSON.stringify([
 			{
 				source: chartRes.wyd
+				// source: chartRes.scatterls
 			},
 			{
 				source: chartRes.yyd
+				// source: chartRes.scatterhs
 			}
 		])
 		const color = ["#1C99FF", "#FF8700", "#3D54BE", "#fa8c16", "#1DA0D7", "#DD5044"]
@@ -153,27 +137,29 @@ const funExcelChange = async (obj) => { //点击excel项时
 const funExcelCheckChange = ({ checkArr, data }) => {   //bug 
 	excelCheckIds.value = checkArr
 }
-/**excel fitData */
-const excelFitList = ref([])
 /**prepare tree 开始 */
 const treeData = ref([])
-const funRepeatMap = (arr) => {
+const actTreeNode = ref(null) //当前激活的treeNode
+const funRepeatMap = (arr, type='fitting') => {
 	return arr.map(o => {
 		if (o.children) {
 			const findIndex = o.children.findIndex(p => !!p.type)
 			if (findIndex !== -1) {
 				o.childs = o.children
 				o.children = []
+				if(!actTreeNode.value && type === 'fitting'){ //判断当且仅有process获取tree时 赋值
+					actTreeNode.value = o
+				}
 			}
 		}
 		return {
 			...o,
-			children: o.children ? funRepeatMap(o.children) : []
+			children: o.children ? funRepeatMap(o.children, type) : []
 		}
 	})
 }
 const funGetTree = async () => {
-	const res = await request.get("/power/process/tree")
+	const res = await request.get("/power/fitting/tree")
 	treeData.value = funRepeatMap(res.data)
 }
 const funCurrentChange = ({ current, currentNode }) => {
@@ -211,39 +197,6 @@ const funTreeCheckChange = ({ current, checkedNodes, checkedKeys, halfCheckedNod
 	excelCheckIds.value = checkIds
 }
 
-/**process tree 开始 */
-const processTreeData = ref([])
-const funGetProcessTree = async () => {
-	const res = await request.get("/power/fitting/tree")
-	processTreeData.value = funRepeatMap(res.data)
-}
-const funProcessCurrentChange = ({ current, currentNode }) => {
-	if (current.childs) {
-		excelFitList.value = current.childs.map(o => {
-			return {
-				id: o.id,
-				interval: o.interval,
-				path: o.path,
-				prepareid: o.prepareid,
-				station: o.station,
-				time: o.time,
-				type: o.type,
-				windturbine: o.windturbine,
-				name: o.path.substring(o.path.indexOf(o.station + '_') + (o.station + '_').length)
-			}
-		})
-	} else {
-		excelFitList.value = []
-	}
-}
-
-/**table 开始 */
-const tableShowId = ref('')
-const tableColumn = ref([])
-const tableLoading = ref(false)
-const tableName = ref('')
-const tableData = ref([])
-/**table 结束 */
 /**search 开始 */
 const funSubmit = async (query) => {
 	if (!excelCheckIds.value.length) {
@@ -254,18 +207,38 @@ const funSubmit = async (query) => {
 		...query,
 		ids: excelCheckIds.value.join(',')
 	}
-	const res = await request.get('/power/fitting/data', { params: params })
+	const res = await request.get('/power/fitting/line', { params: params })
 	if (res.code === 200) {
-		ElMessage.success(res.msg)
-		funGetProcessTree()
-		const excelInfo = res.data
-
-		/**拟合完成后 显示右侧图表及数据 */
-		funExcelChange({
-			id: excelInfo.id,
-			name: excelInfo.path.substring(excelInfo.path.indexOf(excelInfo.station + '_') + (excelInfo.station + '_').length),
-			type: 'fitting'
-		})
+		seriesData.value = []
+		console.log(res)
+		if(res.data.bzgl){
+			seriesData.value.push(
+				{
+					name: "保证功率",
+					type: "line",
+					symbol: "line", //设定为实心点
+					symbolSize: 0, //设定实心点的大小
+					smooth: true, //这个是把线变成曲线
+					data: res.data.bzgl || [],
+					xAxisIndex: 0,
+				},
+			)
+		}
+		if(res.data.sjgl?.length){
+			for(const wtObj of res.data.sjgl){
+				seriesData.value.push(
+					{
+						name: wtObj.wtId + "\n实际功率",
+						type: "line",
+						symbol: "line", //设定为实心点
+						symbolSize: 0, //设定实心点的大小
+						smooth: true, //这个是把线变成曲线
+						data: wtObj.sjgl || [],
+						xAxisIndex: 0,
+					},
+				)
+			}
+		}
 	}
 }
 /**chart Data */
@@ -275,10 +248,10 @@ const avgObj = reactive({ //平均cpz等
 	pcratio: ''
 })
 const markDot = reactive({ //3-5 point点等
-	pcl5: null,
-	pcl10: null,
-	pcl12: null,
-	pcl25: null
+	pcl5: 0,
+	pcl10: 0,
+	pcl12: 0,
+	pcl25: 0
 })
 const xAxisData = ref([])
 const chartRef = ref() //chart 的ref
@@ -392,7 +365,7 @@ const funChartArea = () => {
 						data: [
 							[
 								{
-									name: `3~5m 偏差率: ${markDot.pcl5}`,
+									name: `3~5m 偏差率: ${markDot.pcl5}%`,
 									xAxis: 3,
 								},
 								{
@@ -401,7 +374,7 @@ const funChartArea = () => {
 							],
 							[
 								{
-									name: `5~10m 偏差率: ${markDot.pcl10}`,
+									name: `5~10m 偏差率: ${markDot.pcl10}%`,
 									xAxis: 5,
 								},
 								{
@@ -410,7 +383,7 @@ const funChartArea = () => {
 							],
 							[
 								{
-									name: `10~12m 偏差率: ${markDot.pcl12}`,
+									name: `10~12m 偏差率: ${markDot.pcl12}%`,
 									xAxis: 10,
 								},
 								{
@@ -419,7 +392,7 @@ const funChartArea = () => {
 							],
 							[
 								{
-									name: `12~25m 偏差率: ${markDot.pcl25}`,
+									name: `12~25m 偏差率: ${markDot.pcl25}%`,
 									xAxis: 12,
 								},
 								{
@@ -444,22 +417,20 @@ const funChartArea = () => {
 const wtDialog = ref(false)
 const wtData = ref([])
 const wtTab = ref('table')
-/**tab  */
-const activeTab = ref('1')
 /**created */
-funGetTree()
-funGetProcessTree()
+// funGetTree()
+// funGetProcessTree()
 /**mounted */
 onMounted(() => {
-	tableHeight.value = window.innerHeight - 254 + 'px'
-	excelHeight.value =(window.innerHeight - 210) / 2 + 'px'
-	treeHeight.value = (window.innerHeight - 210) / 2 + 'px'
+	tableHeight.value = window.innerHeight - 200 + 'px'
+	excelHeight.value = window.innerHeight - 200 + 'px'
+	treeHeight.value = window.innerHeight - 200 + 'px'
 	window.addEventListener('resize', () => {
-		tableHeight.value = window.innerHeight - 254 + 'px'
-		excelHeight.value = (window.innerHeight - 210) / 2 + 'px'
-		treeHeight.value = (window.innerHeight - 210) / 2  + 'px'
+		tableHeight.value = window.innerHeight - 200 + 'px'
+		excelHeight.value = window.innerHeight - 200 + 'px'
+		treeHeight.value = window.innerHeight - 200 + 'px'
 	})
-	// /**test */
+	/**test */
 	// funExcelChange({
 	// 	id: 1,
 	// 	name: 'excel',
@@ -469,69 +440,125 @@ onMounted(() => {
 /**activated */
 onActivated(() => {
 	funGetTree()
-	funGetProcessTree()
 })
 </script>
 <template>
-	<div class="py-[10px] px-[10px]">
-		<search-cop class="mb-[20px] bg-[rgba(0,0,0,0.3)] shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
-		</search-cop>
-		<el-dialog v-model="wtDialog" title="风机功率点位">
-			<el-tabs v-model="wtTab">
-				<el-tab-pane label="数据" name="table">
-					<el-table :data="wtData" row-key="id" :max-height="550">
-						<el-table-column property="wtId" align="center" label="风机" />
-						<el-table-column property="time" sortable :width="160" align="center" label="时间" />
-						<el-table-column property="speed" sortable align="center" label="风速(m/s)" />
-						<el-table-column property="power" sortable align="center" label="功率(kw)" />
-						<el-table-column property="rr" sortable align="center" label="转速" />
-						<el-table-column property="filter" sortable align="center" label="是否有用点" />
-					</el-table>
-				</el-tab-pane>
-				<el-tab-pane label="故障" name="problem" disabled>
-
-				</el-tab-pane>
-				<el-tab-pane label="预警" name="warning" disabled>
-
-				</el-tab-pane>
-			</el-tabs>
-		</el-dialog>
-		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[20px] pb-[10px]">
-			<div class="text-[14px] absolute top-[-7px] text-[#B3B3B3] left-[20px]">数据展示</div>
-			<el-row :gutter="10">
-				<el-col :span="5">
-					<tree-cop :data="treeData" @checkChange="funTreeCheckChange" :show-checkbox="true" :height="treeHeight"
-						@currentChange="funCurrentChange" @refresh="funGetTree"></tree-cop>
-					<tree-cop class="mt-[10px]" :data="processTreeData" :height="treeHeight"
-						@currentChange="funProcessCurrentChange" @refresh="funGetProcessTree"></tree-cop>
-				</el-col>
-				<el-col :span="3">
-					<excel-cop :checkIds="excelCheckIds" :showCheckbox="excelCheckboxShow" :data="excelList" :height="excelHeight"
-						@excelChange="funExcelChange" @checkChange="funExcelCheckChange"></excel-cop>
-					<excel-cop class="mt-[10px]" :data="excelFitList" :height="excelHeight" @excelChange="funExcelChange">
-					</excel-cop>
-				</el-col>
-				<el-col :span="16">
-					<div class="px-[10px] shadow rounded-[6px] shadow-blue-500 bg-[rgba(0,0,0,0.3)]">
-						<submitBtn class="absolute right-[16px] top-[6px] z-10" desc="区域划分" v-if="activeTab === '2' && excelType === 'fitting'" @click="funChartArea"></submitBtn>
-						<el-tabs v-model="activeTab">
-							<el-tab-pane label="表格数据" name="1">
-							</el-tab-pane>
-							<el-tab-pane label="图表展示" name="2" v-if="excelType === 'fitting'">
-							</el-tab-pane>
-							<table-cop v-show="activeTab === '1'" :data="tableData" :loading="tableLoading" :column="tableColumn"
-								:height="tableHeight" :tableId="tableShowId" :tableName="tableName"></table-cop>
-							<div v-show="activeTab === '2'"
-								:style="{ height: typeof tableHeight === 'string' ? tableHeight : tableHeight + 'px' }"
-								class="p-[10px]">
-								<CurrentScatterChart ref="chartRef" width="100%" height="calc( 100% - 20px )" :chartTitle="'平均Cp:'+avgObj.cpavg+'; 静风频率:'+avgObj.frequency+'; 曲线偏差率:'+avgObj.pcratio+'%'"
-									:xAxisData="xAxisData" :yAxisData="{ splitLine: { show: false } }" :seriesData="seriesData"
-									:showLegend="true" :brushSelected="!isChartArea" :dataSet="dataSet" @getSelected="funChartSelect" />
-							</div>
-						</el-tabs>
-					</div>
-				</el-col>
-			</el-row>
-		</div>
-	</div>
+  <div class="bg-white py-[10px] px-[10px]">
+    <search-cop
+      class="mb-[20px] shadow rounded-[6px] shadow-blue-500"
+      @submit="funSubmit"
+    >
+    </search-cop>
+    <el-dialog v-model="wtDialog" title="风机功率点位">
+      <el-tabs v-model="wtTab">
+        <el-tab-pane label="数据" name="table">
+          <el-table :data="wtData" row-key="id" :max-height="550">
+            <el-table-column property="wtId" align="center" label="风机" />
+            <el-table-column
+              property="time"
+              sortable
+              :width="160"
+              align="center"
+              label="时间"
+            />
+            <el-table-column
+              property="speed"
+              sortable
+              align="center"
+              label="风速(m/s)"
+            />
+            <el-table-column
+              property="power"
+              sortable
+              align="center"
+              label="功率(kw)"
+            />
+            <el-table-column
+              property="rr"
+              sortable
+              align="center"
+              label="转速"
+            />
+            <el-table-column
+              property="filter"
+              sortable
+              align="center"
+              label="是否有用点"
+            />
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="故障" name="problem" disabled> </el-tab-pane>
+        <el-tab-pane label="预警" name="warning" disabled> </el-tab-pane>
+      </el-tabs>
+    </el-dialog>
+    <div
+      class="
+        relative
+        shadow
+        rounded-[6px]
+        shadow-blue-500
+        px-[10px]
+        pt-[20px]
+        pb-[10px]
+      "
+    >
+      <div class="text-[14px] absolute top-[-7px] text-[#B3B3B3] left-[20px]">
+        数据展示
+      </div>
+      <el-row :gutter="10">
+        <el-col :span="5">
+          <tree-cop
+            :data="treeData"
+            @checkChange="funTreeCheckChange"
+            :show-checkbox="true"
+            :height="treeHeight"
+            @currentChange="funCurrentChange"
+            @refresh="funGetTree"
+          ></tree-cop>
+        </el-col>
+        <el-col :span="3">
+          <excel-cop
+            :checkIds="excelCheckIds"
+            :showCheckbox="excelCheckboxShow"
+            :data="excelList"
+            :height="excelHeight"
+            @excelChange="funExcelChange"
+            @checkChange="funExcelCheckChange"
+          ></excel-cop>
+        </el-col>
+        <el-col :span="16">
+          <div class="px-[10px] shadow rounded-[6px] shadow-blue-500">
+            <SubmitBtn
+              class="absolute right-[16px] top-[6px] z-10"
+              desc="区域划分"
+              @click="funChartArea"
+            ></SubmitBtn>
+            <div
+              :style="{
+                height:
+                  typeof tableHeight === 'string'
+                    ? tableHeight
+                    : tableHeight + 'px',
+              }"
+              class="p-[10px]"
+            >
+              <CurrentScatterChart
+                ref="chartRef"
+                width="100%"
+                height="calc( 100% - 20px )"
+                chartTitle=""
+                :xAxisData="xAxisData"
+                :yAxisData="{ splitLine: { show: false } }"
+                :seriesData="seriesData"
+                :showLegend="true"
+                :brushSelected="!isChartArea"
+                :dataSet="dataSet"
+                @getSelected="funChartSelect"
+              />
+            </div>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
 </template>

+ 2 - 3
src/pages/dataAnalysis/rateAnalysis/components/lineChart.vue

@@ -59,8 +59,8 @@ const option = computed({
 			title: {
 				text: props.title || '',
 				subtext: props.subtext || '',
-				top: 10,
-				left: 30,
+				top: 6,
+				left: 15,
 			},
 			xAxis: props.xAxis || {},
 			yAxis: props.yAxis || {},
@@ -78,7 +78,6 @@ const option = computed({
 				itemWidth: 6,
 			},
 			grid: {
-				top: 42,
 				left: 40,
 				right: 40,
 				bottom: 40,

+ 243 - 34
src/pages/dataAnalysis/rateAnalysis/index.vue

@@ -9,25 +9,32 @@ import { ElMessage } from 'element-plus';
 import { onMounted, ref, onActivated, shallowRef, reactive } from 'vue'
 import request from '@/api/axios.js'
 // import flowerRes from '@/data/flower.json'
-// import lineChartRes from '@/data/lineNew.json'
+import lineChartRes from '@/data/lineNew.json'
 /**配置参数 */
-const treeHeight = ref(window.innerHeight - 200 + 'px') //tree高度
-const excelHeight = ref(window.innerHeight - 200 + 'px') //excel高度
-const tableHeight = ref(window.innerHeight - 200 + 'px')
+const treeHeight = ref(window.innerHeight - 140 + 'px') //tree高度
+const excelHeight = ref(window.innerHeight - 140 + 'px') //excel高度
+const tableHeight = ref(window.innerHeight - 140 + 'px')
 /**excel 开始 */
 const excelCheckIds = ref([])
 const excelList = ref([])
 //点击excel项时
 const funExcelChange = async (obj) => { 
 	excelCheckIds.value = [obj.id] //当为单选展示风机图表时
-	chartExcelList.value = excelList.value  // 选中excel当前项时, excel列表赋值给dialog 下拉框
+	chartExcelList.value = excelList.value.map(o=> {
+		return {
+			...o,
+			name: o.windturbine
+		}
+	})  // 选中excel当前项时, excel列表赋值给dialog 下拉框
 	queryForm.checkIds = excelList.value.map(o => o.id)
+	funSubmit()
 }
 const funExcelCheckChange = ({ checkArr, data }) => {
 	excelCheckIds.value = checkArr
 }
 /**tree 开始 */
 const treeData = ref([])
+const actTreeNode = ref(null)
 const funRepeatMap = (arr) => {
 	return arr.map(o => {
 		if (o.children) {
@@ -35,6 +42,9 @@ const funRepeatMap = (arr) => {
 			if (findIndex !== -1) {
 				o.childs = o.children
 				o.children = []
+				if(!actTreeNode.value){
+					actTreeNode.value = o
+				}
 			}
 		}
 		return {
@@ -45,7 +55,12 @@ const funRepeatMap = (arr) => {
 }
 const funGetTree = async () => {
 	const res = await request.get("/power/process/tree")
+	actTreeNode.value = null
 	treeData.value = funRepeatMap(res.data)
+	if(actTreeNode.value){
+		funCurrentChange({current: actTreeNode.value, currentNode: null})
+		funExcelChange({id: actTreeNode.value.childs[0].id})
+	}
 }
 const funTreeCheckChange = ({ current, checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys }) => {  //tree change  -> excel change
 	funCurrentChange({ current, currentNode: '' })
@@ -123,15 +138,21 @@ const funText = (index) => {
 const chartData = ref([]) //roses的chartList
 let chartId = 1
 /**submit */
-const funSubmit = async (params) => {
+const funSubmit = async () => {
 	const rosesRes = await request.get('/wind/roses', {
 		params: {
 			ids: excelCheckIds.value.join(','),
-			mode: params.mode
+			mode: 0
+		}
+	})
+	const lineRes = await request.get('/wind/deviation/ratio', {
+		params: {
+			ids: excelCheckIds.value.join(','),
+			mode: 0
 		}
 	})
 	// const rosesRes = flowerRes
-	const lineRes = lineChartRes
+	// const lineRes = lineChartRes
 	if (rosesRes.code === 200) {
 		if (rosesRes.data?.length) {
 			console.log(rosesRes.data)
@@ -335,49 +356,235 @@ const scatterSeries = ref(
 )
 /**dialog */
 const dialog = ref(false)
+const actChartName = ref('')
 const actCop = shallowRef(chartCop)
-const actCopProp = ref({
-	xAxis: [],
-	subtext: '',
-	title: '',
-	isRadar: false,
-	series: [],
-	yAxis: [],
-	dataset: []
-})
+const actCopList = ref([
+	// {
+	// 	xAxis: [],
+	// 	subtext: '',
+	// 	title: '',
+	// 	isRadar: false,
+	// 	series: [],
+	// 	yAxis: [],
+	// 	dataset: []
+	// }
+])
 const queryForm = reactive({
 	checkIds: []
 })
 const chartExcelList = ref([]) //dialog 下拉项
 const funActCop = (obj, type) => {
 	switch(type){
-		case 'chartCop':
+		case 'chartCop1':
+			actChartName.value = 'chartCop1'
+			actCop.value = chartCop
+			break
+		case 'chartCop2':
+			actChartName.value = 'chartCop2'
 			actCop.value = chartCop
 			break
 		case 'lineChartCop':
+			actChartName.value = 'lineChartCop'
 			actCop.value = lineChartCop
 			break
 		case 'scatterSingleChartCop':
+			actChartName.value = 'scatterSingleChartCop'
 			actCop.value = scatterSingleChartCop
 			break
 	}
 	dialog.value = true
-	actCopProp.value = obj
+	actCopList.value = [{...obj, id: 0}]
+}
+const funDiaSubmit = async () => {
+	let url = ''
+	switch(actChartName.value){
+		case 'chartCop1':
+			url = '/wind/roses'
+			break
+		case 'chartCop2':
+			url = '/wind/roses'
+			break
+		case 'lineChartCop':
+			url = '/wind/deviation/ratio'
+			break
+		case 'scatterSingleChartCop':
+			url = '' //暂无接口
+			break
+	}
+	if(url){
+		let chartId = 1
+		const res = await request.get(url, {
+			params: {
+				ids: queryForm.checkIds.join(','),
+				mode: 0
+			}
+		})
+		console.log(res)
+		if(res.code===200){
+			actCopList.value = []
+			if(res.data?.length){
+				for(const chart of res.data){
+					if(actChartName.value==='chartCop1'){
+						actCopList.value.push({
+							id: chartId,
+							title: chart.wt,
+							subtext: '风速风向分布图',
+							xAxis: {
+								type: 'category',
+								boundaryGap: false,
+								data: ['N','', 'N-E','', 'E','', 'S-E','', 'S','', 'S-W','', 'W','', 'W-N',''],
+								splitLine: {
+									show: true
+								},
+							},
+							isRadar: false,
+							series: chart.roses?.length ?chart.roses.map((o, index) => {
+								return {
+									type: 'bar',
+									data: o,
+									coordinateSystem: 'polar',
+									name: funText(index),
+									stack: 'a',
+									emphasis: {
+										focus: 'series'
+									}
+								}
+							}): []
+						})
+						chartId++
+					}
+					if(actChartName.value === 'chartCop2'){
+						actCopList.value.push({
+							id: chartId,
+							title: chart.wt,
+							subtext: '风速风向频次图',
+							xAxis: {
+								type: 'category',
+								boundaryGap: false,
+								data: ['N','', 'N-E','', 'E','', 'S-E','', 'S','', 'S-W','', 'W','', 'W-N',''],
+								splitLine: {
+									show: true
+								}
+							},
+							isRadar: true, //显示雷达图
+							series: chart.count?.length? [...chart.count.map((o,index) => {
+										return {
+											type: 'bar',
+											data: o,
+											coordinateSystem: 'polar',
+											name: funText(index),
+											stack: 'a',
+											emphasis: {
+												focus: 'series'
+											}
+										}
+									}), {
+										type: 'radar',
+										tooltip: {
+											trigger: 'item'
+										},
+										// areaStyle: {},
+										data: [
+											{
+												// value: [1,2,3,4,5,6,7,8],
+												value: chart.radar,
+												name: '对风风向'
+											}
+										]
+									}]: []
+						})
+						chartId++
+					}
+					if(actChartName.value === 'lineChartCop'){
+						actCopList.value.push({
+							id: chartId,
+							title: chart.wtId,
+							xAxis: {
+								type: 'category',
+								data: new Array(101).fill(-50).map((o,index) => Number((o + index).toFixed(1))),
+								splitLine: {
+									show: false
+								},
+								axisTick: {
+									show: true
+								}
+							},
+							yAxis: [
+								{
+									type: 'value',
+									name: 'm/s',
+									splitLine: {
+									show: false
+								},
+								axisTick: {
+									show: true
+								}
+								},{
+									type: 'value',
+									splitLine: {
+									show: false
+								},
+								axisTick: {
+									show: true
+								}
+								}
+							],
+							dataset: [{
+								source: chart.scatter.map(o => {
+									return [o.x+'', o.y]
+								})
+							}],
+							series: [{
+								name: "偏差率",
+								type: "line",
+								symbol: "line", //设定为实心点
+								symbolSize: 0, //设定实心点的大小
+								smooth: true, //这个是把线变成曲线
+								data: chart.count,
+								xAxisIndex: 0,
+								yAxisIndex: 1,
+							},
+							{
+								type: 'effectScatter',
+								showEffectOn: "emphasis",
+								
+								rippleEffect: {
+									scale: 1
+								},
+								legendHoverLink: false,
+								name: '数据散点',
+								symbolSize: 5,
+								datasetIndex: 0,
+								encode: {
+									x: 'x',
+									y: 'y'
+								},
+								xAxisIndex: 0,
+								yAxisIndex: 0,
+							}]
+
+						})
+						chartId++
+					}
+				}
+			}
+		}
+	}
 }
 /**created */
-funGetTree()
+// funGetTree()
 /**activated */
 onMounted(() => {
 	//test
 	// funSubmit()
 	//
-	tableHeight.value = window.innerHeight - 200 + 'px'
-	excelHeight.value =(window.innerHeight - 200) + 'px'
-	treeHeight.value = (window.innerHeight - 200) + 'px'
+	tableHeight.value = window.innerHeight - 140 + 'px'
+	excelHeight.value =(window.innerHeight - 140) + 'px'
+	treeHeight.value = (window.innerHeight - 140) + 'px'
 	window.addEventListener('resize', () => {
-		tableHeight.value = window.innerHeight - 200 + 'px'
-		excelHeight.value = (window.innerHeight - 200) + 'px'
-		treeHeight.value = (window.innerHeight - 200)  + 'px'
+		tableHeight.value = window.innerHeight - 140 + 'px'
+		excelHeight.value = (window.innerHeight - 140) + 'px'
+		treeHeight.value = (window.innerHeight - 140)  + 'px'
 	})
 })
 onActivated(() => {
@@ -386,9 +593,9 @@ onActivated(() => {
 </script>
 <template>
 	<div class="bg-white py-[10px] px-[10px] relative">
-		<search-cop class="mb-[20px]  shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
-		</search-cop>
-		<el-dialog width="1200px" v-model="dialog" title="图表">
+		<!-- <search-cop class="mb-[20px]  shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
+		</search-cop> -->
+		<el-dialog width="1000px" v-model="dialog" title="图表">
 			<el-form class="whitespace-nowrap" :inline="true" :model="queryForm">
 				<el-form-item label="" class="!mb-0">
 					<el-select v-model="queryForm.checkIds" clearable collapse-tags multiple>
@@ -396,13 +603,15 @@ onActivated(() => {
 					</el-select>
 				</el-form-item>
 				<el-form-item class="!mb-0">
-					<submit-btn desc="多台展示"></submit-btn>
+					<submit-btn desc="多台展示" @click="funDiaSubmit"></submit-btn>
 				</el-form-item>
 			</el-form>
-			<component :is="actCop" width="1150px" height="800px" :xAxis="actCopProp.xAxis" :subtext="actCopProp.subtext" :title="actCopProp.title"
-				:isRadar="actCopProp.isRadar" :series="actCopProp.series" :yAxis="actCopProp.yAxis" :dataset="actCopProp.dataset"></component>
+			<div class="flex flex-wrap justify-center items-center h-[600px] w-[950px] overflow-y-auto overflow-x-hidden">
+				<component :is="actCop" :width="actCopList.length>1?'470px':'700px'" height="400px" v-for="item in actCopList" :key="item.id" :xAxis="item.xAxis" :subtext="item.subtext" :title="item.title"
+				:isRadar="item.isRadar" :series="item.series" :yAxis="item.yAxis" :dataset="item.dataset"></component>
+			</div>
 		</el-dialog>
-		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[20px] pb-[10px]">
+		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[10px] pb-[10px]">
 			<div class="text-[14px] absolute top-[-7px] text-[#B3B3B3] left-[20px]">数据展示</div>
 			<el-row :gutter="10">
 				<el-col :span="5">
@@ -418,7 +627,7 @@ onActivated(() => {
 					<div :style="{ height: tableHeight }"
 					class="flex flex-wrap justify-center items-center overflow-x-hidden overflow-y-auto ">
 						<div class="mb-[10px] w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500" v-for="(item, index) in chartData" :key="item.id" :class="{ 'mr-[10px]': index % 2 === 0 }">
-							<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18" @click="funActCop(item, 'chartCop')">
+							<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18" @click="funActCop(item, 'chartCop'+ (index+1))">
 								<ZoomIn />
 							</el-icon>
 							<chart-cop class="" height="100%" width="100%"

+ 1 - 1
src/pages/dataFilter/prepare/index.vue

@@ -106,7 +106,7 @@ const funSubmit = async (params) => {
 	}
 }
 /**created */
-funGetTree()
+// funGetTree()
 funWebSocket()
 /**mounted */
 onMounted(() => {

+ 2 - 2
src/pages/dataFilter/process/index.vue

@@ -151,8 +151,8 @@ const funSubmit = async (query) => {
 	}
 }
 /**created */
-funGetTree()
-funGetProcessTree()
+// funGetTree()
+// funGetProcessTree()
 /**mounted */
 onMounted(() => {
 	tableHeight.value = window.innerHeight - 200 + 'px'