Merge remote-tracking branch 'origin/dev' into dev

dev
zhaocheng 5 years ago
commit c5ef7b9ec4
  1. 5
      frontend/controllers/CommonController.php
  2. 3
      frontend/views/common/call-phone.php
  3. 3
      frontend/views/common/index.php
  4. 20
      frontend/views/menu/edit.php
  5. 121
      frontend/views/permissions/permission.php

@ -385,6 +385,9 @@ class CommonController extends \yii\web\Controller
}
public function actionCallPhone() {
return $this->render('call-phone');
$user_info = $this->my;
return $this->render('call-phone',[
'user_info' => $user_info
]);
}
}

@ -55,6 +55,7 @@ use \common\libs\MyLib;
$(".btn-stop").click(function(){
sendMsg('ATH');
});
wsInit();
})
</script>
<script>
@ -180,7 +181,7 @@ use \common\libs\MyLib;
var number_one = phone;
$.get('/phone/ax-out',{'phone':number_one,'user_id':'1'},function(obj){
$.get('/phone/ax-out',{'phone':number_one,'user_id':'<?=$user_info->id?>'},function(obj){
if(obj.success) {

@ -91,6 +91,9 @@
</ul>
</div>
<a href="/common/logout" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
<a class="navbar-minimalize minimalize-styl-2 btn btn-success roll-right" href="#" style="position:fixed;bottom:40px;">
<i class="fa fa-bars"></i>
</a>
</div>
<div class="row J_mainContent" id="content-main">
<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="/common/welcome" frameborder="0" data-id="index_v1.html" seamless></iframe>

@ -13,12 +13,12 @@ use \common\libs\MyLib;
<form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="id" value="<?=intval($info->id)?>">
<div class="form-group">
<label class="col-sm-1 control-label">菜单名称</label>
<div class="col-sm-3">
<label class="col-sm-2 control-label">菜单名称</label>
<div class="col-sm-4">
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
</div>
<label class="col-sm-1 control-label">上级菜单</label>
<div class="col-sm-3">
<label class="col-sm-2 control-label">上级菜单</label>
<div class="col-sm-4">
<select name="parent_id" class="form-control">
<option value="0"></option>
<?php
@ -33,18 +33,18 @@ use \common\libs\MyLib;
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">图标</label>
<div class="col-sm-3">
<label class="col-sm-2 control-label">图标</label>
<div class="col-sm-4">
<input type="text" name="icon" value="<?=$info->icon?>" class="form-control">
</div>
<label class="col-sm-1 control-label">路径</label>
<div class="col-sm-3">
<label class="col-sm-2 control-label">路径</label>
<div class="col-sm-4">
<input type="text" name="path" value="<?=$info->path?>" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">排序</label>
<div class="col-sm-3">
<label class="col-sm-2 control-label">排序</label>
<div class="col-sm-4">
<input type="text" name="order_id" value="<?=$info->order_id?>" class="form-control">
</div>
</div>

@ -2,71 +2,92 @@
use \common\libs\MyLib;
?>
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="row">
<form id="theFrm">
<input type="hidden" name="group_id" value="<?=$permissions_id?>">
<?php foreach($menu_items as $item) { ?>
<div class="col-sm-2">
<div class="panel panel-info">
<div class="panel-heading">
<div class="row">
<div class="col-sm-12">
<label class="i-checks">
<input type="checkbox" name="menu_ids[]" value="<?=$item->id?>" <?=in_array($item->id, $menu_ids)?'checked':''?>><i></i> <?=$item->name?>
</label>
</div>
</div>
</div>
<div class="panel-body">
<?php foreach($item->menus as $sub_item) { ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="row">
<form id="theFrm">
<input type="hidden" name="group_id" value="<?=$permissions_id?>">
<?php foreach($menu_items as $item) { ?>
<div class="col-sm-2">
<div class="panel panel-info">
<div class="panel-heading">
<div class="row">
<div class="col-sm-12">
<label class="i-checks">
<input type="checkbox" name="menu_ids[]" value="<?=$sub_item->id?>" <?=in_array($sub_item->id, $menu_ids)?'checked':''?>><i></i> <?=$sub_item->name?>
<input type="checkbox" class="parent_checkbox" name="menu_ids[]" value="<?=$item->id?>" <?=in_array($item->id, $menu_ids)?'checked':''?>><i></i> <?=$item->name?>
</label>
</div>
</div>
<?php } ?>
</div>
<div class="panel-body">
<?php foreach($item->menus as $sub_item) { ?>
<div class="row">
<div class="col-sm-12">
<label class="i-checks">
<input type="checkbox" class="sub_checkbox" name="menu_ids[]" value="<?=$sub_item->id?>" <?=in_array($sub_item->id, $menu_ids)?'checked':''?>><i></i> <?=$sub_item->name?>
</label>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php } ?>
</form>
</div>
<div class="row">
<div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button">
<strong>保 存</strong>
</button>
<?php } ?>
</form>
</div>
<div class="row">
<div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button">
<strong>保 存</strong>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
$(function(){
$('.btn-save').click(function(){
var params = $('#theFrm').serialize();
$.post('/permissions/permission',params,function(obj){
if(obj.success) {
parent.layer.msg('保存成功');
layer_close();
} else {
parent.layer.msg(data.msg);
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
$(function(){
$('.btn-save').click(function(){
var params = $('#theFrm').serialize();
$.post('/permissions/permission',params,function(obj){
if(obj.success) {
parent.layer.msg('保存成功');
layer_close();
} else {
parent.layer.msg(data.msg);
}
},'json');
});
//处理自动选择功能
$('.parent_checkbox').click(function() {
var checked = $(this).prop('checked');
var subs = $(this).parent().parent().parent().parent().next().find('.sub_checkbox');
for(var i = 0; i < subs.length; i++) {
if(checked) {
$(subs[i]).prop('checked', 'checked');
} else {
$(subs[i]).prop('checked', '');
}
}
},'json');
});
$('.sub_checkbox').click(function() {
var checked = $(this).prop('checked');
var subs = $(this).parent().parent().parent().parent().prev().find('.parent_checkbox');
for(var i = 0; i < subs.length; i++) {
if(checked) {
$(subs[i]).prop('checked', 'checked');
}
}
});
});
});
</script>
<?php $this->endBlock(); ?>
</script>
<?php $this->endBlock(); ?>
Loading…
Cancel
Save