Explorar el Código

关闭报错提示

染尘落幕 hace 2 meses
padre
commit
ded44807cf

+ 3 - 1
src/utils/http/index.ts

@@ -128,7 +128,9 @@ class PureHttp {
         NProgress.done();
         // 统一返回接口报错信息
         if (response.data.code && response.data.code !== 200) {
-          message(response.data.msg, { type: "error" });
+          if (response.data.code !== 10002) {
+            message(response.data.msg, { type: "error" });
+          }
         }
         if (typeof $config.beforeResponseCallback === "function") {
           // 优先判断post/get等方法是否传入回调,否则执行初始化设置等回调

+ 11 - 6
src/views/draw/children/department/departmentDrank.vue

@@ -57,14 +57,17 @@ const getPersonDimensionChartsListApiDimList = async () => {
     dataList.dimName = [];
     if (data && data.length > 0) {
       data.map(it => {
-        it.dimensionList.map((item, index) => {
-          dataList.dimName.push({
-            name: item.dimName,
-            id: item.dimId
+        if (it.dimensionList.length > 0) {
+          it.dimensionList.map((item, index) => {
+            dataList.dimName.push({
+              name: item.dimName,
+              id: item.dimId
+            });
           });
-        });
+        }
       });
     }
+    console.log(dataList.dimName, "====");
   }
 };
 const radarRefList = ref([]);
@@ -82,6 +85,7 @@ const getPersonDimensionChartsListApi = async (
   let tabIndex = Number(index);
   if (code == 200) {
     if (data && data.length > 0) {
+      console.log(data);
       if (dimensionName && dimId) {
         setTimeout(() => {
           nextTick(() => {
@@ -129,10 +133,11 @@ const init = (item, type) => {
   barDimEchartsList.type = null;
   if (Number(type)) {
     nextTick(() => {
+      console.log(item, type, "=====");
       radarRefList.value = { ...seachParams.value, type: 1 };
       barDimEchartsList.data = item;
       barDimEchartsList.type = 1;
-      getPersonDimensionChartsListApi();
+      // getPersonDimensionChartsListApi();
       getPersonDimensionChartsListApiDimList();
       getPersonDimensionChartsRankingApi();
       getChartsListApi();