Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
Details
Activity
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
office
haoban-3
Commits
c96c2530
Commit
c96c2530
authored
Jun 02, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/4月-菜单和权限' into dev
parents
bd232ce8
33637a3a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
33 deletions
+31
-33
App.vue
src/App.vue
+15
-0
index.js
src/router/index.js
+5
-0
syncLog.vue
src/views/business/syncLog.vue
+3
-33
refresh.vue
src/views/errorPage/refresh.vue
+8
-0
No files found.
src/App.vue
View file @
c96c2530
...
...
@@ -40,7 +40,11 @@ export default {
pageRight
:
[]
};
},
beforeDestroy
()
{
document
.
removeEventListener
(
'visibilitychange'
,
this
.
checkUser
);
},
created
()
{
document
.
addEventListener
(
'visibilitychange'
,
this
.
checkUser
);
this
.
getUserInfo
().
then
(()
=>
{
// 如果是登录页登页面,就不获取权限数据
if
(
whiteRoute
.
includes
(
toPath
)
||
whiteRoute
.
includes
(
fromPath
))
{
...
...
@@ -53,6 +57,17 @@ export default {
});
},
methods
:
{
checkUser
()
{
if
(
!
document
.
hidden
)
{
const
oldUser
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
));
this
.
getUserInfo
().
then
(()
=>
{
const
newUser
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
));
if
(
newUser
.
clerkId
!=
oldUser
.
clerkId
)
{
this
.
$router
.
push
(
'/refresh'
);
}
});
}
},
getUserInfo
()
{
return
postRequest
(
'/haoban-manage3-web/get-login-info'
,
{}).
then
(
resp
=>
{
const
{
errorCode
,
result
}
=
resp
.
data
||
{};
...
...
src/router/index.js
View file @
c96c2530
...
...
@@ -34,6 +34,11 @@ export const constantRouterMap = [
component
:
_import
(
'login'
,
'login-more'
)
},
{
path
:
'/refresh'
,
name
:
'刷新'
,
component
:
_import
(
'errorPage'
,
'refresh'
)
},
{
path
:
'/'
,
// 取到菜单数据后,会将/index的路径加到routes中
redirect
:
'/index'
,
...
...
src/views/business/syncLog.vue
View file @
c96c2530
...
...
@@ -69,10 +69,7 @@
</div>
<div
class=
"m-t-20"
>
<el-input
placeholder=
"请输入导购手机号或code"
maxlength=
"50"
prefix-icon=
"el-icon-search"
v-model=
"searchInput"
class=
"w-293"
@
keyup
.
native=
"value => toInput(value, searchInput)"
clearable
@
clear=
"clearInput"
>
</el-input>
<el-select
v-model=
"enterpriseId"
placeholder=
"全部品牌"
@
change=
"getBindist"
class=
"w-168 m-l-10"
>
<el-option
label=
"全部品牌"
value=
""
></el-option>
<el-option
v-for=
"item in brandOptions"
:key=
"item.enterpriseId"
:label=
"item.enterpriseName"
:value=
"item.enterpriseId"
>
</el-option>
</el-select
><el-select
v-model=
"optType"
placeholder=
"请选择"
@
change=
"getBindist"
class=
"w-168 m-l-10"
>
<el-select
v-model=
"optType"
placeholder=
"请选择"
@
change=
"getBindist"
class=
"w-168 m-l-10"
>
<el-option
label=
"全部状态"
value=
""
></el-option>
<el-option
label=
"绑定"
value=
"0"
></el-option>
<el-option
label=
"解绑"
value=
"1"
></el-option>
...
...
@@ -140,7 +137,7 @@
<
script
>
import
failLog
from
'@/components/company/fail-log.vue'
;
import
setDepartment
from
'@/components/company/set-department.vue'
;
import
{
getRequest
,
postRequest
}
from
'@/api/api'
;
import
{
getRequest
}
from
'@/api/api'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
'@/common/js/public'
;
export
default
{
...
...
@@ -158,9 +155,7 @@ export default {
logShow
:
false
,
taskId
:
''
,
// 解绑日志
optType
:
''
,
enterpriseId
:
''
,
brandOptions
:
[]
optType
:
''
};
},
computed
:
{},
...
...
@@ -193,7 +188,6 @@ export default {
if
(
tab
.
name
==
'first'
)
{
that
.
getTableList
();
}
else
{
that
.
getBrandData
();
that
.
getBindist
();
}
},
...
...
@@ -247,36 +241,12 @@ export default {
}
},
/**
* 获取品牌
*/
getBrandData
()
{
const
that
=
this
;
postRequest
(
'/haoban-manage3-web/wx-enterprise-list'
,
{})
.
then
(
res
=>
{
let
resData
=
res
.
data
;
if
(
resData
.
errorCode
==
1
)
{
if
(
!!
resData
.
result
&&
!!
resData
.
result
.
length
)
{
that
.
brandOptions
=
resData
.
result
;
}
return
;
}
errMsg
.
errorMsg
(
resData
);
})
.
catch
(
function
(
error
)
{
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
});
});
},
/**
* 获取解绑数据
*/
getBindist
()
{
const
that
=
this
;
let
para
=
{
search
:
that
.
searchInput
||
''
,
// 搜索字段
enterpriseId
:
that
.
enterpriseId
,
optType
:
that
.
optType
,
pageNum
:
that
.
currentPage
,
// 当前页
pageSize
:
that
.
pageSize
// 一页显示个数
...
...
src/views/errorPage/refresh.vue
0 → 100644
View file @
c96c2530
<
script
>
export
default
{
name
:
'Refresh'
,
created
()
{
this
.
$router
.
go
(
-
1
);
}
};
</
script
>
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