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
提交
3de9f712
提交
3de9f712
编写于
6月 17, 2020
作者:
kai.wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增设定机构页面
上级
d3470bf7
变更
4
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
403 行增加
和
13 行删除
+403
-13
organzation.vue
src/components/yqrange/organzation.vue
+388
-0
create-range.vue
src/views/yqrange/create-range.vue
+8
-4
edit-range.vue
src/views/yqrange/edit-range.vue
+1
-0
yq-range.vue
src/views/yqrange/yq-range.vue
+6
-9
未找到文件。
src/components/yqrange/organzation.vue
0 → 100644
浏览文件 @
3de9f712
<
template
>
<el-tabs
v-model=
"activeName"
>
<el-form
:inline=
"true"
:model=
"formOrganization"
class=
"demo-form-inline"
>
<el-form-item
label
>
<el-cascader
size=
"small"
ref=
"cascaderRegion"
:options=
"optionsRegion"
:props=
"props"
v-model=
"formOrganization.administrativeIdList"
@
change=
"handleChangeRegion"
filterable
change-on-select
placeholder=
"请选择地区"
></el-cascader>
</el-form-item>
<el-form-item>
<el-select
size=
"small"
v-model=
"formOrganization.level"
placeholder=
"全部医院级别"
>
<el-option
v-for=
"(item, index) in organizationRank"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label
>
<el-input
style=
"width:140px;"
size=
"small"
v-model=
"formOrganization.name"
placeholder=
"请输入机构名称"
></el-input>
</el-form-item>
<el-form-item>
<el-button
size=
"small"
type=
"primary"
@
click=
"searchOrganization()"
>
搜索
</el-button>
</el-form-item>
<el-form-item>
<el-button
size=
"small"
type=
"primary"
@
click=
"resetOrgOrPerson()"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
class=
"rim"
ref=
"multipleOrganization"
:data=
"tableOrganization"
tooltip-effect=
"dark"
style=
"width: 100%"
@
select-all=
"selectAllOrganization"
@
select=
"selectOrganization"
>
<el-table-column
type=
"selection"
width=
"55"
:selectable=
"selectableTableList"
></el-table-column>
<el-table-column
prop=
"name"
label=
"医院名称"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"hospitalLevelName"
label=
"医院级别"
align=
"center"
></el-table-column>
<el-table-column
prop=
"provinceName"
label=
"所属省份"
align=
"center"
></el-table-column>
<el-table-column
prop=
"cityName"
label=
"所属城市"
align=
"center"
></el-table-column>
<el-table-column
prop=
"countyName"
label=
"所属区县"
align=
"center"
></el-table-column>
<el-table-column
prop=
"townName"
label=
"所属街道"
align=
"center"
></el-table-column>
<div
slot=
"empty"
>
<div
class=
"table-empty"
>
<img
src=
"../../assets/image/no-content1.png"
>
<p>
没有机构信息
</p>
</div>
</div>
</el-table>
<div
class=
"pagination"
>
<el-pagination
background
@
size-change=
"handleSizeOrganization"
@
current-change=
"handleCurrentOrganization"
:current-page=
"formOrganization.pageNum"
:page-sizes=
"[10, 20, 40]"
:page-size=
"formOrganization.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalOrganization"
></el-pagination>
</div>
</el-tabs>
</
template
>
<
script
>
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
*
as
operationData
from
"../../utils/operation"
;
let
vm
=
null
;
export
default
{
name
:
"organzation"
,
props
:
{
formdata
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
data
()
{
return
{
props
:
{
lazy
:
true
,
lazyLoad
(
node
,
resolve
)
{
const
{
level
}
=
node
;
console
.
log
(
"node"
,
node
);
if
(
node
.
level
==
1
)
{
let
req
=
{
provinceId
:
node
.
data
.
value
};
vm
.
GET
(
"basic-data/position/cities"
,
req
).
then
(
res
=>
{
let
newData
=
vm
.
setMoreOption
(
res
.
data
.
cityList
,
"cities"
);
resolve
(
newData
);
});
}
else
if
(
node
.
level
==
2
)
{
let
req
=
{
cityId
:
node
.
data
.
value
};
vm
.
GET
(
"basic-data/position/counties"
,
req
).
then
(
res
=>
{
let
newData
=
vm
.
setMoreOption
(
res
.
data
.
countyList
,
"counties"
);
resolve
(
newData
);
});
}
else
if
(
node
.
level
==
3
)
{
let
req
=
{
countyId
:
node
.
data
.
value
};
vm
.
GET
(
"basic-data/position/towns"
,
req
).
then
(
res
=>
{
let
newData
=
vm
.
setMoreOption
(
res
.
data
.
townList
,
"towns"
);
resolve
(
newData
);
});
}
}
},
administrativeValue
:
""
,
optionsRegion
:
[],
organizationRank
:
[],
tableOrganization
:
new
Array
(),
currentOrganization
:
1
,
totalOrganization
:
10
,
pageSizeOrganization
:
2
,
formOrganization
:
{
name
:
""
,
administrativeId
:
"0"
,
administrativeIdList
:
[
"0"
],
level
:
"-1"
,
chechAll
:
true
,
pageNum
:
1
,
pageSize
:
10
},
}
},
created
()
{
vm
=
this
;
(
this
.
projectId
=
775
);
this
.
initRange
();
//this.editManager();
vm
.
idType
=
localStorage
.
getItem
(
"storageIdType"
);
console
.
log
(
"this.idType:"
+
vm
.
idType
);
},
methods
:
{
initRange
()
{
let
projectId
=
this
.
projectId
;
this
.
getRegionOption
();
this
.
listLevels
();
this
.
getOrganization
();
this
.
activeName
=
"second"
;
this
.
formOrganization
.
pageNum
=
1
;
this
.
formOrganization
.
name
=
""
;
this
.
formOrganization
.
administrativeIdList
=
[
"0"
];
this
.
formOrganization
.
level
=
"-1"
;
},
setMoreOption
(
data
,
type
)
{
let
option
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
let
obj
=
data
[
i
];
if
(
type
==
"cities"
)
{
obj
.
label
=
data
[
i
].
cityName
;
obj
.
value
=
data
[
i
].
cityId
;
}
else
if
(
type
==
"counties"
)
{
obj
.
label
=
data
[
i
].
countyName
;
obj
.
value
=
data
[
i
].
countyId
;
// obj.leaf = true;
}
else
if
(
type
==
"towns"
)
{
obj
.
label
=
data
[
i
].
townName
;
obj
.
value
=
data
[
i
].
townId
;
obj
.
leaf
=
true
;
}
option
.
push
(
obj
);
}
return
option
;
},
//获取地区
getRegionOption
()
{
let
req
=
{};
openLoading
(
vm
);
vm
.
GET
(
"basic-data/position/provinces"
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
if
(
res
.
code
==
"000000"
)
{
vm
.
optionsRegion
=
operationData
.
setRegionOption2
(
res
.
data
.
provinceList
);
}
});
},
//机构table中勾选一个
selectOrganization
(
selection
,
row
)
{
console
.
log
(
"select"
,
selection
,
row
);
let
flag
=
false
;
for
(
let
i
=
0
;
i
<
selection
.
length
;
i
++
)
{
if
(
selection
[
i
].
id
==
row
.
id
)
{
flag
=
true
;
}
}
let
req
=
{
ids
:
[
row
.
id
],
projectId
:
this
.
projectId
,
type
:
flag
===
false
?
0
:
1
};
openLoading
(
vm
);
vm
.
PUT
(
"portal/new/scope/org/v1/organization/option"
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
});
},
//机构table中勾选一排
selectAllOrganization
(
selection
)
{
let
setList
=
[];
let
selectList
=
[];
for
(
let
i
=
0
;
i
<
vm
.
tableOrganization
.
length
;
i
++
)
{
if
(
vm
.
tableOrganization
[
i
].
modifyFlag
==
0
)
{
setList
.
push
(
vm
.
tableOrganization
[
i
].
id
);
}
}
for
(
let
j
=
0
;
j
<
selection
.
length
;
j
++
)
{
selectList
.
push
(
selection
[
j
].
id
);
}
let
intersect
=
operationData
.
getIntersect
(
setList
,
selectList
);
let
typeStatus
=
0
;
if
(
intersect
.
length
>
0
)
{
typeStatus
=
1
;
}
// let = this.$refs.multipleTable.selection
console
.
log
(
selection
,
setList
,
selectList
);
if
(
setList
.
length
>
0
)
{
let
req
=
{
ids
:
setList
,
projectId
:
this
.
projectId
,
type
:
typeStatus
};
openLoading
(
vm
);
vm
.
PUT
(
"portal/new/scope/org/v1/organization/option"
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
});
}
},
selectableTableList
(
row
,
index
)
{
// if (this.status4Flag == 1) {
if
(
row
.
modifyFlag
==
1
)
{
return
false
;
}
return
true
;
// }
// return true;
},
//机构搜索
getOrganizationChoose
()
{
console
.
log
(
'formOrganization'
,
this
.
formOrganization
);
let
administrativeIdItem
=
operationData
.
setAdministrativeId
(
this
.
formOrganization
.
administrativeIdList
);
console
.
log
(
'administrativeIdItem'
,
administrativeIdItem
);
let
req
=
{
projectId
:
775
,
administrativeId
:
administrativeIdItem
,
hospitalLevel
:
this
.
formOrganization
.
level
,
hospitalName
:
this
.
formOrganization
.
name
,
pageNum
:
this
.
formOrganization
.
pageNum
,
pageSize
:
this
.
formOrganization
.
pageSize
,
scope
:
""
};
openLoading
(
vm
);
// vm.POST("portal/scope/v1/organization/choose", req).then(res => {
vm
.
POST
(
"portal/new/scope/org/v1/organization/search"
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
console
.
log
(
res
);
if
(
res
.
code
==
"000000"
)
{
this
.
tableOrganization
=
res
.
data
.
organizationList
;
this
.
totalOrganization
=
res
.
data
.
total
;
vm
.
initOrganizationStatus
();
}
else
{
vm
.
$message
(
res
.
message
);
}
});
},
//查询机构列表
getOrganization
()
{
let
req
=
{
projectId
:
775
,
administrativeId
:
""
,
hospitalLevel
:
""
,
hospitalLevel
:
""
,
scope
:
"000_110"
,
pageNum
:
this
.
formOrganization
.
pageNum
,
pageSize
:
this
.
formOrganization
.
pageSize
};
openLoading
(
vm
);
// vm.POST("portal/scope/v1/organization", req).then(res => {
vm
.
POST
(
"portal/new/scope/org/v1/organization"
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
if
(
res
.
code
==
"000000"
)
{
this
.
tableOrganization
=
res
.
data
.
organizationList
;
this
.
totalOrganization
=
res
.
data
.
total
;
vm
.
initOrganizationStatus
();
}
else
{
vm
.
$message
(
res
.
message
);
}
});
},
//获取医院等级
listLevels
()
{
let
req
=
{};
vm
.
GET
(
"contents/courseDoctor/listLevels?sysCode=10"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
// console.log(res);
this
.
organizationRank
=
operationData
.
getLevelList
(
res
.
data
.
list
);
}
else
{
this
.
organizationRank
=
[
{
id
:
"0"
,
label
:
"全部医院等级"
}
];
}
});
},
//选择搜索机构方式
searchOrganization
()
{
this
.
formOrganization
.
pageNum
=
1
;
let
searchForm
=
this
.
formOrganization
;
if
(
searchForm
.
administrativeId
==
"0"
&&
searchForm
.
administrativeIdList
[
searchForm
.
administrativeIdList
.
length
-
1
]
==
"0"
&&
searchForm
.
level
==
"-1"
&&
searchForm
.
name
==
""
)
{
console
.
log
(
"wei"
)
this
.
searchOrganizationType
=
""
;
this
.
getOrganization
();
}
else
{
console
.
log
(
"choose"
)
this
.
searchOrganizationType
=
"choose"
;
this
.
getOrganizationChoose
();
}
},
initOrganizationStatus
()
{
let
tableStatus
=
this
.
tableOrganization
;
tableStatus
.
forEach
(
row
=>
{
if
(
row
.
status
==
1
)
{
this
.
$nextTick
(
function
()
{
this
.
$refs
.
multipleOrganization
.
toggleRowSelection
(
row
);
});
}
});
},
//重置机构、人员查询
resetOrgOrPerson
()
{
vm
.
formOrganization
.
name
=
""
;
vm
.
formOrganization
.
administrativeId
=
"0"
;
vm
.
formOrganization
.
administrativeIdList
=
[
"0"
];
vm
.
formOrganization
.
level
=
"-1"
;
vm
.
formOrganization
.
pageNum
=
1
;
vm
.
searchOrganization
();
},
getTreeCheck
()
{
//重构归并树
let
checkedTree
=
operationData
.
getSimpleCheckedNodes
(
this
.
$refs
.
tree
.
store
);
let
halfCheckedTree
=
this
.
$refs
.
tree
.
getHalfCheckedKeys
();
let
allSelectedKeys
=
operationData
.
setSelectedKeys
(
checkedTree
,
halfCheckedTree
);
vm
.
allSelectedKeys
=
allSelectedKeys
;
//重构内容
return
allSelectedKeys
;
},
handleChangeRegion
(
value
)
{
let
areaId
=
"000"
;
for
(
let
i
=
0
;
i
<
value
.
length
;
i
++
)
{
areaId
+=
"_"
+
value
[
i
];
}
vm
.
administrativeValue
=
areaId
;
console
.
log
(
value
,
vm
.
administrativeValue
);
},
//机构table修改
handleSizeOrganization
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
);
this
.
formOrganization
.
pageSize
=
val
;
this
.
searchOrganization
();
},
handleCurrentOrganization
(
val
)
{
//console.log(`当前页: ${val}`);
this
.
formOrganization
.
pageNum
=
val
;
if
(
this
.
searchOrganizationType
==
"choose"
)
{
this
.
getOrganizationChoose
();
}
else
{
this
.
getOrganization
();
}
},
returnTypeData
(
name
)
{
this
.
$emit
(
'returnTypeData'
,
{
name
:
name
,
val
:
this
.
formData
[
name
]
})
}
}
}
</
script
>
\ No newline at end of file
src/views/yqrange/create-range.vue
浏览文件 @
3de9f712
...
...
@@ -17,23 +17,27 @@
<el-button
v-if=
"active>=1"
size=
"small"
type=
"primary"
@
click=
"complete"
>
完成
</el-button>
</el-col>
</el-row>
<div
class=
"first-step"
v-if=
"active == 0"
>
<div
class=
"first-step"
v-if=
"active ==
=
0"
>
<p
class=
"p-title"
>
基础信息
</p>
<base-info
:formData=
"formData"
@
returnTypeData=
"returnTypeData"
>
</base-info>
</div>
<div
class=
"second-step"
v-else-if=
"active === 1"
>
<organzation></organzation>
</div>
</div>
</div>
</
template
>
<
script
>
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
BaseInfo
from
'@/components/yqrange/baseinfo.vue'
;
import
Organzation
from
'@/components/yqrange/organzation.vue'
;
export
default
{
name
:
"create-range"
,
components
:
{
BreadCrumb
,
BaseInfo
BaseInfo
,
Organzation
},
data
()
{
return
{
...
...
@@ -67,7 +71,6 @@
console
.
log
(
"add"
);
}
else
{
console
.
log
(
"edit"
);
this
.
stepData
=
[
false
,
true
,
false
];
}
},
...
...
@@ -82,6 +85,7 @@
console
.
log
(
"add"
);
}
else
{
console
.
log
(
"edit"
);
this
.
active
=
1
this
.
stepData
=
[
false
,
true
];
}
},
...
...
src/views/yqrange/edit-range.vue
浏览文件 @
3de9f712
...
...
@@ -511,6 +511,7 @@
this.updatedTree = true;
},
getTreeCheck() {
debugger
//重构归并树
let checkedTree = operationData.getSimpleCheckedNodes(
this.$refs.tree.store
...
...
src/views/yqrange/yq-range.vue
浏览文件 @
3de9f712
...
...
@@ -153,16 +153,13 @@ export default {
},
//编辑
editRange
(
row
)
{
// let enterType = 2;//1:add 2 edit
// this.$router.push({
// path: `/create-range?enterType`,
// query:{
// id:row.id,
// enterType:enterType
// }
// })
let
enterType
=
2
;
//1:add 2 edit
this
.
$router
.
push
({
path
:
'/edit-range'
path
:
`/create-range?enterType`
,
query
:{
id
:
row
.
id
,
enterType
:
enterType
}
})
},
//解散圈子
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录