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 67fc0149
authored
Aug 28, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
277850be
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
4 deletions
vue3-lw-pc/src/stores/modules/permission.js
vue3-lw-pc/src/utils/common.js
vue3-lw-pc/src/views/contentCenter/templateWel/index.vue
vue3-lw-pc/src/views/enterpriseWechat/list.vue
vue3-lw-pc/src/stores/modules/permission.js
View file @
67fc014
...
@@ -113,14 +113,15 @@ export const loadView = (route) => {
...
@@ -113,14 +113,15 @@ export const loadView = (route) => {
res
=
modules
[
path
]
res
=
modules
[
path
]
// 为需要单独使用的路由命名,避免使用绝对路径跳转
// 为需要单独使用的路由命名,避免使用绝对路径跳转
// 组件路径: route name
let
routeNames
=
{
let
routeNames
=
{
// 组件路径: route name
'customerManage/customerDetail'
:
window
.
lwConfig
.
CUSTOMER_DETAIL_ROUTE_NAME
,
// 客户详情
'customerManage/customerDetail'
:
window
.
lwConfig
.
CUSTOMER_DETAIL_ROUTE_NAME
,
// 客户详情
'drainageCode/staff/list'
:
'staffCode'
,
// 员工活码
'drainageCode/staff/list'
:
'staffCode'
,
// 员工活码
'drainageCode/group/list'
:
'customerGroupCode'
,
// 群活码
'drainageCode/group/list'
:
'customerGroupCode'
,
// 群活码
'drainageCode/store/list'
:
'storeCode'
,
//门店活码
'drainageCode/store/list'
:
'storeCode'
,
//门店活码
'drainageCode/identity/list'
:
'identityCode'
,
//识客码
'drainageCode/identity/list'
:
'identityCode'
,
//识客码
'drainageCode/pullNews/list'
:
'pullNewsCode'
,
//拉新活码
'drainageCode/pullNews/list'
:
'pullNewsCode'
,
//拉新活码
'contentCenter/templateWel/index'
:
'templateWel'
,
//拉新活码
'enterpriseWechat/list'
:
window
.
lwConfig
.
WORK_WEIXIN_CONFIG_ROUTE_NAME
,
//企微配置
'enterpriseWechat/list'
:
window
.
lwConfig
.
WORK_WEIXIN_CONFIG_ROUTE_NAME
,
//企微配置
}
}
routeNames
[
route
.
component
]
&&
(
route
.
name
=
routeNames
[
route
.
component
])
routeNames
[
route
.
component
]
&&
(
route
.
name
=
routeNames
[
route
.
component
])
...
...
vue3-lw-pc/src/utils/common.js
View file @
67fc014
...
@@ -103,7 +103,8 @@ export function selectDictLabels(datas, value, separator) {
...
@@ -103,7 +103,8 @@ export function selectDictLabels(datas, value, separator) {
* @param {*} downloadName 下载文件名,需含文件后缀名 可选
* @param {*} downloadName 下载文件名,需含文件后缀名 可选
*/
*/
export
function
downloadBlob
(
blob
,
downloadName
,
type
)
{
export
function
downloadBlob
(
blob
,
downloadName
,
type
)
{
if
(
blob
&&
downloadName
)
{
if
(
!
blob
||
!
downloadName
)
return
if
(
blob
instanceof
Blob
)
{
const
typeDict
=
{
const
typeDict
=
{
excel
:
'application/vnd.ms-excel'
,
excel
:
'application/vnd.ms-excel'
,
zip
:
'application/zip'
,
zip
:
'application/zip'
,
...
@@ -117,6 +118,20 @@ export function downloadBlob(blob, downloadName, type) {
...
@@ -117,6 +118,20 @@ export function downloadBlob(blob, downloadName, type) {
a
.
click
()
a
.
click
()
a
.
remove
()
a
.
remove
()
URL
.
revokeObjectURL
(
url
)
// 释放内存
URL
.
revokeObjectURL
(
url
)
// 释放内存
}
else
if
(
/^http/
.
test
(
blob
)
&&
type
===
'image'
)
{
let
image
=
new
Image
()
image
.
setAttribute
(
'crossOrigin'
,
'anonymous'
)
image
.
src
=
blob
image
.
onload
=
()
=>
{
let
canvas
=
document
.
createElement
(
'canvas'
)
canvas
.
width
=
image
.
width
canvas
.
height
=
image
.
height
let
ctx
=
canvas
.
getContext
(
'2d'
)
ctx
.
drawImage
(
image
,
0
,
0
,
image
.
width
,
image
.
height
)
canvas
.
toBlob
((
blob
)
=>
{
downloadBlob
(
blob
,
downloadName
)
})
}
}
}
}
}
...
@@ -348,6 +363,21 @@ export function $delConfirm(remove, callback) {
...
@@ -348,6 +363,21 @@ export function $delConfirm(remove, callback) {
})
})
.
catch
(
function
()
{})
.
catch
(
function
()
{})
}
}
export
function
$copyText
(
txt
)
{
let
clipboard
=
new
this
.
ClipboardJS
(
event
.
currentTarget
.
localName
,
{
target
:
function
(
trigger
)
{
return
trigger
},
text
:
function
(
trigger
)
{
return
txt
},
})
setTimeout
(()
=>
{
clipboard
.
destroy
()
},
0
)
}
/**
/**
* 通用js方法封装处理,挂载到 Vue.prototype
* 通用js方法封装处理,挂载到 Vue.prototype
*/
*/
vue3-lw-pc/src/views/contentCenter/templateWel/index.vue
View file @
67fc014
...
@@ -22,7 +22,7 @@ export default {
...
@@ -22,7 +22,7 @@ export default {
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{
return
{
active
:
'1'
,
active
:
this
.
$route
.
query
.
index
||
'1'
,
total1
:
0
,
total1
:
0
,
total2
:
0
,
total2
:
0
,
total3
:
0
,
total3
:
0
,
...
...
vue3-lw-pc/src/views/enterpriseWechat/list.vue
View file @
67fc014
...
@@ -41,7 +41,7 @@ export default {
...
@@ -41,7 +41,7 @@ export default {
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{
return
{
currentActive
:
'1'
,
currentActive
:
this
.
$route
.
query
.
index
||
'1'
,
form
:
{},
form
:
{},
disabled
:
false
,
disabled
:
false
,
loading
:
false
,
loading
:
false
,
...
...
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