1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-12 22:29:59 +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, recordId,
recordUuid, recordUuid,
documentStatus, documentStatus,
documentAction,
pageSize, pageSize,
pageToken pageToken
}) { }) {
return requestRest({ return requestRest({
url: '/workflow/list-document-actions', url: '/workflow/list-document-statuses',
data: { data: {
id: recordId, id: recordId,
uuid: recordUuid, uuid: recordUuid,
table_name: tableName, table_name: tableName,
document_action: documentAction,
document_status: documentStatus document_status: documentStatus
}, },
params: { params: {

View File

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

View File

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

View File

@ -264,7 +264,6 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane
v-if="getIsWorkflowLog"
name="listWorkflowLogs" name="listWorkflowLogs"
> >
<span slot="label"> <span slot="label">
@ -272,7 +271,6 @@
{{ $t('window.containerInfo.workflowLog') }} {{ $t('window.containerInfo.workflowLog') }}
</span> </span>
<div <div
v-if="getIsWorkflowLog"
key="workflow-log-loaded" key="workflow-log-loaded"
> >
<workflow-logs /> <workflow-logs />
@ -520,7 +518,7 @@ export default {
return true return true
}, },
getIsWorkflowLog() { getIsWorkflowLog() {
if (this.isEmptyValue(this.$store.getters.getWorkflow)) { if (this.isEmptyValue(this.$store.getters.getNodeWorkflow)) {
return false return false
} }
return true return true
@ -564,9 +562,13 @@ export default {
} }
return currentRecord return currentRecord
}, },
isDocument() {
const panel = this.$store.getters.getPanel(this.windowMetadata.currentTabUuid)
return panel.isDocument
},
isWorkflowBarStatus() { isWorkflowBarStatus() {
const panel = this.$store.getters.getPanel(this.windowMetadata.currentTabUuid) 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 true
} }
return false return false
@ -712,6 +714,12 @@ export default {
this.handleChangeShowedRecordNavigation(isShowRecords) this.handleChangeShowedRecordNavigation(isShowRecords)
} }
this.isLoaded = true 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) { handleChangeShowedRecordNavigation(valueToChange) {
this.$store.dispatch('changeWindowAttribute', { this.$store.dispatch('changeWindowAttribute', {