Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冯超鹏
laravelzh
Commits
daa80127
Commit
daa80127
authored
Sep 22, 2020
by
冯超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
66f7b2d2
Pipeline
#139
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
HuinappHomeController.php
app/Http/Controllers/HuinappHomeController.php
+12
-0
device.js
resources/js/router/modules/device.js
+6
-0
No files found.
app/Http/Controllers/HuinappHomeController.php
View file @
daa80127
...
...
@@ -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
]);
}
}
resources/js/router/modules/device.js
View file @
daa80127
...
...
@@ -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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment