Commit 86a95795 authored by 黄奎's avatar 黄奎

页面修改

parent 49430af3
......@@ -199,7 +199,8 @@
isLink: Boolean,
picList: Array,
max: Number,
mode: String
mode: String,
chooseType: String,
},
data() {
return {
......@@ -216,7 +217,7 @@
defaultX: 0,
defaultY: 0,
is_close: false,
link: '',
link: [],
open_type: ''
},
hotspotList: [],
......@@ -232,7 +233,7 @@
dialogVisible(oldVal, newVal) {
this.hotspotList = JSON.parse(JSON.stringify(this.hotspotArray))
this.index = -1;
if(this.hotspotList.length>0){
if (this.hotspotList.length > 0) {
this.select(1);
}
}
......@@ -245,10 +246,14 @@
};
},
maxWidth() {
return parseFloat(this.width) - this.hotspotList[this.index].left;
var widthStr = this.width.replace("px", "");
var tempWidth = parseFloat(widthStr);
return parseFloat(tempWidth) - this.hotspotList[this.index].left;
},
maxHeight() {
return parseFloat(this.height) - this.hotspotList[this.index].top;
var heightStr = this.height.replace("px", "");
var tempheight = parseFloat(heightStr);
return parseFloat(this.tempheight) - this.hotspotList[this.index].top;
},
},
methods: {
......@@ -375,7 +380,12 @@
//调用子组件方法
var obj = this.$refs.chooseMenu.getChooseMenu();
if (this.index > -1 && this.hotspotList.length > 0) {
this.hotspotList[this.index].link = obj
if (this.chooseType == "rubik") {
this.hotspotList[this.index].link.push(obj)
} else {
this.hotspotList[this.index].link = obj
}
}
this.isShowLink = false;
},
......
......@@ -39,7 +39,7 @@
</el-form-item>
<el-form-item label="点击热区">
<choiceArea :multiple="false" :pic-url="data.backgroundPicUrl" :hotspot-array="data.hotspot?[data.hotspot]:[]"
width="750px" height="200px" @confirm="selectHotspot" :is-link="false">
width="750px" height="200px" @confirm="selectHotspot" :is-link="false" :chooseType="'checkin'">
<el-button size="mini">设置热区</el-button>
</choiceArea>
</el-form-item>
......
......@@ -161,7 +161,7 @@
</template>
<el-form-item label="热区划分">
<choiceArea :multiple="true" :pic-list="rubData.data.list" :hotspot-array="rubData.data.hotspot"
width="750px" :height="rubData.data.height + 'px'" @confirm="selectHotspot" :is-link="true">
width="750px" :height="rubData.data.height + 'px'" @confirm="selectHotspot" :is-link="true" :chooseType="'rubik'">
<el-button size="mini">划分热区</el-button>
</choiceArea>
</el-form-item>
......@@ -723,6 +723,7 @@
// 热区选择(edit)
selectHotspot(list) {
//console.log("list",list);
this.rubData.data.hotspot = list;
},
//选择图片
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment