Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
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 81dc9689
authored
Oct 26, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增/编辑直播间
1 parent
62d1b189
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
109 additions
and
38 deletions
src/api/modules/common.js
src/api/modules/liveRoom.js
src/router/index.js
src/router/routes.js
src/views/cmmodityLibrary/editProductGroup.vue
src/views/liveRoom/editLiveRoom.vue
src/views/liveRoom/liveControl.vue
src/views/liveRoom/liveRoomList.vue
src/views/liveRoom/relateStoreDialog.vue
src/api/modules/common.js
View file @
81dc968
...
@@ -23,4 +23,24 @@ const uploadImg = params => {
...
@@ -23,4 +23,24 @@ const uploadImg = params => {
})
})
}
}
export
{
getGoodsList
,
uploadImg
}
const
getMerchantList
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
get.merchant.list`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
getZoneList
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
get.zone.list`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
{
getGoodsList
,
uploadImg
,
getMerchantList
,
getZoneList
}
src/api/modules/liveRoom.js
View file @
81dc968
import
{
http
}
from
'@/main'
import
{
http
}
from
'@/main'
const
defaultPath
=
'scrm.api.live.'
const
getLiveRoomListApi
=
params
=>
{
const
getLiveRoomListApi
=
params
=>
{
params
.
method
=
'scrm.api.live.live.room.list'
params
.
method
=
`
${
defaultPath
}
live.room.list`
return
http
({
return
http
({
url
:
'rop-scrm-live/router'
,
url
:
'rop-scrm-live/router'
,
method
:
'GET'
,
method
:
'GET'
,
...
@@ -10,4 +12,25 @@ const getLiveRoomListApi = params => {
...
@@ -10,4 +12,25 @@ const getLiveRoomListApi = params => {
})
})
}
}
export
{
getLiveRoomListApi
}
const
insertLiveRoomApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
insert.live.room`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
getLiveRoomInfoApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
get.live.room.by.id`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
{
getLiveRoomListApi
,
insertLiveRoomApi
,
getLiveRoomInfoApi
}
src/router/index.js
View file @
81dc968
...
@@ -10,7 +10,7 @@ VueRouter.prototype.push = function push(location) {
...
@@ -10,7 +10,7 @@ VueRouter.prototype.push = function push(location) {
function
getRoutes
(
routesData
)
{
function
getRoutes
(
routesData
)
{
return
routesData
.
reduce
((
routes
,
route
)
=>
{
return
routesData
.
reduce
((
routes
,
route
)
=>
{
routes
.
push
({
...
route
,
component
:
()
=>
import
(
'@/views'
+
route
.
path
+
'.vue'
)
})
routes
.
push
({
...
route
,
component
:
()
=>
import
(
'@/views'
+
route
.
com
path
+
'.vue'
)
})
return
routes
return
routes
},
[])
},
[])
}
}
...
...
src/router/routes.js
View file @
81dc968
...
@@ -42,7 +42,7 @@ const staticRoutes = Object.freeze([
...
@@ -42,7 +42,7 @@ const staticRoutes = Object.freeze([
},
},
{
{
name
:
'editLiveRoom'
,
name
:
'editLiveRoom'
,
path
:
'/liveRoom/editLiveRoom'
,
path
:
'/liveRoom/editLiveRoom
/:addOrEdit/:id
'
,
// component: () => import('@/views/liveRoom/editLiveRoom.vue'),
// component: () => import('@/views/liveRoom/editLiveRoom.vue'),
component
:
resolve
=>
require
([
`@/views/liveRoom/editLiveRoom.vue`
],
resolve
),
component
:
resolve
=>
require
([
`@/views/liveRoom/editLiveRoom.vue`
],
resolve
),
meta
:
{}
meta
:
{}
...
...
src/views/cmmodityLibrary/editProductGroup.vue
View file @
81dc968
...
@@ -174,8 +174,14 @@ export default {
...
@@ -174,8 +174,14 @@ export default {
this
.
isMutiSelectVisible
=
!
this
.
isMutiSelectVisible
this
.
isMutiSelectVisible
=
!
this
.
isMutiSelectVisible
},
},
handleProDelete
(
obj
)
{
handleProDelete
(
obj
)
{
this
.
$messageBox
.
alert
(
'是否删除该商品?'
,
'删除'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
,
callback
:
action
=>
{
var
idx
=
this
.
editForm
.
shopMallGoodsInfoList
.
findIndex
(
item
=>
item
.
id
==
obj
.
id
)
var
idx
=
this
.
editForm
.
shopMallGoodsInfoList
.
findIndex
(
item
=>
item
.
id
==
obj
.
id
)
this
.
editForm
.
shopMallGoodsInfoList
.
splice
(
idx
,
1
)
this
.
editForm
.
shopMallGoodsInfoList
.
splice
(
idx
,
1
)
}
})
},
},
handleMutiSelectConfirm
(
selectedProInfo
)
{
handleMutiSelectConfirm
(
selectedProInfo
)
{
console
.
log
(
selectedProInfo
)
console
.
log
(
selectedProInfo
)
...
...
src/views/liveRoom/editLiveRoom.vue
View file @
81dc968
This diff is collapsed.
Click to expand it.
src/views/liveRoom/liveControl.vue
View file @
81dc968
<!-- 控制台 -->
<!-- 控制台 -->
<
template
>
<
template
>
<div
class=
"live-control"
>
<div
class=
"live-control"
>
<div
class=
"container edit-container"
>
<div
class=
"box"
>
<div
class=
"box"
>
<p
class=
"edit-title"
>
直播控制台
</p>
<p
class=
"edit-title"
>
直播控制台
</p>
<div
class=
"head-box flex"
>
<div
class=
"head-box flex"
>
...
@@ -45,6 +46,7 @@
...
@@ -45,6 +46,7 @@
</div>
</div>
<select-muti-pro-dialog
:isMutiSelectVisible=
"isMutiSelectVisible"
@
handleMutiSelectConfirm=
"handleMutiSelectConfirm"
@
handleMutiSelectClose=
"handleMutiSelectClose"
></select-muti-pro-dialog>
<select-muti-pro-dialog
:isMutiSelectVisible=
"isMutiSelectVisible"
@
handleMutiSelectConfirm=
"handleMutiSelectConfirm"
@
handleMutiSelectClose=
"handleMutiSelectClose"
></select-muti-pro-dialog>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
src/views/liveRoom/liveRoomList.vue
View file @
81dc968
...
@@ -148,7 +148,11 @@ export default {
...
@@ -148,7 +148,11 @@ export default {
},
},
handleDetail
(
row
)
{
handleDetail
(
row
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'liveControl'
// name: 'liveControl',
path
:
'/liveroom/liveControl'
,
query
:
{
id
:
row
?
row
.
id
:
''
}
})
})
},
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
...
@@ -165,14 +169,20 @@ export default {
...
@@ -165,14 +169,20 @@ export default {
},
},
// 1-新增;2-编辑
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
handleEdit
(
addOrEdit
,
row
)
{
// console.log(row)
// this.$history.push('services/liveRoom/editLiveRoom', { addOrEdit: addOrEdit, row: row || {} })
// this.$history.push('services/liveRoom/editLiveRoom', { addOrEdit: addOrEdit, row: row || {} })
// this.eventBus.$emit('editRoom', {
// addOrEdit: addOrEdit,
// id: row ? row.id : ''
// })
this
.
$router
.
push
({
this
.
$router
.
push
({
// name: 'editLiveRoom',
name
:
'ServicesLiveRoomEditLiveRoom'
,
path
:
'/liveRoom/editLiveRoom'
,
params
:
{
params
:
{
addOrEdit
:
addOrEdit
,
addOrEdit
:
addOrEdit
,
row
:
row
||
{}
id
:
row
?
row
.
id
:
'-1'
}
}
// name: 'editLiveRoom',
// path: '/liveRoom/editLiveRoom'
})
})
},
},
handleSearch
()
{
handleSearch
()
{
...
...
src/views/liveRoom/relateStoreDialog.vue
View file @
81dc968
...
@@ -6,29 +6,29 @@
...
@@ -6,29 +6,29 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-table
ref=
"seletingTable"
:data=
"selectingData"
height=
"464px"
class=
"table"
border
@
select=
"handleChange"
@
select-all=
"handleAll"
>
<el-table
ref=
"seletingTable"
:data=
"selectingData"
height=
"464px"
class=
"table"
border
@
select=
"handleChange"
@
select-all=
"handleAll"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
:selectable=
"selectable"
></el-table-column>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
:selectable=
"selectable"
></el-table-column>
<el-table-column
v-if=
"sourcePage != 'serviceStore'"
prop=
"yqMerchantName"
label=
"园区店
名称"
align=
"center"
>
<el-table-column
prop=
"merchantName"
label=
"商户
名称"
align=
"center"
>
<template
slot-scope=
"scope"
>
<
!--
<
template
slot-scope=
"scope"
>
<span
:class=
"
{ red: !scope.row.isSetUpgradeSettleRule
&&
needTip.includes(sourcePage) }">
{{
scope
.
row
.
yqMerchantName
}}
</span>
<span
:class=
"
{ red: !scope.row.isSetUpgradeSettleRule
&&
needTip.includes(sourcePage) }">
{{
scope
.
row
.
yqMerchantName
}}
</span>
</
template
>
</
template
>
-->
</el-table-column>
</el-table-column>
<el-table-column
prop=
"merchantName"
label=
"4S店名称"
align=
"center"
>
<
!-- <
el-table-column prop="merchantName" label="4S店名称" align="center">
<template slot-scope="scope">
<template slot-scope="scope">
<span :class="{ red: !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage) }">{{ scope.row.merchantName }}</span>
<span :class="{ red: !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage) }">{{ scope.row.merchantName }}</span>
<el-tooltip v-if="!scope.row.isSetUpgradeSettleRule" popper-class="tooltip-class" effect="dark" content="该门店无配置财务分润规则,无法关联!" placement="top">
<el-tooltip v-if="!scope.row.isSetUpgradeSettleRule" popper-class="tooltip-class" effect="dark" content="该门店无配置财务分润规则,无法关联!" placement="top">
<span v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)" class="tip-icon">?</span>
<span v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)" class="tip-icon">?</span>
</el-tooltip>
</el-tooltip>
</template>
</template>
</el-table-column>
</el-table-column>
-->
</el-table>
</el-table>
<el-pagination
small
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"
currentPage
"
:page-size=
"pageSize"
layout=
"total, prev, pager, next"
:total=
"total"
></el-pagination>
<el-pagination
small
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"
pageNum
"
:page-size=
"pageSize"
layout=
"total, prev, pager, next"
:total=
"total"
></el-pagination>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-table
:data=
"selectedData"
class=
"table"
border
height=
"464px"
>
<el-table
:data=
"selectedData"
class=
"table"
border
height=
"464px"
>
<el-table-column
v-if=
"sourcePage != 'serviceStore'"
prop=
"yqMerchantName"
label=
"园区店
名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"merchantName"
label=
"商户
名称"
align=
"center"
></el-table-column>
<
el-table-column
prop=
"merchantName"
label=
"4S店名称"
align=
"center"
></el-table-column
>
<
!-- <el-table-column prop="merchantName" label="4S店名称" align="center"></el-table-column> --
>
<el-table-column
label=
"删除"
align=
"center"
width=
"50
px
"
>
<el-table-column
label=
"删除"
align=
"center"
width=
"50"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
class=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
type=
"text"
></el-button>
<el-button
style=
"padding: 0;"
class=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
type=
"text"
></el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -45,10 +45,10 @@ export default {
...
@@ -45,10 +45,10 @@ export default {
return
{
return
{
selectedData
:
[],
selectedData
:
[],
selectingData
:
[],
selectingData
:
[],
needTip
:
[
'editProduct'
],
//
needTip: ['editProduct'],
// 分页
// 分页
total
:
0
,
total
:
0
,
currentPage
:
1
,
pageNum
:
1
,
pageSize
:
20
pageSize
:
20
}
}
},
},
...
@@ -59,10 +59,10 @@ export default {
...
@@ -59,10 +59,10 @@ export default {
default
:
false
default
:
false
},
},
// 页面来源
// 页面来源
sourcePage
:
{
//
sourcePage: {
type
:
String
,
//
type: String,
default
:
''
//
default: ''
},
//
},
storeApi
:
{
storeApi
:
{
type
:
Function
,
type
:
Function
,
default
:
()
=>
{}
default
:
()
=>
{}
...
@@ -94,21 +94,23 @@ export default {
...
@@ -94,21 +94,23 @@ export default {
methods
:
{
methods
:
{
selectable
(
row
,
index
)
{
selectable
(
row
,
index
)
{
var
isSelect
=
row
.
hasOwnProperty
(
'beServed'
)
?
!
row
.
beServed
:
true
var
isSelect
=
row
.
hasOwnProperty
(
'beServed'
)
?
!
row
.
beServed
:
true
if
(
this
.
sourcePage
===
'editProduct'
)
{
//
if (this.sourcePage === 'editProduct') {
isSelect
=
row
.
isSetUpgradeSettleRule
//
isSelect = row.isSetUpgradeSettleRule
}
//
}
return
isSelect
return
isSelect
},
},
recoverySelection
()
{
recoverySelection
()
{
var
exitIds
=
this
.
selectedData
.
map
(
item
=>
item
.
merchant
Id
)
var
exitIds
=
this
.
selectedData
.
map
(
item
=>
item
.
merchant
No
+
''
)
this
.
selectingData
.
forEach
(
item
=>
{
this
.
selectingData
.
forEach
(
item
=>
{
exitIds
.
includes
(
item
.
merchantId
)
&&
this
.
$refs
.
seletingTable
.
toggleRowSelection
(
item
,
true
)
if
(
exitIds
.
includes
(
item
.
merchantNo
))
{
this
.
$refs
.
seletingTable
.
toggleRowSelection
(
item
,
true
)
}
})
})
},
},
getSelectingList
()
{
getSelectingList
()
{
this
.
storeApi
({
this
.
storeApi
({
...
this
.
storeSearchForm
,
...
this
.
storeSearchForm
,
currentPage
:
this
.
currentPage
,
pageNum
:
this
.
pageNum
,
pageSize
:
this
.
pageSize
pageSize
:
this
.
pageSize
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
selectingData
=
res
.
list
this
.
selectingData
=
res
.
list
...
@@ -119,12 +121,12 @@ export default {
...
@@ -119,12 +121,12 @@ export default {
})
})
},
},
handleChange
(
selection
,
row
)
{
handleChange
(
selection
,
row
)
{
var
addOrDelete
=
!!
selection
.
find
(
item
=>
item
.
merchant
Id
===
row
.
merchantId
)
var
addOrDelete
=
!!
selection
.
find
(
item
=>
item
.
merchant
No
===
row
.
merchantNo
)
addOrDelete
?
this
.
selectedData
.
push
(
row
)
:
(
this
.
selectedData
=
this
.
selectedData
.
filter
(
item
=>
item
.
merchant
Id
!==
row
.
merchantId
))
addOrDelete
?
this
.
selectedData
.
push
(
row
)
:
(
this
.
selectedData
=
this
.
selectedData
.
filter
(
item
=>
item
.
merchant
No
!==
row
.
merchantNo
))
},
},
handleAll
(
selection
)
{
handleAll
(
selection
)
{
this
.
selectingData
.
forEach
(
item
=>
{
this
.
selectingData
.
forEach
(
item
=>
{
var
isExit
=
this
.
selectedData
.
findIndex
(
subItem
=>
subItem
.
merchant
Id
===
item
.
merchantId
)
var
isExit
=
this
.
selectedData
.
findIndex
(
subItem
=>
subItem
.
merchant
No
===
item
.
merchantNo
)
var
isServed
=
item
.
hasOwnProperty
(
'beServed'
)
?
item
.
beServed
:
false
var
isServed
=
item
.
hasOwnProperty
(
'beServed'
)
?
item
.
beServed
:
false
if
(
selection
.
length
&&
isExit
===
-
1
&&
!
isServed
)
{
if
(
selection
.
length
&&
isExit
===
-
1
&&
!
isServed
)
{
this
.
selectedData
.
push
(
item
)
this
.
selectedData
.
push
(
item
)
...
@@ -134,14 +136,22 @@ export default {
...
@@ -134,14 +136,22 @@ export default {
})
})
},
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
this
.
selectedData
=
this
.
selectedData
.
filter
(
item
=>
item
.
merchant
Id
!==
row
.
merchantId
)
this
.
selectedData
=
this
.
selectedData
.
filter
(
item
=>
item
.
merchant
No
!==
row
.
merchantNo
)
this
.
$refs
.
seletingTable
.
toggleRowSelection
(
row
)
this
.
$refs
.
seletingTable
.
toggleRowSelection
(
row
)
},
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
this
.
pageNum
=
val
this
.
getSelectingList
()
this
.
getSelectingList
()
},
},
handleRelateStoreConfirm
()
{
handleRelateStoreConfirm
()
{
if
(
!
this
.
selectedData
.
length
)
{
this
.
$message
({
message
:
'请选择关联门店'
,
type
:
'warning'
,
showClose
:
true
})
return
true
}
this
.
$emit
(
'handleRelateStoreConfirm'
,
this
.
selectedData
)
this
.
$emit
(
'handleRelateStoreConfirm'
,
this
.
selectedData
)
},
},
handleRelateStoreClose
()
{
handleRelateStoreClose
()
{
...
@@ -155,10 +165,10 @@ export default {
...
@@ -155,10 +165,10 @@ export default {
margin
:
0
auto
20px
!important
;
margin
:
0
auto
20px
!important
;
width
:
98%
;
width
:
98%
;
}
}
.service-store
.relateStore
.el-table
.cell
,
/*
.service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
line-height: 26px !important;
}
}
*/
.service-store
.relateStore
.el-table--medium
td
,
.service-store
.relateStore
.el-table--medium
td
,
.d2-form
.relateStore
.el-table--medium
td
{
.d2-form
.relateStore
.el-table--medium
td
{
padding
:
6px
8px
!important
;
padding
:
6px
8px
!important
;
...
...
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