作者 董瑞恩
1 个管道 的构建 通过 耗费 7 秒

equipment

@@ -117,7 +117,9 @@ class AdminEquipmentController extends AdminBaseController{ @@ -117,7 +117,9 @@ class AdminEquipmentController extends AdminBaseController{
117 117
118 //批量导出 118 //批量导出
119 public function batch_export(){ 119 public function batch_export(){
120 - $data= Db::name('equipment')->select(); 120 + $ids=$this->request->post('ids');
  121 +
  122 + $data= Db::name('equipment')->where('id','in',$ids)->select();
121 123
122 // 导出Exl 124 // 导出Exl
123 vendor("VENDOR_PATH/phpoffice/phpexcel/Classes/PHPExcel"); 125 vendor("VENDOR_PATH/phpoffice/phpexcel/Classes/PHPExcel");
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 onclick="batch_add()">批量新增 33 onclick="batch_add()">批量新增
34 </button> 34 </button>
35 <button class="btn btn-primary btn-sm js-ajax-submit" type="submit" 35 <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
36 - data-action="{:url('AdminEquipment/publish',array('yes'=>1))}" data-subcheck="true">批量导出 36 + data-action="{:url('AdminEquipment/batch_export')}" data-subcheck="true">批量导出
37 </button> 37 </button>
38 </div> 38 </div>
39 <table class="table table-hover table-bordered table-list"> 39 <table class="table table-hover table-bordered table-list">