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

跳页面

parent 90e023c3
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
:row="scope.row" :row="scope.row"
:ids="item.id" :ids="item.id"
:detailsUrl="detailsUrl" :detailsUrl="detailsUrl"
:ites="ites"
></v-apaas-table-umhref> ></v-apaas-table-umhref>
<!-- could edit --> <!-- could edit -->
<v-apaas-table-input <v-apaas-table-input
...@@ -400,6 +401,10 @@ export default { ...@@ -400,6 +401,10 @@ export default {
maxheight: { maxheight: {
type: [String, Number], type: [String, Number],
default: " " default: " "
},
ites: {
type: Boolean,
default: false,
} }
}, },
data() { data() {
......
<template> <template>
<span> <span>
<span v-if="this.row.id||ids" class="href" @click="goHref(baseVal)">{{ text }}</span> <span v-if="this.row.id || ids" class="href" @click="goHref(baseVal)">{{
<span v-else>{{text}}</span> text
}}</span>
<span v-else>{{ text }}</span>
</span> </span>
</template> </template>
...@@ -10,35 +12,42 @@ import helper from "@/services/helper"; ...@@ -10,35 +12,42 @@ import helper from "@/services/helper";
import format from "string-format"; import format from "string-format";
export default { export default {
props: ["header", "row", "detailsUrl","ids"], props: ["header", "row", "detailsUrl", "ids", "ites"],
computed: { computed: {
text: function() { text: function () {
let text = helper.GetProperty(this.row, this.header.prop); let text = helper.GetProperty(this.row, this.header.prop);
return text; return text;
}, },
// get row.id value // get row.id value
baseVal: function() { baseVal: function () {
let baseVal = helper.GetProperty(this.row, "id"); let baseVal = helper.GetProperty(this.row, "id");
return baseVal; return baseVal;
}, },
}, },
created(){ created() {},
},
methods: { methods: {
// Jump routing using id as parameter // Jump routing using id as parameter
goHref(val) { goHref(val) {
if(this.ids){ if (this.ids) {
if(this.ids.indexOf('.')==-1){ if (this.ids.indexOf(".") == -1) {
this.$router.push(this.detailsUrl + this.row[this.ids]) if (this.ites) {
}else{ console.log(this.row)
this.$router.push(this.detailsUrl + this.row[this.ids.split('.')[0]][this.ids.split('.')[1]]) 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{ } else {
this.$router.push(this.detailsUrl + val) console.log("!123");
this.$router.push(this.detailsUrl + val);
} }
} },
} },
}; };
</script> </script>
<style scoped> <style scoped>
......
...@@ -319,6 +319,7 @@ ...@@ -319,6 +319,7 @@
:datas="app_data" :datas="app_data"
:stripe="true" :stripe="true"
:detailsUrl="detailsUrl1[now_user][now_app]" :detailsUrl="detailsUrl1[now_user][now_app]"
:ites="true"
height="285" height="285"
></table-um> ></table-um>
<list-pagination <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