Browse Source

字数限制,lodaing问题及高度问题

qinpeng 2 years ago
parent
commit
38d61a920e
2 changed files with 14 additions and 4 deletions
  1. 13 3
      src/views/teacher-dev/TextAnalysis.vue
  2. 1 1
      vue.config.js

+ 13 - 3
src/views/teacher-dev/TextAnalysis.vue

@@ -142,6 +142,11 @@ export default {
         },
       })
         .then((res) => {
+          if (res.data.result.analysisStatus != 2) {
+            this.$message.warning("当前数据解析失败,请重新解析");
+            this.loading = false;
+            return;
+          }
           window.open(
             this.$router.resolve({
               path: "/textanalysis/Result",
@@ -175,6 +180,10 @@ export default {
         this.$message.warning("请先输入内容");
         return;
       }
+      if (this.txt.length > 1000) {
+        this.$message.warning("超出字数限制");
+        return;
+      }
       this.loading = true;
       postapi({
         url: "/GCLSTCServer/tools/TS/analys",
@@ -184,11 +193,12 @@ export default {
         },
       })
         .then((res) => {
+          this.txt = "";
           if (res.data.result.analysisStatus != 2) {
             this.$message.warning("当前数据解析失败,请重新解析");
+            this.loading = false;
             return;
           }
-          this.txt = "";
           window.open(
             this.$router.resolve({
               path: "/textanalysis/Result",
@@ -271,7 +281,7 @@ export default {
 .TextAnalysis {
   min-height: 100%;
   .main {
-    min-height: 100%;
+    min-height: 80.2vh;
     background: #f6f6f6;
     padding-top: 54px;
     padding-bottom: 24px;
@@ -289,7 +299,7 @@ export default {
       width: 1168px;
       margin-top: 17px;
       padding: 16px;
-      height: 295px;
+      min-height: 295px;
       background: #ffffff;
       border-radius: 4px;
       .text_btn {

+ 1 - 1
vue.config.js

@@ -43,7 +43,7 @@ module.exports = {
       // http://mk.wmjh.cn
       // https://gcls.helxsoft.cn
       [process.env.VUE_APP_BASE_API]: {
-        target: `https://gcls.utschool.cn`,
+        target: `https://gcls.helxsoft.cn`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''