|
@@ -11,12 +11,7 @@ import rankTable from "@/components/rankTable/draw.vue";
|
|
import personList from "@/components/personList/index.vue";
|
|
import personList from "@/components/personList/index.vue";
|
|
import qvanping from "@/assets/rank/qvanping@2x.png";
|
|
import qvanping from "@/assets/rank/qvanping@2x.png";
|
|
import seachData from "./componements/seachOld.vue";
|
|
import seachData from "./componements/seachOld.vue";
|
|
-import {
|
|
|
|
- getPersonDimensionChartsList,
|
|
|
|
- getPersonDimensionChartsRanking,
|
|
|
|
- getAssessmentList,
|
|
|
|
- getChartsList
|
|
|
|
-} from "@/api/draw";
|
|
|
|
|
|
+import { getPersonDimensionChartsList, getChartsList } from "@/api/draw";
|
|
import type { TabsPaneContext } from "element-plus";
|
|
import type { TabsPaneContext } from "element-plus";
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const activeName = ref("1");
|
|
const activeName = ref("1");
|
|
@@ -54,6 +49,7 @@ const getPersonDimensionChartsListApiDimList = async () => {
|
|
type: 1
|
|
type: 1
|
|
});
|
|
});
|
|
if (code == 200) {
|
|
if (code == 200) {
|
|
|
|
+ radarRefList.value = data;
|
|
dataList.dimName = [];
|
|
dataList.dimName = [];
|
|
if (data && data.length > 0) {
|
|
if (data && data.length > 0) {
|
|
data.map(it => {
|
|
data.map(it => {
|
|
@@ -67,79 +63,26 @@ const getPersonDimensionChartsListApiDimList = async () => {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- console.log(dataList.dimName, "====");
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const radarRefList = ref([]);
|
|
const radarRefList = ref([]);
|
|
-const getPersonDimensionChartsListApi = async (
|
|
|
|
- dimensionName?: string,
|
|
|
|
- dimId?: number | string,
|
|
|
|
- index?: any
|
|
|
|
-) => {
|
|
|
|
- const { code, data } = await getPersonDimensionChartsList({
|
|
|
|
- ...seachParams.value,
|
|
|
|
- dimId,
|
|
|
|
- dimensionName,
|
|
|
|
- type: 1
|
|
|
|
- });
|
|
|
|
- let tabIndex = Number(index);
|
|
|
|
- if (code == 200) {
|
|
|
|
- if (data && data.length > 0) {
|
|
|
|
- console.log(data);
|
|
|
|
- if (dimensionName && dimId) {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- nextTick(() => {
|
|
|
|
- if (personListRef.value) {
|
|
|
|
- // personListRef?.value[tabIndex - 1]?.init(data);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }, 500);
|
|
|
|
- } else {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- nextTick(() => {
|
|
|
|
- // radarRefList.value = data;
|
|
|
|
- // radarRef.value.initChart(data);
|
|
|
|
- });
|
|
|
|
- }, 500);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // console.log(res);
|
|
|
|
-};
|
|
|
|
-const getPersonDimensionChartsRankingApi = async (
|
|
|
|
- dimensionName?: string,
|
|
|
|
- dimId?: number | string
|
|
|
|
-) => {
|
|
|
|
- const { code, data } = await getPersonDimensionChartsRanking({
|
|
|
|
- ...seachParams.value,
|
|
|
|
- dimId,
|
|
|
|
- dimensionName,
|
|
|
|
- type: 1
|
|
|
|
- });
|
|
|
|
- if (code == 200) {
|
|
|
|
- if (data && data.length > 0) {
|
|
|
|
- // barEchartsRef.value.init(data);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
const barDimEchartsList = reactive({
|
|
const barDimEchartsList = reactive({
|
|
data: null,
|
|
data: null,
|
|
type: null
|
|
type: null
|
|
});
|
|
});
|
|
-const init = (item, type) => {
|
|
|
|
|
|
+const init = (item, type, val) => {
|
|
seachParams.value = item;
|
|
seachParams.value = item;
|
|
barDimEchartsList.data = null;
|
|
barDimEchartsList.data = null;
|
|
barDimEchartsList.type = null;
|
|
barDimEchartsList.type = null;
|
|
if (Number(type)) {
|
|
if (Number(type)) {
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
- console.log(item, type, "=====");
|
|
|
|
- radarRefList.value = { ...seachParams.value, type: 1 };
|
|
|
|
barDimEchartsList.data = item;
|
|
barDimEchartsList.data = item;
|
|
barDimEchartsList.type = 1;
|
|
barDimEchartsList.type = 1;
|
|
- // getPersonDimensionChartsListApi();
|
|
|
|
- getPersonDimensionChartsListApiDimList();
|
|
|
|
- getPersonDimensionChartsRankingApi();
|
|
|
|
|
|
+ if (val) {
|
|
|
|
+ getPersonDimensionChartsListApiDimList();
|
|
|
|
+ } else {
|
|
|
|
+ radarRefList.value = [];
|
|
|
|
+ }
|
|
getChartsListApi();
|
|
getChartsListApi();
|
|
activeName.value = "1";
|
|
activeName.value = "1";
|
|
});
|
|
});
|
|
@@ -147,11 +90,6 @@ const init = (item, type) => {
|
|
showLength.value = 0;
|
|
showLength.value = 0;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- // setTimeout(() => {
|
|
|
|
- // nextTick(() => {
|
|
|
|
- // //
|
|
|
|
- // });
|
|
|
|
- // }, 500);
|
|
|
|
};
|
|
};
|
|
// 维度表格
|
|
// 维度表格
|
|
const paramsIndex = ref({});
|
|
const paramsIndex = ref({});
|
|
@@ -159,12 +97,7 @@ const personListRef = ref();
|
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
loading.value = true;
|
|
loading.value = true;
|
|
if (tab.props.label == "总览") {
|
|
if (tab.props.label == "总览") {
|
|
- getPersonDimensionChartsListApi();
|
|
|
|
- getPersonDimensionChartsRankingApi();
|
|
|
|
getChartsListApi();
|
|
getChartsListApi();
|
|
- } else {
|
|
|
|
- getPersonDimensionChartsListApi(tab.props.label, tab.props.name, tab.index);
|
|
|
|
- getPersonDimensionChartsRankingApi(tab.props.label, tab.props.name);
|
|
|
|
}
|
|
}
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
Object.assign(paramsIndex.value, {
|
|
Object.assign(paramsIndex.value, {
|
|
@@ -177,7 +110,6 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
loading.value = false;
|
|
loading.value = false;
|
|
}, 1000);
|
|
}, 1000);
|
|
- // barEchartsRef.value.init(tab.props);
|
|
|
|
};
|
|
};
|
|
const fullBig = (item: any) => {
|
|
const fullBig = (item: any) => {
|
|
console.log(item);
|
|
console.log(item);
|
|
@@ -247,6 +179,7 @@ const loading = ref(false);
|
|
ref="personListRef"
|
|
ref="personListRef"
|
|
class="w-11/12"
|
|
class="w-11/12"
|
|
:paramsIndex="paramsIndex"
|
|
:paramsIndex="paramsIndex"
|
|
|
|
+ :detailData="radarRefList"
|
|
/>
|
|
/>
|
|
<div
|
|
<div
|
|
class="w-[30px] h-[30px] mr-10 cursor-pointer"
|
|
class="w-[30px] h-[30px] mr-10 cursor-pointer"
|