|
@@ -120,7 +120,6 @@ export default {
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- this.getFileName(this.modelId)
|
|
|
this.getFloorData()
|
|
|
},
|
|
|
// 返回路由
|
|
@@ -186,7 +185,6 @@ export default {
|
|
|
const temp = this.modelId.split('.');
|
|
|
if (temp[1] && temp[1].toLowerCase() != 'png' && temp[1].toLowerCase() != 'jpg') {
|
|
|
this.key = '';
|
|
|
- this.getFileName(this.modelId)
|
|
|
}
|
|
|
},
|
|
|
// 获取文件夹名称
|
|
@@ -215,6 +213,7 @@ export default {
|
|
|
this.sign = t.Sign > 0
|
|
|
this.FloorName = t.localName || t.name
|
|
|
this.$refs.drawFloor.buildFloorName = `${this.BuildName}-${this.FloorName}`
|
|
|
+ t.modelId && this.getFileName(t.modelId)
|
|
|
}).filter((t) => t)
|
|
|
})
|
|
|
},
|
|
@@ -298,8 +297,12 @@ export default {
|
|
|
// 根据modelid初始化
|
|
|
initFromModelId(id) {
|
|
|
const temp = id.split('.')[1];
|
|
|
- if (temp && (temp.toLowerCase() == 'png' || temp.toLowerCase() == 'jpg')) {
|
|
|
- this.$refs.drawFloor.initGraphy(id, 3)
|
|
|
+ if (temp) {
|
|
|
+ if (temp.toLowerCase() == 'png' || temp.toLowerCase() == 'jpg') {
|
|
|
+ this.$refs.drawFloor.initGraphy(id, 3)
|
|
|
+ } else {
|
|
|
+ this.$refs.drawFloor.initGraphy(id, 2)
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$refs.drawFloor.initGraphy(id, 1)
|
|
|
}
|
|
@@ -417,8 +420,9 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
modelId(n, o) {
|
|
|
- if (n != o) {
|
|
|
+ if (o && n != o) {
|
|
|
if (n) {
|
|
|
+ // 只有替换的时候需要走
|
|
|
this.$nextTick(()=>{
|
|
|
this.initFromModelId(n)
|
|
|
})
|