Browse Source

修改标签跳转到别名

liucf 6 years ago
parent
commit
b3e017915d

+ 16 - 3
src/components/icss/AddDisclInfo.vue

@@ -113,6 +113,14 @@
       addDiscl() {
         this.$refs.form.validate((valid)=> {
           if (valid) {
+            // 过滤空格
+            if(!this.form.title.trim()|| !this.form.description.trim()){
+              this.$message({
+                message: "必填项不能为空",
+                type: 'warning'
+              });
+              return
+            }
             // 有id是修改,没有id是添加
             if(this.id){
               let code = this.form.disclaimerCode;
@@ -126,8 +134,8 @@
               }
               let param = {
                 id:this.id,
-                title:this.form.title,
-                description:this.form.description,
+                title:this.form.title.trim(),
+                description:this.form.description.trim(),
                 disclaimerCode:code
               }
               api.modifDiscInformation(param).then((res) => {
@@ -149,7 +157,12 @@
                 });
               })
             }else{
-              api.addDiscInformation(this.form).then((res) => {
+              let param = {
+                title:this.form.title.trim(),
+                description:this.form.description.trim(),
+                disclaimerCode:this.form.disclaimerCode
+              }
+              api.addDiscInformation(param).then((res) => {
                 if (res.data.code == '0') {
                   this.$message({showClose: true,message: this.toast, type: 'success'});
                   this.$router.push({path: 'LT-YXSJWH-MZSMWH'});

+ 2 - 2
src/components/icss/AddIndeptLabel.vue

@@ -196,12 +196,12 @@
             if (res.data.code === '0') {
               this.warning(res.data.msg || '保存成功', 'success');
               // 判断是否已有别名--有(修改),无(新增)
-              const item = {id:param.questionWrapper.id,name:param.questionWrapper.tagName};
+              const item = {'questionId':param.questionWrapper.id,'questionName':param.questionWrapper.tagName};
               api.similarNameDetl(item).then((res)=>{
                 if(res.data.code=='0'){
                   this.$router.push({
                     name:'AddSimilarName',
-                    params: item
+                    params: {id:param.questionWrapper.id,name:param.questionWrapper.tagName}
                   })
                 }else{
                   this.$router.push({

+ 2 - 2
src/components/icss/NoiseTemplate.vue

@@ -254,12 +254,12 @@ export default {
           if (res.data.code === '0') {
             this.warning(res.data.msg || '保存成功', 'success');
             // 判断是否已有别名--有(修改),无(新增)
-            const item = {id:param.questionWrapper.id,name:param.questionWrapper.tagName};
+            const item = {'questionId':param.questionWrapper.id,'questionName':param.questionWrapper.tagName};
             api.similarNameDetl(item).then((res)=>{
               if(res.data.code=='0'){
                 this.$router.push({
                   name:'AddSimilarName',
-                  params: item
+                  params: {id:param.questionWrapper.id,name:param.questionWrapper.tagName}
                 })
               }else{
                 this.$router.push({

+ 1 - 1
vue.config.js

@@ -1,6 +1,6 @@
 const path = require('path');
 // const proxy_path = 'http://192.168.2.236:80';
-const proxy_path = 'http://192.168.2.236:88';
+const proxy_path = 'http://192.168.2.241:88';
 // const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