提交 b43364fc authored 作者: 张耀丹's avatar 张耀丹

系统管理=》按钮权限

上级 737d51e0
......@@ -4,7 +4,7 @@
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" v-auth="'dkdc-dsl-sl'">新增</a-button>
<a-button type="primary" @click="handleAdd" v-auth="'jdgldw-add'">新增</a-button>
<!-- <a-button type="primary" @click="handleAdd" v-auth="'dkdc-dsl-sl'">受理</a-button> -->
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> -->
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
......@@ -118,16 +118,19 @@ function handleSuccess({ isUpdate, values }) {
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'jdgldw-edit',
},
{
label: '删除',
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'jdgldw-delete',
},
];
}
......
......@@ -4,7 +4,7 @@
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" v-auth="'dkdc-dsl-sl'">新增</a-button>
<a-button type="primary" @click="handleAdd" v-auth="'jdglyh-add'">新增</a-button>
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> -->
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
</template>
......@@ -116,16 +116,19 @@ function handleSuccess({ isUpdate, values }) {
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'jdglyh-edit'
},
{
label: '删除',
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'jdglyh-delete'
},
];
}
......
......@@ -4,7 +4,7 @@
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" v-auth="'dkdc-dsl-sl'">新增</a-button>
<a-button type="primary" @click="handleAdd" v-auth="'psjgry:add'">新增</a-button>
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> -->
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
</template>
......@@ -116,16 +116,19 @@ function handleSuccess({ isUpdate, values }) {
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'psjgry:edit'
},
{
label: '删除',
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'psjgry:delete'
},
];
}
......
......@@ -5,7 +5,7 @@
<!--插槽:table标题-->
<template #tableTitle>
<!-- v-auth="" -->
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="primary" @click="handleAdd" v-auth="'reviewOrg:add'">新增</a-button>
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> -->
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
</template>
......@@ -116,16 +116,19 @@ function handleSuccess({ isUpdate, values }) {
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'reviewOrg:edit',
},
{
label: '删除',
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'reviewOrg:delete',
},
];
}
......
......@@ -2,12 +2,12 @@
<a-card :bordered="false" style="height: 100%">
<template #extra>
<!-- <a-space style="margin-bottom: 10px;" size="Small"> -->
<a-button type="primary" preIcon="ant-design:plus-outlined" style="margin-right: 10px;"
<a-button v-auth="'system:xzCode:add'" type="primary" preIcon="ant-design:plus-outlined" style="margin-right: 10px;"
@click="handleCreate">新增</a-button>
<!-- <a-button preIcon="ant-design:edit-outlined" style="margin-right: 10px;" @click="handleEdit">修改</a-button> -->
<a-button preIcon="ant-design:redo-outlined" style="margin-right: 10px;" @click="loadRootTreeData">刷新</a-button>
<a-button v-auth="'system:xzCode:refresh'" preIcon="ant-design:redo-outlined" style="margin-right: 10px;" @click="loadRootTreeData">刷新</a-button>
<a-popconfirm title="确定要删除该条数据吗?" ok-text="确定" cancel-text="取消" @confirm="deleteTree">
<a-button danger preIcon="ant-design:delete-outlined" style="margin-right: 10px;">删除</a-button>
<a-button v-auth="'system:xzCode:delete'" danger preIcon="ant-design:delete-outlined" style="margin-right: 10px;">删除</a-button>
</a-popconfirm>
<!-- </a-space> -->
</template>
......@@ -58,6 +58,9 @@ const searchKeyword = ref('');
*/
function handleCreate() {
openModal(true, {
record: {
pid: treeData.value[0]?.id,
},
isUpdate: false,
});
}
......
......@@ -41,7 +41,7 @@
required: true,
},
{
label: '行政区划',
label: '上级行政区划',
field: 'pid',
component: 'JTreeSelect',
componentProps: {
......
......@@ -89,10 +89,12 @@ function getTableAction(record) {
title: '是否确认删除',
confirm: handleDel.bind(null, record),
},
auth: 'system:xzCode:delete',
},
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'system:xzCode:edit',
},
];
}
......
......@@ -3,7 +3,7 @@
<!--引用表格-->
<BasicTable @register="registerTable">
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<a-button type="primary" v-auth="'xchsqk:export'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
</template>
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论