chore: 增加查询密码管理
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="item-title">
|
||||
<ul class="tab-base nc-row">
|
||||
<li>
|
||||
<a href="{:url('Project/users_index')}" {if condition="in_array($Think.const.ACTION_NAME, ['users_index','level_index','attr_index','users_config'])"}class="current"{/if}>
|
||||
<a href="{:url('Project/users_index')}" {if condition="in_array($Think.const.ACTION_NAME, ['users_index','level_index', 'password_index', 'attr_index','users_config'])"}class="current"{/if}>
|
||||
<span>项目列表</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
<input type="button" class="btn {if condition="!in_array($Request.action, ['level_index','level_add','level_edit'])"}current{else/}selected{/if}" value="服务商管理" onclick="window.location.href='{:url("Project/level_index")}';">
|
||||
</label>
|
||||
{/eq}
|
||||
{eq name="'Project@password_index'|is_check_access" value="1"}
|
||||
<label class="member-nav-item">
|
||||
<input type="button" class="btn {if condition="!in_array($Request.action, ['password_index','password_add','password_edit'])"}current{else/}selected{/if}" value="查询密码" onclick="window.location.href='{:url("Project/password_index")}';">
|
||||
</label>
|
||||
{/eq}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
93
src/application/admin/template/project/password_add.htm
Normal file
93
src/application/admin/template/project/password_add.htm
Normal file
@@ -0,0 +1,93 @@
|
||||
{include file="public/layout" /}
|
||||
|
||||
<body class="bodystyle" style="overflow-y: scroll;">
|
||||
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
|
||||
<div id="append_parent"></div>
|
||||
<div id="ajaxwaitid"></div>
|
||||
<div class="page">
|
||||
<form class="form-horizontal" id="post_form" action="{:url('Project/password_add')}" method="post">
|
||||
<div class="ncap-form-default">
|
||||
<dl class="row">
|
||||
<dt class="tit"> <label for="password"><em>*</em>查询密码</label> </dt>
|
||||
<dd class="opt">
|
||||
<input type="text" name="password" id="password" class="input-txt" value="{$info['password']|default=''}" autocomplete="off">
|
||||
<span class="err"></span>
|
||||
<p class="notic2 red" id="password_tips">请输入查询密码</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="row">
|
||||
<dt class="tit"> <label for="allow_keywords">允许查询关键字</label> </dt>
|
||||
<dd class="opt">
|
||||
<textarea name="allow_keywords" id="allow_keywords" class="input-txt" rows="4" cols="60">{$info['allow_keywords']|default=''}</textarea>
|
||||
<span class="err"></span>
|
||||
<p class="notic2 red" id="allow_keywords_tips">多个关键字用逗号分隔,留空表示不限制</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="row">
|
||||
<dt class="tit"> <label for="deny_keywords">禁止查询关键字</label> </dt>
|
||||
<dd class="opt">
|
||||
<textarea name="deny_keywords" id="deny_keywords" class="input-txt" rows="4" cols="60">{$info['deny_keywords']|default=''}</textarea>
|
||||
<span class="err"></span>
|
||||
<p class="notic2 red" id="deny_keywords_tips">多个关键字用逗号分隔,留空表示不限制</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="row">
|
||||
<dt class="tit"> <label for="status">状态</label> </dt>
|
||||
<dd class="opt">
|
||||
<label><input type="radio" name="status" value="1" {if condition="$info['status'] eq 1 OR !isset($info['status'])"}checked{/if}> 启用</label>
|
||||
<label><input type="radio" name="status" value="0" {if condition="isset($info['status']) AND $info['status'] eq 0"}checked{/if}> 禁用</label>
|
||||
<span class="err"></span>
|
||||
<p class="notic2 red" id="status_tips"></p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<input type="hidden" value="{$id}" name="id">
|
||||
|
||||
<div class="bot"><a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
||||
|
||||
// 判断输入框是否为空
|
||||
function checkForm(){
|
||||
if($('input[name=password]').val() == ''){
|
||||
layer.msg('查询密码不能为空!', {icon: 2,time: 1000});
|
||||
return false;
|
||||
}
|
||||
|
||||
layer_loading('正在处理');
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : "{:url('Project/password_add', ['_ajax'=>1])}",
|
||||
data : $('#post_form').serialize(),
|
||||
dataType : 'json',
|
||||
success : function(res) {
|
||||
layer.closeAll();
|
||||
if (1 == res.code) {
|
||||
var _parent = parent;
|
||||
_parent.layer.close(parentObj);
|
||||
_parent.layer.msg(res.msg, {icon: 1, shade: 0.3, time: 1000}, function() {
|
||||
_parent.window.location.reload();
|
||||
});
|
||||
} else {
|
||||
showErrorMsg(res.msg);
|
||||
}
|
||||
},
|
||||
error: function(e) {
|
||||
layer.closeAll();
|
||||
showErrorAlert(e.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//因为他们要拖动,所以尽量设置他们的文字不能选择。
|
||||
$( ".sort-list" ).disableSelection();
|
||||
</script>
|
||||
|
||||
{include file="public/footer" /}
|
||||
272
src/application/admin/template/project/password_index.htm
Normal file
272
src/application/admin/template/project/password_index.htm
Normal file
@@ -0,0 +1,272 @@
|
||||
{include file="public/layout" /}
|
||||
|
||||
<body class="bodystyle" style="overflow-y: scroll; cursor: default; -moz-user-select: inherit;">
|
||||
<div id="append_parent"></div>
|
||||
<div id="ajaxwaitid"></div>
|
||||
<div class="page">
|
||||
<div class="flexigrid">
|
||||
|
||||
<div class="mDiv">
|
||||
<div class="ftitle">
|
||||
<div class="member-nav-group">
|
||||
{eq name="'Project@users_index'|is_check_access" value="1"}
|
||||
<label class="member-nav-item">
|
||||
<input type="button" class="btn {if condition="!in_array($Request.action, ['users_index','users_add','users_edit'])"}current{else/}selected{/if}" value="应用管理" onclick="window.location.href='{:url("Project/users_index")}';">
|
||||
</label>
|
||||
{/eq}
|
||||
{eq name="'Project@level_index'|is_check_access" value="1"}
|
||||
<label class="member-nav-item">
|
||||
<input type="button" class="btn {if condition="!in_array($Request.action, ['level_index','level_add','level_edit'])"}current{else/}selected{/if}" value="服务商管理" onclick="window.location.href='{:url("Project/level_index")}';">
|
||||
</label>
|
||||
{/eq}
|
||||
{eq name="'Project@password_index'|is_check_access" value="1"}
|
||||
<label class="member-nav-item">
|
||||
<input type="button" class="btn {if condition="!in_array($Request.action, ['password_index','password_add','password_edit'])"}current{else/}selected{/if}" value="查询密码" onclick="window.location.href='{:url("Project/password_index")}';">
|
||||
</label>
|
||||
{/eq}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<form class="navbar-form form-inline" id="searchForm" action="{:url('Project/password_index')}" method="get" onsubmit="layer_loading('正在处理');">
|
||||
<div class="sDiv">
|
||||
<div class="sDiv2 fl" style="margin-right: 6px;">
|
||||
<input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="搜索查询密码...">
|
||||
<input type="submit" class="btn" value="搜索">
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="ftitle">
|
||||
<div class="fbutton">
|
||||
<a href="javascript:void(0);" data-href="{:url('Project/password_add')}" onclick="openFullframe(this, '新增查询密码', '100%', '100%');">
|
||||
<div class="add">
|
||||
<span><i class="layui-icon layui-icon-addition"></i>新增查询密码</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hDiv">
|
||||
<div class="hDivBox">
|
||||
<table cellspacing="0" cellpadding="0" style="width: 100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 5%">
|
||||
<div class="tc"><input type="checkbox" class="checkAll"></div>
|
||||
</th>
|
||||
<th abbr="password" axis="col3" style="width: 15%">
|
||||
<div class="tc">查询密码</div>
|
||||
</th>
|
||||
<th abbr="allow_keywords" axis="col4" style="width: 20%">
|
||||
<div class="tc">允许查询关键字</div>
|
||||
</th>
|
||||
<th abbr="deny_keywords" axis="col4" style="width: 20%">
|
||||
<div class="tc">禁止查询关键字</div>
|
||||
</th>
|
||||
<th abbr="status" axis="col4" class="" style="width: 10%">
|
||||
<div class="tc">状态</div>
|
||||
</th>
|
||||
<th abbr="createtime" axis="col4" style="width: 15%">
|
||||
<div class="tc">创建时间</div>
|
||||
</th>
|
||||
<th abbr="updatetime" axis="col4" style="width: 15%">
|
||||
<div class="tc">更新时间</div>
|
||||
</th>
|
||||
<th axis="col1" style="width: 15%">
|
||||
<div class="tc">操作</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{empty name="list"}
|
||||
<tr>
|
||||
<td align="center" colspan="8" style="width: 5%;text-align: center;padding-top: 20px;">
|
||||
<i class="fa fa-exclamation-circle"></i>没有符合条件的记录
|
||||
</td>
|
||||
</tr>
|
||||
{else/}
|
||||
{foreach name="list" item="vo" key="k"}
|
||||
<tr>
|
||||
<td style="width: 5%">
|
||||
<div class="tc">
|
||||
<input type="checkbox" name="ids[]" value="{$vo.id}" class="checkItem">
|
||||
</div>
|
||||
</td>
|
||||
<td abbr="password" axis="col3" style="width: 15%">
|
||||
<div class="tc">{$vo.password}</div>
|
||||
</td>
|
||||
<td abbr="allow_keywords" axis="col4" style="width: 20%">
|
||||
<div class="tc">{$vo.allow_keywords|default='无'}</div>
|
||||
</td>
|
||||
<td abbr="deny_keywords" axis="col4" style="width: 20%">
|
||||
<div class="tc">{$vo.deny_keywords|default='无'}</div>
|
||||
</td>
|
||||
<td abbr="status" axis="col4" class="" style="width: 10%">
|
||||
<div class="tc">
|
||||
{if condition="$vo.status eq 1"}
|
||||
<span class="yes" onclick="changeStatus(this, {$vo.id}, 0);">启用</span>
|
||||
{else /}
|
||||
<span class="no" onclick="changeStatus(this, {$vo.id}, 1);">禁用</span>
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
<td abbr="createtime" axis="col4" style="width: 15%">
|
||||
<div class="tc">{$vo.createtime|date='Y-m-d H:i:s',###}</div>
|
||||
</td>
|
||||
<td abbr="updatetime" axis="col4" style="width: 15%">
|
||||
<div class="tc">{$vo.updatetime|date='Y-m-d H:i:s',###|default='无'}</div>
|
||||
</td>
|
||||
<td axis="col1" style="width: 15%">
|
||||
<div style="text-align: center">
|
||||
<a data-href="{:url('Project/password_add',array('id'=>$vo['id']))}" data-closereload="1" onclick="openFullframe(this, '编辑', '100%', '100%');" class="btn blue">编辑</a>
|
||||
<i></i>
|
||||
<a class="btn red" href="javascript:void(0);" data-url="{:url('Project/password_del')}" data-id="{$vo.id}" onClick="del(this);">删除</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/empty}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="iDiv" style="display: none;"></div>
|
||||
</div>
|
||||
<div class="footer-oper">
|
||||
<span class="ml15">
|
||||
<input type="checkbox" class="checkAll">
|
||||
</span>
|
||||
<div class="nav-dropup">
|
||||
<a onclick="batch_del(this, 'ids');" data-url="{:url('Project/password_batch_del')}" class="layui-btn layui-btn-primary">
|
||||
<div class="add" title="批量删除">
|
||||
<span>批量删除</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{include file="public/page" /}
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$('input[name*=ids]').click(function(){
|
||||
if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
|
||||
$('.checkAll').prop('checked','checked');
|
||||
} else {
|
||||
$('.checkAll').prop('checked', false);
|
||||
}
|
||||
});
|
||||
$('input[type=checkbox].checkAll').click(function(){
|
||||
$('input[type=checkbox]').prop('checked',this.checked);
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){
|
||||
// 表格行点击选中切换
|
||||
$('#flexigrid > table>tbody >tr').click(function(){
|
||||
$(this).toggleClass('trSelected');
|
||||
});
|
||||
|
||||
// 点击刷新数据
|
||||
$('.fa-refresh').click(function(){
|
||||
location.href = location.href;
|
||||
});
|
||||
});
|
||||
|
||||
// 删除
|
||||
function del(obj){
|
||||
var url = $(obj).attr('data-url');
|
||||
var id = $(obj).attr('data-id');
|
||||
layer.confirm('确定要删除吗?', {
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
btn: ['确定','取消']
|
||||
}, function(){
|
||||
layer_loading('正在处理');
|
||||
// 确定
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : url,
|
||||
data : {del_id:id, _ajax:1},
|
||||
dataType : 'json',
|
||||
success : function(data){
|
||||
layer.closeAll();
|
||||
if(data.code == 1){
|
||||
layer.msg(data.msg, {icon: 1});
|
||||
window.location.reload();
|
||||
}else{
|
||||
layer.alert(data.msg, {icon: 2, title:false});
|
||||
}
|
||||
}
|
||||
})
|
||||
}, function(index){
|
||||
layer.close(index);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 批量删除提交
|
||||
function batch_del(obj, name) {
|
||||
var a = [];
|
||||
$('input[name^='+name+']:checked').each(function(i,o){
|
||||
a.push($(o).val());
|
||||
})
|
||||
if(a.length == 0){
|
||||
layer.alert('请至少选择一项', {icon: 2, title:false});
|
||||
return;
|
||||
}
|
||||
// 删除按钮
|
||||
layer.confirm('此操作不可恢复,确认批量彻底删除?', {
|
||||
title: false,
|
||||
btn: ['确定', '取消'] //按钮
|
||||
}, function () {
|
||||
layer_loading('正在处理');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $(obj).attr('data-url'),
|
||||
data: {del_id:a, _ajax:1},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
layer.closeAll();
|
||||
if(data.code == 1){
|
||||
layer.msg(data.msg, {icon: 1});
|
||||
window.location.reload();
|
||||
}else{
|
||||
layer.alert(data.msg, {icon: 2, title:false});
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
layer.closeAll();
|
||||
layer.alert(ey_unknown_error, {icon: 2, title:false});
|
||||
}
|
||||
});
|
||||
}, function (index) {
|
||||
layer.closeAll(index);
|
||||
});
|
||||
}
|
||||
|
||||
// 修改状态
|
||||
function changeStatus(obj, id, status) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:url('Project/password_change_status')}";
|
||||
data: {id: id, status: status, _ajax: 1},
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layer.msg(res.msg, {icon: 1, time: 1000}, function(){
|
||||
window.location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2, time: 2000});
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
layer.msg('网络错误', {icon: 2, time: 2000});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
{include file="public/footer" /}
|
||||
@@ -19,6 +19,11 @@
|
||||
<input type="button" class="btn {if condition="!in_array($Request.action, ['level_index','level_add','level_edit'])"}current{else/}selected{/if}" value="服务商管理" onclick="window.location.href='{:url("Project/level_index")}';">
|
||||
</label>
|
||||
{/eq}
|
||||
{eq name="'Project@password_index'|is_check_access" value="1"}
|
||||
<label class="member-nav-item">
|
||||
<input type="button" class="btn {if condition="!in_array($Request.action, ['password_index','password_add','password_edit'])"}current{else/}selected{/if}" value="查询密码" onclick="window.location.href='{:url("Project/password_index")}';">
|
||||
</label>
|
||||
{/eq}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user