diff --git a/README.md b/README.md index 5469c98..93787ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +

智能一体机管理系统

后台管理系统基础模板 --- 无登录无权限无系统管理

## 简要说明 diff --git a/README.md b/README.md index 5469c98..93787ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +

智能一体机管理系统

后台管理系统基础模板 --- 无登录无权限无系统管理

## 简要说明 diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..ec87af0 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,6 @@ +{ + "title":"智能一体机管理系统", + "baseUrl": "http://localhost:9001", + "version": "1.0.1", + "node": "16.18.1" +} diff --git a/README.md b/README.md index 5469c98..93787ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +

智能一体机管理系统

后台管理系统基础模板 --- 无登录无权限无系统管理

## 简要说明 diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..ec87af0 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,6 @@ +{ + "title":"智能一体机管理系统", + "baseUrl": "http://localhost:9001", + "version": "1.0.1", + "node": "16.18.1" +} diff --git a/src/api/index.ts b/src/api/index.ts index 6239617..2ae434a 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -9,7 +9,7 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('IntegratedFront') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/README.md b/README.md index 5469c98..93787ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +

智能一体机管理系统

后台管理系统基础模板 --- 无登录无权限无系统管理

## 简要说明 diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..ec87af0 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,6 @@ +{ + "title":"智能一体机管理系统", + "baseUrl": "http://localhost:9001", + "version": "1.0.1", + "node": "16.18.1" +} diff --git a/src/api/index.ts b/src/api/index.ts index 6239617..2ae434a 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -9,7 +9,7 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('IntegratedFront') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/api/page/device.ts b/src/api/page/device.ts new file mode 100644 index 0000000..9c30884 --- /dev/null +++ b/src/api/page/device.ts @@ -0,0 +1,13 @@ +/** + * 设备管理接口 + */ +import request from '../index' + +// 列表 +export function getDeviceList(params: object) { + return request({ + url: '/api/device/page', + method: 'get', + params, + }) +} diff --git a/README.md b/README.md index 5469c98..93787ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +

智能一体机管理系统

后台管理系统基础模板 --- 无登录无权限无系统管理

## 简要说明 diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..ec87af0 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,6 @@ +{ + "title":"智能一体机管理系统", + "baseUrl": "http://localhost:9001", + "version": "1.0.1", + "node": "16.18.1" +} diff --git a/src/api/index.ts b/src/api/index.ts index 6239617..2ae434a 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -9,7 +9,7 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('IntegratedFront') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/api/page/device.ts b/src/api/page/device.ts new file mode 100644 index 0000000..9c30884 --- /dev/null +++ b/src/api/page/device.ts @@ -0,0 +1,13 @@ +/** + * 设备管理接口 + */ +import request from '../index' + +// 列表 +export function getDeviceList(params: object) { + return request({ + url: '/api/device/page', + method: 'get', + params, + }) +} diff --git a/src/main.ts b/src/main.ts index ad69d36..dc79e1b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' +import axios from 'axios' // import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' @@ -20,17 +21,19 @@ // if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() // } +axios.get(`./config/config.json?ts=${new Date().getTime()}`).then((res) => { + console.log(res.data, 'json文件') + window.localStorage.setItem('IntegratedFront', res.data.baseUrl) + const app = createApp(App) + // app.config.globalProperties.hasPerm = hasPermission + // app.use(print) + app.use(ElementPlus) + app.use(pinia) + app.use(router) + for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) + } + directive(app) + app.mount('#app') +}) -const app = createApp(App) -// app.config.globalProperties.hasPerm = hasPermission -// app.use(print) -app.use(ElementPlus) -app.use(pinia) - -app.use(router) -for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component) -} -directive(app) - -app.mount('#app') diff --git a/README.md b/README.md index 5469c98..93787ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +

智能一体机管理系统

后台管理系统基础模板 --- 无登录无权限无系统管理

