update code

dev-login
haha 2023-09-21 22:45:42 +08:00
parent 8702eaa0a9
commit 1467cb18d7
11 changed files with 420 additions and 102 deletions

View File

@ -17,8 +17,8 @@
<link rel="stylesheet" href="/cesium/Widgets/widgets.css">
<script src="/cesium/jquery-3.0.0.min.js"></script>
<script src="/cesium/Cesium.js?v=20230913"></script>
<script src="/cesium/BIMGISEngine.js?v=20230913"></script>
<script src="/cesium/initApi.js?v=20230919"></script>
<script src="/cesium/BIMGISEngine.js?v=20230920"></script>
<script src="/cesium/initApi.js?v=20230920"></script>
<script src="./js/mapmodle.js"></script>
<!--
<script crossorigin="anonymous" integrity="sha384-gb8mitZ44MWVFB3GKzmtx1OCjOh3Cj4mgusyTvNzl1Nu31l0em1FrApJindwVAe0"

View File

@ -1,76 +0,0 @@
window.initMap=()=>{
delete window.mapDefault
delete window.mapApi
delete window.mapOptions
delete window.mapNacCube
window.mapDefault={
"container": "cesiumContainer",
"showfps": false,
"openterrain": false,
"imageryprovider": "tianditu_image",
"terrainProvider": "http://106.12.253.67:9304/",
"mapworldkey": "6215132e0336a3db28ce73f8c9ff6db6",
"openearth": false,
"maxspaceerror": 2000,
"loading": false,
"bgcolor": "#87CEFA",
"outlinecolor": {
"red": 0,
"green": 0,
"blue": 0,
"alpha": 1
},
"outlineScaleVal": 1.001,
"selectedcolor": "#ff0000",
"sceneMode": 3,
"TwoMapNavigationEnable": false,
"throughwall": true,
"searchbox": false,
"mapbox": false,
"sitepath": "/static/Cesium/",
"secretkey": "80840d6054a373fa6493fe6a8cd7c0b8a01924bf58e825bfe1a1a67cb0a02263b5549ae0c4c04dde2e457c9132b600699a2f430fe4b7a52ae76d0bdd0633e4f1b1dd0395c04c1b00f41e1b0c3020a71600f1cc3bd764e4d130249ddd6e2916a73792839cb97ddb24f090343455f7834c356e76d9d11fd5b479eb391b46cc93e66da10e0ba1fed735c8b1b1f086973f6152b6a2299e3e22c9450d7fc8c8452aa23013404ec41c18c92e7ff7e2a3fe238234fec9927bc4cd95b450c2cdae94df00da4c49c467adacd9ec7f7c00482028425ebbbee7ceb46deec08dc9751ee993a353012fbe2ebcf6e0f81b95abdf8d437c4965454914fcc7b07d28062bc2976948356e76d9d11fd5b479eb391b46cc93e66da10e0ba1fed735c8b1b1f086973f6152b6a2299e3e22c9cc8c33b16ea71cc03013404ec41c18c9cc748e652ce16fe7061c32d550edfda330c1555e0c08e51f698f96b91615d8220acd9cb22f32e9757681487e0680adfbfacb9b5d2ce5a13b664d8466043270f9f3bde6ac6a05cf25ab0ccc0659a290c9669997be7ccc0086c3d61f7cf5f649cb25f0dbad9f7f66e3165cad25065145affac91bea061f4ff485af667dd7ebaf4baeea64611acbe5c74018be5a8b704fcd4f53d18504940411fac91bea061f4ff49a2f853c245297edc3d61f7cf5f649cb0f9b84173857a7b67c27928b58b4a6a65f517a43f106335e8b1d5c423a171723ffa04d0ac4e5c1a1853fcb2bc95ee8056cd5b4826fa55926733ef859a5f169e6afafd0506174e86864d53d967da98ab0b0e08d14be6d452c6c69755ac3a391993370a029761da893cfbf575da87c6b5ca602467b79c6c9532f438aaafb9ec915692f0287a8db979969e5635404d6fdfb753151533a277044afdd825f7197f2896c69755ac3a391993370a029761da893af24d88c02bccfae6cd5b4826fa55926f7722b78090b30b986f9287101582d8841187054ec673ebd2042f9836ea453c3afafd0506174e86800225b7f4102e3585b1923cb186fe0ceee54c6f17ab8555da26ecd334722494fc515b205e9624a4494c772ef4f023a606882e118fa6321c24ddee4821c840fb56aac929d6d0a052d5ff97d71e43811db939f7340826236af6f10316a04bf618d494a26e0fd06f7daa07177989e1680a4cf14829a5847f70377d6c12f1649400fcab44f4ff52989cf129aa6cca660be152a75b8e35648925dbce381b345d9e137c04a02a4c8252625f5625eed58fd34b7be4266e54212e88b23f012bead9abaef9e18aa308f0ecffaf3dda7d7b4efd2e0c4b8de161864620fc1f2af98bde031b29e0865381c96bbc10921b48a068558915ff023d18526f5d399e0893df43db7122415d52565dc982ea24fbd825734dbaefadc6df0f19d925c7f63d343a622134b1c934d130d662447add19064adbbb2fd24a82c0fbfcbc3175fc32761df099156daf4e86455740207eb4e4a5300d9c1a17ffd43703d476c36ef07df2206bd8d232b844ff3c1d7cf7c47ec502183af4e27b644d89a77efad286dee59796b124081510f8a6ea5c1dff9c3d61f7cf5f649cb25f0dbad9f7f66e3e0e7c3406ae4dd4eebc424f09f933d0eb1a881ed05ca8d5c70958237eb5b91d4e574440ea0c9179a582dc966bcfc1f21cf3630a2823a9a2d22bd09a00b213aae3866768ae2f24dde6784fbf292c2cba1ab3a1a0dac231941d2277e675309a46ea6fde1492ec9a29c4f53d18504940411e9520f8be669a95a8618879da1244784b88edb1244f5021a0991de19ea44c0dd",
"editmode": true,
"cadmode": false,
"isRequestWebgl2": true,
"requestRenderMode": true,
"colorBlendMode": 2,
"loadAnimation": false,
"isStrictClip": true,
"isMsaaSamples": true,
"isOpenVR": false,
"language": "zh-CN"
};
window.mapApi = new API(window.mapDefault); //api对象后面调用接口要全程使用控制好作用域
//导航体
window.mapOptions = {
imgs: { // 六面图片
top: '/cesium/Assets/Images/Navigation/bim/top.png',
bottom: '/cesium/Assets/Images/Navigation/bim/under.png',
east: '/cesium/Assets/Images/Navigation/bim/east.png',
south: '/cesium/Assets/Images/Navigation/bim/south.png',
west: '/cesium/Assets/Images/Navigation/bim/west.png',
north: '/cesium/Assets/Images/Navigation/bim/north.png',
},
offset: { // 屏幕坐标偏移
corner: GLENavigationCube.RightTop,
x: 25,
y: 20
},
cube: {
hoverColor: '#7193dc', // 立方导航快鼠标移过显示颜色
size: 75,// 导航立方尺寸
hotPointSize: 7,// 导航立方棱角热点区域尺寸
cubeTextColor: "#4c4c4ccc",// cube 各个面文字颜色
cubeStrokeColor: "#374769cc",// cube 各个面边框颜色
cubeFillColor: "#374769cc",// cube 各个面填充颜色
},
zoomRatios: 1, // 缩放倍率
show: true, // 是否显示
showAxes: true, // 是否显示XYZ轴线
};
window.mapNacCube = window.mapApi.Plugin.initNavCube(window.mapOptions); // 实例化出来的对象可用于更新和设置可视状态
window.mapApi.Public.setSunshineDuration("13:00");
// OR 最简形式
}

