Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
Project
Project
Details
Activity
Releases
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
张伯涛
NLT-e-cigarette
Commits
5cc22b5a
Commit
5cc22b5a
authored
May 31, 2022
by
秦嘉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工站页面样式和所有接口
parent
89f328e7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
15 deletions
+44
-15
station.js
src/api/station.js
+14
-0
device.js
src/api/system/device.js
+14
-0
Station.vue
src/views/productionInfo/Station.vue
+6
-8
index.vue
src/views/system/device/index.vue
+10
-7
No files found.
src/api/station.js
View file @
5cc22b5a
...
...
@@ -45,6 +45,20 @@ export function updateStation(data) {
})
}
// 修改工站状态
export
function
changeStaStatus
(
data
)
{
const
businessId
=
data
.
businessId
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/nltstation/changeStatus/'
+
businessId
,
method
:
'put'
,
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
// 删除工站(逻辑删除)
export
function
delStation
(
stationID
)
{
return
request
({
...
...
src/api/system/device.js
View file @
5cc22b5a
...
...
@@ -45,6 +45,20 @@ export function updateDevice(data) {
})
}
// 修改设备状态
export
function
changeDevStatus
(
data
)
{
const
businessId
=
data
.
businessId
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/nltdevice/changeStatus/'
+
businessId
,
method
:
'put'
,
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
// 删除设备(逻辑删除)
export
function
delDevice
(
deviceID
)
{
return
request
({
...
...
src/views/productionInfo/Station.vue
View file @
5cc22b5a
...
...
@@ -208,7 +208,7 @@
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
class=
"canleBtn"
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"danger"
class=
"redBtn"
@
click=
"submitForm"
>
确 定
</el-button>
</div>
</el-dialog>
...
...
@@ -217,7 +217,7 @@
<
script
>
import
{
listData
}
from
'@/api/system/dict/data'
import
{
addStation
,
delStation
,
getStation
,
listStation
,
updateStation
}
from
'@/api/station'
import
{
changeStaStatus
,
addStation
,
delStation
,
getStation
,
listStation
,
updateStation
}
from
'@/api/station'
export
default
{
name
:
'Station'
,
...
...
@@ -304,20 +304,17 @@ export default {
this
.
$confirm
(
`“
${
row
.
staName
}
”工站即将被
${
text
}
,是否继续?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonClass
:
'btn-custom-cancel'
,
customClass
:
'confirmBtnSure'
,
type
:
'warning'
}).
then
(
function
()
{
const
flag
=
row
.
flag
return
getStation
(
row
.
businessId
).
then
(
response
=>
{
row
=
response
.
data
row
.
flag
=
flag
return
updateStation
(
row
)
})
return
changeStaStatus
(
row
)
}).
then
(()
=>
{
this
.
$message
({
message
:
text
+
'成功'
,
type
:
'success'
})
this
.
getStaTable
()
}).
catch
(
function
()
{
row
.
flag
=
row
.
flag
===
'0'
?
'1'
:
'0'
})
...
...
@@ -338,6 +335,7 @@ export default {
this
.
$confirm
(
'所选择数据被删除后不可再恢复,是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonClass
:
'btn-custom-cancel'
,
type
:
'warning'
}).
then
(
function
()
{
return
delStation
(
row
.
businessId
)
...
...
src/views/system/device/index.vue
View file @
5cc22b5a
...
...
@@ -238,7 +238,14 @@
</template>
<
script
>
import
{
addDevice
,
delDevice
,
getDevice
,
listDevice
,
updateDevice
}
from
'@/api/system/device'
import
{
addDevice
,
changeDevStatus
,
delDevice
,
getDevice
,
listDevice
,
updateDevice
}
from
'@/api/system/device'
import
{
listPost
}
from
'@/api/badDefinition'
export
default
{
...
...
@@ -375,17 +382,13 @@ export default {
customClass
:
'confirmBtnSure'
,
type
:
'warning'
}).
then
(
function
()
{
const
flag
=
row
.
flag
getDevice
(
row
.
businessId
).
then
(
response
=>
{
row
=
response
.
data
row
.
flag
=
flag
return
updateDevice
(
row
)
})
return
changeDevStatus
(
row
)
}).
then
(()
=>
{
this
.
$message
({
message
:
text
+
'成功'
,
type
:
'success'
})
this
.
getDevTable
()
}).
catch
(
function
()
{
row
.
flag
=
row
.
flag
===
'0'
?
'1'
:
'0'
})
...
...
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