diff --git a/src/api/projectManage.js b/src/api/projectManage.js new file mode 100644 index 0000000..f7617bc --- /dev/null +++ b/src/api/projectManage.js @@ -0,0 +1,79 @@ +// 项管接口 +import request from '@/utils/request' +import config from '@/utils/baseConfig' +import qs from 'qs' + +// 项目总数 +export function fetchProjectCount (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/count', + method: 'get', + params: { + params: year + } + }) +} + +// 历年各类项目总数 +export function fetchProjectCountByYear (params) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByYear', + method: 'get', + params: { + params + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 某年各类项目总数 +export function fetchProjectCountByType (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByType', + method: 'get', + params: { + params: year + } + }) +} + +// 各状态项目总数 +export function fetchProjectCountByState (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByState', + method: 'get', + params: { + params: year + } + }) +} + +// 项目总投资额 +export function fetchProjectInvestment (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/investment', + method: 'get', + params: { + params: year + } + }) +} + +// 某年各类项目投资额 +export function fetchProjectInvestmentByType (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/investmentByType', + method: 'get', + params: { + params: year + } + }) +} diff --git a/src/api/projectManage.js b/src/api/projectManage.js new file mode 100644 index 0000000..f7617bc --- /dev/null +++ b/src/api/projectManage.js @@ -0,0 +1,79 @@ +// 项管接口 +import request from '@/utils/request' +import config from '@/utils/baseConfig' +import qs from 'qs' + +// 项目总数 +export function fetchProjectCount (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/count', + method: 'get', + params: { + params: year + } + }) +} + +// 历年各类项目总数 +export function fetchProjectCountByYear (params) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByYear', + method: 'get', + params: { + params + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 某年各类项目总数 +export function fetchProjectCountByType (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByType', + method: 'get', + params: { + params: year + } + }) +} + +// 各状态项目总数 +export function fetchProjectCountByState (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByState', + method: 'get', + params: { + params: year + } + }) +} + +// 项目总投资额 +export function fetchProjectInvestment (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/investment', + method: 'get', + params: { + params: year + } + }) +} + +// 某年各类项目投资额 +export function fetchProjectInvestmentByType (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/investmentByType', + method: 'get', + params: { + params: year + } + }) +} diff --git a/src/utils/formatDate.js b/src/utils/formatDate.js index 71f5268..134c9a8 100644 --- a/src/utils/formatDate.js +++ b/src/utils/formatDate.js @@ -40,3 +40,9 @@ ctmonth.setTime(ctmonth.getTime() - 3600 * 1000 * 24 * 30) return ctmonth } + +export function getYear () { + // const year = new Date().getFullYear() + // return year + return 2020 +} diff --git a/src/api/projectManage.js b/src/api/projectManage.js new file mode 100644 index 0000000..f7617bc --- /dev/null +++ b/src/api/projectManage.js @@ -0,0 +1,79 @@ +// 项管接口 +import request from '@/utils/request' +import config from '@/utils/baseConfig' +import qs from 'qs' + +// 项目总数 +export function fetchProjectCount (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/count', + method: 'get', + params: { + params: year + } + }) +} + +// 历年各类项目总数 +export function fetchProjectCountByYear (params) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByYear', + method: 'get', + params: { + params + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 某年各类项目总数 +export function fetchProjectCountByType (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByType', + method: 'get', + params: { + params: year + } + }) +} + +// 各状态项目总数 +export function fetchProjectCountByState (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByState', + method: 'get', + params: { + params: year + } + }) +} + +// 项目总投资额 +export function fetchProjectInvestment (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/investment', + method: 'get', + params: { + params: year + } + }) +} + +// 某年各类项目投资额 +export function fetchProjectInvestmentByType (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/investmentByType', + method: 'get', + params: { + params: year + } + }) +} diff --git a/src/utils/formatDate.js b/src/utils/formatDate.js index 71f5268..134c9a8 100644 --- a/src/utils/formatDate.js +++ b/src/utils/formatDate.js @@ -40,3 +40,9 @@ ctmonth.setTime(ctmonth.getTime() - 3600 * 1000 * 24 * 30) return ctmonth } + +export function getYear () { + // const year = new Date().getFullYear() + // return year + return 2020 +} diff --git a/src/views/cityConstruction/components/projects/components/gaugeItem.vue b/src/views/cityConstruction/components/projects/components/gaugeItem.vue index 86e4176..5316edd 100644 --- a/src/views/cityConstruction/components/projects/components/gaugeItem.vue +++ b/src/views/cityConstruction/components/projects/components/gaugeItem.vue @@ -1,5 +1,5 @@ diff --git a/src/api/projectManage.js b/src/api/projectManage.js new file mode 100644 index 0000000..f7617bc --- /dev/null +++ b/src/api/projectManage.js @@ -0,0 +1,79 @@ +// 项管接口 +import request from '@/utils/request' +import config from '@/utils/baseConfig' +import qs from 'qs' + +// 项目总数 +export function fetchProjectCount (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/count', + method: 'get', + params: { + params: year + } + }) +} + +// 历年各类项目总数 +export function fetchProjectCountByYear (params) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByYear', + method: 'get', + params: { + params + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 某年各类项目总数 +export function fetchProjectCountByType (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByType', + method: 'get', + params: { + params: year + } + }) +} + +// 各状态项目总数 +export function fetchProjectCountByState (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/countByState', + method: 'get', + params: { + params: year + } + }) +} + +// 项目总投资额 +export function fetchProjectInvestment (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/investment', + method: 'get', + params: { + params: year + } + }) +} + +// 某年各类项目投资额 +export function fetchProjectInvestmentByType (year) { + return request({ + baseURL: config.baseUrl, + url: '/project/investmentByType', + method: 'get', + params: { + params: year + } + }) +} diff --git a/src/utils/formatDate.js b/src/utils/formatDate.js index 71f5268..134c9a8 100644 --- a/src/utils/formatDate.js +++ b/src/utils/formatDate.js @@ -40,3 +40,9 @@ ctmonth.setTime(ctmonth.getTime() - 3600 * 1000 * 24 * 30) return ctmonth } + +export function getYear () { + // const year = new Date().getFullYear() + // return year + return 2020 +} diff --git a/src/views/cityConstruction/components/projects/components/gaugeItem.vue b/src/views/cityConstruction/components/projects/components/gaugeItem.vue index 86e4176..5316edd 100644 --- a/src/views/cityConstruction/components/projects/components/gaugeItem.vue +++ b/src/views/cityConstruction/components/projects/components/gaugeItem.vue @@ -1,5 +1,5 @@ diff --git a/src/views/cityConstruction/components/projects/components/investmentPie.vue b/src/views/cityConstruction/components/projects/components/investmentPie.vue index abb91be..c0fcbd5 100644 --- a/src/views/cityConstruction/components/projects/components/investmentPie.vue +++ b/src/views/cityConstruction/components/projects/components/investmentPie.vue @@ -19,11 +19,14 @@