listview: goto account info instead of list account (#4767)

This commit is contained in:
Hoang Nguyen 2021-03-18 14:48:38 +07:00 committed by GitHub
parent 6836a94b0e
commit faf27e2b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -196,7 +196,7 @@
<span style="margin-right:5px" :key="idx">
<span v-if="$store.getters.userInfo.roletype !== 'User'">
<router-link v-if="'user' in item" :to="{ path: '/accountuser', query: { username: item.user, domainid: record.domainid }}">{{ item.account + '(' + item.user + ')' }}</router-link>
<router-link v-else :to="{ path: '/account', query: { name: item.account, domainid: record.domainid } }">{{ item.account }}</router-link>
<router-link v-else :to="{ path: '/account', query: { name: item.account, domainid: record.domainid, dataView: true } }">{{ item.account }}</router-link>
</span>
<span v-else>{{ item.user ? item.account + '(' + item.user + ')' : item.account }}</span>
</span>
@ -207,7 +207,7 @@
v-if="'quota' in record && $router.resolve(`${$route.path}/${record.account}`) !== '404'"
:to="{ path: `${$route.path}/${record.account}`, query: { account: record.account, domainid: record.domainid, quota: true } }">{{ text }}</router-link>
<router-link :to="{ path: '/account/' + record.accountid }" v-else-if="record.accountid">{{ text }}</router-link>
<router-link :to="{ path: '/account', query: { name: record.account, domainid: record.domainid } }" v-else-if="$store.getters.userInfo.roletype !== 'User'">{{ text }}</router-link>
<router-link :to="{ path: '/account', query: { name: record.account, domainid: record.domainid, dataView: true } }" v-else-if="$store.getters.userInfo.roletype !== 'User'">{{ text }}</router-link>
<span v-else>{{ text }}</span>
</template>
</span>

View File

@ -131,7 +131,7 @@ function generateRouterMap (section) {
map.meta.actions = section.actions
map.meta.filters = section.filters
map.meta.treeView = section.treeView ? section.treeView : false
map.meta.tabs = section.treeView ? section.tabs : {}
map.meta.tabs = section.tabs
map.children = [{
path: '/' + section.name + '/:id',

View File

@ -528,7 +528,7 @@ export default {
this.projectView = Boolean(store.getters.project && store.getters.project.id)
if (this.$route && this.$route.params && this.$route.params.id) {
if ((this.$route && this.$route.params && this.$route.params.id) || this.$route.query.dataView) {
this.dataView = true
if (!refreshed) {
this.resource = {}