Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
national_museum_vod
Project
Project
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
qzhxx
national_museum_vod
Commits
a081d480
Commit
a081d480
authored
Apr 08, 2021
by
xulili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
token 失效退出
parent
35b05ad6
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
354 additions
and
301 deletions
+354
-301
login.vue
src/components/end/login.vue
+1
-0
account.js
src/config/account.js
+8
-1
httpServer.js
src/config/httpServer.js
+46
-58
loginOut.js
src/config/loginOut.js
+5
-4
accountTable.vue
src/page/accounts/components/accountTable.vue
+23
-22
dbUnitTable.vue
src/page/accounts/components/dbUnitTable.vue
+13
-4
dbUnitAdmin.vue
src/page/accounts/dbUnitAdmin.vue
+1
-1
edit.vue
src/page/accounts/dbUnitDialog/edit.vue
+4
-1
statistical.vue
src/page/accounts/statistical.vue
+1
-1
stbAdmin.vue
src/page/accounts/stbAdmin.vue
+9
-0
edit.vue
src/page/accounts/stbDialog/edit.vue
+1
-1
add.vue
src/page/accounts/userDialog/add.vue
+61
-61
edit.vue
src/page/accounts/userDialog/edit.vue
+16
-19
users.vue
src/page/accounts/users.vue
+31
-3
devops.vue
src/page/system/log/devops.vue
+134
-125
No files found.
src/components/end/login.vue
View file @
a081d480
...
@@ -96,6 +96,7 @@ export default {
...
@@ -96,6 +96,7 @@ export default {
message
:
resData
.
message
,
message
:
resData
.
message
,
});
});
localStorage
.
setItem
(
"user"
,
resData
.
user
.
userName
);
localStorage
.
setItem
(
"user"
,
resData
.
user
.
userName
);
localStorage
.
setItem
(
"userId"
,
resData
.
user
.
id
)
localStorage
.
setItem
(
"backToken"
,
resData
.
token
);
localStorage
.
setItem
(
"backToken"
,
resData
.
token
);
localStorage
.
setItem
(
localStorage
.
setItem
(
"menuList"
,
"menuList"
,
...
...
src/config/account.js
View file @
a081d480
...
@@ -3,6 +3,13 @@ let statusOption = [
...
@@ -3,6 +3,13 @@ let statusOption = [
{
label
:
"禁用"
,
value
:
'DISABLE'
},
{
label
:
"禁用"
,
value
:
'DISABLE'
},
{
label
:
"待审核"
,
value
:
'TBC'
},
{
label
:
"待审核"
,
value
:
'TBC'
},
]
]
let
accoutType
=
[
{
label
:
"用户账号"
,
value
:
1
},
{
label
:
"单位管理员账号"
,
value
:
2
},
{
label
:
"机顶盒账号"
,
value
:
3
},
{
label
:
"运维账号"
,
value
:
4
},
{
label
:
"统计账号"
,
value
:
5
}
]
export
{
export
{
statusOption
statusOption
}
}
\ No newline at end of file
src/config/httpServer.js
View file @
a081d480
/**
/**
* Created by supervisor on 2017/11/3.
* Created by supervisor on 2017/11/3.
*/
*/
// import Vue from 'vue'
import
axios
from
'axios'
import
axios
from
'axios'
// import qs from 'qs'
import
store
from
'../store'
import
store
from
'../store'
import
{
Message
,
MessageBox
,
Loading
}
from
'element-ui'
;
import
{
Message
,
MessageBox
,
Loading
}
from
'element-ui'
;
import
router
from
'../router'
import
router
from
'../router'
import
{
baseUrl
}
from
'./env'
import
{
baseUrl
}
from
'./env'
import
MyLocalStorage
from
'./myLocalStorage'
import
MyLocalStorage
from
'./myLocalStorage'
// Vue.use($msg)
import
{
loginOut
}
from
'./loginOut'
//axios 拦截器 请求时的拦截
//axios 拦截器 请求时的拦截
axios
.
interceptors
.
request
.
use
(
config
=>
{
axios
.
interceptors
.
request
.
use
(
config
=>
{
// 发送请求之前做一些处理
// 发送请求之前做一些处理
store
.
commit
(
'UPDATE_LOADING'
,
true
)
//显示loading
store
.
commit
(
'UPDATE_LOADING'
,
true
)
//显示loading
// config.headers = {
// config.headers = {
// 'Content-Type': 'application/json'
// 'Content-Type': 'application/json'
// };
// };
return
config
return
config
},
error
=>
{
},
error
=>
{
// 当请求异常时做一些处理
// 当请求异常时做一些处理
return
new
Promise
.
reject
(
error
)
return
new
Promise
.
reject
(
error
)
})
})
// 响应时拦截
// 响应时拦截
axios
.
interceptors
.
response
.
use
(
response
=>
{
axios
.
interceptors
.
response
.
use
(
response
=>
{
// 返回响应时做一些处理
// 返回响应时做一些处理
return
response
return
response
},
error
=>
{
},
error
=>
{
// 当响应异常时做一些处理
// 当响应异常时做一些处理
return
Promise
.
resolve
(
error
.
response
)
return
Promise
.
resolve
(
error
.
response
)
})
})
// let isOpen=false;
function
errorState
(
status
,
data
)
{
function
errorState
(
status
,
data
)
{
store
.
commit
(
'UPDATE_LOADING'
,
false
)
store
.
commit
(
'UPDATE_LOADING'
,
false
)
if
(
status
===
500
&&
data
.
message
.
indexOf
(
"token invalid"
)
!==-
1
){
if
(
data
.
resultCode
==
'1109'
)
{
// if(status == 500 && data == "sessionTimeOut"){
loginOut
()
if
(
store
.
state
.
isOpen
){
return
;
}
store
.
commit
(
'setIsOpen'
,
true
)
MessageBox
.
alert
(
'您的登录过期,请重新登录!'
,
'提示'
,
{
MessageBox
.
alert
(
'您的登录过期,请重新登录!'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
callback
:
()
=>
{
callback
:
()
=>
{
//清除用户信息
router
.
push
({
path
:
'/'
,
query
:
{
redirect
:
router
.
history
.
current
.
fullPath
}
})
localStorage
.
removeItem
(
'backToken'
)
localStorage
.
removeItem
(
'userId'
)
router
.
push
({
path
:
'/'
,
query
:
{
redirect
:
router
.
history
.
current
.
fullPath
}})
}
}
});
});
}
else
if
(
status
===
401
)
{
}
else
if
(
status
===
401
)
{
MessageBox
.
alert
(
'您的用户权限已被禁用,请联系管理员!'
,
'提示'
,
{
MessageBox
.
alert
(
'您的用户权限已被禁用,请联系管理员!'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
callback
:
()
=>
{
callback
:
()
=>
{
//这个时候点击确定后清除用户信息
//这个时候点击确定后清除用户信息
localStorage
.
removeItem
(
'backToken'
)
localStorage
.
removeItem
(
'backToken'
)
localStorage
.
removeItem
(
'userId'
)
localStorage
.
removeItem
(
'userId'
)
router
.
push
({
path
:
'/'
,
query
:
{
redirect
:
router
.
history
.
current
.
fullPath
}
})
router
.
push
({
path
:
'/'
,
query
:
{
redirect
:
router
.
history
.
current
.
fullPath
}
})
store
.
commit
(
'isAdminInfo'
,
false
);
store
.
commit
(
'isAdminInfo'
,
false
);
}
}
});
});
}
else
if
(
status
===
500
&&
data
.
message
.
indexOf
(
"not have permission"
)
!==
-
1
)
{
}
else
if
(
status
===
500
&&
data
.
message
.
indexOf
(
"not have permission"
)
!==
-
1
)
{
// router.push({path: 'page403'})
Message
.
error
(
"抱歉,你无权访问该页面!"
)
Message
.
error
(
"抱歉,你无权访问该页面!"
)
}
else
if
(
!
data
)
{
}
else
if
(
!
data
)
{
Message
.
error
(
"网络出小差咯~"
)
Message
.
error
(
"网络出小差咯~"
)
}
}
}
}
function
successState
(
res
)
{
function
successState
(
res
)
{
store
.
commit
(
'UPDATE_LOADING'
,
false
)
//隐藏loading
store
.
commit
(
'UPDATE_LOADING'
,
false
)
//隐藏loading
}
}
const
httpServer
=
(
opts
,
data
,
file
,
timeout
)
=>
{
const
httpServer
=
(
opts
,
data
,
file
,
timeout
)
=>
{
//如果是不需要登录就可以访问的接口 需要设置opts.open
//如果是不需要登录就可以访问的接口 需要设置opts.open
let
Public
=
{}
//公共参数
let
Public
=
{}
//公共参数
let
httpDefaultOpts
=
{
let
httpDefaultOpts
=
{
method
:
opts
.
method
,
method
:
opts
.
method
,
url
:
baseUrl
+
opts
.
url
,
url
:
baseUrl
+
opts
.
url
,
timeout
:
timeout
?
timeout
:
20000
,
timeout
:
timeout
?
timeout
:
20000
,
params
:
Object
.
assign
(
Public
,
data
),
params
:
Object
.
assign
(
Public
,
data
),
data
:
data
,
data
:
data
,
headers
:
opts
.
headers
||
{},
headers
:
opts
.
headers
||
{},
};
};
httpDefaultOpts
.
headers
[
"Access-control-Allow-Origin"
]
=
"*"
;
httpDefaultOpts
.
headers
[
"Access-control-Allow-Origin"
]
=
"*"
;
httpDefaultOpts
.
headers
[
"Access-Control-Allow-Headers"
]
=
"content-type,x-requested-with"
;
httpDefaultOpts
.
headers
[
"Access-Control-Allow-Headers"
]
=
"content-type,x-requested-with"
;
let
authToken
=
""
;
let
authToken
=
""
;
if
(
opts
.
authType
&&
opts
.
authType
!=
""
)
{
if
(
opts
.
authType
&&
opts
.
authType
!=
""
)
{
// Authorization
// Authorization
if
(
opts
.
authType
===
"back"
)
{
if
(
opts
.
authType
===
"back"
)
{
authToken
=
localStorage
.
getItem
(
'backToken'
);
authToken
=
localStorage
.
getItem
(
'backToken'
);
}
else
if
(
opts
.
authType
===
"front"
)
{
}
else
if
(
opts
.
authType
===
"front"
)
{
authToken
=
localStorage
.
getItem
(
"token"
)
||
MyLocalStorage
.
Cache
.
get
(
'token'
);
authToken
=
localStorage
.
getItem
(
"token"
)
||
MyLocalStorage
.
Cache
.
get
(
'token'
);
}
}
httpDefaultOpts
.
headers
[
"Authorization"
]
=
authToken
httpDefaultOpts
.
headers
[
"Authorization"
]
=
authToken
}
}
if
(
opts
.
method
===
'get'
)
{
if
(
opts
.
method
===
'get'
)
{
delete
httpDefaultOpts
.
data
delete
httpDefaultOpts
.
data
httpDefaultOpts
.
params
.
timestamp_static
=
new
Date
().
getTime
();
httpDefaultOpts
.
params
.
timestamp_static
=
new
Date
().
getTime
();
// httpDefaultOpts.params.roleId = localStorage.getItem('roleId');
}
else
{
// httpDefaultOpts.params.bankBranchId = localStorage.getItem('bankBranchId');
}
else
{
delete
httpDefaultOpts
.
params
delete
httpDefaultOpts
.
params
if
(
file
){
if
(
file
)
{
httpDefaultOpts
.
data
=
data
;
httpDefaultOpts
.
data
=
data
;
// httpDefaultOpts.headers["X-Requested-With"]="multipart/form-data";
}
}
}
}
let
promise
=
new
Promise
(
function
(
resolve
,
reject
)
{
let
promise
=
new
Promise
(
function
(
resolve
,
reject
)
{
let
loadingInstance
=
Loading
.
service
({
let
loadingInstance
=
Loading
.
service
({
fullscreen
:
true
,
fullscreen
:
true
,
lock
:
true
,
lock
:
true
,
...
@@ -115,29 +101,31 @@ const httpServer = (opts,data,file,timeout)=>{
...
@@ -115,29 +101,31 @@ const httpServer = (opts,data,file,timeout)=>{
text
:
'Loading'
,
text
:
'Loading'
,
spinner
:
'el-icon-loading'
spinner
:
'el-icon-loading'
})
})
let
markIndex
=
setTimeout
(
function
()
{
let
markIndex
=
setTimeout
(
function
()
{
loadingInstance
.
close
();
loadingInstance
.
close
();
},
10000
)
},
10000
)
axios
(
httpDefaultOpts
).
then
((
res
)
=>
{
axios
(
httpDefaultOpts
).
then
((
res
)
=>
{
loadingInstance
.
close
();
loadingInstance
.
close
();
clearTimeout
(
markIndex
)
clearTimeout
(
markIndex
)
successState
(
res
)
if
(
res
.
data
.
resultCode
==
'1109'
&&
localStorage
.
getItem
(
'backToken'
))
{
if
(
res
){
//清除用户信息
resolve
(
res
)
errorState
(
res
.
status
,
res
.
data
)
errorState
(
res
.
status
,
res
.
data
)
}
else
{
successState
(
res
)
resolve
(
res
)
}
}
}).
catch
((
response
)
=>
{
}).
catch
((
response
)
=>
{
loadingInstance
.
close
();
loadingInstance
.
close
();
clearTimeout
(
markIndex
)
clearTimeout
(
markIndex
)
console
.
log
(
"catch"
)
console
.
log
(
"catch"
)
if
(
response
&&
response
.
response
&&
response
.
response
.
status
&&
response
.
response
.
data
)
{
if
(
response
&&
response
.
response
&&
response
.
response
.
status
&&
response
.
response
.
data
)
{
errorState
(
response
.
response
.
status
,
response
.
response
.
data
)
errorState
(
response
.
response
.
status
,
response
.
response
.
data
)
}
}
reject
(
response
)
reject
(
response
)
if
(
response
.
response
.
data
)
{
if
(
response
.
response
.
data
)
{
if
(
response
.
response
.
data
.
message
)
{
if
(
response
.
response
.
data
.
message
)
{
Message
.
error
(
response
.
response
.
data
.
message
)
Message
.
error
(
response
.
response
.
data
.
message
)
}
else
{
}
else
{
Message
.
error
(
"操作失败!"
)
Message
.
error
(
"操作失败!"
)
}
}
}
}
...
@@ -146,4 +134,4 @@ const httpServer = (opts,data,file,timeout)=>{
...
@@ -146,4 +134,4 @@ const httpServer = (opts,data,file,timeout)=>{
return
promise
return
promise
}
}
export
default
httpServer
export
default
httpServer
src/config/loginOut.js
View file @
a081d480
export
function
loginOut
(){
export
function
loginOut
()
{
localStorage
.
removeItem
(
"user"
)
const
list
=
[
'user'
,
'userId'
,
'backToken'
,
'menuList'
]
localStorage
.
removeItem
(
"backToken"
)
list
.
forEach
(
v
=>
{
localStorage
.
removeItem
(
"menuList"
)
localStorage
.
removeItem
(
v
)
})
}
}
\ No newline at end of file
src/page/accounts/components/accountTable.vue
View file @
a081d480
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
:prop=
"item.prop"
:prop=
"item.prop"
:label=
"item.label"
:label=
"item.label"
:width=
"item.width"
:width=
"item.width"
>
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"item.isEdit"
class=
"table-btn-group"
>
<div
v-if=
"item.isEdit"
class=
"table-btn-group"
>
...
@@ -68,8 +69,8 @@
...
@@ -68,8 +69,8 @@
</el-tooltip>
</el-tooltip>
</div>
</div>
<div
v-else
>
<div
v-else
>
<span
v-if=
"item.prop === '
type
'"
>
<span
v-if=
"item.prop === '
roleList
'"
>
{{
scope
.
row
[
item
.
prop
]
|
accoutType
}}
{{
accoutRoleList
(
scope
.
row
[
item
.
prop
])
}}
</span>
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
prop
]
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
prop
]
}}
</span>
</div>
</div>
...
@@ -103,29 +104,29 @@ export default {
...
@@ -103,29 +104,29 @@ export default {
return
[];
return
[];
},
},
},
},
},
rolesList
:
{
filters
:
{
type
:
Array
,
accoutType
(
type
)
{
default
:
()
=>
{
switch
(
type
)
{
return
[];
case
"1"
:
},
return
"平台账号"
;
break
;
case
"2"
:
return
"用户账号"
;
break
;
case
"3"
:
return
"机顶盒账号"
;
break
;
case
"4"
:
return
"运维账号"
;
break
;
default
:
return
""
;
}
},
},
},
},
components
:
{
auditInfo
},
components
:
{
auditInfo
},
methods
:
{
methods
:
{
accoutRoleList
(
roleArray
)
{
if
(
!
this
.
rolesList
.
length
||
!
roleArray
)
{
return
false
;
}
let
roleName
=
[];
this
.
rolesList
.
forEach
((
r
)
=>
{
roleArray
.
forEach
((
a
)
=>
{
if
(
r
.
id
==
a
)
{
roleName
.
push
(
r
.
name
);
}
});
});
return
roleName
.
join
(
"、"
);
},
handleOperate
(
row
,
type
)
{
handleOperate
(
row
,
type
)
{
if
(
type
!=
"edit"
&&
type
!=
"examine"
)
{
if
(
type
!=
"edit"
&&
type
!=
"examine"
)
{
this
.
$confirm
(
"确认进行此操作?"
,
"提示"
,
{
this
.
$confirm
(
"确认进行此操作?"
,
"提示"
,
{
...
...
src/page/accounts/components/dbUnitTable.vue
View file @
a081d480
...
@@ -21,12 +21,16 @@
...
@@ -21,12 +21,16 @@
>
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"item.isEdit"
class=
"table-btn-group"
>
<div
v-if=
"item.isEdit"
class=
"table-btn-group"
>
<el-tooltip
content=
"修改"
placement=
"top"
v-if=
"userId === scope.row.id"
>
<el-tooltip
<el-button
circle
@
click=
"handleOperate(scope.row, 'edit')"
>
content=
"修改"
placement=
"top"
v-if=
"userId === scope.row.id"
>
<el-button
circle
@
click=
"handleOperate(scope.row, 'edit')"
>
<i
class=
"icon-table icon-edit"
></i>
<i
class=
"icon-table icon-edit"
></i>
</el-button>
</el-button>
</el-tooltip>
</el-tooltip>
<el-tooltip
content=
"查看"
placement=
"top"
v-else
>
<el-tooltip
content=
"查看"
placement=
"top"
>
<el-button
circle
@
click=
"handleOperate(scope.row, 'detail')"
>
<el-button
circle
@
click=
"handleOperate(scope.row, 'detail')"
>
<i
class=
"icon-table icon-detail"
></i>
<i
class=
"icon-table icon-detail"
></i>
</el-button>
</el-button>
...
@@ -48,9 +52,14 @@
...
@@ -48,9 +52,14 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
userId
:
localStorage
.
getItem
(
'userId'
)
||
"1375705092221669378"
};
};
},
},
computed
:{
userId
(){
return
localStorage
.
getItem
(
'userId'
)
||
''
}
},
props
:
{
props
:
{
currentPage
:
{
currentPage
:
{
type
:
Number
,
type
:
Number
,
...
...
src/page/accounts/dbUnitAdmin.vue
View file @
a081d480
...
@@ -36,7 +36,7 @@ export default {
...
@@ -36,7 +36,7 @@ export default {
{
prop
:
"telephone"
,
label
:
"固定电话"
},
{
prop
:
"telephone"
,
label
:
"固定电话"
},
{
prop
:
"weChat"
,
label
:
"微信号"
},
{
prop
:
"weChat"
,
label
:
"微信号"
},
{
prop
:
"email"
,
label
:
"邮箱"
},
{
prop
:
"email"
,
label
:
"邮箱"
},
{
prop
:
""
,
label
:
"操作"
,
isEdit
:
true
,
width
:
1
2
0
},
{
prop
:
""
,
label
:
"操作"
,
isEdit
:
true
,
width
:
1
8
0
},
],
],
list
:
[],
list
:
[],
page
:
{
page
:
{
...
...
src/page/accounts/dbUnitDialog/edit.vue
View file @
a081d480
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<el-button
type=
"primary"
@
click=
"handleSubmit()"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit()"
>
确 定
</el-button>
</div>
</div>
<div
v-else
>
<div
v-else
>
<el-button
type=
"primary"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button>
</div>
</div>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -90,6 +90,7 @@ export default {
...
@@ -90,6 +90,7 @@ export default {
phone
:
""
,
phone
:
""
,
weChat
:
""
,
weChat
:
""
,
email
:
""
,
email
:
""
,
roleList
:[],
type
:
2
,
//1.用户账号 2.平台单位管理员账号 3.机顶盒账号 4.运维账号
type
:
2
,
//1.用户账号 2.平台单位管理员账号 3.机顶盒账号 4.运维账号
},
},
rules
:
{
rules
:
{
...
@@ -155,6 +156,7 @@ export default {
...
@@ -155,6 +156,7 @@ export default {
phone
:
""
,
phone
:
""
,
weChat
:
""
,
weChat
:
""
,
email
:
""
,
email
:
""
,
roleList
:[],
type
:
2
,
//1.用户账号 2.平台单位管理员账号 3.机顶盒账号 4.运维账号
type
:
2
,
//1.用户账号 2.平台单位管理员账号 3.机顶盒账号 4.运维账号
}
}
},
},
...
@@ -172,6 +174,7 @@ export default {
...
@@ -172,6 +174,7 @@ export default {
user
.
email
=
_this
.
form
.
email
;
user
.
email
=
_this
.
form
.
email
;
user
.
id
=
_this
.
id
;
user
.
id
=
_this
.
id
;
user
.
type
=
this
.
form
.
type
;
user
.
type
=
this
.
form
.
type
;
user
.
roleList
=
this
.
form
.
roleList
this
.
$https
(
this
.
$https
(
{
{
method
:
"put"
,
method
:
"put"
,
...
...
src/page/accounts/statistical.vue
View file @
a081d480
...
@@ -103,7 +103,7 @@ export default {
...
@@ -103,7 +103,7 @@ export default {
},
},
handleReset
()
{
handleReset
()
{
this
.
form
.
userName
=
""
;
this
.
form
.
userName
=
""
;
this
.
form
.
user
=
""
;
this
.
form
.
status
=
""
;
this
.
getFirstPageList
();
this
.
getFirstPageList
();
},
},
getFirstPageList
()
{
getFirstPageList
()
{
...
...
src/page/accounts/stbAdmin.vue
View file @
a081d480
...
@@ -146,6 +146,15 @@ export default {
...
@@ -146,6 +146,15 @@ export default {
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
});
});
},
// 页面返回值为空
getResWithOutData
()
{
this
.
list
=
[];
this
.
page
=
{
_index
:
1
,
_size
:
10
,
total
:
0
,
};
},
},
// 新增账号
// 新增账号
handleAdd
()
{
handleAdd
()
{
...
...
src/page/accounts/stbDialog/edit.vue
View file @
a081d480
...
@@ -109,6 +109,7 @@ export default {
...
@@ -109,6 +109,7 @@ export default {
// 根据id获取获取详情内容
// 根据id获取获取详情内容
getDetailById
()
{
getDetailById
()
{
let
_this
=
this
;
let
_this
=
this
;
debugger
this
.
$https
(
this
.
$https
(
{
{
method
:
"get"
,
method
:
"get"
,
...
@@ -126,7 +127,6 @@ export default {
...
@@ -126,7 +127,6 @@ export default {
this
.
form
[
key
]
=
resData
[
key
];
this
.
form
[
key
]
=
resData
[
key
];
}
}
}
}
// _this.form.areaId = resData.areas
if
(
!
_this
.
form
.
permanent
)
{
if
(
!
_this
.
form
.
permanent
)
{
_this
.
form
.
date
=
[
resData
.
effectiveDate
,
resData
.
exiredDate
];
_this
.
form
.
date
=
[
resData
.
effectiveDate
,
resData
.
exiredDate
];
}
}
...
...
src/page/accounts/userDialog/add.vue
View file @
a081d480
...
@@ -41,17 +41,18 @@
...
@@ -41,17 +41,18 @@
class=
"mt16"
class=
"mt16"
v-model=
"form.date"
v-model=
"form.date"
type=
"daterange"
type=
"daterange"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
range-separator=
"至"
range-separator=
"至"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-date-picker>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"账号类型"
prop=
"roleList"
>
<el-form-item
label=
"账号类型"
prop=
"roleList"
>
<el-checkbox-group
v-model=
"form.roleList"
:min=
"1"
>
<el-checkbox-group
v-model=
"form.roleList"
:min=
"1"
>
<el-checkbox
<el-checkbox
v-for=
"(item,index) in rolesList"
v-for=
"(item,
index) in rolesList"
:key=
"index"
:key=
"index"
:label=
"item.id"
:label=
"item.id"
>
>
...
@@ -68,21 +69,17 @@
...
@@ -68,21 +69,17 @@
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getOrgListWithOutPage
}
from
"@/config/organ"
;
import
{
getRoles
}
from
"@/config/roles"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
dialogVisible
:
false
,
dialogVisible
:
false
,
organList
:
[],
rolesList
:
[],
form
:
{
form
:
{
userName
:
""
,
userName
:
""
,
orgId
:
""
,
orgId
:
""
,
permanent
:
true
,
permanent
:
true
,
date
:
""
,
date
:
""
,
roleList
:
[],
roleList
:
[],
type
:
1
//1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
type
:
1
,
//1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
},
},
rules
:
{
rules
:
{
userName
:
[
userName
:
[
...
@@ -94,69 +91,72 @@ export default {
...
@@ -94,69 +91,72 @@ export default {
permanent
:
[
permanent
:
[
{
required
:
true
,
message
:
"请选择账号有效期"
,
trigger
:
"change"
},
{
required
:
true
,
message
:
"请选择账号有效期"
,
trigger
:
"change"
},
],
],
roleList
:
[
roleList
:
[
{
type
:
'array'
,
required
:
true
,
message
:
"请选择账号类型"
,
trigger
:
"change"
},
{
]
type
:
"array"
,
required
:
true
,
message
:
"请选择账号类型"
,
trigger
:
"change"
,
},
],
},
},
};
};
},
},
mounted
()
{
props
:
{
this
.
getOrgList
();
organList
:
{
this
.
getRolesList
();
type
:
Array
,
},
default
:
()
=>
{
methods
:
{
return
[];
// 获取机构列表
},
getOrgList
()
{
getOrgListWithOutPage
().
then
((
res
)
=>
{
this
.
organList
=
res
;
});
},
},
// 获取角色列表
rolesList
:
{
getRolesList
()
{
type
:
Array
,
getRoles
().
then
((
res
)
=>
{
default
:
(
)
=>
{
this
.
rolesList
=
res
;
return
[]
;
}
);
}
,
},
},
},
mounted
()
{},
methods
:
{
// 弹窗关闭
// 弹窗关闭
handleClose
()
{
handleClose
()
{
this
.
$confirm
(
"确认关闭?"
)
this
.
$confirm
(
"确认关闭?"
)
.
then
((
_
)
=>
{
.
then
((
_
)
=>
{
this
.
handleReset
()
this
.
handleReset
()
;
})
})
.
catch
((
_
)
=>
{});
.
catch
((
_
)
=>
{});
},
},
handleReset
()
{
handleReset
()
{
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
;
this
.
$refs
.
form
.
resetFields
()
this
.
$refs
.
form
.
resetFields
();
this
.
form
=
{
this
.
form
=
{
userName
:
""
,
userName
:
""
,
orgId
:
""
,
orgId
:
""
,
permanent
:
true
,
permanent
:
true
,
date
:
""
,
date
:
""
,
roleList
:
[],
roleList
:
[],
type
:
1
type
:
1
,
}
};
},
},
// 提交
// 提交
handleSubmit
()
{
handleSubmit
()
{
// 校验用户输入值
// 校验用户输入值
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
let
user
=
{};
let
user
=
{};
if
(
!
this
.
form
.
permanent
&&
!
this
.
form
.
date
)
{
if
(
!
this
.
form
.
permanent
&&
!
this
.
form
.
date
)
{
this
.
$message
.
error
(
'请选择有效期'
)
this
.
$message
.
error
(
"请选择有效期"
);
return
false
return
false
;
}
}
if
(
!
this
.
form
.
permanent
)
{
if
(
!
this
.
form
.
permanent
)
{
user
.
effectiveDate
=
this
.
form
.
date
[
0
];
user
.
effectiveDate
=
this
.
form
.
date
[
0
];
user
.
exiredDate
=
this
.
form
.
date
[
1
];
user
.
exiredDate
=
this
.
form
.
date
[
1
];
}
}
user
.
userName
=
this
.
form
.
userName
;
user
.
userName
=
this
.
form
.
userName
;
user
.
orgId
=
this
.
form
.
orgId
;
user
.
orgId
=
this
.
form
.
orgId
;
user
.
roleList
=
this
.
form
.
roleList
;
user
.
roleList
=
this
.
form
.
roleList
;
user
.
permanent
=
this
.
form
.
permanent
;
user
.
permanent
=
this
.
form
.
permanent
;
user
.
type
=
this
.
form
.
type
user
.
type
=
this
.
form
.
type
;
this
.
$https
(
this
.
$https
(
{
{
method
:
"post"
,
method
:
"post"
,
...
@@ -166,20 +166,20 @@ export default {
...
@@ -166,20 +166,20 @@ export default {
user
user
)
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
if
(
res
.
status
==
200
)
{
if
(
res
.
data
.
resultCode
==
200
)
{
if
(
res
.
data
.
resultCode
==
200
)
{
this
.
$message
({
this
.
$message
({
type
:
"success"
,
type
:
"success"
,
message
:
res
.
data
.
message
,
message
:
res
.
data
.
message
,
});
});
this
.
handleReset
()
this
.
handleReset
();
this
.
$emit
(
'success'
,
true
)
this
.
$emit
(
"success"
,
true
);
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
this
.
$message
.
error
(
res
.
data
.
message
);
}
}
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
);
this
.
$message
.
error
(
res
.
data
);
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
...
...
src/page/accounts/userDialog/edit.vue
View file @
a081d480
...
@@ -68,14 +68,10 @@
...
@@ -68,14 +68,10 @@
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getOrgListWithOutPage
}
from
"@/config/organ"
;
import
{
getRoles
}
from
"@/config/roles"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
dialogVisible
:
false
,
dialogVisible
:
false
,
organList
:
[],
rolesList
:
[],
id
:
''
,
id
:
''
,
form
:
{
form
:
{
id
:
''
,
id
:
''
,
...
@@ -101,24 +97,25 @@ export default {
...
@@ -101,24 +97,25 @@ export default {
]
]
},
},
};
};
},
props
:
{
organList
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
},
},
rolesList
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
},
},
},
},
mounted
()
{
mounted
()
{
this
.
getOrgList
();
this
.
getRolesList
();
},
},
methods
:
{
methods
:
{
// 获取机构列表
getOrgList
()
{
getOrgListWithOutPage
().
then
((
res
)
=>
{
this
.
organList
=
res
;
});
},
// 获取角色列表
getRolesList
()
{
getRoles
().
then
((
res
)
=>
{
this
.
rolesList
=
res
;
});
},
// 根据id获取获取详情内容
// 根据id获取获取详情内容
getDetailById
(){
getDetailById
(){
let
_this
=
this
let
_this
=
this
...
@@ -140,7 +137,7 @@ export default {
...
@@ -140,7 +137,7 @@ export default {
if
(
!
this
.
form
.
permanent
){
if
(
!
this
.
form
.
permanent
){
this
.
form
.
date
=
[
this
.
form
.
date
=
[
resData
.
effectiveDate
,
resData
.
effectiveDate
,
exiredDate
resData
.
exiredDate
]
]
}
}
}
else
{
}
else
{
...
...
src/page/accounts/users.vue
View file @
a081d480
...
@@ -31,12 +31,13 @@
...
@@ -31,12 +31,13 @@
<account-table
<account-table
:feildList=
"feildList"
:feildList=
"feildList"
:list=
"list"
:list=
"list"
:rolesList=
"rolesList"
@
action=
"handleAction"
@
action=
"handleAction"
/>
/>
<party-pagination
:page=
"page"
@
changePage=
"handleChangeCurrent"
/>
<party-pagination
:page=
"page"
@
changePage=
"handleChangeCurrent"
/>
</div>
</div>
<add-dialog
ref=
"addDialog"
@
success=
"getFirstPageList()"
/>
<add-dialog
ref=
"addDialog"
:organList=
"organList"
:rolesList=
"rolesList"
@
success=
"getFirstPageList()"
/>
<edit-dialog
ref=
"editDialog"
@
success=
"getFirstPageList()"
/>
<edit-dialog
ref=
"editDialog"
:organList=
"organList"
:rolesList=
"rolesList"
@
success=
"getFirstPageList()"
/>
<msg-dialog
ref=
"msgDilaog"
:msgInfo=
"msgInfo"
/>
<msg-dialog
ref=
"msgDilaog"
:msgInfo=
"msgInfo"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -45,6 +46,8 @@ import { partyPagination } from "@/components/index";
...
@@ -45,6 +46,8 @@ import { partyPagination } from "@/components/index";
import
accountTable
from
"./components/accountTable"
;
import
accountTable
from
"./components/accountTable"
;
import
{
addDialog
,
editDialog
}
from
"./userDialog/index"
;
import
{
addDialog
,
editDialog
}
from
"./userDialog/index"
;
import
msgDialog
from
"./msgDialog.vue"
;
import
msgDialog
from
"./msgDialog.vue"
;
import
{
getOrgListWithOutPage
}
from
"@/config/organ"
;
import
{
getRoles
}
from
"@/config/roles"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -56,7 +59,7 @@ export default {
...
@@ -56,7 +59,7 @@ export default {
{
prop
:
"userName"
,
label
:
"平台用户名"
},
{
prop
:
"userName"
,
label
:
"平台用户名"
},
{
prop
:
"orgName"
,
label
:
"所在机构"
},
{
prop
:
"orgName"
,
label
:
"所在机构"
},
{
prop
:
"exiredDate"
,
label
:
"到期时间"
},
{
prop
:
"exiredDate"
,
label
:
"到期时间"
},
{
prop
:
"
type
"
,
label
:
"账号类型"
},
{
prop
:
"
roleList
"
,
label
:
"账号类型"
},
{
prop
:
"statusName"
,
label
:
"账号状态"
},
{
prop
:
"statusName"
,
label
:
"账号状态"
},
{
prop
:
""
,
label
:
"操作"
,
isEdit
:
true
,
width
:
280
},
{
prop
:
""
,
label
:
"操作"
,
isEdit
:
true
,
width
:
280
},
],
],
...
@@ -68,6 +71,8 @@ export default {
...
@@ -68,6 +71,8 @@ export default {
},
},
activeRow
:
{},
activeRow
:
{},
msgInfo
:
{},
msgInfo
:
{},
organList
:[],
rolesList
:[]
};
};
},
},
components
:
{
components
:
{
...
@@ -78,9 +83,23 @@ export default {
...
@@ -78,9 +83,23 @@ export default {
msgDialog
,
msgDialog
,
},
},
mounted
()
{
mounted
()
{
this
.
getOrgList
();
this
.
getRolesList
();
this
.
getFirstPageList
();
this
.
getFirstPageList
();
},
},
methods
:
{
methods
:
{
// 获取机构列表
getOrgList
()
{
getOrgListWithOutPage
().
then
((
res
)
=>
{
this
.
organList
=
res
;
});
},
// 获取角色列表
getRolesList
()
{
getRoles
().
then
((
res
)
=>
{
this
.
rolesList
=
res
;
});
},
getFirstPageList
()
{
getFirstPageList
()
{
this
.
page
.
_index
=
1
;
this
.
page
.
_index
=
1
;
this
.
getPageList
();
this
.
getPageList
();
...
@@ -124,6 +143,15 @@ export default {
...
@@ -124,6 +143,15 @@ export default {
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
});
});
},
// 页面返回值为空
getResWithOutData
()
{
this
.
list
=
[];
this
.
page
=
{
_index
:
1
,
_size
:
10
,
total
:
0
,
};
},
},
// 新增账号
// 新增账号
handleAdd
()
{
handleAdd
()
{
...
...
src/page/system/log/devops.vue
View file @
a081d480
<
template
>
<
template
>
<!-- 运维日志 -->
<!-- 运维日志 -->
<div
class=
"devops-wrapper height100"
>
<div
class=
"devops-wrapper height100"
>
<div
class=
"search-container"
>
<div
class=
"search-container"
>
<el-form
:inline=
"true"
:model=
"form"
>
<el-form
:inline=
"true"
:model=
"form"
>
<el-form-item>
<el-form-item>
<el-input
<el-input
v-model=
"form.userName"
clearable
placeholder=
"请输入运维者账号"
v-model=
"form.userName"
suffix-icon=
"el-icon-search"
placeholder=
"请输入运维者账号"
></el-input>
suffix-icon=
"el-icon-search"
</el-form-item>
></el-input>
<el-form-item>
</el-form-item>
<el-date-picker
<el-form-item>
v-model=
"form.date"
<el-date-picker
type=
"daterange"
clearable
range-separator=
"至"
v-model=
"form.date"
value-format=
"yyyy-MM-dd"
type=
"daterange"
start-placeholder=
"开始日期"
range-separator=
"至"
end-placeholder=
"结束日期"
>
value-format=
"yyyy-MM-dd"
</el-date-picker>
start-placeholder=
"开始日期"
</el-form-item>
end-placeholder=
"结束日期"
<el-form-item>
>
<div
class=
"btn-group"
>
</el-date-picker>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
查询
</el-button>
</el-form-item>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
<el-form-item>
</div>
<div
class=
"btn-group"
>
</el-form-item>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
查询
</el-button>
</el-form>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
<div
class=
"page-tip"
>
</div>
<span
class=
"page-tip-title"
>
页面说明:
</span>
</el-form-item>
<span
class=
"page-tips"
>
可查看所有账号在系统上的操作信息,可根据操作类型、操作时间段查询等方式对日志信息进行筛选
</span>
</el-form>
</div>
<div
class=
"page-tip"
>
</div>
<span
class=
"page-tip-title"
>
页面说明:
</span>
<div
class=
"table-content hasTabs"
>
<span
class=
"page-tips"
<party-table
>
可查看所有账号在系统上的操作信息,可根据操作类型、操作时间段查询等方式对日志信息进行筛选
</span
class=
"noAdd"
>
:currentPage=
"page._index"
:feildList=
"feildList"
:list=
"list"
>
</party-table>
<party-pagination
:page=
"page"
@
changePage=
"handleChangeCurrent"
/>
</div>
</div>
</div>
<div
class=
"table-content hasTabs"
>
<party-table
class=
"noAdd"
:currentPage=
"page._index"
:feildList=
"feildList"
:list=
"list"
>
</party-table>
<party-pagination
:page=
"page"
@
changePage=
"handleChangeCurrent"
/>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
partyPagination
,
partyTable
}
from
'@/components/index'
import
{
partyPagination
,
partyTable
}
from
"@/components/index"
;
export
default
{
export
default
{
data
(){
data
()
{
return
{
return
{
form
:{
form
:
{
userName
:
''
,
userName
:
""
,
date
:
''
,
date
:
""
,
startDate
:
''
,
startDate
:
""
,
endDate
:
''
endDate
:
""
,
},
},
feildList
:[
feildList
:
[
{
prop
:
'userName'
,
label
:
'运维账号'
},
{
prop
:
"userName"
,
label
:
"运维账号"
},
{
prop
:
'area'
,
label
:
'运维区域'
},
{
prop
:
"area"
,
label
:
"运维区域"
},
{
prop
:
'operationType'
,
label
:
'操作类型'
},
{
prop
:
"operationType"
,
label
:
"操作类型"
},
{
prop
:
'createTime'
,
label
:
'操作时间'
}
{
prop
:
"createTime"
,
label
:
"操作时间"
},
],
],
list
:
[],
list
:
[],
page
:{
page
:
{
_index
:
1
,
_index
:
1
,
_size
:
10
,
_size
:
10
,
total
:
0
total
:
0
,
}
},
}
};
},
components
:
{
partyTable
,
partyPagination
},
mounted
()
{
this
.
getFirstPageList
();
},
methods
:
{
handleSubmit
()
{
this
.
getPageList
();
},
},
components
:{
partyTable
,
partyPagination
},
getFirstPageList
()
{
mounted
(){
this
.
page
.
_index
=
1
;
this
.
getLog
()
this
.
getPageList
();
},
},
methods
:{
handleReset
()
{
handleSubmit
(){
for
(
let
key
in
this
.
form
)
{
this
.
getLog
()
this
.
form
[
key
]
=
""
;
},
}
handleReset
(){
this
.
getFirstPageList
();
for
(
let
key
in
this
.
form
){
},
this
.
form
[
key
]
=
""
getPageList
()
{
}
let
requestParams
=
{};
this
.
getLog
()
requestParams
.
_index
=
this
.
page
.
_index
;
requestParams
.
_size
=
this
.
page
.
_size
;
if
(
this
.
form
.
userName
)
{
requestParams
.
userName
=
this
.
form
.
userName
;
}
if
(
this
.
form
.
date
)
{
requestParams
.
startDate
=
this
.
form
.
date
[
0
];
requestParams
.
endDate
=
this
.
form
.
date
[
1
];
}
this
.
$https
(
{
method
:
"get"
,
url
:
"sysLog/OperationLog"
,
authType
:
this
.
backToken
,
},
},
getLog
(){
requestParams
let
requestParams
=
{}
)
requestParams
.
_index
=
this
.
page
.
_index
.
then
((
res
)
=>
{
requestParams
.
_size
=
this
.
page
.
_size
if
(
res
.
status
!=
200
)
{
if
(
this
.
form
.
userName
){
this
.
getResWithOutData
();
requestParams
.
userName
=
this
.
form
.
userName
}
else
{
if
(
res
.
data
.
resultCode
==
200
)
{
this
.
list
=
res
.
data
.
data
.
records
;
this
.
page
.
_size
=
res
.
data
.
data
.
size
;
this
.
page
.
total
=
res
.
data
.
data
.
total
;
}
else
{
this
.
getResWithOutData
();
}
}
if
(
this
.
form
.
date
){
}
requestParams
.
startDate
=
this
.
form
.
date
[
0
]
})
requestParams
.
endDate
=
this
.
form
.
date
[
1
]
.
catch
((
err
)
=>
{
}
console
.
log
(
err
);
this
.
$https
({
});
method
:
'get'
,
},
url
:
'sysLog/OperationLog'
,
// 页面返回值为空
authType
:
this
.
backToken
,
getResWithOutData
()
{
},
requestParams
).
then
(
res
=>
{
this
.
list
=
[];
if
(
res
.
status
!=
200
){
this
.
page
=
{
this
.
getResWithOutData
()
_index
:
1
,
}
else
{
_size
:
10
,
if
(
res
.
data
.
resultCode
==
200
){
total
:
0
,
this
.
list
=
res
.
data
.
data
.
records
};
this
.
page
.
_size
=
res
.
data
.
data
.
size
},
this
.
page
.
total
=
res
.
data
.
data
.
total
// 翻页
}
else
{
handleChangeCurrent
(
val
)
{
this
.
getResWithOutData
()
this
.
page
.
_index
=
val
;
}
this
.
getPageList
();
}
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
// 页面返回值为空
getResWithOutData
(){
this
.
list
=
[]
this
.
page
=
{
_index
:
1
,
_size
:
10
,
total
:
0
}
},
// 翻页
handleChangeCurrent
(
val
){
this
.
page
.
_index
=
val
this
.
getLog
()
}
},
},
watch
:{
},
watch
:
{},
}
};
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
</
style
>
</
style
>
\ No newline at end of file
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