Merge branch 'dev_xd' of http://62.234.3.186:3000/jiangyq/YZProjectCloud into dev_xd
commit
9c659fe202
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
<div class="data-row">
|
<div class="data-row">
|
||||||
<div class="data-label">工序部位:</div>
|
<div class="data-label">工序部位:</div>
|
||||||
<div class="data-content">{{ row.workingPosition }}</div>
|
<div class="data-content">{{ row.workingPositionFull }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="data-row">
|
<div class="data-row">
|
||||||
<div class="data-label">验收描述:</div>
|
<div class="data-label">验收描述:</div>
|
||||||
|
|
|
@ -2,17 +2,9 @@
|
||||||
<div class="project-checked main-page">
|
<div class="project-checked main-page">
|
||||||
<el-col :span="6" class="h100">
|
<el-col :span="6" class="h100">
|
||||||
<module-one-1-1 label="举牌验收数量统计" class="chart1-group">
|
<module-one-1-1 label="举牌验收数量统计" class="chart1-group">
|
||||||
<project-overview-chart
|
<project-overview-chart :htmlShow="true" :key="'ai1' + chart1Key" :sp="''" :fn="changeChart1"
|
||||||
:htmlShow="true"
|
:maintitle="groupTotal" :legend-opt="groupLendOpt" :typedata="groupData" text="验收数"
|
||||||
:key="'ai1' + chart1Key"
|
:height="chart1Height"></project-overview-chart>
|
||||||
:sp="''"
|
|
||||||
:fn="changeChart1"
|
|
||||||
:maintitle="groupTotal"
|
|
||||||
:legend-opt="groupLendOpt"
|
|
||||||
:typedata="groupData"
|
|
||||||
text="验收数"
|
|
||||||
:height="chart1Height"
|
|
||||||
></project-overview-chart>
|
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
<module-one-2-1 label="本周验收列表" class="week-group">
|
<module-one-2-1 label="本周验收列表" class="week-group">
|
||||||
<template v-if="weekData.length == 0">
|
<template v-if="weekData.length == 0">
|
||||||
|
@ -25,30 +17,23 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="week-list scroll" :key="weekKey">
|
<div class="week-list scroll" :key="weekKey">
|
||||||
<div
|
<div class="week-item" v-for="(it, index) in weekData" :key="index"
|
||||||
class="week-item"
|
@click="handleWeekItemClick(it, $event)">
|
||||||
v-for="(it, index) in weekData"
|
|
||||||
:key="index"
|
|
||||||
@click="handleWeekItemClick(it, $event)"
|
|
||||||
>
|
|
||||||
<div class="item-left">
|
<div class="item-left">
|
||||||
<el-image
|
<el-image :src="it.image" :preview-src-list="it.images" fit="contain" />
|
||||||
:src="it.image"
|
|
||||||
:preview-src-list="it.images"
|
|
||||||
fit="contain"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="item-right">
|
<div class="item-right">
|
||||||
<div class="item-right-row">
|
<div class="item-right-row">
|
||||||
<span
|
<span :class="'check-state check-state-' + it.checkResultColor">{{ it.checkResultName }}</span>
|
||||||
:class="'check-state check-state-' + it.checkResultColor"
|
|
||||||
>{{ it.checkResultName }}</span
|
|
||||||
>
|
|
||||||
<span class="check-date">{{ it.checkingDate }}</span>
|
<span class="check-date">{{ it.checkingDate }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-right-row">
|
<div class="item-right-row">
|
||||||
<div class="item-label">工序部位:</div>
|
<div class="item-label">工序部位:</div>
|
||||||
<div class="item-data">{{ it.workingPosition }}</div>
|
<div class="item-data">
|
||||||
|
<el-tooltip :content="it.workingPositionFull" placement="top">
|
||||||
|
<span>{{ it.workingPositionFull }}</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-right-row">
|
<div class="item-right-row">
|
||||||
<div class="item-label">班组长:</div>
|
<div class="item-label">班组长:</div>
|
||||||
|
@ -79,16 +64,10 @@
|
||||||
<el-col :span="18" class="h100">
|
<el-col :span="18" class="h100">
|
||||||
<module-one-2-3 label="举牌验收列表" class="h66 list-group">
|
<module-one-2-3 label="举牌验收列表" class="h66 list-group">
|
||||||
<div class="head-title-tab" :key="chart1Key">
|
<div class="head-title-tab" :key="chart1Key">
|
||||||
<div
|
<div :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="doNav(1)">
|
||||||
:class="nav == 1 ? 'head-nav active' : 'head-nav'"
|
|
||||||
@click="doNav(1)"
|
|
||||||
>
|
|
||||||
已验收({{ getCheckedCount(1) }})
|
已验收({{ getCheckedCount(1) }})
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div :class="nav == 0 ? 'head-nav active' : 'head-nav'" @click="doNav(0)">
|
||||||
:class="nav == 0 ? 'head-nav active' : 'head-nav'"
|
|
||||||
@click="doNav(0)"
|
|
||||||
>
|
|
||||||
未验收({{ getCheckedCount(0) }})
|
未验收({{ getCheckedCount(0) }})
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -103,30 +82,23 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="list-data scroll" :key="listKey">
|
<div class="list-data scroll" :key="listKey">
|
||||||
<div
|
<div class="week-item" v-for="(it, index) in listData" :key="index"
|
||||||
class="week-item"
|
@click="handleWeekItemClick(it, $event)">
|
||||||
v-for="(it, index) in listData"
|
|
||||||
:key="index"
|
|
||||||
@click="handleWeekItemClick(it, $event)"
|
|
||||||
>
|
|
||||||
<div class="item-left">
|
<div class="item-left">
|
||||||
<el-image
|
<el-image :src="it.image" :preview-src-list="it.images" fit="contain" />
|
||||||
:src="it.image"
|
|
||||||
:preview-src-list="it.images"
|
|
||||||
fit="contain"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="item-right">
|
<div class="item-right">
|
||||||
<div class="item-right-row">
|
<div class="item-right-row">
|
||||||
<span
|
<span :class="'check-state check-state-' + it.checkResultColor">{{ it.checkResultName }}</span>
|
||||||
:class="'check-state check-state-' + it.checkResultColor"
|
|
||||||
>{{ it.checkResultName }}</span
|
|
||||||
>
|
|
||||||
<span class="check-date">{{ it.checkingDate }}</span>
|
<span class="check-date">{{ it.checkingDate }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-right-row">
|
<div class="item-right-row">
|
||||||
<div class="item-label">工序部位:</div>
|
<div class="item-label">工序部位:</div>
|
||||||
<div class="item-data">{{ it.workingPosition }}</div>
|
<div class="item-data">
|
||||||
|
<el-tooltip :content="it.workingPositionFull" placement="top">
|
||||||
|
<span>{{ it.workingPositionFull }}</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-right-row">
|
<div class="item-right-row">
|
||||||
<div class="item-label">班组长:</div>
|
<div class="item-label">班组长:</div>
|
||||||
|
@ -151,15 +123,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-pagination
|
<el-pagination layout="total,prev, pager, next" :hide-on-single-page="true"
|
||||||
layout="total,prev, pager, next"
|
@current-change="handleCurrentChange" :total="total" :page-size="size" :current-page.sync="index"
|
||||||
:hide-on-single-page="true"
|
class="bg-pagination"></el-pagination>
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
:total="total"
|
|
||||||
:page-size="size"
|
|
||||||
:current-page.sync="index"
|
|
||||||
class="bg-pagination"
|
|
||||||
></el-pagination>
|
|
||||||
</template>
|
</template>
|
||||||
</module-one-2-3>
|
</module-one-2-3>
|
||||||
<module-one-1-3 label="举牌验收技术员统计" class="h33 group-technician">
|
<module-one-1-3 label="举牌验收技术员统计" class="h33 group-technician">
|
||||||
|
@ -172,13 +138,8 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<my-chart
|
<my-chart :key="chart2Key" id="project-safety-check-chart2" width="100%" height="100%"
|
||||||
:key="chart2Key"
|
:render="renderChart2"></my-chart>
|
||||||
id="project-safety-check-chart2"
|
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
:render="renderChart2"
|
|
||||||
></my-chart>
|
|
||||||
</template>
|
</template>
|
||||||
</module-one-1-3>
|
</module-one-1-3>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -294,7 +255,7 @@ export default {
|
||||||
},
|
},
|
||||||
getCheckedCount(n) {
|
getCheckedCount(n) {
|
||||||
let obj = this.groupData.find(
|
let obj = this.groupData.find(
|
||||||
(item) => item.name == (n == 1 ? "已验收" : "未验收")
|
(item) => item.name == (n == 1 ? "已验收" : "待验收")
|
||||||
);
|
);
|
||||||
return obj ? obj.value : 0;
|
return obj ? obj.value : 0;
|
||||||
},
|
},
|
||||||
|
@ -329,7 +290,7 @@ export default {
|
||||||
pageSize: this.size,
|
pageSize: this.size,
|
||||||
};
|
};
|
||||||
this.$api.checked.listProjectChecked(param).then((res) => {
|
this.$api.checked.listProjectChecked(param).then((res) => {
|
||||||
this.total = res.total + 20;
|
this.total = res.total;
|
||||||
this.listData = this.mapData(res);
|
this.listData = this.mapData(res);
|
||||||
this.listKey++;
|
this.listKey++;
|
||||||
});
|
});
|
||||||
|
@ -351,9 +312,6 @@ export default {
|
||||||
if (item.imageUrls) {
|
if (item.imageUrls) {
|
||||||
item.images = item.imageUrls.split(",");
|
item.images = item.imageUrls.split(",");
|
||||||
item.image = item.images[0];
|
item.image = item.images[0];
|
||||||
for (let i = 0; i < 6; i++) {
|
|
||||||
item.images.push(item.images[0]);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
item.image = "";
|
item.image = "";
|
||||||
item.images = [];
|
item.images = [];
|
||||||
|
@ -374,7 +332,10 @@ export default {
|
||||||
item.checkResultName = "验收不通过";
|
item.checkResultName = "验收不通过";
|
||||||
item.checkResultColor = 2;
|
item.checkResultColor = 2;
|
||||||
}
|
}
|
||||||
|
let task = this.$tryToJson(item.workingPosition, {})
|
||||||
|
|
||||||
|
item.workingPositionName = task.name;
|
||||||
|
item.workingPositionFull = task.full;
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -538,6 +499,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart1-group {
|
.chart1-group {
|
||||||
|
|
||||||
.chart-gif,
|
.chart-gif,
|
||||||
.chart-text {
|
.chart-text {
|
||||||
left: 51px !important;
|
left: 51px !important;
|
||||||
|
@ -641,6 +603,17 @@ export default {
|
||||||
color: #32e1e4;
|
color: #32e1e4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-data {
|
||||||
|
max-width: calc(100% - 80px);
|
||||||
|
|
||||||
|
.el-tooltip {
|
||||||
|
white-space: nowrap;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.check-state {
|
.check-state {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -669,9 +642,11 @@ export default {
|
||||||
|
|
||||||
@media (min-width: 1921px) and (max-width: 2560px) {
|
@media (min-width: 1921px) and (max-width: 2560px) {
|
||||||
.no-data {
|
.no-data {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart1-group {
|
.chart1-group {
|
||||||
|
|
||||||
.chart-gif,
|
.chart-gif,
|
||||||
.chart-text {
|
.chart-text {
|
||||||
left: 59px !important;
|
left: 59px !important;
|
||||||
|
@ -719,7 +694,7 @@ export default {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
|
||||||
.item-right-row {
|
.item-right-row {
|
||||||
line-height: 30px;
|
line-height: 34px;
|
||||||
|
|
||||||
.check-state {
|
.check-state {
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
@ -732,10 +707,12 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 2561px) {
|
@media (min-width: 2561px) {
|
||||||
.no-data {
|
.no-data {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart1-group {
|
.chart1-group {
|
||||||
|
|
||||||
.chart-gif,
|
.chart-gif,
|
||||||
.chart-text {
|
.chart-text {
|
||||||
left: 79px !important;
|
left: 79px !important;
|
||||||
|
|
|
@ -115,20 +115,16 @@ Page({
|
||||||
},
|
},
|
||||||
async submitSave(e) {
|
async submitSave(e) {
|
||||||
let approveStatus = e.target.dataset.set;
|
let approveStatus = e.target.dataset.set;
|
||||||
if (!this.data.checkResult) {
|
|
||||||
app.toast("请选择审批结果!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.data.imageInfoData.length == 0) {
|
if (this.data.imageInfoData.length == 0) {
|
||||||
app.toast("请上传图片!");
|
app.toast("请上传图片!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let fileUrls = await uploadFiles(this.data.imageInfoData);
|
let fileUrls = await uploadFiles(this.data.imageInfoData);
|
||||||
debugger
|
|
||||||
let postData = {
|
let postData = {
|
||||||
id: this.data.rowData.id,
|
id: this.data.rowData.id,
|
||||||
approveStatus: approveStatus,
|
approveStatus: approveStatus,
|
||||||
checkResult: this.data.checkResult,
|
checkResult: approveStatus == 3 ? 2 : 1,
|
||||||
checkingFiles: fileUrls.join(","),
|
checkingFiles: fileUrls.join(","),
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -87,6 +87,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view wx:if="{{isApprove}}">
|
<view wx:if="{{isApprove}}">
|
||||||
|
<!--
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<view class="markers inspect_info_title">审批结果</view>
|
<view class="markers inspect_info_title">审批结果</view>
|
||||||
<van-radio-group class="radio-group add_textarea h80" model:value="{{ checkResult }}"
|
<van-radio-group class="radio-group add_textarea h80" model:value="{{ checkResult }}"
|
||||||
|
@ -96,6 +97,7 @@
|
||||||
<van-radio class="radio-item" name="2" shape="square" icon-size="50rpx">不合格</van-radio>
|
<van-radio class="radio-item" name="2" shape="square" icon-size="50rpx">不合格</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</view>
|
</view>
|
||||||
|
-->
|
||||||
|
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<view class=" markers inspect_info_title">三方验收照片</view>
|
<view class=" markers inspect_info_title">三方验收照片</view>
|
||||||
|
|
|
@ -125,7 +125,7 @@ Page({
|
||||||
it.workingPositionFull = task.full;
|
it.workingPositionFull = task.full;
|
||||||
it.taskId = task.id;
|
it.taskId = task.id;
|
||||||
it.canEdit = (it.approveStatus == 1 || it.approveStatus == 3) && it.groupDeptUser == this.data.projectUserInfo.userPhone;
|
it.canEdit = (it.approveStatus == 1 || it.approveStatus == 3) && it.groupDeptUser == this.data.projectUserInfo.userPhone;
|
||||||
it.canApprove = (it.approveStatus == 1 || it.approveStatus == 3) && it.technicianUser == this.data.projectUserInfo.userPhone;
|
it.canApprove = (it.approveStatus == 1) && it.technicianUser == this.data.projectUserInfo.userPhone;
|
||||||
return it;
|
return it;
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|
|
@ -71,7 +71,7 @@ Page({
|
||||||
* @param {*} proId
|
* @param {*} proId
|
||||||
*/
|
*/
|
||||||
getUserMenuList: function (proId) {
|
getUserMenuList: function (proId) {
|
||||||
findUserMenuList(proId, 'gdgn').then(res => {
|
findUserMenuList(proId, this.data.active == 1 ? "" : 'gdgn').then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.setData({
|
this.setData({
|
||||||
menuList: res.data
|
menuList: res.data
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
<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
|
||||||
<el-option v-for="item in data.projects" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
|
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-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="所属单位" prop="deptId" >
|
<!-- <el-form-item label="所属单位" prop="deptId" >
|
||||||
|
@ -52,13 +55,16 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['bim:bimModel:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['bim:bimModel:remove']">删除</el-button>
|
v-hasPermi="['bim:bimModel:edit']">修改</el-button>
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['bim:bimModel:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</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>
|
||||||
|
@ -85,7 +91,9 @@
|
||||||
<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="unit">
|
<el-form-item label="模型尺寸单位" prop="unit">
|
||||||
<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-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-item label="备注说明" prop="remark">
|
<el-form-item label="备注说明" prop="remark">
|
||||||
|
@ -116,6 +124,7 @@ 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 bimConfigDialog from "./bimConfigDialog.vue";
|
import bimConfigDialog from "./bimConfigDialog.vue";
|
||||||
|
import { getProjectBimConfig } from "@/api/manage/proProjectInfo.js";
|
||||||
import { fileSize } from "@/utils";
|
import { fileSize } from "@/utils";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const unitInfos = [
|
const unitInfos = [
|
||||||
|
@ -172,11 +181,19 @@ const data = reactive({
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
function doBimConfig(){
|
function doBimConfig() {
|
||||||
configDlg.value.showDialog();
|
configDlg.value.showDialog();
|
||||||
}
|
}
|
||||||
function showModel(row) {
|
function showModel(row) {
|
||||||
mDlg.value.showDialog(JSON.parse(row.gisJson));
|
getProjectBimConfig( row.projectId ).then(d => {
|
||||||
|
let config = proxy.$tryToJson(d.msg, {});
|
||||||
|
let bimCfg = {
|
||||||
|
background: config.background || "",
|
||||||
|
showGis: config.showGis || false,
|
||||||
|
clientApi: config.clientApi || false
|
||||||
|
}
|
||||||
|
mDlg.value.showDialog(JSON.parse(row.gisJson), bimCfg);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
function toSize(size) {
|
function toSize(size) {
|
||||||
return fileSize(size);
|
return fileSize(size);
|
||||||
|
@ -331,7 +348,7 @@ function handleDelete(row) {
|
||||||
getList();
|
getList();
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
|
|
|
@ -1,187 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog v-model="show" append-to-body :close-on-click-modal="false"
|
|
||||||
:close-on-press-escape="false" :title="title" width="960px" modal-class="model-dialog-show">
|
|
||||||
<div :id="elId"></div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import useBimStore from '@/store/modules/bim'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
show: false,
|
|
||||||
title: '',
|
|
||||||
row: null,
|
|
||||||
bimStore: null,
|
|
||||||
elId: 'gis' + +new Date(),
|
|
||||||
defaults: {
|
|
||||||
serverIP: `model.jhncidg.com`, //服务IP地址 具体见引擎服务控制台
|
|
||||||
port: 8000, //HTTP端口 具体见引擎服务控制台
|
|
||||||
useHttps: true, //是否使用Https
|
|
||||||
container: `UEgineContainer`, //[必须]引擎场景容器ID
|
|
||||||
// Token 可从引擎工作站下载 (必须)不传入则无法加载模型
|
|
||||||
secretKey:
|
|
||||||
"cbe8c300dfb0280d71bf6546087c6d2fa49260085f53fca86c69755ac3a39199e08cb605efce617acfa509d5f3ee4d7f67a84d7c36cc175589405fde5d995a24258c47f45b34485a2edb350010e2f42cd5b388af45c6b070850288d284cbbbcd51e36f41b756a25f38d27dbe2e47e96b9eb56a96b59d61e02a467e881f70b21989b1a50685b6fc0265f528fc20b876d425a89c4bf6b33f829177fda27027e65b8a94867b381ae88ecd6668e8ca6b6d286dce7e5d799b0a1791905fc1eba1be4bd6b2a0d0983e9fd1184d8dbba49a8569257e195e636a849299be5a52d738b8218ae3e55ca95ec2999742c749dda98108ecfe0622c0e7fe1d76ad60b6c191c99adca5f9cf5e5f096c599f1874ee756fe16dce7e5d799b0a175d5afe5554a4332203e774bed8a045353e9bf5abfe83ffe0cca50ef6c618828a9d63dac2d06e44c19cc1e4d0220e60c6fb1ba2643538d1973ae24d1650ef196ed32b1cdbecb9bf3ae2651ff226b8a2383977aeaabb9225d76f8b62bd8891c29bfb1ba2643538d1973ae24d1650ef196ed32b1cdbecb9bf3aded264d2944b7de536ca05b5a67eccf9e531630520dbe46651d2e0212a534b5d37e40a524d2bbb8599a991777d21e7823e88c9264a91404ad3c355b1486472d2d33d2024825618176f3ca316f1c8864c67da113f439417e93a3a6e65f3b5b13e02b4cf797dd3ef437d453436628b776f17b592e82465766524d976e07cb995f7aeea64611acbe5c7afafd0506174e868b868cd5190eb2aca665e8d49164a81ede6cd674b6676107f753151533a277044030c6924517e4349b5024217bdf743a670fd5d571139e4f0e6cd674b6676107fc8b14b44ceeed441af4b194f05a9561933be0b316b16d035cf14829a5847f70377d6c12f1649400fcab44f4ff52989cf214f8b93be10da84253a49595b8ffa60e29586b86ee4d866c8ffcb81b934e9b51cd8670938da55d3ee5940a08809fab6f7c0a1702e2a8a95cc2ddffad05ffd7c7b7134e53eaa4f83b046182095e9d992f79b33aea9c3effbffbe7fd817b3e44233aa4802e15dfc49a29aa59c8f2497fa711bc068a62def563d8f10f7e48a08896850e0b312512643a819d6c108898dd8a2266bc2bd5ee75d866f1d98d020cafd7bd5f9c0972b08b652da3f7d8f2395dcf14e1860b5a41f63ca076947bd189a6df6b34a0d3b48e62299da383acb371030673a18f4f42a3e1ef21654bc56ed57d610df6c47a708c020420446a051fcfcfe2ec33e49302a9c7b920088012936f0e4972bd8f261f7b7345b2b4c07b28f439b8c363d561580eba60124eaa5aa0834e124254c2ea7e8b20334d705a519dd901833639d7019f49033c4bbb34a5481d3485125cdd7384aad1b3050717025af01dcfac91bea061f4ff485af667dd7ebaf4baeea64611acbe5c740e3c5229a33a810e6eb28a4163283ccebc424f09f933d0eb1a881ed05ca8d5c70958237eb5b91d4e574440ea0c9179a582dc966bcfc1f21cf3630a2823a9a2d22bd09a00b213aae3866768ae2f24dde59f3f21ab1f820a9d2bc9b9c79ecfe3a853fcb2bc95ee8056cd5b4826fa55926733ef859a5f169e6afafd0506174e86864d53d967da98ab0b0e08d14be6d452c753151533a2770444dc3bda33a30522cafafd0506174e868ad58c88e87a3bfc170e2ffb0f223e4e27d1f9f3c7343796941187054ec673ebdbd57ea3b34f9c6ccd2a3c00a7ba1a999546538785d7cc0b40a683a8bbd9cb842f96b87b99f2b3a0e241e69a6993bcca387380d5ea2d8e077753151533a277044c81e5b8a22ff6bdf23c4b6186d657cedfff99a50bc0729d1d320606a1d80beb0", //token
|
|
||||||
openearth: false, //[可选]是否开启GIS场景
|
|
||||||
bgcolor: "rgba(135 ,206 ,250,1)", //[可选]BIM模式场景背景色
|
|
||||||
},
|
|
||||||
// 此处传入模型访问地址 -可通过serverAPI接口获取该地址
|
|
||||||
modelPath:
|
|
||||||
"https://model.jhncidg.com:18086/Tools/output/model/4720827559401934284/root.glt",
|
|
||||||
// 模型ID 由用户自定义
|
|
||||||
modelID: "4720827559401934284",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.bimStore = useBimStore()
|
|
||||||
window.xapp = this
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
showDialog(row) {
|
|
||||||
this.elId = 'gis' + +new Date()
|
|
||||||
this.row = row
|
|
||||||
this.show = true
|
|
||||||
this.title = row.name
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.initCesium()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
initCesium() {
|
|
||||||
window.api = new SAPI(
|
|
||||||
{
|
|
||||||
serverIP: `model.jhncidg.com`, //服务ip地址
|
|
||||||
port: 8000, //HTTP端口
|
|
||||||
useHttps: true, //使用Https
|
|
||||||
container: this.elId, //[必须]容器id
|
|
||||||
secretKey: "cbe8c300dfb0280d71bf6546087c6d2fa49260085f53fca86c69755ac3a39199e08cb605efce617acfa509d5f3ee4d7f67a84d7c36cc175589405fde5d995a24258c47f45b34485a2edb350010e2f42cd5b388af45c6b070850288d284cbbbcd51e36f41b756a25f38d27dbe2e47e96b9eb56a96b59d61e02a467e881f70b21989b1a50685b6fc0265f528fc20b876d425a89c4bf6b33f829177fda27027e65b8a94867b381ae88ecd6668e8ca6b6d286dce7e5d799b0a1791905fc1eba1be4bd6b2a0d0983e9fd1184d8dbba49a8569257e195e636a849299be5a52d738b8218ae3e55ca95ec2999742c749dda98108ecfe0622c0e7fe1d76ad60b6c191c99adca5f9cf5e5f096c599f1874ee756fe16dce7e5d799b0a175d5afe5554a4332203e774bed8a045353e9bf5abfe83ffe0cca50ef6c618828a9d63dac2d06e44c19cc1e4d0220e60c6fb1ba2643538d1973ae24d1650ef196ed32b1cdbecb9bf3ae2651ff226b8a2383977aeaabb9225d76f8b62bd8891c29bfb1ba2643538d1973ae24d1650ef196ed32b1cdbecb9bf3aded264d2944b7de536ca05b5a67eccf9e531630520dbe4663b2d265fe6a4c8877fcba7ce8189fbc216cdeb3ecbc1d365395fd220141d4e6d9fd317e3dac7bb223013404ec41c18c9cc748e652ce16fe7061c32d550edfda330c1555e0c08e51f698f96b91615d8229cf32d2e110ec91f1211e23c769b5bbe1aa9a9191a2d3da09800e6efdee12ee04fdc9df330134f94052efc320a8c1a143e939c0e3b1ad476cf3630a2823a9a2dc2a17ec077fd21bfa7550ed054853e32510f8a6ea5c1dff9c3d61f7cf5f649cb25f0dbad9f7f66e3b446946685cead0cfac91bea061f4ff49a2f853c245297edc3d61f7cf5f649cb0f9b84173857a7b67c27928b58b4a6a65f517a43f106335ecc43571d292f54baa4596f82cf86665b367e01045009c18a2b543696b93a5bd44ca8168b525235150ffadf3f628aa7e8a20b9e74d76bd3a1e26b026e5297005a780f011db11ddb55fbabdc0f876c1cdfa5ef7db74bbc52e19c6396ffcf10044da26ecd334722494fc515b205e9624a4468762f63f0143583d1eeaaa85ff95ee50d8f953f44140ab40f29957f914b2241fd1309b7be0d5f9e55207069d393244a5be14de83e99956e957e025b859c7dd3cebcdd4589bf15942a17f162a5b95af68b416632dbf24db069995334a82a49d6060f7a5b770b6e18ecf8cb01c0e21b608156b326e2f4461369f266ad62ac2edf64d1767ac6ea3d83c9ba33a4517541406791c384c597539cc1ffcdbe8f3563a125da5d3905c7f92abef0fe8b967e5bc2832940bf4230fe93bdd44267922427c4db140fd5cb164da87f17f480c39e9c1c17bd48d031e3ce8ab3a49456b48f3b49549c2da3f62d2a8da7d5f36e39ce04af5e3f8253971ef20b10b7b200fbc7c3d3f71e19f74e660313cf3630a2823a9a2d0acd9cb22f32e975d8b70082aab5ddbcb644d89a77efad286dee59796b124081510f8a6ea5c1dff9cb0f31d9a93422d1de95a0001376b8d685af667dd7ebaf4bdfc4840ac1126277417910a2ed0df6e3ca2026459a491059689206d702832f51afafd0506174e868c12cc462769b2e685be04514c976edd04ca2ef020dc56bee8321afe91a1dcbb1afafd0506174e8680f18f43fcd13957eef440c21db889c81888bce192514399191b48af868eda487753151533a27704469e5635404d6fdfb753151533a277044afdd825f7197f289753151533a27704484b9cf9eccaf749638930dbe9049f2ae36689b286e75a81e016aa63061505f57a8c1113b833628e3a18dff8ae8ac8eaae0e7c3406ae4dd4e10880b34c16e1b7405884ca1d5603015a7b0730878fafb08",
|
|
||||||
openEarth: false, //[可选]开启Gis场景
|
|
||||||
bgColor: 'rgba(135 ,206 ,250,1)', //[可选]bim场景背景色, 传值即为纯色天空盒
|
|
||||||
tintColor: 'rgba(255,255,0,1)', //[可选]osgb单体化颜色
|
|
||||||
sceneTime: ['13:00', '6:00', '18:00'], //[可选]分别为当前时间、日出时间、日落时间
|
|
||||||
cadMode: false, // 是否是Cad图纸预览模式
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
console.log(this.row)
|
|
||||||
//this.row.modelAccessAddress
|
|
||||||
console.log("场景初始化完成");
|
|
||||||
window.api.Public.setSkyBoxState(0);
|
|
||||||
this.addModels();
|
|
||||||
|
|
||||||
}
|
|
||||||
)
|
|
||||||
console.log('---->', api)
|
|
||||||
},
|
|
||||||
addModels() {
|
|
||||||
let modelPath=this.row.modelAccessAddress;
|
|
||||||
if(modelPath.indexOf("model.jhncidg.com")==-1){
|
|
||||||
modelPath="https://model.jhncidg.com:18086"+modelPath
|
|
||||||
}
|
|
||||||
window.api.Model.add(
|
|
||||||
// 此处传入模型访问地址 -可通过serverAPI接口获取该地址
|
|
||||||
modelPath,
|
|
||||||
// 模型ID 由用户自定义
|
|
||||||
this.row.lightweightName,
|
|
||||||
(res) => {
|
|
||||||
console.log("模型开始加载");
|
|
||||||
},
|
|
||||||
(res) => {
|
|
||||||
console.log("模型加载完毕");
|
|
||||||
},
|
|
||||||
{
|
|
||||||
FlyTo: true,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
initCesium2() {
|
|
||||||
// const defaults = { ...this.bimStore.defaults }
|
|
||||||
let defaults = {
|
|
||||||
container: 'cesiumContainer', //[必须]容器id
|
|
||||||
showfps: false,
|
|
||||||
openterrain: true,
|
|
||||||
imageryprovider: 'tianditu_image',
|
|
||||||
openearth: false,
|
|
||||||
maxspaceerror: 2000,
|
|
||||||
loading: false,
|
|
||||||
bgcolor: '#87CEFA',
|
|
||||||
outlinecolor: '#000000',
|
|
||||||
outlineScaleVal: 1.001,
|
|
||||||
selectedcolor: '#ff0000',
|
|
||||||
sceneMode: 3,
|
|
||||||
TwoMapNavigationEnable: false,
|
|
||||||
throughwall: true,
|
|
||||||
searchbox: false,
|
|
||||||
mapbox: true,
|
|
||||||
secretkey: window.config.secretKey, //token.txt文件里的内容
|
|
||||||
editmode: false,
|
|
||||||
cadmode: false,
|
|
||||||
isRequestWebgl2: true,
|
|
||||||
requestRenderMode: true,
|
|
||||||
colorBlendMode: 2,
|
|
||||||
loadAnimation: false,
|
|
||||||
isStrictClip: true,
|
|
||||||
isMsaaSamples: true,
|
|
||||||
isOpenVR: false,
|
|
||||||
language: 'zh-CN',
|
|
||||||
}
|
|
||||||
|
|
||||||
defaults.container = this.elId
|
|
||||||
defaults.bgcolor = '#c6c9d1'
|
|
||||||
defaults.secretkey = window.config.secretKey
|
|
||||||
this.sapi_1 = new API(defaults)
|
|
||||||
let modelUrl = 'https://model.jhncidg.com:18086/Tools/output/model/5513993365509191778/root.glt'
|
|
||||||
//https://model.jhncidg.com:18086/Tools/output/model/5570926434042339486/root.glt
|
|
||||||
//this.sapi_1.Model.add(this.row.modelAccessAddress, this.row.lightweightName)
|
|
||||||
this.sapi_1.Model.add(modelUrl, this.row.lightweightName)
|
|
||||||
let mapOptions = {
|
|
||||||
imgs: {
|
|
||||||
// 六面图片
|
|
||||||
top: './Engine/Assets/Images/Navigation/bim/top.png',
|
|
||||||
bottom: './Engine/Assets/Images/Navigation/bim/under.png',
|
|
||||||
east: './Engine/Assets/Images/Navigation/bim/east.png',
|
|
||||||
south: './Engine/Assets/Images/Navigation/bim/south.png',
|
|
||||||
west: './Engine/Assets/Images/Navigation/bim/west.png',
|
|
||||||
north: './Engine/Assets/Images/Navigation/bim/north.png',
|
|
||||||
},
|
|
||||||
offset: {
|
|
||||||
// 屏幕坐标偏移
|
|
||||||
corner: GLENavigationCube.RightTop,
|
|
||||||
x: 25,
|
|
||||||
y: 20,
|
|
||||||
},
|
|
||||||
cube: {
|
|
||||||
hoverColor: '#7193dc', // 立方导航快鼠标移过显示颜色
|
|
||||||
size: 75, // 导航立方尺寸
|
|
||||||
hotPointSize: 7, // 导航立方棱角热点区域尺寸
|
|
||||||
cubeTextColor: '#4c4c4ccc', // cube 各个面文字颜色
|
|
||||||
cubeStrokeColor: '#374769cc', // cube 各个面边框颜色
|
|
||||||
cubeFillColor: '#374769cc', // cube 各个面填充颜色
|
|
||||||
},
|
|
||||||
zoomRatios: 1, // 缩放倍率
|
|
||||||
show: true, // 是否显示
|
|
||||||
showAxes: true, // 是否显示XYZ轴线
|
|
||||||
}
|
|
||||||
this.sapi_1.Plugin.initNavCube(mapOptions)
|
|
||||||
this.sapi_1.Public.setDisableMouseState(false)
|
|
||||||
this.sapi_1.Public.setIsflipUnderground(false)
|
|
||||||
this.sapi_1.Public.event('LEFT_CLICK', (click) => {
|
|
||||||
this.sapi_1.Feature.getByEvent(click.position, (json) => {
|
|
||||||
if (json != undefined) {
|
|
||||||
console.log(json)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.model-dialog-show{
|
|
||||||
iframe{
|
|
||||||
height: 800px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<el-dialog v-model="show" append-to-body :close-on-click-modal="false" :close-on-press-escape="false"
|
||||||
<el-dialog v-model="show" append-to-body :close-on-click-modal="false" :close-on-press-escape="false" :title="title" width="960px" modal-class="model-dialog-show">
|
:title="title" width="960px" modal-class="model-dialog-show" class="noscroll">
|
||||||
<div :id="elId" style="height: 80vh;"></div>
|
<div :id="elId" style="height: 80vh;"></div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import useBimStore from '@/store/modules/bim'
|
import useBimStore from '@/store/modules/bim'
|
||||||
|
import bimTools from '../bimTools'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -17,6 +17,7 @@ export default {
|
||||||
bimStore: null,
|
bimStore: null,
|
||||||
sapi_1: null,
|
sapi_1: null,
|
||||||
elId: 'gis' + +new Date(),
|
elId: 'gis' + +new Date(),
|
||||||
|
bimCfg: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -24,110 +25,27 @@ export default {
|
||||||
window.xapp = this
|
window.xapp = this
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showDialog(row) {
|
showDialog(row, bimCfg) {
|
||||||
|
bimCfg.showGis=false;
|
||||||
|
this.bimCfg = bimCfg
|
||||||
this.elId = 'gis' + +new Date()
|
this.elId = 'gis' + +new Date()
|
||||||
this.row = row
|
this.row = row
|
||||||
this.show = true
|
this.show = true
|
||||||
this.title = row.name
|
this.title = row.name
|
||||||
this.$nextTick(() => {
|
setTimeout(() => {
|
||||||
this.initCesium()
|
bimTools.initEngine("modelPrev", this.elId, this.bimCfg, () => {
|
||||||
})
|
bimTools.addModel(window["modelPrev"], this.bimCfg, this.row.lightweightName)
|
||||||
},
|
})
|
||||||
initCesium() {
|
},800);
|
||||||
var api = new SAPI(
|
|
||||||
{
|
|
||||||
serverIP: `model.jhncidg.com`, //服务ip地址
|
|
||||||
port: 8000, //HTTP端口
|
|
||||||
useHttps: true, //使用Https
|
|
||||||
container: this.elId, //[必须]容器id
|
|
||||||
secretKey: window.config.secretKey,
|
|
||||||
openEarth: false, //[可选]开启Gis场景
|
|
||||||
bgColor: 'rgba(135 ,206 ,250,1)', //[可选]bim场景背景色, 传值即为纯色天空盒
|
|
||||||
tintColor: 'rgba(255,255,0,1)', //[可选]osgb单体化颜色
|
|
||||||
sceneTime: ['13:00', '6:00', '18:00'], //[可选]分别为当前时间、日出时间、日落时间
|
|
||||||
cadMode: false, // 是否是Cad图纸预览模式
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
console.log('初始化成功') //初始化成功后在进行其他操作,如加载模型等
|
|
||||||
this.InitEngine(api)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
},
|
|
||||||
InitEngine(api) {
|
|
||||||
let url = `${window.config.modelUrl}/Tools/output/model/${this.row.lightweightName}/root.glt`
|
|
||||||
api.Model.add(url, this.row.lightweightName)
|
|
||||||
},
|
|
||||||
initCesium2() {
|
|
||||||
// const defaults = { ...this.bimStore.defaults }
|
|
||||||
let defaults = {
|
|
||||||
container: 'cesiumContainer', //[必须]容器id
|
|
||||||
showfps: false,
|
|
||||||
openterrain: true,
|
|
||||||
imageryprovider: 'tianditu_image',
|
|
||||||
openearth: false,
|
|
||||||
maxspaceerror: 2000,
|
|
||||||
loading: false,
|
|
||||||
bgcolor: '#87CEFA',
|
|
||||||
outlinecolor: '#000000',
|
|
||||||
outlineScaleVal: 1.001,
|
|
||||||
selectedcolor: '#ff0000',
|
|
||||||
sceneMode: 3,
|
|
||||||
TwoMapNavigationEnable: false,
|
|
||||||
throughwall: true,
|
|
||||||
searchbox: false,
|
|
||||||
mapbox: true,
|
|
||||||
secretkey: window.BIM_CONFIG.secretKey, //token.txt文件里的内容
|
|
||||||
editmode: false,
|
|
||||||
cadmode: false,
|
|
||||||
isRequestWebgl2: true,
|
|
||||||
requestRenderMode: true,
|
|
||||||
colorBlendMode: 2,
|
|
||||||
loadAnimation: false,
|
|
||||||
isStrictClip: true,
|
|
||||||
isMsaaSamples: true,
|
|
||||||
isOpenVR: false,
|
|
||||||
language: 'zh-CN',
|
|
||||||
}
|
|
||||||
|
|
||||||
defaults.container = this.elId
|
|
||||||
defaults.bgcolor = '#c6c9d1'
|
|
||||||
defaults.secretkey = window.BIM_CONFIG.secretKey
|
|
||||||
this.sapi_1 = new API(defaults)
|
|
||||||
this.sapi_1.Model.add(this.row.modelAccessAddress, this.row.lightweightName)
|
|
||||||
let mapOptions = {
|
|
||||||
imgs: {
|
|
||||||
// 六面图片
|
|
||||||
top: './Engine/Assets/Images/Navigation/bim/top.png',
|
|
||||||
bottom: './Engine/Assets/Images/Navigation/bim/under.png',
|
|
||||||
east: './Engine/Assets/Images/Navigation/bim/east.png',
|
|
||||||
south: './Engine/Assets/Images/Navigation/bim/south.png',
|
|
||||||
west: './Engine/Assets/Images/Navigation/bim/west.png',
|
|
||||||
north: './Engine/Assets/Images/Navigation/bim/north.png',
|
|
||||||
},
|
|
||||||
offset: {
|
|
||||||
// 屏幕坐标偏移
|
|
||||||
corner: GLENavigationCube.RightTop,
|
|
||||||
x: 25,
|
|
||||||
y: 20,
|
|
||||||
},
|
|
||||||
cube: {
|
|
||||||
hoverColor: '#7193dc', // 立方导航快鼠标移过显示颜色
|
|
||||||
size: 75, // 导航立方尺寸
|
|
||||||
hotPointSize: 7, // 导航立方棱角热点区域尺寸
|
|
||||||
cubeTextColor: '#4c4c4ccc', // cube 各个面文字颜色
|
|
||||||
cubeStrokeColor: '#374769cc', // cube 各个面边框颜色
|
|
||||||
cubeFillColor: '#374769cc', // cube 各个面填充颜色
|
|
||||||
},
|
|
||||||
zoomRatios: 1, // 缩放倍率
|
|
||||||
show: true, // 是否显示
|
|
||||||
showAxes: true, // 是否显示XYZ轴线
|
|
||||||
}
|
|
||||||
this.sapi_1.Plugin.initNavCube(mapOptions)
|
|
||||||
//this.sapi_1.Public.setDisableMouseState(false)
|
|
||||||
//this.sapi_1.Public.setIsflipUnderground(false)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style lang="scss">
|
||||||
|
.model-dialog-show{
|
||||||
|
.el-dialog__body{
|
||||||
|
max-height: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,19 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog v-model="show" append-to-body :close-on-click-modal="false" :close-on-press-escape="false" title="选择模型" width="960px" modal-class="model-select-dialog">
|
<el-dialog v-model="show" append-to-body :close-on-click-modal="false" :close-on-press-escape="false"
|
||||||
<el-table ref="modelTable" v-loading="loading" :data="modelList" height="50vh" highlight-current-row @row-click="tbSelectionChange" @row-dblclick="tbDblClick">
|
title="选择模型" width="960px" modal-class="model-select-dialog" class="noscroll">
|
||||||
|
<el-table ref="modelTable" v-loading="loading" :data="modelList" height="50vh" highlight-current-row
|
||||||
|
@row-click="tbSelectionChange" @row-dblclick="tbDblClick">
|
||||||
<el-table-column label="模型名" align="center" prop="name">
|
<el-table-column label="模型名" align="center" prop="name">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<label class="blue command" @click="showModel(scope.row)">{{scope.row.name}}</label>
|
<label class="blue command" @click="showModel(scope.row)">{{ scope.row.name }}</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="fileType" />
|
<el-table-column label="软件类型" align="center" prop="fileType" />
|
||||||
<el-table-column label="文件大小" align="center" prop="fileSize">
|
<el-table-column label="文件大小" align="center" prop="fileSize">
|
||||||
<template #default="scope">{{scope.row.fileSize?toSize(scope.row.fileSize):'-'}}</template>
|
<template #default="scope">{{ scope.row.fileSize ? toSize(scope.row.fileSize) : '-' }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" align="center" prop="statusDescription" />
|
<el-table-column label="状态" align="center" prop="statusDescription" />
|
||||||
<el-table-column label="DB同步状态" align="center" prop="statusDescription" v-if="1==2">
|
<el-table-column label="DB同步状态" align="center" prop="statusDescription" v-if="1 == 2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.dbSyncStatus == 2">同步成功</span>
|
<span v-if="scope.row.dbSyncStatus == 2">同步成功</span>
|
||||||
<span v-else-if="scope.row.dbSyncStatus == 1">同步失败</span>
|
<span v-else-if="scope.row.dbSyncStatus == 1">同步失败</span>
|
||||||
|
@ -39,6 +41,7 @@ import { checkLightweightName, getBimModel, addBimModel, updateBimModel, delBimM
|
||||||
import modelDialog from './modelDialog2.vue'
|
import modelDialog from './modelDialog2.vue'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import { fileSize } from '../../../utils'
|
import { fileSize } from '../../../utils'
|
||||||
|
import { getProjectBimConfig } from "@/api/manage/proProjectInfo.js";
|
||||||
export default {
|
export default {
|
||||||
components: { modelDialog },
|
components: { modelDialog },
|
||||||
data() {
|
data() {
|
||||||
|
@ -47,10 +50,12 @@ export default {
|
||||||
show: false,
|
show: false,
|
||||||
modelList: [],
|
modelList: [],
|
||||||
selRow: null,
|
selRow: null,
|
||||||
|
currentPrjId: null,
|
||||||
|
userStore: null,
|
||||||
|
bimCfg: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('===>', useUserStore())
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tbDblClick() {
|
tbDblClick() {
|
||||||
|
@ -62,6 +67,16 @@ export default {
|
||||||
showDialog() {
|
showDialog() {
|
||||||
this.show = true
|
this.show = true
|
||||||
this.selRow = null
|
this.selRow = null
|
||||||
|
this.userStore = useUserStore()
|
||||||
|
this.currentPrjId = this.userStore.currentPrjId;
|
||||||
|
getProjectBimConfig(this.currentPrjId).then(d => {
|
||||||
|
let config = this.$tryToJson(d.msg, {});
|
||||||
|
this.bimCfg = {
|
||||||
|
background: config.background || "",
|
||||||
|
showGis: config.showGis || false,
|
||||||
|
clientApi: config.clientApi || false
|
||||||
|
}
|
||||||
|
});
|
||||||
queryModels().then((d) => {
|
queryModels().then((d) => {
|
||||||
let models = d.data.datas || []
|
let models = d.data.datas || []
|
||||||
let modelIds = models.map((it) => it.lightweightName)
|
let modelIds = models.map((it) => it.lightweightName)
|
||||||
|
@ -93,7 +108,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showModel(row) {
|
showModel(row) {
|
||||||
this.$refs.modelDialog.showDialog(row)
|
this.$refs.modelDialog.showDialog(row,this.bimCfg)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -105,7 +120,7 @@ export default {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table__body tr.current-row > td.el-table__cell {
|
.el-table__body tr.current-row>td.el-table__cell {
|
||||||
background: rgb(30, 144, 255);
|
background: rgb(30, 144, 255);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,12 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="移动速度" prop="moveRate">
|
<el-form-item label="移动速度" prop="moveRate">
|
||||||
<el-input-number v-model="form.moveRate" :precision="2" :step="0.01" :min="0" placeholder="0.00" style="width: 100%"></el-input-number>
|
<el-input-number v-model="form.moveRate" :precision="2" :step="0.01" :min="0" placeholder="0.00"
|
||||||
|
style="width: 100%"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="旋转速度" prop="lookFactor">
|
<el-form-item label="旋转速度" prop="lookFactor">
|
||||||
<el-input-number v-model="form.turnRate" :precision="2" :step="0.01" :min="0" placeholder="0.00" style="width: 100%"></el-input-number>
|
<el-input-number v-model="form.turnRate" :precision="2" :step="0.01" :min="0" placeholder="0.00"
|
||||||
|
style="width: 100%"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="startImmersionRoaming" ghost>开始漫游</el-button>
|
<el-button @click="startImmersionRoaming" ghost>开始漫游</el-button>
|
||||||
|
@ -95,15 +97,9 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="pagination-container">
|
<div class="pagination-container">
|
||||||
<el-pagination
|
<el-pagination v-model:current-page="pagination.current" v-model:page-size="pagination.pageSize"
|
||||||
v-model:current-page="pagination.current"
|
:page-sizes="[10, 20, 30, 50]" :total="pagination.total" layout="total, prev, pager, next"
|
||||||
v-model:page-size="pagination.pageSize"
|
@size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
||||||
:page-sizes="[10, 20, 30, 50]"
|
|
||||||
:total="pagination.total"
|
|
||||||
layout="total, prev, pager, next"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
@ -239,14 +235,15 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.xapp = this
|
window.xapp = this
|
||||||
api.Plugin.addMiniMap()
|
if (!this.me.bimCfg.clientApi) {
|
||||||
let options = {
|
api.Plugin.addMiniMap()
|
||||||
Anchor: 3,
|
let options = {
|
||||||
Offset: [70, -380],
|
Anchor: 3,
|
||||||
Size: 300,
|
Offset: [70, -380],
|
||||||
|
Size: 300,
|
||||||
|
}
|
||||||
|
api.Plugin.updateMiniMap(options)
|
||||||
}
|
}
|
||||||
api.Plugin.updateMiniMap(options)
|
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
this.currentPrjId = userStore.currentPrjId
|
this.currentPrjId = userStore.currentPrjId
|
||||||
this.currentComId = userStore.currentComId
|
this.currentComId = userStore.currentComId
|
||||||
|
@ -487,22 +484,27 @@ export default {
|
||||||
.roaming-settings {
|
.roaming-settings {
|
||||||
width: 340px;
|
width: 340px;
|
||||||
padding: 0px 10px 10px;
|
padding: 0px 10px 10px;
|
||||||
|
|
||||||
.op-table {
|
.op-table {
|
||||||
.cell {
|
.cell {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.his-tool {
|
.his-tool {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination-container {
|
.pagination-container {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
.el-pagination {
|
.el-pagination {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
||||||
.el-pagination__total,
|
.el-pagination__total,
|
||||||
.el-pagination__sizes {
|
.el-pagination__sizes {
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
|
|
|
@ -165,7 +165,9 @@ export default {
|
||||||
requestVertexNormals: true, //开启地形光照
|
requestVertexNormals: true, //开启地形光照
|
||||||
requestWaterMask: true, // 开启水面波纹
|
requestWaterMask: true, // 开启水面波纹
|
||||||
})
|
})
|
||||||
|
api.viewer.camera.flyTo({
|
||||||
|
destination: Cesium.Cartesian3.fromDegrees(108.93934, 34.25777, 4000)
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
api.Public.setGisState(true);
|
api.Public.setGisState(true);
|
||||||
api.Public.setTerrainState(false, "http://113.201.2.107:9304/layer.json", false)
|
api.Public.setTerrainState(false, "http://113.201.2.107:9304/layer.json", false)
|
||||||
|
@ -256,7 +258,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doModelMove() {
|
doModelMove() {
|
||||||
let that=this
|
let that = this
|
||||||
if (api.m_model.size == 1) {
|
if (api.m_model.size == 1) {
|
||||||
let modelId = api.m_model.keys().toArray()[0];
|
let modelId = api.m_model.keys().toArray()[0];
|
||||||
that.showMove = true;
|
that.showMove = true;
|
||||||
|
|
|
@ -0,0 +1,174 @@
|
||||||
|
function initEngine(apiID, elId, bimCfg, cb) {
|
||||||
|
if (bimCfg.clientApi) {
|
||||||
|
initAPIEngine(apiID, elId, bimCfg, cb)
|
||||||
|
} else {
|
||||||
|
initSAPIEngine(apiID, elId, bimCfg, cb)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function initAPIEngine(apiID, elId, bimCfg, cb) {
|
||||||
|
let opt = {
|
||||||
|
container: elId, //[必须]容器id
|
||||||
|
showfps: false, //[可选]显示fps
|
||||||
|
openearth: true, //[可选]开启gis场景
|
||||||
|
// imageryprovider: "tianditu_image", //[可选]gis底图
|
||||||
|
openterrain: false, //[可选]开启gis地形
|
||||||
|
maxspaceerror: 5000, //[可选]模型可视距离; 建议设置:常规BIM时3000或更大、BIM启用LOD时100~1000、倾斜摄影,点云数据时0.1~0.5
|
||||||
|
loading: false, //[可选]gis模式加载动画
|
||||||
|
bgcolor: "#87CEFA", //[可选]bim模式场景背景色
|
||||||
|
selectedcolor: "#FFFF00", //[可选]选中构件颜色
|
||||||
|
throughwall: true, //[可选]相机是否穿墙
|
||||||
|
sitepath: "../Cesium/",//[可选]设置天空盒路径,指向Cesium文件夹
|
||||||
|
editmode: true, //[可选]是否开启编辑模式
|
||||||
|
searchbox: true, //[可选]gis模型是否显示搜索框
|
||||||
|
mapbox: true, //[可选]gis模型是否显示地图选择
|
||||||
|
isRequestWebgl2: true, //[可选]是否使用webgl2进行渲染
|
||||||
|
colorBlendMode: 1, //0:HIGHLIGHT 1:REPLACE 2:MIX ,构件选中后的着色模式
|
||||||
|
secretkey: window.config.secretKey,
|
||||||
|
language: "zh-CN", // 语言国际化 中文简体(zh-CN)、中文繁体(zh-TW)、英文(en), 默认中文简体
|
||||||
|
targetFrameRate: 20, //目标渲染帧率 默认20
|
||||||
|
};
|
||||||
|
let api = new API(opt);
|
||||||
|
|
||||||
|
window[apiID] = api
|
||||||
|
console.log("初始化成功");
|
||||||
|
doChangeGis(bimCfg, api)
|
||||||
|
|
||||||
|
cb && cb();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function doChangeGis(bimCfg, api) {
|
||||||
|
if (bimCfg.showGis) {
|
||||||
|
if (bimCfg.clientApi) {
|
||||||
|
api.Public.setGisState(true);
|
||||||
|
api.viewer.terrainProvider = Cesium.createWorldTerrain({
|
||||||
|
requestVertexNormals: true, //开启地形光照
|
||||||
|
requestWaterMask: true, // 开启水面波纹
|
||||||
|
})
|
||||||
|
api.viewer.camera.flyTo({
|
||||||
|
destination: Cesium.Cartesian3.fromDegrees(108.93934, 34.25777, 4000)
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
api.Public.setGisState(true);
|
||||||
|
api.Public.setTerrainState(false, "http://113.201.2.107:9304/layer.json", false)
|
||||||
|
api.Public.setGisState(true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let color = bimCfg.background || "rgba(135 ,206 ,250,1)"
|
||||||
|
api.Public.setGisState(false, color);
|
||||||
|
api.Public.setSkyBoxState(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function initSAPIEngine(apiID, elId, bimCfg, cb) {
|
||||||
|
let api = new SAPI(
|
||||||
|
{
|
||||||
|
serverIP: window.config.serverIP, //服务ip地址
|
||||||
|
port: window.config.port, //HTTP端口
|
||||||
|
useHttps: window.config.useHttps, //使用Https
|
||||||
|
container: elId, //[必须]容器id
|
||||||
|
secretKey: window.config.secretKey,
|
||||||
|
openEarth: window.config.openEarth, //[可选]开启Gis场景
|
||||||
|
bgColor: window.config.bgColor, //[可选]bim场景背景色, 传值即为纯色天空盒
|
||||||
|
tintColor: window.config.tintColor, //[可选]osgb单体化颜色
|
||||||
|
sceneTime: window.config.sceneTime, //[可选]分别为当前时间、日出时间、日落时间
|
||||||
|
cadMode: window.config.cadMode, // 是否是Cad图纸预览模式
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
console.log("初始化成功");
|
||||||
|
let mapOptions = {
|
||||||
|
imgs: {
|
||||||
|
// 六面图片
|
||||||
|
top: "/cdn/bim/sapi/img/top.png",
|
||||||
|
bottom: "/cdn/bim/sapi/img/under.png",
|
||||||
|
east: "/cdn/bim/sapi/img/east.png",
|
||||||
|
south: "/cdn/bim/sapi/img/south.png",
|
||||||
|
west: "/cdn/bim/sapi/img/west.png",
|
||||||
|
north: "/cdn/bim/sapi/img/north.png",
|
||||||
|
},
|
||||||
|
offset: {
|
||||||
|
// 屏幕坐标偏移
|
||||||
|
corner: GLENavigationCube.RightTop,
|
||||||
|
x: 25,
|
||||||
|
y: 20,
|
||||||
|
},
|
||||||
|
cube: {
|
||||||
|
hoverColor: "#7193dc", // 立方导航快鼠标移过显示颜色
|
||||||
|
size: 32, // 导航立方尺寸
|
||||||
|
hotPointSize: 7, // 导航立方棱角热点区域尺寸
|
||||||
|
cubeTextColor: "#4c4c4ccc", // cube 各个面文字颜色
|
||||||
|
cubeStrokeColor: "#374769cc", // cube 各个面边框颜色
|
||||||
|
cubeFillColor: "#374769cc", // cube 各个面填充颜色
|
||||||
|
},
|
||||||
|
zoomRatios: 1, // 缩放倍率
|
||||||
|
show: true, // 是否显示
|
||||||
|
showAxes: true, // 是否显示XYZ轴线
|
||||||
|
};
|
||||||
|
window[apiID] = api
|
||||||
|
api.Plugin.initNavCube(mapOptions);
|
||||||
|
doChangeGis(bimCfg, api)
|
||||||
|
cb && cb();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function addModel(api, bimCfg, modelId, cb, models) {
|
||||||
|
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
|
||||||
|
let direction = null;
|
||||||
|
let modelInfo = null;
|
||||||
|
if (models) {
|
||||||
|
modelInfo = models.find(m => m.modelId == modelId);
|
||||||
|
}
|
||||||
|
if (bimCfg.clientApi) {
|
||||||
|
url = `/bimdata/Tools/output/model/${modelId}/root.glt`;
|
||||||
|
if (modelInfo) {
|
||||||
|
direction = modelInfo.bimCfg.direction;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log("加载模型:" + url);
|
||||||
|
api.Model.add(
|
||||||
|
url,
|
||||||
|
modelId,
|
||||||
|
() => {
|
||||||
|
console.log("加载模型成功2");
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
console.log("加载模型成功");
|
||||||
|
|
||||||
|
if (modelInfo) {
|
||||||
|
let cfg = modelInfo.bimCfg;
|
||||||
|
|
||||||
|
let x = cfg?.x || 0;
|
||||||
|
let y = cfg?.y || 0;
|
||||||
|
let z = cfg?.z || 0;
|
||||||
|
let rotateZ = cfg?.rotateZ || 0;
|
||||||
|
let rotateX = cfg?.rotateX || 0;
|
||||||
|
let rotateY = cfg?.rotateY || 0;
|
||||||
|
if (x * 1 + y * 1 + z * 1 != 0) {
|
||||||
|
console.log(x, y, z)
|
||||||
|
api.Model.moveToPosition([x, y, z], 0, modelId)
|
||||||
|
}
|
||||||
|
if (rotateZ * 1 != 0) {
|
||||||
|
if (this.me.bimCfg.clientApi) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
api.Model.rotate(rotateX, rotateY, rotateZ, modelId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (cfg && cfg.hideParts) {
|
||||||
|
cfg.hideParts.forEach(it => {
|
||||||
|
this.me.hideParts.push(it);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cb && cb();
|
||||||
|
|
||||||
|
}, direction);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
initEngine,
|
||||||
|
addModel
|
||||||
|
}
|
Loading…
Reference in New Issue