|
@@ -4,12 +4,11 @@
|
|
|
<div class='buttons'>
|
|
|
<el-button icon='el-icon-back' size='mini' @click='backRouter'></el-button>
|
|
|
<template v-if="!hasModel">
|
|
|
- <el-upload class='upload-demo' action='string' :http-request='uploadAndSubmit' :show-file-list='false'
|
|
|
- v-if="step==-1" accept=".jpg,.png" :before-upload="beforeUpload">
|
|
|
+ <el-upload class='upload-demo' action='string' :http-request='uploadAndSubmit' :show-file-list='false' v-if="step==-1" accept=".jpg,.png"
|
|
|
+ :before-upload="beforeUpload">
|
|
|
<el-button size="mini">{{ hasGraph ? '替换平面图图片' : '上传平面图图片' }}</el-button>
|
|
|
</el-upload>
|
|
|
- <el-button style='float:right;' size='mini' type='primary' v-if="step==0" @click="nextStep"
|
|
|
- :disabled="nextStepBtnDisable">下一步
|
|
|
+ <el-button style='float:right;' size='mini' type='primary' v-if="step==0" @click="nextStep" :disabled="nextStepBtnDisable">下一步
|
|
|
</el-button>
|
|
|
<el-button style='float:right;' size='mini' type='primary' v-if="step==1" @click="nextStep" :disabled="timeOut">
|
|
|
保存
|
|
@@ -27,8 +26,7 @@
|
|
|
<!-- 展示图片 -->
|
|
|
<div class='drawImg'>
|
|
|
<div style="width: 100%;height: 100%;position: relative;" v-if="hasGraph">
|
|
|
- <drawFloor ref='drawFloor' :isEdit='isEdit' :showTools='true' :id='1' @changeSign='changeSign'
|
|
|
- @getGraphSuc="getGraphSuc"></drawFloor>
|
|
|
+ <drawFloor ref='drawFloor' :isEdit='isEdit' :showTools='true' :id='1' @changeSign='changeSign' @getGraphSuc="getGraphSuc"></drawFloor>
|
|
|
<div class="stepContainer" v-if="step>-1">
|
|
|
<el-steps :active="step" align-center finish-status="success" process-status="process">
|
|
|
<el-step title="设定比例尺" :description="stepDes[0]"></el-step>
|
|
@@ -44,11 +42,11 @@
|
|
|
</el-radio>
|
|
|
</li>
|
|
|
</template>
|
|
|
-<!-- <template v-else>-->
|
|
|
-<!-- <li style="text-align: center;padding: 0">-->
|
|
|
-<!-- 暂无对齐楼层-->
|
|
|
-<!-- </li>-->
|
|
|
-<!-- </template>-->
|
|
|
+ <!-- <template v-else>-->
|
|
|
+ <!-- <li style="text-align: center;padding: 0">-->
|
|
|
+ <!-- 暂无对齐楼层-->
|
|
|
+ <!-- </li>-->
|
|
|
+ <!-- </template>-->
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div style="width: 100%;height: 100%" v-else>
|
|
@@ -70,12 +68,12 @@ import drawFloor from './drawGraphy/drawFloor'
|
|
|
import checkGraphy from './drawGraphy/checkGraphy' //查看图片
|
|
|
import setScaleDialog from '@/components/ready/buildfloor/setScaleDialog'
|
|
|
import backTips from '@/components/ready/buildfloor/backTips'
|
|
|
-import {floorUpdateOutline, floorQueryAndSign, manageUpdateFloor} from '@/api/scan/request'
|
|
|
-import {getFileNameById, countModel} from '@/api/model/file'
|
|
|
-import {EditLineItem, SItemStatus, SImageShowType, IconTextItem} from "@saga-web/cad-engine"
|
|
|
-import {SColor} from "@saga-web/draw"
|
|
|
-import {SImageItem} from '@saga-web/graph/lib'
|
|
|
-import {SMathUtil} from "@saga-web/cad-engine/lib/utils/SMathUtil"
|
|
|
+import { floorUpdateOutline, floorQueryAndSign, manageUpdateFloor } from '@/api/scan/request'
|
|
|
+import { getFileNameById, countModel } from '@/api/model/file'
|
|
|
+import { EditLineItem, SItemStatus, SImageShowType, IconTextItem } from "@saga-web/cad-engine"
|
|
|
+import { SColor } from "@saga-web/draw"
|
|
|
+import { SImageItem } from '@saga-web/graph/lib'
|
|
|
+import { SMathUtil } from "@saga-web/cad-engine/lib/utils/SMathUtil"
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -116,6 +114,7 @@ export default {
|
|
|
this.FloorID = this.$route.query.FloorID
|
|
|
this.BuildID = this.$route.query.BuildID
|
|
|
this.BuildName = this.$route.query.BuildName
|
|
|
+ this.FloorName = this.$route.query.FloorName
|
|
|
if (this.modelId != '') {
|
|
|
this.hasGraph = true;
|
|
|
const temp = this.modelId.split('.');
|
|
@@ -126,6 +125,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.getCountModel()
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.drawFloor.buildFloorName = `${this.BuildName}-${this.FloorName}`
|
|
|
+ })
|
|
|
},
|
|
|
mounted() {
|
|
|
},
|
|
@@ -143,11 +145,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
runBack() {
|
|
|
- this.$router.push({name: 'buildFloor'})
|
|
|
+ this.$router.push({ name: 'buildFloor' })
|
|
|
},
|
|
|
// 替换模型文件
|
|
|
changeGraphy() {
|
|
|
- this.$refs.checkGraphy.showDialog({FloorID: this.FloorID, BuildID: this.BuildID})
|
|
|
+ this.$refs.checkGraphy.showDialog({ FloorID: this.FloorID, BuildID: this.BuildID })
|
|
|
},
|
|
|
// 确认保存
|
|
|
confirm() {
|
|
@@ -172,7 +174,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
let pa = {
|
|
|
- Content: [{FloorID: this.FloorID, Outline: Outline}],
|
|
|
+ Content: [{ FloorID: this.FloorID, Outline: Outline }],
|
|
|
Projection: ['Outline'],
|
|
|
}
|
|
|
floorUpdateOutline(pa, (res) => {
|
|
@@ -228,9 +230,7 @@ export default {
|
|
|
this.alreadyRelatedModel = res.Content.map((t) => {
|
|
|
if (t.FloorID != this.FloorID) return t.ModelId
|
|
|
this.sign = t.Sign > 0
|
|
|
- this.FloorName = t.FloorLocalName || t.FloorName
|
|
|
- this.$refs.drawFloor.buildFloorName = `${this.BuildName}-${this.FloorName}`
|
|
|
- t.modelId && this.getFileName(t.modelId)
|
|
|
+ t.ModelId && this.getFileName(t.ModelId)
|
|
|
}).filter((t) => t)
|
|
|
})
|
|
|
},
|
|
@@ -239,7 +239,7 @@ export default {
|
|
|
},
|
|
|
// 统计项目下是否有模型文件
|
|
|
getCountModel() {
|
|
|
- countModel({}, res => {
|
|
|
+ countModel({ Filters: "Status in [4]" }, res => {
|
|
|
this.hasModel = res.Count > 0
|
|
|
})
|
|
|
},
|
|
@@ -308,12 +308,12 @@ export default {
|
|
|
const scaleItem = this.$refs.drawFloor.scaleItem;
|
|
|
// 比例尺坐标处理,当底图被对齐操作后,需要跟随底图改变坐标
|
|
|
const line = scaleItem.line.map(t => {
|
|
|
- return {x: t.x + this.baseImgItem.x, y: t.y + this.baseImgItem.y}
|
|
|
+ return { x: t.x + this.baseImgItem.x, y: t.y + this.baseImgItem.y }
|
|
|
})
|
|
|
let Param = {
|
|
|
Content: [{
|
|
|
FloorId: this.FloorID,
|
|
|
- StructureInfo: {FloorMap: this.key},
|
|
|
+ StructureInfo: { FloorMap: this.key },
|
|
|
Properties: {
|
|
|
X: this.baseImgItem.x,
|
|
|
Y: this.baseImgItem.y,
|
|
@@ -424,8 +424,6 @@ export default {
|
|
|
}
|
|
|
this.curImgItem.showType == SImageShowType.Full;
|
|
|
this.curImgItem.moveTo(v.Properties.X, v.Properties.Y);
|
|
|
- // this.curImgItem.width = v.Properties.width;
|
|
|
- // this.curImgItem.height = v.Properties.height;
|
|
|
} catch (err) {
|
|
|
console.log(err);
|
|
|
}
|