123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- <?php
- /* Smarty version 3.1.30, created on 2018-05-07 00:09:23
- from "D:\phpStudy\WWW\workorder\application\views\templates\warning\index.html" */
- /* @var Smarty_Internal_Template $_smarty_tpl */
- if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
- 'version' => '3.1.30',
- 'unifunc' => 'content_5aef28b35bfb71_08907405',
- 'has_nocache_code' => false,
- 'file_dependency' =>
- array (
- '5cc88e7551b1564c8ed0f04bcd5247e9f17aacf8' =>
- array (
- 0 => 'D:\\phpStudy\\WWW\\workorder\\application\\views\\templates\\warning\\index.html',
- 1 => 1525622960,
- 2 => 'file',
- ),
- ),
- 'includes' =>
- array (
- ),
- ),false)) {
- function content_5aef28b35bfb71_08907405 (Smarty_Internal_Template $_smarty_tpl) {
- if (!is_callable('smarty_modifier_date_format')) require_once 'D:\\phpStudy\\WWW\\workorder\\application\\libraries\\smarty\\plugins\\modifier.date_format.php';
- ?>
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <meta name="robots" content="noindex,nofollow">
- <title><?php echo $_smarty_tpl->tpl_vars['sys_name']->value;?>
- </title>
- <base href="<?php echo base_url();?>
- "/>
- <link href="static/css/bootstrap.min.css" rel="stylesheet">
- <link href="static/css/bootstrap-table.min.css" rel="stylesheet">
- <link href="static/css/select2.min.css" rel="stylesheet">
- <link href="static/js/skins/all.css" rel="stylesheet">
- <link rel="stylesheet" href="static/css/style.css">
- <?php echo '<script'; ?>
- language="javascript" type="text/javascript"> var SITE_URL = "/";<?php echo '</script'; ?>
- >
- <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <?php echo '<script'; ?>
- src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"><?php echo '</script'; ?>
- >
- <![endif]-->
- </head>
- <body style="background: #fff;">
- <div style="padding:10px;">
- <div class="panel panel-default grid">
- <div class="panel-body">
- <form class="form-inline" role="form" method="get">
- <input type="hidden" name="page_size" value="<?php echo $_smarty_tpl->tpl_vars['page_size']->value;?>
- ">
- <div class="pull-left">
- <div class="btn-group">
- <button type="button" class="merge" id="create_workorder" disabled>
- 批量生成工单
- </button>
- <span class="btn_line"></span>
- <button type="button" class="igrone_btn" id="igrone_select" disabled>
- 批量忽略
- </button>
- <span class="btn_line"></span>
- <button type="button" class="refresh" onclick="window.location.reload();">
- 刷新
- </button>
- </div>
- </div>
- <div class="pull-right">
- <div class="form-group">
- <select class="form-control" style="width: 120px;" name="branch_id" id="branch_id">
- <option value="">所有分支机构</option>
- <?php
- $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['branch']->value, 'val', false, 'k');
- if ($_from !== null) {
- foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['val']->value) {
- ?>
- <option value="<?php echo $_smarty_tpl->tpl_vars['val']->value['branch_id'];?>
- " <?php if ($_smarty_tpl->tpl_vars['branch_id']->value == $_smarty_tpl->tpl_vars['val']->value['branch_id']) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['val']->value['branch_name'];?>
- </option>
- <?php
- }
- }
- $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
- ?>
- </select>
- </div>
- <div class="form-group">
- <select class="form-control" name="type">
- <option value="">所有类型</option>
- <?php
- $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['warning_type']->value, 'val', false, 'k');
- if ($_from !== null) {
- foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['val']->value) {
- ?>
- <option value="<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
- " <?php if ($_smarty_tpl->tpl_vars['type']->value == $_smarty_tpl->tpl_vars['k']->value) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['val']->value;?>
- </option>
- <?php
- }
- }
- $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
- ?>
- </select>
- </div>
- <div class="form-group">
- <select class="form-control" name="status">
- <option value="">所有状态</option>
- <?php
- $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['warning_status']->value, 'val', false, 'k');
- if ($_from !== null) {
- foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['val']->value) {
- ?>
- <option value="<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
- " <?php if ($_smarty_tpl->tpl_vars['status']->value == $_smarty_tpl->tpl_vars['k']->value) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['val']->value;?>
- </option>
- <?php
- }
- }
- $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
- ?>
- </select>
- </div>
- <div class="form-group">
- <input class="form-control keyword" name="warning_name" id="warning_name" placeholder="筛选" type="text" value="<?php echo $_smarty_tpl->tpl_vars['warning_name']->value;?>
- ">
- <button type="submit" class="search">
- <i class="glyphicon glyphicon-search"></i>
- </button>
- </div>
- </div>
- </form>
- </div>
- <table id="data_table" data-toggle="table" data-search="true" class="table<?php if ($_smarty_tpl->tpl_vars['count']->value) {?> table-hover<?php }?> table-bordered">
- <thead>
- <tr>
- <th class="text-center" style="width: 40px;"><input name="check_all" class="check_all" value="true" type="checkbox"></th>
- <!--<th></th>-->
- <th class="text-center">告警名称</th>
- <th class="text-center">类型</th>
- <th class="text-center">等级</th>
- <th class="text-center">所属分支</th>
- <th class="text-center col-sm-2">内容</th>
- <th class="text-center" style="width: 180px;">时间</th>
- <th class="text-center">状态</th>
- <th class="text-center" style="width: 230px">操作</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['warning_list']->value, 'val', false, 'k');
- if ($_from !== null) {
- foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['val']->value) {
- ?>
- <tr>
- <td class="text-center"><input name="ids[]" value="<?php echo $_smarty_tpl->tpl_vars['val']->value['warning_id'];?>
- " data-branch_id="<?php echo $_smarty_tpl->tpl_vars['val']->value['branch']['branch_id'];?>
- " type="checkbox" <?php if (intval($_smarty_tpl->tpl_vars['val']->value['status']) >= 20) {?>disabled<?php }?>></td>
- <td data-searchable="true"><?php echo $_smarty_tpl->tpl_vars['val']->value['warning_name'];?>
- </td>
- <td class="text-center" data-searchable="true"><span class="level warning_type<?php echo $_smarty_tpl->tpl_vars['val']->value['type'];?>
- "><?php echo $_smarty_tpl->tpl_vars['warning_type']->value[$_smarty_tpl->tpl_vars['val']->value['type']];?>
- </span></td> <!--失陷事件、脆弱性、残余攻击-->
- <td class="text-center"><span class="level level<?php ob_start();
- echo $_smarty_tpl->tpl_vars['val']->value['level'];
- $_prefixVariable1=ob_get_clean();
- echo $_prefixVariable1;?>
- "><?php echo $_smarty_tpl->tpl_vars['warning_level']->value[$_smarty_tpl->tpl_vars['val']->value['level']];?>
- </span></td> <!--已失陷、高可疑、高危、中危、低危-->
- <td data-searchable="true"><?php if (array_key_exists($_smarty_tpl->tpl_vars['val']->value['branch']['branch_id'],$_smarty_tpl->tpl_vars['branch']->value)) {
- echo $_smarty_tpl->tpl_vars['branch']->value[$_smarty_tpl->tpl_vars['val']->value['branch']['branch_id']]['branch_name'];
- } else { ?>未配置分支<?php }?></td>
- <td class="text_over col-sm-2"><?php echo $_smarty_tpl->tpl_vars['val']->value['content'];?>
- </td>
- <td class="text-center"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['val']->value['create_time']->toDateTime(),'%Y-%m-%d %H:%M:%S');?>
- </td>
- <td class="text-center"><span class="w_status<?php echo $_smarty_tpl->tpl_vars['val']->value['status'];?>
- "><?php echo $_smarty_tpl->tpl_vars['warning_status']->value[$_smarty_tpl->tpl_vars['val']->value['status']];?>
- </span></td> <!--待审核下发、已忽略-->
- <td class="text-left">
- <!--a href="<?php echo $_smarty_tpl->tpl_vars['val']->value['url'];?>
- " target="_blank">
- 查看详情
- </a-->
- <a href="javascript:;" data-id="<?php echo $_smarty_tpl->tpl_vars['val']->value['warning_id'];?>
- " class="view_info">
- 查看详情
- </a>
- <?php if ($_smarty_tpl->tpl_vars['val']->value['status'] == 10) {?>
- <a href="javascript:;" data-id="<?php echo $_smarty_tpl->tpl_vars['val']->value['warning_id'];?>
- " class="create_work_order">
- 生成工单
- </a>
- <a href="javascript:;" data-id="<?php echo $_smarty_tpl->tpl_vars['val']->value['warning_id'];?>
- " class="igrone">
- 忽略
- </a>
- <?php }?>
- </td>
- </tr>
- <?php
- }
- }
- $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
- ?>
- <?php if (!$_smarty_tpl->tpl_vars['count']->value) {?>
- <tr>
- <td colspan="9" class="empty_table"><img src="static/images/empty_table.png"><p>暂无符合条件的数据!</p></td>
- </tr>
- <?php }?>
- </tbody>
- </table>
- <div class="panel-footer clearfix">
- <div class="form-inline">
- <div class="pull-right">
- <div class="form-group count"><?php echo $_smarty_tpl->tpl_vars['warning_status']->value["10"];?>
- :<span class="status10"><?php echo $_smarty_tpl->tpl_vars['count10']->value;?>
- </span>
- <?php echo $_smarty_tpl->tpl_vars['warning_status']->value["20"];?>
- :<span class="status20"><?php echo $_smarty_tpl->tpl_vars['count20']->value;?>
- </span>
- <?php echo $_smarty_tpl->tpl_vars['warning_status']->value["30"];?>
- :<span class="status30"><?php echo $_smarty_tpl->tpl_vars['count30']->value;?>
- </span>
- <?php echo $_smarty_tpl->tpl_vars['warning_status']->value["40"];?>
- :<span class="status40"><?php echo $_smarty_tpl->tpl_vars['count40']->value;?>
- </span> 总共<?php echo $_smarty_tpl->tpl_vars['count']->value;?>
- 条记录</div>
- <div class="form-group">
- <?php echo $_smarty_tpl->tpl_vars['page']->value;?>
- </div>
- <div class="form-group">
- <label for="page_size" class="form-control-static control-label">每页</label>
- <select class="form-control" id="page_size" name="page_size">
- <option value="10" <?php if ($_smarty_tpl->tpl_vars['page_size']->value == 10) {?>selected<?php }?>>10</option>
- <option value="20" <?php if ($_smarty_tpl->tpl_vars['page_size']->value == 20) {?>selected<?php }?>>20</option>
- <option value="50" <?php if ($_smarty_tpl->tpl_vars['page_size']->value == 50) {?>selected<?php }?>>50</option>
- <option value="100" <?php if ($_smarty_tpl->tpl_vars['page_size']->value == 100) {?>selected<?php }?>>100</option>
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/jquery.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/bootstrap.min.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/bootstrap-table.min.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/bootstrap-table-zh-CN.min.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/select2.full.min.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/icheck.min.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/layer/layer.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- language="javascript" type="text/javascript">
- var disabled_btn = "";
- $(".panel-body button:disabled").each(function () {
- disabled_btn +="#"+$(this).attr("id")+",";
- })
- disabled_btn = disabled_btn.substr(0,disabled_btn.length-1);
- $(function(){
- $("table").show();
- layer.config({
- extend: 'myskin/style.css', //加载新皮肤
- });
- $('input').iCheck({
- cursor : true,
- checkboxClass : 'icheckbox_square-blue'
- });
- $("#warning_name").on('input',function () {
- $('#data_table').bootstrapTable('resetSearch', $(this).val());
- $('input').iCheck({
- cursor : true,
- checkboxClass : 'icheckbox_square-blue'
- });
- });
- $("select").select2({minimumResultsForSearch: -1});
- $(".bootstrap-table").on('click',".view_info",function(){
- var id = $(this).data("id");
- if(id != "" && id != undefined) {
- layer.open({
- type: 2,
- title: "告警详情",
- offset: 'auto',
- shade: [0.3],
- area: ['700px','520px'],
- anim: 0,
- shadeClose:false,
- content: 'warning/view/'+id,
- });
- }else{
- layer.alert("参数错误,请刷新后重试!",{skin: 'layer-ext-myskin',icon: 5, title:'错误提示'});
- }
- });
- $(".bootstrap-table").on('click','.igrone',function () {
- var warning_id = $(this).data("id");
- layer.confirm('确定要忽略这条告警信息吗?', {skin: 'layer-ext-myskin',icon: 3, title:'提示'}, function(index){
- if(warning_id != "" && warning_id != undefined) {
- $.post(
- "warning/ignore/" + warning_id,
- function (data) {
- layer.msg(data.msg, {skin:'default',icon: data.icon,time: 3000}, function () {
- window.location.reload();
- })
- }
- )
- }else{
- layer.alert("参数错误,请刷新后重试!",{skin: 'layer-ext-myskin',icon: 5, title:'错误提示'});
- }
- layer.close(index);
- })
- });
- $(".bootstrap-table").on('click','.create_work_order',function(){
- var warning_id = $(this).data("id");
- if(warning_id != "" && warning_id != undefined) {
- layer.open({
- type: 2,
- title: "生成工单",
- offset: 'auto',
- shade: [0.3],
- area: ['900px','80%'],
- anim: 0,
- shadeClose:false,
- content: 'workorder/create?ids='+warning_id,
- end: function(){
- window.location.reload();
- }
- });
- }else{
- layer.alert("参数错误,请刷新后重试!",{skin: 'layer-ext-myskin',icon: 5, title:'错误提示'});
- }
- });
- $("#create_workorder").on('click',function () {
- var ids = "";
- var branch_id = $("input:checkbox:checked:first").data('branch_id');
- $("input:checkbox").each(function () {
- if($(this).not(":disabled").prop("checked")){
- ids += $(this).val()+",";
- if($(this).data('branch_id') != branch_id){
- branch_id = "";
- return false;
- }
- }
- });
- if(branch_id == "") {
- layer.alert("请选择在同一分支结构的工单进行批量操作!",{skin: 'layer-ext-myskin',icon: 3, title:'提示'});
- }else if(ids == ""){
- layer.alert("请选择要创建工单的告警信息",{skin: 'layer-ext-myskin',icon: 3, title:'提示'});
- }else{
- layer.open({
- type: 2,
- title: "生成工单",
- offset: 'auto',
- shade: [0.3],
- area: ['900px','75%'],
- anim: 0,
- shadeClose:false,
- content: 'workorder/create?ids='+ids,
- end: function(){
- window.location.reload();
- }
- });
- }
- });
- $("#igrone_select").on('click',function () {
- var ids = "";
- $("input:checkbox").each(function () {
- if($(this).not(":disabled").prop("checked")){
- ids += $(this).val()+",";
- }
- });
- if(ids == ""){
- layer.alert("请选择要忽略的告警信息",{skin: 'layer-ext-myskin',icon: 3, title:'提示'});
- }else{
- layer.confirm('确定要忽略这条告警信息吗?', {skin: 'layer-ext-myskin',icon: 3, title:'提示'}, function(index){
- $.post(
- "warning/ignoreselect/",{'warning_ids':ids},
- function (data) {
- layer.msg(data.msg, {icon: data.icon,time: 3000}, function () {
- window.location.reload();
- })
- }
- );
- layer.close(index);
- })
- }
- });
- $(".bootstrap-table").on('ifChecked','.check_all',function () {
- $("input:checkbox").not(':disabled').iCheck('check');
- }).on('ifUnchecked','.check_all',function () {
- $("input:checkbox").not(':disabled').iCheck('uncheck');
- });
- $(".bootstrap-table").on('ifChanged','input:checkbox',function(){
- var ids ="";
- $("input:checkbox").each(function () {
- if($(this).not(":disabled").prop("checked")){
- ids += $(this).val()+",";
- }
- });
- if(ids != "" && ids != undefined){
- $(disabled_btn).removeAttr("disabled");
- }else{
- $(disabled_btn).attr("disabled","disabled");
- }
- })
- $("#page_size").change(function () {
- var page_size = $(this).val();
- window.location.href = "warning/index?page_size="+page_size;
- });
- $(".form-inline select").on("change",function(e) {
- if($(this).attr("id") != "page_size") {
- $(".form-inline").submit();
- }
- })
- })
- <?php echo '</script'; ?>
- >
- </body>
- </html><?php }
- }
|