diff --git a/src/components/annularProgress/annularComp.vue b/src/components/annularProgress/annularComp.vue index 5305f16..5a09137 100644 --- a/src/components/annularProgress/annularComp.vue +++ b/src/components/annularProgress/annularComp.vue @@ -19,7 +19,7 @@
在线设备数:{{value.online}} - +
@@ -64,14 +64,25 @@ this.refreshValue() }, watch: { - value (val) { - this.refreshValue() + // value (val) { + // console.log('-----------------------------监听到诶覆盖'); + + // this.refreshValue(val) + // }, + value: { + handler (newValue, oldValue) { + console.log('-----------------------------监听到诶覆盖', newValue) + this.refreshValue(newValue) + }, + // 开启深度监听 + deep: true, + immediate: true } }, methods: { - refreshValue () { + refreshValue (val) { console.log('refreshValue') - const val = this.value + // const val = this.value if (val) { const online = Math.round(val.online / val.total * 100) // 求在线率 this.data.online = online @@ -110,14 +121,14 @@ height: .12rem; } span{ - font-size: .04rem; + font-size: .07rem; color:$blockTextColor; -webkit-transform-origin-x: 0; transform: scale(0.5833333333333334); -webkit-transform: scale(.5); b{ font-weight: bold; - font-size: .07rem + font-size: .1rem } } } diff --git a/src/components/annularProgress/annularComp.vue b/src/components/annularProgress/annularComp.vue index 5305f16..5a09137 100644 --- a/src/components/annularProgress/annularComp.vue +++ b/src/components/annularProgress/annularComp.vue @@ -19,7 +19,7 @@
在线设备数:{{value.online}} - +
@@ -64,14 +64,25 @@ this.refreshValue() }, watch: { - value (val) { - this.refreshValue() + // value (val) { + // console.log('-----------------------------监听到诶覆盖'); + + // this.refreshValue(val) + // }, + value: { + handler (newValue, oldValue) { + console.log('-----------------------------监听到诶覆盖', newValue) + this.refreshValue(newValue) + }, + // 开启深度监听 + deep: true, + immediate: true } }, methods: { - refreshValue () { + refreshValue (val) { console.log('refreshValue') - const val = this.value + // const val = this.value if (val) { const online = Math.round(val.online / val.total * 100) // 求在线率 this.data.online = online @@ -110,14 +121,14 @@ height: .12rem; } span{ - font-size: .04rem; + font-size: .07rem; color:$blockTextColor; -webkit-transform-origin-x: 0; transform: scale(0.5833333333333334); -webkit-transform: scale(.5); b{ font-weight: bold; - font-size: .07rem + font-size: .1rem } } } diff --git a/src/components/earthViews/EarthViews.vue b/src/components/earthViews/EarthViews.vue index 3ad4400..f585ada 100644 --- a/src/components/earthViews/EarthViews.vue +++ b/src/components/earthViews/EarthViews.vue @@ -49,8 +49,10 @@ overflow: hidden; } .earth-main > div > div { - width: 0.37rem; - height: 0.37rem; + // width: 0.37rem; + // height: 0.37rem; + width: 0.42rem; + height: 0.42rem; font-weight: bold; font-size: 0.12rem; font-family: $digitalFamily; diff --git a/src/components/annularProgress/annularComp.vue b/src/components/annularProgress/annularComp.vue index 5305f16..5a09137 100644 --- a/src/components/annularProgress/annularComp.vue +++ b/src/components/annularProgress/annularComp.vue @@ -19,7 +19,7 @@
在线设备数:{{value.online}} - +
@@ -64,14 +64,25 @@ this.refreshValue() }, watch: { - value (val) { - this.refreshValue() + // value (val) { + // console.log('-----------------------------监听到诶覆盖'); + + // this.refreshValue(val) + // }, + value: { + handler (newValue, oldValue) { + console.log('-----------------------------监听到诶覆盖', newValue) + this.refreshValue(newValue) + }, + // 开启深度监听 + deep: true, + immediate: true } }, methods: { - refreshValue () { + refreshValue (val) { console.log('refreshValue') - const val = this.value + // const val = this.value if (val) { const online = Math.round(val.online / val.total * 100) // 求在线率 this.data.online = online @@ -110,14 +121,14 @@ height: .12rem; } span{ - font-size: .04rem; + font-size: .07rem; color:$blockTextColor; -webkit-transform-origin-x: 0; transform: scale(0.5833333333333334); -webkit-transform: scale(.5); b{ font-weight: bold; - font-size: .07rem + font-size: .1rem } } } diff --git a/src/components/earthViews/EarthViews.vue b/src/components/earthViews/EarthViews.vue index 3ad4400..f585ada 100644 --- a/src/components/earthViews/EarthViews.vue +++ b/src/components/earthViews/EarthViews.vue @@ -49,8 +49,10 @@ overflow: hidden; } .earth-main > div > div { - width: 0.37rem; - height: 0.37rem; + // width: 0.37rem; + // height: 0.37rem; + width: 0.42rem; + height: 0.42rem; font-weight: bold; font-size: 0.12rem; font-family: $digitalFamily; diff --git a/src/components/pieChart/simplePieChartCarousel.vue b/src/components/pieChart/simplePieChartCarousel.vue new file mode 100644 index 0000000..58b1a72 --- /dev/null +++ b/src/components/pieChart/simplePieChartCarousel.vue @@ -0,0 +1,379 @@ + + + + diff --git a/src/components/annularProgress/annularComp.vue b/src/components/annularProgress/annularComp.vue index 5305f16..5a09137 100644 --- a/src/components/annularProgress/annularComp.vue +++ b/src/components/annularProgress/annularComp.vue @@ -19,7 +19,7 @@
在线设备数:{{value.online}} - +
@@ -64,14 +64,25 @@ this.refreshValue() }, watch: { - value (val) { - this.refreshValue() + // value (val) { + // console.log('-----------------------------监听到诶覆盖'); + + // this.refreshValue(val) + // }, + value: { + handler (newValue, oldValue) { + console.log('-----------------------------监听到诶覆盖', newValue) + this.refreshValue(newValue) + }, + // 开启深度监听 + deep: true, + immediate: true } }, methods: { - refreshValue () { + refreshValue (val) { console.log('refreshValue') - const val = this.value + // const val = this.value if (val) { const online = Math.round(val.online / val.total * 100) // 求在线率 this.data.online = online @@ -110,14 +121,14 @@ height: .12rem; } span{ - font-size: .04rem; + font-size: .07rem; color:$blockTextColor; -webkit-transform-origin-x: 0; transform: scale(0.5833333333333334); -webkit-transform: scale(.5); b{ font-weight: bold; - font-size: .07rem + font-size: .1rem } } } diff --git a/src/components/earthViews/EarthViews.vue b/src/components/earthViews/EarthViews.vue index 3ad4400..f585ada 100644 --- a/src/components/earthViews/EarthViews.vue +++ b/src/components/earthViews/EarthViews.vue @@ -49,8 +49,10 @@ overflow: hidden; } .earth-main > div > div { - width: 0.37rem; - height: 0.37rem; + // width: 0.37rem; + // height: 0.37rem; + width: 0.42rem; + height: 0.42rem; font-weight: bold; font-size: 0.12rem; font-family: $digitalFamily; diff --git a/src/components/pieChart/simplePieChartCarousel.vue b/src/components/pieChart/simplePieChartCarousel.vue new file mode 100644 index 0000000..58b1a72 --- /dev/null +++ b/src/components/pieChart/simplePieChartCarousel.vue @@ -0,0 +1,379 @@ + + + + diff --git a/src/components/progressBar/ProgressBar3.vue b/src/components/progressBar/ProgressBar3.vue new file mode 100644 index 0000000..07fdcb5 --- /dev/null +++ b/src/components/progressBar/ProgressBar3.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/components/annularProgress/annularComp.vue b/src/components/annularProgress/annularComp.vue index 5305f16..5a09137 100644 --- a/src/components/annularProgress/annularComp.vue +++ b/src/components/annularProgress/annularComp.vue @@ -19,7 +19,7 @@
在线设备数:{{value.online}} - +
@@ -64,14 +64,25 @@ this.refreshValue() }, watch: { - value (val) { - this.refreshValue() + // value (val) { + // console.log('-----------------------------监听到诶覆盖'); + + // this.refreshValue(val) + // }, + value: { + handler (newValue, oldValue) { + console.log('-----------------------------监听到诶覆盖', newValue) + this.refreshValue(newValue) + }, + // 开启深度监听 + deep: true, + immediate: true } }, methods: { - refreshValue () { + refreshValue (val) { console.log('refreshValue') - const val = this.value + // const val = this.value if (val) { const online = Math.round(val.online / val.total * 100) // 求在线率 this.data.online = online @@ -110,14 +121,14 @@ height: .12rem; } span{ - font-size: .04rem; + font-size: .07rem; color:$blockTextColor; -webkit-transform-origin-x: 0; transform: scale(0.5833333333333334); -webkit-transform: scale(.5); b{ font-weight: bold; - font-size: .07rem + font-size: .1rem } } } diff --git a/src/components/earthViews/EarthViews.vue b/src/components/earthViews/EarthViews.vue index 3ad4400..f585ada 100644 --- a/src/components/earthViews/EarthViews.vue +++ b/src/components/earthViews/EarthViews.vue @@ -49,8 +49,10 @@ overflow: hidden; } .earth-main > div > div { - width: 0.37rem; - height: 0.37rem; + // width: 0.37rem; + // height: 0.37rem; + width: 0.42rem; + height: 0.42rem; font-weight: bold; font-size: 0.12rem; font-family: $digitalFamily; diff --git a/src/components/pieChart/simplePieChartCarousel.vue b/src/components/pieChart/simplePieChartCarousel.vue new file mode 100644 index 0000000..58b1a72 --- /dev/null +++ b/src/components/pieChart/simplePieChartCarousel.vue @@ -0,0 +1,379 @@ + + + + diff --git a/src/components/progressBar/ProgressBar3.vue b/src/components/progressBar/ProgressBar3.vue new file mode 100644 index 0000000..07fdcb5 --- /dev/null +++ b/src/components/progressBar/ProgressBar3.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/views/cityConstruction/components/iot/components/deviceCountBar.vue b/src/views/cityConstruction/components/iot/components/deviceCountBar.vue index 5332423..be05ecb 100644 --- a/src/views/cityConstruction/components/iot/components/deviceCountBar.vue +++ b/src/views/cityConstruction/components/iot/components/deviceCountBar.vue @@ -21,6 +21,7 @@ import ColorfulBarChart from '@/components/barChart/colorfulBarChart' import ChartLayout from '@/components/layout/chartLayout' import {fetchDeviceCount} from '@/api/cityManage' +import mockData from '../../../../../../static/plan.json' export default { name: 'deviceCountBar', components: {ChartLayout, ColorfulBarChart}, @@ -41,14 +42,16 @@ }, methods: { getData () { - fetchDeviceCount().then(response => { - if (response.code === 200) { - const data = response.data - this.options.xAxisData = data.map(item => { return item.type }) - this.options.seriesData = data.map(item => { return Number(item.value) }) - console.log(this.options) - } - }) + this.options.xAxisData = mockData.ioT.bar.xData + this.options.seriesData = mockData.ioT.bar.yData + // fetchDeviceCount().then(response => { + // if (response.code === 200) { + // const data = response.data + // this.options.xAxisData = data.map(item => { return item.type }) + // this.options.seriesData = data.map(item => { return Number(item.value) }) + // console.log(this.options) + // } + // }) } } } diff --git a/src/components/annularProgress/annularComp.vue b/src/components/annularProgress/annularComp.vue index 5305f16..5a09137 100644 --- a/src/components/annularProgress/annularComp.vue +++ b/src/components/annularProgress/annularComp.vue @@ -19,7 +19,7 @@
在线设备数:{{value.online}} - +
@@ -64,14 +64,25 @@ this.refreshValue() }, watch: { - value (val) { - this.refreshValue() + // value (val) { + // console.log('-----------------------------监听到诶覆盖'); + + // this.refreshValue(val) + // }, + value: { + handler (newValue, oldValue) { + console.log('-----------------------------监听到诶覆盖', newValue) + this.refreshValue(newValue) + }, + // 开启深度监听 + deep: true, + immediate: true } }, methods: { - refreshValue () { + refreshValue (val) { console.log('refreshValue') - const val = this.value + // const val = this.value if (val) { const online = Math.round(val.online / val.total * 100) // 求在线率 this.data.online = online @@ -110,14 +121,14 @@ height: .12rem; } span{ - font-size: .04rem; + font-size: .07rem; color:$blockTextColor; -webkit-transform-origin-x: 0; transform: scale(0.5833333333333334); -webkit-transform: scale(.5); b{ font-weight: bold; - font-size: .07rem + font-size: .1rem } } } diff --git a/src/components/earthViews/EarthViews.vue b/src/components/earthViews/EarthViews.vue index 3ad4400..f585ada 100644 --- a/src/components/earthViews/EarthViews.vue +++ b/src/components/earthViews/EarthViews.vue @@ -49,8 +49,10 @@ overflow: hidden; } .earth-main > div > div { - width: 0.37rem; - height: 0.37rem; + // width: 0.37rem; + // height: 0.37rem; + width: 0.42rem; + height: 0.42rem; font-weight: bold; font-size: 0.12rem; font-family: $digitalFamily; diff --git a/src/components/pieChart/simplePieChartCarousel.vue b/src/components/pieChart/simplePieChartCarousel.vue new file mode 100644 index 0000000..58b1a72 --- /dev/null +++ b/src/components/pieChart/simplePieChartCarousel.vue @@ -0,0 +1,379 @@ + + + + diff --git a/src/components/progressBar/ProgressBar3.vue b/src/components/progressBar/ProgressBar3.vue new file mode 100644 index 0000000..07fdcb5 --- /dev/null +++ b/src/components/progressBar/ProgressBar3.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/views/cityConstruction/components/iot/components/deviceCountBar.vue b/src/views/cityConstruction/components/iot/components/deviceCountBar.vue index 5332423..be05ecb 100644 --- a/src/views/cityConstruction/components/iot/components/deviceCountBar.vue +++ b/src/views/cityConstruction/components/iot/components/deviceCountBar.vue @@ -21,6 +21,7 @@ import ColorfulBarChart from '@/components/barChart/colorfulBarChart' import ChartLayout from '@/components/layout/chartLayout' import {fetchDeviceCount} from '@/api/cityManage' +import mockData from '../../../../../../static/plan.json' export default { name: 'deviceCountBar', components: {ChartLayout, ColorfulBarChart}, @@ -41,14 +42,16 @@ }, methods: { getData () { - fetchDeviceCount().then(response => { - if (response.code === 200) { - const data = response.data - this.options.xAxisData = data.map(item => { return item.type }) - this.options.seriesData = data.map(item => { return Number(item.value) }) - console.log(this.options) - } - }) + this.options.xAxisData = mockData.ioT.bar.xData + this.options.seriesData = mockData.ioT.bar.yData + // fetchDeviceCount().then(response => { + // if (response.code === 200) { + // const data = response.data + // this.options.xAxisData = data.map(item => { return item.type }) + // this.options.seriesData = data.map(item => { return Number(item.value) }) + // console.log(this.options) + // } + // }) } } } diff --git a/src/views/cityConstruction/components/iot/components/deviceOnline.vue b/src/views/cityConstruction/components/iot/components/deviceOnline.vue index 9001450..186729d 100644 --- a/src/views/cityConstruction/components/iot/components/deviceOnline.vue +++ b/src/views/cityConstruction/components/iot/components/deviceOnline.vue @@ -6,8 +6,8 @@