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

interface

@@ -168,7 +168,6 @@ class AdminEquipmentController extends AdminBaseController{ @@ -168,7 +168,6 @@ class AdminEquipmentController extends AdminBaseController{
168 'note' => $objPHPExcel->getActiveSheet()->getCell("e" . $j)->getValue(), 168 'note' => $objPHPExcel->getActiveSheet()->getCell("e" . $j)->getValue(),
169 'create_time' => time() 169 'create_time' => time()
170 ]; 170 ];
171 - dump($data);  
172 $data['qr_code'] = $this->createQrCode($data['name']); 171 $data['qr_code'] = $this->createQrCode($data['name']);
173 //查询设备是否已存在 172 //查询设备是否已存在
174 $is_equipment=Db::name('equipment')->where(['name'=>$data['name'],'is_delete'=>0])->count(); 173 $is_equipment=Db::name('equipment')->where(['name'=>$data['name'],'is_delete'=>0])->count();
@@ -177,6 +176,7 @@ class AdminEquipmentController extends AdminBaseController{ @@ -177,6 +176,7 @@ class AdminEquipmentController extends AdminBaseController{
177 continue; 176 continue;
178 } 177 }
179 try{ 178 try{
  179 + dump($data);
180 $Equipment->save($data); 180 $Equipment->save($data);
181 echo "第" . $j . "行数据导入成功!<br/>"; 181 echo "第" . $j . "行数据导入成功!<br/>";
182 }catch (\Exception $exception){ 182 }catch (\Exception $exception){
@@ -158,30 +158,6 @@ @@ -158,30 +158,6 @@
158 area: ['1000px', '800px'], 158 area: ['1000px', '800px'],
159 btn: ['确定', '取消'], 159 btn: ['确定', '取消'],
160 yes: function (index, layero) { 160 yes: function (index, layero) {
161 - var iframeWin = window[layero.find('iframe')[0]['name']];  
162 - var data = iframeWin.confirm();  
163 -// $.ajax({  
164 -// url:"{:url('AdminEquipment/addPost')}",  
165 -// type:"POST",  
166 -// data:{  
167 -// serial_number:data.serial_number,  
168 -// mac_address:data.mac_address,  
169 -// name:data.name,  
170 -// hospital:data.hospital,  
171 -// note:data.note,  
172 -// create_time:data.create_time  
173 -// },  
174 -// dataType:"JSON",  
175 -// success:function (data) {  
176 -// if (data.code===200){  
177 -// alert('添加成功');  
178 -// window.location.reload();  
179 -// }  
180 -// },  
181 -// error:function () {  
182 -// alert('接口异常')  
183 -// }  
184 -// });  
185 layer.close(index); //如果设定了yes回调,需进行手工关闭 161 layer.close(index); //如果设定了yes回调,需进行手工关闭
186 } 162 }
187 }); 163 });