Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
new-sing
admin-base
Commits
837f7d9b
Commit
837f7d9b
authored
Sep 12, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团队概况、小时动态 优化 意向度、通话时间转换
parent
097ea963
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
56 deletions
+101
-56
dialog.vue
src/components/team/dialog.vue
+16
-3
hourDialog.vue
src/components/team/hourDialog.vue
+22
-5
index.vue
src/components/team/index.vue
+7
-3
common.js
src/util/common.js
+56
-45
No files found.
src/components/team/dialog.vue
View file @
837f7d9b
...
...
@@ -23,7 +23,7 @@
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
mobile
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"意向度"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
intention
||
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
transIntention
(
scope
.
row
.
intention
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"最近备注时间"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -62,7 +62,7 @@
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
mobile
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"意向度"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
intention
||
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
transIntention
(
scope
.
row
.
intention
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"最近备注时间"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -101,7 +101,7 @@
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
contact_phone
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"意向度"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
intention
||
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
transIntention
(
scope
.
row
.
intention
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"最近备注时间"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -175,6 +175,7 @@
<
script
>
import
{
getVisitedApi
,
getClassOpenedApi
,
getAchievementApi
,
getPhoneRecordApi
,
getValidchatApi
}
from
"@service/api"
;
import
{
CALLBACK_INTENTION
}
from
"@/util/wordbook"
;
import
page
from
'@framework/page'
export
default
{
...
...
@@ -210,6 +211,18 @@
}
}
,
transIntention
(
string
)
{
var
result
;
if
(
string
)
{
result
=
CALLBACK_INTENTION
.
find
(
i
=>
{
return
i
.
value
==
string
}
).
label
}
else
{
result
=
'-'
}
return
result
}
,
periodName
(
val
)
{
let
str
=
''
;
if
(
val
.
goods_id
)
{
...
...
src/components/team/hourDialog.vue
View file @
837f7d9b
...
...
@@ -69,11 +69,11 @@
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phone_start_time
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"通话时间"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phone_duration
?
scope
.
row
.
phone_duration
+
's'
:
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
transTime
(
scope
.
row
.
phone_duration
)
}}
</
template
>
</el-table-column>
<!--todo 转义-->
<el-table-column
label=
"意向度"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
intention
||
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
transIntention
(
scope
.
row
.
intention
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"下次回访时间"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
next_visit_at
||
'-'
}}
</
template
>
...
...
@@ -128,14 +128,14 @@
</el-table-column>
<el-table-column
v-if=
"dialog.search.type == '1'"
label=
"呼出时间"
width=
"92px"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phone_
start_time
||
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
start_time
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
v-if=
"dialog.search.type == '1'"
label=
"通话时间"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phone_duration
?
scope
.
row
.
phone_duration
+
's'
:
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
transTime
(
scope
.
row
.
duration
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"意向度"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
intention
||
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
transIntention
(
scope
.
row
.
intention
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"下次回访时间"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
next_visit_at
||
'-'
}}
</
template
>
...
...
@@ -167,6 +167,8 @@
import
PhoneRecord
from
'@framework/PhoneRecord'
import
ChatRecord
from
'@framework/ChatRecord'
import
page
from
'@framework/page'
import
CommonJs
from
'@util/common'
;
import
{
CALLBACK_INTENTION
}
from
"@/util/wordbook"
;
export
default
{
name
:
"HourDialog"
,
...
...
@@ -217,6 +219,21 @@
this
.
initDialog
()
},
methods
:
{
transTime
(
time
)
{
return
CommonJs
.
secondFmt
(
time
)
||
'-'
},
transIntention
(
string
)
{
var
result
;
if
(
string
)
{
result
=
CALLBACK_INTENTION
.
find
(
i
=>
{
return
i
.
value
==
string
}).
label
}
else
{
result
=
'-'
}
return
result
},
initDialog
()
{
if
(
this
.
dialogObj
)
{
this
.
show
=
this
.
dialogObj
.
show
;
...
...
src/components/team/index.vue
View file @
837f7d9b
...
...
@@ -126,6 +126,7 @@
<
/span
>
<
/el-tooltip
>
<
/template
>
<
template
slot
-
scope
=
"scope"
>
{{
transTime
(
scope
.
row
.
phone_total_time
)
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"lately_class_num"
>
...
...
@@ -191,10 +192,11 @@
<
/template
>
<
script
>
import
page
from
'@framework/page'
import
TeamDialog
from
'./dialog'
import
page
from
'@framework/page'
;
import
TeamDialog
from
'./dialog'
;
import
{
getTeamApi
}
from
'@service/api'
;
import
{
TIP_TEAM
}
from
'@util/tipArr'
;
import
CommonJs
from
'@util/common'
;
function
getNowFormatDate
()
{
var
date
=
new
Date
();
...
...
@@ -286,7 +288,9 @@
}
return
''
;
}
,
transTime
(
time
)
{
return
CommonJs
.
secondFmt
(
time
)
||
'-'
}
,
dialogToggle
(
row
,
type
)
{
this
.
dialogObj
=
{
alias
:
row
.
alias
,
// 老师微信号
...
...
src/util/common.js
View file @
837f7d9b
import
md5
from
'js-md5'
;
export
default
{
dateFmt
:
function
(
date
,
format
)
{
var
o
=
{
"M+"
:
date
.
getMonth
()
+
1
,
//month
"d+"
:
date
.
getDate
(),
//day
"h+"
:
date
.
getHours
(),
//hour
"m+"
:
date
.
getMinutes
(),
//minute
"s+"
:
date
.
getSeconds
(),
//second
"q+"
:
Math
.
floor
((
date
.
getMonth
()
+
3
)
/
3
),
//quarter
"S"
:
date
.
getMilliseconds
()
//millisecond
}
if
(
/
(
y+
)
/
.
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
o
[
k
]
:
(
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
));
return
format
;
},
export
default
{
secondFmt
:
function
(
second
)
{
// second 2 hms
var
h
,
m
,
s
;
h
=
Math
.
floor
(
second
/
60
/
60
);
m
=
Math
.
floor
(
second
/
60
%
60
);
s
=
Math
.
floor
(
second
%
60
);
return
`
${
h
>
0
?
h
+
'h '
:
''
}${
m
>
0
?
m
+
'm '
:
''
}${
s
>
0
?
s
+
's'
:
''
}
`
},
dateFmt
:
function
(
date
,
format
)
{
var
o
=
{
"M+"
:
date
.
getMonth
()
+
1
,
//month
"d+"
:
date
.
getDate
(),
//day
"h+"
:
date
.
getHours
(),
//hour
"m+"
:
date
.
getMinutes
(),
//minute
"s+"
:
date
.
getSeconds
(),
//second
"q+"
:
Math
.
floor
((
date
.
getMonth
()
+
3
)
/
3
),
//quarter
"S"
:
date
.
getMilliseconds
()
//millisecond
}
if
(
/
(
y+
)
/
.
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
o
[
k
]
:
(
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
));
return
format
;
},
// 将匹配结果替换表情图片
emotion
(
res
)
{
let
word
=
res
.
replace
(
/
\#
|
\;
/gi
,
''
)
emotion
(
res
)
{
let
word
=
res
.
replace
(
/
\#
|
\;
/gi
,
''
)
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
let
index
=
list
.
indexOf
(
word
)
return
`<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/
${
index
}
.gif" align="middle">`
},
tipFilter
(
h
,
column
,
tipArr
)
{
// console.log(column)
// console.log(h)
return
h
(
"span"
,
[
h
(
"span"
,
column
.
label
),
h
(
"el-tooltip"
,
{
props
:
{
effect
:
"dark"
,
content
:
tipArr
[
column
.
label
],
placement
:
"top"
}
},
[
h
(
"i"
,
{
class
:
"el-icon-question"
,
style
:
"color:#409eff;display:block;"
})
]
)
]);
tipFilter
(
h
,
column
,
tipArr
)
{
// console.log(column)
// console.log(h)
return
h
(
"span"
,
[
h
(
"span"
,
column
.
label
),
h
(
"el-tooltip"
,
{
props
:
{
effect
:
"dark"
,
content
:
tipArr
[
column
.
label
],
placement
:
"top"
}
},
[
h
(
"i"
,
{
class
:
"el-icon-question"
,
style
:
"color:#409eff;display:block;"
})
]
)
]);
},
md5Code
(){
return
md5
(
JSON
.
stringify
({
file
:
md5
(
'file_'
+
this
.
dateFmt
(
new
Date
(),
"yyyy-MM-dd"
)),
sing
:
"singsingenglish21000"
}))
md5Code
()
{
return
md5
(
JSON
.
stringify
({
file
:
md5
(
'file_'
+
this
.
dateFmt
(
new
Date
(),
"yyyy-MM-dd"
)),
sing
:
"singsingenglish21000"
}))
}
}
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