dev_xd
姜玉琦 2025-06-17 23:15:24 +08:00
commit edf113de5a
71 changed files with 4413 additions and 746 deletions

View File

@ -16,7 +16,7 @@ spring:
# 服务注册地址 # 服务注册地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@
# 服务分组 # 服务分组
group: lijun # group: lijun
config: config:
# 配置中心地址 # 配置中心地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1000 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -25,6 +25,8 @@
<script src="/cdn/element-ui/lib/index.js"></script> <script src="/cdn/element-ui/lib/index.js"></script>
<script src="/cdn/jquery/3.5.1/jquery.min.js"></script> <script src="/cdn/jquery/3.5.1/jquery.min.js"></script>
<script src="./js/echarts.min.js"></script> <script src="./js/echarts.min.js"></script>
<script src="./js/echarts-liquidfill.min.js"></script>
<link rel="stylesheet" href="/cesium/Widgets/widgets.css" /> <link rel="stylesheet" href="/cesium/Widgets/widgets.css" />
<script src="/cesium/jquery-3.0.0.min.js"></script> <script src="/cesium/jquery-3.0.0.min.js"></script>
<script src="/cesium/Cesium.js?v=20230913"></script> <script src="/cesium/Cesium.js?v=20230913"></script>
@ -49,7 +51,8 @@
<script src="/cdn/hkplug/jsencrypt.min.js"></script> <script src="/cdn/hkplug/jsencrypt.min.js"></script>
<script src="/cdn/hkplug/jsWebControl-1.0.0.min.js"></script> <script src="/cdn/hkplug/jsWebControl-1.0.0.min.js"></script>
<script src="./easyplayer/EasyWasmPlayer.js"></script> <script src="./easyplayer/EasyWasmPlayer.js"></script>
<script src="/cdn/bim/sapi/BIMGISEngine.js"></script>
<script src="/cdn/bim/sapi/config.js"></script>
<style type="text/css"> <style type="text/css">
#webpack-dev-server-client-overlay { #webpack-dev-server-client-overlay {
display: none; display: none;

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,116 @@
import request from "@/utils/request";
//获取项目的模型列表
const listBimModel = (query) => {
return request({
url: "/manage/bim/bimModel/list",
method: "get",
params: query,
});
};
//获取BIM设备位置
const devicePositionGet = (data) => {
return request({
url: "/manage/api/bim/devicePosition/get",
method: "get",
params: data,
});
};
//BIM沙盘查询监控数据
const videoMonitorBimData = (query) => {
return request({
url: "/manage/api/videoMonitor/bimGetData",
method: "get",
params: query,
});
};
//BIM沙盘查询塔机数据
const devTowerBimData = (query) => {
return request({
url: "/manage/api/devTower/bimGetData",
method: "get",
params: query,
});
};
//BIM沙盘查询配电箱数据
const devIotBimData = (query) => {
return request({
url: "/manage/api/devIot/bimGetData",
method: "get",
params: query,
});
};
//根据项目ID获取计划完成率
const getRootScheduleNode = (query) => {
return request({
url: "/manage/api/plan/getRootScheduleNode",
method: "get",
params: query,
});
};
const getModelTree = (name, pid) => {
return request({
url: "/manage//bim/modelInfo/modelTree/" + name + "?pid=" + pid,
method: "get",
});
};
const modelTreeAllLeafChild = (name, pid) => {
return request({
url: "/manage//bim/modelInfo/modelTreeAllLeafChild/" + name + "?pid=" + pid,
method: "get",
});
};
const modelTreeAllChild = (name, pid) => {
return request({
url: "/manage//bim/modelInfo/modelTreeAllChild/" + name + "?pid=" + pid,
method: "get",
});
};
const getTreeAllLeafChild = (name, pid) => {
return request({
url: "/manage/bim/modelInfo/modelTreeAllLeafChild/" + name + "?pid=" + pid,
method: "get",
});
};
/**
* 获取视点信息
*
* @param {Object} data 请求参数对象
* @returns {Promise} 返回Promise对象包含请求结果
*/
const viewpointGet = (data) => {
return request({
url: "/manage/api/bim/viewpoint/get",
method: "get",
params: data,
});
};
const roamingGet=data=>{
return request({
url: "/manage/api/bim/roaming/get",
method: "get",
params: data,
});
}
export default {
listBimModel,
devicePositionGet,
devTowerBimData,
videoMonitorBimData,
devIotBimData,
getRootScheduleNode,
getModelTree,
modelTreeAllLeafChild,
modelTreeAllChild,
getTreeAllLeafChild,
viewpointGet,
roamingGet
};

View File

@ -1,5 +1,5 @@
import request from "@/utils/request"; import request from "@/utils/request";
import dayjs from 'dayjs' import dayjs from "dayjs";
const groupByAll = (data) => { const groupByAll = (data) => {
return new Promise((resolve) => { return new Promise((resolve) => {
return request({ return request({
@ -7,35 +7,35 @@ const groupByAll = (data) => {
method: "get", method: "get",
params: data, params: data,
}).then((d) => { }).then((d) => {
let tmps=(d.data||[]).map(it=>{ let tmps = (d.data || []).map((it) => {
it.sumEmissionReduction=(it.sumEstimateValue||0)-(it.sumPracticalValue||0); it.sumEmissionReduction = (it.sumEstimateValue || 0) - (it.sumPracticalValue || 0);
it.emissionReduction=(it.estimateValue||0)-(it.practicalValue||0); it.emissionReduction = (it.estimateValue || 0) - (it.practicalValue || 0);
return it; return it;
}) });
let sumEmissionReduction=0; let sumEmissionReduction = 0;
let sumEstimateValue=0; let sumEstimateValue = 0;
let sumPracticalValue=0; let sumPracticalValue = 0;
let emissionReduction=0; let emissionReduction = 0;
let estimateValue=0; let estimateValue = 0;
let practicalValue=0; let practicalValue = 0;
tmps.forEach(it=>{ tmps.forEach((it) => {
sumEmissionReduction+=(it.sumEmissionReduction||0); sumEmissionReduction += it.sumEmissionReduction || 0;
sumEstimateValue+=(it.sumEstimateValue||0); sumEstimateValue += it.sumEstimateValue || 0;
sumPracticalValue+=(it.sumPracticalValue||0); sumPracticalValue += it.sumPracticalValue || 0;
emissionReduction+=(it.emissionReduction||0); emissionReduction += it.emissionReduction || 0;
estimateValue+=(it.estimateValue||0); estimateValue += it.estimateValue || 0;
practicalValue+=(it.practicalValue||0); practicalValue += it.practicalValue || 0;
}); });
tmps.push({ tmps.push({
factorType:0, factorType: 0,
sumEmissionReduction:sumEmissionReduction, sumEmissionReduction: sumEmissionReduction,
sumEstimateValue:sumEstimateValue, sumEstimateValue: sumEstimateValue,
sumPracticalValue:sumPracticalValue, sumPracticalValue: sumPracticalValue,
emissionReduction:emissionReduction, emissionReduction: emissionReduction,
estimateValue:estimateValue, estimateValue: estimateValue,
practicalValue:practicalValue practicalValue: practicalValue,
}) });
resolve(tmps) resolve(tmps);
}); });
}); });
}; };
@ -46,58 +46,60 @@ const groupCurrentMonth = (data) => {
url: "/manage/greenCarbonData/groupCurrentMonth", url: "/manage/greenCarbonData/groupCurrentMonth",
method: "get", method: "get",
params: data, params: data,
}).then(d=>{ }).then((d) => {
let tmps=(d.data||[]).map(it=>{ let tmps = (d.data || []).map((it) => {
it.emissionReduction=(it.estimateValue||0)-(it.practicalValue||0); it.emissionReduction = (it.estimateValue || 0) - (it.practicalValue || 0);
return it; return it;
}) });
let emissionReduction=0; let emissionReduction = 0;
let estimateValue=0; let estimateValue = 0;
let practicalValue=0; let practicalValue = 0;
tmps.forEach(it=>{ tmps.forEach((it) => {
emissionReduction+=(it.emissionReduction||0); emissionReduction += it.emissionReduction || 0;
estimateValue+=(it.estimateValue||0); estimateValue += it.estimateValue || 0;
practicalValue+=(it.practicalValue||0); practicalValue += it.practicalValue || 0;
}); });
tmps.push({ tmps.push({
factorType:0, factorType: 0,
emissionReduction:emissionReduction, emissionReduction: emissionReduction,
estimateValue:estimateValue, estimateValue: estimateValue,
practicalValue:practicalValue practicalValue: practicalValue,
}) });
resolve(tmps) resolve(tmps);
}); });
}); });
}; };
const getGroupData=(tmps,data,factorType,dataType)=>{ const getGroupData = (tmps, data, factorType, dataType) => {
let titles=[]; let titles = [];
let res=[]; let res = [];
let dt=dayjs(data.createTime); let dt = dayjs(data.createTime);
for(let i=0;i<12;i++){ for (let i = 0; i < 12; i++) {
let date=dt.add(i,"month"); let date = dt.add(i, "month");
let year=date.$y; let year = date.$y;
let month=date.$M+1; let month = date.$M + 1;
titles.push(month+"月"); titles.push(month + "月");
let objs=tmps.filter(it=>(it.factorType==factorType||factorType==0)&& it.comId==year && it.projectId==month); let objs = tmps.filter((it) => (it.factorType == factorType || factorType == 0) && it.comId == year && it.projectId == month);
let val=null; let val = 0;
if(objs.length>0){ if (objs.length > 0) {
if(dataType==1){ objs.forEach((obj) => {
val=objs[0].estimateValue/1000.0 if (dataType == 1) {
val += obj.estimateValue / 1000.0;
} }
if(dataType==2){ if (dataType == 2) {
val=objs[0].practicalValue/1000.0 val += obj.practicalValue / 1000.0;
} }
if(dataType==3){ if (dataType == 3) {
val=((objs[0].estimateValue||0) - (val=objs[0].practicalValue||0))/1000.0 val += ((obj.estimateValue || 0) - (val = obj.practicalValue || 0)) / 1000.0;
} }
});
} }
res.push(val); res.push(val);
} }
return { return {
titles:titles, titles: titles,
datas:res datas: res,
} };
} };
const groupByYearMonth = (data) => { const groupByYearMonth = (data) => {
return new Promise((resolve) => { return new Promise((resolve) => {
@ -105,47 +107,46 @@ const groupByYearMonth = (data) => {
url: "/manage/greenCarbonData/groupByYearMonth", url: "/manage/greenCarbonData/groupByYearMonth",
method: "get", method: "get",
params: data, params: data,
}).then(d=>{ }).then((d) => {
let tmps=d.data||[]; let tmps = d.data || [];
let buildData={ let buildData = {
//预估 //预估
estimate: getGroupData(tmps,data,1,1), estimate: getGroupData(tmps, data, 1, 1),
//实际 //实际
practical:getGroupData(tmps,data,1,2), practical: getGroupData(tmps, data, 1, 2),
//减排 //减排
emissionReduction:getGroupData(tmps,data,1,3), emissionReduction: getGroupData(tmps, data, 1, 3),
}; };
let oilData={ let oilData = {
//预估 //预估
estimate: getGroupData(tmps,data,2,1), estimate: getGroupData(tmps, data, 2, 1),
//实际 //实际
practical:getGroupData(tmps,data,2,2), practical: getGroupData(tmps, data, 2, 2),
//减排 //减排
emissionReduction:getGroupData(tmps,data,2,3), emissionReduction: getGroupData(tmps, data, 2, 3),
}; };
let powerData={ let powerData = {
//预估 //预估
estimate: getGroupData(tmps,data,3,1), estimate: getGroupData(tmps, data, 3, 1),
//实际 //实际
practical:getGroupData(tmps,data,3,2), practical: getGroupData(tmps, data, 3, 2),
//减排 //减排
emissionReduction:getGroupData(tmps,data,3,3), emissionReduction: getGroupData(tmps, data, 3, 3),
}; };
let totalData={ let totalData = {
//预估 //预估
estimate: getGroupData(tmps,data,0,1), estimate: getGroupData(tmps, data, 0, 1),
//实际 //实际
practical:getGroupData(tmps,data,0,2), practical: getGroupData(tmps, data, 0, 2),
//减排 //减排
emissionReduction:getGroupData(tmps,data,0,3), emissionReduction: getGroupData(tmps, data, 0, 3),
}; };
resolve({ resolve({
buildData:buildData, buildData: buildData,
oilData:oilData, oilData: oilData,
powerData:powerData, powerData: powerData,
totalData:totalData, totalData: totalData,
}) });
}); });
}); });
}; };

View File

@ -11,6 +11,7 @@ import powerIot from "./powerIot";
import aiWarning from "./aiWarning"; import aiWarning from "./aiWarning";
import planSchedule from "./planSchedule"; import planSchedule from "./planSchedule";
import labor from "./labor"; import labor from "./labor";
import bim from "./bim"
export default { export default {
http: axios, http: axios,
downFile: download, downFile: download,
@ -26,4 +27,5 @@ export default {
aiWarning, aiWarning,
planSchedule, planSchedule,
labor, labor,
bim,
}; };

View File

@ -14,7 +14,15 @@ const getProjectInfo=id=>{
}); });
} }
const bigScreenGetMenuByProjectId=id=>{
return request({
url: "/manage/api/project/bigscreenMenu/bigScreenGetMenuByProjectId?projectId="+id,
method: "get",
});
}
export default { export default {
findMyProjectList, findMyProjectList,
getProjectInfo getProjectInfo,
bigScreenGetMenuByProjectId
}; };

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1.6005859375em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1639 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3864"><path d="M1282.80064 648.00128l-161.1264-62.79296c0 0-30.72896-11.9296-42.66624-23.66208-7.67232-7.54176-7.11808-25.33248-0.32896-48.06016 6.78912-22.7264 89.39008-115.08864 89.39008-198.98752 0-129.57312-85.18528-234.6304-190.25664-234.6304-20.34432 0-39.936 3.9552-58.31552 11.24864 21.11232 14.40256 40.46848 31.9936 57.8112 52.576 0.16768-0.00128 0.33664-0.00768 0.50432-0.00768 31.20512 0 61.37728 16.01792 84.96256 45.10208 26.74688 32.98688 41.47712 77.632 41.47712 125.71264 0 38.53312-32.04608 89.52704-54.24 123.21408-1.6128 2.44736-3.17696 4.81152-4.67072 7.06432-13.97504 21.10208-23.20896 35.04256-27.80928 50.44224-4.00768 13.41056-6.48192 25.96608-7.44832 37.6576-2.56128 30.9632 5.51424 55.82848 24.192 74.18368 19.23584 18.90816 51.37664 32.61952 64.30208 37.63712l161.04832 62.76352c0.53376 0.20736 1.07008 0.40832 1.61024 0.60288 10.76992 3.8656 18.27584 14.28864 18.27584 21.22368l0 15.73632c-1.53344 0.53376-4.04864 1.09824-7.53408 1.09824l-51.88096 0c15.33312 18.78784 26.496 40.63232 32.24192 63.81696l19.63904 0c39.34336 0 71.34976-24.11392 71.34976-63.52384l0-17.12768C1343.33056 693.1712 1316.74112 660.1856 1282.80064 648.00128z" p-id="3865"></path><path d="M1124.43264 753.5872l-182.32832-71.05664c0 0-34.77248-13.49888-48.27904-26.77504-8.68224-8.53376-8.05376-28.66688-0.3712-54.38464 7.68256-25.71776 101.152-130.23232 101.152-225.1712 0-146.62272-96.39296-265.504-215.29088-265.504-118.88896 0-215.27552 118.88-215.27552 265.51168 0 90.93248 83.29088 199.33824 93.568 219.04128 10.2848 19.70432 7.7824 49.73312-0.3392 58.8288-12.19328 13.664-56.74752 27.36128-56.74752 27.36128l-164.36736 73.25312c-38.39872 13.79584-68.4864 50.01472-68.4864 90.87488l0 19.38176c0 44.5952 36.2176 71.88224 80.7296 71.88224l275.68128 0 94.49472 0 293.61664 0c44.52096 0 80.73728-27.28704 80.73728-71.88224L1192.92672 845.568C1192.928 804.70016 1162.83904 767.37536 1124.43264 753.5872zM1129.11232 864.95104c0 3.0336-0.54912 3.49824-1.13024 3.98976-2.21696 1.88032-7.68512 4.07552-15.79392 4.07552L448.3968 873.01632c-8.10368 0-13.568-2.1952-15.78496-4.07424-0.58112-0.4928-1.13024-0.95872-1.13024-3.99232l0-19.38048c0-11.9936 11.53024-25.5296 26.24896-30.81856 1.48736-0.53376 2.95552-1.12384 4.39936-1.76768l160.99328-71.7504c27.5904-8.79232 62.78144-23.3984 81.75744-44.66304 30.24512-33.8752 28.3776-94.30016 9.29792-130.85056-3.21792-6.1696-7.60064-12.87552-14.23616-23.02592-12.3968-18.96704-31.13344-47.63136-46.77376-79.99616-20.92288-43.29344-25.31328-70.92864-25.31328-86.48832 0-56.33152 17.33376-108.73216 48.80768-147.552 28.30848-34.91584 64.76416-54.144 102.65088-54.144 37.89184 0 74.35136 19.22944 102.66368 54.14528 31.47648 38.81856 48.81024 91.21664 48.81024 147.54304 0 49.30048-42.60224 113.6256-68.0576 152.0576-15.40096 23.25376-25.57568 38.61504-30.42432 54.84672-15.58016 52.1472-9.9328 91.904 16.78464 118.16448 20.65536 20.30208 55.776 35.26272 69.91744 40.75264l182.25024 71.02464c0.53376 0.20736 1.07008 0.40832 1.61024 0.60288 14.4704 5.19424 26.24256 19.51488 26.24256 31.91936L1129.11232 864.95104 1129.11232 864.95104z" p-id="3866"></path></svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2562"><path d="M1002.7584 475.776L566.2784 39.68 537.1584 10.24a35.584 35.584 0 0 0-50.176 0L21.2544 475.776A72.192 72.192 0 0 0 0.0064 527.744a72.96 72.96 0 0 0 73.28 71.488h48v367.872h781.44V599.232h49.024c19.264 0 37.44-7.552 51.136-21.184 13.696-13.696 21.12-31.872 21.12-51.2 0-19.2-7.552-37.376-21.248-51.072z m-427.52 410.048H448.7744v-230.4h126.464v230.4z m246.144-367.872v367.872h-173.824V628.288a45.184 45.184 0 0 0-45.184-45.184H421.6384a45.184 45.184 0 0 0-45.184 45.184v257.536H202.6304V517.952H94.2144l417.92-417.6 26.048 26.112 391.68 391.488h-108.48z" p-id="2563"></path></svg>

After

Width:  |  Height:  |  Size: 782 B

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2770"><path d="M654.688607 340.576674A255.737503 255.737503 0 0 0 767.9975 128.00875a95.999063 95.999063 0 0 0-153.5985-76.80925 127.99875 127.99875 0 0 0-204.798 0A95.999063 95.999063 0 0 0 256.0025 128.00875a255.737503 255.737503 0 0 0 113.308893 212.567924C173.893302 401.336081 32.004687 583.594301 32.004687 799.002197c0 124.258787 100.739016 224.997803 224.997803 224.997803h509.99502c124.258787 0 224.997803-100.739016 224.997803-224.997803 0-215.407896-141.888614-397.666117-337.306706-458.425523z m-278.457281-76.79925A190.738137 190.738137 0 0 1 320.001875 128.00875a31.999688 31.999688 0 0 1 31.999687-31.999688 31.669691 31.669691 0 0 1 19.159813 6.369938 63.999375 63.999375 0 0 0 89.609125-12.729875 63.999375 63.999375 0 0 1 102.459 0 63.999375 63.999375 0 0 0 89.609125 12.729875A31.659691 31.659691 0 0 1 671.998438 96.009062a31.999688 31.999688 0 0 1 31.999687 31.999688 191.998125 191.998125 0 0 1-175.458287 191.288132Q520.299919 319.006885 512 319.006885q-8.299919 0-16.529839 0.289997a190.548139 190.548139 0 0 1-119.228835-55.529458z m504.605072 649.063662A159.998438 159.998438 0 0 1 766.99751 960.000625H257.00249A160.998428 160.998428 0 0 1 96.004062 799.002197a415.555942 415.555942 0 0 1 398.226112-415.615941c5.869943 0.399996 11.789885 0.619994 17.769826 0.619994s11.889884-0.219998 17.769826-0.619994A415.575942 415.575942 0 0 1 927.995938 799.002197a159.998438 159.998438 0 0 1-47.15954 113.838889zM630.628842 521.374908a31.999688 31.999688 0 0 0-45.259558 0L512 594.754192l-73.369284-73.369284a31.999688 31.999688 0 0 0-45.249558 45.259558L466.740442 640.00375H416.000937a31.999688 31.999688 0 0 0 0 63.999375h63.999375v63.999375h-63.999375a31.999688 31.999688 0 0 0 0 63.999375h63.999375v31.999687a31.999688 31.999688 0 0 0 63.999376 0v-31.999687h63.999375a31.999688 31.999688 0 0 0 0-63.999375h-63.999375v-63.999375h63.999375a31.999688 31.999688 0 0 0 0-63.999375h-50.739505l73.369284-73.369284a31.999688 31.999688 0 0 0 0-45.259558z" p-id="2771"></path></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3396"><path d="M512 1024A512 512 0 1 1 512 0a512 512 0 0 1 0 1024zM320 320v384h128V320H320z m256 0v384h128V320H576z" p-id="3397"></path></svg>

After

Width:  |  Height:  |  Size: 330 B

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1906"><path d="M512 1002.666667C243.2 1002.666667 25.6 785.066667 25.6 516.266667S243.2 29.866667 512 29.866667v42.666666C268.8 72.533333 68.266667 273.066667 68.266667 516.266667S268.8 960 512 960s443.733333-200.533333 443.733333-443.733333h42.666667c0 268.8-217.6 486.4-486.4 486.4z m418.133333-627.2c-46.933333-132.266667-153.6-238.933333-285.866666-281.6l12.8-42.666667c149.333333 46.933333 264.533333 162.133333 315.733333 307.2l-42.666667 17.066667z" p-id="1907"></path><path d="M413.866667 332.8c51.2 4.266667 81.066667 38.4 81.066666 102.4-4.266667 64-29.866667 98.133333-85.333333 98.133333-51.2-4.266667-76.8-38.4-81.066667-98.133333 4.266667-64 34.133333-98.133333 85.333334-102.4z m0 162.133333c25.6 0 38.4-21.333333 38.4-59.733333 0-38.4-12.8-59.733333-38.4-59.733333-25.6 0-38.4 21.333333-38.4 59.733333 0 38.4 12.8 55.466667 38.4 59.733333z m187.733333-162.133333h46.933333l-200.533333 379.733333H401.066667l200.533333-379.733333z m38.4 183.466667c51.2 4.266667 81.066667 38.4 81.066667 102.4-4.266667 59.733333-29.866667 93.866667-85.333334 93.866666-51.2-4.266667-76.8-34.133333-81.066666-93.866666 4.266667-64 29.866667-98.133333 85.333333-102.4z m-4.266667 162.133333c21.333333 0 34.133333-21.333333 38.4-59.733333 0-38.4-12.8-55.466667-34.133333-59.733334-25.6 0-38.4 21.333333-38.4 59.733334 0 38.4 12.8 55.466667 34.133333 59.733333z" p-id="1908"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,2 @@
<svg class="icon" style="width: 1.0400390625em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1065 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7908">
<path d="M0 1024V250.6656h101.978163a623.725473 623.725473 0 0 0-5.774667 85.596129c0 285.33408 194.290925 517.180818 433.468623 517.180818s433.448146-231.273367 433.448147-517.180818a641.807143 641.807143 0 0 0-5.75419-85.596129h101.281926v773.3344z m379.592209-250.542735a219.212095 219.212095 0 0 1-105.295525-24.962124 200.41371 200.41371 0 0 1-16.054393-80.968204 198.181658 198.181658 0 0 0 16.054393 80.968204c-51.193857-83.609807-27.910891-215.710435 69.726033-303.743391l106.954206-101.240971a29.323841 29.323841 0 0 1 37.187217 0l69.746511 52.873015v4.402672c-32.538815 35.200896-67.412071 83.630284-92.988522 114.448986s-18.614086 44.026717-4.668879 57.214254a36.675279 36.675279 0 0 0 46.504499 4.402672l13.945207-8.805344a1190.707675 1190.707675 0 0 0 120.817502-88.053433h4.648402l55.821781 66.040075a25.658361 25.658361 0 0 1 0 35.221373l-106.954205 101.220494a311.258649 311.258649 0 0 1-215.50566 90.981722z m78.920449-221.157461c-2.313962-12.675599-1.33104-15.41959 10.50498-30.122465a191.731232 191.731232 0 0 1 23.876815-24.573052s23.221533-26.41603 37.187217-39.624045a984.335 984.335 0 0 1 93.008999-101.240971l186.017998-145.390553 4.627925-4.382194 4.259328-4.095509a90.387873 90.387873 0 0 1 0.389074-31.16682s7.146662-46.893573 18.614086-107.650441v-6.798545l2.293485-6.593768 0.901012-2.559693 1.433428-6.470904c0.143343-0.675759 0.307163-1.310563 0.430028-2.047754H841.627005c0-3.194497 0-4.095509 1.822501-6.040875 0.880534-3.74739 1.802024-7.597168 2.805423-11.528857 0-4.423149 4.689357-8.825821 4.689358-13.208015a9.74731 9.74731 0 0 1 9.276327-8.825821 16.648242 16.648242 0 0 1 9.317281 4.402672 15.66532 15.66532 0 0 1 4.648403 13.228493l-4.648403 17.590209a443.707395 443.707395 0 0 0-27.91089 105.66412 88.811103 88.811103 0 0 1-4.8327 26.41603 13.719954 13.719954 0 0 1-1.781547 5.549414l-2.682558 7.658601a19.924649 19.924649 0 0 0 4.66888 26.436508l9.296804 13.187537a22.791505 22.791505 0 0 0 27.931369 4.402672 77.814662 77.814662 0 0 1 41.815142-13.208015 510.91469 510.91469 0 0 0 111.623085-26.41603l18.593609-8.825821a17.692597 17.692597 0 0 1 13.945206 4.361717c4.648402 4.423149 4.648402 4.423149 4.648403 8.825821a9.767788 9.767788 0 0 1-9.296805 8.82582 467.563732 467.563732 0 0 1-134.865096 35.200896 101.302404 101.302404 0 0 0-51.193857 17.610687l-4.689357 4.402672c0 4.402672-4.648402 4.402672-9.296804 8.784866l-162.75551 154.093508c-55.821781 48.429388-84.387953 68.825021-132.366836 105.664121a302.658081 302.658081 0 0 1-59.630604 41.671799c-8.191017 3.849778-10.648322 6.716634-17.569732 6.716634a28.66856 28.66856 0 0 1-24.777826-20.047514zM892.779906 61.739791v-4.382194c0-4.402672 4.66888-8.825821 4.66888-13.228492L906.745591 17.713074h4.689357a964.16462 964.16462 0 0 1 139.472543 132.080151v4.382194l-27.890413 8.805343c-4.66888 4.402672-9.317282 4.402672-18.614086 4.402672a1235.348718 1235.348718 0 0 0-111.623086-105.643643z m-53.487341-10.99644z" p-id="7909"></path></svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1907"><path d="M512 1024A512 512 0 1 1 512 0a512 512 0 0 1 0 1024zM383.232 287.616v448l384-223.104-384-224.896z" p-id="1908"></path></svg>

After

Width:  |  Height:  |  Size: 326 B

View File

@ -1,17 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5537" data-spm-anchor-id="a313x.search_index.i1.i2.30073a81HnVMdv">
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <path d="M768 42.666667H256C209.066667 42.666667 170.666667 81.066667 170.666667 128v682.666667c0 46.933333 38.4 85.333333 85.333333 85.333333v42.666667c0 23.466667 19.2 42.666667 42.666667 42.666666h85.333333c23.466667 0 42.666667-19.2 42.666667-42.666666v-42.666667h170.666666v42.666667c0 23.466667 19.2 42.666667 42.666667 42.666666h85.333333c23.466667 0 42.666667-19.2 42.666667-42.666666v-42.666667c46.933333 0 85.333333-38.4 85.333333-85.333333V128c0-46.933333-38.4-85.333333-85.333333-85.333333zM309.333333 170.666667h405.333334c17.066667 0 32 14.933333 32 32s-14.933333 32-32 32h-405.333334c-17.066667 0-32-14.933333-32-32S292.266667 170.666667 309.333333 170.666667z m0 554.666666c17.066667 0 32 14.933333 32 32s-14.933333 32-32 32-32-14.933333-32-32 14.933333-32 32-32z m106.666667 64c-17.066667 0-32-14.933333-32-32s14.933333-32 32-32 32 14.933333 32 32-14.933333 32-32 32z m106.666667 0c-17.066667 0-32-14.933333-32-32s14.933333-32 32-32 32 14.933333 32 32-14.933333 32-32 32z m-42.666667-115.2c-8.533333 12.8-25.6 8.533333-23.466667-6.4L469.333333 512h-72.533333c-14.933333 0-23.466667-17.066667-12.8-29.866667l136.533333-172.8c8.533333-12.8 25.6-8.533333 23.466667 6.4l-14.933333 155.733334h72.533333c14.933333 0 23.466667 17.066667 12.8 29.866666l-134.4 172.8z" p-id="5538"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" xml:space="preserve">
<g transform="matrix(1 0 0 1 540 540)" id="7e597b96-e20c-460b-8139-75c72d5b54b0" >
<rect style="stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill-rule: nonzero; opacity: 1; visibility: hidden;" vector-effect="non-scaling-stroke" x="-540" y="-540" rx="0" ry="0" width="1080" height="1080" />
</g>
<g transform="matrix(1 0 0 1 540 540)" id="0efec865-77d6-48e6-b9a3-7a8833b9c564" >
</g>
<g transform="matrix(0.73 0 0 0.98 421.96 576.65)" >
<path style="stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill-rule: nonzero; opacity: 1;" transform=" translate(-511.99, -512)" d="M 568.618695 342.954495 L 820.171262 2.381529 L 482.496301 2.381529 L 203.814391 547.450347 L 410.806546 547.306882 L 222.565344 1021.618471 L 818.564447 343.02622699999995 z M 796.054696 352.753194" stroke-linecap="round" />
</g>
<g transform="matrix(0.61 0 0 0.61 728.16 373.78)" >
<path style="stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill-rule: nonzero; opacity: 1;" transform=" translate(-511.99, -512)" d="M 568.618695 342.954495 L 820.171262 2.381529 L 482.496301 2.381529 L 203.814391 547.450347 L 410.806546 547.306882 L 222.565344 1021.618471 L 818.564447 343.02622699999995 z M 796.054696 352.753194" stroke-linecap="round" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1.263671875em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1294 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1101"><path d="M0 727.578947l188.631579 0 0 296.421053-188.631579 0 0-296.421053ZM269.473684 565.894737l188.631579 0 0 458.105263-188.631579 0 0-458.105263ZM565.894737 377.263158l161.684211 0 0 646.736842-161.684211 0 0-646.736842ZM835.368421 188.631579l188.631579 0 0 835.368421-188.631579 0 0-835.368421ZM1104.842105 0l188.631579 0 0 1024-188.631579 0 0-1024Z" p-id="1102"></path></svg>

After

Width:  |  Height:  |  Size: 586 B

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2688"><path d="M512 1024A512 512 0 1 1 512 0a512 512 0 0 1 0 1024zM320 320v384h384V320H320z" p-id="2689"></path></svg>

After

Width:  |  Height:  |  Size: 306 B

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="731"><path d="M344.792 518.575L303.4 477.184a26.947 26.947 0 0 1 38.13-38.13l60.174 60.173a26.947 26.947 0 0 1 0.27 37.834L114.392 833.16a26.947 26.947 0 0 0 0.27 37.834l68.984 68.958a26.947 26.947 0 0 0 38.077 0l291.301-291.3a26.947 26.947 0 0 1 38.104 0l146.324 146.323a26.947 26.947 0 1 1-38.104 38.13L532.076 705.833 259.853 978.055a80.842 80.842 0 0 1-114.337 0L76.53 909.096a80.842 80.842 0 0 1-0.809-113.475l269.043-277.046z m473.546 155.54a26.947 26.947 0 1 1-38.104 38.104L597.288 529.273a26.947 26.947 0 0 1 0-38.103l148.13-148.103a26.947 26.947 0 0 1 15.36-7.653l88.603-12.18 89.627-170.927-56.697-60.39-167.37 97.254-16.546 85.53a26.947 26.947 0 0 1-7.384 13.96l-148.13 148.102a26.947 26.947 0 0 1-38.103 0l-77.474-77.474a26.947 26.947 0 1 1 38.104-38.103l58.422 58.422 123.23-123.23 17.273-89.466a26.947 26.947 0 0 1 12.935-18.19l196.5-114.175a26.947 26.947 0 0 1 33.173 4.85l84.48 90.004a26.947 26.947 0 0 1 4.203 30.963l-104.96 200.165a26.947 26.947 0 0 1-20.21 14.201l-93.346 12.854-122.637 122.637 163.867 163.894z" p-id="732"></path><path d="M610.816 784.573a26.947 26.947 0 0 1 38.104-38.104l52.089 52.09a26.947 26.947 0 0 1-38.104 38.103l-52.089-52.09zM368.371 543.42a26.947 26.947 0 1 1 37.995-38.185L705.671 803.22a26.947 26.947 0 0 1 7.814 21.45 111.373 111.373 0 0 0 31.475 87.471 107.79 107.79 0 1 0 68.662-183.727c-2.129 0.135-3.934 0.081-5.578-0.054a26.947 26.947 0 0 1-19.537-7.868L485.24 417.954a26.947 26.947 0 1 1 38.05-38.158l295.181 294.481A161.684 161.684 0 1 1 706.83 950.272a165.16 165.16 0 0 1-47.642-117.275L368.37 543.421z" p-id="733"></path><path d="M783.076 874.036a53.895 53.895 0 1 0 76.22-76.219 53.895 53.895 0 1 0-76.22 76.219zM421.807 588.989a26.947 26.947 0 0 1 38.104 38.13L221.723 865.28a26.947 26.947 0 1 1-38.104-38.104L421.807 588.99z m81.597-229.808a26.947 26.947 0 1 1-38.104 38.104l-37.996-37.996a26.947 26.947 0 0 1-5.847-29.345c0.808-1.914 1.05-2.426 3.368-7.06l0.189-0.432c0.754-1.509 1.24-2.506 1.159-2.263a188.632 188.632 0 0 0-43.601-198.818 187.877 187.877 0 0 0-129.698-55.215 189.736 189.736 0 0 0-73.135 13.15l-2.506 0.97-1.752 0.728a26.947 26.947 0 0 1-21.073-49.61c1.887-0.809 1.887-0.809 3.423-1.402l2.102-0.808a242.068 242.068 0 0 1 93.992-16.896 241.772 241.772 0 0 1 166.723 70.98 242.526 242.526 0 0 1 57.722 250.88l25.007 25.033zM25.869 160.013a26.947 26.947 0 0 1 49.61 21.02 187.284 187.284 0 0 0-14.74 65.374 188.039 188.039 0 0 0 55.054 141.743 188.632 188.632 0 0 0 44.463 33.037 26.947 26.947 0 1 1-25.411 47.536 242.526 242.526 0 0 1-57.129-42.47A241.907 241.907 0 0 1 6.9 244.035a243.443 243.443 0 0 1 18.97-84.022z m224.337 337.274a26.947 26.947 0 0 1-0.215-53.895 189.17 189.17 0 0 0 61.79-10.644c4.366-1.51 7.168-2.21 10.94-1.563a26.947 26.947 0 0 1 18.81 7.895l33.145 33.146a26.947 26.947 0 0 1-38.103 38.13l-21.99-22.016a243.308 243.308 0 0 1-64.377 8.947z" p-id="734"></path><path d="M148.48 77.824a26.947 26.947 0 1 1 38.104-38.104l161.792 161.82a26.947 26.947 0 0 1 7.087 25.6l-22.986 91.35a26.947 26.947 0 0 1-19.564 19.565L221.56 361.04a26.947 26.947 0 0 1-25.6-7.06L30.343 188.362a26.947 26.947 0 1 1 38.13-38.103L223.26 305.044l60.901-15.306 15.306-60.9L148.48 77.823z" p-id="735"></path></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,3 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3533">
<path d="M905.5 363.9L357.2 143l-199 108.5v64.2h-65V212.9l260.4-142 577.2 233.2zM502.7 953.1H249.8V504.3h65v383.8h123V504.3h64.9zM835.7 777c-52.4 0-95.1-42.7-95.1-95.1 0-17.9 14.5-32.5 32.5-32.5s32.5 14.5 32.5 32.5c0 16.7 13.5 30.2 30.2 30.2s30.2-13.5 30.2-30.2-13.5-30.2-30.2-30.2h-32.5l-3.9-32.5V503.7c0-17.9 14.5-32.5 32.5-32.5 17.9 0 32.5 14.5 32.5 32.5v88.1c39.5 12.7 66.6 48.3 66.6 90.1-0.2 52.4-42.9 95.1-95.3 95.1z" p-id="3534"></path>
<path d="M855.9 536.1H168.1c-41.3 0-74.9-33.6-74.9-74.9V304.1h837.6v157.1c0 41.4-33.6 74.9-74.9 74.9z m-697.7-167v92.2c0 5.5 4.5 9.9 10 9.9H856c5.5 0 10-4.4 10-9.9v-92.2H158.2zM177.2 888.1h412.1V953H177.2z" p-id="3535"></path></svg>

After

Width:  |  Height:  |  Size: 875 B

View File

