{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\sqMonitor\\resWaterNewspaper.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\sqMonitor\\resWaterNewspaper.vue","mtime":1684458239449},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/es6.regexp.replace\";\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//\nimport resWaterNewspaper from '@/api/monitor/resMonitor/resWaterNewspaper.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport moment from 'moment';\nimport req from '@/request.js';\nexport default {\n name: 'resWaterNewspaper',\n components: {},\n mixins: [TableMixin],\n data: function data() {\n return {\n pickerOptions0: {\n disabledDate: function disabledDate(time) {\n return time.getTime() > Date.now() - 8.64e6; //如果没有后面的-8.64e6就是不可以选择今天的\n }\n },\n scopeTime: '',\n loading: false,\n queryParam: {\n pageBean: {\n pageSize: -1,\n page: 1,\n showTotal: true\n },\n params: {\n day: ''\n }\n },\n tableData: [],\n baseUrl: null\n };\n },\n updated: function updated() {\n var _this = this;\n\n this.$nextTick(function () {\n if (_this.$refs.table) {\n _this.$refs.table.doLayout();\n }\n });\n },\n created: function created() {\n this.baseUrl = window.context.portal;\n this.getCurrentMonthLast();\n this.getDateList();\n },\n methods: {\n changeDate: function changeDate() {\n console.log(this.scopeTime);\n },\n // 默认当天时间\n getCurrentMonthLast: function getCurrentMonthLast() {\n var date = new Date(); // 获取当前月份\n\n var nowMonth = date.getMonth() + 1; // 获取当前是几号\n\n var strDate = date.getDate(); // 添加分隔符“-”\n\n var seperator = '-'; // 对月份进行处理,1-9月在前面添加一个“0”\n\n if (nowMonth >= 1 && nowMonth <= 9) {\n nowMonth = '0' + nowMonth;\n } // 对月份进行处理,1-9号在前面添加一个“0”\n\n\n if (strDate >= 0 && strDate <= 9) {\n strDate = '0' + strDate;\n } // 最后拼接字符串,得到一个格式为(yyyy-MM-dd)的日期\n\n\n var nowDate = date.getFullYear() + seperator + nowMonth + seperator + strDate;\n this.queryParam.params.day = nowDate;\n },\n //导出excl\n updateExcl: function updateExcl() {\n var _this2 = this;\n\n //导出excl\n var loading = this.$loading({\n lock: true,\n text: '导出中...',\n spinner: 'el-icon-loading',\n background: 'rgba(0, 0, 0, 0.7)'\n });\n var param = {\n groupRelation: 'AND',\n groupTree: {},\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n params: {\n day: this.queryParam.params.day\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: '',\n relation: 'AND',\n value: {}\n }],\n sorter: [{\n direction: 'ASC',\n property: ''\n }]\n };\n resWaterNewspaper.resDailyDerived(param, function (res) {\n loading.close();\n\n if (!!res) {\n _this2.$message.success('导出成功');\n }\n });\n },\n getDateList: function getDateList() {\n var _this3 = this;\n\n // this.getCurrentMonthLast()\n this.loading = true;\n this.tableData = [];\n resWaterNewspaper.resDailyData(this.queryParam, function (res) {\n if (res.state) {\n _this3.tableData = res.value.rows;\n console.log(_this3.tableData);\n\n _this3.tableData.forEach(function (item) {\n if (item.rz == undefined) {\n item['rz'] = 0;\n }\n\n if (item.dyp == undefined) {\n item['dyp'] = 0;\n }\n });\n\n _this3.loading = false;\n } else {\n _this3.$message.error(res.message);\n }\n });\n },\n // // 点击查询\n onClickSearch: function onClickSearch() {\n this.queryParam.pageBean.page = 1; // return\n\n this.getDateList();\n },\n // 重置\n resetQuery: function resetQuery() {\n this.queryParam.params = {};\n this.scopeTime = '';\n this.onClickSearch();\n },\n getSummaries: function getSummaries(param) {\n var columns = param.columns,\n data = param.data;\n var sums = [];\n columns.forEach(function (column, index) {\n if (index === 0) {\n sums[index] = '总库容';\n return;\n }\n\n if (column.property == 'realRstpc') {\n var values = data.map(function (item) {\n var strValue = '',\n value = 0;\n\n if (item[column.property]) {\n strValue = item[column.property].replace('约', '');\n value = Number(strValue);\n }\n\n return value;\n });\n\n if (!values.every(function (value) {\n return isNaN(value);\n })) {\n sums[index] = values.reduce(function (prev, curr) {\n var value = Number(curr);\n\n if (!isNaN(value)) {\n return prev + curr;\n } else {\n return prev;\n }\n }, 0);\n sums[index] = sums[index].toFixed(3);\n sums[index] += ' 万m³';\n } else {\n sums[index] = '--';\n }\n } else {\n sums[index] = '';\n }\n });\n this.$nextTick(function () {});\n console.log(sums);\n return sums;\n }\n }\n};",null]}