diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 1ebc30a6..2bcbbde2 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -16,7 +16,8 @@ jobs: - name: Build run: pnpm build:antd - name: cp - run: robocopy ./apps/web-antd/dist C:\devtool\nginx-1.28.0\html\propety /E +# run: robocopy ./apps/web-antd/dist C:\devtool\nginx-1.28.0\html\propety /E + run: Copy-Item -Path "./apps/web-antd/dist" -Destination "C:\devtool\nginx-1.28.0\html\property" -Recurse -Force -ErrorAction SilentlyContinue diff --git a/apps/web-antd/.env.production b/apps/web-antd/.env.production index 2b43bb72..d228ac48 100644 --- a/apps/web-antd/.env.production +++ b/apps/web-antd/.env.production @@ -1,4 +1,4 @@ -VITE_BASE=/ +VITE_BASE=/property # 是否开启压缩,可以设置为 none, brotli, gzip VITE_COMPRESS=gzip diff --git a/apps/web-antd/src/api/property/rentalPlan/index.ts b/apps/web-antd/src/api/property/rentalPlan/index.ts new file mode 100644 index 00000000..6815a9eb --- /dev/null +++ b/apps/web-antd/src/api/property/rentalPlan/index.ts @@ -0,0 +1,61 @@ +import type { RentalPlanVO, RentalPlanForm, RentalPlanQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询绿植租赁-租赁方案列表 +* @param params +* @returns 绿植租赁-租赁方案列表 +*/ +export function rentalPlanList(params?: RentalPlanQuery) { + return requestClient.get>('/property/rentalPlan/list', { params }); +} + +/** + * 导出绿植租赁-租赁方案列表 + * @param params + * @returns 绿植租赁-租赁方案列表 + */ +export function rentalPlanExport(params?: RentalPlanQuery) { + return commonExport('/property/rentalPlan/export', params ?? {}); +} + +/** + * 查询绿植租赁-租赁方案详情 + * @param id id + * @returns 绿植租赁-租赁方案详情 + */ +export function rentalPlanInfo(id: ID) { + return requestClient.get(`/property/rentalPlan/${id}`); +} + +/** + * 新增绿植租赁-租赁方案 + * @param data + * @returns void + */ +export function rentalPlanAdd(data: RentalPlanForm) { + return requestClient.postWithMsg('/property/rentalPlan', data); +} + +/** + * 更新绿植租赁-租赁方案 + * @param data + * @returns void + */ +export function rentalPlanUpdate(data: RentalPlanForm) { + return requestClient.putWithMsg('/property/rentalPlan', data); +} + +/** + * 删除绿植租赁-租赁方案 + * @param id id + * @returns void + */ +export function rentalPlanRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/rentalPlan/${id}`); +} diff --git a/apps/web-antd/src/api/property/rentalPlan/model.d.ts b/apps/web-antd/src/api/property/rentalPlan/model.d.ts new file mode 100644 index 00000000..207ff539 --- /dev/null +++ b/apps/web-antd/src/api/property/rentalPlan/model.d.ts @@ -0,0 +1,114 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface RentalPlanVO { + /** + * 主键 + */ + id: string | number; + + /** + * 方案名称 + */ + planName: string; + + /** + * 租赁周期 + */ + rentalPeriod: number; + + /** + * 适用场景 + */ + scene: string; + + /** + * 价格 + */ + price: number; + + /** + * 状态 + */ + state: number; + + /** + * 备注 + */ + remarks: string; + +} + +export interface RentalPlanForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 方案名称 + */ + planName?: string; + + /** + * 租赁周期 + */ + rentalPeriod?: number; + + /** + * 适用场景 + */ + scene?: string; + + /** + * 价格 + */ + price?: number; + + /** + * 状态 + */ + state?: number; + + /** + * 备注 + */ + remarks?: string; + +} + +export interface RentalPlanQuery extends PageQuery { + /** + * 方案名称 + */ + planName?: string; + + /** + * 租赁周期 + */ + rentalPeriod?: number; + + /** + * 适用场景 + */ + scene?: string; + + /** + * 价格 + */ + price?: number; + + /** + * 状态 + */ + state?: number; + + /** + * 备注 + */ + remarks?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue b/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue index cdfde027..981ec228 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue +++ b/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue @@ -7,7 +7,7 @@ import { $t } from '@vben/locales'; import { cloneDeep } from '@vben/utils'; import { useVbenForm } from '#/adapter/form'; -import { cleanAdd, cleanInfo, cleanUpdate, cleanList } from '#/api/property/clean'; +import { cleanList } from '#/api/property/clean'; import type { CleanVO } from '#/api/property/clean/model'; import { clean_orderAdd, clean_orderInfo, clean_orderUpdate } from '#/api/property/clean_order'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/data.ts b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/data.ts new file mode 100644 index 00000000..59275f1d --- /dev/null +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/data.ts @@ -0,0 +1,146 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { getDictOptions } from '#/utils/dict'; +import { renderDict } from '#/utils/render'; + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'planName', + label: '方案名称', + }, + { + component: 'Select', + fieldName: 'rentalPeriod', + label: '租赁周期', + componentProps: { + options:[ + { label: '月', value: 0 }, + { label: '季度', value: 1 }, + { label: '年', value: 2 }, + ] + }, + }, + { + component: 'Select', + componentProps: { + // 可选从DictEnum中获取 DictEnum.WY_KG 便于维护 + options: getDictOptions('wy_kg'), + }, + fieldName: 'state', + label: '状态', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { + title: '序号', + field: 'id', + }, + { + title: '方案名称', + field: 'planName', + }, + { + title: '租赁周期', + field: 'rentalPeriod', + }, + { + title: '适用场景', + field: 'scene', + }, + { + title: '植物组合包', + field: 'scene', + }, + { + title: '基础服务项', + field: 'scene', + }, + { + title: '价格', + field: 'price', + }, + { + title: '状态', + field: 'state', + slots: { + default: ({ row }) => { + // 可选从DictEnum中获取 DictEnum.WY_KG 便于维护 + return renderDict(row.state, 'wy_kg'); + }, + }, + }, + { + title: '备注', + field: 'remarks', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '方案名称', + fieldName: 'planName', + component: 'Input', + rules: 'required', + }, + { + label: '租赁周期', + fieldName: 'rentalPeriod', + component: 'Select', + rules: 'required', + componentProps: { + options:[ + { label: '月', value: 0 }, + { label: '季度', value: 1 }, + { label: '年', value: 2 }, + ] + }, + }, + { + label: '适用场景', + fieldName: 'scene', + component: 'Input', + rules: 'required', + }, + { + label: '价格体系', + fieldName: 'price', + component: 'Input', + }, + { + label: '基础服务项', + fieldName: 'price', + component: 'Select', + }, + { + label: '优惠活动', + fieldName: 'price', + component: 'Input', + }, + { + label: '状态', + fieldName: 'state', + component: 'Select', + componentProps: { + // 可选从DictEnum中获取 DictEnum.WY_KG 便于维护 + options: getDictOptions('wy_kg'), + }, + rules: 'selectRequired', + }, + { + label: '备注', + fieldName: 'remarks', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/index.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/index.vue index 98ae2a19..808bea8a 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/index.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/index.vue @@ -1,5 +1,182 @@ + + \ No newline at end of file + + + + + + + + diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue new file mode 100644 index 00000000..18c8f072 --- /dev/null +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index a431183e..8f148ea3 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -28,6 +28,7 @@ export default defineConfig(async () => { rewrite: (path) => path.replace(/^\/api/, ''), // mock代理目标地址 // target: 'http://by.missmoc.top:3010/', + // target: 'http://127.0.0.1:8080/', target: 'http://47.109.37.87:3010', ws: true, },