|
@@ -3,7 +3,7 @@
|
|
<div id='repetitionGraphy'>
|
|
<div id='repetitionGraphy'>
|
|
<div class='buttons'>
|
|
<div class='buttons'>
|
|
<el-button icon='el-icon-back' size='mini' @click='backRouter'></el-button>
|
|
<el-button icon='el-icon-back' size='mini' @click='backRouter'></el-button>
|
|
- <template v-if="!hasModel">
|
|
|
|
|
|
+ <template v-if="!!hasModel">
|
|
<el-upload class='upload-demo' action='string' :http-request='uploadAndSubmit' :show-file-list='false' v-if="step==-1">
|
|
<el-upload class='upload-demo' action='string' :http-request='uploadAndSubmit' :show-file-list='false' v-if="step==-1">
|
|
<el-button size="mini">{{hasGraph?'替换平面图图片':'上传平面图图片'}}</el-button>
|
|
<el-button size="mini">{{hasGraph?'替换平面图图片':'上传平面图图片'}}</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
@@ -46,12 +46,15 @@
|
|
<checkGraphy ref='checkGraphy' @refresh='refresh' :alreadyRelatedModel='alreadyRelatedModel'></checkGraphy>
|
|
<checkGraphy ref='checkGraphy' @refresh='refresh' :alreadyRelatedModel='alreadyRelatedModel'></checkGraphy>
|
|
<!-- 设定比例尺弹窗 -->
|
|
<!-- 设定比例尺弹窗 -->
|
|
<setScaleDialog ref="setScaleDialog"></setScaleDialog>
|
|
<setScaleDialog ref="setScaleDialog"></setScaleDialog>
|
|
|
|
+ <!-- 退出时弹窗提示 -->
|
|
|
|
+ <backTips ref='backTips' @back="runBack"></backTips>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import drawFloor from './drawGraphy/drawFloor'
|
|
import drawFloor from './drawGraphy/drawFloor'
|
|
import checkGraphy from './drawGraphy/checkGraphy' //查看图片
|
|
import checkGraphy from './drawGraphy/checkGraphy' //查看图片
|
|
import setScaleDialog from '@/components/ready/buildfloor/setScaleDialog'
|
|
import setScaleDialog from '@/components/ready/buildfloor/setScaleDialog'
|
|
|
|
+import backTips from '@/components/ready/buildfloor/backTips'
|
|
import { floorUpdateOutline, floorQueryAndSign, manageUpdateFloor } from '@/api/scan/request'
|
|
import { floorUpdateOutline, floorQueryAndSign, manageUpdateFloor } from '@/api/scan/request'
|
|
import { getFileNameById, countModel } from '@/api/model/file'
|
|
import { getFileNameById, countModel } from '@/api/model/file'
|
|
import { EditLineItem, SItemStatus, SImageShowType, IconTextItem} from "@saga-web/cad-engine"
|
|
import { EditLineItem, SItemStatus, SImageShowType, IconTextItem} from "@saga-web/cad-engine"
|
|
@@ -61,7 +64,8 @@ export default {
|
|
components: {
|
|
components: {
|
|
drawFloor,
|
|
drawFloor,
|
|
checkGraphy,
|
|
checkGraphy,
|
|
- setScaleDialog
|
|
|
|
|
|
+ setScaleDialog,
|
|
|
|
+ backTips
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -74,7 +78,7 @@ export default {
|
|
otherSign: false,
|
|
otherSign: false,
|
|
hasGraph: false, // 当前楼层是否有平面图
|
|
hasGraph: false, // 当前楼层是否有平面图
|
|
hasModel: false, // 项目中时候有模型文件
|
|
hasModel: false, // 项目中时候有模型文件
|
|
- step: -1, // 当前处于第几步 同时为比例尺item判断是否创建的可编辑的依据
|
|
|
|
|
|
+ step: -1, // 当前处于第几步 同时为比例尺item判断是否创建的可编辑的依据;能否返回上页的依据
|
|
key: '', // 当楼层图为图片时图的key
|
|
key: '', // 当楼层图为图片时图的key
|
|
stepDes: [
|
|
stepDes: [
|
|
'请在图上点击两点绘制线段并标记实际长度',
|
|
'请在图上点击两点绘制线段并标记实际长度',
|
|
@@ -112,6 +116,14 @@ export default {
|
|
},
|
|
},
|
|
// 返回路由
|
|
// 返回路由
|
|
backRouter() {
|
|
backRouter() {
|
|
|
|
+ // 底图为图片 上传完图片后未保存
|
|
|
|
+ if (this.step > -1) {
|
|
|
|
+ this.$refs.backTips.showDialog();
|
|
|
|
+ } else {
|
|
|
|
+ this.runBack()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ runBack() {
|
|
this.$router.push({ name: 'buildFloor' })
|
|
this.$router.push({ name: 'buildFloor' })
|
|
},
|
|
},
|
|
// 替换模型文件
|
|
// 替换模型文件
|
|
@@ -311,6 +323,7 @@ export default {
|
|
this.$refs.drawFloor.drawMainScene.grabItem = scaleItem;
|
|
this.$refs.drawFloor.drawMainScene.grabItem = scaleItem;
|
|
scaleItem.connect('changText', this, this.changeText)
|
|
scaleItem.connect('changText', this, this.changeText)
|
|
scaleItem.moveable = true;
|
|
scaleItem.moveable = true;
|
|
|
|
+ this.clearScaleData(scaleItem);
|
|
} else if (this.step == -1) {
|
|
} else if (this.step == -1) {
|
|
scaleItem.status = SItemStatus.Normal;
|
|
scaleItem.status = SItemStatus.Normal;
|
|
}
|
|
}
|
|
@@ -348,6 +361,12 @@ export default {
|
|
this.$refs.drawFloor.drawMainScene.removeItem(this.curImgItem);
|
|
this.$refs.drawFloor.drawMainScene.removeItem(this.curImgItem);
|
|
this.curImgItem = null;
|
|
this.curImgItem = null;
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ // 清空比例尺数据
|
|
|
|
+ clearScaleData(scaleItem) {
|
|
|
|
+ scaleItem.line = [];
|
|
|
|
+ scaleItem.pointChange();
|
|
|
|
+ scaleItem.text = '';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|