|
|
@ -5,7 +5,7 @@ |
|
|
<div slot="header" class="search-header"> |
|
|
<div slot="header" class="search-header"> |
|
|
<div class="header-left"> |
|
|
<div class="header-left"> |
|
|
<i class="el-icon-s-order"></i> |
|
|
<i class="el-icon-s-order"></i> |
|
|
<span class="header-title">我的待办</span> |
|
|
|
|
|
|
|
|
<span class="header-title">{{ $t('todo.search.title') }}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="header-right"> |
|
|
<div class="header-right"> |
|
|
<el-button |
|
|
<el-button |
|
|
@ -13,7 +13,7 @@ |
|
|
size="small" |
|
|
size="small" |
|
|
class="collapse-btn" |
|
|
class="collapse-btn" |
|
|
@click="toggleSearchExpand"> |
|
|
@click="toggleSearchExpand"> |
|
|
<span>{{ searchExpanded ? '收起' : '展开' }}</span> |
|
|
|
|
|
|
|
|
<span>{{ searchExpanded ? $t('todo.common.collapse') : $t('todo.common.expand') }}</span> |
|
|
<i :class="searchExpanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i> |
|
|
<i :class="searchExpanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</div> |
|
|
</div> |
|
|
@ -23,39 +23,39 @@ |
|
|
<template v-if="searchExpanded"> |
|
|
<template v-if="searchExpanded"> |
|
|
<el-row :gutter="16" class="search-condition-row"> |
|
|
<el-row :gutter="16" class="search-condition-row"> |
|
|
<el-col :span="3"> |
|
|
<el-col :span="3"> |
|
|
<el-form-item label="单据号"> |
|
|
|
|
|
<el-input v-model="searchData.documentNo" clearable placeholder="单据号"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('todo.field.documentNo')"> |
|
|
|
|
|
<el-input v-model="searchData.documentNo" clearable :placeholder="$t('todo.field.documentNo')"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="2"> |
|
|
<el-col :span="2"> |
|
|
<el-form-item label="流程ID"> |
|
|
|
|
|
<el-input v-model="searchData.workflowId" clearable placeholder="流程ID"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('todo.field.workflowId')"> |
|
|
|
|
|
<el-input v-model="searchData.workflowId" clearable :placeholder="$t('todo.field.workflowId')"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="4"> |
|
|
<el-col :span="4"> |
|
|
<el-form-item label="流程名称"> |
|
|
|
|
|
<el-input v-model="searchData.workflowName" clearable placeholder="流程名称"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('todo.field.workflowName')"> |
|
|
|
|
|
<el-input v-model="searchData.workflowName" clearable :placeholder="$t('todo.field.workflowName')"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="2"> |
|
|
<el-col :span="2"> |
|
|
<el-form-item label="当前节点ID"> |
|
|
|
|
|
<el-input v-model="searchData.nodeId" clearable placeholder="节点ID"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('todo.field.nodeId')"> |
|
|
|
|
|
<el-input v-model="searchData.nodeId" clearable :placeholder="$t('todo.field.nodeIdShort')"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="4"> |
|
|
<el-col :span="4"> |
|
|
<el-form-item label="当前节点名称"> |
|
|
|
|
|
<el-input v-model="searchData.nodeName" clearable placeholder="节点名称"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('todo.field.nodeName')"> |
|
|
|
|
|
<el-input v-model="searchData.nodeName" clearable :placeholder="$t('todo.field.nodeName')"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="3"> |
|
|
<el-col :span="3"> |
|
|
<el-form-item label="流程创建人"> |
|
|
|
|
|
<el-input v-model="searchData.createBy" clearable placeholder="创建人"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('todo.field.createBy')"> |
|
|
|
|
|
<el-input v-model="searchData.createBy" clearable :placeholder="$t('todo.field.createByShort')"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="3"> |
|
|
<el-col :span="3"> |
|
|
<el-form-item label="单据类型"> |
|
|
|
|
|
<el-select v-model="searchData.documentType" clearable placeholder="全部"> |
|
|
|
|
|
<el-option label="MRB" value="MRB"></el-option> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('todo.field.documentType')"> |
|
|
|
|
|
<el-select v-model="searchData.documentType" clearable :placeholder="$t('todo.option.all')"> |
|
|
|
|
|
<el-option :label="$t('todo.option.mrb')" value="MRB"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
@ -64,8 +64,8 @@ |
|
|
|
|
|
|
|
|
<div class="search-actions"> |
|
|
<div class="search-actions"> |
|
|
<div class="action-left"> |
|
|
<div class="action-left"> |
|
|
<el-button type="primary" icon="el-icon-search" @click="queryHandle">查询</el-button> |
|
|
|
|
|
<el-button icon="el-icon-refresh" @click="resetHandle">重置</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="queryHandle">{{ $t('todo.common.query') }}</el-button> |
|
|
|
|
|
<el-button icon="el-icon-refresh" @click="resetHandle">{{ $t('todo.common.reset') }}</el-button> |
|
|
<download-excel |
|
|
<download-excel |
|
|
:fields="fields()" |
|
|
:fields="fields()" |
|
|
:data="exportData" |
|
|
:data="exportData" |
|
|
@ -76,24 +76,24 @@ |
|
|
:fetch="createExportData" |
|
|
:fetch="createExportData" |
|
|
:before-generate="startDownload" |
|
|
:before-generate="startDownload" |
|
|
:before-finish="finishDownload" |
|
|
:before-finish="finishDownload" |
|
|
worksheet="导出信息" |
|
|
|
|
|
|
|
|
:worksheet="$t('todo.export.worksheet')" |
|
|
:class="['el-button', 'el-button--default', 'export-excel-btn', {'is-loading': exportLoading}]"> |
|
|
:class="['el-button', 'el-button--default', 'export-excel-btn', {'is-loading': exportLoading}]"> |
|
|
<i v-if="exportLoading" class="el-icon-loading"></i> |
|
|
<i v-if="exportLoading" class="el-icon-loading"></i> |
|
|
<i v-else class="el-icon-download"></i> |
|
|
<i v-else class="el-icon-download"></i> |
|
|
<span>{{ "导出" }}</span> |
|
|
|
|
|
|
|
|
<span>{{ $t('todo.common.export') }}</span> |
|
|
</download-excel> |
|
|
</download-excel> |
|
|
</div> |
|
|
</div> |
|
|
<div class="action-right"> |
|
|
<div class="action-right"> |
|
|
<div class="kpi-mini-card kpi-blue" title="符合查询条件的待办总数"> |
|
|
|
|
|
<div class="kpi-mini-label">待办总数</div> |
|
|
|
|
|
|
|
|
<div class="kpi-mini-card kpi-blue" :title="$t('todo.kpi.totalTitle')"> |
|
|
|
|
|
<div class="kpi-mini-label">{{ $t('todo.kpi.total') }}</div> |
|
|
<div class="kpi-mini-value">{{ totalPage }}</div> |
|
|
<div class="kpi-mini-value">{{ totalPage }}</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="kpi-mini-card kpi-green" title="当前页待办数量"> |
|
|
|
|
|
<div class="kpi-mini-label">当前页</div> |
|
|
|
|
|
|
|
|
<div class="kpi-mini-card kpi-green" :title="$t('todo.kpi.currentPageTitle')"> |
|
|
|
|
|
<div class="kpi-mini-label">{{ $t('todo.kpi.currentPage') }}</div> |
|
|
<div class="kpi-mini-value">{{ dataList.length }}</div> |
|
|
<div class="kpi-mini-value">{{ dataList.length }}</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="kpi-mini-card kpi-orange" title="当前页被驳回数量"> |
|
|
|
|
|
<div class="kpi-mini-label">被驳回</div> |
|
|
|
|
|
|
|
|
<div class="kpi-mini-card kpi-orange" :title="$t('todo.kpi.rejectedTitle')"> |
|
|
|
|
|
<div class="kpi-mini-label">{{ $t('todo.kpi.rejected') }}</div> |
|
|
<div class="kpi-mini-value">{{ rejectedCount }}</div> |
|
|
<div class="kpi-mini-value">{{ rejectedCount }}</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -112,7 +112,7 @@ |
|
|
@click="handleClick(item)"> |
|
|
@click="handleClick(item)"> |
|
|
<div class="todo-card-head"> |
|
|
<div class="todo-card-head"> |
|
|
<div class="risk-tag" :class="{ high: isRejected(item) }"> |
|
|
<div class="risk-tag" :class="{ high: isRejected(item) }"> |
|
|
{{ isRejected(item) ? '驳回' : (item.documentTypeDesc || '待办') }} |
|
|
|
|
|
|
|
|
{{ isRejected(item) ? $t('todo.card.reject') : (item.documentTypeDesc || $t('todo.card.todo')) }} |
|
|
</div> |
|
|
</div> |
|
|
<div class="todo-code" :title="item.displayNo"> |
|
|
<div class="todo-code" :title="item.displayNo"> |
|
|
<el-link type="primary" :underline="false" @click.native.stop="handleClick(item)"> |
|
|
<el-link type="primary" :underline="false" @click.native.stop="handleClick(item)"> |
|
|
@ -120,7 +120,7 @@ |
|
|
</el-link> |
|
|
</el-link> |
|
|
</div> |
|
|
</div> |
|
|
<el-tag size="mini" :type="statusType(item)"> |
|
|
<el-tag size="mini" :type="statusType(item)"> |
|
|
{{ item.documentStatus || '审批中' }} |
|
|
|
|
|
|
|
|
{{ statusLabel(item) }} |
|
|
</el-tag> |
|
|
</el-tag> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -133,41 +133,41 @@ |
|
|
{{ item.nodeName || '-' }} |
|
|
{{ item.nodeName || '-' }} |
|
|
</div> |
|
|
</div> |
|
|
<div class="todo-process-metrics" v-if="item.revisionNo || item.workflowId"> |
|
|
<div class="todo-process-metrics" v-if="item.revisionNo || item.workflowId"> |
|
|
<div class="todo-process-chip" v-if="item.revisionNo" :title="'版本 ' + item.revisionNo"> |
|
|
|
|
|
|
|
|
<div class="todo-process-chip" v-if="item.revisionNo" :title="$t('todo.card.revisionPrefix') + item.revisionNo"> |
|
|
V{{ item.revisionNo }} |
|
|
V{{ item.revisionNo }} |
|
|
</div> |
|
|
</div> |
|
|
<div class="todo-rate-chip" v-if="item.workflowId" :title="'流程ID ' + item.workflowId"> |
|
|
|
|
|
|
|
|
<div class="todo-rate-chip" v-if="item.workflowId" :title="$t('todo.field.workflowId') + ' ' + item.workflowId"> |
|
|
{{ item.workflowId }} |
|
|
{{ item.workflowId }} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="todo-detail-line"> |
|
|
<div class="todo-detail-line"> |
|
|
<span class="label">单据类型</span> |
|
|
|
|
|
|
|
|
<span class="label">{{ $t('todo.field.documentType') }}</span> |
|
|
<span class="value" :title="item.documentTypeDesc">{{ item.documentTypeDesc || '-' }}</span> |
|
|
<span class="value" :title="item.documentTypeDesc">{{ item.documentTypeDesc || '-' }}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="todo-detail-line"> |
|
|
<div class="todo-detail-line"> |
|
|
<span class="label">当前节点</span> |
|
|
|
|
|
|
|
|
<span class="label">{{ $t('todo.field.currentNode') }}</span> |
|
|
<span class="value" :title="nodeLabel(item)">{{ nodeLabel(item) }}</span> |
|
|
<span class="value" :title="nodeLabel(item)">{{ nodeLabel(item) }}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="todo-detail-line"> |
|
|
<div class="todo-detail-line"> |
|
|
<span class="label">流程创建人</span> |
|
|
|
|
|
|
|
|
<span class="label">{{ $t('todo.field.createBy') }}</span> |
|
|
<span class="value" :title="item.createBy">{{ item.createBy || '-' }}</span> |
|
|
<span class="value" :title="item.createBy">{{ item.createBy || '-' }}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="todo-detail-line"> |
|
|
<div class="todo-detail-line"> |
|
|
<span class="label">当前审批人</span> |
|
|
|
|
|
|
|
|
<span class="label">{{ $t('todo.field.currentApprover') }}</span> |
|
|
<span class="value" :title="item.updateBy">{{ item.updateBy || '-' }}</span> |
|
|
<span class="value" :title="item.updateBy">{{ item.updateBy || '-' }}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="todo-detail-line" v-if="isRejected(item) || item.rejectOpinion"> |
|
|
<div class="todo-detail-line" v-if="isRejected(item) || item.rejectOpinion"> |
|
|
<span class="label">驳回意见</span> |
|
|
|
|
|
|
|
|
<span class="label">{{ $t('todo.field.rejectOpinion') }}</span> |
|
|
<span class="value" :title="item.rejectOpinion">{{ item.rejectOpinion || '-' }}</span> |
|
|
<span class="value" :title="item.rejectOpinion">{{ item.rejectOpinion || '-' }}</span> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="todo-step-row"> |
|
|
<div class="todo-step-row"> |
|
|
<div class="step-item done">发起</div> |
|
|
|
|
|
<div class="step-item done">审批中</div> |
|
|
|
|
|
|
|
|
<div class="step-item done">{{ $t('todo.card.start') }}</div> |
|
|
|
|
|
<div class="step-item done">{{ $t('todo.card.inApproval') }}</div> |
|
|
<div class="step-item" :class="{ danger: isRejected(item) }"> |
|
|
<div class="step-item" :class="{ danger: isRejected(item) }"> |
|
|
{{ isRejected(item) ? '已驳回' : '待处理' }} |
|
|
|
|
|
|
|
|
{{ isRejected(item) ? $t('todo.card.rejected') : $t('todo.card.pending') }} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -180,7 +180,7 @@ |
|
|
plain |
|
|
plain |
|
|
native-type="button" |
|
|
native-type="button" |
|
|
@click.native.stop="handleClick(item)"> |
|
|
@click.native.stop="handleClick(item)"> |
|
|
处理 |
|
|
|
|
|
|
|
|
{{ $t('todo.common.handle') }} |
|
|
</el-button> |
|
|
</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -188,7 +188,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div v-else class="todo-empty"> |
|
|
<div v-else class="todo-empty"> |
|
|
暂无待办数据 |
|
|
|
|
|
|
|
|
{{ $t('todo.message.empty') }} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -217,8 +217,8 @@ export default { |
|
|
searchExpanded: true, |
|
|
searchExpanded: true, |
|
|
exportLoading: false, |
|
|
exportLoading: false, |
|
|
exportData: [], |
|
|
exportData: [], |
|
|
exportName: '我的待办' + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
|
|
|
exportHeader: ['我的待办'], |
|
|
|
|
|
|
|
|
exportName: '', |
|
|
|
|
|
exportHeader: [], |
|
|
exportFooter: [], |
|
|
exportFooter: [], |
|
|
exportList: [], |
|
|
exportList: [], |
|
|
pageIndex: 1, |
|
|
pageIndex: 1, |
|
|
@ -241,19 +241,19 @@ export default { |
|
|
}, |
|
|
}, |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
columnList: [ |
|
|
columnList: [ |
|
|
{ columnProp: 'documentTypeDesc', columnLabel: '单据类型' }, |
|
|
|
|
|
{ columnProp: 'displayNo', columnLabel: '单据号' }, |
|
|
|
|
|
{ columnProp: 'revisionNo', columnLabel: '版本号' }, |
|
|
|
|
|
{ columnProp: 'documentStatus', columnLabel: '单据状态' }, |
|
|
|
|
|
{ columnProp: 'workflowId', columnLabel: '流程ID' }, |
|
|
|
|
|
{ columnProp: 'workflowName', columnLabel: '流程名称' }, |
|
|
|
|
|
{ columnProp: 'nodeId', columnLabel: '当前节点ID' }, |
|
|
|
|
|
{ columnProp: 'nodeName', columnLabel: '当前节点名称' }, |
|
|
|
|
|
{ columnProp: 'rejectFlagDesc', columnLabel: '是否被驳回' }, |
|
|
|
|
|
{ columnProp: 'rejectOpinion', columnLabel: '驳回意见' }, |
|
|
|
|
|
{ columnProp: 'createBy', columnLabel: '流程创建人' }, |
|
|
|
|
|
{ columnProp: 'createDate', columnLabel: '流程创建时间' }, |
|
|
|
|
|
{ columnProp: 'updateBy', columnLabel: '当前节点审批人' } |
|
|
|
|
|
|
|
|
{ columnProp: 'documentTypeDesc', columnLabel: 'todo.field.documentType' }, |
|
|
|
|
|
{ columnProp: 'displayNo', columnLabel: 'todo.field.documentNo' }, |
|
|
|
|
|
{ columnProp: 'revisionNo', columnLabel: 'todo.field.revisionNo' }, |
|
|
|
|
|
{ columnProp: 'documentStatus', columnLabel: 'todo.field.documentStatus' }, |
|
|
|
|
|
{ columnProp: 'workflowId', columnLabel: 'todo.field.workflowId' }, |
|
|
|
|
|
{ columnProp: 'workflowName', columnLabel: 'todo.field.workflowName' }, |
|
|
|
|
|
{ columnProp: 'nodeId', columnLabel: 'todo.field.nodeId' }, |
|
|
|
|
|
{ columnProp: 'nodeName', columnLabel: 'todo.field.nodeName' }, |
|
|
|
|
|
{ columnProp: 'rejectFlagDesc', columnLabel: 'todo.field.rejectFlagDesc' }, |
|
|
|
|
|
{ columnProp: 'rejectOpinion', columnLabel: 'todo.field.rejectOpinion' }, |
|
|
|
|
|
{ columnProp: 'createBy', columnLabel: 'todo.field.createBy' }, |
|
|
|
|
|
{ columnProp: 'createDate', columnLabel: 'todo.field.createDate' }, |
|
|
|
|
|
{ columnProp: 'updateBy', columnLabel: 'todo.field.updateBy' } |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -263,6 +263,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created () { |
|
|
created () { |
|
|
|
|
|
this.refreshExportMeta() |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
@ -348,6 +349,20 @@ export default { |
|
|
} |
|
|
} |
|
|
return 'info' |
|
|
return 'info' |
|
|
}, |
|
|
}, |
|
|
|
|
|
statusLabel (item) { |
|
|
|
|
|
const status = item && item.documentStatus ? String(item.documentStatus) : '' |
|
|
|
|
|
if (status === '已完成') { |
|
|
|
|
|
return this.$t('todo.option.statusDone') |
|
|
|
|
|
} |
|
|
|
|
|
if (status === '草稿') { |
|
|
|
|
|
return this.$t('todo.option.statusDraft') |
|
|
|
|
|
} |
|
|
|
|
|
return this.$t('todo.option.statusInApproval') |
|
|
|
|
|
}, |
|
|
|
|
|
refreshExportMeta () { |
|
|
|
|
|
this.exportName = this.$t('todo.export.filePrefix') + this.dayjs().format('YYYYMMDDHHmmss') |
|
|
|
|
|
this.exportHeader = [this.$t('todo.export.header')] |
|
|
|
|
|
}, |
|
|
nodeLabel (item) { |
|
|
nodeLabel (item) { |
|
|
if (!item) { |
|
|
if (!item) { |
|
|
return '-' |
|
|
return '-' |
|
|
@ -375,6 +390,7 @@ export default { |
|
|
return this.exportList |
|
|
return this.exportList |
|
|
}, |
|
|
}, |
|
|
startDownload () { |
|
|
startDownload () { |
|
|
|
|
|
this.refreshExportMeta() |
|
|
this.exportLoading = true |
|
|
this.exportLoading = true |
|
|
}, |
|
|
}, |
|
|
finishDownload () { |
|
|
finishDownload () { |
|
|
@ -383,7 +399,7 @@ export default { |
|
|
fields () { |
|
|
fields () { |
|
|
const map = {} |
|
|
const map = {} |
|
|
this.columnList.forEach(item => { |
|
|
this.columnList.forEach(item => { |
|
|
map[item.columnLabel] = item.columnProp |
|
|
|
|
|
|
|
|
map[this.$t(item.columnLabel)] = item.columnProp |
|
|
}) |
|
|
}) |
|
|
return map |
|
|
return map |
|
|
}, |
|
|
}, |
|
|
@ -407,7 +423,9 @@ export default { |
|
|
} |
|
|
} |
|
|
const target = routeMap[documentType] |
|
|
const target = routeMap[documentType] |
|
|
if (!target) { |
|
|
if (!target) { |
|
|
this.$message.warning('暂不支持该单据类型的处理跳转:' + (row.documentTypeDesc || documentType || '未知')) |
|
|
|
|
|
|
|
|
this.$message.warning(this.$t('todo.message.jumpNotSupported', { |
|
|
|
|
|
type: row.documentTypeDesc || documentType || this.$t('todo.message.unknownType') |
|
|
|
|
|
})) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.pushTodoRoute(target.name, target.params) |
|
|
this.pushTodoRoute(target.name, target.params) |
|
|
@ -416,7 +434,9 @@ export default { |
|
|
const resolved = this.$router.resolve({ name: name }) |
|
|
const resolved = this.$router.resolve({ name: name }) |
|
|
const route = resolved && (resolved.route || resolved.resolved) |
|
|
const route = resolved && (resolved.route || resolved.resolved) |
|
|
if (!route || route.name !== name) { |
|
|
if (!route || route.name !== name) { |
|
|
this.$alert('权限不足,访问失败', '警告', { confirmButtonText: '确定' }) |
|
|
|
|
|
|
|
|
this.$alert(this.$t('todo.message.permissionDenied'), this.$t('todo.common.warning'), { |
|
|
|
|
|
confirmButtonText: this.$t('todo.common.confirm') |
|
|
|
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.$router.push({ |
|
|
this.$router.push({ |
|
|
@ -425,7 +445,7 @@ export default { |
|
|
query: params || {} |
|
|
query: params || {} |
|
|
}, () => {}, (err) => { |
|
|
}, () => {}, (err) => { |
|
|
if (err && err.name !== 'NavigationDuplicated') { |
|
|
if (err && err.name !== 'NavigationDuplicated') { |
|
|
this.$message.warning((err && err.message) || '页面打开失败') |
|
|
|
|
|
|
|
|
this.$message.warning((err && err.message) || this.$t('todo.message.openFailed')) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|