|
|
|
|
@ -18,9 +18,17 @@ |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
@sort-change="sortChange" |
|
|
|
|
:permission="permissionList" |
|
|
|
|
> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<el-button type="danger" plain @click="handleDelete()">删除</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
plain |
|
|
|
|
v-if="permission.processCapability_del" |
|
|
|
|
@click="handleDelete()" |
|
|
|
|
>删除</el-button |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template #menu-right> |
|
|
|
|
@ -36,9 +44,22 @@ |
|
|
|
|
value: 'dictKey', |
|
|
|
|
}" |
|
|
|
|
style="width: 200px; margin-right: 12px" |
|
|
|
|
v-if="permission.processCapability_batchSettings" |
|
|
|
|
></avue-select> |
|
|
|
|
<el-button type="primary" @click="batchSet()">批量设置</el-button> |
|
|
|
|
<el-button type="primary" @click="handleImport">导入</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
v-if="permission.processCapability_batchSettings" |
|
|
|
|
@click="batchSet()" |
|
|
|
|
> |
|
|
|
|
批量设置 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
v-if="permission.processCapability_import" |
|
|
|
|
@click="handleImport" |
|
|
|
|
> |
|
|
|
|
导入 |
|
|
|
|
</el-button> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
@ -326,10 +347,9 @@ export default { |
|
|
|
|
...mapGetters(['userInfo', 'permission']), |
|
|
|
|
permissionList() { |
|
|
|
|
return { |
|
|
|
|
addBtn: this.validData(this.permission.menu_add, false), |
|
|
|
|
viewBtn: this.validData(this.permission.menu_view, false), |
|
|
|
|
delBtn: this.validData(this.permission.menu_delete, false), |
|
|
|
|
editBtn: this.validData(this.permission.menu_edit, false), |
|
|
|
|
addBtn: this.validData(this.permission.processCapability_add, false), |
|
|
|
|
delBtn: this.validData(this.permission.processCapability_del, false), |
|
|
|
|
editBtn: this.validData(this.permission.processCapability_edit, false), |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
ids() { |
|
|
|
|
@ -563,6 +583,20 @@ export default { |
|
|
|
|
|
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
// 排序 |
|
|
|
|
sortChange({ prop, order }) { |
|
|
|
|
if (!prop) { |
|
|
|
|
// 如果取消排序,清空排序参数 |
|
|
|
|
this.query.orderByField = undefined; |
|
|
|
|
this.query.isAsc = undefined; |
|
|
|
|
} else { |
|
|
|
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
|
|
|
|
this.query.orderByField = orderByField; |
|
|
|
|
this.query.isAsc = order === 'ascending' ? true : false; |
|
|
|
|
} |
|
|
|
|
// 重新加载数据 |
|
|
|
|
this.onLoad(); |
|
|
|
|
}, |
|
|
|
|
// 加载页面数据 |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
|