From d95678841ce415e90fb28288562aa716a214446b Mon Sep 17 00:00:00 2001 From: andy <1042025947@qq.com> Date: Fri, 7 Aug 2026 14:54:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9D=83=E9=99=90?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/permissionConfig.ts | 72 ++++ src/router/index.ts | 8 +- src/views/biz/permissionConfig/index.vue | 452 +++++++++++++++++++++++ 3 files changed, 531 insertions(+), 1 deletion(-) create mode 100644 src/api/permissionConfig.ts create mode 100644 src/views/biz/permissionConfig/index.vue diff --git a/src/api/permissionConfig.ts b/src/api/permissionConfig.ts new file mode 100644 index 0000000..c38cc5a --- /dev/null +++ b/src/api/permissionConfig.ts @@ -0,0 +1,72 @@ +import { request } from '@/utils/request' + +// 数据权限配置 类型定义 +export interface PermissionConfig { + id?: number + + mapperKey?: string + + controlMethod?: string + + permissionControl?: string + +} + +// 数据权限配置 API +export const permissionConfigApi = { + // 分页查询 + page(params: { page: number; pageSize: number; mapperKey?: string; controlMethod?: string }) { + return request({ url: '/biz/permissionConfig/page', method: 'get', params }) + }, + + // 新增 + options() { + return request({ url: '/biz/permissionConfig/options', method: 'get' }) + }, + + // 获取详情 + detail(id: string) { + return request({ url: `/biz/permissionConfig/${id}`, method: 'get' }) + }, + + // 新增 + create(data: PermissionConfig) { + return request({ url: '/biz/permissionConfig', method: 'post', data }) + }, + + // 修改 + update(data: PermissionConfig) { + return request({ url: '/biz/permissionConfig', method: 'put', data }) + }, + + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/permissionConfig/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: string[]; mapperKey?: string; controlMethod?: string }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + if (params?.mapperKey !== undefined && params?.mapperKey !== null) p.mapperKey = params.mapperKey + if (params?.controlMethod !== undefined && params?.controlMethod !== null) p.controlMethod = params.controlMethod + return request({ url: `/biz/permissionConfig/export`, method: 'get', params: p, responseType: 'blob' }) + }, + + // 导入 + importData(file: File) { + const formData = new FormData() + formData.append('file', file) + return request<{ success: number; fail: number; errors: string[] }>({ + url: `/biz/permissionConfig/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/permissionConfig/template`, method: 'get', responseType: 'blob' }) + } +} diff --git a/src/router/index.ts b/src/router/index.ts index da9b3f5..8347676 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -216,6 +216,12 @@ const routes: RouteRecordRaw[] = [ meta: { title: '设备状态监控', icon: 'PulseOutline' } }, // 开发工具 + { + path: 'biz/permissionConfig', + name: 'permissionConfig', + component: () => import('@/views/biz/permissionConfig/index.vue'), + meta: { title: '数据权限配置', icon: 'ListOutline' } + }, { path: 'tool/gen', name: 'ToolGen', @@ -404,4 +410,4 @@ router.beforeEach(async (to, _from, next) => { }) -export default router \ No newline at end of file +export default router diff --git a/src/views/biz/permissionConfig/index.vue b/src/views/biz/permissionConfig/index.vue new file mode 100644 index 0000000..44a3874 --- /dev/null +++ b/src/views/biz/permissionConfig/index.vue @@ -0,0 +1,452 @@ + + + + + From caf8dacebd3063b33c4026d088548e74ddfd1339 Mon Sep 17 00:00:00 2001 From: andy <1042025947@qq.com> Date: Fri, 7 Aug 2026 14:55:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dashboard.ts | 46 +++ src/api/errorNotification.ts | 4 + src/views/NCcode/index.vue | 2 +- src/views/biz/errorNotification/index.vue | 363 ++++++++++++++++++---- src/views/dashboard/index.vue | 123 +++++--- vite.config.ts | 4 +- 6 files changed, 441 insertions(+), 101 deletions(-) create mode 100644 src/api/dashboard.ts diff --git a/src/api/dashboard.ts b/src/api/dashboard.ts new file mode 100644 index 0000000..0153286 --- /dev/null +++ b/src/api/dashboard.ts @@ -0,0 +1,46 @@ +import { request } from '@/utils/request' + + + +//工单统计 +export function getorders() { + return request({ + url: '/biz/dashboard/total-orders', + method: 'get' + }) +} + +export function getsctotal(params:any) { + return request({ + url: '/biz/dashboard/stats', + method: 'get', + params + }) +} + +//获取产能达成率 +export function getachievement(params:any) { + return request({ + url: '/biz/dashboard/achievement-rate', + method: 'get', + params + }) +} + +// 累计质检异常列表 +export function getquality(params:any) { + return request({ + url: '/biz/dashboard/total-quality-list', + method: 'get', + params + }) +} + +// 未关闭质检异常列表 +export function getopenquality(params:any) { + return request({ + url: 'biz/dashboard/open-quality-list', + method: 'get', + params + }) +} \ No newline at end of file diff --git a/src/api/errorNotification.ts b/src/api/errorNotification.ts index 526afaf..485a300 100644 --- a/src/api/errorNotification.ts +++ b/src/api/errorNotification.ts @@ -79,5 +79,9 @@ export const errorNotificationApi = { // 下载导入模板 downloadTemplate() { return request({ url: `/biz/errorNotification/template`, method: 'get', responseType: 'blob' }) + }, + //获取检查项 + getopt() { + return request({ url: `/biz/errorNotification/options`, method: 'get' }) } } \ No newline at end of file diff --git a/src/views/NCcode/index.vue b/src/views/NCcode/index.vue index 2e82b9e..179e740 100644 --- a/src/views/NCcode/index.vue +++ b/src/views/NCcode/index.vue @@ -860,7 +860,7 @@ function issuehand(row:any) { issueModel.value = true issarr = [] ncid = row.id - ncCode.value = row.code + ncCode.value = row.ncCode } diff --git a/src/views/biz/errorNotification/index.vue b/src/views/biz/errorNotification/index.vue index bd47e00..0e0e07e 100644 --- a/src/views/biz/errorNotification/index.vue +++ b/src/views/biz/errorNotification/index.vue @@ -4,6 +4,9 @@
+ + + @@ -26,7 +29,7 @@ 新增 - +
@@ -46,9 +49,11 @@ :columns="columns" :data="tableData" :loading="loading" + :bordere="false" + striped + remote :pagination="pagination" - :row-key="(row) => row.id" - :scroll-x="1200" + :row-key="(row:any) => row.id" @update:page="handlePageChange" @update:page-size="handlePageSizeChange" @update:checked-row-keys="handleCheck" @@ -56,46 +61,105 @@ - - - - - - - - - - - - - - - - - - {{ opt.label }} - - - - - - - - - - - - - - - - - - - {{ opt.label }} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ opt.label }} + + + + + + + + + + + + + + + + + + + {{ opt.label }} + + + + + + + + + 操作人 + 设备负责人 + 指定人员 + + + + + + + + + + + + + + +