1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-11 05:11:59 +08:00

unnecessary requests (#383)

* unnecessary requests

* validate isDocument

* validate when new registration
This commit is contained in:
elsiosanchez 2020-03-11 21:23:05 -04:00 committed by GitHub
parent 2c586f6a7e
commit fab480816b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -315,7 +315,6 @@ export default {
},
created() {
// get fields with uuid
this.$store.dispatch('listWorkflows', this.metadata.tableName)
this.getPanel()
},
methods: {
@ -615,11 +614,11 @@ export default {
return groupsList
},
setTagsViewTitle(actionValue) {
if (!this.isEmptyValue(this.$route.params.recordId) && this.getterPanel.isDocument) {
if (this.getterPanel.isDocument && this.getterDataStore.isLoaded) {
this.$store.dispatch('listWorkflows', this.metadata.tableName)
this.$store.dispatch('listDocumentStatus', {
recordUuid: this.$route.query.action,
recordId: this.$route.params.recordId,
tableName: this.$route.params.tableName
tableName: this.metadata.tableName
})
}
if (actionValue === 'create-new' || this.isEmptyValue(actionValue)) {

View File

@ -1,5 +1,5 @@
<template>
<el-steps v-if="!isEmptyValue(gettersNodeList)" :active="getActive" finish-status="success" simple :style="styleSteps">
<el-steps :active="getActive" finish-status="success" simple :style="styleSteps">
<el-step
v-for="(node, index) in listDocumentStatus"
:key="index"

View File

@ -58,11 +58,12 @@
<resize-observer @notify="handleResize" />
<Split v-shortkey="['f8']" direction="vertical" @onDrag="onDrag" @shortkey.native="handleChangeShowedRecordNavigation(!isShowedRecordNavigation)">
<SplitArea :size="sizeAreaStyle" :style="splitAreaStyle">
<el-header :style="gettersNodeList ? 'height: 45px; background: #F5F7FA' : 'height: 40px'">
<el-header :style="isWorkflowBarStatus ? 'height: 45px; background: #F5F7FA' : 'height: 40px'">
<el-container>
<el-aside width="100%" style="width: 78vw;overflow: hidden;">
<el-scrollbar>
<workflow-status-bar
v-if="isWorkflowBarStatus"
:style-steps="styleStepsSimple"
:container-uuid="windowMetadata.currentTabUuid"
:parent-uuid="windowUuid"
@ -528,9 +529,9 @@ export default {
})
return record
},
gettersNodeList() {
var node = this.$store.getters.getNodeWorkflow
if (!this.isEmptyValue(node.workflowsList)) {
isWorkflowBarStatus() {
const panel = this.$store.getters.getPanel(this.windowMetadata.currentTabUuid)
if (!this.isEmptyValue(panel) && panel.isDocument && this.$route.meta.type === 'window' && this.$route.query.action !== 'create-new') {
return true
}
return false