Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
76d0114f
提交
76d0114f
编写于
3月 27, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix 20:11
上级
887968bc
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
128 行增加
和
33 行删除
+128
-33
operation.js
src/utils/operation.js
+8
-0
add-manager.vue
src/views/education/add-manager.vue
+120
-33
未找到文件。
src/utils/operation.js
浏览文件 @
76d0114f
...
@@ -42,6 +42,10 @@ export function getAdministrative(data) {
...
@@ -42,6 +42,10 @@ export function getAdministrative(data) {
}
}
export
function
getLevelList
(
data
)
{
export
function
getLevelList
(
data
)
{
let
level
=
[];
let
level
=
[];
level
[
0
]
=
{
id
:
'0'
,
label
:
'全部'
,
}
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
let
obj
=
{
let
obj
=
{
id
:
data
[
i
].
no
,
id
:
data
[
i
].
no
,
...
@@ -310,6 +314,10 @@ export function getTreeData(data,tags) {
...
@@ -310,6 +314,10 @@ export function getTreeData(data,tags) {
}
}
export
function
organizationList
(
data
)
{
export
function
organizationList
(
data
)
{
let
list
=
[];
let
list
=
[];
list
[
0
]
=
{
value
:
'0'
,
label
:
'全部'
,
};
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
let
obj
=
{
let
obj
=
{
value
:
data
[
i
].
key
,
value
:
data
[
i
].
key
,
...
...
src/views/education/add-manager.vue
浏览文件 @
76d0114f
...
@@ -237,12 +237,16 @@
...
@@ -237,12 +237,16 @@
<el-tab-pane
label=
"设定机构"
name=
"second"
>
<el-tab-pane
label=
"设定机构"
name=
"second"
>
<el-form
:inline=
"true"
:model=
"formOrganization"
class=
"demo-form-inline"
>
<el-form
:inline=
"true"
:model=
"formOrganization"
class=
"demo-form-inline"
>
<el-form-item
label
>
<el-form-item
label
>
<el-select
size=
"mini"
v-model=
"formOrganization.region"
placeholder=
"全部地区"
>
<el-select
size=
"mini"
v-model=
"formOrganization.administrativeId"
placeholder=
"全部地区"
>
<el-option
<el-option
v-for=
"
(item, index)
in organizationRegion"
v-for=
"
item
in organizationRegion"
:key=
"i
ndex
"
:key=
"i
tem.id
"
:label=
"item.label"
:label=
"item.label"
:value=
"item.
id
"
:value=
"item.
value
"
></el-option>
></el-option>
</el-select>
</el-select>
<!--
<el-cascader
<!--
<el-cascader
...
@@ -253,7 +257,7 @@
...
@@ -253,7 +257,7 @@
></el-cascader>
-->
></el-cascader>
-->
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-select
size=
"mini"
v-model=
"formOrganization.
grade
"
placeholder=
"全部医院级别"
>
<el-select
size=
"mini"
v-model=
"formOrganization.
level
"
placeholder=
"全部医院级别"
>
<el-option
<el-option
v-for=
"(item, index) in organizationRank"
v-for=
"(item, index) in organizationRank"
:key=
"index"
:key=
"index"
...
@@ -266,7 +270,7 @@
...
@@ -266,7 +270,7 @@
<el-input
size=
"mini"
v-model=
"formOrganization.name"
placeholder=
"请输入机构名称"
></el-input>
<el-input
size=
"mini"
v-model=
"formOrganization.name"
placeholder=
"请输入机构名称"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
size=
"small"
type=
"primary"
@
click=
"
get
Organization()"
>
搜索
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"
search
Organization()"
>
搜索
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
style=
"float:right;"
>
<el-form-item
style=
"float:right;"
>
<el-button-group>
<el-button-group>
...
@@ -579,15 +583,15 @@ export default {
...
@@ -579,15 +583,15 @@ export default {
return
row
.
id
;
return
row
.
id
;
},
},
checkTableState
:
{
checkTableState
:
{
multipleOrganization
:
''
,
multipleOrganization
:
""
,
multipleDepartment
:
''
,
multipleDepartment
:
""
,
multiplePerson
:
''
multiplePerson
:
""
},
},
updatedOrganization
:
false
,
updatedOrganization
:
false
,
formOrganization
:
{
formOrganization
:
{
name
:
""
,
name
:
""
,
region
:
[]
,
administrativeId
:
"0"
,
grade
:
"
"
,
level
:
"0
"
,
chechAll
:
true
,
chechAll
:
true
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
pageSize
:
10
...
@@ -600,7 +604,9 @@ export default {
...
@@ -600,7 +604,9 @@ export default {
currentOrganization
:
1
,
currentOrganization
:
1
,
totalOrganization
:
10
,
totalOrganization
:
10
,
pageSizeOrganization
:
2
,
pageSizeOrganization
:
2
,
lookedOrganization
:
[],
changedOrganization
:
[],
changedOrganization
:
[],
changedOrganization2
:
[],
//设定科室 数据
//设定科室 数据
firstDepartment
:
true
,
firstDepartment
:
true
,
formDepartment
:
{
formDepartment
:
{
...
@@ -980,14 +986,6 @@ export default {
...
@@ -980,14 +986,6 @@ export default {
this
.
stepData
=
[
false
,
false
,
true
];
this
.
stepData
=
[
false
,
false
,
true
];
}
}
},
},
//选择范围选中所有table被选中
checkAllTable
()
{
this
.
$nextTick
(
function
()
{
this
.
$refs
.
multipleOrganization
.
toggleAllSelection
();
this
.
$refs
.
multipleDepartment
.
toggleAllSelection
();
this
.
$refs
.
multiplePerson
.
toggleAllSelection
();
});
},
//点击暂存
//点击暂存
storage
()
{
storage
()
{
console
.
log
(
"暂存步骤"
+
(
this
.
active
+
1
));
console
.
log
(
"暂存步骤"
+
(
this
.
active
+
1
));
...
@@ -1641,6 +1639,7 @@ export default {
...
@@ -1641,6 +1639,7 @@ export default {
//改变 设定机构选项
//改变 设定机构选项
selectionChangeOrganization
(
rows
)
{
selectionChangeOrganization
(
rows
)
{
this
.
changedOrganization
=
[];
this
.
changedOrganization
=
[];
this
.
changedOrganization2
=
[];
if
(
rows
)
{
if
(
rows
)
{
rows
.
forEach
(
row
=>
{
rows
.
forEach
(
row
=>
{
if
(
row
)
{
if
(
row
)
{
...
@@ -1648,7 +1647,16 @@ export default {
...
@@ -1648,7 +1647,16 @@ export default {
}
}
});
});
}
}
console
.
log
(
this
.
changedOrganization
);
this
.
changedOrganization2
=
operationData
.
getDifference
(
this
.
lookedOrganization
,
this
.
changedOrganization
);
console
.
log
(
"选"
,
this
.
changedOrganization
,
"没"
,
this
.
changedOrganization2
);
},
},
//改变机构 table 的check状态
//改变机构 table 的check状态
selectionChangeDepartment
(
val
)
{
selectionChangeDepartment
(
val
)
{
...
@@ -1671,20 +1679,31 @@ export default {
...
@@ -1671,20 +1679,31 @@ export default {
checkAll
(
flag
,
name
)
{
checkAll
(
flag
,
name
)
{
//console.log(flag + " " + name);
//console.log(flag + " " + name);
if
(
name
==
"multipleOrganization"
)
{
if
(
name
==
"multipleOrganization"
)
{
//机构
this
.
changedOrganization
=
[];
this
.
changedOrganization
=
[];
if
(
flag
===
true
)
{
let
checkItem
=
this
.
checkTableState
[
name
];
if
(
checkItem
!==
true
)
{
console
.
log
(
this
.
tableOrganization
);
this
.
checkTableState
[
name
]
=
true
;
}
}
else
{
this
.
$refs
[
name
].
clearSelection
();
this
.
checkTableState
[
name
]
=
false
;
}
}
else
if
(
name
==
"multiplePerson"
)
{
}
else
if
(
name
==
"multiplePerson"
)
{
//人员
this
.
changedPerson
=
[];
this
.
changedPerson
=
[];
}
if
(
flag
===
true
)
{
if
(
flag
===
true
)
{
let
checkItem
=
this
.
checkTableState
[
name
];
console
.
log
(
'flag'
,
flag
,
'name'
,
name
);
if
(
checkItem
!==
true
)
{
if
(
this
.
checkTableState
[
name
]
===
false
)
{
this
.
$refs
[
name
].
toggleAllSelection
();
//console.log('flag',flag,'name',name);
this
.
checkTableState
[
name
]
=
true
;
this
.
$refs
[
name
].
toggleAllSelection
();
}
this
.
checkTableState
[
name
]
=
true
;
}
else
{
this
.
$refs
[
name
].
clearSelection
();
this
.
checkTableState
[
name
]
=
false
;
}
}
}
else
{
this
.
$refs
[
name
].
clearSelection
();
this
.
checkTableState
[
name
]
=
false
;
}
}
},
},
//获取用户类型
//获取用户类型
...
@@ -1778,6 +1797,45 @@ export default {
...
@@ -1778,6 +1797,45 @@ export default {
}
}
});
});
},
},
//选择搜索机构方式
searchOrganization
()
{
let
searchForm
=
this
.
formOrganization
;
if
(
searchForm
.
administrativeId
==
"0"
&&
searchForm
.
level
==
"0"
&&
searchForm
.
name
==
""
)
{
this
.
getOrganization
();
}
else
{
this
.
getOrganizationChoose
();
}
},
//机构搜索
getOrganizationChoose
()
{
// console.log('formOrganization',this.formOrganization);
let
req
=
{
projectId
:
this
.
projectId
,
setKind
:
this
.
getKind
(
"administrative"
),
// scope: "000_110",
administrativeId
:
this
.
formOrganization
.
administrativeId
,
departmentLevel
:
this
.
formOrganization
.
level
,
organizationName
:
this
.
formOrganization
.
name
,
pageNum
:
this
.
formOrganization
.
pageNum
,
pageSize
:
this
.
formOrganization
.
pageSize
};
if
(
req
.
setKind
==
3
)
{
req
.
scope
=
this
.
getScope
(
"administrative"
);
}
openLoading
(
vm
);
vm
.
POST
(
"portal/scope/v1/organization/choose"
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
console
.
log
(
res
);
if
(
res
.
code
==
"000000"
)
{
this
.
tableOrganization
=
res
.
data
.
organizationList
;
this
.
totalOrganization
=
res
.
data
.
total
;
}
});
},
//查询机构列表
//查询机构列表
getOrganization
()
{
getOrganization
()
{
let
req
=
{
let
req
=
{
...
@@ -1799,9 +1857,20 @@ export default {
...
@@ -1799,9 +1857,20 @@ export default {
this
.
totalOrganization
=
res
.
data
.
total
;
this
.
totalOrganization
=
res
.
data
.
total
;
//console.log("changedOrganization", this.changedOrganization);
//console.log("changedOrganization", this.changedOrganization);
let
idList
=
operationData
.
getIdList
(
this
.
tableOrganization
);
let
idList
=
operationData
.
getIdList
(
this
.
tableOrganization
);
let
intersect
=
operationData
.
getIntersect
(
idList
,
this
.
changedOrganization
);
let
intersect
=
operationData
.
getIntersect
(
if
(
intersect
.
length
==
0
)
{
idList
,
this
.
initOrganizationStatus
();
this
.
changedOrganization
);
this
.
lookedOrganization
=
operationData
.
getUnion
(
this
.
lookedOrganization
,
idList
);
//console.log('全部看过的:',this.lookedOrganization);
if
(
vm
.
checkTableState
.
multipleOrganization
==
""
)
{
if
(
intersect
.
length
==
0
)
{
this
.
initOrganizationStatus
();
}
}
else
if
(
vm
.
checkTableState
.
multipleOrganization
==
true
)
{
}
}
}
}
});
});
...
@@ -1859,6 +1928,16 @@ export default {
...
@@ -1859,6 +1928,16 @@ export default {
scope
=
scope
.
substring
(
0
,
scope
.
length
-
1
);
scope
=
scope
.
substring
(
0
,
scope
.
length
-
1
);
return
scope
;
return
scope
;
},
},
initPeopleStatus
()
{
let
tableStatus
=
this
.
tablePerson
;
tableStatus
.
forEach
(
row
=>
{
if
(
row
.
status
==
1
)
{
this
.
$nextTick
(
function
()
{
this
.
$refs
.
multiplePerson
.
toggleRowSelection
(
row
);
});
}
});
},
//查询人员列表
//查询人员列表
getPeople
()
{
getPeople
()
{
let
req
=
{
let
req
=
{
...
@@ -1891,6 +1970,14 @@ export default {
...
@@ -1891,6 +1970,14 @@ export default {
this
.
tablePerson
=
res
.
data
.
people
;
this
.
tablePerson
=
res
.
data
.
people
;
this
.
totalPerson
=
res
.
data
.
total
;
this
.
totalPerson
=
res
.
data
.
total
;
let
idList
=
operationData
.
getIdList
(
this
.
tablePerson
);
let
intersect
=
operationData
.
getIntersect
(
idList
,
this
.
changedPerson
);
if
(
intersect
.
length
==
0
)
{
this
.
initPeopleStatus
();
}
}
}
});
});
},
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录