## 简要说明 diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..ec87af0 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,6 @@ +{ + "title":"智能一体机管理系统", + "baseUrl": "http://localhost:9001", + "version": "1.0.1", + "node": "16.18.1" +} diff --git a/src/api/index.ts b/src/api/index.ts index 6239617..2ae434a 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -9,7 +9,7 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('IntegratedFront') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/api/page/device.ts b/src/api/page/device.ts new file mode 100644 index 0000000..9c30884 --- /dev/null +++ b/src/api/page/device.ts @@ -0,0 +1,13 @@ +/** + * 设备管理接口 + */ +import request from '../index' + +// 列表 +export function getDeviceList(params: object) { + return request({ + url: '/api/device/page', + method: 'get', + params, + }) +} diff --git a/src/main.ts b/src/main.ts index ad69d36..dc79e1b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' +import axios from 'axios' // import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' @@ -20,17 +21,19 @@ // if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() // } +axios.get(`./config/config.json?ts=${new Date().getTime()}`).then((res) => { + console.log(res.data, 'json文件') + window.localStorage.setItem('IntegratedFront', res.data.baseUrl) + const app = createApp(App) + // app.config.globalProperties.hasPerm = hasPermission + // app.use(print) + app.use(ElementPlus) + app.use(pinia) + app.use(router) + for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) + } + directive(app) + app.mount('#app') +}) -const app = createApp(App) -// app.config.globalProperties.hasPerm = hasPermission -// app.use(print) -app.use(ElementPlus) -app.use(pinia) - -app.use(router) -for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component) -} -directive(app) - -app.mount('#app') diff --git a/src/views/page/device/components/addDialog.vue b/src/views/page/device/components/addDialog.vue new file mode 100644 index 0000000..4ae8bcc --- /dev/null +++ b/src/views/page/device/components/addDialog.vue @@ -0,0 +1,114 @@ + + + + + + diff --git a/README.md b/README.md index 5469c98..93787ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +

智能一体机管理系统

后台管理系统基础模板 --- 无登录无权限无系统管理

## 简要说明 diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..ec87af0 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,6 @@ +{ + "title":"智能一体机管理系统", + "baseUrl": "http://localhost:9001", + "version": "1.0.1", + "node": "16.18.1" +} diff --git a/src/api/index.ts b/src/api/index.ts index 6239617..2ae434a 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -9,7 +9,7 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('IntegratedFront') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/api/page/device.ts b/src/api/page/device.ts new file mode 100644 index 0000000..9c30884 --- /dev/null +++ b/src/api/page/device.ts @@ -0,0 +1,13 @@ +/** + * 设备管理接口 + */ +import request from '../index' + +// 列表 +export function getDeviceList(params: object) { + return request({ + url: '/api/device/page', + method: 'get', + params, + }) +} diff --git a/src/main.ts b/src/main.ts index ad69d36..dc79e1b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' +import axios from 'axios' // import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' @@ -20,17 +21,19 @@ // if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() // } +axios.get(`./config/config.json?ts=${new Date().getTime()}`).then((res) => { + console.log(res.data, 'json文件') + window.localStorage.setItem('IntegratedFront', res.data.baseUrl) + const app = createApp(App) + // app.config.globalProperties.hasPerm = hasPermission + // app.use(print) + app.use(ElementPlus) + app.use(pinia) + app.use(router) + for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) + } + directive(app) + app.mount('#app') +}) -const app = createApp(App) -// app.config.globalProperties.hasPerm = hasPermission -// app.use(print) -app.use(ElementPlus) -app.use(pinia) - -app.use(router) -for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component) -} -directive(app) - -app.mount('#app') diff --git a/src/views/page/device/components/addDialog.vue b/src/views/page/device/components/addDialog.vue new file mode 100644 index 0000000..4ae8bcc --- /dev/null +++ b/src/views/page/device/components/addDialog.vue @@ -0,0 +1,114 @@ + + + + + + diff --git a/src/views/page/device/components/drawArea.vue b/src/views/page/device/components/drawArea.vue new file mode 100644 index 0000000..b0c40cb --- /dev/null +++ b/src/views/page/device/components/drawArea.vue @@ -0,0 +1,178 @@ + + + + + + + diff --git a/README.md b/README.md index 5469c98..93787ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +

智能一体机管理系统

后台管理系统基础模板 --- 无登录无权限无系统管理

