Bladeren bron

模具更新的路由到另一个模具

Reiskuchen 5 jaren geleden
bovenliggende
commit
2b12b5b5fa
1 gewijzigde bestanden met toevoegingen van 9 en 1 verwijderingen
  1. 9 1
      ys_vue/src/views/mold/moldDetail.vue

+ 9 - 1
ys_vue/src/views/mold/moldDetail.vue

@@ -413,7 +413,7 @@
                 <el-table-column type="index" width="40"></el-table-column>
                 <el-table-column label="模具编号" sortable>
                     <template slot-scope="scope">
-                        <router-link :to="'/moldList/' + scope.row.mouldId" tag="span" style="cursor: pointer;color: #409eff;">{{scope.row.mouldNo}}</router-link>
+                        <span @click="toAnotherMould(scope.row.mouldId)" style="cursor: pointer;color: #409eff;">{{scope.row.mouldNo}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column prop="applicantName" label="申请人" align="center" width="200" sortable></el-table-column>
@@ -685,6 +685,14 @@
                 this.$router.push('/project/' + id);
             },
 
+            toAnotherMould(id){
+                var currentRoute = this.$route.path.split("/");
+                if (currentRoute.length == 3 && currentRoute[1] == "moldList") {
+                    this.$router.go(0);
+                }
+                this.$router.push('/mould/' + id);
+            },
+
             //标签页面切换时
             handleClick(tab, event) {
                 this.activeTab = tab.name;