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 @@
+
+
+
+
+
+
+
+
+
+
+ {{ label.substring(0, label.indexOf(searchValue)) }}
+ {{ searchValue }}
+ {{ label.substring(label.indexOf(searchValue) + searchValue.length) }}
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
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,
- })
-}
-
-
-
-
- {{ $t('pages.common.add') }}
-
-
- {{ $t('pages.common.delete') }}
-
-
- 关灯
-
-
- 开灯
-
-
-
-
-
-
- {{ $t('pages.common.edit') }}
-
-
-
+
+
tableApi.reload()" @select="() => tableApi.reload()"
+ v-model:select-floor-id="selectFloorId">
+
+
+
+
+ {{ $t('pages.common.add') }}
+
+
{{ $t('pages.common.delete') }}
+
+
+ 关灯
+
+
+ 开灯
+
+
+
+
+
+
+ {{ $t('pages.common.edit') }}
-
-
-
-
- tableApi.query()" />
-
-
+
+
+ {{ $t('pages.common.delete') }}
+
+
+
+
+
+ tableApi.query()" />
+
+
+
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"
/>