Commit 550c7e73 authored by 刘殿昕's avatar 刘殿昕

跳页面

parent 90e023c3
......@@ -152,6 +152,7 @@
:row="scope.row"
:ids="item.id"
:detailsUrl="detailsUrl"
:ites="ites"
></v-apaas-table-umhref>
<!-- could edit -->
<v-apaas-table-input
......@@ -400,6 +401,10 @@ export default {
maxheight: {
type: [String, Number],
default: " "
},
ites: {
type: Boolean,
default: false,
}
},
data() {
......
<template>
<span>
<span v-if="this.row.id||ids" class="href" @click="goHref(baseVal)">{{ text }}</span>
<span v-else>{{text}}</span>
<span v-if="this.row.id || ids" class="href" @click="goHref(baseVal)">{{
text
}}</span>
<span v-else>{{ text }}</span>
</span>
</template>
......@@ -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);
}
}
}
},
},
};
</script>
<style scoped>
......
......@@ -319,6 +319,7 @@
:datas="app_data"
:stripe="true"
:detailsUrl="detailsUrl1[now_user][now_app]"
:ites="true"
height="285"
></table-um>
<list-pagination
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment