Commit daa80127 authored by 冯超鹏's avatar 冯超鹏

no message

parent 66f7b2d2
Pipeline #139 canceled with stages
......@@ -32,5 +32,17 @@ class HuinappHomeController extends controller
->first();
return $this->jsonSuccessData($data);
}
//返回设备类型和单位和介质
public function devicetype()
{
$gas = DB::table('gas')->get()->toArray();
$danwei = DB::table('danwei')->get()->toArray();
$devicetypecount = DB::table('device_type as t')
->leftjoin('device as d', 'd.dtype', '=', 't.tid')
->selectRaw('t.*,count(d.id) as counnum')
->groupBy('t.tid')
->get()->toArray();
return $this->jsonSuccessData(['devicetype' => $devicetypecount, 'gas' => $gas, 'danwei' => $danwei]);
}
}
......@@ -42,6 +42,12 @@ const deviceRoutes = {
name: 'addDevice',
meta: { title: '添加设备', icon: 'deviceadd', permissions: ['manage user'] },
},
{
path: 'deviceranqi',
component: () => import('@/views/device/deviceranqi'),
name: 'deviceranqi',
meta: { title: '燃气流量计', icon: 'ranqi', permissions: ['manage user'] },
},
],
};
export default deviceRoutes;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment