diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..bca50cc --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import qs from "qs" +import Vue from 'vue' + +// 路灯状态统计 +export function getLampStatus() { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampStatus', + method: 'get' + }) +} + +// 路灯总览列表 +export function getLampList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampList', + method: 'get', + params + }) +} + +// 路灯详情 +export function getlampDetail(lampId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampDetail', + method: 'get', + params: { + lampId: lampId + } + }) +} + +// 回路列表 +export function getCircuitList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/circuitList', + method: 'get', + params + }) +} + +// 灯箱列表 +export function getLampBoxList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxList', + method: 'get', + params + }) +} +// 灯箱详情 +export function getLampBoxDetail(lampBoxId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxDetail', + method: 'get', + params: { + lampBoxId: lampBoxId + } + }) +} + +// 报警总览列表 +export function getAlarmList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmList', + method: 'get', + params + }) +} + +// 报警详情 +export function getAlarmDetail(alarmId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmDetail', + method: 'get', + params: { + alarmId: alarmId + } + }) +} + +// 路灯控制 +export function lampControl(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampControl', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..bca50cc --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import qs from "qs" +import Vue from 'vue' + +// 路灯状态统计 +export function getLampStatus() { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampStatus', + method: 'get' + }) +} + +// 路灯总览列表 +export function getLampList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampList', + method: 'get', + params + }) +} + +// 路灯详情 +export function getlampDetail(lampId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampDetail', + method: 'get', + params: { + lampId: lampId + } + }) +} + +// 回路列表 +export function getCircuitList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/circuitList', + method: 'get', + params + }) +} + +// 灯箱列表 +export function getLampBoxList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxList', + method: 'get', + params + }) +} +// 灯箱详情 +export function getLampBoxDetail(lampBoxId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxDetail', + method: 'get', + params: { + lampBoxId: lampBoxId + } + }) +} + +// 报警总览列表 +export function getAlarmList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmList', + method: 'get', + params + }) +} + +// 报警详情 +export function getAlarmDetail(alarmId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmDetail', + method: 'get', + params: { + alarmId: alarmId + } + }) +} + +// 路灯控制 +export function lampControl(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampControl', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/street.js b/src/api/street.js new file mode 100644 index 0000000..f3255ba --- /dev/null +++ b/src/api/street.js @@ -0,0 +1,67 @@ +/** + * 道路管理接口 + */ + +import request from '@/utils/request' +import qs from 'qs' +import Vue from 'vue' + +// 查询道路 +export function getStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/listPage', + method: 'get', + params: params + }) +} + +// 不分页查询所有道路 +export function getAllStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/list', + method: 'get', + params: params + }) +} + +// 删除道路 +export function delStreets(ids) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/batchDelete', + method: 'post', + params: { + busBaseStreetIds: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 添加道路 +export function addStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/add', + method: 'post', + params + }) +} + +// 编辑道路 +export function updateStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/update', + method: 'post', + params + }) +} diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..bca50cc --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import qs from "qs" +import Vue from 'vue' + +// 路灯状态统计 +export function getLampStatus() { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampStatus', + method: 'get' + }) +} + +// 路灯总览列表 +export function getLampList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampList', + method: 'get', + params + }) +} + +// 路灯详情 +export function getlampDetail(lampId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampDetail', + method: 'get', + params: { + lampId: lampId + } + }) +} + +// 回路列表 +export function getCircuitList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/circuitList', + method: 'get', + params + }) +} + +// 灯箱列表 +export function getLampBoxList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxList', + method: 'get', + params + }) +} +// 灯箱详情 +export function getLampBoxDetail(lampBoxId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxDetail', + method: 'get', + params: { + lampBoxId: lampBoxId + } + }) +} + +// 报警总览列表 +export function getAlarmList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmList', + method: 'get', + params + }) +} + +// 报警详情 +export function getAlarmDetail(alarmId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmDetail', + method: 'get', + params: { + alarmId: alarmId + } + }) +} + +// 路灯控制 +export function lampControl(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampControl', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/street.js b/src/api/street.js new file mode 100644 index 0000000..f3255ba --- /dev/null +++ b/src/api/street.js @@ -0,0 +1,67 @@ +/** + * 道路管理接口 + */ + +import request from '@/utils/request' +import qs from 'qs' +import Vue from 'vue' + +// 查询道路 +export function getStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/listPage', + method: 'get', + params: params + }) +} + +// 不分页查询所有道路 +export function getAllStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/list', + method: 'get', + params: params + }) +} + +// 删除道路 +export function delStreets(ids) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/batchDelete', + method: 'post', + params: { + busBaseStreetIds: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 添加道路 +export function addStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/add', + method: 'post', + params + }) +} + +// 编辑道路 +export function updateStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/update', + method: 'post', + params + }) +} diff --git a/src/components/DownloadTemplate/index.vue b/src/components/DownloadTemplate/index.vue index 8ded2cd..7807cac 100644 --- a/src/components/DownloadTemplate/index.vue +++ b/src/components/DownloadTemplate/index.vue @@ -47,8 +47,8 @@ diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..bca50cc --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import qs from "qs" +import Vue from 'vue' + +// 路灯状态统计 +export function getLampStatus() { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampStatus', + method: 'get' + }) +} + +// 路灯总览列表 +export function getLampList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampList', + method: 'get', + params + }) +} + +// 路灯详情 +export function getlampDetail(lampId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampDetail', + method: 'get', + params: { + lampId: lampId + } + }) +} + +// 回路列表 +export function getCircuitList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/circuitList', + method: 'get', + params + }) +} + +// 灯箱列表 +export function getLampBoxList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxList', + method: 'get', + params + }) +} +// 灯箱详情 +export function getLampBoxDetail(lampBoxId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxDetail', + method: 'get', + params: { + lampBoxId: lampBoxId + } + }) +} + +// 报警总览列表 +export function getAlarmList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmList', + method: 'get', + params + }) +} + +// 报警详情 +export function getAlarmDetail(alarmId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmDetail', + method: 'get', + params: { + alarmId: alarmId + } + }) +} + +// 路灯控制 +export function lampControl(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampControl', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/street.js b/src/api/street.js new file mode 100644 index 0000000..f3255ba --- /dev/null +++ b/src/api/street.js @@ -0,0 +1,67 @@ +/** + * 道路管理接口 + */ + +import request from '@/utils/request' +import qs from 'qs' +import Vue from 'vue' + +// 查询道路 +export function getStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/listPage', + method: 'get', + params: params + }) +} + +// 不分页查询所有道路 +export function getAllStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/list', + method: 'get', + params: params + }) +} + +// 删除道路 +export function delStreets(ids) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/batchDelete', + method: 'post', + params: { + busBaseStreetIds: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 添加道路 +export function addStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/add', + method: 'post', + params + }) +} + +// 编辑道路 +export function updateStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/update', + method: 'post', + params + }) +} diff --git a/src/components/DownloadTemplate/index.vue b/src/components/DownloadTemplate/index.vue index 8ded2cd..7807cac 100644 --- a/src/components/DownloadTemplate/index.vue +++ b/src/components/DownloadTemplate/index.vue @@ -47,8 +47,8 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..bca50cc --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import qs from "qs" +import Vue from 'vue' + +// 路灯状态统计 +export function getLampStatus() { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampStatus', + method: 'get' + }) +} + +// 路灯总览列表 +export function getLampList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampList', + method: 'get', + params + }) +} + +// 路灯详情 +export function getlampDetail(lampId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampDetail', + method: 'get', + params: { + lampId: lampId + } + }) +} + +// 回路列表 +export function getCircuitList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/circuitList', + method: 'get', + params + }) +} + +// 灯箱列表 +export function getLampBoxList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxList', + method: 'get', + params + }) +} +// 灯箱详情 +export function getLampBoxDetail(lampBoxId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxDetail', + method: 'get', + params: { + lampBoxId: lampBoxId + } + }) +} + +// 报警总览列表 +export function getAlarmList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmList', + method: 'get', + params + }) +} + +// 报警详情 +export function getAlarmDetail(alarmId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmDetail', + method: 'get', + params: { + alarmId: alarmId + } + }) +} + +// 路灯控制 +export function lampControl(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampControl', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/street.js b/src/api/street.js new file mode 100644 index 0000000..f3255ba --- /dev/null +++ b/src/api/street.js @@ -0,0 +1,67 @@ +/** + * 道路管理接口 + */ + +import request from '@/utils/request' +import qs from 'qs' +import Vue from 'vue' + +// 查询道路 +export function getStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/listPage', + method: 'get', + params: params + }) +} + +// 不分页查询所有道路 +export function getAllStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/list', + method: 'get', + params: params + }) +} + +// 删除道路 +export function delStreets(ids) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/batchDelete', + method: 'post', + params: { + busBaseStreetIds: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 添加道路 +export function addStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/add', + method: 'post', + params + }) +} + +// 编辑道路 +export function updateStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/update', + method: 'post', + params + }) +} diff --git a/src/components/DownloadTemplate/index.vue b/src/components/DownloadTemplate/index.vue index 8ded2cd..7807cac 100644 --- a/src/components/DownloadTemplate/index.vue +++ b/src/components/DownloadTemplate/index.vue @@ -47,8 +47,8 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..bca50cc --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import qs from "qs" +import Vue from 'vue' + +// 路灯状态统计 +export function getLampStatus() { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampStatus', + method: 'get' + }) +} + +// 路灯总览列表 +export function getLampList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampList', + method: 'get', + params + }) +} + +// 路灯详情 +export function getlampDetail(lampId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampDetail', + method: 'get', + params: { + lampId: lampId + } + }) +} + +// 回路列表 +export function getCircuitList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/circuitList', + method: 'get', + params + }) +} + +// 灯箱列表 +export function getLampBoxList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxList', + method: 'get', + params + }) +} +// 灯箱详情 +export function getLampBoxDetail(lampBoxId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxDetail', + method: 'get', + params: { + lampBoxId: lampBoxId + } + }) +} + +// 报警总览列表 +export function getAlarmList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmList', + method: 'get', + params + }) +} + +// 报警详情 +export function getAlarmDetail(alarmId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmDetail', + method: 'get', + params: { + alarmId: alarmId + } + }) +} + +// 路灯控制 +export function lampControl(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampControl', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/street.js b/src/api/street.js new file mode 100644 index 0000000..f3255ba --- /dev/null +++ b/src/api/street.js @@ -0,0 +1,67 @@ +/** + * 道路管理接口 + */ + +import request from '@/utils/request' +import qs from 'qs' +import Vue from 'vue' + +// 查询道路 +export function getStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/listPage', + method: 'get', + params: params + }) +} + +// 不分页查询所有道路 +export function getAllStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/list', + method: 'get', + params: params + }) +} + +// 删除道路 +export function delStreets(ids) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/batchDelete', + method: 'post', + params: { + busBaseStreetIds: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 添加道路 +export function addStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/add', + method: 'post', + params + }) +} + +// 编辑道路 +export function updateStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/update', + method: 'post', + params + }) +} diff --git a/src/components/DownloadTemplate/index.vue b/src/components/DownloadTemplate/index.vue index 8ded2cd..7807cac 100644 --- a/src/components/DownloadTemplate/index.vue +++ b/src/components/DownloadTemplate/index.vue @@ -47,8 +47,8 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..bca50cc --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import qs from "qs" +import Vue from 'vue' + +// 路灯状态统计 +export function getLampStatus() { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampStatus', + method: 'get' + }) +} + +// 路灯总览列表 +export function getLampList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampList', + method: 'get', + params + }) +} + +// 路灯详情 +export function getlampDetail(lampId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampDetail', + method: 'get', + params: { + lampId: lampId + } + }) +} + +// 回路列表 +export function getCircuitList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/circuitList', + method: 'get', + params + }) +} + +// 灯箱列表 +export function getLampBoxList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxList', + method: 'get', + params + }) +} +// 灯箱详情 +export function getLampBoxDetail(lampBoxId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxDetail', + method: 'get', + params: { + lampBoxId: lampBoxId + } + }) +} + +// 报警总览列表 +export function getAlarmList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmList', + method: 'get', + params + }) +} + +// 报警详情 +export function getAlarmDetail(alarmId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmDetail', + method: 'get', + params: { + alarmId: alarmId + } + }) +} + +// 路灯控制 +export function lampControl(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampControl', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/street.js b/src/api/street.js new file mode 100644 index 0000000..f3255ba --- /dev/null +++ b/src/api/street.js @@ -0,0 +1,67 @@ +/** + * 道路管理接口 + */ + +import request from '@/utils/request' +import qs from 'qs' +import Vue from 'vue' + +// 查询道路 +export function getStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/listPage', + method: 'get', + params: params + }) +} + +// 不分页查询所有道路 +export function getAllStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/list', + method: 'get', + params: params + }) +} + +// 删除道路 +export function delStreets(ids) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/batchDelete', + method: 'post', + params: { + busBaseStreetIds: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 添加道路 +export function addStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/add', + method: 'post', + params + }) +} + +// 编辑道路 +export function updateStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/update', + method: 'post', + params + }) +} diff --git a/src/components/DownloadTemplate/index.vue b/src/components/DownloadTemplate/index.vue index 8ded2cd..7807cac 100644 --- a/src/components/DownloadTemplate/index.vue +++ b/src/components/DownloadTemplate/index.vue @@ -47,8 +47,8 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..bca50cc --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import qs from "qs" +import Vue from 'vue' + +// 路灯状态统计 +export function getLampStatus() { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampStatus', + method: 'get' + }) +} + +// 路灯总览列表 +export function getLampList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampList', + method: 'get', + params + }) +} + +// 路灯详情 +export function getlampDetail(lampId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampDetail', + method: 'get', + params: { + lampId: lampId + } + }) +} + +// 回路列表 +export function getCircuitList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/circuitList', + method: 'get', + params + }) +} + +// 灯箱列表 +export function getLampBoxList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxList', + method: 'get', + params + }) +} +// 灯箱详情 +export function getLampBoxDetail(lampBoxId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxDetail', + method: 'get', + params: { + lampBoxId: lampBoxId + } + }) +} + +// 报警总览列表 +export function getAlarmList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmList', + method: 'get', + params + }) +} + +// 报警详情 +export function getAlarmDetail(alarmId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmDetail', + method: 'get', + params: { + alarmId: alarmId + } + }) +} + +// 路灯控制 +export function lampControl(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampControl', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/street.js b/src/api/street.js new file mode 100644 index 0000000..f3255ba --- /dev/null +++ b/src/api/street.js @@ -0,0 +1,67 @@ +/** + * 道路管理接口 + */ + +import request from '@/utils/request' +import qs from 'qs' +import Vue from 'vue' + +// 查询道路 +export function getStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/listPage', + method: 'get', + params: params + }) +} + +// 不分页查询所有道路 +export function getAllStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/list', + method: 'get', + params: params + }) +} + +// 删除道路 +export function delStreets(ids) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/batchDelete', + method: 'post', + params: { + busBaseStreetIds: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 添加道路 +export function addStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/add', + method: 'post', + params + }) +} + +// 编辑道路 +export function updateStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/update', + method: 'post', + params + }) +} diff --git a/src/components/DownloadTemplate/index.vue b/src/components/DownloadTemplate/index.vue index 8ded2cd..7807cac 100644 --- a/src/components/DownloadTemplate/index.vue +++ b/src/components/DownloadTemplate/index.vue @@ -47,8 +47,8 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ + + diff --git a/config/index.js b/config/index.js index 8abd37a..d1dc353 100644 --- a/config/index.js +++ b/config/index.js @@ -69,7 +69,7 @@ * then assetsPublicPath should be set to "/bar/". * In most cases please use '/' !!! */ - assetsPublicPath: '/', + assetsPublicPath: '/lampCr/', /** * Source Maps diff --git a/src/api/common.js b/src/api/common.js index 87c582b..7804714 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,10 +2,14 @@ * 常用接口 */ import request from '@/utils/request' +import Vue from 'vue' + // 模板下载 export function downloadTemplate(fileName) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath return request({ - url: 'template/download', + url: lampPath + 'template/download', method: 'get', params: { filename: fileName @@ -19,7 +23,7 @@ const param = new FormData() param.append('file', fileobj.file) return request({ - url: 'imageUpload', + url: 'fileUpload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..bca50cc --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import qs from "qs" +import Vue from 'vue' + +// 路灯状态统计 +export function getLampStatus() { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampStatus', + method: 'get' + }) +} + +// 路灯总览列表 +export function getLampList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampList', + method: 'get', + params + }) +} + +// 路灯详情 +export function getlampDetail(lampId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampDetail', + method: 'get', + params: { + lampId: lampId + } + }) +} + +// 回路列表 +export function getCircuitList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/circuitList', + method: 'get', + params + }) +} + +// 灯箱列表 +export function getLampBoxList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxList', + method: 'get', + params + }) +} +// 灯箱详情 +export function getLampBoxDetail(lampBoxId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampBoxDetail', + method: 'get', + params: { + lampBoxId: lampBoxId + } + }) +} + +// 报警总览列表 +export function getAlarmList(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmList', + method: 'get', + params + }) +} + +// 报警详情 +export function getAlarmDetail(alarmId) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/alarmDetail', + method: 'get', + params: { + alarmId: alarmId + } + }) +} + +// 路灯控制 +export function lampControl(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'overview/lampControl', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/street.js b/src/api/street.js new file mode 100644 index 0000000..f3255ba --- /dev/null +++ b/src/api/street.js @@ -0,0 +1,67 @@ +/** + * 道路管理接口 + */ + +import request from '@/utils/request' +import qs from 'qs' +import Vue from 'vue' + +// 查询道路 +export function getStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/listPage', + method: 'get', + params: params + }) +} + +// 不分页查询所有道路 +export function getAllStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/list', + method: 'get', + params: params + }) +} + +// 删除道路 +export function delStreets(ids) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/batchDelete', + method: 'post', + params: { + busBaseStreetIds: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 添加道路 +export function addStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/add', + method: 'post', + params + }) +} + +// 编辑道路 +export function updateStreet(params) { + const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值 + const lampPath = basetConfig.lampBasePath + return request({ + url: lampPath + 'busBaseStreet/update', + method: 'post', + params + }) +} diff --git a/src/components/DownloadTemplate/index.vue b/src/components/DownloadTemplate/index.vue index 8ded2cd..7807cac 100644 --- a/src/components/DownloadTemplate/index.vue +++ b/src/components/DownloadTemplate/index.vue @@ -47,8 +47,8 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ + + diff --git a/src/views/overview/overview.vue b/src/views/overview/overview.vue index db279d8..9565f6b 100644 --- a/src/views/overview/overview.vue +++ b/src/views/overview/overview.vue @@ -70,102 +70,15 @@
-
- - - - - - - - - - - 搜索 - - - 开灯 - 关灯 - - - - - - - - - -
-
- -
- - - - - - 搜索 - - - - - - - - - - - -
-
- -
- - - - - - - - - - - 搜索 - - - - - - - - - - - -
+
@@ -202,10 +115,12 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ + + diff --git a/src/views/overview/overview.vue b/src/views/overview/overview.vue index db279d8..9565f6b 100644 --- a/src/views/overview/overview.vue +++ b/src/views/overview/overview.vue @@ -70,102 +70,15 @@
-
- - - - - - - - - - - 搜索 - - - 开灯 - 关灯 - - - - - - - - - -
-
- -
- - - - - - 搜索 - - - - - - - - - - - -
-
- -
- - - - - - - - - - - 搜索 - - - - - - - - - - - -
+
@@ -202,10 +115,12 @@ diff --git a/src/layout/components/TagsView/AppHeader-new.vue b/src/layout/components/TagsView/AppHeader-new.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader-new.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/layout/components/TagsView/AppHeader.vue b/src/layout/components/TagsView/AppHeader.vue new file mode 100644 index 0000000..c192d79 --- /dev/null +++ b/src/layout/components/TagsView/AppHeader.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b558038..222c1e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,6 @@ import { reportRouters } from './modules/report' import { strategyRouters } from './modules/strategy' import { systemRouters } from './modules/system' -import { exampleRouters } from './modules/example' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -81,7 +80,6 @@ ...alarmRouters, ...reportRouters, ...strategyRouters, - ...exampleRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..ae9cb55 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -59,6 +59,12 @@ component: () => import('@/views/system/log/loginLog'), // Parent router-view name: 'LoginLog', meta: { title: '登录日志', permission: ['/loginLog'] } + }, + { + path: '/streetList', + component: () => import('@/views/base/street/streetList'), + name: 'StreetList', + meta: { title: '道路管理', permission: ['/streetList'] } } ] }] diff --git a/src/views/alarmManage/components/alarmDetail.vue b/src/views/alarmManage/components/alarmDetail.vue index d598779..a6dcbd2 100644 --- a/src/views/alarmManage/components/alarmDetail.vue +++ b/src/views/alarmManage/components/alarmDetail.vue @@ -53,7 +53,11 @@ + + diff --git a/src/views/overview/overview.vue b/src/views/overview/overview.vue index db279d8..9565f6b 100644 --- a/src/views/overview/overview.vue +++ b/src/views/overview/overview.vue @@ -70,102 +70,15 @@
-
- - - - - - - - - - - 搜索 - - - 开灯 - 关灯 - - - - - - - - - -
-
- -
- - - - - - 搜索 - - - - - - - - - - - -
-
- -
- - - - - - - - - - - 搜索 - - - - - - - - - - - -
+
@@ -202,10 +115,12 @@