新增查看页面
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 { defHttp } from '@jeesite/core/utils/http/axios';
|
||||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
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 { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
||||||
import { UploadFileParams } from '@jeesite/types/axios';
|
import { UploadFileParams } from '@jeesite/types/axios';
|
||||||
import { AxiosProgressEvent } from 'axios';
|
import { AxiosProgressEvent } from 'axios';
|
||||||
import { TreeDataModel, TreeModel, Page } from '@jeesite/core/api/model/baseModel';
|
|
||||||
|
|
||||||
const { ctxPath, adminPath } = useGlobSetting();
|
const { ctxPath, adminPath } = useGlobSetting();
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export interface BizProjectRequirements extends BasicModel<BizProjectRequirement
|
|||||||
requirementId?: string; // 需求标识
|
requirementId?: string; // 需求标识
|
||||||
requirementName: string; // 需求名称
|
requirementName: string; // 需求名称
|
||||||
requirementCode?: string; // 需求编号
|
requirementCode?: string; // 需求编号
|
||||||
|
areaLevel?: string;
|
||||||
areaCode: string; // 项目区域
|
areaCode: string; // 项目区域
|
||||||
requirementDescription?: string; // 需求描述
|
requirementDescription?: string; // 需求描述
|
||||||
startTime?: string; // 开始时间
|
startTime?: string; // 开始时间
|
||||||
|
|||||||
@@ -52,14 +52,14 @@
|
|||||||
field: 'provinceCode',
|
field: 'provinceCode',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: bizProvinceListAll,
|
api: bizProvinceListAll,
|
||||||
params: {},
|
params: {},
|
||||||
fieldNames: { label: 'provinceName', value: 'provinceCode' },
|
fieldNames: { label: 'provinceName', value: 'provinceCode' },
|
||||||
immediate: true,
|
immediate: true,
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
onChange: (value: string) => {
|
onChange: (value: string) => {
|
||||||
provListParams.value.provinceCode = value;
|
provListParams.value.provinceCode = value;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
colProps: { md: 24, lg: 24 },
|
colProps: { md: 24, lg: 24 },
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
||||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
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 { BizProjectRequirements, bizProjectRequirementsSave, bizProjectRequirementsForm } from '@jeesite/biz/api/biz/projectRequirements';
|
||||||
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
|
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
|
||||||
|
|
||||||
@@ -50,6 +51,8 @@
|
|||||||
icon: meta.icon || 'i-ant-design:book-outlined',
|
icon: meta.icon || 'i-ant-design:book-outlined',
|
||||||
value: record.value.isNewRecord ? t('新增需求信息') : t('编辑需求信息'),
|
value: record.value.isNewRecord ? t('新增需求信息') : t('编辑需求信息'),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const areaListParams = ref<Recordable>({ areaLevel: '1' });
|
||||||
|
|
||||||
const inputFormSchemas: FormSchema<BizProjectRequirements>[] = [
|
const inputFormSchemas: FormSchema<BizProjectRequirements>[] = [
|
||||||
{
|
{
|
||||||
@@ -60,7 +63,6 @@
|
|||||||
maxlength: 52,
|
maxlength: 52,
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
colProps: { md: 24, lg: 24 },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('需求编号'),
|
label: t('需求编号'),
|
||||||
@@ -70,13 +72,29 @@
|
|||||||
maxlength: 24,
|
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('区域名称'),
|
label: t('区域名称'),
|
||||||
field: 'areaCode',
|
field: 'areaCode',
|
||||||
fieldLabel: 'provinceName',
|
fieldLabel: 'areaName',
|
||||||
component: 'ListSelect',
|
component: 'TreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
selectType: 'bizProvSelect',
|
api: bizAreaSourceTreeData,
|
||||||
|
params: areaListParams.value,
|
||||||
|
allowClear: true,
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
import { Icon } from '@jeesite/core/components/Icon';
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
||||||
import { BizProjectRequirements, bizProjectRequirementsList } from '@jeesite/biz/api/biz/projectRequirements';
|
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 { bizProjectRequirementsDelete, bizProjectRequirementsListData } from '@jeesite/biz/api/biz/projectRequirements';
|
||||||
import { useModal } from '@jeesite/core/components/Modal';
|
import { useModal } from '@jeesite/core/components/Modal';
|
||||||
import { FormProps } from '@jeesite/core/components/Form';
|
import { FormProps } from '@jeesite/core/components/Form';
|
||||||
@@ -56,6 +57,8 @@
|
|||||||
value: meta.title || t('需求信息管理'),
|
value: meta.title || t('需求信息管理'),
|
||||||
};
|
};
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const areaListParams = ref<Recordable>({ areaLevel: '1' });
|
||||||
|
|
||||||
const searchForm: FormProps<BizProjectRequirements> = {
|
const searchForm: FormProps<BizProjectRequirements> = {
|
||||||
baseColProps: { md: 8, lg: 6 },
|
baseColProps: { md: 8, lg: 6 },
|
||||||
@@ -89,13 +92,28 @@
|
|||||||
field: 'requirementCode',
|
field: 'requirementCode',
|
||||||
component: 'Input',
|
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('区域名称'),
|
label: t('区域名称'),
|
||||||
field: 'areaCode',
|
field: 'areaCode',
|
||||||
fieldLabel: 'provinceName',
|
fieldLabel: 'areaName',
|
||||||
component: 'ListSelect',
|
component: 'TreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
selectType: 'bizProvSelect',
|
api: bizAreaSourceTreeData,
|
||||||
|
params: areaListParams.value,
|
||||||
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -116,11 +134,6 @@
|
|||||||
selectType: 'bizEmpSelect',
|
selectType: 'bizEmpSelect',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: t('需求描述'),
|
|
||||||
field: 'requirementDescription',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: t('优先等级'),
|
label: t('优先等级'),
|
||||||
field: 'priority',
|
field: 'priority',
|
||||||
@@ -195,16 +208,25 @@
|
|||||||
dataIndex: 'projectName',
|
dataIndex: 'projectName',
|
||||||
key: 'c.project_name',
|
key: 'c.project_name',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 130,
|
width: 225,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('区域编号'),
|
title: t('区域级别'),
|
||||||
dataIndex: 'areaCode',
|
dataIndex: 'areaLevel',
|
||||||
key: 'a.area_code',
|
key: 'a.area_level',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 130,
|
width: 130,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
dictType: 'area_type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('区域名称'),
|
||||||
|
dataIndex: 'treeName',
|
||||||
|
key: 'd.tree_name',
|
||||||
|
sorter: true,
|
||||||
|
width: 165,
|
||||||
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('项目名称'),
|
title: t('项目名称'),
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
import { Icon } from '@jeesite/core/components/Icon';
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
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 { BizProjectRequirements, bizProjectRequirementsSave, bizProjectRequirementsForm } from '@jeesite/biz/api/biz/projectRequirements';
|
||||||
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
|
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
|
||||||
|
|
||||||
@@ -48,6 +49,8 @@
|
|||||||
value: t('查看需求信息'),
|
value: t('查看需求信息'),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const areaListParams = ref<Recordable>({ areaLevel: '1' });
|
||||||
|
|
||||||
const inputFormSchemas: FormSchema<BizProjectRequirements>[] = [
|
const inputFormSchemas: FormSchema<BizProjectRequirements>[] = [
|
||||||
{
|
{
|
||||||
label: t('需求名称'),
|
label: t('需求名称'),
|
||||||
@@ -57,7 +60,6 @@
|
|||||||
maxlength: 52,
|
maxlength: 52,
|
||||||
},
|
},
|
||||||
dynamicDisabled: true,
|
dynamicDisabled: true,
|
||||||
colProps: { md: 24, lg: 24 },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('需求编号'),
|
label: t('需求编号'),
|
||||||
@@ -68,13 +70,29 @@
|
|||||||
},
|
},
|
||||||
dynamicDisabled: true,
|
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('区域名称'),
|
label: t('区域名称'),
|
||||||
field: 'areaCode',
|
field: 'areaCode',
|
||||||
fieldLabel: 'provinceName',
|
fieldLabel: 'areaName',
|
||||||
component: 'ListSelect',
|
component: 'TreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
selectType: 'bizProvSelect',
|
api: bizAreaSourceTreeData,
|
||||||
|
params: areaListParams.value,
|
||||||
|
allowClear: true,
|
||||||
},
|
},
|
||||||
dynamicDisabled: true,
|
dynamicDisabled: true,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user