Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 98294072
authored
Aug 25, 2023
by
ext.wangyuman1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
订单
1 parent
3bf04bd4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
475 additions
and
12 deletions
vue3-lw-pc/src/views/customerManage/customer/chatList.vue
vue3-lw-pc/src/views/customerManage/customer/chatListClassTab.vue
vue3-lw-pc/src/views/customerManage/customer/detail.vue
vue3-lw-pc/src/views/customerManage/customer/infoTab.vue
vue3-lw-pc/src/views/drainageCode/components/IdentityAttachment.vue
vue3-lw-pc/src/views/salesCenter/orderInfo/add.vue
vue3-lw-pc/src/views/salesCenter/orderInfo/index.vue
vue3-lw-pc/src/views/customerManage/customer/chatList.vue
0 → 100644
View file @
9829407
<
template
>
<div
class=
"takecontent"
>
<ul>
<li
v-for=
"(item, index) in data"
:key=
"index"
>
<div
:class=
"['mb10', queryChat.fromId === item.fromId && 'ar']"
>
<span
:class=
"['', queryChat.fromId === item.fromId && 'fr']"
style=
"color: #4e5969"
>
{{
item
.
name
}}
</span>
<span
:style=
"
{ color: item.action == 'send' ? '#86909C' : '#999', margin: '0 8px' }">
{{
item
.
msgTime
}}
</span>
</div>
<div
:class=
"['', queryChat.fromId === item.fromId && 'ar']"
>
<img
:class=
"['image', queryChat.fromId === item.fromId && 'fr']"
:src=
"item.avatar || '@/assets/image/profile.jpg'"
/>
<ChatContent
:queryChat=
"queryChat"
:message=
"item"
></ChatContent>
</div>
</li>
</ul>
</div>
</
template
>
<
script
>
import
ChatContent
from
'@/components/ChatContent'
export
default
{
components
:
{
ChatContent
,
},
props
:
{
data
:
{
type
:
Array
,
defluat
:
()
=>
[],
},
queryChat
:
{
type
:
Object
,
default
:
()
=>
({}),
},
},
mounted
()
{},
data
()
{
return
{}
},
methods
:
{},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.image
{
width
:
40px
;
height
:
40px
;
vertical-align
:
top
;
box-shadow
:
0px
6px
8px
0px
rgba
(
78
,
89
,
105
,
0.3
);
border-radius
:
8px
8px
8px
8px
;
border
:
1px
solid
var
(
--border-white
);
background
:
var
(
--bg-white
);
}
.shabowbox
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
background
:
var
(
--bg-black-6
);
left
:
0
;
top
:
0
;
z-index
:
2000
;
}
.shabowboxvidoe
{
position
:
fixed
;
width
:
800px
;
height
:
475px
;
left
:
50%
;
margin-left
:
-400px
;
top
:
50%
;
margin-top
:
-235px
;
z-index
:
2001
;
background
:
var
(
--bg-white
);
}
.shabowboxaudio
{
height
:
125px
;
padding
:
12px
;
}
.close
{
position
:
fixed
;
width
:
50px
;
height
:
50px
;
right
:
10px
;
z-index
:
2012
;
top
:
10px
;
text-align
:
center
;
line-height
:
50px
;
font-size
:
20px
;
color
:
var
(
--font-white
,
#fff
);
cursor
:
pointer
;
font-size
:
43px
;
}
.takecontent
{
border-radius
:
3px
;
background-color
:
var
(
--bg-black-9
);
position
:
relative
;
text-align
:
left
;
height
:
100%
;
width
:
100%
;
overflow-y
:
scroll
;
::-webkit-scrollbar
{
display
:
none
;
}
ul
li
{
padding
:
10px
;
}
}
</
style
>
vue3-lw-pc/src/views/customerManage/customer/chatListClassTab.vue
0 → 100644
View file @
9829407
<
template
>
<div
class=
"chatListClassTab"
v-loading=
"loading"
>
<!--
<el-date-picker
v-model=
"dateRange"
type=
"daterange"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
@
change=
"getList(1)"
></el-date-picker>
-->
<div
class=
"list"
>
<template
v-if=
"list.length"
>
<chatList
:queryChat=
"queryChat"
v-if=
"'all,image,video,link,'.includes(type)"
:data=
"list"
></chatList>
<el-table
v-else-if=
"type == 'file'"
:data=
"list"
stripe
style=
"width: 100%"
:header-cell-style=
"
{ background: '#fff' }"
>
<!--
<el-table-column
prop=
"msgtype"
label=
"类型"
>
</el-table-column>
-->
<el-table-column
label=
"名称"
>
<template
#
default=
"
{ row }">
{{
JSON
.
parse
(
row
.
contact
).
filename
}}
</
template
>
</el-table-column>
<el-table-column
label=
"大小"
>
<
template
#
default=
"{ row }"
>
{{
filterSize
(
JSON
.
parse
(
row
.
contact
).
filesize
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"来源"
>
<
template
#
default=
"{ row }"
>
{{
row
.
name
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"发送时间"
>
<
template
#
default=
"{ row }"
>
{{
row
.
msgTime
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"action"
label=
"操作"
>
<
template
#
default=
"{ row }"
>
<el-button
text
@
click=
"downloadFile(row)"
>
下载
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-table
v-else-if=
"'voice,meeting_voice_call'.includes(type)"
:data=
"list"
stripe
:header-cell-style=
"{ background: '#fff' }"
>
<el-table-column
prop=
"date"
label=
"发起人"
>
<
template
#
default=
"{ row }"
>
{{
row
.
name
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"通话时间"
>
<
template
#
default=
"{ row }"
>
{{
row
.
msgTime
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
label=
"时长"
min-width=
"50"
>
<
template
#
default=
"{ row }"
>
<span
v-if=
"row.msgType == 'voice'"
>
{{
JSON
.
parse
(
row
.
contact
).
play_length
}}
s
</span>
<span
v-else
>
{{
setDate
(
JSON
.
parse
(
row
.
contact
).
endtime
,
row
.
msgTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"msgType"
label=
"类型"
>
<
template
#
default=
"{ row }"
>
{{
row
.
msgType
===
'voice'
?
'语音消息'
:
'语音通话'
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
min-width=
"80"
label=
"操作"
>
<
template
#
default=
"{ row }"
>
<!--
<el-button
text
@
click=
"voiceLook(JSON.parse(row.contact))"
>
查看
</el-button
>
-->
<!--
<AudioPlayer
:audio-list=
"[JSON.parse(row.contact).attachment]"
ref=
"AudioPlayer"
/>
-->
<voice
:amrUrl=
"JSON.parse(row.contact)['attachment']"
></voice>
<!--
<audio
controls
>
<source
:src=
"JSON.parse(row.contact).attachment"
type=
"audio/mpeg"
/>
</audio>
-->
</
template
>
</el-table-column>
</el-table>
</template>
<el-empty
v-else
:image-size=
"100"
></el-empty>
</div>
<el-pagination
v-if=
"total"
layout=
"prev, pager, next"
v-model:current-page=
"currentPage"
@
current-change=
"getList"
:total=
"total"
/>
</div>
</template>
<
script
>
import
chatList
from
'./chatList.vue'
import
*
as
api
from
'@/api/conversation/content.js'
import
Voice
from
'@/components/Voice'
import
{
download
}
from
'@/api/common.js'
import
{
diffDate
}
from
'@/utils/index'
import
{
parseTime
}
from
'@/utils/common'
export
default
{
name
:
''
,
components
:
{
chatList
,
Voice
},
props
:
{
// 消息收发者
queryChat
:
{
type
:
Object
,
default
:
()
=>
({}),
},
// 消息类型
type
:
{
type
:
[
String
,
Number
],
default
:
0
,
},
},
data
()
{
return
{
loading
:
false
,
currentPage
:
1
,
// dateRange: [],
list
:
[],
total
:
0
,
}
},
computed
:
{},
watch
:
{
queryChat
()
{
this
.
getList
(
1
)
},
type
()
{
this
.
getList
(
1
)
},
},
created
()
{
this
.
getList
(
1
)
},
mounted
()
{},
methods
:
{
setDate
(
start
,
end
)
{
return
diffDate
(
end
,
parseTime
(
start
))
},
getList
(
page
)
{
// if (!this.queryChat.fromId) {
// return //没有选择人
// }
this
.
loading
=
true
console
.
log
(
this
.
type
)
let
query
=
{
msgType
:
this
.
type
==
'all'
?
''
:
this
.
type
,
pageSize
:
'10'
,
orderByColumn
:
't.msg_time'
,
isAsc
:
'desc'
,
}
// if (this.dateRange) {
// query.beginTime = this.dateRange[0]
// query.endTime = this.dateRange[1]
// } else {
// query.beginTime = ''
// query.endTime = ''
// }
page
&&
(
query
.
pageNum
=
this
.
currentPage
=
page
)
Object
.
assign
(
query
,
this
.
queryChat
)
api
.
getChatList
(
query
)
.
then
((
res
)
=>
{
this
.
total
=
~~
res
.
total
this
.
list
=
res
.
rows
this
.
loading
=
false
})
.
catch
((
err
)
=>
{
this
.
loading
=
false
})
},
filterSize
(
size
)
{
if
(
!
size
)
return
''
if
(
size
<
pow1024
(
1
))
return
size
+
' B'
if
(
size
<
pow1024
(
2
))
return
(
size
/
pow1024
(
1
)).
toFixed
(
2
)
+
' KB'
if
(
size
<
pow1024
(
3
))
return
(
size
/
pow1024
(
2
)).
toFixed
(
2
)
+
' MB'
if
(
size
<
pow1024
(
4
))
return
(
size
/
pow1024
(
3
)).
toFixed
(
2
)
+
' GB'
return
(
size
/
pow1024
(
4
)).
toFixed
(
2
)
+
' TB'
function
pow1024
(
num
)
{
return
Math
.
pow
(
1024
,
num
)
}
},
downloadFile
(
row
)
{
this
.
$confirm
(
'是否确认下载该文件?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
((
response
)
=>
{
this
.
downloadNet
(
JSON
.
parse
(
row
.
contact
).
attachment
,
JSON
.
parse
(
row
.
contact
).
filename
)
})
.
catch
(
function
()
{})
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.list
{
height
:
calc
(
100vh
-
370px
);
margin-top
:
10px
;
background
:
var
(
--bg-white
);
overflow-y
:
scroll
;
border-bottom
:
1px
solid
var
(
--border-black-10
);
color
:
var
(
--font-black-6
);
text-align
:
center
;
::-webkit-scrollbar
{
display
:
none
;
}
}
.chatListClassTab
{
padding
:
10px
10px
0
;
background
:
var
(
--bg-white
);
text-align
:
left
;
}
</
style
>
vue3-lw-pc/src/views/customerManage/customer/detail.vue
View file @
9829407
...
...
@@ -12,11 +12,23 @@
<div
class=
"content"
>
<div
class=
"content-item"
v-for=
"(obj, i) in item.properties"
:key=
"i"
>
<template
v-if=
"obj.type !== 7"
>
<span>
{{
obj
.
name
}}
</span>
<span>
{{
query
[
obj
.
code
]
}}
</span>
<span>
{{
obj
.
name
}}
:
</span>
<span>
{{
obj
.
actualValue
}}
</span>
</
template
>
<
template
v-else
>
<!-- 附件 -->
<span>
{{
obj
.
name
}}
:
</span>
<template
v-for=
"(item2, j) in dealValue(obj.actualValue)"
:key=
"j"
>
<!-- 图片 -->
<el-image
:src=
"obj.actualValue"
fit=
"contain"
class=
"imgsize"
v-if=
"item2 && chargeType(item2)"
></el-image>
<!-- 文件/doc/xls/pdf -->
<a
:href=
"obj.actualValue"
v-else
>
{{
obj
.
actualValue
}}
</a>
</
template
>
</template>
</div>
</div>
...
...
@@ -66,19 +78,36 @@ export default {
// this.getDetail()
},
methods
:
{
dealValue
(
val
)
{
let
url
=
[]
if
(
val
)
{
url
=
val
.
split
(
','
)
}
return
url
},
chargeType
(
val
)
{
if
(
val
)
{
let
url
=
val
.
split
(
'.'
)
if
([
'jpg'
,
'jpeg'
,
'png'
].
includes
(
url
[
url
.
length
-
1
]))
{
return
true
}
else
{
return
false
}
}
},
// 点击×按钮
handleClose
()
{
this
.
$emit
(
'close'
,
false
)
},
// 获取全部属性
getProperties
(
id
)
{
getProperties
(
id
).
then
((
res
)
=>
{
getProperties
()
{
getProperties
().
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
query
=
res
.
data
})
},
// 获取详情
getDetail
()
{
getDetail
(
id
)
{
orderDetail
(
id
).
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
detailList
=
res
.
data
...
...
@@ -88,4 +117,18 @@ export default {
}
</
script
>
<
style
></
style
>
<
style
lang=
"scss"
scoped
>
.g-card
{
.title
{
font-size
:
16px
;
margin-bottom
:
16px
;
}
.content-item
{
line-height
:
34px
;
}
}
.imgsize
{
width
:
120px
;
height
:
120px
;
}
</
style
>
vue3-lw-pc/src/views/customerManage/customer/infoTab.vue
View file @
9829407
...
...
@@ -13,6 +13,7 @@ import { dictTrackState } from '@/utils/dictionary'
import
record
from
'./record'
import
RecordTable
from
'./record-table'
import
Detail
from
'./detail'
import
chatListClassTab
from
'./chatListClassTab.vue'
export
default
{
name
:
''
,
props
:
{
...
...
@@ -34,6 +35,7 @@ export default {
record
,
RecordTable
,
Detail
,
chatListClassTab
,
},
data
()
{
return
{
...
...
@@ -65,6 +67,15 @@ export default {
list
:
[],
visible
:
false
,
orderId
:
undefined
,
chatTab
:
[
{
checked
:
true
,
lable
:
'全部'
,
type
:
'all'
},
{
checked
:
false
,
lable
:
'图片&视频'
,
type
:
'image,video'
},
{
checked
:
false
,
lable
:
'文件'
,
type
:
'file'
},
{
checked
:
false
,
lable
:
'链接'
,
type
:
'link'
},
{
checked
:
false
,
lable
:
'语音'
,
type
:
'voice,meeting_voice_call'
},
],
queryChat
:
{},
tabType
:
'all'
,
}
},
computed
:
{},
...
...
@@ -83,6 +94,7 @@ export default {
this
.
userId
?
this
.
getCustomerInfoByUserId
()
:
this
.
getSummary
()
this
.
getOrderStatus
()
this
.
getList
()
this
.
getChatList
()
},
mounted
()
{},
methods
:
{
...
...
@@ -114,6 +126,9 @@ export default {
this
.
orderStateList
=
res
.
data
})
},
getChatList
()
{
this
.
queryChat
=
{
fromId
:
this
.
userId
,
toList
:
this
.
$route
.
query
.
externalUserid
}
},
setList
(
key
)
{
let
order
=
0
this
.
stage
.
forEach
((
dd
,
index
)
=>
{
...
...
@@ -266,6 +281,16 @@ export default {
this
.
visible
=
true
this
.
orderId
=
id
},
chatTabClick
(
i
,
type
)
{
this
.
tabType
=
type
this
.
chatTab
=
this
.
chatTab
.
map
((
item
,
j
)
=>
{
item
.
checked
=
false
if
(
i
===
j
)
{
item
.
checked
=
true
}
return
item
})
},
},
}
</
script
>
...
...
@@ -497,7 +522,7 @@ export default {
<el-form-item
label-width=
"0"
>
<el-button
type=
"primary"
@
click=
"search"
>
查询
</el-button>
<el-button
@
click=
"resetFn"
>
清空
</el-button>
<
el-button
@
click=
"getDetail(id)"
>
详情
</el-button
>
<
!-- <el-button @click="getDetail('1694259619920498688')">详情</el-button> --
>
</el-form-item>
</el-form>
<el-table
...
...
@@ -570,7 +595,19 @@ export default {
/>
<Detail
:visible=
"visible"
@
close=
"visible = false"
:id=
"orderId"
/>
</el-tab-pane>
<el-tab-pane
label=
"会话"
name=
"fourth"
>
</el-tab-pane>
<el-tab-pane
label=
"会话"
name=
"fourth"
>
<div
class=
"flex track-tab-wrap mb15"
>
<div
:class=
"['track-tab', item.checked && 'active']"
v-for=
"(item, i) in chatTab"
:key=
"i"
@
click=
"chatTabClick(i, item.type)"
>
{{ item.lable }}
</div>
</div>
<chatListClassTab
:queryChat=
"queryChat"
:type=
"tabType"
></chatListClassTab>
</el-tab-pane>
</el-tabs>
<!-- <div class="left">
...
...
@@ -659,6 +696,25 @@ export default {
</template>
<
style
lang=
"scss"
scoped
>
.track-tab-wrap
{
.track-tab
{
background
:
var
(
--bg-black-8
);
border-radius
:
50px
;
padding
:
5px
10px
;
cursor
:
pointer
;
&
+
.track-tab
{
margin-left
:
30px
;
}
&
.active
{
background
:
var
(
--color
);
color
:
var
(
--font-white
,
#fff
);
}
}
}
.content-box
{
width
:
80%
;
border
:
1px
solid
var
(
--bg-black-8
);
}
.code-image
{
width
:
50px
;
height
:
50px
;
...
...
vue3-lw-pc/src/views/drainageCode/components/IdentityAttachment.vue
View file @
9829407
This diff is collapsed.
Click to expand it.
vue3-lw-pc/src/views/salesCenter/orderInfo/add.vue
View file @
9829407
...
...
@@ -21,11 +21,11 @@
placeholder=
"请输入字段名称"
maxlength=
"10"
show-word-limit
:disabled=
"ruleForm.fixed"
:disabled=
"ruleForm.fixed
|| id
"
></el-input>
</el-form-item>
<el-form-item
label=
"字段类型:"
prop=
"type"
>
<el-select
v-model=
"ruleForm.type"
:disabled=
"ruleForm.fixed"
>
<el-select
v-model=
"ruleForm.type"
:disabled=
"ruleForm.fixed
|| id
"
>
<el-option
:label=
"item.value"
:value=
"item.key"
...
...
@@ -65,7 +65,7 @@
</el-radio-group>
</el-form-item>
<el-form-item
label=
"是否必填:"
prop=
"required"
>
<el-radio-group
v-model=
"ruleForm.required"
>
<el-radio-group
v-model=
"ruleForm.required"
:disabled=
"id"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
</el-radio-group>
...
...
@@ -126,6 +126,7 @@ export default {
toTime
:
0
,
}
this
.
$refs
[
'ruleForm'
].
resetFields
()
this
.
id
=
0
}
},
},
...
...
@@ -182,6 +183,7 @@ export default {
this
.
ruleForm
.
catalogueId
=
this
.
catalogueId
if
(
this
.
id
)
{
this
.
ruleForm
.
id
=
this
.
id
delete
this
.
ruleForm
.
typeStr
}
;(
this
.
id
?
update
:
add
)(
this
.
ruleForm
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
...
...
vue3-lw-pc/src/views/salesCenter/orderInfo/index.vue
View file @
9829407
...
...
@@ -247,7 +247,7 @@ export default {
// 新建字段提交
this
.
getList
()
}
this
.
visible
=
val
this
.
visible
=
false
},
add
(
id
)
{
this
.
visible
=
true
...
...
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