新增查看页面
This commit is contained in:
39
web-vue/packages/biz/api/biz/areaSource.ts
Normal file
39
web-vue/packages/biz/api/biz/areaSource.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* @author gaoxq
|
||||
*/
|
||||
import { defHttp } from '@jeesite/core/utils/http/axios';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
import { BasicModel, Page, TreeDataModel, TreeModel } from '@jeesite/core/api/model/baseModel';
|
||||
const { adminPath } = useGlobSetting();
|
||||
|
||||
export interface BizAreaSource extends BasicModel<BizAreaSource> {
|
||||
createTime: string; // 记录时间
|
||||
areaId: string; // 区域标识
|
||||
areaCode?: string; // 区域编号
|
||||
areaName?: string; // 区域名称
|
||||
pareaCode?: string; // 上级编号
|
||||
areaLevel: number; // 区域级别
|
||||
treeName?: string; // 区域地址
|
||||
updateTime?: string; // 更新时间
|
||||
areaStatus?: string; // 区域状态
|
||||
}
|
||||
|
||||
export const bizAreaSourceList = (params?: BizAreaSource | any) =>
|
||||
defHttp.get<BizAreaSource>({ url: adminPath + '/biz/areaSource/list', params });
|
||||
|
||||
export const bizAreaSourceListData = (params?: BizAreaSource | any) =>
|
||||
defHttp.post<Page<BizAreaSource>>({ url: adminPath + '/biz/areaSource/listData', params });
|
||||
|
||||
export const bizAreaSourceForm = (params?: BizAreaSource | any) =>
|
||||
defHttp.get<BizAreaSource>({ url: adminPath + '/biz/areaSource/form', params });
|
||||
|
||||
export const bizAreaSourceSave = (params?: any, data?: BizAreaSource | any) =>
|
||||
defHttp.postJson<BizAreaSource>({ url: adminPath + '/biz/areaSource/save', params, data });
|
||||
|
||||
export const bizAreaSourceDelete = (params?: BizAreaSource | any) =>
|
||||
defHttp.get<BizAreaSource>({ url: adminPath + '/biz/areaSource/delete', params });
|
||||
|
||||
export const bizAreaSourceTreeData = (params?: any) =>
|
||||
defHttp.get<TreeDataModel[]>({ url: adminPath + '/biz/areaSource/treeData', params });
|
||||
@@ -5,11 +5,10 @@
|
||||
*/
|
||||
import { defHttp } from '@jeesite/core/utils/http/axios';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
||||
import { BasicModel, Page, TreeDataModel, TreeModel } from '@jeesite/core/api/model/baseModel';
|
||||
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
||||
import { UploadFileParams } from '@jeesite/types/axios';
|
||||
import { AxiosProgressEvent } from 'axios';
|
||||
import { TreeDataModel, TreeModel, Page } from '@jeesite/core/api/model/baseModel';
|
||||
|
||||
const { ctxPath, adminPath } = useGlobSetting();
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ export interface BizProjectRequirements extends BasicModel<BizProjectRequirement
|
||||
requirementId?: string; // 需求标识
|
||||
requirementName: string; // 需求名称
|
||||
requirementCode?: string; // 需求编号
|
||||
areaLevel?: string;
|
||||
areaCode: string; // 项目区域
|
||||
requirementDescription?: string; // 需求描述
|
||||
startTime?: string; // 开始时间
|
||||
|
||||
@@ -52,14 +52,14 @@
|
||||
field: 'provinceCode',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
api: bizProvinceListAll,
|
||||
params: {},
|
||||
fieldNames: { label: 'provinceName', value: 'provinceCode' },
|
||||
immediate: true,
|
||||
allowClear: true,
|
||||
onChange: (value: string) => {
|
||||
provListParams.value.provinceCode = value;
|
||||
},
|
||||
api: bizProvinceListAll,
|
||||
params: {},
|
||||
fieldNames: { label: 'provinceName', value: 'provinceCode' },
|
||||
immediate: true,
|
||||
allowClear: true,
|
||||
onChange: (value: string) => {
|
||||
provListParams.value.provinceCode = value;
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { BizAreaSource, bizAreaSourceTreeData } from '@jeesite/biz/api/biz/areaSource';
|
||||
import { BizProjectRequirements, bizProjectRequirementsSave, bizProjectRequirementsForm } from '@jeesite/biz/api/biz/projectRequirements';
|
||||
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
|
||||
|
||||
@@ -50,6 +51,8 @@
|
||||
icon: meta.icon || 'i-ant-design:book-outlined',
|
||||
value: record.value.isNewRecord ? t('新增需求信息') : t('编辑需求信息'),
|
||||
}));
|
||||
|
||||
const areaListParams = ref<Recordable>({ areaLevel: '1' });
|
||||
|
||||
const inputFormSchemas: FormSchema<BizProjectRequirements>[] = [
|
||||
{
|
||||
@@ -60,7 +63,6 @@
|
||||
maxlength: 52,
|
||||
},
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('需求编号'),
|
||||
@@ -70,13 +72,29 @@
|
||||
maxlength: 24,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('区域级别'),
|
||||
field: 'areaLevel',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'area_type',
|
||||
immediate: true,
|
||||
allowClear: true,
|
||||
onChange: (value: string) => {
|
||||
areaListParams.value.areaLevel = value;
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: t('区域名称'),
|
||||
field: 'areaCode',
|
||||
fieldLabel: 'provinceName',
|
||||
component: 'ListSelect',
|
||||
fieldLabel: 'areaName',
|
||||
component: 'TreeSelect',
|
||||
componentProps: {
|
||||
selectType: 'bizProvSelect',
|
||||
api: bizAreaSourceTreeData,
|
||||
params: areaListParams.value,
|
||||
allowClear: true,
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
||||
import { BizProjectRequirements, bizProjectRequirementsList } from '@jeesite/biz/api/biz/projectRequirements';
|
||||
import { BizAreaSource, bizAreaSourceTreeData } from '@jeesite/biz/api/biz/areaSource';
|
||||
import { bizProjectRequirementsDelete, bizProjectRequirementsListData } from '@jeesite/biz/api/biz/projectRequirements';
|
||||
import { useModal } from '@jeesite/core/components/Modal';
|
||||
import { FormProps } from '@jeesite/core/components/Form';
|
||||
@@ -56,6 +57,8 @@
|
||||
value: meta.title || t('需求信息管理'),
|
||||
};
|
||||
const loading = ref(false);
|
||||
|
||||
const areaListParams = ref<Recordable>({ areaLevel: '1' });
|
||||
|
||||
const searchForm: FormProps<BizProjectRequirements> = {
|
||||
baseColProps: { md: 8, lg: 6 },
|
||||
@@ -89,13 +92,28 @@
|
||||
field: 'requirementCode',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('区域级别'),
|
||||
field: 'areaLevel',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'area_type',
|
||||
immediate: true,
|
||||
allowClear: true,
|
||||
onChange: (value: string) => {
|
||||
areaListParams.value.areaLevel = value;
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('区域名称'),
|
||||
field: 'areaCode',
|
||||
fieldLabel: 'provinceName',
|
||||
component: 'ListSelect',
|
||||
fieldLabel: 'areaName',
|
||||
component: 'TreeSelect',
|
||||
componentProps: {
|
||||
selectType: 'bizProvSelect',
|
||||
api: bizAreaSourceTreeData,
|
||||
params: areaListParams.value,
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -116,11 +134,6 @@
|
||||
selectType: 'bizEmpSelect',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('需求描述'),
|
||||
field: 'requirementDescription',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('优先等级'),
|
||||
field: 'priority',
|
||||
@@ -195,16 +208,25 @@
|
||||
dataIndex: 'projectName',
|
||||
key: 'c.project_name',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
width: 225,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('区域编号'),
|
||||
dataIndex: 'areaCode',
|
||||
key: 'a.area_code',
|
||||
title: t('区域级别'),
|
||||
dataIndex: 'areaLevel',
|
||||
key: 'a.area_level',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'area_type',
|
||||
},
|
||||
{
|
||||
title: t('区域名称'),
|
||||
dataIndex: 'treeName',
|
||||
key: 'd.tree_name',
|
||||
sorter: true,
|
||||
width: 165,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('项目名称'),
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { BizAreaSource, bizAreaSourceTreeData } from '@jeesite/biz/api/biz/areaSource';
|
||||
import { BizProjectRequirements, bizProjectRequirementsSave, bizProjectRequirementsForm } from '@jeesite/biz/api/biz/projectRequirements';
|
||||
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
|
||||
|
||||
@@ -48,6 +49,8 @@
|
||||
value: t('查看需求信息'),
|
||||
}));
|
||||
|
||||
const areaListParams = ref<Recordable>({ areaLevel: '1' });
|
||||
|
||||
const inputFormSchemas: FormSchema<BizProjectRequirements>[] = [
|
||||
{
|
||||
label: t('需求名称'),
|
||||
@@ -57,7 +60,6 @@
|
||||
maxlength: 52,
|
||||
},
|
||||
dynamicDisabled: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('需求编号'),
|
||||
@@ -68,13 +70,29 @@
|
||||
},
|
||||
dynamicDisabled: true,
|
||||
},
|
||||
{
|
||||
label: t('区域级别'),
|
||||
field: 'areaLevel',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'area_type',
|
||||
immediate: true,
|
||||
allowClear: true,
|
||||
onChange: (value: string) => {
|
||||
areaListParams.value.areaLevel = value;
|
||||
},
|
||||
},
|
||||
dynamicDisabled: true,
|
||||
},
|
||||
{
|
||||
label: t('区域名称'),
|
||||
field: 'areaCode',
|
||||
fieldLabel: 'provinceName',
|
||||
component: 'ListSelect',
|
||||
fieldLabel: 'areaName',
|
||||
component: 'TreeSelect',
|
||||
componentProps: {
|
||||
selectType: 'bizProvSelect',
|
||||
api: bizAreaSourceTreeData,
|
||||
params: areaListParams.value,
|
||||
allowClear: true,
|
||||
},
|
||||
dynamicDisabled: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user