xiugaiguanlizhidu
This commit is contained in:
commit
7f25654e58
|
|
@ -1,18 +1,18 @@
|
|||
.vs/
|
||||
.vscode/
|
||||
.idea/
|
||||
safesite/__pycache__/
|
||||
/safesite/__pycache__/
|
||||
.idea/workspace.xml
|
||||
safesite/edu/__pycache__/
|
||||
safesite/datashow/__pycache__/
|
||||
duibiao/__pycache__/
|
||||
mysite/__pycache__/
|
||||
media/
|
||||
aspnet_client/
|
||||
static/
|
||||
mysite/settings.py
|
||||
safesite/token.txt
|
||||
web.config
|
||||
/safesite/edu/__pycache__/
|
||||
/safesite/datashow/__pycache__/
|
||||
/duibiao/__pycache__/
|
||||
/mysite/__pycache__/
|
||||
/media/
|
||||
/aspnet_client/
|
||||
/static/
|
||||
/mysite/settings.py
|
||||
/safesite/token.txt
|
||||
/web.config
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="612px" height="792px" viewBox="0 0 612 792" enable-background="new 0 0 612 792" xml:space="preserve">
|
||||
<circle fill="#8A6343" cx="306" cy="396" r="306"/>
|
||||
<text transform="matrix(1 0 0 1 72.1431 424.7633)" fill="#FFFFFF" font-family="'HelveticaNeue'" font-size="153">mocha</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 653 B |
|
|
@ -0,0 +1,460 @@
|
|||
$.extend($.fn.datagrid.defaults, {
|
||||
onBeforeFetch: function(page){},
|
||||
onFetch: function(page, rows){}
|
||||
});
|
||||
|
||||
var scrollview = $.extend({}, $.fn.datagrid.defaults.view, {
|
||||
render: function(target, container, frozen){
|
||||
var state = $.data(target, 'datagrid');
|
||||
var opts = state.options;
|
||||
var rows = this.rows || [];
|
||||
if (!rows.length) {
|
||||
return;
|
||||
}
|
||||
var fields = $(target).datagrid('getColumnFields', frozen);
|
||||
|
||||
if (frozen){
|
||||
if (!(opts.rownumbers || (opts.frozenColumns && opts.frozenColumns.length))){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var index = this.index;
|
||||
var table = ['<table class="datagrid-btable" cellspacing="0" cellpadding="0" border="0"><tbody>'];
|
||||
for(var i=0; i<rows.length; i++) {
|
||||
var css = opts.rowStyler ? opts.rowStyler.call(target, index, rows[i]) : '';
|
||||
var classValue = '';
|
||||
var styleValue = '';
|
||||
if (typeof css == 'string'){
|
||||
styleValue = css;
|
||||
} else if (css){
|
||||
classValue = css['class'] || '';
|
||||
styleValue = css['style'] || '';
|
||||
}
|
||||
var cls = 'class="datagrid-row ' + (index % 2 && opts.striped ? 'datagrid-row-alt ' : ' ') + classValue + '"';
|
||||
var style = styleValue ? 'style="' + styleValue + '"' : '';
|
||||
// get the class and style attributes for this row
|
||||
// var cls = (index % 2 && opts.striped) ? 'class="datagrid-row datagrid-row-alt"' : 'class="datagrid-row"';
|
||||
// var styleValue = opts.rowStyler ? opts.rowStyler.call(target, index, rows[i]) : '';
|
||||
// var style = styleValue ? 'style="' + styleValue + '"' : '';
|
||||
var rowId = state.rowIdPrefix + '-' + (frozen?1:2) + '-' + index;
|
||||
table.push('<tr id="' + rowId + '" datagrid-row-index="' + index + '" ' + cls + ' ' + style + '>');
|
||||
table.push(this.renderRow.call(this, target, fields, frozen, index, rows[i]));
|
||||
table.push('</tr>');
|
||||
|
||||
// render the detail row
|
||||
if (opts.detailFormatter){
|
||||
table.push('<tr style="display:none;">');
|
||||
if (frozen){
|
||||
table.push('<td colspan=' + (fields.length+2) + ' style="border-right:0">');
|
||||
} else {
|
||||
table.push('<td colspan=' + (fields.length) + '>');
|
||||
}
|
||||
table.push('<div class="datagrid-row-detail">');
|
||||
if (frozen){
|
||||
table.push(' ');
|
||||
} else {
|
||||
table.push(opts.detailFormatter.call(target, i, rows[i]));
|
||||
}
|
||||
table.push('</div>');
|
||||
table.push('</td>');
|
||||
table.push('</tr>');
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
table.push('</tbody></table>');
|
||||
|
||||
$(container).html(table.join(''));
|
||||
},
|
||||
|
||||
renderRow: function(target, fields, frozen, rowIndex, rowData){
|
||||
var opts = $.data(target, 'datagrid').options;
|
||||
|
||||
var cc = [];
|
||||
if (frozen && opts.rownumbers){
|
||||
var rownumber = rowIndex + 1;
|
||||
if (opts.pagination){
|
||||
rownumber += (opts.pageNumber-1)*opts.pageSize;
|
||||
}
|
||||
cc.push('<td class="datagrid-td-rownumber"><div class="datagrid-cell-rownumber">'+rownumber+'</div></td>');
|
||||
}
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var field = fields[i];
|
||||
var col = $(target).datagrid('getColumnOption', field);
|
||||
if (col){
|
||||
var value = rowData[field]; // the field value
|
||||
var css = col.styler ? (col.styler(value, rowData, rowIndex)||'') : '';
|
||||
var classValue = '';
|
||||
var styleValue = '';
|
||||
if (typeof css == 'string'){
|
||||
styleValue = css;
|
||||
} else if (cc){
|
||||
classValue = css['class'] || '';
|
||||
styleValue = css['style'] || '';
|
||||
}
|
||||
var cls = classValue ? 'class="' + classValue + '"' : '';
|
||||
var style = col.hidden ? 'style="display:none;' + styleValue + '"' : (styleValue ? 'style="' + styleValue + '"' : '');
|
||||
|
||||
cc.push('<td field="' + field + '" ' + cls + ' ' + style + '>');
|
||||
|
||||
if (col.checkbox){
|
||||
style = '';
|
||||
} else if (col.expander){
|
||||
style = "text-align:center;height:16px;";
|
||||
} else {
|
||||
style = styleValue;
|
||||
if (col.align){style += ';text-align:' + col.align + ';'}
|
||||
if (!opts.nowrap){
|
||||
style += ';white-space:normal;height:auto;';
|
||||
} else if (opts.autoRowHeight){
|
||||
style += ';height:auto;';
|
||||
}
|
||||
}
|
||||
|
||||
cc.push('<div style="' + style + '" ');
|
||||
if (col.checkbox){
|
||||
cc.push('class="datagrid-cell-check ');
|
||||
} else {
|
||||
cc.push('class="datagrid-cell ' + col.cellClass);
|
||||
}
|
||||
cc.push('">');
|
||||
|
||||
if (col.checkbox){
|
||||
cc.push('<input type="checkbox" name="' + field + '" value="' + (value!=undefined ? value : '') + '">');
|
||||
} else if (col.expander) {
|
||||
//cc.push('<div style="text-align:center;width:16px;height:16px;">');
|
||||
cc.push('<span class="datagrid-row-expander datagrid-row-expand" style="display:inline-block;width:16px;height:16px;cursor:pointer;" />');
|
||||
//cc.push('</div>');
|
||||
} else if (col.formatter){
|
||||
cc.push(col.formatter(value, rowData, rowIndex));
|
||||
} else {
|
||||
cc.push(value);
|
||||
}
|
||||
|
||||
cc.push('</div>');
|
||||
cc.push('</td>');
|
||||
}
|
||||
}
|
||||
return cc.join('');
|
||||
},
|
||||
|
||||
bindEvents: function(target){
|
||||
var state = $.data(target, 'datagrid');
|
||||
var dc = state.dc;
|
||||
var opts = state.options;
|
||||
var body = dc.body1.add(dc.body2);
|
||||
var clickHandler = ($.data(body[0],'events')||$._data(body[0],'events')).click[0].handler;
|
||||
body.unbind('click').bind('click', function(e){
|
||||
var tt = $(e.target);
|
||||
var tr = tt.closest('tr.datagrid-row');
|
||||
if (!tr.length){return}
|
||||
if (tt.hasClass('datagrid-row-expander')){
|
||||
var rowIndex = parseInt(tr.attr('datagrid-row-index'));
|
||||
if (tt.hasClass('datagrid-row-expand')){
|
||||
$(target).datagrid('expandRow', rowIndex);
|
||||
} else {
|
||||
$(target).datagrid('collapseRow', rowIndex);
|
||||
}
|
||||
$(target).datagrid('fixRowHeight');
|
||||
|
||||
} else {
|
||||
clickHandler(e);
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
},
|
||||
|
||||
onBeforeRender: function(target){
|
||||
var state = $.data(target, 'datagrid');
|
||||
var opts = state.options;
|
||||
var dc = state.dc;
|
||||
var view = this;
|
||||
|
||||
state.data.firstRows = state.data.rows;
|
||||
|
||||
opts.finder = $.extend({}, $.fn.datagrid.defaults.finder, {
|
||||
getRow: function(t, p){
|
||||
var index = (typeof p == 'object') ? p.attr('datagrid-row-index') : p;
|
||||
var row = $.data(t, 'datagrid').data.rows[index];
|
||||
if (!row){
|
||||
var v = $(t).datagrid('options').view;
|
||||
row = v.rows[index - v.index];
|
||||
}
|
||||
return row;
|
||||
}
|
||||
});
|
||||
|
||||
dc.body1.add(dc.body2).empty();
|
||||
this.rows = undefined; // the rows to be rendered
|
||||
this.r1 = this.r2 = []; // the first part and last part of rows
|
||||
|
||||
init();
|
||||
createHeaderExpander();
|
||||
|
||||
function init(){
|
||||
// erase the onLoadSuccess event, make sure it can't be triggered
|
||||
state.onLoadSuccess = opts.onLoadSuccess;
|
||||
opts.onLoadSuccess = function(){};
|
||||
setTimeout(function(){
|
||||
dc.body2.unbind('.datagrid').bind('scroll.datagrid', function(e){
|
||||
if (state.onLoadSuccess){
|
||||
opts.onLoadSuccess = state.onLoadSuccess; // restore the onLoadSuccess event
|
||||
state.onLoadSuccess = undefined;
|
||||
}
|
||||
if (view.scrollTimer){
|
||||
clearTimeout(view.scrollTimer);
|
||||
}
|
||||
view.scrollTimer = setTimeout(function(){
|
||||
scrolling.call(view);
|
||||
}, 50);
|
||||
});
|
||||
dc.body2.triggerHandler('scroll.datagrid');
|
||||
}, 0);
|
||||
}
|
||||
function scrolling(){
|
||||
if (dc.body2.is(':empty')){
|
||||
reload.call(this);
|
||||
} else {
|
||||
var firstTr = opts.finder.getTr(target, this.index, 'body', 2);
|
||||
var lastTr = opts.finder.getTr(target, 0, 'last', 2);
|
||||
var headerHeight = dc.view2.children('div.datagrid-header').outerHeight();
|
||||
var top = firstTr.position().top - headerHeight;
|
||||
var bottom = lastTr.position().top + lastTr.outerHeight() - headerHeight;
|
||||
|
||||
if (top > dc.body2.height() || bottom < 0){
|
||||
reload.call(this);
|
||||
} else if (top > 0){
|
||||
var page = Math.floor(this.index/opts.pageSize);
|
||||
this.getRows.call(this, target, page, function(rows){
|
||||
this.r2 = this.r1;
|
||||
this.r1 = rows;
|
||||
this.index = (page-1)*opts.pageSize;
|
||||
this.rows = this.r1.concat(this.r2);
|
||||
this.populate.call(this, target);
|
||||
});
|
||||
} else if (bottom < dc.body2.height()){
|
||||
var page = Math.floor(this.index/opts.pageSize)+2;
|
||||
if (this.r2.length){
|
||||
page++;
|
||||
}
|
||||
this.getRows.call(this, target, page, function(rows){
|
||||
if (!this.r2.length){
|
||||
this.r2 = rows;
|
||||
} else {
|
||||
this.r1 = this.r2;
|
||||
this.r2 = rows;
|
||||
this.index += opts.pageSize;
|
||||
}
|
||||
this.rows = this.r1.concat(this.r2);
|
||||
this.populate.call(this, target);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function reload(){
|
||||
var top = $(dc.body2).scrollTop();
|
||||
var index = Math.floor(top/25);
|
||||
var page = Math.floor(index/opts.pageSize) + 1;
|
||||
|
||||
this.getRows.call(this, target, page, function(rows){
|
||||
this.index = (page-1)*opts.pageSize;
|
||||
this.rows = rows;
|
||||
this.r1 = rows;
|
||||
this.r2 = [];
|
||||
this.populate.call(this, target);
|
||||
dc.body2.triggerHandler('scroll.datagrid');
|
||||
});
|
||||
}
|
||||
}
|
||||
function createHeaderExpander(){
|
||||
if (!opts.detailFormatter){return}
|
||||
|
||||
var t = $(target);
|
||||
var hasExpander = false;
|
||||
var fields = t.datagrid('getColumnFields',true).concat(t.datagrid('getColumnFields'));
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var col = t.datagrid('getColumnOption', fields[i]);
|
||||
if (col.expander){
|
||||
hasExpander = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hasExpander){
|
||||
if (opts.frozenColumns && opts.frozenColumns.length){
|
||||
opts.frozenColumns[0].splice(0,0,{field:'_expander',expander:true,width:24,resizable:false,fixed:true});
|
||||
} else {
|
||||
opts.frozenColumns = [[{field:'_expander',expander:true,width:24,resizable:false,fixed:true}]];
|
||||
}
|
||||
|
||||
var t = dc.view1.children('div.datagrid-header').find('table');
|
||||
var td = $('<td rowspan="'+opts.frozenColumns.length+'"><div class="datagrid-header-expander" style="width:24px;"></div></td>');
|
||||
if ($('tr',t).length == 0){
|
||||
td.wrap('<tr></tr>').parent().appendTo($('tbody',t));
|
||||
} else if (opts.rownumbers){
|
||||
td.insertAfter(t.find('td:has(div.datagrid-header-rownumber)'));
|
||||
} else {
|
||||
td.prependTo(t.find('tr:first'));
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(function(){
|
||||
view.bindEvents(target);
|
||||
},0);
|
||||
}
|
||||
},
|
||||
|
||||
onAfterRender: function(target){
|
||||
$.fn.datagrid.defaults.view.onAfterRender.call(this, target);
|
||||
var dc = $.data(target, 'datagrid').dc;
|
||||
var footer = dc.footer1.add(dc.footer2);
|
||||
footer.find('span.datagrid-row-expander').css('visibility', 'hidden');
|
||||
},
|
||||
|
||||
getRows: function(target, page, callback){
|
||||
var state = $.data(target, 'datagrid');
|
||||
var opts = state.options;
|
||||
var index = (page-1)*opts.pageSize;
|
||||
|
||||
if (opts.onBeforeFetch.call(target, page) == false){return}
|
||||
|
||||
var rows = state.data.firstRows.slice(index, index+opts.pageSize);
|
||||
if (rows.length){
|
||||
opts.onFetch.call(target, page, rows);
|
||||
callback.call(this, rows);
|
||||
} else {
|
||||
var param = $.extend({}, opts.queryParams, {
|
||||
page: page,
|
||||
rows: opts.pageSize
|
||||
});
|
||||
if (opts.sortName){
|
||||
$.extend(param, {
|
||||
sort: opts.sortName,
|
||||
order: opts.sortOrder
|
||||
});
|
||||
}
|
||||
if (opts.onBeforeLoad.call(target, param) == false) return;
|
||||
|
||||
$(target).datagrid('loading');
|
||||
var result = opts.loader.call(target, param, function(data){
|
||||
$(target).datagrid('loaded');
|
||||
var data = opts.loadFilter.call(target, data);
|
||||
opts.onFetch.call(target, page, data.rows);
|
||||
if (data.rows && data.rows.length){
|
||||
callback.call(opts.view, data.rows);
|
||||
} else {
|
||||
opts.onLoadSuccess.call(target, data);
|
||||
}
|
||||
}, function(){
|
||||
$(target).datagrid('loaded');
|
||||
opts.onLoadError.apply(target, arguments);
|
||||
});
|
||||
if (result == false){
|
||||
$(target).datagrid('loaded');
|
||||
if (!state.data.firstRows.length){
|
||||
opts.onFetch.call(target, page, state.data.firstRows);
|
||||
opts.onLoadSuccess.call(target, state.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
populate: function(target){
|
||||
var state = $.data(target, 'datagrid');
|
||||
var opts = state.options;
|
||||
var dc = state.dc;
|
||||
var rowHeight = 25;
|
||||
|
||||
if (this.rows.length){
|
||||
opts.view.render.call(opts.view, target, dc.body2, false);
|
||||
opts.view.render.call(opts.view, target, dc.body1, true);
|
||||
// dc.body1.add(dc.body2).children('table.datagrid-btable').css({
|
||||
// paddingTop: this.index*rowHeight,
|
||||
// paddingBottom: state.data.total*rowHeight - this.rows.length*rowHeight - this.index*rowHeight
|
||||
// });
|
||||
dc.body1.add(dc.body2).children('table.datagrid-btable').css({
|
||||
marginTop: this.index*rowHeight,
|
||||
marginBottom: state.data.total*rowHeight - this.rows.length*rowHeight - this.index*rowHeight
|
||||
});
|
||||
|
||||
var r = [];
|
||||
for(var i=0; i<this.index; i++){
|
||||
r.push({});
|
||||
}
|
||||
state.data.rows = r.concat(this.rows);
|
||||
|
||||
opts.onLoadSuccess.call(target, {
|
||||
total: state.data.total,
|
||||
rows: this.rows
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.extend($.fn.datagrid.methods, {
|
||||
fixDetailRowHeight: function(jq, index){
|
||||
return jq.each(function(){
|
||||
var opts = $.data(this, 'datagrid').options;
|
||||
var dc = $.data(this, 'datagrid').dc;
|
||||
var tr1 = opts.finder.getTr(this, index, 'body', 1).next();
|
||||
var tr2 = opts.finder.getTr(this, index, 'body', 2).next();
|
||||
// fix the detail row height
|
||||
if (tr2.is(':visible')){
|
||||
tr1.css('height', '');
|
||||
tr2.css('height', '');
|
||||
var height = Math.max(tr1.height(), tr2.height());
|
||||
tr1.css('height', height);
|
||||
tr2.css('height', height);
|
||||
}
|
||||
dc.body2.triggerHandler('scroll');
|
||||
});
|
||||
},
|
||||
getExpander: function(jq, index){ // get row expander object
|
||||
var opts = $.data(jq[0], 'datagrid').options;
|
||||
return opts.finder.getTr(jq[0], index).find('span.datagrid-row-expander');
|
||||
},
|
||||
// get row detail container
|
||||
getRowDetail: function(jq, index){
|
||||
var opts = $.data(jq[0], 'datagrid').options;
|
||||
var tr = opts.finder.getTr(jq[0], index, 'body', 2);
|
||||
return tr.next().find('div.datagrid-row-detail');
|
||||
},
|
||||
expandRow: function(jq, index){
|
||||
return jq.each(function(){
|
||||
var opts = $(this).datagrid('options');
|
||||
var dc = $.data(this, 'datagrid').dc;
|
||||
var expander = $(this).datagrid('getExpander', index);
|
||||
if (expander.hasClass('datagrid-row-expand')){
|
||||
expander.removeClass('datagrid-row-expand').addClass('datagrid-row-collapse');
|
||||
var tr1 = opts.finder.getTr(this, index, 'body', 1).next();
|
||||
var tr2 = opts.finder.getTr(this, index, 'body', 2).next();
|
||||
tr1.show();
|
||||
tr2.show();
|
||||
$(this).datagrid('fixDetailRowHeight', index);
|
||||
if (opts.onExpandRow){
|
||||
var row = $(this).datagrid('getRows')[index];
|
||||
opts.onExpandRow.call(this, index, row);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
collapseRow: function(jq, index){
|
||||
return jq.each(function(){
|
||||
var opts = $(this).datagrid('options');
|
||||
var dc = $.data(this, 'datagrid').dc;
|
||||
var expander = $(this).datagrid('getExpander', index);
|
||||
if (expander.hasClass('datagrid-row-collapse')){
|
||||
expander.removeClass('datagrid-row-collapse').addClass('datagrid-row-expand');
|
||||
var tr1 = opts.finder.getTr(this, index, 'body', 1).next();
|
||||
var tr2 = opts.finder.getTr(this, index, 'body', 2).next();
|
||||
tr1.hide();
|
||||
tr2.hide();
|
||||
dc.body2.triggerHandler('scroll');
|
||||
if (opts.onCollapseRow){
|
||||
var row = $(this).datagrid('getRows')[index];
|
||||
opts.onCollapseRow.call(this, index, row);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 522 B |
Binary file not shown.
|
After Width: | Height: | Size: 470 B |
Binary file not shown.
|
|
@ -0,0 +1,137 @@
|
|||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: "微软雅黑";
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #0b122e;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
font-family: "微软雅黑";
|
||||
}
|
||||
table
|
||||
{
|
||||
border-collapse:collapse;
|
||||
}
|
||||
img{vertical-align: middle;}
|
||||
ul { margin: 0; padding: 0;}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
}
|
||||
header{width:100%; height: 90px; background: url(../../images/bigdata/bg_top.png) center no-repeat ; text-align: center; font-size: 36px; color: #00f6ff; line-height: 90px; margin: 0 auto;}
|
||||
#content{width: 100%; height: calc(100vh - 90px); margin: 10px auto 0 auto;}
|
||||
#content .content_left{width: 385px; height: 100%; float: left;}
|
||||
.content_left .dtuplc{width: 355px; height: 180px; padding: 15px 15px 0 15px; background: url(../../images/bigdata/zuoyi.png) top no-repeat;}
|
||||
.dtu{width: 177px; height: 180px; float: left;}
|
||||
.plc{width: 177px; height: 180px; float: left;}
|
||||
.content_left .online{width: 385px; height: 330px; float: left; background: url(../../images/bigdata/zuo2.png) no-repeat;}
|
||||
.content_left .title{width: 385px; height: 70px; float: left; color: #00f6ff; font-size: 20px; line-height: 70px; background:url(../../images/bigdata/bottom_line.png) bottom no-repeat; text-align: center;}
|
||||
.content_left .title img{vertical-align: middle;}
|
||||
.online .online_con{width: 365px; height: 240px; padding: 10px; float: left;}
|
||||
.content_left .industry{width: 385px; height: 425px; float: left; background: url(../../images/bigdata/hangye.png) no-repeat; margin-top: 20px;}
|
||||
.industry .industry_con{width: 365px; height: 335px; padding: 10px; float: left;}
|
||||
#content .content_center{width: 100%; height: 100%; float: left; }
|
||||
.content_center .center_top{width: 100%; height: 650px; float: left; background: url(../../images/bigdata/center01-2.png) no-repeat;}
|
||||
.content_center .title{width: 1050px; height: 70px; float: left; color: #00f6ff; font-size: 20px; line-height: 70px; background:url(../../images/bigdata/bottom_line.png) bottom center no-repeat; text-align: center;}
|
||||
.content_center .title img{vertical-align: middle;}
|
||||
.content_center .center_top_con{ height: 550px; width: 1000px; padding: 10px; float: left;}
|
||||
.panel-table {text-align: left;color: #ccc;margin: 0 auto !important;width: 96%; margin-top: 20px !important;padding: 0.5rem 0 !important;font-size: 1.2rem;}
|
||||
.content_center .center_bot{width: 100%; height: calc(100vh - 750px); float: left; background: url(../../images/bigdata/center02-2.png) no-repeat; margin-top: 10px;}
|
||||
tr.aaa:hover{background: #1d3152; cursor: pointer;}
|
||||
.b1{width: 70px; height: 25px; background: #FF0000; cursor: pointer; color: #FFFFFF; border: none; border-radius:3px ;}
|
||||
.b2{width: 70px; height: 25px; background: #2897c4; cursor: pointer; color: #FFFFFF; border: none; border-radius:3px ;}
|
||||
.b3{width: 70px; height: 25px; background: #36791a; cursor: pointer; color: #FFFFFF; border: none; border-radius:3px ;}
|
||||
#content .content_right{width: 385px; height: 100%; float: right;}
|
||||
.content_right .report{width: 325px; height: 145px; line-height: 20px; float: left; background:url(../../images/bigdata/zuoyi.png) top no-repeat; padding: 35px 30px 0 30px;}
|
||||
.report1{width: 134px; height: 110px; background: url(../../images/bigdata/report01.png) center no-repeat; float: left; text-align: center; padding-top: 24px;}
|
||||
.report2{width: 134px; height: 110px; background: url(../../images/bigdata/report02.png) center no-repeat; float: right; text-align: center; padding-top: 24px;}
|
||||
.report p{ font-weight: bold; font-size: 18px; color: #ff0000;}
|
||||
.report small{font-size: 24px;}
|
||||
.content_right .news_report{width: 385px; height: 330px; margin-top: 20px; float: left; background: url(../../images/bigdata/bg_report.png) no-repeat;}
|
||||
.content_right .title{width: 385px; height: 70px; float: left; color: #00f6ff; font-size: 20px; line-height: 70px; background:url(../../images/bigdata/bottom_line.png) bottom no-repeat; text-align: center;}
|
||||
.content_right .title img{vertical-align: middle;}
|
||||
.news_list{width: 350px; height: 240px; padding: 10px; font-size: 16px; float: left; overflow: hidden;}
|
||||
.news_list ul{list-style: none;}
|
||||
.news_list ul li{width:100%; height: 38px; float: left; line-height: 38px; padding-left: 15px;}
|
||||
.li01{background: url(../../images/bigdata/new_list01.png) left center no-repeat;}
|
||||
.li02{background: url(../../images/bigdata/new_list02.png) left center no-repeat; color: #FF0000;}
|
||||
.content_right .data_box{width: 385px; height: 420px; margin-top: 20px; float: left; background: url(../../images/bigdata/bg_data.png) no-repeat;}
|
||||
.data_con{width: 365px; height: 330px; float: left; padding: 10px;}
|
||||
/*弹窗*/
|
||||
.pop,.pop2,.pop3 {display: none; width: 800px; min-height: 570px; max-height: 750px; height:570px; position: absolute; left: 0; right: 0; margin:auto; padding: 25px; z-index: 130; border-radius: 3px; background-color: #23509a; border: #fff solid 1px; box-shadow: 0 5px 18px rgba(100, 0, 0, .5); }
|
||||
.pop-top{ text-align: center; font-size: 20px; font-weight:bold; color: #ff6f05; height:40px; width:100%; background: url(../../images/bigdata/line.png) no-repeat bottom center;}
|
||||
.pop-top span{ float: right; cursor: pointer; color: #fff; font-weight: bold; display:black}
|
||||
.pop-foot{ height:50px; line-height:50px; width:100%; border-top: 1px #5682dc solid; text-align: right; }
|
||||
.pop-cancel{ padding:8px 15px; margin:15px 5px; border: none; border-radius: 5px; background-color: #ff6f05; color: #fff; cursor:pointer; }
|
||||
.pop-content{ height: 480px;}
|
||||
.bgPop,.bgPop2,.bgPop3{ display: none; position: absolute; z-index: 129; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,.2);}
|
||||
|
||||
.tablebox {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background-color: rgba(6,26,103,1);
|
||||
}
|
||||
|
||||
.tbl-header {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.tbl-body {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.tablebox table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tablebox table th,
|
||||
.tablebox table td {
|
||||
font-size: 22px;
|
||||
color: #7ca6f4;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tablebox table tr th {
|
||||
background-color: #1f1f9c;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tablebox table tr td {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.tbl-body tr:nth-child(even) td,.tbl-body1 tr:nth-child(even) td {
|
||||
background-color: rgba(31, 31, 156, .5);
|
||||
}
|
||||
|
||||
.tablebox table tr td span,
|
||||
.tablebox table tr td span {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: "微软雅黑";
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #0b122e;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
font-family: "微软雅黑";
|
||||
}
|
||||
table
|
||||
{
|
||||
border-collapse:collapse;
|
||||
}
|
||||
img{vertical-align: middle;}
|
||||
ul { margin: 0; padding: 0;}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
}
|
||||
header{width:100%; height: 90px; background: url(../../images/bigdata/bg_top.png) center no-repeat ; text-align: center; font-size: 36px; color: #00f6ff; line-height: 90px; margin: 0 auto;}
|
||||
.center_top{width: 98%; height: 650px; margin:0 auto;margin-top:10px; }
|
||||
.center_bot{width: 98%; height: 290px;background: url(../../images/bigdata/center02-2.png) no-repeat; margin:0 auto;margin-top:10px;margin-bottom: 20px; }
|
||||
.tablebox {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background-color: rgba(6,26,103,1);
|
||||
}
|
||||
|
||||
.tbl-header {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.tbl-body {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.tablebox table {
|
||||
width: 100%;
|
||||
table-layout:fixed
|
||||
}
|
||||
|
||||
.tablebox table th,
|
||||
.tablebox table td {
|
||||
font-size: 22px;
|
||||
color: #7ca6f4;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tablebox table tr th {
|
||||
background-color: #1f1f9c;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tablebox table tr td {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.tbl-body tr:nth-child(even) td,.tbl-body1 tr:nth-child(even) td {
|
||||
background-color: rgba(31, 31, 156, .5);
|
||||
}
|
||||
|
||||
.tablebox table tr td span,
|
||||
.tablebox table tr td span {
|
||||
font-size: 22px;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
|
|
@ -577,7 +577,6 @@ function update() {
|
|||
}
|
||||
})
|
||||
$.get('api/mapshow?a=operation', function (res) {
|
||||
console.log(res)
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
var data = res[i]
|
||||
data.id = data.zyqy__id
|
||||
|
|
@ -585,6 +584,7 @@ function update() {
|
|||
data.polygon = data.zyqy__polygon
|
||||
data.name = data.zyqy__name
|
||||
data.type = 'zy'
|
||||
data.list = data.zylist
|
||||
setPoint(data)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,550 +0,0 @@
|
|||
function photoCompress(file, w, objDiv) {
|
||||
var ready = new FileReader();
|
||||
/*开始读取指定的Blob对象或File对象中的内容. 当读取操作完成时,readyState属性的值会成为DONE,如果设置了onloadend事件处理程序,则调用之.同时,result属性中将包含一个data: URL格式的字符串以表示所读取文件的内容.*/
|
||||
ready.readAsDataURL(file);
|
||||
ready.onload = function () {
|
||||
var re = this.result;
|
||||
canvasDataURL(re, w, objDiv)
|
||||
}
|
||||
}
|
||||
function canvasDataURL(path, obj, callback) {
|
||||
var img = new Image();
|
||||
img.src = path;
|
||||
img.onload = function () {
|
||||
var that = this;
|
||||
// 默认按比例压缩
|
||||
var w = that.width,
|
||||
h = that.height,
|
||||
scale = w / h;
|
||||
w = obj.width || w;
|
||||
h = obj.height || (w / scale);
|
||||
var quality = 0.7; // 默认图片质量为0.7
|
||||
//生成canvas
|
||||
var canvas = document.createElement('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
// 创建属性节点
|
||||
var anw = document.createAttribute("width");
|
||||
anw.nodeValue = w;
|
||||
var anh = document.createAttribute("height");
|
||||
anh.nodeValue = h;
|
||||
canvas.setAttributeNode(anw);
|
||||
canvas.setAttributeNode(anh);
|
||||
ctx.drawImage(that, 0, 0, w, h);
|
||||
// 图像质量
|
||||
if (obj.quality && obj.quality <= 1 && obj.quality > 0) {
|
||||
quality = obj.quality;
|
||||
}
|
||||
// quality值越小,所绘制出的图像越模糊
|
||||
var base64 = canvas.toDataURL('image/jpeg', quality);
|
||||
// 回调函数返回base64的值
|
||||
callback(base64);
|
||||
}
|
||||
}
|
||||
function convertBase64UrlToBlob(urlData) {
|
||||
var arr = urlData.split(','), mime = arr[0].match(/:(.*?);/)[1],
|
||||
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
|
||||
while (n--) {
|
||||
u8arr[n] = bstr.charCodeAt(n);
|
||||
}
|
||||
return new Blob([u8arr], { type: mime });
|
||||
}
|
||||
|
||||
//取消上传
|
||||
function cancleUploadFile() {
|
||||
|
||||
xhr.abort();
|
||||
}
|
||||
|
||||
//验证表单不为空
|
||||
function myCheck(checkarray) {
|
||||
for (var i = 0; i < checkarray.length; i++) {
|
||||
if (checkarray[i] == "") {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//获取当前href的参数==当前dialog的地址
|
||||
function GetQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
var href = $('#dd').dialog('options')['href']
|
||||
var r = href.split('?')[1].match(reg);
|
||||
if (r != null) return unescape(r[2]); return null;
|
||||
}
|
||||
|
||||
function GetQueryString2(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
var href = $('#userdd').dialog('options')['href']
|
||||
var r = href.split('?')[1].match(reg);
|
||||
if (r != null) return unescape(r[2]); return null;
|
||||
}
|
||||
|
||||
//放大和缩小图片
|
||||
function bigger(o) {
|
||||
var h = $(document).height()
|
||||
var mh = h * 0.8
|
||||
$this = $(o);
|
||||
var img_content = $this.attr("src");
|
||||
top.$("body").append(
|
||||
"<div class='bg-img'>"
|
||||
+ "<div class='tra-img' >"
|
||||
+ "<img src='" + img_content + "' height='" + mh + "'>"
|
||||
+ "</div></div>"
|
||||
);
|
||||
top.$(".bg-img").animate({
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
bottom: "0",
|
||||
left: "0",
|
||||
}, "normal")
|
||||
$('.bg-img').on("click", function () {
|
||||
$(this).remove();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//加载menutree列表
|
||||
function convertmenu(rows) {
|
||||
function exists(rows, parentid) {
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
if (rows[i].menuid == parentid) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var nodes = [];
|
||||
// get the top level nodes
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = rows[i];
|
||||
if (!exists(rows, row.parentid)) {
|
||||
nodes.push({
|
||||
id: row.menuid,
|
||||
text: row.menuname,
|
||||
checked: row.checked,
|
||||
iconCls: row.icon,
|
||||
attributes: row.url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var toDo = [];
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
toDo.push(nodes[i]);
|
||||
}
|
||||
while (toDo.length) {
|
||||
var node = toDo.shift(); // the parent node
|
||||
// get the children nodes
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = rows[i];
|
||||
if (row.parentid == node.id) {
|
||||
var child = { id: row.menuid, text: row.menuname, attributes: row.url, iconCls: row.icon, checked: row.checked };
|
||||
if (node.children) {
|
||||
node.children.push(child);
|
||||
} else {
|
||||
node.children = [child];
|
||||
}
|
||||
toDo.push(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
|
||||
//datagrid加载tree列表
|
||||
function convert(rows, x) {
|
||||
var x = x || 'open';
|
||||
function exists(rows, parentId) {
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
if (rows[i].id == parentId) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var nodes = [];
|
||||
// get the top level nodes
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = rows[i];
|
||||
if (!exists(rows, row.parentId)) {
|
||||
nodes.push({
|
||||
id: row.id,
|
||||
text: row.name,
|
||||
state: x,
|
||||
pic: row.pic
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var toDo = [];
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
toDo.push(nodes[i]);
|
||||
}
|
||||
while (toDo.length) {
|
||||
var node = toDo.shift(); // the parent node
|
||||
// get the children nodes
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = rows[i];
|
||||
if (row.parentId == node.id) {
|
||||
var child = { id: row.id, text: row.name, pic: row.pic };
|
||||
if (node.children) {
|
||||
node.children.push(child);
|
||||
} else {
|
||||
node.children = [child];
|
||||
}
|
||||
toDo.push(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
//关闭dialog-dd
|
||||
function closeForm() {
|
||||
$("#dd").dialog("close");
|
||||
}
|
||||
//关闭dialog-userdd
|
||||
function closed2Form() {
|
||||
$('#userdd').dialog("close");
|
||||
}
|
||||
//关闭dialog-userdd
|
||||
function close3Form() {
|
||||
$('#questiondd').dialog("close");
|
||||
}
|
||||
//新建iframe
|
||||
function createFrame(url) {
|
||||
var s = '<iframe id="ifr" scrolling="auto" frameborder="0" src="' + url + '" style="width:100%;height:100%;"></iframe>';
|
||||
return s;
|
||||
}
|
||||
|
||||
//移除上传的文件或图片或列表
|
||||
function removep(o) {
|
||||
$(o).closest('li').remove();
|
||||
}
|
||||
|
||||
//判断是否为数字
|
||||
function isNumber(val) {
|
||||
|
||||
var regPos = /^\d+(\.\d+)?$/; //非负浮点数
|
||||
//var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
|
||||
if (regPos.test(val)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
//判断是否为整数
|
||||
function isIntNum(val) {
|
||||
var regPos = /^\d+$/; // 非负整数
|
||||
//var regNeg = /^\-[1-9][0-9]*$/; // 负整数
|
||||
if (regPos.test(val)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// function opendialog(o){
|
||||
// _clickTab = $(o).attr('url');
|
||||
// _value = $(o).text();
|
||||
// if (window.screen) {
|
||||
// var myh = screen.availHeight * 0.7;
|
||||
// $("#dd").dialog({
|
||||
// maximizable: true,
|
||||
// title: _value,
|
||||
// width: 600,
|
||||
// height: myh,
|
||||
// closed: false,
|
||||
// cache: false,
|
||||
// href: _clickTab,
|
||||
// modal: true,
|
||||
// border:false,
|
||||
// });
|
||||
// $("#dd").window('center');
|
||||
// }
|
||||
// }
|
||||
function changehref(o) {
|
||||
|
||||
_clickTab = $(o).attr('url');// 找到链接a中的targer的值
|
||||
|
||||
_value = $(o).attr('value');
|
||||
|
||||
$("#main").attr('value', _value);
|
||||
$("#main").panel({ href: _clickTab, title: $(o).attr('title') });
|
||||
// $.ajax({
|
||||
// type: "get",
|
||||
// url: _clickTab,
|
||||
// async: false,
|
||||
// success: function (data) {
|
||||
// $("#main").attr('value',_value);
|
||||
// $("#main").html(data);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
//获取dialog-dd传值
|
||||
function getQueryParam(name) {
|
||||
var obj = $('#dd').dialog('options');
|
||||
var queryParams = obj["queryParams"];
|
||||
|
||||
return queryParams[name];
|
||||
}
|
||||
|
||||
//部分页面操作函数
|
||||
//新增隐患
|
||||
function edityh(troubleid) {
|
||||
if (window.screen) {
|
||||
var myh = screen.availHeight * 0.7;
|
||||
var url = 'addtrouble?a=edityh&troubleid=' + troubleid
|
||||
$("#dd").dialog({
|
||||
maximizable: true,
|
||||
title: '新增隐患',
|
||||
width: 600,
|
||||
height: myh,
|
||||
closed: false,
|
||||
cache: false,
|
||||
href: url,
|
||||
modal: true,
|
||||
border: false,
|
||||
});
|
||||
$("#dd").window('center');
|
||||
}
|
||||
}
|
||||
|
||||
function choseusers(x) {
|
||||
var x = x || 'participant';
|
||||
var myh = screen.availHeight * 0.7;
|
||||
$('#userdd').dialog({
|
||||
maximizable: true,
|
||||
title: '选择人员',
|
||||
width: 900,
|
||||
height: myh,
|
||||
closed: false,
|
||||
cache: false,
|
||||
href: 'getusersf?a=' + x,
|
||||
modal: true,
|
||||
border: false,
|
||||
});
|
||||
$('#userdd').window('center');
|
||||
}
|
||||
//导出excel
|
||||
function JSONToCSVConvertor(JSONData, ReportTitle, ShowLabel) {
|
||||
//If JSONData is not an object then JSON.parse will parse the JSON string in an Object
|
||||
var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData)
|
||||
: JSONData;
|
||||
var CSV = '';
|
||||
//Set Report title in first row or line
|
||||
CSV += ReportTitle + '\r\n\n';
|
||||
//This condition will generate the Label/Header
|
||||
if (ShowLabel) {
|
||||
var row = "";
|
||||
//This loop will extract the label from 1st index of on array
|
||||
for (var index in arrData[0]) {
|
||||
//Now convert each value to string and comma-seprated
|
||||
row += index + ',';
|
||||
}
|
||||
row = row.slice(0, -1);
|
||||
//append Label row with line break
|
||||
CSV += row + '\r\n';
|
||||
}
|
||||
//1st loop is to extract each row
|
||||
for (var i = 0; i < arrData.length; i++) {
|
||||
var row = "";
|
||||
//2nd loop will extract each column and convert it in string comma-seprated
|
||||
for (var index in arrData[i]) {
|
||||
row += '"' + arrData[i][index] + '",';
|
||||
}
|
||||
row.slice(0, row.length - 1);
|
||||
//add a line break after each row
|
||||
CSV += row + '\r\n';
|
||||
}
|
||||
if (CSV == '') {
|
||||
alert("Invalid data");
|
||||
return;
|
||||
}
|
||||
//Generate a file name
|
||||
var fileName = "MyReport_";
|
||||
//this will remove the blank-spaces from the title and replace it with an underscore
|
||||
fileName += ReportTitle.replace(/ /g, "_");
|
||||
//Initialize file format you want csv or xls
|
||||
var uri = 'data:text/csv;charset=utf-8,' + encodeURI(CSV);
|
||||
// Now the little tricky part.
|
||||
// you can use either>> window.open(uri);
|
||||
// but this will not work in some browsers
|
||||
// or you will not get the correct file extension
|
||||
//this trick will generate a temp <a /> tag
|
||||
var link = document.createElement("a");
|
||||
link.href = uri;
|
||||
//set the visibility hidden so it will not effect on your web-layout
|
||||
link.style = "visibility:hidden";
|
||||
link.download = fileName + ".csv";
|
||||
//this part will append the anchor tag and remove it after automatic click
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
}
|
||||
//loading效果
|
||||
function loading(msg) {
|
||||
var msg = msg || '请稍等。。';
|
||||
$('body').loading({
|
||||
loadingWidth: 220,
|
||||
title: msg,
|
||||
titleColor: '#fff',
|
||||
discColor: '#EDEEE9',
|
||||
discription: '',
|
||||
direction: 'column',
|
||||
type: 'origin',
|
||||
originBg: '#ECCFBB',
|
||||
originDivWidth: 40,
|
||||
originDivHeight: 40,
|
||||
originWidth: 6,
|
||||
originHeight: 6,
|
||||
smallLoading: false,
|
||||
loadingBg: 'rgba(56,43,14,0.8)',
|
||||
loadingMaskBg: 'rgba(66,66,66,0.2)'
|
||||
});
|
||||
}
|
||||
//js判断为空
|
||||
|
||||
|
||||
|
||||
function isEmpty(obj) {
|
||||
// 检验 undefined 和 null
|
||||
if (!obj && obj !== 0 && obj !== '') { return true; }
|
||||
if (Array.prototype.isPrototypeOf(obj) && obj.length === 0) { return true; }
|
||||
if (Object.prototype.isPrototypeOf(obj) && Object.keys(obj).length === 0) { return true; }
|
||||
return false;
|
||||
}
|
||||
function openlayer(title, href, w) {
|
||||
var w = w || 600;
|
||||
if (window.screen) {
|
||||
var myh = screen.availHeight * 0.7;
|
||||
$.get(href, function (res) {
|
||||
layer.open({
|
||||
type: 1,
|
||||
content: res,
|
||||
title: title,
|
||||
area: [w, myh]
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
//打开dd-dialog
|
||||
function opendg(title, href, w) {
|
||||
var w = w || 600;
|
||||
if (window.screen) {
|
||||
var myh = screen.availHeight * 0.7;
|
||||
$("#dd").dialog({
|
||||
title: title,
|
||||
width: w,
|
||||
height: myh,
|
||||
closed: false,
|
||||
cache: false,
|
||||
href: href,
|
||||
modal: true,
|
||||
border: false,
|
||||
}).dialog('center');
|
||||
}
|
||||
}
|
||||
|
||||
function opendg2(title, href) {
|
||||
if (window.screen) {
|
||||
var myh = screen.availHeight * 0.8;
|
||||
var myW = screen.availWidth * 0.7;
|
||||
$("#questiondd").dialog({
|
||||
title: title,
|
||||
width: myW,
|
||||
height: myh,
|
||||
closed: false,
|
||||
cache: false,
|
||||
href: href,
|
||||
modal: true,
|
||||
border: false,
|
||||
}).dialog('center');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 使用indexOf判断元素是否存在于数组中
|
||||
* @param {Object} arr 数组
|
||||
* @param {Object} value 元素值
|
||||
*/
|
||||
function isInArray(arr, value) {
|
||||
if (arr.indexOf && typeof (arr.indexOf) == 'function') {
|
||||
var index = arr.indexOf(value);
|
||||
if (index >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function parseParams(data) {
|
||||
try {
|
||||
var tempArr = [];
|
||||
for (var i in data) {
|
||||
var key = encodeURIComponent(i);
|
||||
var value = encodeURIComponent(data[i]);
|
||||
tempArr.push(key + '=' + value);
|
||||
}
|
||||
var urlParamsStr = tempArr.join('&');
|
||||
return urlParamsStr;
|
||||
} catch (err) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
//排序
|
||||
function jsonSort(jsonObj) {
|
||||
let arr = [];
|
||||
for (var key in jsonObj) {
|
||||
arr.push(key)
|
||||
}
|
||||
arr.sort();
|
||||
let str = '';
|
||||
for (var i in arr) {
|
||||
str += arr[i] + "=" + jsonObj[arr[i]] + "&"
|
||||
}
|
||||
return str.substr(0, str.length - 1)
|
||||
}
|
||||
//map定时显示,每分钟请求一次
|
||||
function update() {
|
||||
if ($('#mapshowinput').length) {
|
||||
source.clear()
|
||||
$.get('../api/mapshow?a=risk', function (res) {
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
setPolygon(res[i])
|
||||
}
|
||||
})
|
||||
$.get('../api/mapshow?a=trouble', function (res) {
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
var data = res[i]
|
||||
data.id = data.yhqy__id
|
||||
data.num = data.num
|
||||
data.polygon = data.yhqy__polygon
|
||||
data.name = data.yhqy__name
|
||||
data.type = 'yh'
|
||||
setPoint(data)
|
||||
}
|
||||
})
|
||||
$.get('../api/mapshow?a=miss', function (res) {
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
var data = res[i]
|
||||
data.id = data.missqy__id
|
||||
data.num = data.num
|
||||
data.polygon = data.missqy__polygon
|
||||
data.name = data.missqy__name
|
||||
data.type = 'ws'
|
||||
setPoint(data)
|
||||
}
|
||||
})
|
||||
$.get('../api/mapshow?a=operation', function (res) {
|
||||
console.log(res)
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
var data = res[i]
|
||||
data.id = data.zyqy__id
|
||||
data.num = data.num
|
||||
data.polygon = data.zyqy__polygon
|
||||
data.name = data.zyqy__name
|
||||
data.type = 'zy'
|
||||
setPoint(data)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
var t1 = window.setInterval(update, 1000 * 60)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/* Disable minification (remove `.min` from URL path) for more info */
|
||||
|
||||
(function(undefined) {}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv='refresh' content='1800'>
|
||||
<meta http-equiv='refresh' content='1600'>
|
||||
<title>数据大屏</title>
|
||||
<link rel="stylesheet" href="/static/safesite/mystatic/css/bigdata/style.css" />
|
||||
|
||||
|
|
@ -341,7 +341,7 @@
|
|||
//设置弹出框的容器
|
||||
element: container,
|
||||
//是否自动平移,即假如标记在屏幕边缘,弹出时自动平移地图使弹出框完全可见
|
||||
autoPan: true
|
||||
autoPan: false
|
||||
});
|
||||
$.get('../api/map?a=default', function (res) {
|
||||
$('#map').empty()
|
||||
|
|
@ -391,7 +391,7 @@
|
|||
if (feature) {
|
||||
var data = feature.getProperties()
|
||||
//设置弹出框内容,可以HTML自定义
|
||||
var html = "<p style='color:blue'>" + data.name + "</p>"
|
||||
var html = "<p style='color:green;font-weight:bold' >" + data.name + "</p>"
|
||||
if (data.type == 'yh') {
|
||||
html = html + "<p style='color:blue'>事故隐患数量:" + data.num.toString() + "</p>"
|
||||
}
|
||||
|
|
@ -400,6 +400,9 @@
|
|||
}
|
||||
else if (data.type == 'zy') {
|
||||
html = html + "<p style='color:blue'>危险作业数量:" + data.num.toString() + "</p>"
|
||||
for(let i=0;i<data.list.length;i++){
|
||||
html = html + "<p style='color:red'>"+(i+1).toString()+":"+ data.list[i].zylx__dickeyname + "--" +data.list[i].zybm__partname + "--" + data.list[i].zyfzr__name +"--作业人数"+data.list[i].num.toString()+ "</p>"
|
||||
}
|
||||
}
|
||||
else if (data.type == 'fx') {
|
||||
html = html + "<p style='color:blue'>风险等级:" + data.risklevel + "</p>"
|
||||
|
|
@ -471,14 +474,14 @@
|
|||
var data = feature.getProperties()
|
||||
if (data.type == 'yh') {
|
||||
src = '/static/safesite/mystatic/images/mapyh.png'
|
||||
anchor = [0.5, 50]
|
||||
anchor = [0.9, 50]
|
||||
} else if (data.type == 'ws') {
|
||||
src = '/static/safesite/mystatic/images/mapws.png'
|
||||
anchor = [0.1, 50]
|
||||
}
|
||||
else if (data.type == 'zy') {
|
||||
src = '/static/safesite/mystatic/images/mapzy.png'
|
||||
anchor = [0.9, 50]
|
||||
anchor = [0.5, 50]
|
||||
}
|
||||
else {
|
||||
src = '/static/safesite/mystatic/images/icon1.png'
|
||||
|
|
@ -518,7 +521,8 @@
|
|||
id: i.id,
|
||||
name: i.name,
|
||||
type: i.type,
|
||||
num: i.num
|
||||
num: i.num,
|
||||
list:i.list
|
||||
});
|
||||
pointFeature.setStyle(createPointStyle(pointFeature));
|
||||
source.addFeature(pointFeature)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,458 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv='refresh' content='1600'>
|
||||
<title>数据大屏</title>
|
||||
<link rel="stylesheet" href="/static/safesite/mystatic/css/bigdata/style2.css" />
|
||||
<link rel="icon" href="/media/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/safesite/mystatic/openlayer/ol.css">
|
||||
<script type="text/javascript" src="/static/safesite/easyui/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/openlayer/ol.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/openlayer/polyfill.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
企业安全数据显示大屏
|
||||
</header>
|
||||
<div class="center_top">
|
||||
<div id="map" class="map" style="width:100%;height:100%;outline: #4A74A8 solid 0.15em;">
|
||||
</div>
|
||||
<input type='hidden' id='mapshowinput'></input>
|
||||
<div id="popup" class="ol-popup">
|
||||
<a href="#" id="popup-closer" class="ol-popup-closer"></a>
|
||||
<div id="popup-content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center_bot">
|
||||
<div height="40" style="background-color: red;font-weight:bold;text-align: center;">危险作业列表
|
||||
</div>
|
||||
<div class="tablebox">
|
||||
<div class="tbl-header">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>作业编号</th>
|
||||
<th>作业类型</th>
|
||||
<th>作业区域</th>
|
||||
<th>作业部门</th>
|
||||
<th>作业负责人</th>
|
||||
<th>作业人数</th>
|
||||
<th>开始时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="opacity:0;"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tbl-body">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>作业编号</th>
|
||||
<th>作业类型</th>
|
||||
<th>作业区域</th>
|
||||
<th>作业部门</th>
|
||||
<th>作业负责人</th>
|
||||
<th>作业人数</th>
|
||||
<th>开始时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- center -->
|
||||
<style>
|
||||
.ol-popup {
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
|
||||
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #cccccc;
|
||||
bottom: 12px;
|
||||
left: -50px;
|
||||
min-width: 280px;
|
||||
}
|
||||
|
||||
.ol-popup:after,
|
||||
.ol-popup:before {
|
||||
top: 100%;
|
||||
border: solid transparent;
|
||||
content: " ";
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.ol-popup:after {
|
||||
border-top-color: white;
|
||||
border-width: 10px;
|
||||
left: 48px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
.ol-popup:before {
|
||||
border-top-color: #cccccc;
|
||||
border-width: 11px;
|
||||
left: 48px;
|
||||
margin-left: -11px;
|
||||
}
|
||||
|
||||
.ol-popup-closer {
|
||||
text-decoration: none;
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 8px;
|
||||
}
|
||||
|
||||
.ol-popup-closer:after {
|
||||
content: "✖";
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var map, source, vector;// global so we can remove it later
|
||||
var popuplist = [];
|
||||
var MyMarhq = ''; //列表滚动定时
|
||||
var Mylist = ''; //作业列表定时获取
|
||||
var Updatepoint = ''; //图标定时获取
|
||||
var Updatepopup = '';//popup定时获取
|
||||
var container = document.getElementById("popup");
|
||||
var content = document.getElementById("popup-content");
|
||||
var popupCloser = document.getElementById("popup-closer");
|
||||
var overlay = new ol.Overlay({
|
||||
//设置弹出框的容器
|
||||
element: container,
|
||||
//是否自动平移,即假如标记在屏幕边缘,弹出时自动平移地图使弹出框完全可见
|
||||
autoPan: false
|
||||
});
|
||||
$.get('/api/map?a=default', function (res) {
|
||||
$('#map').empty()
|
||||
map = initMap(res.pic)
|
||||
updatepo()
|
||||
})
|
||||
|
||||
function initMap(url) {
|
||||
var extent = [0, 0, 1920, 1080];
|
||||
var projection = new ol.proj.Projection({
|
||||
code: 'xkcd-image',
|
||||
units: 'pixels',
|
||||
extent: extent
|
||||
});
|
||||
map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.Image({
|
||||
source: new ol.source.ImageStatic({
|
||||
url: 'http://' + window.location.host + '/' + url,
|
||||
projection: projection,
|
||||
imageExtent: extent
|
||||
})
|
||||
})
|
||||
],
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
projection: projection,
|
||||
center: ol.extent.getCenter(extent),
|
||||
zoom: 2.3,
|
||||
maxZoom: 8
|
||||
}),
|
||||
controls: ol.control.defaults().extend([new ol.control.FullScreen()])
|
||||
});
|
||||
source = new ol.source.Vector({ wrapX: false });
|
||||
vector = new ol.layer.Vector({
|
||||
source: source
|
||||
});
|
||||
map.addLayer(vector);//加载图层
|
||||
map.on('pointermove', function (e) {
|
||||
|
||||
//在点击时获取像素区域
|
||||
var pixel = map.getEventPixel(e.originalEvent);
|
||||
var feature = map.forEachFeatureAtPixel(pixel, function (feature, layer) {
|
||||
//在视口中遍历所有具有像素颜色的图层,如果图层存在,则返回
|
||||
return feature;
|
||||
});
|
||||
if (feature) {
|
||||
var data = feature.getProperties()
|
||||
//设置弹出框内容,可以HTML自定义
|
||||
var html = "<p style='color:green;font-weight:bold' >" + data.name + "</p>"
|
||||
if (data.type == 'yh') {
|
||||
html = html + "<p style='color:blue'>事故隐患数量:" + data.num.toString() + "</p>"
|
||||
}
|
||||
else if (data.type == 'ws') {
|
||||
html = html + "<p style='color:blue'>未遂事件数量:" + data.num.toString() + "</p>"
|
||||
}
|
||||
else if (data.type == 'zy') {
|
||||
html = html + "<p style='color:blue'>危险作业数量:" + data.num.toString() + "</p>"
|
||||
for (let i = 0; i < data.list.length; i++) {
|
||||
html = html + "<p style='color:red'>" + (i + 1).toString() + ":" + data.list[i].zylx__dickeyname + "--" + data.list[i].zybm__partname + "--" + data.list[i].zyfzr__name + "--作业人数" + data.list[i].num.toString() + "</p>"
|
||||
}
|
||||
}
|
||||
else if (data.type == 'fx') {
|
||||
html = html + "<p style='color:blue'>风险等级:" + data.risklevel + "</p>"
|
||||
}
|
||||
content.innerHTML = html;
|
||||
//设置overlay的显示位置
|
||||
overlay.setPosition(e.coordinate);
|
||||
//显示overlay
|
||||
map.addOverlay(overlay);
|
||||
}
|
||||
else {
|
||||
closepopup()
|
||||
}
|
||||
});
|
||||
map.on('click', function (e) {
|
||||
var coordinate = e.coordinate;
|
||||
var feature = map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
|
||||
return feature;
|
||||
});
|
||||
if (feature) {
|
||||
var data = feature.getProperties()
|
||||
opendetail(data.id)
|
||||
}
|
||||
});
|
||||
popupCloser.onclick = function () {
|
||||
closepopup()
|
||||
return false;
|
||||
};
|
||||
return map
|
||||
}
|
||||
function closepopup() {
|
||||
overlay.setPosition(undefined);
|
||||
popupCloser.blur();
|
||||
}
|
||||
var createPolygonStyle = function (feature) {
|
||||
var data = feature.getProperties()
|
||||
var color
|
||||
if (data.risklevel == "重大风险") {
|
||||
color = 'rgb(255,0,0,0.6)'
|
||||
} else if (data.risklevel == "一般风险") {
|
||||
color = 'rgb(255,255,0,0.6)'
|
||||
} else if (data.risklevel == "较大风险") {
|
||||
color = 'rgb(255,165,0,0.6)'
|
||||
} else {
|
||||
color = 'rgb(0,0,255,0.6)'
|
||||
}
|
||||
return new ol.style.Style({
|
||||
fill: new ol.style.Fill({
|
||||
color: color
|
||||
}),
|
||||
|
||||
text: new ol.style.Text({
|
||||
textAlign: 'center', //位置
|
||||
textBaseline: 'middle', //基准线
|
||||
font: 'normal 14px 微软雅黑', //文字样式
|
||||
text: data.name, //文本内容
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgb(255,255,255)'
|
||||
}),
|
||||
// stroke: new ol.style.Stroke({
|
||||
// width: 0.5,
|
||||
// color: [255, 0, 255, 0.5]
|
||||
// }),
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
var createPointStyle = function (feature) {
|
||||
var data = feature.getProperties()
|
||||
if (data.type == 'yh') {
|
||||
src = '/static/safesite/mystatic/images/mapyh.png'
|
||||
anchor = [0.9, 50]
|
||||
} else if (data.type == 'ws') {
|
||||
src = '/static/safesite/mystatic/images/mapws.png'
|
||||
anchor = [0.1, 50]
|
||||
}
|
||||
else if (data.type == 'zy') {
|
||||
src = '/static/safesite/mystatic/images/mapzy.png'
|
||||
anchor = [0.5, 50]
|
||||
}
|
||||
else {
|
||||
src = '/static/safesite/mystatic/images/icon1.png'
|
||||
}
|
||||
return new ol.style.Style({
|
||||
/**{olx.style.IconOptions}类型*/
|
||||
image: new ol.style.Icon(
|
||||
({
|
||||
anchor: anchor,
|
||||
anchorOrigin: 'top-right',
|
||||
anchorXUnits: 'fraction',
|
||||
anchorYUnits: 'pixels',
|
||||
offsetOrigin: 'top-right',
|
||||
// offset:[0,10],
|
||||
//图标缩放比例
|
||||
// scale:0.5,
|
||||
//透明度
|
||||
opacity: 0.75,
|
||||
//图标的url
|
||||
src: src
|
||||
})
|
||||
),
|
||||
text: new ol.style.Text({
|
||||
textAlign: 'center', //位置
|
||||
textBaseline: 'middle', //基准线
|
||||
font: 'normal 14px 微软雅黑', //文字样式
|
||||
//text: feature.get('name'), //文本内容
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
function setPoint(i) {
|
||||
var extent = ol.extent.boundingExtent(i.polygon[0]);
|
||||
var center = ol.extent.getCenter(extent);
|
||||
var pointFeature = new ol.Feature({
|
||||
geometry: new ol.geom.Point(center),
|
||||
id: i.id,
|
||||
name: i.name,
|
||||
type: i.type,
|
||||
num: i.num,
|
||||
list: i.list
|
||||
});
|
||||
pointFeature.setStyle(createPointStyle(pointFeature));
|
||||
source.addFeature(pointFeature)
|
||||
}
|
||||
function setPolygon(i) {
|
||||
var polygonFeature = new ol.Feature({
|
||||
geometry: new ol.geom.Polygon(i.polygon),
|
||||
id: i.id,
|
||||
name: i.name,
|
||||
type: 'fx',
|
||||
risklevel: i.risklevel
|
||||
});
|
||||
polygonFeature.setStyle(createPolygonStyle(polygonFeature));
|
||||
source.addFeature(polygonFeature)
|
||||
}
|
||||
|
||||
|
||||
|
||||
clearInterval(Mylist, Updatepoint);
|
||||
$('.tbl-body tbody').empty();
|
||||
$('.tbl-header tbody').empty();
|
||||
var str = '';
|
||||
var Items = []
|
||||
function getOperlist() {
|
||||
$.get('/api/operation?a=liston', function (res) {
|
||||
clearInterval(MyMarhq);
|
||||
Items = res.rows
|
||||
str = ''
|
||||
$.each(Items, function (i, item) {
|
||||
str = str + '<tr>' +
|
||||
'<td>' + item.zynum + '</td>' +
|
||||
'<td>' + item.zylx__dickeyname + '</td>' +
|
||||
'<td>' + item.zyqy__name + '</td>' +
|
||||
'<td>' + item.zybm__partname + '</td>' +
|
||||
'<td>' + item.zyfzr__name + '</td>' +
|
||||
'<td>' + item.num + '</td>' +
|
||||
'<td>' + item.kssj + '</td>' +
|
||||
'</tr>'
|
||||
});
|
||||
$('.tbl-body tbody').html(str);
|
||||
$('.tbl-header tbody').html(str);
|
||||
if (Items.length > 9) {
|
||||
$('.tbl-body tbody').html($('.tbl-body tbody').html() + $('.tbl-body tbody').html());
|
||||
$('.tbl-body').css('top', '0');
|
||||
var tblTop = 0;
|
||||
var speedhq = 80; // 数值越大越慢
|
||||
var outerHeight = $('.tbl-body tbody').find("tr").outerHeight();
|
||||
function Marqueehq() {
|
||||
if (tblTop <= -outerHeight * Items.length) {
|
||||
tblTop = 0;
|
||||
} else {
|
||||
tblTop -= 1;
|
||||
}
|
||||
$('.tbl-body').css('top', tblTop + 'px');
|
||||
}
|
||||
MyMarhq = setInterval(Marqueehq, speedhq);
|
||||
// 鼠标移上去取消事件
|
||||
$(".tbl-header tbody").hover(function () {
|
||||
clearInterval(MyMarhq);
|
||||
}, function () {
|
||||
clearInterval(MyMarhq);
|
||||
MyMarhq = setInterval(Marqueehq, speedhq);
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
getOperlist();
|
||||
Mylist = setInterval("getOperlist()", 1000 * 60 * 10);
|
||||
//map定时显示,每5分钟请求一次
|
||||
function updatepo() {
|
||||
if ($('#mapshowinput').length) {
|
||||
source.clear()
|
||||
$.get('/api/mapshow?a=risk', function (res) {
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
setPolygon(res[i])
|
||||
}
|
||||
})
|
||||
$.get('/api/mapshow?a=trouble', function (res) {
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
var data = res[i]
|
||||
data.id = data.yhqy__id
|
||||
data.num = data.num
|
||||
data.polygon = data.yhqy__polygon
|
||||
data.name = data.yhqy__name
|
||||
data.type = 'yh'
|
||||
setPoint(data)
|
||||
}
|
||||
})
|
||||
$.get('/api/mapshow?a=miss', function (res) {
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
var data = res[i]
|
||||
data.id = data.missqy__id
|
||||
data.num = data.num
|
||||
data.polygon = data.missqy__polygon
|
||||
data.name = data.missqy__name
|
||||
data.type = 'ws'
|
||||
setPoint(data)
|
||||
}
|
||||
})
|
||||
$.get('/api/mapshow?a=operation', function (res) {
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
var data = res[i]
|
||||
data.id = data.zyqy__id
|
||||
data.num = data.num
|
||||
data.polygon = data.zyqy__polygon
|
||||
data.name = data.zyqy__name
|
||||
data.type = 'zy'
|
||||
data.list = data.zylist
|
||||
popuplist.push(data)
|
||||
setPoint(data)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Updatepoint = setInterval(updatepo, 1000 * 60 * 5)
|
||||
function showpopup(){
|
||||
var len = popuplist.length
|
||||
if(len != 0){
|
||||
|
||||
var index = Math.floor(Math.random()*len)
|
||||
let po = popuplist[index]
|
||||
var extent = ol.extent.boundingExtent(po.polygon[0]);
|
||||
var center = ol.extent.getCenter(extent);//中心点
|
||||
var html = "<p style='color:green;font-weight:bold' >" + po.name + "</p>"
|
||||
html = html + "<p style='color:blue'>危险作业数量:" + po.num.toString() + "</p>"
|
||||
for (let i = 0; i < po.list.length; i++) {
|
||||
html = html + "<p style='color:red'>" + (i + 1).toString() + ":" + po.list[i].zylx__dickeyname + "--" + po.list[i].zybm__partname + "--" + po.list[i].zyfzr__name + "--作业人数" + po.list[i].num.toString() + "</p>"
|
||||
}
|
||||
content.innerHTML = html;
|
||||
overlay.setPosition(undefined);
|
||||
popupCloser.blur();
|
||||
//设置overlay的显示位置
|
||||
overlay.setPosition(center);
|
||||
//显示overlay
|
||||
map.addOverlay(overlay);
|
||||
}
|
||||
}
|
||||
Updatepopup = setInterval(showpopup, 1000 * 5)
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,16 +1,7 @@
|
|||
<table id="yltable" style="width:100%;height:100%;"></table>
|
||||
<div id="yltablebar" style="padding: 4px;height: 40px;">
|
||||
<div style="width: 500px;float: right;padding: 5px;">
|
||||
<div id="yltablebar" style="padding: 4px;">
|
||||
|
||||
<a id="adddrill" onclick="javascript:opendg('新建演练','abdrill?a=adddrill')">新增</a>
|
||||
<a id="accessdrill" onclick="accessdrill()">评估</a>
|
||||
<!-- <a href="#" class="easyui-linkbutton" iconCls="icon-edit" onclick="edittrain()" plain="true">编辑</a> -->
|
||||
<a id="deldrill" onclick="deldrill()">删除</a>
|
||||
<a id="yldetail" onclick="yldetail()">查看详情</a>
|
||||
<a id="exportylword" onclick="exportylword()">导出Word</a>
|
||||
<a id="exportylexcel" onclick="exportylexcel()">导出Excel</a>
|
||||
</div>
|
||||
<div style="padding: 5px;float: left;width: 400px;">
|
||||
<div>
|
||||
<label>快捷查询</label>
|
||||
<select id='kjcxyl' style='width:150px'>
|
||||
<option value="">请选择</option>
|
||||
|
|
@ -20,6 +11,26 @@
|
|||
<a onclick="javascript:$('#sdg_yl').dialog('open')" class="easyui-linkbutton"
|
||||
data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
||||
</div>
|
||||
<div>
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_drill_add' %}
|
||||
<a id="adddrill" onclick="javascript:opendg('新建演练','abdrill?a=adddrill')">新增</a>
|
||||
{% endif %}
|
||||
<a id="accessdrill" onclick="accessdrill()">评估</a>
|
||||
<!-- <a href="#" class="easyui-linkbutton" iconCls="icon-edit" onclick="edittrain()" plain="true">编辑</a> -->
|
||||
{% if request|has_permission:'b_drill_del' %}
|
||||
<a id="deldrill" onclick="deldrill()">删除</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_drill_detail' %}
|
||||
<a id="yldetail" onclick="yldetail()">查看详情</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_drill_exportdoc' %}
|
||||
<a id="exportylword" onclick="exportylword()">导出Word</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_drill_exportxls' %}
|
||||
<a id="exportylexcel" onclick="exportylexcel()">导出Excel</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="sdg_yl" class="easyui-dialog" title="筛选条件" style="width:400px;height:300px;"
|
||||
data-options="iconCls:'fa-search',resizable:true,modal:true,closed:true,border:false">
|
||||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
|
|
|||
|
|
@ -1,16 +1,7 @@
|
|||
|
||||
<div id="edubar" style="padding: 4px;height: 40px;background-color:#FCFCFC">
|
||||
<div style="width: 500px;float: right;padding: 5px;">
|
||||
<a id="addedu" class="easyui-linkbutton" onclick="javascript:opendg('新增视频','edu/add')" data-options="iconCls: 'fa-plus',plain:true">上传视频</a>
|
||||
<a id="addedu" class="easyui-linkbutton" onclick="javascript:opendg('新增文件','edu/addwj')" data-options="iconCls: 'fa-plus',plain:true">上传文件</a>
|
||||
<a id="deledu" class="easyui-linkbutton" onclick="deledu()" data-options="iconCls: 'fa-trash',plain:true">删除文件</a>
|
||||
<div id="edubar" style="padding: 4px;">
|
||||
|
||||
<a id="tzdetail" onclick="tzdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">点击学习</a>
|
||||
<a id="edulook" class="easyui-linkbutton" onclick="jydetail()" data-options="iconCls: 'fa-plus',plain:true">观看历史</a>
|
||||
|
||||
|
||||
</div>
|
||||
<div style="padding: 5px;float: left;width: 400px;">
|
||||
<div >
|
||||
<label>查询</label>
|
||||
<select id='kjcxws' style='width:150px;height:30px'>
|
||||
<option value="all">请选择</option>
|
||||
|
|
@ -20,6 +11,26 @@
|
|||
<option value="4">pdf文档</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div >
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_edu_addvideo' %}
|
||||
<a id="addedu" class="easyui-linkbutton" onclick="javascript:opendg('新增视频','edu/add')" data-options="iconCls: 'fa-plus',plain:true">上传视频</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_edu_addfile' %}
|
||||
<a id="addedu" class="easyui-linkbutton" onclick="javascript:opendg('新增文件','edu/addwj')" data-options="iconCls: 'fa-plus',plain:true">上传文件</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_edu_del' %}
|
||||
<a id="deledu" class="easyui-linkbutton" onclick="deledu()" data-options="iconCls: 'fa-trash',plain:true">删除文件</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_edu_study' %}
|
||||
<a id="tzdetail" onclick="tzdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">点击学习</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_edu_detail' %}
|
||||
<a id="edulook" class="easyui-linkbutton" onclick="jydetail()" data-options="iconCls: 'fa-plus',plain:true">观看历史</a>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<table id="edutab" style="width:100%;height:100%;text-align: center;"></table>
|
||||
|
|
|
|||
|
|
@ -6,14 +6,22 @@
|
|||
|
||||
<div id="sbbar" style="padding:5px;height:auto">
|
||||
<div>
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_equipment_add' %}
|
||||
<a onclick="addsb()" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-plus',plain:true">新增设备</a>
|
||||
<a id="b_equipment_add"></a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_equipment_import' %}
|
||||
<a onclick="javascript:$('#drsbdg').dialog('open').window('center');" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-upload',plain:true">导入设备</a>
|
||||
{% endif %}
|
||||
<!-- <a onclick="exportsbexcel" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-download',plain:true">导出</a> -->
|
||||
{% if request|has_permission:'b_equipment_del' %}
|
||||
<a id="delsb" onclick="delsb()" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<form id='searchsbff'>
|
||||
|
|
@ -29,7 +37,12 @@
|
|||
<label>设备名称</label><input name='name' id='sname'
|
||||
class="easyui-textbox" >
|
||||
<a id="sbsearch" onclick="sbsearch()" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">查询</a>
|
||||
{% if request|has_permission:'b_equipment_exportxls' %}
|
||||
<a id="exportsbexcel" onclick="exportsbexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_equipment_change' %}
|
||||
<a id="b_equipment_change"></a>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
|
@ -76,7 +89,9 @@
|
|||
style="height:100px;width:90%" data-options="multiline:true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a id="savesb" onclick="savesb()" class="easyui-linkbutton" data-options="iconCls: 'fa-save'">保存</a></td>
|
||||
<td>
|
||||
<a id="savesb" onclick="savesb()" class="easyui-linkbutton" data-options="iconCls: 'fa-save'">保存</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
@ -99,6 +114,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<script>
|
||||
if($('#b_equipment_add').length){
|
||||
$('#savesb').show()
|
||||
}else{
|
||||
$('#savesb').hide()
|
||||
}
|
||||
$('#zrbm').combotree({
|
||||
url: 'parthandle?a=tree', loadFilter: function (rows) { return convert(rows); }, onSelect: function (node) {
|
||||
$('#zrr').combobox({ url: 'getuser?partid=' + node.id + '&a=combobox', })
|
||||
|
|
@ -182,6 +202,11 @@
|
|||
|
||||
]],
|
||||
onSelect: function (index, data) {
|
||||
if($('#b_equipment_change').length){
|
||||
$('#savesb').show()
|
||||
}else{
|
||||
$('#savesb').hide()
|
||||
}
|
||||
$('#qrimg').empty()
|
||||
$.get('api/equipment?a=detail&id=' + data.id, function (res) {
|
||||
$('#sbid').val(res.id)
|
||||
|
|
@ -271,6 +296,7 @@
|
|||
$('#sbff').form('clear')
|
||||
$('#sbtable').datagrid('clearSelections');
|
||||
$('#qrimg').attr('src','')
|
||||
|
||||
}
|
||||
function savesb(){
|
||||
var data = $('#sbff').serializeJSON();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,22 @@
|
|||
<table id="kstable" style="width:auto;height:100%;"></table>
|
||||
<div id="kstablebar" style="padding:6px;height:auto">
|
||||
<div style="margin-bottom:2px;margin-top:2px">
|
||||
<div id="kstablebar" style="padding:4px;height:auto">
|
||||
<div>
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_examtest_add1' %}
|
||||
<a class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain:true" onclick="addks()">试卷库考试</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_examtest_add2' %}
|
||||
<a class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain:true" onclick="addks2()">自动抽题考试</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_examtest_close' %}
|
||||
<a class="easyui-linkbutton" data-options="iconCls: 'fa-times',plain:true" onclick="closeks()">关闭考试</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_examtest_del' %}
|
||||
<a id="delks" class="easyui-linkbutton" onclick="delks()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_examtest_detail' %}
|
||||
<a id="ksdetail" onclick="ksdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
{{ user.username }} 欢迎您!
|
||||
</span>
|
||||
</div>
|
||||
<div style="text-align: center;position: fixed;width: 500px;height: 70px;top: 40px;right: 60px;">
|
||||
<div style="text-align: center;position: fixed;width: auto;height: 70px;top: 40px;right: 60px;">
|
||||
<a style="color: #eee5e7;cursor: pointer;" class="easyui-linkbutton" iconCls="fa-sign-out" plain=true
|
||||
onclick="logout()">安全退出</a>
|
||||
<a style="color: #eee5e7;cursor: pointer;" id="bindwx" class="easyui-linkbutton" iconCls="fa-weixin"
|
||||
|
|
@ -99,6 +99,8 @@
|
|||
style="display:none;color: #eee5e7;cursor: pointer;" onclick="setup()">预警设置</a>
|
||||
<a style="color: #eee5e7;cursor: pointer;" href="datashow" target="_blank" class="easyui-linkbutton"
|
||||
iconCls="fa-desktop" plain=true>数据大屏</a>
|
||||
<a style="color: #eee5e7;cursor: pointer;" href="html/datashow2" target="_blank" class="easyui-linkbutton"
|
||||
iconCls="fa-desktop" plain=true>数据大屏2</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
<table id="xjtable" style="width:auto;height:100%;"></table>
|
||||
<a id="downa" href="" target="_blank" style="display:none"></a>
|
||||
<div id="xjtablebar" style="padding: 4px;height: 40px;">
|
||||
<div style="width: 200px;float: right;padding: 5px;">
|
||||
<!-- <a id="xjdetail" onclick="xjdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a> -->
|
||||
<a id="exportxjexcel" onclick="exportxjexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
<a id="delxj" onclick="delxj()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
</div>
|
||||
<div style="padding: 5px;float: left;width: 400px;">
|
||||
<div id="xjtablebar" style="padding: 4px">
|
||||
|
||||
<div >
|
||||
<label>快捷查询</label>
|
||||
<select id='kjcxxj' style='width:150px'>
|
||||
<option value="">请选择</option>
|
||||
|
|
@ -15,6 +11,16 @@
|
|||
</select>
|
||||
<a onclick="javascript:$('#sdg_xj').dialog('open')" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
||||
</div>
|
||||
<div >
|
||||
<!-- <a id="xjdetail" onclick="xjdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a> -->
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_inspect_exportxls' %}
|
||||
<a id="exportxjexcel" onclick="exportxjexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_inspect_del' %}
|
||||
<a id="delxj" onclick="delxj()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="sdg_xj" class="easyui-dialog" title="筛选条件" style="width:400px;height:300px;"
|
||||
data-options="iconCls:'fa-search',resizable:true,modal:true,closed:true,border:false">
|
||||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
|
|
|||
|
|
@ -1,13 +1,7 @@
|
|||
<table id="wstable" style="width:auto;height:100%;"></table>
|
||||
<a id="downa" href="" target="_blank" style="display:none"></a>
|
||||
<div id="wstablebar" style="padding: 4px;height: 40px;">
|
||||
<div style="width: 360px;float: right;padding: 5px;">
|
||||
<a id="addmiss" class="easyui-linkbutton" onclick="addmiss()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
<a id="delmiss" class="easyui-linkbutton" onclick="delmiss()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
<a id="wsdetail" onclick="wsdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||
<a id="exportwsexcel" onclick="exportwsexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
</div>
|
||||
<div style="padding: 5px;float: left;width: 400px;">
|
||||
<div id="wstablebar" style="padding: 4px;">
|
||||
<div >
|
||||
<label>快捷查询</label>
|
||||
<select id='kjcxws' style='width:150px'>
|
||||
<option value="">请选择</option>
|
||||
|
|
@ -16,6 +10,22 @@
|
|||
</select>
|
||||
<a onclick="javascript:$('#sdg_ws').dialog('open')" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
||||
</div>
|
||||
<div >
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_miss_add' %}
|
||||
<a id="addmiss" class="easyui-linkbutton" onclick="addmiss()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_miss_del' %}
|
||||
<a id="delmiss" class="easyui-linkbutton" onclick="delmiss()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_miss_detail' %}
|
||||
<a id="wsdetail" onclick="wsdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_miss_exportxls' %}
|
||||
<a id="exportwsexcel" onclick="exportwsexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="sdg_ws" class="easyui-dialog" title="筛选条件" style="width:400px;height:300px;"
|
||||
data-options="iconCls:'fa-search',resizable:true,modal:true,closed:true,border:false">
|
||||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
<table id="tztable" style="width:auto;height:100%;"></table>
|
||||
<div id="tztablebar" style="padding: 4px;height: 40px;">
|
||||
<div style="width: 300px;float: right;padding: 5px;">
|
||||
<a id="addtz" class="easyui-linkbutton" onclick="addtz()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
<a id="edittz" class="easyui-linkbutton" onclick="edittz()" data-options="iconCls: 'fa-pencil',plain:true">编辑</a>
|
||||
<a id="deltz" class="easyui-linkbutton" onclick="deltz()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
<a id="tzdetail" onclick="tzdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查阅</a>
|
||||
</div>
|
||||
<div style="padding: 5px;float: left;width: 400px;">
|
||||
<div id="tztablebar" style="padding: 4px">
|
||||
|
||||
<div >
|
||||
<label>快捷查询</label>
|
||||
<select id='kjcxtz' style='width:150px'>
|
||||
<option value="">请选择</option>
|
||||
|
|
@ -16,6 +11,21 @@
|
|||
</select>
|
||||
<a onclick="javascript:$('#sdg_tz').dialog('open')" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
||||
</div>
|
||||
<div >
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_notice_add' %}
|
||||
<a id="addtz" class="easyui-linkbutton" onclick="addtz()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_notice_change' %}
|
||||
<a id="edittz" class="easyui-linkbutton" onclick="edittz()" data-options="iconCls: 'fa-pencil',plain:true">编辑</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_notice_del' %}
|
||||
<a id="deltz" class="easyui-linkbutton" onclick="deltz()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_notice_detail' %}
|
||||
<a id="tzdetail" onclick="tzdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查阅</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="sdg_tz" class="easyui-dialog" title="筛选条件" style="width:400px;height:300px;"
|
||||
data-options="iconCls:'fa-search',resizable:true,modal:true,closed:true,border:false">
|
||||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
|
|
|||
|
|
@ -1,17 +1,7 @@
|
|||
<table id="gctable" style="width:auto;height:100%;"></table>
|
||||
<a id="downa" href="" target="_blank" style="display:none"></a>
|
||||
<div id="gctablebar" style="padding: 4px;height: 40px;">
|
||||
<div style="width: 360px;float: right;padding: 5px;">
|
||||
<a id="addobserve" class="easyui-linkbutton" onclick="javascript:opendg('新建观察','observehtml/add')"
|
||||
data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
<a id="delobserve" class="easyui-linkbutton" onclick="delobserve()"
|
||||
data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
|
||||
<a id="gcdetail" onclick="gcdetail()" class="easyui-linkbutton"
|
||||
data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||
<a id="exportgcexcel" onclick="exportgcexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
</div>
|
||||
<div style="padding: 5px;float: left;width: 400px;">
|
||||
<div id="gctablebar" style="padding:4px;">
|
||||
<div >
|
||||
<label>快捷查询</label>
|
||||
<select id='kjcxgc' style='width:150px'>
|
||||
<option value="">请选择</option>
|
||||
|
|
@ -22,6 +12,25 @@
|
|||
data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
||||
<!-- <a id="exportgcword" onclick="exportpxword()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Word</a> -->
|
||||
|
||||
</div>
|
||||
<div >
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_observe_add' %}
|
||||
<a id="addobserve" class="easyui-linkbutton" onclick="javascript:opendg('新建观察','observehtml/add')"
|
||||
data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_observe_del' %}
|
||||
<a id="delobserve" class="easyui-linkbutton" onclick="delobserve()"
|
||||
data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_observe_detail' %}
|
||||
<a id="gcdetail" onclick="gcdetail()" class="easyui-linkbutton"
|
||||
data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_observe_exportxls' %}
|
||||
<a id="exportgcexcel" onclick="exportgcexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div id="sdg_gc" class="easyui-dialog" title="筛选条件" style="width:400px;height:300px;"
|
||||
data-options="iconCls:'fa-search',resizable:true,modal:true,closed:true,border:false">
|
||||
|
|
|
|||
|
|
@ -1,13 +1,24 @@
|
|||
<table id="zytable" style="width:auto;height:100%;"></table>
|
||||
<div id="zytablebar" style="padding:6px;height:auto">
|
||||
<div style="margin-bottom:2px;margin-top:2px">
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_operation_add' %}
|
||||
<a class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain:true" onclick="javascript:opendg('申请作业','html/operation/add')">申请作业(无审批)</a>
|
||||
{% endif %}
|
||||
<a id="gbzy" class="easyui-linkbutton" onclick="gbzy()" data-options="iconCls: 'fa-close',plain:true">关闭作业</a>
|
||||
<a onclick="javascript:$('#sdg_zy').dialog('open')" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
||||
{% if request|has_permission:'b_operation_del' %}
|
||||
<a id="delzy" class="easyui-linkbutton" onclick="delzy()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_operation_detail' %}
|
||||
<a id="zydetail" onclick="zydetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_operation_exportdoc' %}
|
||||
<a id="exportzyword" onclick="exportzyword()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Word</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_operation_exportxls' %}
|
||||
<a id="exportzyexcel" onclick="exportzyexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<!-- <div id="mm1" style="width:150px;">
|
||||
|
|
|
|||
|
|
@ -2,14 +2,23 @@
|
|||
<div data-options="region:'west',split:true,border:false" style="width:50%;height:100%;" title="风险点">
|
||||
<div id="riskactbar" style="padding:5px;height:auto">
|
||||
<div>
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_riskact_import' %}
|
||||
<a onclick="javascript:$('#drriskdg').dialog('open').window('center');" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-upload',plain:true">导入风险</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_riskact_add' %}
|
||||
<a onclick="opendg('新增风险','html/riskact/add')" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-plus',plain:true">新增</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_riskact_change' %}
|
||||
<a onclick="editriskact()" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-pencil',plain:true">编辑</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_riskact_del' %}
|
||||
<a onclick="delriskact()" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<form id="searchriskactff">
|
||||
|
|
@ -39,12 +48,18 @@
|
|||
<div data-options="region:'center',title:'风险',split:true,border:false" style="width:50%;height:100%;">
|
||||
|
||||
<div id="riskbar" style="padding:5px;height:auto">
|
||||
{% if request|has_permission:'b_risk_add' %}
|
||||
<a onclick="addrisk()" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-plus',plain:true">新增</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_risk_change' %}
|
||||
<a onclick="editrisk()" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-pencil',plain:true">编辑</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_risk_del' %}
|
||||
<a onclick="delrisk()" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<table id="risktable" style="height:100%;"></table>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,7 @@
|
|||
<table id="jytable" style="width:auto;height:100%;"></table>
|
||||
<div id="jytablebar" style="padding: 4px;height: 40px;">
|
||||
<div style="width: 500px;float: right;padding: 5px;">
|
||||
<a id="addjy" class="easyui-linkbutton" onclick="addjy()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
<a id="updatejy" onclick="updatejy()" class="easyui-linkbutton" data-options="iconCls: 'fa-flash',plain:true">处理</a>
|
||||
<a id="deljy" class="easyui-linkbutton" onclick="deljy()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
<a id="jydetail" onclick="jydetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||
<div id="jytablebar" style="padding: 4px;">
|
||||
|
||||
<a id="exportjyexcel" onclick="exportjyexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
</div>
|
||||
<div style="padding: 5px;float: left;width: 400px;">
|
||||
<div>
|
||||
<label>快捷查询</label>
|
||||
<select id='kjcxjy' style='width:150px'>
|
||||
<option value="">请选择</option>
|
||||
|
|
@ -17,6 +10,22 @@
|
|||
</select>
|
||||
<a onclick="javascript:$('#sdg_jy').dialog('open')" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
||||
</div>
|
||||
<div>
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_suggest_add' %}
|
||||
<a id="addjy" class="easyui-linkbutton" onclick="addjy()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
{% endif %}
|
||||
<a id="updatejy" onclick="updatejy()" class="easyui-linkbutton" data-options="iconCls: 'fa-flash',plain:true">处理</a>
|
||||
{% if request|has_permission:'b_suggest_del' %}
|
||||
<a id="deljy" class="easyui-linkbutton" onclick="deljy()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_suggest_detail' %}
|
||||
<a id="jydetail" onclick="jydetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_suggest_exportxls' %}
|
||||
<a id="exportjyexcel" onclick="exportjyexcel()" class="easyui-linkbutton" data-options="iconCls: 'fa-download',plain:true">导出Excel</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="sdg_jy" class="easyui-dialog" title="筛选条件" style="width:400px;height:300px;"
|
||||
data-options="iconCls:'fa-search',resizable:true,modal:true,closed:true,border:false">
|
||||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
<div id="riskactbar" style="padding:5px;height:auto">
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_riskact_task' %}
|
||||
<a onclick="taskplan()" class="easyui-linkbutton" data-options="iconCls:'fa-tasks',plain:true">按岗位批量制定排查任务</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<table id="taskplantable" style="height:100%;"></table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,8 @@
|
|||
<table id="pxtable" style="width:auto;height:100%;"></table>
|
||||
<a id="downa" href="" target="_blank" style="display:none"></a>
|
||||
<div id="pxtablebar" style="padding: 4px;height: 40px;">
|
||||
<div style="width: 500px;float: right;padding: 5px;">
|
||||
<div id="pxtablebar" style="padding: 4px">
|
||||
|
||||
<a id="addtrain" onclick="javascript:opendg('新建培训','abtrain?a=addtrain')">新增</a>
|
||||
<a id="accesstrain" onclick="accesstrain()">评估</a>
|
||||
<a id="deltrain" onclick="deltrain()">删除</a>
|
||||
|
||||
<a id="pxdetail" onclick="pxdetail()">查看详情</a>
|
||||
<a id="exportpxword" onclick="exportpxword()">导出Word</a>
|
||||
<a id="exportpxexcel" onclick="exportpxexcel()">导出Excel</a>
|
||||
</div>
|
||||
<div style="padding: 5px;float: left;width: 400px;">
|
||||
<div>
|
||||
<label>快捷查询</label>
|
||||
<select id='kjcxpx' style='width:150px'>
|
||||
<option value="">请选择</option>
|
||||
|
|
@ -21,6 +12,25 @@
|
|||
<a onclick="javascript:$('#sdg_px').dialog('open')" class="easyui-linkbutton"
|
||||
data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
||||
</div>
|
||||
<div>
|
||||
{% load myfilter %}
|
||||
{% if request|has_permission:'b_train_add' %}
|
||||
<a id="addtrain" onclick="javascript:opendg('新建培训','abtrain?a=addtrain')">新增</a>
|
||||
{% endif %}
|
||||
<a id="accesstrain" onclick="accesstrain()">评估</a>
|
||||
{% if request|has_permission:'b_train_del' %}
|
||||
<a id="deltrain" onclick="deltrain()">删除</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_train_detail' %}
|
||||
<a id="pxdetail" onclick="pxdetail()">查看详情</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_train_exportdoc' %}
|
||||
<a id="exportpxword" onclick="exportpxword()">导出Word</a>
|
||||
{% endif %}
|
||||
{% if request|has_permission:'b_train_exportxls' %}
|
||||
<a id="exportpxexcel" onclick="exportpxexcel()">导出Excel</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="sdg_px" class="easyui-dialog" title="筛选条件" style="width:400px;height:300px;"
|
||||
data-options="iconCls:'fa-search',resizable:true,modal:true,closed:true,border:false">
|
||||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ urlpatterns = [
|
|||
path('html/operproce',views.operproce),#操作规程
|
||||
path('html/addoperproce',views.addoperproce),
|
||||
path('html/operproce/detail/<int:id>/',views.operprocedetail),#责任制度观看详情
|
||||
path('html/datashow2/',views.datashow2),
|
||||
#html页面
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -490,6 +490,12 @@ def addoperproce(req):#责任制
|
|||
def operprocedetail(req, id):
|
||||
return render(req, 'operprocedetail.html', {'id': id})
|
||||
|
||||
def datashow2(req):
|
||||
return render(req,'datashow2.html')
|
||||
|
||||
|
||||
|
||||
|
||||
def mainhtml(req):
|
||||
# 计算一些数据
|
||||
userid = req.session['userid']
|
||||
|
|
@ -519,10 +525,13 @@ def checkpw(data): #密码复杂度校验
|
|||
|
||||
def init_permission(user,req):
|
||||
permission_dict = {}
|
||||
bgroups = user.userg.all() #所属用户组
|
||||
x = []
|
||||
for i in bgroups:
|
||||
x.extend(i.menulist)
|
||||
if user.issuper==1:
|
||||
x = Group.objects.filter(grouptype=0,usecomp=user.usecomp)[0].menulist
|
||||
else:
|
||||
bgroups = user.userg.all() #所属用户组
|
||||
for i in bgroups:
|
||||
x.extend(i.menulist)
|
||||
menus = Menu.objects.exclude(menuid__in=[11, 9]).filter(menuid__in=list(set(x)), deletemark=1)
|
||||
for item in menus:
|
||||
permission_dict[item.menucode] = ({
|
||||
|
|
@ -531,7 +540,6 @@ def init_permission(user,req):
|
|||
'id': item.menuid,
|
||||
'name': item.menuname,
|
||||
})
|
||||
print(permission_dict)
|
||||
req.session['permissions'] = permission_dict
|
||||
|
||||
|
||||
|
|
@ -846,7 +854,7 @@ def apirights(req):
|
|||
for i in data:
|
||||
rlist.append(i['id'])
|
||||
Group.objects.filter(groupid=groupid).update(
|
||||
menulist=rlist)
|
||||
menulist=list(set(rlist)))
|
||||
return JsonResponse({"code": 1})
|
||||
elif a == 'have':
|
||||
userid = req.session['userid']
|
||||
|
|
@ -4720,7 +4728,7 @@ def apitool(req):
|
|||
return JsonResponse({"code": 1})
|
||||
elif a == 'correct_menuhas':
|
||||
buttons = Menu.objects.filter(type=2)
|
||||
for group in Group.objects.filter(grouptype=0):
|
||||
for group in Group.objects.all():
|
||||
menulist = group.menulist
|
||||
for button in buttons:
|
||||
if button.parentid.menuid in menulist: #如果菜单在所拥有权限内
|
||||
|
|
@ -5077,6 +5085,14 @@ def apioperation(req):
|
|||
a = a[startnum:endnum].values('zyid', 'zylx__dickeyname', 'zynum',
|
||||
'zyfzr__name', 'zynr', 'zyzt', 'submittime', 'todouser__name','zyqy__name')
|
||||
return HttpResponse(transjson(total, a), content_type="application/json")
|
||||
elif a == 'liston':
|
||||
userid = req.session['userid']
|
||||
usecomp = User.objects.get(userid=userid).usecomp
|
||||
objs = Operation.objects.filter(
|
||||
usecomp=usecomp, deletemark=1).exclude(zyzt__zyzt='已关闭')
|
||||
total = objs.count()
|
||||
objs = objs.values('zyid', 'zylx__dickeyname', 'zynum','zyfzr__name', 'zynr','zyqy__name','zyqy__id','zybm__partname','kssj').annotate(num=Count('zyry'))
|
||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||
elif a == 'exportexcel':
|
||||
userid = req.session['userid']
|
||||
usecomp = User.objects.get(userid=userid).usecomp
|
||||
|
|
@ -6192,9 +6208,12 @@ def apimapshow(req):
|
|||
elif a == 'operation':
|
||||
objs = Operation.objects.filter(usecomp__partid=companyid, deletemark=1).exclude(
|
||||
zyqy=None).exclude(zyzt__zyzt='已关闭')
|
||||
objs = objs.values('zyqy__id', 'zyqy__name',
|
||||
objs1 = objs.values('zyqy__id', 'zyqy__name',
|
||||
'zyqy__polygon').annotate(num=Count('zyqy'))
|
||||
return HttpResponse(json.dumps(list(objs)), content_type="application/json")
|
||||
for i in objs1:
|
||||
i['zylist'] = list(objs.filter(zyqy__id=i['zyqy__id']).values('zyid','zylx__dickeyname','zyfzr__name',
|
||||
'zybm__partname').annotate(num=Count('zyry')))
|
||||
return HttpResponse(json.dumps(list(objs1)), content_type="application/json")
|
||||
elif a == 'all':
|
||||
date1 = datetime.now() - timedelta(days=30)
|
||||
yh = Trouble.objects.filter(usecomp__partid=companyid, deletemark=1).exclude(yhzt=6).exclude(yhqy=None).exclude(
|
||||
|
|
|
|||
Loading…
Reference in New Issue