From 05b9e45aa0d45f6eba99641d0d32b428c0638ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E4=B8=87=E4=BF=8A?= Date: Wed, 14 Jan 2026 13:14:57 +0800 Subject: [PATCH] =?UTF-8?q?feat/=E5=8D=95=E4=BD=8D=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=90=83=E6=9C=BA=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/camera.js | 50 ++ src/api/unit.js | 59 ++ src/api/upload.js | 28 + .../Tenement/BallheadCamera/StandingBook.vue | 378 ++++++++++-- .../AccountManagement.vue | 583 ++++++++++++++++-- .../EnterpriseManagement/NewEnterprise.vue | 289 ++++++++- .../Tenement/EnterpriseManagement/index.vue | 259 ++++++-- 7 files changed, 1463 insertions(+), 183 deletions(-) create mode 100644 src/api/camera.js create mode 100644 src/api/unit.js create mode 100644 src/api/upload.js diff --git a/src/api/camera.js b/src/api/camera.js new file mode 100644 index 0000000..ad39fd8 --- /dev/null +++ b/src/api/camera.js @@ -0,0 +1,50 @@ +/* + * @Author: 季万俊 + * @Date: 2026-01-13 19:12:20 + * @Description: 球机台账相关接口 + */ +import request from '@/utils/request' + +// 查询相机台账列表 +export function listCameraLedger(query) { + return request({ + url: '/manage/camera/ledger/list', + method: 'get', + params: query + }) +} + +// 新增相机台账 +export function addCameraLedger(data) { + return request({ + url: '/manage/camera/ledger', + method: 'post', + data: data + }) +} + +// 获取相机台账详情 +export function getCameraLedger(cameraId) { + return request({ + url: '/manage/camera/ledger/' + cameraId, + method: 'get' + }) +} + +// 修改相机台账 +export function updateCameraLedger(data) { + return request({ + url: '/manage/camera/ledger', + method: 'put', + data: data + }) +} + +// 删除相机台账 +export function delCameraLedger(cameraIds) { + return request({ + url: '/manage/camera/ledger/' + cameraIds, + method: 'delete' + }) +} + diff --git a/src/api/unit.js b/src/api/unit.js new file mode 100644 index 0000000..da21734 --- /dev/null +++ b/src/api/unit.js @@ -0,0 +1,59 @@ +/* + * @Author: 季万俊 + * @Date: 2026-01-13 19:12:20 + * @Description: + */ +import request from '@/utils/request' + +// 查询单位档案列表 +export function listUnitArchive(query) { + return request({ + url: '/manage/unit/archive/list', + method: 'get', + params: query + }) +} + +// 新增单位档案 +export function addUnitArchive(data) { + return request({ + url: '/manage/unit/archive', + method: 'post', + data: data + }) +} + +// 获取单位档案详情 +export function getUnitArchive(unitId) { + return request({ + url: '/manage/unit/archive/' + unitId, + method: 'get' + }) +} + +// 修改单位档案 +export function updateUnitArchive(data) { + return request({ + url: '/manage/unit/archive', + method: 'put', + data: data + }) +} + +// 删除单位档案 +export function delUnitArchive(unitIds) { + return request({ + url: '/manage/unit/archive/' + unitIds, + method: 'delete' + }) +} + +// 修改单位档案状态 +export function changeUnitArchiveStatus(data) { + return request({ + url: '/manage/unit/archive/changeStatus', + method: 'put', + data: data + }) +} + diff --git a/src/api/upload.js b/src/api/upload.js new file mode 100644 index 0000000..e048de8 --- /dev/null +++ b/src/api/upload.js @@ -0,0 +1,28 @@ +/* + * @Author: 季万俊 + * @Date: 2026-01-13 19:12:20 + * @Description: 文件上传相关接口 + */ +import request from '@/utils/request' + +/** + * 通用文件上传 + * @param {File} file - 要上传的文件对象 + * @returns {Promise} 返回上传结果 + */ +export function uploadFile(file) { + const formData = new FormData() + formData.append('file', file) + + return request({ + url: '/file/upload', + method: 'post', + data: formData, + headers: { + 'Content-Type': 'multipart/form-data' + }, + // 禁用防重复提交,因为文件上传需要特殊处理 + repeatSubmit: false + }) +} + diff --git a/src/views/Tenement/BallheadCamera/StandingBook.vue b/src/views/Tenement/BallheadCamera/StandingBook.vue index 3856b60..e9a2ebb 100644 --- a/src/views/Tenement/BallheadCamera/StandingBook.vue +++ b/src/views/Tenement/BallheadCamera/StandingBook.vue @@ -3,11 +3,51 @@
- 新增球机 + 新增球机 批量导入球机 导出台账
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 重置 - 查询 + 重置 + 查询
- - - - + + + + - + +
- 显示第 {{ (pageNum - 1) * pageSize + 1 }} 到 {{ pageNum * pageSize }} 条记录,共 {{ + 显示第 {{ (pageNum - 1) * pageSize + 1 }} 到 {{ Math.min(pageNum * pageSize, total) }} 条记录,共 {{ total }} 条 + :total="total" layout="prev, pager, next" @size-change="handleSizeChange" @current-change="handlePageChange">
@@ -72,7 +113,16 @@