diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/src/api/basic/instruction.ts b/src/api/basic/instruction.ts new file mode 100644 index 0000000..dc42f59 --- /dev/null +++ b/src/api/basic/instruction.ts @@ -0,0 +1,20 @@ +import request from '../index' +const prefix = 'noiseConfig' + +// 查询设备列表 分页 +export function getInstructionListPage(data: any) { + return request({ + url: `${prefix}/noiseConfig/list`, + method: 'post', + params: data + }) +} + +// 下发 +export function setInstruction(data: any) { + return request({ + url: `${prefix}/noiseConfig/config`, + method: 'post', + data, + }) +} diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/src/api/basic/instruction.ts b/src/api/basic/instruction.ts new file mode 100644 index 0000000..dc42f59 --- /dev/null +++ b/src/api/basic/instruction.ts @@ -0,0 +1,20 @@ +import request from '../index' +const prefix = 'noiseConfig' + +// 查询设备列表 分页 +export function getInstructionListPage(data: any) { + return request({ + url: `${prefix}/noiseConfig/list`, + method: 'post', + params: data + }) +} + +// 下发 +export function setInstruction(data: any) { + return request({ + url: `${prefix}/noiseConfig/config`, + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..d1ad2b8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } 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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-CorrOLFront'), timeout: 1000 * 60, responseType: 'json', }) diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/src/api/basic/instruction.ts b/src/api/basic/instruction.ts new file mode 100644 index 0000000..dc42f59 --- /dev/null +++ b/src/api/basic/instruction.ts @@ -0,0 +1,20 @@ +import request from '../index' +const prefix = 'noiseConfig' + +// 查询设备列表 分页 +export function getInstructionListPage(data: any) { + return request({ + url: `${prefix}/noiseConfig/list`, + method: 'post', + params: data + }) +} + +// 下发 +export function setInstruction(data: any) { + return request({ + url: `${prefix}/noiseConfig/config`, + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..d1ad2b8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } 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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-CorrOLFront'), timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/main.ts b/src/main.ts index 3cfb61f..9e9f13d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,8 @@ import pinia from './store' import router from './router' import useSettingsStore from './store/modules/settings' +import axios from 'axios' +import request from '@/api/index' // 自定义指令 import directive from '@/utils/directive' // 加载 svg 图标 @@ -22,16 +24,24 @@ downloadAndInstall() } const app = createApp(App) -app.config.globalProperties.hasPerm = hasPermission -app.config.globalProperties.buttonPerm = buttonPerm -app.config.globalProperties.dayjs = dayjs -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) +axios.get('./config/config.json').then((result) => { + // console.log(result) + window.localStorage.setItem('baseURL-CorrOLFront', result.data.baseUrl) + request.defaults.baseURL = result.data.baseUrl -app.mount('#app') + app.config.globalProperties.hasPerm = hasPermission + app.config.globalProperties.buttonPerm = buttonPerm + app.config.globalProperties.dayjs = dayjs + 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/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/src/api/basic/instruction.ts b/src/api/basic/instruction.ts new file mode 100644 index 0000000..dc42f59 --- /dev/null +++ b/src/api/basic/instruction.ts @@ -0,0 +1,20 @@ +import request from '../index' +const prefix = 'noiseConfig' + +// 查询设备列表 分页 +export function getInstructionListPage(data: any) { + return request({ + url: `${prefix}/noiseConfig/list`, + method: 'post', + params: data + }) +} + +// 下发 +export function setInstruction(data: any) { + return request({ + url: `${prefix}/noiseConfig/config`, + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..d1ad2b8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } 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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-CorrOLFront'), timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/main.ts b/src/main.ts index 3cfb61f..9e9f13d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,8 @@ import pinia from './store' import router from './router' import useSettingsStore from './store/modules/settings' +import axios from 'axios' +import request from '@/api/index' // 自定义指令 import directive from '@/utils/directive' // 加载 svg 图标 @@ -22,16 +24,24 @@ downloadAndInstall() } const app = createApp(App) -app.config.globalProperties.hasPerm = hasPermission -app.config.globalProperties.buttonPerm = buttonPerm -app.config.globalProperties.dayjs = dayjs -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) +axios.get('./config/config.json').then((result) => { + // console.log(result) + window.localStorage.setItem('baseURL-CorrOLFront', result.data.baseUrl) + request.defaults.baseURL = result.data.baseUrl -app.mount('#app') + app.config.globalProperties.hasPerm = hasPermission + app.config.globalProperties.buttonPerm = buttonPerm + app.config.globalProperties.dayjs = dayjs + 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/router/modules/leak.ts b/src/router/modules/leak.ts index 5090f5c..5ad2c77 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -146,6 +146,18 @@ activeMenu: '/basic/device/config', }, }, + { + path: 'instruction', + name: 'DeviceInstructionList', + component: () => import('@/views/basic/instruction/index.vue'), + meta: { + title: '指令下发', + auth: '/basic/device/instruction', + sidebar: true, + breadcrumb: true, + activeMenu: '/basic/device/instruction', + }, + }, ], }, { diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/src/api/basic/instruction.ts b/src/api/basic/instruction.ts new file mode 100644 index 0000000..dc42f59 --- /dev/null +++ b/src/api/basic/instruction.ts @@ -0,0 +1,20 @@ +import request from '../index' +const prefix = 'noiseConfig' + +// 查询设备列表 分页 +export function getInstructionListPage(data: any) { + return request({ + url: `${prefix}/noiseConfig/list`, + method: 'post', + params: data + }) +} + +// 下发 +export function setInstruction(data: any) { + return request({ + url: `${prefix}/noiseConfig/config`, + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..d1ad2b8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } 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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-CorrOLFront'), timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/main.ts b/src/main.ts index 3cfb61f..9e9f13d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,8 @@ import pinia from './store' import router from './router' import useSettingsStore from './store/modules/settings' +import axios from 'axios' +import request from '@/api/index' // 自定义指令 import directive from '@/utils/directive' // 加载 svg 图标 @@ -22,16 +24,24 @@ downloadAndInstall() } const app = createApp(App) -app.config.globalProperties.hasPerm = hasPermission -app.config.globalProperties.buttonPerm = buttonPerm -app.config.globalProperties.dayjs = dayjs -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) +axios.get('./config/config.json').then((result) => { + // console.log(result) + window.localStorage.setItem('baseURL-CorrOLFront', result.data.baseUrl) + request.defaults.baseURL = result.data.baseUrl -app.mount('#app') + app.config.globalProperties.hasPerm = hasPermission + app.config.globalProperties.buttonPerm = buttonPerm + app.config.globalProperties.dayjs = dayjs + 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/router/modules/leak.ts b/src/router/modules/leak.ts index 5090f5c..5ad2c77 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -146,6 +146,18 @@ activeMenu: '/basic/device/config', }, }, + { + path: 'instruction', + name: 'DeviceInstructionList', + component: () => import('@/views/basic/instruction/index.vue'), + meta: { + title: '指令下发', + auth: '/basic/device/instruction', + sidebar: true, + breadcrumb: true, + activeMenu: '/basic/device/instruction', + }, + }, ], }, { diff --git a/src/views/basic/instruction/addInstructionDialog.vue b/src/views/basic/instruction/addInstructionDialog.vue new file mode 100644 index 0000000..ce227d3 --- /dev/null +++ b/src/views/basic/instruction/addInstructionDialog.vue @@ -0,0 +1,185 @@ + + + + diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/src/api/basic/instruction.ts b/src/api/basic/instruction.ts new file mode 100644 index 0000000..dc42f59 --- /dev/null +++ b/src/api/basic/instruction.ts @@ -0,0 +1,20 @@ +import request from '../index' +const prefix = 'noiseConfig' + +// 查询设备列表 分页 +export function getInstructionListPage(data: any) { + return request({ + url: `${prefix}/noiseConfig/list`, + method: 'post', + params: data + }) +} + +// 下发 +export function setInstruction(data: any) { + return request({ + url: `${prefix}/noiseConfig/config`, + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..d1ad2b8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } 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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-CorrOLFront'), timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/main.ts b/src/main.ts index 3cfb61f..9e9f13d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,8 @@ import pinia from './store' import router from './router' import useSettingsStore from './store/modules/settings' +import axios from 'axios' +import request from '@/api/index' // 自定义指令 import directive from '@/utils/directive' // 加载 svg 图标 @@ -22,16 +24,24 @@ downloadAndInstall() } const app = createApp(App) -app.config.globalProperties.hasPerm = hasPermission -app.config.globalProperties.buttonPerm = buttonPerm -app.config.globalProperties.dayjs = dayjs -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) +axios.get('./config/config.json').then((result) => { + // console.log(result) + window.localStorage.setItem('baseURL-CorrOLFront', result.data.baseUrl) + request.defaults.baseURL = result.data.baseUrl -app.mount('#app') + app.config.globalProperties.hasPerm = hasPermission + app.config.globalProperties.buttonPerm = buttonPerm + app.config.globalProperties.dayjs = dayjs + 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/router/modules/leak.ts b/src/router/modules/leak.ts index 5090f5c..5ad2c77 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -146,6 +146,18 @@ activeMenu: '/basic/device/config', }, }, + { + path: 'instruction', + name: 'DeviceInstructionList', + component: () => import('@/views/basic/instruction/index.vue'), + meta: { + title: '指令下发', + auth: '/basic/device/instruction', + sidebar: true, + breadcrumb: true, + activeMenu: '/basic/device/instruction', + }, + }, ], }, { diff --git a/src/views/basic/instruction/addInstructionDialog.vue b/src/views/basic/instruction/addInstructionDialog.vue new file mode 100644 index 0000000..ce227d3 --- /dev/null +++ b/src/views/basic/instruction/addInstructionDialog.vue @@ -0,0 +1,185 @@ + + + + diff --git a/src/views/basic/instruction/index.vue b/src/views/basic/instruction/index.vue new file mode 100644 index 0000000..1bc11f2 --- /dev/null +++ b/src/views/basic/instruction/index.vue @@ -0,0 +1,109 @@ + + + diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/src/api/basic/instruction.ts b/src/api/basic/instruction.ts new file mode 100644 index 0000000..dc42f59 --- /dev/null +++ b/src/api/basic/instruction.ts @@ -0,0 +1,20 @@ +import request from '../index' +const prefix = 'noiseConfig' + +// 查询设备列表 分页 +export function getInstructionListPage(data: any) { + return request({ + url: `${prefix}/noiseConfig/list`, + method: 'post', + params: data + }) +} + +// 下发 +export function setInstruction(data: any) { + return request({ + url: `${prefix}/noiseConfig/config`, + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..d1ad2b8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } 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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-CorrOLFront'), timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/main.ts b/src/main.ts index 3cfb61f..9e9f13d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,8 @@ import pinia from './store' import router from './router' import useSettingsStore from './store/modules/settings' +import axios from 'axios' +import request from '@/api/index' // 自定义指令 import directive from '@/utils/directive' // 加载 svg 图标 @@ -22,16 +24,24 @@ downloadAndInstall() } const app = createApp(App) -app.config.globalProperties.hasPerm = hasPermission -app.config.globalProperties.buttonPerm = buttonPerm -app.config.globalProperties.dayjs = dayjs -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) +axios.get('./config/config.json').then((result) => { + // console.log(result) + window.localStorage.setItem('baseURL-CorrOLFront', result.data.baseUrl) + request.defaults.baseURL = result.data.baseUrl -app.mount('#app') + app.config.globalProperties.hasPerm = hasPermission + app.config.globalProperties.buttonPerm = buttonPerm + app.config.globalProperties.dayjs = dayjs + 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/router/modules/leak.ts b/src/router/modules/leak.ts index 5090f5c..5ad2c77 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -146,6 +146,18 @@ activeMenu: '/basic/device/config', }, }, + { + path: 'instruction', + name: 'DeviceInstructionList', + component: () => import('@/views/basic/instruction/index.vue'), + meta: { + title: '指令下发', + auth: '/basic/device/instruction', + sidebar: true, + breadcrumb: true, + activeMenu: '/basic/device/instruction', + }, + }, ], }, { diff --git a/src/views/basic/instruction/addInstructionDialog.vue b/src/views/basic/instruction/addInstructionDialog.vue new file mode 100644 index 0000000..ce227d3 --- /dev/null +++ b/src/views/basic/instruction/addInstructionDialog.vue @@ -0,0 +1,185 @@ + + + + diff --git a/src/views/basic/instruction/index.vue b/src/views/basic/instruction/index.vue new file mode 100644 index 0000000..1bc11f2 --- /dev/null +++ b/src/views/basic/instruction/index.vue @@ -0,0 +1,109 @@ + + + diff --git a/src/views/basic/instruction/interface.ts b/src/views/basic/instruction/interface.ts new file mode 100644 index 0000000..6e0210e --- /dev/null +++ b/src/views/basic/instruction/interface.ts @@ -0,0 +1,11 @@ +// 列表查询参数接口 +export interface IListQuery { + offset: number + limit: number + status?: string + keywords: string + +} +export interface IInfo { + +} diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/src/api/basic/instruction.ts b/src/api/basic/instruction.ts new file mode 100644 index 0000000..dc42f59 --- /dev/null +++ b/src/api/basic/instruction.ts @@ -0,0 +1,20 @@ +import request from '../index' +const prefix = 'noiseConfig' + +// 查询设备列表 分页 +export function getInstructionListPage(data: any) { + return request({ + url: `${prefix}/noiseConfig/list`, + method: 'post', + params: data + }) +} + +// 下发 +export function setInstruction(data: any) { + return request({ + url: `${prefix}/noiseConfig/config`, + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..d1ad2b8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } 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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-CorrOLFront'), timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/main.ts b/src/main.ts index 3cfb61f..9e9f13d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,8 @@ import pinia from './store' import router from './router' import useSettingsStore from './store/modules/settings' +import axios from 'axios' +import request from '@/api/index' // 自定义指令 import directive from '@/utils/directive' // 加载 svg 图标 @@ -22,16 +24,24 @@ downloadAndInstall() } const app = createApp(App) -app.config.globalProperties.hasPerm = hasPermission -app.config.globalProperties.buttonPerm = buttonPerm -app.config.globalProperties.dayjs = dayjs -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) +axios.get('./config/config.json').then((result) => { + // console.log(result) + window.localStorage.setItem('baseURL-CorrOLFront', result.data.baseUrl) + request.defaults.baseURL = result.data.baseUrl -app.mount('#app') + app.config.globalProperties.hasPerm = hasPermission + app.config.globalProperties.buttonPerm = buttonPerm + app.config.globalProperties.dayjs = dayjs + 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/router/modules/leak.ts b/src/router/modules/leak.ts index 5090f5c..5ad2c77 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -146,6 +146,18 @@ activeMenu: '/basic/device/config', }, }, + { + path: 'instruction', + name: 'DeviceInstructionList', + component: () => import('@/views/basic/instruction/index.vue'), + meta: { + title: '指令下发', + auth: '/basic/device/instruction', + sidebar: true, + breadcrumb: true, + activeMenu: '/basic/device/instruction', + }, + }, ], }, { diff --git a/src/views/basic/instruction/addInstructionDialog.vue b/src/views/basic/instruction/addInstructionDialog.vue new file mode 100644 index 0000000..ce227d3 --- /dev/null +++ b/src/views/basic/instruction/addInstructionDialog.vue @@ -0,0 +1,185 @@ + + + + diff --git a/src/views/basic/instruction/index.vue b/src/views/basic/instruction/index.vue new file mode 100644 index 0000000..1bc11f2 --- /dev/null +++ b/src/views/basic/instruction/index.vue @@ -0,0 +1,109 @@ + + + diff --git a/src/views/basic/instruction/interface.ts b/src/views/basic/instruction/interface.ts new file mode 100644 index 0000000..6e0210e --- /dev/null +++ b/src/views/basic/instruction/interface.ts @@ -0,0 +1,11 @@ +// 列表查询参数接口 +export interface IListQuery { + offset: number + limit: number + status?: string + keywords: string + +} +export interface IInfo { + +} diff --git a/src/views/data/alarm/ruleList.vue b/src/views/data/alarm/ruleList.vue index 215baaa..b9fc382 100644 --- a/src/views/data/alarm/ruleList.vue +++ b/src/views/data/alarm/ruleList.vue @@ -17,13 +17,13 @@ // 表头 const columns = ref([ - { text: '设备编号', value: 'devCode', align: 'center', width: '200' }, + { text: '设备编号', value: 'devcode', align: 'center', width: '200' }, { text: '点位编号', value: 'wellCode', align: 'center', width: '200' }, { text: '设备类型', value: 'deviceTypeName', align: 'center', width: '160' }, { text: '具体位置', value: 'position', align: 'center' }, - { text: '上限阈值', value: 'highValueStr', align: 'center', width: '120' }, - { text: '下限阈值', value: 'lowValueStr', align: 'center', width: '120' }, - { text: '超时时间', value: 'overTimeStr', align: 'center', width: '120' }, + { text: '上限阈值', value: 'highvalue', align: 'center', width: '120' }, + { text: '下限阈值', value: 'lowvalue', align: 'center', width: '120' }, + { text: '超时时间', value: 'overtime', align: 'center', width: '120' }, { text: '操作人', value: 'operator', align: 'center', width: '120' }, ]) const dataList = ref>([]) // 表格数据 diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..e7f1273 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,4 @@ +{ + "projectName" : "CorrOLFront", + "baseUrl": "http://192.168.242.39:8084" +} diff --git a/src/api/basic/instruction.ts b/src/api/basic/instruction.ts new file mode 100644 index 0000000..dc42f59 --- /dev/null +++ b/src/api/basic/instruction.ts @@ -0,0 +1,20 @@ +import request from '../index' +const prefix = 'noiseConfig' + +// 查询设备列表 分页 +export function getInstructionListPage(data: any) { + return request({ + url: `${prefix}/noiseConfig/list`, + method: 'post', + params: data + }) +} + +// 下发 +export function setInstruction(data: any) { + return request({ + url: `${prefix}/noiseConfig/config`, + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..d1ad2b8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } 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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-CorrOLFront'), timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/main.ts b/src/main.ts index 3cfb61f..9e9f13d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,8 @@ import pinia from './store' import router from './router' import useSettingsStore from './store/modules/settings' +import axios from 'axios' +import request from '@/api/index' // 自定义指令 import directive from '@/utils/directive' // 加载 svg 图标 @@ -22,16 +24,24 @@ downloadAndInstall() } const app = createApp(App) -app.config.globalProperties.hasPerm = hasPermission -app.config.globalProperties.buttonPerm = buttonPerm -app.config.globalProperties.dayjs = dayjs -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) +axios.get('./config/config.json').then((result) => { + // console.log(result) + window.localStorage.setItem('baseURL-CorrOLFront', result.data.baseUrl) + request.defaults.baseURL = result.data.baseUrl -app.mount('#app') + app.config.globalProperties.hasPerm = hasPermission + app.config.globalProperties.buttonPerm = buttonPerm + app.config.globalProperties.dayjs = dayjs + 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/router/modules/leak.ts b/src/router/modules/leak.ts index 5090f5c..5ad2c77 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -146,6 +146,18 @@ activeMenu: '/basic/device/config', }, }, + { + path: 'instruction', + name: 'DeviceInstructionList', + component: () => import('@/views/basic/instruction/index.vue'), + meta: { + title: '指令下发', + auth: '/basic/device/instruction', + sidebar: true, + breadcrumb: true, + activeMenu: '/basic/device/instruction', + }, + }, ], }, { diff --git a/src/views/basic/instruction/addInstructionDialog.vue b/src/views/basic/instruction/addInstructionDialog.vue new file mode 100644 index 0000000..ce227d3 --- /dev/null +++ b/src/views/basic/instruction/addInstructionDialog.vue @@ -0,0 +1,185 @@ + + + + diff --git a/src/views/basic/instruction/index.vue b/src/views/basic/instruction/index.vue new file mode 100644 index 0000000..1bc11f2 --- /dev/null +++ b/src/views/basic/instruction/index.vue @@ -0,0 +1,109 @@ + + + diff --git a/src/views/basic/instruction/interface.ts b/src/views/basic/instruction/interface.ts new file mode 100644 index 0000000..6e0210e --- /dev/null +++ b/src/views/basic/instruction/interface.ts @@ -0,0 +1,11 @@ +// 列表查询参数接口 +export interface IListQuery { + offset: number + limit: number + status?: string + keywords: string + +} +export interface IInfo { + +} diff --git a/src/views/data/alarm/ruleList.vue b/src/views/data/alarm/ruleList.vue index 215baaa..b9fc382 100644 --- a/src/views/data/alarm/ruleList.vue +++ b/src/views/data/alarm/ruleList.vue @@ -17,13 +17,13 @@ // 表头 const columns = ref([ - { text: '设备编号', value: 'devCode', align: 'center', width: '200' }, + { text: '设备编号', value: 'devcode', align: 'center', width: '200' }, { text: '点位编号', value: 'wellCode', align: 'center', width: '200' }, { text: '设备类型', value: 'deviceTypeName', align: 'center', width: '160' }, { text: '具体位置', value: 'position', align: 'center' }, - { text: '上限阈值', value: 'highValueStr', align: 'center', width: '120' }, - { text: '下限阈值', value: 'lowValueStr', align: 'center', width: '120' }, - { text: '超时时间', value: 'overTimeStr', align: 'center', width: '120' }, + { text: '上限阈值', value: 'highvalue', align: 'center', width: '120' }, + { text: '下限阈值', value: 'lowvalue', align: 'center', width: '120' }, + { text: '超时时间', value: 'overtime', align: 'center', width: '120' }, { text: '操作人', value: 'operator', align: 'center', width: '120' }, ]) const dataList = ref>([]) // 表格数据 diff --git a/src/views/login.vue b/src/views/login.vue index 63ff8cc..ccb0036 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -282,7 +282,7 @@ > 登录 -
@@ -298,7 +298,7 @@ test -
+ -->