diff --git a/src/api/construction.js b/src/api/construction.js
index d8167b3..13cbc95 100644
--- a/src/api/construction.js
+++ b/src/api/construction.js
@@ -14,3 +14,63 @@
method: 'post'
})
}
+
+// 工地总数量
+export function fetchConstructionCount (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/count',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地总投资
+export function fetchConstructionInvestment (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/investment',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各类工地数量
+export function fetchConstructionByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各状态工地数量
+export function fetchConstructionByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地报警状态
+export function fetchConstructionAlarmByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/alarmByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/api/construction.js b/src/api/construction.js
index d8167b3..13cbc95 100644
--- a/src/api/construction.js
+++ b/src/api/construction.js
@@ -14,3 +14,63 @@
method: 'post'
})
}
+
+// 工地总数量
+export function fetchConstructionCount (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/count',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地总投资
+export function fetchConstructionInvestment (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/investment',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各类工地数量
+export function fetchConstructionByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各状态工地数量
+export function fetchConstructionByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地报警状态
+export function fetchConstructionAlarmByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/alarmByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/api/iot.js b/src/api/iot.js
new file mode 100644
index 0000000..1c28bf5
--- /dev/null
+++ b/src/api/iot.js
@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+import config from '@/utils/baseConfig'
+
+// 物联网接口
+
+// 各类物联网设备数量
+export function fetchProjectInvestmentByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/project/investmentByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/api/construction.js b/src/api/construction.js
index d8167b3..13cbc95 100644
--- a/src/api/construction.js
+++ b/src/api/construction.js
@@ -14,3 +14,63 @@
method: 'post'
})
}
+
+// 工地总数量
+export function fetchConstructionCount (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/count',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地总投资
+export function fetchConstructionInvestment (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/investment',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各类工地数量
+export function fetchConstructionByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各状态工地数量
+export function fetchConstructionByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地报警状态
+export function fetchConstructionAlarmByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/alarmByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/api/iot.js b/src/api/iot.js
new file mode 100644
index 0000000..1c28bf5
--- /dev/null
+++ b/src/api/iot.js
@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+import config from '@/utils/baseConfig'
+
+// 物联网接口
+
+// 各类物联网设备数量
+export function fetchProjectInvestmentByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/project/investmentByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/views/cityConstruction/components/projects/components/gaugeItem.vue b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
index 5316edd..071632e 100644
--- a/src/views/cityConstruction/components/projects/components/gaugeItem.vue
+++ b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
@@ -17,11 +17,11 @@
{{totalTitle}}
-
{{data.total}}{{unit1}}
+
{{data.already}}{{unit1}}
{{alreadyTitle}}
-
{{data.already}}{{unit2}}
+
{{data.rate}}{{unit2}}
@@ -52,7 +52,7 @@
},
alreadyTitle: {
type: String,
- default: '同比'
+ default: '占比'
},
totalTitle: {
type: String,
diff --git a/src/api/construction.js b/src/api/construction.js
index d8167b3..13cbc95 100644
--- a/src/api/construction.js
+++ b/src/api/construction.js
@@ -14,3 +14,63 @@
method: 'post'
})
}
+
+// 工地总数量
+export function fetchConstructionCount (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/count',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地总投资
+export function fetchConstructionInvestment (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/investment',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各类工地数量
+export function fetchConstructionByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各状态工地数量
+export function fetchConstructionByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地报警状态
+export function fetchConstructionAlarmByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/alarmByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/api/iot.js b/src/api/iot.js
new file mode 100644
index 0000000..1c28bf5
--- /dev/null
+++ b/src/api/iot.js
@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+import config from '@/utils/baseConfig'
+
+// 物联网接口
+
+// 各类物联网设备数量
+export function fetchProjectInvestmentByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/project/investmentByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/views/cityConstruction/components/projects/components/gaugeItem.vue b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
index 5316edd..071632e 100644
--- a/src/views/cityConstruction/components/projects/components/gaugeItem.vue
+++ b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
@@ -17,11 +17,11 @@
{{totalTitle}}
-
{{data.total}}{{unit1}}
+
{{data.already}}{{unit1}}
{{alreadyTitle}}
-
{{data.already}}{{unit2}}
+
{{data.rate}}{{unit2}}
@@ -52,7 +52,7 @@
},
alreadyTitle: {
type: String,
- default: '同比'
+ default: '占比'
},
totalTitle: {
type: String,
diff --git a/src/views/cityConstruction/components/projects/components/investmentRank.vue b/src/views/cityConstruction/components/projects/components/investmentRank.vue
index 7670ede..67ada10 100644
--- a/src/views/cityConstruction/components/projects/components/investmentRank.vue
+++ b/src/views/cityConstruction/components/projects/components/investmentRank.vue
@@ -38,10 +38,10 @@
getData () {
fetchProjectInvestmentByType(this.year).then(response => {
if (response.code === 200) {
- const data = response.data.map(item => {
+ let data = response.data.map(item => {
return {
name: item.type,
- value: item.value.toFixed(1) + '万元'
+ value: Math.round(item.value* 10) / 10
}
})
this.config = {
diff --git a/src/api/construction.js b/src/api/construction.js
index d8167b3..13cbc95 100644
--- a/src/api/construction.js
+++ b/src/api/construction.js
@@ -14,3 +14,63 @@
method: 'post'
})
}
+
+// 工地总数量
+export function fetchConstructionCount (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/count',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地总投资
+export function fetchConstructionInvestment (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/investment',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各类工地数量
+export function fetchConstructionByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各状态工地数量
+export function fetchConstructionByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地报警状态
+export function fetchConstructionAlarmByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/alarmByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/api/iot.js b/src/api/iot.js
new file mode 100644
index 0000000..1c28bf5
--- /dev/null
+++ b/src/api/iot.js
@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+import config from '@/utils/baseConfig'
+
+// 物联网接口
+
+// 各类物联网设备数量
+export function fetchProjectInvestmentByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/project/investmentByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/views/cityConstruction/components/projects/components/gaugeItem.vue b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
index 5316edd..071632e 100644
--- a/src/views/cityConstruction/components/projects/components/gaugeItem.vue
+++ b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
@@ -17,11 +17,11 @@
{{totalTitle}}
-
{{data.total}}{{unit1}}
+
{{data.already}}{{unit1}}
{{alreadyTitle}}
-
{{data.already}}{{unit2}}
+
{{data.rate}}{{unit2}}
@@ -52,7 +52,7 @@
},
alreadyTitle: {
type: String,
- default: '同比'
+ default: '占比'
},
totalTitle: {
type: String,
diff --git a/src/views/cityConstruction/components/projects/components/investmentRank.vue b/src/views/cityConstruction/components/projects/components/investmentRank.vue
index 7670ede..67ada10 100644
--- a/src/views/cityConstruction/components/projects/components/investmentRank.vue
+++ b/src/views/cityConstruction/components/projects/components/investmentRank.vue
@@ -38,10 +38,10 @@
getData () {
fetchProjectInvestmentByType(this.year).then(response => {
if (response.code === 200) {
- const data = response.data.map(item => {
+ let data = response.data.map(item => {
return {
name: item.type,
- value: item.value.toFixed(1) + '万元'
+ value: Math.round(item.value* 10) / 10
}
})
this.config = {
diff --git a/src/views/cityConstruction/components/projects/components/projectAll.vue b/src/views/cityConstruction/components/projects/components/projectAll.vue
index 0257429..d525cbe 100644
--- a/src/views/cityConstruction/components/projects/components/projectAll.vue
+++ b/src/views/cityConstruction/components/projects/components/projectAll.vue
@@ -56,7 +56,7 @@
data: {
already: item.value,
total: total,
- rate: Math.round(100 * item.complete / total)
+ rate: Math.round(100 * item.value / total)
}
})
}
diff --git a/src/api/construction.js b/src/api/construction.js
index d8167b3..13cbc95 100644
--- a/src/api/construction.js
+++ b/src/api/construction.js
@@ -14,3 +14,63 @@
method: 'post'
})
}
+
+// 工地总数量
+export function fetchConstructionCount (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/count',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地总投资
+export function fetchConstructionInvestment (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/investment',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各类工地数量
+export function fetchConstructionByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各状态工地数量
+export function fetchConstructionByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地报警状态
+export function fetchConstructionAlarmByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/alarmByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/api/iot.js b/src/api/iot.js
new file mode 100644
index 0000000..1c28bf5
--- /dev/null
+++ b/src/api/iot.js
@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+import config from '@/utils/baseConfig'
+
+// 物联网接口
+
+// 各类物联网设备数量
+export function fetchProjectInvestmentByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/project/investmentByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/views/cityConstruction/components/projects/components/gaugeItem.vue b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
index 5316edd..071632e 100644
--- a/src/views/cityConstruction/components/projects/components/gaugeItem.vue
+++ b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
@@ -17,11 +17,11 @@
{{totalTitle}}
-
{{data.total}}{{unit1}}
+
{{data.already}}{{unit1}}
{{alreadyTitle}}
-
{{data.already}}{{unit2}}
+
{{data.rate}}{{unit2}}
@@ -52,7 +52,7 @@
},
alreadyTitle: {
type: String,
- default: '同比'
+ default: '占比'
},
totalTitle: {
type: String,
diff --git a/src/views/cityConstruction/components/projects/components/investmentRank.vue b/src/views/cityConstruction/components/projects/components/investmentRank.vue
index 7670ede..67ada10 100644
--- a/src/views/cityConstruction/components/projects/components/investmentRank.vue
+++ b/src/views/cityConstruction/components/projects/components/investmentRank.vue
@@ -38,10 +38,10 @@
getData () {
fetchProjectInvestmentByType(this.year).then(response => {
if (response.code === 200) {
- const data = response.data.map(item => {
+ let data = response.data.map(item => {
return {
name: item.type,
- value: item.value.toFixed(1) + '万元'
+ value: Math.round(item.value* 10) / 10
}
})
this.config = {
diff --git a/src/views/cityConstruction/components/projects/components/projectAll.vue b/src/views/cityConstruction/components/projects/components/projectAll.vue
index 0257429..d525cbe 100644
--- a/src/views/cityConstruction/components/projects/components/projectAll.vue
+++ b/src/views/cityConstruction/components/projects/components/projectAll.vue
@@ -56,7 +56,7 @@
data: {
already: item.value,
total: total,
- rate: Math.round(100 * item.complete / total)
+ rate: Math.round(100 * item.value / total)
}
})
}
diff --git a/src/views/cityConstruction/components/projects/components/projectLine.vue b/src/views/cityConstruction/components/projects/components/projectLine.vue
index 90a7f63..e9aae39 100644
--- a/src/views/cityConstruction/components/projects/components/projectLine.vue
+++ b/src/views/cityConstruction/components/projects/components/projectLine.vue
@@ -4,7 +4,7 @@
* @Date: 2020-11-30 17:00:18
-->
-
+
{
if (response.code === 200) {
debugger
const data = response.data
const datalength = data.length
- this.options.legend = data.map(item => { return item.year })
- this.options.xAxisData = data[0].data.map(item => { return item.year })
+ this.options.legend = data.map(item => { return item.year.toString() })
+ this.options.xAxisData = data[0].data.map(item => { return item.type })
const dataFilter = []
for (let i = 0; i < datalength; i++) {
const value = data[i].data.map(item => item.value)
dataFilter.push({
- name: data[i].year, data: value, color: this.colors[i]
+ name: data[i].year.toString(), data: value, color: this.colors[i]
})
}
this.options.seriesData = dataFilter
diff --git a/src/api/construction.js b/src/api/construction.js
index d8167b3..13cbc95 100644
--- a/src/api/construction.js
+++ b/src/api/construction.js
@@ -14,3 +14,63 @@
method: 'post'
})
}
+
+// 工地总数量
+export function fetchConstructionCount (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/count',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地总投资
+export function fetchConstructionInvestment (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/investment',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各类工地数量
+export function fetchConstructionByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 某年各状态工地数量
+export function fetchConstructionByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/countByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
+
+// 工地报警状态
+export function fetchConstructionAlarmByState (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/construction/alarmByState',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/api/iot.js b/src/api/iot.js
new file mode 100644
index 0000000..1c28bf5
--- /dev/null
+++ b/src/api/iot.js
@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+import config from '@/utils/baseConfig'
+
+// 物联网接口
+
+// 各类物联网设备数量
+export function fetchProjectInvestmentByType (year) {
+ return request({
+ baseURL: config.baseUrl,
+ url: '/project/investmentByType',
+ method: 'get',
+ params: {
+ params: year
+ }
+ })
+}
diff --git a/src/views/cityConstruction/components/projects/components/gaugeItem.vue b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
index 5316edd..071632e 100644
--- a/src/views/cityConstruction/components/projects/components/gaugeItem.vue
+++ b/src/views/cityConstruction/components/projects/components/gaugeItem.vue
@@ -17,11 +17,11 @@
{{totalTitle}}
-
{{data.total}}{{unit1}}
+
{{data.already}}{{unit1}}
{{alreadyTitle}}
-
{{data.already}}{{unit2}}
+
{{data.rate}}{{unit2}}
@@ -52,7 +52,7 @@
},
alreadyTitle: {
type: String,
- default: '同比'
+ default: '占比'
},
totalTitle: {
type: String,
diff --git a/src/views/cityConstruction/components/projects/components/investmentRank.vue b/src/views/cityConstruction/components/projects/components/investmentRank.vue
index 7670ede..67ada10 100644
--- a/src/views/cityConstruction/components/projects/components/investmentRank.vue
+++ b/src/views/cityConstruction/components/projects/components/investmentRank.vue
@@ -38,10 +38,10 @@
getData () {
fetchProjectInvestmentByType(this.year).then(response => {
if (response.code === 200) {
- const data = response.data.map(item => {
+ let data = response.data.map(item => {
return {
name: item.type,
- value: item.value.toFixed(1) + '万元'
+ value: Math.round(item.value* 10) / 10
}
})
this.config = {
diff --git a/src/views/cityConstruction/components/projects/components/projectAll.vue b/src/views/cityConstruction/components/projects/components/projectAll.vue
index 0257429..d525cbe 100644
--- a/src/views/cityConstruction/components/projects/components/projectAll.vue
+++ b/src/views/cityConstruction/components/projects/components/projectAll.vue
@@ -56,7 +56,7 @@
data: {
already: item.value,
total: total,
- rate: Math.round(100 * item.complete / total)
+ rate: Math.round(100 * item.value / total)
}
})
}
diff --git a/src/views/cityConstruction/components/projects/components/projectLine.vue b/src/views/cityConstruction/components/projects/components/projectLine.vue
index 90a7f63..e9aae39 100644
--- a/src/views/cityConstruction/components/projects/components/projectLine.vue
+++ b/src/views/cityConstruction/components/projects/components/projectLine.vue
@@ -4,7 +4,7 @@
* @Date: 2020-11-30 17:00:18
-->
-
+
{
if (response.code === 200) {
debugger
const data = response.data
const datalength = data.length
- this.options.legend = data.map(item => { return item.year })
- this.options.xAxisData = data[0].data.map(item => { return item.year })
+ this.options.legend = data.map(item => { return item.year.toString() })
+ this.options.xAxisData = data[0].data.map(item => { return item.type })
const dataFilter = []
for (let i = 0; i < datalength; i++) {
const value = data[i].data.map(item => item.value)
dataFilter.push({
- name: data[i].year, data: value, color: this.colors[i]
+ name: data[i].year.toString(), data: value, color: this.colors[i]
})
}
this.options.seriesData = dataFilter
diff --git a/src/views/cityConstruction/components/projects/components/projectTotal.vue b/src/views/cityConstruction/components/projects/components/projectTotal.vue
index 064888c..f74de6c 100644
--- a/src/views/cityConstruction/components/projects/components/projectTotal.vue
+++ b/src/views/cityConstruction/components/projects/components/projectTotal.vue
@@ -16,7 +16,7 @@