This commit is contained in:
qsh
2024-09-02 17:02:43 +08:00
parent f7980cf66a
commit 735d638b49
7 changed files with 302 additions and 162 deletions

View File

@@ -25,7 +25,7 @@
<el-table-column prop="sort" label="排序" width="200" />
<el-table-column prop="status" label="状态" width="100" />
<el-table-column label="创建时间" prop="createTime" width="180" :formatter="dateFormatter" />
<el-table-column label="操作" class-name="fixed-width" width="160">
<el-table-column label="操作" class-name="fixed-width" width="240">
<template #default="scope">
<el-button
link
@@ -35,6 +35,14 @@
>
修改
</el-button>
<el-button
link
type="primary"
@click="openTarget(scope.row.id)"
v-hasPermi="['basic:dept:update']"
>
业绩指标
</el-button>
<el-button
link
type="danger"
@@ -49,11 +57,13 @@
<!-- 表单弹窗添加/修改 -->
<DeptForm ref="formRef" @success="getList" />
<DialogTarget ref="targetDialogRef" @success="getList" />
</template>
<script setup lang="ts" name="SystemDept">
import { handleTree } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
import DeptForm from './DeptForm.vue'
import DialogTarget from './DialogTarget.vue'
import { dateFormatter } from '@/utils/formatTime'
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
@@ -93,6 +103,11 @@ const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
const targetDialogRef = ref()
const openTarget = (id: number) => {
targetDialogRef.value.open(id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {