feat: 项目管理字段添加和调整
This commit is contained in:
@@ -21,8 +21,9 @@ export namespace ProjectApi {
|
|||||||
startTime: Dayjs | string; // 项目开始时间
|
startTime: Dayjs | string; // 项目开始时间
|
||||||
endTime: Dayjs | string; // 项目结束时间
|
endTime: Dayjs | string; // 项目结束时间
|
||||||
status?: number; // 项目状态
|
status?: number; // 项目状态
|
||||||
envInfo: string; // 环境信息
|
envInfo: number; // 环境信息
|
||||||
envFileId: number; // 环境信息附件id
|
operatingSystem: number; // 操作系统
|
||||||
|
softwareVersion: number; // 软件版本信息
|
||||||
remark: string; // 备注
|
remark: string; // 备注
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,5 +22,7 @@
|
|||||||
"list": "Project List",
|
"list": "Project List",
|
||||||
"progress": "Comment",
|
"progress": "Comment",
|
||||||
"updateTime": "Last Modified Time",
|
"updateTime": "Last Modified Time",
|
||||||
"commentNum": "Comment Count"
|
"commentNum": "Comment Count",
|
||||||
|
"softwareVersion": "Software Version Info",
|
||||||
|
"operatingSystem": "Operating System"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"project": "项目",
|
"project": "项目",
|
||||||
"operation": "操作",
|
"operation": "操作",
|
||||||
"creationTime": "创建时间",
|
"creationTime": "创建时间",
|
||||||
"remarks": "软件版本信息",
|
"remarks": "备注",
|
||||||
"envInfo": "环境信息",
|
"envInfo": "环境信息",
|
||||||
"status": "项目状态",
|
"status": "项目状态",
|
||||||
"endTime": "项目结束时间",
|
"endTime": "项目结束时间",
|
||||||
@@ -22,5 +22,7 @@
|
|||||||
"list": "项目列表",
|
"list": "项目列表",
|
||||||
"progress": "评论",
|
"progress": "评论",
|
||||||
"updateTime": "最后修改时间",
|
"updateTime": "最后修改时间",
|
||||||
"commentNum": "评论数"
|
"commentNum": "评论数",
|
||||||
|
"softwareVersion": "软件版本信息",
|
||||||
|
"operatingSystem": "操作系统"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -262,13 +262,16 @@ enum DICT_TYPE {
|
|||||||
// ========== LICENSE 模块 ==========
|
// ========== LICENSE 模块 ==========
|
||||||
LIC_BUSINESS_STATUS = 'lic_business_status', // 商务状态
|
LIC_BUSINESS_STATUS = 'lic_business_status', // 商务状态
|
||||||
LIC_CUSTOMER_TYPE = 'lic_customer_type', // 客户类型
|
LIC_CUSTOMER_TYPE = 'lic_customer_type', // 客户类型
|
||||||
|
LIC_ENV_INFO = 'lic_env_info', // 环境信息
|
||||||
LIC_LICENSE_STATUS = 'lic_license_status', // License 状态
|
LIC_LICENSE_STATUS = 'lic_license_status', // License 状态
|
||||||
LIC_NE_4G = 'lic_ne_4g', // NE 列表 4G
|
LIC_NE_4G = 'lic_ne_4g', // NE 列表 4G
|
||||||
LIC_NE_5G = 'lic_ne_5g', // NE 列表 5G
|
LIC_NE_5G = 'lic_ne_5g', // NE 列表 5G
|
||||||
LIC_NE_23G = 'lic_ne_23g', // NE 列表 2/3G
|
LIC_NE_23G = 'lic_ne_23g', // NE 列表 2/3G
|
||||||
LIC_NE_ADD = 'lic_ne_add', // NE 列表 增值业务
|
LIC_NE_ADD = 'lic_ne_add', // NE 列表 增值业务
|
||||||
LIC_NE_ALL = 'lic_ne_all', // NE 列表 一体化
|
LIC_NE_ALL = 'lic_ne_all', // NE 列表 一体化
|
||||||
|
LIC_OPERATING_SYSTEM = 'lic_operating_system', // 操作系统
|
||||||
LIC_PROJECT_STATUS = 'lic_project_status', // 项目状态
|
LIC_PROJECT_STATUS = 'lic_project_status', // 项目状态
|
||||||
|
LIC_SOFTWARE_VERSION = 'lic_software_version', // 软件版本信息
|
||||||
MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型
|
MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型
|
||||||
// ========== Member 会员模块 ==========
|
// ========== Member 会员模块 ==========
|
||||||
MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型
|
MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import type { CustomerApi } from '#/api/license/customer';
|
|||||||
|
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
import { useAccess } from '@vben/access';
|
||||||
|
|
||||||
import { z } from '#/adapter/form';
|
import { z } from '#/adapter/form';
|
||||||
import {
|
import {
|
||||||
isCustomerCodeUnique,
|
isCustomerCodeUnique,
|
||||||
@@ -13,6 +15,8 @@ import { getAreaTree } from '#/api/system/area';
|
|||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||||
|
|
||||||
|
const { hasAccessByRoles } = useAccess();
|
||||||
|
|
||||||
export const formData = ref<CustomerApi.Customer>();
|
export const formData = ref<CustomerApi.Customer>();
|
||||||
/** 新增/修改的表单 */
|
/** 新增/修改的表单 */
|
||||||
export function useFormSchema(): VbenFormSchema[] {
|
export function useFormSchema(): VbenFormSchema[] {
|
||||||
@@ -97,6 +101,10 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: $t('customer.contacts'),
|
label: $t('customer.contacts'),
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
triggerFields: ['id'],
|
||||||
|
show: (values) => !values.id || hasAccessByRoles(['business']),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'areaIds',
|
fieldName: 'areaIds',
|
||||||
@@ -119,11 +127,19 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'role',
|
fieldName: 'role',
|
||||||
label: $t('customer.role'),
|
label: $t('customer.role'),
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
triggerFields: ['id'],
|
||||||
|
show: (values) => !values.id || hasAccessByRoles(['business']),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'phone',
|
fieldName: 'phone',
|
||||||
label: $t('customer.phone'),
|
label: $t('customer.phone'),
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
triggerFields: ['id'],
|
||||||
|
show: (values) => !values.id || hasAccessByRoles(['business']),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'email',
|
fieldName: 'email',
|
||||||
@@ -214,6 +230,7 @@ export function useGridColumns(): VxeTableGridOptions<CustomerApi.Customer>['col
|
|||||||
field: 'contacts',
|
field: 'contacts',
|
||||||
title: $t('customer.contacts'),
|
title: $t('customer.contacts'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
|
visible: hasAccessByRoles(['business']),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'areaNames',
|
field: 'areaNames',
|
||||||
@@ -224,11 +241,13 @@ export function useGridColumns(): VxeTableGridOptions<CustomerApi.Customer>['col
|
|||||||
field: 'role',
|
field: 'role',
|
||||||
title: $t('customer.role'),
|
title: $t('customer.role'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
|
visible: hasAccessByRoles(['business']),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'phone',
|
field: 'phone',
|
||||||
title: $t('customer.phone'),
|
title: $t('customer.phone'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
|
visible: hasAccessByRoles(['business']),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'email',
|
field: 'email',
|
||||||
|
|||||||
@@ -12,13 +12,14 @@ import {
|
|||||||
isProjectCodeUnique,
|
isProjectCodeUnique,
|
||||||
isProjectNameUnique,
|
isProjectNameUnique,
|
||||||
} from '#/api/license/project';
|
} from '#/api/license/project';
|
||||||
// import { getSimpleUserList } from '#/api/system/user';
|
import { getSimpleUserList } from '#/api/system/user';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||||
|
|
||||||
const { hasAccessByCodes } = useAccess();
|
let userList = await getSimpleUserList();
|
||||||
|
userList = userList.filter((item) => item.nickname !== '管理员'); // 过滤掉系统用户
|
||||||
|
|
||||||
// const userList = await getSimpleUserList();
|
const { hasAccessByCodes } = useAccess();
|
||||||
|
|
||||||
export const formData = ref<ProjectApi.Project>();
|
export const formData = ref<ProjectApi.Project>();
|
||||||
/** 新增/修改的表单 */
|
/** 新增/修改的表单 */
|
||||||
@@ -100,9 +101,12 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
{
|
{
|
||||||
fieldName: 'contractCode',
|
fieldName: 'contractCode',
|
||||||
label: $t('project.contractCode'),
|
label: $t('project.contractCode'),
|
||||||
rules: 'required',
|
rules: z.string().min(1, '请输入,没有合同请填0'),
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
help: '没有合同的项目请填0',
|
help: '没有合同的项目请填0',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入,没有合同请填0',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'businessStatus',
|
fieldName: 'businessStatus',
|
||||||
@@ -126,7 +130,16 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'businessOwner',
|
fieldName: 'businessOwner',
|
||||||
label: $t('project.businessOwner'),
|
label: $t('project.businessOwner'),
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: userList,
|
||||||
|
allowClear: true,
|
||||||
|
showSearch: true,
|
||||||
|
fieldNames: { label: 'nickname', value: 'id' },
|
||||||
|
filterOption: (input: string, option: any) => {
|
||||||
|
return option.nickname.toLowerCase().includes(input.toLowerCase());
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'customerOwner',
|
fieldName: 'customerOwner',
|
||||||
@@ -138,17 +151,44 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'technicalOwnerA',
|
fieldName: 'technicalOwnerA',
|
||||||
label: $t('project.technicalOwnerA'),
|
label: $t('project.technicalOwnerA'),
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: userList,
|
||||||
|
allowClear: true,
|
||||||
|
showSearch: true,
|
||||||
|
fieldNames: { label: 'nickname', value: 'id' },
|
||||||
|
filterOption: (input: string, option: any) => {
|
||||||
|
return option.nickname.toLowerCase().includes(input.toLowerCase());
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'technicalOwnerB',
|
fieldName: 'technicalOwnerB',
|
||||||
label: $t('project.technicalOwnerB'),
|
label: $t('project.technicalOwnerB'),
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: userList,
|
||||||
|
allowClear: true,
|
||||||
|
showSearch: true,
|
||||||
|
fieldNames: { label: 'nickname', value: 'id' },
|
||||||
|
filterOption: (input: string, option: any) => {
|
||||||
|
return option.nickname.toLowerCase().includes(input.toLowerCase());
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'technicalOwnerC',
|
fieldName: 'technicalOwnerC',
|
||||||
label: $t('project.technicalOwnerC'),
|
label: $t('project.technicalOwnerC'),
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: userList,
|
||||||
|
allowClear: true,
|
||||||
|
showSearch: true,
|
||||||
|
fieldNames: { label: 'nickname', value: 'id' },
|
||||||
|
filterOption: (input: string, option: any) => {
|
||||||
|
return option.nickname.toLowerCase().includes(input.toLowerCase());
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'startTime',
|
fieldName: 'startTime',
|
||||||
@@ -173,19 +213,28 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'envInfo',
|
fieldName: 'envInfo',
|
||||||
label: $t('project.envInfo'),
|
label: $t('project.envInfo'),
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions(DICT_TYPE.LIC_ENV_INFO, 'number'),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// fieldName: 'envFileId',
|
|
||||||
// label: $t('project.envInfoFile'),
|
|
||||||
// component: 'Input',
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
fieldName: 'remark',
|
fieldName: 'softwareVersion',
|
||||||
label: $t('project.remarks'),
|
label: $t('project.softwareVersion'),
|
||||||
component: 'Textarea',
|
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
formItemClass: 'col-span-2',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions(DICT_TYPE.LIC_SOFTWARE_VERSION, 'number'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'operatingSystem',
|
||||||
|
label: $t('project.operatingSystem'),
|
||||||
|
rules: 'required',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions(DICT_TYPE.LIC_OPERATING_SYSTEM, 'number'),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -231,9 +280,15 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
{
|
{
|
||||||
fieldName: 'technicalOwner',
|
fieldName: 'technicalOwner',
|
||||||
label: $t('project.technicalOwner'),
|
label: $t('project.technicalOwner'),
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: userList,
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
|
showSearch: true,
|
||||||
|
fieldNames: { label: 'nickname', value: 'id' },
|
||||||
|
filterOption: (input: string, option: any) => {
|
||||||
|
return option.nickname.toLowerCase().includes(input.toLowerCase());
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -272,9 +327,15 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
{
|
{
|
||||||
fieldName: 'businessOwner',
|
fieldName: 'businessOwner',
|
||||||
label: $t('project.businessOwner'),
|
label: $t('project.businessOwner'),
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: userList,
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
|
showSearch: true,
|
||||||
|
fieldNames: { label: 'nickname', value: 'id' },
|
||||||
|
filterOption: (input: string, option: any) => {
|
||||||
|
return option.nickname.toLowerCase().includes(input.toLowerCase());
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -380,7 +441,7 @@ export function useGridColumns(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'businessOwner',
|
field: 'businessOwnerName',
|
||||||
title: $t('project.businessOwner'),
|
title: $t('project.businessOwner'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
@@ -391,17 +452,17 @@ export function useGridColumns(
|
|||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'technicalOwnerA',
|
field: 'technicalOwnerAName',
|
||||||
title: $t('project.technicalOwnerA'),
|
title: $t('project.technicalOwnerA'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'technicalOwnerB',
|
field: 'technicalOwnerBName',
|
||||||
title: $t('project.technicalOwnerB'),
|
title: $t('project.technicalOwnerB'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'technicalOwnerC',
|
field: 'technicalOwnerCName',
|
||||||
title: $t('project.technicalOwnerC'),
|
title: $t('project.technicalOwnerC'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
@@ -417,13 +478,37 @@ export function useGridColumns(
|
|||||||
title: $t('project.envInfo'),
|
title: $t('project.envInfo'),
|
||||||
visible: false,
|
visible: false,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
|
cellRender: {
|
||||||
|
name: 'CellDict',
|
||||||
|
props: { type: DICT_TYPE.LIC_ENV_INFO },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'remark',
|
field: 'softwareVersion',
|
||||||
title: $t('project.remarks'),
|
title: $t('project.softwareVersion'),
|
||||||
visible: false,
|
visible: false,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
|
cellRender: {
|
||||||
|
name: 'CellDict',
|
||||||
|
props: { type: DICT_TYPE.LIC_SOFTWARE_VERSION },
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'operatingSystem',
|
||||||
|
title: $t('project.operatingSystem'),
|
||||||
|
visible: false,
|
||||||
|
minWidth: 120,
|
||||||
|
cellRender: {
|
||||||
|
name: 'CellDict',
|
||||||
|
props: { type: DICT_TYPE.LIC_OPERATING_SYSTEM },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// field: 'remark',
|
||||||
|
// title: $t('project.remarks'),
|
||||||
|
// visible: false,
|
||||||
|
// minWidth: 120,
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
field: 'commentNum',
|
field: 'commentNum',
|
||||||
title: $t('project.commentNum'),
|
title: $t('project.commentNum'),
|
||||||
|
|||||||
Reference in New Issue
Block a user