diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..f5871c2 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -76,7 +76,8 @@ // 用气事记查询 export function getNoteList(type) { return request({ - url: '/note/list/' + type, + // url: '/note/list/' + type, + url: '/note/list', method: 'get' }) } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..f5871c2 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -76,7 +76,8 @@ // 用气事记查询 export function getNoteList(type) { return request({ - url: '/note/list/' + type, + // url: '/note/list/' + type, + url: '/note/list', method: 'get' }) } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index f60ee44..cda5175 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,6 +1,6 @@ const project = { // title: '供水管理系统' - title: '场区供水管理系统' + title: '场区能源管理系统' } export function getProject() { return project diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..f5871c2 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -76,7 +76,8 @@ // 用气事记查询 export function getNoteList(type) { return request({ - url: '/note/list/' + type, + // url: '/note/list/' + type, + url: '/note/list', method: 'get' }) } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index f60ee44..cda5175 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,6 +1,6 @@ const project = { // title: '供水管理系统' - title: '场区供水管理系统' + title: '场区能源管理系统' } export function getProject() { return project diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 8717f74..7ce6b47 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -88,10 +88,13 @@ // 保存用水事记 saveNote() { const currentList = this.currentList.map((item, index) => { - return { list: this.currentList, content: item.content, num: index, type: '1' } + return { content: item.content, num: index } }) - console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..f5871c2 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -76,7 +76,8 @@ // 用气事记查询 export function getNoteList(type) { return request({ - url: '/note/list/' + type, + // url: '/note/list/' + type, + url: '/note/list', method: 'get' }) } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index f60ee44..cda5175 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,6 +1,6 @@ const project = { // title: '供水管理系统' - title: '场区供水管理系统' + title: '场区能源管理系统' } export function getProject() { return project diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 8717f74..7ce6b47 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -88,10 +88,13 @@ // 保存用水事记 saveNote() { const currentList = this.currentList.map((item, index) => { - return { list: this.currentList, content: item.content, num: index, type: '1' } + return { content: item.content, num: index } }) - console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index addba3d..8f6d49d 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -70,15 +70,18 @@ }, data() { return { - activeName: 'water' + activeName: '' } }, created() { // 如果路径里带参数,自己解析deviceType参数 + // debugger if (window.location.href) { const params = parseUrl(window.location.href) if (params && params.deviceType) { this.changeTab(params.deviceType) + } else { + this.caclActive() } } else { this.caclActive() @@ -136,16 +139,17 @@ this.activeName = 'wellloca' } else if (deviceType === '8') { this.activeName = 'noise' - } else if (deviceType === '9') { + } else if (deviceType === '13') { this.activeName = 'water' - } else if (deviceType === '10') { + } else if (deviceType === '14') { this.activeName = 'corrode' - } else if (deviceType === '11') { + } else if (deviceType === '15') { this.activeName = 'gasflow' } }, // 计算那个是当前第一个tab caclActive() { + debugger if (hasPermission('/welldata/list')) { this.activeName = 'wellcover' } else if (hasPermission('/liquiddata/list')) { @@ -162,12 +166,14 @@ this.activeName = 'wellloca' } else if (hasPermission('/noisedata/list')) { this.activeName = 'noise' + } else if (hasPermission('/waterMeterData/listPage')) { + this.activeName = 'water' } else if (hasPermission('/corrodedata/list')) { this.activeName = 'corrode' } else if (hasPermission('/gasflowdata/list')) { this.activeName = 'gasflow' } else { - this.activeName = 'water' + // this.activeName = 'water' } } } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..f5871c2 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -76,7 +76,8 @@ // 用气事记查询 export function getNoteList(type) { return request({ - url: '/note/list/' + type, + // url: '/note/list/' + type, + url: '/note/list', method: 'get' }) } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index f60ee44..cda5175 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,6 +1,6 @@ const project = { // title: '供水管理系统' - title: '场区供水管理系统' + title: '场区能源管理系统' } export function getProject() { return project diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 8717f74..7ce6b47 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -88,10 +88,13 @@ // 保存用水事记 saveNote() { const currentList = this.currentList.map((item, index) => { - return { list: this.currentList, content: item.content, num: index, type: '1' } + return { content: item.content, num: index } }) - console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index addba3d..8f6d49d 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -70,15 +70,18 @@ }, data() { return { - activeName: 'water' + activeName: '' } }, created() { // 如果路径里带参数,自己解析deviceType参数 + // debugger if (window.location.href) { const params = parseUrl(window.location.href) if (params && params.deviceType) { this.changeTab(params.deviceType) + } else { + this.caclActive() } } else { this.caclActive() @@ -136,16 +139,17 @@ this.activeName = 'wellloca' } else if (deviceType === '8') { this.activeName = 'noise' - } else if (deviceType === '9') { + } else if (deviceType === '13') { this.activeName = 'water' - } else if (deviceType === '10') { + } else if (deviceType === '14') { this.activeName = 'corrode' - } else if (deviceType === '11') { + } else if (deviceType === '15') { this.activeName = 'gasflow' } }, // 计算那个是当前第一个tab caclActive() { + debugger if (hasPermission('/welldata/list')) { this.activeName = 'wellcover' } else if (hasPermission('/liquiddata/list')) { @@ -162,12 +166,14 @@ this.activeName = 'wellloca' } else if (hasPermission('/noisedata/list')) { this.activeName = 'noise' + } else if (hasPermission('/waterMeterData/listPage')) { + this.activeName = 'water' } else if (hasPermission('/corrodedata/list')) { this.activeName = 'corrode' } else if (hasPermission('/gasflowdata/list')) { this.activeName = 'gasflow' } else { - this.activeName = 'water' + // this.activeName = 'water' } } } diff --git a/src/views/dataManage/deviceData/listGasflowData.vue b/src/views/dataManage/deviceData/listGasflowData.vue index ec5b637..a22f444 100644 --- a/src/views/dataManage/deviceData/listGasflowData.vue +++ b/src/views/dataManage/deviceData/listGasflowData.vue @@ -62,7 +62,6 @@