1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-14 07:41:57 +08:00

correct unnecessary requests (#366)

* Update version for gRPC data client

* unnecessary requests

* resolve Conflicts

Co-authored-by: Yamel Senih <ysenih@erpya.com>
Co-authored-by: Leonel Matos <matosleonel0@gmail.com>
This commit is contained in:
elsiosanchez 2020-02-26 18:41:14 -04:00 committed by GitHub
parent 8e8608d60a
commit c589cc1a20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
> >
<el-container style="height: 86vh;"> <el-container style="height: 86vh;">
<Split> <Split>
<SplitArea :size="show ? isSizePanel : 100" :min-size="100"> <SplitArea :size="showContainerInfo ? isSizePanel : 100" :min-size="100">
<el-aside width="100%"> <el-aside width="100%">
<split-pane :min-percent="10" :default-percent="defaultPorcentSplitPane" split="vertical"> <split-pane :min-percent="10" :default-percent="defaultPorcentSplitPane" split="vertical">
<template> <template>
@ -187,14 +187,14 @@
</split-pane> </split-pane>
</el-aside> </el-aside>
</SplitArea> </SplitArea>
<SplitArea :size="show ? isSize : 0"> <SplitArea :size="showContainerInfo ? isSize : 0">
<el-main> <el-main>
<div :class="isCloseInfo"> <div :class="isCloseInfo">
<el-button v-show="show" type="info" icon="el-icon-info" circle style="float: right;" class="el-button-window" @click="conteInfo" /> <el-button v-show="showContainerInfo" type="info" icon="el-icon-info" circle style="float: right;" class="el-button-window" @click="conteInfo" />
</div> </div>
<div id="example-1"> <div id="example-1">
<transition name="slide-fade"> <transition name="slide-fade">
<p v-if="show"> <p v-if="showContainerInfo">
<el-card class="box-card"> <el-card class="box-card">
<el-tabs v-model="activeInfo" @tab-click="handleClick"> <el-tabs v-model="activeInfo" @tab-click="handleClick">
<el-tab-pane <el-tab-pane
@ -292,7 +292,7 @@ export default {
isLoaded: false, isLoaded: false,
isPanel: false, isPanel: false,
activeInfo: 'listChatEntries', activeInfo: 'listChatEntries',
show: false, showContainerInfo: false,
// TODO: Manage attribute with store // TODO: Manage attribute with store
isShowedRecordPanel: false isShowedRecordPanel: false
} }
@ -343,13 +343,13 @@ export default {
return 'container-info' return 'container-info'
}, },
isSize() { isSize() {
if (this.isMobile && (this.show)) { if (this.isMobile && (this.showContainerInfo)) {
return 98 return 98
} }
return 50 return 50
}, },
isSizePanel() { isSizePanel() {
if (this.isMobile && (this.show)) { if (this.isMobile && (this.showContainerInfo)) {
return 2 return 2
} }
return 50 return 50
@ -479,15 +479,17 @@ export default {
}, },
watch: { watch: {
$route(value) { $route(value) {
this.$store.dispatch(this.activeInfo, { if (this.showContainerInfo) {
tableName: this.$route.params.tableName, this.$store.dispatch(this.activeInfo, {
recordId: this.$route.params.recordId tableName: this.$route.params.tableName,
}) recordId: this.$route.params.recordId
.then(response => {
if (value.query.action === 'create-new') {
this.$store.dispatch('isNote', false)
}
}) })
.then(response => {
if (value.query.action === 'create-new') {
this.$store.dispatch('isNote', false)
}
})
}
} }
}, },
created() { created() {
@ -495,8 +497,8 @@ export default {
}, },
methods: { methods: {
conteInfo() { conteInfo() {
this.show = !this.show this.showContainerInfo = !this.showContainerInfo
if (this.show) { if (this.showContainerInfo) {
this.$store.dispatch('listWorkflowLogs', { this.$store.dispatch('listWorkflowLogs', {
tableName: this.getTableName, tableName: this.getTableName,
recordId: this.getRecord[this.getTableName + '_ID'] recordId: this.getRecord[this.getTableName + '_ID']