|
@@ -37,7 +37,7 @@ const getChartsListApi = async () => {
|
|
|
setTimeout(() => {
|
|
|
nextTick(() => {
|
|
|
if (data) {
|
|
|
- showLength.value = data.length;
|
|
|
+ showLength.value = data?.length;
|
|
|
rankTableRefList.data = data;
|
|
|
rankTableRefList.dept = "科室";
|
|
|
rankTableRefList.name = "姓名";
|
|
@@ -62,7 +62,7 @@ const getPersonDimensionChartsListApiDimList = async () => {
|
|
|
});
|
|
|
if (code == 200) {
|
|
|
dataList.dimName = [];
|
|
|
- if (data.length > 0) {
|
|
|
+ if (data && data.length > 0) {
|
|
|
data.map(it => {
|
|
|
it.dimensionList.map(item => {
|
|
|
dataList.dimName.push({
|
|
@@ -89,7 +89,7 @@ const getPersonDimensionChartsListApi = async (
|
|
|
let tabIndex = Number(index);
|
|
|
|
|
|
if (code == 200) {
|
|
|
- if (data.length > 0) {
|
|
|
+ if (data && data.length > 0) {
|
|
|
if (dimensionName && dimId) {
|
|
|
setTimeout(() => {
|
|
|
nextTick(() => {
|
|
@@ -99,7 +99,7 @@ const getPersonDimensionChartsListApi = async (
|
|
|
} else {
|
|
|
setTimeout(() => {
|
|
|
nextTick(() => {
|
|
|
- radarRefList.value = data;
|
|
|
+ // radarRefList.value = data;
|
|
|
// radarRef.value.initChart(data);
|
|
|
// rankTableRef.value.init(data, "科室");
|
|
|
});
|
|
@@ -112,7 +112,8 @@ const getPersonDimensionChartsListApi = async (
|
|
|
};
|
|
|
const getPersonDimensionChartsRankingApi = async (
|
|
|
dimensionName?: string,
|
|
|
- dimId?: number | string
|
|
|
+ dimId?: number | string,
|
|
|
+ index?: any
|
|
|
) => {
|
|
|
const { code, data } = await getPersonDimensionChartsRanking({
|
|
|
...seachParams.value,
|
|
@@ -121,9 +122,18 @@ const getPersonDimensionChartsRankingApi = async (
|
|
|
type: 3
|
|
|
});
|
|
|
if (code == 200) {
|
|
|
- if (data.length > 0) {
|
|
|
- barEchartsRef.value.init(data);
|
|
|
- }
|
|
|
+ // if (data && data.length > 0) {
|
|
|
+ // nextTick(() => {
|
|
|
+ // if (Array.isArray(barEchartsRef?.value)) {
|
|
|
+ // barEchartsRef?.value[Number(index - 1)]?.init(seachParams.value, 3, {
|
|
|
+ // id: dimId,
|
|
|
+ // name: dimensionName
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // barEchartsRef?.value?.init(data);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
}
|
|
|
};
|
|
|
const barDimEchartsList = reactive({
|
|
@@ -134,6 +144,7 @@ const init = (item, type) => {
|
|
|
seachParams.value = item;
|
|
|
if (Number(type)) {
|
|
|
nextTick(() => {
|
|
|
+ radarRefList.value = { ...seachParams.value, type: 3 };
|
|
|
barDimEchartsList.data = item;
|
|
|
barDimEchartsList.type = 3;
|
|
|
});
|
|
@@ -141,6 +152,7 @@ const init = (item, type) => {
|
|
|
getPersonDimensionChartsRankingApi();
|
|
|
getPersonDimensionChartsListApiDimList();
|
|
|
getChartsListApi();
|
|
|
+ activeName.value = "1";
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
nextTick(() => {
|
|
@@ -159,14 +171,17 @@ const init = (item, type) => {
|
|
|
// 维度表格
|
|
|
const personListRef = ref();
|
|
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
|
- console.log(tab, event);
|
|
|
if (tab.props.label == "总览") {
|
|
|
getPersonDimensionChartsListApi();
|
|
|
getPersonDimensionChartsRankingApi();
|
|
|
getChartsListApi();
|
|
|
} else {
|
|
|
getPersonDimensionChartsListApi(tab.props.label, tab.props.name, tab.index);
|
|
|
- getPersonDimensionChartsRankingApi(tab.props.label, tab.props.name);
|
|
|
+ getPersonDimensionChartsRankingApi(
|
|
|
+ tab.props.label,
|
|
|
+ tab.props.name,
|
|
|
+ tab.index
|
|
|
+ );
|
|
|
}
|
|
|
// barEchartsRef.value.init(tab.props);
|
|
|
};
|
|
@@ -174,8 +189,7 @@ const fullBig = (item: any) => {
|
|
|
router.push({
|
|
|
path: "/fullBig",
|
|
|
query: {
|
|
|
- dimensionName: item.name,
|
|
|
- dimId: item.id,
|
|
|
+ ...item,
|
|
|
...seachParams.value,
|
|
|
type: 3
|
|
|
}
|