|
@@ -64,11 +64,13 @@ export default {
|
|
|
{color: '#4da4ee', t: '医院'},
|
|
|
],
|
|
|
cObj: {},
|
|
|
+ estateObj: {},
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
isShow: function(val) {
|
|
|
if (val) {
|
|
|
+ this.estateObj = {}
|
|
|
this.cObj = JSON.parse(JSON.stringify(this.curObj))
|
|
|
this.getDef()
|
|
|
}
|
|
@@ -83,6 +85,13 @@ export default {
|
|
|
params.fillColor = this.fillColor
|
|
|
params.strokeColor = this.strokeColor
|
|
|
}
|
|
|
+ let remoteOptions = []
|
|
|
+ if (str === 'estate') {
|
|
|
+ const oldform = this.$refs.ruleForm.baseForm
|
|
|
+ params = {...oldform}
|
|
|
+ params.text = this.estateObj.estate_name
|
|
|
+ remoteOptions = [{ keyRO: this.estateObj.estate_name, valRO: this.estateObj.id }]
|
|
|
+ }
|
|
|
if (!params.text) params.text = '标题示例'
|
|
|
if (!params.strokeStyle) params.strokeStyle = 'solid'
|
|
|
if (this.mteStr === 'polygonAdd' || this.mteStr === 'polylineAdd') {
|
|
@@ -92,6 +101,10 @@ export default {
|
|
|
params.strokeColor = this.strokeColor
|
|
|
}
|
|
|
this.formData = [
|
|
|
+ { label: '关联楼盘', key: 'estate_id', type: 'selectRemote', changeHandle: this.estateChange,
|
|
|
+ remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
|
|
|
+ remoteOptions
|
|
|
+ },
|
|
|
{ label: '标题', key: 'text', rules: 1},
|
|
|
{ label: '填充色', key: 'fillColor', type: 'colorPicker', rules: 1},
|
|
|
{ label: '透明度', key: 'fillOpacity', rules: 1},
|
|
@@ -109,6 +122,22 @@ export default {
|
|
|
}
|
|
|
this.setDefaultValue(params)
|
|
|
},
|
|
|
+ estateChange (val, op, valObj) {
|
|
|
+ this.estateObj = {
|
|
|
+ id: valObj.id,
|
|
|
+ estate_name: valObj.estate_name,
|
|
|
+ pri_image: valObj.pri_image,
|
|
|
+ price_range: valObj.price_range,
|
|
|
+ product_type: valObj.product_type,
|
|
|
+ property_type: valObj.property_type,
|
|
|
+ // area_type: valObj.area_type,
|
|
|
+ // metro_type: valObj.metro_type,
|
|
|
+ // metro_line: valObj.metro_line,
|
|
|
+ // vr_image: valObj.vr_image,
|
|
|
+ // vr_key: valObj.vr_key,
|
|
|
+ }
|
|
|
+ this.getDef('estate')
|
|
|
+ },
|
|
|
colorHandle (item) {
|
|
|
this.fillColor = item.color
|
|
|
this.strokeColor = item.color
|
|
@@ -120,6 +149,9 @@ export default {
|
|
|
if (valid) {
|
|
|
const oldform = this.$refs.ruleForm.baseForm
|
|
|
const newForm = { ...oldform }
|
|
|
+ if (this.estateObj && this.estateObj.id) {
|
|
|
+ newForm.estateObj = JSON.stringify(this.estateObj)
|
|
|
+ }
|
|
|
if (this.curObj.obj) {
|
|
|
this.$emit('close', newForm, 'edit')
|
|
|
} else {
|