View File

@ -0,0 +1,72 @@
window.initMap=()=>{
delete window.mapDefault
delete window.mapApi
delete window.mapOptions
delete window.mapNacCube
window.mapDefault={
"container": "cesiumContainer",
"showfps": false,
"openterrain": true,
"imageryprovider": "tianditu_image",
"terrainProvider": "http://106.12.253.67:9304/",
"mapworldkey": "6215132e0336a3db28ce73f8c9ff6db6",
"openearth": false,
"maxspaceerror": 2000,
"loading": false,
"bgcolor": "#87CEFA",
"outlinecolor": "#000000",
"outlineScaleVal": 1.001,
"selectedcolor": "#ff0000",
"sceneMode": 3,
"TwoMapNavigationEnable": false,
"throughwall": true,
"searchbox": false,
"mapbox": true,
"sitepath": "/static/Cesium/",
//"secretkey": "80840d6054a373fa6493fe6a8cd7c0b8a01924bf58e825bfe1a1a67cb0a02263b5549ae0c4c04dde2e457c9132b600699a2f430fe4b7a52ae76d0bdd0633e4f1b1dd0395c04c1b00f41e1b0c3020a71600f1cc3bd764e4d130249ddd6e2916a73792839cb97ddb24f090343455f7834c356e76d9d11fd5b479eb391b46cc93e66da10e0ba1fed735c8b1b1f086973f6152b6a2299e3e22c9450d7fc8c8452aa23013404ec41c18c92e7ff7e2a3fe238234fec9927bc4cd95b450c2cdae94df00da4c49c467adacd9ec7f7c00482028425ebbbee7ceb46deec08dc9751ee993a353012fbe2ebcf6e0f81b95abdf8d437c4965454914fcc7b07d28062bc2976948356e76d9d11fd5b479eb391b46cc93e66da10e0ba1fed735c8b1b1f086973f6152b6a2299e3e22c9cc8c33b16ea71cc03013404ec41c18c9cc748e652ce16fe7061c32d550edfda330c1555e0c08e51f698f96b91615d8220acd9cb22f32e9757681487e0680adfbfacb9b5d2ce5a13b664d8466043270f9f3bde6ac6a05cf25ab0ccc0659a290c9669997be7ccc0086c3d61f7cf5f649cb25f0dbad9f7f66e3165cad25065145affac91bea061f4ff485af667dd7ebaf4baeea64611acbe5c74018be5a8b704fcd4f53d18504940411fac91bea061f4ff49a2f853c245297edc3d61f7cf5f649cb0f9b84173857a7b67c27928b58b4a6a65f517a43f106335e8b1d5c423a171723ffa04d0ac4e5c1a1853fcb2bc95ee8056cd5b4826fa55926733ef859a5f169e6afafd0506174e86864d53d967da98ab0b0e08d14be6d452c6c69755ac3a391993370a029761da893cfbf575da87c6b5ca602467b79c6c9532f438aaafb9ec915692f0287a8db979969e5635404d6fdfb753151533a277044afdd825f7197f2896c69755ac3a391993370a029761da893af24d88c02bccfae6cd5b4826fa55926f7722b78090b30b986f9287101582d8841187054ec673ebd2042f9836ea453c3afafd0506174e86800225b7f4102e3585b1923cb186fe0ceee54c6f17ab8555da26ecd334722494fc515b205e9624a4494c772ef4f023a606882e118fa6321c24ddee4821c840fb56aac929d6d0a052d5ff97d71e43811db939f7340826236af6f10316a04bf618d494a26e0fd06f7daa07177989e1680a4cf14829a5847f70377d6c12f1649400fcab44f4ff52989cf129aa6cca660be152a75b8e35648925dbce381b345d9e137c04a02a4c8252625f5625eed58fd34b7be4266e54212e88b23f012bead9abaef9e18aa308f0ecffaf3dda7d7b4efd2e0c4b8de161864620fc1f2af98bde031b29e0865381c96bbc10921b48a068558915ff023d18526f5d399e0893df43db7122415d52565dc982ea24fbd825734dbaefadc6df0f19d925c7f63d343a622134b1c934d130d662447add19064adbbb2fd24a82c0fbfcbc3175fc32761df099156daf4e86455740207eb4e4a5300d9c1a17ffd43703d476c36ef07df2206bd8d232b844ff3c1d7cf7c47ec502183af4e27b644d89a77efad286dee59796b124081510f8a6ea5c1dff9c3d61f7cf5f649cb25f0dbad9f7f66e3e0e7c3406ae4dd4eebc424f09f933d0eb1a881ed05ca8d5c70958237eb5b91d4e574440ea0c9179a582dc966bcfc1f21cf3630a2823a9a2d22bd09a00b213aae3866768ae2f24dde6784fbf292c2cba1ab3a1a0dac231941d2277e675309a46ea6fde1492ec9a29c4f53d18504940411e9520f8be669a95a8618879da1244784b88edb1244f5021a0991de19ea44c0dd",
"secretkey":"80840d6054a373fa6493fe6a8cd7c0b8a01924bf58e825bfe1a1a67cb0a02263b5549ae0c4c04dde2e457c9132b600699a2f430fe4b7a52ae76d0bdd0633e4f1b1dd0395c04c1b00f41e1b0c3020a71600f1cc3bd764e4d130249ddd6e2916a73792839cb97ddb24f090343455f7834c356e76d9d11fd5b479eb391b46cc93e66da10e0ba1fed735c8b1b1f086973f6152b6a2299e3e22c9450d7fc8c8452aa23013404ec41c18c92e7ff7e2a3fe238234fec9927bc4cd95b450c2cdae94df00da4c49c467adacd9ec7f7c00482028425ebbbee7ceb46deec08dc9751ee993a353012fbe2ebcf6e0f81b95abdf8d437c4965454914fcc7b07d28062bc29769484f1e8c851c48f2f6dc0362e2b91959674965454914fcc7b07d28062bc297694837e40a524d2bbb8599a991777d21e7823e88c9264a91404ad3c355b1486472d2d33d2024825618177d6fdab307e075f86fd6ba535458df7b840efa284b50840eefc6d4ffdc9011ea24d736db704d8954950390941b9aaa80089e41bf1a87879de6cd674b6676107f3d4256820c37cd19030c6924517e4349f71e19f74e660313cf3630a2823a9a2d4ce0dce6f81f87eea1ccfaae84e9dbea030c6924517e4349b5024217bdf743a670fd5d571139e4f0e6cd674b6676107fc8b14b44ceeed441af4b194f05a956195b0d603c259172b75b1923cb186fe0ce5be04514c976edd0c12cc462769b2e685be04514c976edd04ca2ef020dc56bee8321afe91a1dcbb1afafd0506174e8680f18f43fcd13957e37bdb1221aa64295f230f78b7aa0c960753151533a2770446a6cb07b672285d204ba1ecd4a967f5dcb6b0c9432a8108f7d1f9f3c7343796941187054ec673ebdbd57ea3b34f9c6cc37bdb1221aa6429512b695fc8f5b4b6fc12cc462769b2e685be04514c976edd038d27dbe2e47e96b753151533a277044d80e0285b44b743f64d53d967da98ab0555e1e6d7d3c0468c8e6f7bb1e69ec27703c52805d982a9a7b7134e53eaa4f83b046182095e9d992f79b33aea9c3effb017d98bd95ced22c1d7f698eff812326cfff54e0f16a46a6df58986290a016ee80352734e97c0efea07177989e1680a4cf14829a5847f70377d6c12f1649400fcab44f4ff52989cf129aa6cca660be152a75b8e35648925dbce381b345d9e137c04a02a4c8252625f5625eed58fd34b7be4266e54212e88b23f012bead9abaef9e18aa308f0ecffaf3dda7d7b4efd2e0c4b8de161864620fc1f2af98bde031b29e0865381c96bbc10921b48a068558915ff023d18526f5d399e0893df43db7122415d52565dc982ea24fbd825734dbaefadc6df0f19d925c7f63d343a622134b1c934d130d662447add19064adbbb2fd24a82c0fbfcbc3175fc32761df099156daf4e86455740207eb4e4a5300d9c1a17ffd43703d476c36ef07df2206bd8d232b844ff3c1d7cf7c47ec502183af4e27b644d89a77efad286dee59796b124081510f8a6ea5c1dff9c3d61f7cf5f649cb25f0dbad9f7f66e3e0e7c3406ae4dd4eebc424f09f933d0eb1a881ed05ca8d5c70958237eb5b91d4e574440ea0c9179a582dc966bcfc1f21cf3630a2823a9a2d22bd09a00b213aae3866768ae2f24dde6784fbf292c2cba1ab3a1a0dac231941d2277e675309a46ea6fde1492ec9a29c4f53d18504940411e9520f8be669a95a8618879da1244784b88edb1244f5021a3b46c94014dbc1fa330426cfc4267280",
"editmode": false,
"cadmode": false,
"isRequestWebgl2": true,
"requestRenderMode": true,
"colorBlendMode": 2,
"loadAnimation": false,
"isStrictClip": true,
"isMsaaSamples": true,
"isOpenVR": false,
"language": "zh-CN"
};
window.mapApi = new API(window.mapDefault); //api对象后面调用接口要全程使用控制好作用域
//导航体
window.mapOptions = {
imgs: { // 六面图片
top: '/cesium/Assets/Images/Navigation/bim/top.png',
bottom: '/cesium/Assets/Images/Navigation/bim/under.png',
east: '/cesium/Assets/Images/Navigation/bim/east.png',
south: '/cesium/Assets/Images/Navigation/bim/south.png',
west: '/cesium/Assets/Images/Navigation/bim/west.png',
north: '/cesium/Assets/Images/Navigation/bim/north.png',
},
offset: { // 屏幕坐标偏移
corner: GLENavigationCube.RightTop,
x: 25,
y: 20
},
cube: {
hoverColor: '#7193dc', // 立方导航快鼠标移过显示颜色
size: 75,// 导航立方尺寸
hotPointSize: 7,// 导航立方棱角热点区域尺寸
cubeTextColor: "#4c4c4ccc",// cube 各个面文字颜色
cubeStrokeColor: "#374769cc",// cube 各个面边框颜色
cubeFillColor: "#374769cc",// cube 各个面填充颜色
},
zoomRatios: 1, // 缩放倍率
show: true, // 是否显示
showAxes: true, // 是否显示XYZ轴线
};
window.mapNacCube = window.mapApi.Plugin.initNavCube(window.mapOptions); // 实例化出来的对象可用于更新和设置可视状态
window.mapApi.Public.setSunshineDuration("13:00");
// OR 最简形式
}

