1210 lines
52 KiB
HTML
1210 lines
52 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset=utf-8>
|
|
<!--<meta name=viewport content="width=device-width,initial-scale=1">-->
|
|
<title>生态委任务信息二级页(2)</title>
|
|
<link rel="stylesheet" type="text/css" href="http://117.161.31.148:8098/dataview/assets/layuiadmin/layui/css/layui.css">
|
|
<link rel="stylesheet" type="text/css" href="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/css/liMarquee.css">
|
|
<link rel="stylesheet" type="text/css" href="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/video/video7.3.0/video-js.css"><!-- 视频播放插件 -->
|
|
<link rel="stylesheet" type="text/css" href="http://117.161.31.148:8098/dataview/assets/fonts/font-awesome/css/font-awesome.css"><!-- 视频播放插件样式 -->
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/js/jquery.min.js" ></script>
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/jutils.min.js" ></script><!-- 时间格式/校验/浏览器判断工具类 -->
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/layer/layer.js"></script>
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/layuiadmin/layui/layui.js"></script>
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/echarts-new.js"></script>
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/bmap.min.js"></script><!-- echarts百度地图工具类 -->
|
|
<!-- <script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/laydate/laydate.js"></script>-->
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/echarts-auto-tooltip.js"></script><!-- echarts轮播插件 -->
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/jquery.liMarquee.js"></script><!-- 文字/图片轮播插件 -->
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/video/video7.3.0/video.js"></script><!-- 视频播放插件 -->
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/video/flash/videojs-flash.js"></script><!-- 视频播放插件 -->
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/ckplayer/ckplayer/ckplayer.js"></script><!-- 视频播放插件 -->
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/waterTank/waterTank.js"></script><!-- 水位显示插件 -->
|
|
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3&key=G0k574UiHH2TTg6iiAyHZk7FEXcnpIhS"></script>
|
|
<style type="text/css">
|
|
/**
|
|
* 边框样式Start
|
|
* 不对文字区域(W0001)进行边框修饰
|
|
.R00002 :not(.W0001){
|
|
position: relative
|
|
border: 1px solid #0bc4e9;
|
|
background: rgba(0,72,115,0.28);
|
|
}
|
|
.R00002 :not(.W0001) :before{
|
|
content: '';
|
|
position: absolute;
|
|
width: 80%;
|
|
height: 100%;
|
|
bottom: -1px;
|
|
top:-1px;
|
|
left:10%;
|
|
border-bottom: 1px solid #007297;
|
|
border-top: 1px solid #007297;
|
|
transition: all 0.5s;
|
|
}
|
|
.R00002 :not(.W0001) :after{
|
|
content: '';
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 80%;
|
|
left: -1px;
|
|
right:-1px;
|
|
top:10%;
|
|
border-left: 1px solid #007297;
|
|
border-right: 1px solid #007297;
|
|
transition: all 0.5s;
|
|
}
|
|
.R00002 :not(.W0001) :hover::before{
|
|
width: 0%;
|
|
}
|
|
.R00002 :not(.W0001) :hover::after{
|
|
height: 0%;
|
|
}
|
|
.R00002 :not(.W0001) :hover{
|
|
box-shadow:
|
|
-5px 0px 2px rgba(255,255,255,0.1),
|
|
0px -5px 2px rgba(255,255,255,0.1),
|
|
5px 0px 2px rgba(255,255,255,0.1),
|
|
0px 5px 2px rgba(255,255,255,0.1);
|
|
background: rgba(255,255,255,0.1);
|
|
}
|
|
* 边框样式End
|
|
*/
|
|
.W0001{
|
|
border: 0px;
|
|
border-left: 0px;
|
|
border-right: 0px;
|
|
</style>
|
|
<script type="text/javascript">
|
|
/**
|
|
* 此处可以自定义一些函数对页面元素进行操作
|
|
*/
|
|
</script>
|
|
<style type="text/css">
|
|
.shadows{background-color: transparent !important;box-shadow: 0 0 0 rgba(0,0,0,0) !important;}
|
|
.anchorBL{display:none} /** 去除百度地图Logo */
|
|
*{
|
|
margin:0;
|
|
padding:0;
|
|
}
|
|
.container{
|
|
width: 1920px;
|
|
height: 1080px;
|
|
background: url("http://117.161.31.148:8098/dataview/route/file/downloadfile/false/0c9a1551-45ee-46c2-b608-1bbc5879a304") no-repeat center;
|
|
background-size: 100% 100%;overflow: hidden;
|
|
position:relative;
|
|
}
|
|
.W0001_0 {
|
|
position:absolute;
|
|
top:5px;
|
|
left:703px;
|
|
width: 521px;
|
|
height: 69px;
|
|
}
|
|
.C0001_1 {
|
|
position:absolute;
|
|
top:99px;
|
|
left:292px;
|
|
width: 373px;
|
|
height: 63px;
|
|
}
|
|
.C0002_2 {
|
|
position:absolute;
|
|
top:97px;
|
|
left:1220px;
|
|
width: 159px;
|
|
height: 67px;
|
|
}
|
|
.C0004_3 {
|
|
position:absolute;
|
|
top:98px;
|
|
left:976px;
|
|
width: 239px;
|
|
height: 65px;
|
|
}
|
|
.A0022_4 {
|
|
position:absolute;
|
|
top:169px;
|
|
left:295px;
|
|
width: 1593px;
|
|
height: 854px;
|
|
}
|
|
.C0005_5 {
|
|
position:absolute;
|
|
top:98px;
|
|
left:30px;
|
|
width: 259px;
|
|
height: 925px;
|
|
}
|
|
.C0005_6 {
|
|
position:absolute;
|
|
top:96px;
|
|
left:1382px;
|
|
width: 503px;
|
|
height: 68px;
|
|
}
|
|
.C0004_7 {
|
|
position:absolute;
|
|
top:97px;
|
|
left:678px;
|
|
width: 284px;
|
|
height: 65px;
|
|
}
|
|
.backButton {
|
|
position:absolute;
|
|
top:4px;
|
|
right:4px;
|
|
width: 50px;
|
|
height: 30px;
|
|
background: url("http://117.161.31.148:8098/dataview/assets/js/vendor/safety/img/back_button.png") no-repeat center;
|
|
background-size: 100% 100%;overflow: hidden;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container" id="container"><!-- 网状效果 -->
|
|
<!-- <div class="backButton" onclick="javascript:history.back(-1);"></div>-->
|
|
<div class="R00002 W0001 W0001_0" id="W0001_0" name="W0001_0"></div>
|
|
<div class="R00002 C0001 C0001_1" id="C0001_1" name="C0001_1"></div>
|
|
<div class="R00002 C0002 C0002_2" id="C0002_2" name="C0002_2"></div>
|
|
<div class="R00002 C0004 C0004_3" id="C0004_3" name="C0004_3"></div>
|
|
<div class="R00002 A0022 A0022_4" id="A0022_4" name="A0022_4"></div>
|
|
<div class="R00002 C0005 C0005_5" id="C0005_5" name="C0005_5"></div>
|
|
<div class="R00002 C0005 C0005_6" id="C0005_6" name="C0005_6"></div>
|
|
<div class="R00002 C0004 C0004_7" id="C0004_7" name="C0004_7"></div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
function getScrollbarWidth() {
|
|
var oP = document.createElement('p'),
|
|
styles = {
|
|
width: '100px',
|
|
height: '100px',
|
|
overflowY: 'scroll'
|
|
}, i, scrollbarWidth;
|
|
for (i in styles) oP.style[i] = styles[i];
|
|
document.body.appendChild(oP);
|
|
scrollbarWidth = oP.offsetWidth - oP.clientWidth;
|
|
try {
|
|
oP.remove();
|
|
} catch (error) {
|
|
oP.removeNode(true);
|
|
}
|
|
return scrollbarWidth;
|
|
}
|
|
|
|
function getUrlAttr(key) {
|
|
var url = document.location.toString();//获取url地址
|
|
var urlParams = url.slice(url.indexOf('?')+1);//获取问号后所有的字符串
|
|
var paramsArray = urlParams.split("&");
|
|
for(var i = 0; i < paramsArray.length; i++){
|
|
var dataArray = paramsArray[i].split("=");
|
|
if (dataArray.length == 2 && dataArray[0] == key){
|
|
return decodeURI(dataArray[1]);
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
// 重置页面的高度和宽度
|
|
function bigDataWindowResize(){
|
|
var heightWindow;
|
|
var widthWindow;
|
|
var currentWindowHeight = $(window).height();
|
|
var currentWindowWidth = $(window).width();
|
|
console.log("计算前 : 高度 :" + currentWindowHeight + ", 宽度 :" + currentWindowWidth);
|
|
if(currentWindowHeight >= 1080) {
|
|
heightWindow = currentWindowHeight;
|
|
widthWindow = currentWindowWidth;
|
|
}else{
|
|
var scrollbarWidth = getScrollbarWidth();
|
|
console.log("滚动条宽度 : " + scrollbarWidth);
|
|
heightWindow = currentWindowHeight + scrollbarWidth;
|
|
widthWindow = currentWindowWidth + scrollbarWidth;
|
|
}
|
|
if(currentWindowHeight >= 1080) {
|
|
heightWindow = currentWindowHeight - 17;
|
|
widthWindow = currentWindowWidth - 17;
|
|
}else{
|
|
heightWindow = currentWindowHeight + 16.5;
|
|
widthWindow = currentWindowWidth + 16.5;
|
|
}
|
|
var container = document.getElementById('container');
|
|
container.style.height = heightWindow + "px";
|
|
container.style.width = widthWindow + "px";
|
|
console.log("计算后 : 高度 :" + heightWindow + ", 宽度 :" + widthWindow);
|
|
var W0001_0Window = document.getElementById('W0001_0');
|
|
|
|
var W0001_0ProportionWidth = 521 / 1920 * 100;
|
|
var W0001_0NewWidth = widthWindow / 100 * W0001_0ProportionWidth;
|
|
W0001_0Window.style.width = W0001_0NewWidth.toFixed(2) + "px";
|
|
|
|
var W0001_0ProportionHeight = 69 / 1080 * 100;
|
|
var W0001_0NewHeight = heightWindow / 100 * W0001_0ProportionHeight;
|
|
W0001_0Window.style.height = W0001_0NewHeight.toFixed(2) + "px";
|
|
|
|
var W0001_0ProportionLeft = 703 / 1920 * 100;
|
|
var W0001_0NewLeft = widthWindow / 100 * W0001_0ProportionLeft;
|
|
W0001_0Window.style.left = W0001_0NewLeft.toFixed(2) + "px";
|
|
|
|
var W0001_0ProportionTop = 5 / 1080 * 100;
|
|
var W0001_0NewTop = heightWindow / 100 * W0001_0ProportionTop;
|
|
W0001_0Window.style.top = W0001_0NewTop.toFixed(2) + "px";
|
|
|
|
var C0001_1Window = document.getElementById('C0001_1');
|
|
|
|
var C0001_1ProportionWidth = 373 / 1920 * 100;
|
|
var C0001_1NewWidth = widthWindow / 100 * C0001_1ProportionWidth;
|
|
C0001_1Window.style.width = C0001_1NewWidth.toFixed(2) + "px";
|
|
|
|
var C0001_1ProportionHeight = 63 / 1080 * 100;
|
|
var C0001_1NewHeight = heightWindow / 100 * C0001_1ProportionHeight;
|
|
C0001_1Window.style.height = C0001_1NewHeight.toFixed(2) + "px";
|
|
|
|
var C0001_1ProportionLeft = 292 / 1920 * 100;
|
|
var C0001_1NewLeft = widthWindow / 100 * C0001_1ProportionLeft;
|
|
C0001_1Window.style.left = C0001_1NewLeft.toFixed(2) + "px";
|
|
|
|
var C0001_1ProportionTop = 99 / 1080 * 100;
|
|
var C0001_1NewTop = heightWindow / 100 * C0001_1ProportionTop;
|
|
C0001_1Window.style.top = C0001_1NewTop.toFixed(2) + "px";
|
|
|
|
var C0002_2Window = document.getElementById('C0002_2');
|
|
|
|
var C0002_2ProportionWidth = 159 / 1920 * 100;
|
|
var C0002_2NewWidth = widthWindow / 100 * C0002_2ProportionWidth;
|
|
C0002_2Window.style.width = C0002_2NewWidth.toFixed(2) + "px";
|
|
|
|
var C0002_2ProportionHeight = 67 / 1080 * 100;
|
|
var C0002_2NewHeight = heightWindow / 100 * C0002_2ProportionHeight;
|
|
C0002_2Window.style.height = C0002_2NewHeight.toFixed(2) + "px";
|
|
|
|
var C0002_2ProportionLeft = 1220 / 1920 * 100;
|
|
var C0002_2NewLeft = widthWindow / 100 * C0002_2ProportionLeft;
|
|
C0002_2Window.style.left = C0002_2NewLeft.toFixed(2) + "px";
|
|
|
|
var C0002_2ProportionTop = 97 / 1080 * 100;
|
|
var C0002_2NewTop = heightWindow / 100 * C0002_2ProportionTop;
|
|
C0002_2Window.style.top = C0002_2NewTop.toFixed(2) + "px";
|
|
|
|
var C0004_3Window = document.getElementById('C0004_3');
|
|
|
|
var C0004_3ProportionWidth = 239 / 1920 * 100;
|
|
var C0004_3NewWidth = widthWindow / 100 * C0004_3ProportionWidth;
|
|
C0004_3Window.style.width = C0004_3NewWidth.toFixed(2) + "px";
|
|
|
|
var C0004_3ProportionHeight = 65 / 1080 * 100;
|
|
var C0004_3NewHeight = heightWindow / 100 * C0004_3ProportionHeight;
|
|
C0004_3Window.style.height = C0004_3NewHeight.toFixed(2) + "px";
|
|
|
|
var C0004_3ProportionLeft = 976 / 1920 * 100;
|
|
var C0004_3NewLeft = widthWindow / 100 * C0004_3ProportionLeft;
|
|
C0004_3Window.style.left = C0004_3NewLeft.toFixed(2) + "px";
|
|
|
|
var C0004_3ProportionTop = 98 / 1080 * 100;
|
|
var C0004_3NewTop = heightWindow / 100 * C0004_3ProportionTop;
|
|
C0004_3Window.style.top = C0004_3NewTop.toFixed(2) + "px";
|
|
|
|
var A0022_4Window = document.getElementById('A0022_4');
|
|
|
|
var A0022_4ProportionWidth = 1593 / 1920 * 100;
|
|
var A0022_4NewWidth = widthWindow / 100 * A0022_4ProportionWidth;
|
|
A0022_4Window.style.width = A0022_4NewWidth.toFixed(2) + "px";
|
|
|
|
var A0022_4ProportionHeight = 854 / 1080 * 100;
|
|
var A0022_4NewHeight = heightWindow / 100 * A0022_4ProportionHeight;
|
|
A0022_4Window.style.height = A0022_4NewHeight.toFixed(2) + "px";
|
|
|
|
var A0022_4ProportionLeft = 295 / 1920 * 100;
|
|
var A0022_4NewLeft = widthWindow / 100 * A0022_4ProportionLeft;
|
|
A0022_4Window.style.left = A0022_4NewLeft.toFixed(2) + "px";
|
|
|
|
var A0022_4ProportionTop = 169 / 1080 * 100;
|
|
var A0022_4NewTop = heightWindow / 100 * A0022_4ProportionTop;
|
|
A0022_4Window.style.top = A0022_4NewTop.toFixed(2) + "px";
|
|
|
|
var C0005_5Window = document.getElementById('C0005_5');
|
|
|
|
var C0005_5ProportionWidth = 259 / 1920 * 100;
|
|
var C0005_5NewWidth = widthWindow / 100 * C0005_5ProportionWidth;
|
|
C0005_5Window.style.width = C0005_5NewWidth.toFixed(2) + "px";
|
|
|
|
var C0005_5ProportionHeight = 925 / 1080 * 100;
|
|
var C0005_5NewHeight = heightWindow / 100 * C0005_5ProportionHeight;
|
|
C0005_5Window.style.height = C0005_5NewHeight.toFixed(2) + "px";
|
|
|
|
var C0005_5ProportionLeft = 30 / 1920 * 100;
|
|
var C0005_5NewLeft = widthWindow / 100 * C0005_5ProportionLeft;
|
|
C0005_5Window.style.left = C0005_5NewLeft.toFixed(2) + "px";
|
|
|
|
var C0005_5ProportionTop = 98 / 1080 * 100;
|
|
var C0005_5NewTop = heightWindow / 100 * C0005_5ProportionTop;
|
|
C0005_5Window.style.top = C0005_5NewTop.toFixed(2) + "px";
|
|
|
|
var C0005_6Window = document.getElementById('C0005_6');
|
|
|
|
var C0005_6ProportionWidth = 503 / 1920 * 100;
|
|
var C0005_6NewWidth = widthWindow / 100 * C0005_6ProportionWidth;
|
|
C0005_6Window.style.width = C0005_6NewWidth.toFixed(2) + "px";
|
|
|
|
var C0005_6ProportionHeight = 68 / 1080 * 100;
|
|
var C0005_6NewHeight = heightWindow / 100 * C0005_6ProportionHeight;
|
|
C0005_6Window.style.height = C0005_6NewHeight.toFixed(2) + "px";
|
|
|
|
var C0005_6ProportionLeft = 1382 / 1920 * 100;
|
|
var C0005_6NewLeft = widthWindow / 100 * C0005_6ProportionLeft;
|
|
C0005_6Window.style.left = C0005_6NewLeft.toFixed(2) + "px";
|
|
|
|
var C0005_6ProportionTop = 96 / 1080 * 100;
|
|
var C0005_6NewTop = heightWindow / 100 * C0005_6ProportionTop;
|
|
C0005_6Window.style.top = C0005_6NewTop.toFixed(2) + "px";
|
|
|
|
var C0004_7Window = document.getElementById('C0004_7');
|
|
|
|
var C0004_7ProportionWidth = 284 / 1920 * 100;
|
|
var C0004_7NewWidth = widthWindow / 100 * C0004_7ProportionWidth;
|
|
C0004_7Window.style.width = C0004_7NewWidth.toFixed(2) + "px";
|
|
|
|
var C0004_7ProportionHeight = 65 / 1080 * 100;
|
|
var C0004_7NewHeight = heightWindow / 100 * C0004_7ProportionHeight;
|
|
C0004_7Window.style.height = C0004_7NewHeight.toFixed(2) + "px";
|
|
|
|
var C0004_7ProportionLeft = 678 / 1920 * 100;
|
|
var C0004_7NewLeft = widthWindow / 100 * C0004_7ProportionLeft;
|
|
C0004_7Window.style.left = C0004_7NewLeft.toFixed(2) + "px";
|
|
|
|
var C0004_7ProportionTop = 97 / 1080 * 100;
|
|
var C0004_7NewTop = heightWindow / 100 * C0004_7ProportionTop;
|
|
C0004_7Window.style.top = C0004_7NewTop.toFixed(2) + "px";
|
|
|
|
}
|
|
$(window).resize(function() {
|
|
window.location.href = window.location.href;
|
|
});
|
|
bigDataWindowResize();
|
|
// 十六进制颜色随机
|
|
function color16(){
|
|
var rgb='rgb('+Math.floor(Math.random()*255)+','
|
|
+Math.floor(Math.random()*255)+','
|
|
+Math.floor(Math.random()*255)+')';
|
|
return rgb;
|
|
}
|
|
// 将时间转为距离时间
|
|
var getNoticeTime = function(dateStr) {
|
|
var date = new Date(dateStr);
|
|
try {
|
|
// 发布时间毫秒值
|
|
var millis = date.getTime();
|
|
// 当前时间毫秒值
|
|
var currentMillis = new Date().getTime();
|
|
var s = currentMillis - millis;
|
|
if(s < (1000*60)) {
|
|
return "1分钟前";
|
|
}
|
|
if(s < (1000*60*60)) {
|
|
return Number(s / 1000 / 60).toFixed(0) + "分钟前";
|
|
}
|
|
if(s < (1000*60*60*24)) {
|
|
return Number(s / 1000 / 60 / 60).toFixed(0) + "小时前";
|
|
}
|
|
return Number(s / 1000 / 60 / 60 / 24).toFixed(0) + "天前";
|
|
} catch (err) {
|
|
return "未知";
|
|
}
|
|
}
|
|
// 比例计算函数
|
|
function getPercent(num, total) {
|
|
num = parseFloat(num);
|
|
total = parseFloat(total);
|
|
if (isNaN(num) || isNaN(total)) {
|
|
return 0;
|
|
}
|
|
return total <= 0 ? 0 : (Math.round(num / total * 10000) / 100.00);
|
|
}
|
|
// // Ajax地图数据获取
|
|
// function getMapJsonData(url) {
|
|
// var mapData = {};
|
|
// $.ajax({
|
|
// url: url,
|
|
// cache: false,
|
|
// type: "GET",
|
|
// async: false,
|
|
// dataType: "json",
|
|
// success: function(response){
|
|
// mapData = response;
|
|
// },error: function(response) {
|
|
// }
|
|
// });
|
|
// return mapData;
|
|
// }
|
|
// 请求参数拼接
|
|
function getSqlData(module, areaId, params) {
|
|
var serverData = {
|
|
state:'400',
|
|
msg:'执行失败',
|
|
list:[],
|
|
data:{}
|
|
};
|
|
$.ajax({
|
|
url: 'http://117.161.31.148:8098/dataview/app/bigdatatemplate/querydatarelease/' + areaId,
|
|
cache: false,
|
|
data: params,
|
|
type: "GET",
|
|
async: false,
|
|
dataType: "json",
|
|
success: function(response){
|
|
console.log(module + "网络接口请求结果");
|
|
console.log(response);
|
|
serverData = response;
|
|
},error: function(response) {
|
|
console.error(module + '网络接口请求失败');
|
|
console.log(response);
|
|
}
|
|
});
|
|
return serverData;
|
|
}
|
|
// Ajax接口数据获取
|
|
function getJsonData(module, url, params) {
|
|
var serverData = {
|
|
state:'400',
|
|
msg:'执行失败',
|
|
list:[],
|
|
data:{}
|
|
};
|
|
$.ajax({
|
|
url: url,
|
|
data: params,
|
|
cache: false,
|
|
type: "GET",
|
|
async: false,
|
|
dataType: "json",
|
|
success: function(response){
|
|
console.log(module + "网络接口请求结果");
|
|
console.log(response);
|
|
serverData = response;
|
|
},error: function(response) {
|
|
console.error(module + '网络接口请求失败');
|
|
console.log(response);
|
|
}
|
|
});
|
|
return serverData;
|
|
}
|
|
// 联动事件绑定
|
|
function eventLinkListener(params, requestData) {
|
|
// 弹窗口打开(模板) params.bigdataTemplateJumpTitle
|
|
var targetUrl = params.templateAreaJumpMode > 3 ? params.templateAreaJumpUrl : params.bigdataTemplateJumpUrl;
|
|
var urlParams = targetUrl.slice(targetUrl.indexOf('?')+1);//获取问号后所有的字符串
|
|
if(urlParams != "") {
|
|
if(targetUrl.indexOf('?') == -1 ) {
|
|
requestData = targetUrl + "?" + requestData;
|
|
}else{
|
|
requestData = targetUrl + "&" + requestData;
|
|
}
|
|
}
|
|
if(params.templateAreaJumpMode == "1") {
|
|
var openWindow = {
|
|
type: 2,
|
|
title: '',
|
|
maxmin: false,
|
|
shade:0.2,
|
|
//closeBtn: 0,
|
|
skin: 'shadows',
|
|
shadeClose: false,
|
|
scrollbar: false,
|
|
content: 'http://117.161.31.148:8089/' + requestData,
|
|
success: function(layero, index){
|
|
}
|
|
};
|
|
if(params.bigdataTemplateJumpSize == '1') {
|
|
openWindow.area = [params.bigdataTemplateJumpWidth + 'px', params.bigdataTemplateJumpHeight + 'px'];
|
|
}else{
|
|
openWindow.area = ['80%', '80%'];
|
|
}
|
|
top.layer.open(openWindow);
|
|
}
|
|
// 全窗口打开(模板)
|
|
if(params.templateAreaJumpMode == "2") {
|
|
window.location.href = 'http://117.161.31.148:8089/' + requestData;
|
|
}
|
|
// 新网页打开(模板)
|
|
if(params.templateAreaJumpMode == "3") {
|
|
window.open('http://117.161.31.148:8089/' + requestData, '_blank');
|
|
}
|
|
// 弹窗口打开(页面) params.bigdataTemplateJumpTitle
|
|
if(params.templateAreaJumpMode == "4") {
|
|
top.layer.open({
|
|
type: 2,
|
|
title: '',
|
|
maxmin: false,
|
|
shade:0.2,
|
|
//closeBtn: 0,
|
|
skin: 'shadows',
|
|
shadeClose: false,
|
|
scrollbar: false,
|
|
area: ['80%', '80%'],
|
|
content: requestData,
|
|
success: function(layero, index){
|
|
}
|
|
});
|
|
}
|
|
// 全窗口打开(页面)
|
|
if(params.templateAreaJumpMode == "5") {
|
|
window.location.href = requestData;
|
|
}
|
|
// 新网页打开(页面)
|
|
if(params.templateAreaJumpMode == "6") {
|
|
window.open( requestData, '_blank');
|
|
}
|
|
}
|
|
// 初始事件绑定
|
|
function eventListener(params) {
|
|
// 单击
|
|
if(params.templateAreaJump == "1") {
|
|
document.getElementById(params.id).addEventListener('click', function (ev) {
|
|
openWindows(params);
|
|
});
|
|
}
|
|
// 双击
|
|
if(params.templateAreaJump == "2") {
|
|
document.getElementById(params.id).addEventListener('dbclick', function (ev) {
|
|
openWindows(params);
|
|
});
|
|
}
|
|
}
|
|
|
|
// 打开窗口
|
|
function openWindows(params) {
|
|
var time = new Date();
|
|
// 弹窗口打开(模板) params.bigdataTemplateJumpTitle
|
|
if(params.templateAreaJumpMode == "1") {
|
|
var openWindow = {
|
|
type: 2,
|
|
title: '',
|
|
maxmin: false,
|
|
shade:0.8,
|
|
//closeBtn: 0,
|
|
skin: 'shadows',
|
|
shadeClose: false,
|
|
scrollbar: false,
|
|
content: 'http://117.161.31.148:8089/' + params.bigdataTemplateJumpUrl + "?tm=" + time,
|
|
success: function(layero, index){
|
|
}
|
|
};
|
|
if(params.bigdataTemplateJumpSize == '1') {
|
|
openWindow.area = [params.bigdataTemplateJumpWidth + 'px', params.bigdataTemplateJumpHeight + 'px'];
|
|
}else{
|
|
openWindow.area = ['80%', '80%'];
|
|
}
|
|
top.layer.open(openWindow);
|
|
}
|
|
// 全窗口打开(模板)
|
|
if(params.templateAreaJumpMode == "2") {
|
|
window.location.href = 'http://117.161.31.148:8089/' + params.bigdataTemplateJumpUrl;
|
|
}
|
|
// 新网页打开(模板)
|
|
if(params.templateAreaJumpMode == "3") {
|
|
window.open('http://117.161.31.148:8089/' + params.bigdataTemplateJumpUrl, '_blank');
|
|
}
|
|
// 弹窗口打开(页面) params.bigdataTemplateJumpTitle
|
|
if(params.templateAreaJumpMode == "4") {
|
|
top.layer.open({
|
|
type: 2,
|
|
title: '',
|
|
maxmin: false,
|
|
shade:0.2,
|
|
//closeBtn: 0,
|
|
skin: 'shadows',
|
|
shadeClose: false,
|
|
scrollbar: false,
|
|
area: ['80%', '80%'],
|
|
content: params.templateAreaJumpUrl,
|
|
success: function(layero, index){
|
|
}
|
|
});
|
|
}
|
|
// 全窗口打开(页面)
|
|
if(params.templateAreaJumpMode == "5") {
|
|
window.location.href = params.templateAreaJumpUrl;
|
|
}
|
|
// 新网页打开(页面)
|
|
if(params.templateAreaJumpMode == "6") {
|
|
window.open( params.templateAreaJumpUrl, '_blank');
|
|
}
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
.W0001{
|
|
cursor: pointer;
|
|
text-align:center;
|
|
white-space:nowrap;
|
|
overflow:hidden;
|
|
text-overflow:ellipsis;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
/**
|
|
* 将模块的代码封装到此函数中供模板组装调用.
|
|
* moduleData * 模块数据 {id , data , list , title , params}
|
|
* serverData * 渲染数据 {data , list , msg , state}
|
|
* 模块编号 * W0001
|
|
* 模块名称 * 自定义文字
|
|
* 创建日期 * 2021-03-16 10:10:10
|
|
* 使用说明 * 这里阐述该模块的使用说明
|
|
* # 调用注意 : moduleData.data为对象, 对象参数为fontColor(标题颜色)与fontSize(标题大小)与fontFamily(字体)与fontBold(加粗)与borderSwitch(边框开关)与borderColor(边框颜色)与borderRadius(边框形状)与backColor(背景颜色)
|
|
*/
|
|
function W0001(moduleData, serverData) {
|
|
console.log(moduleData.id + '初始化...');
|
|
if(moduleData.data.borderSwitch == true) {
|
|
$("#"+ moduleData.id).css('border', 'solid 2px ' + moduleData.data.borderColor);
|
|
$("#"+ moduleData.id).css('border-radius', moduleData.data.borderRadius);
|
|
}
|
|
if(moduleData.data.backColor) {
|
|
$("#"+ moduleData.id).css('background-color', moduleData.data.backColor);
|
|
}
|
|
var height = $("#"+ moduleData.id).height();
|
|
var fontFamily = moduleData.data.fontFamily;
|
|
var fontSize = moduleData.data.fontSize;
|
|
var fontBold = moduleData.data.fontBold == true ? 'font-weight:bold;' : '';
|
|
var fontColor = moduleData.data.fontColor;
|
|
$("#"+ moduleData.id).html("<font style=\"line-height:" + height + "px;font-family:\'" + fontFamily + "\';color:" + fontColor + ";font-size: "+ fontSize +"px;" + fontBold + "\">" + moduleData.title + "</font>");
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
.C0001{
|
|
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
/**
|
|
* 将模块的代码封装到此函数中供模板组装调用.
|
|
* moduleData * 模块数据 {id , data , list , title , params}
|
|
* serverData * 渲染数据 {data , list , msg , state}
|
|
* 模块编号 * C0001
|
|
* 模块名称 * 查询输入框
|
|
* 创建日期 * 2021-07-24 16:08:13
|
|
* 使用说明 * 这里阐述该模块的使用说明
|
|
* # 调用注意 : moduleData.data对象参数为fontColor(字体颜色)与loop(数据轮播)
|
|
* # 调用注意 : moduleData.list集合为对象, 参数为
|
|
* # 调用注意 : serverData.data对象参数为
|
|
* # 调用注意 : serverData.list集合为对象, 参数为
|
|
*/
|
|
function C0001(moduleData, serverData) {
|
|
// 被联动触发
|
|
if(moduleData.params.sponsor) {
|
|
console.log(moduleData.params.sponsor + "模块触发了当前模块的联动函数");
|
|
console.log(moduleData.params);
|
|
}
|
|
console.log(moduleData.id + '初始化...');
|
|
var ele ='<input type="text" name="' + moduleData.data.domName + '" class="searchDom layui-input search-item" style="height:100%; background-color:' + moduleData.data.backGroudColor + ';" placeholder="' + moduleData.data.placeholder + '">';
|
|
$("#"+ moduleData.id).html(ele);
|
|
layuiForm.render();
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
.C0002{
|
|
z-index: 9999 !important;
|
|
}
|
|
.C0002_button:hover{
|
|
color: rgba(255, 184, 0, 0.39) !important;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
/**
|
|
* 将模块的代码封装到此函数中供模板组装调用.
|
|
* moduleData * 模块数据 {id , data , list , title , params}
|
|
* serverData * 渲染数据 {data , list , msg , state}
|
|
* 模块编号 * C0002
|
|
* 模块名称 * 查询按钮
|
|
* 创建日期 * 2021-07-24 16:14:13
|
|
* 使用说明 * 这里阐述该模块的使用说明
|
|
* # 调用注意 : moduleData.data对象参数为fontColor(字体颜色)与loop(数据轮播)
|
|
* # 调用注意 : moduleData.list集合为对象, 参数为
|
|
* # 调用注意 : serverData.data对象参数为
|
|
* # 调用注意 : serverData.list集合为对象, 参数为
|
|
*/
|
|
function C0002(moduleData, serverData) {
|
|
// 自定义数据的联动处理*如不支持自定义数据的联动可删除次判断代码
|
|
console.log(moduleData.id + '初始化...');
|
|
$("#"+moduleData.id).html('<button class="C0002_button" style="cursor: pointer;color:' + moduleData.data.fontColor + ';border-radius:8px;width:100%;height:100%;background-color:' + moduleData.data.buttonColor + ';" >' + moduleData.title + '</button>');
|
|
$("#"+moduleData.id).click(function(data) {
|
|
var queryData = {};
|
|
$(".searchDom").each(function(i, e) {
|
|
var val = $(e).val();
|
|
if(val) {
|
|
var domName = $(e).attr("name");
|
|
queryData[domName] = val;
|
|
}
|
|
});
|
|
|
|
var C0005ButtonArray = $(".C0005_button");
|
|
if(C0005ButtonArray.length > 0) {
|
|
C0005ButtonArray.each(function(i, e) {
|
|
var clickDataId = $(e).attr("clickDataId");
|
|
if(clickDataId ) {
|
|
var dataId = $(e).attr("data-id");
|
|
var domName = $(e).attr("data-name");
|
|
queryData[domName] = dataId;
|
|
}
|
|
})
|
|
}
|
|
// 刷新表单
|
|
reloadTable(queryData);
|
|
});
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
.layui-form-select, .layui-form-select div, .layui-form-select input{height: 100%;}
|
|
</style>
|
|
<script type="text/javascript">
|
|
/**
|
|
* 将模块的代码封装到此函数中供模板组装调用.
|
|
* moduleData * 模块数据 {id , data , list , title , params}
|
|
* serverData * 渲染数据 {data , list , msg , state}
|
|
* 模块编号 * C0004
|
|
* 模块名称 * 表单查询下拉框
|
|
* 创建日期 * 2021-07-24 16:44:16
|
|
* 使用说明 * 这里阐述该模块的使用说明
|
|
* # 调用注意 : moduleData.data对象参数为fontColor(字体颜色)与loop(数据轮播)
|
|
* # 调用注意 : moduleData.list集合为对象, 参数为
|
|
* # 调用注意 : serverData.data对象参数为
|
|
* # 调用注意 : serverData.list集合为对象, 参数为
|
|
*/
|
|
function C0004(moduleData, serverData) {
|
|
// 被联动触发
|
|
if(moduleData.params.sponsor) {
|
|
console.log(moduleData.params.sponsor + "模块触发了当前模块的联动函数");
|
|
console.log(moduleData.params);
|
|
}
|
|
console.log(moduleData.id + '初始化...');
|
|
var serverList = serverData.list;
|
|
var option = '<option value="" selected="selected">' + moduleData.data.placeholder + '</option>';
|
|
for(var i = 0 ; i < serverList.length; i++ ) {
|
|
option = option + ('<option value="' + serverList[i].id + '">' + serverList[i].name + '</option>');
|
|
}
|
|
$("#"+ moduleData.id).addClass("layui-form");
|
|
var ele = '<select lay-verify="required" style="width:100%;height:100%;" id="' + moduleData.id + 'Select" name="' + moduleData.data.domName + '" class="searchDom">' + option + '</select>';
|
|
$("#"+ moduleData.id).html(ele);
|
|
layuiForm.render();
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
.A0022{
|
|
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
/**
|
|
* 将模块的代码封装到此函数中供模板组装调用.
|
|
* moduleData * 模块数据 {id , data , list , title , params}
|
|
* serverData * 渲染数据 {data , list , msg , state}
|
|
* 模块编号 * A0022
|
|
* 模块名称 * 动态数据表格
|
|
* 创建日期 * 2021-07-16 09:52:17
|
|
* 使用说明 * 这里阐述该模块的使用说明
|
|
* # 调用注意 : moduleData.data对象参数为fontColor(字体颜色)与loop(数据轮播)
|
|
* # 调用注意 : moduleData.list集合为对象, 参数为
|
|
* # 调用注意 : serverData.data对象参数为
|
|
* # 调用注意 : serverData.list集合为对象, 参数为
|
|
*/
|
|
function A0022(moduleData, serverData) {
|
|
// 被联动触发
|
|
if(moduleData.params.sponsor) {
|
|
console.log(moduleData.params.sponsor + "模块触发了当前模块的联动函数");
|
|
console.log(moduleData.params);
|
|
}
|
|
console.log(moduleData.id + '初始化...');
|
|
var ele = ' <table class="layui-hide" id="' + moduleData.id + 'DataTable" ></table>';
|
|
$("#"+ moduleData.id).html(ele);
|
|
var moduleList = moduleData.list;
|
|
console.log(moduleList);
|
|
for(var i = 0 ; i < moduleList.length; i++) {
|
|
var col = moduleList[i];
|
|
if(col.templet) {
|
|
var colTemplate = col.templet.replace(/\/\"/g, '\\\"');
|
|
col.templet = eval("(" + colTemplate + ")");
|
|
}
|
|
}
|
|
console.log(moduleList);
|
|
var tableConfig = {limit: moduleData.data.limit, width:$("#"+ moduleData.id).width(), height:$("#"+ moduleData.id).height() - 10, url: moduleData.data.url, fieldList: moduleList, tableId: moduleData.id + 'DataTable'};
|
|
initTable(tableConfig)
|
|
// 按钮绑定
|
|
$(document).on("click", ".tableButton", function(data) {
|
|
var dataUrl = $(this).attr("data-url");
|
|
var openWindow = {
|
|
type: 2,
|
|
title: '',
|
|
maxmin: false,
|
|
shade:0.2,
|
|
area:['80%', '80%'],
|
|
skin: 'shadows',
|
|
shadeClose: false,
|
|
scrollbar: false,
|
|
content: dataUrl,
|
|
success: function(layero, index){
|
|
}
|
|
};
|
|
top.layer.open(openWindow);
|
|
|
|
});
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
.C0005{
|
|
z-index: 9999 !important;
|
|
}
|
|
.C0005_button:hover{
|
|
color: rgba(255, 184, 0, 0.39) !important;
|
|
}
|
|
.C0005_button{
|
|
white-space:nowrap;
|
|
overflow:hidden;
|
|
text-overflow:ellipsis;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
/**
|
|
* 将模块的代码封装到此函数中供模板组装调用.
|
|
* moduleData * 模块数据 {id , data , list , title , params}
|
|
* serverData * 渲染数据 {data , list , msg , state}
|
|
* 模块编号 * C0005
|
|
* 模块名称 * 表单查询按钮组
|
|
* 创建日期 * 2021-08-03 16:56:37
|
|
* 使用说明 * 这里阐述该模块的使用说明
|
|
* # 调用注意 : moduleData.data对象参数为fontColor(字体颜色)与loop(数据轮播)
|
|
* # 调用注意 : moduleData.list集合为对象, 参数为
|
|
* # 调用注意 : serverData.data对象参数为
|
|
* # 调用注意 : serverData.list集合为对象, 参数为
|
|
*/
|
|
function C0005(moduleData, serverData) {
|
|
// 被联动触发
|
|
if(moduleData.params.sponsor) {
|
|
console.log(moduleData.params.sponsor + "模块触发了当前模块的联动函数");
|
|
console.log(moduleData.params);
|
|
}
|
|
$("#"+ moduleData.id).html("");
|
|
console.log(moduleData.id + '初始化...');
|
|
var transverse = moduleData.data.transverse;
|
|
var serverList = serverData.list;
|
|
var moduleList = moduleData.list;
|
|
var transverseStr = "";
|
|
if(transverse) {
|
|
var width = $("#"+moduleData.id).width() / serverList.length;
|
|
transverseStr = "height:100%;width:" + (width - 0.5) + "px;"
|
|
}else{
|
|
var height = $("#"+moduleData.id).height() / serverList.length;
|
|
transverseStr = "width:100%;height:" + (height - 0.5) + "px;"
|
|
}
|
|
for(var i = 0 ; i < serverList.length; i++ ) {
|
|
var serverId = serverList[i].id;
|
|
var buttonColor = moduleData.data.buttonColor;
|
|
for(var j = 0 ; j < moduleList.length; j++ ) {
|
|
if(serverId == moduleList[j].id) {
|
|
buttonColor = moduleList[j].buttonColor;
|
|
}
|
|
}
|
|
var button = '<button data-name="' + moduleData.data.domName + '" data-id="'+ serverList[i].id + '" class="C0005_button" style="cursor: pointer;color:' + moduleData.data.fontColor + ';border-radius:8px;' + transverseStr + 'background-color:' + buttonColor + ';" title="' + serverList[i].name + '">' + serverList[i].name + '</button>';
|
|
$("#"+ moduleData.id).append(button);
|
|
}
|
|
$(document).on("click", ".C0005_button", function(e) {
|
|
var queryData = {};
|
|
var dataId = $(this).attr("data-id");
|
|
var domName = $(this).attr("data-name");
|
|
console.log(e);
|
|
$(".C0005_button").attr("clickDataId", "");
|
|
$(".C0005_button[data-id='" + dataId+ "']").attr("clickDataId", "clickDataId");
|
|
queryData[domName] = dataId;
|
|
// 刷新表单
|
|
reloadTable(queryData);
|
|
});
|
|
}
|
|
</script>
|
|
<script type="text/javascript">
|
|
var systemUrl = 'http://117.161.31.148:8098/dataview';
|
|
var inspectionUrl = 'http://106.12.218.237:8001/inspection/';
|
|
var globalData = {
|
|
W0001_0:{
|
|
loopInterval:null, linkParams:{},
|
|
targetParams:{id:'W0001_0',templateAreaJump:'0',templateAreaJumpMode:'',templateAreaJumpUrl:'', bigdataTemplateJumpUrl:'',bigdataTemplateJumpTitle:'',bigdataTemplateJumpWidth:0,bigdataTemplateJumpHeight:0,bigdataTemplateJumpSize:''},
|
|
targetLink:function(requestData) {
|
|
eventLinkListener(this.targetParams, requestData);
|
|
},
|
|
linkSwitch:'',
|
|
intervalTime:0,
|
|
interval:null,
|
|
moduleData:{'id':'W0001_0','data':{'backColor':'','borderSwitch':false,'borderColor':'rgba(255, 69, 0, 0.98)','borderRadius':'25%','fontSize':25,'fontColor':'rgba(248, 237, 237, 1)','fontFamily':'','fontBold':true},'list':[],'title':'集 宁 区 生 态 委 任 务 信 息','params':{}},
|
|
serverData:{data:{},list:[],msg:'加载成功',state:'200'},
|
|
linkAllAction:function(value) {
|
|
},
|
|
linkAction:function(params) {
|
|
},
|
|
timAction:function() {
|
|
},
|
|
initAction:function() { // 自定义 : W0001_0 数据初始化
|
|
W0001(this.moduleData, this.serverData);
|
|
}
|
|
},
|
|
C0001_1:{
|
|
loopInterval:null, linkParams:{},
|
|
targetParams:{id:'C0001_1',templateAreaJump:'0',templateAreaJumpMode:'',templateAreaJumpUrl:'', bigdataTemplateJumpUrl:'',bigdataTemplateJumpTitle:'',bigdataTemplateJumpWidth:0,bigdataTemplateJumpHeight:0,bigdataTemplateJumpSize:''},
|
|
targetLink:function(requestData) {
|
|
eventLinkListener(this.targetParams, requestData);
|
|
},
|
|
linkSwitch:'',
|
|
intervalTime:0,
|
|
interval:null,
|
|
moduleData:{'id':'C0001_1','data':{'backGroudColor':'#fff','placeholder':'请输入关键字','domName':'keywords'},'list':[],'title':'查询','params':{}},
|
|
serverData:{data:{},list:[],msg:'加载成功',state:'200'},
|
|
linkAllAction:function(value) {
|
|
},
|
|
linkAction:function(params) {
|
|
},
|
|
timAction:function() {
|
|
},
|
|
initAction:function() { // 自定义 : C0001_1 数据初始化
|
|
C0001(this.moduleData, this.serverData);
|
|
}
|
|
},
|
|
C0002_2:{
|
|
loopInterval:null, linkParams:{},
|
|
targetParams:{id:'C0002_2',templateAreaJump:'0',templateAreaJumpMode:'',templateAreaJumpUrl:'', bigdataTemplateJumpUrl:'',bigdataTemplateJumpTitle:'',bigdataTemplateJumpWidth:0,bigdataTemplateJumpHeight:0,bigdataTemplateJumpSize:''},
|
|
targetLink:function(requestData) {
|
|
eventLinkListener(this.targetParams, requestData);
|
|
},
|
|
linkSwitch:'',
|
|
intervalTime:0,
|
|
interval:null,
|
|
moduleData:{'id':'C0002_2','data':{'fontColor':'#fff','fontSize':15,'buttonColor':'rgba(10, 177, 161, 0.8)'},'list':[],'title':'查询','params':{}},
|
|
serverData:{data:{},list:[],msg:'加载成功',state:'200'},
|
|
linkAllAction:function(value) {
|
|
},
|
|
linkAction:function(params) {
|
|
},
|
|
timAction:function() {
|
|
},
|
|
initAction:function() { // 自定义 : C0002_2 数据初始化
|
|
C0002(this.moduleData, this.serverData);
|
|
}
|
|
},
|
|
C0004_3:{
|
|
loopInterval:null, linkParams:{},
|
|
targetParams:{id:'C0004_3',templateAreaJump:'0',templateAreaJumpMode:'',templateAreaJumpUrl:'', bigdataTemplateJumpUrl:'',bigdataTemplateJumpTitle:'',bigdataTemplateJumpWidth:0,bigdataTemplateJumpHeight:0,bigdataTemplateJumpSize:''},
|
|
targetLink:function(requestData) {
|
|
eventLinkListener(this.targetParams, requestData);
|
|
},
|
|
linkSwitch:'',
|
|
intervalTime:0,
|
|
interval:null,
|
|
moduleData:{'id':'C0004_3','data':{'fontColor':'#fff','domName':'taskType','placeholder':'请选择任务类型'},'list':[],'title':'表单查询下拉框','params':{}},
|
|
serverData:{data:{},list:[{id:'1',name:'指定任务'},{id:'2',name:'单随机任务'},{id:'3',name:'双随机任务'}],msg:'加载成功',state:'200'},
|
|
linkAllAction:function(value) {
|
|
},
|
|
linkAction:function(params) {
|
|
},
|
|
timAction:function() {
|
|
},
|
|
initAction:function() { // 自定义 : C0004_3 数据初始化
|
|
C0004(this.moduleData, this.serverData);
|
|
}
|
|
},
|
|
A0022_4:{
|
|
loopInterval:null, linkParams:{},
|
|
targetParams:{id:'A0022_4',templateAreaJump:'0',templateAreaJumpMode:'',templateAreaJumpUrl:'', bigdataTemplateJumpUrl:'',bigdataTemplateJumpTitle:'',bigdataTemplateJumpWidth:0,bigdataTemplateJumpHeight:0,bigdataTemplateJumpSize:''},
|
|
targetLink:function(requestData) {
|
|
eventLinkListener(this.targetParams, requestData);
|
|
},
|
|
linkSwitch:'',
|
|
intervalTime:0,
|
|
interval:null,
|
|
moduleData:{'id':'A0022_4','data':{
|
|
'fontColor':'#fff','url':inspectionUrl+'app/taskcheck/v2/release/listpagetask-shengtaiwei'},
|
|
'list':[
|
|
{'field':'taskName','title':'任务名称','width':250,'align':'center'},
|
|
{'field':'taskSummary','title':'任务说明','width':200,'align':'center','fixed':''},
|
|
{'field':'taskTypeText','title':'任务种类','width':149,'align':'center','fixed':'','templet':''},
|
|
{'field':'isCheckedText','title':'是否检查','width':200,'align':'center','fixed':''},
|
|
{'field':'isCompletedText','title':'是否完成','width':200,'align':'center','fixed':''},
|
|
{'field':'checkUserName','title':'检查人','width':200,'align':'center','fixed':''},
|
|
],'title':'动态数据表格','params':{}},
|
|
serverData:{data:{},list:[],msg:'加载成功',state:'200'},
|
|
linkAllAction:function(value) {
|
|
},
|
|
linkAction:function(params) {
|
|
},
|
|
timAction:function() {
|
|
},
|
|
initAction:function() { // 自定义 : A0022_4 数据初始化
|
|
A0022(this.moduleData, this.serverData);
|
|
}
|
|
},
|
|
C0005_5:{
|
|
loopInterval:null, linkParams:{},
|
|
targetParams:{id:'C0005_5',templateAreaJump:'0',templateAreaJumpMode:'',templateAreaJumpUrl:'', bigdataTemplateJumpUrl:'',bigdataTemplateJumpTitle:'',bigdataTemplateJumpWidth:0,bigdataTemplateJumpHeight:0,bigdataTemplateJumpSize:''},
|
|
targetLink:function(requestData) {
|
|
eventLinkListener(this.targetParams, requestData);
|
|
},
|
|
linkSwitch:'',
|
|
intervalTime:0,
|
|
interval:null,
|
|
moduleData:{'id':'C0005_5','data':{'transverse':false,'fontColor':'#fff','domName':'departmentId','buttonColor':'rgba(1, 170, 237, 1)'},'list':[{id:'1',buttonColor:'rgba(1, 170, 27, 1)'}],'title':'表单查询按钮组','params':{}},
|
|
serverData:{},
|
|
linkAllAction:function(value) {
|
|
},
|
|
linkAction:function(params) {
|
|
},
|
|
timAction:function() {
|
|
},
|
|
initAction:function() { // 接口 : C0005_5 数据初始化
|
|
var url = document.location.toString();//获取url地址
|
|
var urlParams = url.slice(url.indexOf('?')+1);//获取问号后所有的字符串
|
|
urlParams = "&" + urlParams;
|
|
if(this.linkSwitch.indexOf('selectLink') != -1 && urlParams.length > 1) {
|
|
if(inspectionUrl+'app/taskcheck/v2/release/departmentdata-shengtaiwei'.indexOf('?') == -1 ) {
|
|
urlParams = inspectionUrl+'app/taskcheck/v2/release/departmentdata-shengtaiwei' + "?" + urlParams;
|
|
}else{
|
|
urlParams = inspectionUrl+'app/taskcheck/v2/release/departmentdata-shengtaiwei' + urlParams;
|
|
}
|
|
}else{
|
|
urlParams = inspectionUrl+'app/taskcheck/v2/release/departmentdata-shengtaiwei';
|
|
}
|
|
this.serverData = getJsonData('C0005_5', urlParams , this.moduleData.params);
|
|
// this.serverData = getJsonData('C0005_5','http://192.168.0.120:7006/inspection/app/taskcheck/v2/release/departmentdata-shengtaiwei', this.moduleData.params);
|
|
if(this.serverData.state == 200) {
|
|
C0005(this.moduleData, this.serverData);
|
|
}
|
|
}
|
|
},
|
|
C0005_6:{
|
|
loopInterval:null, linkParams:{},
|
|
targetParams:{id:'C0005_6',templateAreaJump:'0',templateAreaJumpMode:'',templateAreaJumpUrl:'', bigdataTemplateJumpUrl:'',bigdataTemplateJumpTitle:'',bigdataTemplateJumpWidth:0,bigdataTemplateJumpHeight:0,bigdataTemplateJumpSize:''},
|
|
targetLink:function(requestData) {
|
|
eventLinkListener(this.targetParams, requestData);
|
|
},
|
|
linkSwitch:'',
|
|
intervalTime:0,
|
|
interval:null,
|
|
moduleData:{'id':'C0005_6','data':{'transverse':true,'fontColor':'#fff','domName':'isCompleted','buttonColor':'rgba(10, 177, 161, 0.8)'},'list':[{'id':1,'buttonColor':'rgba(10, 177, 11, 0.8)'}],'title':'表单查询按钮组','params':{}},
|
|
serverData:{},
|
|
linkAllAction:function(value) {
|
|
},
|
|
linkAction:function(params) {
|
|
},
|
|
timAction:function() {
|
|
},
|
|
initAction:function() { // 接口 : C0005_6 数据初始化
|
|
var url = document.location.toString();//获取url地址
|
|
var urlParams = url.slice(url.indexOf('?')+1);//获取问号后所有的字符串
|
|
urlParams = "&" + urlParams;
|
|
if(this.linkSwitch.indexOf('selectLink') != -1 && urlParams.length > 1) {
|
|
if(inspectionUrl+'app/taskcheck/v2/release/count-shengtaiwei-dept-taskcheckdata-total'.indexOf('?') == -1 ) {
|
|
urlParams = inspectionUrl+'app/taskcheck/v2/release/count-shengtaiwei-dept-taskcheckdata-total' + "?" + urlParams;
|
|
}else{
|
|
urlParams = inspectionUrl+'app/taskcheck/v2/release/count-shengtaiwei-dept-taskcheckdata-total' + urlParams;
|
|
}
|
|
}else{
|
|
urlParams = inspectionUrl+'app/taskcheck/v2/release/count-shengtaiwei-dept-taskcheckdata-total';
|
|
}
|
|
this.serverData = getJsonData('C0005_6', urlParams , this.moduleData.params);
|
|
// this.serverData = getJsonData('C0005_6','http://192.168.0.120:7006/inspection/app/taskcheck/v2/release/count-shengtaiwei-dept-taskcheckdata-total', this.moduleData.params);
|
|
if(this.serverData.state == 200) {
|
|
C0005(this.moduleData, this.serverData);
|
|
}
|
|
}
|
|
},
|
|
C0004_7:{
|
|
loopInterval:null, linkParams:{},
|
|
targetParams:{id:'C0004_7',templateAreaJump:'0',templateAreaJumpMode:'',templateAreaJumpUrl:'', bigdataTemplateJumpUrl:'',bigdataTemplateJumpTitle:'',bigdataTemplateJumpWidth:0,bigdataTemplateJumpHeight:0,bigdataTemplateJumpSize:''},
|
|
targetLink:function(requestData) {
|
|
eventLinkListener(this.targetParams, requestData);
|
|
},
|
|
linkSwitch:'',
|
|
intervalTime:0,
|
|
interval:null,
|
|
moduleData:{'id':'C0004_7','data':{'fontColor':'#fff','domName':'isChecked','placeholder':'请选择是否检查'},'list':[],'title':'表单查询下拉框','params':{}},
|
|
serverData:{data:{},list:[{id:'0',name:'未检查'},{id:'1',name:'已检查'}],msg:'加载成功',state:'200'},
|
|
linkAllAction:function(value) {
|
|
},
|
|
linkAction:function(params) {
|
|
},
|
|
timAction:function() {
|
|
},
|
|
initAction:function() { // 自定义 : C0004_7 数据初始化
|
|
C0004(this.moduleData, this.serverData);
|
|
}
|
|
},
|
|
};
|
|
var layuiForm;
|
|
var layuiTable;
|
|
var layuiDate;
|
|
layui.use(['table', 'form', 'laydate'], function() {
|
|
layuiForm = layui.form;
|
|
layuiTable = layui.table;
|
|
layuiDate = layui.laydate;
|
|
for (let key in globalData) {
|
|
globalData[key].initAction();
|
|
globalData[key].timAction();
|
|
}
|
|
});
|
|
|
|
// 重载表格
|
|
function reloadTable(queryData) {
|
|
console.log(layuiTable);
|
|
layuiTable.reload('dataTable', {
|
|
where: queryData,
|
|
page: {
|
|
curr: 1
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 初始化表单
|
|
* tableId, url, fieldList, width, height
|
|
**/
|
|
function initTable(tableConfig) {
|
|
var fieldList = tableConfig.fieldList;
|
|
var colsOutArray = new Array();
|
|
var colsArray = new Array();
|
|
colsArray.push({type:'checkbox', fixed: 'left'});
|
|
colsArray.push({field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'});
|
|
for(var i = 0 ; i < fieldList.length; i++) {
|
|
colsArray.push(fieldList[i]);
|
|
}
|
|
colsOutArray.push(colsArray);
|
|
layuiTable.render({
|
|
elem: '#' + tableConfig.tableId,
|
|
id: 'dataTable',
|
|
url: tableConfig.url,
|
|
width: tableConfig.width,
|
|
height: tableConfig.height,
|
|
limit: tableConfig.limit,
|
|
limits: [20, 40, 60, 80, 100, 200],
|
|
// toolbar: '#headerToolBar',
|
|
request: {
|
|
pageName: 'page',
|
|
limitName: 'rows'
|
|
},
|
|
cols: colsOutArray,
|
|
page: true,
|
|
parseData: function(data) {
|
|
return {
|
|
'code': 0,
|
|
'msg': '',
|
|
'count': data.total,
|
|
'data': data.rows
|
|
};
|
|
},done: function (res, curr, count) {
|
|
/*var dev_obj = document.getElementById(tableConfig.tableId.relace("DataTable","")); //table的父div
|
|
var layuitable_main = dev_obj.getElementsByClassName("layui-table-main"); //在父div中找 layui-table-main 属性所在标签
|
|
if (layuitable_main != null && layuitable_main.length > 0) {
|
|
layuitable_main[0].style.height = '100%';
|
|
}
|
|
var layuitable = dev_obj.getElementsByClassName("layui-form"); //在父div中找 layui-form 属性所在标签
|
|
if (layuitable != null && layuitable.length > 0) {
|
|
layuitable[0].style.height = '100%';
|
|
}*/
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
<script type="text/javascript" src="http://117.161.31.148:8098/dataview/assets/js/vendor/safety/particles.min.js"></script><!-- 背景网状效果插件 -->
|
|
</html> |