Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-admin-IM
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-admin-IM
提交
5d34dd3a
提交
5d34dd3a
编写于
3月 19, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
编辑项目完成
上级
fdf66e66
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
175 行增加
和
41 行删除
+175
-41
router.js
src/router/router.js
+0
-4
add-manager.vue
src/views/education/add-manager.vue
+169
-27
slidebar.vue
src/views/layout/slidebar.vue
+0
-5
item-role.vue
src/views/system/item-role.vue
+3
-3
role.vue
src/views/system/role.vue
+3
-2
未找到文件。
src/router/router.js
浏览文件 @
5d34dd3a
...
...
@@ -8,7 +8,6 @@ const createComponent = r => require.ensure([], () => r(require('../views/educat
const
roleManager
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/system/role.vue'
)),
'role'
)
const
addManager
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/education/add-manager.vue'
)),
'add-manager'
)
const
itemRole
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/system/item-role.vue'
)),
'item-role'
)
const
tree
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/education/tree.vue'
)),
'tree'
)
export
default
[{
path
:
'/'
,
...
...
@@ -44,9 +43,6 @@ export default [{
},{
path
:
'/item-role'
,
component
:
itemRole
},{
path
:
'/tree'
,
component
:
tree
},
]
}]
\ No newline at end of file
src/views/education/add-manager.vue
浏览文件 @
5d34dd3a
...
...
@@ -255,9 +255,9 @@
</el-col>
</el-tab-pane>
<el-tab-pane
label=
"设定人员"
name=
"fourth"
>
<el-form
:inline=
"true"
:model=
"formPerson
nel
"
class=
"demo-form-inline"
>
<el-form
:inline=
"true"
:model=
"formPerson"
class=
"demo-form-inline"
>
<el-form-item
label
>
<el-select
size=
"mini"
v-model=
"formPerson
nel
.hospital"
placeholder=
"全部医院"
>
<el-select
size=
"mini"
v-model=
"formPerson.hospital"
placeholder=
"全部医院"
>
<el-option
v-for=
"(item, index) in organizationRank"
:key=
"index"
...
...
@@ -267,7 +267,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-select
size=
"mini"
v-model=
"formPerson
nel
.department"
placeholder=
"全部部门"
>
<el-select
size=
"mini"
v-model=
"formPerson.department"
placeholder=
"全部部门"
>
<el-option
v-for=
"(item, index) in organizationRank"
:key=
"index"
...
...
@@ -315,9 +315,9 @@
background
@
size-change=
"handleSizePerson"
@
current-change=
"handleCurrentPerson"
:current-page=
"formPerson
nel
.pageNum"
:current-page=
"formPerson.pageNum"
:page-sizes=
"[10, 20, 40]"
:page-size=
"formPerson
nel
.pageSize"
:page-size=
"formPerson.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalPerson"
></el-pagination>
...
...
@@ -427,7 +427,7 @@ export default {
curmbSecond
:
"新建项目"
,
//页面展示位置
stepData
:
[
true
,
false
,
false
],
active
:
1
,
active
:
0
,
activeName
:
"first"
,
//基层信息 数据
imageUrl
:
""
,
...
...
@@ -444,6 +444,7 @@ export default {
},
fileList
:
[],
//设定行政范围 数据
allSelectedKeys
:
[],
updatedTree
:
false
,
defaultProps
:
{
children
:
"children"
,
...
...
@@ -495,6 +496,7 @@ export default {
pageSizeOrganization
:
2
,
changedOrganization
:
{},
//设定科室 数据
firstDepartment
:
true
,
formDepartment
:
{
grade
:
""
},
...
...
@@ -503,7 +505,7 @@ export default {
updatedDepartment
:
false
,
changedDepartment
:
{},
//设定人员 数据
formPerson
nel
:
{
formPerson
:
{
hospital
:
""
,
department
:
""
,
pageNum
:
1
,
...
...
@@ -514,7 +516,7 @@ export default {
currentPerson
:
1
,
pageSizePerson
:
2
,
totalPerson
:
10
,
updatedPerson
n
:
false
,
updatedPerson
:
false
,
changedPerson
:
{},
//选择项目组件 数据
optionsComponent
:
[],
...
...
@@ -867,16 +869,30 @@ export default {
}
}
else
if
(
this
.
active
==
1
)
{
let
req
=
{
projectId
:
54
,
setKindOfAdministrative
:
3
,
scopeOfAdministrative
:
"000:2|000_110:1"
,
setKindOfOrganization
:
3
,
scopeOfOrganization
:
"2|3|4|5|6|7"
,
setKindOfDepartment
:
3
,
scopeOfDepartment
:
"54"
,
setKindOfPeople
:
1
,
scopeOfPeople
:
""
projectId
:
this
.
projectId
,
setKindOfAdministrative
:
this
.
getKind
(
"administrative"
)
,
//
scopeOfAdministrative: "000:2|000_110:1",
setKindOfOrganization
:
this
.
getKind
(
"organization"
)
,
//
scopeOfOrganization: "2|3|4|5|6|7",
setKindOfDepartment
:
this
.
getKind
(
"department"
)
,
//
scopeOfDepartment: "54",
setKindOfPeople
:
this
.
getKind
(
"person"
)
//
scopeOfPeople: ""
};
if
(
req
.
setKindOfAdministrative
==
3
)
{
req
.
scopeOfAdministrative
=
this
.
getScope
(
"administrativeUpdate"
);
}
if
(
req
.
setKindOfOrganization
==
2
||
req
.
setKindOfOrganization
==
3
)
{
req
.
scopeOfOrganization
=
this
.
getScopeOrganization
(
req
.
setKindOfOrganization
);
}
if
(
req
.
setKindOfDepartment
==
3
)
{
req
.
scopeOfDepartment
=
this
.
getScopeDepartment
();
}
if
(
req
.
setKindOfPeople
==
2
||
req
.
setKindOfPeople
==
3
)
{
req
.
scopeOfPeople
=
this
.
getScopePeople
(
req
.
setKindOfPeople
);
}
vm
.
POST
(
"scope"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
//移动到选择项目组件
...
...
@@ -1034,8 +1050,11 @@ export default {
//设定机构
this
.
getOrganization
();
}
else
if
(
tabName
==
"third"
)
{
this
.
$refs
.
multipleDepartment
.
toggleAllSelection
();
//设定科室
if
(
this
.
checkTableState
.
multipleDepartment
&&
this
.
firstDepartment
)
{
this
.
$refs
.
multipleDepartment
.
toggleAllSelection
();
this
.
firstDepartment
=
false
;
}
}
else
if
(
tabName
==
"fourth"
)
{
//设定人员
this
.
getPeople
();
...
...
@@ -1084,7 +1103,7 @@ export default {
for
(
let
i
=
0
;
i
<
nodeData
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
allSelectedKeys
.
length
;
j
++
)
{
if
(
allSelectedKeys
[
j
].
type
==
2
&&
allSelectedKeys
[
j
].
type
==
1
&&
nodeData
[
i
].
id
==
allSelectedKeys
[
j
].
key
)
{
let
tagObj
=
{};
...
...
@@ -1163,15 +1182,17 @@ export default {
halfCheckedKeys
=
this
.
$refs
.
tree
.
getHalfCheckedKeys
(),
savedCheckedKeys
=
this
.
handlerCheckedData
(
oldData
,
checkedKeys
).
map
(
key
=>
{
return
{
type
:
2
,
key
:
key
};
return
{
type
:
1
,
key
:
key
};
}
),
savedHalfCheckedKeys
=
halfCheckedKeys
.
map
(
key
=>
{
return
{
type
:
1
,
key
:
key
};
return
{
type
:
2
,
key
:
key
};
}),
allSelectedKeys
=
savedCheckedKeys
.
concat
(
savedHalfCheckedKeys
);
this
.
allSelectedKeys
=
allSelectedKeys
;
this
.
initCheckList
(
allSelectedKeys
);
console
.
log
(
"allSelectedKeys"
,
allSelectedKeys
);
//改变行政范围后,更新设定机构和设定人员
this
.
updateOrganizationAndPerson
(
allSelectedKeys
);
this
.
updatedTree
=
true
;
...
...
@@ -1276,12 +1297,32 @@ export default {
//改变机构 table 的check状态
selectionChangeDepartment
(
val
)
{
this
.
multipleSelectionDepartment
=
val
;
console
.
log
(
this
.
multipleSelectionDepartment
);
//
console.log(this.multipleSelectionDepartment);
},
//改变人员 table的check状态
selectionChangePerson
(
val
)
{
this
.
multipleSelectionPerson
=
val
;
//console.log(this.multipleSelectionPerson);
if
(
val
.
length
!=
0
&&
val
.
length
!=
this
.
formPerson
.
pageSize
&&
this
.
updatedPerson
==
false
)
{
this
.
updatedPerson
=
true
;
console
.
log
(
"人员被更新"
,
this
.
updatedPerson
);
}
if
(
this
.
updatedPerson
==
true
)
{
this
.
changedPerson
[
this
.
formPerson
.
pageNum
]
=
[];
this
.
changedPerson
[
this
.
formPerson
.
pageNum
][
0
]
=
this
.
multipleSelectionPerson
;
let
reverse
=
this
.
getDifference
(
this
.
tablePerson
,
this
.
multipleSelectionPerson
);
this
.
changedPerson
[
this
.
formPerson
.
pageNum
][
1
]
=
reverse
;
console
.
log
(
"check人员:"
,
this
.
changedPerson
);
}
},
//设定机构table全选
checkAll
(
flag
,
name
)
{
...
...
@@ -1305,7 +1346,8 @@ export default {
getKind
(
type
)
{
let
kind
=
0
;
if
(
type
==
"administrative"
)
{
if
(
this
.
updatedTree
)
{
//console.log('this.tagsRegion',this.tagsRegion);
if
(
this
.
tagsRegion
.
length
>
0
)
{
kind
=
3
;
}
}
else
if
(
type
==
"organization"
)
{
...
...
@@ -1330,6 +1372,24 @@ export default {
if
(
this
.
multipleSelectionDepartment
.
length
>
0
)
{
kind
=
3
;
}
}
else
if
(
type
==
"person"
)
{
if
(
this
.
checkTableState
.
multiplePerson
==
true
)
{
//设置机构类别0:无 1:全选 2:去掉 3:选中
kind
=
1
;
for
(
let
key
in
this
.
changedPerson
)
{
if
(
this
.
changedPerson
[
key
][
1
].
length
>
0
)
{
kind
=
2
;
}
}
}
else
{
//全部不选
kind
=
0
;
for
(
let
key
in
this
.
changedPerson
)
{
if
(
this
.
changedPerson
[
key
][
0
].
length
>
0
)
{
kind
=
3
;
}
}
}
}
return
kind
;
},
...
...
@@ -1343,7 +1403,17 @@ export default {
scope
+=
"|"
;
}
}
}
else
if
(
type
==
"administrativeUpdate"
)
{
//console.log("allSelectedKeys", this.allSelectedKeys);
for
(
let
i
=
0
;
i
<
this
.
allSelectedKeys
.
length
;
i
++
)
{
scope
+=
this
.
allSelectedKeys
[
i
].
key
+
":"
+
this
.
allSelectedKeys
[
i
].
type
;
if
(
i
<
this
.
allSelectedKeys
.
length
-
1
)
{
scope
+=
"|"
;
}
}
}
console
.
log
(
scope
);
return
scope
;
},
//查询机构列表
...
...
@@ -1456,6 +1526,29 @@ export default {
console
.
log
(
"scope"
,
scope
);
return
scope
;
},
//获取人员id列表
getScopePeople
(
type
)
{
let
scope
=
""
;
if
(
type
==
2
)
{
for
(
let
key
in
this
.
changedPerson
)
{
let
peopleItem
=
this
.
changedPerson
[
key
][
1
];
//console.log("peopleItem:", peopleItem);
for
(
let
i
=
0
;
i
<
peopleItem
.
length
;
i
++
)
{
scope
+=
peopleItem
[
i
].
id
+
"|"
;
}
}
}
else
if
(
type
==
3
)
{
for
(
let
key
in
this
.
changedPerson
)
{
let
peopleItem
=
this
.
changedPerson
[
key
][
0
];
for
(
let
i
=
0
;
i
<
peopleItem
.
length
;
i
++
)
{
scope
+=
peopleItem
[
i
].
id
+
"|"
;
}
}
}
scope
=
scope
.
substring
(
0
,
scope
.
length
-
1
);
console
.
log
(
"scope people"
,
scope
);
return
scope
;
},
//获取科室列表
getScopeDepartment
()
{
let
scope
=
""
;
...
...
@@ -1475,8 +1568,8 @@ export default {
//scopeOfOrganization: "2|3|4|5|6|7",
setKindOfDepartment
:
this
.
getKind
(
"department"
),
//scopeOfDepartment: 54,
pageNum
:
this
.
formPerson
nel
.
pageNum
,
pageSize
:
this
.
formPerson
nel
.
pageSize
pageNum
:
this
.
formPerson
.
pageNum
,
pageSize
:
this
.
formPerson
.
pageSize
};
if
(
req
.
setKindOfAdministrative
==
3
)
{
req
.
scopeOfAdministrative
=
this
.
getScope
(
"administrative"
);
...
...
@@ -1489,11 +1582,60 @@ export default {
if
(
req
.
setKindOfDepartment
==
3
)
{
req
.
scopeOfDepartment
=
this
.
getScopeDepartment
();
}
openLoading
(
vm
);
vm
.
GET
(
"scope/v1/people"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
closeLoading
(
vm
);
console
.
log
(
res
);
this
.
tablePerson
=
res
.
data
.
people
;
this
.
totalPerson
=
res
.
data
.
total
;
if
(
this
.
checkTableState
.
multiplePerson
==
true
)
{
//全选
if
(
this
.
updatedPerson
==
true
&&
this
.
changedPerson
[
this
.
formPerson
.
pageNum
]
!=
undefined
)
{
//机构table 勾选被更新过
let
rowCheck
=
this
.
changedPerson
[
this
.
formPerson
.
pageNum
][
0
];
//console.log("rowCheck:",rowCheck);
rowCheck
.
forEach
(
row
=>
{
// console.log("row", row);
let
rowItem
=
{};
for
(
let
i
=
0
;
i
<
this
.
tablePerson
.
length
;
i
++
)
{
if
(
this
.
tablePerson
[
i
].
id
==
row
.
id
)
{
rowItem
=
this
.
tablePerson
[
i
];
}
}
this
.
$nextTick
(
function
()
{
this
.
$refs
.
multiplePerson
.
toggleRowSelection
(
rowItem
);
});
});
}
else
{
this
.
$refs
.
multiplePerson
.
toggleAllSelection
();
}
}
else
{
//person 全不选
if
(
this
.
updatedPerson
==
true
&&
this
.
changedPerson
[
this
.
formPerson
.
pageNum
]
!=
undefined
)
{
let
rowCheck
=
this
.
changedPerson
[
this
.
formPerson
.
pageNum
][
0
];
//console.log("rowCheck:",rowCheck);
rowCheck
.
forEach
(
row
=>
{
// console.log("row", row);
let
rowItem
=
{};
for
(
let
i
=
0
;
i
<
this
.
tablePerson
.
length
;
i
++
)
{
if
(
this
.
tablePerson
[
i
].
id
==
row
.
id
)
{
rowItem
=
this
.
tablePerson
[
i
];
}
}
this
.
$nextTick
(
function
()
{
this
.
$refs
.
multiplePerson
.
toggleRowSelection
(
rowItem
);
});
});
}
}
}
});
},
...
...
@@ -1511,11 +1653,11 @@ export default {
//角色table修改
handleSizePerson
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
);
this
.
formPerson
nel
.
pageSize
=
val
;
this
.
formPerson
.
pageSize
=
val
;
},
handleCurrentPerson
(
val
)
{
console
.
log
(
`当前页:
${
val
}
`
);
this
.
formPerson
nel
.
pageNum
=
val
;
this
.
formPerson
.
pageNum
=
val
;
this
.
getPeople
();
},
//行政范围改变更新设定机构和设定人员
...
...
src/views/layout/slidebar.vue
浏览文件 @
5d34dd3a
...
...
@@ -57,11 +57,6 @@ export default {
icon
:
'el-icon-setting'
,
index
:
'item-manager'
},
{
title
:
'树'
,
icon
:
'el-icon-setting'
,
index
:
'tree'
}
]
},{
title
:
'系统管理'
,
...
...
src/views/system/item-role.vue
浏览文件 @
5d34dd3a
...
...
@@ -58,7 +58,6 @@
</el-form>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tableData"
:header-cell-style=
"
{background:'#FAFAFA',color:'#000'}"
>
...
...
@@ -133,6 +132,7 @@
<
script
>
import
BreadCrumb
from
"../../components/breadcrumb.vue"
;
import
{
create
}
from
"domain"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
let
vm
=
null
;
export
default
{
components
:
{
...
...
@@ -203,7 +203,6 @@ export default {
methods
:
{
//查询用户列表
queryRoleList
()
{
this
.
loading
=
true
;
this
.
formInline
.
portalProjectId
=
vm
.
getUrlSearch
(
window
.
location
.
href
,
"portalProjectId"
...
...
@@ -213,11 +212,12 @@ export default {
}
let
req
=
{};
req
=
this
.
formInline
;
openLoading
(
vm
);
vm
.
GET
(
"portalProjectOrRole/queryRoleList"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
closeLoading
(
vm
);
vm
.
tableData
=
res
.
data
.
projectRoleInfoModels
;
vm
.
totalRows
=
res
.
data
.
total
;
this
.
loading
=
false
;
//this.roleList = setRoleList(res.data.roleList);
this
.
organizationList
=
res
.
data
.
organizationList
;
...
...
src/views/system/role.vue
浏览文件 @
5d34dd3a
...
...
@@ -29,7 +29,6 @@
</el-form>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tableData"
:header-cell-style=
"
{background:'#FAFAFA',color:'#000'}"
>
...
...
@@ -68,6 +67,7 @@
<
script
>
import
BreadCrumb
from
"../../components/breadcrumb.vue"
;
import
{
create
}
from
"domain"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
let
vm
=
null
;
export
default
{
components
:
{
...
...
@@ -125,11 +125,12 @@ export default {
let
req
=
{};
console
.
log
(
this
.
formInline
);
req
=
this
.
setParam
(
this
.
formInline
);
openLoading
(
vm
);
vm
.
GET
(
"portalInfo/getProjectList"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
closeLoading
(
vm
);
vm
.
tableData
=
res
.
data
.
data
;
vm
.
totalRows
=
res
.
data
.
totalRows
;
this
.
loading
=
false
;
}
});
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录