1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2017/3/17 0017
- * Time: 上午 10:52
- */
- use yii\helpers\Url;
- use yii\widgets\LinkPager;
- ?>
- <style>
- .color{
- color: red;
- }
- </style>
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <div class="row">
- <div class="col-sm-5 m-b-xs">
- <a class="btn btn-sm btn-primary addhotsearch" href="<?=Url::toRoute(['user/manager','conduct'=>'add'])?>">添加项目经理</a>
- </div>
- </div>
- <div class="table-responsive">
- <table class="table table-striped">
- <thead>
- <tr>
- <th>ID</th>
- <th>头像</th>
- <th>名称</th>
- <th>简介</th>
- <th>创建时间</th>
- <th>更新时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($models)):?>
- <?php foreach($models as $mo):?>
- <tr class="">
- <td><?=$mo->id?></td>
- <td><img src="<?=empty($mo->image->pic)?"":Yii::getAlias('@imgdomain').$mo->image->pic?>" class="img-thumbnail " style="width: 150px;height: 80px;" imgtype="img"></td>
- <td><?=$mo->realname?></td>
- <td><?=$mo->introduction?></td>
- <td><?=date('Y-m-d H:i:s',$mo->created_at)?></td>
- <td><?=date('Y-m-d H:i:s',$mo->updated_at)?></td>
- <td>
- <a href="<?=Url::toRoute(['user/manager','id'=>$mo->id,'conduct'=>'update'])?>" class="btn btn-sm btn-primary edit_advert">修改</a>
- <a class="btn btn-sm btn-danger delete" id="<?=$mo->id?>">删除</a>
- </td>
- </tr>
- <?php endforeach;?>
- <?php endif?>
- </tbody>
- </table>
- <?= LinkPager::widget(['pagination' => $pages]); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- $('.delete').click(function(){
- var chat = $(this);
- var id = chat.attr('id');
- var conduct = 'delete';
- $.ajax({
- url:'<?=Url::toRoute(['user/manager']);?>',
- type:'GET',
- dataType:'json',
- data:{id:id,conduct:conduct},
- success:function(data){
- if(data.sign==1){
- alert(data.msg);
- chat.parent().parent().hide();
- }else{
- alert(data.msg);
- }
- }
- })
- });
- </script>
|