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