{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\views\\house\\statistics\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\house\\statistics\\index.vue","mtime":1737610069426},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _createForOfIteratorHelper from \"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport Paging from \"@/views/Public/paging.vue\";\nimport { getEarlyInfoList, houseDicInfo as _houseDicInfo, getHouseStatistics, getRentStatistics, Own } from \"@/api/getdata\";\nimport Popup from \"@/views/estate/examine/dialog/popup.vue\";\nimport * as echarts from 'echarts';\nexport default {\n components: {\n Paging: Paging,\n Popup: Popup\n },\n data: function data() {\n return {\n loading: false,\n loadingMsg: \"\",\n typeList: [{\n name: '全部',\n id: ''\n }, {\n name: '年度',\n id: '1'\n }, {\n name: '季度',\n id: '2'\n }, {\n name: '月度',\n id: '3'\n }],\n earlyTypeList: [{\n name: '全部',\n id: ''\n }, {\n name: '长期空置',\n id: '1'\n }, {\n name: '合同临期',\n id: '2'\n }, {\n name: '长期欠费',\n id: '3'\n }],\n formEchart: {\n houseName: \"\",\n houseType: \"\",\n type: ''\n },\n formInline: {\n houseName: \"\",\n houseType: \"\",\n earlyType: \"\"\n },\n houseType: [],\n status: [],\n device: [],\n model: [],\n page: {\n limit: 0 /** 当前点击*/,\n sizePage: 10 /** 当前多少页*/,\n total: 0 /**总数 */\n },\n tableData: [],\n rentPage: {\n limit: 0 /** 当前点击*/,\n sizePage: 10 /** 当前多少页*/,\n total: 0 /**总数 */\n },\n rentData: []\n };\n },\n created: function created() {},\n mounted: function mounted() {\n this.createLoad();\n this.houseDicInfo('houseType');\n // this.houseDicInfo('houseStatus');\n\n if (this.$route.params.index) {\n this.currentChanges(this.$route.params.index);\n } else {\n this.getEchart();\n this.getlist();\n }\n },\n methods: {\n currentRentChanges: function currentRentChanges(val) {\n this.createLoad();\n this.rentPage.limit = val;\n this.getRentList();\n },\n //缴费统计\n getRentList: function getRentList() {\n var _this = this;\n var Content = {\n pageNum: this.rentPage.limit == 0 ? 1 : this.rentPage.limit,\n pageSize: this.rentPage.sizePage,\n houseName: this.formEchart.houseName,\n // type:this.formEchart.type,\n houseType: this.formEchart.houseType\n };\n getRentStatistics(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this.clearLoad();\n _this.rentData = res.returnData.data;\n // console.log(res)\n console.log(_this.rentData);\n _this.rentPage.total = res.returnData.total;\n _this.rentPage.limit = res.returnData.currentPage;\n } else {\n _this.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n });\n },\n // 获取echart数据\n getEchart: function getEchart() {\n var _this2 = this;\n var Content = {\n houseName: this.formEchart.houseName,\n type: this.formEchart.type,\n houseType: this.formEchart.houseType\n };\n getHouseStatistics(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n var data = res.returnData;\n _this2.houseCharts(data);\n // this.rantCharts(data)\n } else {\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n this.getRentList();\n },\n //重置\n resetEchart: function resetEchart() {\n this.formEchart = {\n houseName: \"\",\n houseType: \"\",\n type: ''\n };\n this.getEchart();\n this.getRentList();\n },\n //租房情况柱状图\n houseCharts: function houseCharts(seriesData) {\n var myChart = echarts.init(document.getElementById('houseChart'));\n console.log(seriesData);\n var xAxisdata = seriesData.nameList;\n var xData1 = seriesData.valueList;\n var xData2 = seriesData.valueList2;\n var xData3 = [];\n xAxisdata.forEach(function (item, index) {\n xData3[index] = xData1[index] + xData2[index];\n });\n console.log(xData3);\n // 绘制图表\n myChart.setOption({\n // title: {\n // text: '房屋出租统计',\n // left: '200',\n // },\n grid: {\n left: \"5%\",\n right: \"5%\",\n bottom: \"5%\",\n top: \"5%\",\n containLabel: true\n },\n tooltip: {\n trigger: \"axis\",\n axisPointer: {\n type: \"shadow\"\n },\n formatter: function formatter(data) {\n var data0 = data[0];\n var data1 = data[1];\n var num0 = Math.round(data0.value / xData3[data0.dataIndex] * 10000) / 100 + '%';\n var num1 = Math.round(data1.value / xData3[data1.dataIndex] * 10000) / 100 + '%';\n var html = \"\\u7A7A\\u7F6E\\u7387\\uFF1A\".concat(num0, \"
\\u51FA\\u79DF\\u7387\\uFF1A\").concat(num1);\n return html;\n }\n },\n xAxis: {\n type: 'category',\n data: xAxisdata\n },\n yAxis: {\n type: 'value',\n minInterval: 1\n },\n series: [{\n data: xData1,\n name: '空置',\n type: 'bar',\n color: '#4D88FE',\n label: {\n show: true,\n position: 'top'\n }\n }, {\n data: xData2,\n name: '已出租',\n type: 'bar',\n color: '#50CCCB',\n label: {\n show: true,\n position: 'top'\n }\n }]\n });\n },\n //缴费情况柱状图\n rantCharts: function rantCharts(seriesData) {\n var myChart = echarts.init(document.getElementById('rantChart'));\n var xAxisdata = seriesData.nameList;\n var xData1 = seriesData.valueList3;\n var xData2 = seriesData.valueList4;\n // 绘制图表\n myChart.setOption({\n // title: {\n // text: '房屋出租统计',\n // left: '200',\n // },\n xAxis: {\n type: 'category',\n data: xAxisdata\n },\n yAxis: {\n type: 'value',\n minInterval: 1\n },\n series: [{\n data: xData1,\n name: '欠费',\n type: 'bar',\n color: '#50CCCB',\n label: {\n show: true,\n position: 'top'\n }\n }, {\n data: xData2,\n name: '已缴费',\n type: 'bar',\n color: '#4D88FE',\n label: {\n show: true,\n position: 'top'\n }\n }]\n });\n },\n //回显\n formatType: function formatType(row, column) {\n var type = row.houseType;\n var _iterator = _createForOfIteratorHelper(this.houseType),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var obj = _step.value;\n if (type == obj.VALUE) {\n return obj.NAME;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n //回显\n formatStatus: function formatStatus(row, column) {\n var status = row.STATUS;\n var _iterator2 = _createForOfIteratorHelper(this.status),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var obj = _step2.value;\n if (status == obj.VALUE) {\n return obj.NAME;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n },\n //下拉数据\n houseDicInfo: function houseDicInfo(e) {\n var _this3 = this;\n var Content = {\n dataType: e\n };\n _houseDicInfo(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n if (e == 'houseType') {\n _this3.houseType = res.returnData.data;\n } else if (e == 'houseStatus') {\n _this3.status = res.returnData.data;\n }\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this3.clearLoad();\n }, 300);\n });\n },\n createLoad: function createLoad() {\n this.loading = true;\n this.loadingMsg = \"加载中...\";\n },\n clearLoad: function clearLoad() {\n this.loading = false;\n this.loadingMsg = \"\";\n },\n // 分页\n currentChanges: function currentChanges(val) {\n this.createLoad();\n this.page.limit = val;\n this.getlist();\n },\n getlist: function getlist() {\n var _this4 = this;\n var Content = {\n pageNum: this.page.limit == 0 ? 1 : this.page.limit,\n pageSize: this.page.sizePage,\n houseName: this.formInline.houseName,\n houseType: this.formInline.houseType,\n earlyType: this.formInline.earlyType\n };\n getEarlyInfoList(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this4.clearLoad();\n _this4.tableData = res.returnData.data;\n // console.log(res)\n // console.log(this.tableData)\n _this4.page.total = res.returnData.total;\n _this4.page.limit = res.returnData.currentPage;\n } else {\n _this4.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this4.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this4.clearLoad();\n }, 300);\n });\n },\n //查询\n onSubmit: function onSubmit() {\n this.page.limit = 1;\n this.createLoad();\n this.getlist();\n },\n //重置\n resetTable: function resetTable() {\n this.formInline = {\n houseName: \"\",\n houseType: \"\",\n earlyType: \"\"\n };\n this.page.limit = 1;\n this.createLoad();\n this.getlist();\n },\n // 导出\n onOut: function onOut() {\n var _this5 = this;\n Own().then(function (res) {\n if (res.returnCode === \"1\") {\n var str = \"houseName=\" + _this5.formInline.houseName + \"&houseType=\" + _this5.formInline.houseType + \"&earlyType=\" + _this5.formInline.earlyType;\n var url = process.env.VUE_APP_BASE_API + \"/greenH5/greenWebmodul/rest/houseCountAndEarly/exportEarlyByExcel?\" + str;\n // console.log(11111,url)\n window.location.href = url;\n }\n });\n }\n }\n};",null]}