|
@@ -0,0 +1,379 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-form ref="houseForm" :model="houseForm" style="width: 100%;padding: 5px">
|
|
|
+ <el-row>
|
|
|
+ <el-col style="padding-bottom: 10px">
|
|
|
+ <el-card shadow="always" style="padding-top: 10px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span><span class="red-asterisk">*</span>父级</span></el-col>
|
|
|
+ <el-col :span="21" class="col-input">
|
|
|
+ <el-form-item prop="findids">
|
|
|
+ <el-cascader
|
|
|
+ v-model="houseForm.findids"
|
|
|
+ :append-to-body="false"
|
|
|
+ :disabled="isView"
|
|
|
+ style="width: 100%;"
|
|
|
+ :options="options"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span><span class="red-asterisk">*</span>户室号</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item prop="roomNo">
|
|
|
+ <el-input v-model="houseForm.roomNo" :disabled="isView" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="col-txt"><span><span class="red-asterisk">*</span>所在层</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item prop="floor">
|
|
|
+ <el-input v-model="houseForm.floor" :disabled="isView" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span>预测套内面积(㎡)</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="houseForm.predictionInternalArea" :disabled="isView" type="number" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="3" class="col-txt"><span>预测分摊面积(㎡)</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="houseForm.predictionShareArea" :disabled="isView" type="number" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span>预测建筑面积(㎡)</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="houseForm.predictionBuildArea" :disabled="isView" type="number" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="col-txt"><span>预测土地面积(㎡)</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="houseForm.predictionLandArea" :disabled="isView" type="number" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span><span class="red-asterisk">*</span>实测套内面积(㎡)</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item prop="actualInternalArea">
|
|
|
+ <el-input v-model="houseForm.actualInternalArea" :disabled="isView" type="number" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="col-txt"><span><span class="red-asterisk">*</span>实测分摊面积(㎡)</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item prop="actualShareArea">
|
|
|
+ <el-input v-model="houseForm.actualShareArea" :disabled="isView" type="number" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span><span class="red-asterisk">*</span>实测建筑面积(㎡)</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item prop="actualBuildArea">
|
|
|
+ <el-input v-model="houseForm.actualBuildArea" :disabled="isView" type="number" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="col-txt"><span>实测土地面积(㎡)</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="houseForm.actualLandArea" :disabled="isView" type="number" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span><span class="red-asterisk">*</span>用途:</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item prop="roomUse">
|
|
|
+ <el-select
|
|
|
+ v-model="houseForm.roomUse"
|
|
|
+ placeholder=""
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ :disabled="isView"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dc_data.HOUSE_USAGE"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="col-txt"><span>房屋代码</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="houseForm.roomNumber" :disabled="isView" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span>装修情况:</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-select
|
|
|
+ v-model="houseForm.decorationSituation"
|
|
|
+ placeholder=""
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ :disabled="isView"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dc_data.DECORATION_SITUATION"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="col-txt"><span>2.2米以上面积</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="houseForm.twoPointTwo" :disabled="isView" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span>户型</span></el-col>
|
|
|
+ <el-col :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-select
|
|
|
+ v-model="houseForm.houseTypeId"
|
|
|
+ placeholder=""
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in houseTypeOption"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span>户型图:</span></el-col>
|
|
|
+ <el-col v-if="fileList.length>0" :span="20" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-upload
|
|
|
+ ref="upload"
|
|
|
+ action
|
|
|
+ accept="image/png,image/gif,image/jpg,image/jpeg"
|
|
|
+ list-type="picture-card"
|
|
|
+ :file-list="fileList"
|
|
|
+ :limit="9"
|
|
|
+ :http-request="uploadHouseTypePicture"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <!-- <i class="el-icon-plus" />-->
|
|
|
+ <div slot="tip" class="el-upload__tip">
|
|
|
+ 只能上传jpg/png文件,限制上传9张
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col v-else :span="9" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <span>未上传</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span>备注:</span></el-col>
|
|
|
+ <el-col :span="21" class="col-input">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="houseForm.remark" type="textarea" maxlength="2000" show-word-limit :disabled="isView" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3" class="col-txt"><span><span><span class="red-asterisk">*</span>可售状态:</span></span></el-col>
|
|
|
+ <el-col :span="21" class="col-input">
|
|
|
+ <el-form-item prop="saleStatus">
|
|
|
+ <el-select
|
|
|
+ v-model="houseForm.saleStatus"
|
|
|
+ placeholder="请选择"
|
|
|
+ :disabled="isView"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dc_data.SALE_STATUS"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import Base from '@/views/base/base'
|
|
|
+import BaseData from '@/views/base/baseData'
|
|
|
+import { upload } from '@/static/utils/channel'
|
|
|
+import constant from '@/static/utils/constant'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'ParkRoomIndexEdit',
|
|
|
+ mixins: [Base, BaseData],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ houseForm: {},
|
|
|
+ dc_key: ['HOUSE_USAGE', 'DECORATION_SITUATION', 'SALE_STATUS', 'SOLD_STATUS'],
|
|
|
+ isView: true,
|
|
|
+ options: [],
|
|
|
+ fileList: [],
|
|
|
+ // 图片预览及其他
|
|
|
+ dialogImageUrl: '',
|
|
|
+ dialogImageVisible: false,
|
|
|
+ houseTypeOption: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initData(data) {
|
|
|
+ this.houseForm.id = data
|
|
|
+ this.getTreeSelectData()
|
|
|
+ this.initDict(this.dc_key).then(res => {
|
|
|
+ this.getById()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getById() {
|
|
|
+ const _this = this
|
|
|
+ if (_this.houseForm.id) {
|
|
|
+ const postData = {
|
|
|
+ id: _this.houseForm.id
|
|
|
+ }
|
|
|
+ this.baseRequest('getById', postData)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ _this.houseForm = Object.assign({}, _this.houseForm, res.data)
|
|
|
+ if (res.data.roomUse) {
|
|
|
+ _this.houseForm.roomUse = res.data.roomUse + ''
|
|
|
+ }
|
|
|
+ if (res.data.decorationSituation) {
|
|
|
+ _this.houseForm.decorationSituation = res.data.decorationSituation + ''
|
|
|
+ }
|
|
|
+ if (res.data.houseTypeId) {
|
|
|
+ _this.houseForm.houseTypeId = res.data.houseTypeId + ''
|
|
|
+ }
|
|
|
+ if (res.data.saleStatus) {
|
|
|
+ _this.houseForm.saleStatus = res.data.saleStatus + ''
|
|
|
+ }
|
|
|
+
|
|
|
+ // 回显户型
|
|
|
+ _this.houseTypeOption = []
|
|
|
+ _this.baseHouseTypeRequest('listAll', { discId: _this.houseForm.discId }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ res.data.forEach(item => {
|
|
|
+ _this.houseTypeOption.push({
|
|
|
+ label: item.name + ',建筑面积' + item.buildArea + ',使用面积' + item.useArea,
|
|
|
+ value: item.id,
|
|
|
+ files: item.fileList
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // 回显户型图片
|
|
|
+ const obj = _this.houseTypeOption.find(item =>
|
|
|
+ item.value === _this.houseForm.houseTypeId
|
|
|
+ )
|
|
|
+ if (obj !== undefined) {
|
|
|
+ this.fileList = []
|
|
|
+ const files = JSON.parse(obj.files)
|
|
|
+ files.forEach(v => {
|
|
|
+ if (v) {
|
|
|
+ this.fileList.push({
|
|
|
+ url: constant.BASE_URI + '/FileController/download/' + v.data,
|
|
|
+ id: v.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _this.houseForm.houseTypeId = ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 填充父级
|
|
|
+ this.houseForm.findids = []
|
|
|
+ if (undefined != this.houseForm.groupId && this.houseForm.groupId != null &&
|
|
|
+ this.houseForm.groupId != '') {
|
|
|
+ this.houseForm.findids[0] = this.houseForm.groupId
|
|
|
+ if (undefined != this.houseForm.discId && this.houseForm.discId != null &&
|
|
|
+ this.houseForm.discId != '') {
|
|
|
+ this.houseForm.findids[1] = this.houseForm.discId
|
|
|
+ if (undefined != this.houseForm.buildId && this.houseForm.buildId != null &&
|
|
|
+ this.houseForm.buildId != '') {
|
|
|
+ this.houseForm.findids[2] = this.houseForm.buildId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getTreeSelectData: function() {
|
|
|
+ this.baseInfoRequest('getTreeData2', {}).then((res) => {
|
|
|
+ this.options = res.data.data
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 上传相关,包括图片、文件
|
|
|
+ handlePictureCardPreview: function(file) {
|
|
|
+ this.handlePicturePreview(file.url)
|
|
|
+ },
|
|
|
+ handlePicturePreview: function(url) {
|
|
|
+ this.dialogImageUrl = url
|
|
|
+ this.dialogImageVisible = true
|
|
|
+ },
|
|
|
+ uploadHouseTypePicture: function(param) {
|
|
|
+ upload(param, true).then((res) => {
|
|
|
+ this.fileList.push(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleExceed: function() {
|
|
|
+ this.$message.info('超过文件个数限制')
|
|
|
+ },
|
|
|
+ handleRemove: function(item) {
|
|
|
+ const id = item.id
|
|
|
+ const idx = this.fileList.findIndex(item => item.id === id)
|
|
|
+ this.fileList.splice(idx, 1)
|
|
|
+ },
|
|
|
+ baseRequest: function(opUrl, postData) {
|
|
|
+ return this.$channel.baseRequest('ParkRoomController', opUrl, postData, 'User')
|
|
|
+ },
|
|
|
+ baseHouseTypeRequest: function(opUrl, postData) {
|
|
|
+ return this.$channel.baseRequest('HouseTypeController', opUrl, postData, 'Post')
|
|
|
+ },
|
|
|
+ baseInfoRequest: function(opUrl, postData) {
|
|
|
+ return this.$channel.baseRequest('ParkInfoController', opUrl, postData, 'User')
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+
|
|
|
+</style>
|