|
@@ -1,50 +1,55 @@
|
|
|
<template>
|
|
|
<div id="bd-fl-manage">
|
|
|
<div class="header-nav">
|
|
|
- <el-button style="float:left;margin-right:20px;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
|
|
|
+ <el-button style="float:left;margin-right:20px;" size="small" type="default" icon="el-icon-back"
|
|
|
+ @click="goBack"></el-button>
|
|
|
<model-folder ref="modelFolder" @change="handleChangeModelFolder" style="margin-right:10px;"></model-folder>
|
|
|
<my-cascader :isWidth="false" ref="cascader" @change="changeDevice"></my-cascader>
|
|
|
- <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">{{buttonContent}}</el-button>
|
|
|
- <el-switch v-show="CurrentModelId" style="float:right;margin-top:7px;margin-right:20px;" v-model="isLight" active-text="高亮显示未完成验证的区块"></el-switch>
|
|
|
+ <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">{{ buttonContent }}</el-button>
|
|
|
+ <el-switch v-show="CurrentModelId" style="float:right;margin-top:7px;margin-right:20px;" v-model="isLight"
|
|
|
+ active-text="高亮显示未完成验证的区块"></el-switch>
|
|
|
</div>
|
|
|
<el-row>
|
|
|
<div class="l-list">
|
|
|
<h4>模型文件</h4>
|
|
|
<div class="model-file-list">
|
|
|
<el-scrollbar style="height:100%;">
|
|
|
- <div v-for="item in modelFileList" :key="item.Id" :class="{'model-file-item':true,'active':item.active}" @click="handleChangeModelFile(item)">
|
|
|
- <span>{{item.FloorName}}</span>
|
|
|
+ <div v-for="item in modelFileList" :key="item.Id" :class="{'model-file-item':true,'active':item.active}"
|
|
|
+ @click="handleChangeModelFile(item)">
|
|
|
+ <span>{{ item.FloorName }}</span>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="r-model">
|
|
|
- <draw-model ref="drawModel" :id="1" :CurrentModelId="CurrentModelId" :modelName="modelName" :isLight="isLight" @changeButtonContent="changeButtonContent"></draw-model>
|
|
|
+ <draw-model ref="drawModel" :id="1" :CurrentModelId="CurrentModelId" :modelName="modelName" :isLight="isLight"
|
|
|
+ @changeButtonContent="changeButtonContent"></draw-model>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
- <modelTask-dialog :dialogVisible.sync="dialogVisible" :params="params" :newTaskTypes="newTaskTypes"></modelTask-dialog>
|
|
|
+ <modelTask-dialog :dialogVisible.sync="dialogVisible" :params="params"
|
|
|
+ :newTaskTypes="newTaskTypes"></modelTask-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import modelFolder from "@/components/ready/buildfloor/modelFolder"
|
|
|
- import myCascader from "@/components/ledger/lib/cascader"
|
|
|
- import drawModel from "@/components/data_admin/buildTask/draw/drawModel"
|
|
|
- import modelTaskDialog from "@/components/data_admin/buildTask/dialog/modelTaskDialog"
|
|
|
- import {mapGetters} from "vuex";
|
|
|
- import request from "@/api/model/file.js";
|
|
|
-
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- modelFolder,
|
|
|
- myCascader,
|
|
|
- drawModel,
|
|
|
- modelTaskDialog
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- isLight: false,//是否高亮未完成验证区块
|
|
|
- query: {},//query信息
|
|
|
+import modelFolder from "@/components/ready/buildfloor/modelFolder"
|
|
|
+import myCascader from "@/components/ledger/lib/cascader"
|
|
|
+import drawModel from "@/components/data_admin/buildTask/draw/drawModel"
|
|
|
+import modelTaskDialog from "@/components/data_admin/buildTask/dialog/modelTaskDialog"
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import request from "@/api/model/file";
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ modelFolder,
|
|
|
+ myCascader,
|
|
|
+ drawModel,
|
|
|
+ modelTaskDialog
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isLight: false,//是否高亮未完成验证区块
|
|
|
+ query: {},//query信息
|
|
|
dialogVisible: false,//是否显示弹窗
|
|
|
modelFolderName: '',//模型文件夹名字
|
|
|
modelFolderId: '',//模型文件夹的id
|
|
@@ -59,7 +64,7 @@
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters("layout", ["projectId"]),
|
|
|
- params(){
|
|
|
+ params() {
|
|
|
return {
|
|
|
device: this.device,
|
|
|
CurrentModelId: this.CurrentModelId,
|
|
@@ -70,7 +75,7 @@
|
|
|
isVerification: this.query.isVerification
|
|
|
}
|
|
|
},
|
|
|
- modelName () {
|
|
|
+ modelName() {
|
|
|
return `${this.modelFolderName}-${this.modelFileName}`
|
|
|
},
|
|
|
},
|
|
@@ -79,12 +84,12 @@
|
|
|
this.query = this.$route.query
|
|
|
},
|
|
|
methods: {
|
|
|
- goBack(){//返回
|
|
|
- this.$router.push({name:'buildTask'})
|
|
|
+ goBack() {//返回
|
|
|
+ this.$router.push({ name: 'buildTask' })
|
|
|
},
|
|
|
- handleChangeModelFolder(item){//切换模型文件夹
|
|
|
+ handleChangeModelFolder(item) {//切换模型文件夹
|
|
|
let val = item.value
|
|
|
- if(val){
|
|
|
+ if (val) {
|
|
|
this.modelFolderName = item.label
|
|
|
let data = {
|
|
|
FolderId: val,
|
|
@@ -105,7 +110,7 @@
|
|
|
this.resetSelected()
|
|
|
}
|
|
|
},
|
|
|
- resetSelected(){
|
|
|
+ resetSelected() {
|
|
|
this.modelFileList = []
|
|
|
this.CurrentModelId = ''
|
|
|
this.modelFolderName = ''
|
|
@@ -115,9 +120,9 @@
|
|
|
this.dialogVisible = false
|
|
|
this.$refs.drawModel.clearGraphy()
|
|
|
},
|
|
|
- handleChangeModelFile(file){//切换模型文件
|
|
|
+ handleChangeModelFile(file) {//切换模型文件
|
|
|
this.modelFileList.map(item => {
|
|
|
- file.Id == item.Id?item.active = true:item.active = false
|
|
|
+ file.Id == item.Id ? item.active = true : item.active = false
|
|
|
return item
|
|
|
})
|
|
|
this.CurrentModelId = file.CurrentModelId
|
|
@@ -125,11 +130,11 @@
|
|
|
this.modelFileName = file.FloorName
|
|
|
this.newTaskTypes = this.$route.query.newTaskTypes
|
|
|
},
|
|
|
- changeDevice(val){//切换设备类别
|
|
|
+ changeDevice(val) {//切换设备类别
|
|
|
this.device = val.code
|
|
|
},
|
|
|
- handleClickCreate(){//创建已选
|
|
|
- if(!this.CurrentModelId){
|
|
|
+ handleClickCreate() {//创建已选
|
|
|
+ if (!this.CurrentModelId) {
|
|
|
this.$message('请选择模型文件!')
|
|
|
return false
|
|
|
}
|
|
@@ -138,7 +143,7 @@
|
|
|
})
|
|
|
this.dialogVisible = true
|
|
|
},
|
|
|
- changeButtonContent(val){// 通过判断是否选中模型空间调整文案
|
|
|
+ changeButtonContent(val) {// 通过判断是否选中模型空间调整文案
|
|
|
this.buttonContent = val;
|
|
|
}
|
|
|
},
|
|
@@ -154,12 +159,15 @@
|
|
|
overflow: hidden;
|
|
|
height: 100%;
|
|
|
position: relative;
|
|
|
- .header-nav{
|
|
|
+
|
|
|
+ .header-nav {
|
|
|
height: 32px;
|
|
|
padding-bottom: 10px;
|
|
|
}
|
|
|
+
|
|
|
.el-row {
|
|
|
height: calc(100% - 50px);
|
|
|
+
|
|
|
& > div {
|
|
|
float: left;
|
|
|
height: 100%;
|
|
@@ -194,7 +202,8 @@
|
|
|
.model-file-list {
|
|
|
height: calc(100% - 46px);
|
|
|
line-height: 48px;
|
|
|
- /deep/.el-scrollbar__wrap {
|
|
|
+
|
|
|
+ /deep/ .el-scrollbar__wrap {
|
|
|
overflow-x: hidden;
|
|
|
}
|
|
|
|