diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartSelect.vue b/src/views/dashboard/components/layoutChartSelect.vue new file mode 100644 index 0000000..6039dcf --- /dev/null +++ b/src/views/dashboard/components/layoutChartSelect.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartSelect.vue b/src/views/dashboard/components/layoutChartSelect.vue new file mode 100644 index 0000000..6039dcf --- /dev/null +++ b/src/views/dashboard/components/layoutChartSelect.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartVerticalBar.vue b/src/views/dashboard/components/layoutChartVerticalBar.vue new file mode 100644 index 0000000..89b57f7 --- /dev/null +++ b/src/views/dashboard/components/layoutChartVerticalBar.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartSelect.vue b/src/views/dashboard/components/layoutChartSelect.vue new file mode 100644 index 0000000..6039dcf --- /dev/null +++ b/src/views/dashboard/components/layoutChartSelect.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartVerticalBar.vue b/src/views/dashboard/components/layoutChartVerticalBar.vue new file mode 100644 index 0000000..89b57f7 --- /dev/null +++ b/src/views/dashboard/components/layoutChartVerticalBar.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutMixChart.vue b/src/views/dashboard/components/layoutMixChart.vue new file mode 100644 index 0000000..b2bad49 --- /dev/null +++ b/src/views/dashboard/components/layoutMixChart.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartSelect.vue b/src/views/dashboard/components/layoutChartSelect.vue new file mode 100644 index 0000000..6039dcf --- /dev/null +++ b/src/views/dashboard/components/layoutChartSelect.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartVerticalBar.vue b/src/views/dashboard/components/layoutChartVerticalBar.vue new file mode 100644 index 0000000..89b57f7 --- /dev/null +++ b/src/views/dashboard/components/layoutChartVerticalBar.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutMixChart.vue b/src/views/dashboard/components/layoutMixChart.vue new file mode 100644 index 0000000..b2bad49 --- /dev/null +++ b/src/views/dashboard/components/layoutMixChart.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutStackAreaChart.vue b/src/views/dashboard/components/layoutStackAreaChart.vue new file mode 100644 index 0000000..b100ad3 --- /dev/null +++ b/src/views/dashboard/components/layoutStackAreaChart.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartSelect.vue b/src/views/dashboard/components/layoutChartSelect.vue new file mode 100644 index 0000000..6039dcf --- /dev/null +++ b/src/views/dashboard/components/layoutChartSelect.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartVerticalBar.vue b/src/views/dashboard/components/layoutChartVerticalBar.vue new file mode 100644 index 0000000..89b57f7 --- /dev/null +++ b/src/views/dashboard/components/layoutChartVerticalBar.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutMixChart.vue b/src/views/dashboard/components/layoutMixChart.vue new file mode 100644 index 0000000..b2bad49 --- /dev/null +++ b/src/views/dashboard/components/layoutMixChart.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutStackAreaChart.vue b/src/views/dashboard/components/layoutStackAreaChart.vue new file mode 100644 index 0000000..b100ad3 --- /dev/null +++ b/src/views/dashboard/components/layoutStackAreaChart.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/managementList.vue b/src/views/dashboard/components/managementList.vue new file mode 100644 index 0000000..e6000f1 --- /dev/null +++ b/src/views/dashboard/components/managementList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartSelect.vue b/src/views/dashboard/components/layoutChartSelect.vue new file mode 100644 index 0000000..6039dcf --- /dev/null +++ b/src/views/dashboard/components/layoutChartSelect.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartVerticalBar.vue b/src/views/dashboard/components/layoutChartVerticalBar.vue new file mode 100644 index 0000000..89b57f7 --- /dev/null +++ b/src/views/dashboard/components/layoutChartVerticalBar.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutMixChart.vue b/src/views/dashboard/components/layoutMixChart.vue new file mode 100644 index 0000000..b2bad49 --- /dev/null +++ b/src/views/dashboard/components/layoutMixChart.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutStackAreaChart.vue b/src/views/dashboard/components/layoutStackAreaChart.vue new file mode 100644 index 0000000..b100ad3 --- /dev/null +++ b/src/views/dashboard/components/layoutStackAreaChart.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/managementList.vue b/src/views/dashboard/components/managementList.vue new file mode 100644 index 0000000..e6000f1 --- /dev/null +++ b/src/views/dashboard/components/managementList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/switch.vue b/src/views/dashboard/components/switch.vue index 58a493d..f373cab 100644 --- a/src/views/dashboard/components/switch.vue +++ b/src/views/dashboard/components/switch.vue @@ -2,7 +2,7 @@
diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartSelect.vue b/src/views/dashboard/components/layoutChartSelect.vue new file mode 100644 index 0000000..6039dcf --- /dev/null +++ b/src/views/dashboard/components/layoutChartSelect.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartVerticalBar.vue b/src/views/dashboard/components/layoutChartVerticalBar.vue new file mode 100644 index 0000000..89b57f7 --- /dev/null +++ b/src/views/dashboard/components/layoutChartVerticalBar.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutMixChart.vue b/src/views/dashboard/components/layoutMixChart.vue new file mode 100644 index 0000000..b2bad49 --- /dev/null +++ b/src/views/dashboard/components/layoutMixChart.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutStackAreaChart.vue b/src/views/dashboard/components/layoutStackAreaChart.vue new file mode 100644 index 0000000..b100ad3 --- /dev/null +++ b/src/views/dashboard/components/layoutStackAreaChart.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/managementList.vue b/src/views/dashboard/components/managementList.vue new file mode 100644 index 0000000..e6000f1 --- /dev/null +++ b/src/views/dashboard/components/managementList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/switch.vue b/src/views/dashboard/components/switch.vue index 58a493d..f373cab 100644 --- a/src/views/dashboard/components/switch.vue +++ b/src/views/dashboard/components/switch.vue @@ -2,7 +2,7 @@
diff --git a/src/views/dashboard/devicePanel.vue b/src/views/dashboard/devicePanel.vue index c543e97..65a6733 100644 --- a/src/views/dashboard/devicePanel.vue +++ b/src/views/dashboard/devicePanel.vue @@ -1,13 +1,76 @@ - \ No newline at end of file diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartSelect.vue b/src/views/dashboard/components/layoutChartSelect.vue new file mode 100644 index 0000000..6039dcf --- /dev/null +++ b/src/views/dashboard/components/layoutChartSelect.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartVerticalBar.vue b/src/views/dashboard/components/layoutChartVerticalBar.vue new file mode 100644 index 0000000..89b57f7 --- /dev/null +++ b/src/views/dashboard/components/layoutChartVerticalBar.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutMixChart.vue b/src/views/dashboard/components/layoutMixChart.vue new file mode 100644 index 0000000..b2bad49 --- /dev/null +++ b/src/views/dashboard/components/layoutMixChart.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutStackAreaChart.vue b/src/views/dashboard/components/layoutStackAreaChart.vue new file mode 100644 index 0000000..b100ad3 --- /dev/null +++ b/src/views/dashboard/components/layoutStackAreaChart.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/managementList.vue b/src/views/dashboard/components/managementList.vue new file mode 100644 index 0000000..e6000f1 --- /dev/null +++ b/src/views/dashboard/components/managementList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/switch.vue b/src/views/dashboard/components/switch.vue index 58a493d..f373cab 100644 --- a/src/views/dashboard/components/switch.vue +++ b/src/views/dashboard/components/switch.vue @@ -2,7 +2,7 @@
  • - + {{btn.name}}
