"use strict"; const common_vendor = require("../../common/vendor.js"); const citySelect = () => "../../components/cityselect/index.js"; const _sfc_main = { components: { citySelect }, data() { return { form: { title: "", //标题 price: "", //价格 house: "", //户型 proportion: "", //面积 address: "", //所属位置 number: "", //编号 perimeter: "", //房屋周边 housesNumber: 1, //房间数量 revamp: 0, //房屋主体是否改造 resettle: 0, //是否经过安置 yardProportion: "", //院子总面积 noise: "", //噪音 net: "", //水电气网 park: "", //停车 deposit: "", //押金 archival: "", //档案查询 tenancy: "", //租期 evaluate: "", //评价 death: "", //非正常死亡 key: "", //钥匙 commission: "", //佣金 procedures: "", //手续 isOwnershipList: "", ownershipList: [], isHouseList: "", houseList: [], remark: "" }, rules: { title: [ { type: "string", required: true, message: "请输入账号", trigger: ["blur", "change"] } ], price: [ { type: "string", required: true, message: "请输入价格", trigger: ["blur", "change"] } ], house: [ { type: "string", required: true, message: "请输入户型", trigger: ["blur", "change"] } ], proportion: [ { type: "string", required: true, message: "请输入面积", trigger: ["blur", "change"] } ], number: [ { type: "string", required: true, message: "请输入编号", trigger: ["blur", "change"] } ], perimeter: [ { type: "string", required: true, message: "请输入房屋周边", trigger: ["blur", "change"] } ], yardProportion: [ { type: "string", required: true, message: "请输入院子总面积", trigger: ["blur", "change"] } ], noise: [ { type: "string", required: true, message: "请输入坟包及电塔工厂噪音", trigger: ["blur", "change"] } ], net: [ { type: "string", required: true, message: "请输入水电气网", trigger: ["blur", "change"] } ], park: [ { type: "string", required: true, message: "请输入停车", trigger: ["blur", "change"] } ], deposit: [ { type: "string", required: true, message: "请输入押金", trigger: ["blur", "change"] } ], archival: [ { type: "string", required: true, message: "请输入天府市民云房屋信息档案查询", trigger: ["blur", "change"] } ], tenancy: [ { type: "string", required: true, message: "请输入租期", trigger: ["blur", "change"] } ], evaluate: [ { type: "string", required: true, message: "请输入邻居对房东的评价", trigger: ["blur", "change"] } ], death: [ { type: "string", required: true, message: "请输入非正常死亡", trigger: ["blur", "change"] } ], key: [ { type: "string", required: true, message: "请输入钥匙", trigger: ["blur", "change"] } ], commission: [ { type: "string", required: true, message: "请输入佣金", trigger: ["blur", "change"] } ], procedures: [ { type: "string", required: true, message: "请输入报建手续", trigger: ["blur", "change"] } ] } }; }, watch: { "form.ownershipList"(newValue, oldValue) { if (newValue.length > 0) { this.form.isOwnershipList = "有"; } else { this.form.isOwnershipList = ""; } }, "form.houseList"(newValue, oldValue) { if (newValue.length > 0) { this.form.isHouseList = "有"; } else { this.form.isHouseList = ""; } } }, onReady() { this.$refs.form.setRules(this.rules); }, methods: { deleteHousePic(event) { this.form.houseList.splice(event.index, 1); }, async afterHouseRead(e) { let self = this; e.file.forEach((file) => { self.$Oss.ossUpload(file.url).then((url) => { self.form.houseList.push({ url }); }); }); }, deleteOwnershipPic(event) { this.form.ownershipList.splice(event.index, 1); }, async afterOwnershipRead(e) { let self = this; e.file.forEach((file) => { self.$Oss.ossUpload(file.url).then((url) => { self.form.ownershipList.push({ url }); }); }); }, handleAreaChange() { this.$refs.citySelectRef.open(); }, handleCityChange(e) { this.form.address = e.province.label + "-" + e.city.label + "-" + e.area.label; }, submit() { this.$refs.form.validate().then((res) => { common_vendor.index.showToast({ icon: "none", title: "校验通过" }); }).catch((errors) => { common_vendor.index.showToast({ icon: "none", title: "校验失败" }); }); } } }; if (!Array) { const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input"); const _easycom_uv_form_item2 = common_vendor.resolveComponent("uv-form-item"); const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon"); const _easycom_uv_number_box2 = common_vendor.resolveComponent("uv-number-box"); const _easycom_uv_radio2 = common_vendor.resolveComponent("uv-radio"); const _easycom_uv_radio_group2 = common_vendor.resolveComponent("uv-radio-group"); const _easycom_uv_upload2 = common_vendor.resolveComponent("uv-upload"); const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button"); const _easycom_uv_form2 = common_vendor.resolveComponent("uv-form"); const _component_citySelect = common_vendor.resolveComponent("citySelect"); (_easycom_uv_input2 + _easycom_uv_form_item2 + _easycom_uv_icon2 + _easycom_uv_number_box2 + _easycom_uv_radio2 + _easycom_uv_radio_group2 + _easycom_uv_upload2 + _easycom_uv_button2 + _easycom_uv_form2 + _component_citySelect)(); } const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js"; const _easycom_uv_form_item = () => "../../uni_modules/uv-form/components/uv-form-item/uv-form-item.js"; const _easycom_uv_icon = () => "../../uni_modules/uv-icon/components/uv-icon/uv-icon.js"; const _easycom_uv_number_box = () => "../../uni_modules/uv-number-box/components/uv-number-box/uv-number-box.js"; const _easycom_uv_radio = () => "../../uni_modules/uv-radio/components/uv-radio/uv-radio.js"; const _easycom_uv_radio_group = () => "../../uni_modules/uv-radio/components/uv-radio-group/uv-radio-group.js"; const _easycom_uv_upload = () => "../../uni_modules/uv-upload/components/uv-upload/uv-upload.js"; const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js"; const _easycom_uv_form = () => "../../uni_modules/uv-form/components/uv-form/uv-form.js"; if (!Math) { (_easycom_uv_input + _easycom_uv_form_item + _easycom_uv_icon + _easycom_uv_number_box + _easycom_uv_radio + _easycom_uv_radio_group + _easycom_uv_upload + _easycom_uv_button + _easycom_uv_form)(); } function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: common_vendor.o(($event) => $data.form.title = $event), b: common_vendor.p({ type: "text", placeholder: "请输入标题", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.title }), c: common_vendor.p({ label: "标题", prop: "title" }), d: common_vendor.o(($event) => $data.form.price = $event), e: common_vendor.p({ type: "text", placeholder: "请输入价格", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.price }), f: common_vendor.p({ label: "价格", prop: "price" }), g: common_vendor.o(($event) => $data.form.house = $event), h: common_vendor.p({ type: "text", placeholder: "请输入户型", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.house }), i: common_vendor.p({ label: "户型", prop: "house" }), j: common_vendor.o(($event) => $data.form.proportion = $event), k: common_vendor.p({ type: "text", placeholder: "请输入面积", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.proportion }), l: common_vendor.p({ label: "面积", prop: "proportion" }), m: common_vendor.o(($event) => $options.handleAreaChange()), n: common_vendor.o(($event) => $data.form.address = $event), o: common_vendor.p({ disabled: true, disabledColor: "#ffffff", placeholder: "所属位置", border: "none", modelValue: $data.form.address }), p: common_vendor.p({ name: "arrow-right" }), q: common_vendor.o(($event) => $options.handleAreaChange()), r: common_vendor.p({ label: "所属位置", prop: "address" }), s: common_vendor.o(($event) => $data.form.number = $event), t: common_vendor.p({ type: "text", placeholder: "请输入编号", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.number }), v: common_vendor.p({ label: "编号", prop: "number" }), w: common_vendor.o(($event) => $data.form.perimeter = $event), x: common_vendor.p({ type: "text", placeholder: "请输入房屋周边", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.perimeter }), y: common_vendor.p({ label: "房屋周边", prop: "perimeter" }), z: common_vendor.o(($event) => $data.form.housesNumber = $event), A: common_vendor.p({ min: 1, max: 10, modelValue: $data.form.housesNumber }), B: common_vendor.p({ label: "房间数量", prop: "housesNumber" }), C: common_vendor.p({ name: "1", label: "是" }), D: common_vendor.p({ name: "0", customStyle: "margin-left:30rpx;", label: "否" }), E: common_vendor.o(($event) => $data.form.revamp = $event), F: common_vendor.p({ placement: "row", modelValue: $data.form.revamp }), G: common_vendor.p({ label: "房屋主体是否改造", labelWidth: "200", prop: "revamp" }), H: common_vendor.p({ name: "1", label: "是" }), I: common_vendor.p({ name: "0", customStyle: "margin-left:30rpx;", label: "否" }), J: common_vendor.o(($event) => $data.form.resettle = $event), K: common_vendor.p({ placement: "row", modelValue: $data.form.resettle }), L: common_vendor.p({ label: "是否经过安置", labelWidth: "200", prop: "resettle" }), M: common_vendor.o(($event) => $data.form.yardProportion = $event), N: common_vendor.p({ type: "text", placeholder: "请输入院子总面积", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.yardProportion }), O: common_vendor.p({ label: "院子总面积", labelWidth: "100", prop: "yardProportion" }), P: common_vendor.o(($event) => $data.form.noise = $event), Q: common_vendor.p({ type: "text", placeholder: "请输入坟包及电塔工厂噪音", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.noise }), R: common_vendor.p({ label: "坟包及电塔工厂噪音", labelWidth: "150", prop: "noise" }), S: common_vendor.o(($event) => $data.form.net = $event), T: common_vendor.p({ type: "text", placeholder: "请输入水电气网", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.net }), U: common_vendor.p({ label: "水电气网", prop: "net" }), V: common_vendor.o(($event) => $data.form.park = $event), W: common_vendor.p({ type: "text", placeholder: "请输入停车", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.park }), X: common_vendor.p({ label: "停车", prop: "park" }), Y: common_vendor.o(($event) => $data.form.deposit = $event), Z: common_vendor.p({ type: "text", placeholder: "请输入押金", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.deposit }), aa: common_vendor.p({ label: "付款方式及押金", labelWidth: "120", prop: "deposit" }), ab: common_vendor.o(($event) => $data.form.archival = $event), ac: common_vendor.p({ type: "text", placeholder: "请输入天府市民云房屋信息档案查询", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.archival }), ad: common_vendor.p({ label: "天府市民云房屋信息档案查询", labelWidth: "100", prop: "archival", labelPosition: "top" }), ae: common_vendor.o(($event) => $data.form.tenancy = $event), af: common_vendor.p({ type: "text", placeholder: "请输入租期", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.tenancy }), ag: common_vendor.p({ label: "租期", prop: "tenancy" }), ah: common_vendor.o(($event) => $data.form.evaluate = $event), ai: common_vendor.p({ type: "text", placeholder: "请输入邻居对房东的评价", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.evaluate }), aj: common_vendor.p({ label: "邻居对房东的评价", labelWidth: "120", prop: "evaluate" }), ak: common_vendor.o(($event) => $data.form.death = $event), al: common_vendor.p({ type: "text", placeholder: "请输入非正常死亡", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.death }), am: common_vendor.p({ label: "非正常死亡", labelWidth: "80", prop: "death" }), an: common_vendor.o(($event) => $data.form.key = $event), ao: common_vendor.p({ type: "text", placeholder: "请输入钥匙", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.key }), ap: common_vendor.p({ label: "钥匙", prop: "key" }), aq: common_vendor.o(($event) => $data.form.commission = $event), ar: common_vendor.p({ type: "text", placeholder: "请输入佣金", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.commission }), as: common_vendor.p({ label: "佣金", prop: "commission" }), at: common_vendor.o(($event) => $data.form.procedures = $event), av: common_vendor.p({ type: "text", placeholder: "请输入报建手续", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.procedures }), aw: common_vendor.p({ label: "报建手续", prop: "procedures" }), ax: common_vendor.o($options.afterOwnershipRead), ay: common_vendor.o($options.deleteOwnershipPic), az: common_vendor.p({ customStyle: "margin-top:20rpx;", fileList: $data.form.ownershipList, name: "1", multiple: true, maxCount: 10 }), aA: common_vendor.p({ label: "产权证照片", labelWidth: "250", prop: "isOwnershipList", labelPosition: "top" }), aB: common_vendor.o($options.afterHouseRead), aC: common_vendor.o($options.deleteHousePic), aD: common_vendor.p({ customStyle: "margin-top:20rpx;", fileList: $data.form.houseList, name: "1", multiple: true, maxCount: 10 }), aE: common_vendor.p({ label: "房屋照片/视频", labelWidth: "250", prop: "isHouseList", labelPosition: "top" }), aF: common_vendor.o(($event) => $data.form.remark = $event), aG: common_vendor.p({ type: "text", placeholder: "请输入备注", customStyle: "border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;", modelValue: $data.form.remark }), aH: common_vendor.p({ label: "备注", prop: "remark", labelPosition: "top" }), aI: common_vendor.o($options.submit), aJ: common_vendor.p({ type: "primary", text: "确认发布", customStyle: "margin-top: 30px;background-color: #1EC77A;border-radius: 30px;" }), aK: common_vendor.sr("form", "75a279ac-0"), aL: common_vendor.p({ labelPosition: "left", model: $data.form, rules: $data.rules, labelWidth: "60", labelStyle: "font-size:26rpx;" }), aM: common_vendor.sr("citySelectRef", "75a279ac-58"), aN: common_vendor.o($options.handleCityChange), aO: common_vendor.p({ zIndex: 0 }) }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); wx.createPage(MiniProgramPage);