|
|
@ -269,16 +269,19 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<div v-if="option.rowButtons.length <= 2">
|
|
|
|
<div v-if="option.rowButtons.length <= 2">
|
|
|
|
<el-button
|
|
|
|
<template v-for="(item, index) in option.rowButtons">
|
|
|
|
v-for="(item, index) in option.rowButtons"
|
|
|
|
<el-button
|
|
|
|
:key="index"
|
|
|
|
v-if="isHide(item, scope.row)"
|
|
|
|
v-permission="item.permission"
|
|
|
|
:key="index"
|
|
|
|
:disabled="isDisabledButton(item, scope.row)"
|
|
|
|
v-permission="item.permission"
|
|
|
|
:type="item.type || 'text'"
|
|
|
|
:disabled="isDisabledButton(item, scope.row)"
|
|
|
|
size="small"
|
|
|
|
:type="item.type || 'text'"
|
|
|
|
@click="item.click(scope.row)"
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
@click="item.click(scope.row)"
|
|
|
|
>{{ handlegetLable(scope.row, item.label) }}</el-button
|
|
|
|
>{{ handlegetLable(scope.row, item.label) }}</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
|
|
|
<div v-else>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -299,20 +302,22 @@
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-item class="clearfix">
|
|
|
|
<el-dropdown-item class="clearfix">
|
|
|
|
<el-button
|
|
|
|
<template v-for="(item, index) in option.rowButtons.filter(
|
|
|
|
v-for="(item, index) in option.rowButtons.filter(
|
|
|
|
|
|
|
|
(el, index) => index > 0
|
|
|
|
(el, index) => index > 0
|
|
|
|
)"
|
|
|
|
)">
|
|
|
|
:key="index"
|
|
|
|
<el-button
|
|
|
|
v-permission="item.permission"
|
|
|
|
v-if="isHide(item, scope.row)"
|
|
|
|
:type="item.type || 'text'"
|
|
|
|
:key="index"
|
|
|
|
:disabled="isDisabledButton(item, scope.row)"
|
|
|
|
v-permission="item.permission"
|
|
|
|
size="small"
|
|
|
|
:type="item.type || 'text'"
|
|
|
|
@click="item.click(scope.row)"
|
|
|
|
:disabled="isDisabledButton(item, scope.row)"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
@click="item.click(scope.row)"
|
|
|
|
>{{
|
|
|
|
>{{
|
|
|
|
handlegetLable(scope.row, item.label)
|
|
|
|
handlegetLable(scope.row, item.label)
|
|
|
|
}}</el-button
|
|
|
|
}}</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</el-dropdown-item>
|
|
|
|
</el-dropdown-item>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown>
|
|
|
|
</el-dropdown>
|
|
|
@ -665,6 +670,14 @@ export default {
|
|
|
|
return !!item.disabled;
|
|
|
|
return !!item.disabled;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 是否显示
|
|
|
|
|
|
|
|
isHide(item, row) {
|
|
|
|
|
|
|
|
if (typeof item.isHide === "function") {
|
|
|
|
|
|
|
|
return item.isHide(row);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return !item.isHide;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
// 弹框被关闭时的回调事件
|
|
|
|
// 弹框被关闭时的回调事件
|
|
|
|
editDialogClosedEvent(value) {
|
|
|
|
editDialogClosedEvent(value) {
|
|
|
|
// 把列表页中弹框打开标记改成已关闭
|
|
|
|
// 把列表页中弹框打开标记改成已关闭
|
|
|
|