Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Q
qualityTesting_adminHome
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
tobacco
qualityTesting_adminHome
Commits
2c7fd284
提交
2c7fd284
authored
10月 22, 2024
作者:
zfl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
等保要求整改
上级
ff5622f0
显示空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
1211 行增加
和
86 行删除
+1211
-86
role.js
src/api/role.js
+4
-3
student.js
src/api/student.js
+18
-12
system.js
src/api/system.js
+33
-6
user.js
src/api/user.js
+28
-0
index.vue
src/components/VerificationPassword/index.vue
+120
-0
Logo.vue
src/layout/components/Headerbar/Logo.vue
+2
-1
Nav.vue
src/layout/components/Headerbar/Nav.vue
+8
-0
index.js
src/router/index.js
+14
-0
user.js
src/store/modules/user.js
+1
-1
index.vue
src/views/login/index.vue
+64
-5
EmailRetrieve.vue
src/views/retrieve/components/EmailRetrieve.vue
+33
-3
PhoneRetrieve.vue
src/views/retrieve/components/PhoneRetrieve.vue
+32
-2
index.vue
src/views/student/Log/index.vue
+235
-0
index.vue
src/views/student/area_breed/index.vue
+5
-2
index.vue
src/views/student/display_board/index.vue
+5
-2
index.vue
src/views/student/examination_questions/detail/index.vue
+5
-2
index.vue
src/views/student/examination_questions/list/index.vue
+5
-2
index.vue
src/views/student/personnel/index.vue
+26
-6
index.vue
src/views/student/tobacco_grades/index.vue
+5
-2
index.vue
src/views/system/administrators/index.vue
+25
-12
index.vue
src/views/system/department/index.vue
+5
-2
index.vue
src/views/system/log/index.vue
+250
-17
index.vue
src/views/system/menu/index.vue
+20
-3
index.vue
src/views/system/roles/index.vue
+22
-3
setuserinfo.vue
src/views/system/setuserinfo.vue
+246
-0
没有找到文件。
src/api/role.js
浏览文件 @
2c7fd284
...
@@ -72,10 +72,11 @@ export function add_roles(data) {
...
@@ -72,10 +72,11 @@ export function add_roles(data) {
})
})
}
}
//角色-删除
//角色-删除
export
function
delete_roles
(
id
)
{
export
function
delete_roles
(
data
)
{
return
request
({
return
request
({
url
:
`/api/roles/
${
id
}
`
,
url
:
`/api/roles/
${
data
.
id
}
`
,
method
:
'delete'
method
:
'delete'
,
data
})
})
}
}
//角色-修改
//角色-修改
...
...
src/api/student.js
浏览文件 @
2c7fd284
...
@@ -53,10 +53,11 @@ export function add_tobacco_breed(data) {
...
@@ -53,10 +53,11 @@ export function add_tobacco_breed(data) {
})
})
}
}
//烟草品种信息-删除
//烟草品种信息-删除
export
function
delete_tobacco_breed
(
id
)
{
export
function
delete_tobacco_breed
(
data
)
{
return
request
({
return
request
({
url
:
`/api/tobacco_breed/
${
id
}
`
,
url
:
`/api/tobacco_breed/
${
data
.
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
data
})
})
}
}
//烟草品种信息-修改
//烟草品种信息-修改
...
@@ -174,10 +175,11 @@ export function add_examination_question_detail(data) {
...
@@ -174,10 +175,11 @@ export function add_examination_question_detail(data) {
})
})
}
}
//试题信息管理详情-删除
//试题信息管理详情-删除
export
function
delete_examination_question_detail
(
id
)
{
export
function
delete_examination_question_detail
(
data
)
{
return
request
({
return
request
({
url
:
`/api/examination_question_detail/
${
id
}
`
,
url
:
`/api/examination_question_detail/
${
data
.
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
data
})
})
}
}
//试题信息管理详情-修改
//试题信息管理详情-修改
...
@@ -210,10 +212,11 @@ export function examination_questions_publish(id) {
...
@@ -210,10 +212,11 @@ export function examination_questions_publish(id) {
})
})
}
}
//试题信息管理-停止使用/删除
//试题信息管理-停止使用/删除
export
function
delete_examination_questions
(
id
)
{
export
function
delete_examination_questions
(
data
)
{
return
request
({
return
request
({
url
:
`/api/examination_questions/
${
id
}
`
,
url
:
`/api/examination_questions/
${
data
.
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
data
})
})
}
}
//试题模板文件下载
//试题模板文件下载
...
@@ -282,10 +285,11 @@ export function add_tobacco_grades(data) {
...
@@ -282,10 +285,11 @@ export function add_tobacco_grades(data) {
})
})
}
}
//烟草等级信息-删除
//烟草等级信息-删除
export
function
delete_tobacco_grades
(
id
)
{
export
function
delete_tobacco_grades
(
data
)
{
return
request
({
return
request
({
url
:
`/api/tobacco_grades/
${
id
}
`
,
url
:
`/api/tobacco_grades/
${
data
.
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
data
})
})
}
}
//烟草等级信息-修改
//烟草等级信息-修改
...
@@ -336,10 +340,11 @@ export function add_student(data) {
...
@@ -336,10 +340,11 @@ export function add_student(data) {
})
})
}
}
//学员信息-删除
//学员信息-删除
export
function
delete_student
(
id
)
{
export
function
delete_student
(
data
)
{
return
request
({
return
request
({
url
:
`/api/student/
${
id
}
`
,
url
:
`/api/student/
${
data
.
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
data
})
})
}
}
//学员信息-修改
//学员信息-修改
...
@@ -471,9 +476,10 @@ export function updata_read_over(id, data) {
...
@@ -471,9 +476,10 @@ export function updata_read_over(id, data) {
})
})
}
}
//批阅试题列表-删除
//批阅试题列表-删除
export
function
delete_read_over
(
id
)
{
export
function
delete_read_over
(
data
)
{
return
request
({
return
request
({
url
:
`/api/read_over/
${
id
}
`
,
url
:
`/api/read_over/
${
data
.
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
data
})
})
}
}
src/api/system.js
浏览文件 @
2c7fd284
...
@@ -38,10 +38,11 @@ export function create_temporary(data) {
...
@@ -38,10 +38,11 @@ export function create_temporary(data) {
//管理员-删除
//管理员-删除
export
function
delete_administrators
(
id
)
{
export
function
delete_administrators
(
data
)
{
return
request
({
return
request
({
url
:
`/api/users/
${
id
}
`
,
url
:
`/api/users/
${
data
.
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
data
})
})
}
}
//管理员-修改
//管理员-修改
...
@@ -99,10 +100,11 @@ export function add_permission_menu(data) {
...
@@ -99,10 +100,11 @@ export function add_permission_menu(data) {
})
})
}
}
//删除菜单、功能(按钮)
//删除菜单、功能(按钮)
export
function
delete_permission_menu
(
id
)
{
export
function
delete_permission_menu
(
data
)
{
return
request
({
return
request
({
url
:
`/api/permission/
${
id
}
`
,
url
:
`/api/permission/
${
data
.
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
data
})
})
}
}
//修改菜单、功能(按钮)
//修改菜单、功能(按钮)
...
@@ -135,10 +137,11 @@ export function add_department(data) {
...
@@ -135,10 +137,11 @@ export function add_department(data) {
})
})
}
}
//部门管理-删除
//部门管理-删除
export
function
delete_department
(
id
)
{
export
function
delete_department
(
data
)
{
return
request
({
return
request
({
url
:
`/api/department/
${
id
}
`
,
url
:
`/api/department/
${
data
.
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
data
})
})
}
}
//部门管理-修改
//部门管理-修改
...
@@ -173,4 +176,28 @@ export function search_system_log(data) {
...
@@ -173,4 +176,28 @@ export function search_system_log(data) {
}
}
export
function
getStorageSpace
(
params
)
{
return
request
({
url
:
`/api/system_log/getStorageSpace`
,
method
:
'get'
,
params
})
}
export
function
countlog
(
params
)
{
return
request
({
url
:
`/api/system_log/countlog`
,
method
:
'get'
,
params
})
}
export
function
system_log_index
(
params
)
{
return
request
({
url
:
`/api/system_log/s_index`
,
method
:
'get'
,
params
})
}
src/api/user.js
浏览文件 @
2c7fd284
...
@@ -80,3 +80,30 @@ export function email_updata_user_password(data) {
...
@@ -80,3 +80,30 @@ export function email_updata_user_password(data) {
data
data
})
})
}
}
//获取邮箱验证码
export
function
getCaptcha
()
{
return
request
({
url
:
'/api/getCaptcha'
,
method
:
'get'
})
}
//个人信息修改
export
function
resetPassword
(
data
)
{
return
request
({
url
:
'/api/resetpassword'
,
method
:
'post'
,
data
})
}
//密码验证,是否可以进行修改
export
function
VerificationPassword
(
data
)
{
return
request
({
url
:
'/api/VerificationPassword'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/VerificationPassword/index.vue
0 → 100644
浏览文件 @
2c7fd284
<!--
* @Author: czj
* @Date: 2023-02-24 16:50:22
* @Description:
* @FilePath: \AdministrationHome\src\components\SizeSelect\index.vue
-->
<
template
>
<div>
<el-dialog
:title=
"'请您输入密码进行验证'"
:visible
.
sync=
"is_show_password"
width=
"500px"
:before-close=
"handleClose"
:class=
"'add_dialog'"
>
<el-form
:model=
"sub_data"
:rules=
"info_rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"密码"
prop=
"password"
>
<el-input
v-model=
"sub_data.password"
placeholder=
"请输入密码"
:type=
"passwordType"
>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-view"
@
click=
"showPwd"
></i>
</el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitInfo"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
VerificationPassword
}
from
'@/api/user'
;
export
default
{
data
()
{
return
{
is_password
:
false
,
is_show_password
:
false
,
info_rules
:
{
},
passwordType
:
'password'
,
//输入框的类型,密码框
sub_data
:{
password
:
''
}
}
},
computed
:
{
},
mounted
()
{
this
.
submitInfo
(
false
)
},
methods
:
{
//取消
handleClose
()
{
this
.
is_show_password
=
false
;
},
show_password
()
{
this
.
is_show_password
=
true
;
},
submitInfo
(
is_d
=
true
)
{
let
data
=
{
password
:
this
.
sub_data
.
password
?
this
.
$Aesencrypt
(
this
.
sub_data
.
password
):
null
,
}
VerificationPassword
(
data
).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
is_d
){
if
(
res
.
status
==
200
){
this
.
is_password
=
true
this
.
is_show_password
=
false
}
else
if
(
res
.
status
==
203
){
this
.
is_password
=
false
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
,
});
}
else
if
(
res
.
status
==
202
){
this
.
is_password
=
false
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
,
});
this
.
is_show_password
=
true
}
}
else
{
if
(
res
.
status
==
200
){
this
.
is_password
=
true
}
else
{
this
.
is_password
=
false
}
}
});
},
showPwd
()
{
if
(
this
.
passwordType
===
'password'
)
{
this
.
passwordType
=
''
;
}
else
{
this
.
passwordType
=
'password'
;
}
},
}
}
</
script
>
\ No newline at end of file
src/layout/components/Headerbar/Logo.vue
浏览文件 @
2c7fd284
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
<!-- -->
<!-- -->
<
template
>
<
template
>
<div>
<div>
质检系统
<!-- 质检系统 -->
学员考试分析系统
<!--
<img
src=
"/image/log.svg"
alt=
""
class=
"object_logo"
@
click=
"toHomePage"
>
-->
<!--
<img
src=
"/image/log.svg"
alt=
""
class=
"object_logo"
@
click=
"toHomePage"
>
-->
</div>
</div>
</
template
>
</
template
>
...
...
src/layout/components/Headerbar/Nav.vue
浏览文件 @
2c7fd284
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
{{
user_name
.
slice
(
0
,
1
)
||
''
}}
{{
user_name
.
slice
(
0
,
1
)
||
''
}}
</div>
</div>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
divided
@
click
.
native=
"tosetuserinfo"
>
<span
style=
"display:block;"
>
个人中心
</span>
</el-dropdown-item>
<el-dropdown-item
divided
@
click
.
native=
"logout"
>
<el-dropdown-item
divided
@
click
.
native=
"logout"
>
<span
style=
"display:block;"
>
退出登录
</span>
<span
style=
"display:block;"
>
退出登录
</span>
</el-dropdown-item>
</el-dropdown-item>
...
@@ -36,6 +39,11 @@ export default {
...
@@ -36,6 +39,11 @@ export default {
async
logout
()
{
async
logout
()
{
await
this
.
$store
.
dispatch
(
'user/logout'
)
await
this
.
$store
.
dispatch
(
'user/logout'
)
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
)
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
)
},
async
tosetuserinfo
()
{
this
.
$router
.
push
({
path
:
'/s_user/setuserinfo'
});
}
}
}
}
}
}
...
...
src/router/index.js
浏览文件 @
2c7fd284
...
@@ -223,7 +223,21 @@ export const asyncRoutes = [
...
@@ -223,7 +223,21 @@ export const asyncRoutes = [
]
]
},
},
{
path
:
'/s_user'
,
component
:
Layout
,
is_show
:
false
,
redirect
:
''
,
children
:
[
{
path
:
'setuserinfo'
,
component
:
()
=>
import
(
'@/views/system/setuserinfo'
),
is_show
:
false
,
meta
:
{
title
:
'个人信息修改'
}
}
]
},
// 404 page must be placed at the end !!!
// 404 page must be placed at the end !!!
{
path
:
'*'
,
redirect
:
'/404'
,
is_show
:
false
}
{
path
:
'*'
,
redirect
:
'/404'
,
is_show
:
false
}
]
]
...
...
src/store/modules/user.js
浏览文件 @
2c7fd284
...
@@ -51,7 +51,7 @@ const actions = {
...
@@ -51,7 +51,7 @@ const actions = {
const
{
data
}
=
response
const
{
data
}
=
response
commit
(
'SET_TOKEN'
,
response
.
access_token
)
commit
(
'SET_TOKEN'
,
response
.
access_token
)
setToken
(
response
.
access_token
)
setToken
(
response
.
access_token
)
resolve
()
resolve
(
response
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
reject
(
error
)
reject
(
error
)
})
})
...
...
src/views/login/index.vue
浏览文件 @
2c7fd284
...
@@ -55,6 +55,16 @@
...
@@ -55,6 +55,16 @@
class=
"el-input__icon el-icon-user-solid"
class=
"el-input__icon el-icon-user-solid"
></i>
></i>
</el-input>
</el-input>
</el-form-item>
<el-form-item
>
<el-row
style=
"padding-top:10px"
>
<el-col
:span=
"14"
>
<el-input
type=
"text"
v-model=
"loginForm.code"
placeholder=
"输入验证码"
></el-input>
</el-col>
<el-col
:span=
"10"
style=
"text-align: right; padding:2px 4px"
>
<img
@
click=
"getCaptcha_fun()"
:loading=
"Captcha_l"
:src=
"loginForm.image"
style=
"width: 98%;"
alt=
""
>
</el-col>
</el-row>
</el-form-item>
</el-form-item>
<el-tooltip
<el-tooltip
v-model=
"capsTooltip"
v-model=
"capsTooltip"
...
@@ -150,6 +160,7 @@
...
@@ -150,6 +160,7 @@
<
script
>
<
script
>
import
{
validUsername
}
from
'@/utils/validate'
;
import
{
validUsername
}
from
'@/utils/validate'
;
import
{
getCaptcha
}
from
'@/api/user'
;
export
default
{
export
default
{
name
:
'Login'
,
name
:
'Login'
,
components
:
{},
components
:
{},
...
@@ -162,8 +173,8 @@ export default {
...
@@ -162,8 +173,8 @@ export default {
}
}
};
};
const
validatePassword
=
(
rule
,
value
,
callback
)
=>
{
const
validatePassword
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
length
<
6
)
{
if
(
value
.
length
<
8
)
{
callback
(
new
Error
(
'密码不能少于
6
位'
));
callback
(
new
Error
(
'密码不能少于
8
位'
));
}
else
{
}
else
{
callback
();
callback
();
}
}
...
@@ -177,10 +188,14 @@ export default {
...
@@ -177,10 +188,14 @@ export default {
// password: '123456',
// password: '123456',
name
:
''
,
name
:
''
,
password
:
''
,
password
:
''
,
code
:
''
,
image
:
''
,
key
:
''
,
grant_type
:
'password'
,
grant_type
:
'password'
,
client_id
:
2
,
client_id
:
2
,
client_secret
:
'yTahrwHlHby7JhKGHXjJ6mvqnSVZn2JOTnVNZK4Q'
,
client_secret
:
'yTahrwHlHby7JhKGHXjJ6mvqnSVZn2JOTnVNZK4Q'
,
},
},
Captcha_l
:
false
,
loginRules
:
{
loginRules
:
{
name
:
[
name
:
[
...
@@ -211,6 +226,7 @@ export default {
...
@@ -211,6 +226,7 @@ export default {
},
},
},
},
created
()
{
created
()
{
this
.
getCaptcha_fun
()
// window.addEventListener('storage', this.afterQRScan)
// window.addEventListener('storage', this.afterQRScan)
},
},
mounted
()
{
mounted
()
{
...
@@ -228,6 +244,16 @@ export default {
...
@@ -228,6 +244,16 @@ export default {
const
{
key
}
=
e
;
const
{
key
}
=
e
;
this
.
capsTooltip
=
key
&&
key
.
length
===
1
&&
key
>=
'A'
&&
key
<=
'Z'
;
this
.
capsTooltip
=
key
&&
key
.
length
===
1
&&
key
>=
'A'
&&
key
<=
'Z'
;
},
},
getCaptcha_fun
(){
this
.
Captcha_l
=
true
getCaptcha
().
then
(
res
=>
{
if
(
res
.
img
){
this
.
loginForm
.
image
=
res
.
img
this
.
loginForm
.
key
=
res
.
key
this
.
Captcha_l
=
false
}
})
},
showPwd
()
{
showPwd
()
{
if
(
this
.
passwordType
===
'password'
)
{
if
(
this
.
passwordType
===
'password'
)
{
this
.
passwordType
=
''
;
this
.
passwordType
=
''
;
...
@@ -247,15 +273,48 @@ export default {
...
@@ -247,15 +273,48 @@ export default {
params
.
password
=
this
.
$Aesencrypt
(
params
.
password
);
params
.
password
=
this
.
$Aesencrypt
(
params
.
password
);
// console.log('登录数据加密');
// console.log('登录数据加密');
// console.log(params);
// console.log(params);
this
.
getCaptcha_fun
();
this
.
$store
this
.
$store
.
dispatch
(
'user/login'
,
params
)
.
dispatch
(
'user/login'
,
params
)
.
then
(()
=>
{
.
then
((
res
)
=>
{
if
(
res
.
is_update_password
==
'1'
&&
!
res
.
is_update_password_date
){
// TODO 跳转修改密码页面
this
.
$confirm
(
'因您属于首次登录,未修改密码,请您前往个人中心进行密码修改操作'
,
'提示'
,
{
confirmButtonText
:
'前往'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/s_user/setuserinfo'
});
}).
catch
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
'/'
,
query
:
this
.
otherQuery
,
});
});
}
else
if
(
res
.
is_update_password
==
'1'
&&
res
.
is_update_password_date
){
// TODO 跳转修改密码页面
this
.
$confirm
(
'您已经三个月没有修改密码,请您前往个人中心进行密码修改操作'
,
'提示'
,
{
confirmButtonText
:
'前往'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/s_user/setuserinfo'
});
}).
catch
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
'/'
,
query
:
this
.
otherQuery
,
});
});
}
else
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
this
.
redirect
||
'/'
,
path
:
this
.
redirect
||
'/'
,
query
:
this
.
otherQuery
,
query
:
this
.
otherQuery
,
});
});
/* this.$router.push('/') */
}
this
.
loading
=
false
;
this
.
loading
=
false
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
...
...
src/views/retrieve/components/EmailRetrieve.vue
浏览文件 @
2c7fd284
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<el-input
v-model=
"retrieve_params.email"
></el-input>
<el-input
v-model=
"retrieve_params.email"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"verification_code"
>
<el-form-item
prop=
"verification_code"
>
<span>
验证码
</span>
<span>
邮箱
验证码
</span>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-input
type=
"number"
v-model=
"retrieve_params.verification_code"
></el-input>
<el-input
type=
"number"
v-model=
"retrieve_params.verification_code"
></el-input>
...
@@ -25,6 +25,17 @@
...
@@ -25,6 +25,17 @@
</el-col>
</el-col>
</el-row>
</el-row>
</el-form-item>
</el-form-item>
<el-form-item
>
<span>
验证码
</span>
<el-row
style=
"padding-top:10px"
>
<el-col
:span=
"15"
>
<el-input
type=
"text"
v-model=
"retrieve_params.code"
placeholder=
"输入验证码"
></el-input>
</el-col>
<el-col
:span=
"9"
style=
"text-align: right; padding:2px 4px"
>
<img
@
click=
"getCaptcha_fun()"
:loading=
"Captcha_l"
:src=
"retrieve_params.image"
style=
"width: 98%;"
alt=
""
>
</el-col>
</el-row>
</el-form-item>
<el-form-item
prop=
"new_password"
>
<el-form-item
prop=
"new_password"
>
<span>
新密码
</span>
<span>
新密码
</span>
<el-tooltip
v-model=
"capsTooltip1"
content=
"大写锁定打开"
placement=
"right"
manual
>
<el-tooltip
v-model=
"capsTooltip1"
content=
"大写锁定打开"
placement=
"right"
manual
>
...
@@ -61,7 +72,7 @@
...
@@ -61,7 +72,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
get_email_code
,
email_updata_user_password
}
from
'@/api/user'
;
import
{
get_email_code
,
email_updata_user_password
,
getCaptcha
}
from
'@/api/user'
;
export
default
{
export
default
{
data
()
{
data
()
{
let
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
let
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
...
@@ -80,7 +91,11 @@ export default {
...
@@ -80,7 +91,11 @@ export default {
verification_code
:
''
,
//短信验证码
verification_code
:
''
,
//短信验证码
new_password
:
''
,
//新密码
new_password
:
''
,
//新密码
affirm_password
:
''
,
//确认密码
affirm_password
:
''
,
//确认密码
code
:
''
,
image
:
''
,
key
:
''
,
},
},
Captcha_l
:
false
,
//表单校验
//表单校验
rules
:
{
rules
:
{
email
:
[
email
:
[
...
@@ -112,9 +127,21 @@ export default {
...
@@ -112,9 +127,21 @@ export default {
computed
:
{},
computed
:
{},
mounted
()
{
},
mounted
()
{
this
.
getCaptcha_fun
()
},
methods
:
{
methods
:
{
getCaptcha_fun
(){
this
.
Captcha_l
=
true
getCaptcha
().
then
(
res
=>
{
if
(
res
.
img
){
this
.
retrieve_params
.
image
=
res
.
img
this
.
retrieve_params
.
key
=
res
.
key
this
.
Captcha_l
=
false
}
})
},
checkCapslock1
(
e
)
{
checkCapslock1
(
e
)
{
const
{
key
}
=
e
const
{
key
}
=
e
this
.
capsTooltip1
=
key
&&
key
.
length
===
1
&&
(
key
>=
'A'
&&
key
<=
'Z'
)
this
.
capsTooltip1
=
key
&&
key
.
length
===
1
&&
(
key
>=
'A'
&&
key
<=
'Z'
)
...
@@ -171,9 +198,12 @@ export default {
...
@@ -171,9 +198,12 @@ export default {
verification_key
:
this
.
retrieve_params
.
verification_key
,
verification_key
:
this
.
retrieve_params
.
verification_key
,
password
:
this
.
$Aesencrypt
(
this
.
retrieve_params
.
affirm_password
),
password
:
this
.
$Aesencrypt
(
this
.
retrieve_params
.
affirm_password
),
verification_code
:
this
.
retrieve_params
.
verification_code
,
verification_code
:
this
.
retrieve_params
.
verification_code
,
code
:
this
.
retrieve_params
.
code
,
key
:
this
.
retrieve_params
.
key
,
})
})
console
.
log
(
'要提交的参数'
);
console
.
log
(
'要提交的参数'
);
console
.
log
(
params
);
console
.
log
(
params
);
this
.
getCaptcha_fun
();
email_updata_user_password
(
params
).
then
(
res
=>
{
email_updata_user_password
(
params
).
then
(
res
=>
{
if
(
res
.
err_code
==
200
)
{
if
(
res
.
err_code
==
200
)
{
this
.
$message
.
success
(
'修改成功,即将放回登录页'
)
this
.
$message
.
success
(
'修改成功,即将放回登录页'
)
...
...
src/views/retrieve/components/PhoneRetrieve.vue
浏览文件 @
2c7fd284
...
@@ -25,6 +25,17 @@
...
@@ -25,6 +25,17 @@
</el-col>
</el-col>
</el-row>
</el-row>
</el-form-item>
</el-form-item>
<el-form-item
>
<span>
验证码
</span>
<el-row
style=
"padding-top:10px"
>
<el-col
:span=
"15"
>
<el-input
type=
"text"
v-model=
"retrieve_params.code"
placeholder=
"输入验证码"
></el-input>
</el-col>
<el-col
:span=
"9"
style=
"text-align: right; padding:2px 4px"
>
<img
@
click=
"getCaptcha_fun()"
:loading=
"Captcha_l"
:src=
"retrieve_params.image"
style=
"width: 98%;"
alt=
""
>
</el-col>
</el-row>
</el-form-item>
<el-form-item
prop=
"new_password"
>
<el-form-item
prop=
"new_password"
>
<span>
新密码
</span>
<span>
新密码
</span>
<el-tooltip
v-model=
"capsTooltip1"
content=
"大写锁定打开"
placement=
"right"
manual
>
<el-tooltip
v-model=
"capsTooltip1"
content=
"大写锁定打开"
placement=
"right"
manual
>
...
@@ -61,7 +72,7 @@
...
@@ -61,7 +72,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
get_short_message_code
,
short_message_updata_user_password
}
from
'@/api/user'
;
import
{
get_short_message_code
,
short_message_updata_user_password
,
getCaptcha
}
from
'@/api/user'
;
export
default
{
export
default
{
data
()
{
data
()
{
let
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
let
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
...
@@ -80,7 +91,11 @@ export default {
...
@@ -80,7 +91,11 @@ export default {
verification_code
:
''
,
//短信验证码
verification_code
:
''
,
//短信验证码
new_password
:
''
,
//新密码
new_password
:
''
,
//新密码
affirm_password
:
''
,
//确认密码
affirm_password
:
''
,
//确认密码
code
:
''
,
image
:
''
,
key
:
''
,
},
},
Captcha_l
:
false
,
//表单校验
//表单校验
rules
:
{
rules
:
{
phone
:
[
phone
:
[
...
@@ -112,9 +127,21 @@ export default {
...
@@ -112,9 +127,21 @@ export default {
computed
:
{},
computed
:
{},
mounted
()
{
},
mounted
()
{
this
.
getCaptcha_fun
()
},
methods
:
{
methods
:
{
getCaptcha_fun
(){
this
.
Captcha_l
=
true
getCaptcha
().
then
(
res
=>
{
if
(
res
.
img
){
this
.
retrieve_params
.
image
=
res
.
img
this
.
retrieve_params
.
key
=
res
.
key
this
.
Captcha_l
=
false
}
})
},
checkCapslock1
(
e
)
{
checkCapslock1
(
e
)
{
const
{
key
}
=
e
const
{
key
}
=
e
this
.
capsTooltip1
=
key
&&
key
.
length
===
1
&&
(
key
>=
'A'
&&
key
<=
'Z'
)
this
.
capsTooltip1
=
key
&&
key
.
length
===
1
&&
(
key
>=
'A'
&&
key
<=
'Z'
)
...
@@ -170,9 +197,12 @@ export default {
...
@@ -170,9 +197,12 @@ export default {
verification_key
:
this
.
retrieve_params
.
verification_key
,
verification_key
:
this
.
retrieve_params
.
verification_key
,
password
:
this
.
$Aesencrypt
(
this
.
retrieve_params
.
affirm_password
),
password
:
this
.
$Aesencrypt
(
this
.
retrieve_params
.
affirm_password
),
verification_code
:
this
.
retrieve_params
.
verification_code
,
verification_code
:
this
.
retrieve_params
.
verification_code
,
code
:
this
.
retrieve_params
.
code
,
key
:
this
.
retrieve_params
.
key
,
})
})
console
.
log
(
'要提交的参数'
);
console
.
log
(
'要提交的参数'
);
console
.
log
(
params
);
console
.
log
(
params
);
this
.
getCaptcha_fun
();
short_message_updata_user_password
(
params
).
then
(
res
=>
{
short_message_updata_user_password
(
params
).
then
(
res
=>
{
if
(
res
.
err_code
==
200
)
{
if
(
res
.
err_code
==
200
)
{
this
.
$message
.
success
(
'修改成功,即将放回登录页'
)
this
.
$message
.
success
(
'修改成功,即将放回登录页'
)
...
...
src/views/student/Log/index.vue
0 → 100644
浏览文件 @
2c7fd284
<!--
* @Author: czj
* @Date: 2023-02-28 18:37:15
* @Description:
* @FilePath: \AdministrationHome\src\views\system\log\index.vue
-->
<!-- -->
<
template
>
<div>
<div
class=
"card_container"
>
<el-card
class=
"box-card"
>
<!--
<table-head
:head_data=
"head_data"
@
search=
"searchEvent"
@
resetting=
"resetting"
@
btnClick=
"btnClick"
></table-head>
-->
<div>
<el-row>
<el-col
style=
"padding:5px"
:span=
"6"
><el-input
class=
"search_box"
v-model=
"request_params.username"
:placeholder=
" '搜索用户名称'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input></el-col>
<el-col
style=
"padding:5px"
:span=
"6"
><el-input
class=
"search_box"
v-model=
"request_params.title"
:placeholder=
" '搜索标题'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input></el-col>
<el-col
style=
"padding:5px"
:span=
"6"
><el-input
class=
"search_box"
v-model=
"request_params.intro"
:placeholder=
" '搜索介绍'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input></el-col>
<!--
<el-col
style=
"padding:5px"
:span=
"6"
><el-input
class=
"search_box"
v-model=
"request_params.category"
:placeholder=
" '搜索类别'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input></el-col>
-->
</el-row>
<el-row
>
<el-col
style=
"padding:5px"
:span=
"6"
>
<el-select
v-model=
"request_params.level"
clearable
@
change=
"getSystemLog()"
placeholder=
"搜索日志级别"
style=
"width:100%"
>
<el-option
v-for=
"item in level_options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<!--
<el-input
class=
"search_box"
v-model=
"request_params.level"
:placeholder=
" '搜索日志级别'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input>
-->
</el-col>
<el-col
style=
"padding:5px"
:span=
"6"
><el-input
class=
"search_box"
v-model=
"request_params.type"
:placeholder=
" '搜索操作类型'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input></el-col>
<el-col
style=
"padding:5px"
:span=
"6"
>
<el-date-picker
style=
"width:100%"
clearable
v-model=
"request_params.start_time"
@
change=
"getSystemLog()"
type=
"daterange"
range-separator=
"至"
value-format=
"yyyy-MM-dd"
start-placeholder=
"开始日期"
:default-time=
"['00:00:00', '23:59:59']"
end-placeholder=
"结束日期"
>
</el-date-picker>
<!--
<el-input
class=
"search_box"
v-model=
"request_params.start_time"
:placeholder=
" '搜索开始时间'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input>
-->
</el-col>
<el-col
style=
"padding:5px"
:span=
"6"
>
<el-button
type=
"warning"
size=
"small"
@
click=
"getSystemLog()"
>
搜索
</el-button>
</el-col>
</el-row>
</div>
<div
class=
"table_container"
>
<el-table
v-loading=
"is_loading"
@
sort-change=
"changeSort"
:data=
"tableData"
style=
"width: 100%;margin-bottom: 20px;"
height=
"650"
>
<el-table-column
prop=
"id"
:sortable=
"true"
label=
"序号"
>
</el-table-column>
<el-table-column
prop=
"username"
:sortable=
"true"
label=
"操作人"
>
</el-table-column>
<el-table-column
prop=
"level"
:sortable=
"true"
label=
"日志级别"
></el-table-column>
<el-table-column
prop=
"type"
:sortable=
"true"
label=
"操作类型"
></el-table-column>
<el-table-column
prop=
"title"
:sortable=
"true"
label=
"操作内容"
></el-table-column>
<el-table-column
prop=
"ip"
:sortable=
"true"
label=
"访问IP"
></el-table-column>
<el-table-column
prop=
"intro"
label=
"操作说明"
:show-overflow-tooltip=
'true'
></el-table-column>
<el-table-column
prop=
"created_at"
:sortable=
"true"
label=
"操作时间"
>
</el-table-column>
</el-table>
<div
style=
"text-align: right;"
>
<el-pagination
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"request_params.page"
:page-size=
"request_params.limit"
layout=
"total, prev, pager, next"
:total=
"request_params.total"
>
</el-pagination>
</div>
</div>
</el-card>
</div>
<el-dialog
title=
"提示"
:visible
.
sync=
"is_dialogVisible"
width=
"60%"
:before-close=
"handleClose"
>
<div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitData"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
TableHead
from
'@/components/TableHead/index'
;
import
{
system_log_index
,
search_system_log
}
from
'@/api/system'
;
const
standard_template
=
{
id
:
null
,
father_id
:
-
1
,
//父级id
is_show
:
false
,
//是否展示为菜单
name
:
null
,
//英文名称
name_zh
:
null
,
//中文名称
path
:
null
,
//路由路径
sort
:
null
,
//排序
status
:
1
,
//状态
type
:
1
,
//类型:菜单/按钮
view_path
:
null
,
//视图路径
icon
:
null
,
//图标
}
export
default
{
data
()
{
return
{
//头部按钮
head_data
:
{
is_search_show
:
true
,
// search_placeholder: "学员姓名/手机号",
right_buttons
:
[
{
text
:
'新增'
,
icon
:
'el-icon-document-add'
,
event
:
'add'
,
}
],
},
//初始化请求参数
request_params
:
{
page
:
1
,
limit
:
10
,
total
:
1
,
username
:
''
,
title
:
''
,
intro
:
''
,
category
:
''
,
level
:
''
,
type
:
''
,
start_time
:[],
field
:
'id'
,
order
:
'desc'
,
},
is_loading
:
false
,
tableData
:
[],
is_dialogVisible
:
false
,
is_updata_type
:
'add'
,
level_options
:[
{
value
:
'1'
,
label
:
'1'
},
{
value
:
'2'
,
label
:
'2'
},
{
value
:
'3'
,
label
:
'3'
},
{
value
:
'4'
,
label
:
'4'
},
{
value
:
'5'
,
label
:
'5'
},
]
//
};
},
components
:
{
TableHead
},
computed
:
{},
mounted
()
{
this
.
init
()
},
methods
:
{
changeSort
(
val
)
{
this
.
request_params
.
field
=
val
.
prop
;
//字段
this
.
request_params
.
order
=
val
.
order
==
'ascending'
?
'asc'
:
'desc'
;
//字段
this
.
init
()
},
searchEvent
(
val
)
{
console
.
log
(
'搜索'
);
console
.
log
(
val
);
search_system_log
({
val
:
val
}).
then
(
res
=>
{
console
.
log
(
'搜索'
);
console
.
log
(
res
);
this
.
tableData
=
res
.
data
;
this
.
request_params
.
total
=
res
.
total
;
this
.
is_loading
=
false
;
})
},
resetting
(
val
)
{
console
.
log
(
'重置'
);
console
.
log
(
val
);
search_system_log
({
val
:
val
}).
then
(
res
=>
{
console
.
log
(
'搜索'
);
console
.
log
(
res
);
this
.
tableData
=
res
.
data
;
this
.
request_params
.
total
=
res
.
total
;
this
.
is_loading
=
false
;
})
},
btnClick
(
val
)
{
console
.
log
(
'右侧按钮'
);
console
.
log
(
val
);
},
init
()
{
this
.
getSystemLog
();
},
//获取列表
getSystemLog
()
{
let
params
=
{
...
this
.
request_params
}
this
.
is_loading
=
true
;
system_log_index
(
params
).
then
(
res
=>
{
console
.
log
(
'获取列表'
);
console
.
log
(
res
);
this
.
tableData
=
res
.
data
;
this
.
request_params
.
total
=
res
.
total
;
this
.
is_loading
=
false
;
})
},
//翻页
handleCurrentChange
(
val
)
{
this
.
request_params
.
page
=
val
;
this
.
getSystemLog
();
},
//取消
handleClose
()
{
this
.
is_dialogVisible
=
false
;
},
//提交
submitData
()
{
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/views/student/area_breed/index.vue
浏览文件 @
2c7fd284
...
@@ -387,14 +387,17 @@ export default {
...
@@ -387,14 +387,17 @@ export default {
},
},
//删除烟草信息
//删除烟草信息
deleteTobacco
(
item
)
{
deleteTobacco
(
item
)
{
let
id
=
item
.
id
;
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
delete_tobacco_breed
(
id
).
then
((
res
)
=>
{
delete_tobacco_breed
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
this
.
init
();
...
...
src/views/student/display_board/index.vue
浏览文件 @
2c7fd284
...
@@ -309,14 +309,17 @@ export default {
...
@@ -309,14 +309,17 @@ export default {
},
},
//删除
//删除
deleteInformation
(
item
)
{
deleteInformation
(
item
)
{
let
id
=
item
.
id
;
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
delete_read_over
(
id
).
then
((
res
)
=>
{
delete_read_over
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
this
.
init
();
...
...
src/views/student/examination_questions/detail/index.vue
浏览文件 @
2c7fd284
...
@@ -526,14 +526,17 @@ export default {
...
@@ -526,14 +526,17 @@ export default {
},
},
//删除
//删除
deleteInformation
(
item
)
{
deleteInformation
(
item
)
{
let
id
=
item
.
id
;
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
delete_examination_question_detail
(
id
).
then
((
res
)
=>
{
delete_examination_question_detail
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
this
.
init
();
...
...
src/views/student/examination_questions/list/index.vue
浏览文件 @
2c7fd284
...
@@ -603,14 +603,17 @@ export default {
...
@@ -603,14 +603,17 @@ export default {
},
},
//删除
//删除
deleteInformation
(
item
)
{
deleteInformation
(
item
)
{
let
id
=
item
.
id
;
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'此试题将停止使用, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此试题将停止使用, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
delete_examination_questions
(
id
).
then
((
res
)
=>
{
delete_examination_questions
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
this
.
init
();
...
...
src/views/student/personnel/index.vue
浏览文件 @
2c7fd284
...
@@ -91,8 +91,7 @@
...
@@ -91,8 +91,7 @@
type=
"text"
type=
"text"
style=
"color: #f56c6c"
style=
"color: #f56c6c"
@
click=
"deleteInformation(scope.row)"
@
click=
"deleteInformation(scope.row)"
>
禁用
</el-button
>
禁用
</el-button>
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -296,11 +295,13 @@
...
@@ -296,11 +295,13 @@
<el-button
type=
"primary"
@
click=
"submitData"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitData"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<VerificationPassword
ref=
"VerificationPassword"
></VerificationPassword>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
TableHead
from
'@/components/TableHead/index'
;
import
TableHead
from
'@/components/TableHead/index'
;
import
VerificationPassword
from
'@/components/VerificationPassword/index'
;
import
{
import
{
get_province_list
,
get_province_list
,
get_student_list
,
get_student_list
,
...
@@ -379,7 +380,7 @@ export default {
...
@@ -379,7 +380,7 @@ export default {
};
};
},
},
components
:
{
TableHead
},
components
:
{
TableHead
,
VerificationPassword
},
computed
:
{},
computed
:
{},
...
@@ -418,7 +419,11 @@ export default {
...
@@ -418,7 +419,11 @@ export default {
},
},
//提交
//提交
submitData
()
{
submitData
()
{
let
params
=
this
.
$handleParams
(
this
.
detailed_information
);
let
data
=
{...
this
.
detailed_information
}
data
.
password
=
data
.
password
?
this
.
$Aesencrypt
(
data
.
password
):
null
data
.
phone
=
this
.
$Aesencrypt
(
data
.
phone
)
data
.
idcard
=
this
.
$Aesencrypt
(
data
.
idcard
)
let
params
=
this
.
$handleParams
(
data
);
console
.
log
(
'要提交的数据'
);
console
.
log
(
'要提交的数据'
);
console
.
log
(
params
);
console
.
log
(
params
);
if
(
this
.
is_updata_type
==
'add'
)
{
if
(
this
.
is_updata_type
==
'add'
)
{
...
@@ -485,12 +490,20 @@ export default {
...
@@ -485,12 +490,20 @@ export default {
},
},
//新增信息
//新增信息
addInformation
()
{
addInformation
()
{
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
this
.
is_updata_type
=
'add'
;
this
.
is_updata_type
=
'add'
;
this
.
detailed_information
=
{
...
standard_template
};
this
.
detailed_information
=
{
...
standard_template
};
this
.
is_dialogVisible
=
true
;
this
.
is_dialogVisible
=
true
;
},
},
//修改信息
//修改信息
updateInformation
(
item
)
{
updateInformation
(
item
)
{
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
this
.
is_updata_type
=
'edit'
;
this
.
is_updata_type
=
'edit'
;
let
id
=
item
.
id
;
let
id
=
item
.
id
;
//获取详情
//获取详情
...
@@ -526,14 +539,21 @@ export default {
...
@@ -526,14 +539,21 @@ export default {
},
},
//删除
//删除
deleteInformation
(
item
)
{
deleteInformation
(
item
)
{
let
id
=
item
.
id
;
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'是否禁用此用户?'
,
'提示'
,
{
this
.
$confirm
(
'是否禁用此用户?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
delete_student
(
id
).
then
((
res
)
=>
{
delete_student
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
this
.
init
();
...
...
src/views/student/tobacco_grades/index.vue
浏览文件 @
2c7fd284
...
@@ -329,14 +329,17 @@ export default {
...
@@ -329,14 +329,17 @@ export default {
},
},
//删除
//删除
deleteTobaccoGrades
(
item
)
{
deleteTobaccoGrades
(
item
)
{
let
id
=
item
.
id
;
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
delete_tobacco_grades
(
id
).
then
((
res
)
=>
{
delete_tobacco_grades
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
this
.
init
();
...
...
src/views/system/administrators/index.vue
浏览文件 @
2c7fd284
...
@@ -24,14 +24,12 @@
...
@@ -24,14 +24,12 @@
style=
"width: 100%"
style=
"width: 100%"
height=
"650"
height=
"650"
>
>
<el-table-column
prop=
"id"
label=
"编号"
></el-table-column>
<el-table-column
width=
"80"
prop=
"id"
label=
"序号"
></el-table-column>
<el-table-column
width=
"160"
prop=
"user_code"
label=
"编号"
></el-table-column>
<el-table-column
prop=
"name"
label=
"名称"
></el-table-column>
<el-table-column
prop=
"name"
label=
"名称"
></el-table-column>
<el-table-column
prop=
"email"
label=
"邮箱"
></el-table-column>
<el-table-column
prop=
"email"
label=
"邮箱"
></el-table-column>
<el-table-column
prop=
"phone"
label=
"手机号"
></el-table-column>
<el-table-column
prop=
"phone"
label=
"手机号"
></el-table-column>
<el-table-column
<el-table-column
width=
"160"
prop=
"created_at"
label=
"创建时间"
></el-table-column>
prop=
"created_at"
label=
"创建时间"
></el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
>
<el-table-column
prop=
"status"
label=
"状态"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div>
<div>
...
@@ -50,6 +48,7 @@
...
@@ -50,6 +48,7 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"login_at"
width=
"160"
label=
"上次登录时间"
></el-table-column>
<el-table-column
prop=
"address"
label=
"操作"
>
<el-table-column
prop=
"address"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div>
<div>
...
@@ -133,7 +132,7 @@
...
@@ -133,7 +132,7 @@
:disabled=
"is_type == 'add' ? false : true"
:disabled=
"is_type == 'add' ? false : true"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"手机号"
prop=
"phone"
v-if=
"user_type == 1"
>
<el-form-item
label=
"手机号"
prop=
"phone"
>
<el-input
<el-input
v-model=
"administrators_info.phone"
v-model=
"administrators_info.phone"
placeholder=
"请输入手机号"
placeholder=
"请输入手机号"
...
@@ -171,7 +170,7 @@
...
@@ -171,7 +170,7 @@
<el-radio-group
v-model=
"administrators_info.status"
>
<el-radio-group
v-model=
"administrators_info.status"
>
<el-radio
:label=
"1"
>
正常
</el-radio>
<el-radio
:label=
"1"
>
正常
</el-radio>
<el-radio
:label=
"2"
>
禁止
</el-radio>
<el-radio
:label=
"2"
>
禁止
</el-radio>
<
el-radio
:label=
"3"
>
失效
</el-radio
>
<
!-- <el-radio :label="3">失效</el-radio> --
>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
label=
"角色"
prop=
"password"
>
<el-form-item
label=
"角色"
prop=
"password"
>
...
@@ -197,6 +196,7 @@
...
@@ -197,6 +196,7 @@
<el-button
type=
"primary"
@
click=
"submitInfo"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitInfo"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<VerificationPassword
ref=
"VerificationPassword"
></VerificationPassword>
</div>
</div>
</template>
</template>
...
@@ -215,6 +215,7 @@ import TableHead from '@/components/TableHead/index';
...
@@ -215,6 +215,7 @@ import TableHead from '@/components/TableHead/index';
import
{
get_department_list
}
from
'@/api/system'
;
import
{
get_department_list
}
from
'@/api/system'
;
import
Treeselect
from
'@riophae/vue-treeselect'
;
import
Treeselect
from
'@riophae/vue-treeselect'
;
import
'@riophae/vue-treeselect/dist/vue-treeselect.css'
;
import
'@riophae/vue-treeselect/dist/vue-treeselect.css'
;
import
VerificationPassword
from
'@/components/VerificationPassword/index'
;
const
admin_info
=
{
const
admin_info
=
{
id
:
null
,
id
:
null
,
...
@@ -270,7 +271,7 @@ export default {
...
@@ -270,7 +271,7 @@ export default {
};
};
},
},
components
:
{
TableHead
,
Treeselect
},
components
:
{
TableHead
,
Treeselect
,
VerificationPassword
},
computed
:
{},
computed
:
{},
...
@@ -337,6 +338,10 @@ export default {
...
@@ -337,6 +338,10 @@ export default {
},
},
//新增修改
//新增修改
infoUpdata
(
item
)
{
infoUpdata
(
item
)
{
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
console
.
log
(
item
);
console
.
log
(
item
);
if
(
item
)
{
if
(
item
)
{
//修改
//修改
...
@@ -356,14 +361,21 @@ export default {
...
@@ -356,14 +361,21 @@ export default {
//删除
//删除
deleteAdmin
(
item
)
{
deleteAdmin
(
item
)
{
let
id
=
item
.
id
;
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
delete_administrators
(
id
).
then
((
res
)
=>
{
delete_administrators
(
data
).
then
((
res
)
=>
{
console
.
log
(
'删除回调'
);
console
.
log
(
'删除回调'
);
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
...
@@ -414,7 +426,7 @@ export default {
...
@@ -414,7 +426,7 @@ export default {
name
:
this
.
administrators_info
.
name
,
name
:
this
.
administrators_info
.
name
,
phone
:
this
.
administrators_info
.
phone
,
phone
:
this
.
administrators_info
.
phone
,
email
:
this
.
administrators_info
.
email
,
email
:
this
.
administrators_info
.
email
,
password
:
this
.
administrators_info
.
password
,
password
:
this
.
administrators_info
.
password
?
this
.
$Aesencrypt
(
this
.
administrators_info
.
password
):
null
,
roles
:
this
.
administrators_info
.
role_id
,
roles
:
this
.
administrators_info
.
role_id
,
image
:
this
.
administrators_info
.
image
,
image
:
this
.
administrators_info
.
image
,
status
:
this
.
administrators_info
.
status
,
status
:
this
.
administrators_info
.
status
,
...
@@ -438,8 +450,9 @@ export default {
...
@@ -438,8 +450,9 @@ export default {
//创建老师用户
//创建老师用户
let
temporary
=
{
let
temporary
=
{
name
:
this
.
administrators_info
.
name
,
name
:
this
.
administrators_info
.
name
,
password
:
this
.
administrators_info
.
password
,
password
:
this
.
administrators_info
.
password
?
this
.
$Aesencrypt
(
this
.
administrators_info
.
password
):
null
,
roles
:
this
.
administrators_info
.
role_id
,
roles
:
this
.
administrators_info
.
role_id
,
phone
:
this
.
administrators_info
.
phone
,
department_id
:
this
.
administrators_info
.
department_id
,
department_id
:
this
.
administrators_info
.
department_id
,
};
};
let
temporary_data
=
this
.
$handleParams
(
temporary
);
let
temporary_data
=
this
.
$handleParams
(
temporary
);
...
...
src/views/system/department/index.vue
浏览文件 @
2c7fd284
...
@@ -332,14 +332,17 @@ export default {
...
@@ -332,14 +332,17 @@ export default {
},
},
//删除
//删除
deleteDepartment
(
item
)
{
deleteDepartment
(
item
)
{
let
id
=
item
.
id
;
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
delete_department
(
id
).
then
((
res
)
=>
{
delete_department
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
this
.
init
();
...
...
src/views/system/log/index.vue
浏览文件 @
2c7fd284
...
@@ -9,18 +9,65 @@
...
@@ -9,18 +9,65 @@
<div>
<div>
<div
class=
"card_container"
>
<div
class=
"card_container"
>
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<table-head
:head_data=
"head_data"
@
search=
"searchEvent"
@
resetting=
"resetting"
@
btnClick=
"btnClick"
></table-head>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
label=
"基础日志"
name=
"first"
>
<div>
<el-row>
<el-col
style=
"padding:5px"
:span=
"6"
><el-input
class=
"search_box"
v-model=
"request_params.username"
:placeholder=
" '搜索用户名称'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input></el-col>
<el-col
style=
"padding:5px"
:span=
"6"
><el-input
class=
"search_box"
v-model=
"request_params.title"
:placeholder=
" '搜索标题'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input></el-col>
<el-col
style=
"padding:5px"
:span=
"6"
><el-input
class=
"search_box"
v-model=
"request_params.intro"
:placeholder=
" '搜索介绍'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input></el-col>
<el-col
style=
"padding:5px"
:span=
"6"
>
<el-select
v-model=
"request_params.category"
clearable
@
change=
"getSystemLog()"
placeholder=
"搜索日志类别"
style=
"width:100%"
>
<el-option
v-for=
"item in category_options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<!--
<el-input
class=
"search_box"
v-model=
"request_params.category"
:placeholder=
" '搜索类别'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input>
-->
</el-col>
</el-row>
<el-row
>
<el-col
style=
"padding:5px"
:span=
"6"
>
<el-select
v-model=
"request_params.level"
clearable
@
change=
"getSystemLog()"
placeholder=
"搜索日志级别"
style=
"width:100%"
>
<el-option
v-for=
"item in level_options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<!--
<el-input
class=
"search_box"
v-model=
"request_params.level"
:placeholder=
" '搜索日志级别'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input>
-->
</el-col>
<el-col
style=
"padding:5px"
:span=
"6"
><el-input
class=
"search_box"
v-model=
"request_params.type"
:placeholder=
" '搜索操作类型'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input></el-col>
<el-col
style=
"padding:5px"
:span=
"6"
>
<el-date-picker
style=
"width:100%"
clearable
v-model=
"request_params.start_time"
@
change=
"getSystemLog()"
type=
"daterange"
range-separator=
"至"
value-format=
"yyyy-MM-dd"
start-placeholder=
"开始日期"
:default-time=
"['00:00:00', '23:59:59']"
end-placeholder=
"结束日期"
>
</el-date-picker>
<!--
<el-input
class=
"search_box"
v-model=
"request_params.start_time"
:placeholder=
" '搜索开始时间'"
@
keydown
.
enter
.
native=
"getSystemLog()"
></el-input>
-->
</el-col>
<el-col
style=
"padding:5px"
:span=
"6"
>
<el-button
type=
"warning"
size=
"small"
@
click=
"getSystemLog()"
>
搜索
</el-button>
</el-col>
</el-row>
</div>
<div
class=
"table_container"
>
<div
class=
"table_container"
>
<el-table
v-loading=
"is_loading"
:data=
"tableData"
style=
"width: 100%;margin-bottom: 20px;"
height=
"650"
>
<el-table
v-loading=
"is_loading"
@
sort-change=
"changeSort"
:data=
"tableData"
style=
"width: 100%;margin-bottom: 20px;"
height=
"550"
>
<el-table-column
prop=
"id"
label=
"序号"
>
<el-table-column
prop=
"id"
:sortable=
"true"
label=
"序号"
>
</el-table-column>
<el-table-column
prop=
"username"
label=
"操作人"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"title"
label=
"操作名称
"
>
<el-table-column
prop=
"username"
:sortable=
"true"
label=
"操作人
"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"intro"
label=
"操作内容"
>
<el-table-column
prop=
"category"
:sortable=
"true"
label=
"操作类别"
></el-table-column>
</el-table-column>
<el-table-column
prop=
"level"
:sortable=
"true"
label=
"操作等级"
></el-table-column>
<el-table-column
prop=
"created_at"
label=
"操作时间"
>
<el-table-column
prop=
"type"
:sortable=
"true"
label=
"操作类型"
></el-table-column>
<el-table-column
prop=
"title"
:sortable=
"true"
label=
"操作内容"
></el-table-column>
<el-table-column
prop=
"ip"
:sortable=
"true"
label=
"访问IP"
></el-table-column>
<el-table-column
prop=
"intro"
label=
"操作说明"
:show-overflow-tooltip=
'true'
></el-table-column>
<el-table-column
prop=
"created_at"
:sortable=
"true"
label=
"操作时间"
>
</el-table-column>
</el-table-column>
<!--
<el-table-column
label=
"操作"
width=
"120"
>
<!--
<el-table-column
label=
"操作"
width=
"120"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -34,6 +81,41 @@
...
@@ -34,6 +81,41 @@
</el-pagination>
</el-pagination>
</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane
label=
"数据统计"
name=
"second"
>
<el-row
class=
"row_container"
v-if=
"getStorageSpace_data"
>
<el-col
:span=
"12"
style=
"padding:20px"
>
<p>
数据量统计
</p>
<el-progress
:percentage=
"(getStorageSpace_data.db_num/getStorageSpace_data.num).toFixed(3)*100"
></el-progress>
<p>
{{ getStorageSpace_data.db_num }}/{{ getStorageSpace_data.num }}条
</p>
</el-col>
<el-col
:span=
"12"
style=
"padding:20px"
>
<p>
磁盘统计
</p>
<el-progress
:percentage=
"(getStorageSpace_data.occupy_disk_size_all/getStorageSpace_data.disk_size_all).toFixed(3)*100"
></el-progress>
<p>
{{ getStorageSpace_data.occupy_disk_size_km_all }}/{{ getStorageSpace_data.disk_size_km_all }}
</p>
</el-col>
</el-row>
<el-row
v-if=
"activeName=='second'"
class=
"row_container"
>
<el-col
:span=
"8"
class=
"unit_container"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"category_data"
v-if=
"category_data"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"8"
class=
"unit_container"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"level_data"
v-if=
"level_data"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"8"
class=
"unit_container"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"type_data"
v-if=
"type_data"
>
</AnalyseModule>
</div>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
<!-- <table-head :head_data="head_data" @search="searchEvent" @resetting="resetting" @btnClick="btnClick"></table-head> -->
</el-card>
</el-card>
</div>
</div>
...
@@ -51,7 +133,8 @@
...
@@ -51,7 +133,8 @@
<
script
>
<
script
>
import
TableHead
from
'@/components/TableHead/index'
;
import
TableHead
from
'@/components/TableHead/index'
;
import
{
get_system_log
,
search_system_log
}
from
'@/api/system'
;
import
AnalyseModule
from
'@/components/AnalyseModule/index.vue'
;
import
{
get_system_log
,
search_system_log
,
countlog
,
getStorageSpace
}
from
'@/api/system'
;
const
standard_template
=
{
const
standard_template
=
{
id
:
null
,
id
:
null
,
father_id
:
-
1
,
//父级id
father_id
:
-
1
,
//父级id
...
@@ -80,31 +163,84 @@ export default {
...
@@ -80,31 +163,84 @@ export default {
}
}
],
],
},
},
activeName
:
'first'
,
//初始化请求参数
//初始化请求参数
request_params
:
{
request_params
:
{
page
:
1
,
page
:
1
,
limit
:
10
,
limit
:
10
,
total
:
1
,
total
:
1
,
username
:
''
,
title
:
''
,
intro
:
''
,
category
:
''
,
level
:
''
,
type
:
''
,
start_time
:[],
field
:
'id'
,
order
:
'desc'
,
},
},
is_loading
:
false
,
is_loading
:
false
,
tableData
:
[],
tableData
:
[],
is_dialogVisible
:
false
,
is_dialogVisible
:
false
,
is_updata_type
:
'add'
,
is_updata_type
:
'add'
,
level_options
:[
//
{
value
:
'1'
,
label
:
'1'
},
{
value
:
'2'
,
label
:
'2'
},
{
value
:
'3'
,
label
:
'3'
},
{
value
:
'4'
,
label
:
'4'
},
{
value
:
'5'
,
label
:
'5'
},
],
// 系统事件(system)、业务事件(business)
category_options
:[
{
value
:
'system'
,
label
:
'系统日志'
},
{
value
:
'business'
,
label
:
'业务日志'
},
],
//甩把统计数据
level_data
:
null
,
category_data
:
null
,
type_data
:
null
,
getStorageSpace_data
:
null
,
countlog_data
:{}
};
};
},
},
components
:
{
TableHead
},
components
:
{
TableHead
,
AnalyseModule
},
computed
:
{},
computed
:
{},
mounted
()
{
mounted
()
{
this
.
init
()
this
.
init
()
this
.
countlog_fun
()
this
.
getStorageSpace_fun
()
},
},
methods
:
{
methods
:
{
changeSort
(
val
)
{
this
.
request_params
.
field
=
val
.
prop
;
//字段
this
.
request_params
.
order
=
val
.
order
==
'ascending'
?
'asc'
:
'desc'
;
//字段
this
.
init
()
},
searchEvent
(
val
)
{
searchEvent
(
val
)
{
console
.
log
(
'搜索'
);
console
.
log
(
'搜索'
);
console
.
log
(
val
);
console
.
log
(
val
);
...
@@ -131,15 +267,104 @@ export default {
...
@@ -131,15 +267,104 @@ export default {
console
.
log
(
'右侧按钮'
);
console
.
log
(
'右侧按钮'
);
console
.
log
(
val
);
console
.
log
(
val
);
},
},
getStorageSpace_fun
(){
getStorageSpace
().
then
(
res
=>
{
console
.
log
(
'getStorageSpace'
);
console
.
log
(
res
);
this
.
getStorageSpace_data
=
res
})
},
countlog_fun
(){
countlog
().
then
(
res
=>
{
console
.
log
(
'countlog'
);
console
.
log
(
res
);
this
.
countlog_data
=
res
.
category
if
(
res
.
category
){
let
c
=
{};
for
(
let
i
in
res
.
category
){
c
[
res
.
category
[
i
].
category
]
=
res
.
category
[
i
].
category_count
}
let
keys
=
[
'类别'
];
let
labers
=
[
{
label
:
'系统日志量'
,
key
:
'system'
},
{
label
:
'业务日志量'
,
key
:
"business"
},
];
this
.
category_data
=
{
type
:
'bar'
,
chart_id
:
'breed_bar_chartcategory'
,
image_id
:
'changeBreedScore_bar_chartcategory'
,
color
:
'#39c183f0'
,
title
:
'日志统计'
,
labers
,
keys
,
raw_data
:
{
'类别'
:
c
},
};
}
if
(
res
.
level
){
let
c
=
{};
for
(
let
i
in
res
.
level
){
c
[
res
.
level
[
i
].
level
]
=
res
.
level
[
i
].
level_count
}
let
keys
=
[
'日志级别'
];
let
labers
=
[
{
label
:
'1'
,
key
:
'1'
},
{
label
:
'2'
,
key
:
'2'
},
{
label
:
'3'
,
key
:
'3'
},
{
label
:
'4'
,
key
:
'4'
},
{
label
:
'5'
,
key
:
'5'
},
];
this
.
level_data
=
{
type
:
'bar'
,
chart_id
:
'breed_bar_chartlevel'
,
image_id
:
'changeBreedScore_bar_chartlevel'
,
color
:
'#E6A23C'
,
title
:
'日志级别统计'
,
labers
,
keys
,
raw_data
:
{
'日志级别'
:
c
},
};
}
if
(
res
.
type
){
let
c
=
{};
for
(
let
i
in
res
.
type
){
c
[
res
.
type
[
i
].
type
]
=
res
.
type
[
i
].
type_count
}
let
keys
=
[
'类别'
];
let
labers
=
[
{
label
:
'部门'
,
key
:
'department'
},
{
label
:
'权限'
,
key
:
'jurisdiction'
},
{
label
:
'管理员'
,
key
:
'administrators'
},
{
label
:
'系统'
,
key
:
'system'
},
{
label
:
'菜单'
,
key
:
'Permission'
},
{
label
:
'学员管理'
,
key
:
'Student'
},
{
label
:
'烟草品种'
,
key
:
'Tobacco_breed'
},
{
label
:
'登录'
,
key
:
'login'
},
{
label
:
'烟草等级'
,
key
:
'Tobacco_grades'
},
{
label
:
'试题'
,
key
:
'Examination_questions'
},
{
label
:
'试题预约'
,
key
:
'Test_results'
},
{
label
:
'试题-详情'
,
key
:
'Examination_question_detail'
},
];
this
.
type_data
=
{
type
:
'bar'
,
chart_id
:
'breed_bar_charttype'
,
image_id
:
'changeBreedScore_bar_charttype'
,
color
:
'#505F79'
,
title
:
'类别日志统计'
,
labers
,
keys
,
raw_data
:
{
'类别'
:
c
},
};
}
})
},
init
()
{
init
()
{
this
.
getSystemLog
();
this
.
getSystemLog
();
},
},
//获取列表
//获取列表
getSystemLog
()
{
getSystemLog
()
{
let
params
=
{
let
params
=
{
page
:
this
.
request_params
.
page
,
...
this
.
request_params
limit
:
this
.
request_params
.
limit
}
}
this
.
is_loading
=
true
;
this
.
is_loading
=
true
;
get_system_log
(
params
).
then
(
res
=>
{
get_system_log
(
params
).
then
(
res
=>
{
...
@@ -168,4 +393,12 @@ export default {
...
@@ -168,4 +393,12 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.centenr_container
{
width
:
calc
(
100%
-
20px
);
margin
:
0
auto
;
}
.unit_container
{
margin-bottom
:
15px
;
}
</
style
>
src/views/system/menu/index.vue
浏览文件 @
2c7fd284
...
@@ -134,6 +134,7 @@
...
@@ -134,6 +134,7 @@
<el-button
type=
"primary"
@
click=
"submitData"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitData"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<VerificationPassword
ref=
"VerificationPassword"
></VerificationPassword>
</div>
</div>
</template>
</template>
...
@@ -141,6 +142,7 @@
...
@@ -141,6 +142,7 @@
import
TableHead
from
'@/components/TableHead/index'
;
import
TableHead
from
'@/components/TableHead/index'
;
import
{
get_permission_tree
,
get_permission_btn_menu
,
add_permission_menu
,
delete_permission_menu
,
edit_permission_menu
}
from
'@/api/system'
;
import
{
get_permission_tree
,
get_permission_btn_menu
,
add_permission_menu
,
delete_permission_menu
,
edit_permission_menu
}
from
'@/api/system'
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
VerificationPassword
from
'@/components/VerificationPassword/index'
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
const
standard_template
=
{
const
standard_template
=
{
id
:
null
,
id
:
null
,
...
@@ -184,7 +186,7 @@ export default {
...
@@ -184,7 +186,7 @@ export default {
};
};
},
},
components
:
{
Treeselect
,
TableHead
},
components
:
{
Treeselect
,
TableHead
,
VerificationPassword
},
computed
:
{},
computed
:
{},
...
@@ -255,6 +257,10 @@ export default {
...
@@ -255,6 +257,10 @@ export default {
},
},
//新增
//新增
addMenu
(
item
)
{
addMenu
(
item
)
{
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
this
.
is_updata_type
=
'add'
;
this
.
is_updata_type
=
'add'
;
if
(
item
)
{
//有父级的新增
if
(
item
)
{
//有父级的新增
this
.
menu_info
=
{
...
standard_template
};
this
.
menu_info
=
{
...
standard_template
};
...
@@ -267,6 +273,10 @@ export default {
...
@@ -267,6 +273,10 @@ export default {
},
},
//编辑
//编辑
editMenu
(
item
)
{
editMenu
(
item
)
{
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
this
.
is_updata_type
=
'edit'
;
this
.
is_updata_type
=
'edit'
;
this
.
menu_info
=
{
...
item
};
this
.
menu_info
=
{
...
item
};
this
.
is_dialogVisible
=
true
;
this
.
is_dialogVisible
=
true
;
...
@@ -317,13 +327,20 @@ export default {
...
@@ -317,13 +327,20 @@ export default {
},
},
//删除菜单
//删除菜单
deleteMenu
(
item
)
{
deleteMenu
(
item
)
{
let
id
=
item
.
id
;
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delete_permission_menu
(
id
).
then
(
res
=>
{
delete_permission_menu
(
data
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
this
.
init
();
...
...
src/views/system/roles/index.vue
浏览文件 @
2c7fd284
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
<el-button
v-if=
"scope.row.name!='系统管理员' && scope.row.name!='审计管理员'"
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
style=
"color: #000"
style=
"color: #000"
...
@@ -36,6 +37,7 @@
...
@@ -36,6 +37,7 @@
>
编辑
</el-button
>
编辑
</el-button
>
>
<el-button
<el-button
v-if=
"scope.row.name!='系统管理员' && scope.row.name!='审计管理员'"
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
style=
"color: #f56c6c"
style=
"color: #f56c6c"
...
@@ -108,6 +110,7 @@
...
@@ -108,6 +110,7 @@
<el-button
type=
"primary"
@
click=
"submitData"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitData"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<VerificationPassword
ref=
"VerificationPassword"
></VerificationPassword>
</div>
</div>
</template>
</template>
...
@@ -122,6 +125,7 @@ import {
...
@@ -122,6 +125,7 @@ import {
}
from
'@/api/role'
;
}
from
'@/api/role'
;
import
{
get_permission_btn_menu
}
from
'@/api/system'
;
import
{
get_permission_btn_menu
}
from
'@/api/system'
;
import
{
button_tree_add
,
route_tree_all
}
from
'@/utils/route-handle'
;
import
{
button_tree_add
,
route_tree_all
}
from
'@/utils/route-handle'
;
import
VerificationPassword
from
'@/components/VerificationPassword/index'
;
const
standard_template
=
{
const
standard_template
=
{
id
:
null
,
id
:
null
,
name
:
''
,
name
:
''
,
...
@@ -168,7 +172,7 @@ export default {
...
@@ -168,7 +172,7 @@ export default {
};
};
},
},
components
:
{
TableHead
},
components
:
{
TableHead
,
VerificationPassword
},
computed
:
{},
computed
:
{},
...
@@ -287,12 +291,20 @@ export default {
...
@@ -287,12 +291,20 @@ export default {
},
},
//新增
//新增
addRoles
()
{
addRoles
()
{
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
this
.
is_updata_type
=
'add'
;
this
.
is_updata_type
=
'add'
;
this
.
is_dialogVisible
=
true
;
this
.
is_dialogVisible
=
true
;
this
.
roles_info
=
{
...
standard_template
};
this
.
roles_info
=
{
...
standard_template
};
},
},
//修改
//修改
editRoles
(
item
)
{
editRoles
(
item
)
{
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
this
.
is_updata_type
=
'edit'
;
this
.
is_updata_type
=
'edit'
;
//序号获取详情
//序号获取详情
get_permission_detail
(
item
.
id
).
then
((
res
)
=>
{
get_permission_detail
(
item
.
id
).
then
((
res
)
=>
{
...
@@ -302,14 +314,21 @@ export default {
...
@@ -302,14 +314,21 @@ export default {
},
},
//删除
//删除
deleteRoles
(
item
)
{
deleteRoles
(
item
)
{
let
id
=
item
.
id
;
if
(
!
this
.
$refs
.
VerificationPassword
.
is_password
){
this
.
$refs
.
VerificationPassword
.
show_password
()
return
}
let
data
=
{
id
:
item
.
id
,
sign
:
this
.
$Aesencrypt
(
item
.
id
+
''
),
};
this
.
$confirm
(
'此操作将永久删除该角色, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将永久删除该角色, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
delete_roles
(
id
).
then
((
res
)
=>
{
delete_roles
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
getPermissionList
();
this
.
getPermissionList
();
...
...
src/views/system/setuserinfo.vue
0 → 100644
浏览文件 @
2c7fd284
<!--
* @Author: czj
* @Date: 2023-02-28 18:37:15
* @Description:
* @FilePath: \AdministrationHome\src\views\system\administrators\index.vue
-->
<!-- -->
<
template
>
<div>
<div
class=
"card_container"
>
<el-card
class=
"box-card"
style=
"padding:50px"
>
<div>
<el-row
>
<el-col
:span=
"10"
v-if=
"user_type == 1"
>
<div
class=
"head_container"
>
<el-upload
class=
"avatar-uploader"
:action=
"upload_action"
:show-file-list=
"false"
accept=
"image/png,image/jpeg,image/jpg"
:http-request=
"sliderRequest"
>
<img
v-if=
"administrators_info.image"
:src=
"upload_action + administrators_info.image"
class=
"avatar"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
<div
class=
"prompt_text"
>
只能上传jpg/png文件,且不超过500kb
</div>
</div>
</el-col>
<el-col
:span=
"14"
>
<el-form
:model=
"administrators_info"
:rules=
"info_rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"名称"
prop=
"name"
>
<el-input
v-model=
"administrators_info.name"
placeholder=
"请输入名称"
:disabled=
"true"
></el-input>
</el-form-item>
<el-form-item
label=
"手机号"
prop=
"phone"
>
<el-input
v-model=
"administrators_info.phone"
placeholder=
"请输入手机号"
></el-input>
</el-form-item>
<el-form-item
label=
"邮箱"
prop=
"email"
>
<el-input
v-model=
"administrators_info.email"
placeholder=
"请输入邮箱"
></el-input>
</el-form-item>
<el-form-item
label=
"密码"
prop=
"password"
>
<el-input
v-model=
"administrators_info.password"
placeholder=
"请输入密码"
:type=
"passwordType"
>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-view"
@
click=
"showPwd"
></i>
</el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center;"
>
<el-button
type=
"primary"
style=
"width:300px"
@
click=
"submitInfo"
>
保 存
</el-button>
</div>
</div>
</el-card>
</div>
</div>
</
template
>
<
script
>
import
Treeselect
from
'@riophae/vue-treeselect'
;
import
'@riophae/vue-treeselect/dist/vue-treeselect.css'
;
import
{
upload_head
,}
from
'@/api/system.js'
;
import
{
resetPassword
}
from
'@/api/user.js'
;
const
admin_info
=
{
id
:
null
,
name
:
null
,
phone
:
null
,
email
:
null
,
password
:
null
,
image
:
''
,
};
export
default
{
data
()
{
return
{
is_loading
:
false
,
administrators_list
:
[],
is_dialogVisible
:
false
,
is_type
:
'add'
,
administrators_info
:
{
...
admin_info
},
info_rules
:
{
name
:
[{
required
:
true
,
message
:
'请输入名称'
,
trigger
:
'blur'
}],
// phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
// email: [{ required: true, message: '请输入邮箱', trigger: 'blur' }],
// password: [
// { required: true, message: '请输入密码', trigger: 'blur' },
// ],
},
upload_action
:
`
${
process
.
env
.
VUE_APP_BASE_API
}
`
,
passwordType
:
'password'
,
//输入框的类型,密码框
user_type
:
1
,
//创建用户类型 老师,普通用户
roles_list
:
[],
//树菜单选择
tree_select_list
:
[],
};
},
components
:
{
Treeselect
},
computed
:
{},
mounted
()
{
this
.
getInfo
()
},
methods
:
{
getInfo
(){
this
.
$store
.
dispatch
(
'user/getInfo'
).
then
((
res
)
=>
{
this
.
administrators_info
.
name
=
res
.
name
this
.
administrators_info
.
phone
=
res
.
phone
this
.
administrators_info
.
email
=
res
.
email
this
.
administrators_info
.
image
=
res
.
image
})
},
//密码框和输入框切换
showPwd
()
{
if
(
this
.
passwordType
===
'password'
)
{
this
.
passwordType
=
''
;
}
else
{
this
.
passwordType
=
'password'
;
}
},
//上传
sliderRequest
(
upload
)
{
console
.
log
(
'上传'
);
console
.
log
(
upload
);
const
formData
=
new
FormData
();
formData
.
append
(
'image'
,
upload
.
file
);
upload_head
(
formData
).
then
((
res
)
=>
{
console
.
log
(
'上传回调'
);
console
.
log
(
res
);
if
(
res
.
err_code
==
200
)
{
this
.
administrators_info
.
image
=
res
.
message
;
this
.
$message
.
success
(
'上传成功'
);
}
});
},
//提交
submitInfo
()
{
this
.
$refs
[
'ruleForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
data
=
{
name
:
this
.
administrators_info
.
name
,
phone
:
this
.
administrators_info
.
phone
,
email
:
this
.
administrators_info
.
email
,
password
:
this
.
administrators_info
.
password
?
this
.
$Aesencrypt
(
this
.
administrators_info
.
password
):
null
,
image
:
this
.
administrators_info
.
image
,
};
let
params
=
this
.
$handleParams
(
data
);
let
id
=
this
.
administrators_info
.
id
;
resetPassword
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
getInfo
();
}
});
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
}
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.search_box
{
width
:
200px
;
margin-right
:
15px
;
}
.avatar-uploader
{
display
:
inline-block
;
border
:
1px
dashed
#8c939d
;
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.el-upload
:hover
{
border-color
:
#409eff
;
}
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
148px
;
height
:
148px
;
line-height
:
148px
;
text-align
:
center
;
}
.avatar
{
width
:
148px
;
height
:
148px
;
display
:
block
;
}
}
.head_container
{
text-align
:
center
;
margin
:
30px
0
;
.prompt_text
{
font-size
:
12px
;
color
:
#606266
;
margin-top
:
15px
;
text-align
:
center
;
}
}
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论