hsy
2 天以前 92a680303503cf2cbc5fcd584f09fe0d29a71524
src/views/mes/process-design/parameter/index.vue
@@ -2,7 +2,7 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesPdParameterApi } from '#/api/mes/pro/processdesign/parameter';
import { Page, useVbenModal } from '../../../../packages/effects/common-ui/src';
import { Page, useVbenModal } from '@vben/common-ui';
import { Button, message } from 'ant-design-vue';
@@ -13,19 +13,32 @@
  exportParameterExcel,
} from '#/api/mes/pro/processdesign/parameter';
import { $t } from '#/locales';
import { downloadFileFromBlobPart } from '../../../../packages/utils/src';
import { downloadFileFromBlobPart } from '@vben/utils';
import { useGridColumns, useGridFormSchema } from './data';
import Form from './modules/form.vue';
import ProcessLinkDialog from './modules/process-link-dialog.vue';
const [FormModal, formModalApi] = useVbenModal({
  connectedComponent: Form,
  destroyOnClose: true,
});
const [ProcessLinkModal, processLinkModalApi] = useVbenModal({
  connectedComponent: ProcessLinkDialog,
  destroyOnClose: true,
});
/** 刷新表格 */
function handleRefresh() {
  gridApi.query();
}
/** 查看该参数被哪些工序绑定 */
function handleViewProcessLink(row: MesPdParameterApi.Parameter) {
  processLinkModalApi
    .setData({ paramId: row.id, paramName: row.paramName })
    .open();
}
/** 创建工艺参数 */
@@ -98,6 +111,7 @@
<template>
  <Page auto-content-height><FormModal @success="handleRefresh" />
    <ProcessLinkModal />
    <Grid table-title="工艺参数列表">
      <template #toolbar-tools>
        <TableAction
@@ -126,6 +140,13 @@
        <TableAction
          :actions="[
            {
              label: '关联工序',
              type: 'link',
              icon: ACTION_ICON.LINK,
              auth: ['mes:pd:parameter:update'],
              onClick: handleViewProcessLink.bind(null, row),
            },
            {
              label: $t('common.edit'),
              type: 'link',
              icon: ACTION_ICON.EDIT,