明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_front
Project
Project
Details
Activity
Releases
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
Administrator
jt_front
Commits
327efb71
Commit
327efb71
authored
Mar 13, 2026
by
zhanghan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3b68760b
Pipeline
#108284
passed with stage
in 20 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
71 deletions
+95
-71
informationConstructionAdd.vue
src/views/everydayPage/informationConstructionAdd.vue
+2
-2
index.vue
src/views/login/index.vue
+20
-21
menuManage.vue
src/views/systemManage/menuManage.vue
+73
-48
No files found.
src/views/everydayPage/informationConstructionAdd.vue
View file @
327efb71
...
...
@@ -25,7 +25,7 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"
文件
类别"
required
>
<el-form-item
label=
"
问题
类别"
required
>
<CommonSelector
v-model=
"formData.issueCategory"
dictName=
"xxhwtlb"
...
...
@@ -80,7 +80,7 @@ const formData = reactive({
wjmc
:
""
,
// 文件名称
bbsj
:
""
,
// 颁布时间
wjcj
:
""
,
// 文件层级
wjlb
:
""
,
//
文件
类别
wjlb
:
""
,
//
问题
类别
fjsc
:
[],
// 附件上传
});
...
...
src/views/login/index.vue
View file @
327efb71
...
...
@@ -12,11 +12,11 @@
labelPosition=
"top"
@
keydown
.
enter=
"handleLogin"
>
<el-form-item
label=
"
用户名
"
prop=
"mobile"
>
<el-form-item
label=
"
手机号
"
prop=
"mobile"
>
<el-input
:prefix-icon=
"User"
v-model=
"loginForm.mobile"
placeholder=
"请输入
用户名
"
placeholder=
"请输入
手机号
"
prefix-icon=
"el-icon-user"
></el-input>
</el-form-item>
...
...
@@ -60,35 +60,34 @@ const loading = ref(false);
// 登录表单数据
const
loginForm
=
ref
({
mobile
:
""
,
password
:
""
password
:
""
,
});
// 表单验证规则
const
loginRules
=
ref
({
mobile
:
[
{
required
:
true
,
message
:
"请输入用户名"
,
trigger
:
"blur"
}
],
password
:
[
{
required
:
true
,
message
:
"请输入密码"
,
trigger
:
"blur"
}
],
mobile
:
[{
required
:
true
,
message
:
"请输入手机号"
,
trigger
:
"blur"
}],
password
:
[{
required
:
true
,
message
:
"请输入密码"
,
trigger
:
"blur"
}],
});
// 处理登录
const
handleLogin
=
async
()
=>
{
loginFormRef
.
value
?.
validate
(
valid
=>
{
loginFormRef
.
value
?.
validate
(
(
valid
)
=>
{
if
(
valid
)
{
proxy
.
$post
({
url
:
"/api/user/login"
,
data
:
{
encryptLogStr
:
CryptoJS
.
AES
.
encrypt
(
`
${
loginForm
.
value
.
mobile
}
,
${
loginForm
.
value
.
password
}
`
,
"GFG5w5AP0Ja2rNaa"
).
toString
()
},
callback
:
(
data
)
=>
{
userStore
.
setUseInfo
(
data
);
router
.
replace
(
"/"
);
}
})
url
:
"/api/user/login"
,
data
:
{
encryptLogStr
:
CryptoJS
.
AES
.
encrypt
(
`
${
loginForm
.
value
.
mobile
}
,
${
loginForm
.
value
.
password
}
`
,
"GFG5w5AP0Ja2rNaa"
,
).
toString
(),
},
callback
:
(
data
)
=>
{
userStore
.
setUseInfo
(
data
);
router
.
replace
(
"/"
);
},
});
}
})
})
;
};
</
script
>
...
...
@@ -136,7 +135,7 @@ const handleLogin = async () => {
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
border-radius: 8px;
:deep(.el-form-item) {
margin-bottom: 1
0
px;
margin-bottom: 1
6
px;
.el-form-item__content {
.el-input {
height: 48px;
...
...
src/views/systemManage/menuManage.vue
View file @
327efb71
...
...
@@ -22,11 +22,29 @@
default-expand-all
>
<template
#
operations=
"
{ row, index }">
<el-button
v-if=
"!row.url"
link
type=
"primary"
size=
"small"
@
click=
"addChildMenu(row, index)"
>
新增子菜单
</el-button>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"handleEdit(row, index)"
>
<el-button
v-if=
"!row.url"
link
type=
"primary"
size=
"small"
@
click=
"addChildMenu(row, index)"
>
新增子菜单
</el-button>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"handleEdit(row, index)"
>
编辑
</el-button>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"handleDelete(row, index)"
>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"handleDelete(row, index)"
>
删除
</el-button>
</
template
>
...
...
@@ -38,26 +56,36 @@
:title=
"dialogTitle"
width=
"500px"
@
close=
"cancelMenuForm"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
>
<el-form
:model=
"menuFormData"
ref=
"menuForm"
:rules=
"menuRules"
label-width=
"100"
>
<el-form-item
label=
"项目名称"
prop=
"name"
>
<el-input
v-model=
"menuFormData.name"
/>
<el-form
:model=
"menuFormData"
ref=
"menuForm"
:rules=
"menuRules"
label-width=
"100"
>
<el-form-item
label=
"菜单名称"
prop=
"name"
>
<el-input
v-model=
"menuFormData.name"
/>
</el-form-item>
<el-form-item
label=
"排序"
>
<el-input-number
v-model=
"menuFormData.order"
:min=
"0"
:precision=
"0"
:max=
"99999999999"
controls-position=
"right"
/>
<el-input-number
v-model=
"menuFormData.order"
:min=
"0"
:precision=
"0"
:max=
"99999999999"
controls-position=
"right"
/>
</el-form-item>
<el-form-item
label=
"路由地址"
>
<el-input
v-model=
"menuFormData.url"
/>
<el-input
v-model=
"menuFormData.url"
/>
</el-form-item>
</el-form>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"cancelMenuForm"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"saveMenuForm"
>
保存
</el-button>
</div>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"cancelMenuForm"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"saveMenuForm"
>
保存
</el-button>
</div>
</
template
>
</el-dialog>
</div>
...
...
@@ -73,9 +101,7 @@ const loading = ref(false);
const
menuForm
=
ref
();
const
menuRules
=
ref
({
name
:
[
{
required
:
true
,
message
:
"请输入菜单名称"
,
trigger
:
"blur"
}
]
name
:
[{
required
:
true
,
message
:
"请输入菜单名称"
,
trigger
:
"blur"
}],
});
// 表格数据
...
...
@@ -99,7 +125,7 @@ const tableColumns = [
width
:
180
,
slot
:
"operations"
,
fixed
:
"right"
,
align
:
"right"
align
:
"right"
,
},
];
// 表格数据
...
...
@@ -134,7 +160,7 @@ const addChildMenu = (row, index) => {
dialogTitle
.
value
=
"新增菜单"
;
menuFormData
.
value
.
parentId
=
row
.
id
;
dialogVisible
.
value
=
true
;
}
}
;
// 编辑
const
handleEdit
=
(
row
,
index
)
=>
{
menuFormData
.
value
=
{
...
row
};
...
...
@@ -144,39 +170,38 @@ const handleEdit = (row, index) => {
// 删除
const
handleDelete
=
async
(
row
,
index
)
=>
{
ElMessageBox
.
confirm
(
`确定删除
${
row
.
name
}
?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
}).
then
(()
=>
{
proxy
.
$post
({
url
:
"/api/user/menu/deleteMenu"
,
data
:
{
id
:
row
.
id
},
callback
:
(
data
)
=>
{
ElMessage
.
success
(
"删除成功"
);
loadTableData
();
},
error
:
(
err
)
=>
{
ElMessage
.
error
(
"删除失败:"
,
err
);
},
});
ElMessageBox
.
confirm
(
`确定删除
${
row
.
name
}
?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
}).
then
(()
=>
{
proxy
.
$post
({
url
:
"/api/user/menu/deleteMenu"
,
data
:
{
id
:
row
.
id
},
callback
:
(
data
)
=>
{
ElMessage
.
success
(
"删除成功"
);
loadTableData
();
},
error
:
(
err
)
=>
{
ElMessage
.
error
(
"删除失败:"
,
err
);
},
});
});
};
const
saveMenuForm
=
()
=>
{
menuForm
.
value
.
validate
(
valid
=>
{
menuForm
.
value
.
validate
(
(
valid
)
=>
{
if
(
valid
)
{
let
url
=
menuFormData
.
value
.
id
?
"updateMenu"
:
"createMenu"
let
url
=
menuFormData
.
value
.
id
?
"updateMenu"
:
"createMenu"
;
proxy
.
$post
({
url
:
"/api/user/menu/"
+
url
,
data
:
menuFormData
.
value
,
callback
:
(
data
)
=>
{
ElMessage
.
success
(
dialogTitle
.
value
+
"成功"
);
loadTableData
();
cancelMenuForm
();
}
})
url
:
"/api/user/menu/"
+
url
,
data
:
menuFormData
.
value
,
callback
:
(
data
)
=>
{
ElMessage
.
success
(
dialogTitle
.
value
+
"成功"
);
loadTableData
();
cancelMenuForm
();
},
})
;
}
});
};
...
...
@@ -192,5 +217,5 @@ onMounted(() => {
</
script
>
<
style
scoped
lang=
"less"
>
@import "@/styles/manage.less";
@import "@/styles/manage.less";
</
style
>
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