Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
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
lanbaoming
jiedao-app-operator-master
Commits
0eb4ad01
Commit
0eb4ad01
authored
Jan 17, 2024
by
邓春圆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
渠道列表添加状态
parent
cabbc1d8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
channel.js
src/api/ecw/channel.js
+8
-2
index.vue
src/views/ecw/channel/index.vue
+22
-1
No files found.
src/api/ecw/channel.js
View file @
0eb4ad01
...
@@ -42,7 +42,13 @@ export function getChannelPage(query) {
...
@@ -42,7 +42,13 @@ export function getChannelPage(query) {
params
:
query
params
:
query
})
})
}
}
//启用-禁用渠道
export
function
channelSwitch
(
id
){
return
request
({
url
:
`/ecw/channel/switch/
${
id
}
`
,
method
:
'
put
'
})
}
// 获得渠道列表 TODO
// 获得渠道列表 TODO
export
function
getChannelList
(
query
)
{
export
function
getChannelList
(
query
)
{
return
request
({
return
request
({
...
...
src/views/ecw/channel/index.vue
View file @
0eb4ad01
...
@@ -119,6 +119,12 @@
...
@@ -119,6 +119,12 @@
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('更新人')"
prop=
"updaterName"
>
<el-table-column
:label=
"$t('更新人')"
prop=
"updaterName"
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('状态')"
prop=
"updaterName"
>
<
template
v-slot=
"{row}"
>
<el-switch
@
change=
"(e)=>
{changeSwitch(e,row)}" :validate-event="false" :active-value="true"
v-model="row.status">
</el-switch>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
:label=
"$t('操作')"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
...
@@ -144,7 +150,7 @@ import {
...
@@ -144,7 +150,7 @@ import {
deleteChannel
,
deleteChannel
,
getChannel
,
getChannel
,
getChannelPage
,
getChannelPage
,
exportChannelExcel
exportChannelExcel
,
channelSwitch
}
from
"
@/api/ecw/channel
"
;
}
from
"
@/api/ecw/channel
"
;
import
{
getCountryListAll
}
from
"
@/api/ecw/country
"
;
import
{
getCountryListAll
}
from
"
@/api/ecw/country
"
;
import
{
getTradeCountryList
}
from
"
@/api/ecw/region
"
;
import
{
getTradeCountryList
}
from
"
@/api/ecw/region
"
;
...
@@ -192,7 +198,22 @@ export default {
...
@@ -192,7 +198,22 @@ export default {
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
changeSwitch
(
val
,
row
)
{
let
title
=
'
是否要
'
+
(
val
?
'
打开
'
:
'
关闭
'
)
+
"
《
"
+
this
.
$l
(
row
,
'
name
'
)
+
'
》
'
this
.
$confirm
(
title
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
channelSwitch
(
row
.
channelId
).
then
(
r
=>
{
this
.
$message
.
success
(
'
修改成功
'
)
console
.
log
(
r
)
})
}).
catch
(()
=>
{
row
.
status
=
!
val
});
},
/** 查询列表 */
/** 查询列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
...
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