This commit is contained in:
2025-11-29 01:14:09 +08:00
parent 44dbcb48a6
commit bfa83f42a8
7 changed files with 153 additions and 180 deletions

View File

@@ -50,6 +50,7 @@
maxlength: 52,
},
required: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('需求编号'),
@@ -59,21 +60,62 @@
maxlength: 24,
},
},
{
label: t('项目区域'),
field: 'areaCode',
component: 'Input',
componentProps: {
maxlength: 152,
},
required: true,
},
{
label: t('项目区域'),
field: 'areaCode',
fieldLabel: 'provinceName',
component: 'ListSelect',
componentProps: {
selectType: 'bizProvSelect',
},
required: true,
},
{
label: t('项目名称'),
field: 'projectId',
fieldLabel: 'projectName',
component: 'ListSelect',
componentProps: {
selectType: 'bizProjectSelect',
},
required: true,
},
{
label: t('需求人员'),
field: 'employeeId',
fieldLabel: 'employeeName',
component: 'ListSelect',
componentProps: {
selectType: 'bizEmpSelect',
},
required: true,
},
{
label: t('需求描述'),
field: 'requirementDescription',
component: 'Input',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
},
{
label: t('优先等级'),
field: 'priority',
component: 'Select',
componentProps: {
dictType: 'priority',
allowClear: true,
},
required: true,
},
{
label: t('需求状态'),
field: 'requirementsStatus',
component: 'Select',
componentProps: {
dictType: 'requirements_status',
allowClear: true,
},
required: true,
},
{
label: t('开始时间'),
field: 'startTime',
@@ -92,55 +134,15 @@
showTime: { format: 'HH:mm' },
},
},
{
label: t('优先级'),
field: 'priority',
component: 'Select',
componentProps: {
dictType: '',
allowClear: true,
},
required: true,
},
{
label: t('项目ID'),
field: 'projectId',
component: 'Select',
componentProps: {
dictType: '',
allowClear: true,
},
required: true,
},
{
label: t('用户ID'),
field: 'employeeId',
component: 'Select',
componentProps: {
dictType: '',
allowClear: true,
},
required: true,
},
{
label: t('需求备注'),
field: 'remark',
component: 'Input',
component: 'InputTextArea',
componentProps: {
maxlength: 100,
},
colProps: { md: 24, lg: 24 },
},
{
label: t('状态'),
field: 'requirementsStatus',
component: 'Select',
componentProps: {
dictType: '',
allowClear: true,
},
required: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizProjectRequirements>({

View File

@@ -14,16 +14,13 @@
<a-button type="default" :loading="loading" @click="handleExport()">
<Icon icon="i-ant-design:download-outlined" /> {{ t('导出') }}
</a-button>
<a-button type="default" @click="handleImport()">
<Icon icon="i-ant-design:import-outlined" /> {{ t('导入') }}
</a-button>
<a-button type="primary" @click="handleForm({})" v-auth="'biz:projectRequirements:edit'">
<Icon icon="i-fluent:add-12-filled" /> {{ t('新增') }}
</a-button>
</template>
<template #firstColumn="{ record }">
<a @click="handleForm({ requirementId: record.requirementId })" :title="record.createTime">
{{ record.createTime }}
<template #slotBizKey="{ record }">
<a @click="handleForm({ requirementId: record.requirementId })" :title="record.requirementName">
{{ record.requirementName }}
</a>
</template>
</BasicTable>
@@ -91,40 +88,44 @@
field: 'requirementCode',
component: 'Input',
},
{
label: t('项目区域'),
field: 'areaCode',
component: 'Input',
},
{
label: t('项目区域'),
field: 'areaCode',
fieldLabel: 'provinceName',
component: 'ListSelect',
componentProps: {
selectType: 'bizProvSelect',
},
},
{
label: t('项目名称'),
field: 'projectId',
fieldLabel: 'projectName',
component: 'ListSelect',
componentProps: {
selectType: 'bizProjectSelect',
},
},
{
label: t('需求人员'),
field: 'employeeId',
fieldLabel: 'employeeName',
component: 'ListSelect',
componentProps: {
selectType: 'bizEmpSelect',
},
},
{
label: t('需求描述'),
field: 'requirementDescription',
component: 'Input',
},
{
label: t('优先级'),
label: t('优先级'),
field: 'priority',
component: 'Select',
componentProps: {
dictType: '',
allowClear: true,
},
},
{
label: t('项目ID'),
field: 'projectId',
component: 'Select',
componentProps: {
dictType: '',
allowClear: true,
},
},
{
label: t('用户ID'),
field: 'employeeId',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'priority',
allowClear: true,
},
},
@@ -134,11 +135,11 @@
component: 'Input',
},
{
label: t('状态'),
label: t('需求状态'),
field: 'requirementsStatus',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'requirements_status',
allowClear: true,
},
},
@@ -151,9 +152,8 @@
dataIndex: 'createTime',
key: 'a.create_time',
sorter: true,
width: 230,
width: 180,
align: 'left',
slot: 'firstColumn',
},
{
title: t('需求名称'),
@@ -162,6 +162,7 @@
sorter: true,
width: 130,
align: 'left',
slot: 'slotBizKey',
},
{
title: t('需求编号'),
@@ -192,7 +193,7 @@
dataIndex: 'startTime',
key: 'a.start_time',
sorter: true,
width: 130,
width: 180,
align: 'center',
},
{
@@ -200,44 +201,26 @@
dataIndex: 'endTime',
key: 'a.end_time',
sorter: true,
width: 130,
width: 180,
align: 'center',
},
{
title: t('优先级'),
title: t('优先级'),
dataIndex: 'priority',
key: 'a.priority',
sorter: true,
width: 130,
align: 'left',
dictType: '',
dictType: 'priority',
},
{
title: t('更新时间'),
dataIndex: 'updateTime',
key: 'a.update_time',
sorter: true,
width: 130,
width: 180,
align: 'center',
},
{
title: t('项目ID'),
dataIndex: 'projectId',
key: 'a.project_id',
sorter: true,
width: 130,
align: 'left',
dictType: '',
},
{
title: t('用户ID'),
dataIndex: 'employeeId',
key: 'a.employee_id',
sorter: true,
width: 130,
align: 'left',
dictType: '',
},
{
title: t('需求备注'),
dataIndex: 'remark',
@@ -253,7 +236,7 @@
sorter: true,
width: 130,
align: 'left',
dictType: '',
dictType: 'requirements_status',
},
];
@@ -262,16 +245,16 @@
actions: (record: BizProjectRequirements) => [
{
icon: 'i-clarity:note-edit-line',
title: t('编辑需求信息'),
title: t('编辑'),
onClick: handleForm.bind(this, { requirementId: record.requirementId }),
auth: 'biz:projectRequirements:edit',
},
{
icon: 'i-ant-design:delete-outlined',
color: 'error',
title: t('删除需求信息'),
title: t('删除'),
popConfirm: {
title: t('是否确认删除需求信息'),
title: t('是否确认删除需求信息?'),
confirm: handleDelete.bind(this, record),
},
auth: 'biz:projectRequirements:edit',