## 简要说明 diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..ec87af0 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,6 @@ +{ + "title":"智能一体机管理系统", + "baseUrl": "http://localhost:9001", + "version": "1.0.1", + "node": "16.18.1" +} diff --git a/src/api/index.ts b/src/api/index.ts index 6239617..2ae434a 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -9,7 +9,7 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('IntegratedFront') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/api/page/device.ts b/src/api/page/device.ts new file mode 100644 index 0000000..9c30884 --- /dev/null +++ b/src/api/page/device.ts @@ -0,0 +1,13 @@ +/** + * 设备管理接口 + */ +import request from '../index' + +// 列表 +export function getDeviceList(params: object) { + return request({ + url: '/api/device/page', + method: 'get', + params, + }) +} diff --git a/src/main.ts b/src/main.ts index ad69d36..dc79e1b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' +import axios from 'axios' // import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' @@ -20,17 +21,19 @@ // if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() // } +axios.get(`./config/config.json?ts=${new Date().getTime()}`).then((res) => { + console.log(res.data, 'json文件') + window.localStorage.setItem('IntegratedFront', res.data.baseUrl) + const app = createApp(App) + // app.config.globalProperties.hasPerm = hasPermission + // app.use(print) + app.use(ElementPlus) + app.use(pinia) + app.use(router) + for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) + } + directive(app) + app.mount('#app') +}) -const app = createApp(App) -// app.config.globalProperties.hasPerm = hasPermission -// app.use(print) -app.use(ElementPlus) -app.use(pinia) - -app.use(router) -for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component) -} -directive(app) - -app.mount('#app') diff --git a/src/views/page/device/components/addDialog.vue b/src/views/page/device/components/addDialog.vue new file mode 100644 index 0000000..4ae8bcc --- /dev/null +++ b/src/views/page/device/components/addDialog.vue @@ -0,0 +1,114 @@ + + + + + + diff --git a/src/views/page/device/components/drawArea.vue b/src/views/page/device/components/drawArea.vue new file mode 100644 index 0000000..b0c40cb --- /dev/null +++ b/src/views/page/device/components/drawArea.vue @@ -0,0 +1,178 @@ + + + + + + + diff --git a/src/views/page/device/index.vue b/src/views/page/device/index.vue index ca77803..6084ef7 100644 --- a/src/views/page/device/index.vue +++ b/src/views/page/device/index.vue @@ -1,3 +1,120 @@ + + + diff --git a/README.md b/README.md index 5469c98..93787ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +

智能一体机管理系统

后台管理系统基础模板 --- 无登录无权限无系统管理

## 简要说明 diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..ec87af0 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,6 @@ +{ + "title":"智能一体机管理系统", + "baseUrl": "http://localhost:9001", + "version": "1.0.1", + "node": "16.18.1" +} diff --git a/src/api/index.ts b/src/api/index.ts index 6239617..2ae434a 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -9,7 +9,7 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('IntegratedFront') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/api/page/device.ts b/src/api/page/device.ts new file mode 100644 index 0000000..9c30884 --- /dev/null +++ b/src/api/page/device.ts @@ -0,0 +1,13 @@ +/** + * 设备管理接口 + */ +import request from '../index' + +// 列表 +export function getDeviceList(params: object) { + return request({ + url: '/api/device/page', + method: 'get', + params, + }) +} diff --git a/src/main.ts b/src/main.ts index ad69d36..dc79e1b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' +import axios from 'axios' // import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' @@ -20,17 +21,19 @@ // if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() // } +axios.get(`./config/config.json?ts=${new Date().getTime()}`).then((res) => { + console.log(res.data, 'json文件') + window.localStorage.setItem('IntegratedFront', res.data.baseUrl) + const app = createApp(App) + // app.config.globalProperties.hasPerm = hasPermission + // app.use(print) + app.use(ElementPlus) + app.use(pinia) + app.use(router) + for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) + } + directive(app) + app.mount('#app') +}) -const app = createApp(App) -// app.config.globalProperties.hasPerm = hasPermission -// app.use(print) -app.use(ElementPlus) -app.use(pinia) - -app.use(router) -for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component) -} -directive(app) - -app.mount('#app') diff --git a/src/views/page/device/components/addDialog.vue b/src/views/page/device/components/addDialog.vue new file mode 100644 index 0000000..4ae8bcc --- /dev/null +++ b/src/views/page/device/components/addDialog.vue @@ -0,0 +1,114 @@ + + + + + + diff --git a/src/views/page/device/components/drawArea.vue b/src/views/page/device/components/drawArea.vue new file mode 100644 index 0000000..b0c40cb --- /dev/null +++ b/src/views/page/device/components/drawArea.vue @@ -0,0 +1,178 @@ + + + + + + + diff --git a/src/views/page/device/index.vue b/src/views/page/device/index.vue index ca77803..6084ef7 100644 --- a/src/views/page/device/index.vue +++ b/src/views/page/device/index.vue @@ -1,3 +1,120 @@ + + + diff --git a/vite.config.ts b/vite.config.ts index 8589a2e..86d03ca 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -25,7 +25,8 @@ // 开发服务器选项 https://cn.vitejs.dev/config/#server-options server: { open: true, - port: 9000, + port: 9010, + host: '0.0.0.0', // 设置ip分享 proxy: { '/proxy': { target: env.VITE_APP_API_BASEURL,