From 4139af56733db0d86bf7ef9c14122dbb75e8be29 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Wed, 20 Aug 2025 14:26:59 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=E9=A2=84=E8=A7=88=E9=97=AE=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../questionnaire/questionnaire-detail.vue | 5 ++--- .../elctricitySituation/floor-tree.vue | 15 ++++----------- .../electricEnergy/elctricitySituation/index.vue | 5 +++-- .../property/waterPower/waterSituation/index.vue | 5 +++-- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/apps/web-antd/src/views/property/customerService/questionnaire/questionnaire-detail.vue b/apps/web-antd/src/views/property/customerService/questionnaire/questionnaire-detail.vue index ee62df03..1b4394f2 100644 --- a/apps/web-antd/src/views/property/customerService/questionnaire/questionnaire-detail.vue +++ b/apps/web-antd/src/views/property/customerService/questionnaire/questionnaire-detail.vue @@ -1,5 +1,5 @@ @@ -87,13 +87,6 @@ onMounted(loadTree); From 28d6a77848893c17c47eaff63aff5bf86aed41d3 Mon Sep 17 00:00:00 2001 From: bichangxiong <3057647414@qq.com> Date: Wed, 20 Aug 2025 14:42:45 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/dev.y?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index b0900e97..76dec171 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -18,7 +18,6 @@ jobs: run: npm i pnpm -g - name: node run: | - pnpm config set registry https://registry.npmmirror.com pnpm install - name: Build From 4b3ed5c2d5f2777e9f179a7d0cad0947c606dea6 Mon Sep 17 00:00:00 2001 From: bichangxiong <3057647414@qq.com> Date: Wed, 20 Aug 2025 14:53:47 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/dev.y?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 76dec171..aea22546 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -27,7 +27,7 @@ jobs: with: host: 127.0.0.1 username: ${ { SERVER_NAME } } - password: ${{ SERVER_PWD}} + password: ${ { SERVER_PWD } } port: 11001 source: "./apps/web-antd/dist" target: "/www/wwwroot/183.230.235.66_11010/property" From 3d1681e8115517e0551bc754d049c113c7db8e66 Mon Sep 17 00:00:00 2001 From: bichangxiong <3057647414@qq.com> Date: Wed, 20 Aug 2025 15:11:14 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/dev.y?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yml | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index aea22546..416b395c 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -10,27 +10,39 @@ jobs: - name: 拉取代码仓库 uses: http://git.missmoc.top/mocheng/checkout@v4 - - name: Set up Node.js ${{ matrix.node-version }} + - name: Set up Node.js uses: http://git.missmoc.top/mocheng/setup-node@v3 with: node-version: 20.x - - name: pnpm + + - name: 安装pnpm run: npm i pnpm -g - - name: node - run: | - pnpm install - - - name: Build + + - name: 安装依赖 + run: pnpm install + continue-on-error: false # 依赖安装失败则终止工作流 + + - name: 构建项目 run: pnpm build:antd - - name: copy file via ssh password + continue-on-error: false # 构建失败则终止工作流 + + - name: 检查构建结果 + run: | + if [ ! -d "./apps/web-antd/dist" ]; then + echo "构建目录不存在,构建失败" + exit 1 + fi + if [ -z "$(ls -A ./apps/web-antd/dist)" ]; then + echo "构建目录为空,构建失败" + exit 1 + fi + + - name: 通过SSH复制文件 uses: http://git.missmoc.top/mocheng/scp-action@v0.1.7 with: host: 127.0.0.1 - username: ${ { SERVER_NAME } } - password: ${ { SERVER_PWD } } + username: ${{ secrets.SERVER_NAME }} # 使用secrets存储 + password: ${{ secrets.SERVER_PWD }} # 使用secrets存储 port: 11001 source: "./apps/web-antd/dist" target: "/www/wwwroot/183.230.235.66_11010/property" - - - From 81fc3bf2ca93f8a89d49af6b24c1cf0a7ff278f3 Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Wed, 20 Aug 2025 17:23:13 +0800 Subject: [PATCH 5/7] =?UTF-8?q?feat(property):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=81=AF=E6=8E=A7=E5=BC=80=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/property/meter/lightInfo/index.ts | 18 +++ .../api/property/meter/lightInfo/model.d.ts | 4 +- .../views/property/meter/lightInfo/data.ts | 3 +- .../views/property/meter/lightInfo/index.vue | 125 +++++++----------- 4 files changed, 71 insertions(+), 79 deletions(-) diff --git a/apps/web-antd/src/api/property/meter/lightInfo/index.ts b/apps/web-antd/src/api/property/meter/lightInfo/index.ts index 2fadc30b..967d8973 100644 --- a/apps/web-antd/src/api/property/meter/lightInfo/index.ts +++ b/apps/web-antd/src/api/property/meter/lightInfo/index.ts @@ -59,3 +59,21 @@ export function lightInfoUpdate(data: LightInfoForm) { export function lightInfoRemove(id: ID | IDS) { return requestClient.deleteWithMsg(`/property/lightInfo/${id}`); } + +/** + * 更新灯控开关状态 + * @param data + * @returns void + */ +export function switchSingleLight(data: LightInfoForm) { + return requestClient.postWithMsg('/property/lightInfo/switch', data); +} + +/** + * 批量更新灯控开关状态 + * @param data + * @returns void + */ +export function switchBatchLight(data: LightInfoForm) { + return requestClient.postWithMsg('/property/lightInfo/switch', data); +} diff --git a/apps/web-antd/src/api/property/meter/lightInfo/model.d.ts b/apps/web-antd/src/api/property/meter/lightInfo/model.d.ts index ef05cda9..8afa0016 100644 --- a/apps/web-antd/src/api/property/meter/lightInfo/model.d.ts +++ b/apps/web-antd/src/api/property/meter/lightInfo/model.d.ts @@ -14,7 +14,7 @@ export interface LightInfoVO { /** * 开关状态(0:关,1:开) */ - isOn: number; + isOn: boolean; /** * 灯控模块编码 @@ -62,7 +62,7 @@ export interface LightInfoForm extends BaseEntity { /** * 开关状态(0:关,1:开) */ - isOn?: number; + isOn: boolean; /** * 灯控模块编码 diff --git a/apps/web-antd/src/views/property/meter/lightInfo/data.ts b/apps/web-antd/src/views/property/meter/lightInfo/data.ts index ac1f4be5..301c2b62 100644 --- a/apps/web-antd/src/views/property/meter/lightInfo/data.ts +++ b/apps/web-antd/src/views/property/meter/lightInfo/data.ts @@ -22,7 +22,6 @@ export const columns: VxeGridProps['columns'] = [ title: '位置描述', field: 'locationRemark', }, - { title: '楼 层', field: 'floorName', @@ -30,7 +29,7 @@ export const columns: VxeGridProps['columns'] = [ { title: '开关状态', field: 'isOn', - slots: { default: 'isOn' }, + slots: { default: 'isOn' }, }, { field: 'action', diff --git a/apps/web-antd/src/views/property/meter/lightInfo/index.vue b/apps/web-antd/src/views/property/meter/lightInfo/index.vue index 27854764..3d08c9c0 100644 --- a/apps/web-antd/src/views/property/meter/lightInfo/index.vue +++ b/apps/web-antd/src/views/property/meter/lightInfo/index.vue @@ -1,26 +1,27 @@ @@ -125,55 +117,38 @@ function handleDownloadExcel() { From 006471bb1ed038197b4007390b4f03f6856a61af Mon Sep 17 00:00:00 2001 From: mocheng <3057647414@qq.com> Date: Thu, 21 Aug 2025 12:07:34 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=88=B7=E6=96=B0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-workspace.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 218fe203..a3870ee2 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -187,7 +187,7 @@ catalog: vue-tippy: ^6.7.0 vue-tsc: 2.2.10 vxe-pc-ui: ^4.5.35 - vxe-table: ^4.13.16 + vxe-table: 4.13.53 watermark-js-plus: ^1.6.0 zod: ^3.24.3 zod-defaults: ^0.1.3 From e750414f0243b10d5b8d8355b400637b47bb3f3b Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Thu, 21 Aug 2025 12:36:41 +0800 Subject: [PATCH 7/7] =?UTF-8?q?feat(property):=20=E7=89=A9=E4=B8=9A?= =?UTF-8?q?=E7=81=AF=E6=8E=A7=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=B7=A6=E4=BE=A7=E7=A4=BE=E5=8C=BA=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/meter/lightInfo/floor-tree.vue | 81 +++++++++++++ .../views/property/meter/lightInfo/index.vue | 107 ++++++++++-------- .../src/authentication/authentication.vue | 1 + 3 files changed, 144 insertions(+), 45 deletions(-) create mode 100644 apps/web-antd/src/views/property/meter/lightInfo/floor-tree.vue diff --git a/apps/web-antd/src/views/property/meter/lightInfo/floor-tree.vue b/apps/web-antd/src/views/property/meter/lightInfo/floor-tree.vue new file mode 100644 index 00000000..a09da13c --- /dev/null +++ b/apps/web-antd/src/views/property/meter/lightInfo/floor-tree.vue @@ -0,0 +1,81 @@ + + + diff --git a/apps/web-antd/src/views/property/meter/lightInfo/index.vue b/apps/web-antd/src/views/property/meter/lightInfo/index.vue index 3d08c9c0..a31dd952 100644 --- a/apps/web-antd/src/views/property/meter/lightInfo/index.vue +++ b/apps/web-antd/src/views/property/meter/lightInfo/index.vue @@ -2,8 +2,14 @@ import { TableSwitch } from "#/components/table" import { Page, useVbenDrawer, type VbenFormProps } from '@vben/common-ui' +import { getVxePopupContainer } from '@vben/utils'; + +import { ref } from 'vue' +import { columns, querySchema } from './data' import { Modal, Popconfirm, Space } from 'ant-design-vue' +import FloorTree from "./floor-tree.vue" +import lightInfoDrawer from './lightInfo-drawer.vue' import { useVbenVxeGrid, @@ -13,15 +19,13 @@ import { import { lightInfoList, - lightInfoExport, lightInfoRemove, switchSingleLight, } from '#/api/property/meter/lightInfo' import type { LightInfoForm } from '#/api/property/meter/lightInfo/model' -import { commonDownloadExcel } from '#/utils/file/download' -import lightInfoDrawer from './lightInfo-drawer.vue' -import { columns, querySchema } from './data' +// 左边楼层用 +const selectFloorId = ref([]) const formOptions: VbenFormProps = { commonConfig: { @@ -32,6 +36,15 @@ const formOptions: VbenFormProps = { }, schema: querySchema(), wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4', + handleReset: async () => { + selectFloorId.value = [] + + const { formApi, reload } = tableApi + await formApi.resetForm() + const formValues = formApi.form.values + formApi.setLatestSubmissionValues(formValues) + await reload(formValues) + }, } const gridOptions: VxeGridProps = { @@ -52,6 +65,12 @@ const gridOptions: VxeGridProps = { proxyConfig: { ajax: { query: async ({ page }, formValues = {}) => { + // 部门树选择处理 + if (selectFloorId.value.length === 1) { + formValues.floorId = selectFloorId.value[0] + } else { + Reflect.deleteProperty(formValues, 'deptId') + } return await lightInfoList({ pageNum: page.currentPage, pageSize: page.pageSize, @@ -104,53 +123,51 @@ function handleMultiDelete() { }, }) } - -function handleDownloadExcel() { - commonDownloadExcel(lightInfoExport, '灯控开关信息数据', tableApi.formApi.form.values, { - fieldMappingTime: formOptions.fieldMappingTime, - }) -} diff --git a/packages/effects/layouts/src/authentication/authentication.vue b/packages/effects/layouts/src/authentication/authentication.vue index 6ca39198..6dcac873 100644 --- a/packages/effects/layouts/src/authentication/authentication.vue +++ b/packages/effects/layouts/src/authentication/authentication.vue @@ -137,6 +137,7 @@ const handleAccountLogin = async () => { type="password" placeholder="请输入您的密码" v-model="password" + @keyup.enter="handleAccountLogin" />