|
@@ -109,7 +109,7 @@ export default {
|
|
|
if (this.modelId != '') {
|
|
|
this.hasGraph = true;
|
|
|
const temp = this.modelId.split('.');
|
|
|
- if (temp[1].toLowerCase() == 'png' || temp[1].toLowerCase() == 'jpg') {
|
|
|
+ if (temp[1] && (temp[1].toLowerCase() == 'png' || temp[1].toLowerCase() == 'jpg')) {
|
|
|
// return
|
|
|
} else {
|
|
|
this.init()
|
|
@@ -295,7 +295,8 @@ export default {
|
|
|
},
|
|
|
// 根据modelid初始化
|
|
|
initFromModelId(id){
|
|
|
- if (id.split('.')[1].toLowerCase() == 'png' || id.split('.')[1].toLowerCase() == 'jpg') {
|
|
|
+ const temp = id.split('.')[1];
|
|
|
+ if (temp && (temp.toLowerCase() == 'png' || temp.toLowerCase() == 'jpg')) {
|
|
|
this.$refs.drawFloor.initGraphy(id, 3)
|
|
|
} else {
|
|
|
this.$refs.drawFloor.initGraphy(id, 1)
|