Browse Source

首页增加文本分析分类, 文本分析页面

qinpeng 2 năm trước cách đây
mục cha
commit
d415e58050

+ 81 - 79
package-lock.json

@@ -1786,16 +1786,6 @@
           "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
           "dev": true
         },
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
         "cacache": {
           "version": "13.0.1",
           "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz",
@@ -1822,53 +1812,6 @@
             "unique-filename": "^1.1.1"
           }
         },
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
-          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-          "dev": true,
-          "optional": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.2",
-          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
-          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
         "source-map": {
           "version": "0.6.1",
           "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1598275560784&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz",
@@ -1885,16 +1828,6 @@
             "minipass": "^3.1.1"
           }
         },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
         "terser-webpack-plugin": {
           "version": "2.3.8",
           "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz",
@@ -1911,18 +1844,6 @@
             "terser": "^4.6.12",
             "webpack-sources": "^1.4.3"
           }
-        },
-        "vue-loader-v16": {
-          "version": "npm:vue-loader@16.8.3",
-          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
-          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chalk": "^4.1.0",
-            "hash-sum": "^2.0.0",
-            "loader-utils": "^2.0.0"
-          }
         }
       }
     },
@@ -12163,6 +12084,87 @@
         }
       }
     },
+    "vue-loader-v16": {
+      "version": "npm:vue-loader@16.8.3",
+      "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
+      "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "chalk": "^4.1.0",
+        "hash-sum": "^2.0.0",
+        "loader-utils": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true,
+          "optional": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.2",
+          "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.2.tgz",
+          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
     "vue-pdf": {
       "version": "4.2.0",
       "resolved": "https://registry.npm.taobao.org/vue-pdf/download/vue-pdf-4.2.0.tgz",

BIN
src/assets/teacherdev/delete-one.png


BIN
src/assets/teacherdev/jygj-1.png


BIN
src/assets/teacherdev/jygj-2.png


BIN
src/assets/teacherdev/jygj-3.png


+ 107 - 0
src/components/teacher-dev/TeachingTool.vue

@@ -0,0 +1,107 @@
+<template>
+  <!-- 教研工具 -->
+  <div class="Textbook">
+    <div class="top">
+      <div class="title">
+        <span class="text"> 教研工具</span>
+      </div>
+    </div>
+    <div class="class_list">
+      <div>
+        <div
+          style="background: #4ca6ee"
+          @click="
+            $router.push({
+              path: '/TextAnalysis',
+            })
+          "
+        >
+          <img src="../../assets/teacherdev/jygj-1.png" alt="" />
+        </div>
+        <p>文本分析</p>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["classList", "type"],
+  data() {
+    return {};
+  },
+  methods: {},
+  created() {},
+};
+</script>
+
+<style lang="scss" scoped>
+.Textbook {
+  .top {
+    width: 1200px;
+    margin: 0 auto;
+    display: flex;
+    justify-content: space-between;
+    .title {
+      width: 100%;
+      height: 90px;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      .text {
+        position: relative;
+        font-size: 24px;
+        font-weight: bold;
+      }
+      .more {
+        cursor: pointer;
+        font-size: 16px;
+        display: flex;
+        align-items: center;
+        span {
+          opacity: 0.4;
+        }
+        img {
+          width: 25px;
+          height: 19px;
+        }
+      }
+    }
+  }
+  .class_list {
+    width: 1200px;
+    box-sizing: border-box;
+    margin: 0 auto;
+    background: #fff;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: flex-start;
+    padding: 40px 56px;
+    > div {
+      width: 88px;
+      height: 124px;
+      cursor: pointer;
+      div {
+        width: 88px;
+        height: 88px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border-radius: 8px;
+        img {
+          width: 48px;
+          height: 48px;
+        }
+      }
+
+      p {
+        margin: 0;
+        margin-top: 10px;
+        font-weight: 400;
+        font-size: 20px;
+        line-height: 26px;
+      }
+    }
+  }
+}
+</style>

+ 7 - 0
src/router/index.js

@@ -69,6 +69,13 @@ const routes = [{
     import('../views/teacher-dev/Viewmore.vue')
 },
 {
+  path: "/TextAnalysis",
+  name: 'TextAnalysis',
+  meta: { title: '', keepAlive: false },
+  component: () =>
+    import('../views/teacher-dev/TextAnalysis.vue')
+},
+{
   path: '/teacherdevEntering',
   name: 'teacherdevEntering',
   meta: { title: '', keepAlive: false },

+ 187 - 0
src/views/teacher-dev/TextAnalysis.vue

@@ -0,0 +1,187 @@
+<template>
+  <div class="TextAnalysis">
+    <Header />
+    <div class="main">
+      <div class="title">文本分析</div>
+      <div class="input_main">
+        <el-input
+          type="textarea"
+          placeholder="请输入文本"
+          :autosize="{ minRows: 9 }"
+          v-model="txt"
+        >
+        </el-input>
+        <div class="text_btn">
+          <span class="left">{{ txt.length }}/1000</span>
+          <span class="btn">分析</span>
+        </div>
+      </div>
+      <div class="list_main">
+        <div class="title">
+          <span style="margin-right: 16px">分析记录:</span>
+          <span>11/11</span>
+        </div>
+        <div class="list">
+          <div>
+            <div class="number">1</div>
+            <div class="txt">
+              意大利著名社会学家,1982年创办意大利政治、经济与社会研究所,任该研究所主席至今 孙彦红:疫情的持续蔓延以及各国的应对过程真切地表明,人类的确是一个命运共同体。2020年是两国建交50周年,而两国在抗击疫情中的团结互助为继续深化合作夯实了基础,在后疫情时代继续加强合作符合两国的国家利益。
+            </div>
+            <div class="time">2022-06-07 06:38</div>
+            <div class="cxjx">重新解析</div>
+            <img src="../../assets/teacherdev/delete-one.png" alt="" />
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+//例如:import 《组件名称》from ‘《组件路径》';
+import Header from "@/components/Header";
+
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: {
+    Header,
+  },
+  props: {},
+  data() {
+    //这里存放数据
+    return {
+      txt: "",
+    };
+  },
+  //计算属性 类似于data概念
+  computed: {},
+  //监控data中数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  //生命周期-创建之前
+  beforeCreated() {},
+  //生命周期-挂载之前
+  beforeMount() {},
+  //生命周期-更新之前
+  beforUpdate() {},
+  //生命周期-更新之后
+  updated() {},
+  //生命周期-销毁之前
+  beforeDestory() {},
+  //生命周期-销毁完成
+  destoryed() {},
+  //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {},
+};
+</script>
+<style lang="scss" scoped>
+/* @import url(); 引入css类 */
+.TextAnalysis {
+  height: 100%;
+  .main {
+    height: 100%;
+    background: #f6f6f6;
+    padding-top: 54px;
+
+    > div {
+      width: 1200px;
+      margin: 0 auto;
+    }
+    > .title {
+      font-weight: 700;
+      font-size: 30px;
+      line-height: 43px;
+      color: #2c2c2c;
+    }
+    .input_main {
+      width: 1168px;
+      margin-top: 17px;
+      padding: 16px;
+      height: 295px;
+      background: #ffffff;
+      border-radius: 4px;
+      .text_btn {
+        margin-top: 16px;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        .left {
+          font-weight: 400;
+          font-size: 14px;
+          line-height: 26px;
+          color: #000000;
+        }
+        .btn {
+          font-weight: 500;
+          font-size: 16px;
+          line-height: 40px;
+          color: #000000;
+          width: 124px;
+          height: 40px;
+          background: #ffc600;
+          border: 1px solid rgba(0, 0, 0, 0.15);
+          box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.04);
+          border-radius: 4px;
+          text-align: center;
+          cursor: pointer;
+        }
+      }
+    }
+    .list_main {
+      margin-top: 37px;
+      .title {
+        font-weight: 400;
+        font-size: 16px;
+        line-height: 24px;
+        color: #000000;
+      }
+      .list {
+        margin-top: 16px;
+        > div {
+          display: flex;
+          align-items: center;
+          padding: 0 16px;
+          height: 48px;
+          background: #ffffff;
+          border-bottom: 1px solid rgba(0, 0, 0, 0.08);
+
+          font-weight: 400;
+          font-size: 16px;
+          color: #000000;
+          .number {
+            width: 20px;
+            text-align: right;
+            margin-right: 24px;
+          }
+          .txt {
+            width: 774px;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            margin-right: 24px;
+          }
+          .time {
+            width: 190px;
+            margin-right: 24px;
+          }
+          .cxjx {
+            margin-right: 24px;
+            cursor: pointer;
+          }
+          img {
+            width: 24px;
+            height: 24px;
+            cursor: pointer;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 8 - 1
src/views/teacher-dev/index.vue

@@ -12,6 +12,7 @@
           text-color="#000"
           active-text-color="#FF9900"
         >
+          <el-menu-item index="TEACHINGTOOL"> 教研工具</el-menu-item>
           <el-menu-item index="TEXTBOOK">
             <!-- 教辅资料 -->{{ $t("Key554") }}
           </el-menu-item>
@@ -43,6 +44,9 @@
     </div>
     <!-- 主要信息列表 -->
     <div class="main" v-loading="loading">
+      <div id="TEACHINGTOOL">
+        <TeachingTool />
+      </div>
       <div id="TEXTBOOK" v-if="textBookList">
         <Textbook v-if="textBookList.data" :classList="textBookList.data" />
       </div>
@@ -62,6 +66,8 @@ import Header from "@/components/Header";
 import Textbook from "@/components/teacher-dev/Textbook";
 import Teaching from "@/components/teacher-dev/Teaching";
 import ToolBook from "@/components/teacher-dev/ToolBook";
+import TeachingTool from "@/components/teacher-dev/TeachingTool";
+
 import { materiallist } from "@/api/api";
 import { updateWordPack } from "@/utils/i18n";
 
@@ -73,11 +79,12 @@ export default {
     Teaching,
     Textbook,
     ToolBook,
+    TeachingTool,
   },
 
   data() {
     return {
-      activeIndex: "TEXTBOOK",
+      activeIndex: "TEACHINGTOOL",
       navName: "CLASSICAL COURSE",
       SeekName: "",
       loading: false,