1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 12:01:57 +08:00

add document status bar (#539)

* add document status bar

* remove console

Co-authored-by: elsiosanchez <elsiosanches@gmial.com>
This commit is contained in:
Elsio Sanchez 2020-11-11 17:49:05 -04:00 committed by GitHub
parent dd3a2eea2a
commit b5ffa87141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 31 deletions

View File

@ -226,17 +226,15 @@ export function requestListDocumentStatuses({
recordId,
recordUuid,
documentStatus,
documentAction,
pageSize,
pageToken
}) {
return requestRest({
url: '/workflow/list-document-actions',
url: '/workflow/list-document-statuses',
data: {
id: recordId,
uuid: recordUuid,
table_name: tableName,
document_action: documentAction,
document_status: documentStatus
},
params: {

View File

@ -8,22 +8,20 @@
<el-timeline-item
v-for="(workflow,index) in gettersListWorkflow"
:key="index"
:timestamp="translateDate(workflow.logDate)"
placement="top"
color="#008fd3"
>
<el-card shadow="hover" class="clearfix">
<div slot="header" class="clearfix">
<span> {{ workflow.workflowName }} </span>
<span> {{ workflow.name }} </span>
</div>
<div>
<el-steps
:active="workflow.workflowEventsList.length"
align-center
finish-status="success"
>
<el-step
v-for="(nodeList, key) in workflow.workflowEventsList"
v-for="(nodeList, key) in workflow.workflowNodesList"
:key="key"
>
<span slot="title">
@ -34,26 +32,10 @@
>
<p>
<b> {{ $t('login.userName') }}:</b>
{{ nodeList.userName }}
</p>
<p v-if="!isEmptyValue(nodeList.textMessage)">
<b> {{ $t('window.containerInfo.logWorkflow.message') }}:</b>
{{ nodeList.textMessage }}
</p>
<p>
<b> {{ $t('window.containerInfo.logWorkflow.responsible') }}:</b>
{{ nodeList.responsibleName }}
</p>
<p>
<b> {{ $t('window.containerInfo.logWorkflow.workflowName') }}:</b>
{{ nodeList.workflowStateName }}
</p>
<p>
<b> {{ $t('window.containerInfo.logWorkflow.timeElapsed') }}:</b>
{{ nodeList.timeElapsed }}
{{ nodeList.name }}
</p>
<el-button slot="reference" type="text">
{{ nodeList.nodeName }}
{{ nodeList.name }}
</el-button>
</el-popover>
</span>
@ -76,7 +58,7 @@ export default {
mixins: [MixinInfo],
computed: {
gettersListWorkflow() {
return this.$store.getters.getWorkflow
return this.$store.getters.getNodeWorkflow
},
getIsWorkflowLog() {
if (this.isEmptyValue(this.gettersListWorkflow)) {

View File

@ -90,7 +90,7 @@ const containerInfo = {
pageToken
})
.then(responseWorkFlowList => {
commit('addListWorkflows', responseWorkFlowList)
commit('addListWorkflows', responseWorkFlowList.workflowsList)
return responseWorkFlowList
})
.catch(error => {

View File

@ -264,7 +264,6 @@
</el-tab-pane>
<el-tab-pane
v-if="getIsWorkflowLog"
name="listWorkflowLogs"
>
<span slot="label">
@ -272,7 +271,6 @@
{{ $t('window.containerInfo.workflowLog') }}
</span>
<div
v-if="getIsWorkflowLog"
key="workflow-log-loaded"
>
<workflow-logs />
@ -520,7 +518,7 @@ export default {
return true
},
getIsWorkflowLog() {
if (this.isEmptyValue(this.$store.getters.getWorkflow)) {
if (this.isEmptyValue(this.$store.getters.getNodeWorkflow)) {
return false
}
return true
@ -564,9 +562,13 @@ export default {
}
return currentRecord
},
isDocument() {
const panel = this.$store.getters.getPanel(this.windowMetadata.currentTabUuid)
return panel.isDocument
},
isWorkflowBarStatus() {
const panel = this.$store.getters.getPanel(this.windowMetadata.currentTabUuid)
if (!this.isEmptyValue(panel) && panel.isDocument && this.$route.query.action !== 'create-new') {
if (!this.isEmptyValue(panel) && this.isDocument && this.$route.query.action !== 'create-new') {
return true
}
return false
@ -712,6 +714,12 @@ export default {
this.handleChangeShowedRecordNavigation(isShowRecords)
}
this.isLoaded = true
const record = this.currentRecord
this.$store.dispatch('listDocumentStatus', {
tableName: this.getTableName,
recordUuid: this.$route.query.action,
recordId: record[this.getTableName + '_ID']
})
},
handleChangeShowedRecordNavigation(valueToChange) {
this.$store.dispatch('changeWindowAttribute', {