增加tab页,不过有很多问题

This commit is contained in:
caoqianming 2021-05-18 22:01:35 +08:00
parent cca66d26c3
commit 268d47c267
13 changed files with 131 additions and 101 deletions

View File

@ -578,15 +578,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 +597,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 +608,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 +632,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表单的验证

View File

@ -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),

View File

@ -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()">&nbsp;查询</button>
<div id="piecontainer2" style="width:80%;margin:auto;height:400px;margin-bottom:100px;">

View File

@ -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) {

View File

@ -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>

View File

@ -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)
}

View File

@ -30,7 +30,7 @@
<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;
@ -77,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" class="easyui-tabs" data-options="region:'center',border:false">
<div title="主页" id='main' href="mainhtml" style="overflow-x:hidden;">
</div>
</div>
<div region="north" class="northDiv">
<div style="float:right;width:7%;margin-left:10px">
@ -102,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>
@ -120,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"
@ -153,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>
@ -170,22 +175,22 @@
<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()" /> -->
<script>
$.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) {
@ -194,14 +199,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 + '的微信号,确定解绑吗?'
@ -223,7 +229,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) {
@ -276,7 +282,31 @@
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>7){
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', url);
} 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');
}
}]
});
}
},
});
})

View File

@ -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)

View File

@ -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>

View File

@ -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),

View File

@ -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

View File

@ -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

View File

@ -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()">&nbsp;查询</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>