项目改造,删除AntD组件引用

dev_xd
lj7788@126.com 2025-07-17 15:52:12 +08:00
parent 6d73f7f510
commit 3347dd0be5
8 changed files with 237 additions and 228 deletions

View File

@ -22,7 +22,6 @@
"@rollup/plugin-commonjs": "^28.0.0", "@rollup/plugin-commonjs": "^28.0.0",
"@vueup/vue-quill": "1.2.0", "@vueup/vue-quill": "1.2.0",
"@vueuse/core": "10.11.0", "@vueuse/core": "10.11.0",
"ant-design-vue": "^4.2.6",
"axios": "0.28.1", "axios": "0.28.1",
"bpmn-js": "^11.4.1", "bpmn-js": "^11.4.1",
"diagram-js": "^11.9.1", "diagram-js": "^11.9.1",

View File

@ -56,24 +56,12 @@ import DictTag from "@/components/DictTag";
import VForm3 from "@/lib/vform/designer.umd.js"; import VForm3 from "@/lib/vform/designer.umd.js";
import "@/lib/vform/designer.style.css"; import "@/lib/vform/designer.style.css";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { notification, message, Modal } from "ant-design-vue"; import { ElMessageBox } from 'element-plus'
const app = createApp(App); const app = createApp(App);
notification.config({
placement: "topLeft",
bottom: "50px",
top: "50px",
duration: 3,
});
// 全局方法挂载 // 全局方法挂载
app.config.globalProperties.$confirm = Modal.confirm; app.config.globalProperties.$confirm =ElMessageBox.confirm;
app.config.globalProperties.$message = message;
app.config.globalProperties.$notification = notification;
app.config.globalProperties.$info = Modal.info;
app.config.globalProperties.$success = Modal.success;
app.config.globalProperties.$error = Modal.error;
app.config.globalProperties.$warning = Modal.warning;
app.config.globalProperties.useDict = useDict; app.config.globalProperties.useDict = useDict;
app.config.globalProperties.download = download; app.config.globalProperties.download = download;
app.config.globalProperties.parseTime = parseTime; app.config.globalProperties.parseTime = parseTime;

View File

