From 550c7e73a195e0042e1fda5e8687bcc67e6ca643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=AE=BF=E6=98=95?= Date: Mon, 18 Jan 2021 18:05:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=B3=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/table-um.vue | 5 ++++ src/components/table/table-umhref.vue | 43 ++++++++++++++++----------- src/pages/workbench/workPlace.vue | 1 + 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/components/table/table-um.vue b/src/components/table/table-um.vue index dfebf4a..c6835a4 100644 --- a/src/components/table/table-um.vue +++ b/src/components/table/table-um.vue @@ -152,6 +152,7 @@ :row="scope.row" :ids="item.id" :detailsUrl="detailsUrl" + :ites="ites" > - {{ text }} - {{text}} + {{ + text + }} + {{ text }} @@ -10,35 +12,42 @@ import helper from "@/services/helper"; import format from "string-format"; export default { - props: ["header", "row", "detailsUrl","ids"], + props: ["header", "row", "detailsUrl", "ids", "ites"], computed: { - text: function() { + text: function () { let text = helper.GetProperty(this.row, this.header.prop); return text; }, // get row.id value - baseVal: function() { + baseVal: function () { let baseVal = helper.GetProperty(this.row, "id"); return baseVal; }, }, - created(){ - - }, + created() {}, methods: { // Jump routing using id as parameter goHref(val) { - if(this.ids){ - if(this.ids.indexOf('.')==-1){ - this.$router.push(this.detailsUrl + this.row[this.ids]) - }else{ - this.$router.push(this.detailsUrl + this.row[this.ids.split('.')[0]][this.ids.split('.')[1]]) + if (this.ids) { + if (this.ids.indexOf(".") == -1) { + if (this.ites) { + console.log(this.row) + this.$router.push(this.detailsUrl + this.row[this.ids] + "/" + this.row.app_id); + } else { + this.$router.push(this.detailsUrl + this.row[this.ids]); + } + } else { + this.$router.push( + this.detailsUrl + + this.row[this.ids.split(".")[0]][this.ids.split(".")[1]] + ); } - }else{ - this.$router.push(this.detailsUrl + val) + } else { + console.log("!123"); + this.$router.push(this.detailsUrl + val); } - } - } + }, + }, };