This commit is contained in:
commit
063d4b2ce9
|
@ -206,6 +206,18 @@
|
|||
.icon-offence {
|
||||
background: url('icons/offence.png') no-repeat center center;
|
||||
}
|
||||
.icon-safelist {
|
||||
background: url('icons/safelist.png') no-repeat center center;
|
||||
}
|
||||
.icon-dutylist {
|
||||
background: url('icons/dutyist.png') no-repeat center center;
|
||||
}
|
||||
.icon-worklist {
|
||||
background: url('icons/worklist.png') no-repeat center center;
|
||||
}
|
||||
.icon-feedbacklist {
|
||||
background: url('icons/feedbacklist.png') no-repeat center center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 305 B |
Binary file not shown.
After Width: | Height: | Size: 435 B |
Binary file not shown.
After Width: | Height: | Size: 325 B |
Binary file not shown.
After Width: | Height: | Size: 465 B |
|
@ -321,13 +321,28 @@ function isIntNum(val) {
|
|||
// }
|
||||
// }
|
||||
function changehref(o) {
|
||||
|
||||
_clickTab = $(o).attr('url');// 找到链接a中的targer的值
|
||||
_title = $(o).attr('title');
|
||||
|
||||
_value = $(o).attr('value');
|
||||
|
||||
$("#main").attr('value', _value);
|
||||
$("#main").panel({ href: _clickTab, title: $(o).attr('title') });
|
||||
|
||||
if ($('#tt').tabs('tabs').length > 10) {
|
||||
alert('标签页过多,请先关闭')
|
||||
return
|
||||
}
|
||||
if ($('#tt').tabs('exists', _title)) {
|
||||
$('#tt').tabs('select', _title);
|
||||
//var tab2 = $('#tt').tabs('getSelected');
|
||||
//tab2.panel('refresh');
|
||||
} else {
|
||||
$('#tt').tabs('add', {
|
||||
title: _title,
|
||||
href: _clickTab,
|
||||
closable: true,
|
||||
});
|
||||
}
|
||||
// $.ajax({
|
||||
// type: "get",
|
||||
// url: _clickTab,
|
||||
|
@ -578,15 +593,15 @@ function jsonSort(jsonObj) {
|
|||
return str.substr(0, str.length - 1)
|
||||
}
|
||||
//map定时显示,每分钟请求一次,如果存在map
|
||||
function update() {
|
||||
function mapupdate() {
|
||||
if ($('#mapshowinput').length) {
|
||||
source.clear()
|
||||
$.get('api/mapshow?a=risk', function (res) {
|
||||
$.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) {
|
||||
$.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
|
||||
|
@ -597,7 +612,7 @@ function update() {
|
|||
setPoint(data)
|
||||
}
|
||||
})
|
||||
$.get('api/mapshow?a=miss', function (res) {
|
||||
$.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
|
||||
|
@ -608,7 +623,7 @@ function update() {
|
|||
setPoint(data)
|
||||
}
|
||||
})
|
||||
$.get('api/mapshow?a=operation', function (res) {
|
||||
$.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
|
||||
|
@ -632,7 +647,7 @@ $.get('api/check_session',function(res){
|
|||
}
|
||||
})
|
||||
}
|
||||
var t1 = window.setInterval(update, 1000 * 60)
|
||||
var t1 = window.setInterval(mapupdate, 1000 * 60)
|
||||
var t2 = window.setInterval(checksession,1000*60*41)
|
||||
|
||||
//扩展easyui表单的验证
|
||||
|
|
|
@ -38,14 +38,14 @@
|
|||
<a id="drawqy" onclick="drawqy()" class="easyui-linkbutton" data-options="iconCls:'fa-pencil',plain:true"
|
||||
style="display:none">绘制区域</a>
|
||||
</div>
|
||||
<div id="map" class="map" style="width:100%;height:auto;outline: #4A74A8 solid 0.15em;margin-bottom: 10px;">
|
||||
<div id="map0" class="map" style="width:100%;height:auto;outline: #4A74A8 solid 0.15em;margin-bottom: 10px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var map, source, vector, draw, polygon;// global so we can remove it later
|
||||
$.get('api/map?a=default', function (res) {
|
||||
$('#map').empty()
|
||||
$('#map0').empty()
|
||||
map = initMap(res.pic)
|
||||
$('#qylblist').datagrid({ url: 'api/area?a=listall&map=' + res.id })
|
||||
})
|
||||
|
@ -109,7 +109,7 @@
|
|||
})
|
||||
})
|
||||
],
|
||||
target: 'map',
|
||||
target: 'map0',
|
||||
view: new ol.View({
|
||||
projection: projection,
|
||||
center: ol.extent.getCenter(extent),
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
month = now.getMonth() + 1;
|
||||
for (var i = 0; i < 5; i++) {
|
||||
$('#year').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
|
||||
$('#years').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
|
||||
$('#years_bh').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
|
||||
}
|
||||
$.get('api/tool?a=servertime', function (res) {
|
||||
$('#year').combobox().combobox('setValue', res.year);
|
||||
$('#years').combobox().combobox('setValue', res.year);
|
||||
$('#years_bh').combobox().combobox('setValue', res.year);
|
||||
$('#month').combobox().combobox('setValue', res.month);
|
||||
behaviorDate();
|
||||
gczxt();
|
||||
|
@ -158,7 +158,7 @@
|
|||
gczxt();
|
||||
}
|
||||
function gczxt() {//行为观察折线图
|
||||
var y = $("#years").val();
|
||||
var y = $("#years_bh").val();
|
||||
//行为观察折线图
|
||||
$.ajax({
|
||||
type: "get",
|
||||
|
@ -265,7 +265,7 @@
|
|||
|
||||
<div class="border" id="desktop" style="margin: 10px 10px 0 10px; background: #fff; overflow: auto;">
|
||||
<!--行为观察统计-->
|
||||
<select class="txtInput select3" id="years" name="years" style="width:100px;"></select><label>年</label>
|
||||
<select class="txtInput select3" id="years_bh" name="years_bh" style="width:100px;"></select><label>年</label>
|
||||
<button class="btn btn-info" onclick="funTypeChange2()"> 查询</button>
|
||||
<div id="piecontainer2" style="width:80%;margin:auto;height:400px;margin-bottom:100px;">
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<script type="text/javascript" src="/static/safesite/easyui/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/echarts.min.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/chart.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/util2.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/util.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/loading.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/datagrid-export.js"></script>
|
||||
|
@ -59,7 +59,7 @@
|
|||
<div class="center_top_con" id="distribution_map">
|
||||
<div id="map" class="map" style="width:100%;height:100%;outline: #4A74A8 solid 0.15em;">
|
||||
</div>
|
||||
<input type='hidden' id='mapshowinput'></input>
|
||||
<div id='mapshowinput'></div>
|
||||
<div id="popup" class="ol-popup">
|
||||
<a href="#" id="popup-closer" class="ol-popup-closer"></a>
|
||||
<div id="popup-content"></div>
|
||||
|
@ -346,7 +346,7 @@
|
|||
$.get('../api/map?a=default', function (res) {
|
||||
$('#map').empty()
|
||||
map = initMap(res.pic)
|
||||
update()
|
||||
mapupdate()
|
||||
})
|
||||
|
||||
function initMap(url) {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<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='mapshowinput'></div>
|
||||
<div id="popup" class="ol-popup">
|
||||
<a href="#" id="popup-closer" class="ol-popup-closer"></a>
|
||||
<div id="popup-content"></div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
<div data-options="region:'west',split:true,border:false,collapsible:false" style="width:40%;height:100%;" title="风险点">
|
||||
<div id="riskactbar" style="padding:5px;height:auto">
|
||||
<div id="riskactbar_grid" style="padding:5px;height:auto">
|
||||
<div>
|
||||
{% load myfilter %}
|
||||
</div>
|
||||
|
@ -21,7 +21,7 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<table id="riskacttable" style="height:100%;width:auto"></table>
|
||||
<table id="riskacttable_grid" style="height:100%;width:auto"></table>
|
||||
</div>
|
||||
<div data-options="region:'center',title:'网格化任务制定',split:true,border:false,collapsible:false" style="width:50%;height:100%;">
|
||||
|
||||
|
@ -56,16 +56,16 @@
|
|||
})
|
||||
function searchriskact(){
|
||||
var querydata = $('#searchriskactff').serializeJSON();
|
||||
$('#riskacttable').datagrid('load',querydata);
|
||||
$('#riskacttable_grid').datagrid('load',querydata);
|
||||
}
|
||||
$('#riskacttable').datagrid({
|
||||
$('#riskacttable_grid').datagrid({
|
||||
url: 'api/riskact?a=listall',
|
||||
singleSelect:true,
|
||||
rownumbers: true,
|
||||
fitColumns: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#riskactbar',
|
||||
toolbar: '#riskactbar_grid',
|
||||
pagination: 'true',
|
||||
pageSize: 20,
|
||||
columns: [[
|
||||
|
@ -134,7 +134,7 @@
|
|||
|
||||
function addgridtaskset(){
|
||||
|
||||
var row = $('#riskacttable').datagrid('getSelected');
|
||||
var row = $('#riskacttable_grid').datagrid('getSelected');
|
||||
if (row) {
|
||||
opendg('新增','html/gridtaskset/add/' + row.id)
|
||||
}
|
||||
|
|
|
@ -22,14 +22,15 @@
|
|||
<script type="text/javascript" src="/static/safesite/mystatic/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/datagrid-export.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery-qrcode-0.17.0.min.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/ckeditor.js"></script>
|
||||
<!-- <script type="text/javascript" src="/static/safesite/mystatic/js/ckeditor.js"></script> -->
|
||||
<!-- <script src="https://cdn.ckeditor.com/ckeditor5/27.1.0/classic/ckeditor.js"></script> -->
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/openlayer/ol.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.form.min.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.cookie.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/util.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/easyui/datagrid-scrollview.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/FileSaver.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.wordexport.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.wordexport.js"></script>
|
||||
<style type="text/css">
|
||||
.easyui-linkbutton:hover {
|
||||
background: #1148a0;
|
||||
|
@ -76,7 +77,9 @@
|
|||
<div id='Loading' class="loading">
|
||||
<font>加载中···</font>
|
||||
</div>
|
||||
<div id='main' href="mainhtml" data-options="region:'center',border:false" title="主页" style="overflow-x:hidden;">
|
||||
<div id="tt" region="center" class="easyui-tabs">
|
||||
<div title="主页" href="/mainhtml" id="main">
|
||||
</div>
|
||||
</div>
|
||||
<div region="north" class="northDiv">
|
||||
<div style="float:right;width:7%;margin-left:10px">
|
||||
|
@ -101,8 +104,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>
|
||||
<a style="color: #eee5e7;cursor: pointer;" href="html/datashow2" target="_blank"
|
||||
class="easyui-linkbutton" iconCls="fa-desktop" plain=true>数据大屏2</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -111,7 +114,7 @@
|
|||
headimgurl="{{headimgurl}}" menus="{{menus}}" style="display:none;" />
|
||||
|
||||
<button style="margin: 15px;background-color: transparent;border: 0;color: white;cursor: pointer;"
|
||||
onclick="javascript:$('#main').panel({href:'mainhtml',title:'主页'})"><span
|
||||
onclick="javascript:$('#tt').tabs('select',0)"><span
|
||||
style="font-size:24px">{{companyname}}</span><br /><span
|
||||
style="font-size:20px">安全生产管理系统</span></button>
|
||||
</div>
|
||||
|
@ -119,12 +122,12 @@
|
|||
|
||||
|
||||
<div id="menuTreediv" data-options="region:'west'" style="width: 150px; background-color: #ffffff;">
|
||||
<div class="divMune">
|
||||
<!-- <div class="divMune">
|
||||
<img src="/static/safesite/mystatic/images/fanhuiBut.png"
|
||||
style="float: right;width:20px;height:20px;text-align: center;margin-top: 10px;margin-right: 10px;"
|
||||
id="headimg" />
|
||||
<a onclick="javascript:$('#main').panel({href:'mainhtml',title:'主页'})">返回主页</a>
|
||||
</div>
|
||||
</div> -->
|
||||
<div id="menuTree" style="width:100%;text-align: right; background-color: rgb(25, 53, 58);"></div>
|
||||
</div>
|
||||
<div id="wxdg" title="绑定微信" style="width:600px;height:400px;padding: 10px;display:none"
|
||||
|
@ -152,14 +155,17 @@
|
|||
<div id='pwdg' title='修改密码' style="width:500px;height:250px;display:none" data-options="modal:true">
|
||||
<form method="post" style="margin:10px;">
|
||||
<div style="margin-bottom:5px;">
|
||||
<input id="oldpwd" class="easyui-passwordbox" name="oldpwd" type="password"
|
||||
data-options="label:'旧密码',required:true" style="width:90%"/></div>
|
||||
<input id="oldpwd" class="easyui-passwordbox" name="oldpwd" type="password"
|
||||
data-options="label:'旧密码',required:true" style="width:90%" />
|
||||
</div>
|
||||
<div style="margin-bottom:5px;">
|
||||
<input id="newpwd" class="easyui-passwordbox validatebox" name="newpwd"
|
||||
data-options="label:'新密码',validType:'Password',required:true" style="width:90%"/></div>
|
||||
<input id="newpwd" class="easyui-passwordbox validatebox" name="newpwd"
|
||||
data-options="label:'新密码',validType:'Password',required:true" style="width:90%" />
|
||||
</div>
|
||||
<div style="margin-bottom:5px;">
|
||||
<input id="newpwd2" class="easyui-passwordbox validatebox" name="newpwd2"
|
||||
data-options="label:'确认新密码',validType:'Password',required:true" style="width:90%"/></div>
|
||||
<input id="newpwd2" class="easyui-passwordbox validatebox" name="newpwd2"
|
||||
data-options="label:'确认新密码',validType:'Password',required:true" style="width:90%" />
|
||||
</div>
|
||||
</form>
|
||||
<div style="text-align: center">
|
||||
<a id="btnpwc" class="easyui-linkbutton" iconCls="icon-ok" onclick="btnpwc()">保存</a>
|
||||
|
@ -169,22 +175,72 @@
|
|||
<div id="dd" style="overflow: hidden;"></div>
|
||||
<div id="userdd" style="overflow: hidden;"></div>
|
||||
<div id="questiondd" style="overflow: hidden;"></div>
|
||||
<input type="hidden" id="in" show="" total="" target="" show2=""/>
|
||||
<input type="hidden" id="in" show="" total="" target="" show2="" />
|
||||
<!-- <button type="hidden" id="getb" onclick="test()" /> -->
|
||||
|
||||
|
||||
<!-- tab页的右键菜单 -->
|
||||
<div id="home-tabs-menu" class="easyui-menu">
|
||||
<div data-options="name:1">关闭</div>
|
||||
<div data-options="name:2">关闭其他</div>
|
||||
<div data-options="name:3">关闭所有</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#tt').tabs({
|
||||
border: false,
|
||||
onSelect: function (title) {
|
||||
var allTabs = $('#tt').tabs('tabs');
|
||||
var selectTab = $('#tt').tabs('getSelected');
|
||||
for (var i = 0; i < allTabs.length; i++) {
|
||||
if(allTabs[i]){
|
||||
if (allTabs[i].panel('options').title != selectTab.panel('options').title) {
|
||||
$('#tt').tabs('update', {
|
||||
tab: allTabs[i],
|
||||
options: {
|
||||
content: 'Tab Body'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//selectTab.panel('refresh')
|
||||
// console.log(allTabs[0].panel('options').content)
|
||||
},
|
||||
onContextMenu: function(e, title, index){
|
||||
//该方法通知浏览器不要执行与此事件关联的默认动作
|
||||
//即屏蔽了浏览器在tab页上的鼠标右键事件
|
||||
e.preventDefault();
|
||||
var mm = $("#home-tabs-menu");
|
||||
//显示右键菜单
|
||||
mm.menu("show",{
|
||||
top: e.pageY,
|
||||
left: e.pageX
|
||||
}).data("tabTitle",title);
|
||||
//为右键菜单选项绑定事件
|
||||
mm.menu({
|
||||
onClick: function(item){
|
||||
closeTab(this, item.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
$.messager.show({
|
||||
title:'提示',
|
||||
msg:'每晚10点-11点为维护时间,请尽量不在此时间使用',
|
||||
timeout:5000,
|
||||
showType:'slide'
|
||||
});
|
||||
title: '提示',
|
||||
msg: '每晚10点-11点为维护时间,请尽量不在此时间使用',
|
||||
timeout: 5000,
|
||||
showType: 'slide'
|
||||
});
|
||||
var openid = $('#userindex').attr('openid');
|
||||
var nickname = $('#userindex').attr('nickname');
|
||||
var headimgurl = $('#userindex').attr('headimgurl');
|
||||
var issuper = {{ issuper }};
|
||||
if (issuper == 1) { $('#setupb').show();$('#bindwx').hide()}
|
||||
if ((openid == 0 ||openid == 'None') && issuper != 1) { $('#wxdg').dialog(); } else { $('#bindwx').text('解绑微信'); };
|
||||
if (issuper == 1) { $('#setupb').show(); $('#bindwx').hide() }
|
||||
if ((openid == 0 || openid == 'None') && issuper != 1) { $('#wxdg').dialog(); } else { $('#bindwx').text('解绑微信'); };
|
||||
if (headimgurl != 0 && headimgurl != 'None' && issuper != 1) { $('#headimg').attr('src', headimgurl); }
|
||||
function logout() {
|
||||
$.messager.confirm('系统提示', '您确定要退出本次登录吗?', function (r) {
|
||||
|
@ -193,14 +249,15 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
var pwstr = {{pwstr}};
|
||||
if(pwstr==0){
|
||||
$.messager.alert('','您的密码复杂度太低,请修改!','warning',function(){
|
||||
var pwstr = {{ pwstr }};
|
||||
if (pwstr == 0) {
|
||||
$.messager.alert('', '您的密码复杂度太低,请修改!', 'warning', function () {
|
||||
$('#pwdg').dialog()
|
||||
});}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function bindwx() {
|
||||
if (openid == 0 ||openid == 'None') {
|
||||
if (openid == 0 || openid == 'None') {
|
||||
$('#wxdg').dialog('open');
|
||||
} else {
|
||||
var str = '你已绑定昵称为' + nickname + '的微信号,确定解绑吗?'
|
||||
|
@ -222,7 +279,7 @@
|
|||
var v1 = $("#newpwd").val();
|
||||
var v2 = $("#newpwd2").val();
|
||||
var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z]).{8,30}');
|
||||
if (!regex.test(v1)||!regex.test(v2)) {
|
||||
if (!regex.test(v1) || !regex.test(v2)) {
|
||||
$.messager.alert("提示信息", "您的密码复杂度太低(密码中必须包含字母、数字)", "error");
|
||||
}
|
||||
else if (v1 == v2) {
|
||||
|
@ -275,13 +332,73 @@
|
|||
multiple: false,
|
||||
onSelect: function (node) {
|
||||
$("#main").attr('value', 'listall');
|
||||
$("#main").panel({ href: node.attributes, title: node.text });
|
||||
// $("#main").panel({ href: node.attributes, title: node.text });
|
||||
let title = node.text
|
||||
if ($('#tt').tabs('tabs').length > 10) {
|
||||
alert('标签页过多,请先关闭')
|
||||
return
|
||||
}
|
||||
if ($('#tt').tabs('exists', title)) {
|
||||
$('#tt').tabs('select', title);
|
||||
//var tab2 = $('#tt').tabs('getSelected');
|
||||
// var url = $(tab2.panel('options')).attr('href');
|
||||
//tab2.panel('refresh');
|
||||
} else {
|
||||
$('#tt').tabs('add', {
|
||||
title: title,
|
||||
href: node.attributes,
|
||||
closable: true,
|
||||
// tools: [{
|
||||
// iconCls: 'icon-mini-refresh',
|
||||
// handler: function () {
|
||||
// var tab = $('#tt').tabs('getSelected'); // get selected panel
|
||||
// tab.panel('refresh');
|
||||
// }
|
||||
// }]
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
$.get('api/rights?a=have', function (res) {
|
||||
localStorage.setItem('data', JSON.stringify(res));
|
||||
})
|
||||
|
||||
function closeTab(menu, type){
|
||||
var allTabs = $("#tt").tabs("tabs");
|
||||
var allTabTitle = [];
|
||||
$.each(allTabs, function(i, n){
|
||||
var opt = $(n).panel("options");
|
||||
if(opt.closable){
|
||||
allTabTitle.push(opt.title);
|
||||
}
|
||||
});
|
||||
var curTabTitle = $(menu).data("tabTitle");
|
||||
switch(type){
|
||||
case 1:
|
||||
//关闭当前
|
||||
$("#tt").tabs("close", curTabTitle);
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
//关闭其他
|
||||
for(var i = 0; i < allTabTitle.length; i++){
|
||||
if(curTabTitle != allTabTitle[i] && curTabTitle != '主页'){
|
||||
$("#tt").tabs("close",allTabTitle[i]);
|
||||
}
|
||||
}
|
||||
$("#tt").tabs("select",curTabTitle);
|
||||
break;
|
||||
case 3:
|
||||
//关闭所有
|
||||
for(var i = 0; i < allTabTitle.length; i++){
|
||||
if(curTabTitle != '主页'){
|
||||
$("#tt").tabs("close",allTabTitle[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<table id="xjtable" style="width:auto;height:100%;"></table>
|
||||
<table id="ycitemtable" style="width:auto;height:100%;"></table>
|
||||
<a id="downa" href="" target="_blank" style="display:none"></a>
|
||||
<div id="xjtablebar" style="padding: 4px">
|
||||
<div id="ycitemtablebar" style="padding: 4px">
|
||||
|
||||
<div >
|
||||
<form id='searchxjff'>
|
||||
|
@ -14,8 +14,8 @@
|
|||
<option value="异常待处理">异常待处理</option>
|
||||
<option value="异常已处理">异常已处理</option>
|
||||
</select>
|
||||
<a id="xjsearch" onclick="xjsearch()" class="easyui-linkbutton" data-options="iconCls: 'fa-search'">查询</a>
|
||||
<a id="searchreset" onclick="reset()" class="easyui-linkbutton">重置</a>
|
||||
<a id="xjycsearch" onclick="xjycsearch()" class="easyui-linkbutton" data-options="iconCls: 'fa-search'">查询</a>
|
||||
<a id="xjycreset" onclick="reset()" class="easyui-linkbutton">重置</a>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#xjtable').datagrid({url:'api/inspectitem',queryParams:{a:'listyc'}});
|
||||
$('#ycitemtable').datagrid({url:'api/inspectitem',queryParams:{a:'listyc'}});
|
||||
$("#searchxjff").form('clear');
|
||||
})
|
||||
$("#sxjbm").combotree({
|
||||
|
@ -58,24 +58,24 @@
|
|||
editable:false,
|
||||
onSelect: function (node) {
|
||||
if(node.value != 0){
|
||||
$('#xjtable').datagrid({url:'api/inspect',queryParams:{a:node.value}});
|
||||
$('#ycitemtable').datagrid({url:'api/inspect',queryParams:{a:node.value}});
|
||||
}
|
||||
}
|
||||
});
|
||||
function xjsearch() {
|
||||
function xjycsearch() {
|
||||
var querydata = $('#searchxjff').serializeJSON();
|
||||
querydata['a'] = 'listyc'
|
||||
$('#xjtable').datagrid('load',querydata);
|
||||
$('#ycitemtable').datagrid('load',querydata);
|
||||
}
|
||||
function reset() {
|
||||
$('#searchxjff').form('clear')
|
||||
$('#xjtable').datagrid('options').queryParams = {
|
||||
$('#ycitemtable').datagrid('options').queryParams = {
|
||||
a:'listyc'
|
||||
}
|
||||
$('#xjtable').datagrid('load');
|
||||
$('#ycitemtable').datagrid('load');
|
||||
|
||||
}
|
||||
$('#xjtable').datagrid({
|
||||
$('#ycitemtable').datagrid({
|
||||
url: '',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
|
@ -84,7 +84,7 @@
|
|||
method: 'get',
|
||||
pagination: 'true',
|
||||
pageSize: 20,
|
||||
toolbar: '#xjtablebar',
|
||||
toolbar: '#ycitemtablebar',
|
||||
border:false,
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
|
@ -121,7 +121,7 @@
|
|||
]]
|
||||
});
|
||||
function xjdetail(){
|
||||
var row = $('#xjtable').datagrid('getSelected');
|
||||
var row = $('#ycitemtable').datagrid('getSelected');
|
||||
if (row) {
|
||||
var url = 'misshtml/detail/' + row.missid
|
||||
opendg('查看详情',url)
|
||||
|
@ -135,12 +135,12 @@
|
|||
$('<form method="post" action="' + url + '"></form>').appendTo('body').submit().remove();
|
||||
}
|
||||
function delxj(){
|
||||
var row = $('#xjtable').datagrid('getSelected');
|
||||
var row = $('#ycitemtable').datagrid('getSelected');
|
||||
if (row) {
|
||||
var url = 'api/inspect?a=del&id=' + row.id
|
||||
$.get(url,function(res){
|
||||
if(res.code==1){
|
||||
$('#xjtable').datagrid('reload')
|
||||
$('#ycitemtable').datagrid('reload')
|
||||
}else{
|
||||
$.messager.alert('提示', '没有权限!');
|
||||
}
|
||||
|
@ -149,7 +149,7 @@
|
|||
else { $.messager.alert('提示', '请选择一行数据!'); }
|
||||
}
|
||||
function xjdetail2(){
|
||||
var row = $('#xjtable').datagrid('getSelected');
|
||||
var row = $('#ycitemtable').datagrid('getSelected');
|
||||
if (row) {
|
||||
var url = 'html/inspectitem/detail/' + row.id
|
||||
opendg('查看详情',url)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<div style="margin-left: 10px;margin-right:10px;overflow: hidden;">
|
||||
<div style="width:100%;height:300px;padding: 20px;">
|
||||
<div id="map1div" style="width: 33%; height:100%;float:left;"></div>
|
||||
<div id="map2div" style="width: 66%; height:100%;float:left;"></div>
|
||||
|
@ -96,7 +97,7 @@ float: left;">
|
|||
font-weight: 300;
|
||||
font-size: 11px;
|
||||
color: #fff;
|
||||
opacity: 0.7;height: 20px;cursor: pointer;" title="在线培训" onclick="changehref(this)">
|
||||
opacity: 0.7;height: 20px;cursor: pointer;" title="线下培训" onclick="changehref(this)">
|
||||
点击查看全部
|
||||
<i style="background-position: -27px -10px;width: 14px;
|
||||
height: 14px; vertical-align: top;background-repeat: no-repeat;margin-top: 4px;
|
||||
|
@ -330,7 +331,7 @@ float: left;">
|
|||
<div id="panelx" class="easyui-panel" data-options="iconCls:'fa-bar-chart'" >
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//首页总数统计
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</div> -->
|
||||
<div id="map" class="map" style="width:100%;height:auto;outline: #4A74A8 solid 0.15em;">
|
||||
</div>
|
||||
<input type='hidden' id='mapshowinput'></input>
|
||||
<div id='mapshowinput'></div>
|
||||
<div id="popup" class="ol-popup">
|
||||
<a href="#" id="popup-closer" class="ol-popup-closer"></a>
|
||||
<div id="popup-content"></div>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<!-- <div id="qybar" style="padding:5px;height:auto;">
|
||||
<label>隐患</label><input class="easyui-switchbutton" data-options="onText:'开',offText:'关'">
|
||||
</div> -->
|
||||
<div id="map" class="map" style="width:100%;height:auto;outline: #4A74A8 solid 0.15em;">
|
||||
<div id="map1" class="map" style="width:100%;height:auto;outline: #4A74A8 solid 0.15em;">
|
||||
</div>
|
||||
<input type='hidden' id='mapshowinput'></input>
|
||||
<div id='mapshowinput'></div>
|
||||
<div id="popup" class="ol-popup">
|
||||
<a href="#" id="popup-closer" class="ol-popup-closer"></a>
|
||||
<div id="popup-content"></div>
|
||||
|
@ -70,9 +70,9 @@
|
|||
autoPan: true
|
||||
});
|
||||
$.get('api/map?a=default', function (res) {
|
||||
$('#map').empty()
|
||||
$('#map1').empty()
|
||||
map = initMap(res.pic)
|
||||
update()
|
||||
mapupdate()
|
||||
})
|
||||
|
||||
function initMap(url) {
|
||||
|
@ -92,7 +92,7 @@
|
|||
})
|
||||
})
|
||||
],
|
||||
target: 'map',
|
||||
target: 'map1',
|
||||
view: new ol.View({
|
||||
projection: projection,
|
||||
center: ol.extent.getCenter(extent),
|
||||
|
|
|
@ -39,11 +39,16 @@
|
|||
<ol id="fileol"></ol>
|
||||
</div>
|
||||
<div style="margin-top:10px;margin-bottom:5px">
|
||||
<textarea id="ckeditor" ></textarea>
|
||||
<textarea id="ckeditor" style="height: 600;"></textarea>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.ck-editor__editable { min-height: 600px; }
|
||||
</style>
|
||||
<script src="https://cdn.ckeditor.com/ckeditor5/27.1.0/classic/ckeditor.js"></script>
|
||||
<!-- <script type="text/javascript" src="/static/safesite/mystatic/js/ckeditor.js"></script> -->
|
||||
<script>
|
||||
$('#isgg').switchbutton({
|
||||
checked: true,
|
||||
|
@ -58,7 +63,12 @@
|
|||
}
|
||||
}
|
||||
})
|
||||
CKEDITOR.replace( 'ckeditor',{'height':600});
|
||||
// CKEDITOR.replace( 'ckeditor',{'height':600});
|
||||
var editor = ClassicEditor
|
||||
.create( document.querySelector( '#ckeditor' ) )
|
||||
.catch( error => {
|
||||
console.error( error );
|
||||
} );
|
||||
function tzsubmitForm() {
|
||||
var tzfile = new Array();
|
||||
$(".filea").each(function () {
|
||||
|
@ -71,7 +81,7 @@
|
|||
ffqd.push($(this).val());
|
||||
});
|
||||
tzdata['ffqd']=ffqd
|
||||
tzdata['content']=CKEDITOR.instances.ckeditor.getData();
|
||||
tzdata['content']= editor.getData();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'api/notice?a=add',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<div id="edubar" style="padding: 4px;height: 40px;background-color:#FCFCFC">
|
||||
<div id="addoperprocetablebar" style="padding: 4px;height: 40px;background-color:#FCFCFC">
|
||||
<div style="width: 500px;padding: 5px;">
|
||||
<a id="addedu" class="easyui-linkbutton" onclick="javascript:opendg('新增文件','html/addoperproce')" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
<a id="tzdetail" onclick="tzdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">点击查看</a>
|
||||
|
@ -11,14 +11,14 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<table id="mgttab" style="width:100%;height:100%;text-align: center;"></table>
|
||||
<table id="addoperprocetable" style="width:100%;height:100%;text-align: center;"></table>
|
||||
<script>
|
||||
|
||||
//点击观看
|
||||
function tzdetail() {
|
||||
var row = $('#mgttab').datagrid('getSelected');
|
||||
var row = $('#addoperprocetable').datagrid('getSelected');
|
||||
if (row) {
|
||||
var row = $('#mgttab').datagrid('getSelected');
|
||||
var row = $('#addoperprocetable').datagrid('getSelected');
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "api/getprodata?a=readnum",
|
||||
|
@ -39,7 +39,7 @@
|
|||
}
|
||||
else { $.messager.alert('提示', '请选择一行数据!'); }
|
||||
}
|
||||
$('#mgttab').datagrid({
|
||||
$('#addoperprocetable').datagrid({
|
||||
url: 'api/getprodata?a=listall',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
|
@ -49,7 +49,7 @@
|
|||
pagination: 'true',
|
||||
pageSize: 20,
|
||||
border: false,
|
||||
toolbar: '#edubar',
|
||||
toolbar: '#addoperprocetablebar',
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'title', title: '规程规定名称', width: 100 },
|
||||
|
@ -68,7 +68,7 @@
|
|||
|
||||
|
||||
function deledu() {
|
||||
var row = $('#mgttab').datagrid('getSelected');
|
||||
var row = $('#addoperprocetable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
|
@ -80,7 +80,7 @@
|
|||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#mgttab").datagrid('reload');
|
||||
$("#addoperprocetable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '你无权删除该条责任制度!');
|
||||
|
@ -101,7 +101,7 @@
|
|||
}
|
||||
|
||||
function jydetail() {
|
||||
var row = $('#mgttab').datagrid('getSelected');
|
||||
var row = $('#addoperprocetable').datagrid('getSelected');
|
||||
if (row) {
|
||||
var url = 'html/resbility/detail/' + row.id
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<div id="edubar" style="padding: 4px;height: 40px;background-color:#FCFCFC">
|
||||
<div id="resbilitytablebar" style="padding: 4px;height: 40px;background-color:#FCFCFC">
|
||||
<div style="width: 500px;padding: 5px;">
|
||||
<a id="addedu" class="easyui-linkbutton" onclick="javascript:opendg('新增文件','html/addresbility')" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
<a id="tzdetail" onclick="tzdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">点击查看</a>
|
||||
|
@ -11,14 +11,14 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<table id="mgttab" style="width:100%;height:100%;text-align: center;"></table>
|
||||
<table id="resbilitytable" style="width:100%;height:100%;text-align: center;"></table>
|
||||
<script>
|
||||
|
||||
//点击观看
|
||||
function tzdetail() {
|
||||
var row = $('#mgttab').datagrid('getSelected');
|
||||
var row = $('#resbilitytable').datagrid('getSelected');
|
||||
if (row) {
|
||||
var row = $('#mgttab').datagrid('getSelected');
|
||||
var row = $('#resbilitytable').datagrid('getSelected');
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "api/getresbilitydata?a=readnum",
|
||||
|
@ -39,7 +39,7 @@
|
|||
}
|
||||
else { $.messager.alert('提示', '请选择一行数据!'); }
|
||||
}
|
||||
$('#mgttab').datagrid({
|
||||
$('#resbilitytable').datagrid({
|
||||
url: 'api/getresbilitydata?a=listall',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
|
@ -49,7 +49,7 @@
|
|||
pagination: 'true',
|
||||
pageSize: 20,
|
||||
border: false,
|
||||
toolbar:'#edubar',
|
||||
toolbar:'#resbilitytablebar',
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'title', title: '制度名称', width: 100 },
|
||||
|
@ -68,7 +68,7 @@
|
|||
|
||||
|
||||
function deledu() {
|
||||
var row = $('#mgttab').datagrid('getSelected');
|
||||
var row = $('#resbilitytable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
|
@ -80,7 +80,7 @@
|
|||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#mgttab").datagrid('reload');
|
||||
$("#resbilitytable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '你无权删除该条责任制度!');
|
||||
|
@ -101,7 +101,7 @@
|
|||
}
|
||||
|
||||
function jydetail() {
|
||||
var row = $('#mgttab').datagrid('getSelected');
|
||||
var row = $('#resbilitytable').datagrid('getSelected');
|
||||
if (row) {
|
||||
var url = 'html/resbility/detail/' + row.id
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
year = now.getFullYear();
|
||||
month = now.getMonth() + 1;
|
||||
for (var i = 0; i < 5; i++) {
|
||||
$('#year').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
|
||||
$('#years').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
|
||||
$('#year_trainfig').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
|
||||
// $('#years').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
|
||||
}
|
||||
$.get('api/tool?a=servertime', function (res) {
|
||||
$('#year').combobox().combobox('setValue', res.year);
|
||||
$('#years').combobox().combobox('setValue', res.year);
|
||||
$('#month').combobox().combobox('setValue', res.month);
|
||||
$('#year_trainfig').combobox().combobox('setValue', res.year);
|
||||
// $('#years').combobox().combobox('setValue', res.year);
|
||||
$('#month_trainfig').combobox().combobox('setValue', res.month);
|
||||
behaviorDate();
|
||||
trainstatistical();
|
||||
})
|
||||
|
@ -44,7 +44,7 @@
|
|||
}
|
||||
//培训分析柱形图
|
||||
function behaviorDate() {
|
||||
var y = $("#year").val();
|
||||
var y = $("#year_trainfig").val();
|
||||
var gcChart = echarts.init(document.getElementById("piecontainer"));
|
||||
|
||||
gcChart.setOption(option = {
|
||||
|
@ -162,8 +162,8 @@
|
|||
}
|
||||
//培训分析扇形图
|
||||
function trainstatistical() {
|
||||
var y = $("#year").val();
|
||||
var m = $("#month").val();
|
||||
var y = $("#year_trainfig").val();
|
||||
var m = $("#month_trainfig").val();
|
||||
var pxChart = echarts.init(document.getElementById("piecontainer2"));
|
||||
|
||||
$.ajax({
|
||||
|
@ -265,7 +265,7 @@
|
|||
|
||||
<div style="width:100%">
|
||||
<div style="width:80%;margin:auto;margin-bottom:100px;">
|
||||
<select class="txtInput select3" id="year" name="year" style="width:100px;"></select><label>年</label>
|
||||
<select class="txtInput select3" id="year_trainfig" name="year" style="width:100px;"></select><label>年</label>
|
||||
|
||||
<button class="btn btn-info" onclick="funTypeChange()"> 查询</button>
|
||||
|
||||
|
@ -275,7 +275,7 @@
|
|||
</div>
|
||||
<div style="width:80%;margin:auto;margin-bottom:100px;">
|
||||
|
||||
<select class="txtInput select3" id="month" name="month" style="width:100px;">
|
||||
<select class="txtInput select3" id="month_trainfig" name="month" style="width:100px;">
|
||||
<option value="1">1月</option>
|
||||
<option value="2">2月</option>
|
||||
<option value="3">3月</option>
|
||||
|
|
|
@ -7209,7 +7209,10 @@ def apiinspectitem(req):
|
|||
if 'state' in i:
|
||||
obj.state = i['state']
|
||||
if i['state'] == '异常待处理':
|
||||
obj.todouser = getpgr2(userid, User.objects.get(userid=userid).ubelongpart)
|
||||
if 'todouser' in data and data['todouser']:
|
||||
obj.todouser = User.objects.get(userid=data['todouser'])
|
||||
else:
|
||||
obj.todouser = getpgr2(userid, User.objects.get(userid=userid).ubelongpart)
|
||||
obj.checkitem = EquipmentCheckItem.objects.get(pk=i['id'])
|
||||
obj.inspect = Inspect.objects.get(pk=data['inspect'])
|
||||
if 'desc' in i:
|
||||
|
|
Loading…
Reference in New Issue