From ea9d117374e44d9eac0309ea2687b439f89b07b4 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期三, 16 九月 2026 17:45:16 +0800
Subject: [PATCH] feat(mes): 生产排产新增任务报工人下拉源调整为工作站人力配置
---
src/views/system/approvalConfig/index.vue | 93 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 93 insertions(+), 0 deletions(-)
diff --git a/src/views/system/approvalConfig/index.vue b/src/views/system/approvalConfig/index.vue
new file mode 100644
index 0000000..c2a3e96
--- /dev/null
+++ b/src/views/system/approvalConfig/index.vue
@@ -0,0 +1,93 @@
+<script lang="ts" setup>
+ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+ import type { SystemApprovalConfigApi } from '#/api/system/approval-config';
+
+ import { Page, useVbenModal } from '@vben/common-ui';
+
+ import { Tag } from 'ant-design-vue';
+
+ import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
+ import { getApprovalConfigPage } from '#/api/system/approval-config';
+
+ import { useGridColumns, useGridFormSchema } from './data';
+ import ConfigForm from './modules/config-form.vue';
+
+ defineOptions({ name: 'SystemApprovalConfig' });
+
+ const [ConfigFormModal, configFormModalApi] = useVbenModal({
+ connectedComponent: ConfigForm,
+ destroyOnClose: true,
+ });
+
+ /** 鍒锋柊琛ㄦ牸 */
+ function handleRefresh() {
+ gridApi.query();
+ }
+
+ /** 閰嶇疆瀹℃壒浜� */
+ function handleConfig(row: SystemApprovalConfigApi.ApprovalConfig) {
+ configFormModalApi.setData(row).open();
+ }
+
+ const [Grid, gridApi] = useVbenVxeGrid({
+ formOptions: {
+ schema: useGridFormSchema(),
+ },
+ gridOptions: {
+ columns: useGridColumns(),
+ height: 'auto',
+ keepSource: true,
+ proxyConfig: {
+ ajax: {
+ query: async ({ page }, formValues) =>
+ await getApprovalConfigPage({
+ pageNo: page.currentPage,
+ pageSize: page.pageSize,
+ ...formValues,
+ }),
+ },
+ },
+ rowConfig: {
+ keyField: 'id',
+ isHover: true,
+ },
+ toolbarConfig: {
+ refresh: true,
+ search: true,
+ },
+ } as VxeTableGridOptions<SystemApprovalConfigApi.ApprovalConfig>,
+ });
+</script>
+
+<template>
+ <Page auto-content-height>
+ <ConfigFormModal @success="handleRefresh" />
+
+ <Grid table-title="瀹℃壒閰嶇疆">
+ <template #approvalEnabled="{ row }">
+ <Tag :color="row.approvalEnabled ? 'success' : 'default'">
+ {{ row.approvalEnabled ? '宸插惎鐢�' : '鏈惎鐢�' }}
+ </Tag>
+ </template>
+ <template #userNames="{ row }">
+ <span v-if="row.userNames && row.userNames.length > 0">
+ {{ row.userNames.join('銆�') }}
+ </span>
+ <span v-else class="text-gray-400">鏈厤缃�</span>
+ </template>
+ <template #actions="{ row }">
+ <TableAction
+ :actions="[
+ {
+ label: '閰嶇疆瀹℃壒浜�',
+ type: 'link',
+ icon: ACTION_ICON.EDIT,
+ auth: ['system:approval-config:update'],
+ onClick: handleConfig.bind(null, row),
+ },
+ ]"
+ />
+ </template>
+ </Grid>
+ </Page>
+</template>
--
Gitblit v1.9.3