diff --git a/sgzb-screen/config/dev.env.js b/sgzb-screen/config/dev.env.js index 36efffd7..367c917d 100644 --- a/sgzb-screen/config/dev.env.js +++ b/sgzb-screen/config/dev.env.js @@ -13,6 +13,7 @@ var testUrl = '10.40.92.8:8080' // var testUrl = '' module.exports = merge(prodEnv, { NODE_ENV: '"development"', + // API_ROOT: '/screen' //API调用地址 // API_ROOT: '"http://' + testUrl + '"', // BASE_URL: '/cockpit-screen/' diff --git a/sgzb-screen/config/index.js b/sgzb-screen/config/index.js index 0a7477fe..1ad6307c 100644 --- a/sgzb-screen/config/index.js +++ b/sgzb-screen/config/index.js @@ -23,7 +23,7 @@ var proxyUrl = // target: 'http://112.29.103.165:21626',//重庆 // target: 'http://192.168.0.14:21624',//测试 // target: 'http://112.29.103.165:21624/', //宁夏 - target: 'http://192.168.2.145:28080', + target: 'http://192.168.2.152:28080', changeOrigin: true, // secure: true, //如果是https接口,需要配置这个参数 pathRewrite: { diff --git a/sgzb-screen/package-lock.json b/sgzb-screen/package-lock.json index 9dac9645..0d854e57 100644 --- a/sgzb-screen/package-lock.json +++ b/sgzb-screen/package-lock.json @@ -9629,7 +9629,7 @@ }, "moment": { "version": "2.30.1", - "resolved": "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz", + "resolved": "https://repo.huaweicloud.com/repository/npm/moment/-/moment-2.30.1.tgz", "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" }, "move-concurrently": { diff --git a/sgzb-screen/package.json b/sgzb-screen/package.json index f1c26104..9e1c39c1 100644 --- a/sgzb-screen/package.json +++ b/sgzb-screen/package.json @@ -25,7 +25,7 @@ "js-base64": "^3.6.0", "js-md5": "^0.7.3", "less-loader": "^4.1.0", - "moment": "^2.29.1", + "moment": "^2.30.1", "scss": "^0.2.4", "svg-sprite-loader": "^6.0.11", "swiper": "^3.4.2", diff --git a/sgzb-screen/src/api/index.js b/sgzb-screen/src/api/index.js index f02e2bb0..d9c973a1 100644 --- a/sgzb-screen/src/api/index.js +++ b/sgzb-screen/src/api/index.js @@ -5,7 +5,7 @@ import axios from 'axios'; axios.defaults.timeout = 30000 // 默认配置 -axios.defaults.baseURL = process.env.API_ROOT; +axios.defaults.baseURL = ''; axios.interceptors.request.use( config => { diff --git a/sgzb-screen/src/api/screen.js b/sgzb-screen/src/api/screen.js index bc07f74e..61b6df96 100644 --- a/sgzb-screen/src/api/screen.js +++ b/sgzb-screen/src/api/screen.js @@ -15,7 +15,11 @@ export const getMaterialReturnByMonthApi = params => POST(`/screen/base/largeScr //当月维修分析 export const getMaintenanceByMonthApi = params => POST(`/screen/base/largeScreen/home/getMaintenanceByMonth?maType=${params.maType}`,) //设备分布图 -export const getEquipmentDisByMapApi = params => POST(`/screen/base/largeScreen/home/getEquipmentDisByMap`,) +export const getEquipmentDisByMapApi = params => GET(`/screen/base/largeScreen/home/getEquipmentDisByMap`,) +//获取工程的位置信息 +export const getProjectByMapApi = params => GET(`/screen/base/largeScreen/home/getEquipmentDis`, params) +//获取设备的位置信息 +export const getDeviceByMapApi = params => GET(`/screen/base/largeScreen/home/getIotMaCodeMachine`, params) //施工机具/ export const getTotalOwnershipApi = params => POST(`/screen/base/largeScreen/home/getTotalOwnership`,) // 当月使用车辆 @@ -25,3 +29,17 @@ export const getMaintenanceWarningApi = params => POST(`/screen/base/largeScreen //各公司机具保有量 export const getTotalOwnershipByCompany = params => POST(`/screen/base/largeScreen/home/getTotalOwnershipByCompany`) + +/** 获取机具设备的行程信息 */ +export const getIotDeviceTripApi = params => POST(`/screen/material/iotMachine/searchItinerary`, params) +/** 获取机具设备的停留点信息 */ +export const getIotDeviceParkDetailApi = params => POST(`/screen/material/iotMachine/reportParkDetailByTime`, params) +/** 获取工程领料的记录 */ +export const getProjectOutApi = params => GET(`/screen/base/largeScreen/home/getLeaseRecordListByLotId`, params) +/** 获取工程退料的记录 */ +export const getProjectReturnApi = params => GET(`/screen/base/largeScreen/home/getBackRecordListByLotId`, params) +/** 获取工程退料的记录 */ +export const getProjectDeviceNumApi = params => GET(`/screen/base/largeScreen/home/getUseNumByLotId`, params) +/** 获取单位数据 */ +export const getUnitListApi = params => POST(`/screen/system/select/getUnitCbx`, params) + diff --git a/sgzb-screen/src/assets/img/endIcon.png b/sgzb-screen/src/assets/img/endIcon.png new file mode 100644 index 00000000..37f29b28 Binary files /dev/null and b/sgzb-screen/src/assets/img/endIcon.png differ diff --git a/sgzb-screen/src/assets/img/startIcon.png b/sgzb-screen/src/assets/img/startIcon.png new file mode 100644 index 00000000..e5dc18ad Binary files /dev/null and b/sgzb-screen/src/assets/img/startIcon.png differ diff --git a/sgzb-screen/src/components/Pagination/index.vue b/sgzb-screen/src/components/Pagination/index.vue index 8472ceea..946d6f18 100644 --- a/sgzb-screen/src/components/Pagination/index.vue +++ b/sgzb-screen/src/components/Pagination/index.vue @@ -1,5 +1,5 @@ @@ -24,47 +25,46 @@ export default { props: { total: { required: true, - type: Number + type: Number, }, page: { type: Number, - default: 1 + default: 1, }, limit: { type: Number, - default: 20 + default: 20, }, pageSizes: { type: Array, default() { return [10, 20, 30, 50] - } + }, }, // 移动端页码按钮的数量端默认值5 pagerCount: { type: Number, - default: document.body.clientWidth < 992 ? 5 : 7 + default: document.body.clientWidth < 992 ? 5 : 7, }, layout: { type: String, - default: 'total, sizes, prev, pager, next, jumper' + default: 'total, sizes, prev, pager, next, jumper', }, background: { type: Boolean, - default: true + default: true, }, autoScroll: { type: Boolean, - default: true + default: true, }, hidden: { type: Boolean, - default: false - } + default: false, + }, }, data() { - return { - }; + return {} }, computed: { currentPage: { @@ -73,7 +73,7 @@ export default { }, set(val) { this.$emit('update:page', val) - } + }, }, pageSize: { get() { @@ -81,8 +81,8 @@ export default { }, set(val) { this.$emit('update:limit', val) - } - } + }, + }, }, methods: { handleSizeChange(val) { @@ -99,8 +99,8 @@ export default { if (this.autoScroll) { scrollTo(0, 800) } - } - } + }, + }, } diff --git a/sgzb-screen/src/components/home/centerFold.vue b/sgzb-screen/src/components/home/centerFold.vue index efef171a..bf18b806 100644 --- a/sgzb-screen/src/components/home/centerFold.vue +++ b/sgzb-screen/src/components/home/centerFold.vue @@ -17,7 +17,12 @@
-
+
{{ item.value }}
@@ -34,13 +39,13 @@ diff --git a/sgzb-screen/src/components/home/countryMap1.vue b/sgzb-screen/src/components/home/countryMap1.vue index 0d03ec0b..439f23fe 100644 --- a/sgzb-screen/src/components/home/countryMap1.vue +++ b/sgzb-screen/src/components/home/countryMap1.vue @@ -46,6 +46,7 @@ export default { isCity: 0, cityCount: [], gozoom: 1, + mapList: [], // 查询后的地图数据 } }, created() { @@ -54,13 +55,22 @@ export default { // this.getCityCount() }, mounted() { - this.getEquipmentDisByMapApiPage() - this.getInitData() + getEquipmentDisByMapApi().then((res) => { + console.log('res=====地图数据---', res) + + this.mapList = res.data + this.getInitData() + }) + // this.getEquipmentDisByMapApiPage().then((res) => { + // this.getInitData() + // }) }, methods: { - getEquipmentDisByMapApiPage() { + async getEquipmentDisByMapApiPage() { getEquipmentDisByMapApi().then((res) => { console.log('res=====地图数据---', res) + + this.mapList = res.data }) }, getCompanyList() { @@ -174,28 +184,46 @@ export default { } }) - let mapData = [ - { - name: '青海省', - value: ['101.778', '36.623'], - a: '100', - }, - { - name: '宁夏回族自治区', - value: ['106.278', '38.466'], - a: '100', - }, - { - name: '安徽省', - value: ['117.283', '31.861'], - a: '100', - }, - { - name: '湖南省', - value: ['112.982', '28.194'], - a: '100', - }, - ] + // let mapData = [ + // { + // name: '青海省', + // // value: ['101.778', '36.623'], + // a: 10, + // value: [], + // }, + // { + // name: '宁夏回族自治区', + // // value: ['106.278', '38.466'], + // a: 0, + // value: [], + // }, + // // { + // // name: '安徽省', + // // value: ['117.283', '31.861'], + // // a: 0, + // // }, + // // { + // // name: '湖南省', + // // value: ['112.982', '28.194'], + // // a: 0, + // // }, + // ] + console.log(this.mapList, 'this.mapList') + let mapData = this.mapList.map((e) => { + return { + name: e.province, + a: e.num, + value: [], + } + }) + + for (let i = 0; i < mapData.length; i++) { + let geoCoord = geoCoordMap[mapData[i].name] + if (geoCoord) { + mapData[i].value = geoCoord.concat(mapData[i].value) + } + } + let that = this this.pointAll = this.cityCount this.pointAll.push({ @@ -208,140 +236,229 @@ export default { }, }) let splitList = [ - { name: '北京市', itemStyle: { normal: { areaColor: '#0A2B7B' } } }, + { + name: '北京市', + count: 0, + value: [], + itemStyle: { normal: { areaColor: '#0A2B7B' } }, + }, { name: '天津市', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '上海市', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '重庆市', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '河北省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '河南省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '云南省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '辽宁省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '黑龙江省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '湖南省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '安徽省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '山东省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '新疆维吾尔自治区', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '江苏省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '浙江省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '江西省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '湖北省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '广西壮族自治区', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '甘肃省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '山西省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '内蒙古自治区', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '陕西省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '吉林省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '福建省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '贵州省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '广东省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '青海省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '西藏自治区', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '四川省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '宁夏回族自治区', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#2187FF' } }, }, { name: '海南省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '台湾省', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '香港特别行政区', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, { name: '澳门特别行政区', + count: 0, + value: [], itemStyle: { normal: { areaColor: '#0A2B7B' } }, }, ] + + for (let i = 0; i < splitList.length; i++) { + let geoCoord = geoCoordMap[splitList[i].name] + if (geoCoord) { + splitList[i].value = geoCoord.concat(splitList[i].value) + } + } + + mapData.forEach((e) => { + splitList.forEach((v) => { + if (e.name == v.name) { + v.count = e.a + } + }) + }) + + // console.log(splitList, '数量问题---', mapData) + let imgUrl = require('../../assets/img/myImage/tankuang.png') let echartOption = { geo: [ @@ -492,26 +609,27 @@ export default { zlevel: 1, symbolSize: [45, 55], symbol: (value, params) => { - if (params.name == '安徽省') { - return ( - 'image://' + require('@/assets/img/myImage/markPoints.png') - ) - } - if (params.name == '湖南省') { - return ( - 'image://' + require('@/assets/img/myImage/markPoints.png') - ) - } - if (params.name == '宁夏回族自治区') { - return ( - 'image://' + require('@/assets/img/myImage/markPoints.png') - ) - } - if (params.name == '青海省') { - return ( - 'image://' + require('@/assets/img/myImage/markPoints.png') - ) - } + return 'image://' + require('@/assets/img/myImage/markPoints.png') + // if (params.name == '安徽省') { + // return ( + // 'image://' + require('@/assets/img/myImage/markPoints.png') + // ) + // } + // if (params.name == '湖南省') { + // return ( + // 'image://' + require('@/assets/img/myImage/markPoints.png') + // ) + // } + // if (params.name == '宁夏回族自治区') { + // return ( + // 'image://' + require('@/assets/img/myImage/markPoints.png') + // ) + // } + // if (params.name == '青海省') { + // return ( + // 'image://' + require('@/assets/img/myImage/markPoints.png') + // ) + // } }, emphasis: { scale: false, @@ -525,9 +643,10 @@ export default { fontFamily: 'cursive', fontWeight: 'bold', position: 'top', - padding: [0, 0, -15, 0], + padding: [0, 0, 0, 0], formatter: function (params) { - return params.data.count + // 设置工程数量 + return params.data.a }, }, }, @@ -564,8 +683,20 @@ export default { }) const _this = this this.mapEcharts.on('click', function (params) { - console.log('点击事件---参数params', params) - _this.$router.push({ path: '/home-new' }) + if (params.data && params.data.a > 0) { + _this.$router.push({ + path: '/home-new', + query: { province: params.data.name, location: params.data.value }, + }) + } else if (params.region.count > 0) { + _this.$router.push({ + path: '/home-new', + query: { province: params.name, location: params.region.value }, + }) + } else { + _this.$message.error('当前省份没有工程数据!') + } + if (params.seriesType === 'scatter' && !params.name) { let option = that.mapEcharts.getOption() //获得option对象 // 点击变黄 diff --git a/sgzb-screen/src/components/home/leftThree.vue b/sgzb-screen/src/components/home/leftThree.vue index 56e69bcd..b091fde2 100644 --- a/sgzb-screen/src/components/home/leftThree.vue +++ b/sgzb-screen/src/components/home/leftThree.vue @@ -12,64 +12,64 @@ diff --git a/sgzb-screen/src/components/home/leftTwo.vue b/sgzb-screen/src/components/home/leftTwo.vue index 31d3ce48..7e05bbfe 100644 --- a/sgzb-screen/src/components/home/leftTwo.vue +++ b/sgzb-screen/src/components/home/leftTwo.vue @@ -5,10 +5,18 @@
退料数据
- +
- +
@@ -16,11 +24,11 @@ diff --git a/sgzb-screen/src/components/home/new-map.vue b/sgzb-screen/src/components/home/new-map.vue index e4cb4c20..12eeeb4b 100644 --- a/sgzb-screen/src/components/home/new-map.vue +++ b/sgzb-screen/src/components/home/new-map.vue @@ -3,14 +3,21 @@ @@ -136,4 +185,24 @@ export default { width: 0; height: 0; } + +.ll { + height: 35px; + line-height: 35px; + letter-spacing: 1px; + border: 1px dashed; +} + + + diff --git a/sgzb-screen/src/components/home/rightOne.vue b/sgzb-screen/src/components/home/rightOne.vue index 7d02b1b8..d92e5ae3 100644 --- a/sgzb-screen/src/components/home/rightOne.vue +++ b/sgzb-screen/src/components/home/rightOne.vue @@ -5,12 +5,19 @@
当月领料分析
-
+
- + @@ -23,175 +30,209 @@ // HighchartsMore(Highcharts); // HighchartsDrilldown(Highcharts); // Highcharts3D(Highcharts); -import * as echarts from 'echarts'; +import * as echarts from 'echarts' import 'echarts-gl' // 3d图表库 -import { getPickingAnalysisByMonthApi } from "../../api/screen"; -import materialAnalysisDialog from "./materialAnalysisDialog"; +import { getPickingAnalysisByMonthApi } from '../../api/screen' +import materialAnalysisDialog from './materialAnalysisDialog' export default { components: { - materialAnalysisDialog + materialAnalysisDialog, }, data() { return { data: [], - maType: '' - }; + maType: '', + } }, mounted() { this.$eventBus.$on('maType', (maType) => { this.maType = maType this.getPickingAnalysisByMonthApiPage() - }); + }) setInterval(() => { this.getPickingAnalysisByMonthApiPage() - }, 60 * 1000); - + }, 60 * 1000) }, destroyed() { - this.$eventBus.$off('maType'); + this.$eventBus.$off('maType') }, methods: { getPickingAnalysisByMonthApiPage() { this.data = [] let params = { - maType: this.maType + maType: this.maType, } - getPickingAnalysisByMonthApi(params).then(res => { + getPickingAnalysisByMonthApi(params).then((res) => { if (res.code == 200) { - this.data.push({ - name: '数量领料', - value: res.data.num, - rate: res.data.rate, - itemStyle: { - color: '#01F4F5', - }, - }, + this.data.push( { - name: '编码领料', value: res.data.num2, + name: '数量领料', + value: res.data.num, + rate: res.data.rate, + itemStyle: { + color: '#01F4F5', + }, + }, + { + name: '编码领料', + value: res.data.num2, rate: res.data.rate2, itemStyle: { color: '#077E98', }, - }) - this.mastery(this.data); + } + ) + this.mastery(this.data) } }) }, // 生成扇形的曲面参数方程,用于 series-surface.parametricEquation - getParametricEquation(startRatio, endRatio, isSelected, isHovered, k, height) { - + getParametricEquation( + startRatio, + endRatio, + isSelected, + isHovered, + k, + height + ) { // 计算 - let midRatio = (startRatio + endRatio) / 2; + let midRatio = (startRatio + endRatio) / 2 - let startRadian = startRatio * Math.PI * 2; - let endRadian = endRatio * Math.PI * 2; - let midRadian = midRatio * Math.PI * 2; + let startRadian = startRatio * Math.PI * 2 + let endRadian = endRatio * Math.PI * 2 + let midRadian = midRatio * Math.PI * 2 // 如果只有一个扇形,则不实现选中效果。 if (startRatio === 0 && endRatio === 1) { - isSelected = false; + isSelected = false } // 通过扇形内径/外径的值,换算出辅助参数 k(默认值 1/3) - k = typeof k !== 'undefined' ? k : 1 / 3; + k = typeof k !== 'undefined' ? k : 1 / 3 // 计算选中效果分别在 x 轴、y 轴方向上的位移(未选中,则位移均为 0) - let offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0; - let offsetY = isSelected ? Math.sin(midRadian) * 0.1 : 0; + let offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0 + let offsetY = isSelected ? Math.sin(midRadian) * 0.1 : 0 // 计算高亮效果的放大比例(未高亮,则比例为 1) - let hoverRate = isHovered ? 1.05 : 1; + let hoverRate = isHovered ? 1.05 : 1 // 返回曲面参数方程 return { - u: { min: -Math.PI, max: Math.PI * 3, - step: Math.PI / 32 + step: Math.PI / 32, }, v: { min: 0, max: Math.PI * 2, - step: Math.PI / 20 + step: Math.PI / 20, }, x: function (u, v) { if (u < startRadian) { - return offsetX + Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate; + return ( + offsetX + + Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate + ) } if (u > endRadian) { - return offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate; + return ( + offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate + ) } - return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate; + return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate }, y: function (u, v) { if (u < startRadian) { - return offsetY + Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate; + return ( + offsetY + + Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate + ) } if (u > endRadian) { - return offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate; + return ( + offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate + ) } - return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate; + return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate }, z: function (u, v) { - if (u < - Math.PI * 0.5) { - return Math.sin(u); + if (u < -Math.PI * 0.5) { + return Math.sin(u) } if (u > Math.PI * 2.5) { - return Math.sin(u); + return Math.sin(u) } - return Math.sin(v) > 0 ? 1 * height : -1; - } - }; + return Math.sin(v) > 0 ? 1 * height : -1 + }, + } }, // 生成模拟 3D 饼图的配置项 getPie3D(pieData, internalDiameterRatio) { - let series = []; - let sumValue = 0; - let startValue = 0; - let endValue = 0; - let legendData = []; - let k = typeof internalDiameterRatio !== 'undefined' ? (1 - internalDiameterRatio) / (1 + internalDiameterRatio) : 1 / 3; + let series = [] + let sumValue = 0 + let startValue = 0 + let endValue = 0 + let legendData = [] + let k = + typeof internalDiameterRatio !== 'undefined' + ? (1 - internalDiameterRatio) / (1 + internalDiameterRatio) + : 1 / 3 // 为每一个饼图数据,生成一个 series-surface 配置 for (let i = 0; i < pieData.length; i++) { - sumValue += pieData[i].value; + sumValue += pieData[i].value let seriesItem = { - name: typeof pieData[i].name === 'undefined' ? `series${i}` : pieData[i].name, + name: + typeof pieData[i].name === 'undefined' + ? `series${i}` + : pieData[i].name, type: 'surface', parametric: true, wireframe: { - show: false + show: false, }, pieData: pieData[i], pieStatus: { selected: false, hovered: false, - k: k - } - }; + k: k, + }, + } if (typeof pieData[i].itemStyle != 'undefined') { - let itemStyle = {}; - typeof pieData[i].itemStyle.color != 'undefined' ? itemStyle.color = pieData[i].itemStyle.color : null; - typeof pieData[i].itemStyle.opacity != 'undefined' ? itemStyle.opacity = pieData[i].itemStyle.opacity : null; + let itemStyle = {} + typeof pieData[i].itemStyle.color != 'undefined' + ? (itemStyle.color = pieData[i].itemStyle.color) + : null + typeof pieData[i].itemStyle.opacity != 'undefined' + ? (itemStyle.opacity = pieData[i].itemStyle.opacity) + : null - seriesItem.itemStyle = itemStyle; + seriesItem.itemStyle = itemStyle } - series.push(seriesItem); + series.push(seriesItem) } for (let i = 0; i < series.length; i++) { - endValue = startValue + series[i].pieData.value; - console.log(series[i]); - series[i].pieData.startRatio = startValue / sumValue; - series[i].pieData.endRatio = endValue / sumValue; - series[i].parametricEquation = this.getParametricEquation(series[i].pieData.startRatio, series[i].pieData.endRatio, false, false, k, series[i].pieData.value); - startValue = endValue; - legendData.push(series[i].name); + endValue = startValue + series[i].pieData.value + console.log(series[i]) + series[i].pieData.startRatio = startValue / sumValue + series[i].pieData.endRatio = endValue / sumValue + series[i].parametricEquation = this.getParametricEquation( + series[i].pieData.startRatio, + series[i].pieData.endRatio, + false, + false, + k, + series[i].pieData.value + ) + startValue = endValue + legendData.push(series[i].name) } // // 补充一个透明的圆环,用于支撑高亮功能的近似实现。 series.push({ @@ -217,16 +258,16 @@ export default { step: Math.PI / 20, }, x: function (u, v) { - return ((Math.sin(v) * Math.sin(u) + Math.sin(u)) / Math.PI) * 2; + return ((Math.sin(v) * Math.sin(u) + Math.sin(u)) / Math.PI) * 2 }, y: function (u, v) { - return ((Math.sin(v) * Math.cos(u) + Math.cos(u)) / Math.PI) * 2; + return ((Math.sin(v) * Math.cos(u) + Math.cos(u)) / Math.PI) * 2 }, z: function (u, v) { - return Math.cos(v) > 0 ? -0.5 : -5; + return Math.cos(v) > 0 ? -0.5 : -5 }, }, - }); + }) // // 补充一个透明的圆环,用于支撑高亮功能的近似实现。 series.push({ @@ -252,16 +293,16 @@ export default { step: Math.PI / 20, }, x: function (u, v) { - return ((Math.sin(v) * Math.sin(u) + Math.sin(u)) / Math.PI) * 2; + return ((Math.sin(v) * Math.sin(u) + Math.sin(u)) / Math.PI) * 2 }, y: function (u, v) { - return ((Math.sin(v) * Math.cos(u) + Math.cos(u)) / Math.PI) * 2; + return ((Math.sin(v) * Math.cos(u) + Math.cos(u)) / Math.PI) * 2 }, z: function (u, v) { - return Math.cos(v) > 0 ? -5 : -7; + return Math.cos(v) > 0 ? -5 : -7 }, }, - }); + }) series.push({ name: 'mouseoutSeries', type: 'surface', @@ -272,7 +313,6 @@ export default { itemStyle: { opacity: 0.1, color: '#E1E8EC', - }, parametricEquation: { u: { @@ -286,20 +326,20 @@ export default { step: Math.PI / 20, }, x: function (u, v) { - return ((Math.sin(v) * Math.sin(u) + Math.sin(u)) / Math.PI) * 2.2; + return ((Math.sin(v) * Math.sin(u) + Math.sin(u)) / Math.PI) * 2.2 }, y: function (u, v) { - return ((Math.sin(v) * Math.cos(u) + Math.cos(u)) / Math.PI) * 2.2; + return ((Math.sin(v) * Math.cos(u) + Math.cos(u)) / Math.PI) * 2.2 }, z: function (u, v) { - return Math.cos(v) > 0 ? -7 : -7; + return Math.cos(v) > 0 ? -7 : -7 }, }, - }); - return series; + }) + return series }, mastery(data) { - var myChart = echarts.init(document.querySelector("#pieChartMap")); + var myChart = echarts.init(document.querySelector('#pieChartMap')) // const optionsData = [ // { // name: '数量领料', @@ -316,7 +356,7 @@ export default { // }, // }, // ]; - const series = this.getPie3D(this.data, 0.8, 360, 18, 56, 1); + const series = this.getPie3D(this.data, 0.8, 360, 18, 56, 1) series.push({ type: 'pie', @@ -340,7 +380,7 @@ export default { itemStyle: { opacity: 0, }, - }); + }) let option = { legend: { show: false, @@ -367,24 +407,24 @@ export default { label: { show: true, position: 'inside', - formatter: params => { + formatter: (params) => { return `${params.percent}%\n${params.name}` }, borderWidth: 0, padding: [0, -50], height: 70, fontSize: 14, - align: "center", - color: "#ffffff", + align: 'center', + color: '#ffffff', rich: { hr: { backgroundColor: '#fff', borderRadius: 3, width: 3, height: 3, - padding: [3, 3, 0, -12] + padding: [3, 3, 0, -12], }, - } + }, // rich: { // b: { // fontSize: 14, @@ -423,16 +463,19 @@ export default { }, }, series: series, - }; - if (option && typeof option === "object") { - myChart.setOption(option); + } + if (option && typeof option === 'object') { + myChart.setOption(option) } }, handleClick() { - this.$refs.materialAnalysisDialog.setOpen({ open: true, maType: this.maType }) - } + this.$refs.materialAnalysisDialog.setOpen({ + open: true, + maType: this.maType, + }) + }, }, -}; +} diff --git a/sgzb-screen/src/views/newHome/components/drawer-device.vue b/sgzb-screen/src/views/newHome/components/drawer-device.vue index bf1e211b..766cde68 100644 --- a/sgzb-screen/src/views/newHome/components/drawer-device.vue +++ b/sgzb-screen/src/views/newHome/components/drawer-device.vue @@ -1,51 +1,98 @@ @@ -121,6 +374,8 @@ export default { border-right: 1px dashed #0098ee; color: #fff; background-color: #030c3c; + display: flex; + flex-direction: column; ul { margin: 0; @@ -172,35 +427,56 @@ export default { margin: 8px 0; div { + margin-right: 8px; text-align: center; width: 96px; height: 44px; line-height: 44px; cursor: pointer; + background: url('../../../assets/img/myImage/no_active.png') no-repeat; + background-size: 100% 100%; } .active { - background: url('../../../assets/img/sel (1).png') no-repeat; + background: url('../../../assets/img/myImage/active.png') no-repeat; } } .location-list { - padding: 15px 10px; - border: 1px solid #035ea6; - + flex: 1; + overflow: auto; + .trip-container { + margin-bottom: 8px; + padding: 15px 10px; + border: 1px solid #035ea6; + cursor: pointer; + } div { - padding: 6px 0; + // padding: 6px 0; + } + + .activeIndex { + background-color: #3d4883; } .location-start { display: flex; align-items: center; - justify-content: space-between; + justify-content: space-around; img { vertical-align: middle; margin-right: 6px; } + + span { + flex: 1; + } + + div { + flex: 1; + word-break: break-all; + } } } } @@ -221,8 +497,29 @@ export default { #drawer-map-container { width: 100%; height: 70%; - background: orange; } } } +/deep/ .el-radio-button__inner, +.el-radio-group { + display: flex; +} + +//定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸 +*::-webkit-scrollbar { + width: 5px; + height: 5px; +} + +//定义滑块 内阴影+圆角 +*::-webkit-scrollbar-thumb { + border-radius: 1em; + background-color: rgba(230, 237, 248, 0.3); +} + +//定义滚动条轨道 内阴影+圆角 +*::-webkit-scrollbar-track { + border-radius: 1em; + background-color: rgba(230, 237, 248, 0.1); +} diff --git a/sgzb-screen/src/views/newHome/components/drawer-project.vue b/sgzb-screen/src/views/newHome/components/drawer-project.vue index 7ed6f050..881ef2b8 100644 --- a/sgzb-screen/src/views/newHome/components/drawer-project.vue +++ b/sgzb-screen/src/views/newHome/components/drawer-project.vue @@ -1,74 +1,234 @@ diff --git a/sgzb-screen/src/views/newHome/index.vue b/sgzb-screen/src/views/newHome/index.vue index dd45f2e0..6f143b60 100644 --- a/sgzb-screen/src/views/newHome/index.vue +++ b/sgzb-screen/src/views/newHome/index.vue @@ -92,8 +92,8 @@ :direction="direction" size="80%" > - - + + - - + + + +