View File

@ -48,16 +48,17 @@
</div>
</div>
<!-- 第四步: 初始化Api -->
<script src="/cesium/initApi.js"></script>
<script src="initApi.js"></script>
<script>
$(function () {
// 第五步:加载模型
window.initMap();
var api=window.mapApi
window.mapApi.Model.add(
"http://szgc.jhncidg.com:808/mapmodel/tools/output/model/202308292209049711/root.glt",
'3a0d53cd-8774-6b32-a056-d69e2e12260e',
//"http://szgc.jhncidg.com:808/mapmodel/tools/output/model/202308292209049711/root.glt",
//'3a0d53cd-8774-6b32-a056-d69e2e12260e',
"http://106.12.253.67:10045/Tools/output/model/202211250957169703/root.glt",
"3a07beae-5c1c-17d4-f0c2-63cf4e4416b9",
(data) => {
console.log(data)
if (Cesium.defined(data)) {

View File

@ -16,6 +16,7 @@ import measure from './measure/index'
import materialSeal from './materialSeal/index'
import costOut from './costOut/index'
import checkDetection from './checkDetection/index'
import standard from './standard/index'
import video from './video/index'
import plan from './plan/index'
import {axios,download} from '@/utils/request'
@ -40,6 +41,7 @@ export default {
checkDetection,
http:axios,
video,
standard,
plan,
downFile:download
}

View File

@ -0,0 +1,12 @@
import request from '@/utils/request'
const getList=(projectId,deptId)=> {
return request({
url: `bgscreen/standard/getList?projectId=${projectId}&deptId=${deptId}`,
method: 'get'
})
}
export default{
getList
}

View File

@ -0,0 +1,229 @@
<template>
<div class="engin-image-items">
<div class="tool-bar">
<span class="sp-page" @click="goNextPage(-1)" v-if="images.length>5" >&lt;</span>
<span v-for="(it, idx) in pagers" :key="idx" class="sp-page" @click="goPage(it)" :class="it == index + 1 ? 'active' : ''"
v-if="it <= images.length">{{ it }}</span>
<span class="sp-page" @click="goNextPage(1)" v-if="images.length>5">&gt;</span>
</div>
<div class="div-img">
<span class="sp-border sp-1"></span>
<span class="sp-border sp-2"></span>
<span class="sp-border sp-3"></span>
<span class="sp-border sp-4"></span>
<el-image :preview-src-list="images.map(it => it.imageFile)" :src="getImage()">
</el-image>
</div>
<div class="div-desc">
<el-popover placement="bottom" width="200" trigger="hover" :content="getTitle()">
<div class="div-title" slot="reference">{{ getTitle() }} {{ images.length }}</div>
</el-popover>
</div>
</div>
</template>
<script>
export default {
props: {
images: {
type: Array,
default: () => []
}
},
data() {
return {
pages: [1, 2, 3, 4, 5],
index: 0
};
},
mounted() {
},
computed:{
pagers() {
const pagerCount = 5;
const halfPagerCount = (pagerCount - 1) / 2;
const currentPage = this.index;
const pageCount = this.images.length;
let showPrevMore = false;
let showNextMore = false;
if (pageCount > pagerCount) {
if (currentPage > pagerCount - halfPagerCount) {
showPrevMore = true;
}
if (currentPage < pageCount - halfPagerCount) {
showNextMore = true;
}
}
const array = [];
if (showPrevMore && !showNextMore) {
const startPage = pageCount - (pagerCount - 2);
for (let i = startPage; i <=pageCount; i++) {
array.push(i);
}
} else if (!showPrevMore && showNextMore) {
for (let i = 1; i < pagerCount; i++) {
array.push(i);
}
} else if (showPrevMore && showNextMore) {
const offset = Math.floor(pagerCount / 2) - 1;
for (let i = currentPage - offset ; i <= currentPage + offset; i++) {
array.push(i);
}
} else {
for (let i = 1; i <=pageCount; i++) {
array.push(i);
}
}
this.showPrevMore = showPrevMore;
this.showNextMore = showNextMore;
return array;
}
},
methods: {
goNextPage(o){
if(this.images.length==0){
return;
}
let n=this.index+o;
if(n<0){
n=this.images.length-1;
}
if(n>=this.images.length){
n=0;
}
this.index=n;
},
goPage(o){
if(this.images.length==0){
return;
}
this.index=o-1;
},
getTitle() {
if (this.images.length > 0) {
return this.images[this.index].standardDesc;
}
return "";
},
getImage() {
if (this.images.length > 0) {
return this.images[this.index].imageFile + '.1000.jpg';
}
return "";
}
},
};
</script>
<style lang="less" scoped>
.engin-image-items {
height: calc(100% - 36px);
margin-left: 5px;
width: calc(100% - 10px);
margin-top: 10px;
text-align: center;
.tool-bar {
position: absolute;
right: 25px;
top: 13px;
.sp-page {
display: inline-block;
width: 20px;
height: 20px;
line-height: 20px;
text-align: center;
background-color: #73ABD7;
border-radius: 10px;
margin-right: 4px;
cursor: pointer;
&.active {
background-color: #fff;
color: #004D7C;
}
}
}
.div-img {
height: calc(100% - 40px);
position: relative;
display: inline-block;
border: solid 1px #004D7C;
.sp-border {
position: absolute;
display: inline-block;
width: 30px;
height: 30px;
z-index: 1;
&.sp-1 {
top: -1px;
left: -1px;
border-left: solid 1px #62F6F8;
border-top: solid 1px #62F6F8;
}
&.sp-2 {
top: -1px;
right: -1px;
border-right: solid 1px #62F6F8;
border-top: solid 1px #62F6F8;
}
&.sp-3 {
bottom: -1px;
right: -1px;
border-right: solid 1px #62F6F8;
border-bottom: solid 1px #62F6F8;
}
&.sp-4 {
bottom: -1px;
left: -1px;
border-left: solid 1px #62F6F8;
border-bottom: solid 1px #62F6F8;
}
}
}
/deep/ .el-image {
height: 100%;
}
.div-desc {
margin-top: 4px;
&>span {
display: flex;
/deep/ .el-popover__reference-wrapper {
display: flex;
width: 100%;
justify-content: center;
.div-title {
max-width: 80%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
}</style>

View File

@ -849,9 +849,9 @@ export default {
},
getProjectId(cb) {
let func = () => {
let prjId = this.project.id;
let prjId = this.project?.id||0;
if (prjId == 0) {
if (this.prjs.length == 0) {
if (!this.prjs||this.prjs.length == 0) {
setTimeout(func, 100);
} else {
cb && cb(this.prjs[1].id);

View File

@ -9,14 +9,25 @@
<div class="screen-content">
<el-row>
<el-col :span="8">
<module-one-1-1 label="现场管理标准化">
<module-one-1-1 label="现场管理标准化" style="position: relative;">
<imageItem :images="list1" v-if="list1.length>0 && !loading"></imageItem>
<div v-if="list1.length==0 && !loading" style="text-align: center;margin-top: 40px;">
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无数据</div>
</div>
</module-one-1-1>
<module-one-1-1 label="作业标准" >
<module-one-1-1 label="作业标准" style="position: relative;">
<imageItem :images="list2" v-if="list2.length>0 && !loading"></imageItem>
<div v-if="list2.length==0 && !loading" style="text-align: center;margin-top: 40px;">
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无数据</div>
</div>
</module-one-1-1>
<module-one-1-1 label="安全技术标准">
<module-one-1-1 label="安全技术标准" style="position: relative;">
<div v-if="list3.length==0 && !loading" style="text-align: center;margin-top: 40px;">
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无数据</div>
</div>
</module-one-1-1>
</el-col>
<el-col :span="8">
@ -32,13 +43,22 @@
</el-col>
<el-col :span="8">
<module-one-1-1 label="设备管理标准">
<div v-if="list4.length==0 && !loading" style="text-align: center;margin-top: 40px;">
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无数据</div>
</div>
</module-one-1-1>
<module-one-1-1 label="文明施工标准">
<div v-if="list5.length==0 && !loading" style="text-align: center;margin-top: 40px;">
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无数据</div>
</div>
</module-one-1-1>
<module-one-1-1 label="环境保护标准">
<div v-if="list6.length==0 && !loading" style="text-align: center;margin-top: 40px;">
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无数据</div>
</div>
</module-one-1-1>
</el-col>
</el-row>
@ -53,22 +73,76 @@ import '../components/background_video'
import '../components/header'
import '../components/staff-survey-chart'
import BorderBox6 from './components/BorderBox6.vue'
import debounce from 'lodash.debounce'
import imageItem from './engin/enginImageItems.vue'
export default {
name: 'JhbigscreenProjectEngin',
components: {
BorderBox6
BorderBox6,
imageItem
},
data() {
return {
loading:true,
index1:0,
index2:0,
index3:0,
index4:0,
index5:0,
index6:0,
list1:[],
list2:[],
list3:[],
list4:[],
list5:[],
list6:[],
};
},
mounted() {
this.$bus.$on("loadProjects", debounce(prjs => {
this.prjs = prjs;
}));
this.$bus.$on("projectChange",debounce(res => {
this.project = res;
this.loadData();
}));
this.$bus.$on("deptChange",debounce(dept => {
this.dept = dept;
this.loadData();
}));
},
methods: {
getProjectId(cb) {
let func = () => {
let prjId = this.project?.id||0;
if (prjId == 0) {
if (!this.prjs||this.prjs.length == 0) {
setTimeout(func, 100);
} else {
cb && cb(this.prjs[1].id);
}
} else {
cb && cb(prjId);
}
}
func();
},
loadData(){
this.getProjectId(id => {
this.$api.standard.getList(id,this.dept.id).then(d=>{
let tmps=d.data||[];
this.list1=tmps.filter(it=>it.standardType==1);
this.list2=tmps.filter(it=>it.standardType==2);
this.list3=tmps.filter(it=>it.standardType==3);
this.list4=tmps.filter(it=>it.standardType==4);
this.list5=tmps.filter(it=>it.standardType==5);
this.list6=tmps.filter(it=>it.standardType==6);
this.loading=false;
});
});
},
onItemData(e) {
if (e.type == 1) {
location.href = 'index.html'
@ -79,6 +153,10 @@ export default {
};
</script>
<style lang="scss" scoped>
<style lang="less" scoped>
.project-engin-index{
/deep/ .border-1{
padding-left:2px;
}
}
</style>

View File

@ -23,8 +23,8 @@ module.exports = defineConfig({
}
},
'/jhapi':{
target: `http://62.234.3.186/jhapi/`,
//target: `http://127.0.0.1:8090/jhapi/`,
//target: `http://62.234.3.186/jhapi/`,
target: `http://127.0.0.1:8090/jhapi/`,
changeOrigin: true,
pathRewrite: {
'^/jhapi':'/'