@ -0,0 +1,4 @@
<svg class="icon"
style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1709">
<path d="M902.4 678.4L870.4 768c-2.133333 6.4-8.533333 10.666667-14.933333 6.4L55.466667 484.266667c-12.8 32 4.266667 70.4 38.4 81.066666L298.666667 640l-14.933334 42.666667c-4.266667 12.8-14.933333 21.333333-29.866666 21.333333H106.666667v-53.333333c0-17.066667-14.933333-32-32-32S42.666667 633.6 42.666667 650.666667v170.666666c0 17.066667 14.933333 32 32 32S106.666667 838.4 106.666667 821.333333V768h151.466666c36.266667 0 70.4-23.466667 81.066667-57.6l17.066667-49.066667 488.533333 179.2c32 12.8 68.266667-4.266667 81.066667-38.4l14.933333-40.533333c10.666667-34.133333-6.4-70.4-38.4-83.2zM951.466667 407.466667L253.866667 153.6c-44.8-17.066667-93.866667 6.4-110.933334 51.2L85.333333 364.8c-17.066667 44.8 6.4 93.866667 51.2 108.8L714.666667 682.666667c32 12.8 70.4 2.133333 93.866666-23.466667l164.266667-183.466667c17.066667-21.333333 8.533333-57.6-21.333333-68.266666z" p-id="1710">
</path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9598"><path d="M845.3 978.7c-8.7-8.7-19.9-14.9-32.4-17.4-7.5-1.5-12.9-7.9-12.9-15.5V578.2c0-159-130.1-290.8-289.1-290.2-158.5 0.6-286.9 129.3-286.9 288v369.8c0 7.6-5.4 14-12.9 15.5-29.2 6-51.1 31.8-51.1 62.7h704c0-17.7-7.2-33.7-18.7-45.3zM567.3 464l-19.4 173.3H624L456.8 880l19.4-173.3H400L567.3 464zM512 208c-17.7 0-32-14.3-32-32V32c0-17.7 14.3-32 32-32s32 14.3 32 32v144c0 17.7-14.3 32-32 32zM280 296.1c-15.3 8.8-34.9 3.6-43.7-11.7l-72-124.7c-8.8-15.3-3.6-34.9 11.7-43.7 15.3-8.8 34.9-3.6 43.7 11.7l72 124.7c8.8 15.3 3.6 34.8-11.7 43.7zM744 296.1c15.3 8.8 34.9 3.6 43.7-11.7l72-124.7c8.8-15.3 3.6-34.9-11.7-43.7-15.3-8.8-34.9-3.6-43.7 11.7l-72 124.7c-8.8 15.3-3.6 34.8 11.7 43.7zM202.5 444.9c-4.6 17.1-22.1 27.2-39.2 22.6L24.2 430.3C7.1 425.7-3 408.2 1.5 391.1c4.6-17.1 22.1-27.2 39.2-22.6l139.1 37.3c17.1 4.5 27.2 22 22.7 39.1zM821.5 444.9c4.6 17.1 22.1 27.2 39.2 22.6l139.1-37.3c17.1-4.6 27.2-22.1 22.6-39.2-4.6-17.1-22.1-27.2-39.2-22.6l-139.1 37.3c-17 4.6-27.1 22.1-22.6 39.2z" p-id="9599"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,79 +1,77 @@
<template> <template>
<div class="div-header"> <div class="div-header">
<el-row> <el-row>
<el-col :span="8" style="margin-left:20px;width:calc(33.33% - 20px);"> <el-col :span="8" style="margin-left: 20px; width: calc(33.33% - 20px)">
<div class="head-title-tab"> <div class="head-title-tab">
<div :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="doNav(1)" v-if="1==2"></div> <div :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="doNav(1)" v-if="1 == 2"></div>
<div :class="nav == 2 ? 'head-nav active' : 'head-nav'" @click="doNav(2)" v-if="1==2"></div> <div :class="nav == 2 ? 'head-nav active' : 'head-nav'" @click="doNav(2)" v-if="1 == 2"></div>
<div :class="nav == 7 ? 'head-nav active' : 'head-nav'" @click="doNav(7)" v-if="1==2"></div> <div :class="nav == 7 ? 'head-nav active' : 'head-nav'" @click="doNav(7)" v-if="1 == 2"></div>
<div :class="(nav >= 100 && nav < 200) || nav == 1 ? 'head-nav active' : 'head-nav'" style="position: relative;" class="has-submenu"> <div v-if="showMenusNavIds.includes('1')" :class="(nav >= 100 && nav < 200) || nav == 1 ? 'head-nav active' : 'head-nav'" style="position: relative" class="has-submenu">
<div>项目概况</div> <div>项目概况</div>
<div class="header-btn-list"> <div class="header-btn-list">
<div class="header-btn-list-arrow"></div> <div class="header-btn-list-arrow"></div>
<div class="header-btn-list-item" style> <div class="header-btn-list-item" style>
<div class="header-btn-list-padding menu-row1" style="text-align: left;"> <div class="header-btn-list-padding menu-row1" style="text-align: left">
<button type="button" :class="nav == 101 ? 'active' : ''" class="sub-btn" @click="doNav(101)"></button> <button v-if="showMenusNavIds.includes('101')" type="button" :class="nav == 101 ? 'active' : ''" class="sub-btn" @click="doNav(101)"></button>
<button type="button" :class="nav == 102 ? 'active' : ''" class="sub-btn" @click="doNav(102)"></button> <button v-if="showMenusNavIds.includes('102')" type="button" :class="nav == 102 ? 'active' : ''" class="sub-btn" @click="doNav(102)"></button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div :class="(nav >= 300 && nav < 400) || nav == 3 ? 'head-nav active' : 'head-nav'" style="position: relative;" class="has-submenu"> <div v-if="showMenusNavIds.includes('3')" :class="(nav >= 300 && nav < 400) || nav == 3 ? 'head-nav active' : 'head-nav'" style="position: relative" class="has-submenu">
<div>安全管理</div> <div>安全管理</div>
<div class="header-btn-list"> <div class="header-btn-list">
<div class="header-btn-list-arrow"></div> <div class="header-btn-list-arrow"></div>
<div class="header-btn-list-item" style> <div class="header-btn-list-item" style>
<div class="header-btn-list-padding menu-row1" style="text-align: left;"> <div class="header-btn-list-padding menu-row1" style="text-align: left">
<button type="button" :class="nav == 301 ? 'active' : ''" class="sub-btn" @click="doNav(301)"></button> <button v-if="showMenusNavIds.includes('301')" type="button" :class="nav == 301 ? 'active' : ''" class="sub-btn" @click="doNav(301)"></button>
<!-- <button type="button" :class="nav == 302 ? 'active' : ''" class="sub-btn" @click="doNav(302)"></button> --> <button v-if="showMenusNavIds.includes('302')" type="button" :class="nav == 302 ? 'active' : ''" class="sub-btn" @click="doNav(302)"></button>
<button type="button" :class="nav == 303 ? 'active' : ''" class="sub-btn" @click="doNav(303)"></button> <button v-if="showMenusNavIds.includes('303')" type="button" :class="nav == 303 ? 'active' : ''" class="sub-btn" @click="doNav(303)"></button>
<button type="button" :class="nav == 304 ? 'active' : ''" class="sub-btn" @click="doNav(304)"></button> <button v-if="showMenusNavIds.includes('304')" type="button" :class="nav == 304 ? 'active' : ''" class="sub-btn" @click="doNav(304)"></button>
</div> </div>
<div class="header-btn-list-padding menu-row1" style="text-align: left;"> <div class="header-btn-list-padding menu-row1" style="text-align: left">
<!-- <button type="button" :class="nav == 305 ? 'active' : ''" class="sub-btn" @click="doNav(305)"></button> --> <button v-if="showMenusNavIds.includes('305')" type="button" :class="nav == 305 ? 'active' : ''" class="sub-btn" @click="doNav(305)"></button>
<button type="button" :class="nav == 306 ? 'active' : ''" class="sub-btn" @click="doNav(306)"></button> <button v-if="showMenusNavIds.includes('306')" type="button" :class="nav == 306 ? 'active' : ''" class="sub-btn" @click="doNav(306)"></button>
<!-- <button type="button" :class="nav == 307 ? 'active' : ''" class="sub-btn" @click="doNav(307)"></button> <button v-if="showMenusNavIds.includes('307')" type="button" :class="nav == 307 ? 'active' : ''" class="sub-btn" @click="doNav(307)"></button>
<button type="button" :class="nav == 308 ? 'active' : ''" class="sub-btn" @click="doNav(308)"></button>--> <button v-if="showMenusNavIds.includes('308')" type="button" :class="nav == 308 ? 'active' : ''" class="sub-btn" @click="doNav(308)"></button>
</div> </div>
<div class="header-btn-list-padding menu-row1" style="text-align: left;"> <div class="header-btn-list-padding menu-row1" style="text-align: left">
<button type="button" :class="nav == 309 ? 'active' : ''" class="sub-btn" @click="doNav(309)"></button> <button v-if="showMenusNavIds.includes('309')" type="button" :class="nav == 309 ? 'active' : ''" class="sub-btn" @click="doNav(309)"></button>
<button type="button" :class="nav == 310 ? 'active' : ''" class="sub-btn" @click="doNav(310)">AI</button> <button v-if="showMenusNavIds.includes('310')" type="button" :class="nav == 310 ? 'active' : ''" class="sub-btn" @click="doNav(310)">AI</button>
<!-- <button type="button" :class="nav == 311 ? 'active' : ''" class="sub-btn" @click="doNav(311)"></button> --> <button v-if="showMenusNavIds.includes('311')" type="button" :class="nav == 311 ? 'active' : ''" class="sub-btn" @click="doNav(311)"></button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div :class="(nav >= 400 && nav < 500) || nav == 4 ? 'head-nav active' : 'head-nav'" style="position: relative;" class="has-submenu"> <div v-if="showMenusNavIds.includes('4')" :class="(nav >= 400 && nav < 500) || nav == 4 ? 'head-nav active' : 'head-nav'" style="position: relative" class="has-submenu">
<div>质量管理</div> <div>质量管理</div>
<div class="header-btn-list"> <div class="header-btn-list">
<div class="header-btn-list-arrow"></div> <div class="header-btn-list-arrow"></div>
<div class="header-btn-list-item" style> <div class="header-btn-list-item" style>
<div class="header-btn-list-padding menu-row1" style="text-align: left;"> <div class="header-btn-list-padding menu-row1" style="text-align: left">
<button type="button" :class="nav == 401 ? 'active' : ''" class="sub-btn" @click="doNav(401)"></button> <button v-if="showMenusNavIds.includes('401')" type="button" :class="nav == 401 ? 'active' : ''" class="sub-btn" @click="doNav(401)"></button>
<!-- <button v-if="showMenusNavIds.includes('402')" type="button" :class="nav == 402 ? 'active' : ''" class="sub-btn" @click="doNav(402)"></button>
<button type="button" :class="nav == 402 ? 'active' : ''" class="sub-btn" @click="doNav(402)"></button> <button v-if="showMenusNavIds.includes('403')" type="button" :class="nav == 403 ? 'active' : ''" class="sub-btn" @click="doNav(403)"></button>
<button type="button" :class="nav == 403 ? 'active' : ''" class="sub-btn" @click="doNav(403)"></button> <button v-if="showMenusNavIds.includes('404')" type="button" :class="nav == 404 ? 'active' : ''" class="sub-btn" @click="doNav(404)"></button>
<button type="button" :class="nav == 404 ? 'active' : ''" class="sub-btn" @click="doNav(404)"></button>-->
</div> </div>
<!--
<div class="header-btn-list-padding menu-row1" style="text-align: left;"> <div class="header-btn-list-padding menu-row1" style="text-align: left">
<button type="button" :class="nav == 405 ? 'active' : ''" class="sub-btn" @click="doNav(405)"></button> <button v-if="showMenusNavIds.includes('405')" type="button" :class="nav == 405 ? 'active' : ''" class="sub-btn" @click="doNav(405)"></button>
<button type="button" :class="nav == 406 ? 'active' : ''" class="sub-btn" @click="doNav(406)"></button> <button v-if="showMenusNavIds.includes('406')" type="button" :class="nav == 406 ? 'active' : ''" class="sub-btn" @click="doNav(406)"></button>
</div>
-->
</div> </div>
</div> </div>
</div> </div>
<div :class="(nav >= 500 && nav < 600) || nav == 5 ? 'head-nav active' : 'head-nav'" style="position: relative;" class="has-submenu"> </div>
<div v-if="showMenusNavIds.includes('5')" :class="(nav >= 500 && nav < 600) || nav == 5 ? 'head-nav active' : 'head-nav'" style="position: relative" class="has-submenu">
<div>进度管理</div> <div>进度管理</div>
<div class="header-btn-list"> <div class="header-btn-list">
<div class="header-btn-list-arrow"></div> <div class="header-btn-list-arrow"></div>
<div class="header-btn-list-item" style> <div class="header-btn-list-item" style>
<div class="header-btn-list-padding menu-row1" style="text-align: left;"> <div class="header-btn-list-padding menu-row1" style="text-align: left">
<button type="button" :class="nav == 502 ? 'active' : ''" class="sub-btn" @click="doNav(502)"></button> <button v-if="showMenusNavIds.includes('502')" type="button" :class="nav == 502 ? 'active' : ''" class="sub-btn" @click="doNav(502)"></button>
<button type="button" :class="nav == 501 ? 'active' : ''" class="sub-btn" @click="doNav(501)"></button> <button v-if="showMenusNavIds.includes('501')" type="button" :class="nav == 501 ? 'active' : ''" class="sub-btn" @click="doNav(501)"></button>
</div> </div>
</div> </div>
</div> </div>
@ -82,13 +80,32 @@
</el-col> </el-col>
<el-col :span="8" class="header-center"> <el-col :span="8" class="header-center">
<img class="prj-logo" :src="selProject.setting.orgLogo" v-if="selProject && selProject.setting && selProject.setting.orgLogo" /> <img class="prj-logo" :src="selProject.setting.orgLogo" v-if="selProject && selProject.setting && selProject.setting.orgLogo" />
<span class="sp-title">{{ selProject?.setting?.orgName ||selProject?.projectName|| '数字建安施工管理平台' }}</span> <span class="sp-title">{{ selProject?.setting?.orgName || selProject?.projectName || "数字建安施工管理平台" }}</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="head-title-tab" style="display: inline-block"> <div class="head-title-tab" style="display: inline-flex">
<div :class="nav == 6 ? 'head-nav active' : 'head-nav'" @click="doNav(6)">绿</div> <div v-if="showMenusNavIds.includes('6')" :class="nav == 6 ? 'head-nav active' : 'head-nav'" @click="doNav(6)">绿</div>
<div v-if="showMenusNavIds.includes('7')" :class="(nav >= 700 && nav < 800) || nav == 7 ? 'head-nav active' : 'head-nav'" style="position: relative" class="has-submenu">
<div>数字孪生</div>
<div class="header-btn-list">
<div class="header-btn-list-arrow"></div>
<div class="header-btn-list-item" style>
<div class="header-btn-list-padding menu-row1" style="text-align: left">
<button v-if="showMenusNavIds.includes('701')" type="button" :class="nav == 701 ? 'active' : ''" class="sub-btn" @click="doNav(701)"></button>
<button v-if="showMenusNavIds.includes('702')" type="button" :class="nav == 702 ? 'active' : ''" class="sub-btn" @click="doNav(702)"></button>
<button v-if="showMenusNavIds.includes('703')" type="button" :class="nav == 703 ? 'active' : ''" class="sub-btn" @click="doNav(703)">BIM</button>
</div> </div>
<div class="header-title-user-info" style="display:inline-block;float:right;">
<div class="header-btn-list-padding menu-row1" style="text-align: left">
<button v-if="showMenusNavIds.includes('704')" type="button" :class="nav == 704 ? 'active' : ''" class="sub-btn" @click="doNav(704)">BIM</button>
<button v-if="showMenusNavIds.includes('705')" type="button" :class="nav == 705 ? 'active' : ''" class="sub-btn" @click="doNav(705)">4D</button>
</div>
</div>
</div>
</div>
</div>
<div class="header-title-user-info" style="display: inline-block; float: right">
<el-select v-model="selProjectId" popper-class="header-sel-project-pop" @change="doProjectSelect"> <el-select v-model="selProjectId" popper-class="header-sel-project-pop" @change="doProjectSelect">
<el-option v-for="it in projects" :key="it.id" :label="it.projectName" :value="it.id"></el-option> <el-option v-for="it in projects" :key="it.id" :label="it.projectName" :value="it.id"></el-option>
</el-select> </el-select>
@ -97,35 +114,17 @@
<i class="el-icon-switch-button"></i> <i class="el-icon-switch-button"></i>
</span> </span>
</div> </div>
<i class="set-fullscreen set-font-size" style="margin-left: 16px;position: absolute;top: 0px;right: 24px;" @click="toggleFullScreen"> <i class="set-fullscreen set-font-size" style="margin-left: 16px; position: absolute; top: 0px; right: 24px" @click="toggleFullScreen">
<svg <svg class="icon" v-if="!isFullScreen" style="width: 20px; vertical-align: middle; fill: currentColor; overflow: hidden" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3304">
class="icon"
v-if="!isFullScreen"
style="width: 20px; vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3304"
>
<path <path
d="M145.066667 85.333333h153.6c25.6 0 42.666667-17.066667 42.666666-42.666666S324.266667 0 298.666667 0H34.133333C25.6 0 17.066667 8.533333 8.533333 17.066667 0 25.6 0 34.133333 0 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666666s42.666667-17.066667 42.666666-42.666666V145.066667l230.4 230.4c17.066667 17.066667 42.666667 17.066667 59.733334 0 17.066667-17.066667 17.066667-42.666667 0-59.733334L145.066667 85.333333z m170.666666 563.2L162.133333 802.133333l-76.8 76.8V725.333333C85.333333 699.733333 68.266667 682.666667 42.666667 682.666667s-42.666667 17.066667-42.666667 42.666666v256c0 25.6 17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666H145.066667l76.8-76.8 153.6-153.6c17.066667-17.066667 17.066667-42.666667 0-59.733334-17.066667-17.066667-42.666667-17.066667-59.733334 0z m665.6 34.133334c-25.6 0-42.666667 17.066667-42.666666 42.666666v153.6l-76.8-76.8-153.6-153.6c-17.066667-17.066667-42.666667-17.066667-59.733334 0-17.066667 17.066667-17.066667 42.666667 0 59.733334l153.6 153.6 76.8 76.8H725.333333c-25.6 0-42.666667 17.066667-42.666666 42.666666s17.066667 42.666667 42.666666 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666666z m0-682.666667h-256c-25.6 0-42.666667 17.066667-42.666666 42.666667s17.066667 42.666667 42.666666 42.666666h153.6l-76.8 76.8-153.6 153.6c-17.066667 17.066667-17.066667 42.666667 0 59.733334 17.066667 17.066667 42.666667 17.066667 59.733334 0l153.6-153.6 76.8-76.8v153.6c0 25.6 17.066667 42.666667 42.666666 42.666666s42.666667-17.066667 42.666667-42.666666v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z" d="M145.066667 85.333333h153.6c25.6 0 42.666667-17.066667 42.666666-42.666666S324.266667 0 298.666667 0H34.133333C25.6 0 17.066667 8.533333 8.533333 17.066667 0 25.6 0 34.133333 0 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666666s42.666667-17.066667 42.666666-42.666666V145.066667l230.4 230.4c17.066667 17.066667 42.666667 17.066667 59.733334 0 17.066667-17.066667 17.066667-42.666667 0-59.733334L145.066667 85.333333z m170.666666 563.2L162.133333 802.133333l-76.8 76.8V725.333333C85.333333 699.733333 68.266667 682.666667 42.666667 682.666667s-42.666667 17.066667-42.666667 42.666666v256c0 25.6 17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666H145.066667l76.8-76.8 153.6-153.6c17.066667-17.066667 17.066667-42.666667 0-59.733334-17.066667-17.066667-42.666667-17.066667-59.733334 0z m665.6 34.133334c-25.6 0-42.666667 17.066667-42.666666 42.666666v153.6l-76.8-76.8-153.6-153.6c-17.066667-17.066667-42.666667-17.066667-59.733334 0-17.066667 17.066667-17.066667 42.666667 0 59.733334l153.6 153.6 76.8 76.8H725.333333c-25.6 0-42.666667 17.066667-42.666666 42.666666s17.066667 42.666667 42.666666 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666666z m0-682.666667h-256c-25.6 0-42.666667 17.066667-42.666666 42.666667s17.066667 42.666667 42.666666 42.666666h153.6l-76.8 76.8-153.6 153.6c-17.066667 17.066667-17.066667 42.666667 0 59.733334 17.066667 17.066667 42.666667 17.066667 59.733334 0l153.6-153.6 76.8-76.8v153.6c0 25.6 17.066667 42.666667 42.666666 42.666666s42.666667-17.066667 42.666667-42.666666v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z"
fill fill
p-id="3305" p-id="3305" />
/>
</svg> </svg>
<svg <svg class="icon" v-else style="width: 24px; vertical-align: middle; fill: currentColor; overflow: hidden" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3952">
class="icon"
v-else
style="width: 24px; vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3952"
>
<path <path
d="M384 597.333333h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h153.6L17.066667 947.2c-17.066667 17.066667-17.066667 42.666667 0 59.733333 17.066667 17.066667 42.666667 17.066667 59.733333 0L341.333333 742.4v153.6c0 25.6 17.066667 42.666667 42.666667 42.666667s42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z m358.4 85.333334h153.6c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666667s42.666667-17.066667 42.666667-42.666667V742.4l264.533333 264.533333c17.066667 17.066667 42.666667 17.066667 59.733333 0 17.066667-17.066667 17.066667-42.666667 0-59.733333L742.4 682.666667zM640 426.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667H742.4L1006.933333 76.8c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733333 0L682.666667 281.6V128c0-25.6-17.066667-42.666667-42.666667-42.666667s-42.666667 17.066667-42.666667 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666667z m-256-341.333334c-25.6 0-42.666667 17.066667-42.666667 42.666667v153.6L76.8 8.533333C59.733333 0 25.6 0 8.533333 8.533333 0 25.6 0 59.733333 8.533333 76.8L281.6 341.333333H128c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z" d="M384 597.333333h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h153.6L17.066667 947.2c-17.066667 17.066667-17.066667 42.666667 0 59.733333 17.066667 17.066667 42.666667 17.066667 59.733333 0L341.333333 742.4v153.6c0 25.6 17.066667 42.666667 42.666667 42.666667s42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z m358.4 85.333334h153.6c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666667s42.666667-17.066667 42.666667-42.666667V742.4l264.533333 264.533333c17.066667 17.066667 42.666667 17.066667 59.733333 0 17.066667-17.066667 17.066667-42.666667 0-59.733333L742.4 682.666667zM640 426.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667H742.4L1006.933333 76.8c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733333 0L682.666667 281.6V128c0-25.6-17.066667-42.666667-42.666667-42.666667s-42.666667 17.066667-42.666667 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666667z m-256-341.333334c-25.6 0-42.666667 17.066667-42.666667 42.666667v153.6L76.8 8.533333C59.733333 0 25.6 0 8.533333 8.533333 0 25.6 0 59.733333 8.533333 76.8L281.6 341.333333H128c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z"
p-id="3953" p-id="3953" />
/>
</svg> </svg>
</i> </i>
</el-col> </el-col>
@ -139,128 +138,177 @@ export default {
return { return {
nav: 1, nav: 1,
selProject: null, selProject: null,
selProjectId: '', selProjectId: "",
projects: [], projects: [],
isFullScreen: false, isFullScreen: false,
} showMenus: [],
showMenusNavIds: [],
};
}, },
computed: { computed: {
nickName() { nickName() {
return this.$store.getters.nickName return this.$store.getters.nickName;
}, },
curNav() { curNav() {
return this.$store.getters.nav return this.$store.getters.nav;
}, },
}, },
watch: { watch: {
curNav(n, o) { curNav(n, o) {
this.nav = this.$store.getters.nav this.nav = this.$store.getters.nav;
}, },
}, },
mounted() { mounted() {
window.xapp = this this.showMenus = [
let prjTitle = localStorage.getItem('prj_title') {
document.title = prjTitle || document.title id: 1,
this.$api.project.findMyProjectList().then((d) => { navId: "1",
this.projects = d.rows || [] },
if (this.projects.length > 0) { {
let id = localStorage.getItem('selProj') || this.projects[0].id id: 2,
this.selProjectId = +id navId: "101",
this.doProjectSelect() },
];
this.showMenusNavIds = this.showMenus.map((d) => d.navId);
if (location.href.includes("#/detail?prjId=")) {
const urlParams = new URLSearchParams(location.href.split("?")[1]);
const prjId = urlParams.get("prjId");
localStorage.setItem("selProj", prjId);
setTimeout(() => {
location.hash = "#/detail";
}, 800);
} }
}) window.xapp = this;
let prjTitle = localStorage.getItem("prj_title");
document.title = prjTitle || document.title;
this.$api.project.findMyProjectList().then((d) => {
this.projects = d.rows || [];
if (this.projects.length > 0) {
let id = localStorage.getItem("selProj") || this.projects[0].id;
this.selProjectId = +id;
this.doProjectSelect();
}
});
}, },
methods: { methods: {
toggleFullScreen() { toggleFullScreen() {
let el = document.body let el = document.body;
this.$toggleFullScreen(el) this.$toggleFullScreen(el);
setTimeout(() => { setTimeout(() => {
this.isFullScreen = document.fullscreenElement == el this.isFullScreen = document.fullscreenElement == el;
}, 400) }, 400);
}, },
doProjectSelect() { doProjectSelect() {
let tmps = this.projects.filter((d) => d.id == this.selProjectId) this.loadMenu();
let tmps = this.projects.filter((d) => d.id == this.selProjectId);
if (tmps.length > 0) { if (tmps.length > 0) {
this.$store.dispatch('SetSelProject', tmps[0]) this.$store.dispatch("SetSelProject", tmps[0]);
this.selProject = tmps[0] this.selProject = tmps[0];
this.selProject.vendorsCode = 'uni' this.selProject.vendorsCode = "uni";
document.title = this.selProject.projectName + ' - 大屏' document.title = this.selProject.projectName + " - 大屏";
} else { } else {
this.$store.dispatch('SetSelProject', null) this.$store.dispatch("SetSelProject", null);
this.selProject = null this.selProject = null;
document.title = '大屏' document.title = "大屏";
} }
localStorage.setItem('selProj', this.selProjectId) localStorage.setItem("selProj", this.selProjectId);
localStorage.setItem('prj_title', document.title) localStorage.setItem("prj_title", document.title);
},
loadMenu() {
this.$api.project.bigScreenGetMenuByProjectId(this.selProjectId).then((d) => {
let objs = d.data || [];
if (objs.length == 0) {
objs = [
{
id: 1,
navId: "1",
},
{
id: 2,
navId: "101",
},
];
}
this.showMenus = objs;
this.showMenusNavIds = this.showMenus.map((d) => d.navId);
console.log(this.showMenusNavIds);
});
}, },
doNav(n) { doNav(n) {
if (this.nav == n) { if (this.nav == n) {
return return;
} }
this.nav = n this.nav = n;
switch (n) { switch (n) {
case 1: case 1:
this.$router.push('/index') this.$router.push("/index");
break break;
case 101: case 101:
this.$router.push('/detail') this.$router.push("/detail");
break break;
case 3: case 3:
//this.$router.push('/prjSafety') //this.$router.push('/prjSafety')
break break;
case 309: case 309:
this.$router.push('/videoMonitor') this.$router.push("/videoMonitor");
break break;
case 301: case 301:
this.$router.push('/safetyCheck') this.$router.push("/safetyCheck");
break break;
case 304: case 304:
this.$router.push('/towerCrane') this.$router.push("/towerCrane");
break break;
case 306: case 306:
this.$router.push('/powerIot') this.$router.push("/powerIot");
break break;
case 308: case 308:
this.$router.push('/dumbwaiter') this.$router.push("/dumbwaiter");
break break;
case 310: case 310:
this.$router.push('/aiWarning') this.$router.push("/aiWarning");
break break;
case 4: case 4:
//this.$router.push('/prjQuality') //this.$router.push('/prjQuality')
break break;
case 5: case 5:
//this.$router.push('/prjProgress') //this.$router.push('/prjProgress')
break break;
case 6: case 6:
this.$router.push('/greenCarbon') this.$router.push("/greenCarbon");
break break;
case 702:
this.$router.push("/bimRoaming");
break;
case 701:
this.$router.push("/bimManage");
break;
case 102: case 102:
this.$router.push('/labor') this.$router.push("/labor");
break break;
case 501: case 501:
this.$router.push('/photography') this.$router.push("/photography");
break break;
case 502: case 502:
this.$router.push('/planSchedule') this.$router.push("/planSchedule");
break break;
} }
}, },
doLogout() { doLogout() {
this.$confirm('确定注销并退出系统吗?', '提示', { this.$confirm("确定注销并退出系统吗?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning', type: "warning",
}) })
.then(() => { .then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch("LogOut").then(() => {
location.href = window.XDBSAPP location.href = window.XDBSAPP;
});
}) })
}) .catch(() => {});
.catch(() => {})
}, },
}, },
} };
</script> </script>
<style lang="less"> <style lang="less">
@ -274,7 +322,7 @@ export default {
margin-right: 30px; margin-right: 30px;
position: relative; position: relative;
top: -5px; top: -5px;
width: 250px; width: 200px;
right: 10px; right: 10px;
} }
} }
@ -350,7 +398,9 @@ export default {
} }
} }
} }
.header-sel-project-pop {
top: 60px !important;
}
@media (min-width: 1921px) and (max-width: 2560px) { @media (min-width: 1921px) and (max-width: 2560px) {
.div-header { .div-header {
.head-nav { .head-nav {
@ -385,7 +435,7 @@ export default {
transform: scale(1.5) !important; transform: scale(1.5) !important;
margin-right: 60px !important; margin-right: 60px !important;
width: 260px !important; width: 220px !important;
right: 10px !important; right: 10px !important;
} }
} }

View File

@ -1,6 +1,11 @@
import Vue from "vue"; import Vue from "vue";
import VueRouter from "vue-router"; import VueRouter from "vue-router";
const originalPush = VueRouter.prototype.push
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
Vue.use(VueRouter); Vue.use(VueRouter);
const routes = [ const routes = [
@ -49,9 +54,23 @@ const routes = [
{ {
path: "/greenCarbon", path: "/greenCarbon",
name: "greenCarbon", name: "greenCarbon",
meta: { nav: 23 }, meta: { nav: 6 },
component: () => component: () =>
import(/* webpackChunkName: "progress" */ "../views/greenCarbon.vue"), import(/* webpackChunkName: "greenCarbon" */ "../views/greenCarbon.vue"),
},
{
path: "/bimManage",
name: "bimManage",
meta: { nav: 701 },
component: () =>
import(/* webpackChunkName: "bimManage" */ "../views/bimManage.vue"),
},
{
path: "/bimRoaming",
name: "bimRoaming",
meta: { nav: 702 },
component: () =>
import(/* webpackChunkName: "bimRoaming" */ "../views/bimRoaming.vue"),
}, },
{ {
path: "/videoMonitor", path: "/videoMonitor",

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@ -0,0 +1,63 @@
<template>
<MyDialog v-if="show" v-model="show" width="960px" height="650px" class="bim-video-dialog">
<template slot="title">{{ title }}</template>
<iframe frameborder="0" :src="iframeSrc" style="width: 100%; height: 100%" allowfullscreen></iframe>
</MyDialog>
</template>
<script>
import MyDialog from "@/components/MyDialog";
export default {
components: {
MyDialog,
},
name: "BimVideoDialog",
data() {
return {
show: false,
title: "",
itemData: null,
iframeSrc: "",
videoInfo: null,
accessToken: "",
};
},
mounted() {},
methods: {
showDialog(data, videoInfo) {
this.itemData = data;
this.title = data.name;
this.videoInfo = videoInfo;
console.log(data);
this.show = true;
this.loadVideo(videoInfo);
},
loadVideo(it) {
this.$api.videoMonitor.getYsToken(it.id).then((d) => {
this.accessToken = d.msg;
this.iframeSrc = "https://open.ys7.com/ezopen/h5/iframe?url=" + it.url + "&autoplay=1&accessToken=" + d.msg + "&t=" + +new Date();
});
},
},
};
</script>
<style lang="less">
.bim-video-dialog {
.popup-project-introduction-con {
height: 100%;
.popup-project-introduction-details {
height: calc(100% - 60px);
padding: 0px;
.quality-table.special-table {
height: 100%;
padding: 0px;
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,398 @@
<template>
<div class="bim-roaming main-page">
<div id="bimRoaming" :key="elId">
<div id="bimRoamingContainer" class="bimRoamingContainer"></div>
<div class="div-left" :class="{ isShow: leftShow, isHide: !leftShow }">
<transition name="left">
<div class="data-content" v-show="leftShow">
<div class="div-row">
<div class="row-title">
<svg-icon icon-class="signal"></svg-icon>
模型结构树
</div>
<div class="model-tree">
<el-tree
v-if="showTree"
ref="tree"
:default-expanded-keys="[0, 1]"
:props="{
children: 'children',
label: 'title',
}"
node-key="key"
@check="onCheckTree"
:load="loadTreeNode" lazy
show-checkbox></el-tree>
</div>
</div>
</div>
</transition>
<img :src="leftSrc" class="toSafety-fixed-left-img" @click="arrowRetract" id="arrowLeft" />
</div>
<div class="div-right" :class="{ isShow: leftShow, isHide: !leftShow }">
<transition name="right">
<div class="data-content" v-show="leftShow">
<div class="div-row r33">
<div class="row-title">
<svg-icon icon-class="signal"></svg-icon>
漫游方案
</div>
</div>
<div class="div-row r66">
<div class="row-title">
<svg-icon icon-class="signal"></svg-icon>
视点列表
</div>
</div>
</div>
</transition>
<img :src="rightSrc" class="toSafety-fixed-right-img" @click="arrowRetract" id="arrowRight" />
</div>
</div>
<div class="div-tools">
<div class="tool-item" @click="resetScene">
<div class="icon">
<svg-icon icon-class="home" />
</div>
<span class="sp-text">默认视点</span>
</div>
</div>
</div>
</template>
<script>
import debounce from "lodash.debounce";
export default {
name: "BIMRoaming",
data() {
return {
dpi: "",
selProject: null,
leftSrc: "./bimImages/arrow_left_retract.png",
rightSrc: "./bimImages/arrow_right_retract.png",
leftShow: true,
models: [],
showTree:false,
modelTrees: [],
};
},
mounted() {
this.$store.dispatch("ChangeNav", 702);
this.dpi = this.$dpi();
window.addEventListener("resize", () => {
if (this.dpi != this.$dpi()) {
this.dpi = this.$dpi();
}
});
this.$bus.$on(
"projectChange",
debounce((prj) => {
this.selProject = prj;
this.elId++;
this.initEngine();
})
);
this.selProject = this.$store.getters.selProject;
this.initEngine();
},
methods: {
onCheckTree() {},
arrowRetract() {
if (this.leftShow == true) {
this.rightSrc = "./images/arrow_right_open.png";
this.leftSrc = "./images/arrow_left_open.png";
$("#arrowLeft").animate({ left: 10 + "px" }, 300);
$("#arrowRight").animate({ right: 10 + "px" }, 300);
} else {
this.rightSrc = "./images/arrow_right_retract.png";
this.leftSrc = "./images/arrow_left_retract.png";
$("#arrowLeft").animate({ left: 490 + "px" }, 300);
$("#arrowRight").animate({ right: 490 + "px" }, 300);
}
this.leftShow = !this.leftShow;
},
initEngine() {
this.elId++;
this.activeMenu = 0;
setTimeout(() => {
this.loadEngine();
}, 10);
},
loadEngine() {
window.bimMgrApi = new SAPI(
{
serverIP: window.config.serverIP, //ip
port: window.config.port, //HTTP
useHttps: window.config.useHttps, //使Https
container: "bimRoamingContainer", //[]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
},
() => {
this.initSuccess = true;
console.log("初始化成功");
setTimeout(() => {
this.initLoadModel();
}, 10);
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线
};
bimMgrApi.Plugin.initNavCube(mapOptions);
}
);
},
initLoadModel() {
this.$api.bim
.listBimModel({
pageNum: 1,
pageSize: 100,
comId: this.currentComId,
projectId: this.currentPrjId,
})
.then((d) => {
this.models = d.rows || [];
if (this.models.length == 0) {
this.$modal.msgError("暂无模型,请先关联模型");
} else {
this.models.forEach((item) => {
this.addModel(item.lightweightName);
});
this.loadModelTree();
}
});
},
loadModelTree() {
this.modelTrees = [
{
title: "项目模型",
level: 0,
type: "root",
key: "root",
children: [],
hadLoad: true,
},
];
this.models
.map((d) => {
d.gis = JSON.parse(d.gisJson);
return d;
})
.forEach((d) => {
this.modelTrees[0].children.push({
title: d.modelName,
level: 1,
type: "model",
hasLoad: false,
modelId: d.lightweightName,
key: d.lightweightName,
externalId: "0",
glid: "",
children: [],
data: d,
});
});
this.showTree=true;
},
loadTreeNode(node, resolve, reject){
if(node.level==0){
resolve([this.modelTrees[0]])
return;
}
if(node.level==1){
let objs=this.modelTrees[0].children;
resolve(objs)
return;
}
resolve([{title:'aaa'}])
return;
console.log(nd)
// this.$api.bim.getModelTree(nd.modelId,nd.glid).then(res=>{
// console.log(res)
// })
},
addModel(modelId, cb) {
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
console.log(modelId, url);
bimMgrApi.Model.add(
url,
modelId,
() => {},
() => {
cb && cb();
console.log("加载模型成功");
setTimeout(() => {
bimMgrApi.Camera.getViewPort((p) => {
this.viewPoint = p;
});
}, 1000);
}
);
},
resetScene() {
bimMgrApi.Camera.stopImmersiveRoam();
bimMgrApi.Model.location(bimMgrApi.m_model.keys().toArray()[0]);
bimMgrApi.Plugin.deleteMiniMap();
if (this.viewPoint) {
bimMgrApi.Camera.setViewPort(this.viewPoint);
}
},
},
};
</script>
<style lang="less">
.bim-roaming {
height: 100%;
position: relative;
#bimRoaming {
height: 100%;
#bimRoamingContainer {
height: 100%;
}
}
.div-left {
top: 10vh;
left: 5%;
position: absolute;
height: 70vh;
width: 14%;
&.isHide {
left: 0%;
wdith: 0%;
#arrowLeft {
left: 0px !important;
}
}
#arrowLeft {
top: calc(50% - 50px);
right: -21px;
left: unset !important;
}
.div-row {
height: 100%;
}
}
.div-right {
top: 10vh;
right: 5%;
position: absolute;
height: 70vh;
width: 14%;
&.isHide {
right: 0%;
width: 0%;
}
#arrowRight {
top: calc(50% - 50px);
left: -21px;
}
.div-row {
&.r33 {
height: 33.33%;
}
&.r66 {
height: 66.66%;
}
}
}
.data-content {
height: 100%;
.div-row {
border: solid 1px #75fbfdaa;
background-color: #06445b81;
.row-title {
background: linear-gradient(0deg, #105696, #c0dafb00, #1765ae);
padding-left: 10px;
height: 36px;
line-height: 36px;
.svg-icon {
fill: #75fbfd;
}
}
}
}
.div-tools {
position: absolute;
bottom: 25vh;
left: 50%;
margin-left: -34px;
display: flex;
background: #00000080;
border-radius: 10px;
.tool-item {
display: flex;
flex-flow: column;
padding: 10px;
align-items: center;
cursor: pointer;
&.is-active {
.icon {
background: #097fca94;
.svg-icon {
fill: #75fbfd;
}
}
.sp-text {
color: #75fbfd;
}
}
.icon {
width: 30px;
height: 30px;
background: #c0c4cca1;
display: flex;
justify-content: center;
align-items: center;
border-radius: 15px;
.svg-icon {
width: 20px;
height: 20px;
}
}
.sp-text {
margin-top: 4px;
font-size: 12px;
}
}
}
}
</style>

View File

@ -0,0 +1,857 @@
<template>
<div class="bim-roaming main-page">
<div id="bimRoaming">
<div id="bimRoamingContainer" class="bimRoamingContainer"></div>
<div class="div-left" :class="{ isShow: leftShow, isHide: !leftShow }">
<transition name="left">
<div class="data-content" v-show="leftShow">
<div class="div-row">
<div class="row-title">
<svg-icon icon-class="signal"></svg-icon>
模型结构树
</div>
<div class="model-tree scroll">
<el-tree
:key="treeKey"
ref="tree"
:default-expanded-keys="treeExpendedKeys"
:props="{
children: 'children',
label: 'title',
}"
node-key="key"
@check="onCheckTree"
:data="modelTrees"
show-checkbox></el-tree>
</div>
</div>
</div>
</transition>
<img :src="leftSrc" class="toSafety-fixed-left-img" @click="arrowRetract" id="arrowLeft" />
</div>
<div class="div-right" :class="{ isShow: leftShow, isHide: !leftShow }">
<transition name="right">
<div class="data-content" v-show="leftShow">
<div class="div-row r33">
<div class="row-title">
<svg-icon icon-class="signal"></svg-icon>
漫游方案
</div>
<div class="roaming-list scroll">
<div v-if="roamingLoading" class="loading"></div>
<div v-for="(item, index) in roamingList" :key="index" :class="{ 'is-selected': item.play != 0 }" class="roaming-item">
<el-tooltip :content="item.name">
<span class="roam-text">{{ item.name }}</span>
</el-tooltip>
<div class="roam-tool">
<el-tooltip content="播放" v-show="item.play == 0">
<svg-icon icon-class="play" @click="startRoaming(item)"></svg-icon>
</el-tooltip>
<el-tooltip content="暂停" v-show="item.play != 2 && item.play != 0">
<svg-icon icon-class="pause" @click="playIRPause(item)"></svg-icon>
</el-tooltip>
<el-tooltip content="继续播放" v-show="item.play == 2">
<svg-icon icon-class="play" @click="playContinue(item)"></svg-icon>
</el-tooltip>
<el-tooltip v-show="item.play != 0" content="停止">
<svg-icon icon-class="stop" @click="playCancle(item)"></svg-icon>
</el-tooltip>
</div>
</div>
</div>
</div>
<div class="div-row r66">
<div class="row-title">
<svg-icon icon-class="signal"></svg-icon>
视点列表
</div>
<div class="view-point-list scroll">
<div v-if="viewPointLoading" class="loading"></div>
<div v-for="(item, index) in viewpointList" :key="index" :class="{ 'is-selected': selectedViewpoint == item }" class="viewpoint-item" @click="ZoomViewpoint(item)">
<div class="viewpoint-content">
<el-image :src="item.imgPath" alt class="viewpoint-image" fit="scale-down" />
<el-tooltip :content="item.remark" v-if="item.remark">
<span class="viewpoint-title">{{ item.name }}</span>
</el-tooltip>
<span class="viewpoint-title" v-else>{{ item.name }}</span>
</div>
</div>
</div>
</div>
</div>
</transition>
<img :src="rightSrc" class="toSafety-fixed-right-img" @click="arrowRetract" id="arrowRight" />
</div>
</div>
<div class="div-tools">
<div class="tool-item" @click="resetScene">
<div class="icon">
<svg-icon icon-class="home" />
</div>
<span class="sp-text">默认视点</span>
</div>
</div>
</div>
</template>
<script>
import debounce from "lodash.debounce";
export default {
name: "BIMRoaming",
data() {
return {
dpi: "",
selProject: null,
leftSrc: "./bimImages/arrow_left_retract.png",
rightSrc: "./bimImages/arrow_right_retract.png",
leftShow: true,
models: [],
treeKey: 0,
modelTrees: [],
treeExpendedKeys: [],
visibleList: [],
viewpointList: [],
selectedViewpoint: null,
viewPointLoading: true,
roamingList: [],
roamingLoading: true,
selectedRoam: null,
modelLoaded: false,
};
},
mounted() {
this.$store.dispatch("ChangeNav", 702);
this.dpi = this.$dpi();
window.addEventListener("resize", () => {
if (this.dpi != this.$dpi()) {
this.dpi = this.$dpi();
}
});
this.$bus.$on(
"projectChange",
debounce((prj) => {
this.selProject = prj;
this.elId++;
this.initEngine();
})
);
this.selProject = this.$store.getters.selProject;
this.initEngine();
},
methods: {
playIRPause(data) {
data.play = 2;
bimRoadmApi.Camera.pauseImmersiveRoam(false);
},
playContinue(data) {
data.play = 1;
bimRoadmApi.Camera.pauseImmersiveRoam(true);
},
playCancle(data) {
if (data) {
data.play = 0;
this.selectedRoam = null;
} else {
if (this.roamingList.findIndex((x) => x.play === 1) > -1) {
this.roamingList.find((x) => x.play === 1).play = 0;
}
}
bimRoadmApi.Camera.cancelPlayImmersiveRoam();
this.resetScene();
},
startRoaming(data) {
if (!this.modelLoaded) {
this.$message.error("模型未加载完成,请稍后重试");
return;
}
let api = bimRoadmApi;
this.playCancle();
if (this.roamingList.findIndex((x) => x.play === 1) > -1) {
this.roamingList.find((x) => x.play === 1).play = 0;
}
data.play = 1;
let record = typeof data.points === "string" ? JSON.parse(data.points) : data.points;
api.Camera.setImmersiveRoamConfig({
roamingMode: data.roamingMode,
moveRate: 0.5,
turnRate: 1,
bRecordLocus: false,
});
setTimeout(() => {
api.Camera.startImmersiveRoam([65.702301, 670.785328, 851.817162]);
setTimeout(() => {
this.selectedRoam = data;
api.Camera.playImmersiveRoam({
records: record,
isLoopPlay: this.autoPlay,
complete: function () {
this.selectedRoam = null;
data.play = 0;
},
});
}, 400);
}, 100);
},
onCheckTree(node, event) {
if (!this.modelLoaded) {
this.$message.error("模型未加载完成,请稍后重试");
return;
}
this.playCancle();
let checked = event.checkedNodes.includes(node);
console.log(node, event, checked);
if (node.type == "root") {
//bimRoadmApi
node.children.forEach((m) => {
if (bimRoadmApi.m_model.has(m.modelId)) {
bimRoadmApi.Model.remove(m.modelId);
}
if (checked) {
this.addModel(m.modelId);
}
});
} else if (node.type == "model") {
if (bimRoadmApi.m_model.has(node.modelId)) {
bimRoadmApi.Model.remove(node.modelId);
}
if (checked) {
this.addModel(node.modelId);
}
} else {
if (bimRoadmApi.m_model.size == 0) {
let modelId = checkNode.modelId;
this.addModel(modelId, () => {
this.showItem(node, event, checked);
});
} else {
this.showItem(node, event, checked);
}
}
},
async showItem(checkNode, event, checked) {
let api = bimRoadmApi;
api.Model.setVisible(checkNode.modelId, true);
let externalId = checkNode.externalId;
if (externalId != 0) {
if (checked) {
this.visibleList.push(externalId);
api.Feature.setVisible(this.visibleList.join("#"), true, checkNode.modelId, false);
} else {
this.visibleList = this.visibleList.filter((item) => item !== externalId);
api.Feature.setVisible(externalId, false, checkNode.modelId);
}
} else {
const res = await this.$api.bim.getTreeAllLeafChild(checkNode.modelId, checkNode.glid);
let nodes = res.data || [];
if (nodes.length > 0) {
if (checked) {
this.visibleList = this.MergeArray(nodes, this.visibleList);
api.Model.setVisible(checkNode.modelId, true);
api.Feature.setVisible(this.visibleList.join("#"), true, checkNode.modelId, false);
} else {
this.visibleList = this.DelArray(this.visibleList, nodes);
api.Feature.setVisible(nodes.join("#"), false, checkNode.modelId);
}
}
}
},
MergeArray(arr1, arr2) {
var _arr = new Array();
for (var i = 0; i < arr1.length; i++) {
_arr.push(arr1[i]);
}
for (var i = 0; i < arr2.length; i++) {
var flag = true;
for (var j = 0; j < arr1.length; j++) {
if (arr2[i] == arr1[j]) {
flag = false;
break;
}
}
if (flag) {
_arr.push(arr2[i]);
}
}
return _arr;
},
DelArray(array1, array2) {
var result = [];
for (var i = 0; i < array1.length; i++) {
var k = 0;
for (var j = 0; j < array2.length; j++) {
if (array1[i] != array2[j]) {
k++;
if (k == array2.length) {
result.push(array1[i]);
}
}
}
}
return result;
},
arrowRetract() {
if (this.leftShow == true) {
this.rightSrc = "./images/arrow_right_open.png";
this.leftSrc = "./images/arrow_left_open.png";
$("#arrowLeft").animate({ left: 10 + "px" }, 300);
$("#arrowRight").animate({ right: 10 + "px" }, 300);
} else {
this.rightSrc = "./images/arrow_right_retract.png";
this.leftSrc = "./images/arrow_left_retract.png";
$("#arrowLeft").animate({ left: 490 + "px" }, 300);
$("#arrowRight").animate({ right: 490 + "px" }, 300);
}
this.leftShow = !this.leftShow;
},
initEngine() {
this.elId++;
this.activeMenu = 0;
setTimeout(() => {
this.loadEngine();
}, 10);
},
loadEngine() {
window.bimRoadmApi = new SAPI(
{
serverIP: window.config.serverIP, //ip
port: window.config.port, //HTTP
useHttps: window.config.useHttps, //使Https
container: "bimRoamingContainer", //[]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
},
() => {
this.initSuccess = true;
console.log("初始化成功");
setTimeout(() => {
this.initLoadModel();
}, 10);
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线
};
bimRoadmApi.Plugin.initNavCube(mapOptions);
}
);
},
initLoadModel() {
this.$api.bim
.listBimModel({
pageNum: 1,
pageSize: 100,
comId: this.selProject.comId,
projectId: this.selProject.id,
})
.then((d) => {
this.models = d.rows || [];
if (this.models.length == 0) {
this.$modal.msgError("暂无模型,请先关联模型");
} else {
this.models.forEach((item) => {
this.addModel(item.lightweightName);
this.loadModelTree();
});
}
});
this.init();
},
init() {
this.loadViewPoint();
this.loadRoaming();
},
loadViewPoint() {
this.$api.bim
.viewpointGet({
projectId: this.selProject.id,
viewType: 1,
pageSize: 100,
pageNum: 1,
})
.then((d) => {
this.viewpointList = d.data.rows || [];
this.viewPointLoading = false;
});
},
loadRoaming() {
this.$api.bim
.roamingGet({
roamingType: 1,
projectId: this.selProject.id,
pageSize: 100,
pageNum: 1,
})
.then((d) => {
let list = d.data.rows || [];
list.forEach((item) => {
item.play = 0;
});
this.roamingList = list;
this.roamingLoading = false;
});
},
ZoomViewpoint(item) {
if (!this.modelLoaded) {
this.$message.error("模型未加载完成,请稍后重试");
return;
}
this.playCancle();
this.selectedViewpoint = item;
if (item.viewPosition != null) {
bimRoadmApi.Camera.setViewPort(JSON.parse(item.viewPosition));
}
},
loadModelTree() {
this.modelTrees = [
{
title: "项目模型",
level: 0,
type: "root",
key: "root",
children: [],
hadLoad: true,
},
];
this.treeExpendedKeys.push("root");
this.models
.map((d) => {
d.gis = JSON.parse(d.gisJson);
return d;
})
.forEach((d) => {
let node = {
title: d.modelName,
level: 1,
type: "model",
hasLoad: false,
modelId: d.lightweightName,
key: d.lightweightName,
externalId: "0",
glid: "",
children: [],
data: d,
};
this.treeExpendedKeys.push(node.key);
this.modelTrees[0].children.push(node);
this.getTreeData(node);
});
this.showTree = true;
},
getTreeData(node) {
this.$api.bim.modelTreeAllChild(node.modelId, "").then((d) => {
let objs = d.data || [];
let makeTree = (tmps) => {
tmps.forEach((item) => {
item.children = objs.filter((it) => it.pglid == item.glid);
if (item.children.length > 0) {
makeTree(item.children);
}
item.hasLoad = true;
item.title = item.name;
item.key = item.glid;
item.modelId = node.modelId;
});
return tmps;
};
node.children = makeTree(objs.filter((item) => item.level == 0));
node.children.forEach((item) => {
//this.treeExpendedKeys.push(item.key)
});
this.treeKey++;
});
},
addModel(modelId, cb) {
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
console.log(modelId, url);
bimRoadmApi.Model.add(
url,
modelId,
() => {},
() => {
cb && cb();
console.log("加载模型成功");
setTimeout(() => {
bimRoadmApi.Camera.getViewPort((p) => {
this.viewPoint = p;
this.modelLoaded = true;
});
}, 1000);
}
);
},
resetScene() {
this.selectedViewpoint = null;
this.selectedRoam = null;
bimRoadmApi.Camera.stopImmersiveRoam();
bimRoadmApi.Model.location(bimRoadmApi.m_model.keys().toArray()[0]);
bimRoadmApi.Plugin.deleteMiniMap();
if (this.viewPoint) {
bimRoadmApi.Camera.setViewPort(this.viewPoint);
}
},
},
};
</script>
<style lang="less">
.bim-roaming {
height: 100%;
position: relative;
#bimRoaming {
height: 100%;
#bimRoamingContainer {
height: 100%;
}
}
.div-left {
top: 10vh;
left: 5%;
position: absolute;
height: 70vh;
width: 14%;
&.isHide {
left: 0%;
wdith: 0%;
#arrowLeft {
left: 0px !important;
}
}
#arrowLeft {
top: calc(50% - 50px);
right: -21px;
left: unset !important;
}
.div-row {
height: 100%;
}
}
.div-right {
top: 10vh;
right: 5%;
position: absolute;
height: 70vh;
width: 14%;
&.isHide {
right: 0%;
width: 0%;
}
#arrowRight {
top: calc(50% - 50px);
left: -21px;
}
.div-row {
&.r33 {
height: 33.33%;
}
&.r66 {
height: 66.66%;
}
}
}
.data-content {
height: 100%;
.div-row {
border: solid 1px #75fbfdaa;
background-color: #06445b81;
.row-title {
background: linear-gradient(0deg, #105696, #c0dafb00, #1765ae);
padding-left: 10px;
height: 36px;
line-height: 36px;
.svg-icon {
fill: #75fbfd;
}
}
}
}
.div-tools {
position: absolute;
bottom: 25vh;
left: 50%;
margin-left: -34px;
display: flex;
background: #00000080;
border-radius: 10px;
.tool-item {
display: flex;
flex-flow: column;
padding: 10px;
align-items: center;
cursor: pointer;
&.is-active {
.icon {
background: #097fca94;
.svg-icon {
fill: #75fbfd;
}
}
.sp-text {
color: #75fbfd;
}
}
.icon {
width: 30px;
height: 30px;
background: #c0c4cca1;
display: flex;
justify-content: center;
align-items: center;
border-radius: 15px;
.svg-icon {
width: 20px;
height: 20px;
}
}
.sp-text {
margin-top: 4px;
font-size: 12px;
}
}
}
.model-tree {
height: calc(100% - 36px);
overflow-y: auto;
.el-tree {
background: transparent;
color: #eee;
.el-checkbox {
color: #75fbfd;
}
.el-tree-node {
&:focus {
& > .el-tree-node__content {
background: #3489d966;
&:hover {
background: #3489d966;
}
}
}
.el-tree-node__content:hover {
background: #3489d966;
}
}
}
}
.view-point-list {
height: calc(100% - 36px);
overflow-y: auto;
.viewpoint-item {
margin: 10px 10px 0px;
&.is-selected {
.viewpoint-content {
background: #3489d966;
border: solid 1px #75fbfd;
}
}
.viewpoint-content {
position: relative;
border-radius: 4px;
background: #ffffff2e;
.el-image {
height: 120px;
width: 100%;
}
.viewpoint-title {
position: absolute;
bottom: 0px;
background: #00000080;
width: calc(100% - 10px);
left: 0;
z-index: 9;
line-height: 30px;
font-size: 14px;
height: 30px;
padding: 0px 10px;
text-align: center;
border-radius: 0px 0px 4px 4px;
}
}
}
}
.roaming-list {
height: calc(100% - 36px);
overflow-y: auto;
.roaming-item {
display: flex;
flex-flow: row;
margin: 10px;
background: #04436b40;
line-height: 36px;
border-radius: 10px;
padding: 0px 10px;
font-size: 14px;
position: relative;
&.is-selected {
background: #00aaff;
}
.roam-text {
color: #fff;
flex-grow: 1;
max-width: calc(100% - 40px);
overflow: hidden;
text-overflow: ellipsis;
}
.roam-tool {
margin-left: 10px;
display: flex;
align-items: center;
.svg-icon {
margin-right: 5px;
fill: #75fbfd;
}
}
}
}
.loading {
height: 50px;
margin: 10px;
line-height: 50px;
text-align: center;
color: #909399;
}
@media (max-width: 1920px) {
}
@media (min-width: 2561px) {
.data-content {
.div-row {
min-height: 420px;
.row-title {
height: 48px;
line-height: 48px;
font-size: 28px;
}
}
}
.div-tools {
bottom: 25vh;
margin-left: -68px;
border-radius: 10px;
.tool-item {
padding: 10px 20px;
.icon {
width: 60px;
height: 60px;
border-radius: 30px;
.svg-icon {
width: 40px;
height: 40px;
}
}
.sp-text {
margin-top: 10px;
font-size: 24px;
}
}
}
.model-tree {
.el-tree {
font-size: 24px;
.el-tree-node__content {
height: 36px;
}
.el-tree-node__expand-icon {
font-size: 24px;
}
.el-checkbox {
font-size: 24px;
}
.el-tree-node__label {
font-size: 24px;
}
.el-tree__empty-text {
font-size: 24px;
}
}
}
.view-point-list {
height: calc(100% - 48px);
.viewpoint-item {
margin: 10px 10px 0px;
.viewpoint-content {
border-radius: 4px;
.el-image {
height: 160px;
width: 100%;
}
.viewpoint-title {
width: calc(100% - 10px);
line-height: 30px;
font-size: 24px;
height: 30px;
padding: 0px 10px;
border-radius: 0px 0px 4px 4px;
}
}
}
}
.roaming-list {
height: calc(100% - 48px);
.roaming-item {
margin: 10px;
line-height: 48px;
border-radius: 10px;
padding: 0px 10px;
font-size: 14px;
.roam-text {
max-width: calc(100% - 40px);
font-size: 24px;
}
.roam-tool {
margin-left: 10px;
.svg-icon {
margin-right: 5px;
width: 24px;
height: 24px;
}
}
}
}
.loading {
font-size: 24px;
}
}
}
</style>

