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
a0ebe869
Commit
a0ebe869
authored
Jul 06, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://111.61.77.35:15/fengchaopeng/laravelzh
parents
7ed4003b
68680e14
Pipeline
#81
failed with stages
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
6 deletions
+11
-6
DevicesController.php
app/Http/Controllers/DevicesController.php
+2
-2
user.js
resources/js/store/modules/user.js
+1
-0
addDevice.vue
resources/js/views/device/addDevice.vue
+5
-1
devicedtutus.vue
resources/js/views/device/devicedtutus.vue
+1
-1
index.vue
resources/js/views/device/index.vue
+2
-2
No files found.
app/Http/Controllers/DevicesController.php
View file @
a0ebe869
...
...
@@ -411,7 +411,7 @@ class DevicesController extends Controller
return
$this
->
jsonSuccessData
(
DB
::
table
(
'device'
)
->
where
(
'id'
,
'='
,
$id
)
->
update
([
'delete'
=>
1
,
'devicestatus'
=>
6
,
'devicedeleteinfo'
=>
$this
->
isadmin
()
==
1
?
'管理员将设备放置废纸篓'
:
'用户将设备放置废纸篓'
]));
}
else
{
$this
->
timeline
(
'删除了设备'
);
return
$this
->
jsonSuccessData
(
DB
::
table
(
'device'
)
->
where
(
'id'
,
'='
,
$id
)
->
update
([
'devicestatus'
=>
6
]
));
return
$this
->
jsonSuccessData
(
DB
::
table
(
'device'
)
->
where
(
'id'
,
'='
,
$id
)
->
delete
(
));
}
}
...
...
resources/js/store/modules/user.js
View file @
a0ebe869
...
...
@@ -46,6 +46,7 @@ const actions = {
login
({
email
:
email
.
trim
(),
password
:
password
,
userOrAdmin
:
userOrAdmin
})
.
then
(
response
=>
{
localStorage
.
setItem
(
'userinfoid'
,
response
.
id
);
localStorage
.
setItem
(
'isroles'
,
response
.
roles
);
commit
(
'SET_TOKEN'
,
response
.
token
);
setToken
(
response
.
token
);
resolve
();
...
...
resources/js/views/device/addDevice.vue
View file @
a0ebe869
...
...
@@ -134,8 +134,12 @@ export default {
adddevice
(
this
.
form
)
.
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
localStorage
.
getItem
(
'isroles'
)
===
'admin'
)
{
this
.
$router
.
push
({
path
:
'/device/device'
});
}
else
{
this
.
$router
.
push
({
path
:
'/userdevice/device'
});
}
}
})
.
catch
(
err
=>
{
console
.
log
(
err
);
...
...
resources/js/views/device/devicedtutus.vue
View file @
a0ebe869
...
...
@@ -31,7 +31,7 @@
<
el
-
table
-
column
prop
=
"state"
label
=
"状态"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
switch
:
v
-
model
=
"scope.row.delete == 2"
active
-
color
=
"#13ce66"
inactive
-
color
=
"#ff4949"
@
change
=
"UpPaperBasket(scope.row.id)"
><
/el-switch
>
<
span
>
废纸篓
用户
<
/span
>
<
span
>
废纸篓
设备
<
/span
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
...
...
resources/js/views/device/index.vue
View file @
a0ebe869
...
...
@@ -99,10 +99,10 @@
<
el
-
table
-
column
align
=
"center"
label
=
"操作"
width
=
"300px"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
popover
width
=
"160"
trigger
=
"click"
placement
=
"top"
>
<
p
>
此操作
,
分丢弃废纸篓
,
和
禁用用户
<
/p
>
<
p
>
此操作
,
分丢弃废纸篓
,
和
删除设备
<
/p
>
<
div
style
=
"text-align: right; margin: 0"
>
<
el
-
button
v
-
if
=
"scope.row.delete==2"
size
=
"mini"
type
=
"text"
@
click
=
"deviceDelete(scope.row.id, 1)"
>
丢弃废纸篓
<
/el-button
>
<
el
-
button
type
=
"text"
size
=
"mini"
@
click
=
"deviceDelete(scope.row.id, 2)"
>
禁用
设备
<
/el-button
>
<
el
-
button
type
=
"text"
size
=
"mini"
@
click
=
"deviceDelete(scope.row.id, 2)"
>
删除
设备
<
/el-button
>
<
/div
>
<
el
-
button
slot
=
"reference"
size
=
"mini"
type
=
"danger"
:
disabled
=
"scope.row.delete == 1 ? true : (scope.row.devicestatus > 1 ? true : false) "
>
操作
<
/el-button
>
<
/el-popover
>
...
...
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