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