From e36529d7bd3c233363ef96f5782207d72c62f0c1 Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Mon, 16 Jan 2023 18:14:45 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/basis.ts | 6 + src/router/menu.ts | 9 +- src/views/home/modules/config.ts | 6 +- src/views/system/Basis/index.d.ts | 37 ++ src/views/system/Basis/index.vue | 627 ++++++++++++++++++++++++++++++ yarn.lock | 27 ++ 6 files changed, 707 insertions(+), 5 deletions(-) create mode 100644 src/api/system/basis.ts create mode 100644 src/views/system/Basis/index.d.ts create mode 100644 src/views/system/Basis/index.vue diff --git a/src/api/system/basis.ts b/src/api/system/basis.ts new file mode 100644 index 00000000..c8734c43 --- /dev/null +++ b/src/api/system/basis.ts @@ -0,0 +1,6 @@ +import server from '@/utils/request'; + +// 保存 +export const save_api = (data: any) => server.post(`/system/config/scope/_save`, data) +// 获取详情 +export const getDetails_api = (data: any) => server.post(`/system/config/scopes`, data) \ No newline at end of file diff --git a/src/router/menu.ts b/src/router/menu.ts index a94c47f0..94d23249 100644 --- a/src/router/menu.ts +++ b/src/router/menu.ts @@ -89,9 +89,14 @@ export default [ }, // system 系统管理 { - path:'/system/api', - components: ()=>import('@/views/system/apiPage/index') + path:'/system/Basis', + component: ()=>import('@/views/system/Basis/index.vue') }, + { + path:'/system/api', + component: ()=>import('@/views/system/apiPage/index.vue') + }, + // 初始化 { path: '/init-home', diff --git a/src/views/home/modules/config.ts b/src/views/home/modules/config.ts index 68281b8c..5857b8d0 100644 --- a/src/views/home/modules/config.ts +++ b/src/views/home/modules/config.ts @@ -6,11 +6,11 @@ import { recommendList, bootConfig } from "../index"; // 权限控制 const hasPermission = usePermissionStore().hasPermission; const productPermission = (action: string) => - hasPermission(`device/Product:${action}"`); + hasPermission(`device/Product:${action}`); const devicePermission = (action: string) => - hasPermission(`device/Instance:${action}"`); + hasPermission(`device/Instance:${action}`); const rulePermission = (action: string) => - hasPermission(`rule-engine/Instance:${action}"`); + hasPermission(`rule-engine/Instance:${action}`); // 物联网引导-数据 diff --git a/src/views/system/Basis/index.d.ts b/src/views/system/Basis/index.d.ts new file mode 100644 index 00000000..29c40c1d --- /dev/null +++ b/src/views/system/Basis/index.d.ts @@ -0,0 +1,37 @@ +import type { Rule } from 'ant-design-vue/es/form'; + +/**基本信息表单 */ +export interface formValueType { + title: string; // 系统名称 + headerTheme: string; // 主题色 + apiKey: string; // 高德 API key + 'base-path': string; // 系统后台访问的URL + logo:string, + ico:string, + backgroud:string +} + +export interface formType { + formValue: formValueType, + rulesFrom: Record + logoLoading: boolean, + backLoading: boolean, + iconLoading: boolean, + saveLoading: boolean, + clickSave?: Function, + getDetails: Function +} + +/** +* 图片上传表单 +*/ +export interface uploaderType { + imageTypes: Array; + iconTypes: Array, + beforeLogoUpload: (file: UploadProps['beforeUpload']) => void + handleChangeLogo: (info: UploadChangeParam) => void + beforeBackUpload: (file: UploadProps['beforeUpload']) => void + changeBackUpload: (info: UploadChangeParam) => void + beforeIconUpload: (file: UploadProps['beforeUpload']) => void + changeIconUpload: (info: UploadChangeParam) => void +} diff --git a/src/views/system/Basis/index.vue b/src/views/system/Basis/index.vue new file mode 100644 index 00000000..547ec67f --- /dev/null +++ b/src/views/system/Basis/index.vue @@ -0,0 +1,627 @@ + + + + + diff --git a/yarn.lock b/yarn.lock index 53f50f7d..dd2e4844 100644 --- a/yarn.lock +++ b/yarn.lock @@ -796,6 +796,11 @@ dependencies: "@types/webxr" "*" +"@types/web-bluetooth@^0.0.16": + version "0.0.16" + resolved "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz#1d12873a8e49567371f2a75fe3e7f7edca6662d8" + integrity sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ== + "@types/webxr@*": version "0.5.0" resolved "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.0.tgz" @@ -1003,6 +1008,28 @@ three "0.143.0" uppercamelcase "^1.1.0" +"@vueuse/core@^9.10.0": + version "9.10.0" + resolved "https://registry.npmjs.org/@vueuse/core/-/core-9.10.0.tgz#2ef6e55ca773c5b2db1e3f13b8292af96dd32214" + integrity sha512-CxMewME07qeuzuT/AOIQGv0EhhDoojniqU6pC3F8m5VC76L47UT18DcX88kWlP3I7d3qMJ4u/PD8iSRsy3bmNA== + dependencies: + "@types/web-bluetooth" "^0.0.16" + "@vueuse/metadata" "9.10.0" + "@vueuse/shared" "9.10.0" + vue-demi "*" + +"@vueuse/metadata@9.10.0": + version "9.10.0" + resolved "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.10.0.tgz#1a5eb94ca755bd8e666505f47da7d88969cffdc7" + integrity sha512-G5VZhgTCapzU9rv0Iq2HBrVOSGzOKb+OE668NxhXNcTjUjwYxULkEhAw70FtRLMZc+hxcFAzDZlKYA0xcwNMuw== + +"@vueuse/shared@9.10.0": + version "9.10.0" + resolved "https://registry.npmjs.org/@vueuse/shared/-/shared-9.10.0.tgz#49874a0f9955d28689b3133de660367c63dbc030" + integrity sha512-vakHJ2ZRklAzqmcVBL38RS7BxdBA4+5poG9NsSyqJxrt9kz0zX3P5CXMy0Hm6LFbZXUgvKdqAS3pUH1zX/5qTQ== + dependencies: + vue-demi "*" + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.npmmirror.com/JSONStream/-/JSONStream-1.3.5.tgz"