Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
a4a0f3bd
Commit
a4a0f3bd
authored
Aug 23, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建统计页面
parent
4db7b3a9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
203 additions
and
10 deletions
+203
-10
wechat.js
src/api/system/wechat.js
+12
-0
channelCodeStatistics.vue
src/pages/enterprise/channelCodeStatistics.vue
+52
-0
channelcodeList.vue
src/pages/enterprise/channelcodeList.vue
+133
-9
routes.js
src/router/routes.js
+6
-1
No files found.
src/api/system/wechat.js
View file @
a4a0f3bd
...
...
@@ -330,6 +330,18 @@ export function SetSynvEduEmployee(data) {
})
}
/**
* 初始化同步企业微信标签
*
*/
export
function
getWeChatChannelCoustomerPageList
(
data
)
{
return
request
({
url
:
'/QYWeChat/GetWeChatChannelCoustomerPageList'
,
method
:
'post'
,
data
})
}
...
...
src/pages/enterprise/channelCodeStatistics.vue
0 → 100644
View file @
a4a0f3bd
<
template
>
<div
class=
"channelcodeList page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<!--
<div
class=
"col-3"
>
<q-input
@
keyup
.
enter
.
native=
"changePage(1)"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.Name"
label=
"渠道码名称"
@
clear=
"changePage(1)"
maxlength=
"20"
/>
</div>
-->
</div>
</div>
<div
class=
"page-content"
>
</div>
</div>
</
template
>
<
script
>
import
{
}
from
'../../api/system/wechat'
;
export
default
{
meta
:
{
title
:
"渠道码统计"
},
name
:
"channelCodeStatistics"
,
data
()
{
return
{
loading
:
false
,
}
},
created
()
{
console
.
log
(
this
.
$route
.
query
)
},
methods
:
{
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/pages/enterprise/channelcodeList.vue
View file @
a4a0f3bd
...
...
@@ -42,7 +42,7 @@
</
template
>
<
template
v-slot:body-cell-LabelList=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"max-width: 300px;"
v-if=
"props.row.LabelList.length>0"
>
<div
style=
"max-width: 300px;
white-space: normal;word-break:break-all
"
v-if=
"props.row.LabelList.length>0"
>
<span
v-for=
"(x,y) in props.row.LabelList"
:key=
'y'
>
{{
x
}}{{
props
.
row
.
LabelList
.
length
!=
y
+
1
?
'、'
:
''
}}
</span>
...
...
@@ -65,8 +65,25 @@
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
@
click=
"goedit(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"goDetailed(props.row)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left: 10px"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"showcustomer(props.row)"
>
<q-item-section>
<q-item-label>
客户
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"downs(props.row)"
>
<q-item-section>
<q-item-label>
下载
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"statistics(props.row)"
>
<q-item-section>
<q-item-label>
统计
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</
template
>
<
template
v-slot:bottom
>
...
...
@@ -76,18 +93,43 @@
</q-table>
</div>
<q-dialog
v-model=
"isDetails"
>
<q-card
style=
"width: 450px;"
>
<q-card
style=
"width: 450px;"
v-if=
"Detailsobj && Detailsobj.WXQRCode"
>
<q-card-section
class=
"row items-center q-pb-none"
>
<div
class=
"text-h6"
>
图片详情
</div>
<div
class=
"text-h6"
>
{{Detailsobj.Name}}
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
<q-card-section
v-if=
"Detailsobj && Detailsobj.WXQRCode"
>
<q-card-section
>
<q-img
:src=
"Detailsobj.WXQRCode"
style=
"width:400px;height: 400px;margin-left: 9px;"
></q-img>
</q-card-section>
</q-card>
</q-dialog>
<q-dialog
v-model=
"isCustom"
>
<q-card
style=
"width: 850px;max-width: 80vw;"
>
<q-card-section
class=
"row items-center q-pb-none"
>
<div
class=
"text-h6"
>
扫码客户
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
<q-card-section
>
<q-table
title=
""
:data=
"customdata"
:columns=
"columns2"
row-key=
"name"
:loading=
"loading"
no-data-label=
"暂无相关数据"
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"customMsg.pageIndex"
color=
"primary"
:max=
"custompageCount"
:input=
"true"
@
input=
"changePage2"
/>
</
template
>
</q-table>
</q-card-section>
</q-card>
</q-dialog>
</div>
...
...
@@ -98,7 +140,8 @@
getWeChatChannelPageList
,
getWeChatChannelGroupList
getWeChatChannelGroupList
,
getWeChatChannelCoustomerPageList
}
from
'../../api/system/wechat'
;
import
{
queryEmployee
...
...
@@ -113,8 +156,11 @@
return
{
loading
:
false
,
ISsystem
:
false
,
isCustom
:
false
,
data
:
[],
pageCount
:
0
,
customdata
:[],
custompageCount
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
...
...
@@ -123,6 +169,11 @@
Name
:
''
,
Type
:
0
,
},
customMsg
:{
pageIndex
:
1
,
pageSize
:
10
,
ChannelId
:
0
},
typeList
:
[
{
Id
:
0
,
Name
:
'不限'
},
{
Id
:
1
,
Name
:
'单人'
},
...
...
@@ -151,7 +202,7 @@
{
name
:
'Type'
,
field
:
'Type'
,
label
:
'
分组
'
,
label
:
'
类型
'
,
align
:
'left'
},
{
...
...
@@ -184,6 +235,32 @@
field
:
'DeptId'
}
],
columns2
:[
{
name
:
'DeptName'
,
label
:
'部门'
,
field
:
'DeptName'
,
align
:
'left'
},
{
name
:
'EmpName'
,
label
:
'归属成员'
,
field
:
'EmpName'
,
align
:
'left'
},
{
name
:
'CustomerName'
,
label
:
'客户名称'
,
field
:
'CustomerName'
,
align
:
'left'
},
{
name
:
'CreateTime'
,
label
:
'添加时间'
,
field
:
'CreateTime'
,
align
:
'left'
},
],
GroupList
:
[],
isDetails
:
false
,
Detailsobj
:
null
...
...
@@ -208,9 +285,13 @@
},
changePage
(
e
)
{
this
.
msg
.
pageIndex
=
1
this
.
msg
.
pageIndex
=
e
this
.
getList
()
},
changePage2
(
e
){
this
.
msg
.
pageIndex
=
e
this
.
getcustomerList
()
},
getList
()
{
this
.
loading
=
true
getWeChatChannelPageList
(
this
.
msg
).
then
(
res
=>
{
...
...
@@ -256,9 +337,52 @@
});
},
showcustomer
(
row
){
//客户
this
.
customMsg
.
ChannelId
=
row
.
Id
this
.
getcustomerList
()
},
getcustomerList
(){
getWeChatChannelCoustomerPageList
(
this
.
customMsg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
customdata
=
res
.
Data
.
PageData
;
this
.
custompageCount
=
res
.
Data
.
PageCount
this
.
isCustom
=
true
})
},
viewDetails
(
row
)
{
this
.
Detailsobj
=
row
this
.
isDetails
=
true
},
downs
(
row
){
//二维码下载
this
.
downloadIamge
(
row
.
WXQRCode
,
row
.
Name
)
},
downloadIamge
(
imgsrc
,
name
)
{
//下载图片地址和图片名
var
image
=
new
Image
();
// 解决跨域 Canvas 污染问题
image
.
setAttribute
(
"crossOrigin"
,
"anonymous"
);
image
.
onload
=
function
()
{
var
canvas
=
document
.
createElement
(
"canvas"
);
canvas
.
width
=
image
.
width
;
canvas
.
height
=
image
.
height
;
var
context
=
canvas
.
getContext
(
"2d"
);
context
.
drawImage
(
image
,
0
,
0
,
image
.
width
,
image
.
height
);
var
url
=
canvas
.
toDataURL
(
"image/png"
);
//得到图片的base64编码数据
var
a
=
document
.
createElement
(
"a"
);
// 生成一个a元素
var
event
=
new
MouseEvent
(
"click"
);
// 创建一个单击事件
a
.
download
=
name
||
"photo"
;
// 设置图片名称
a
.
href
=
url
;
// 将生成的URL设置为a.href属性
a
.
dispatchEvent
(
event
);
// 触发a的单击事件
};
image
.
src
=
imgsrc
;
},
statistics
(
row
){
//统计
this
.
$router
.
push
({
path
:
'/enterprise/channelCodeStatistics'
,
query
:
{
Id
:
row
.
Id
}
});
}
}
...
...
src/router/routes.js
View file @
a4a0f3bd
...
...
@@ -1219,7 +1219,12 @@ const routes = [{
component
:
()
=>
import
(
"pages/enterprise/addchannelcode"
)
},
{
path
:
"/enterprise/channelCodeStatistics"
,
//企微 渠道码的统计页面
component
:
()
=>
import
(
"pages/enterprise/channelCodeStatistics"
)
},
],
...
...
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