scorpio 2 éve
szülő
commit
537178885a
2 módosított fájl, 15 hozzáadás és 4 törlés
  1. 4 2
      src/views/project/componens/top.vue
  2. 11 2
      src/views/project/index.vue

+ 4 - 2
src/views/project/componens/top.vue

@@ -11,7 +11,7 @@
       >
         <el-option
           v-for="item in stages"
-          :key="item.id"
+          :key="item"
           :label="item.name"
           :value="item.id"
         />
@@ -61,11 +61,13 @@ export default {
             } else {
               this.stage = this.stages[0].id
             }
-            this.$emit('change', this.stage)
+            this.$emit('change', this.stage, tmp.dictKey)
           }
         })
     },
     changeStage(res) {
+      const tmp = this.stages.find(ele => ele.id === res)
+      console.log(tmp)
       this.$api.project
         .changeStage({ projectId: this.projectId, stageId: res })
         .then(res => {

+ 11 - 2
src/views/project/index.vue

@@ -12,8 +12,15 @@
     </tips-custom>
     <!--    content-->
     <div style="margin-bottom: 65px">
-      <info1 :info="detail" @industry="changeIndustry" />
-      <info2 :project-id="projectId" :stage-id="stageId" :industry="industry" />
+      <div v-if="[1, 2].includes(currentStage)">
+        <info1 :info="detail" @industry="changeIndustry" />
+      </div>
+      <info2
+        v-if="currentStage === 2"
+        :project-id="projectId"
+        :stage-id="stageId"
+        :industry="industry"
+      />
       <info3 :project-id="projectId" :stage-id="stageId" />
       <info4 :project-id="projectId" />
       <info5 :info="detail" />
@@ -75,6 +82,7 @@ export default {
     return {
       projectId: '',
       stageId: '',
+      currentStage: 1,
       industry: null,
       detail: {}
     }
@@ -90,6 +98,7 @@ export default {
           this.detail = res.data
           delete this.detail._id
           this.stageId = res.data.stageId
+          this.currentStage = res.data.project_stage
           this.detail.tagsName =
             this.detail.tags === 1 ? '政府投资项目' : '企业投资项目'
           const status = confing.reportTypes.find(