Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
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 bd69affe
authored
Nov 05, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户运营数据改动
1 parent
4e1bb9fc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
462 additions
and
132 deletions
package.json
src/App.vue
src/api/modules/clientManage.js
src/api/modules/tagsManage.js
src/components/basic-dialog/index.vue
src/components/echarts/multipleEchart.vue
src/components/search-form/index.vue
src/router/routes.js
src/setup/single.js
src/styles/resetelement.scss
src/views/clientDataOverview/index.vue
src/views/clientGroupManage/clientGroupDetail.vue
src/views/clientGroupManage/index.vue
src/views/clientManage/clientDetail.vue
src/views/clientManage/index.vue
src/views/employee/index.vue
src/views/tagsManage/index.vue
vue.config.js
package.json
View file @
bd69aff
...
...
@@ -14,7 +14,7 @@
"echarts"
:
"^5.2.0"
,
"element-ui"
:
"^2.4.5"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-components"
:
"^1.
0.8
"
,
"glsx-components"
:
"^1.
1.2
"
,
"glsx-table"
:
"^1.1.0"
,
"sha1"
:
"^1.1.1"
,
"vue"
:
"^2.6.10"
,
...
...
src/App.vue
View file @
bd69aff
...
...
@@ -26,8 +26,9 @@
</div>
<img
src=
"./assets/logo.png"
alt=
""
srcset=
""
/>
</div>
-->
<router-view
/>
<keep-alive
exclude=
"clientDetail,clientGroupDetail,tagsManage,clientDataOverview"
>
<router-view></router-view>
</keep-alive>
</div>
</
template
>
...
...
src/api/modules/clientManage.js
View file @
bd69aff
...
...
@@ -92,7 +92,7 @@
})
}
/*获取来源字典的
/*获取来源字典的
*/
export
function
getDictionaryFun
(
params
){
params
.
method
=
'org.ore.api.common.dictdata.list'
...
...
src/api/modules/tagsManage.js
View file @
bd69aff
...
...
@@ -21,7 +21,7 @@
}
//计算表格上面的数量
export
function
getTableTagNum
(
params
){
params
.
method
=
'datahub.api.label.
getlabelcount'
params
.
method
=
'datahub.api.label.
queryLabelCount'
return
http
({
url
:
'/rop-scrm-datahub/router'
,
...
...
@@ -54,6 +54,18 @@
})
}
//获取单条数据labelList数组
export
function
queryLabelListByGroupId
(
params
){
params
.
method
=
'datahub.api.label.queryLabelListByGroupId'
return
http
({
url
:
'/rop-scrm-datahub/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
src/components/basic-dialog/index.vue
View file @
bd69aff
...
...
@@ -11,7 +11,8 @@
<slot
name=
"btn-front"
></slot>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
:loading=
"btnLoading"
>
{{
btnOkLabel
}}
</el-button>
<el-button
v-if=
"isShowThirdBtn"
@
click=
"btnClick"
>
创建标签
</el-button>
<!-- isShowThirdBtn 产品说暂时不要这个按钮-->
<!--
<el-button
v-if=
"false"
@
click=
"btnClick"
>
创建标签
</el-button>
-->
<slot
name=
"btn-behind"
></slot>
</div>
...
...
@@ -79,15 +80,16 @@ export default {
border-top
:
1px
solid
#eaeefb
;
border-bottom
:
1px
solid
#eaeefb
;
min-height
:
250px
;
max-height
:
636px
;
//
max-height
:
636px
;
overflow-y
:
auto
;
max-height
:
450px
;
.container
{
>
span
{
display
:
block
;
}
overflow-y
:
auto
;
//
max-height
:
638px
;
padding
:
20px
20px
;
}
&
::-webkit-scrollbar
{
...
...
src/components/echarts/multipleEchart.vue
View file @
bd69aff
...
...
@@ -38,6 +38,7 @@ export default {
this
.
dateArray
=
this
.
totalData
.
map
(
item
=>
item
.
dateTime
)
//日期
this
.
customerCount
=
this
.
totalData
.
map
(
item
=>
item
.
newCustomerCount
)
this
.
customerRatio
=
this
.
totalData
.
map
(
item
=>
item
.
customerRatio
)
this
.
entmicroCount
=
this
.
totalData
.
map
(
item
=>
item
.
newEntmicroCount
)
this
.
entmicroRatio
=
this
.
totalData
.
map
(
item
=>
item
.
entmicroRatio
)
...
...
@@ -52,8 +53,10 @@ export default {
this
.
dateArray
=
this
.
totalData
.
map
(
item
=>
item
.
dateTime
)
//日期
this
.
customerCount
=
this
.
totalData
.
map
(
item
=>
item
.
newCustomerCount
)
this
.
customerRatio
=
this
.
totalData
.
map
(
item
=>
item
.
customerRatio
)
this
.
entmicroCount
=
this
.
totalData
.
map
(
item
=>
item
.
newEntmicroCount
)
this
.
entmicroRatio
=
this
.
totalData
.
map
(
item
=>
item
.
entmicroRatio
)
this
.
initChart
()
}
}
...
...
@@ -71,8 +74,10 @@ export default {
crossStyle
:
{
color
:
'#999'
}
}
},
formatter
:
'{b0}<br/>'
+
'{a0}: {c0}人<br />{a1}: {c1}%<br />{a2}: {c2}人<br />{a3}: {c3}%'
},
// toolbox: {
// feature: {
// dataView: { show: true, readOnly: false },
...
...
@@ -90,6 +95,9 @@ export default {
// fontSize: 14,
// color: "#333",
// },
// tooltip: {
// show: true
// },
itemGap
:
20
,
//图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。
data
:
[
'全部客户'
,
'全部客户环比'
,
'企微客户'
,
'企微客户环比'
],
//图例的数据数组。
inactiveColor
:
'#ccc'
//图例关闭时的颜色。
...
...
@@ -99,14 +107,20 @@ export default {
bottom
:
'20%'
,
//grid 组件离容器下侧的距离。
left
:
'1%'
,
right
:
'5%'
,
containLabel
:
true
//grid 区域是否包含坐标轴的刻度标签。
},
dataZoom
:
[
//dataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。#bed0f7
{
bottom
:
'30px'
,
type
:
'inside'
,
// type: 'inside',
type
:
'slider'
,
show
:
true
,
brushStyle
:
{
show
:
false
},
// backgroundColor: '#ff0000',
// borderColor: '#ff0000',
height
:
'1%'
,
...
...
src/components/search-form/index.vue
View file @
bd69aff
...
...
@@ -20,7 +20,7 @@
<div
class=
"firstRowBtn"
v-if=
"!expande && isShowBtns"
>
<el-button
plain
@
click=
"resetTable"
size=
"small"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
size=
"small"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"syncClick"
:loading=
"ploading"
size=
"small"
>
同步数据
</el-button>
<el-button
type=
"primary"
@
click=
"syncClick"
:loading=
"ploading"
size=
"small"
v-if=
"(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"
>
同步数据
</el-button>
</div>
<div
class=
"itemWidth"
>
<el-form-item
v-for=
"(item, index) in formList"
:key=
"index"
:label=
"item.label || ''"
>
...
...
@@ -29,7 +29,7 @@
<el-input
v-model=
"formModel[item.prop]"
:type=
"item.inputType || 'text'"
:placeholder=
"item.placeholder || '请输入'"
:readonly=
"item.readonly || false"
@
keyup
.
enter
.
native=
"onInput"
></el-input>
</
template
>
<
template
v-else-if=
"item.type === 'select'"
>
<el-select
v-model=
"formModel[item.prop]"
:placeholder=
"item.placeholder || '请选择'"
>
<el-select
size=
"small"
v-model=
"formModel[item.prop]"
:placeholder=
"item.placeholder || '请选择'"
>
<el-option
v-for=
"i in item.options"
:key=
"i[item.value] || i.value"
:label=
"i[item.key] || i.label"
:value=
"i[item.value] || i.value"
:disabled=
"i.disabled"
></el-option>
</el-select>
</
template
>
...
...
@@ -38,7 +38,7 @@
</
template
>
</template>
</el-form-item>
<el-form-item>
<el-form-item
style=
"position:absolute;right:0;bottom:0;"
v-if=
"!needShowExpande || expande"
>
<
template
>
<slot
name=
"form-slot"
></slot>
</
template
>
...
...
@@ -49,6 +49,11 @@
</template>
</el-form-item> -->
</div>
<!-- <div class="rightBottomBtn">
<el-button plain @click="resetTable" size="small">重置</el-button>
<el-button type="primary" @click="searchTable" size="small">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="ploading" size="small" v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)">同步数据</el-button>
</div> -->
</el-form>
</div>
</template>
...
...
@@ -70,7 +75,7 @@ export default {
},
labelPosition
:
{
type
:
String
,
default
:
'
lef
t'
default
:
'
righ
t'
},
labelWidth
:
{
type
:
String
,
...
...
@@ -83,6 +88,14 @@ export default {
isHasSyncBtn
:
{
type
:
Boolean
,
default
:
false
},
merchantModel
:
{
type
:
Number
,
default
:
1
},
accountLevel
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
...
...
@@ -93,36 +106,40 @@ export default {
isShowBtns
:
true
}
},
mounted
()
{
var
sf
=
document
.
getElementById
(
'searchForm'
)
this
.
$nextTick
(()
=>
{
if
(
sf
.
clientWidth
<
1280
&&
this
.
isHasSyncBtn
)
{
console
.
log
(
sf
.
clientWidth
,
'sf'
)
document
.
querySelector
(
'.itemWidth'
).
style
.
maxWidth
=
700
+
'px'
}
if
(
sf
.
clientWidth
<
952
&&
this
.
isHasSyncBtn
)
{
this
.
isShowBtns
=
false
}
let
lineHeight
=
75
if
(
document
.
getElementById
(
'searchForm'
).
offsetHeight
>
lineHeight
*
2
)
{
// console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight)
this
.
expande
=
false
this
.
needShowExpande
=
true
}
else
{
this
.
needShowExpande
=
false
this
.
expande
=
true
}
setTimeout
(()
=>
{
this
.
$emit
(
'setTableHeightEvent'
)
},
200
)
})
var
that
=
this
var
resizeTimer
=
null
// this.$nextTick(() => {
if
(
sf
.
clientWidth
<
1280
&&
this
.
isHasSyncBtn
)
{
console
.
log
(
sf
.
clientWidth
,
'sf'
)
document
.
querySelector
(
'.itemWidth'
).
style
.
maxWidth
=
700
+
'px'
}
if
(
sf
.
clientWidth
<
952
&&
this
.
isHasSyncBtn
)
{
this
.
isShowBtns
=
false
}
let
lineHeight
=
75
//75
if
(
document
.
getElementById
(
'searchForm'
).
offsetHeight
>
lineHeight
*
2
)
{
// console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight)
this
.
expande
=
false
this
.
needShowExpande
=
true
}
else
{
this
.
needShowExpande
=
false
this
.
expande
=
true
}
//有数据不算表格高度,没数据算高度
// setTimeout(() => {
// this.$emit('setTableHeightEvent')
// }, 200)
// })
//-------------------------
// var that = this
// var resizeTimer = null
// 如何实现不管窗口如何改变,只在停止改变之后才执行代码呢?
// $(window).bind('resize', function() {
// if (resizeTimer) clearTimeout(resizeTimer)
// resizeTimer = setTimeout(function() {
// console.log('窗口发生改变了
哟
!')
// console.log('窗口发生改变了!')
// }, 100)
// })
// window.onresize = () => {
...
...
@@ -137,16 +154,16 @@ export default {
// }, 100)
// })()
// }
window
.
addEventListener
(
'resize'
,
()
=>
{
if
(
resizeTimer
)
clearTimeout
(
resizeTimer
)
resizeTimer
=
setTimeout
(
function
()
{
window
.
location
.
reload
()
//浏览器重新从服务器请求资源,在http请求头中不会包含缓存标记
// that.FormHeight = document.getElementById('searchForm').offsetHeight
if
(
sf
.
clientWidth
<
952
&&
that
.
isHasSyncBtn
)
{
that
.
isShowBtns
=
false
}
},
100
)
})()
//
window.addEventListener('resize', () => {
//
if (resizeTimer) clearTimeout(resizeTimer)
//
resizeTimer = setTimeout(function() {
//
window.location.reload() //浏览器重新从服务器请求资源,在http请求头中不会包含缓存标记
//
// that.FormHeight = document.getElementById('searchForm').offsetHeight
//
if (sf.clientWidth < 952 && that.isHasSyncBtn) {
//
that.isShowBtns = false
//
}
//
}, 100)
//
})()
},
watch
:
{
...
...
@@ -177,10 +194,7 @@ export default {
syncClick
()
{
this
.
$emit
(
'syncClick'
)
},
// openClose(){
// console.log( document.getElementById('searchForm').offsetHeight);
// document.getElementById('searchForm').offsetHeight=172;
// }
expandeClick
()
{
this
.
expande
=
!
this
.
expande
setTimeout
(()
=>
{
...
...
@@ -195,10 +209,16 @@ export default {
padding
:
18px
25px
0
0
;
position
:
relative
;
overflow
:
hidden
;
//
height
:
50px
;
min-height
:
50px
;
/deep/.el-form-item__label-wrap
.el-form-item__label
{
//
display
:
inline-block
;
//
width
:
110px
;
}
.firstRowBtn
{
position
:
absolute
;
right
:
60px
;
right
:
52px
;
z-index
:
1
;
.el-button
+
.el-button
{
margin-left
:
20px
;
}
...
...
@@ -230,7 +250,7 @@ export default {
display
:
inline-block
;
//
float
:
left
;
//
width
:
calc
(
50%
-
20px
);
//
max-width
:
3
00px
;
//420
//
max-width
:
3
50px
;
//420
margin-right
:
15px
;
}
.el-range-editor--small.el-input__inner
{
...
...
@@ -239,8 +259,11 @@ export default {
.el-input--small
.el-input__inner
{
width
:
215px
;
}
.el-select
{
width
:
215px
;
}
.el-form-item__content
{
//
width
:
100%
;
width
:
100%
;
}
}
.expande
{
...
...
src/router/routes.js
View file @
bd69aff
...
...
@@ -63,19 +63,25 @@ const staticRoutes = Object.freeze([
name
:
'employee'
,
path
:
"/employee/index"
,
component
:
resolve
=>
require
([
`@/views/employee/index.vue`
],
resolve
),
meta
:
{}
meta
:
{
}
},
{
name
:
'employee'
,
path
:
"/employee/detail"
,
component
:
resolve
=>
require
([
`@/views/employee/detail.vue`
],
resolve
),
meta
:
{}
meta
:
{
}
},
{
name
:
'employee'
,
path
:
"/employee/add"
,
component
:
resolve
=>
require
([
`@/views/employee/add.vue`
],
resolve
),
meta
:
{}
meta
:
{
}
}
])
...
...
src/setup/single.js
View file @
bd69aff
...
...
@@ -16,7 +16,7 @@ import render from './render'
import
{
routes
}
from
'@/router'
export
async
function
start
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
return
const
{
response
,
request
,
sign
,
secret
}
=
await
fetchConfig
(
tru
e
)
const
{
response
,
request
,
sign
,
secret
}
=
await
fetchConfig
(
fals
e
)
Vue
.
prototype
.
$http
=
new
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'mini-f27a0943-8fbf-4b21-a7a1-8e82a117ba39-rop'
}
})
Vue
.
use
(
GLButton
,
GLTable
,
{
permissions
:
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
...
...
src/styles/resetelement.scss
View file @
bd69aff
...
...
@@ -73,4 +73,7 @@
/
deep
/
.el-range-editor.is-active
,
.el-range-editor.is-active
:hover
{
border-color
:
$borderBlue
;
}
\ No newline at end of file
}
// /deep/.el-table__fixed-right{
// height: 100% !important;
//
}
\ No newline at end of file
src/views/clientDataOverview/index.vue
View file @
bd69aff
...
...
@@ -50,7 +50,9 @@
</span>
<span
v-if=
"!isEmptyObj"
>
占比:{{ purposePercent }}%
<i
class=
"triangle"
:class=
"{ active: !isNoBuyUp }"
v-if=
"!isEmptyObj"
></i>
<!-- active: !isNoBuyUp 有active就是绿色-->
<i
class=
"triangle"
:class=
"{ active: isNoBuyUp === 2 }"
v-if=
"isNoBuyUp"
></i>
<i
v-else
>
--
</i>
</span>
<!-- <i class="vertical-line"></i> -->
...
...
@@ -82,7 +84,7 @@
<div
class=
"buy"
>
<div
class=
"buy-total item"
>
<span>
购买(存档)客户数
</span>
<span>
已购车
且
有交易行为的所有客户
</span>
<span>
已购车
或
有交易行为的所有客户
</span>
<span
v-if=
"!isEmptyObj"
>
{{ (topDataObj.purchaseCustomerCount || 0) | overThousandFilter }}
<span
class=
"person-text"
>
人
</span>
...
...
@@ -90,7 +92,8 @@
<span
v-if=
"!isEmptyObj"
>
占比:{{ purchasePercent }}%
<i
class=
"triangle"
:class=
"{ active: !isBuyUp }"
v-if=
"!isEmptyObj"
></i>
<i
class=
"triangle"
:class=
"{ active: isBuyUp === 2 }"
v-if=
"isBuyUp"
></i>
<i
v-else
>
--
</i>
</span>
<no-data
:type=
"'hasText'"
v-if=
"isEmptyObj"
></no-data>
...
...
@@ -171,6 +174,13 @@
<multiple-echart
width=
"100%"
height=
"420px"
:totalData=
"allMapList"
></multiple-echart>
</
template
>
</div>
<el-dialog
title=
"提示"
:visible
.
sync=
"dialogVisible"
top=
"15vh"
width=
"30%"
:before-close=
"handleClose"
>
<span>
企微魔方正在开发中,敬请期待...
</span>
<!-- <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span> -->
</el-dialog>
</div>
</template>
...
...
@@ -187,7 +197,7 @@ import url3 from '../../assets/clientDataOverview/3.png'
import
url4
from
'../../assets/clientDataOverview/4.png'
import
noData
from
'@/components/noData/noData'
export
default
{
name
:
'client
Manage
'
,
name
:
'client
DataOverview
'
,
components
:
{
pieEchart
,
multipleEchart
,
...
...
@@ -239,15 +249,16 @@ export default {
url
:
url4
}
],
isNoBuyUp
:
true
,
//默认环比为增
isBuyUp
:
true
,
isNoBuyUp
:
0
,
//默认环比为增
isBuyUp
:
0
,
bottomDataObj
:
{},
allMapList
:
[],
isShowBarMap
:
false
,
//是否显示底部多种数据图
timeGap
:
7
,
sevenDayStorage
:
{},
thirtyDayStorage
:
{}
thirtyDayStorage
:
{},
dialogVisible
:
false
}
},
...
...
@@ -285,15 +296,31 @@ export default {
methods
:
{
goNextPage
()
{
window
.
open
(
'https://www.baidu.com'
,
'_blank'
)
// window.open('https://www.baidu.com', '_blank')
this
.
dialogVisible
=
true
let
timer
=
3
setInterval
(()
=>
{
timer
--
if
(
timer
==
0
)
{
this
.
dialogVisible
=
false
}
},
1000
)
//要引流企微魔方
this
.
getDataOverviewFun
()
this
.
getDataOverviewBarMapFun
()
},
//引流企微按钮暂时效果
toGuideCompanyWechat
()
{
window
.
open
(
'https://www.baidu.com'
,
'_blank'
)
//
window.open('https://www.baidu.com', '_blank')
// $('.subtitle').hide()
this
.
dialogVisible
=
true
let
timer
=
3
setInterval
(()
=>
{
timer
--
if
(
timer
==
0
)
{
this
.
dialogVisible
=
false
}
},
1000
)
},
showModalLayer
()
{
var
baseNavEle
=
document
.
querySelector
(
'.scrm-base-nav'
)
...
...
@@ -538,7 +565,7 @@ export default {
position
:
absolute
;
left
:
20px
;
top
:
54px
;
font-size
:
1
2
px
;
font-size
:
1
4
px
;
font-weight
:
400
;
color
:
#808080
;
}
...
...
@@ -693,7 +720,7 @@ export default {
&
:nth-child
(
4
)
{
top
:
160px
;
//
left
:
136px
;
left
:
3
5.5
%
;
left
:
3
3
%
;
height
:
22px
;
font-size
:
16px
;
font-weight
:
500
;
...
...
src/views/clientGroupManage/clientGroupDetail.vue
View file @
bd69aff
...
...
@@ -21,7 +21,9 @@
</p>
<p>
<span>
群主邮箱
</span>
<span
class=
"ellipsis-1"
:title=
"leftPanelList.groupHostEmail"
>
{{
leftPanelList
.
groupHostEmail
}}
</span>
<el-tooltip
class=
"item"
:content=
"leftPanelList.groupHostEmail"
placement=
"top"
>
<span
class=
"ellipsis-1"
>
{{
leftPanelList
.
groupHostEmail
}}
</span>
</el-tooltip>
</p>
<p>
<span>
群主部门
</span>
...
...
@@ -33,7 +35,9 @@
</p>
<p>
<span>
创建时间
</span>
<span
class=
"ellipsis-1"
:title=
"leftPanelList.createDate"
>
{{
leftPanelList
.
createDate
}}
</span>
<el-tooltip
class=
"item"
:content=
"leftPanelList.createDate"
placement=
"top"
>
<span
class=
"ellipsis-1"
>
{{
leftPanelList
.
createDate
}}
</span>
</el-tooltip>
</p>
</div>
<div
class=
"rightWrap"
>
...
...
@@ -48,18 +52,14 @@
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</search-form>
<!--
<basic-table
ref=
"clientMassTable"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:hasNum=
"true"
>
<span
slot=
"table-button"
slot-scope=
"scope"
>
<el-button
v-for=
"(j, idx) in tableParams.tableOption.btnList"
:key=
"idx"
:type=
"j.type || 'text'"
:size=
"btn_size"
@
click=
"btnClick(j.pType, scope.scope)"
>
{{
j
.
name
}}
</el-button>
</span>
</basic-table>
-->
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:tableId=
"$route.query.id"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span
slot=
"customerName"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerName
}}
</span>
<span
class=
"pure-blue-text"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
scope
.
scope
.
type
==
2
?
'@企微'
:
''
}}
</span>
</span>
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
0
?
'未知'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
'女
'
}}
</span>
<span>
{{
scope
.
scope
.
customerSex
==
2
?
'女'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
'未知
'
}}
</span>
</span>
<span
slot=
"joinScene"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
joinScene
==
1
?
'直接邀请入群'
:
scope
.
scope
.
joinScene
==
2
?
'通过邀请链接入群'
:
scope
.
scope
.
joinScene
==
3
?
'通过扫描群二维码入群'
:
''
}}
</span>
...
...
@@ -183,12 +183,11 @@ export default {
},
created
()
{
this
.
getTableDetail
()
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
})
},
methods
:
{
async
getTableDetail
(
id
=
this
.
$route
.
query
.
id
)
{
const
res
=
await
getTableDetail
({
id
:
id
})
...
...
@@ -212,10 +211,16 @@ export default {
})
},
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupManage
.
setTableHeightFun
()
// this.$refs.clientGroupDetail
.setTableHeightFun()
},
setTableFinishFun
(
content
)
{
this
.
clientTableDataNum
=
content
.
length
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
//接收到的数据为空
if
(
!
this
.
$refs
.
clientGroupDetail
.
data
.
length
)
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
}
},
goBack
()
{
this
.
$router
.
push
({
path
:
'/clientGroupManage/index'
})
...
...
@@ -226,7 +231,7 @@ export default {
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{}
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
goDetail
(
id
)
{
...
...
@@ -264,6 +269,7 @@ export default {
.backBtn
{
margin-right
:
20px
;
height
:
32px
;
font-size
:
14px
;
background
:
$
btnBlue
;
color
:
#fff
;
border-radius
:
4px
;
...
...
src/views/clientGroupManage/index.vue
View file @
bd69aff
...
...
@@ -3,11 +3,11 @@
<div
class=
"scrm-sub-client-container"
>
<!--
<p
class=
"pageTitle"
>
客户群管理
</p>
-->
<div
class=
"pageContent"
>
<search-form
class=
"searchTop border-shadow"
:isHasSyncBtn=
"true"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
@
syncClick=
"syncClick"
>
<search-form
class=
"searchTop border-shadow"
:isHasSyncBtn=
"true"
:
merchantModel=
"merchantModel"
:accountLevel=
"accountLevel"
:
formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
@
syncClick=
"syncClick"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"syncClick"
:loading=
"sloading"
>
同步数据
</el-button>
<el-button
type=
"primary"
@
click=
"syncClick"
:loading=
"sloading"
v-if=
"(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"
>
同步数据
</el-button>
</span>
</search-form>
<!--
<basic-table
ref=
"clientGroupTable"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:hasNum=
"true"
>
...
...
@@ -15,7 +15,7 @@
<el-button
v-for=
"(j, idx) in tableParams.tableOption.btnList"
:key=
"idx"
:type=
"j.type || 'text'"
:size=
"btn_size"
@
click=
"btnClick(j.pType, scope.scope)"
>
{{
j
.
name
}}
</el-button>
</span>
</basic-table>
-->
<GLTable
ref=
"clientGroupManage"
:hasNum=
"true"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:noDataImg=
"url"
:pageConf=
"pageConf"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable
@
setTableFinishFun=
"setTableFinishFun"
ref=
"clientGroupManage"
:hasNum=
"true"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:noDataImg=
"url"
:pageConf=
"pageConf"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span
slot=
"status"
slot-scope=
"scope"
>
<!--
<span
class=
"dot"
:class=
"scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"
></span>
-->
<span
class=
"statusText"
:class=
"scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''"
>
{{
scope
.
scope
.
status
?
CLIENTSTATUS
[
scope
.
scope
.
status
].
split
(
','
)[
0
]
:
'--'
}}
</span>
...
...
@@ -57,7 +57,6 @@ export default {
}
}
},
{
type
:
'input'
,
inputType
:
'text'
,
...
...
@@ -134,10 +133,25 @@ export default {
}
},
getListApi
:
getTableList
,
setHeight
:
''
setHeight
:
''
,
merchantModel
:
1
,
accountLevel
:
0
//1,2,3,4工厂,省代,市代,门店
}
},
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
//运行在qiankun容器中
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
}
},
mounted
()
{
// setTimeout(() => {
// if (!this.$refs.clientGroupManage.data.length) {
// this.$refs.clientGroupManage.setTableHeightFun()
// }
// }, 400)
},
methods
:
{
syncClick
()
{
let
_this
=
this
...
...
@@ -158,6 +172,12 @@ export default {
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupManage
.
setTableHeightFun
()
},
setTableFinishFun
(
content
)
{
//接收到的数据为空
if
(
!
this
.
$refs
.
clientGroupManage
.
data
.
length
)
{
this
.
$refs
.
clientGroupManage
.
setTableHeightFun
()
}
},
searchTable
()
{
this
.
$refs
.
clientGroupManage
.
refreshTable
()
},
...
...
@@ -215,6 +235,7 @@ export default {
}
.pageContent
{
padding
:
6px
20px
30px
;
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
//
min-width
:
1300px
;
background-color
:
#fff
;
.el-button
+
.el-button
{
...
...
src/views/clientManage/clientDetail.vue
View file @
bd69aff
...
...
@@ -4,7 +4,7 @@
<div
class=
"userId"
>
<span>
客户ID:
{{
leftPanelInfo
.
oneId
}}
</span>
</div>
<button
class=
"backBtn"
@
click=
"goBack"
>
返回客户管理
</button>
<button
class=
"backBtn"
@
click=
"goBack"
>
返回客户
信息
管理
</button>
</div>
<div
class=
"content"
>
<div
class=
"leftWrap"
>
...
...
@@ -14,12 +14,15 @@
</div>
<p>
<span>
客户名称
</span>
<span
class=
"ellipsis-1"
:title=
"leftPanelInfo.customerName"
>
<span>
{{
leftPanelInfo
.
customerName
}}
<span
style=
"color:#5850ff"
>
{{
leftPanelInfo
.
type
==
1
?
'@微信'
:
leftPanelInfo
.
type
==
2
?
'@企微'
:
''
}}
</span>
<el-tooltip
effect=
"dark"
:content=
"leftPanelInfo.customerName"
placement=
"top"
>
<span
class=
"ellipsis-1"
>
<span>
<!--
{{
leftPanelInfo
.
customerName
}}
-->
{{
beautySub
(
leftPanelInfo
.
customerName
)
}}
<span
style=
"color:#5850ff"
>
{{
leftPanelInfo
.
type
==
1
?
'@微信'
:
leftPanelInfo
.
type
==
2
?
'@企微'
:
''
}}
</span>
</span>
</span>
</
span
>
</
el-tooltip
>
</p>
<p>
<span>
联系电话
</span>
...
...
@@ -56,26 +59,32 @@
</p>
<p>
<span>
当前状态
</span>
<span>
{{
leftPanelInfo
.
status
==
1
?
'删除
'
:
leftPanelInfo
.
status
==
0
?
'正常'
:
''
}}
</span>
<span>
{{
leftPanelInfo
.
status
==
-
1
?
'删除好友
'
:
leftPanelInfo
.
status
==
0
?
'正常'
:
''
}}
</span>
</p>
<p>
<span>
来源
</span>
<span
class=
"ellipsis-1"
:title=
"leftPanelInfo.addWay | toLabel"
>
{{
leftPanelInfo
.
addWay
|
toLabel
}}
</span>
<el-tooltip
effect=
"dark"
:content=
"leftPanelInfo.addWay | toLabel"
placement=
"top"
>
<span
class=
"ellipsis-1"
>
{{
leftPanelInfo
.
addWay
|
toLabel
}}
</span>
</el-tooltip>
</p>
</div>
<div
class=
"rightWrap"
>
<p><span>
标签信息
</span></p>
<div
class=
"tagsWrap"
>
<!--
<el-tooltip
effect=
"dark"
:content=
"leftPanelInfo.addWay | toLabel"
placement=
"top"
>
<span
class=
"ellipsis-1"
>
{{
leftPanelInfo
.
addWay
|
toLabel
}}
</span>
</el-tooltip>
-->
<span
class=
"tag ellipsis-1"
v-for=
"item in tagsList"
:key=
"item.labelId"
:title=
"item.labelName"
>
{{
item
.
labelName
}}
</span>
<!-- 添加标签 仅对该客户的跟进员工可见(要有登录信息)
-->
<span
class=
"tag addTag"
@
click=
"btnClick('create')"
>
添加
</span>
<!-- 添加标签 仅对该客户的跟进员工可见(要有登录信息)
1--商户 2--员工
-->
<span
class=
"tag addTag"
@
click=
"btnClick('create')"
v-if=
"userType == 2"
>
添加
</span>
</div>
<p>
<span>
车辆信息
</span>
<span>
{{
vehicleTableData
.
length
||
0
}}
辆
</span>
</p>
<!--1. 车辆信息表 -->
<el-table
:data=
"vehicleTableData"
style=
"width: 100%"
:row-style=
"
{ height: 88 + 'px' }" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<!-- :row-style="
{ height: 88 + 'px' }" -->
<el-table
:data=
"vehicleTableData"
style=
"width: 100%"
:header-cell-style=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<el-table-column
prop=
"standNo"
label=
"车架号(后6位)"
align=
"center"
width=
"120"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
standNo
.
substring
(
scope
.
row
.
standNo
.
length
-
6
)
}}
</span>
...
...
@@ -139,19 +148,19 @@
</p>
<!-- <div>所属客户群表格,待定</div> -->
<!-- 3.所属客户群 -->
<el-table
:data=
"clientGroupTableList"
style=
"width: 100%"
:
row-style=
"{ height: 88 + 'px' }"
:
header-cell-style=
"{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"
>
<el-table
:data=
"clientGroupTableList"
style=
"width: 100%"
:header-cell-style=
"{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"
>
<el-table-column
label=
"客户群名称"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
groupName
||
'群聊(默认)'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"groupHostName"
label=
"群主"
align=
"center"
></el-table-column>
<el-table-column
prop=
"membersNumber"
label=
"
成员
数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"membersNumber"
label=
"
客户
数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"groupNickName"
label=
"本群昵称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"joinTime"
label=
"入群时间"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span
class=
"blue-text"
@
click=
"goDetail(scope.row.id)"
>
详情
</span>
<span
class=
"blue-text"
@
click=
"goDetail(scope.row.id
, scope.row.groupName
)"
>
详情
</span>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -161,19 +170,19 @@
<slot>
<p
class=
"dialogSubTitle"
>
企业标签
</p>
<div
class=
"companyRowData"
v-for=
"(item, index) in companyTagsList"
:key=
"index"
>
<span>
{{ item.labelGroup.name }}
</span>
<span
:title=
"item.labelGroup.name"
>
{{ item.labelGroup.name }}
</span>
<div
class=
"tagsBox"
>
<span
v-for=
"(i, j) in item.labelList"
:key=
"j"
class=
"ellipsis-1"
:class=
"{ activeTag: i.checked }"
:title=
"i.name"
@
click=
"checkNewTag(i.checked, j, item.labelList, i.original)"
>
{{ i.name }}
</span>
</div>
</div>
<p
class=
"dialogSubTitle"
>
自店标签
</p>
<div
class=
"ownShopRowData"
v-for=
"(xItem, xIndex) in ownShopTagsList"
:key=
"xIndex"
>
<span>
{{ xItem.labelGroup.name }}
</span>
<span
:title=
"xItem.labelGroup.name"
>
{{ xItem.labelGroup.name }}
</span>
<div
class=
"tagsBox"
>
<span
v-for=
"(m, n) in xItem.labelList"
:key=
"n"
class=
"ellipsis-1"
:class=
"{ activeTag: m.checked }"
:title=
"m.name"
@
click=
"checkNewTag(m.checked, n, xItem.labelList, m.original)"
>
{{ m.name }}
</span>
</div>
</div>
<!-- 这里btn-behind插槽失效了,原因:??? -->
<!-- 这里btn-behind插槽
莫名
失效了,原因:??? -->
<!-- <el-button slot="behind" @click="goNewTag">没找到需要的标签,创建新标签</el-button> -->
</slot>
</basic-dialog>
...
...
@@ -209,7 +218,7 @@ export default {
{
label
:
'添加时间'
,
prop
:
'addTime'
,
width
:
10
5
width
:
10
0
},
{
label
:
'来源'
,
...
...
@@ -249,26 +258,46 @@ export default {
allTagsList
:
[],
//企业自店的所有的加起来
submitTagsList
:
[],
storeTagList
:
[],
merchantId
:
10001001
merchantId
:
10001001
,
merchantModel
:
1
,
//集团:1,门店:2
userType
:
0
//1是商户,2是员工
}
},
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
//运行在qiankun容器中
console
.
log
(
'欠款'
,
this
.
$globalState
.
session
)
this
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
userType
=
this
.
$globalState
.
session
.
userType
}
this
.
getPageDetail
()
this
.
getSingleClientTag
(
this
.
$route
.
query
.
id
,
this
.
merchantId
)
},
methods
:
{
/* *
用途:js中字符串超长作固定长度加省略号(...)处理
参数说明:
str:需要进行处理的字符串,可含汉字
len:需要显示多少个汉字,两个英文字母相当于一个汉字
*/
beautySub
(
value
)
{
if
(
value
&&
value
.
length
>
8
)
{
return
value
.
substring
(
0
,
6
)
+
'...'
}
else
{
return
value
}
},
addTypeToLable
(
num
)
{
return
num
===
0
?
'成员主动添加'
:
num
===
1
?
'客户主动添加'
:
num
===
2
?
'成员共享/管理员分配'
:
''
},
goDetail
(
id
)
{
goDetail
(
id
,
name
)
{
var
newname
=
name
||
'群聊(默认)'
this
.
$router
.
push
({
path
:
'/clientGroupManage/clientGroupDetail'
,
query
:
{
id
:
id
id
:
id
,
groupName
:
newname
}
})
},
...
...
@@ -276,7 +305,8 @@ export default {
getSingleClientTag
(
oneId
=
14120314541863
,
merchantId
=
10001001
)
{
let
param
=
{
'req.oneId'
:
oneId
,
'req.merchantId'
:
merchantId
'req.merchantId'
:
merchantId
,
'req.edition'
:
this
.
merchantModel
}
getSingleClientTag
(
param
)
.
then
(
res
=>
{
...
...
@@ -334,7 +364,7 @@ export default {
}
},
getAllTags
()
{
getAllTagTree
({
'labelTreeReq.shopId'
:
this
.
merchantId
})
getAllTagTree
({
'labelTreeReq.shopId'
:
this
.
merchantId
,
'labelTreeReq.edition'
:
this
.
merchantModel
})
.
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
console
.
log
(
res
.
data
.
labelTreeRets
,
'标签树'
)
...
...
@@ -393,7 +423,8 @@ export default {
this
.
submitTagsList
.
forEach
((
item
,
index
)
=>
{
let
param
=
{
'req.OneId'
:
this
.
$route
.
query
.
id
,
'req.labelGroupId'
:
item
.
labelGroup
.
id
'req.labelGroupId'
:
item
.
labelGroup
.
id
,
'req.edition'
:
this
.
merchantModel
// 'req.labelIdList': item.labelList.map(ele => ele.id)
}
var
ids
=
item
.
labelList
.
map
(
ele
=>
ele
.
id
)
...
...
@@ -486,6 +517,7 @@ export default {
.backBtn
{
margin-right
:
20px
;
height
:
32px
;
font-size
:
14px
;
background
:
$
btnBlue
;
color
:
#fff
;
border-radius
:
4px
;
...
...
@@ -655,6 +687,11 @@ export default {
color
:
#717171
;
line-height
:
20px
;
text-align
:
right
;
max-width
:
82px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
word-break
:
break-all
;
}
.tagsBox
{
display
:
flex
;
...
...
src/views/clientManage/index.vue
View file @
bd69aff
...
...
@@ -3,16 +3,15 @@
<div
class=
"scrm-sub-client-container"
>
<!--
<p
class=
"pageTitle"
>
客户管理
</p>
-->
<div
class=
"pageContent"
>
<search-form
:ploading=
"sloading"
:isHasSyncBtn=
"true"
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"clientManageFormList"
@
setTableHeightEvent=
"setTableHeightEven
t"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
@
syncClick=
"syncClick"
>
<search-form
:ploading=
"sloading"
:isHasSyncBtn=
"true"
:merchantModel=
"merchantModel"
:accountLevel=
"accountLevel"
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"clientManageFormLis
t"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
@
syncClick=
"syncClick"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<!-- :id="tableParams.btnId" -->
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"syncClick"
:loading=
"sloading"
>
同步数据
</el-button>
<el-button
type=
"primary"
@
click=
"syncClick"
:loading=
"sloading"
v-if=
"(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"
>
同步数据
</el-button>
</span>
</search-form>
<GLTable
ref=
"clientManage"
:hasNum=
"true"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:noDataImg=
"url"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable
@
setTableFinishFun=
"setTableFinishFun"
ref=
"clientManage"
:hasNum=
"true"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:noDataImg=
"url"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span
slot=
"customerName"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.customerName"
placement=
"top"
>
<span
class=
"ellipsis-1"
style=
"display: inline-block; max-width: 70px; text-align: left"
>
{{
scope
.
scope
.
customerName
}}
</span>
...
...
@@ -149,6 +148,7 @@ export default {
placeholder
:
'请输入跟进员工'
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
tableParams
:
{
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...
...
@@ -156,7 +156,7 @@ export default {
// tableOption: true,
tableColumns
:
[
{
label
:
'
User_id
'
,
label
:
'
客户ID
'
,
prop
:
'oneId'
,
width
:
180
},
...
...
@@ -190,13 +190,13 @@ export default {
label
:
'是否加企微'
,
//1. 加入,0.未加入
prop
:
'isJoin'
,
addHtml
:
'isJoin'
,
width
:
95
width
:
100
},
{
label
:
'当前状态'
,
prop
:
'status'
,
addHtml
:
'status'
,
width
:
8
0
width
:
10
0
},
{
label
:
'添加时间'
,
...
...
@@ -215,12 +215,27 @@ export default {
}
},
getListApi
:
getTableList
,
sourceList
:
[]
sourceList
:
[],
merchantModel
:
1
,
accountLevel
:
0
//1,2,3,4工厂,省代,市代,门店
}
},
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
//运行在qiankun容器中
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
}
this
.
getDictionaryFun
()
},
mounted
()
{
//没数据的时候要算高度
// setTimeout(() => {
// if (!this.$refs.clientManage.data.length) {
// this.$refs.clientManage.setTableHeightFun()
// }
// }, 400)
},
methods
:
{
statusText
(
text
)
{
...
...
@@ -229,6 +244,12 @@ export default {
setTableHeightEvent
()
{
this
.
$refs
.
clientManage
.
setTableHeightFun
()
},
setTableFinishFun
(
content
)
{
//接收到的数据为空
if
(
!
this
.
$refs
.
clientManage
.
data
.
length
)
{
this
.
$refs
.
clientManage
.
setTableHeightFun
()
}
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
...
...
@@ -335,11 +356,15 @@ export default {
}
.pageContent
{
padding
:
6px
20px
30px
;
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
//
min-width
:
1300px
;
background-color
:
#fff
;
.el-button
+
.el-button
{
margin-left
:
20px
;
}
.searchTop
{
//
margin-bottom
:
20px
;
}
//
.el-button
{
//
font-size
:
14px
;
//
font-weight
:
400
;
...
...
src/views/employee/index.vue
View file @
bd69aff
...
...
@@ -2,14 +2,19 @@
<div
class=
"scrm-sub-client-container"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
>
创建员工
</el-button>
<div
class=
"pageContent"
>
<search-form
:ploading=
"sloading"
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"
clientManag
eFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
>
<search-form
:ploading=
"sloading"
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"
employe
eFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<!-- :id="tableParams.btnId" -->
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
<
el-button
type=
"primary"
@
click=
"syncClick"
:loading=
"sloading"
>
同步数据
</el-button
>
<
!--
<el-button
type=
"primary"
@
click=
"syncClick"
:loading=
"sloading"
>
同步数据
</el-button>
--
>
</span>
</search-form>
<GLTable
@
setTableFinishFun=
"setTableFinishFun"
ref=
"employeeManage"
:hasNum=
"true"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<template
slot=
"auth-button"
slot-scope=
"scope"
>
<span
@
click=
"btnClick('edit', scope.scope)"
class=
"blue-text"
>
编辑标签组
</span>
</
template
>
</GLTable>
</div>
</div>
</template>
...
...
@@ -17,12 +22,149 @@
<
script
>
export
default
{
data
()
{
return
{}
return
{
searchForm
:
{},
employeeFormList
:
[
{
type
:
'select'
,
prop
:
'merchantName'
,
label
:
'商户名称'
,
placeholder
:
'请选择'
,
options
:
[
{
label
:
'冒烟商户AB'
,
value
:
1
},
{
label
:
'冒烟门店2021'
,
value
:
2
}
]
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'creator'
,
label
:
'创建者'
,
placeholder
:
'请输入创建者'
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'状态'
,
placeholder
:
'请选择'
,
options
:
[
{
label
:
'开启'
,
value
:
1
},
{
label
:
'关闭'
,
value
:
2
}
]
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'staffName'
,
label
:
'员工姓名'
,
placeholder
:
'请输入员工姓名'
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'staffPhone'
,
label
:
'手机号'
,
placeholder
:
'请输入手机号'
},
],
tableParams
:
{
listName
:
'data'
,
tableColumns
:
[
{
label
:
'员工姓名'
,
prop
:
'staffName'
,
width
:
120
,
},
{
label
:
'角色'
,
prop
:
'roleName'
,
},
{
label
:
'登录手机号'
,
prop
:
'staffPhone'
,
width
:
125
},
{
label
:
'企微号'
,
prop
:
'entmicroName'
,
width
:
125
},
{
label
:
'状态'
,
prop
:
'statusName'
,
width
:
80
},
{
label
:
'创建者'
,
prop
:
'createdAccount'
},
{
label
:
'商户名(商户号)'
,
prop
:
'merchantName'
,
width
:
160
},
{
label
:
'更新时间'
,
prop
:
'updatedTime'
,
width
:
110
},
{
label
:
'启用开关'
,
prop
:
'statusName'
,
width
:
85
}
],
tableOption
:
{
width
:
170
}
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
getListApi
:
''
}
},
methods
:
{
setTableFinishFun
(
content
)
{
console
.
log
(
'表格完成'
,
this
.
$refs
.
employeeManage
.
data
)
},
setTableHeightEvent
()
{
this
.
$refs
.
employeeManage
.
setTableHeightFun
()
},
btnClick
()
{},
//搜索表格
searchTable
()
{
this
.
$refs
.
employeeManage
.
refreshTable
()
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{}
this
.
$refs
.
employeeManage
.
refreshTable
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.scrm-sub-client-container
{
.pageContent
{
padding
:
6px
20px
30px
;
margin-top
:
20px
;
background-color
:
#fff
;
.el-button
+
.el-button
{
margin-left
:
20px
;
}
}
}
</
style
>
src/views/tagsManage/index.vue
View file @
bd69aff
This diff is collapsed.
Click to expand it.
vue.config.js
View file @
bd69aff
...
...
@@ -16,7 +16,7 @@ const cdn = {
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/index.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vuex/3.6.2/vuex.min.js`
,
// `${CDN_DOMAIN}ajax/libs/axios/0.21.0/axios.min.js`,
`
${
CDN_DOMAIN
}
ajax/libs/echarts/5.1.2/echarts.min.js`
`
${
CDN_DOMAIN
}
ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
...
...
@@ -54,7 +54,18 @@ module.exports = {
port
:
process
.
env
.
VUE_APP_PORT
,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
// 主应用获取子应用时跨域响应头
}
},
// proxy: {
// '/api': {
// target: 'http://rop-merchant.test.glsx.com.cn',
//
// changeOrigin: true,
//
// pathRewrite: {
// '^/api': '/'
// }
// },
// },
},
chainWebpack
:
config
=>
{
config
.
plugin
(
'html'
)
...
...
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