|
|
@@ -48,8 +48,9 @@
|
|
|
<ModifyRecord :data="scope.row" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="140" fixed="right" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column label="操作" width="210" fixed="right" align="center" show-overflow-tooltip>
|
|
|
<template #default="scope">
|
|
|
+ <el-button icon="ele-CopyDocument" size="small" text type="primary" @click="openCopyOrg(scope.row)" v-auth="'sysOrg:update'"> 复制 </el-button>
|
|
|
<el-button icon="ele-Edit" size="small" text type="primary" @click="openEditOrg(scope.row)" v-auth="'sysOrg:update'"> 编辑 </el-button>
|
|
|
<el-button icon="ele-Delete" size="small" text type="danger" @click="delOrg(scope.row)" v-auth="'sysOrg:delete'"> 删除 </el-button>
|
|
|
</template>
|
|
|
@@ -75,7 +76,7 @@ import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
|
|
|
|
|
import { getAPI } from '/@/utils/axios-utils';
|
|
|
import { SysOrgApi, SysDictDataApi } from '/@/api-services/api';
|
|
|
-import { SysOrg } from '/@/api-services/models';
|
|
|
+import { SysOrg, UpdateOrgInput } from '/@/api-services/models';
|
|
|
|
|
|
const editOrgRef = ref<InstanceType<typeof EditOrg>>();
|
|
|
const orgTreeRef = ref<InstanceType<typeof OrgTree>>();
|
|
|
@@ -134,6 +135,15 @@ const openAddOrg = () => {
|
|
|
editOrgRef.value?.openDialog({ status: 1, orderNo: 100 });
|
|
|
};
|
|
|
|
|
|
+// 打开复制页面
|
|
|
+const openCopyOrg = (row: any) => {
|
|
|
+ state.editOrgTitle = '复制菜单';
|
|
|
+ var copyRow = JSON.parse(JSON.stringify(row)) as UpdateOrgInput;
|
|
|
+ copyRow.id = 0;
|
|
|
+ copyRow.name = "";
|
|
|
+ editOrgRef.value?.openDialog(copyRow);
|
|
|
+};
|
|
|
+
|
|
|
// 打开编辑页面
|
|
|
const openEditOrg = (row: any) => {
|
|
|
state.editOrgTitle = '编辑机构';
|