Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-authorize
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 d6c60b8f
authored
Nov 03, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'xuyl_dev_v2.11.0' into 'v2.11.0'
Xuyl dev v2.11.0 See merge request
!27
2 parents
4a4e4fa9
6a3069c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
33 deletions
src/views/collocation/index.vue
src/views/collocation/index.vue
View file @
d6c60b8
<
template
>
<div
class=
"container"
>
<GLCombiForm
:formObj=
"searchForm"
:rowNumber=
"1"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
:formObj=
"searchForm"
:rowNumber=
"1"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"table-header"
>
<div
class=
"header-text"
>
已激活列表
</div>
<div>
<el-button
class=
"table-btn"
@
click=
"handleqrCode"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
企微接入授权
</el-button>
<el-button
class=
"table-btn"
@
click=
"handleqrCode"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
企微接入授权
</el-button>
</div>
</div>
<GLTable
ref=
"activeTable"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"activeTable"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"staffName"
slot-scope=
"scope"
>
<div
class=
"staffName"
>
<span>
{{
scope
.
scope
.
staffName
}}
</span>
...
...
@@ -15,16 +19,16 @@
</div>
</div>
<div
slot=
"loginStatus"
slot-scope=
"scope"
>
<div
class=
"loginStatus"
v-if=
"scope.scope.loginStatus"
>
<span
class=
"cycle"
:style=
"
{ background: scope.scope.loginStatus == '1' ? '#2CCA74' : scope.scope.loginStatus == '0' ? '#999999' : '' }">
</span>
{{
scope
.
scope
.
loginStatus
==
'1'
?
'在线'
:
scope
.
scope
.
loginStatus
==
'0'
?
'离线'
:
''
}}
<div
class=
"loginStatus"
>
<span
class=
"cycle"
:style=
"
{ background: scope.scope.loginStatus == '1' ? '#2CCA74' : scope.scope.loginStatus == '0' ? '#999999' : '' }">
</span>
{{
scope
.
scope
.
loginStatus
==
'1'
?
'在线'
:
scope
.
scope
.
loginStatus
==
'0'
?
'离线'
:
'--'
}}
</div>
<div
v-else
>
--
</div>
</div>
</GLTable>
<GLDialog
:title=
"'授权登入二维码'"
mode=
"small"
:visible
.
sync=
"qrCodeVisible"
>
<div
v-loading=
"addLoading"
class=
"qrIMGbox"
>
<img
class=
"qrIMG"
:src=
"qrcodeUrl"
/>
<img
class=
"qrIMG"
:src=
"qrcodeUrl"
/>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"refreshQrcode"
>
刷新
</el-button>
...
...
@@ -35,6 +39,8 @@
<
script
>
import
url
from
'@/assets/empty.png'
import
{
utils
}
from
'glsx-common'
export
default
{
name
:
'collocation'
,
data
()
{
...
...
@@ -43,11 +49,12 @@ export default {
verifyQRCodeFailsToOpen
:
false
,
addLoading
:
false
,
qrCodeInterval
:
null
,
qrCodeIntervalList
:[],
qrcodeUrl
:
''
,
qrCodeVisible
:
false
,
qrcodeId
:
''
,
searchForm
:
{
loginStatus
:
''
loginStatus
:
''
},
searchFormData
:
[
{
...
...
@@ -98,32 +105,32 @@ export default {
label
:
'员工企微'
,
prop
:
'staffName'
,
addHtml
:
'staffName'
,
minwidth
:
110
minwidth
:
110
},
{
label
:
'手机号码'
,
prop
:
'staffPhone'
,
minwidth
:
110
minwidth
:
110
},
{
label
:
'所属门店'
,
prop
:
'merchantName'
,
minwidth
:
110
minwidth
:
110
},
{
label
:
'最后同步时间'
,
prop
:
'lastLoginTime'
,
minwidth
:
110
minwidth
:
110
},
{
label
:
'状态'
,
prop
:
'loginStatus'
,
addHtml
:
'loginStatus'
,
minwidth
:
110
minwidth
:
110
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
getListApi
:
this
.
$apis
.
collocation
.
wechatDepositList
}
},
...
...
@@ -144,24 +151,32 @@ export default {
this
.
addLoading
=
true
this
.
qrCodeVisible
=
true
await
this
.
$apis
.
collocation
.
getLoginQcCode
({})
.
then
(
res
=>
{
this
.
addLoading
=
false
;(
this
.
verifyQRCodeFailsToOpen
=
true
),
(
this
.
qrcodeUrl
=
`data:image/png;base64,
${
res
.
qcCodeUrl
}
`
)
this
.
qrcodeId
=
res
.
id
})
.
catch
(
err
=>
{
this
.
qrCodeVisible
=
false
})
.
getLoginQcCode
({})
.
then
(
res
=>
{
this
.
addLoading
=
false
;(
this
.
verifyQRCodeFailsToOpen
=
true
),
(
this
.
qrcodeUrl
=
`data:image/png;base64,
${
res
.
qcCodeUrl
}
`
)
this
.
qrcodeId
=
res
.
id
})
.
catch
(
err
=>
{
this
.
qrCodeVisible
=
false
this
.
clearAllInterval
()
})
},
clearAllInterval
(){
this
.
qrCodeIntervalList
.
forEach
(
item
=>
{
clearInterval
(
item
);
})
this
.
qrCodeIntervalList
=
[];
this
.
qrCodeInterval
=
null
;
},
verifyQRCodeIsInvalid
()
{
this
.
qrCodeInterval
=
setInterval
(()
=>
{
this
.
qrcodeTimeoutApi
()
// 300000
},
5000
)
},
15000
)
this
.
qrCodeIntervalList
.
push
(
this
.
qrCodeInterval
)
},
qrcodeTimeoutApi
()
{
this
.
$apis
.
collocation
.
getQcCodeDetail
({
id
:
this
.
qrcodeId
}).
then
(
res
=>
{
this
.
$apis
.
collocation
.
getQcCodeDetail
({
id
:
this
.
qrcodeId
}).
then
(
res
=>
{
if
(
res
==
true
)
{
this
.
$message
({
type
:
'error'
,
...
...
@@ -173,14 +188,14 @@ export default {
}
})
},
refreshQrcode
()
{
refreshQrcode
:
utils
.
debounce
(
function
()
{
this
.
handleqrCode
()
}
}
,
3000
)
},
computed
:
{
listenChange
()
{
const
{
verifyQRCodeFailsToOpen
,
qrCodeVisible
}
=
this
return
{
verifyQRCodeFailsToOpen
,
qrCodeVisible
}
const
{
verifyQRCodeFailsToOpen
,
qrCodeVisible
}
=
this
return
{
verifyQRCodeFailsToOpen
,
qrCodeVisible
}
}
},
watch
:
{
...
...
@@ -188,7 +203,7 @@ export default {
if
(
val
.
qrCodeVisible
==
true
&&
val
.
verifyQRCodeFailsToOpen
==
true
)
{
this
.
verifyQRCodeIsInvalid
()
}
else
{
clearInterval
(
this
.
qrCodeInterval
)
this
.
clearAllInterval
(
)
}
}
}
...
...
@@ -201,36 +216,44 @@ export default {
padding
:
0
16px
;
}
}
.container
{
padding
:
20px
;
background-color
:
#fff
;
.table-header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
10px
;
.header-text
{
font-size
:
16px
;
color
:
#333333
;
font-weight
:
600
;
}
}
.table-btn
{
color
:
#5850ff
;
border
:
1px
solid
#5850ff
;
}
.qrIMGbox
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.qrIMG
{
width
:
150px
;
height
:
150px
;
}
}
/
deep
/
.loginStatus
{
/
deep
/
.loginStatus
{
display
:
flex
;
align-items
:
center
;
.cycle
{
margin-right
:
8px
;
width
:
6px
;
...
...
@@ -239,9 +262,11 @@ export default {
border-radius
:
50%
;
}
}
.staffName
{
display
:
flex
;
align-items
:
center
;
.entmicroName
{
font-size
:
12px
;
color
:
#fb8f28
;
...
...
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