diff --git a/src/views/dashboard/devicePanel.vue b/src/views/dashboard/devicePanel.vue index c543e97..65a6733 100644 --- a/src/views/dashboard/devicePanel.vue +++ b/src/views/dashboard/devicePanel.vue @@ -1,13 +1,76 @@ - \ No newline at end of file diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 41cb204..f017854 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -47,6 +47,9 @@ .dashboard { &-container { margin: 10px 20px; + width: 100%; + box-sizing: content-box; + // overflow: hidden; } &-text { font-size: 30px; diff --git a/public/config/project.config.json b/public/config/project.config.json index cd629df..0f1aacd 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -4,6 +4,8 @@ "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", "mainPage": "http://111.198.10.15:11404/dcms/#", + "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", + "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", "singleSys": true, "provinceCode": "360000", "cityCode": "361000", diff --git a/src/api/cockpit/cockpit.js b/src/api/cockpit/cockpit.js new file mode 100644 index 0000000..625e638 --- /dev/null +++ b/src/api/cockpit/cockpit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取设备列表(不分页)-带经纬度 +export function getDevicePosition() { + return request({ + url: 'statistic/deviceList', + method: 'get', + }) +} +// 设备总数、IOT设备数量、IOT设备在线率 +export function getDeviceInfo() { + return request({ + url: 'statistic/deviceCount', + method: 'get', + }) +} + +// 近一月设备数量统计 +export function getDeviceStatistics() { + return request({ + url: 'statistic/deviceCount/montht', + method: 'get', + }) +} + +// 设备品类统计 +export function getDeviceCategory() { + return request({ + url: 'statistic/deviceCategory', + method: 'get', + }) +} + +// 区域设备排行 +// export function getRegionalRank() { +// return request({ +// url: 'statistic/deviceCategory', +// method: 'get', +// }) +// } \ No newline at end of file diff --git a/src/assets/global_images/photo.png b/src/assets/global_images/photo.png new file mode 100644 index 0000000..7d1e905 --- /dev/null +++ b/src/assets/global_images/photo.png Binary files differ diff --git a/src/components/echart/barChart/MixChart.vue b/src/components/echart/barChart/MixChart.vue new file mode 100644 index 0000000..14b069e --- /dev/null +++ b/src/components/echart/barChart/MixChart.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/components/echart/barChart/verticalBarChart.vue b/src/components/echart/barChart/verticalBarChart.vue new file mode 100644 index 0000000..a508ed5 --- /dev/null +++ b/src/components/echart/barChart/verticalBarChart.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/index.vue b/src/components/echart/index.vue index 483b9da..7e32880 100644 --- a/src/components/echart/index.vue +++ b/src/components/echart/index.vue @@ -5,7 +5,6 @@ + + + \ No newline at end of file diff --git a/src/components/echart/lineChart/gradientLineChart.vue b/src/components/echart/lineChart/gradientLineChart.vue index 1658675..5b758a1 100644 --- a/src/components/echart/lineChart/gradientLineChart.vue +++ b/src/components/echart/lineChart/gradientLineChart.vue @@ -102,9 +102,10 @@ xAxis: [ { type: 'category', - boundaryGap: false, + boundaryGap: true, data: [], axisLine: { + show:false, lineStyle: { color: this.axisLineColor // 轴线的颜色 } @@ -112,12 +113,16 @@ axisLabel: { color: this.fontColor, // X轴名称颜色 fontSize: 14 + }, + axisTick:{ + show:true } } ], yAxis: [ { name: this.unit, + show:false, type: 'value', color: '#000', nameTextStyle: { @@ -154,15 +159,15 @@ watch: { xAxisData(newVal) { this.option.xAxis[0].data = newVal - this.refreshEchart() + // this.refreshEchart() }, legend(newVal) { this.option.legend.data = newVal - this.refreshEchart() + // this.refreshEchart() }, unit(newVal) { this.option.yAxis[0].name = newVal - this.refreshEchart() + // this.refreshEchart() }, seriesData: { handler(newVal) { @@ -173,82 +178,85 @@ type: 'line', symbol: 'none', // 去掉折线节点 smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, + // itemStyle: { + // color: `rgb(${item.color})` + // }, lineStyle: { width: 1 }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) + areaStyle:{ + opacity:0.3 }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, data: item.data } newSeries.push(series) } this.$set(this.option, 'series', newSeries) - this.refreshChart() + // this.refreshChart() }, deep: true } }, - mounted() { - this.refreshChart() - }, - methods: { - refreshChart() { - this.unit && (this.option.yAxis[0].name = this.unit) - if (this.xAxisData.length) { - this.option.legend.data = this.legend - this.option.xAxis[0].data = this.xAxisData - const newSeries = [] - for (const item of this.seriesData) { - const series = { - name: item.name, - type: 'line', - symbol: 'none', // 去掉折线节点 - smooth: this.smooth, // 曲线变平滑 - itemStyle: { - color: `rgb(${item.color})` - }, - lineStyle: { - width: 1 - }, - areaStyle: { - color: new this.$echarts.graphic.LinearGradient( - 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 - [ - { - offset: 0.1, - color: `rgba(${item.color},.6)` - }, - { - offset: 1, - color: 'rgba(0,0,0,.0)' - } - ] - ) - }, - data: item.data - } - newSeries.push(series) - } - this.$set(this.option, 'series', newSeries) - } - } - } + // mounted() { + // this.refreshChart() + // }, + // methods: { + // refreshChart() { + // this.unit && (this.option.yAxis[0].name = this.unit) + // if (this.xAxisData.length) { + // this.option.legend.data = this.legend + // this.option.xAxis[0].data = this.xAxisData + // const newSeries = [] + // for (const item of this.seriesData) { + // const series = { + // name: item.name, + // type: 'line', + // symbol: 'none', // 去掉折线节点 + // smooth: this.smooth, // 曲线变平滑 + // itemStyle: { + // color: `rgb(${item.color})` + // }, + // lineStyle: { + // width: 1 + // }, + // areaStyle: { + // color: new this.$echarts.graphic.LinearGradient( + // 0, 0, 0, 1, // 变化度 //三种由深及浅的颜色 + // [ + // { + // offset: 0.1, + // color: `rgba(${item.color},.6)` + // }, + // { + // offset: 1, + // color: 'rgba(0,0,0,.0)' + // } + // ] + // ) + // }, + // data: item.data + // } + // newSeries.push(series) + // } + // this.$set(this.option, 'series', newSeries) + // } + // } + // } } diff --git a/src/components/echart/pieChart/doughnutChart.vue b/src/components/echart/pieChart/doughnutChart.vue new file mode 100644 index 0000000..7f3cac2 --- /dev/null +++ b/src/components/echart/pieChart/doughnutChart.vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/src/components/echart/radarChart/baseRadarChart.vue b/src/components/echart/radarChart/baseRadarChart.vue new file mode 100644 index 0000000..15b7124 --- /dev/null +++ b/src/components/echart/radarChart/baseRadarChart.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index 72b3f08..d438b89 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -167,6 +167,7 @@ imageUrl: this.baseConfig.baseUrl + '/static/', categoryList: [], brandList: [], + defaultPhoto: require('@/assets/global_images/photo.png'), // 默认图片路径 rules: { productCode: [{ required: true, message: '产品型号不能为空', trigger: ['blur', 'change'] }], productName: [{ required: true, message: '产品名称不能为空', trigger: ['blur', 'change'] }], diff --git a/src/icons/svg/device-count.svg b/src/icons/svg/device-count.svg new file mode 100644 index 0000000..97ea218 --- /dev/null +++ b/src/icons/svg/device-count.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-fund.svg b/src/icons/svg/device-fund.svg new file mode 100644 index 0000000..62d2f30 --- /dev/null +++ b/src/icons/svg/device-fund.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/device-panel.svg b/src/icons/svg/device-panel.svg new file mode 100644 index 0000000..96c1fd1 --- /dev/null +++ b/src/icons/svg/device-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/management-panel.svg b/src/icons/svg/management-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/management-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/supplier-panel.svg b/src/icons/svg/supplier-panel.svg new file mode 100644 index 0000000..5552981 --- /dev/null +++ b/src/icons/svg/supplier-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/dashboard/components/dashboardHeader.vue b/src/views/dashboard/components/dashboardHeader.vue index 368f5a5..1bf1aa9 100644 --- a/src/views/dashboard/components/dashboardHeader.vue +++ b/src/views/dashboard/components/dashboardHeader.vue @@ -23,13 +23,13 @@ \ No newline at end of file diff --git a/src/views/dashboard/components/deviceList.vue b/src/views/dashboard/components/deviceList.vue new file mode 100644 index 0000000..d8e2e1e --- /dev/null +++ b/src/views/dashboard/components/deviceList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutAreaChart.vue b/src/views/dashboard/components/layoutAreaChart.vue new file mode 100644 index 0000000..740f277 --- /dev/null +++ b/src/views/dashboard/components/layoutAreaChart.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartDoughnu.vue b/src/views/dashboard/components/layoutChartDoughnu.vue new file mode 100644 index 0000000..d06ab18 --- /dev/null +++ b/src/views/dashboard/components/layoutChartDoughnu.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartRadar.vue b/src/views/dashboard/components/layoutChartRadar.vue new file mode 100644 index 0000000..e7f6e1a --- /dev/null +++ b/src/views/dashboard/components/layoutChartRadar.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartSelect.vue b/src/views/dashboard/components/layoutChartSelect.vue new file mode 100644 index 0000000..6039dcf --- /dev/null +++ b/src/views/dashboard/components/layoutChartSelect.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutChartVerticalBar.vue b/src/views/dashboard/components/layoutChartVerticalBar.vue new file mode 100644 index 0000000..89b57f7 --- /dev/null +++ b/src/views/dashboard/components/layoutChartVerticalBar.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutMixChart.vue b/src/views/dashboard/components/layoutMixChart.vue new file mode 100644 index 0000000..b2bad49 --- /dev/null +++ b/src/views/dashboard/components/layoutMixChart.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/layoutStackAreaChart.vue b/src/views/dashboard/components/layoutStackAreaChart.vue new file mode 100644 index 0000000..b100ad3 --- /dev/null +++ b/src/views/dashboard/components/layoutStackAreaChart.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/managementList.vue b/src/views/dashboard/components/managementList.vue new file mode 100644 index 0000000..e6000f1 --- /dev/null +++ b/src/views/dashboard/components/managementList.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/dashboard/components/switch.vue b/src/views/dashboard/components/switch.vue index 58a493d..f373cab 100644 --- a/src/views/dashboard/components/switch.vue +++ b/src/views/dashboard/components/switch.vue @@ -2,7 +2,7 @@
  • - + {{btn.name}}
diff --git a/src/views/dashboard/devicePanel.vue b/src/views/dashboard/devicePanel.vue index c543e97..65a6733 100644 --- a/src/views/dashboard/devicePanel.vue +++ b/src/views/dashboard/devicePanel.vue @@ -1,13 +1,76 @@ - \ No newline at end of file diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 41cb204..f017854 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -47,6 +47,9 @@ .dashboard { &-container { margin: 10px 20px; + width: 100%; + box-sizing: content-box; + // overflow: hidden; } &-text { font-size: 30px; diff --git a/src/views/dashboard/managementPanel.vue b/src/views/dashboard/managementPanel.vue index 13d930c..ea6d857 100644 --- a/src/views/dashboard/managementPanel.vue +++ b/src/views/dashboard/managementPanel.vue @@ -1,13 +1,73 @@ - \ No newline at end of file