Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sensorConsult
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhanglw
sensorConsult
Commits
8852c1f5
Commit
8852c1f5
authored
Jun 13, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品上架
parent
cc36a3fb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
14 deletions
+32
-14
common.js
src/api/common.js
+10
-0
index.vue
src/views/backstage/customMgt/customTabulate/index.vue
+1
-1
index.vue
src/views/backstage/guidanceMgt/guidanceTabulate/index.vue
+2
-2
index.vue
src/views/backstage/productMgt/productTabulate/index.vue
+19
-11
No files found.
src/api/common.js
View file @
8852c1f5
...
@@ -160,6 +160,16 @@ export const HttpReq = {
...
@@ -160,6 +160,16 @@ export const HttpReq = {
return
res
return
res
})
})
},
},
// 批量上下架产品
batchReleaseAndRecovery
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/product/batchReleaseAndRecovery
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
xxx
:
null
xxx
:
null
}
}
}
}
...
...
src/views/backstage/customMgt/customTabulate/index.vue
View file @
8852c1f5
...
@@ -125,7 +125,7 @@ export default {
...
@@ -125,7 +125,7 @@ export default {
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
this
.
$notify
({
this
.
$notify
({
title
:
res
.
msg
,
title
:
res
.
msg
,
type
:
'
success
'
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
duration
:
2500
duration
:
2500
})
})
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
...
...
src/views/backstage/guidanceMgt/guidanceTabulate/index.vue
View file @
8852c1f5
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<div
class=
"toolbar"
>
<div
class=
"toolbar"
>
<div
/>
<div
/>
<div
style=
"text-align: right"
>
<div
style=
"text-align: right"
>
<el-button
type=
"
danger
"
icon=
"el-icon-finished"
:disabled=
"!multipleSelection.length"
@
click=
"batchOperate(1)"
>
批量处理
</el-button>
<el-button
type=
"
success
"
icon=
"el-icon-finished"
:disabled=
"!multipleSelection.length"
@
click=
"batchOperate(1)"
>
批量处理
</el-button>
</div>
</div>
</div>
</div>
<!-- 表格 -->
<!-- 表格 -->
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<el-table-column
prop=
"xxx"
label=
"处理日期"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"xxx"
label=
"处理日期"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"xxx"
label=
"操作"
align=
"right"
width=
"140"
>
<el-table-column
prop=
"xxx"
label=
"操作"
align=
"right"
width=
"140"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
v-show=
"scope.row.status==3"
content=
"处理"
><el-button
round
plain
type=
"
danger
"
icon=
"el-icon-finished"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==3"
content=
"处理"
><el-button
round
plain
type=
"
success
"
icon=
"el-icon-finished"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
<el-tooltip
content=
"查看"
><el-button
round
plain
icon=
"el-icon-view"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
<el-tooltip
content=
"查看"
><el-button
round
plain
icon=
"el-icon-view"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
...
src/views/backstage/productMgt/productTabulate/index.vue
View file @
8852c1f5
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
<el-button
type=
"primary"
icon=
"el-icon-circle-plus-outline"
@
click=
"toAdd"
>
新增产品
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus-outline"
@
click=
"toAdd"
>
新增产品
</el-button>
</div>
</div>
<div
style=
"text-align: right"
>
<div
style=
"text-align: right"
>
<el-button
type=
"success"
icon=
"el-icon-finished"
:disabled=
"!multipleSelection.length"
@
click=
"batchOperate(1)"
>
批量发布
</el-button>
<el-button
type=
"success"
icon=
"el-icon-finished"
:disabled=
"!multipleSelection.length"
@
click=
"batchOperate(1
, null
)"
>
批量发布
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-download"
:disabled=
"!multipleSelection.length"
@
click=
"batchOperate(0)"
>
批量下架
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-download"
:disabled=
"!multipleSelection.length"
@
click=
"batchOperate(0
, null
)"
>
批量下架
</el-button>
</div>
</div>
</div>
</div>
<!-- 表格 -->
<!-- 表格 -->
...
@@ -40,8 +40,8 @@
...
@@ -40,8 +40,8 @@
<el-table-column
label=
"操作"
align=
"right"
width=
"200"
>
<el-table-column
label=
"操作"
align=
"right"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
v-show=
"scope.row.status==3"
content=
"审核"
><el-button
round
plain
type=
"warning"
icon=
"el-icon-s-check"
@
click=
"toView(scope.row, true)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==3"
content=
"审核"
><el-button
round
plain
type=
"warning"
icon=
"el-icon-s-check"
@
click=
"toView(scope.row, true)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==4"
content=
"发布"
><el-button
round
plain
type=
"success"
icon=
"el-icon-finished"
@
click=
"
toEdit(
scope.row)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==4"
content=
"发布"
><el-button
round
plain
type=
"success"
icon=
"el-icon-finished"
@
click=
"
batchOperate(1,
scope.row)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==5"
content=
"下架"
><el-button
round
plain
type=
"danger"
icon=
"el-icon-download"
@
click=
"
toEdit(
scope.row)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==5"
content=
"下架"
><el-button
round
plain
type=
"danger"
icon=
"el-icon-download"
@
click=
"
batchOperate(0,
scope.row)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status>=4"
content=
"编辑"
><el-button
round
plain
type=
"primary"
icon=
"el-icon-edit-outline"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status>=4"
content=
"编辑"
><el-button
round
plain
type=
"primary"
icon=
"el-icon-edit-outline"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
<el-tooltip
content=
"查看"
><el-button
round
plain
icon=
"el-icon-view"
@
click=
"toView(scope.row)"
/></el-tooltip>
<el-tooltip
content=
"查看"
><el-button
round
plain
icon=
"el-icon-view"
@
click=
"toView(scope.row)"
/></el-tooltip>
</
template
>
</
template
>
...
@@ -106,18 +106,26 @@ export default {
...
@@ -106,18 +106,26 @@ export default {
this
.
total
=
res
.
data
.
total
this
.
total
=
res
.
data
.
total
})
})
},
},
batchOperate
(
opt
)
{
batchOperate
(
type
,
row
)
{
if
(
!
this
.
multipleSelection
.
length
)
{
if
(
!
row
&&
!
this
.
multipleSelection
.
length
)
{
return
this
.
$message
({
return
this
.
$message
({
message
:
'
未选取数据
'
,
message
:
'
未选取数据
'
,
type
:
'
info
'
type
:
'
info
'
})
})
}
}
if
(
opt
)
{
HttpReq
.
backstageApi
.
batchReleaseAndRecovery
({
console
.
log
(
'
启用
'
,
this
.
multipleSelection
)
ids
:
row
?
[
row
.
productId
]
:
this
.
multipleSelection
.
map
(
item
=>
{
return
item
.
productId
}),
}
else
{
type
:
type
console
.
log
(
'
启用
'
,
this
.
multipleSelection
)
}).
then
((
res
)
=>
{
}
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
duration
:
2500
})
if
(
res
.
code
===
200
)
{
this
.
loadData
()
}
})
},
},
toAdd
()
{
toAdd
()
{
this
.
$refs
.
addPage
.
loadData
()
this
.
$refs
.
addPage
.
loadData
()
...
...
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