Karsa 2 年之前
父节点
当前提交
9f4223d0ae
共有 1 个文件被更改,包括 10 次插入9 次删除
  1. 10 9
      src/views/chartShow/index.vue

+ 10 - 9
src/views/chartShow/index.vue

@@ -148,21 +148,22 @@ export default defineComponent({
         });
         loading.value = false;
         state.chartInfo = Data.ChartInfo;
+        state.dataList = Data.ChartInfo.Source === 1 ? Data.EdbInfoList : [Data.EdbInfoList[0]];
+
+        //处理英文研报英文设置不全就展示中文
+        setLangFromEnReport();
+        document.title = state.chartInfo.ChartType === 7 
+          ? Data.ChartInfo.ChartName 
+          : language.value==='ch'?Data.ChartInfo.ChartName:Data.ChartInfo.ChartNameEn;
+
         if(Data.ChartInfo.Source === 1) {
-          state.dataList = Data.EdbInfoList;
           state.chartInfo.ChartType === 7 ? initBarData(Data) : setOptions();
         }else {
-          state.dataList = [Data.EdbInfoList[0]];
           initCommodityData(Data)
         }
-
-        document.title = state.chartInfo.ChartType === 7 
-          ? Data.ChartInfo.ChartName 
-          : language.value==='ch'?Data.ChartInfo.ChartName:Data.ChartInfo.ChartNameEn;
-        haveData.value = true;
-        //处理英文研报英文设置不全就展示中文
-        setLangFromEnReport();
+        
         dealSourceHandle();
+        haveData.value = true;
         type === 'refresh' && ElMessage.success('刷新成功');
       }catch (e) {
         loading.value = false;