mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 05:39:36 +08:00
Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
7c9c4feb25
@ -16,22 +16,77 @@
|
|||||||
<a-input v-decorator="['version']" />
|
<a-input v-decorator="['version']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<!-- 一行 -->
|
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='所属建筑'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='所属地区'>
|
||||||
<a-input placeholder='所属建筑' v-decorator="['build']" disabled='disabled' defaultValue='创智大厦' />
|
<a-select v-decorator="['tenantId', {rules: [{ required: true, message: '请选择所属地区' }]}]"
|
||||||
|
@change='selectTenant'
|
||||||
|
:disabled='tenantEnable'>
|
||||||
|
<a-select-option v-for='item in tenantList' :key='item.id'>{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span='10'>
|
||||||
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='所属园区'>
|
||||||
|
<a-select v-decorator="['parkId', {rules: [{ required: true, message: '请选择所属园区' }]}]"
|
||||||
|
@change='selectPark'
|
||||||
|
:disabled='parkEnable'>
|
||||||
|
<a-select-option v-for='item in parkList' :key='item.id'>{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
<a-row>
|
||||||
|
<a-col :span='10'>
|
||||||
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='所属楼宇'>
|
||||||
|
<a-select v-decorator="['buildingId', {rules: [{ required: true, message: '请选择所属楼宇' }]}]"
|
||||||
|
@change='selectBuilding'>
|
||||||
|
<a-select-option v-for='item in buildingList' :key='item.id'>{{ item.buildingName }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span='10'>
|
||||||
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='所属楼层'>
|
||||||
|
<a-select v-decorator="['buildId',{rules: [{ required: true, message: '请选择所属楼层' }]}]"
|
||||||
|
placeholder='所属楼层'
|
||||||
|
@change='selectBuildingDetail'>
|
||||||
|
<a-select-option v-for='item in buildingDetailList' :key='item.id' :value='item.id'>
|
||||||
|
{{ item.floorName }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
<a-row>
|
||||||
|
<a-col :span='10'>
|
||||||
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='所属房间'>
|
||||||
|
<a-select v-decorator="['roomId',{rules: [{ required: true, message: '选择所属房间' }]}]"
|
||||||
|
placeholder='所属房间'
|
||||||
|
@change='selectRoom'>
|
||||||
|
<a-select-option v-for='item in roomList' :key='item.id' :value='item.id'>
|
||||||
|
{{ item.name }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span='10'>
|
||||||
|
<a-form-item label='会议室面积' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
||||||
|
<a-input placeholder='会议室面积'
|
||||||
|
v-decorator="['area',{rules: [{ required: true, message: '请输入会议室面积' }]}]"
|
||||||
|
disabled='disabled' />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item label='会议室名称' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
<a-form-item label='会议室名称' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
||||||
<a-input placeholder='会议室名称'
|
<a-input placeholder='会议室名称'
|
||||||
v-decorator="['meetingName',{rules: [{ required: true, message: '输入会议室名称' }]}]" />
|
v-decorator="['meetingName',{rules: [{ required: true, message: '输入会议室名称' }]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
|
||||||
|
|
||||||
<a-row>
|
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item label='会议室类型' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
<a-form-item label='会议室类型' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
||||||
<a-select v-decorator="['type',{rules: [{ required: true, message: '输入会议室类型' }]}]"
|
<a-select v-decorator="['type',{rules: [{ required: true, message: '输入会议室类型' }]}]"
|
||||||
@ -60,35 +115,6 @@
|
|||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='10'>
|
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='所属楼层'>
|
|
||||||
<a-select v-decorator="['buildId',{rules: [{ required: true, message: '请选择所属楼层' }]}]"
|
|
||||||
placeholder='所属楼层' @change='getRoomList'>
|
|
||||||
<a-select-option v-for='item in floorList' :key='item.id' :value='item.id'>
|
|
||||||
{{ item.floorName }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row>
|
|
||||||
<a-col :span='10'>
|
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='所属房间'>
|
|
||||||
<a-select v-decorator="['roomId',{rules: [{ required: true, message: '选择所属房间' }]}]"
|
|
||||||
placeholder='所属房间' @change='getArea'>
|
|
||||||
<a-select-option v-for='item in roomList' :key='item.id' :value='item.id'>
|
|
||||||
{{ item.name }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span='10'>
|
|
||||||
<a-form-item label='会议室面积' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
|
||||||
<a-input placeholder='会议室面积'
|
|
||||||
v-decorator="['area',{rules: [{ required: true, message: '请输入会议室面积' }]}]"
|
|
||||||
disabled='disabled' />
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
@ -127,25 +153,36 @@
|
|||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='负责人'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='负责人'>
|
||||||
<a-input placeholder='负责人'
|
<a-input placeholder='负责人'
|
||||||
v-decorator="['headName',{rules: [{ required: true, message: '输入负责人' }]}]" />
|
v-decorator="['headName',{rules: [{ required: true, message: '输入负责人' }]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
|
||||||
<a-row>
|
|
||||||
|
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item label='负责人联系方式' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
<a-form-item label='负责人联系方式' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
||||||
<a-input placeholder='负责人联系方式'
|
<a-input placeholder='负责人联系方式'
|
||||||
v-decorator="['headPhone',{rules: [{ required: true, message: '输入负责人联系方式'}]}]" />
|
v-decorator="['headPhone',{rules: [{ required: true, message: '输入负责人联系方式'}]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='上班时间'>
|
<a-form-item label='预约开始时间' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
||||||
<a-time-picker v-decorator="['startTime',{rules: [{ required: true, message: '输入启用时间'}]}]"
|
<a-time-picker v-decorator="['startTime',{rules: [{ required: true, message: '请选择预约开始时间'}]}]"
|
||||||
format='HH:mm:ss'
|
format='HH:mm'
|
||||||
|
valueFormat='YYYY-MM-DD HH:mm:ss'
|
||||||
|
placeholder='选择时间'
|
||||||
|
:show-time="{ defaultValue: moment('00:00:00', 'HH:mm:ss') }"
|
||||||
|
style='width: 100%;' />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span='10'>
|
||||||
|
<a-form-item label='预约结束时间' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
||||||
|
<a-time-picker v-decorator="['endDate',{rules: [{ required: true, message: '请选择预约结束时间'}]}]"
|
||||||
|
format='HH:mm'
|
||||||
valueFormat='YYYY-MM-DD HH:mm:ss'
|
valueFormat='YYYY-MM-DD HH:mm:ss'
|
||||||
placeholder='选择时间'
|
placeholder='选择时间'
|
||||||
:show-time="{ defaultValue: moment('00:00:00', 'HH:mm:ss') }"
|
:show-time="{ defaultValue: moment('00:00:00', 'HH:mm:ss') }"
|
||||||
@ -153,17 +190,8 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
|
||||||
<a-form-item label='下班时间' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
|
||||||
<a-time-picker v-decorator="['endDate',{rules: [{ required: true, message: '输入启用时间'}]}]"
|
|
||||||
format='HH:mm:ss'
|
|
||||||
valueFormat='YYYY-MM-DD HH:mm:ss'
|
|
||||||
placeholder='选择时间'
|
|
||||||
:show-time="{ defaultValue: moment('00:00:00', 'HH:mm:ss') }"
|
|
||||||
style='width: 100%;' />
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item label='是否使用优惠劵' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
<a-form-item label='是否使用优惠劵' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
||||||
<a-select v-decorator="['isTicket',{rules: [{ required: true, message: '请选择优惠券'}]}]"
|
<a-select v-decorator="['isTicket',{rules: [{ required: true, message: '请选择优惠券'}]}]"
|
||||||
@ -178,6 +206,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='是否收费'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='是否收费'>
|
||||||
@ -262,15 +291,18 @@
|
|||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
saveRoomContent,
|
saveRoomContent,
|
||||||
getFloorList,
|
|
||||||
getRoomListByFloorId,
|
getRoomListByFloorId,
|
||||||
selectRoomById,
|
selectRoomById
|
||||||
get
|
|
||||||
} from '@/api/admin/meeting/roomContent'
|
} from '@/api/admin/meeting/roomContent'
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import storage from 'store'
|
import storage from 'store'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
import { getInfo } from '@/api/login'
|
||||||
|
import { getTenantList } from '@/api/tenant'
|
||||||
|
import { getParkList } from '@/api/admin/park'
|
||||||
|
import { getBuildingList } from '@/api/admin/building'
|
||||||
|
import { getBuildingDetailList } from '@/api/admin/buildingDetail'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RoomContentModal',
|
name: 'RoomContentModal',
|
||||||
@ -289,9 +321,6 @@ export default {
|
|||||||
Authorization: 'Bearer ' + storage.get(ACCESS_TOKEN)
|
Authorization: 'Bearer ' + storage.get(ACCESS_TOKEN)
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
floorList: [],
|
|
||||||
|
|
||||||
roomList: [],
|
|
||||||
wrapperCol: {
|
wrapperCol: {
|
||||||
xs: { span: 35 },
|
xs: { span: 35 },
|
||||||
sm: { span: 16 }
|
sm: { span: 16 }
|
||||||
@ -299,49 +328,173 @@ export default {
|
|||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
mdl: {},
|
mdl: {},
|
||||||
typeData: [],
|
typeData: [],
|
||||||
form: this.$form.createForm(this)
|
form: this.$form.createForm(this),
|
||||||
|
userDetail: {},
|
||||||
|
tenantList: [], // 地区
|
||||||
|
parkList: [], // 园区
|
||||||
|
buildingList: [], // 楼宇
|
||||||
|
buildingDetailList: [], // 楼层
|
||||||
|
floorList: [],
|
||||||
|
roomList: [],
|
||||||
|
tenantEnable: false,
|
||||||
|
parkEnable: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getFloorList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectChangeIsToll(value) {
|
// 获取用户详细信息
|
||||||
this.mdl.isToll = value
|
getUserDetail() {
|
||||||
|
getInfo().then(res => {
|
||||||
|
console.log('getUserDetail', res)
|
||||||
|
this.userDetail = res
|
||||||
|
// 园区:5
|
||||||
|
if (this.userDetail.roleIds && this.userDetail.roleIds.length > 0 && this.userDetail.roleIds[0] == 5) {
|
||||||
|
//
|
||||||
|
// 判断:是新增就查询园区
|
||||||
|
let { id } = this.mdl
|
||||||
|
if (!id) {
|
||||||
|
// 选择地区 -> 查询园区
|
||||||
|
this.selectTenant(this.userDetail.tenantId)
|
||||||
|
// 选择园区 -> 查询楼宇
|
||||||
|
this.selectPark(this.userDetail.parkId)
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// 不可编辑
|
||||||
|
this.tenantEnable = true
|
||||||
|
this.parkEnable = true
|
||||||
|
// 关联地区和园区
|
||||||
|
this.mdl.parkId = this.userDetail.parkId
|
||||||
|
this.mdl.tenantId = this.userDetail.tenantId
|
||||||
|
this.form.setFieldsValue({
|
||||||
|
parkId: this.mdl.parkId,
|
||||||
|
tenantId: this.mdl.tenantId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
// 查询地区
|
||||||
|
getTenantData() {
|
||||||
|
getTenantList().then(res => {
|
||||||
|
this.tenantList = res.rows
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 选择地区 -> 查询园区
|
||||||
|
selectTenant(id) {
|
||||||
|
console.log('selectTenant', id)
|
||||||
|
// 清空数据
|
||||||
|
this.mdl.parkId = null // 园区
|
||||||
|
this.mdl.buildingId = null // 楼宇
|
||||||
|
this.mdl.buildId = null // 楼层
|
||||||
|
this.mdl.roomId = null // 所属房间
|
||||||
|
this.mdl.area = null // 会议室面积
|
||||||
|
|
||||||
moment,
|
this.form.setFieldsValue({
|
||||||
// 获取面积
|
parkId: null, // 园区
|
||||||
getArea(value) {
|
buildingId: null, // 楼宇
|
||||||
let param = {
|
buildId: null, // 楼层
|
||||||
'id': value
|
roomId: null, // 所属房间
|
||||||
}
|
area: null // 会议室面积
|
||||||
selectRoomById(param).then((res) => {
|
})
|
||||||
|
// 查询园区
|
||||||
|
getParkList({
|
||||||
|
tenantId: id
|
||||||
|
}).then(res => {
|
||||||
|
this.parkList = res.rows
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 选择园区 -> 查询楼宇
|
||||||
|
selectPark(id) {
|
||||||
|
// 清空数据
|
||||||
|
this.mdl.buildingId = null // 楼宇
|
||||||
|
this.mdl.buildId = null // 楼层
|
||||||
|
this.mdl.roomId = null // 所属房间
|
||||||
|
this.mdl.area = null // 会议室面积
|
||||||
|
|
||||||
|
this.form.setFieldsValue({
|
||||||
|
buildingId: null, // 楼宇
|
||||||
|
buildId: null, // 楼层
|
||||||
|
roomId: null, // 所属房间
|
||||||
|
area: null // 会议室面积
|
||||||
|
})
|
||||||
|
// 查询楼宇
|
||||||
|
getBuildingList({
|
||||||
|
parkId: id
|
||||||
|
}).then(res => {
|
||||||
|
this.buildingList = res.rows
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 选择楼宇 -> 查询楼层
|
||||||
|
selectBuilding(id) {
|
||||||
|
// 清空数据
|
||||||
|
this.mdl.buildId = null // 楼层
|
||||||
|
this.mdl.roomId = null // 所属房间
|
||||||
|
this.mdl.area = null // 会议室面积
|
||||||
|
|
||||||
|
this.form.setFieldsValue({
|
||||||
|
buildId: null, // 楼层
|
||||||
|
roomId: null, // 所属房间
|
||||||
|
area: null // 会议室面积
|
||||||
|
})
|
||||||
|
// 查询楼层
|
||||||
|
getBuildingDetailList({
|
||||||
|
buildingId: id
|
||||||
|
}).then(res => {
|
||||||
|
this.buildingDetailList = res.rows
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 选择楼层 -> 查询房间
|
||||||
|
selectBuildingDetail(buildingDetailId) {
|
||||||
|
// 查询房间
|
||||||
|
this.getRoomListByFloorIdMethod(buildingDetailId)
|
||||||
|
},
|
||||||
|
// 查询房间
|
||||||
|
getRoomListByFloorIdMethod(buildingDetailId, id) {
|
||||||
|
// 清空数据
|
||||||
|
this.mdl.roomId = null // 所属房间
|
||||||
|
this.mdl.area = null // 会议室面积
|
||||||
|
|
||||||
|
this.form.setFieldsValue({
|
||||||
|
roomId: null, // 所属房间
|
||||||
|
area: null // 会议室面积
|
||||||
|
})
|
||||||
|
// 查询房间
|
||||||
|
getRoomListByFloorId({
|
||||||
|
'id': id,
|
||||||
|
'buildingDetailId': buildingDetailId,
|
||||||
|
'type': 0
|
||||||
|
}).then((res) => {
|
||||||
|
this.roomList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 选择房间 -> 查询面积
|
||||||
|
selectRoom(id) {
|
||||||
|
// 清空数据
|
||||||
|
this.mdl.area = null // 会议室面积
|
||||||
|
|
||||||
|
this.form.setFieldsValue({
|
||||||
|
area: null // 会议室面积
|
||||||
|
})
|
||||||
|
// 查询面积
|
||||||
|
selectRoomById({
|
||||||
|
'id': id
|
||||||
|
}).then((res) => {
|
||||||
this.form.setFieldsValue({
|
this.form.setFieldsValue({
|
||||||
area: res.data.area
|
area: res.data.area
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getFloorList() {
|
//
|
||||||
getFloorList().then((res) => {
|
selectChangeIsToll(value) {
|
||||||
this.floorList = res.data
|
this.mdl.isToll = value
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getRoomList(value) {
|
moment,
|
||||||
let param = {
|
//
|
||||||
'buildingDetailId': value,
|
|
||||||
'type': 0
|
|
||||||
}
|
|
||||||
getRoomListByFloorId(param).then((res) => {
|
|
||||||
this.roomList = res.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
|
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
|
||||||
if (!isJpgOrPng) {
|
if (!isJpgOrPng) {
|
||||||
@ -380,30 +533,47 @@ export default {
|
|||||||
this.edit({ id: 0 })
|
this.edit({ id: 0 })
|
||||||
},
|
},
|
||||||
edit(record) {
|
edit(record) {
|
||||||
if (record.id != 0) {
|
this.mdl = Object.assign(this.mdl, record)
|
||||||
get(record.id).then((res) => {
|
let copyMdl = JSON.parse(JSON.stringify(this.mdl))
|
||||||
})
|
// 查询地区
|
||||||
|
this.getTenantData()
|
||||||
|
//
|
||||||
|
if (record.id != 0) { // 编辑
|
||||||
|
// 选择地区 -> 查询园区
|
||||||
|
if (copyMdl.tenantId) {
|
||||||
|
this.mdl = JSON.parse(JSON.stringify(copyMdl))
|
||||||
|
this.selectTenant(copyMdl.tenantId)
|
||||||
|
}
|
||||||
|
// 选择园区 -> 查询楼宇
|
||||||
|
if (copyMdl.parkId) {
|
||||||
|
this.mdl = JSON.parse(JSON.stringify(copyMdl))
|
||||||
|
this.selectPark(copyMdl.parkId)
|
||||||
|
}
|
||||||
|
// 选择楼宇 -> 查询楼层
|
||||||
|
if (copyMdl.buildingId) {
|
||||||
|
this.mdl = JSON.parse(JSON.stringify(copyMdl))
|
||||||
|
this.selectBuilding(copyMdl.buildingId)
|
||||||
|
}
|
||||||
|
// 选择楼层 -> 查询房间
|
||||||
|
if (copyMdl.buildId) {
|
||||||
|
this.mdl = JSON.parse(JSON.stringify(copyMdl))
|
||||||
|
this.getRoomListByFloorIdMethod(copyMdl.buildId, copyMdl.roomId)
|
||||||
|
}
|
||||||
|
// 防止替换
|
||||||
|
this.mdl = JSON.parse(JSON.stringify(copyMdl))
|
||||||
|
|
||||||
|
} else { // 新增
|
||||||
|
|
||||||
}
|
}
|
||||||
this.mdl = Object.assign(record)
|
// 获取用户信息
|
||||||
|
this.getUserDetail()
|
||||||
|
//
|
||||||
if (this.mdl.indoorPicUrl) {
|
if (this.mdl.indoorPicUrl) {
|
||||||
this.imageUrl = process.env.VUE_APP_API_BASE_URL + this.mdl.indoorPicUrl
|
this.imageUrl = process.env.VUE_APP_API_BASE_URL + this.mdl.indoorPicUrl
|
||||||
} else {
|
} else {
|
||||||
this.imageUrl = ''
|
this.imageUrl = ''
|
||||||
}
|
}
|
||||||
if (this.mdl.roomId) {
|
//
|
||||||
this.roomList.push({
|
|
||||||
id: this.mdl.roomId,
|
|
||||||
name: this.mdl.roomName
|
|
||||||
})
|
|
||||||
}
|
|
||||||
getRoomListByFloorId({
|
|
||||||
'buildingDetailId': this.mdl.buildId,
|
|
||||||
'type': 0
|
|
||||||
|
|
||||||
}).then((res) => {
|
|
||||||
this.roomList = res.data
|
|
||||||
})
|
|
||||||
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(
|
this.form.setFieldsValue(
|
||||||
@ -419,10 +589,8 @@ export default {
|
|||||||
'endDate',
|
'endDate',
|
||||||
'money',
|
'money',
|
||||||
'isShow',
|
'isShow',
|
||||||
'roomId',
|
|
||||||
'shape',
|
'shape',
|
||||||
'area',
|
'area',
|
||||||
'buildId',
|
|
||||||
'address',
|
'address',
|
||||||
'headName',
|
'headName',
|
||||||
'headPhone',
|
'headPhone',
|
||||||
@ -431,7 +599,12 @@ export default {
|
|||||||
'money',
|
'money',
|
||||||
'remake',
|
'remake',
|
||||||
'duration',
|
'duration',
|
||||||
'content'
|
'content',
|
||||||
|
'tenantId',
|
||||||
|
'parkId',
|
||||||
|
'buildingId',
|
||||||
|
'buildId',
|
||||||
|
'roomId'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user