{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\views\\StatisticalReport\\ProjectAccount.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\views\\StatisticalReport\\ProjectAccount.vue","mtime":1681501867278},{"path":"D:\\jenkins\\workspace\\xypm-web\\babel.config.js","mtime":1675214572901},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\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/es6.number.constructor\";\nimport _defineProperty from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.array.find-index\";\nimport \"core-js/modules/web.dom.iterable\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 req from '@/request.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nexport default {\n  name: 'ProjectAccount',\n  data: function data() {\n    return {\n      // url:'',\n      data: [],\n      selectData: [],\n      expandTableData: [],\n      searchForm: {\n        id: '',\n        projectId: '',\n        createTime: new Date().getFullYear()\n      },\n      importData: {},\n      loading2: false,\n      loading: false,\n      findling: false,\n      //查询加载\n      pageSizes: [10, 20, 50, 100, 200, 300, 500],\n      pagerCount: 11,\n      pagination: {\n        page: 1,\n        pageSize: 10,\n        total: 0\n      },\n      pageResult: {\n        page: 1,\n        pageSize: 20,\n        total: 0\n      },\n      queryFilter: {\n        querys: []\n      },\n      size: '',\n      projectStatusList: [],\n      statusList: [],\n      //项目状态列表\n      dialogVisible: false,\n      detailData: [],\n      defaultExpandAll: false,\n      expandRowKeys: [],\n      projectType: {},\n      expandLoading: false,\n      optionYears: [] //顶部搜索年份选择数组\n    };\n  },\n  created: function created() {\n    var _this = this;\n    this.getYear();\n    this.projectStatusList = dictUtils.getDictItemsFromCache('xmgl-xmzt');\n    this.projectStatusList.forEach(function (item) {\n      if (item.value < 12) {\n        _this.statusList.push({\n          value: '1',\n          name: '在建'\n        });\n      } else {\n        _this.statusList.push({\n          value: '2',\n          name: '新建'\n        });\n      }\n    });\n    this.statusList = this.statusList.filter(function (item, index, self) {\n      return self.findIndex(function (el) {\n        return el.value == item.value;\n      }) === index;\n    });\n  },\n  methods: {\n    //获取顶部搜索的年份区间\n    getYear: function getYear() {\n      var myDate = new Date();\n      var startYear = 2006; //起始年份\n      var endYear = myDate.getFullYear(); //结束年份\n      for (var i = endYear; i >= startYear; i--) {\n        this.optionYears.push({\n          label: i + '年',\n          value: i\n        });\n      }\n    },\n    handleExport: function handleExport() {\n      var _this2 = this;\n      this.loading2 = true;\n      var query = [{\n        group: 'defaultQueryGroup',\n        operation: 'EQUAL',\n        relation: 'AND',\n        property: 'parent_id_',\n        value: 'root'\n      }];\n      var search = {\n        id_: this.searchForm.projectId,\n        PROJECT_TYPE_: this.searchForm.id,\n        CREATE_TIME_: this.searchForm.createTime\n        // project_status_: this.searchForm.prijectStatus,\n        // decision_basis_type_: this.searchForm.decisionBasisType,\n        // bidding_charge_type_: this.searchForm.biddingChargeType\n      };\n\n      for (var i in search) {\n        if (search[i] && i !== 'CREATE_TIME_') {\n          query.push({\n            group: 'advance',\n            operation: 'EQUAL',\n            property: i,\n            relation: 'AND',\n            value: search[i]\n          });\n        } else if (search[i] && i == 'CREATE_TIME_') {\n          query.push({\n            group: 'createTimeGroup',\n            operation: 'BETWEEN',\n            relation: 'AND',\n            property: 'COMMENCEMENT_TIME_',\n            value: [\"\".concat(this.searchForm.createTime, \"-01-01 00:00:00\"), \"\".concat(this.searchForm.createTime, \"-12-31 23:59:59\")]\n          });\n          // {\n          //   group: 'createTimeGroup',\n          //   operation: 'BETWEEN',\n          //   parentGroup: '',\n          //   property: 'COMMENCEMENT_TIME_',\n          //   relation: 'OR',\n          //   value: [\n          //     `${search[i]}-01-01 00:00:00`,\n          //     `${search[i]}-12-31 23:59:59`,\n          //   ],\n          // },\n          // {\n          //   group: 'createTimeSubGroup',\n          //   operation: 'LESS',\n          //   parentGroup: 'createTimeGroup',\n          //   property: 'PROJECT_STATUS_',\n          //   relation: 'AND',\n          //   value: '12',\n          // }\n        }\n      }\n\n      var param = {\n        pageBean: {\n          page: 1,\n          pageSize: -1,\n          showTotal: true\n        },\n        querys: query\n      };\n      req.downloadPostCopy('${cqxy}/biz/ledger/projectLedger/v1/exportDataToExcel', param).then(function (res) {\n        if (res.status == 200) {\n          _this2.loading2 = false;\n          _this2.$message.success('导出成功');\n        } else {\n          _this2.loading2 = false;\n          _this2.$message.error('导出失败');\n        }\n      });\n    },\n    handleExpandAll: function handleExpandAll() {\n      this.defaultExpandAll = !this.defaultExpandAll;\n      if (!this.defaultExpandAll) {\n        this.expandRowKeys = [];\n      } else {\n        this.expandRowKeys = this.data.map(function (item) {\n          if (item.name !== '总计') {\n            return item.id;\n          }\n        });\n      }\n    },\n    /* 导入回调事件 */load: function load() {},\n    handleDialogCancel: function handleDialogCancel() {\n      this.dialogVisible = false;\n    },\n    handleDialogClose: function handleDialogClose() {\n      this.dialogVisible = false;\n    },\n    handleRowDBClick: function handleRowDBClick(data, id) {\n      this.detailData = data;\n      this.dialogVisible = true;\n    },\n    /* 内部表格分页方法 */handleSizeChange: function handleSizeChange(pageSize, id) {\n      var pagination = _objectSpread(_objectSpread({}, this.data[id].pagination), {}, {\n        pageSize: pageSize\n      });\n      this.$set(this.data[id].pagination, 'page', pagination.page);\n      this.$set(this.data[id].pagination, 'pageSize', pagination.pageSize);\n      this.$set(this.data[id].pagination, 'total', pagination.total);\n      this.handleExpandChange(this.projectType);\n    },\n    handleCurrentChange: function handleCurrentChange(page, id) {\n      var pagination = _objectSpread(_objectSpread({}, this.data[id].pagination), {}, {\n        page: page\n      });\n      this.$set(this.data[id].pagination, 'page', pagination.page);\n      this.$set(this.data[id].pagination, 'pageSize', pagination.pageSize);\n      this.$set(this.data[id].pagination, 'total', pagination.total);\n      this.handleExpandChange(this.projectType, true);\n    },\n    handleExpandChange: function handleExpandChange(row, doNotResetPage) {\n      var _this3 = this;\n      // console.log(row, 'row')\n      this.expandLoading = true;\n      this.projectType = {\n        value: row.value,\n        id: row.id\n      };\n      // 默认重置页码为第一页\n      if (!doNotResetPage) {\n        if (row.id) {\n          this.data[row.id].pagination.page = 1;\n        }\n      }\n      var param = {};\n      if (row.id) {\n        param = {\n          pageBean: _objectSpread(_objectSpread({}, this.data[row.id].pagination), {}, {\n            showTotal: true\n          }),\n          querys: [{\n            operation: 'EQUAL',\n            property: 'PROJECT_TYPE_',\n            relation: 'AND',\n            value: this.projectType.value\n          }]\n        };\n      } else {\n        param = {\n          pageBean: _objectSpread(_objectSpread({}, this.pagination), {}, {\n            showTotal: true\n          }),\n          querys: [{\n            operation: 'EQUAL',\n            property: 'PROJECT_TYPE_',\n            relation: 'AND',\n            value: this.projectType.value\n          }]\n        };\n      }\n      param.querys.push({\n        group: 'defaultQueryGroup',\n        operation: 'EQUAL',\n        relation: 'AND',\n        property: 'parent_id_',\n        value: 'root'\n      });\n      if (this.searchForm.createTime) {\n        param.querys.push({\n          group: 'createTimeGroup',\n          operation: 'BETWEEN',\n          parentGroup: '',\n          property: 'commencement_time_',\n          relation: 'AND',\n          value: [\"\".concat(this.searchForm.createTime, \"-01-01 00:00:00\"), \"\".concat(this.searchForm.createTime, \"-12-31 23:59:59\")]\n        });\n      }\n      delete param.pageBean.total;\n      this.$http.post('${cqxy}/biz/ledger/projectLedger/v1/page', param).then(function (resp) {\n        console.log(resp, 'respssss');\n        _this3.expandLoading = false;\n        var response = resp.data.value;\n        if (row.id) {\n          _this3.$set(_this3.data[row.id], 'expandTableData', response.data);\n          _this3.$set(_this3.data[row.id].pagination, 'page', response.page);\n          _this3.$set(_this3.data[row.id].pagination, 'pageSize', response.pageSize);\n          _this3.$set(_this3.data[row.id].pagination, 'total', response.total);\n        }\n        console.log(_this3.data, 'this.data');\n        // this.pagination = {\n        //   page: response.page,\n        //   pageSize: response.pageSize,\n        //   total: response.total\n        // }\n      });\n    },\n    loadData: function loadData(param, cb) {\n      var _this4 = this;\n      this.queryFilter.querys = [{\n        group: 'defaultQueryGroup',\n        operation: 'EQUAL',\n        relation: 'AND',\n        property: 'parent_id_',\n        value: 'root'\n      }];\n      var search = {\n        id_: this.searchForm.projectId,\n        PROJECT_TYPE_: this.searchForm.id,\n        CREATE_TIME_: this.searchForm.createTime\n      };\n      for (var i in search) {\n        if (search[i] && i !== 'CREATE_TIME_') {\n          this.queryFilter.querys.push({\n            group: 'advance',\n            operation: 'EQUAL',\n            property: i,\n            relation: 'AND',\n            value: search[i]\n          });\n        } else if (search[i] && i == 'CREATE_TIME_') {\n          this.queryFilter.querys.push({\n            group: 'createTimeGroup',\n            operation: 'BETWEEN',\n            relation: 'AND',\n            property: 'COMMENCEMENT_TIME_',\n            value: [\"\".concat(this.searchForm.createTime, \"-01-01 00:00:00\"), \"\".concat(this.searchForm.createTime, \"-12-31 23:59:59\")]\n          });\n        }\n      }\n      this.selectData = [];\n      this.$http.post('${yhxt}/biz/ledger/projectLedger/v1/typeData', this.queryFilter).then(function (res) {\n        if (res.data.state) {\n          console.log(res, 'res');\n          res.data.value.forEach(function (item, index) {\n            item.id = index;\n            if (item.name == '总计' || Number(item.total) == 0) {\n              item.hasChildren = 'false';\n            } else {\n              item.hasChildren = true;\n              _this4.selectData.push({\n                name: item.name,\n                id: item.value\n              });\n            }\n          });\n          _this4.data = res.data.value;\n          _this4.data.forEach(function (item, index) {\n            _this4.projectType = {\n              name: item.name,\n              id: item.id,\n              value: item.value\n            };\n            item.expandTableData = [];\n            item.pagination = {\n              page: 1,\n              pageSize: 10,\n              total: 0\n            };\n          });\n        } else {\n          _this4.$message.error(res.data.message);\n        }\n      });\n      if (cb) {\n        cb();\n      }\n    },\n    findinfo: function findinfo() {\n      var _this5 = this;\n      this.loadData();\n      this.findling = true;\n      this.$refs.projectInfo.getProjectData(this.searchForm.createTime);\n      if (this.searchForm.id) {\n        this.defaultExpandAll = !this.defaultExpandAll;\n        this.expandRowKeys = this.data.map(function (item) {\n          if (item.name !== '总计' && item.id === _this5.searchForm.id) {\n            return item.id;\n          }\n        });\n      }\n      if (this.searchForm.projectId || this.searchForm.createTime) {\n        this.defaultExpandAll = true;\n        this.expandRowKeys = this.data.map(function (item) {\n          if (item.name !== '总计') {\n            return item.id;\n          }\n        });\n      }\n      var query = [{\n        group: 'defaultQueryGroup',\n        operation: 'EQUAL',\n        relation: 'AND',\n        property: 'parent_id_',\n        value: 'root'\n      }];\n      var search = {\n        id_: this.searchForm.projectId,\n        PROJECT_TYPE_: this.searchForm.id,\n        CREATE_TIME_: this.searchForm.createTime\n        // project_status_: this.searchForm.projectStatus,\n        // decision_basis_type_: this.searchForm.decisionBasisType,\n        // bidding_charge_type_: this.searchForm.biddingChargeType\n      };\n\n      var projectStatus = '';\n      if (this.searchForm.projectStatus == 1) {\n        projectStatus = '12';\n      }\n      if (this.searchForm.projectStatus == 2) {\n        projectStatus = '';\n      }\n      for (var i in search) {\n        if (search[i] && i !== 'CREATE_TIME_') {\n          query.push({\n            group: 'advance',\n            operation: 'EQUAL',\n            property: i,\n            relation: 'AND',\n            value: search[i]\n          }\n          // {\n          //     group: 'createTimeSubGroup',\n          //     operation: 'LESS_EQUAL',\n          //     parentGroup: 'createTimeGroup',\n          //     property: 'commencement_time_',\n          //     relation: 'OR',\n          //     value: `${this.searchForm.createTime}-12-31 23:59:59`,\n          //   },\n          //   {\n          //     group: 'createTimeSubGroup',\n          //     operation: 'LESS',\n          //     parentGroup: 'createTimeGroup',\n          //     property: 'PROJECT_STATUS_',\n          //     relation: 'AND',\n          //     value: '12',\n          //   }\n          );\n        } else if (search[i] && i == 'CREATE_TIME_') {\n          query.push({\n            group: 'createTimeGroup',\n            operation: 'BETWEEN',\n            parentGroup: '',\n            property: 'commencement_time_',\n            relation: 'AND',\n            value: [\"\".concat(search[i], \"-01-01 00:00:00\"), \"\".concat(search[i], \"-12-31 23:59:59\")]\n          }, {\n            group: 'createTimeSubGroup',\n            operation: 'LESS_EQUAL',\n            parentGroup: 'createTimeGroup',\n            property: 'commencement_time_',\n            relation: 'OR',\n            value: \"\".concat(this.searchForm.createTime, \"-12-31 23:59:59\")\n          }, {\n            group: 'createTimeSubGroup',\n            operation: 'LESS',\n            parentGroup: 'createTimeGroup',\n            property: 'PROJECT_STATUS_',\n            relation: 'AND',\n            value: projectStatus\n          });\n        }\n      }\n      if (projectStatus == '') {\n        query.splice(query.length - 2);\n      }\n      var data = {\n        pageBean: {\n          page: -1,\n          pageSize: -1,\n          showTotal: true\n        },\n        querys: query\n      };\n      this.$http.post('${cqxy}/biz/ledger/projectLedger/v1/page', data).then(function (resp) {\n        console.log(resp, 'expandTableData');\n        _this5.expandTableData = resp.data.value.data;\n        _this5.selectData.forEach(function (item) {\n          _this5.expandTableData.forEach(function (val) {\n            if (item.projectType == item.id) {\n              item.expandTableData.push(val);\n            }\n          });\n        });\n        _this5.data.forEach(function (item) {\n          _this5.expandTableData.forEach(function (val) {\n            if (item.value == val.projectType) {\n              item.expandTableData.push(val);\n            }\n          });\n        });\n        _this5.handleExpandChange(_this5.projectType, false);\n        _this5.findling = false;\n        _this5.pageResult = {\n          page: resp.data.value.page,\n          pageSize: resp.data.value.pageSize,\n          total: resp.data.value.total\n        };\n      });\n    },\n    /* 重置清除查询字段 */handleReset: function handleReset() {\n      this.searchForm = {\n        id: '',\n        projectId: '',\n        projectStatus: '',\n        decisionBasisType: '',\n        biddingChargeType: ''\n      };\n      this.selectData = [];\n      this.expandRowKeys = [];\n      this.defaultExpandAll = false;\n      this.$refs.AtTable.load();\n    }\n  }\n};",null]}