build : 按钮权限区分
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
</el-form>
|
||||
<div class="oper-page-btn" v-if="processInstanceData.taskId">
|
||||
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||
<el-button @click="handleReject">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
||||
</div>
|
||||
|
||||
@@ -71,7 +71,7 @@ const tableConfig = reactive({
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
width:200,
|
||||
width: 200,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||
},
|
||||
@@ -81,12 +81,27 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
if (row.state === '3' || row.state === '2') {
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleDel(row), type: 'danger'})
|
||||
}else if (row.state === '4'){
|
||||
btn.push({label: '上报', func: () => handleReport(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDetail(row)}>详情
|
||||
</el-button>
|
||||
<el-button type="primary" link onClick={() => handleEdit(row)}>编辑</el-button>
|
||||
<el-button type="primary" link onClick={() => handleReport(row)}>上报</el-button>
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<template v-else-if="showAvatar">
|
||||
<span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span>
|
||||
|
||||
<avatar-ellipsis :row="3" v-if="userInfo.length > 0" :mode="mode" :user-info="userInfo"/>
|
||||
<avatar-ellipsis :row="3" v-if="userInfo.length > 0" :user-info="userInfo"/>
|
||||
|
||||
|
||||
<!-- <div v-else v-for="item in userInfo" class="circle-user">-->
|
||||
|
||||
Reference in New Issue
Block a user