Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d8de6238
authored
2023-03-21 16:21:55 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://yun.pashanhoo.com:9090/bdc/bdcjg-web
2 parents
96fb4f91
46a705e8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
80 deletions
src/api/personnelManage.js
src/utils/asyncRouter.js
src/views/system/users/data/index.js
src/views/system/users/edit-dialog.vue
src/views/system/users/index.vue
src/api/personnelManage.js
View file @
d8de623
...
...
@@ -2,7 +2,7 @@
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-03-09 15:24:53
* @LastEditors: xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-03-2
0 09:21:04
* @LastEditTime: 2023-03-2
1 14:59:20
* @FilePath: \上报\bdcjg-web\src\api\personnelManage.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -25,35 +25,19 @@ export const getUserList = (params) => {
}
export
const
getUserLists
=
(
queryParam
)
=>
{
const
conditionGroup
=
{
conditions
:
[{
property
:
'code'
,
value
:
queryParam
.
code
?
queryParam
.
code
:
null
,
operator
:
'LIKE'
},
{
property
:
'name'
,
value
:
queryParam
.
name
?
queryParam
.
name
:
null
,
operator
:
'LIKE'
conditions
:
[],
queryRelation
:
'AND'
,
}
,
{
property
:
'loginName'
,
value
:
queryParam
.
loginName
?
queryParam
.
loginName
:
null
,
console
.
log
(
"queryParam"
,
queryParam
);
for
(
let
key
in
queryParam
)
{
if
(
queryParam
[
key
])
{
conditionGroup
.
conditions
.
push
({
property
:
key
,
value
:
queryParam
[
key
],
operator
:
'LIKE'
},
{
property
:
'organizationId'
,
value
:
queryParam
.
organizationId
,
operator
:
'IN'
})
}
,
{
property
:
'departmentId'
,
value
:
queryParam
.
departmentId
,
operator
:
'IN'
}
],
queryRelation
:
'AND'
,
}
const
params
=
getParams
(
conditionGroup
)
return
getAction
(
api
.
users
,
params
)
...
...
src/utils/asyncRouter.js
View file @
d8de623
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-21 15:41:21
*/
var
Layout
;
// import Layout1 from '@/layout1'
let
ApiUrl
=
localStorage
.
getItem
(
'ApiUrl'
)
if
(
ApiUrl
.
THEME
==
'sb'
)
{
Layout
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
`@/layout1`
)))
}
else
{
Layout
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
`@/layout`
)))
}
export
default
function
filterAsyncRouter
(
routers
)
{
routers
.
forEach
(
item
=>
{
if
(
!
item
.
children
)
{
...
...
src/views/system/users/data/index.js
View file @
d8de623
...
...
@@ -2,7 +2,7 @@
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-01-30 17:59:51
* @LastEditors: xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-03-
08 15:09:15
* @LastEditTime: 2023-03-
21 15:00:39
* @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -29,7 +29,7 @@ class data extends filter {
},
{
prop
:
"departmentName"
,
label
:
"
所属部门
"
label
:
"
组织机构
"
},
{
prop
:
"job_group"
,
...
...
src/views/system/users/edit-dialog.vue
View file @
d8de623
...
...
@@ -61,6 +61,15 @@
</el-row>
<el-row
:gutter=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"组织机构:"
label-width=
"100px"
>
<el-select
class=
"selbig"
v-model=
"form.departmentName"
placeholder=
"组织机构"
>
<el-option
v-for=
"item in districtAreaList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"办公地点:"
label-width=
"100px"
class=
"form-item-mb0"
>
<el-input
v-model=
"form.address"
placeholder=
"办公地点"
/>
</el-form-item>
...
...
@@ -72,7 +81,7 @@
</
template
>
<
script
>
import
{
api
,
httpAction
}
from
'@/api/manageApi'
import
{
api
,
httpAction
,
getAction
}
from
'@/api/manageApi'
export
default
{
name
:
""
,
props
:
{
...
...
@@ -81,6 +90,7 @@
data
()
{
return
{
myValue
:
this
.
value
,
districtAreaList
:
[],
form
:
{
sex
:
"0"
,
},
...
...
@@ -109,7 +119,20 @@
this
.
myValue
=
val
}
},
created
()
{
this
.
getdistricts
()
},
methods
:
{
getdistricts
()
{
getAction
(
api
.
departments
,
{
queryOptions
:
{
orderBys
:
[{
property
:
"sort"
,
direction
:
"desc"
}]
},
}).
then
((
res
)
=>
{
this
.
districtAreaList
=
res
.
content
;
});
},
// 添加人员
adds
()
{
this
.
showLoginName
=
false
...
...
@@ -195,5 +218,8 @@
}
}
}
.selbig
{
width
:
500px
;
}
}
</
style
>
...
...
src/views/system/users/index.vue
View file @
d8de623
...
...
@@ -23,7 +23,7 @@
</el-col>
<!-- 操作按钮 -->
<el-col
:span=
"3"
class=
"btnColRight"
>
<btn
nativeType=
"cx"
@
click=
"
searchQuery
"
>
查询
</btn>
<btn
nativeType=
"cx"
@
click=
"
getTableList
"
>
查询
</btn>
<btn
nativeType=
"cx"
@
click=
"handleAdd"
>
添加人员
</btn>
</el-col>
</el-row>
...
...
@@ -49,7 +49,7 @@
resetPassword
,
getUserList
,
getUserLists
}
from
"@/api/personnelManage"
;
import
{
api
,
deleteAction
}
from
'@/api/manageApi'
import
{
api
,
deleteAction
,
getAction
}
from
'@/api/manageApi'
import
data
from
"./data"
;
import
{
deleteDomStr
}
from
'@/utils/proDomStr'
import
tableMixin
from
"@/mixins/tableMixin.js"
;
...
...
@@ -229,11 +229,8 @@
this
.
$refs
.
dialogForm
.
title
=
"添加"
;
},
// 查询
searchQuery
()
{
console
.
log
(
" console.log(this.form);"
,
this
.
form
);
getTableList
()
{
this
.
queryParam
=
{
organizationId
:
this
.
departmentid
.
organizationId
,
departmentId
:
this
.
departmentid
.
departmentId
,
name
:
this
.
form
.
name
,
code
:
this
.
form
.
code
,
loginName
:
this
.
form
.
loginName
,
...
...
@@ -244,26 +241,65 @@
this
.
loading
=
false
;
this
.
tableData
.
data
=
res
.
content
;
this
.
tableData
.
data
=
judgeSort
(
this
.
tableData
.
data
);
console
.
log
(
"this.tableData.data111111111111111"
,
this
.
tableData
.
data
);
let
arr
=
[]
this
.
tableData
.
data
.
forEach
((
item
)
=>
{
arr
.
push
(
item
.
departmentId
)
})
this
.
getDepts
(
arr
)
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
})
},
getTableList
()
{
this
.
loading
=
true
;
// 获取组织机构
getDepts
(
deptIdArr
)
{
let
params
=
{
queryOptions
:
{
conditionGroup
:
{
conditions
:
[
{
property
:
"id"
,
value
:
deptIdArr
,
operator
:
"IN"
,
},
],
queryRelation
:
"AND"
,
},
orderBys
:
[],
},
};
getAction
(
api
.
departments
,
params
).
then
(
(
res
)
=>
{
let
deptsList
=
res
.
content
;
console
.
log
(
deptsList
);
deptsList
.
forEach
((
ele
)
=>
{
this
.
tableData
.
data
.
forEach
((
item
)
=>
{
if
(
ele
.
id
==
item
.
departmentId
)
{
item
.
departmentName
=
ele
.
name
}
})
})
getUserList
().
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
console
.
log
(
"res人员列表"
,
res
);
this
.
loading
=
false
;
this
.
tableData
.
data
=
res
.
content
;
this
.
tableData
.
data
=
judgeSort
(
this
.
tableData
.
data
);
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
},
(
err
)
=>
{
console
.
log
(
"err :"
,
err
);
}
}
);
);
},
// getTableList () {
// this.loading = true;
// getUserList().then((res) => {
// if (res.status === 1) {
// console.log("res人员列表", res);
// this.loading = false;
// this.tableData.data = res.content;
// this.tableData.data = judgeSort(this.tableData.data);
// } else {
// this.$message.error({ message: res.message, showClose: true });
// }
// });
// },
// 重置用户密码
resetPassword
(
data
)
{
...
...
@@ -328,32 +364,7 @@
}
})
},
getDepts
(
deptIdArr
)
{
let
params
=
{
queryOptions
:
{
conditionGroup
:
{
conditions
:
[
{
property
:
"id"
,
value
:
deptIdArr
,
operator
:
"IN"
,
},
],
queryRelation
:
"AND"
,
},
orderBys
:
[],
},
};
getAction
(
api
.
departments
,
params
).
then
(
(
res
)
=>
{
let
deptsList
=
res
.
content
;
console
.
log
(
deptsList
);
},
(
err
)
=>
{
console
.
log
(
"err :"
,
err
);
}
);
},
// 修改人员信息
handleEdit
(
row
)
{
this
.
isDialog
=
true
...
...
Please
register
or
sign in
to post a comment