Browse Source

Squashed commit of the following:

commit 0e4c4baade1f149d57a0073f6709064344221587
Author: liucf <liucf@zjlantone.com>
Date:   Tue Apr 23 16:54:19 2019 +0800

    添加别名页面归属处理
liucf 6 years ago
parent
commit
ef6896edbb
2 changed files with 26 additions and 6 deletions
  1. 24 4
      src/components/icss/AddSimilarName.vue
  2. 2 2
      vue.config.js

+ 24 - 4
src/components/icss/AddSimilarName.vue

@@ -135,7 +135,8 @@
     },
     created(){
       const id = this.$route.params.id;
-      const optionList = this.$route.params.optionList;//归属类型
+      // const optionList = this.$route.params.optionList;//归属类型
+      this.getOptions();//获取归属类型,其他页面也会跳转至此
       if(id){
         this.id = id;
         this.name = this.$route.params.name;
@@ -145,13 +146,32 @@
         this.minTitle = "别名维护-修改别名";
         this.getDetail();
       }
-      if(optionList.length>0){
+      /*if(optionList.length>0){
         for(let i=0; i<optionList.length; i++){
           this.typeList[+optionList[i].val] = optionList[i].name;
         }
-      }
+      }*/
     },
     methods:{
+      getOptions(){//归属枚举
+        api.getDropList().then((res)=>{
+          const list = res.data;
+          if(list.code==0){
+            // this.optionList = list.data[1];
+            const optionList = list.data[1];
+            if(optionList.length>0){
+              for(let i=0; i<optionList.length; i++){
+                this.typeList[+optionList[i].val] = optionList[i].name;
+              }
+            }
+          }else{
+            this.$message({
+              message:list.msg || '获取归属类型失败',
+              type:'warning'
+            });
+          }
+        })
+      },
       getDetail(){
         const param = {'questionId':this.id,'questionName':this.name}
         api.similarNameDetl(param).then((res)=>{
@@ -272,7 +292,7 @@
         })
       },
       choose(item){
-        console.log(item);
+        // console.log(item);
         this.name = item.tagName;
         this.id = item.id;
         this.showFlag = false;

+ 2 - 2
vue.config.js

@@ -1,7 +1,7 @@
 const path = require('path');
 // const proxy_path = 'http://192.168.2.236:80';
-// const proxy_path = 'http://192.168.2.241:88';
-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';//周铁刚
 // const proxy_path = 'http://192.168.3.115:5050';