浏览代码

任务/需求/项目添加tab页保留

wangziqian 4 年之前
父节点
当前提交
10560bceb0

+ 12 - 0
src/views/projectManage/projectList/projectViewDetails.vue

@@ -275,7 +275,19 @@ export default {
       requirement: {}
     }
   },
+  watch: {
+    activeName: {
+      handler(newV) {
+        Number(newV) > 0
+          ? this.$router.push({ path: this.$route.path, query: { id: this.$route.query.id, page: newV }})
+          : this.$router.push({ path: this.$route.path, query: { id: this.$route.query.id, page: '1' }})
+      }
+    }
+  },
   created() {
+    this.$nextTick(() => {
+      this.activeName = this.$route.query.page ? this.$route.query.page : '1'
+    })
     this.get_list()
     this.initRequirementCreateDialog()
     this.$store.state.data.status = true

+ 12 - 0
src/views/projectManage/requirement/requirementDetail.vue

@@ -513,7 +513,19 @@ export default {
       return this.availableStatusList.find(item => item.code === this.form_query.status) || { name: null }
     }
   },
+  watch: {
+    activeName: {
+      handler(newV) {
+        Number(newV) > 0
+          ? this.$router.push({ path: this.$route.path, query: { id: this.$route.query.id, page: newV }})
+          : this.$router.push({ path: this.$route.path, query: { id: this.$route.query.id, page: '1' }})
+      }
+    }
+  },
   created() {
+    this.$nextTick(() => {
+      this.activeName = this.$route.query.page ? this.$route.query.page : '1'
+    })
     this.showRequirementEnum()
     this.getRequirementById()
     this.getBelongProject()

+ 33 - 6
src/views/projectManage/taskList/taskViewDetail.vue

@@ -173,9 +173,11 @@
           </div>
           <section class="main-section">
             <div class="task-help-tips">
-              <div class="tips-icon" />
+              <div class="tips-icon">
+                <i class="el-icon-question" />
+                <span> 帮助提示</span>
+              </div>
               <div class="tips-context">
-                <h3>帮助提示</h3>
                 .每个任务仅支持一次提测和一次准出,请合理拆解任务后再排期。<br>
                 .任务状态未变更【已排期】前,排期不可锁定;状态变更为【已排期】时,任务排期将被系统自动锁定。<br>
                 .需求排期锁定时,任务排期将全部被锁定;所有任务锁定时,需求排期将被系统自动锁定。<br>
@@ -459,7 +461,19 @@ export default {
       return this.allStatus.find(item => item.code === this.form_query.status) || { name: null }
     }
   },
+  watch: {
+    activeName: {
+      handler(newV) {
+        Number(newV) > 0
+          ? this.$router.push({ path: this.$route.path, query: { id: this.$route.query.id, page: newV }})
+          : this.$router.push({ path: this.$route.path, query: { id: this.$route.query.id, page: '1' }})
+      }
+    }
+  },
   created() {
+    this.$nextTick(() => {
+      this.activeName = this.$route.query.page ? this.$route.query.page : '1'
+    })
     this.taskGet()
     this.getTaskStatus()
     this.getBelongProject()
@@ -776,15 +790,28 @@ export default {
   }
   .task-help-tips {
     display: flex;
+    flex-direction: column;
     margin: 0 20px;
-    padding: 20px 0;
-    border-radius: 8px;
+    padding: 20px 13px;
+    border-radius: 4px;
     background-color: rgba(64, 158, 255,0.1);
     .tips-icon {
-      width: 50px;
+      width: 100%;
+      font-size: 14px;
+      font-weight: 550;
+      line-height: 24px;
+      color: #333333;
+      i {
+        background-color:  rgba(64, 158, 255,1);
+        color: rgba(255, 255, 255,1);
+        border-radius: 50%;
+      }
     }
     .tips-context {
-      width: calc(100% - 50px);
+      width: 100%;
+      font-size: 12px;
+      line-height: 20px;
+      color: #444444;
     }
   }
   .detail-info {

+ 0 - 1
vue.config.js

@@ -24,7 +24,6 @@ module.exports = {
       warnings: false,
       errors: true
     },
-    disableHostCheck: true, // webpack4.0 开启热更新
     proxy: {
       [process.env.VUE_APP_BASE_API]: {
         target: `http://127.0.0.1:${port}/mock`,