qa-prevention-gwj-vue/static/bi/tree/index.html

128 lines
4.9 KiB
HTML
Raw Normal View History

2023-11-06 18:11:01 +08:00
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0 user-scalable=no"> -->
<title></title>
</head>
<body>
<script src="js/three.min.js"></script>
<script src="js/Detector.js"></script>
<script src="js/OrbitControls.js"></script>
<script src="js/IndoorMap.js"></script>
<script src="js/Projector.js"></script>
<script src="js/stats.min.js"></script>
<script src="js/IndoorMap2d.js"></script>
<script src="js/IndoorMap3d.js"></script>
<script src="js/Theme.js"></script>
<link href="css/indoor3D.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../js/pre-loader.js"></script>
<!-- vue -->
<script src="../js/vue.js"></script>
<!--全局配置-->
<script src="../../config.js"></script>
<!-- <div id="indoor3d" style="width: 800px; height: 500px; top:0px; left: 0px; position: absolute"></div> -->
<div id="app" v-if="pd.FOURTYPE=='1'">
<vue-slideshow name="lbt" :data="images" :config="config"></vue-slideshow>
</div>
<script src="./js/vue-slideshow.min.js"></script>
<script>
var vm = new Vue({
el: '#app',
data:{
CORPINFO_ID: '', //主键ID
imgUrl:'',
pd:[],
images: [],
config: {
effect: "slide",
autoplay: 5000,
arrow: true,
dot: true
}
},
methods: {
//初始执行
init() {
this.CORPINFO_ID = this.getUrlKey("CORPINFO_ID");
this.getData();
},
//根据主键ID获取数据
getData: function() {
//发送 post 请求
$.ajax({
xhrFields: {
withCredentials: true
},
type: "POST",
url: config.httpurl + 'corpinfo/goEdit',
data: {
CORPINFO_ID: this.CORPINFO_ID,
tm: new Date().getTime()
},
dataType: "json",
success: function(data) {
if ("success" == data.result) {
vm.pd = data.pd;
var fourImgs = data.fourImgs;
if(data.pd.FOURTYPE==1){
vm.imgUrl = config.fileUrl+fourImgs[0].FILEPATH;
var images = [];
for(var i = 0;i<fourImgs.length;i++){
var img ={src:config.fileUrl+fourImgs[i].FILEPATH}
images.push(img);
}
vm.images = images;
if(vm.images.length == 1){
vm.config.autoplay = 10000000000
}
}else{
var url =config.fileUrl + data. fourImgs[0].FILEPATH;
var params = {
// mapDiv:"indoor3d",
// dim:"2d"
}
var map = IndoorMap(params);
// map.load('data/4sss.json', function(){
map.load(url, function(){
map.showFloor(1);
map.showPubPoints(true);
map.setSelectable(false);
map.showAreaNames(true);
// map.showAreaNames(true).setSelectable(true);
// var ul = IndoorMap.getUI(map);
// document.body.appendChild(ul);
});
}
} else if ("exception" == data.result) {
showException("企业管理", data.exception); //显示异常
$("#showform").show();
$("#jiazai").hide();
}
}
}).done().fail(function() {
swal("登录失效!", "请求服务器无响应,稍后再试", "warning");
$("#showform").show();
$("#jiazai").hide();
});
},
//根据url参数名称获取参数值
getUrlKey: function (name) {
return decodeURIComponent(
(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null;
},
},
mounted(){
this.init();
}
})
</script>
</body>
</html>