View File

@ -268,7 +268,7 @@ export default {
series: [ series: [
{ {
type: 'pie', type: 'pie',
radius: '70%', radius: '50%',
avoidLabelOverlap: false, avoidLabelOverlap: false,
bottom: is1K ? '5%' : is2K ? '15%' : '10%', bottom: is1K ? '5%' : is2K ? '15%' : '10%',
top: '-10%', top: '-10%',

View File

@ -109,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectPersonPhone != null and projectPersonPhone != ''"> and pi.project_person_phone = #{projectPersonPhone}</if> <if test="projectPersonPhone != null and projectPersonPhone != ''"> and pi.project_person_phone = #{projectPersonPhone}</if>
<if test="projectStatus != null and projectStatus != ''"> and pi.project_status = #{projectStatus}</if> <if test="projectStatus != null and projectStatus != ''"> and pi.project_status = #{projectStatus}</if>
<if test="isDel != null "> and pi.is_del = #{isDel}</if> <if test="isDel != null "> and pi.is_del = #{isDel}</if>
and pi.is_del !=2 and pi.is_del not in (1,2)
</where> </where>
<if test="currentUserId == null "> order by pi.project_sort, pi.id desc</if> <if test="currentUserId == null "> order by pi.project_sort, pi.id desc</if>
<if test="currentUserId != null "> order by psu.sort_by, pi.id desc</if> <if test="currentUserId != null "> order by psu.sort_by, pi.id desc</if>
@ -423,7 +423,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectPersonPhone != null and projectPersonPhone != ''"> and pi.project_person_phone = #{projectPersonPhone}</if> <if test="projectPersonPhone != null and projectPersonPhone != ''"> and pi.project_person_phone = #{projectPersonPhone}</if>
<if test="projectStatus != null and projectStatus != ''"> and pi.project_status = #{projectStatus}</if> <if test="projectStatus != null and projectStatus != ''"> and pi.project_status = #{projectStatus}</if>
<if test="isDel != null "> and pi.is_del = #{isDel}</if> <if test="isDel != null "> and pi.is_del = #{isDel}</if>
and pi.is_del!= 2 and pi.is_del=0
</where> </where>
<if test="currentUserId == null "> order by pi.project_sort, pi.id desc</if> <if test="currentUserId == null "> order by pi.project_sort, pi.id desc</if>
<if test="currentUserId != null "> order by psu.sort_by, pi.id desc</if> <if test="currentUserId != null "> order by psu.sort_by, pi.id desc</if>

View File

@ -71,7 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select d.dept_id select d.dept_id
from sys_dept d from sys_dept d
left join sys_role_dept rd on d.dept_id = rd.dept_id left join sys_role_dept rd on d.dept_id = rd.dept_id
where rd.role_id = #{roleId} where d.del_flag = '0' and
rd.role_id = #{roleId}
<if test="deptCheckStrictly"> <if test="deptCheckStrictly">
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId}) and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
</if> </if>
@ -80,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
<include refid="selectDeptVo"/> <include refid="selectDeptVo"/>
where dept_id = #{deptId} where del_flag = '0' and dept_id = #{deptId}
</select> </select>
<select id="checkDeptExistUser" parameterType="Long" resultType="int"> <select id="checkDeptExistUser" parameterType="Long" resultType="int">
@ -93,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult"> <select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
select * from sys_dept where find_in_set(#{deptId}, ancestors) select * from sys_dept where find_in_set(#{deptId}, ancestors) and del_flag = '0'
</select> </select>
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int"> <select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">

View File

@ -16,7 +16,7 @@ spring:
# 服务注册地址 # 服务注册地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@
# 服务分组 # 服务分组
group: lijun # group: lijun
config: config:
# 配置中心地址 # 配置中心地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@

View File

@ -16,7 +16,7 @@ spring:
# 服务注册地址 # 服务注册地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@
# 服务分组 # 服务分组
group: lijun # group: lijun
config: config:
# 配置中心地址 # 配置中心地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@

View File

@ -30,6 +30,7 @@ public class BimDataSource {
HikariConfig config = new HikariConfig(); HikariConfig config = new HikariConfig();
config.setDriverClassName(driverName); config.setDriverClassName(driverName);
config.setJdbcUrl(url); config.setJdbcUrl(url);
config.setConnectionTimeout(120*1000L);
config.setMaximumPoolSize(100); config.setMaximumPoolSize(100);
config.setConnectionTestQuery("SELECT 1"); config.setConnectionTestQuery("SELECT 1");
DataSource ds= new HikariDataSource(config); DataSource ds= new HikariDataSource(config);

View File

@ -13,6 +13,7 @@ import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.domain.ProProjectInfo; import com.yanzhu.manage.domain.ProProjectInfo;
import com.yanzhu.manage.service.IProProjectInfoService; import com.yanzhu.manage.service.IProProjectInfoService;
import com.yanzhu.system.api.domain.SysDept;
import com.yanzhu.system.api.model.LoginUser; import com.yanzhu.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

View File

@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.core.web.domain.AjaxResult; import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.redis.service.RedisService;
import com.yanzhu.manage.bim.BimDataSource; import com.yanzhu.manage.bim.BimDataSource;
import com.yanzhu.manage.bim.BimDataSourceConfig; import com.yanzhu.manage.bim.BimDataSourceConfig;
import com.yanzhu.manage.domain.bim.ModelPropertyVo; import com.yanzhu.manage.domain.bim.ModelPropertyVo;
@ -18,7 +19,10 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.Statement; import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@RestController @RestController
@RequestMapping("/bim/modelInfo") @RequestMapping("/bim/modelInfo")
@ -27,6 +31,21 @@ public class BimModelController {
@Autowired @Autowired
private BimDataSource bimDataSource; private BimDataSource bimDataSource;
@Autowired
private RedisService redisService;
@GetMapping("/clearCache/{key}")
public AjaxResult clearCache(@PathVariable("key") String key){
// 依据前缀获取所有匹配的键
Collection<String> keys = redisService.keys(key + "*");
if (!keys.isEmpty()) {
// 删除所有匹配的键
redisService.deleteObject(keys);
return AjaxResult.success("缓存清除成功");
}
return AjaxResult.success("未找到匹配的缓存");
}
/** /**
* model_tree * model_tree
* @param name * @param name
@ -38,6 +57,11 @@ public class BimModelController {
if(StringUtils.isEmpty(name)){ if(StringUtils.isEmpty(name)){
return AjaxResult.error("name is null"); return AjaxResult.error("name is null");
} }
String key="BimModelController.getModelTreeAllChild."+name+"."+pid;
if(redisService.hasKey(key)){
Object list=redisService.getCacheObject(key);
return AjaxResult.success(list);
}
String sql=""; String sql="";
if(StringUtils.isEmpty(pid)){ if(StringUtils.isEmpty(pid)){
sql="select * from model_tree "; sql="select * from model_tree ";
@ -73,6 +97,7 @@ public class BimModelController {
modelTreeVo.setPGlid(rs.getString("pGlid")); modelTreeVo.setPGlid(rs.getString("pGlid"));
list.add(modelTreeVo); list.add(modelTreeVo);
} }
redisService.setCacheObject(key,list,60*60*24L, TimeUnit.SECONDS);
return AjaxResult.success(list); return AjaxResult.success(list);
} catch (Exception e) { } catch (Exception e) {
return AjaxResult.error(e.getMessage()); return AjaxResult.error(e.getMessage());
@ -91,6 +116,11 @@ public class BimModelController {
if(StringUtils.isEmpty(name)){ if(StringUtils.isEmpty(name)){
return AjaxResult.error("name is null"); return AjaxResult.error("name is null");
} }
String key="BimModelController.getModelTreeAllLeafChild."+name+"."+pid;
if(redisService.hasKey(key)){
Object list=redisService.getCacheObject(key);
return AjaxResult.success(list);
}
String sql=""; String sql="";
if(StringUtils.isEmpty(pid)){ if(StringUtils.isEmpty(pid)){
sql="select * from model_tree "; sql="select * from model_tree ";
@ -118,6 +148,7 @@ public class BimModelController {
while (rs.next()) { while (rs.next()) {
list.add(rs.getString("glid")); list.add(rs.getString("glid"));
} }
redisService.setCacheObject(key,list,60*60*24L, TimeUnit.SECONDS);
return AjaxResult.success(list); return AjaxResult.success(list);
} catch (Exception e) { } catch (Exception e) {
return AjaxResult.error(e.getMessage()); return AjaxResult.error(e.getMessage());
@ -135,6 +166,11 @@ public class BimModelController {
if(StringUtils.isEmpty(name)){ if(StringUtils.isEmpty(name)){
return AjaxResult.error("name is null"); return AjaxResult.error("name is null");
} }
String key="BimModelController.getModelTree."+name+"."+pid;
if(redisService.hasKey(key)){
Object list=redisService.getCacheObject(key);
return AjaxResult.success(list);
}
String sql=""; String sql="";
if(StringUtils.isEmpty(pid)){ if(StringUtils.isEmpty(pid)){
sql="select * from model_tree where level=0"; sql="select * from model_tree where level=0";
@ -164,6 +200,7 @@ public class BimModelController {
modelTreeVo.setPGlid(rs.getString("pGlid")); modelTreeVo.setPGlid(rs.getString("pGlid"));
list.add(modelTreeVo); list.add(modelTreeVo);
} }
redisService.setCacheObject(key,list,60*60*24L, TimeUnit.SECONDS);
return AjaxResult.success(list); return AjaxResult.success(list);
} catch (Exception e) { } catch (Exception e) {
return AjaxResult.error(e.getMessage()); return AjaxResult.error(e.getMessage());
@ -181,6 +218,11 @@ public class BimModelController {
if(StringUtils.isEmpty(name)){ if(StringUtils.isEmpty(name)){
return AjaxResult.error("name is null"); return AjaxResult.error("name is null");
} }
String key="BimModelController.getModelTypeAllChild."+name+"."+pid;
if(redisService.hasKey(key)){
Object list=redisService.getCacheObject(key);
return AjaxResult.success(list);
}
String sql=""; String sql="";
if(StringUtils.isEmpty(pid)){ if(StringUtils.isEmpty(pid)){
sql="select * from model_type "; sql="select * from model_type ";
@ -216,6 +258,7 @@ public class BimModelController {
vo.setId(rs.getLong("id")); vo.setId(rs.getLong("id"));
list.add(vo); list.add(vo);
} }
redisService.setCacheObject(key,list,60*60*24L, TimeUnit.SECONDS);
return AjaxResult.success(list); return AjaxResult.success(list);
} catch (Exception e) { } catch (Exception e) {
return AjaxResult.error(e.getMessage()); return AjaxResult.error(e.getMessage());
@ -233,6 +276,11 @@ public class BimModelController {
if(StringUtils.isEmpty(name)){ if(StringUtils.isEmpty(name)){
return AjaxResult.error("name is null"); return AjaxResult.error("name is null");
} }
String key="BimModelController.getModelType."+name+"."+pid;
if(redisService.hasKey(key)){
Object list=redisService.getCacheObject(key);
return AjaxResult.success(list);
}
String sql=""; String sql="";
if(StringUtils.isEmpty(pid)){ if(StringUtils.isEmpty(pid)){
sql="select * from model_type where level=0"; sql="select * from model_type where level=0";
@ -262,6 +310,7 @@ public class BimModelController {
vo.setId(rs.getLong("id")); vo.setId(rs.getLong("id"));
list.add(vo); list.add(vo);
} }
redisService.setCacheObject(key,list,60*60*24L, TimeUnit.SECONDS);
return AjaxResult.success(list); return AjaxResult.success(list);
} catch (Exception e) { } catch (Exception e) {
return AjaxResult.error(e.getMessage()); return AjaxResult.error(e.getMessage());
@ -273,11 +322,17 @@ public class BimModelController {
if(CollectionUtil.isEmpty(glids)){ if(CollectionUtil.isEmpty(glids)){
return AjaxResult.error("glids is null"); return AjaxResult.error("glids is null");
} }
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < glids.size(); i++) { for (int i = 0; i < glids.size(); i++) {
stringBuilder.append("?,"); stringBuilder.append("?,");
} }
String key="BimModelController.getModelProperty."+name+"."+stringBuilder.toString();
if(redisService.hasKey(key)){
Object list=redisService.getCacheObject(key);
return AjaxResult.success(list);
}
String placeHolders = stringBuilder.deleteCharAt(stringBuilder.length() - 1) String placeHolders = stringBuilder.deleteCharAt(stringBuilder.length() - 1)
.toString(); .toString();
String sql="select * from model_property where glid in ("+placeHolders+")"; String sql="select * from model_property where glid in ("+placeHolders+")";
@ -308,6 +363,7 @@ public class BimModelController {
vo.setPropertyTypeName(rs.getString("propertyTypeName")); vo.setPropertyTypeName(rs.getString("propertyTypeName"));
list.add(vo); list.add(vo);
} }
redisService.setCacheObject(key,list,60*60*24L, TimeUnit.SECONDS);
return AjaxResult.success(list); return AjaxResult.success(list);
} catch (Exception e) { } catch (Exception e) {
return AjaxResult.error(e.getMessage()); return AjaxResult.error(e.getMessage());

View File

@ -1,19 +1,19 @@
package com.yanzhu.manage.hasor; package com.yanzhu.manage.hasor;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.redis.service.RedisService;
import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.system.api.domain.SysUser; import com.yanzhu.system.api.domain.SysUser;
import net.hasor.core.ApiBinder; import net.hasor.core.ApiBinder;
import net.hasor.core.DimModule; import net.hasor.core.DimModule;
import net.hasor.dataql.DataQL; import net.hasor.dataql.DataQL;
import net.hasor.dataql.compiler.qil.QIL; import net.hasor.dataql.compiler.qil.QIL;
import net.hasor.dataway.DatawayApi;
import net.hasor.dataway.authorization.PermissionType;
import net.hasor.dataway.dal.FieldDef; import net.hasor.dataway.dal.FieldDef;
import net.hasor.dataway.service.InterfaceApiFilter; import net.hasor.dataway.service.InterfaceApiFilter;
import net.hasor.dataway.spi.ApiInfo; import net.hasor.dataway.spi.*;
import net.hasor.dataway.spi.AuthorizationChainSpi;
import net.hasor.dataway.spi.CompilerSpiListener;
import net.hasor.dataway.spi.PreExecuteChainSpi;
import net.hasor.db.JdbcModule; import net.hasor.db.JdbcModule;
import net.hasor.db.Level; import net.hasor.db.Level;
import net.hasor.spring.SpringModule; import net.hasor.spring.SpringModule;
@ -22,9 +22,7 @@ import org.springframework.stereotype.Component;
import javax.sql.DataSource; import javax.sql.DataSource;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Map; import java.util.Map;
import java.util.Set;
@DimModule @DimModule
@Component @Component
@ -32,20 +30,68 @@ public class HasorModule implements SpringModule {
@Autowired @Autowired
private DataSource dataSource = null; private DataSource dataSource = null;
@Autowired
private RedisService redisService;
private String getKey(ApiInfo apiInfo){
Map<FieldDef, String> map = apiInfo.getObj();
if (map == null) {
return "";
}
String header = map.get(FieldDef.REQ_HEADER_SAMPLE);
if (StringUtils.isBlank(header)) {
return "";
}
try {
JSONArray jsonObject = JSON.parseArray(header);
for (int i = 0; i < jsonObject.size(); i++) {
JSONObject obj = jsonObject.getJSONObject(i);
if ("cache".equals(obj.getString("name"))) {
String value = obj.getString("value");
return value;
}
}
} catch (Exception ex) {
}
return "";
}
private boolean isCache(ApiInfo apiInfo) {
String key=getKey(apiInfo);
if(StringUtils.isBlank(key)){
return false;
}
String keyLower=key.toLowerCase();
return !"0".equals(keyLower) && !"false".equals(keyLower);
}
public String getCacheKey(ApiInfo apiInfo) {
return getKey(apiInfo)+"."+ apiInfo.getApiPath() + JSON.toJSONString(apiInfo.getParameterMap());
}
public void loadModule(ApiBinder apiBinder) throws Throwable { public void loadModule(ApiBinder apiBinder) throws Throwable {
// .DataSource form Spring boot into Hasor // .DataSource form Spring boot into Hasor
apiBinder.installModule(new JdbcModule(Level.Full, this.dataSource)); apiBinder.installModule(new JdbcModule(Level.Full, this.dataSource));
InterfaceApiFilter f; InterfaceApiFilter f;
apiBinder.bindSpiListener(PreExecuteChainSpi.class, (apiInfo, future) -> { apiBinder.bindSpiListener(PreExecuteChainSpi.class, (apiInfo, future) -> {
try{ try {
SysUser user = SecurityUtils.getLoginUser().getSysUser(); SysUser user = SecurityUtils.getLoginUser().getSysUser();
if(user!=null) { if (user != null) {
apiInfo.getParameterMap().put("currentUser", user.getUserName() + " " + user.getPhonenumber()); apiInfo.getParameterMap().put("currentUser", user.getUserName() + " " + user.getPhonenumber());
}else{ } else {
apiInfo.getParameterMap().put("currentUser", "system"); apiInfo.getParameterMap().put("currentUser", "system");
} }
}catch (Exception ex){ if (isCache(apiInfo)) {
String key = getCacheKey(apiInfo);
Object obj = redisService.getCacheObject(key);
if (obj != null) {
future.completed(obj);
}
}
} catch (Exception ex) {
} }
//String apiPath = apiInfo.getApiPath(); //String apiPath = apiInfo.getApiPath();
@ -64,6 +110,22 @@ public class HasorModule implements SpringModule {
return CompilerSpiListener.super.compiler(apiInfo, query, dataQL); return CompilerSpiListener.super.compiler(apiInfo, query, dataQL);
} }
}); });
apiBinder.bindSpiListener(ResultProcessChainSpi.class, new ResultProcessChainSpi() {
@Override
public Object callAfter(boolean formPre, ApiInfo apiInfo, Object result) {
if (formPre || !isCache(apiInfo) || apiInfo.getCallSource() == CallSource.InterfaceUI) {
return ResultProcessChainSpi.super.callAfter(formPre, apiInfo, result);
}
try {
String key = getCacheKey(apiInfo);
redisService.setCacheObject(key, result, 60L, java.util.concurrent.TimeUnit.MINUTES);
} catch (Exception ex) {
} }
return ResultProcessChainSpi.super.callAfter(formPre, apiInfo, result);
}
});
}
} }

View File

@ -21,7 +21,7 @@ spring:
# 服务注册地址 # 服务注册地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@
# 工作空间配置 # 工作空间配置
namespace: a113aa27-4d61-46e0-81d6-9cede0457f0d # namespace: a113aa27-4d61-46e0-81d6-9cede0457f0d
# 服务分组 # 服务分组
#group: lijun #group: lijun
config: config:

View File

@ -276,6 +276,10 @@ public class SysUserController extends BaseController {
@GetMapping("/getInfo") @GetMapping("/getInfo")
public AjaxResult getInfo() { public AjaxResult getInfo() {
SysUser user = SecurityUtils.getLoginUser().getSysUser(); SysUser user = SecurityUtils.getLoginUser().getSysUser();
SysDept dept= deptService.selectDeptById(user.getDeptId());
user.setComId(dept.getComId());
user.setActiveComId(dept.getComId());
user.setDept(dept);
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("user", user); ajax.put("user", user);
if(Objects.nonNull(user.getRoles()) && user.getRoles().size()>0){ if(Objects.nonNull(user.getRoles()) && user.getRoles().size()>0){

View File

@ -16,7 +16,7 @@ spring:
# 服务注册地址 # 服务注册地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@
# 服务分组 # 服务分组
group: JiangYuQi # group: JiangYuQi
config: config:
# 配置中心地址 # 配置中心地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1 +1,2 @@
<svg class="icon" style="width: 1.0400390625em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1065 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7908"><path d="M0 1024V250.6656h101.978163a623.725473 623.725473 0 0 0-5.774667 85.596129c0 285.33408 194.290925 517.180818 433.468623 517.180818s433.448146-231.273367 433.448147-517.180818a641.807143 641.807143 0 0 0-5.75419-85.596129h101.281926v773.3344z m379.592209-250.542735a219.212095 219.212095 0 0 1-105.295525-24.962124 200.41371 200.41371 0 0 1-16.054393-80.968204 198.181658 198.181658 0 0 0 16.054393 80.968204c-51.193857-83.609807-27.910891-215.710435 69.726033-303.743391l106.954206-101.240971a29.323841 29.323841 0 0 1 37.187217 0l69.746511 52.873015v4.402672c-32.538815 35.200896-67.412071 83.630284-92.988522 114.448986s-18.614086 44.026717-4.668879 57.214254a36.675279 36.675279 0 0 0 46.504499 4.402672l13.945207-8.805344a1190.707675 1190.707675 0 0 0 120.817502-88.053433h4.648402l55.821781 66.040075a25.658361 25.658361 0 0 1 0 35.221373l-106.954205 101.220494a311.258649 311.258649 0 0 1-215.50566 90.981722z m78.920449-221.157461c-2.313962-12.675599-1.33104-15.41959 10.50498-30.122465a191.731232 191.731232 0 0 1 23.876815-24.573052s23.221533-26.41603 37.187217-39.624045a984.335 984.335 0 0 1 93.008999-101.240971l186.017998-145.390553 4.627925-4.382194 4.259328-4.095509a90.387873 90.387873 0 0 1 0.389074-31.16682s7.146662-46.893573 18.614086-107.650441v-6.798545l2.293485-6.593768 0.901012-2.559693 1.433428-6.470904c0.143343-0.675759 0.307163-1.310563 0.430028-2.047754H841.627005c0-3.194497 0-4.095509 1.822501-6.040875 0.880534-3.74739 1.802024-7.597168 2.805423-11.528857 0-4.423149 4.689357-8.825821 4.689358-13.208015a9.74731 9.74731 0 0 1 9.276327-8.825821 16.648242 16.648242 0 0 1 9.317281 4.402672 15.66532 15.66532 0 0 1 4.648403 13.228493l-4.648403 17.590209a443.707395 443.707395 0 0 0-27.91089 105.66412 88.811103 88.811103 0 0 1-4.8327 26.41603 13.719954 13.719954 0 0 1-1.781547 5.549414l-2.682558 7.658601a19.924649 19.924649 0 0 0 4.66888 26.436508l9.296804 13.187537a22.791505 22.791505 0 0 0 27.931369 4.402672 77.814662 77.814662 0 0 1 41.815142-13.208015 510.91469 510.91469 0 0 0 111.623085-26.41603l18.593609-8.825821a17.692597 17.692597 0 0 1 13.945206 4.361717c4.648402 4.423149 4.648402 4.423149 4.648403 8.825821a9.767788 9.767788 0 0 1-9.296805 8.82582 467.563732 467.563732 0 0 1-134.865096 35.200896 101.302404 101.302404 0 0 0-51.193857 17.610687l-4.689357 4.402672c0 4.402672-4.648402 4.402672-9.296804 8.784866l-162.75551 154.093508c-55.821781 48.429388-84.387953 68.825021-132.366836 105.664121a302.658081 302.658081 0 0 1-59.630604 41.671799c-8.191017 3.849778-10.648322 6.716634-17.569732 6.716634a28.66856 28.66856 0 0 1-24.777826-20.047514zM892.779906 61.739791v-4.382194c0-4.402672 4.66888-8.825821 4.66888-13.228492L906.745591 17.713074h4.689357a964.16462 964.16462 0 0 1 139.472543 132.080151v4.382194l-27.890413 8.805343c-4.66888 4.402672-9.317282 4.402672-18.614086 4.402672a1235.348718 1235.348718 0 0 0-111.623086-105.643643z m-53.487341-10.99644z" p-id="7909"></path></svg> <svg class="icon" style="width: 1.0400390625em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1065 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7908">
<path fill="#fff" d="M0 1024V250.6656h101.978163a623.725473 623.725473 0 0 0-5.774667 85.596129c0 285.33408 194.290925 517.180818 433.468623 517.180818s433.448146-231.273367 433.448147-517.180818a641.807143 641.807143 0 0 0-5.75419-85.596129h101.281926v773.3344z m379.592209-250.542735a219.212095 219.212095 0 0 1-105.295525-24.962124 200.41371 200.41371 0 0 1-16.054393-80.968204 198.181658 198.181658 0 0 0 16.054393 80.968204c-51.193857-83.609807-27.910891-215.710435 69.726033-303.743391l106.954206-101.240971a29.323841 29.323841 0 0 1 37.187217 0l69.746511 52.873015v4.402672c-32.538815 35.200896-67.412071 83.630284-92.988522 114.448986s-18.614086 44.026717-4.668879 57.214254a36.675279 36.675279 0 0 0 46.504499 4.402672l13.945207-8.805344a1190.707675 1190.707675 0 0 0 120.817502-88.053433h4.648402l55.821781 66.040075a25.658361 25.658361 0 0 1 0 35.221373l-106.954205 101.220494a311.258649 311.258649 0 0 1-215.50566 90.981722z m78.920449-221.157461c-2.313962-12.675599-1.33104-15.41959 10.50498-30.122465a191.731232 191.731232 0 0 1 23.876815-24.573052s23.221533-26.41603 37.187217-39.624045a984.335 984.335 0 0 1 93.008999-101.240971l186.017998-145.390553 4.627925-4.382194 4.259328-4.095509a90.387873 90.387873 0 0 1 0.389074-31.16682s7.146662-46.893573 18.614086-107.650441v-6.798545l2.293485-6.593768 0.901012-2.559693 1.433428-6.470904c0.143343-0.675759 0.307163-1.310563 0.430028-2.047754H841.627005c0-3.194497 0-4.095509 1.822501-6.040875 0.880534-3.74739 1.802024-7.597168 2.805423-11.528857 0-4.423149 4.689357-8.825821 4.689358-13.208015a9.74731 9.74731 0 0 1 9.276327-8.825821 16.648242 16.648242 0 0 1 9.317281 4.402672 15.66532 15.66532 0 0 1 4.648403 13.228493l-4.648403 17.590209a443.707395 443.707395 0 0 0-27.91089 105.66412 88.811103 88.811103 0 0 1-4.8327 26.41603 13.719954 13.719954 0 0 1-1.781547 5.549414l-2.682558 7.658601a19.924649 19.924649 0 0 0 4.66888 26.436508l9.296804 13.187537a22.791505 22.791505 0 0 0 27.931369 4.402672 77.814662 77.814662 0 0 1 41.815142-13.208015 510.91469 510.91469 0 0 0 111.623085-26.41603l18.593609-8.825821a17.692597 17.692597 0 0 1 13.945206 4.361717c4.648402 4.423149 4.648402 4.423149 4.648403 8.825821a9.767788 9.767788 0 0 1-9.296805 8.82582 467.563732 467.563732 0 0 1-134.865096 35.200896 101.302404 101.302404 0 0 0-51.193857 17.610687l-4.689357 4.402672c0 4.402672-4.648402 4.402672-9.296804 8.784866l-162.75551 154.093508c-55.821781 48.429388-84.387953 68.825021-132.366836 105.664121a302.658081 302.658081 0 0 1-59.630604 41.671799c-8.191017 3.849778-10.648322 6.716634-17.569732 6.716634a28.66856 28.66856 0 0 1-24.777826-20.047514zM892.779906 61.739791v-4.382194c0-4.402672 4.66888-8.825821 4.66888-13.228492L906.745591 17.713074h4.689357a964.16462 964.16462 0 0 1 139.472543 132.080151v4.382194l-27.890413 8.805343c-4.66888 4.402672-9.317282 4.402672-18.614086 4.402672a1235.348718 1235.348718 0 0 0-111.623086-105.643643z m-53.487341-10.99644z" p-id="7909"></path></svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,2 +1,2 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5537" data-spm-anchor-id="a313x.search_index.i1.i2.30073a81HnVMdv"> <svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5537" data-spm-anchor-id="a313x.search_index.i1.i2.30073a81HnVMdv">
<path d="M768 42.666667H256C209.066667 42.666667 170.666667 81.066667 170.666667 128v682.666667c0 46.933333 38.4 85.333333 85.333333 85.333333v42.666667c0 23.466667 19.2 42.666667 42.666667 42.666666h85.333333c23.466667 0 42.666667-19.2 42.666667-42.666666v-42.666667h170.666666v42.666667c0 23.466667 19.2 42.666667 42.666667 42.666666h85.333333c23.466667 0 42.666667-19.2 42.666667-42.666666v-42.666667c46.933333 0 85.333333-38.4 85.333333-85.333333V128c0-46.933333-38.4-85.333333-85.333333-85.333333zM309.333333 170.666667h405.333334c17.066667 0 32 14.933333 32 32s-14.933333 32-32 32h-405.333334c-17.066667 0-32-14.933333-32-32S292.266667 170.666667 309.333333 170.666667z m0 554.666666c17.066667 0 32 14.933333 32 32s-14.933333 32-32 32-32-14.933333-32-32 14.933333-32 32-32z m106.666667 64c-17.066667 0-32-14.933333-32-32s14.933333-32 32-32 32 14.933333 32 32-14.933333 32-32 32z m106.666667 0c-17.066667 0-32-14.933333-32-32s14.933333-32 32-32 32 14.933333 32 32-14.933333 32-32 32z m-42.666667-115.2c-8.533333 12.8-25.6 8.533333-23.466667-6.4L469.333333 512h-72.533333c-14.933333 0-23.466667-17.066667-12.8-29.866667l136.533333-172.8c8.533333-12.8 25.6-8.533333 23.466667 6.4l-14.933333 155.733334h72.533333c14.933333 0 23.466667 17.066667 12.8 29.866666l-134.4 172.8z" p-id="5538"></path></svg> <path fill="#fff" d="M768 42.666667H256C209.066667 42.666667 170.666667 81.066667 170.666667 128v682.666667c0 46.933333 38.4 85.333333 85.333333 85.333333v42.666667c0 23.466667 19.2 42.666667 42.666667 42.666666h85.333333c23.466667 0 42.666667-19.2 42.666667-42.666666v-42.666667h170.666666v42.666667c0 23.466667 19.2 42.666667 42.666667 42.666666h85.333333c23.466667 0 42.666667-19.2 42.666667-42.666666v-42.666667c46.933333 0 85.333333-38.4 85.333333-85.333333V128c0-46.933333-38.4-85.333333-85.333333-85.333333zM309.333333 170.666667h405.333334c17.066667 0 32 14.933333 32 32s-14.933333 32-32 32h-405.333334c-17.066667 0-32-14.933333-32-32S292.266667 170.666667 309.333333 170.666667z m0 554.666666c17.066667 0 32 14.933333 32 32s-14.933333 32-32 32-32-14.933333-32-32 14.933333-32 32-32z m106.666667 64c-17.066667 0-32-14.933333-32-32s14.933333-32 32-32 32 14.933333 32 32-14.933333 32-32 32z m106.666667 0c-17.066667 0-32-14.933333-32-32s14.933333-32 32-32 32 14.933333 32 32-14.933333 32-32 32z m-42.666667-115.2c-8.533333 12.8-25.6 8.533333-23.466667-6.4L469.333333 512h-72.533333c-14.933333 0-23.466667-17.066667-12.8-29.866667l136.533333-172.8c8.533333-12.8 25.6-8.533333 23.466667 6.4l-14.933333 155.733334h72.533333c14.933333 0 23.466667 17.066667 12.8 29.866666l-134.4 172.8z" p-id="5538"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -1,3 +1,3 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3533"> <svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3533">
<path d="M905.5 363.9L357.2 143l-199 108.5v64.2h-65V212.9l260.4-142 577.2 233.2zM502.7 953.1H249.8V504.3h65v383.8h123V504.3h64.9zM835.7 777c-52.4 0-95.1-42.7-95.1-95.1 0-17.9 14.5-32.5 32.5-32.5s32.5 14.5 32.5 32.5c0 16.7 13.5 30.2 30.2 30.2s30.2-13.5 30.2-30.2-13.5-30.2-30.2-30.2h-32.5l-3.9-32.5V503.7c0-17.9 14.5-32.5 32.5-32.5 17.9 0 32.5 14.5 32.5 32.5v88.1c39.5 12.7 66.6 48.3 66.6 90.1-0.2 52.4-42.9 95.1-95.3 95.1z" p-id="3534"></path> <path fill="#fff" d="M905.5 363.9L357.2 143l-199 108.5v64.2h-65V212.9l260.4-142 577.2 233.2zM502.7 953.1H249.8V504.3h65v383.8h123V504.3h64.9zM835.7 777c-52.4 0-95.1-42.7-95.1-95.1 0-17.9 14.5-32.5 32.5-32.5s32.5 14.5 32.5 32.5c0 16.7 13.5 30.2 30.2 30.2s30.2-13.5 30.2-30.2-13.5-30.2-30.2-30.2h-32.5l-3.9-32.5V503.7c0-17.9 14.5-32.5 32.5-32.5 17.9 0 32.5 14.5 32.5 32.5v88.1c39.5 12.7 66.6 48.3 66.6 90.1-0.2 52.4-42.9 95.1-95.3 95.1z" p-id="3534"></path>
<path d="M855.9 536.1H168.1c-41.3 0-74.9-33.6-74.9-74.9V304.1h837.6v157.1c0 41.4-33.6 74.9-74.9 74.9z m-697.7-167v92.2c0 5.5 4.5 9.9 10 9.9H856c5.5 0 10-4.4 10-9.9v-92.2H158.2zM177.2 888.1h412.1V953H177.2z" p-id="3535"></path></svg> <path fill="#fff" d="M855.9 536.1H168.1c-41.3 0-74.9-33.6-74.9-74.9V304.1h837.6v157.1c0 41.4-33.6 74.9-74.9 74.9z m-697.7-167v92.2c0 5.5 4.5 9.9 10 9.9H856c5.5 0 10-4.4 10-9.9v-92.2H158.2zM177.2 888.1h412.1V953H177.2z" p-id="3535"></path></svg>

Before

Width:  |  Height:  |  Size: 873 B

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -69,3 +69,19 @@ export function devicePositionGet(data) {
params: data, params: data,
}); });
} }
export function devicePositionAddItems(data) {
return request({
url: "/manage/api/bim/devicePosition/addItems",
method: "post",
data: data,
});
}
export function devicePositionUpdateItems(data) {
return request({
url: "/manage/api/bim/devicePosition/updatePosition",
method: "post",
data: data,
});
}

View File

@ -53,14 +53,14 @@ export function checkLightweightName(data) {
export function getModelTree(name, pid) { export function getModelTree(name, pid) {
return request({ return request({
url: "/manage//bim/modelInfo/modelTree/" + name + "?pid=" + pid, url: "/manage/bim/modelInfo/modelTree/" + name + "?pid=" + pid,
method: "get", method: "get",
}); });
} }
export function getTreeAllLeafChild(name, pid) { export function getTreeAllLeafChild(name, pid) {
return request({ return request({
url: "/manage//bim/modelInfo/modelTreeAllLeafChild/" + name + "?pid=" + pid, url: "/manage/bim/modelInfo/modelTreeAllLeafChild/" + name + "?pid=" + pid,
method: "get", method: "get",
}); });
} }

View File

@ -0,0 +1,31 @@
import request from '@/utils/request'
export function getMenuByProjectId(query) {
return request({
url: '/manage/api/project/bigscreenMenu/getMenuByProjectId',
method: 'get',
params: query
})
}
export function addMenus(data) {
return request({
url: '/manage/api/project/bigscreenMenu/addMenus',
method: 'post',
data: data
})
}
export function updateMenus(data) {
return request({
url: '/manage/api/project/bigscreenMenu/updateMenus',
method: 'post',
data: data
})
}
export function clearCache(key) {
return request({
url: "/manage/bim/modelInfo/clearCache/" +key,
method: "get",
});
}

View File

@ -1,12 +1,28 @@
<template> <template>
<div :class="{ 'has-logo': showLogo }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <div
:class="{ 'has-logo': showLogo }"
:style="{
backgroundColor:
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" :default-active="activeMenu"
:collapse="isCollapse" :collapse="isCollapse"
:background-color="sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground" :background-color="
:text-color="sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor" sideTheme === 'theme-dark'
? variables.menuBackground
: variables.menuLightBackground
"
:text-color="
sideTheme === 'theme-dark'
? variables.menuColor
: variables.menuLightColor
"
:unique-opened="true" :unique-opened="true"
:active-text-color="theme" :active-text-color="theme"
:collapse-transition="false" :collapse-transition="false"
@ -24,19 +40,29 @@
</template> </template>
<script setup> <script setup>
import Logo from './Logo' import Logo from "./Logo";
import SidebarItem from './SidebarItem' import SidebarItem from "./SidebarItem";
import variables from '@/assets/styles/variables.module.scss' import variables from "@/assets/styles/variables.module.scss";
import useAppStore from '@/store/modules/app' import useAppStore from "@/store/modules/app";
import useSettingsStore from '@/store/modules/settings' import useSettingsStore from "@/store/modules/settings";
import usePermissionStore from '@/store/modules/permission' import usePermissionStore from "@/store/modules/permission";
import useUserStore from "@/store/modules/user";
const route = useRoute(); const route = useRoute();
const appStore = useAppStore() const appStore = useAppStore();
const settingsStore = useSettingsStore() const settingsStore = useSettingsStore();
const permissionStore = usePermissionStore() const permissionStore = usePermissionStore();
const userStore = useUserStore();
const sidebarRouters = computed(() => permissionStore.sidebarRouters); const sidebarRouters = computed(() => {
let tmps = permissionStore.sidebarRouters;
tmps.forEach((item) => {
if (item.meta && item.meta.title == "项目大屏") {
item.name += "?prjId=" + userStore.currentPrjId;
item.path += "?prjId=" + userStore.currentPrjId;
}
});
return tmps;
});
const showLogo = computed(() => settingsStore.sidebarLogo); const showLogo = computed(() => settingsStore.sidebarLogo);
const sideTheme = computed(() => settingsStore.sideTheme); const sideTheme = computed(() => settingsStore.sideTheme);
const theme = computed(() => settingsStore.theme); const theme = computed(() => settingsStore.theme);
@ -49,6 +75,5 @@ const activeMenu = computed(() => {
return meta.activeMenu; return meta.activeMenu;
} }
return path; return path;
}) });
</script> </script>

View File

@ -6,11 +6,11 @@
<el-option v-for="item in data.projects" :key="item.id" :label="item.projectName" :value="item.id"></el-option> <el-option v-for="item in data.projects" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属单位" prop="deptId"> <!-- <el-form-item label="所属单位" prop="deptId" >
<el-select v-model="queryParams.deptId" clearable filterable placeholder="请选择所属单位" style="width: 200px"> <el-select v-model="queryParams.deptId" clearable filterable placeholder="请选择所属单位" style="width: 200px">
<el-option v-for="item in data.subDepts" :key="item.id" :label="item.subDeptName" :value="item.id"></el-option> <el-option v-for="item in data.subDepts" :key="item.id" :label="item.subDeptName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="模型名称" prop="modelName"> <el-form-item label="模型名称" prop="modelName">
<el-input v-model="queryParams.modelName" placeholder="请输入模型名称" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.modelName" placeholder="请输入模型名称" clearable @keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
@ -61,12 +61,15 @@
<!-- 添加或修改Bim模型对话框 --> <!-- 添加或修改Bim模型对话框 -->
<el-dialog :title="title" v-model="open" width="600px" append-to-body> <el-dialog :title="title" v-model="open" width="600px" append-to-body>
<el-form ref="bimModelRef" :model="form" :rules="rules" label-width="120px"> <el-form ref="bimModelRef" :model="form" :rules="rules" label-width="120px">
<el-form-item label="所属单位" prop="deptId"> <!-- <el-form-item label="所属单位" prop="deptId">
<el-select v-model="form.deptId" clearable filterable placeholder="请选择所属单位" style="width: 200px"> <el-select v-model="form.deptId" clearable filterable placeholder="请选择所属单位" style="width: 200px">
<el-option v-for="item in data.subDepts" :key="item.id" :label="item.subDeptName" :value="item.id"></el-option> <el-option v-for="item in data.subDepts" :key="item.id" :label="item.subDeptName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> -->
<div style="margin-bottom:10px;">
<el-button type="primary" style="margin-left:20px;" @click="selectModelHandler"></el-button> <el-button type="primary" style="margin-left:20px;" @click="selectModelHandler"></el-button>
</el-form-item> </div>
<el-form-item label="模型名称" prop="modelName"> <el-form-item label="模型名称" prop="modelName">
<el-input v-model="form.modelName" disabled placeholder="请输入模型名称" /> <el-input v-model="form.modelName" disabled placeholder="请输入模型名称" />
</el-form-item> </el-form-item>
@ -142,7 +145,6 @@ const data = reactive({
rules: { rules: {
comId: [{ required: true, message: '租户id不能为空', trigger: 'blur' }], comId: [{ required: true, message: '租户id不能为空', trigger: 'blur' }],
projectId: [{ required: true, message: '项目id不能为空', trigger: 'blur' }], projectId: [{ required: true, message: '项目id不能为空', trigger: 'blur' }],
deptId: [{ required: true, message: '单位id不能为空', trigger: 'blur' }],
}, },
isAdmin: false, isAdmin: false,
projects: [], projects: [],

View File

@ -1,6 +1,7 @@
<template> <template>
<div> <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"> <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> <div :id="elId"></div>
</el-dialog> </el-dialog>
</div> </div>
@ -15,8 +16,23 @@ export default {
title: '', title: '',
row: null, row: null,
bimStore: null, bimStore: null,
sapi_1: null,
elId: 'gis' + +new Date(), 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() { mounted() {
@ -34,6 +50,52 @@ export default {
}) })
}, },
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 } // const defaults = { ...this.bimStore.defaults }
let defaults = { let defaults = {
container: 'cesiumContainer', //[]id container: 'cesiumContainer', //[]id
@ -116,4 +178,10 @@ export default {
} }
</script> </script>
<style></style> <style lang="scss">
.model-dialog-show{
iframe{
height: 800px !important;
}
}
</style>

View File

@ -144,6 +144,11 @@ export default {
console.log("加载模型成功"); console.log("加载模型成功");
cb && cb(); cb && cb();
this.$emit("change"); this.$emit("change");
setTimeout(()=>{
api.Camera.getViewPort(p=>{
this.$emit("modelAdd",p);
});
},1000);
} }
); );
}, },

View File

@ -1,55 +1,30 @@
<template> <template>
<div class="bim-setting-page app-container2"> <div class="bim-setting-page app-container2">
<div id="bimSettingContainer"></div> <div id="bimSettingContainer"></div>
<model-floor-tree <model-floor-tree ref="modelFloorTree" @change="doChange" @modelAdd="modelAdded" :projectMessage="models" v-if="showTree"></model-floor-tree>
ref="modelFloorTree"
@change="doChange"
: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="主视图"> <a-tooltip placement="top" title="主视图">
<div <div class="footer-btn" @click="doMenu(0)" :class="activeMenu == 0 ? 'is-active' : ''">
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> </a-tooltip>
<a-tooltip placement="top" title="第一人称漫游"> <a-tooltip placement="top" title="第一人称漫游">
<div <div class="footer-btn" @click="doMenu(1)" :class="activeMenu == 1 ? 'is-active' : ''">
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> </a-tooltip>
<a-tooltip placement="top" title="自定义视点漫游"> <a-tooltip placement="top" title="自定义视点漫游">
<div <div class="footer-btn" @click="doMenu(2)" :class="activeMenu == 2 ? 'is-active' : ''">
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> </a-tooltip>
<a-tooltip placement="top" title="视点管理"> <a-tooltip placement="top" title="视点管理">
<div <div class="footer-btn" @click="doMenu(3)" :class="activeMenu == 3 ? 'is-active' : ''">
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> </a-tooltip>
<a-tooltip placement="top" title="构件隐藏"> <a-tooltip placement="top" title="构件隐藏">
<div <div class="footer-btn" @click="doMenu(4)" :class="activeMenu == 4 ? 'is-active' : ''">
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> </a-tooltip>
@ -62,23 +37,11 @@
<svg-icon icon-class="hide" v-if="activeMenu == 4" /> <svg-icon icon-class="hide" v-if="activeMenu == 4" />
{{ param.title }} {{ param.title }}
</div> </div>
<el-icon <el-icon @click="doToolsClose" style="color: #000; font-size: 20px; cursor: pointer" class="tools-close">
@click="doToolsClose"
style="color: #000; font-size: 20px; cursor: pointer"
class="tools-close"
>
<Close /> <Close />
</el-icon> </el-icon>
<person-roaming <person-roaming v-if="activeMenu == 1" ref="personRoaming" :me="this"></person-roaming>
v-if="activeMenu == 1" <custom-viewpoint v-if="activeMenu == 2" ref="customViewpoint" :me="this"></custom-viewpoint>
ref="personRoaming"
:me="this"
></person-roaming>
<custom-viewpoint
v-if="activeMenu == 2"
ref="customViewpoint"
:me="this"
></custom-viewpoint>
<viewpoint v-if="activeMenu == 3" ref="viewpoint" :me="this"></viewpoint> <viewpoint v-if="activeMenu == 3" ref="viewpoint" :me="this"></viewpoint>
</div> </div>
</div> </div>
@ -113,6 +76,7 @@ export default {
activeMenu: 0, activeMenu: 0,
showModels: [], showModels: [],
param: {}, param: {},
viewPoint:null,
}; };
}, },
beforeUnmount() { beforeUnmount() {
@ -128,6 +92,9 @@ export default {
this.initEngine(); this.initEngine();
}, },
methods: { methods: {
modelAdded(point){
this.viewPoint=point;
},
doChange() { doChange() {
this.showModels = api.m_model.keys().toArray(); this.showModels = api.m_model.keys().toArray();
console.log("--change--"); console.log("--change--");
@ -139,6 +106,9 @@ export default {
api.Camera.stopImmersiveRoam(); api.Camera.stopImmersiveRoam();
api.Model.location(api.m_model.keys().toArray()[0]); api.Model.location(api.m_model.keys().toArray()[0]);
api.Plugin.deleteMiniMap(); api.Plugin.deleteMiniMap();
if(this.viewPoint){
api.Camera.setViewPort(this.viewPoint);
}
}, },
doMenu(n) { doMenu(n) {
if (n == this.activeMenu) { if (n == this.activeMenu) {

View File

@ -1,54 +1,31 @@
<template> <template>
<div class="bim-sand-table-setting app-container2"> <div class="bim-sand-table-setting app-container2">
<div id="bimSandTableSetting" :key="elId"> <div id="bimSandTableSetting" :key="elId">
<div <div id="bimSandTableSettingContainer" class="bimSandTableSettingContainer"></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="主视图"> <a-tooltip placement="top" title="主视图">
<div <div class="footer-btn" @click="doMenu(0)" :class="activeMenu == 0 ? 'is-active' : ''">
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> </a-tooltip>
<a-tooltip placement="top" title="视频监控"> <a-tooltip placement="top" title="视频监控">
<div <div class="footer-btn" @click="doMenu(1)" :class="activeMenu == 1 ? 'is-active' : ''">
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> </a-tooltip>
<a-tooltip placement="top" title="基坑监控"> <a-tooltip placement="top" title="基坑监控">
<div <div class="footer-btn" @click="doMenu(2)" :class="activeMenu == 2 ? 'is-active' : ''">
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> </a-tooltip>
<a-tooltip placement="top" title="塔机监控"> <a-tooltip placement="top" title="塔机监控">
<div <div class="footer-btn" @click="doMenu(3)" :class="activeMenu == 3 ? 'is-active' : ''">
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> </a-tooltip>
<a-tooltip placement="top" title="电箱监控"> <a-tooltip placement="top" title="电箱监控">
<div <div class="footer-btn" @click="doMenu(4)" :class="activeMenu == 4 ? 'is-active' : ''">
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> </a-tooltip>
@ -61,11 +38,7 @@
<svg-icon icon-class="power" v-if="activeMenu == 4" /> <svg-icon icon-class="power" v-if="activeMenu == 4" />
{{ title }} {{ title }}
</div> </div>
<el-icon <el-icon @click="doToolsClose" style="color: #000; font-size: 20px; cursor: pointer" class="tools-close">
@click="doToolsClose"
style="color: #000; font-size: 20px; cursor: pointer"
class="tools-close"
>
<Close /> <Close />
</el-icon> </el-icon>
<div class="device-list scroll"> <div class="device-list scroll">
@ -78,13 +51,21 @@
{{ item.name }} {{ item.name }}
</div> </div>
<el-switch v-model="item.show" size="small" /> <el-switch v-model="item.show" size="small" />
<svg-icon <svg-icon icon-class="position" class="guide" @click="getPosition(item, index)" />
icon-class="position"
class="guide"
@click="getPosition(item, index)"
/>
</div> </div>
</div> </div>
<div class="tools-bottom">
<el-button type="primary" @click="doSave"></el-button>
</div>
</div>
<div class="test-box">
<div class="tag-box">
<img :src="'images/2.png'" alt="" />
<span class="tag-txt" style="color: #ffffff; font-size: 14px">
<img :src="'images/videoMonitor.svg'" style="width: 20px; height: 20px" />
aaa</span
>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -94,8 +75,9 @@ 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 } from "element-plus";
import { emitter } from "@/router/index.js"; import { emitter } from "@/router/index.js";
import { devicePositionGet } from "@/api/bim/bim.js"; import { devicePositionGet, devicePositionAddItems, devicePositionUpdateItems } from "@/api/bim/bim.js";
import icons from "./icons.js"; import icons from "./icons.js";
import { debounce } from "lodash-es";
export default { export default {
name: "SandTableSetting", name: "SandTableSetting",
components: { components: {
@ -113,6 +95,8 @@ export default {
positionByModalId: "", positionByModalId: "",
selItem: null, selItem: null,
iconVideo: "", iconVideo: "",
addLabels: [],
viewPoint:null,
}; };
}, },
created() { created() {
@ -137,75 +121,139 @@ export default {
this.initEngine(); this.initEngine();
}, },
methods: { methods: {
AddLable: function (e, t) { doSave: debounce(function () {
this.toSave();
}, 300),
toSave() {
this.$confirm("确认保存修改?", "提示", {
type: "warning",
confirmButtonText: "确 认",
cancelButtonText: "取 消",
}).then(() => {
let adds = this.devices
.filter((item) => {
return item.id == null;
})
.map((item) => {
return {
deviceId: item.deviceId,
deviceType: item.deviceType,
projectId: this.currentPrjId,
position: JSON.stringify(item.position),
enabled: item.show ? 1 : 0,
currentUser: this.userStore.name,
remark: "",
};
});
let updates = this.devices
.filter((item) => {
return item.id != null;
})
.map((item) => {
return {
id: item.id,
position: JSON.stringify(item.position),
currentUser: this.userStore.name,
enabled: item.show ? 1 : 0,
};
});
console.log("-->", adds, updates);
let ajaxs = [];
if (adds.length > 0) {
ajaxs.push(devicePositionAddItems({ items: adds }));
}
if (updates.length > 0) {
ajaxs.push(devicePositionUpdateItems({ items: updates }));
}
Promise.all(ajaxs).then((res) => {
ElMessage.success("保存成功");
});
});
},
clearLabels() {
this.addLabels.forEach((id) => {
window.sandSettingApi.Label.removeBalloon(id);
});
this.addLabels = [];
},
addDeviceLabel() {
this.devices.forEach((d) => {
if (d.position && d.position.length > 0) {
this.AddLable(d);
}
});
},
AddLable: function (item) {
let img = "videoMonitor";
if (this.activeMenu == 1) {
img = "videoMonitor";
} else if (this.activeMenu == 2) {
img = "pitMonitor";
} else if (this.activeMenu == 3) {
img = "towerMonitor";
} else if (this.activeMenu == 4) {
img = "power";
}
let html = `<style> let html = `<style>
.sp-svg svg{widht: 16px;height: 16px;fill: #ffffff; }
.tag-box{position: relative} .tag-box{position: relative}
.tag-txt{position: absolute;top:30%;left: 50%;transform: translate(-50%, -50%); .tag-txt{position: absolute;top:30%;left: 50%;transform: translate(-50%, -50%);
text-align: center;color: #ffffff;}</style> text-align: center;color: #ffffff;display: flex;font-size:12px;}</style>
<div class='tag-box'> <div class='tag-box'>
<img src='images/2.png' alt=''> <img src='images/2.png' alt=''>
<span class='tag-txt' style='color:#ffffff;font-size:14px'> <span class='tag-txt' style='color:#ffffff;font-size:14px'>
<img src='images/videoMonitor.svg'> <img src='images/${img}.png' style="width:20px;height:20px;">
${this.selItem.name}</span></div>`; ${item.name}
console.log(html); </span>
</div>`;
window.sandSettingApi.Label.addBalloon({ window.sandSettingApi.Label.addBalloon({
Html: html, Html: html,
ID: this.selItem.elId, ID: item.elId,
Pivot: "2", Pivot: "2",
Position: t, Position: item.position,
Title: this.selItem.name, Title: item.name,
MaxDistance: 1e6, MaxDistance: 1e6,
// ID: e,
// Position: t,
// Html: `<div><img src='images/red.svg' style='width: 20px; height: 20px'> ${this.selItem.name}</div>`,
// Pivot: 8,
// onClick: function (e) {
// console.log(e);
// },
}); });
this.addLabels.push(item.elId);
}, },
getPosition(item, index) { getPosition(item, index) {
this.selItem = item; this.selItem = item;
window.sandSettingApi && window.sandSettingApi.Public.clearHandler(); window.sandSettingApi && window.sandSettingApi.Public.clearHandler();
ElMessage.info("请在场景中拾取坐标位置"); ElMessage.info("请在场景中拾取坐标位置");
window.sandSettingApi.Label.removeBalloon(item.elId); window.sandSettingApi.Public.pickupCoordinate(false);
window.sandSettingApi.Public.event("LEFT_CLICK", (e) => { window.sandSettingApi.Public.event("LEFT_CLICK", (e) => {
window.sandSettingApi.Feature.getByPosition([e.x, e.y], (n) => { window.sandSettingApi.Feature.getByPosition([e.x, e.y], (n) => {
if (n && n["id"]) { if (n && n["id"]) {
this.positionByModalId = n.id.split("^")[0]; this.positionByModalId = n.id.split("^")[0];
window.sandSettingApi.Public.pickupCoordinate(true, (e) => {
this.AddLable("position_label", e);
window.sandSettingApi.Public.clearHandler();
});
} else { } else {
ElMessage.warning("请在模型上选点!"); ElMessage.warning("请在模型上选点!");
} }
}); });
}); });
// window.sandSettingApi.Public.event("LEFT_CLICK", (function(e) { window.sandSettingApi.Public.pickupCoordinate(true, (e) => {
// window.sandSettingApi.Feature.getByEvent(e.position, n=> { if (!this.positionByModalId) {
// this.positionByModalId = n.id.split("^")[0]; return;
// window.sandSettingApi.Public.pickupCoordinate(e.position, (function(e) { }
// window.sandSettingApi.Lable.DeleteCustomLabel("position_label"), this.selItem.position = e;
// this.AddLable("position_label", e) window.sandSettingApi.Label.removeBalloon(item.elId);
// } this.AddLable(this.selItem);
// ))) : ElMessage.warning("") window.sandSettingApi.Public.pickupCoordinate(false);
// } window.sandSettingApi.Public.clearHandler();
// ), !1) });
// }
// ))
}, },
doToolsClose() { doToolsClose() {
this.activeMenu = 0; this.activeMenu = 0;
this.resetScene(); this.resetScene();
}, },
resetScene() { resetScene() {
api.Camera.stopImmersiveRoam(); this.clearLabels();
api.Model.location(api.m_model.keys().toArray()[0]); sandSettingApi.Camera.stopImmersiveRoam();
api.Plugin.deleteMiniMap(); sandSettingApi.Model.location(sandSettingApi.m_model.keys().toArray()[0]);
sandSettingApi.Plugin.deleteMiniMap();
if(this.viewPoint){
sandSettingApi.Camera.setViewPort(this.viewPoint);
}
}, },
doMenu(n) { doMenu(n) {
if (n == this.activeMenu) { if (n == this.activeMenu) {
@ -233,9 +281,12 @@ export default {
.filter((item) => item.deviceType == this.activeMenu) .filter((item) => item.deviceType == this.activeMenu)
.map((item) => { .map((item) => {
item.show = item.enabled != 0; item.show = item.enabled != 0;
item.position = this.$tryToJson(item.position, []);
item.elId = (item.id ? item.id : cnt++) + "-" + item.deviceType; item.elId = (item.id ? item.id : cnt++) + "-" + item.deviceType;
return item; return item;
}); });
this.clearLabels();
this.addDeviceLabel();
}); });
}, },
initEngine() { initEngine() {
@ -324,6 +375,11 @@ export default {
() => { () => {
cb && cb(); cb && cb();
console.log("加载模型成功"); console.log("加载模型成功");
setTimeout(()=>{
sandSettingApi.Camera.getViewPort(p=>{
this.viewPoint=p;
});
},1000);
} }
); );
}, },
@ -387,7 +443,7 @@ export default {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
min-width: 300px; min-width: 300px;
min-height: 400px; min-height: 400px;
padding-bottom: 50px;
.tools-title { .tools-title {
padding: 10px; padding: 10px;
color: #114c5f; color: #114c5f;
@ -402,6 +458,8 @@ export default {
} }
.device-list { .device-list {
padding: 0px 10px; padding: 0px 10px;
max-height: 60vh;
overflow-y: auto;
.device-item { .device-item {
display: flex; display: flex;
align-items: center; align-items: center;
@ -419,6 +477,30 @@ export default {
} }
} }
} }
.tools-bottom {
position: absolute;
bottom: 10px;
width: 100%;
text-align: center;
}
}
.test-box {
position: absolute;
display: none;
top: 10px;
left: 10px;
.tag-box {
position: relative;
}
.tag-txt {
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #ffffff;
display: flex;
}
} }
} }
</style> </style>

View File

@ -392,6 +392,7 @@
<script setup name="ProProjectInfo"> <script setup name="ProProjectInfo">
import { deptTreeSelect } from "@/api/system/user"; import { deptTreeSelect } from "@/api/system/user";
import { listProProjectInfo, getProProjectInfo, delProProjectInfo, addProProjectInfo, updateProProjectInfo, resetProQrCode } from "@/api/manage/proProjectInfo"; import { listProProjectInfo, getProProjectInfo, delProProjectInfo, addProProjectInfo, updateProProjectInfo, resetProQrCode } from "@/api/manage/proProjectInfo";
import {delDept} from '@/api/system/dept';
import BaiduMap from "@/components/BaiduMap/Map.vue"; import BaiduMap from "@/components/BaiduMap/Map.vue";
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import costOutputDrawer from "../costOutput/costOutputDrawer.vue"; import costOutputDrawer from "../costOutput/costOutputDrawer.vue";
@ -708,6 +709,7 @@ function submitForm() {
let postData = { let postData = {
...form.value ...form.value
} }
postData.comId=postData.disDeptId
if (form.value.id != null) { if (form.value.id != null) {
updateProProjectInfo(postData).then(response => { updateProProjectInfo(postData).then(response => {
proxy.$modal.msgSuccess("修改成功"); proxy.$modal.msgSuccess("修改成功");
@ -745,7 +747,13 @@ function setProjectSort(row, val) {
function handleDelete(row) { function handleDelete(row) {
const _ids = row.id || ids.value; const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除项目信息编号为"' + _ids + '"的数据项?').then(function () { proxy.$modal.confirm('是否确认删除项目信息编号为"' + _ids + '"的数据项?').then(function () {
return delProProjectInfo(_ids); let ajaxs=[
delProProjectInfo(_ids)
];
if(Array.isArray(_ids)){
ajaxs=ajaxs.concat(_ids.map(id=>delDept(id)));
}
return Promise.all(ajaxs);
}).then(() => { }).then(() => {
getList(); getList();
proxy.$modal.msgSuccess("删除成功"); proxy.$modal.msgSuccess("删除成功");

View File

@ -0,0 +1,110 @@
<template>
<div class="bigscreen-menu app-container">
<el-button type="primary" @click="handleCheckDefault"></el-button>
<el-button type="success" @click="handleCheckSave"></el-button>
<el-button type="danger" @click="handleClearCache"></el-button>
<el-tree ref="treeRef" :data="dataSource" show-checkbox :props="defaultProps" node-key="id" default-expand-all :expand-on-click-node="false"> </el-tree>
</div>
</template>
<script>
import useUserStore from "@/store/modules/user";
import { getMenuByProjectId,addMenus,updateMenus,clearCache } from "@/api/system/bigscreenMenu";
export default {
name: "BigscreenMenu",
data() {
return {
dataSource: [],
userStore: {},
currentPrjId: null,
currentComId: null,
treeData: [],
defaultProps: {
children: "children",
label: "name",
},
};
},
mounted() {
console.log("--1--");
this.userStore = useUserStore();
this.currentPrjId = this.userStore.currentPrjId;
this.currentComId = this.userStore.currentComId;
getMenuByProjectId({ projectId: this.currentPrjId }).then((res) => {
let tmps = res.data || [];
this.treeData = tmps;
let makeTree = (nodes) => {
nodes.forEach((it) => {
it.checked = it.enabled == 1;
it.label = it.name;
it.children = tmps.filter((item) => item.pid == it.id);
if (it.children.length > 0) {
makeTree(it.children);
}
});
return nodes;
};
this.dataSource = makeTree(tmps.filter((it) => it.pid == 0));
this.$nextTick(()=>{
let ids=this.treeData.filter(it=>it.enabled==1).map(it=>it.id);
this.$refs.treeRef.setCheckedKeys(ids, false);
});
});
},
methods: {
handleCheckDefault() {
let ids = this.treeData.filter((it) => [101, 102, 301, 303, 304, 306, 309, 310, 401, 501, 502, 6, 701, 702, 703, 704, 705].includes(+it.navId)).map((it) => it.id);
this.$refs.treeRef.setCheckedKeys(ids, false);
},
handleCheckSave(){
this.$confirm("确定要保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.doSave();
});
},
doSave(){
let checked=this.$refs.treeRef.getCheckedKeys(false);
let addData=this.treeData.filter(it=>!it.pmid).map(it=>{
return {
menuId:it.id,
projectId:this.currentPrjId,
enabled:checked.includes(it.id)?1:0,
currentUser:this.userStore.name,
}
});
let updateData=this.treeData.filter(it=>it.pmid).map(it=>{
return {
id:it.pmid,
enabled:checked.includes(it.id)?1:0
}
});
let ajaxs=[];
if(addData.length>0){
ajaxs.push(addMenus({items:addData}));
}
if(updateData.length>0){
ajaxs.push(updateMenus({items:updateData}));
}
if(ajaxs.length>0){
Promise.all(ajaxs).then(()=>{
this.$message({type:'success',message:'保存成功'})
})
}
},
handleClearCache(){
clearCache("big_screen_menu_cache").then(()=>{
this.$message({type:'success',message:'清除缓存成功'})
})
}
},
};
</script>
<style lang="scss">
.bigscreen-menu {
}
</style>