Browse Source

文本分析相关修改

natasha 1 year ago
parent
commit
17ddef3452

+ 29 - 2
public/ciyun/ciyunindex.html

@@ -16,6 +16,27 @@
     <link rel="stylesheet" href="./css/font/font.css">
     <script src="../config.js"></script>
     <style type="text/css">
+        .back-box{
+          width: 1182px;
+          margin: 0 auto;
+        }
+        .go-back {
+          border-radius: 4px;
+          border: 1px solid #d9d9d9;
+          background: #fff;
+          box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.02);
+          display: flex;
+          width: 60px;
+          color: #333;
+          font-size: 14px;
+          font-weight: 400;
+          line-height: 22px;
+          padding: 9px 8px;
+          align-items: center;
+          cursor: pointer;
+          margin-bottom: 16px;
+          justify-content: center;
+        }
         #stop:hover {
             text-decoration: underline;
             color: #FF0000;
@@ -141,8 +162,12 @@
 
 <body>
     <div class="wrap">
-
         <div class="content">
+            <div class="back-box">
+              <a class="go-back">
+                返回
+              </a>
+            </div>
             <div class="content-inner" style="padding: 0;">
                 <div class="cloudDiv">
                     <div class="cloud-copyright">Copyright © Jason Davies</div>
@@ -570,7 +595,9 @@
             });
         }
 
-
+        $(".go-back").click(function () {
+            window.history.back();
+          })
         $(".rule div").click(function() {
             $(".rule div").removeClass("radio-active");
             $(this).addClass("radio-active");

+ 1 - 1
src/components/teacher-dev/TeachingTool.vue

@@ -31,7 +31,7 @@
         >
           <img src="../../assets/teacherdev/jygj-2.png" alt="" />
         </div>
-        <p>语料库词典</p>
+        <p>教材语料库</p>
       </div>
       <div>
         <div

+ 2 - 2
src/views/Textanalysis/CheckArticle.vue

@@ -9,9 +9,9 @@
         </a>
         <b>校对</b>
         <div class="btn-box">
-          <el-button @click="checkPos">校对词性</el-button>
+          <el-button @click="checkWord">校对分词</el-button>
           <el-button @click="checkPinyin">校对拼音</el-button>
-          <el-button type="primary" @click="checkWord">校对分词</el-button>
+          <el-button @click="checkPos">校对词性</el-button>
         </div>
       </div>
       <div class="paragraph" v-for="(item, index) in indexArr" :key="index + 'paragraph'">

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

@@ -509,8 +509,7 @@ export default {
       data.leftNavIndex = this.typeIndex;
       data.userID = this.userID;
       sessionStorage.setItem('tablehighlight', true);
-
-      this.$router.resolve({
+      this.$router.replace({
         path: '/textanalysis/Result',
         query: data,
       });

+ 36 - 24
src/views/Textanalysis/index.vue

@@ -6,6 +6,10 @@
     <div class="main">
       <div>
         <div v-loading="LeftLoading" class="left">
+          <a v-if="!userID" class="go-back" @click="goBack">
+            <i class="el-icon-arrow-left"></i>
+            返回
+          </a>
           <div class="search">
             <div class="select-result" @click="showSearchColorList">
               <span class="selectBg" :style="{ background: colorValue }"></span>
@@ -39,7 +43,7 @@
             </span>
             <div>
               <span v-if="searchVal.trim() && !userID" class="resule-right-btn" @click="jumpSeekPage"
-                >在语料库词典中查看</span
+                >在教材语料库中查看</span
               >
               <span class="resule-right-btn" @click="clearSelected('all')">清除标记</span>
             </div>
@@ -106,19 +110,6 @@
             </div>
           </div>
           <div id="echarts" class="tubiao">
-            <div style="height: 22px">
-              <template v-if="chartIndex != 3">
-                <el-switch
-                  v-model="ratioShow"
-                  inactive-text="数量"
-                  active-text="比例"
-                  :width="26"
-                  style="margin-left: 24px"
-                  @change="changeratioShow"
-                />
-              </template>
-            </div>
-
             <div id="main_echarts" class="main_echarts"></div>
             <div class="cut_download">
               <span
@@ -1337,11 +1328,6 @@ export default {
         reslove();
       });
     },
-    changeratioShow() {
-      let str =
-        this.chartIndex === 0 ? '柱状图' : this.chartIndex === 1 ? '雷达图' : this.chartIndex === 2 ? '折线图' : '';
-      this.createEcharts('main_echarts', str, this.leftList, this.chartIndex);
-    },
     // 图表
     async createEcharts(id, type, data, index) {
       this.chartIndex = index;
@@ -1370,12 +1356,12 @@ export default {
             indicatorMaxRatio = item.ratio;
           }
         });
-        indicatorMax += 50;
+        indicatorMax += 10;
         if (indicatorMaxRatio < 50) {
           indicatorMaxRatio = 50;
         }
         // 比例开关
-        if (this.ratioShow) {
+        if (index === '3') {
           newdata.forEach((item) => {
             item.value = item.ratio;
             // item.name = item.name;
@@ -1853,7 +1839,7 @@ export default {
           this.loading = false;
         });
     },
-    // 跳转到语料库词典
+    // 跳转到教材语料库
     jumpSeekPage() {
       if (!this.searchVal.trim()) {
         return;
@@ -1882,6 +1868,12 @@ export default {
         pinyin_mark_position: value ? 1 : 0,
       });
     },
+    // 返回上一页
+    goBack() {
+      this.$router.push({
+        path: '/TextAnalysis',
+      });
+    },
   },
 };
 </script>
@@ -1910,7 +1902,26 @@ export default {
 
       > .left {
         width: 352px;
-
+        .go-back {
+          border-radius: 4px;
+          border: 1px solid #d9d9d9;
+          background: #fff;
+          box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.02);
+          display: flex;
+          width: 60px;
+          color: #333;
+          font-size: 14px;
+          font-weight: 400;
+          line-height: 22px;
+          padding: 9px 8px;
+          align-items: center;
+          cursor: pointer;
+          margin-bottom: 16px;
+          .el-icon-arrow-left {
+            font-size: 16px;
+            margin-right: 8px;
+          }
+        }
         .top_nav {
           display: flex;
           align-items: center;
@@ -2355,8 +2366,9 @@ export default {
           height: calc(100% - 137px);
           padding: 12px 15px;
           margin-top: 16px;
-          background: #f9f9f9;
+          // background: #f9f9f9;
           border-radius: 4px;
+          border: 1px solid rgba(0, 0, 0, 0.08);
 
           .right_main_top {
             display: flex;

+ 2 - 2
src/views/corpus/seekPage.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="corpus_seekpage">
-    <Header :projectShow="true" :seekOptions="false" :seekOption="true" v-if="!userID" />
+    <Header :seekOptions="false" :seekOption="true" v-if="!userID" />
     <template v-if="showPage">
       <div class="title">
-        <p>语料库词典</p>
+        <p>教材语料库</p>
         <p>Corpus Dictionary</p>
       </div>
       <div class="seek" @keydown="downSeek">