diff --git a/src/components/table/table-um.vue b/src/components/table/table-um.vue index dfebf4a92df35f2db49d48741ba2756e2a5e49c0..c6835a4d1f4a189b232fe86ffce00da875c18ace 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); } - } - } + }, + }, };