1 line
38 KiB
JSON
1 line
38 KiB
JSON
{"remainingRequest":"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\\addHouse\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\house\\addHouse\\index.vue","mtime":1740462063960},{"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\\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":["\"use strict\";\n\nvar _interopRequireDefault = require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nrequire(\"core-js/modules/es6.regexp.replace\");\nrequire(\"core-js/modules/es6.regexp.split\");\nrequire(\"core-js/modules/es6.number.constructor\");\nrequire(\"core-js/modules/es6.function.name\");\nvar _defineProperty2 = _interopRequireDefault(require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/defineProperty.js\"));\nvar _getdata = require(\"@/api/getdata\");\nvar _popup = _interopRequireDefault(require(\"@/views/estate/examine/dialog/popup.vue\"));\nvar _crypto = require(\"crypto\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = exports.default = {\n components: {\n Popup: _popup.default\n },\n data: function data() {\n var valNum = function valNum(rule, value, callback) {\n var reg = /^[0-9]+([.]{0,1}[0-9]+){0,1}$/;\n if (reg.test(value)) {\n callback();\n } else {\n callback(new Error('请输入正数字'));\n }\n };\n var orderTelRule = function orderTelRule(rule, value, callback) {\n var isPhone = /^1(3|4|5|7|8|9)\\d{9}$/;\n // var isMob = /^(\\(\\d{3,4}\\)|\\d{3,4}-|\\s)?\\d{7,14}$/\n var isMob = /^\\d{8}$/;\n // var isMob = /^\\d{2,5}-\\d{7,8}$/\n if (isMob.test(value) || isPhone.test(value)) {\n callback();\n } else {\n callback(new Error(\"请输入正确的手机号码\"));\n }\n };\n return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({\n indexCall: this.$route.query.index ? this.$route.query.index : window.localStorage.getItem(\"pageIndex\"),\n validation: false,\n completeTitle: \"\",\n nav: \"\",\n imgData: {},\n dialogImageUrl: \"\",\n dialogVisible: false,\n timeUpdate: \"\",\n ruleForm: {\n //房屋信息\n houseName: \"\",\n houseCode: \"\",\n assetsId: \"\",\n houseType: \"\",\n model: \"\",\n houseAddr: \"\",\n acreage: \"\",\n buildingYear: \"\",\n status: \"\",\n property: \"\",\n evaluationPrice: \"\",\n //评估价\n cost: \"\",\n //资产原值\n rent: \"\",\n amount: \"\",\n responsible: \"\",\n responsiblePhone: \"\",\n air: '',\n water: '',\n elec: '',\n gas: '',\n waterNum: '',\n elecNum: '',\n gasNum: '',\n deed: '',\n //房产证\n map: \"\",\n //宗地图\n picture: [],\n //房屋图片\n //附属设施\n device: [],\n //附属设施\n ancillaryFacilities: [],\n //国家电网公司未售公有住房调查信息\n headUnit: \"\",\n //总(分)部/各单位本部\n cityUnit: \"\",\n //地市公司/分支机构\n countyUnit: \"\",\n //县级电力公司/其他县级单位\n examineStatus: \"\",\n //审核状态\n houseLocation: \"\",\n //房屋坐落\n propertyUnit: \"\",\n //产权单位\n useManagementUnit: \"\",\n //使用管理单位\n certificateNumber: \"\",\n //产权证号\n purchaseTime: \"\",\n //购(建)时间\n buildingArea: \"\",\n //建筑面积(㎡)\n usage: \"\",\n //使用情况\n useName: \"\",\n //使用人\n resolveIntention: \"\",\n //解决意向\n remark: \"\",\n //备注\n //国家电网公司土地信息\n landNumber: \"\",\n //土地编号\n landName: \"\",\n //宗地名称\n landAddr: \"\",\n //宗地地址\n landTime: \"\",\n //土地取得时间\n landOwner: \"\",\n //土地所有权人\n landType: \"\",\n //土地使用权类型\n endDate: \"\",\n //终止日期\n acquisitionPrice: \"\",\n //取得价格(万元)\n plannedUse: \"\",\n //规划用途\n actualUse: \"\",\n //实际用途\n usedArea: \"\",\n //已使用面积(平方米)\n idleArea: \"\",\n //闲置面积(平方米)\n usageArea: \"\",\n //使用权面积(平方米)\n realEstateNumber: \"\",\n //土地(不动产)证号\n certificateAcquisitionTime: \"\",\n //权证取得时间\n unlicensedReason: \"\",\n //无证原因\n realEstateLand: \"\",\n //是否为生产辅助房产用地\n attachBuildingInfo: \"\",\n //附着建筑物信息\n warrantInfo: \"\" //权证信息\n },\n til: \"添加\",\n id: \"\",\n rules: {\n houseName: [{\n required: true,\n message: \"请输入房屋名称\",\n trigger: \"blur\"\n }],\n houseCode: [{\n required: true,\n message: \"请输入房屋房号\",\n trigger: \"blur\"\n }],\n assetsId: [{\n required: true,\n message: \"请输入资产ID\",\n trigger: \"blur\"\n }],\n houseType: [{\n required: true,\n message: \"请选择房产类别\",\n trigger: \"change\"\n }],\n houseAddr: [{\n required: true,\n message: \"请输入地址\",\n trigger: \"blur\"\n }],\n acreage: [{\n required: true,\n message: \"请输入面积\",\n trigger: \"blur\"\n }, {\n validator: valNum,\n trigger: \"blur\"\n }],\n evaluationPrice: [{\n required: true,\n message: \"请输入评估价\",\n trigger: \"blur\"\n }, {\n validator: valNum,\n trigger: \"blur\"\n }],\n model: [{\n required: true,\n message: \"请选择房型\",\n trigger: \"change\"\n }],\n buildingYear: [{\n required: true,\n message: \"请选择建筑年代\",\n trigger: \"blur\"\n }],\n status: [{\n required: true,\n message: \"请选择房屋状态\",\n trigger: \"change\"\n }],\n // property:[{ required: true, message: \"请输入物业金额\", trigger: \"blur\" },{ validator: valNum, trigger: \"blur\" }],\n rent: [{\n required: true,\n message: \"请输入房租金额\",\n trigger: \"blur\"\n }, {\n validator: valNum,\n trigger: \"blur\"\n }],\n amount: [{\n required: true,\n message: \"请输入押金金额\",\n trigger: \"blur\"\n }, {\n validator: valNum,\n trigger: \"blur\"\n }],\n responsible: [{\n required: true,\n message: \"请输入负责人姓名\",\n trigger: \"blur\"\n }],\n responsiblePhone: [{\n required: true,\n message: \"请输入负责人联系方式\",\n trigger: \"blur\"\n }, {\n validator: orderTelRule,\n trigger: \"blur\"\n }]\n },\n houseType: [],\n status: [],\n device: [],\n model: [],\n parentData: [],\n facilitiesList: []\n }, \"dialogVisible\", false), \"isEdit\", false), \"dIndex\", \"\"), \"addForm\", {\n name: \"\",\n brand: \"\",\n model: \"\",\n num: \"\"\n }), \"addRules\", {\n name: [{\n required: true,\n message: \"请输入设备名称\",\n trigger: \"blur\"\n }],\n brand: [{\n required: true,\n message: \"请输入品牌\",\n trigger: \"blur\"\n }],\n model: [{\n required: true,\n message: \"请输入型号\",\n trigger: \"blur\"\n }],\n num: [{\n required: true,\n message: \"请输入数量\",\n trigger: \"blur\"\n }, {\n validator: valNum,\n trigger: \"blur\"\n }]\n });\n },\n created: function created() {},\n mounted: function mounted() {\n console.log(this.$route.query);\n this.houseType = JSON.parse(this.$route.query.houseType);\n this.status = JSON.parse(this.$route.query.status);\n this.device = JSON.parse(this.$route.query.device);\n this.model = JSON.parse(this.$route.query.model);\n var data = this.$route.query.rowdata;\n console.log(data);\n if (data) {\n this.ruleForm.houseName = data.HOUSE_NAME ? data.HOUSE_NAME : '';\n this.ruleForm.houseCode = data.HOUSE_CODE ? data.HOUSE_CODE : '';\n this.ruleForm.assetsId = data.ASSETS_ID ? data.ASSETS_ID : '';\n this.ruleForm.houseType = data.HOUSE_TYPE ? data.HOUSE_TYPE : '';\n this.ruleForm.houseAddr = data.HOUSE_ADDR ? data.HOUSE_ADDR : '';\n this.ruleForm.acreage = data.ACREAGE ? data.ACREAGE : '';\n this.ruleForm.model = data.MODEL ? data.MODEL : '';\n this.ruleForm.buildingYear = data.BUILDING_YEAR ? data.BUILDING_YEAR : '';\n this.ruleForm.status = data.STATUS ? data.STATUS : '';\n this.ruleForm.air = data.AIR ? data.AIR : '';\n this.ruleForm.property = data.PROPERTY ? data.PROPERTY : '';\n this.ruleForm.evaluationPrice = data.EVALUATION_PRICE ? data.EVALUATION_PRICE : ''; //评估价\n this.ruleForm.cost = data.COST ? data.COST : ''; //资产原值\n this.ruleForm.rent = data.RENT ? data.RENT : '';\n this.ruleForm.amount = data.AMOUNT ? data.AMOUNT : '';\n this.ruleForm.water = data.WATER ? data.WATER : '';\n this.ruleForm.elec = data.ELEC ? data.ELEC : '';\n this.ruleForm.gas = data.GAS ? data.GAS : '';\n this.ruleForm.waterNum = data.WATER_NUM ? data.WATER_NUM : '';\n this.ruleForm.elecNum = data.ELEC_NUM ? data.ELEC_NUM : '';\n this.ruleForm.gasNum = data.GAS_NUM ? data.GAS_NUM : '';\n this.ruleForm.responsible = data.RESPONSIBLE;\n this.ruleForm.responsiblePhone = data.RESPONSIBLE_PHONE;\n // this.ruleForm.device = data.DEVICE?data.DEVICE.split(\",\"):[];\n this.ruleForm.deed = data.DEED ? data.DEED : '';\n this.ruleForm.map = data.MAP ? data.MAP : \"\";\n this.ruleForm.picture = data.PICTURE ? data.PICTURE : [];\n this.facilitiesList = data.ancillaryFacilities ? data.ancillaryFacilities : [];\n //国家电网公司未售公有住房调查信息\n this.ruleForm.headUnit = data.HEAD_UNIT ? data.HEAD_UNIT : ''; //总(分)部/各单位本部\n this.ruleForm.cityUnit = data.CITY_UNIT ? data.CITY_UNIT : ''; //地市公司/分支机构\n this.ruleForm.countyUnit = data.COUNTY_UNIT ? data.COUNTY_UNIT : ''; //县级电力公司/其他县级单位\n this.ruleForm.examineStatus = data.EXAMINE_STATUS ? data.EXAMINE_STATUS : ''; //审核状态\n this.ruleForm.houseLocation = data.HOUSE_LOCATION ? data.HOUSE_LOCATION : ''; //房屋坐落\n this.ruleForm.propertyUnit = data.PROPERTY_UNIT ? data.PROPERTY_UNIT : ''; //产权单位\n this.ruleForm.useManagementUnit = data.USE_MANAGEMENT_UNIT ? data.USE_MANAGEMENT_UNIT : ''; //使用管理单位\n this.ruleForm.certificateNumber = data.CERTIFICATE_NUMBER ? data.CERTIFICATE_NUMBER : ''; //产权证号\n this.ruleForm.purchaseTime = data.PURCHASE_TIME ? data.PURCHASE_TIME : ''; //购(建)时间\n this.ruleForm.buildingArea = data.BUILDING_AREA ? data.BUILDING_AREA : ''; //建筑面积(㎡)\n this.ruleForm.usage = data.USAGE ? data.USAGE : ''; //使用情况\n this.ruleForm.useName = data.USE_NAME ? data.USE_NAME : ''; //使用人\n this.ruleForm.resolveIntention = data.RESOLVE_INTENTION ? data.RESOLVE_INTENTION : ''; //解决意向\n this.ruleForm.remark = data.REMARK ? data.REMARK : ''; //备注\n //国家电网公司土地信息\n this.ruleForm.landNumber = data.LAND_NUMBER ? data.LAND_NUMBER : ''; //土地编号\n this.ruleForm.landName = data.LAND_NAME ? data.LAND_NAME : ''; //宗地名称\n this.ruleForm.landAddr = data.LAND_ADDR ? data.LAND_ADDR : ''; //宗地地址\n this.ruleForm.landTime = data.LAND_TIME ? data.LAND_TIME : ''; //土地取得时间\n this.ruleForm.landOwner = data.LAND_OWNER ? data.LAND_OWNER : ''; //土地所有权人\n this.ruleForm.landType = data.LAND_TYPE ? data.LAND_TYPE : ''; //土地使用权类型\n this.ruleForm.endDate = data.END_DATE ? data.END_DATE : ''; //终止日期\n this.ruleForm.acquisitionPrice = data.ACQUISITION_PRICE ? data.ACQUISITION_PRICE : ''; //取得价格(万元)\n this.ruleForm.plannedUse = data.PLANNED_USE ? data.PLANNED_USE : ''; //规划用途\n this.ruleForm.actualUse = data.ACTUAL_USE ? data.ACTUAL_USE : ''; //实际用途\n this.ruleForm.usedArea = data.USED_AREA ? data.USED_AREA : ''; //已使用面积(平方米)\n this.ruleForm.idleArea = data.IDLE_AREA ? data.IDLE_AREA : ''; //闲置面积(平方米)\n this.ruleForm.usageArea = data.USAGE_AREA ? data.USAGE_AREA : ''; //使用权面积(平方米)\n this.ruleForm.realEstateNumber = data.REAL_ESTATE_NUMBER ? data.REAL_ESTATE_NUMBER : ''; //土地(不动产)证号\n this.ruleForm.certificateAcquisitionTime = data.CERTIFICATE_ACQUISITION_TIME ? data.CERTIFICATE_ACQUISITION_TIME : ''; //权证取得时间\n this.ruleForm.unlicensedReason = data.UNLICENSED_REASON ? data.UNLICENSED_REASON : ''; //无证原因\n this.ruleForm.realEstateLand = data.REAL_ESTATE_LAND ? data.REAL_ESTATE_LAND : ''; //是否为生产辅助房产用地\n this.ruleForm.attachBuildingInfo = data.ATTACH_BUILDING_INFO ? data.ATTACH_BUILDING_INFO : ''; //附着建筑物信息\n this.ruleForm.warrantInfo = data.WARRANT_INFO ? data.WARRANT_INFO : ''; //权证信息\n\n this.id = data.UUID;\n this.til = data.til;\n }\n },\n methods: {\n /**返回上一级 */comeBack: function comeBack() {\n this.$router.push({\n name: \"house\",\n params: {\n index: this.indexCall\n }\n });\n },\n //附属设备\n addDevice: function addDevice() {\n this.addForm = {\n name: \"\",\n brand: \"\",\n model: \"\",\n num: \"\"\n };\n this.isEdit = false;\n this.dialogVisible = true;\n },\n //附属设备\n handleClose: function handleClose() {\n this.dialogVisible = false;\n },\n //附属设备\n confirmAdd: function confirmAdd() {\n var _this2 = this;\n this.$refs[\"addForm\"].validate(function (valid) {\n if (valid) {\n if (_this2.ruleForm.assetsId != \"\") {\n _this2.addForm.assetsId = _this2.ruleForm.assetsId;\n _this2.facilitiesList.push(_this2.addForm);\n _this2.dialogVisible = false;\n } else {\n _this2.$message({\n message: \"请先确认填写资产ID\",\n type: \"warning\"\n });\n }\n }\n });\n },\n //附属设备\n confirmEdit: function confirmEdit() {\n var _this3 = this;\n this.$refs[\"addForm\"].validate(function (valid) {\n if (valid) {\n _this3.facilitiesList[_this3.dIndex] = _this3.addForm;\n _this3.dialogVisible = false;\n }\n });\n },\n //附属设备\n delDevice: function delDevice(index) {\n this.facilitiesList.splice(index, 1);\n },\n //附属设备-编辑\n editDevice: function editDevice(row, index) {\n console.log(row);\n this.addForm = {\n assetsId: row.assetsId,\n brand: row.brand,\n model: row.model,\n name: row.name,\n num: row.num\n };\n this.dIndex = index;\n this.isEdit = true;\n this.dialogVisible = true;\n },\n //修改评估价\n inputEvaluationPrice: function inputEvaluationPrice(value) {\n var reg = /^[0-9]+([.]{0,1}[0-9]+){0,1}$/;\n if (reg.test(value)) {\n this.ruleForm.rent = Number(value) * Number(this.ruleForm.acreage);\n }\n },\n //修改面积\n inputAcreage: function inputAcreage(value) {\n var reg = /^[0-9]+([.]{0,1}[0-9]+){0,1}$/;\n if (reg.test(value)) {\n this.ruleForm.rent = Number(value) * Number(this.ruleForm.evaluationPrice);\n }\n },\n //底部提交\n submitForm: function submitForm(formName) {\n var _this4 = this;\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n if (_this4.til == \"编辑\") {\n _this4.validation = true;\n _this4.completeTitle = \"编辑\";\n _this4.nav = \"是否编辑?\";\n } else {\n _this4.validation = true;\n _this4.completeTitle = \"添加\";\n _this4.nav = \"是否添加?\";\n }\n }\n });\n },\n closeDialogDel: function closeDialogDel(val) {\n var _this5 = this;\n if (val == \"2\") {\n //编辑\n var Content = {\n houseName: this.ruleForm.houseName,\n houseCode: this.ruleForm.houseCode,\n assetsId: this.ruleForm.assetsId,\n houseType: this.ruleForm.houseType,\n houseAddr: this.ruleForm.houseAddr,\n acreage: this.ruleForm.acreage,\n model: this.ruleForm.model,\n buildingYear: this.ruleForm.buildingYear,\n status: this.ruleForm.status,\n evaluationPrice: this.ruleForm.evaluationPrice,\n cost: this.ruleForm.cost,\n property: this.ruleForm.property,\n rent: this.ruleForm.rent,\n amount: this.ruleForm.amount,\n air: this.ruleForm.air,\n water: this.ruleForm.water,\n elec: this.ruleForm.elec,\n gas: this.ruleForm.gas,\n waterNum: this.ruleForm.waterNum,\n elecNum: this.ruleForm.elecNum,\n gasNum: this.ruleForm.gasNum,\n responsible: this.ruleForm.responsible,\n responsiblePhone: this.ruleForm.responsiblePhone,\n // device: this.ruleForm.device.join(\",\"),\n deed: this.ruleForm.deed,\n map: this.ruleForm.map,\n picture: this.ruleForm.picture.join(\"&#&\"),\n id: this.id,\n //附属设备\n ancillaryFacilities: this.facilitiesList,\n //国家电网公司未售公有住房调查信息\n headUnit: this.ruleForm.headUnit,\n //总(分)部/各单位本部\n cityUnit: this.ruleForm.cityUnit,\n //地市公司/分支机构\n countyUnit: this.ruleForm.countyUnit,\n //县级电力公司/其他县级单位\n examineStatus: this.ruleForm.examineStatus,\n //审核状态\n houseLocation: this.ruleForm.houseLocation,\n //房屋坐落\n propertyUnit: this.ruleForm.propertyUnit,\n //产权单位\n useManagementUnit: this.ruleForm.useManagementUnit,\n //使用管理单位\n certificateNumber: this.ruleForm.certificateNumber,\n //产权证号\n purchaseTime: this.ruleForm.purchaseTime,\n //购(建)时间\n buildingArea: this.ruleForm.buildingArea,\n //建筑面积(㎡)\n usage: this.ruleForm.usage,\n //使用情况\n useName: this.ruleForm.useName,\n //使用人\n resolveIntention: this.ruleForm.resolveIntention,\n //解决意向\n remark: this.ruleForm.remark,\n //备注\n //国家电网公司土地信息\n landNumber: this.ruleForm.landNumber,\n //土地编号\n landName: this.ruleForm.landName,\n //宗地名称\n landAddr: this.ruleForm.landAddr,\n //宗地地址\n landTime: this.ruleForm.landTime,\n //土地取得时间\n landOwner: this.ruleForm.landOwner,\n //土地所有权人\n landType: this.ruleForm.landType,\n //土地使用权类型\n endDate: this.ruleForm.endDate,\n //终止日期\n acquisitionPrice: this.ruleForm.acquisitionPrice,\n //取得价格(万元)\n plannedUse: this.ruleForm.plannedUse,\n //规划用途\n actualUse: this.ruleForm.actualUse,\n //实际用途\n usedArea: this.ruleForm.usedArea,\n //已使用面积(平方米)\n idleArea: this.ruleForm.idleArea,\n //闲置面积(平方米)\n usageArea: this.ruleForm.usageArea,\n //使用权面积(平方米)\n realEstateNumber: this.ruleForm.realEstateNumber,\n //土地(不动产)证号\n certificateAcquisitionTime: this.ruleForm.certificateAcquisitionTime,\n //权证取得时间\n unlicensedReason: this.ruleForm.unlicensedReason,\n //无证原因\n realEstateLand: this.ruleForm.realEstateLand,\n //是否为生产辅助房产用地\n attachBuildingInfo: this.ruleForm.attachBuildingInfo,\n //附着建筑物信息\n warrantInfo: this.ruleForm.warrantInfo //权证信息\n };\n // console.log(this.ruleForm.picture)\n (0, _getdata.houseUpdate)(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this5.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this5.$router.push({\n name: \"house\",\n params: {\n index: _this5.indexCall\n }\n });\n } else {\n _this5.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n } else if (val == \"3\") {\n //新增\n var _Content = {\n houseName: this.ruleForm.houseName,\n houseCode: this.ruleForm.houseCode,\n assetsId: this.ruleForm.assetsId,\n houseType: this.ruleForm.houseType,\n houseAddr: this.ruleForm.houseAddr,\n acreage: this.ruleForm.acreage,\n model: this.ruleForm.model,\n buildingYear: this.ruleForm.buildingYear,\n status: this.ruleForm.status,\n property: this.ruleForm.property,\n evaluationPrice: this.ruleForm.evaluationPrice,\n cost: this.ruleForm.cost,\n rent: this.ruleForm.rent,\n amount: this.ruleForm.amount,\n water: this.ruleForm.water,\n air: this.ruleForm.air,\n elec: this.ruleForm.elec,\n gas: this.ruleForm.gas,\n waterNum: this.ruleForm.waterNum,\n elecNum: this.ruleForm.elecNum,\n gasNum: this.ruleForm.gasNum,\n responsible: this.ruleForm.responsible,\n responsiblePhone: this.ruleForm.responsiblePhone,\n // device: this.ruleForm.device.join(\",\"),\n deed: this.ruleForm.deed,\n map: this.ruleForm.map,\n picture: this.ruleForm.picture.join(\"&#&\"),\n //附属设备\n ancillaryFacilities: this.facilitiesList,\n //国家电网公司未售公有住房调查信息\n headUnit: this.ruleForm.headUnit,\n //总(分)部/各单位本部\n cityUnit: this.ruleForm.cityUnit,\n //地市公司/分支机构\n countyUnit: this.ruleForm.countyUnit,\n //县级电力公司/其他县级单位\n examineStatus: this.ruleForm.examineStatus,\n //审核状态\n houseLocation: this.ruleForm.houseLocation,\n //房屋坐落\n propertyUnit: this.ruleForm.propertyUnit,\n //产权单位\n useManagementUnit: this.ruleForm.useManagementUnit,\n //使用管理单位\n certificateNumber: this.ruleForm.certificateNumber,\n //产权证号\n purchaseTime: this.ruleForm.purchaseTime,\n //购(建)时间\n buildingArea: this.ruleForm.buildingArea,\n //建筑面积(㎡)\n usage: this.ruleForm.usage,\n //使用情况\n useName: this.ruleForm.useName,\n //使用人\n resolveIntention: this.ruleForm.resolveIntention,\n //解决意向\n remark: this.ruleForm.remark,\n //备注\n //国家电网公司土地信息\n landNumber: this.ruleForm.landNumber,\n //土地编号\n landName: this.ruleForm.landName,\n //宗地名称\n landAddr: this.ruleForm.landAddr,\n //宗地地址\n landTime: this.ruleForm.landTime,\n //土地取得时间\n landOwner: this.ruleForm.landOwner,\n //土地所有权人\n landType: this.ruleForm.landType,\n //土地使用权类型\n endDate: this.ruleForm.endDate,\n //终止日期\n acquisitionPrice: this.ruleForm.acquisitionPrice,\n //取得价格(万元)\n plannedUse: this.ruleForm.plannedUse,\n //规划用途\n actualUse: this.ruleForm.actualUse,\n //实际用途\n usedArea: this.ruleForm.usedArea,\n //已使用面积(平方米)\n idleArea: this.ruleForm.idleArea,\n //闲置面积(平方米)\n usageArea: this.ruleForm.usageArea,\n //使用权面积(平方米)\n realEstateNumber: this.ruleForm.realEstateNumber,\n //土地(不动产)证号\n certificateAcquisitionTime: this.ruleForm.certificateAcquisitionTime,\n //权证取得时间\n unlicensedReason: this.ruleForm.unlicensedReason,\n //无证原因\n realEstateLand: this.ruleForm.realEstateLand,\n //是否为生产辅助房产用地\n attachBuildingInfo: this.ruleForm.attachBuildingInfo,\n //附着建筑物信息\n warrantInfo: this.ruleForm.warrantInfo //权证信息\n };\n (0, _getdata.houseCreate)(_Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this5.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n if (_this5.completeTitle == \"添加\") {\n _this5.$router.push({\n name: \"house\",\n params: {\n index: 1\n }\n });\n }\n } else {\n _this5.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n }\n // this.$refs[\"ruleForm\"].resetFields();\n this.validation = false;\n },\n handlePictureCardPreview: function handlePictureCardPreview(file) {\n this.dialogImageUrl = file.url;\n this.dialogVisible = true;\n },\n deleteImgs: function deleteImgs() {\n this.ruleForm.deed = '';\n },\n changeFile: function changeFile(options, fileList) {\n // console.log(1111)\n var that = this;\n // 获取文件对象\n var file = options.raw;\n //判断图片类型\n if (file.type == \"image/jpeg\" || file.type == \"image/png\" || file.type == \"image/JPG\") {\n var isJPG = true;\n } else {\n isJPG = false;\n }\n // 判断图片大小\n var isLt2M = file.size / 1024 / 1024 < 2;\n if (!isJPG) {\n this.$message.error(\"上传产品图片只能是 JPG/PNG/JPEG 格式!\");\n }\n if (!isLt2M) {\n this.$message.error(\"上传产品图片大小不能超过 2MB!\");\n }\n // 创建一个HTML5的FileReader对象\n var reader = new FileReader();\n //创建一个img对象\n var img = new Image();\n var filename = options.filename;\n if (file) {\n reader.readAsDataURL(file);\n }\n if (isJPG && isLt2M) {\n reader.onload = function (e) {\n var base64Str = reader.result.split(\",\")[1];\n var newUrl;\n img.src = e.target.result;\n if (file.size / 1024 < 20) {\n that.$set(that.ruleForm, \"deed\", e.target.result);\n return;\n }\n // base64地址图片加载完毕后执行\n img.onload = function () {\n var _this = this;\n // 缩放图片需要的canvas(也可以在DOM中直接定义canvas标签,这样就能把压缩完的图片不转base64也能直接显示出来)\n var canvas = document.createElement(\"canvas\");\n var context = canvas.getContext(\"2d\");\n var wid = img.width;\n var hei = img.height;\n // 最大尺寸限制\n\n var maxWidth = 400,\n maxHeight = 400;\n if (wid > maxWidth || hei > maxHeight) {\n if (wid / hei > maxWidth / maxHeight) {\n maxHeight = Math.round(maxWidth * (hei / wid));\n } else {\n maxWidth = Math.round(maxHeight * (wid / hei));\n }\n } else {\n maxWidth = wid;\n maxHeight = hei;\n }\n\n // canvas对图片进行缩放\n canvas.width = maxWidth;\n canvas.height = maxHeight;\n context.drawImage(img, 0, 0, maxWidth, maxHeight);\n newUrl = canvas.toDataURL(\"image/jpeg\");\n var str = newUrl.replace(\"data:image/png;base64,\", \"\");\n // 找到等号,把等号也去掉\n var equalIndex = str.indexOf(\"=\");\n if (str.indexOf(\"=\") > 0) {\n str = str.substring(0, equalIndex);\n }\n var strLength = str.length;\n var fileLength = parseInt(strLength - strLength / 8 * 2);\n var size = \"\";\n size = (fileLength / 1024).toFixed(2);\n console.log(size);\n that.$set(that.ruleForm, \"deed\", newUrl);\n };\n };\n }\n },\n deleteImgs1: function deleteImgs1() {\n this.ruleForm.map = '';\n },\n changeFile1: function changeFile1(options, fileList) {\n // console.log(1111)\n var that = this;\n // 获取文件对象\n var file = options.raw;\n //判断图片类型\n if (file.type == \"image/jpeg\" || file.type == \"image/png\" || file.type == \"image/JPG\") {\n var isJPG = true;\n } else {\n isJPG = false;\n }\n // 判断图片大小\n var isLt2M = file.size / 1024 / 1024 < 2;\n if (!isJPG) {\n this.$message.error(\"上传产品图片只能是 JPG/PNG/JPEG 格式!\");\n }\n if (!isLt2M) {\n this.$message.error(\"上传产品图片大小不能超过 2MB!\");\n }\n // 创建一个HTML5的FileReader对象\n var reader = new FileReader();\n //创建一个img对象\n var img = new Image();\n var filename = options.filename;\n if (file) {\n reader.readAsDataURL(file);\n }\n if (isJPG && isLt2M) {\n reader.onload = function (e) {\n var base64Str = reader.result.split(\",\")[1];\n var newUrl;\n img.src = e.target.result;\n if (file.size / 1024 < 20) {\n that.$set(that.ruleForm, \"map\", e.target.result);\n return;\n }\n // base64地址图片加载完毕后执行\n img.onload = function () {\n var _this = this;\n // 缩放图片需要的canvas(也可以在DOM中直接定义canvas标签,这样就能把压缩完的图片不转base64也能直接显示出来)\n var canvas = document.createElement(\"canvas\");\n var context = canvas.getContext(\"2d\");\n var wid = img.width;\n var hei = img.height;\n // 最大尺寸限制\n\n var maxWidth = 400,\n maxHeight = 400;\n if (wid > maxWidth || hei > maxHeight) {\n if (wid / hei > maxWidth / maxHeight) {\n maxHeight = Math.round(maxWidth * (hei / wid));\n } else {\n maxWidth = Math.round(maxHeight * (wid / hei));\n }\n } else {\n maxWidth = wid;\n maxHeight = hei;\n }\n\n // canvas对图片进行缩放\n canvas.width = maxWidth;\n canvas.height = maxHeight;\n context.drawImage(img, 0, 0, maxWidth, maxHeight);\n newUrl = canvas.toDataURL(\"image/jpeg\");\n var str = newUrl.replace(\"data:image/png;base64,\", \"\");\n // 找到等号,把等号也去掉\n var equalIndex = str.indexOf(\"=\");\n if (str.indexOf(\"=\") > 0) {\n str = str.substring(0, equalIndex);\n }\n var strLength = str.length;\n var fileLength = parseInt(strLength - strLength / 8 * 2);\n var size = \"\";\n size = (fileLength / 1024).toFixed(2);\n console.log(size);\n that.$set(that.ruleForm, \"map\", newUrl);\n };\n };\n }\n },\n deleteImgs2: function deleteImgs2(index) {\n console.log(index);\n this.ruleForm.picture.splice(index, 1);\n },\n changeFile2: function changeFile2(options, fileList) {\n // console.log(1111)\n var that = this;\n // 获取文件对象\n var file = options.raw;\n //判断图片类型\n if (file.type == \"image/jpeg\" || file.type == \"image/png\" || file.type == \"image/JPG\") {\n var isJPG = true;\n } else {\n isJPG = false;\n }\n // 判断图片大小\n var isLt2M = file.size / 1024 / 1024 < 2;\n if (!isJPG) {\n this.$message.error(\"上传产品图片只能是 JPG/PNG/JPEG 格式!\");\n }\n if (!isLt2M) {\n this.$message.error(\"上传产品图片大小不能超过 2MB!\");\n }\n // 创建一个HTML5的FileReader对象\n var reader = new FileReader();\n //创建一个img对象\n var img = new Image();\n var filename = options.filename;\n if (file) {\n reader.readAsDataURL(file);\n }\n if (isJPG && isLt2M) {\n reader.onload = function (e) {\n var base64Str = reader.result.split(\",\")[1];\n var newUrl;\n img.src = e.target.result;\n if (file.size / 1024 < 20) {\n that.$set(that.ruleForm.picture, that.ruleForm.picture.length, e.target.result);\n return;\n }\n // base64地址图片加载完毕后执行\n img.onload = function () {\n var _this = this;\n // 缩放图片需要的canvas(也可以在DOM中直接定义canvas标签,这样就能把压缩完的图片不转base64也能直接显示出来)\n var canvas = document.createElement(\"canvas\");\n var context = canvas.getContext(\"2d\");\n var wid = img.width;\n var hei = img.height;\n // 最大尺寸限制\n\n var maxWidth = 400,\n maxHeight = 400;\n if (wid > maxWidth || hei > maxHeight) {\n if (wid / hei > maxWidth / maxHeight) {\n maxHeight = Math.round(maxWidth * (hei / wid));\n } else {\n maxWidth = Math.round(maxHeight * (wid / hei));\n }\n } else {\n maxWidth = wid;\n maxHeight = hei;\n }\n\n // canvas对图片进行缩放\n canvas.width = maxWidth;\n canvas.height = maxHeight;\n context.drawImage(img, 0, 0, maxWidth, maxHeight);\n newUrl = canvas.toDataURL(\"image/jpeg\");\n var str = newUrl.replace(\"data:image/png;base64,\", \"\");\n // 找到等号,把等号也去掉\n var equalIndex = str.indexOf(\"=\");\n if (str.indexOf(\"=\") > 0) {\n str = str.substring(0, equalIndex);\n }\n var strLength = str.length;\n var fileLength = parseInt(strLength - strLength / 8 * 2);\n var size = \"\";\n size = (fileLength / 1024).toFixed(2);\n console.log(size);\n that.$set(that.ruleForm.picture, that.ruleForm.picture.length, newUrl);\n };\n };\n }\n },\n resetForm: function resetForm(formName) {\n this.$refs[formName].resetFields();\n this.$router.push({\n name: \"house\",\n params: {\n index: this.indexCall\n }\n });\n this.$message({\n message: \"取消成功\",\n type: \"success\"\n });\n },\n // 上传图片\n handleAvatarSuccess: function handleAvatarSuccess(res, file) {\n this.picture = file;\n }\n }\n};",null]} |