Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rongtong-pc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
融通安全管理系统
rongtong-pc
Commits
6d5fceb9
Commit
6d5fceb9
authored
Nov 30, 2023
by
dlkong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户分配岗位
parent
7f934dad
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
219 additions
and
61 deletions
+219
-61
src/api/system/post.js
src/api/system/post.js
+9
-0
src/views/ledger/project/index.vue
src/views/ledger/project/index.vue
+203
-58
src/views/login.vue
src/views/login.vue
+1
-1
vue.config.js
vue.config.js
+6
-2
No files found.
src/api/system/post.js
View file @
6d5fceb9
...
@@ -42,3 +42,12 @@ export function delPost(postId) {
...
@@ -42,3 +42,12 @@ export function delPost(postId) {
method
:
'
delete
'
method
:
'
delete
'
})
})
}
}
// 用户配置岗位保存
export
function
saveUserPost
(
data
)
{
return
request
({
url
:
'
/system/currentProject/save
'
,
method
:
'
post
'
,
data
:
data
})
}
src/views/ledger/project/index.vue
View file @
6d5fceb9
...
@@ -203,6 +203,13 @@
...
@@ -203,6 +203,13 @@
v-hasPermi=
"['system:ledgerProject:remove']"
v-hasPermi=
"['system:ledgerProject:remove']"
>
删除
</el-button
>
删除
</el-button
>
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-setting"
@
click=
"empower(scope.row)"
>
授权
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -216,7 +223,53 @@
...
@@ -216,7 +223,53 @@
/>
/>
<!-- 添加或修改基础数据-项目对话框 -->
<!-- 添加或修改基础数据-项目对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
:width=
"title == '选择用户授权'? '70%' : '500px'"
append-to-body
>
<div
v-if=
"title == '选择用户授权'"
>
<el-form
:model=
"queryUserParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"用户名称"
prop=
"userName"
>
<el-input
v-model=
"queryUserParams.userName"
placeholder=
"请输入用户名称"
clearable
style=
"width: 240px"
@
keyup.enter.native=
"handleUserQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleUserQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetUserQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"userList"
>
<el-table-column
label=
"用户编号"
align=
"center"
key=
"userId"
prop=
"userId"
width=
"80"
/>
<el-table-column
label=
"用户名称"
align=
"center"
key=
"userName"
prop=
"userName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"用户昵称"
align=
"center"
key=
"nickName"
prop=
"nickName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"岗位"
align=
"center"
key=
"postName"
prop=
"postName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"160"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"empowerUser(scope.row)"
>
授权
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"userTotal>0"
:total=
"userTotal"
:page.sync=
"queryUserParams.pageNum"
:limit.sync=
"queryUserParams.pageSize"
@
pagination=
"getUserList"
/>
</div>
<div
v-else
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"84px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"84px"
>
<el-form-item
label=
"项目名称"
prop=
"name"
>
<el-form-item
label=
"项目名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
placeholder=
"请输入项目名称"
/>
<el-input
v-model=
"form.name"
placeholder=
"请输入项目名称"
/>
...
@@ -275,6 +328,18 @@
...
@@ -275,6 +328,18 @@
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</div>
</el-dialog>
<el-dialog
title=
"授权"
:visible.sync=
"powerOpen"
width=
"70%"
append-to-body
>
<div
style=
"min-height:100px;padding-top:10px;"
>
<el-radio-group
v-model=
"userPost"
>
<el-radio
v-for=
"(item, index) in postList"
:key=
"index"
:label=
"item.postId"
>
{{item.postName}}
</el-radio>
</el-radio-group>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitPowerForm"
>
确 定
</el-button>
<el-button
@
click=
"cancelPower"
>
取 消
</el-button>
</div>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -297,6 +362,7 @@ import {
...
@@ -297,6 +362,7 @@ import {
addProject
,
addProject
,
updateProject
,
updateProject
,
}
from
"
@/api/ledger/project/
"
;
}
from
"
@/api/ledger/project/
"
;
import
{
listPost
,
saveUserPost
}
from
"
@/api/system/post
"
;
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
"
;
...
@@ -318,14 +384,18 @@ export default {
...
@@ -318,14 +384,18 @@ export default {
showSearch
:
true
,
showSearch
:
true
,
// 总条数
// 总条数
total
:
0
,
total
:
0
,
userTotal
:
0
,
// 基础数据-项目表格数据
// 基础数据-项目表格数据
projectList
:
[],
projectList
:
[],
// 部门树选项
// 部门树选项
deptOptions
:
undefined
,
deptOptions
:
undefined
,
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
// 用户表格数据
userList
:
null
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
powerOpen
:
false
,
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
...
@@ -338,12 +408,22 @@ export default {
...
@@ -338,12 +408,22 @@ export default {
source
:
null
,
source
:
null
,
status
:
null
,
status
:
null
,
},
},
queryUserParams
:{
pageNum
:
1
,
pageSize
:
10
,
projectId
:
undefined
,
userName
:
undefined
,
},
// 表单参数
// 表单参数
form
:
{
form
:
{
businessStatus
:
""
,
businessStatus
:
""
,
},
},
// 表单校验
// 表单校验
rules
:
{},
rules
:
{},
projectId
:
''
,
userPost
:
null
,
postList
:[],
userInfoData
:{}
};
};
},
},
watch
:
{
watch
:
{
...
@@ -357,6 +437,27 @@ export default {
...
@@ -357,6 +437,27 @@ export default {
this
.
getDeptTree
();
this
.
getDeptTree
();
},
},
methods
:
{
methods
:
{
handleUserQuery
(){
this
.
queryUserParams
.
pageNum
=
1
;
this
.
getUserList
();
},
resetUserQuery
(){
this
.
dateRange
=
[];
this
.
queryUserParams
.
userName
=
undefined
;
this
.
resetForm
(
"
queryUserParams
"
);
this
.
handleUserQuery
();
},
/** 查询用户列表 */
getUserList
()
{
this
.
loading
=
true
;
this
.
queryUserParams
.
projectId
=
this
.
projectId
listUser
(
this
.
addDateRange
(
this
.
queryUserParams
,
this
.
dateRange
)).
then
(
response
=>
{
this
.
userList
=
response
.
rows
;
this
.
userTotal
=
response
.
total
;
this
.
loading
=
false
;
}
);
},
/** 查询基础数据-项目列表 */
/** 查询基础数据-项目列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -472,6 +573,50 @@ export default {
...
@@ -472,6 +573,50 @@ export default {
})
})
.
catch
(()
=>
{});
.
catch
(()
=>
{});
},
},
// 授权
empower
(
row
){
this
.
title
=
"
选择用户授权
"
;
this
.
projectId
=
row
.
id
this
.
getUserList
()
this
.
open
=
true
;
},
// 授权用户
empowerUser
(
row
){
this
.
userInfoData
=
row
this
.
userPost
=
Number
(
row
.
postId
)
this
.
getPostList
()
this
.
powerOpen
=
true
;
},
getPostList
(){
this
.
loading
=
true
;
let
params
=
{
pageNum
:
1
,
pageSize
:
9999
,
postCode
:
'
inspection
'
,
}
listPost
(
params
).
then
(
response
=>
{
this
.
postList
=
response
.
rows
;
this
.
loading
=
false
;
});
},
cancelPower
(){
this
.
powerOpen
=
false
;
this
.
userPost
=
null
},
submitPowerForm
(){
let
params
=
{
id
:
this
.
userInfoData
.
projectUserPostId
,
projectId
:
this
.
projectId
,
userId
:
this
.
userInfoData
.
userId
,
postId
:
this
.
userPost
}
saveUserPost
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
配置成功
"
);
this
.
powerOpen
=
false
;
this
.
userPost
=
null
this
.
getUserList
()
});
},
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
this
.
download
(
this
.
download
(
...
...
src/views/login.vue
View file @
6d5fceb9
...
@@ -112,7 +112,7 @@ export default {
...
@@ -112,7 +112,7 @@ export default {
},
},
loading
:
false
,
loading
:
false
,
// 验证码开关
// 验证码开关
captchaEnabled
:
tru
e
,
captchaEnabled
:
fals
e
,
// 注册开关
// 注册开关
register
:
false
,
register
:
false
,
redirect
:
undefined
,
redirect
:
undefined
,
...
...
vue.config.js
View file @
6d5fceb9
...
@@ -37,8 +37,10 @@ module.exports = {
...
@@ -37,8 +37,10 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
[
process
.
env
.
VUE_APP_BASE_API
]:
{
// target: "http://192.168.10.137:8080/",
// target: "http://192.168.10.137:8080/",
target
:
`http://192.168.4.232:8080`
,
//服务器地址
//
target: `http://192.168.4.232:8080`, //服务器地址
// target: `http://192.168.15.230:8081`, //晓晋本地地址
// target: `http://192.168.15.230:8081`, //晓晋本地地址
// target: `http://192.168.15.152:8081`, //鲍德本地地址
target
:
`http://127.0.0.1:8080`
,
//本地地址
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
[
"
^
"
+
process
.
env
.
VUE_APP_BASE_API
]:
""
,
[
"
^
"
+
process
.
env
.
VUE_APP_BASE_API
]:
""
,
...
@@ -46,8 +48,10 @@ module.exports = {
...
@@ -46,8 +48,10 @@ module.exports = {
},
},
"
/app-api
"
:
{
"
/app-api
"
:
{
// target: "http://192.168.10.137:8080/",
// target: "http://192.168.10.137:8080/",
target
:
`http://192.168.4.232:8080/`
,
//服务器地址
//
target: `http://192.168.4.232:8080/`, //服务器地址
// target: `http://192.168.15.230:8081`, //晓晋本地地址
// target: `http://192.168.15.230:8081`, //晓晋本地地址
// target: `http://192.168.15.152:8081`, //鲍德本地地址
target
:
`http://127.0.0.1:8080`
,
//本地地址
changeOrigin
:
true
,
changeOrigin
:
true
,
},
},
},
},
...
...
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