Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 14b953dc
authored
Apr 23, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
33666dde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
29 deletions
src/views/memberCenter/setmeal.vue
src/views/memberCenter/setmeal.vue
View file @
14b953d
...
...
@@ -32,7 +32,9 @@
<ticket
:choseItemList=
"scope.scope.list"
></ticket>
</div>
</span>
<span
slot=
"topFlag"
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.scope.isOpen"
active-text=
"开"
inactive-text=
"关"
@
change=
"updateState(scope.scope)"
></el-switch>
</span>
<span
class=
"table-btns"
slot=
"optionsFun"
slot-scope=
"scope"
:data=
"scope.scope"
>
<
template
v-if=
"!(accountLevel == 4 && activetab == 1)"
>
<!--
<template
v-if=
"scope.scope.state === 0"
>
...
...
@@ -80,7 +82,7 @@
<
script
>
import
glsxDialog
from
'@/components/glsx-dialog'
import
url
from
'@/assets/empty.png'
import
{
getghSetMealListApi
,
getSetMealstoreListApi
,
deleteSetMeal
,
upDownPackage
,
updateToTop
,
cancelTopMD
,
updateToTopMD
}
from
'@/api/modules/setmeal'
import
{
getghSetMealListApi
,
getSetMealstoreListApi
,
deleteSetMeal
,
upDownPackage
,
updateToTop
,
cancelTopMD
,
updateToTopMD
}
from
'@/api/modules/setmeal'
import
{
getLoginCount
}
from
'@/api/modules/service'
import
{
stateList
}
from
'@/common/constant'
...
...
@@ -187,32 +189,32 @@ export default {
click
:
this
.
handleUpdateToTop
}
},
{
type
:
'el-button'
,
name
:
'置顶推荐'
,
attrs
:
{
type
:
'text'
},
condition
:
row
=>
{
return
row
.
topFlag
==
2
&&
this
.
accountLevel
==
4
&&
this
.
showGh
},
listeners
:
{
click
:
this
.
handleUpdateToTop
}
},
{
type
:
'el-button'
,
name
:
'取消置顶'
,
attrs
:
{
type
:
'text'
},
condition
:
row
=>
{
return
row
.
topFlag
==
1
&&
this
.
accountLevel
==
4
&&
this
.
showGh
},
listeners
:
{
click
:
this
.
cancelTopMD
}
},
//
{
//
type: 'el-button',
//
name: '置顶推荐',
//
attrs: {
//
type: 'text'
//
},
//
condition: row => {
// return
row.topFlag == 2 && this.accountLevel == 4 && this.showGh
//
},
//
listeners: {
//
click: this.handleUpdateToTop
//
}
//
},
//
{
//
type: 'el-button',
//
name: '取消置顶',
//
attrs: {
//
type: 'text'
//
},
//
condition: row => {
//
return row.topFlag == 1 && this.accountLevel == 4 && this.showGh
//
},
//
listeners: {
//
click: this.cancelTopMD
//
}
//
},
{
type
:
'el-button'
,
name
:
'已置顶推荐'
,
...
...
@@ -266,6 +268,12 @@ export default {
}
},
{
label
:
'首页置顶展示'
,
prop
:
'topFlag'
,
addHtml
:
'topFlag'
,
width
:
150
,
},
{
label
:
'操作'
,
prop
:
'optionsFun'
,
addHtml
:
'optionsFun'
,
...
...
@@ -361,6 +369,9 @@ export default {
this
.
$refs
.
memberSetMealRef
.
refreshTable
()
},
setTableFinishFun
()
{
this
.
$refs
.
memberSetMealRef
.
data
.
forEach
((
item
,
index
)
=>
{
item
.
isOpen
=
item
.
topFlag
==
2
?
false
:
true
})
//接收到的数据为空
if
(
!
this
.
$refs
.
memberSetMealRef
.
data
.
length
)
{
this
.
$refs
.
memberSetMealRef
.
setTableHeightFun
()
...
...
@@ -422,7 +433,7 @@ export default {
},
//置顶推荐
handleUpdateToTop
(
row
)
{
let
params
=
this
.
showGh
&&
this
.
accountLevel
==
4
?
updateToTopMD
:
updateToTop
let
params
=
this
.
showGh
&&
this
.
accountLevel
==
4
?
updateToTopMD
:
updateToTop
params
({
id
:
row
.
id
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
$message
({
...
...
@@ -445,6 +456,13 @@ export default {
}
})
},
updateState
(
val
)
{
if
(
val
.
topFlag
==
2
)
{
this
.
handleUpdateToTop
(
val
)
}
else
{
this
.
cancelTopMD
(
val
)
}
},
// 查看示例效果
handleLook
(
row
)
{},
handleDelete
(
row
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment