修改任务计划的导出功能

dev_xd
lj7788@126.com 2025-06-19 18:34:49 +08:00
parent 2a995c3e34
commit a0630e0036
4 changed files with 122 additions and 71 deletions

View File

@ -16,6 +16,16 @@ function groupData(data) {
} }
return tmps; return tmps;
} }
//清除选中构件样式
function clearSelectFeature(that) {
let api = bimBriefingApi;
if (that.selFeatureId) {
let modelId = that.selFeatureId.split("^")[0];
api.Feature.setColor(that.selFeatureId, "rgba(255,255,255,1)", modelId);
that.selFeatureId = "";
}
}
//查询构件属性信息
function dataFiltering(that, id) { function dataFiltering(that, id) {
const gild = id.split("^"); const gild = id.split("^");
let modelName = ""; let modelName = "";
@ -38,18 +48,15 @@ function dataFiltering(that, id) {
/** /**
* 获取构件属性信息 * 获取构件属性信息
*/ */
export function getProperty(that) { function getProperty(that) {
let api = bimBriefingApi; let api = bimBriefingApi;
api.Feature.getByEvent(true, (n) => { api.Feature.getByEvent(true, (n) => {
console.log(n); console.log(n);
if (n && n["id"]) { if (n && n["id"]) {
let featureId = n.id; let featureId = n.id;
if (featureId.split("^")[1]) { if (featureId.split("^")[1]) {
let modelId = featureId.split("^")[0]; let modelId = featureId.split("^")[0];
if (that.selFeatureId) { clearSelectFeature(that);
api.Feature.setColor(that.selFeatureId, "rgba(255,255,255,1)", modelId);
}
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;
dataFiltering(that, featureId); dataFiltering(that, featureId);
@ -65,17 +72,58 @@ export function getProperty(that) {
/** /**
* 获取构件尺寸信息 * 获取构件尺寸信息
*/ */
export function subFeatureSize(that) { function subFeatureSize(that) {
let api = bimBriefingApi; let api = bimBriefingApi;
api.Public.clearHandler(), that.info = [];
api.Measurement.clearAllTrace(); 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"]) {
let featureId = n.id; let featureId = n.id;
let modelId = featureId.split("^")[0];
clearSelectFeature(that);
api.Feature.getGeometrySizeById(featureId, (res) => { api.Feature.getGeometrySizeById(featureId, (res) => {
console.log(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) {}
//构件体积
function measuringVolume(that){
}
//构件距离
function distance(that){
}
//剖切
function initClipping(that){
}
//构件隐藏
function actorVisible(){
}
export default {
measurementArea,
clearSelectFeature,
getProperty,
subFeatureSize,
measuringVolume,
distance,
initClipping,
actorVisible,
};

View File

@ -37,32 +37,44 @@
<div class="div-row r66"> <div class="div-row r66">
<div class="row-title"> <div class="row-title">
<svg-icon icon-class="signal"></svg-icon> <svg-icon icon-class="signal"></svg-icon>
属性 {{ title }}
</div> </div>
<div class="model-properties scroll"> <div class="model-properties scroll">
<div class="loading" v-if="propertyLoad == 'start'"> <template v-if="selectMenu == 7">
{{ attributeInformation }} <div class="loading" v-if="propertyLoad == 'start'">
</div> {{ attributeInformation }}
<div class="model-property-nav" v-if="propertyLoad == 'end'"> </div>
<el-radio-group v-model="selPropertyType" size="small" fill="#6cf"> <div class="model-property-nav" v-if="propertyLoad == 'end'">
<el-radio-button label="att">属性</el-radio-button> <el-radio-group v-model="selPropertyType" size="small" fill="#6cf">
<el-radio-button label="type">类型</el-radio-button> <el-radio-button label="att">属性</el-radio-button>
</el-radio-group> <el-radio-button label="type">类型</el-radio-button>
</div> </el-radio-group>
<div class="model-property-list" v-if="propertyLoad == 'end'"> </div>
<div v-for="(item, index) in selPropertyType == 'att' ? propertyAttr : propertyType" :key="index"> <div class="model-property-list" v-if="propertyLoad == 'end'">
<div class="group-info"> <div v-for="(item, index) in selPropertyType == 'att' ? propertyAttr : propertyType" :key="index">
<svg-icon icon-class="info" /> <div class="group-info">
<span>{{ item.name }}</span> <svg-icon icon-class="info" />
<span>{{ item.name }}</span>
</div>
<table class="model-property-table my-table">
<tr v-for="(item2, index) in item.data" :key="index">
<th width="50%">{{ item2.propertyName }}</th>
<td width="50%">{{ item2.value }}</td>
</tr>
</table>
</div> </div>
<table class="model-property-table my-table"> </div>
<tr v-for="(item2, index) in item.data" :key="index"> </template>
<th width="50%">{{ item2.propertyName }}</th> <template v-if="selectMenu == 1 || selectMenu == 2">
<td width="50%">{{ item2.value }}</td> <div class="info-list">
<table class="model-property-table my-table" v-if="info.length > 0">
<tr v-for="(item, index) in info" :key="index">
<th width="50%">{{ item.name }}</th>
<td width="50%">{{ item.value }}</td>
</tr> </tr>
</table> </table>
</div> </div>
</div> </template>
</div> </div>
</div> </div>
@ -165,7 +177,7 @@
<script> <script>
import debounce from "lodash.debounce"; import debounce from "lodash.debounce";
import { MergeArray, DelArray } from "@/utils/tools"; import { MergeArray, DelArray } from "@/utils/tools";
import { getProperty,subFeatureSize } from "./bim/briefingProperty"; import briefingTools from "./bim/briefingTools";
import SvgIcon from "@/components/SvgIcon.vue"; import SvgIcon from "@/components/SvgIcon.vue";
export default { export default {
components: { SvgIcon }, components: { SvgIcon },
@ -188,6 +200,8 @@ export default {
selPropertyType: "att", selPropertyType: "att",
propertyLoad: "", propertyLoad: "",
viewPoint: [], viewPoint: [],
info: [],
title: "属性",
}; };
}, },
mounted() { mounted() {
@ -213,31 +227,39 @@ export default {
doSelectMenu(index) { doSelectMenu(index) {
this.selectMenu = index; this.selectMenu = index;
let api = bimBriefingApi; let api = bimBriefingApi;
api.Feature.getByEvent(false); api.Feature.getByEvent(false);
briefingTools.clearSelectFeature(this);
switch (index) { switch (index) {
case 0: case 0:
this.resetScene(); this.resetScene();
this.title = "主界面";
break; break;
case 1: case 1:
subFeatureSize(this); briefingTools.subFeatureSize(this);
this.title = "尺寸测量";
break; break;
case 2: case 2:
this.measureArea(index); briefingTools.measurementArea(this);
this.title = "面积测量";
break; break;
case 3: case 3:
this.measureVolume(index); briefingTools.measurementVolume(this);
break; break;
case 4: case 4:
this.measureDistance(index); briefingTools.distance(this);
this.title = "距离测量";
break; break;
case 5: case 5:
this.sectioning(index); briefingTools.initClipping(this);
this.title = "剖切";
break; break;
case 6: case 6:
this.hideModel(index); briefingTools.actorVisible(this);
this.title = "隐藏";
break; break;
case 7: case 7:
getProperty(this); briefingTools.getProperty(this);
this.title = "属性";
break; break;
} }
}, },
@ -648,6 +670,9 @@ export default {
.model-property-list { .model-property-list {
padding: 0px 10px; padding: 0px 10px;
} }
.info-list {
padding: 10px;
}
} }
.model-progress { .model-progress {
padding: 10px; padding: 10px;

View File

@ -92,8 +92,12 @@ public class ProPlanController extends BaseController
//subTask.setId(proPlan.getTaskId().intValue()); //subTask.setId(proPlan.getTaskId().intValue());
subTask.setOutlineLevel(proPlan.getTaskOutlineLevel().intValue()); subTask.setOutlineLevel(proPlan.getTaskOutlineLevel().intValue());
subTask.setGuid(proPlan.getTaskUniqueId()); subTask.setGuid(proPlan.getTaskUniqueId());
subTask.setStart(proPlan.getStartDate()); if(proPlan.getStartDate()!=null){
subTask.setFinish(proPlan.getFinishDate()); subTask.setStart(proPlan.getStartDate());
}
if(proPlan.getFinishDate()!=null){
subTask.setFinish(proPlan.getFinishDate());
}
} }

View File

@ -2,38 +2,12 @@
<div <div
:class="{ 'has-logo': showLogo }" :class="{ 'has-logo': showLogo }"
:style="{ :style="{
backgroundColor: backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground,
sideTheme === 'theme-dark' }">
? variables.menuBackground
: variables.menuLightBackground,
}"
>
<logo v-if="showLogo" :collapse="isCollapse" /> <logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper"> <el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper">
<el-menu <el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground" :text-color="sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor" :unique-opened="true" :active-text-color="theme" :collapse-transition="false" mode="vertical">
:default-active="activeMenu" <sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route" :base-path="route.path" />
:collapse="isCollapse"
:background-color="
sideTheme === 'theme-dark'
? variables.menuBackground
: variables.menuLightBackground
"
:text-color="
sideTheme === 'theme-dark'
? variables.menuColor
: variables.menuLightColor
"
:unique-opened="true"
:active-text-color="theme"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"
/>
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -58,7 +32,7 @@ const sidebarRouters = computed(() => {
tmps.forEach((item) => { tmps.forEach((item) => {
if (item.meta && item.meta.title == "项目大屏") { if (item.meta && item.meta.title == "项目大屏") {
item.name += "?prjId=" + userStore.currentPrjId; item.name += "?prjId=" + userStore.currentPrjId;
item.path += "?prjId=" + userStore.currentPrjId; item.path = location.origin + item.path + "?prjId=" + userStore.currentPrjId;
} }
}); });
return tmps; return tmps;