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/.env.production b/apps/web-antd/.env.production index 0c309145..5fa61183 100644 --- a/apps/web-antd/.env.production +++ b/apps/web-antd/.env.production @@ -16,10 +16,10 @@ VITE_INJECT_APP_LOADING=true VITE_ARCHIVER=true # 后端接口地址 -VITE_GLOB_API_URL=/prod-api +VITE_GLOB_API_URL=/api # 全局加密开关(即开启了加解密功能才会生效 不是全部接口加密 需要和后端对应) -VITE_GLOB_ENABLE_ENCRYPT=true +VITE_GLOB_ENABLE_ENCRYPT=false # RSA公钥 请求加密使用 注意这两个是两对RSA公私钥 请求加密-后端解密是一对 响应解密-后端加密是一对 VITE_GLOB_RSA_PUBLIC_KEY=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ== # RSA私钥 响应解密使用 注意这两个是两对RSA公私钥 请求加密-后端解密是一对 响应解密-后端加密是一对 diff --git a/apps/web-antd/src/api/property/application/index.ts b/apps/web-antd/src/api/property/assetManage/application/index.ts similarity index 100% rename from apps/web-antd/src/api/property/application/index.ts rename to apps/web-antd/src/api/property/assetManage/application/index.ts diff --git a/apps/web-antd/src/api/property/application/model.d.ts b/apps/web-antd/src/api/property/assetManage/application/model.d.ts similarity index 100% rename from apps/web-antd/src/api/property/application/model.d.ts rename to apps/web-antd/src/api/property/assetManage/application/model.d.ts diff --git a/apps/web-antd/src/api/property/asset/index.ts b/apps/web-antd/src/api/property/assetManage/asset/index.ts similarity index 100% rename from apps/web-antd/src/api/property/asset/index.ts rename to apps/web-antd/src/api/property/assetManage/asset/index.ts diff --git a/apps/web-antd/src/api/property/asset/model.d.ts b/apps/web-antd/src/api/property/assetManage/asset/model.d.ts similarity index 100% rename from apps/web-antd/src/api/property/asset/model.d.ts rename to apps/web-antd/src/api/property/assetManage/asset/model.d.ts diff --git a/apps/web-antd/src/api/property/depot/index.ts b/apps/web-antd/src/api/property/assetManage/depot/index.ts similarity index 100% rename from apps/web-antd/src/api/property/depot/index.ts rename to apps/web-antd/src/api/property/assetManage/depot/index.ts diff --git a/apps/web-antd/src/api/property/depot/model.d.ts b/apps/web-antd/src/api/property/assetManage/depot/model.d.ts similarity index 100% rename from apps/web-antd/src/api/property/depot/model.d.ts rename to apps/web-antd/src/api/property/assetManage/depot/model.d.ts diff --git a/apps/web-antd/src/api/property/log/index.ts b/apps/web-antd/src/api/property/assetManage/log/index.ts similarity index 100% rename from apps/web-antd/src/api/property/log/index.ts rename to apps/web-antd/src/api/property/assetManage/log/index.ts diff --git a/apps/web-antd/src/api/property/log/model.d.ts b/apps/web-antd/src/api/property/assetManage/log/model.d.ts similarity index 100% rename from apps/web-antd/src/api/property/log/model.d.ts rename to apps/web-antd/src/api/property/assetManage/log/model.d.ts diff --git a/apps/web-antd/src/api/property/suppliers/index.ts b/apps/web-antd/src/api/property/assetManage/suppliers/index.ts similarity index 100% rename from apps/web-antd/src/api/property/suppliers/index.ts rename to apps/web-antd/src/api/property/assetManage/suppliers/index.ts diff --git a/apps/web-antd/src/api/property/suppliers/model.d.ts b/apps/web-antd/src/api/property/assetManage/suppliers/model.d.ts similarity index 100% rename from apps/web-antd/src/api/property/suppliers/model.d.ts rename to apps/web-antd/src/api/property/assetManage/suppliers/model.d.ts 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/accessControl-modal.vue b/apps/web-antd/src/views/property/accessControl/device/accessControlModal.vue similarity index 100% rename from apps/web-antd/src/views/property/accessControl/device/accessControl-modal.vue rename to apps/web-antd/src/views/property/accessControl/device/accessControlModal.vue 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..aec4898c 100644 --- a/apps/web-antd/src/views/property/accessControl/device/data.ts +++ b/apps/web-antd/src/views/property/accessControl/device/data.ts @@ -1,100 +1,49 @@ -import type { FormSchemaGetter } from '#/adapter/form'; -import type { VxeGridProps } from '#/adapter/vxe-table'; +import type {FormSchemaGetter} from '#/adapter/form'; +import type {VxeGridProps} from '#/adapter/vxe-table'; -import { getDictOptions } from '#/utils/dict'; -import { renderDict } from '#/utils/render'; +import {getDictOptions} from '#/utils/dict'; +import {renderDict} from '#/utils/render'; export const querySchema: FormSchemaGetter = () => [ { component: 'Input', fieldName: 'accessCode', - label: '门禁设备编码', + label: '设备编码', }, { component: 'Input', fieldName: 'accessName', - label: '门禁名称', - }, - { - component: 'Input', - fieldName: 'communityCode', - label: '园区编码', - }, - { - component: 'Input', - fieldName: 'buildingCode', - label: '建筑编码', - }, - { - component: 'Input', - fieldName: 'accessIp', - label: '门禁设备ip', - }, - { - component: 'Input', - fieldName: 'accessPort', - label: '端口', - }, - { - component: 'Input', - fieldName: 'accssType', - label: '门禁设备类型', - }, - { - component: 'Input', - fieldName: 'factoryCode', - label: '工厂编码', + label: '设备名称', }, { component: 'Select', + fieldName: 'controlType', componentProps: { - // 可选从DictEnum中获取 DictEnum.WY_KZKLX 便于维护 options: getDictOptions('wy_kzklx'), }, - fieldName: 'controlType', - label: '控制卡类型:1-系统,2-E8', - }, - { - component: 'Input', - fieldName: 'controlCode', - label: '控制卡类型编码', - }, - { - component: 'Input', - fieldName: 'outCode', - label: '外部编码', - }, - { - component: 'Input', - fieldName: 'orgCode', - label: '组织编码', - }, - { - component: 'Input', - fieldName: 'dataState', - label: '数据状态:1有效,0无效', - }, - { - component: 'Input', - fieldName: 'searchValue', - label: '搜索值', + label: '控制卡类型', }, ]; // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 // export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ - { type: 'checkbox', width: 60 }, + {type: 'checkbox', width: 60}, { - title: '主键', + title: '序号', field: 'id', + slots: { + default: ({rowIndex}) => { + return rowIndex + 1; + }, + }, }, { - title: '门禁设备编码', + title: '设备编码', field: 'accessCode', }, { - title: '门禁名称', + title: '设备名称', field: 'accessName', }, { @@ -106,7 +55,7 @@ export const columns: VxeGridProps['columns'] = [ field: 'buildingCode', }, { - title: '门禁设备ip', + title: '设备IP', field: 'accessIp', }, { @@ -114,19 +63,18 @@ export const columns: VxeGridProps['columns'] = [ field: 'accessPort', }, { - title: '门禁设备类型', - field: 'accssType', + title: '设备类型', + field: 'accessType', }, { title: '工厂编码', field: 'factoryCode', }, { - title: '控制卡类型:1-系统,2-E8', + title: '控制卡类型', field: 'controlType', slots: { - default: ({ row }) => { - // 可选从DictEnum中获取 DictEnum.WY_KZKLX 便于维护 + default: ({row}) => { return renderDict(row.controlType, 'wy_kzklx'); }, }, @@ -143,18 +91,10 @@ export const columns: VxeGridProps['columns'] = [ title: '组织编码', field: 'orgCode', }, - { - title: '数据状态:1有效,0无效', - field: 'dataState', - }, - { - title: '搜索值', - field: 'searchValue', - }, { field: 'action', fixed: 'right', - slots: { default: 'action' }, + slots: {default: 'action'}, title: '操作', width: 180, }, @@ -171,13 +111,13 @@ export const modalSchema: FormSchemaGetter = () => [ }, }, { - label: '门禁设备编码', + label: '设备编码', fieldName: 'accessCode', component: 'Input', rules: 'required', }, { - label: '门禁名称', + label: '设备名称', fieldName: 'accessName', component: 'Input', rules: 'required', @@ -195,7 +135,7 @@ export const modalSchema: FormSchemaGetter = () => [ rules: 'required', }, { - label: '门禁设备ip', + label: '设备IP', fieldName: 'accessIp', component: 'Input', }, @@ -205,8 +145,8 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', }, { - label: '门禁设备类型', - fieldName: 'accssType', + label: '设备类型', + fieldName: 'accessType', component: 'Input', rules: 'required', }, @@ -217,7 +157,7 @@ export const modalSchema: FormSchemaGetter = () => [ rules: 'required', }, { - label: '控制卡类型:1-系统,2-E8', + label: '控制卡类型', fieldName: 'controlType', component: 'Select', componentProps: { @@ -242,15 +182,4 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', rules: 'required', }, - { - label: '数据状态:1有效,0无效', - fieldName: 'dataState', - component: 'Input', - rules: 'required', - }, - { - label: '搜索值', - fieldName: 'searchValue', - component: 'Input', - }, ]; diff --git a/apps/web-antd/src/views/property/accessControl/device/index.vue b/apps/web-antd/src/views/property/accessControl/device/index.vue index 75d41e97..585d04cd 100644 --- a/apps/web-antd/src/views/property/accessControl/device/index.vue +++ b/apps/web-antd/src/views/property/accessControl/device/index.vue @@ -9,10 +9,10 @@ import { getVxePopupContainer } from '@vben/utils'; import { Modal, Popconfirm, Space } from 'ant-design-vue'; import dayjs from 'dayjs'; -import { +import { useVbenVxeGrid, vxeCheckboxChecked, - type VxeGridProps + type VxeGridProps } from '#/adapter/vxe-table'; import { @@ -23,12 +23,12 @@ import { import type { AccessControlForm } from '#/api/property/accessControl/model'; import { commonDownloadExcel } from '#/utils/file/download'; -import accessControlModal from './accessControl-modal.vue'; +import accessControlModal from './accessControlModal.vue'; import { columns, querySchema } from './data'; const formOptions: VbenFormProps = { commonConfig: { - labelWidth: 80, + labelWidth: 100, componentProps: { allowClear: true, }, @@ -126,7 +126,7 @@ function handleDownloadExcel() {