Merge branch 'dev_lxw' of https://whyclj@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
| | |
| | | overflow:hidden;
|
| | | }
|
| | | #tbHead table{
|
| | | width: 100%;
|
| | | position:absolute;
|
| | | border-collapse:collapse;
|
| | | }
|
| | |
| | | overflow:scroll;
|
| | | }
|
| | | #staff-infor table{
|
| | | width: 100%;
|
| | | position:absolute;
|
| | | border-collapse:collapse;
|
| | | top:-28px;
|
| | |
| | | <div class="layui-input-inline">
|
| | | <div class="layui-form" lay-filter="cityFilter">
|
| | | <select name="city" id="city" lay-filter="city">
|
| | | <option value="">请选择市/区</option>
|
| | | <option value="">请选择市</option>
|
| | | </select>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-input-inline">
|
| | | <div class="layui-form" lay-filter="countyFilter">
|
| | | <select name="county" id="county" lay-filter="county">
|
| | | <option value="">请选择区/县</option>
|
| | | </select>
|
| | | </div>
|
| | | </div>
|
| | |
| | | var obj = {};
|
| | | obj.StationName1 = '';
|
| | | obj.StationName2 = '';
|
| | | obj.StationName5 = '';
|
| | | obj.StationName3 = '';
|
| | | obj.BattGroupName = '';
|
| | | obj.BattGroupId = data.BattGroupId;
|
| | |
| | |
|
| | | // 构造生成表格数据的方法
|
| | | function formaterTblData(data) {
|
| | | console.log(data);
|
| | | //console.log(data);
|
| | | var rs = []; // 结果集
|
| | |
|
| | | // 遍历查询的结果根据查询结果生成指定的格式
|
| | |
| | | }
|
| | |
|
| | | // 查询省下拉框
|
| | | var filterLoad = layer.load();
|
| | | searchProvince();
|
| | | // 查询省
|
| | | function searchProvince() {
|
| | |
| | | // 切换省-市
|
| | | form.on('select(province)', function(data) {
|
| | | // 查询市
|
| | | searchCity();
|
| | | searchCity(true);
|
| | | });
|
| | |
|
| | | // 查询市
|
| | | function searchCity() {
|
| | | function searchCity(isLoad) {
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1: $("#province").val()
|
| | |
| | | createLayuiSelect(ele, list);
|
| | | form.render('select', 'cityFilter');
|
| | |
|
| | | // 查询区/县
|
| | | searchCounty();
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | // 查询区/县
|
| | | function searchCounty(isLoad) {
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1: $("#province").val(),
|
| | | StationName2: $("#city").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 根据构造条件查询内容
|
| | | $.ajax({
|
| | | type: 'post',
|
| | | async: true,
|
| | | url: 'BattInfAction!serchStationName5',
|
| | | dataType: 'json',
|
| | | data: "json = "+JSON.stringify(tmp),
|
| | | success: function(result) {
|
| | | var rs = JSON.parse(result.result);
|
| | | var list = []; // option结果集
|
| | | var ele = $('#county'); // 目标select
|
| | | if(rs.code == 1) {
|
| | | var data = rs.data;
|
| | | list.push(getLayuiSelect('请选择区/县', '', {}, undefined));
|
| | | // 遍历查询结果
|
| | | for(var i=0; i<data.length; i++) {
|
| | | var _data = data[i];
|
| | | var _tmp = getLayuiSelect(_data.StationName5, _data.StationName5, {}, _data);
|
| | | list.push(_tmp);
|
| | | }
|
| | | }else {
|
| | | list.push(getLayuiSelect('暂无区/县', '', {}, undefined));
|
| | | }
|
| | | |
| | | // 根据对象数组生成下拉列表
|
| | | createLayuiSelect(ele, list);
|
| | | form.render('select', 'countyFilter');
|
| | | |
| | | // 查询机房
|
| | | searchHome();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | // 切换市-机房
|
| | | |
| | | // 切换市-区/县
|
| | | form.on('select(city)', function(data) {
|
| | | // 查询区/县
|
| | | searchCounty(true);
|
| | | });
|
| | | |
| | | // 切换区/县-机房
|
| | | form.on('select(county)', function(data) {
|
| | | // 查询机房
|
| | | searchHome();
|
| | | searchHome(true);
|
| | | });
|
| | |
|
| | | // 查询机房
|
| | | function searchHome() {
|
| | | function searchHome(isLoad) {
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1:$("#province").val(),
|
| | | StationName2:$("#city").val()
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#county").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 根据构造条件查询内容
|
| | | $.ajax({
|
| | | type: 'post',
|
| | |
| | | // 切换机房-电池组
|
| | | form.on('select(home)', function(data) {
|
| | | // 查询电池组
|
| | | searchGroup();
|
| | | searchGroup(true);
|
| | | });
|
| | |
|
| | | // 查询机房
|
| | | function searchGroup() {
|
| | | function searchGroup(isLoad) {
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1:$("#province").val(),
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#county").val(),
|
| | | StationName: $("#home").val(),
|
| | | StationId: $("#home").find('option:selected').attr('stationid')
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 根据构造条件查询内容
|
| | | $.ajax({
|
| | | type: 'post',
|
| | |
| | | list.push(getLayuiSelect('暂无机房', '', {}, undefined));
|
| | | }
|
| | |
|
| | | layer.close(filterLoad);
|
| | | // 根据对象数组生成下拉列表
|
| | | createLayuiSelect(ele, list);
|
| | | form.render('select', 'groupFilter');
|
| | |
| | | <link href="css/basic.css" type="text/css" rel="stylesheet" />
|
| | | <link href="css/staffInfor.css" type="text/css" rel="stylesheet" />
|
| | | <link href="css/confirm.css" type="text/css" rel="stylesheet" />
|
| | | <link href="src/css/layui.css" type="text/css" rel="stylesheet">
|
| | | <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
|
| | | <!-- <script type="text/javascript" src="js/base.js"></script> -->
|
| | | <style>
|
| | |
| | | </body>
|
| | | <script type="text/javascript" src="js/createTab.js"></script>
|
| | | <script type="text/javascript" src="js/myConfirm.js"></script>
|
| | | <script type="text/javascript" src="src/layui.all.js"></script>
|
| | | <script type="text/javascript">
|
| | | var permits;
|
| | | <% Object obj=session.getAttribute("permits");
|
| | |
| | |
|
| | | $(document).ready(function(){
|
| | | searchUser_inf();
|
| | | |
| | | $(window).resize(function() {
|
| | | setTblWidth($('#tbHead'), $('#staff-infor'));
|
| | | });
|
| | | });
|
| | |
|
| | | var User_all;
|
| | | function searchUser_inf(){
|
| | | userlist=new Array();
|
| | | // 生成等待框
|
| | | //createWait($('#staff-infor'));
|
| | | //createAllMask($('body'),0); |
| | | var load = layer.load(1); |
| | | $.post("User_infAction!searchAll",$('#search_form').serialize(),function(data){
|
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | |
| | | //生成用户表格
|
| | | createTable('tbHead','tbFixed',newArrTh.length,newArrTh,newArrTd);
|
| | | createTable('staff-infor','tbScroll',newArrTh.length,newArrTh,newArrTd);
|
| | | var tblScroll=$('#staff-infor').scrollLeft();
|
| | | $('#tbHead table').css('left',-tblScroll);
|
| | | //console.info(Page);
|
| | | setTblWidth($('#tbHead'), $('#staff-infor'));
|
| | | }else{
|
| | | User_all=undefined;
|
| | | uidlist=undefined;
|
| | |
| | | $('#total').text(0);
|
| | | }
|
| | |
|
| | | //$('#staff-infor .wait').remove();
|
| | | //$('body').children('.mask').remove();
|
| | | layer.close(load);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | <div class="layui-input-inline">
|
| | | <div class="layui-form" lay-filter="cityFilter">
|
| | | <select name="city" id="city" lay-filter="city">
|
| | | <option value="">请选择市/区</option>
|
| | | <option value="">请选择市</option>
|
| | | </select>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-input-inline">
|
| | | <div class="layui-form" lay-filter="countyFilter">
|
| | | <select name="county" id="county" lay-filter="county">
|
| | | <option value="">请选择区/县</option>
|
| | | </select>
|
| | | </div>
|
| | | </div>
|
| | |
| | | <option value="">请选择机房</option>
|
| | | </select>
|
| | | </div>
|
| | | |
| | | </div>
|
| | | <div class="layui-input-inline">
|
| | | <div class="layui-form" lay-filter="groupFilter">
|
| | |
| | | var obj = {};
|
| | | obj.StationName1 = '';
|
| | | obj.StationName2 = '';
|
| | | obj.StationName5 = '';
|
| | | obj.StationName3 = '';
|
| | | obj.BattGroupName = '';
|
| | | obj.BattGroupId = data.BattGroupId;
|
| | |
| | | }
|
| | |
|
| | | // 查询省下拉框
|
| | | var filterLoad = layer.load();
|
| | | searchProvince();
|
| | | // 查询省
|
| | | function searchProvince() {
|
| | |
| | | // 切换省-市
|
| | | form.on('select(province)', function(data) {
|
| | | // 查询市
|
| | | searchCity();
|
| | | searchCity(true);
|
| | | });
|
| | |
|
| | | // 查询市
|
| | | function searchCity() {
|
| | | function searchCity(isLoad) {
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1: $("#province").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 根据构造条件查询内容
|
| | | $.ajax({
|
| | | type: 'post',
|
| | |
| | | var ele = $('#city'); // 目标select
|
| | | if(rs.code == 1) {
|
| | | var data = rs.data;
|
| | | list.push(getLayuiSelect('请选择市/区', '', {}, undefined));
|
| | | list.push(getLayuiSelect('请选择市', '', {}, undefined));
|
| | | // 遍历查询结果
|
| | | for(var i=0; i<data.length; i++) {
|
| | | var _data = data[i];
|
| | |
| | | list.push(_tmp);
|
| | | }
|
| | | }else {
|
| | | list.push(getLayuiSelect('暂无市/区', '', {}, undefined));
|
| | | list.push(getLayuiSelect('暂无市', '', {}, undefined));
|
| | | }
|
| | |
|
| | | // 根据对象数组生成下拉列表
|
| | | createLayuiSelect(ele, list);
|
| | | form.render('select', 'cityFilter');
|
| | | // 查询区/县
|
| | | searchCounty();
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | // 查询区/县
|
| | | function searchCounty(isLoad) {
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1: $("#province").val(),
|
| | | StationName2: $("#city").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 根据构造条件查询内容
|
| | | $.ajax({
|
| | | type: 'post',
|
| | | async: true,
|
| | | url: 'BattInfAction!serchStationName5',
|
| | | dataType: 'json',
|
| | | data: "json = "+JSON.stringify(tmp),
|
| | | success: function(result) {
|
| | | var rs = JSON.parse(result.result);
|
| | | var list = []; // option结果集
|
| | | var ele = $('#county'); // 目标select
|
| | | if(rs.code == 1) {
|
| | | var data = rs.data;
|
| | | list.push(getLayuiSelect('请选择区/县', '', {}, undefined));
|
| | | // 遍历查询结果
|
| | | for(var i=0; i<data.length; i++) {
|
| | | var _data = data[i];
|
| | | var _tmp = getLayuiSelect(_data.StationName5, _data.StationName5, {}, _data);
|
| | | list.push(_tmp);
|
| | | }
|
| | | }else {
|
| | | list.push(getLayuiSelect('暂无区/县', '', {}, undefined));
|
| | | }
|
| | | |
| | | // 根据对象数组生成下拉列表
|
| | | createLayuiSelect(ele, list);
|
| | | form.render('select', 'countyFilter');
|
| | |
|
| | | // 查询机房
|
| | | searchHome();
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | // 切换市-机房
|
| | | |
| | | // 切换市-区/县
|
| | | form.on('select(city)', function(data) {
|
| | | // 查询区/县
|
| | | searchCounty(true);
|
| | | });
|
| | | |
| | | // 切换区/县-机房
|
| | | form.on('select(county)', function(data) {
|
| | | // 查询机房
|
| | | searchHome();
|
| | | searchHome(true);
|
| | | });
|
| | |
|
| | | // 查询机房
|
| | | function searchHome() {
|
| | | function searchHome(isLoad) {
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1:$("#province").val(),
|
| | | StationName2:$("#city").val()
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#county").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 根据构造条件查询内容
|
| | | $.ajax({
|
| | | type: 'post',
|
| | |
| | | });
|
| | |
|
| | | // 查询机房
|
| | | function searchGroup() {
|
| | | function searchGroup(isLoad) {
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1:$("#province").val(),
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#county").val(),
|
| | | StationName: $("#home").val(),
|
| | | StationId: $("#home").find('option:selected').attr('stationid')
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 根据构造条件查询内容
|
| | | $.ajax({
|
| | | type: 'post',
|
| | |
| | | list.push(_tmp);
|
| | | }
|
| | | }else {
|
| | | list.push(getLayuiSelect('暂无机房', '', {}, undefined));
|
| | | list.push(getLayuiSelect('暂无电池组', '', {}, undefined));
|
| | | }
|
| | |
|
| | | layer.close(filterLoad);
|
| | | // 根据对象数组生成下拉列表
|
| | | createLayuiSelect(ele, list);
|
| | | form.render('select', 'groupFilter');
|