zhouna пре 5 година
родитељ
комит
50d7535b31
2 измењених фајлова са 5 додато и 5 уклоњено
  1. 2 2
      src/common/Dialog.vue
  2. 3 3
      src/components/MainPage.vue

+ 2 - 2
src/common/Dialog.vue

@@ -29,10 +29,10 @@ export default {
   },
   computed:{
     hideAreaVal(){      //文本域修改时不要显示已填的值
-      const {cancelNum,idx,num,extNum}=this;
+      const {item,cancelNum,idx,num,extNum}=this;
       let realExt=getNSum(extNum);
       const realIdx = realExt+idx;
-      return realIdx===cancelNum&&num===realIdx;
+      return (+item.controlType===5)&&realIdx===cancelNum&&num===realIdx;
     },
     showEdit(){
       const {cancelNum,idx,num,extNum}=this;

+ 3 - 3
src/components/MainPage.vue

@@ -194,7 +194,7 @@ export default {
     num:function(){
       let n=0;
       let numArr=this.moduleKeys.map((i,index)=>{
-        if(this.activeTab!=-1&&i==this.activeTab){
+        if(this.activeTab!==-1&&i===this.activeTab){
           n=index;
         }
         return this[this.moduleMap[i]+'QasList'].length;
@@ -348,14 +348,14 @@ export default {
         const state = this.$store.state;
         const tabIndx =  this.moduleKeys.findIndex((i)=>i==this.activeTab);
         this.activeTab=this.moduleKeys[+tabIndx+1];   //进入下一个阶段问题
-        this.num = 0;
         moduleName = this.moduleMap[this.activeTab]+'QasList';
         const mDataName = this.moduleMap[this.activeTab];
         this[moduleName] = JSON.parse(JSON.stringify(state[mDataName].datas));
         let tmpArrDetail1 = JSON.parse(JSON.stringify(this[moduleName][0]));
         this[moduleName][0] = tmpArrDetail1;
-        const tmpNowItem = this[moduleName][this.num];
         let timer = setTimeout(() => {
+          this.num = 0;
+          const tmpNowItem = this[moduleName][this.num];
           this.type = tmpNowItem.controlType;
           tmpNowItem.show = true;
           //console.log(tmpNowItem)