开发BIM交底功能
parent
f19dc47e8f
commit
64e18f1e89
|
@ -31,13 +31,6 @@ body{
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.login-bgd{
|
|
||||||
position: relative;
|
|
||||||
height: 100%;
|
|
||||||
width:1400px;
|
|
||||||
background: url("../images/login_bgd.png") no-repeat 50%;
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
.login-max{
|
.login-max{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 MiB |
Binary file not shown.
Before Width: | Height: | Size: 2.5 MiB |
Binary file not shown.
Before Width: | Height: | Size: 1.8 MiB |
|
@ -69,37 +69,62 @@ function getProperty(that) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getModelUnit(that, modelId) {
|
||||||
|
let find = that.models.find((d) => d.modelId == modelId);
|
||||||
|
return find ? find.unit || 1.0 : 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取构件尺寸信息
|
* 获取构件尺寸信息
|
||||||
*/
|
*/
|
||||||
function subFeatureSize(that) {
|
function subFeatureSize(that) {
|
||||||
|
let api = bimBriefingApi;
|
||||||
|
let result = [
|
||||||
|
{ name: "构建尺寸", data: [] },
|
||||||
|
{ name: "构建表面积", data: [] },
|
||||||
|
{ name: "构建体积", data: [] },
|
||||||
|
];
|
||||||
|
that.info = [];
|
||||||
|
api.Public.clearHandler(), api.Measurement.clearAllTrace();
|
||||||
|
api.Feature.getByEvent(true, (n) => {
|
||||||
|
if (n && n["id"]) {
|
||||||
|
let featureId = n.id;
|
||||||
|
let modelId = featureId.split("^")[0];
|
||||||
|
let unit = getModelUnit(that, modelId);
|
||||||
|
clearSelectFeature(that);
|
||||||
|
api.Feature.getGeometrySizeById(featureId, (res) => {
|
||||||
|
let size = res.size || {};
|
||||||
|
let x = (size.x || 0) * unit * 1.0;
|
||||||
|
let y = (size.y || 0) * unit * 1.0;
|
||||||
|
let z = (size.z || 0) * unit * 1.0;
|
||||||
|
result[0].data = [
|
||||||
|
{ name: "长", value: x.toFixed(2) + "" },
|
||||||
|
{ name: "宽", value: y.toFixed(2) + "" },
|
||||||
|
{ name: "高", value: z.toFixed(2) + "" },
|
||||||
|
];
|
||||||
|
result[1].data = [{ name: "面积", value: (x * y).toFixed(2) + "" }];
|
||||||
|
result[2].data = [{ name: "体积", value: (x * y * z).toFixed(2) }];
|
||||||
|
api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId);
|
||||||
|
that.selFeatureId = featureId;
|
||||||
|
that.info = result;
|
||||||
|
// api.Measurement.featureArea(featureId, (res) => {
|
||||||
|
// result[1].data = [{ name: "面积", value: ((+res || 0) * unit * unit * 1.0).toFixed(2) + "" }];
|
||||||
|
// api.Measurement.featureVolume(featureId, (res) => {
|
||||||
|
// result[2].data = [{ name: "体积", value: ((+res || 0) * unit * unit * unit * 1.0).toFixed(2) }];
|
||||||
|
// api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId);
|
||||||
|
// that.selFeatureId = featureId;
|
||||||
|
// that.info=result
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//构件面积
|
||||||
|
function measurementArea(that) {
|
||||||
let api = bimBriefingApi;
|
let api = bimBriefingApi;
|
||||||
that.info = [];
|
that.info = [];
|
||||||
api.Public.clearHandler(), api.Measurement.clearAllTrace();
|
api.Public.clearHandler(), api.Measurement.clearAllTrace();
|
||||||
api.Feature.getByEvent(true, (n) => {
|
|
||||||
console.log(n);
|
|
||||||
if (n && n["id"]) {
|
|
||||||
let featureId = n.id;
|
|
||||||
let modelId = featureId.split("^")[0];
|
|
||||||
clearSelectFeature(that);
|
|
||||||
api.Feature.getGeometrySizeById(featureId, (res) => {
|
|
||||||
let size = res.size || {};
|
|
||||||
that.info = [
|
|
||||||
{ name: "长", value: (size.x || 0).toFixed(2) + "" },
|
|
||||||
{ name: "宽", value: (size.y || 0).toFixed(2) + "" },
|
|
||||||
{ name: "高", value: (size.z || 0).toFixed(2) + "" },
|
|
||||||
];
|
|
||||||
api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId);
|
|
||||||
that.selFeatureId = featureId;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//构件面积
|
|
||||||
function measurementArea(that) {
|
|
||||||
let api = bimBriefingApi;
|
|
||||||
that.info = [];
|
|
||||||
api.Public.clearHandler(), api.Measurement.clearAllTrace();
|
|
||||||
api.Feature.getByEvent(true, (n) => {
|
api.Feature.getByEvent(true, (n) => {
|
||||||
console.log(n);
|
console.log(n);
|
||||||
if (n && n["id"]) {
|
if (n && n["id"]) {
|
||||||
|
@ -107,9 +132,7 @@ function measurementArea(that) {
|
||||||
let modelId = featureId.split("^")[0];
|
let modelId = featureId.split("^")[0];
|
||||||
clearSelectFeature(that);
|
clearSelectFeature(that);
|
||||||
api.Measurement.featureArea(featureId, (res) => {
|
api.Measurement.featureArea(featureId, (res) => {
|
||||||
that.info = [
|
that.info = [{ name: "面积", value: (+res || 0).toFixed(2) + "" }];
|
||||||
{ name: "面积", value: (+res || 0).toFixed(2) + "" }
|
|
||||||
];
|
|
||||||
api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId);
|
api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId);
|
||||||
that.selFeatureId = featureId;
|
that.selFeatureId = featureId;
|
||||||
});
|
});
|
||||||
|
@ -118,23 +141,15 @@ function measurementArea(that) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//构件体积
|
//构件体积
|
||||||
function measuringVolume(that){
|
function measuringVolume(that) {}
|
||||||
|
|
||||||
}
|
|
||||||
//构件距离
|
//构件距离
|
||||||
function distance(that){
|
function distance(that) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//剖切
|
//剖切
|
||||||
function initClipping(that){
|
function initClipping(that) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//构件隐藏
|
//构件隐藏
|
||||||
function actorVisible(){
|
function actorVisible() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
measurementArea,
|
measurementArea,
|
||||||
|
|
|
@ -67,12 +67,22 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-if="selectMenu == 1 || selectMenu == 2">
|
<template v-if="selectMenu == 1 || selectMenu == 2">
|
||||||
<div class="info-list">
|
<div class="info-list">
|
||||||
<table class="model-property-table my-table" v-if="info.length > 0">
|
<div v-for="(item, index) in info" :key="index">
|
||||||
<tr v-for="(item, index) in info" :key="index">
|
<div class="group-info">
|
||||||
<th width="50%">{{ item.name }}</th>
|
<svg-icon icon-class="info" />
|
||||||
<td width="50%">{{ item.value }}</td>
|
<span>{{ item.name }}</span>
|
||||||
</tr>
|
</div>
|
||||||
</table>
|
<table class="model-property-table my-table">
|
||||||
|
<tr v-for="(item2, index2) in item.data" :key="index2+'-'+index">
|
||||||
|
<th width="50%">{{ item2.name }}</th>
|
||||||
|
<td width="50%">{{ item2.value }}
|
||||||
|
<span v-if="index==0">米</span>
|
||||||
|
<span v-if="index==1">米<sup>2</sup></span>
|
||||||
|
<span v-if="index==2">米<sup>3</sup></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -116,14 +126,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 1 }" @click="doSelectMenu(1)">
|
<div class="tool-item" :class="{ 'is-selected': selectMenu == 1 }" @click="doSelectMenu(1)">
|
||||||
<el-tooltip content="构建尺寸" placement="top">
|
<el-tooltip content="构建测量" placement="top">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<svg-icon icon-class="size2" />
|
<svg-icon icon-class="size2" />
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 2 }" @click="doSelectMenu(2)">
|
<div class="tool-item" :class="{ 'is-selected': selectMenu == 2 }" @click="doSelectMenu(2)" v-if="1==2">
|
||||||
<el-tooltip content="构建面积" placement="top">
|
<el-tooltip content="构建面积" placement="top">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<svg-icon icon-class="area2" />
|
<svg-icon icon-class="area2" />
|
||||||
|
@ -131,7 +141,7 @@
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 3 }" @click="doSelectMenu(3)">
|
<div class="tool-item" :class="{ 'is-selected': selectMenu == 3 }" @click="doSelectMenu(3)" v-if="1==2">
|
||||||
<el-tooltip content="构建体积" placement="top">
|
<el-tooltip content="构建体积" placement="top">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<svg-icon icon-class="volume" />
|
<svg-icon icon-class="volume" />
|
||||||
|
@ -226,9 +236,9 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
doSelectMenu(index) {
|
doSelectMenu(index) {
|
||||||
this.selectMenu = index;
|
this.selectMenu = index;
|
||||||
if(window.bimBriefingApi){
|
if (window.bimBriefingApi) {
|
||||||
let api = bimBriefingApi;
|
let api = bimBriefingApi;
|
||||||
api.Feature.getByEvent(false);
|
api.Feature.getByEvent(false);
|
||||||
}
|
}
|
||||||
briefingTools.clearSelectFeature(this);
|
briefingTools.clearSelectFeature(this);
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
@ -238,7 +248,7 @@ export default {
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
briefingTools.subFeatureSize(this);
|
briefingTools.subFeatureSize(this);
|
||||||
this.title = "尺寸测量";
|
this.title = "构建测量";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
briefingTools.measurementArea(this);
|
briefingTools.measurementArea(this);
|
||||||
|
@ -345,13 +355,13 @@ export default {
|
||||||
},
|
},
|
||||||
initEngine() {
|
initEngine() {
|
||||||
this.elId++;
|
this.elId++;
|
||||||
this.modelTrees=[];
|
this.modelTrees = [];
|
||||||
this.models=[];
|
this.models = [];
|
||||||
this.propertyAttr=[];
|
this.propertyAttr = [];
|
||||||
this.propertyType=[];
|
this.propertyType = [];
|
||||||
this.viewPoint=[];
|
this.viewPoint = [];
|
||||||
this.info=[];
|
this.info=[];
|
||||||
this.attributeInformation="";
|
this.attributeInformation = "";
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.loadEngine();
|
this.loadEngine();
|
||||||
}, 10);
|
}, 10);
|
||||||
|
@ -446,6 +456,7 @@ export default {
|
||||||
this.models
|
this.models
|
||||||
.map((d) => {
|
.map((d) => {
|
||||||
d.gis = JSON.parse(d.gisJson);
|
d.gis = JSON.parse(d.gisJson);
|
||||||
|
d.modelId = d.lightweightName;
|
||||||
return d;
|
return d;
|
||||||
})
|
})
|
||||||
.forEach((d) => {
|
.forEach((d) => {
|
||||||
|
@ -601,7 +612,7 @@ export default {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(80vh - 50px);
|
top: calc(80vh - 50px);
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -200px;
|
margin-left: -150px;
|
||||||
display: flex;
|
display: flex;
|
||||||
background: #00000080;
|
background: #00000080;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
|
@ -1019,6 +1019,7 @@ export default {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(80vh - 50px);
|
top: calc(80vh - 50px);
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
margin-left:-170px;
|
||||||
display: flex;
|
display: flex;
|
||||||
background: #00000080;
|
background: #00000080;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
|
@ -54,6 +54,9 @@ public class BimModelInfo extends BaseEntity
|
||||||
@Excel(name = "模型文件类型")
|
@Excel(name = "模型文件类型")
|
||||||
private String fileType;
|
private String fileType;
|
||||||
|
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private Double unit;
|
||||||
|
|
||||||
/** 文件大小 */
|
/** 文件大小 */
|
||||||
@Excel(name = "文件大小")
|
@Excel(name = "文件大小")
|
||||||
private Long fileSize;
|
private Long fileSize;
|
||||||
|
@ -65,6 +68,14 @@ public class BimModelInfo extends BaseEntity
|
||||||
private String projectName;
|
private String projectName;
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
||||||
|
public Double getUnit() {
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(Double unit) {
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
public String getComName() {
|
public String getComName() {
|
||||||
return comName;
|
return comName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="modelType" column="model_type" />
|
<result property="modelType" column="model_type" />
|
||||||
<result property="fileType" column="file_type" />
|
<result property="fileType" column="file_type" />
|
||||||
<result property="fileSize" column="file_size" />
|
<result property="fileSize" column="file_size" />
|
||||||
|
<result property="unit" column="unit" />
|
||||||
<result property="showSand" column="show_sand" />
|
<result property="showSand" column="show_sand" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
<result property="isDel" column="is_del"/>
|
<result property="isDel" column="is_del"/>
|
||||||
|
@ -32,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<sql id="selectBimModelInfoVo">
|
<sql id="selectBimModelInfoVo">
|
||||||
select bmi.model_id, bmi.com_id, bmi.project_id,
|
select bmi.model_id, bmi.com_id, bmi.project_id,
|
||||||
sp.dept_name projectName,
|
sp.dept_name projectName,
|
||||||
sd.dept_name com_name,pd.sub_dept_name dept_name,
|
sd.dept_name com_name,pd.sub_dept_name dept_name,bmi.unit,
|
||||||
bmi.dept_id, bmi.model_name, bmi.lightweightName, bmi.gis_json, bmi.model_status, bmi.model_type,
|
bmi.dept_id, bmi.model_name, bmi.lightweightName, bmi.gis_json, bmi.model_status, bmi.model_type,
|
||||||
bmi.file_type, bmi.file_size, bmi.show_sand, bmi.status, bmi.remark, bmi.create_by, bmi.create_time, bmi.update_by, bmi.update_time,bmi.is_del
|
bmi.file_type, bmi.file_size, bmi.show_sand, bmi.status, bmi.remark, bmi.create_by, bmi.create_time, bmi.update_by, bmi.update_time,bmi.is_del
|
||||||
from bim_model_info bmi
|
from bim_model_info bmi
|
||||||
|
@ -78,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="modelType != null">model_type,</if>
|
<if test="modelType != null">model_type,</if>
|
||||||
<if test="fileType != null">file_type,</if>
|
<if test="fileType != null">file_type,</if>
|
||||||
<if test="fileSize != null">file_size,</if>
|
<if test="fileSize != null">file_size,</if>
|
||||||
|
<if test="unit != null">unit,</if>
|
||||||
<if test="showSand != null">show_sand,</if>
|
<if test="showSand != null">show_sand,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
|
@ -97,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="modelType != null">#{modelType},</if>
|
<if test="modelType != null">#{modelType},</if>
|
||||||
<if test="fileType != null">#{fileType},</if>
|
<if test="fileType != null">#{fileType},</if>
|
||||||
<if test="fileSize != null">#{fileSize},</if>
|
<if test="fileSize != null">#{fileSize},</if>
|
||||||
|
<if test="unit != null">#{unit},</if>
|
||||||
<if test="showSand != null">#{showSand},</if>
|
<if test="showSand != null">#{showSand},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
|
@ -120,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="modelType != null">model_type = #{modelType},</if>
|
<if test="modelType != null">model_type = #{modelType},</if>
|
||||||
<if test="fileType != null">file_type = #{fileType},</if>
|
<if test="fileType != null">file_type = #{fileType},</if>
|
||||||
<if test="fileSize != null">file_size = #{fileSize},</if>
|
<if test="fileSize != null">file_size = #{fileSize},</if>
|
||||||
|
<if test="unit != null">unit = #{unit},</if>
|
||||||
<if test="showSand != null">show_sand = #{showSand},</if>
|
<if test="showSand != null">show_sand = #{showSand},</if>
|
||||||
<if test="isDel != null">is_del = #{isDel},</if>
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
|
|
|
@ -319,6 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
pro_project_info_subdepts_users
|
pro_project_info_subdepts_users
|
||||||
WHERE
|
WHERE
|
||||||
use_status = 0
|
use_status = 0
|
||||||
|
and approve_status >= 100
|
||||||
<if test="comId != null">and com_id = #{comId}</if>
|
<if test="comId != null">and com_id = #{comId}</if>
|
||||||
<if test="projectId != null">and project_id = #{projectId}</if>
|
<if test="projectId != null">and project_id = #{projectId}</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
|
|
|
@ -1,349 +1,371 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px" :key="data.elKey">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px" :key="data.elKey">
|
||||||
<el-form-item label="项目名称" prop="projectId">
|
<el-form-item label="项目名称" prop="projectId">
|
||||||
<el-select v-model="queryParams.projectId" clearable :disabled="data.currentPrjId ? true : false" filterable placeholder="请选择所属项目" style="width: 200px" @change="queryProjectChange">
|
<el-select v-model="queryParams.projectId" clearable :disabled="data.currentPrjId ? true : false" filterable placeholder="请选择所属项目" style="width: 200px" @change="queryProjectChange">
|
||||||
<el-option v-for="item in data.projects" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
|
<el-option v-for="item in data.projects" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="所属单位" prop="deptId" >
|
<!-- <el-form-item label="所属单位" prop="deptId" >
|
||||||
<el-select v-model="queryParams.deptId" clearable filterable placeholder="请选择所属单位" style="width: 200px">
|
<el-select v-model="queryParams.deptId" clearable filterable placeholder="请选择所属单位" style="width: 200px">
|
||||||
<el-option v-for="item in data.subDepts" :key="item.id" :label="item.subDeptName" :value="item.id"></el-option>
|
<el-option v-for="item in data.subDepts" :key="item.id" :label="item.subDeptName" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="模型名称" prop="modelName">
|
<el-form-item label="模型名称" prop="modelName">
|
||||||
<el-input v-model="queryParams.modelName" placeholder="请输入模型名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.modelName" placeholder="请输入模型名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" v-if="data.isAdmin" @click="handleAdd">绑定模型</el-button>
|
<el-button type="primary" plain icon="Plus" v-if="data.isAdmin" @click="handleAdd">绑定模型</el-button>
|
||||||
<el-button type="primary" plain icon="Plus" v-if="data.isAdmin" @click="handleUpload">上传模型</el-button>
|
<el-button type="primary" plain icon="Plus" v-if="data.isAdmin" @click="handleUpload">上传模型</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="bimModelList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="bimModelList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column label="ID" align="center" prop="modelId" />
|
<el-table-column label="ID" align="center" prop="modelId" />
|
||||||
<el-table-column label="项目" align="center" prop="projectName" />
|
<el-table-column label="项目" align="center" prop="projectName" />
|
||||||
<el-table-column label="单位" align="center" prop="deptName" />
|
<el-table-column label="单位" align="center" prop="deptName" />
|
||||||
<el-table-column label="模型名称" align="center" prop="modelName">
|
<el-table-column label="模型名称" align="center" prop="modelName">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<label class="blue command" @click="showModel(scope.row)">{{scope.row.modelName}}</label>
|
<label class="blue command" @click="showModel(scope.row)">{{ scope.row.modelName }}</label>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="轻量化名称" align="center" prop="lightweightName" />
|
<el-table-column label="轻量化名称" align="center" prop="lightweightName" />
|
||||||
<el-table-column label="模型类型" align="center" prop="modelType" />
|
<el-table-column label="模型类型" align="center" prop="modelType" />
|
||||||
<el-table-column label="模型文件类型" align="center" prop="fileType" />
|
<el-table-column label="模型文件类型" align="center" prop="fileType" />
|
||||||
<el-table-column label="文件大小" align="center" prop="fileSize">
|
<el-table-column label="模型尺寸单位" align="center" prop="unitStr" />
|
||||||
<template #default="scope">{{scope.row.fileSize?toSize(scope.row.fileSize):'-'}}</template>
|
<el-table-column label="文件大小" align="center" prop="fileSize">
|
||||||
</el-table-column>
|
<template #default="scope">{{ scope.row.fileSize ? toSize(scope.row.fileSize) : "-" }}</template>
|
||||||
<el-table-column label="是否在沙盘显示" align="center" prop="showSand">
|
</el-table-column>
|
||||||
<template #default="scope">
|
<el-table-column label="是否在沙盘显示" align="center" prop="showSand">
|
||||||
<el-switch v-model="scope.row.sand" active-text="显示" inactive-text="隐藏" />
|
<template #default="scope">
|
||||||
</template>
|
<el-switch v-model="scope.row.sand" active-text="显示" inactive-text="隐藏" />
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
</el-table-column>
|
||||||
<template #default="scope">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['bim:bimModel:edit']">修改</el-button>
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['bim:bimModel:remove']">删除</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['bim:bimModel:edit']">修改</el-button>
|
||||||
</template>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['bim:bimModel:remove']">删除</el-button>
|
||||||
</el-table-column>
|
</template>
|
||||||
</el-table>
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
|
||||||
<!-- 添加或修改Bim模型对话框 -->
|
<!-- 添加或修改Bim模型对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||||
<el-form ref="bimModelRef" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="bimModelRef" :model="form" :rules="rules" label-width="120px">
|
||||||
<!-- <el-form-item label="所属单位" prop="deptId">
|
<!-- <el-form-item label="所属单位" prop="deptId">
|
||||||
<el-select v-model="form.deptId" clearable filterable placeholder="请选择所属单位" style="width: 200px">
|
<el-select v-model="form.deptId" clearable filterable placeholder="请选择所属单位" style="width: 200px">
|
||||||
<el-option v-for="item in data.subDepts" :key="item.id" :label="item.subDeptName" :value="item.id"></el-option>
|
<el-option v-for="item in data.subDepts" :key="item.id" :label="item.subDeptName" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<div style="margin-bottom:10px;">
|
<div style="margin-bottom: 10px">
|
||||||
<el-button type="primary" style="margin-left:20px;" @click="selectModelHandler">从模型服务器选择模型</el-button>
|
<el-button type="primary" style="margin-left: 20px" @click="selectModelHandler">从模型服务器选择模型</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="模型名称" prop="modelName">
|
<el-form-item label="模型名称" prop="modelName">
|
||||||
<el-input v-model="form.modelName" disabled placeholder="请输入模型名称" />
|
<el-input v-model="form.modelName" disabled placeholder="请输入模型名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="轻量化名称" prop="lightweightNam lightweightName">
|
<el-form-item label="轻量化名称" prop="lightweightNam lightweightName">
|
||||||
<el-input v-model="form.lightweightName" disabled placeholder="请输入轻量化名称" />
|
<el-input v-model="form.lightweightName" disabled placeholder="请输入轻量化名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文件大小" prop="fileSize">
|
<el-form-item label="文件大小" prop="fileSize">
|
||||||
<el-input v-model="form.fileSize" disabled placeholder="请输入文件大小" />
|
<el-input v-model="form.fileSize" disabled placeholder="请输入文件大小" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="在沙盘显示" prop="sand">
|
<el-form-item label="在沙盘显示" prop="sand">
|
||||||
<el-switch v-model="form.sand" size="large" active-text="显示" inactive-text="隐藏" />
|
<el-switch v-model="form.sand" size="large" active-text="显示" inactive-text="隐藏" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注说明" prop="remark">
|
<el-form-item label="模型尺寸单位" prop="unit">
|
||||||
<el-input type="textarea" v-model="form.remark" placeholder="请输入备注" />
|
<el-select v-model="form.unit" placeholder="请选择模型尺寸单位" style="width: 200px"> <el-option v-for="item in unitInfos" :key="item.value" :label="item.label" :value="item.value"></el-option> </el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
<el-form-item label="备注说明" prop="remark">
|
||||||
<div class="dialog-footer">
|
<el-input type="textarea" v-model="form.remark" placeholder="请输入备注" />
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
</el-form-item>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
</el-form>
|
||||||
</div>
|
<template #footer>
|
||||||
</template>
|
<div class="dialog-footer">
|
||||||
</el-dialog>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<modelSelectDialog ref="selDlg" @select="doModelSelect" />
|
<el-button @click="cancel">取 消</el-button>
|
||||||
<uploadModelDialog ref="uploadDlg" />
|
</div>
|
||||||
<modelDialog ref="mDlg"></modelDialog>
|
</template>
|
||||||
</div>
|
</el-dialog>
|
||||||
|
<modelSelectDialog ref="selDlg" @select="doModelSelect" />
|
||||||
|
<uploadModelDialog ref="uploadDlg" />
|
||||||
|
<modelDialog ref="mDlg"></modelDialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="BimModel">
|
<script setup name="BimModel">
|
||||||
import { listBimModel, getBimModel, delBimModel, addBimModel, updateBimModel } from '@/api/bim/bimModel'
|
import { listBimModel, getBimModel, delBimModel, addBimModel, updateBimModel } from "@/api/bim/bimModel";
|
||||||
import { listProProjectInfoSubdepts } from '@/api/manage/proProjectInfoSubdepts'
|
import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
|
||||||
import { findMyProjectList } from '@/api/publics'
|
import { findMyProjectList } from "@/api/publics";
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from "@/store/modules/user";
|
||||||
import { onMounted } from 'vue'
|
import { onMounted } from "vue";
|
||||||
import modelSelectDialog from './modelSelectDialog.vue'
|
import modelSelectDialog from "./modelSelectDialog.vue";
|
||||||
import uploadModelDialog from './uploadModelDialog.vue'
|
import uploadModelDialog from "./uploadModelDialog.vue";
|
||||||
import modelDialog from './modelDialog2.vue'
|
import modelDialog from "./modelDialog2.vue";
|
||||||
import { fileSize } from '@/utils'
|
import { fileSize } from "@/utils";
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance();
|
||||||
|
const unitInfos = [
|
||||||
const userStore = useUserStore()
|
{ value: 1, label: "米" },
|
||||||
const bimModelList = ref([])
|
{ value: 0.1, label: "分米" },
|
||||||
const open = ref(false)
|
{ value: 0.01, label: "厘米" },
|
||||||
const loading = ref(true)
|
{ value: 0.001, label: "毫米" },
|
||||||
const showSearch = ref(true)
|
{ value: 0.0001, label: "微米" },
|
||||||
const ids = ref([])
|
{ value: 0.0254, label: "英寸" },
|
||||||
const single = ref(true)
|
{ value: 1000, label: "千米" },
|
||||||
const multiple = ref(true)
|
];
|
||||||
const total = ref(0)
|
const userStore = useUserStore();
|
||||||
const title = ref('')
|
const bimModelList = ref([]);
|
||||||
const selDlg = ref()
|
const open = ref(false);
|
||||||
const uploadDlg = ref()
|
const loading = ref(true);
|
||||||
const mDlg = ref()
|
const showSearch = ref(true);
|
||||||
|
const ids = ref([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
const selDlg = ref();
|
||||||
|
const uploadDlg = ref();
|
||||||
|
const mDlg = ref();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
comId: null,
|
comId: null,
|
||||||
projectId: null,
|
projectId: null,
|
||||||
deptId: null,
|
deptId: null,
|
||||||
modelName: null,
|
modelName: null,
|
||||||
lightweightName: null,
|
lightweightName: null,
|
||||||
gisJson: null,
|
gisJson: null,
|
||||||
modelStatus: null,
|
modelStatus: null,
|
||||||
modelType: null,
|
modelType: null,
|
||||||
fileType: null,
|
fileType: null,
|
||||||
fileSize: null,
|
fileSize: null,
|
||||||
showSand: null,
|
showSand: null,
|
||||||
status: null,
|
status: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
comId: [{ required: true, message: '租户id不能为空', trigger: 'blur' }],
|
comId: [{ required: true, message: "租户id不能为空", trigger: "blur" }],
|
||||||
projectId: [{ required: true, message: '项目id不能为空', trigger: 'blur' }],
|
projectId: [{ required: true, message: "项目id不能为空", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
projects: [],
|
projects: [],
|
||||||
currentPrjId: null,
|
currentPrjId: null,
|
||||||
subDepts: [],
|
subDepts: [],
|
||||||
selModel: null,
|
selModel: null,
|
||||||
})
|
});
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data)
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
function showModel(row) {
|
function showModel(row) {
|
||||||
mDlg.value.showDialog(JSON.parse(row.gisJson))
|
mDlg.value.showDialog(JSON.parse(row.gisJson));
|
||||||
}
|
}
|
||||||
function toSize(size) {
|
function toSize(size) {
|
||||||
return fileSize(size)
|
return fileSize(size);
|
||||||
}
|
}
|
||||||
function doModelSelect(model) {
|
function doModelSelect(model) {
|
||||||
data.selModel = model
|
data.selModel = model;
|
||||||
form.value.modelName = model.name
|
form.value.modelName = model.name;
|
||||||
form.value.lightweightName = model.lightweightName
|
form.value.lightweightName = model.lightweightName;
|
||||||
form.value.fileSize = model.fileSize
|
form.value.fileSize = model.fileSize;
|
||||||
form.value.gisJson = JSON.stringify(model)
|
form.value.gisJson = JSON.stringify(model);
|
||||||
form.value.fileType = model.fileType
|
form.value.fileType = model.fileType;
|
||||||
form.value.modelType = model.softwareType
|
form.value.modelType = model.softwareType;
|
||||||
form.value.modelStatus = model.status
|
form.value.modelStatus = model.status;
|
||||||
form.value.sand = true
|
form.value.sand = true;
|
||||||
}
|
}
|
||||||
//上传模型
|
//上传模型
|
||||||
function handleUpload() {
|
function handleUpload() {
|
||||||
//uploadDlg.value.showDialog()
|
//uploadDlg.value.showDialog()
|
||||||
uploadDlg.value.show()
|
uploadDlg.value.show();
|
||||||
}
|
}
|
||||||
function selectModelHandler() {
|
function selectModelHandler() {
|
||||||
selDlg.value.showDialog()
|
selDlg.value.showDialog();
|
||||||
}
|
}
|
||||||
/** 查询Bim模型列表 */
|
/** 查询Bim模型列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true
|
loading.value = true;
|
||||||
listBimModel(queryParams.value).then((response) => {
|
listBimModel(queryParams.value).then((response) => {
|
||||||
bimModelList.value = (response.rows || []).map((it) => {
|
bimModelList.value = (response.rows || []).map((it) => {
|
||||||
it.sand = it.showSand == 1
|
it.sand = it.showSand == 1;
|
||||||
return it
|
it.unit = it.unit || 1;
|
||||||
})
|
let obj = unitInfos.find((it2) => it2.value == it.unit);
|
||||||
total.value = response.total
|
it.unitStr = obj ? obj.label : "米";
|
||||||
loading.value = false
|
it.unit = obj ? obj.value : 1;
|
||||||
})
|
return it;
|
||||||
|
});
|
||||||
|
total.value = response.total;
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
function cancel() {
|
function cancel() {
|
||||||
open.value = false
|
open.value = false;
|
||||||
reset()
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
function reset() {
|
function reset() {
|
||||||
form.value = {
|
form.value = {
|
||||||
modelId: null,
|
modelId: null,
|
||||||
comId: null,
|
comId: null,
|
||||||
projectId: null,
|
projectId: null,
|
||||||
deptId: null,
|
deptId: null,
|
||||||
modelName: null,
|
modelName: null,
|
||||||
lightweightName: null,
|
lightweightName: null,
|
||||||
gisJson: null,
|
gisJson: null,
|
||||||
modelStatus: null,
|
modelStatus: null,
|
||||||
modelType: null,
|
modelType: null,
|
||||||
fileType: null,
|
fileType: null,
|
||||||
fileSize: null,
|
fileSize: null,
|
||||||
showSand: null,
|
showSand: null,
|
||||||
status: null,
|
status: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
}
|
};
|
||||||
proxy.resetForm('bimModelRef')
|
proxy.resetForm("bimModelRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
queryParams.value.pageNum = 1
|
queryParams.value.pageNum = 1;
|
||||||
getList()
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
proxy.resetForm('queryRef')
|
proxy.resetForm("queryRef");
|
||||||
handleQuery()
|
handleQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
function handleSelectionChange(selection) {
|
function handleSelectionChange(selection) {
|
||||||
ids.value = selection.map((item) => item.modelId)
|
ids.value = selection.map((item) => item.modelId);
|
||||||
single.value = selection.length != 1
|
single.value = selection.length != 1;
|
||||||
multiple.value = !selection.length
|
multiple.value = !selection.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
reset()
|
reset();
|
||||||
open.value = true
|
open.value = true;
|
||||||
if (data.subDepts.length > 0) {
|
if (data.subDepts.length > 0) {
|
||||||
form.value.deptId = data.subDepts[0].id
|
form.value.deptId = data.subDepts[0].id;
|
||||||
} else {
|
} else {
|
||||||
form.value.deptId = null
|
form.value.deptId = null;
|
||||||
}
|
}
|
||||||
form.value.comId = userStore.currentComId
|
form.value.comId = userStore.currentComId;
|
||||||
form.value.projectId = data.currentPrjId
|
form.value.projectId = data.currentPrjId;
|
||||||
title.value = '添加Bim模型'
|
title.value = "添加Bim模型";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
function handleUpdate(row) {
|
function handleUpdate(row) {
|
||||||
reset()
|
reset();
|
||||||
const _modelId = row.modelId || ids.value
|
const _modelId = row.modelId || ids.value;
|
||||||
getBimModel(_modelId).then((response) => {
|
getBimModel(_modelId).then((response) => {
|
||||||
form.value = response.data
|
let it = response.data;
|
||||||
open.value = true
|
form.value = it;
|
||||||
title.value = '修改Bim模型'
|
form.value.unit = it.unit || 1;
|
||||||
})
|
let obj = unitInfos.find((it2) => it2.value == it.unit);
|
||||||
|
form.value.unitStr = obj ? obj.label : "米";
|
||||||
|
form.value.unit = obj ? obj.value : 1;
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改Bim模型";
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs['bimModelRef'].validate((valid) => {
|
proxy.$refs["bimModelRef"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
form.value.showSand = form.value.sand ? 1 : 0
|
form.value.showSand = form.value.sand ? 1 : 0;
|
||||||
if (form.value.modelId != null) {
|
if (form.value.modelId != null) {
|
||||||
updateBimModel(form.value).then((response) => {
|
updateBimModel(form.value).then((response) => {
|
||||||
proxy.$modal.msgSuccess('修改成功')
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
open.value = false
|
open.value = false;
|
||||||
getList()
|
getList();
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
addBimModel(form.value).then((response) => {
|
addBimModel(form.value).then((response) => {
|
||||||
proxy.$modal.msgSuccess('新增成功')
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
open.value = false
|
open.value = false;
|
||||||
getList()
|
getList();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
const _modelIds = row.modelId || ids.value
|
const _modelIds = row.modelId || ids.value;
|
||||||
proxy.$modal
|
proxy.$modal
|
||||||
.confirm('是否确认删除Bim模型编号为"' + _modelIds + '"的数据项?')
|
.confirm('是否确认删除Bim模型编号为"' + _modelIds + '"的数据项?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return delBimModel(_modelIds)
|
return delBimModel(_modelIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getList()
|
getList();
|
||||||
proxy.$modal.msgSuccess('删除成功')
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
proxy.download(
|
proxy.download(
|
||||||
'bim/bimModel/export',
|
"bim/bimModel/export",
|
||||||
{
|
{
|
||||||
...queryParams.value,
|
...queryParams.value,
|
||||||
},
|
},
|
||||||
`bimModel_${new Date().getTime()}.xlsx`
|
`bimModel_${new Date().getTime()}.xlsx`
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function queryProjectChange() {
|
function queryProjectChange() {
|
||||||
data.subDepts = []
|
data.subDepts = [];
|
||||||
queryParams.value.deptId = ''
|
queryParams.value.deptId = "";
|
||||||
if (queryParams.value.projectId) {
|
if (queryParams.value.projectId) {
|
||||||
getSubDepts(queryParams.value.projectId, (res) => {
|
getSubDepts(queryParams.value.projectId, (res) => {
|
||||||
data.subDepts = res
|
data.subDepts = res;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getSubDepts(prjId, cb) {
|
function getSubDepts(prjId, cb) {
|
||||||
listProProjectInfoSubdepts({ projectId: prjId, pageNum: 1, pageSize: 100, activeTags: 'finished' }).then((d) => {
|
listProProjectInfoSubdepts({ projectId: prjId, pageNum: 1, pageSize: 100, activeTags: "finished" }).then((d) => {
|
||||||
let subdepts = d.rows || []
|
let subdepts = d.rows || [];
|
||||||
cb && cb(subdepts)
|
cb && cb(subdepts);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
/** 查询项目列表 */
|
/** 查询项目列表 */
|
||||||
function getProjectList() {
|
function getProjectList() {
|
||||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then((response) => {
|
findMyProjectList({ pageNum: 1, pageSize: 100 }).then((response) => {
|
||||||
data.projects = response.rows
|
data.projects = response.rows;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
queryParams.value.projectId = userStore.currentPrjId
|
queryParams.value.projectId = userStore.currentPrjId;
|
||||||
queryParams.value.comId = userStore.currentComId
|
queryParams.value.comId = userStore.currentComId;
|
||||||
queryParams.value.deptId = ''
|
queryParams.value.deptId = "";
|
||||||
data.isAdmin = userStore.isAdmin
|
data.isAdmin = userStore.isAdmin;
|
||||||
queryProjectChange()
|
queryProjectChange();
|
||||||
data.currentPrjId = userStore.currentPrjId
|
data.currentPrjId = userStore.currentPrjId;
|
||||||
getProjectList()
|
getProjectList();
|
||||||
getList()
|
getList();
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -94,13 +94,11 @@ export default {
|
||||||
devices: [],
|
devices: [],
|
||||||
positionByModalId: "",
|
positionByModalId: "",
|
||||||
selItem: null,
|
selItem: null,
|
||||||
iconVideo: "",
|
|
||||||
addLabels: [],
|
addLabels: [],
|
||||||
viewPoint:null,
|
viewPoint:null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.iconVideo = icons["video"];
|
|
||||||
emitter.on("routeChanged", ({ to, from }) => {
|
emitter.on("routeChanged", ({ to, from }) => {
|
||||||
if (to.name === "SandTableSetting") {
|
if (to.name === "SandTableSetting") {
|
||||||
this.initEngine();
|
this.initEngine();
|
||||||
|
|
Loading…
Reference in New Issue