{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\bigScreen\\mixin\\mixin.js","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\bigScreen\\mixin\\mixin.js","mtime":1720203215101},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\eslint-loader\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/es6.function.name\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport utils from '@/utils.js';\nimport * as echarts from 'echarts';\nexport var mixin = {\n data: function data() {\n return {\n params: {\n pageBean: {\n pageSize: -1\n },\n querys: []\n },\n // 桥梁健康统计饼图配置\n brigeHealthConfig: {\n legend: {\n top: '5%',\n left: 'center',\n textStyle: {\n color: '#fff'\n }\n },\n color: ['#ff9a00', '#00cbd7', '#0283fc', '#5e5eff'],\n tooltip: {\n trigger: 'item',\n formatter: '{b}\\n{c}'\n },\n series: {\n radius: ['35%', '50%'],\n emphasis: {\n label: {\n show: true\n }\n },\n label: {\n formatter: function formatter(a) {\n if (a.value) {\n return a.name + ' ' + a.value;\n }\n },\n // '{b}\\n{c}',\n show: true,\n color: '#fff',\n fontSize: 16\n },\n labelLine: {\n show: true\n }\n }\n },\n // 未处置预警事件信息统计\n untreatedInfo: {\n titleList: [{\n key: 'tpBridgeName',\n name: '桥梁名称'\n }, {\n key: 'eventsDate',\n name: '预警时间',\n color: 'green'\n }, {\n key: 'warnType',\n name: '预警类型',\n color: 'red'\n }, {\n key: 'eventsDescribe',\n name: '预警信息'\n }],\n listData: [{\n name: '林家院子中桥',\n value: '50',\n value1: '20',\n info: '车辆载荷'\n }, {\n name: '石匣子中桥',\n value: '50',\n value1: '20',\n info: '风速/风向'\n }, {\n name: '郭家岩大桥',\n value: '50',\n value1: '20',\n info: '结构温度'\n }, {\n name: '响水洞大桥',\n value: '50',\n value1: '20',\n info: '车辆载荷'\n }, {\n name: '潼南互通桥',\n value: '50',\n value1: '20',\n info: '钢结构温度'\n }]\n },\n deviceInfo: {},\n // 设备信息统计\n // 设备基础信息统计\n deviceBasicInfo: {\n titleList: [{\n key: 'bridgeName',\n name: '名称'\n }, {\n key: 'roadSegmentName',\n name: '路线'\n }, {\n key: 'type',\n name: '上下行'\n }, {\n key: 'state',\n name: '健康状态',\n color: 'green'\n }],\n listData: [],\n loading: false\n },\n bridgeAbnormalCount: {},\n // 桥梁健康统计\n warningTotal: [],\n // 预警事件统计\n\n /* 2024年2月27日修改 */\n bridgeStatus: {\n titleList: [{\n key: 'sn',\n name: '序号'\n }, {\n key: 'bridgeName',\n name: '桥梁'\n }, {\n key: 'device',\n name: '故障设备'\n }, {\n key: 'state',\n name: '健康状态',\n color: 'green'\n }],\n listData: [{\n sn: 1,\n bridgeName: '长冲大桥',\n device: 20,\n state: 4\n }, {\n sn: 2,\n bridgeName: '长岗岭1号大桥',\n device: 15,\n state: 3\n }, {\n sn: 3,\n bridgeName: '李家湾大桥',\n device: 10,\n state: 2\n }, {\n sn: 4,\n bridgeName: '郁江河特大桥',\n device: 2,\n state: 1\n }, {\n sn: 5,\n bridgeName: '涪江大桥',\n device: 20,\n state: 1\n }],\n loading: false\n },\n devicePieChart: null,\n devicePieData: [{\n name: '在线设备',\n value: 102,\n ratio: 75\n }, {\n name: '离线设备',\n value: 34,\n ratio: 25\n }],\n devicePieOption: null,\n curIndex: 0,\n devicePiecurIndex: 0,\n alarmInfoData: [{\n id: 1,\n bridgeName: '涪陵大桥',\n hitchDate: '2023-02-01 10:00:12',\n hitchReason: '数据传输异常'\n }, {\n id: 2,\n bridgeName: '涪陵大桥',\n hitchDate: '2023-02-01 10:00:12',\n hitchReason: '数据传输异常'\n }, {\n id: 3,\n bridgeName: '涪陵大桥',\n hitchDate: '2023-02-01 10:00:12',\n hitchReason: '数据传输异常'\n }, {\n id: 4,\n bridgeName: '涪陵大桥',\n hitchDate: '2023-02-01 10:00:12',\n hitchReason: '数据传输异常'\n }, {\n id: 5,\n bridgeName: '涪陵大桥',\n hitchDate: '2023-02-01 10:00:12',\n hitchReason: '数据传输异常'\n }],\n // 报警信息数据\n loadObj: {\n scrollFaultData: false\n },\n loadingColor: 'rgba(6, 46, 106, 0.01)',\n axleloadInfo: {\n titleList: [{\n key: 'bridgeName',\n name: '桥梁'\n }, {\n key: 'prop1',\n name: '车流量(每天)'\n }, {\n key: 'prop2',\n name: '超重车数量'\n }, {\n key: 'prop3',\n name: '最大总重量'\n }],\n listData: [{\n bridgeName: '长冲大桥',\n prop1: 20,\n prop2: 10,\n prop3: 10\n }, {\n bridgeName: '长岗岭1号大桥',\n prop1: 16,\n prop2: 8,\n prop3: 8\n }, {\n bridgeName: '李家湾大桥',\n prop1: 16,\n prop2: 10,\n prop3: 8\n }, {\n bridgeName: '涪江大桥',\n prop1: 20,\n prop2: 14,\n prop3: 11\n }, {\n bridgeName: '郁江河特大桥',\n prop1: 15,\n prop2: 12,\n prop3: 5\n }]\n },\n // 轴载感知统计数据\n alarmInfoBar: [[25, 35, 35, 25, 35], [30, 30, 30, 30, 25], [10, 13, 15, 13, 15]] // 告警信息分析\n };\n },\n created: function created() {\n // 获取基础信息统计 - 桥梁类型统计\n this.getBridgeData(this.params);\n // 获取基础信息统计 - 监测设备类型统计\n this.getDeviceCount(this.params);\n // 获取设备信息统计\n this.getDeviceCountTotal(this.params);\n // 获取设备基础信息统计\n this.getDeviceTypeCount(this.params);\n // 获取桥梁健康统计\n this.getBridgeAbnormalCount(this.params);\n // 获取预警事件统计\n this.getWarningCountTotal(this.params);\n // 获取未处置预警统计\n this.getNotDisposedWarn(this.params);\n },\n computed: {\n optionSingleHeightTime: function optionSingleHeightTime() {\n return {\n step: 0.2\n };\n }\n },\n mounted: function mounted() {\n // this.drawDevicePieChart()\n },\n methods: {\n // 获取某一个月最后一天\n getLastDay: function getLastDay(year, month) {\n var date1 = new Date(year, month, 0);\n return date1.getDate();\n },\n // 获取顶部搜索参数数据组装为查询条件\n getSearchParams: function getSearchParams() {\n var obj = this.searchForm;\n var querys = [];\n for (var i in obj) {\n if (obj[i]) {\n // 年月日处理\n if (i == 'issueDate') {\n querys.push({\n group: 'main',\n operation: 'GREAT',\n property: 'modelDateGreat',\n relation: 'AND',\n value: obj[i][0]\n }, {\n group: 'main',\n operation: 'LESS',\n property: 'modelDateLess',\n relation: 'AND',\n value: obj[i][1]\n });\n } else {\n querys.push({\n group: 'main',\n operation: 'EQUAL',\n property: i,\n relation: 'AND',\n value: obj[i]\n });\n }\n }\n }\n return querys || [];\n },\n // 左侧基础信息统计 - 获取桥梁类型统计\n getBridgeData: function getBridgeData(params) {\n var _this = this;\n this.$http.post('${yhxt}/bizTpBridge/v1/getBridgeCount', params).then(function (res) {\n var data = res.data || {};\n _this.basicList[0].children[0].num = data.suspensionCount; // 悬索桥\n _this.basicList[0].children[1].num = data.cableStayedCount; // 斜拉桥\n _this.basicList[0].children[2].num = data.girderCount; // 梁桥\n _this.basicList[0].children[3].num = data.archCount; // 拱桥\n _this.bridgeTotal = Number(data.suspensionCount) + Number(data.cableStayedCount) + Number(data.girderCount) + Number(data.archCount);\n\n // 判断查询桥梁类型数据,在地图上显示有数据的桥梁类型\n var list = _this.basicList[0].children;\n for (var i in list) {\n if (list[i].num != 0) {\n _this.handleClick(list[i]);\n return;\n }\n }\n });\n },\n // 左侧基础信息统计 - 监测设备类型统计\n getDeviceCount: function getDeviceCount(params) {\n var _this2 = this;\n this.$http.post('${yhxt}/bizTpDevice/v1/getDeviceCount', params).then(function (res) {\n var data = res.data || {};\n _this2.basicList[1].children[0].num = data.vibeCount; // 环境设备数量\n _this2.basicList[1].children[1].num = data.motiveCount; // 作用设备数量\n _this2.basicList[1].children[2].num = data.structuralCount; // 结构响应设备数量\n _this2.basicList[1].children[3].num = data.varyCount; // 结构变化数量\n });\n },\n // 获取设备信息统计\n getDeviceCountTotal: function getDeviceCountTotal(params) {\n var _this3 = this;\n this.$http.post('${yhxt}/bizTpDevice/v1/deviceCountTotal', params).then(function (res) {\n var data = res.data || {};\n _this3.deviceInfo = data;\n _this3.devicePieData[0].value = data.onlineCount;\n _this3.devicePieData[0].ratio = parseFloat(data.onlineCount / data.total * 100).toFixed(2);\n _this3.devicePieData[1].value = data.offlineCount;\n _this3.devicePieData[1].ratio = parseFloat(data.offlineCount / data.total * 100).toFixed(2);\n });\n },\n getDeviceTypeDetail: function getDeviceTypeDetail(item) {\n var _this4 = this;\n var params = {\n pageBean: {\n page: 1,\n pageSize: -1\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n property: 'detailTypeName',\n relation: 'AND',\n value: item.name\n }],\n sorter: [{\n direction: 'ASC',\n property: 'trBridgeId'\n }, {\n direction: 'ASC',\n property: 'deviceCode'\n }]\n };\n if (this.activeBridgeId) {\n params.querys.push({\n group: 'main',\n operation: 'EQUAL',\n property: 'tpBridgeId',\n relation: 'AND',\n value: this.activeBridgeId\n });\n }\n this.$http.post('${yhxt}' + '/bizTpDevice/v1/pageVo', params).then(function (res) {\n _this4.deviceDetailData = [];\n var data = res.data || {};\n if (data.rows) {\n _this4.deviceDetailData = data.rows;\n }\n _this4.$refs.detailDialog.open(item, _this4.deviceDetailData);\n });\n },\n // 获取设备基础信息统计\n getDeviceTypeCount: function getDeviceTypeCount(params, type) {\n var _this5 = this;\n params = utils.deepClone(params);\n if (params.querys.length == 0) {\n params.querys = [{\n group: 'main',\n operation: 'EQUAL',\n property: 'TYPE_',\n relation: 'AND',\n value: 1\n }];\n }\n var url = '/bizTpBridge/v1/pageVo';\n this.deviceBasicInfo.titleList = [{\n key: 'bridgeName',\n name: '名称'\n }, {\n key: 'roadSegmentName',\n name: '路线'\n }, {\n key: 'directionValue',\n name: '上下行'\n }, {\n key: 'state',\n name: '健康状态',\n color: 'green'\n }];\n if (type && type > 4) {\n url = '/bizTpDevice/v1/getDeviceTypeCount';\n this.deviceBasicInfo.titleList = [{\n key: 'name',\n name: '类型'\n }, {\n key: 'total',\n name: '数量'\n }, {\n key: 'onlineCount',\n name: '在线'\n }, {\n key: 'offlineCount',\n name: '离线',\n color: 'red'\n }];\n if (this.activeBridgeId) {\n params.querys.push({\n group: 'main',\n operation: 'EQUAL',\n property: 'TP_BRIDGE_ID_',\n relation: 'AND',\n value: this.activeBridgeId\n });\n }\n }\n this.deviceBasicInfo.loading = true;\n this.$http.post('${yhxt}' + url, params).then(function (res) {\n _this5.deviceBasicInfo.loading = false;\n if (type && type > 4) {\n _this5.deviceBasicInfo.listData = [];\n var data = res.data || {};\n for (var i in data) {\n _this5.deviceBasicInfo.listData.push(_objectSpread({\n name: i\n }, data[i]));\n }\n } else {\n var _data = res.data.rows || [];\n _this5.deviceBasicInfo.listData = _data;\n // 标记桥梁位置\n var list = [];\n _data.forEach(function (i) {\n if (i.lng && i.lat) {\n list.push(_objectSpread({\n lnglat: [i.lng, i.lat],\n style: 0\n }, i));\n }\n });\n _this5.bridgeCoordinateList = list;\n _this5.minemapMarker();\n }\n });\n },\n // 获取桥梁健康统计\n getBridgeAbnormalCount: function getBridgeAbnormalCount(params) {\n var _this6 = this;\n this.$http.post('${yhxt}/bizTpBridgeHealth/v1/abnormalCount', params).then(function (res) {\n _this6.bridgeAbnormalCount = res.data || {};\n });\n },\n // 获取预警事件统计\n getWarningCountTotal: function getWarningCountTotal(params) {\n var _this7 = this;\n this.$http.post('${yhxt}/bizTpWarningEvents/v1/warningCountTotal', params).then(function (res) {\n var data = res.data || {};\n var bData = [];\n var yData = [];\n var rData = [];\n data.forEach(function (item) {\n if (item.tpBridgeName === '涪江大桥') {\n bData[0] = item.blueHandleCount;\n yData[0] = item.yellowHandleCount;\n rData[0] = item.redHandleCount;\n } else if (item.tpBridgeName === '郁江河特大桥') {\n bData[1] = item.blueHandleCount;\n yData[1] = item.yellowHandleCount;\n rData[1] = item.redHandleCount;\n }\n });\n console.log(\"warningTotal\", [rData, yData, bData], res.data, data);\n _this7.warningTotal = [rData, yData, bData];\n });\n },\n // 获取未处置预警事件\n getNotDisposedWarn: function getNotDisposedWarn(params) {\n var _this8 = this;\n params = utils.deepClone(params);\n if (params.querys.length == 0) {\n params.querys.push({\n group: 'main',\n operation: 'EQUAL',\n property: 'eventsState',\n relation: 'AND',\n value: 0\n });\n }\n this.$http.post('${yhxt}/bizTpWarningEvents/v1/pageList', params).then(function (res) {\n var data = res.data.rows;\n _this8.untreatedInfo.listData = data;\n return;\n // 标记桥梁位置\n var list = [];\n data.forEach(function (i) {\n if (i.lng && i.lat) {\n list.push(_objectSpread({\n lnglat: [i.lng, i.lat],\n style: i.warnType - 1\n }, i));\n }\n });\n _this8.bridgeCoordinateList = list;\n // 添加点标记(高德地图)\n // this.markPoint(28)\n\n // mineMap2D 地图\n _this8.minemapMarker();\n });\n },\n // 设备统计图\n drawDevicePieChart: function drawDevicePieChart() {\n var _this9 = this;\n // chart 已存在则为更新数据\n if (this.devicePieChart) {\n this.devicePieOption.series[0].data = this.devicePieData;\n this.devicePieChart.setOption(this.devicePieOption);\n } else {\n // chart 不存在则为初始化数据和图表\n this.devicePieChart = echarts.init(document.getElementById('section-pie-chart'));\n this.devicePieOption = {\n title: {\n text: this.devicePieData[0].value + ' 个',\n subtext: this.devicePieData[0].name,\n x: 'center',\n y: '38%',\n textStyle: {\n color: '#fff',\n fontSize: '20px',\n lineHeight: 5\n },\n subtextStyle: {\n color: '#fff',\n fontSize: '12px'\n }\n },\n color: ['#55EDB0', '#1A8CFF'],\n tooltip: {\n trigger: 'item',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n },\n formatter: '{a}
{b} : {c}个 ({d}%)'\n },\n series: [{\n name: '设备统计',\n type: 'pie',\n radius: ['77%', '94%'],\n center: ['50%', '50%'],\n data: this.devicePieData,\n label: {\n show: false\n },\n itemStyle: {\n borderColor: '#0D1722',\n borderWidth: 4\n }\n }]\n };\n this.devicePieOption && this.devicePieChart.setOption(this.devicePieOption);\n window.addEventListener('resize', function () {\n return _this9.devicePieChart.resize();\n });\n this.intervalFaultPie();\n }\n this.devicePieChart.dispatchAction({\n type: 'highlight',\n seriesIndex: 0,\n dataIndex: this.devicePiecurIndex\n });\n },\n intervalFaultPie: function intervalFaultPie() {\n var _this10 = this;\n setInterval(function () {\n _this10.devicePieChart.dispatchAction({\n type: 'downplay',\n seriesIndex: 0,\n dataIndex: _this10.devicePiecurIndex\n });\n _this10.devicePiecurIndex++;\n if (_this10.devicePiecurIndex >= _this10.devicePieData.length) {\n _this10.devicePiecurIndex = 0;\n }\n _this10.devicePieChart.dispatchAction({\n type: 'highlight',\n seriesIndex: 0,\n dataIndex: _this10.devicePiecurIndex\n });\n\n // 设备统计跟随变化统计数量已经名称\n _this10.devicePieOption.title.text = _this10.devicePieData[_this10.devicePiecurIndex].value + ' 个';\n _this10.devicePieOption.title.subtext = _this10.devicePieData[_this10.devicePiecurIndex].name;\n _this10.devicePieOption && _this10.devicePieChart.setOption(_this10.devicePieOption);\n }, 3000);\n }\n }\n};",null]}