123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395 |
- <?php
- /* Smarty version 3.1.30, created on 2018-05-07 00:09:42
- from "D:\phpStudy\WWW\workorder\application\views\templates\appauth\index.html" */
- /* @var Smarty_Internal_Template $_smarty_tpl */
- if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
- 'version' => '3.1.30',
- 'unifunc' => 'content_5aef28c6056616_99715988',
- 'has_nocache_code' => false,
- 'file_dependency' =>
- array (
- '44b51e107c4ce235f0533596358218a51debb878' =>
- array (
- 0 => 'D:\\phpStudy\\WWW\\workorder\\application\\views\\templates\\appauth\\index.html',
- 1 => 1524911967,
- 2 => 'file',
- ),
- ),
- 'includes' =>
- array (
- ),
- ),false)) {
- function content_5aef28c6056616_99715988 (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/js/skins/all.css" rel="stylesheet">
- <link href="static/css/select2.min.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="add" id="add_appauth">
- 增加应用授权
- </button>
- <span class="btn_line"></span>
- <button type="button" class="disable" id="disable_appauth" disabled>
- 批量禁用
- </button>
- <button type="button" class="enable" id="enable_appauth" 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" name="status">
- <option value="">所有状态</option>
- <?php
- $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['appauth_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="keyword" id="keyword" placeholder="筛选" type="text" value="<?php echo $_smarty_tpl->tpl_vars['keyword']->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">APPID</th>
- <th class="text-center">状态</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['appauth_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['app_id'];?>
- " type="checkbox"></td>
- <td><?php echo $_smarty_tpl->tpl_vars['val']->value['app_name'];?>
- </td>
- <td><?php echo $_smarty_tpl->tpl_vars['val']->value['app_id'];?>
- </td>
- <td class="text-center"><span class="status<?php echo $_smarty_tpl->tpl_vars['val']->value['status'];?>
- "><?php echo $_smarty_tpl->tpl_vars['appauth_status']->value[$_smarty_tpl->tpl_vars['val']->value['status']];?>
- </span></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>
- <a href="javascript:;" data-id="<?php echo $_smarty_tpl->tpl_vars['val']->value['app_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['app_id'];?>
- " class="stop_use">
- 禁用
- </a>
- <?php }?>
- <?php if ($_smarty_tpl->tpl_vars['val']->value['status'] == "40") {?>
- <a href="javascript:;" data-id="<?php echo $_smarty_tpl->tpl_vars['val']->value['app_id'];?>
- " class="restore">
- 启用
- </a>
- <?php }?>
- <a href="javascript:;" data-id="<?php echo $_smarty_tpl->tpl_vars['val']->value['app_id'];?>
- " class="delete">
- 删除
- </a>
- </td>
- </tr>
- <?php
- }
- }
- $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
- ?>
- <?php if (!$_smarty_tpl->tpl_vars['count']->value) {?>
- <tr>
- <td colspan="6" 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['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/icheck.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/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();
- $('input').iCheck({
- cursor : true,
- checkboxClass : 'icheckbox_square-blue'
- });
- $("select").select2({minimumResultsForSearch: -1});
- layer.config({
- extend: 'myskin/style.css', //加载新皮肤
- });
- $("#keyword").on('input',function () {
- $('#data_table').bootstrapTable('resetSearch', $(this).val());
- $('input').iCheck({
- cursor : true,
- checkboxClass : 'icheckbox_square-blue'
- });
- });
- $("#add_appauth").click(function () {
- parent.$('#mainFrameTabs').bTabsAdd("tab21","新增应用授权","appauth/add");
- })
- $(".bootstrap-table").on('click',".delete",function () {
- var id = $(this).data("id");
- layer.confirm("确定要删除该应用授权吗?删除后该应用将不能与系统通讯!", {skin: 'layer-ext-myskin',icon: 3, title:'提示'}, function(index){
- if(id != "" && id != undefined) {
- $.post(
- "appauth/delete/" + id,
- function (data) {
- layer.msg(data.msg, {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',".stop_use",function () {
- var id = $(this).data("id");
- layer.confirm("确定要停用该应用授权吗?停用后该应用将不能与系统通讯!", {skin: 'layer-ext-myskin',icon: 3, title:'提示'}, function(index){
- if(id != "" && id != undefined) {
- $.post(
- "appauth/stopuse/" + id,
- function (data) {
- layer.msg(data.msg, {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',".restore",function () {
- var id = $(this).data("id");
- if(id != "" && id != undefined) {
- $.post(
- "appauth/restore/" + id,
- function (data) {
- layer.msg(data.msg, {icon: data.icon,time: 3000}, function () {
- window.location.reload();
- })
- }
- )
- }else{
- layer.alert("参数错误,请刷新后重试!",{skin: 'layer-ext-myskin',icon: 5, title:'错误提示'});
- }
- })
- $(".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: ['800px', '400px'],
- anim: 0,
- shadeClose: false,
- content: 'appauth/view/' + id,
- end: function () {
- window.location.reload();
- }
- });
- } else {
- layer.alert("参数错误,请刷新后重试!", {skin: 'layer-ext-myskin',icon: 5, title:'错误提示'});
- }
- })
- $(".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");
- }
- })
- $("#disable_appauth").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(
- "appauth/disableall",{'ids':ids},
- function (data) {
- layer.msg(data.msg, {icon: data.icon,time: 3000}, function () {
- window.location.reload();
- })
- }
- )
- layer.close(index);
- })
- }
- })
- $("#enable_appauth").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(
- "appauth/enableall",{'ids':ids},
- function (data) {
- layer.msg(data.msg, {icon: data.icon,time: 3000}, function () {
- window.location.reload();
- })
- }
- )
- layer.close(index);
- })
- }
- })
- $("#page_size").change(function () {
- var page_size = $(this).val();
- window.location.href = "appauth/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 }
- }
|