Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-drainage
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 55fa78e7
authored
Dec 27, 2021
by
yangming
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
cdn
1 parent
81e21776
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
40 deletions
package.json
src/components/basic-title/index.vue
src/main.js
src/views/channel/components/channelList.vue
package.json
View file @
55fa78e
...
...
@@ -12,7 +12,7 @@
"core-js"
:
"^3.4.4"
,
"el-tree-transfer"
:
"^2.2.6"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-components"
:
"^1.2.
4
"
,
"glsx-components"
:
"^1.2.
8
"
,
"glsx-table"
:
"^1.0.9"
,
"vue-draggable-resizable"
:
"^2.3.0"
},
...
...
src/components/basic-title/index.vue
View file @
55fa78e
<
template
>
<div
class=
"basic-panel"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"content"
placement=
"top"
v-
show
=
"tooltipStatus"
>
<div
class=
"basic-title
-s"
>
{{
content
}}
</div>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"content"
placement=
"top"
v-
if
=
"tooltipStatus"
>
<div
class=
"basic-title
"
>
{{
content
|
ellipsis
(
this
)
}}
</div>
</el-tooltip>
<div
class=
"basic-title"
v-
show=
"!tooltipStatus"
>
{{
content
}}
</div>
<div
class=
"basic-title"
v-
else
>
{{
content
|
ellipsis
(
this
)
}}
</div>
</div>
</
template
>
<
script
>
...
...
@@ -14,9 +14,9 @@ export default {
type
:
String
,
default
:
''
},
t
itleWid
:
{
t
extLength
:
{
type
:
Number
,
default
:
100
default
:
8
}
},
data
()
{
...
...
@@ -24,28 +24,26 @@ export default {
tooltipStatus
:
false
}
},
watch
:
{
content
:
{
handler
(
value
)
{
const
title
=
document
.
querySelector
(
'.basic-title'
)
console
.
log
(
title
,
value
)
if
(
title
.
innerText
==
value
)
{
this
.
tooltipStatus
=
false
}
else
{
this
.
tooltipStatus
=
true
}
},
deep
:
true
filters
:
{
ellipsis
(
value
,
that
)
{
console
.
log
(
value
,
that
)
if
(
value
.
length
>
that
.
textLength
)
{
that
.
tooltipStatus
=
true
return
value
.
slice
(
0
,
that
.
textLength
)
+
'...'
}
return
value
}
},
mounted
()
{
const
title
=
document
.
querySelector
(
'.basic-title-s'
)
console
.
log
(
title
.
innerText
,
this
.
content
)
if
(
title
.
innerText
==
this
.
content
)
{
this
.
tooltipStatus
=
false
}
else
{
this
.
tooltipStatus
=
true
}
// this.$nextTick(() => {
// const title = document.querySelector('.basic-title-s')
// console.log(title.innerText, this.content)
// if (title.innerText == this.content) {
// this.tooltipStatus = false
// } else {
// this.tooltipStatus = true
// }
// })
}
}
</
script
>
...
...
@@ -54,11 +52,4 @@ export default {
.basic-panel
{
display
:
inline-block
;
}
.basic-title
,
.basic-title-s
{
width
:
100%
;
display
:
inline-block
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
</
style
>
src/main.js
View file @
55fa78e
...
...
@@ -10,6 +10,7 @@
import
Vue
from
'vue'
import
apis
from
'./api'
import
'./public-path'
import
'./components'
// import 'glsx-components/dist/glsx-components.css'
import
{
start
}
from
'@/setup'
Vue
.
config
.
productionTip
=
false
...
...
src/views/channel/components/channelList.vue
View file @
55fa78e
...
...
@@ -18,7 +18,7 @@
</el-form-item>
</el-row>
</el-form>
<GLTable
ref=
"table"
@
refreshTable=
"handleSearch"
:searchForm=
"tableSearchForm"
:layout=
"layout"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
>
<GLTable
v-loading=
"loading"
ref=
"table"
@
refreshTable=
"handleSearch"
:searchForm=
"tableSearchForm"
:layout=
"layout"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<GLButton
type=
"text"
@
click=
"handleDetail(scope.scope)"
fn=
"到店咨询客户数据"
>
数据
</GLButton>
<GLButton
type=
"text"
@
click=
"handleEdit(scope.scope)"
fn=
"活码编辑"
>
修改
</GLButton>
...
...
@@ -37,13 +37,14 @@
<el-popover
trigger=
"hover"
placement=
"top"
v-if=
"scope.scope.staffName.split(',').length > 3"
>
<div
class=
"accountType-row"
v-for=
"(item, index) in scope.scope.staffName.split(',')"
:key=
"index"
>
<i
class=
"el-icon-user-solid"
></i>
{{
item
}}
<GLTitle
:content=
"item"
textLength=
"4"
></GLTitle>
</div>
<div
slot=
"reference"
class=
"name-wrapper"
>
<div
v-for=
"(item, index) in scope.scope.staffName.split(',')"
:key=
"index"
v-show=
"index
< 4
"
>
<div
class=
"accountType-row"
>
<i
class=
"el-icon-user-solid"
></i>
{{
index
==
3
&&
scope
.
scope
.
staffName
.
split
(
','
).
length
>
3
?
'...('
+
scope
.
scope
.
staffName
.
split
(
','
).
length
+
')'
:
item
}}
<span
v-if=
"index == 3 && scope.scope.staffName.split(',').length > 3"
>
{{
'...('
+
scope
.
scope
.
staffName
.
split
(
','
).
length
+
')'
}}
</span>
<GLTitle
:content=
"item"
textLength=
"4"
v-else
></GLTitle>
</div>
</div>
</div>
...
...
@@ -51,7 +52,7 @@
<div
v-for=
"(item, index) in scope.scope.staffName.split(',')"
:key=
"index"
v-else
>
<div
class=
"accountType-row"
>
<i
class=
"el-icon-user-solid"
></i>
{{
item
}}
<GLTitle
:content=
"item"
textLength=
"4"
></GLTitle>
</div>
</div>
</div>
...
...
@@ -64,18 +65,21 @@
</div>
<div
slot=
"tagging"
slot-scope=
"scope"
class=
"tag-panel"
>
<el-popover
trigger=
"hover"
placement=
"top"
v-if=
"scope.scope.taggingList && scope.scope.taggingList.length > 3"
>
<div
:title=
"item.name"
class=
"accountType-row accountType-row-tag"
v-for=
"(item, index) in scope.scope.taggingList"
:key=
"index"
>
<
!--
<
div
:title=
"item.name"
class=
"accountType-row accountType-row-tag"
v-for=
"(item, index) in scope.scope.taggingList"
:key=
"index"
>
{{
item
.
name
.
length
>
8
?
item
.
name
.
substring
(
0
,
8
)
+
'...'
:
item
.
name
}}
</div>
</div>
-->
<GLTitle
:content=
"item.name"
class=
"accountType-row accountType-row-tag"
v-for=
"(item, index) in scope.scope.taggingList"
:key=
"index"
></GLTitle>
<div
slot=
"reference"
class=
"name-wrapper"
>
<div
v-for=
"(item, index) in scope.scope.taggingList"
:key=
"index"
v-show=
"index
< 4
"
>
<div
:title=
"item.name"
class=
"accountType-row accountType-row-tag"
>
{{
index
==
3
&&
scope
.
scope
.
taggingList
.
length
>
3
?
'...('
+
scope
.
scope
.
taggingList
.
length
+
')'
:
item
.
name
.
length
>
8
?
item
.
name
.
substring
(
0
,
8
)
+
'...'
:
item
.
name
}}
</div>
<div
:title=
"item.name"
class=
"accountType-row accountType-row-tag"
v-if=
"index == 3 && scope.scope.taggingList.length > 3"
>
{{
'...('
+
scope
.
scope
.
taggingList
.
length
+
')'
}}
</div>
<GLTitle
:content=
"item.name"
class=
"accountType-row accountType-row-tag"
v-else
></GLTitle>
</div>
</div>
</el-popover>
<template
v-if=
"scope.scope.taggingList && scope.scope.taggingList.length
<
= 3
&&
scope.scope.taggingList.length > 0">
<div
v-for=
"(item, index) in scope.scope.taggingList"
:key=
"index"
>
<div
:title=
"item.name"
class=
"accountType-row accountType-row-tag"
>
{{
item
.
name
.
length
>
8
?
item
.
name
.
substring
(
0
,
8
)
+
'...'
:
item
.
name
}}
</div>
<GLTitle
:content=
"item.name"
class=
"accountType-row accountType-row-tag"
></GLTitle>
<!--
<div
:title=
"item.name"
class=
"accountType-row accountType-row-tag"
>
{{
item
.
name
.
length
>
8
?
item
.
name
.
substring
(
0
,
8
)
+
'...'
:
item
.
name
}}
</div>
-->
</div>
</
template
>
<div
v-if=
"!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)"
>
--
</div>
...
...
@@ -98,6 +102,7 @@ export default {
name
:
'channelList'
,
data
()
{
return
{
loading
:
false
,
tableSearchForm
:
{},
tableData
:
[],
tableParams
:
{
...
...
@@ -234,7 +239,9 @@ export default {
pageSize
:
this
.
$refs
.
table
.
page
.
pageSize
,
pageNum
:
this
.
$refs
.
table
.
page
.
pageNum
}
this
.
loading
=
true
;
this
.
$apis
.
channel
.
listChannelCodeByPage
(
params
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
)
{
this
.
tableData
=
res
.
data
this
.
tableData
.
forEach
(
item
=>
{
...
...
@@ -389,6 +396,7 @@ export default {
}
i
{
color
:
#75acff
;
margin-right
:
3px
;
}
//
&
::before
{
//
content
:
''
;
...
...
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