|
@@ -14,13 +14,13 @@
|
|
|
<drawFloor ref="drawFloor" :isEdit="isEdit" :showTools="true" :id="1"></drawFloor>
|
|
|
</div>
|
|
|
<!-- 查看图片弹窗 -->
|
|
|
- <checkGraphy ref="checkGraphy" @refresh="refresh"></checkGraphy>
|
|
|
+ <checkGraphy ref="checkGraphy" @refresh="refresh" :alreadyRelatedModel='alreadyRelatedModel'></checkGraphy>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import drawFloor from "./drawGraphy/drawFloor";
|
|
|
import checkGraphy from "./drawGraphy/checkGraphy"; //查看图片
|
|
|
-import { floorUpdate } from "@/api/scan/request";
|
|
|
+import { floorUpdate, floorQueryAndSign } from "@/api/scan/request";
|
|
|
import { getFileNameById } from "@/api/model/file";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -31,17 +31,22 @@ export default {
|
|
|
return {
|
|
|
modelId: "", //
|
|
|
isEdit: false, // 是否编辑模式
|
|
|
- file: {}
|
|
|
+ file: {},
|
|
|
+ alreadyRelatedModel: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.modelId = this.$route.query.modelId;
|
|
|
this.FloorID = this.$route.query.FloorID;
|
|
|
this.BuildID = this.$route.query.BuildID;
|
|
|
- this.getFileName(this.modelId)
|
|
|
+ this.init();
|
|
|
},
|
|
|
mounted() { },
|
|
|
methods: {
|
|
|
+ init() {
|
|
|
+ this.getFileName(this.modelId)
|
|
|
+ this.getFloorData()
|
|
|
+ },
|
|
|
// 返回路由
|
|
|
backRouter() {
|
|
|
this.$router.push({ name: 'buildFloor' })
|
|
@@ -103,12 +108,24 @@ export default {
|
|
|
getFileNameById(pa, res => {
|
|
|
this.file = res;
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 获取楼层
|
|
|
+ getFloorData() {
|
|
|
+ let floorParam = {
|
|
|
+ PageSize: 1000,
|
|
|
+ Filters: `BuildID='${this.BuildID}'`
|
|
|
+ };
|
|
|
+ floorQueryAndSign(floorParam, res => {
|
|
|
+ this.alreadyRelatedModel = res.Content.map(t => {
|
|
|
+ if (t.FloorID != this.FloorID) return t.ModelId
|
|
|
+ }).filter(t => t);
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
modelId(n, o) {
|
|
|
if (o && n != o) {
|
|
|
- this.$refs.drawFloor.initGraphy(n, 1)
|
|
|
+ this.$refs.drawFloor.initGraphy(n, 1);
|
|
|
}
|
|
|
}
|
|
|
}
|