From 053a6d4f69b109e165cb5b183d9e771000f335be Mon Sep 17 00:00:00 2001 From: mocheng <3057647414@qq.com> Date: Tue, 24 Jun 2025 11:11:56 +0800 Subject: [PATCH] cicd --- .gitea/workflows/dev.yml | 22 ++ .../src/api/property/assetType/index.ts | 61 +++++ .../src/api/property/assetType/model.d.ts | 64 +++++ .../src/api/property/booking/index.ts | 61 +++++ .../src/api/property/booking/model.d.ts | 224 ++++++++++++++++++ .../property/accessControl/device/data.ts | 6 +- .../accessControl/permissionRules/data.ts | 6 +- .../accessControl/permissionSettings/data.ts | 6 +- .../property/accessControl/useRecord/data.ts | 6 +- .../property/assetType/assetType-modal.vue | 101 ++++++++ .../src/views/property/assetType/data.ts | 71 ++++++ .../src/views/property/assetType/index.vue | 182 ++++++++++++++ apps/web-antd/vite.config.mts | 2 +- 13 files changed, 799 insertions(+), 13 deletions(-) create mode 100644 .gitea/workflows/dev.yml create mode 100644 apps/web-antd/src/api/property/assetType/index.ts create mode 100644 apps/web-antd/src/api/property/assetType/model.d.ts create mode 100644 apps/web-antd/src/api/property/booking/index.ts create mode 100644 apps/web-antd/src/api/property/booking/model.d.ts create mode 100644 apps/web-antd/src/views/property/assetType/assetType-modal.vue create mode 100644 apps/web-antd/src/views/property/assetType/data.ts create mode 100644 apps/web-antd/src/views/property/assetType/index.vue diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml new file mode 100644 index 00000000..b2969014 --- /dev/null +++ b/.gitea/workflows/dev.yml @@ -0,0 +1,22 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-22.04 + steps: + + - name: Checkout code + uses: http://127.0.0.1:3000/bichangxiong/checkout@v4 # 使用 Gitea 镜像 + with: + fetch-depth: 1 # 只拉取最新一次提交 + - name: node + run: pnpm i + - name: Build + run: pnpm build:antd + - name: cp + run: robocopy ./apps/web-antd/dist C:\devtool\nginx-1.28.0\html\web-antd /E + + + diff --git a/apps/web-antd/src/api/property/assetType/index.ts b/apps/web-antd/src/api/property/assetType/index.ts new file mode 100644 index 00000000..a2d96625 --- /dev/null +++ b/apps/web-antd/src/api/property/assetType/index.ts @@ -0,0 +1,61 @@ +import type { AssetTypeVO, AssetTypeForm, AssetTypeQuery } 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 assetTypeList(params?: AssetTypeQuery) { + return requestClient.get>('/property/assetType/list', { params }); +} + +/** + * 导出资产类型列表 + * @param params + * @returns 资产类型列表 + */ +export function assetTypeExport(params?: AssetTypeQuery) { + return commonExport('/property/assetType/export', params ?? {}); +} + +/** + * 查询资产类型详情 + * @param id id + * @returns 资产类型详情 + */ +export function assetTypeInfo(id: ID) { + return requestClient.get(`/property/assetType/${id}`); +} + +/** + * 新增资产类型 + * @param data + * @returns void + */ +export function assetTypeAdd(data: AssetTypeForm) { + return requestClient.postWithMsg('/property/assetType', data); +} + +/** + * 更新资产类型 + * @param data + * @returns void + */ +export function assetTypeUpdate(data: AssetTypeForm) { + return requestClient.putWithMsg('/property/assetType', data); +} + +/** + * 删除资产类型 + * @param id id + * @returns void + */ +export function assetTypeRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/assetType/${id}`); +} diff --git a/apps/web-antd/src/api/property/assetType/model.d.ts b/apps/web-antd/src/api/property/assetType/model.d.ts new file mode 100644 index 00000000..ad92eb79 --- /dev/null +++ b/apps/web-antd/src/api/property/assetType/model.d.ts @@ -0,0 +1,64 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface AssetTypeVO { + /** + * 主键 + */ + id: string | number; + + /** + * 分类名称 + */ + assetTypeName: string; + + /** + * 排序 + */ + sort: number; + + /** + * 创建时间 + */ + createTime: string; + + /** + * 创建人 + */ + createBy: string; + +} + +export interface AssetTypeForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 分类名称 + */ + assetTypeName?: string; + + /** + * 排序 + */ + sort?: number; + +} + +export interface AssetTypeQuery extends PageQuery { + /** + * 分类名称 + */ + assetTypeName?: string; + + /** + * 排序 + */ + sort?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/booking/index.ts b/apps/web-antd/src/api/property/booking/index.ts new file mode 100644 index 00000000..bb0dc6b5 --- /dev/null +++ b/apps/web-antd/src/api/property/booking/index.ts @@ -0,0 +1,61 @@ +import type { BookingVO, BookingForm, BookingQuery } 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 bookingList(params?: BookingQuery) { + return requestClient.get>('/property/booking/list', { params }); +} + +/** + * 导出会议预约列表 + * @param params + * @returns 会议预约列表 + */ +export function bookingExport(params?: BookingQuery) { + return commonExport('/property/booking/export', params ?? {}); +} + +/** + * 查询会议预约详情 + * @param id id + * @returns 会议预约详情 + */ +export function bookingInfo(id: ID) { + return requestClient.get(`/property/booking/${id}`); +} + +/** + * 新增会议预约 + * @param data + * @returns void + */ +export function bookingAdd(data: BookingForm) { + return requestClient.postWithMsg('/property/booking', data); +} + +/** + * 更新会议预约 + * @param data + * @returns void + */ +export function bookingUpdate(data: BookingForm) { + return requestClient.putWithMsg('/property/booking', data); +} + +/** + * 删除会议预约 + * @param id id + * @returns void + */ +export function bookingRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/booking/${id}`); +} diff --git a/apps/web-antd/src/api/property/booking/model.d.ts b/apps/web-antd/src/api/property/booking/model.d.ts new file mode 100644 index 00000000..9560c1ab --- /dev/null +++ b/apps/web-antd/src/api/property/booking/model.d.ts @@ -0,0 +1,224 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface BookingVO { + /** + * 主键 + */ + id: string | number; + + /** + * 会议室名称 + */ + name: string; + + /** + * 会议室id + */ + meetId: string | number; + + /** + * 会议室地址 + */ + meetLocation: string; + + /** + * 所属单位 + */ + unit: string; + + /** + * 预定人 + */ + person: string; + + /** + * 联系方式 + */ + phone: string; + + /** + * 预定开始时间 + */ + scheduledStarttime: string; + + /** + * 预定结束时间 + */ + scheduledEndtime: string; + + /** + * 参会人数 + */ + personSum: number; + + /** + * 费用 + */ + price: number; + + /** + * 是否包含增值服务 + */ + attach: number; + + /** + * 支付状态 + */ + payState: number; + + /** + * 状态 + */ + state: number; + + /** + * 创建时间 + */ + createTime: string; + +} + +export interface BookingForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 会议室名称 + */ + name?: string; + + /** + * 会议室id + */ + meetId?: string | number; + + /** + * 会议室地址 + */ + meetLocation?: string; + + /** + * 所属单位 + */ + unit?: string; + + /** + * 预定人 + */ + person?: string; + + /** + * 联系方式 + */ + phone?: string; + + /** + * 预定开始时间 + */ + scheduledStarttime?: string; + + /** + * 预定结束时间 + */ + scheduledEndtime?: string; + + /** + * 参会人数 + */ + personSum?: number; + + /** + * 费用 + */ + price?: number; + + /** + * 是否包含增值服务 + */ + attach?: number; + + /** + * 支付状态 + */ + payState?: number; + + /** + * 状态 + */ + state?: number; + +} + +export interface BookingQuery extends PageQuery { + /** + * 会议室名称 + */ + name?: string; + + /** + * 会议室id + */ + meetId?: string | number; + + /** + * 会议室地址 + */ + meetLocation?: string; + + /** + * 所属单位 + */ + unit?: string; + + /** + * 预定人 + */ + person?: string; + + /** + * 联系方式 + */ + phone?: string; + + /** + * 预定开始时间 + */ + scheduledStarttime?: string; + + /** + * 预定结束时间 + */ + scheduledEndtime?: string; + + /** + * 参会人数 + */ + personSum?: number; + + /** + * 费用 + */ + price?: number; + + /** + * 是否包含增值服务 + */ + attach?: number; + + /** + * 支付状态 + */ + payState?: number; + + /** + * 状态 + */ + state?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/accessControl/device/data.ts b/apps/web-antd/src/views/property/accessControl/device/data.ts index 3b526b80..44097fbd 100644 --- a/apps/web-antd/src/views/property/accessControl/device/data.ts +++ b/apps/web-antd/src/views/property/accessControl/device/data.ts @@ -37,7 +37,7 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Input', - fieldName: 'accssType', + fieldName: 'accessType', label: '门禁设备类型', }, { @@ -115,7 +115,7 @@ export const columns: VxeGridProps['columns'] = [ }, { title: '门禁设备类型', - field: 'accssType', + field: 'accessType', }, { title: '工厂编码', @@ -206,7 +206,7 @@ export const modalSchema: FormSchemaGetter = () => [ }, { label: '门禁设备类型', - fieldName: 'accssType', + fieldName: 'accessType', component: 'Input', rules: 'required', }, diff --git a/apps/web-antd/src/views/property/accessControl/permissionRules/data.ts b/apps/web-antd/src/views/property/accessControl/permissionRules/data.ts index 3b526b80..44097fbd 100644 --- a/apps/web-antd/src/views/property/accessControl/permissionRules/data.ts +++ b/apps/web-antd/src/views/property/accessControl/permissionRules/data.ts @@ -37,7 +37,7 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Input', - fieldName: 'accssType', + fieldName: 'accessType', label: '门禁设备类型', }, { @@ -115,7 +115,7 @@ export const columns: VxeGridProps['columns'] = [ }, { title: '门禁设备类型', - field: 'accssType', + field: 'accessType', }, { title: '工厂编码', @@ -206,7 +206,7 @@ export const modalSchema: FormSchemaGetter = () => [ }, { label: '门禁设备类型', - fieldName: 'accssType', + fieldName: 'accessType', component: 'Input', rules: 'required', }, diff --git a/apps/web-antd/src/views/property/accessControl/permissionSettings/data.ts b/apps/web-antd/src/views/property/accessControl/permissionSettings/data.ts index 3b526b80..44097fbd 100644 --- a/apps/web-antd/src/views/property/accessControl/permissionSettings/data.ts +++ b/apps/web-antd/src/views/property/accessControl/permissionSettings/data.ts @@ -37,7 +37,7 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Input', - fieldName: 'accssType', + fieldName: 'accessType', label: '门禁设备类型', }, { @@ -115,7 +115,7 @@ export const columns: VxeGridProps['columns'] = [ }, { title: '门禁设备类型', - field: 'accssType', + field: 'accessType', }, { title: '工厂编码', @@ -206,7 +206,7 @@ export const modalSchema: FormSchemaGetter = () => [ }, { label: '门禁设备类型', - fieldName: 'accssType', + fieldName: 'accessType', component: 'Input', rules: 'required', }, diff --git a/apps/web-antd/src/views/property/accessControl/useRecord/data.ts b/apps/web-antd/src/views/property/accessControl/useRecord/data.ts index 3b526b80..44097fbd 100644 --- a/apps/web-antd/src/views/property/accessControl/useRecord/data.ts +++ b/apps/web-antd/src/views/property/accessControl/useRecord/data.ts @@ -37,7 +37,7 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Input', - fieldName: 'accssType', + fieldName: 'accessType', label: '门禁设备类型', }, { @@ -115,7 +115,7 @@ export const columns: VxeGridProps['columns'] = [ }, { title: '门禁设备类型', - field: 'accssType', + field: 'accessType', }, { title: '工厂编码', @@ -206,7 +206,7 @@ export const modalSchema: FormSchemaGetter = () => [ }, { label: '门禁设备类型', - fieldName: 'accssType', + fieldName: 'accessType', component: 'Input', rules: 'required', }, diff --git a/apps/web-antd/src/views/property/assetType/assetType-modal.vue b/apps/web-antd/src/views/property/assetType/assetType-modal.vue new file mode 100644 index 00000000..6eb90814 --- /dev/null +++ b/apps/web-antd/src/views/property/assetType/assetType-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/property/assetType/data.ts b/apps/web-antd/src/views/property/assetType/data.ts new file mode 100644 index 00000000..17d15e47 --- /dev/null +++ b/apps/web-antd/src/views/property/assetType/data.ts @@ -0,0 +1,71 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'assetTypeName', + label: '分类名称', + }, + { + component: 'Input', + fieldName: 'sort', + label: '排序', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '主键', + field: 'id', + }, + { + title: '分类名称', + field: 'assetTypeName', + }, + { + title: '排序', + field: 'sort', + }, + { + title: '创建时间', + field: 'createTime', + }, + { + title: '创建人', + field: 'createBy', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '分类名称', + fieldName: 'assetTypeName', + component: 'Input', + }, + { + label: '排序', + fieldName: 'sort', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/property/assetType/index.vue b/apps/web-antd/src/views/property/assetType/index.vue new file mode 100644 index 00000000..7524251b --- /dev/null +++ b/apps/web-antd/src/views/property/assetType/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index abb1d32e..c8c61629 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -27,7 +27,7 @@ export default defineConfig(async () => { changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), // mock代理目标地址 - target: 'http://127.0.0.1:8080/', + target: 'http://47.109.37.87:3010/', ws: true, }, },