Procházet zdrojové kódy

词表下载 对齐方式,标点问题,图表数量比例切换bug

qinpeng před 2 roky
rodič
revize
aea4abbac6

+ 27 - 2
src/views/Textanalysis/WordTable.vue

@@ -122,7 +122,7 @@
             <td
               class="sort-td"
               v-if="typeIndex != 0"
-              style="font-family: GB-PINYINOK-B"
+              style="font-family: GB-PINYINOK-B; text-align: left"
             >
               {{ item.pinYin }}
             </td>
@@ -467,6 +467,7 @@ export default {
       sortType: 0,
       sortField: "level_id",
       routerData: null,
+      alldata: null,
     };
   },
   //计算属性 类似于data概念
@@ -477,7 +478,7 @@ export default {
   methods: {
     // 下载
     download() {
-      let data = JSON.parse(JSON.stringify(this.dataList.list));
+      let data = JSON.parse(JSON.stringify(this.alldata.list));
       data.forEach((item) => {
         item.textRatio = item.textRatio + "%";
         let str = "";
@@ -599,6 +600,29 @@ export default {
         .catch((res) => {
           this.loading = false;
         });
+      postapi({
+        url: "/GCLSTCServer/tools/TS/glossary/list",
+        data: {
+          pageIndex: 1,
+          pageSize: 9999,
+          partitionKey: this.partitionKey,
+          searchType: this.typeIndex,
+          word: this.keyword,
+          sortField: this.sortField,
+          sortType: this.sortType,
+          levels: this.leve ? this.leve[1] : null,
+        },
+      })
+        .then((res) => {
+          let num = 0;
+          res.data.result.list.forEach((item) => {
+            item.remarks = JSON.parse(item.remarks);
+            item.number = num;
+            num++;
+          });
+          this.alldata = res.data.result;
+        })
+        .catch((res) => {});
     },
     page1getdata() {
       this.loading = true;
@@ -795,6 +819,7 @@ export default {
         background: #ffffff;
         .pinyin {
           font-family: "GB-PINYINOK-B";
+          text-align: left !important;
         }
         .hanzi {
           text-align: left !important;

+ 25 - 9
src/views/Textanalysis/index.vue

@@ -467,7 +467,7 @@ export default {
   data() {
     return {
       ratioShow: false,
-      chsFhList: [",", "。", "”", ":", "》", "《", "?", "!", ";"],
+      chsFhList: [",", "。", "”", ":", "》", "《", "?", "!", ";","、"],
       loading: false,
       LeftLoading: false,
       wordFontsize: 20, // 汉字字号初始值
@@ -893,12 +893,15 @@ export default {
       });
     },
     changeratioShow() {
-      this.createEcharts(
-        "main_echarts",
-        "柱状图",
-        this.leftList,
-        this.chartIndex
-      );
+      let str =
+        this.chartIndex == 0
+          ? "柱状图"
+          : this.chartIndex == 1
+          ? "雷达图"
+          : this.chartIndex == 2
+          ? "折线图"
+          : "";
+      this.createEcharts("main_echarts", str, this.leftList, this.chartIndex);
     },
     // 图表
     createEcharts(id, type, data, index) {
@@ -1280,8 +1283,16 @@ export default {
                     let obj = JSON.parse(JSON.stringify(itemsss));
                     obj.isShow = true;
                     if (index > 0) {
-                      items[index - 1].text.push(obj);
-                      itemsss.isShow = false;
+                      if (
+                        items[index - 1].text[items[index - 1].text.length - 1]
+                          .isShow
+                      ) {
+                        items[index - 1].text.push(obj);
+                        itemsss.isShow = false;
+                      } else {
+                        items[index - 2].text.push(obj);
+                        itemsss.isShow = false;
+                      }
                     } else {
                       itemsss.isShow = true;
                     }
@@ -1831,6 +1842,11 @@ export default {
 </style>
   <style lang="scss">
 .textanalysis_index {
+  .el-switch {
+    .el-switch__label {
+      color: #888888;
+    }
+  }
   .el-switch__label.is-active {
     color: #000000;
   }