{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\views\\DesignEstimate\\WaterConservation.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\views\\DesignEstimate\\WaterConservation.vue","mtime":1675214577964},{"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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport ProjectInfoDialog from '@/components/dialog/ProjectInfoDialog.vue'\r\nexport default {\r\n  name: 'WaterConservation',\r\n  components: {\r\n    ProjectInfoDialog\r\n  },\r\n  data() {\r\n    return {\r\n      searchForm: {}, //顶部搜索参数\r\n      dataBaseOptions: {\r\n        dataBaseId: '',\r\n        tableName: '', // 必填\r\n        tableSchema: ''\r\n      },\r\n      originAPIOptions: {\r\n        url: '', // 列表请求接口地址\r\n        method: 'post', // 列表请求方法\r\n        moduleRoot: '' // 微服务根路径\r\n      },\r\n      exportQuery: {},\r\n      data: [], //表格数据\r\n      pageResult: {\r\n        page: 1,\r\n        pageSize: 20,\r\n        total: 0\r\n      },\r\n      form: {},\r\n      dialogTitle: '添加',\r\n      dialogVisible: false,\r\n      loading: false,\r\n      rules: {\r\n        'projectInfo.projectName': {\r\n          required: true,\r\n          message: '请选择项目名称',\r\n          trigger: 'blur'\r\n        },\r\n        documentNumber: {\r\n          required: true,\r\n          message: '请输入编号',\r\n          trigger: 'blur'\r\n        },\r\n        reviewUnit: {\r\n          required: true,\r\n          message: '请输入审查单位',\r\n          trigger: 'blur'\r\n        },\r\n        establishmentDate: {\r\n          required: true,\r\n          message: '请选择审查日期',\r\n          trigger: 'blur'\r\n        }\r\n      }\r\n    }\r\n  },\r\n  computed: {\r\n    deleteUrl: function() {\r\n      return (\r\n        window.context.cqxy + '/biz/designEstimate/aquaticProtection/v1/delete'\r\n      )\r\n    }\r\n  },\r\n  methods: {\r\n    handleAdd() {\r\n      this.dialogTitle = '添加'\r\n      this.form = {\r\n        projectInfo: {\r\n          projectCode: '',\r\n          projectName: ''\r\n        },\r\n        accessoryInfo: []\r\n      }\r\n      this.dialogVisible = true\r\n    },\r\n    handleSelect(selection) {},\r\n    handleDialogCancel() {\r\n      this.dialogVisible = false\r\n    },\r\n    handleDialogClose() {\r\n      this.dialogVisible = false\r\n    },\r\n    handleRowDBClick(data) {\r\n      this.form = data\r\n      this.dialogTitle = '修改'\r\n      this.dialogVisible = true\r\n    },\r\n    handleFocusProject() {\r\n      this.$refs.project.open()\r\n    },\r\n    handleSelectProject(data) {\r\n      this.form.projectId = data.id\r\n      this.form.projectInfo.projectCode = data.projectCode\r\n      this.form.projectInfo.projectName = data.projectName\r\n      this.$refs.form.clearValidate()\r\n    },\r\n    handleFile(file) {\r\n      this.form.accessoryInfo = file\r\n    },\r\n    handleDialogSubmit() {\r\n      this.$refs.form.validate(valid => {\r\n        if (valid && this.form.accessoryInfo.length !== 0) {\r\n          this.form.accessoryInfo.forEach(item => {\r\n            if (item.id) {\r\n              delete item.id\r\n            }\r\n          })\r\n          this.loading = true\r\n          this.$http\r\n            .post(\r\n              '${cqxy}/biz/designEstimate/aquaticProtection/v1/save',\r\n              this.form\r\n            )\r\n            .then(res => {\r\n              if (res.data.state) {\r\n                this.$refs.form.resetFields()\r\n                this.$message.success(res.data.message)\r\n                this.dialogVisible = false\r\n                this.$refs.AtTable.load()\r\n              } else {\r\n                this.$message.error(res.data.message)\r\n              }\r\n              this.loading = false\r\n            })\r\n        } else if (this.form.accessoryInfo.length === 0) {\r\n          this.$message.error('请至少上传一个附件')\r\n        }\r\n      })\r\n    },\r\n    findinfo() {\r\n      let query = []\r\n      let search = {\r\n        project_id_: this.searchForm.projectId,\r\n        establishment_date_: this.searchForm.establishmentDate\r\n      }\r\n      for (let i in search) {\r\n        if (search[i]) {\r\n          query.push({\r\n            group: 'advance',\r\n            operation: 'LIKE',\r\n            property: i,\r\n            relation: 'AND',\r\n            value: search[i]\r\n          })\r\n        }\r\n      }\r\n      let data = {\r\n        pageBean: {\r\n          page: 1,\r\n          pageSize: 20,\r\n          showTotal: true\r\n        },\r\n        querys: query\r\n      }\r\n      this.$http\r\n        .post('${cqxy}/biz/designEstimate/aquaticProtection/v1/page', data)\r\n        .then(resp => {\r\n          let response = resp.data.value\r\n          this.data = response.rows\r\n          this.pageResult = {\r\n            page: response.page,\r\n            pageSize: response.pageSize,\r\n            total: response.total\r\n          }\r\n        })\r\n    },\r\n    //上传发送事件\r\n    handleUpload() {\r\n      this.$bus.$emit('openUploader')\r\n    },\r\n    loadData(param, cb) {\r\n      param.params = {\r\n        projectId: this.$route.params.id\r\n      }\r\n      this.$http\r\n        .post('${cqxy}/biz/designEstimate/aquaticProtection/v1/page', param)\r\n        .then(\r\n          resp => {\r\n            let response = resp.data.value\r\n            this.data = response.rows\r\n            this.pageResult = {\r\n              page: response.page,\r\n              pageSize: response.pageSize,\r\n              total: response.total\r\n            }\r\n          },\r\n          error => {\r\n            reject(error)\r\n          }\r\n        )\r\n        .finally(() => {\r\n          if (cb) {\r\n            cb()\r\n          }\r\n        })\r\n    }\r\n  }\r\n}\r\n",null]}