瀏覽代碼

域名判断 词表无数据,文章内检索颜色优化.

qinpeng 2 年之前
父節點
當前提交
6cbfff78e2
共有 3 個文件被更改,包括 24 次插入5 次删除
  1. 11 0
      src/views/Textanalysis/WordTable.vue
  2. 7 2
      src/views/Textanalysis/index.vue
  3. 6 3
      src/views/teacher-dev/index.vue

+ 11 - 0
src/views/Textanalysis/WordTable.vue

@@ -190,6 +190,10 @@
             </td>
           </tr>
         </table>
+        <template v-if="dataList.list.length == 0">
+          <div class="no_data">暂无数据</div>
+        </template>
+
         <!-- <el-table
           :data="dataList.list"
           style="width: 100%"
@@ -656,6 +660,13 @@ export default {
     }
     .table {
       margin-top: 21px;
+      .no_data {
+        background: #ffffff;
+        text-align: center;
+        height: 60px;
+        line-height: 60px;
+        color: #909399;
+      }
       table {
         width: 100%;
         border-collapse: collapse;

+ 7 - 2
src/views/Textanalysis/index.vue

@@ -27,7 +27,7 @@
               <li
                 v-for="(item, index) in searchColorList"
                 :key="'search' + index"
-                @click="selectSearchColor(item)"
+                @click="selectSearchColor(item, index)"
               >
                 <span class="searchColor" :style="{ background: item }"></span>
               </li>
@@ -461,6 +461,7 @@ export default {
       leftNavIndex: 0,
       leftList: null,
       colorValue: "#FF3737",
+      colorIndex: 0,
       searchVal: "",
       isSCL: false,
       searchColorList: [
@@ -664,9 +665,10 @@ export default {
     closeSearchColor() {
       this.isSCL = false;
     },
-    selectSearchColor(item) {
+    selectSearchColor(item, index) {
       this.isSCL = false;
       this.colorValue = item;
+      this.colorIndex = index;
     },
     onSearch() {
       if (!this.searchVal) {
@@ -683,6 +685,9 @@ export default {
       }
       this.type = "";
       this.calculateSearchwordNumber();
+      this.searchVal = "";
+      this.colorIndex++;
+      this.colorValue = this.searchColorList[this.colorIndex];
     },
     // 词表跳转高亮
     async wordTablehighlight(data, color) {

+ 6 - 3
src/views/teacher-dev/index.vue

@@ -45,7 +45,7 @@
     <!-- 主要信息列表 -->
     <div class="main" v-loading="loading">
       <div id="TEACHINGTOOL">
-        <TeachingTool />
+        <TeachingTool v-if="textAnalyseShow" />
       </div>
       <div id="TEXTBOOK" v-if="textBookList">
         <Textbook v-if="textBookList.data" :classList="textBookList.data" />
@@ -93,6 +93,7 @@ export default {
       teachingList: null, // tea数据
       toolBookList: null, //工具书
       isData: false,
+      textAnalyseShow: true,
     };
   },
   computed: {},
@@ -172,8 +173,10 @@ export default {
     },
   },
   async created() {
-    console.log("document.domain:" + document.domain);
-    console.log("window.location.host:" + window.location.host);
+    // 如果是edu.blcup.com环境下就隐藏文本分析入口
+    if (document.domain == "edu.blcup.com") {
+      this.textAnalyseShow = false;
+    }
     await updateWordPack({
       word_key_list: [
         "Key5",