|
@@ -35,6 +35,7 @@ const funExcelChange = async (obj: any) => { //点击excel项时
|
|
|
if (obj.type === 'process') {
|
|
|
res = await request.get('/power/process/show', {params: { id: obj.id }})
|
|
|
} else if (obj.type === 'fitting') {
|
|
|
+ activeTab.value = '2'
|
|
|
res = await request.get('/power/fitting/show', {params: { id: obj.id }})
|
|
|
chartResponse = await request.get('/power/fitting/curve', {params: { id: obj.id }})
|
|
|
}
|
|
@@ -52,6 +53,7 @@ const funExcelChange = async (obj: any) => { //点击excel项时
|
|
|
chartRes = chartResponse.data
|
|
|
seriesData.value = [
|
|
|
{
|
|
|
+ id: 1,
|
|
|
name: "实际功率",
|
|
|
type: "line",
|
|
|
symbol: "line", //设定为实心点
|
|
@@ -69,6 +71,7 @@ const funExcelChange = async (obj: any) => { //点击excel项时
|
|
|
xAxisIndex: 0,
|
|
|
},
|
|
|
{
|
|
|
+ id: 2,
|
|
|
name: "保证功率",
|
|
|
type: "line",
|
|
|
symbol: "line", //设定为实心点
|
|
@@ -86,23 +89,57 @@ const funExcelChange = async (obj: any) => { //点击excel项时
|
|
|
xAxisIndex: 0,
|
|
|
},
|
|
|
{
|
|
|
- name: "无用点",
|
|
|
- type: "effectScatter",
|
|
|
- showEffectOn: "emphasis",
|
|
|
- symbolSize: 5,
|
|
|
- data: chartRes.scatterls,
|
|
|
+ id: 3,
|
|
|
+ type: 'scatter',
|
|
|
+ name: '无用点',
|
|
|
+ data: chartRes.scatterls,
|
|
|
+ // dimensions: ['x', 'y'],
|
|
|
+ symbolSize: 5,
|
|
|
+ encode:{
|
|
|
+ x: [0],
|
|
|
+ y: [1]
|
|
|
+ },
|
|
|
+ large: true,
|
|
|
+ largeThreshold: 500,
|
|
|
xAxisIndex: 0,
|
|
|
yAxisIndex: 0,
|
|
|
- },
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // name: "无用点",
|
|
|
+ // type: "effectScatter",
|
|
|
+ // showEffectOn: "emphasis",
|
|
|
+ // symbolSize: 5,
|
|
|
+ // data: chartRes.scatterls,
|
|
|
+ // xAxisIndex: 0,
|
|
|
+ // yAxisIndex: 0,
|
|
|
+ // },
|
|
|
{
|
|
|
- name: "有用点",
|
|
|
- type: "effectScatter",
|
|
|
- showEffectOn: "emphasis",
|
|
|
- symbolSize: 5,
|
|
|
- data: chartRes.scatterhs,
|
|
|
+ id: 4,
|
|
|
+ type: 'scatter',
|
|
|
+ name: '有用点',
|
|
|
+ data: chartRes.scatterhs,
|
|
|
+ // dimensions: ['x', 'y'],
|
|
|
+ symbolSize: 5,
|
|
|
+ encode:{
|
|
|
+ x: [0],
|
|
|
+ y: [1]
|
|
|
+ },
|
|
|
+ large: true,
|
|
|
+ largeThreshold: 500,
|
|
|
xAxisIndex: 0,
|
|
|
yAxisIndex: 0,
|
|
|
- },
|
|
|
+ },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // name: "有用点",
|
|
|
+ // type: "effectScatter",
|
|
|
+ // showEffectOn: "emphasis",
|
|
|
+ // symbolSize: 5,
|
|
|
+ // data: chartRes.scatterhs,
|
|
|
+ // animationThreshold: 500,
|
|
|
+ // xAxisIndex: 0,
|
|
|
+ // yAxisIndex: 0,
|
|
|
+ // },
|
|
|
{
|
|
|
name: "Cp值",
|
|
|
type: "line",
|
|
@@ -238,6 +275,9 @@ const funSubmit = async (query) => {
|
|
|
/**chart Data */
|
|
|
const xAxisData = ref([])
|
|
|
const seriesData = ref([])
|
|
|
+const funChartSelect = (selected) => {
|
|
|
+ console.log(selected)
|
|
|
+}
|
|
|
/**tab */
|
|
|
const activeTab = ref('1')
|
|
|
/**created */
|
|
@@ -267,12 +307,12 @@ funGetProcessTree()
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="图表展示" name="2" v-if="excelType === 'fitting'">
|
|
|
</el-tab-pane>
|
|
|
- <table-cop v-if="activeTab === '1'" :data="tableData" :loading="tableLoading" :column="tableColumn"
|
|
|
+ <table-cop v-show="activeTab === '1'" :data="tableData" :loading="tableLoading" :column="tableColumn"
|
|
|
:height="tableHeight" :tableId="tableShowId" :tableName="tableName"></table-cop>
|
|
|
- <div v-else :style="{ height: tableHeight + 'px' }" class="p-[10px]">
|
|
|
+ <div v-show="activeTab === '2'" :style="{ height: typeof tableHeight === 'string' ? tableHeight: tableHeight + 'px' }" class="p-[10px]">
|
|
|
<CurrentScatterChart width="100%" height="100%" chartTitle="风速功率曲线图" :xAxisData="xAxisData"
|
|
|
:yAxisData="{ splitLine: { show: false } }" :seriesData="seriesData" :showLegend="true"
|
|
|
- :brushSelected="false" />
|
|
|
+ :brushSelected="true" @getSelected="funChartSelect" />
|
|
|
</div>
|
|
|
</el-tabs>
|
|
|
</div>
|