@ -1,6 +1,6 @@
import axios from "axios"; import axios from "axios";
import useBimStore from "@/store/modules/bim"; import useBimStore from "@/store/modules/bim";
import notification from "ant-design-vue/es/notification"; import { ElNotification } from 'element-plus'
// 创建 axios 实例 // 创建 axios 实例
const request = axios.create({ const request = axios.create({
@ -15,15 +15,18 @@ const errorHandler = (error) => {
if (error.response) { if (error.response) {
if ([500, 400, 403].some((x) => x === error.response.status)) { if ([500, 400, 403].some((x) => x === error.response.status)) {
const data = error.response.data; const data = error.response.data;
notification.error({
message: "错误", ElNotification({
description: title: "错误",
data.message || position: 'bottom-right',
message: data.message ||
(data.error.validationErrors && (data.error.validationErrors &&
data.error.validationErrors[0].message) || data.error.validationErrors[0].message) ||
data.error.message || data.error.message ||
data.error_description, data.error_description,
}); type: 'error',
})
} }
if (error.response.status === 401) { if (error.response.status === 401) {
} }

View File

@ -5,7 +5,7 @@
<el-form-item label="经度" prop="latitude"> <el-form-item label="经度" prop="latitude">
<el-input v-model="form.latitude" placeholder="例如108.88" /> <el-input v-model="form.latitude" placeholder="例如108.88" />
</el-form-item> </el-form-item>
<el-form-item label="纬度" prop="longitude"> <el-form-item label="纬度" prop="longitude" style="margin-top:8px;">
<el-input v-model="form.longitude" placeholder="例如34.2" /> <el-input v-model="form.longitude" placeholder="例如34.2" />
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -1,222 +1,225 @@
<template> <template>
<a-modal title="上传模型" :width="800" :maskClosable="false" :open="visible" :confirmLoading="confirmLoading" <el-dialog title="上传模型" :width="800" :modal-append-to-body="false" :close-on-click-modal="false" v-model="visible"
@ok="handleOk" @cancel="hide" ok-text="确定" cancel-text="取消" wrapClassName="upload-model-dialog"> :before-close="hide" :confirm-loading="confirmLoading" class="upload-model-dialog footer-center">
<a-form :model="form" ref="mainFrom" :labelCol="{ span: 4 }" :wrapperCol="{ span: 18 }" :rules="formRules" <el-form :model="form" ref="mainFrom" :label-width="100" :rules="formRules" class="scroll-box">
class="scroll-box"> <el-form-item label="模型类型" prop="options">
<a-form-item label="模型类型" name="options"> <el-cascader ref="elCascader" :show-all-levels="false" v-model="form.options" placeholder="请选择"
<div> :options="categoryList" style="width: 100%;" @change="onChangeOptions"></el-cascader>
<a-cascader v-model:value="form.options" placeholder="请选择" :options="categoryList" </el-form-item>
@change="onChangeOptions"></a-cascader>
</div>
</a-form-item>
<div v-if="showScene"> <div v-if="showScene">
<div v-if="software != 'glb' && software != 'gltf' && software != 'LOD'"> <div v-if="software != 'glb' && software != 'gltf' && software != 'LOD'">
<a-form-item v-if="loType === 'epsg'" class="special-item"> <el-form-item v-if="loType === 'epsg'" class="special-item">
<template #label> <template #label>
空间参考 空间参考
<a-tooltip> <el-tooltip>
<el-icon color="DeepSkyBlue"> <template #content>
<QuestionFilled />
</el-icon>
<template #title>
<div> <div>
<p> <p>用于确定模型的真实位置此项设置不当将导致处理结果位置不正确甚至处理失败</p>
用于确定模型的真实位置此项设置不当将导致处理结果位置不正确甚至处理失败 <p>可以填ENU坐标EPSG编码和表示空间参考的PROJ或WKT格式的字符串</p>
</p>
<p>
可以填ENU坐标EPSG编码和表示空间参考的PROJ或WKT格式的字符串
</p>
<a href="https://epsg.io" target="_blank">EPSG编码查询</a> <a href="https://epsg.io" target="_blank">EPSG编码查询</a>
</div> </div>
</template> </template>
</a-tooltip> <el-icon color="deepskyblue" style="margin-left: 5px">
<QuestionFilled />
</el-icon>
</el-tooltip>
</template> </template>
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<a-textarea v-model:value="srs" placeholder="例如EPSG:4545" <el-input v-model="srs" placeholder="例如EPSG:4545" type="textarea" :rows="3"></el-input>
:auto-size="{ minRows: 3, maxRows: 5 }" />
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<a-button style="margin-left: 10px" type="primary" <el-button style="margin-left: 10px" type="primary" @click="doGetLocaltion">
@click="doGetLocaltion">经纬度局部坐标系</a-button> 经纬度局部坐标系
<a-tooltip> </el-button>
<el-icon color="DeepSkyBlue"> <el-tooltip>
<QuestionFilled /> <template #content>
</el-icon>
<template #title>
<div> <div>
模型底部中心点将与经纬度局部坐标系中的经纬度重合默认经纬度为葛兰岱尔经纬度:ENU:34.2,108.88 模型底部中心点将与经纬度局部坐标系中的经纬度重合默认经纬度为葛兰岱尔经纬度:ENU:34.2,108.88
</div> </div>
</template> </template>
</a-tooltip> <el-icon color="deepskyblue" style="margin-left: 5px">
<LocalCoordinates ref="localEl" @LocalClose="LocalClose"
@LocalCoordinatesValue="LocalCoordinatesValue"></LocalCoordinates>
</el-col>
</el-row>
</a-form-item>
<a-form-item v-if="loType === 'epsg'">
<template #label>
零点坐标&nbsp;
<a-tooltip>
<el-icon color="DeepSkyBlue">
<QuestionFilled /> <QuestionFilled />
</el-icon> </el-icon>
<template #title> </el-tooltip>
<LocalCoordinates ref="localEl" @LocalClose="LocalClose"
@LocalCoordinatesValue="LocalCoordinatesValue">
</LocalCoordinates>
</el-col>
</el-row>
</el-form-item>
<el-form-item v-if="loType === 'epsg'">
<template #label>
零点坐标
<el-tooltip>
<template #content>
<div> <div>
<p> <p>指定模型原点相对空间参考的偏移量分为xyz三个方向单位米默认为不偏移(0,0,0)设置此值可以让模型往相应的方向偏移</p>
指定模型原点相对空间参考的偏移量分为xyz三个方向单位米默认为不偏移(0,0,0)设置此值可以让模型往相应的方向偏移 <p>针对<span
</p> style="color: #21ad8d">Revit</span>模型如若模型中项目基点设置了偏移值"北/南""东/西"高程则轻量化程序将自动提取
<p>
针对
<span style="color: #21ad8d">Revit</span>模型如若模型中项目基点设置了偏移值"北/南""东/西"高程
则轻量化程序将自动提取
</p> </p>
</div> </div>
</template> </template>
</a-tooltip> <el-icon color="deepskyblue" style="margin-left: 5px">
<QuestionFilled />
</el-icon>
</el-tooltip>
</template> </template>
<a-input v-model:value="srsOrigin" placeholder="例如:[0,0,0]" /> <el-input v-model="srsOrigin" placeholder="例如:[0,0,0]" />
</a-form-item> </el-form-item>
<a-row v-if="loType != 'epsg'"> <el-row v-if="loType != 'epsg'">
<a-col :span="12"> <el-col :span="12">
<a-form-item label="经度" :labelCol="{ span: 8 }" :wrapperCol="{ span: 14 }" name="longitude"> <el-form-item label="经度" prop="longitude">
<a-input v-model:value="form.longitude" :placeholder="positionType === '2' <el-input v-model="form.longitude" :placeholder="positionType === '2'
? '例如1.9003144895714261' ? '例如1.9003144895714261'
: '例如108.88' : '例如108.88'
" /> " />
</a-form-item> </el-form-item>
</a-col> </el-col>
<a-col :span="10"> <el-col :span="10">
<a-form-item label="纬度" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }" name="latitude"> <el-form-item label="纬度" prop="latitude">
<a-input v-model:value="form.latitude" :placeholder="positionType === '2' <el-input v-model="form.latitude" :placeholder="positionType === '2'
? '例如0.5969026041820608' ? '例如0.5969026041820608'
: '例如34.2' : '例如34.2'
" /> " />
</a-form-item> </el-form-item>
</a-col> </el-col>
</a-row> </el-row>
<a-row v-if="loType != 'epsg'">
<a-col :span="12"> <el-row v-if="loType != 'epsg'">
<a-form-item label="高度" :labelCol="{ span: 8 }" :wrapperCol="{ span: 14 }" <el-col :span="12">
name="transHeight"> <el-form-item label="高度" prop="transHeight">
<a-input v-model:value="form.transHeight" placeholder="例如0" /> <el-input v-model="form.transHeight" placeholder="例如0" />
</a-form-item> </el-form-item>
</a-col> </el-col>
</a-row> </el-row>
</div> </div>
<a-form-item label="LOD模式" v-if="
<el-form-item label="LOD模式" v-if="
category == '1' && category == '1' &&
software != 'glb' && software != 'glb' &&
software != 'gltf' && software != 'gltf' &&
software != 'LOD' software != 'LOD'
"> ">
<a-select v-model:value="isLod"> <el-select v-model="isLod">
<a-select-option :value="0">不启用</a-select-option> <el-option :value="0" label="不启用"></el-option>
<a-select-option :value="1">启用</a-select-option> <el-option :value="1" label="启用"></el-option>
</a-select> </el-select>
</a-form-item> </el-form-item>
<a-space class="lod-style" v-if="isLod">
<el-space class="lod-style" v-if="isLod">
<el-row style="margin-bottom: 20px"> <el-row style="margin-bottom: 20px">
<el-col :span="10"> <el-col :span="10">
<div> <div>
<a-form-item label="X轴向切块数" path="xCount" :labelCol="{ span: 9 }" <el-form-item label="X轴向切块数" prop="xCount">
:wrapperCol="{ span: 12 }"> <el-input-number placeholder="请输入X轴向切块数" v-model="modelValue.xCount" :min="1" />
<a-input-number placeholder="请输入X轴向切块数" v-model:value="modelValue.xCount" </el-form-item>
:min="1" /> <el-form-item label="Y轴向切块数" prop="yCount">
</a-form-item> <el-input-number placeholder="请输入Y轴向切块数" v-model="modelValue.yCount" :min="1" />
<a-form-item label="Y轴向切块数" path="yCount" :labelCol="{ span: 9 }" </el-form-item>
:wrapperCol="{ span: 12 }"> <el-form-item label="Z轴向层级数" prop="level">
<a-input-number placeholder="请输入Y轴向切块数" v-model:value="modelValue.yCount" <el-input-number placeholder="请输入Z轴向层级数" v-model="modelValue.level" :min="1" />
:min="1" /> </el-form-item>
</a-form-item>
<a-form-item label="Z轴向层级数" path="level" :labelCol="{ span: 9 }"
:wrapperCol="{ span: 12 }">
<a-input-number placeholder="请输入Z轴向层级数" v-model:value="modelValue.level" :min="1" />
</a-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="12">
<a-table :columns="columns" :data-source="optionsSelect" :bordered="true" <el-col :span="12" style="padding-left:12px;">
:pagination="false" :scroll="{ y: 125 }">
<template v-slot:headerCell="{ column }"> <el-table :data="optionsSelect" border height="150">
<div v-if="column.key === 'num'" style="display: flex; justify-content: center"> <el-table-column>
<template #header>
<div>层级配比</div> <div>层级配比</div>
</template>
<template #default="scope">
{{ scope.row.label }}
</template>
</el-table-column>
<el-table-column>
<template #header>
<div class="option-btn"> <div class="option-btn">
<img src="@/assets/bim/reduce.png" @click="cuttingLayerClick('reduce')" /> <img src="@/assets/bim/reduce.png" @click="cuttingLayerClick('reduce')" />
<img src="@/assets/bim/add.png" @click="cuttingLayerClick('add')" /> <img src="@/assets/bim/add.png" @click="cuttingLayerClick('add')" />
</div> </div>
</div>
</template> </template>
<template v-slot:bodyCell="{ column, record }"> <template #default="scope">
<template v-if="column.key === 'num'"> <el-input placeholder="请输入当前层级配比" v-model="scope.row.num">
<a-input placeholder="请输入当前层级配比" v-model:value="record.num">
<template #suffix>%</template> <template #suffix>%</template>
</a-input> </el-input>
</template> </template>
</template> </el-table-column>
</a-table> </el-table>
</el-col> </el-col>
</el-row> </el-row>
</a-space> </el-space>
</div> </div>
<a-form-item v-if="software === 'revit'" label="轻量化模式" name="style"> <el-form-item label="轻量化模式" prop="style" v-if="software === 'revit'">
<a-select v-model:value="form.style"> <el-select v-model="form.style">
<a-select-option value="1">真实模式</a-select-option> <el-option value="1" label="真实模式"></el-option>
<a-select-option value="0">着色模式</a-select-option> <el-option value="0" label="着色模式"></el-option>
</a-select> </el-select>
</a-form-item> </el-form-item>
<a-form-item v-if="
<el-form-item label="精细度" prop="accuracy" v-if="
software === 'revit' || software === 'revit' ||
software === 'bentley' || software === 'bentley' ||
software === 'stp|step' software === 'stp|step'
" label="精细度" name="accuracy"> ">
<a-select v-model:value="form.accuracy"> <el-select v-model="form.accuracy">
<a-select-option value="3">低精度</a-select-option> <el-option value="3" label="低精度"></el-option>
<a-select-option value="5">标准</a-select-option> <el-option value="5" label="标准"></el-option>
<a-select-option value="7">高精度</a-select-option> <el-option value="7" label="高精度"></el-option>
</a-select> </el-select>
</a-form-item> </el-form-item>
<a-form-item v-if="software === 'tif'" label="数据类型" name="format">
<a-select v-model:value="form.format"> <el-form-item label="数据类型" prop="format" v-if="software === 'tif'">
<a-select-option value="dem">地形数据</a-select-option> <el-select v-model="form.format">
<a-select-option value="dom">影像数据</a-select-option> <el-option value="dem" label="地形数据"></el-option>
</a-select> <el-option value="dom" label="影像数据"></el-option>
</a-form-item> </el-select>
<a-form-item label="可视距离" v-if="software === 'osgb'" name="visibleDistance"> </el-form-item>
<a-input v-model:value="form.visibleDistance" />
</a-form-item> <el-form-item label="可视距离" prop="visibleDistance" v-if="software === 'osgb'">
<a-form-item label="选择文件" name="files"> <el-input v-model="form.visibleDistance" />
{{ form.files }} </el-form-item>
<a-form-item-rest>
<a-input type="hidden" v-model:value="form.files" /> <el-form-item label="选择文件" prop="files">
</a-form-item-rest> <el-input type="hidden" v-model="form.files" />
<a-upload-dragger :file-list="fileList" @remove="handleRemove" :before-upload="beforeUpload" <el-upload action="" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false"
:multiple="true" :showUploadList="{ showRemoveIcon: showDelete }" :accept="accept"> @change="beforeUpload" :multiple="true" :accept="accept" class="upload-dragger" drag
<p class="ant-upload-drag-icon"> style="width:100%">
<el-icon size="40" color="#888"> <el-icon size="40" color="#888">
<Upload /> <UploadFilled />
</el-icon> </el-icon>
</p> <div class="el-upload__text">
<p class="ant-upload-text">
单击或拖动文件到此区域进行上传支持批量上传 单击或拖动文件到此区域进行上传支持批量上传
</p>
</a-upload-dragger>
<div v-show="progressShow" style="width: 100%">
<a-progress :percent="percent" />
</div> </div>
</a-form-item> </el-upload>
<a-form-item :wrapperCol="{ offset: 1, span: 21 }" label> <div v-show="progressShow" style="width: 100%; margin-top: 10px">
<el-progress :percentage="percent" />
</div>
</el-form-item>
<el-form-item>
<div v-if="accept.length > 0" style="color: red"> <div v-if="accept.length > 0" style="color: red">
支持的格式{{ accept.length > 0 ? accept.split(",").join(" ") : "" }} 支持的格式{{ accept.length > 0 ? accept.split(",").join(" ") : "" }}
</div> </div>
<div style="color: #999; line-height: 24px"> <div style="color: #999; line-height: 24px">
<div v-html="description"></div> <div v-html="description"></div>
</div> </div>
</a-form-item> </el-form-item>
</a-form> </el-form>
</a-modal> <template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="handleOk" :loading="saveLoading"> </el-button>
<el-button @click="visible = false"> </el-button>
</div>
</template>
</el-dialog>
</template> </template>
<script> <script>
@ -331,6 +334,7 @@ export default {
align: "center", align: "center",
}, },
], ],
saveLoading: false,
}; };
}, },
methods: { methods: {
@ -345,10 +349,12 @@ export default {
} }
}, },
// //
onChangeOptions(e, selectedOptions) { onChangeOptions(e) {
if (selectedOptions && e.length > 0) { if (e.length > 0) {
let selectedOptions = this.$refs.elCascader.getCheckedNodes()[0].pathNodes.map(d => d.data)
this.showScene = e[0] == 1; this.showScene = e[0] == 1;
this.fileList = []; this.fileList = [];
this.form.files = "";
if (e[0] == "3" || e[0] == "4") { if (e[0] == "3" || e[0] == "4") {
//pak cad //pak cad
this.accept = selectedOptions[0].accept; this.accept = selectedOptions[0].accept;
@ -356,7 +362,6 @@ export default {
this.software = selectedOptions[0].sign; this.software = selectedOptions[0].sign;
this.description = selectedOptions[0].description; this.description = selectedOptions[0].description;
} else { } else {
// this.accept = [...e].reverse()[0]
this.accept = selectedOptions[selectedOptions.length - 1].accept; this.accept = selectedOptions[selectedOptions.length - 1].accept;
this.category = e[0]; this.category = e[0];
this.software = selectedOptions[1].sign; this.software = selectedOptions[1].sign;
@ -373,6 +378,7 @@ export default {
level: 2, level: 2,
cuttingLayer: 4, cuttingLayer: 4,
}; };
console.log("===>", this.accept, this.category, this.software, this.description)
this.cuttingLayerChange(this.modelValue.cuttingLayer); this.cuttingLayerChange(this.modelValue.cuttingLayer);
}, },
//api //api
@ -658,6 +664,7 @@ export default {
that.percent = 100; that.percent = 100;
that.upload = false; that.upload = false;
that.confirmLoading = false; that.confirmLoading = false;
that.saveLoading = false;
that.hide(); that.hide();
}, },
// //
@ -707,8 +714,11 @@ export default {
// //
that.showDelete = false; that.showDelete = false;
that.$refs.mainFrom that.$refs.mainFrom
.validateFields() .validate((b) => {
.then((values) => { if (!b) {
return;
}
let values = that.form;
let total = 0; let total = 0;
that.optionsSelect.forEach((item) => { that.optionsSelect.forEach((item) => {
total += item.num * 1; total += item.num * 1;
@ -722,14 +732,16 @@ export default {
that.$modal.msgError("当前层级配比小于100%,请重新填写"); that.$modal.msgError("当前层级配比小于100%,请重新填写");
return; return;
} }
that.confirmLoading = true;
that.progressShow = true;
that.upload = true;
const parentId = values.id;
if (that.fileList.length == 0) { if (that.fileList.length == 0) {
that.$modal.msgError("请选择文件"); that.$modal.msgError("请选择文件");
return; return;
} }
that.confirmLoading = true;
that.progressShow = true;
that.upload = true;
that.saveLoading = true;
const parentId = values.id;
document.querySelector(".upload-model-dialog .el-dialog__body").scrollTop = 99999;
if (that.uploadType == "0") { if (that.uploadType == "0") {
if (that.fileList.length > 1) { if (that.fileList.length > 1) {
that.$message.warning("此时为单模型上传默认上传"); that.$message.warning("此时为单模型上传默认上传");
@ -768,7 +780,7 @@ export default {
} }
); );
} else { } else {
const res = await splitResult(file, 1024 * 1024 * 2); const res = await splitResult(file.raw, 1024 * 1024 * 2);
that.chunkList = res.chunkList; that.chunkList = res.chunkList;
const suffixName = that.accept const suffixName = that.accept
.split(",") .split(",")
@ -792,7 +804,6 @@ export default {
this.form.files = this.fileList.map((x) => x.uid).join(","); this.form.files = this.fileList.map((x) => x.uid).join(",");
}, },
beforeUpload(file) { beforeUpload(file) {
debugger;
if ( if (
this.category == "1" && this.category == "1" &&
this.software != "glt" && this.software != "glt" &&
@ -860,6 +871,7 @@ export default {
this.category = options[0]; this.category = options[0];
this.software = label[1]; this.software = label[1];
this.showScene = options[0] == 1; this.showScene = options[0] == 1;
} }
if (file.name.split(".")[0].length <= 50) { if (file.name.split(".")[0].length <= 50) {
this.fileList = [...this.fileList, file]; this.fileList = [...this.fileList, file];
@ -947,6 +959,9 @@ export default {
return 100 - index; return 100 - index;
}, },
}, },
mounted() {
window.upDlg = this
}
}; };
</script> </script>
@ -1034,17 +1049,25 @@ export default {
color: #21ad8d; color: #21ad8d;
} }
}
</style>
<style lang="scss">
.upload-model-dialog {
.lod-style { .lod-style {
align-items: start !important; align-items: start !important;
width: 100%;
.ant-space-item { .el-space__item {
width: 45%; width: 100%;
.ant-input-number { .el-input-number {
width: 100%; width: 100%;
} }
.ant-table { .el-table {
border-bottom: 1px solid rgba(232, 232, 232, 0.5); border-bottom: 1px solid rgba(232, 232, 232, 0.5);
tr>td, tr>td,
@ -1095,10 +1118,3 @@ export default {
} }
} }
</style> </style>
<style lang="scss">
.upload-model-dialog {
.ant-modal-footer {
text-align: center;
}
}
</style>

View File

@ -3,31 +3,31 @@
<div id="bimSettingContainer"></div> <div id="bimSettingContainer"></div>
<model-floor-tree ref="modelFloorTree" @change="doChange" @modelAdd="modelAdded" :projectMessage="models" v-if="showTree"></model-floor-tree> <model-floor-tree ref="modelFloorTree" @change="doChange" @modelAdd="modelAdded" :projectMessage="models" v-if="showTree"></model-floor-tree>
<div class="footer-box" v-if="showModels.length > 0"> <div class="footer-box" v-if="showModels.length > 0">
<a-tooltip placement="top" title="主视图"> <el-tooltip placement="top" content="主视图">
<div class="footer-btn" @click="doMenu(0)" :class="activeMenu == 0 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(0)" :class="activeMenu == 0 ? 'is-active' : ''">
<svg-icon icon-class="home" /> <svg-icon icon-class="home" />
</div> </div>
</a-tooltip> </el-tooltip>
<a-tooltip placement="top" title="第一人称漫游"> <el-tooltip placement="top" content="第一人称漫游">
<div class="footer-btn" @click="doMenu(1)" :class="activeMenu == 1 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(1)" :class="activeMenu == 1 ? 'is-active' : ''">
<svg-icon icon-class="roam" /> <svg-icon icon-class="roam" />
</div> </div>
</a-tooltip> </el-tooltip>
<a-tooltip placement="top" title="自定义视点漫游"> <el-tooltip placement="top" content="自定义视点漫游">
<div class="footer-btn" @click="doMenu(2)" :class="activeMenu == 2 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(2)" :class="activeMenu == 2 ? 'is-active' : ''">
<svg-icon icon-class="view" /> <svg-icon icon-class="view" />
</div> </div>
</a-tooltip> </el-tooltip>
<a-tooltip placement="top" title="视点管理"> <el-tooltip placement="top" content="视点管理">
<div class="footer-btn" @click="doMenu(3)" :class="activeMenu == 3 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(3)" :class="activeMenu == 3 ? 'is-active' : ''">
<svg-icon icon-class="camera" /> <svg-icon icon-class="camera" />
</div> </div>
</a-tooltip> </el-tooltip>
<a-tooltip placement="top" title="构件隐藏"> <el-tooltip placement="top" content="构件隐藏">
<div class="footer-btn" @click="doMenu(4)" :class="activeMenu == 4 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(4)" :class="activeMenu == 4 ? 'is-active' : ''">
<svg-icon icon-class="hide" /> <svg-icon icon-class="hide" />
</div> </div>
</a-tooltip> </el-tooltip>
</div> </div>
<div class="bim-setting-tools" v-show="activeMenu > 0"> <div class="bim-setting-tools" v-show="activeMenu > 0">
<div class="tools-title"> <div class="tools-title">
@ -55,12 +55,14 @@ import ModelFloorTree from "./ModelFloorTree.vue";
import PersonRoaming from "./PersonRoaming.vue"; import PersonRoaming from "./PersonRoaming.vue";
import CustomViewpoint from "./CustomViewpoint.vue"; import CustomViewpoint from "./CustomViewpoint.vue";
import Viewpoint from "./Viewpoint.vue"; import Viewpoint from "./Viewpoint.vue";
import { ElMessage, ElTooltip } from 'element-plus';
export default { export default {
components: { components: {
ModelFloorTree, ModelFloorTree,
PersonRoaming, PersonRoaming,
CustomViewpoint, CustomViewpoint,
Viewpoint, Viewpoint,
ElTooltip
}, },
data() { data() {
return { return {
@ -234,7 +236,7 @@ export default {
return it; return it;
}); });
if (this.models.length == 0) { if (this.models.length == 0) {
this.$modal.msgError("暂无模型,请先关联模型"); ElMessage.error("暂无模型,请先关联模型");
} else { } else {
this.showTree = true; this.showTree = true;
} }

View File

@ -4,31 +4,31 @@
<div id="bimSandTableSettingContainer" class="bimSandTableSettingContainer"></div> <div id="bimSandTableSettingContainer" class="bimSandTableSettingContainer"></div>
</div> </div>
<div class="footer-box" v-if="models.length > 0"> <div class="footer-box" v-if="models.length > 0">
<a-tooltip placement="top" title="主视图"> <el-tooltip placement="top" content="主视图">
<div class="footer-btn" @click="doMenu(0)" :class="activeMenu == 0 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(0)" :class="activeMenu == 0 ? 'is-active' : ''">
<svg-icon icon-class="home" /> <svg-icon icon-class="home" />
</div> </div>
</a-tooltip> </el-tooltip>
<a-tooltip placement="top" title="视频监控"> <el-tooltip placement="top" content="视频监控">
<div class="footer-btn" @click="doMenu(1)" :class="activeMenu == 1 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(1)" :class="activeMenu == 1 ? 'is-active' : ''">
<svg-icon icon-class="videoMonitor" /> <svg-icon icon-class="videoMonitor" />
</div> </div>
</a-tooltip> </el-tooltip>
<a-tooltip placement="top" title="基坑监控"> <el-tooltip placement="top" content="基坑监控">
<div class="footer-btn" @click="doMenu(2)" :class="activeMenu == 2 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(2)" :class="activeMenu == 2 ? 'is-active' : ''">
<svg-icon icon-class="pitMonitor" /> <svg-icon icon-class="pitMonitor" />
</div> </div>
</a-tooltip> </el-tooltip>
<a-tooltip placement="top" title="塔机监控"> <el-tooltip placement="top" content="塔机监控">
<div class="footer-btn" @click="doMenu(3)" :class="activeMenu == 3 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(3)" :class="activeMenu == 3 ? 'is-active' : ''">
<svg-icon icon-class="towerMonitor" /> <svg-icon icon-class="towerMonitor" />
</div> </div>
</a-tooltip> </el-tooltip>
<a-tooltip placement="top" title="电箱监控"> <el-tooltip placement="top" content="电箱监控">
<div class="footer-btn" @click="doMenu(4)" :class="activeMenu == 4 ? 'is-active' : ''"> <div class="footer-btn" @click="doMenu(4)" :class="activeMenu == 4 ? 'is-active' : ''">
<svg-icon icon-class="power" /> <svg-icon icon-class="power" />
</div> </div>
</a-tooltip> </el-tooltip>
</div> </div>
<div class="bim-setting-tools" v-show="activeMenu > 0"> <div class="bim-setting-tools" v-show="activeMenu > 0">
<div class="tools-title"> <div class="tools-title">
@ -73,7 +73,7 @@
<script> <script>
import useUserStore from "@/store/modules/user"; import useUserStore from "@/store/modules/user";
import { listBimModel } from "@/api/bim/bimModel"; import { listBimModel } from "@/api/bim/bimModel";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox, ElTooltip } from "element-plus";
import { emitter } from "@/router/index.js"; import { emitter } from "@/router/index.js";
import { devicePositionGet, devicePositionAddItems, devicePositionUpdateItems,getDefaultViewPoint } from "@/api/bim/bim.js"; import { devicePositionGet, devicePositionAddItems, devicePositionUpdateItems,getDefaultViewPoint } from "@/api/bim/bim.js";
@ -82,6 +82,7 @@ export default {
name: "SandTableSetting", name: "SandTableSetting",
components: { components: {
// attItem // attItem
ElTooltip
}, },
data() { data() {
return { return {
@ -123,7 +124,7 @@ export default {
this.toSave(); this.toSave();
}, 300), }, 300),
toSave() { toSave() {
this.$confirm("确认保存修改?", "提示", { ElMessageBox.confirm("确认保存修改?", "提示", {
type: "warning", type: "warning",
confirmButtonText: "确 认", confirmButtonText: "确 认",
cancelButtonText: "取 消", cancelButtonText: "取 消",
@ -366,7 +367,7 @@ export default {
}).then((d) => { }).then((d) => {
this.models = d.rows || []; this.models = d.rows || [];
if (this.models.length == 0) { if (this.models.length == 0) {
this.$modal.msgError("暂无模型,请先关联模型"); ElMessage.error("暂无模型,请先关联模型");
} else { } else {
this.models.forEach((item) => { this.models.forEach((item) => {
this.addModel(item.lightweightName); this.addModel(item.lightweightName);

View File

@ -128,7 +128,7 @@ import { listGreenCarbonItem } from '@/api/manage/greenCarbonItem'
import greenCarbonData, { getGreenCarbon } from '../greenCarbonItem/greenCarbonData' import greenCarbonData, { getGreenCarbon } from '../greenCarbonItem/greenCarbonData'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import { onMounted } from 'vue' import { onMounted } from 'vue'
import { toFixed } from 'ant-design-vue/es/input-number/src/utils/MiniDecimal'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const userStore = useUserStore() const userStore = useUserStore()