|
@@ -285,6 +285,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { Loading } from 'element-ui'
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import { checkDoorTo,checkLightDirection,checkRoom,calculateTrafficPoint,addDoorPoint,
|
|
|
doorMoveJudge,lightMoveJudge,roomMove,roomAdd,lightAdd,addDoor,fourCornersZoom,
|
|
@@ -298,6 +299,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
loading:false,
|
|
|
+ loadingInstance:{},
|
|
|
uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
|
|
|
headers: {
|
|
|
Authorization: "Bearer " + getToken(),
|
|
@@ -461,6 +463,7 @@
|
|
|
// this.$set(this,'mapSrc','1');
|
|
|
},
|
|
|
methods:{
|
|
|
+ //提交
|
|
|
setDataButton(){
|
|
|
let self = this;
|
|
|
if(checkRoom(this.mapList)&&
|
|
@@ -516,6 +519,7 @@
|
|
|
buildFloorLayouts:roomList,//房间数据
|
|
|
exitPointRelayList:lightList,//灯数据
|
|
|
layoutData:JSON.stringify(this.mapList),//布局数据
|
|
|
+ layoutJoinData:JSON.stringify(obj.evacuationList),//布局数据
|
|
|
};
|
|
|
console.log('newObj',newObj);
|
|
|
lineVertex(newObj).then(response => {
|
|
@@ -534,6 +538,8 @@
|
|
|
this.$set(this,'mapSrc',this.propsData.imgUrl);
|
|
|
this.$set(this,'layerWidth',this.propsData.canvasWidth);
|
|
|
this.$set(this,'layerHeight',this.propsData.canvasHeight);
|
|
|
+ this.$set(this,'maxWidth',this.propsData.canvasWidth);
|
|
|
+ this.$set(this,'maxHeight',this.propsData.canvasHeight);
|
|
|
this.$set(this,'mapList',JSON.parse(this.propsData.layoutData));
|
|
|
this.$set(this,'shadeBoxType',1);
|
|
|
}else{
|
|
@@ -995,10 +1001,11 @@
|
|
|
},
|
|
|
//上传
|
|
|
handleAvatarSuccess(res, file, type) {
|
|
|
- console.log('res',res);
|
|
|
- console.log('file',file);
|
|
|
- console.log('type',type);
|
|
|
+ // console.log('res',res);
|
|
|
+ // console.log('file',file);
|
|
|
+ // console.log('type',type);
|
|
|
if(res){
|
|
|
+ this.loadingInstance.close();
|
|
|
if(res.data){
|
|
|
if(res.data.url){
|
|
|
this.$set(this,'mapSrc',res.data.url)
|
|
@@ -1013,7 +1020,8 @@
|
|
|
if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif') {
|
|
|
this.asyncImgChecked(file).then(data => {
|
|
|
if (data) {
|
|
|
- console.log('data',data);
|
|
|
+ // console.log('data',data);
|
|
|
+ this.loadingInstance = Loading.service({ spinner:"", background: 'rgba(255, 255, 255, 0.1)' })
|
|
|
return true;
|
|
|
} else {
|
|
|
this.$message.error('图片尺寸不能大于于1500 X 1000')
|
|
@@ -1043,6 +1051,8 @@
|
|
|
}else{
|
|
|
self.$set(self,'layerWidth',width);
|
|
|
self.$set(self,'layerHeight',height);
|
|
|
+ self.$set(self,'maxWidth',width);
|
|
|
+ self.$set(self,'maxHeight',height);
|
|
|
resolve(true)
|
|
|
}
|
|
|
}
|