This commit is contained in:
qsh
2024-07-26 17:51:35 +08:00
parent b2a7fa8dc4
commit 2be616917e
13 changed files with 424 additions and 25 deletions

View File

@@ -62,6 +62,11 @@
<el-table-column :show-overflow-tooltip="true" label="组件路径" prop="component" />
<el-table-column :show-overflow-tooltip="true" label="组件名称" prop="componentName" />
<el-table-column label="状态" prop="status" width="80" />
<el-table-column label="服务类型" prop="" width="100">
<template #default="{ row }">
{{ getServiceName(row.serviceId) }}
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template #default="scope">
<el-button link type="primary" @click="openForm('update', scope.row.id)">
@@ -77,7 +82,7 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<MenuForm ref="formRef" @success="getList" />
<MenuForm ref="formRef" :appList="appList" @success="getList" />
</template>
<script lang="ts" name="SystemMenu" setup>
import { handleTree } from '@/utils/tree'
@@ -160,8 +165,20 @@ const handleDelete = async (id: number) => {
} catch {}
}
const appList = ref([] as any)
const getOptions = () => {
MenuApi.getServiceAppList().then((data) => {
appList.value = data
})
}
function getServiceName(serviceId: any) {
return appList.value.find((it: any) => it.serviceId == serviceId)?.serviceName
}
/** 初始化 **/
onMounted(() => {
getOptions()
getList()
})
</script>