diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 256bfb4..e0b52d4 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -74,11 +74,10 @@ } // 用气事记查询 -export function getNoteList(params) { +export function getNoteList(type) { return request({ - url: '/note/list', - method: 'get', - params + url: '/note/list/' + type, + method: 'get' }) } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 256bfb4..e0b52d4 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -74,11 +74,10 @@ } // 用气事记查询 -export function getNoteList(params) { +export function getNoteList(type) { return request({ - url: '/note/list', - method: 'get', - params + url: '/note/list/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 256bfb4..e0b52d4 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -74,11 +74,10 @@ } // 用气事记查询 -export function getNoteList(params) { +export function getNoteList(type) { return request({ - url: '/note/list', - method: 'get', - params + url: '/note/list/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 479b9ad..8717f74 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '1' - } - getNoteList(data).then(response => { + getNoteList('1').then(response => { this.currentList = JSON.parse(response.data) }) }, diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 256bfb4..e0b52d4 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -74,11 +74,10 @@ } // 用气事记查询 -export function getNoteList(params) { +export function getNoteList(type) { return request({ - url: '/note/list', - method: 'get', - params + url: '/note/list/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 479b9ad..8717f74 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '1' - } - getNoteList(data).then(response => { + getNoteList('1').then(response => { this.currentList = JSON.parse(response.data) }) }, diff --git a/src/views/gasDashboard/components/DeviceCount.vue b/src/views/gasDashboard/components/DeviceCount.vue index 91bafbf..d02dc49 100644 --- a/src/views/gasDashboard/components/DeviceCount.vue +++ b/src/views/gasDashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -56,7 +56,7 @@ methods: { fetchData() { const data = { - extra: 1 + extra: '0' } deviceStaticsByType(data).then(response => { // this.chartData.rows = response.data diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 256bfb4..e0b52d4 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -74,11 +74,10 @@ } // 用气事记查询 -export function getNoteList(params) { +export function getNoteList(type) { return request({ - url: '/note/list', - method: 'get', - params + url: '/note/list/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 479b9ad..8717f74 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '1' - } - getNoteList(data).then(response => { + getNoteList('1').then(response => { this.currentList = JSON.parse(response.data) }) }, diff --git a/src/views/gasDashboard/components/DeviceCount.vue b/src/views/gasDashboard/components/DeviceCount.vue index 91bafbf..d02dc49 100644 --- a/src/views/gasDashboard/components/DeviceCount.vue +++ b/src/views/gasDashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -56,7 +56,7 @@ methods: { fetchData() { const data = { - extra: 1 + extra: '0' } deviceStaticsByType(data).then(response => { // this.chartData.rows = response.data diff --git a/src/views/gasDashboard/components/waterNote.vue b/src/views/gasDashboard/components/waterNote.vue index d2fb0db..e5abaeb 100644 --- a/src/views/gasDashboard/components/waterNote.vue +++ b/src/views/gasDashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '2' - } - getNoteList(data).then(response => { + getNoteList('2').then(response => { console.log(response, '=====1234') this.currentList = JSON.parse(response.data) }) @@ -92,10 +89,14 @@ // 保存用水事记 saveNote() { const currentList = this.currentList.map((item, index) => { - return { list: this.currentList, content: item.content, num: index, type: '2' } + return { content: item.content, num: index } }) console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { console.log(res, '======7890') this.editMode = false this.$message.success('保存成功') diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 256bfb4..e0b52d4 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -74,11 +74,10 @@ } // 用气事记查询 -export function getNoteList(params) { +export function getNoteList(type) { return request({ - url: '/note/list', - method: 'get', - params + url: '/note/list/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 479b9ad..8717f74 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '1' - } - getNoteList(data).then(response => { + getNoteList('1').then(response => { this.currentList = JSON.parse(response.data) }) }, diff --git a/src/views/gasDashboard/components/DeviceCount.vue b/src/views/gasDashboard/components/DeviceCount.vue index 91bafbf..d02dc49 100644 --- a/src/views/gasDashboard/components/DeviceCount.vue +++ b/src/views/gasDashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -56,7 +56,7 @@ methods: { fetchData() { const data = { - extra: 1 + extra: '0' } deviceStaticsByType(data).then(response => { // this.chartData.rows = response.data diff --git a/src/views/gasDashboard/components/waterNote.vue b/src/views/gasDashboard/components/waterNote.vue index d2fb0db..e5abaeb 100644 --- a/src/views/gasDashboard/components/waterNote.vue +++ b/src/views/gasDashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '2' - } - getNoteList(data).then(response => { + getNoteList('2').then(response => { console.log(response, '=====1234') this.currentList = JSON.parse(response.data) }) @@ -92,10 +89,14 @@ // 保存用水事记 saveNote() { const currentList = this.currentList.map((item, index) => { - return { list: this.currentList, content: item.content, num: index, type: '2' } + return { content: item.content, num: index } }) console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { console.log(res, '======7890') this.editMode = false this.$message.success('保存成功') diff --git a/src/views/gasOverview/gasOverviewSimple.vue b/src/views/gasOverview/gasOverviewSimple.vue index 7b61965..0493286 100644 --- a/src/views/gasOverview/gasOverviewSimple.vue +++ b/src/views/gasOverview/gasOverviewSimple.vue @@ -558,7 +558,7 @@ this.alarmList = response.data if (this.alarmList.length > 0) { this.hasAlarm = true - } + } for (const alarm of response.data) { for (const watch of watch_icon_layer.graphics) { if (alarm.devcode === watch.options.id) { @@ -697,7 +697,7 @@ bottom: 2px; right: 0px; padding: 10px 0px 10px 10px; - background-color: rgba(255, 234, 241,0.8); + background-color: rgba(241, 236, 238, 0.8); } // 报警列表 .map-alarm-div{