Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-sensitive-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.foundation.frontend
pica-sensitive-admin
提交
69811ec8
提交
69811ec8
编写于
11月 22, 2019
作者:
chengxiang.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use be-data to show router
上级
ae215edb
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
9 行增加
和
981 行删除
+9
-981
Sidebar.vue
src/components/common/Sidebar.vue
+9
-17
index.js
src/router/index.js
+0
-7
code-library.vue
src/views/code-library/code-library.vue
+0
-507
diagnose-manage.vue
src/views/diagnose-manage/diagnose-manage.vue
+0
-450
未找到文件。
src/components/common/Sidebar.vue
浏览文件 @
69811ec8
...
...
@@ -56,24 +56,16 @@
// console.log("获取菜单成功===========",res);
self
.
items
=
res
.
data
.
data
.
picapMenuModels
;
// 敏感数据查看系统 测试 Start
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
开发前期写死的,后续改成接口获取
self
.
items
=
[{
icon
:
null
,
index
:
"#"
,
subs
:
[
{
icon
:
null
,
index
:
"data-in"
,
title
:
"数据导入"
,
subs
:
[]},
{
icon
:
null
,
index
:
"data-view"
,
title
:
"数据查看"
,
subs
:
[]},
//
self.items = [{
//
icon: null,
//
index: "#",
//
subs: [
//
{icon: null, index: "data-in", title: "数据导入", subs: []},
//
{icon: null, index: "data-view", title: "数据查看", subs: []},
],
title
:
"敏感数据"
,
},{
icon
:
null
,
index
:
"#"
,
subs
:
[
{
icon
:
null
,
index
:
"code-library"
,
title
:
"后台编码库"
,
subs
:
[]},
{
icon
:
null
,
index
:
"diagnose-manage"
,
title
:
"诊断管理"
,
subs
:
[]},
],
title
:
"居民诊断"
,
}]
// ],
// title: "敏感数据",
// }]
// 敏感数据查看系统 测试 End
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
data
));
//通过这个实现深拷贝
...
...
src/router/index.js
浏览文件 @
69811ec8
...
...
@@ -20,13 +20,6 @@ export default new Router({
path
:
'/'
,
redirect
:
'/data-in'
,
},
{
// 后台编码库
path
:
'/code-library'
,
component
:
resolve
=>
require
([
'../views/code-library/code-library.vue'
],
resolve
),
},{
// 常见诊断管理
path
:
'/diagnose-manage'
,
component
:
resolve
=>
require
([
'../views/diagnose-manage/diagnose-manage.vue'
],
resolve
)
},{
// 数据导入
path
:
'/data-in'
,
component
:
resolve
=>
require
([
'../views/sensitive-control/data-in.vue'
],
resolve
),
...
...
src/views/code-library/code-library.vue
已删除
100644 → 0
浏览文件 @
ae215edb
<
template
>
<div
class=
"code-library-wrap"
>
<h2
class=
"top-title"
>
后台编码库
</h2>
<!-- 多个搜索框 -->
<el-row
style=
"margin-top: 20px;"
>
<el-col
:span=
"19"
>
<el-form
:inline=
"true"
ref=
"codeForm"
:model=
"searchParams"
>
<el-form-item
label=
"名称:"
>
<el-input
v-model=
"searchParams.diseaseName"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
<el-form-item
label=
"别名:"
>
<el-input
v-model=
"searchParams.alias"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
<el-form-item
label=
"ICD编码:"
>
<el-input
v-model=
"searchParams.icdCode"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
<el-form-item
label=
"别名是否为空:"
>
<el-select
v-model=
"searchParams.aliasType"
size=
"small"
placeholder=
"请选择"
>
<el-option
v-for=
"item in aliasTypeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</el-col>
<el-col
:span=
"5"
style=
"text-align: right;"
>
<el-button
type=
"primary"
@
click=
"handleGoSearch"
>
搜索
</el-button>
<el-button
type=
"primary"
@
click=
"handleNewAdd"
>
新增
</el-button>
</el-col>
</el-row>
<!-- 表格 -->
<el-table
:data=
"tableData"
border
style=
"width: 100%"
>
<el-table-column
align=
"center"
prop=
"icdCode"
label=
"ICD11编码"
width=
"180"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"diseaseName"
label=
"名称"
width=
"180"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"alias"
label=
"别名"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"modifiedName"
label=
"操作人"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"icdTypeValue"
label=
"类型"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"modifiedTime"
label=
"最近更新"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"address"
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
@
click=
"handleEdit(scope.row)"
type=
"text"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"handleChangeStop(scope.row)"
>
{{
scope
.
row
.
status
==
1
?
'停用'
:
'启用'
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
v-if=
"tableData && tableData.length > 0"
class=
"pagination-style"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:total=
"totalRows"
:current-page=
"searchParams.page"
:page-sizes=
"[15, 30, 50, 100]"
:page-size=
"searchParams.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
>
</el-pagination>
<!-- 新增 弹窗 -->
<el-dialog
v-if=
"addSubmitForm"
:close-on-click-modal=
"false"
:visible
.
sync=
"newVisible"
width=
"700px"
center
>
<!-- <span>需要注意的是内容是默认不居中的</span> -->
<el-form
:inline=
"true"
:rules=
"rules"
ref=
"addSubmitForm"
:model=
"addSubmitForm"
label-width=
"100px"
>
<el-form-item
label=
"名称:"
prop=
"diseaseName"
>
<el-input
v-model=
"addSubmitForm.diseaseName"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
<el-form-item
label=
"ICD编码:"
prop=
"icdCode"
>
<el-input
v-model=
"addSubmitForm.icdCode"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
<el-form-item
label=
"类型:"
prop=
"icdType"
>
<el-select
v-model=
"addSubmitForm.icdType"
placeholder=
"请选择"
size=
"small"
style=
"width: 200px;"
>
<el-option
v-for=
"item in icdTypeList"
:key=
"item.no"
:label=
"item.value"
:value=
"item.no"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"别名:"
prop=
"alias"
>
<el-input
v-model=
"addSubmitForm.alias"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
提 交
</el-button>
</span>
</el-dialog>
<!-- 提交确认 弹窗 -->
<el-dialog
class=
"confirm-add"
:close-on-click-modal=
"false"
:visible
.
sync=
"confirmAddVisible"
width=
"700px"
center
>
<div
class=
"info"
>
<p
class=
"title"
>
名称:
</p>
<p
class=
"value"
>
{{addSubmitForm.diseaseName}}
</p>
</div>
<div
class=
"info name-repeat"
v-if=
"isDiseaseNameRepeat"
>
名称存在重复,请仔细核验!
</div>
<div
class=
"info"
>
<p
class=
"title"
>
ICD编码:
</p>
<p
class=
"value"
>
{{addSubmitForm.icdCode}}
</p>
</div>
<div
class=
"info"
>
<p
class=
"title"
>
类型:
</p>
<p
class=
"value"
>
{{returnICDType(addSubmitForm.icdType)}}
</p>
</div>
<div
class=
"info"
>
<p
class=
"title"
>
别名:
</p>
<p
class=
"value"
>
{{addSubmitForm.alias}}
</p>
</div>
<div
class=
"tips"
>
名称与编码生效后不可修改,请仔细核对
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleBack"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmitConfirm"
>
确 认
</el-button>
</span>
</el-dialog>
<!-- edit 弹窗 -->
<el-dialog
v-if=
"rowData"
class=
"edit-dialog-wrap"
:close-on-click-modal=
"false"
:visible
.
sync=
"editVisible"
width=
"700px"
center
>
<el-form
:inline=
"true"
:model=
"rowData"
label-width=
"100px"
>
<el-form-item
label=
"名称:"
class=
"red-star"
>
<el-input
:disabled=
"true"
v-model=
"rowData.diseaseName"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
<el-form-item
label=
"ICD编码:"
class=
"red-star"
>
<el-input
:disabled=
"true"
v-model=
"rowData.icdCode"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
<el-form-item
label=
"类型:"
class=
"red-star"
>
<el-input
:disabled=
"true"
:value=
"rowData.icdTypeValue"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
<el-form-item
label=
"别名:"
>
<el-input
v-model=
"rowData.alias"
size=
"small"
class=
"input"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleConfirmEdit"
>
确 认
</el-button>
</span>
</el-dialog>
<!-- 停用 启用 弹窗 -->
<el-dialog
:visible
.
sync=
"showStopOrActiveModal"
width=
"300px"
center
>
<span
style=
"letter-spacing: 1px;"
>
请确认是否切换停用/启用状态?
</span>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"showStopOrActiveModal = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"handleFinalConfirmStop"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
openLoading
,
closeLoading
,
}
from
'../../common/utils'
;
export
default
{
data
()
{
return
{
icdTypeList
:
[],
searchParams
:
{
diseaseName
:
''
,
alias
:
''
,
icdCode
:
''
,
aliasType
:
1
,
page
:
1
,
pageSize
:
15
,
},
aliasTypeOptions
:
[{
label
:
'全部'
,
value
:
1
,
},{
label
:
'非空'
,
value
:
2
,
}],
totalRows
:
0
,
currentRowData
:
null
,
showStopOrActiveModal
:
false
,
// 启用停用弹窗
tableData
:
[],
newVisible
:
false
,
// 新增 窗口
editVisible
:
false
,
confirmAddVisible
:
false
,
// 新增的确认 窗口
rowData
:
null
,
addSubmitForm
:
{
diseaseName
:
''
,
icdCode
:
''
,
icdType
:
1
,
alias
:
''
,
},
rules
:
{
diseaseName
:
[
{
required
:
true
,
message
:
'请输入名称'
,
trigger
:
'blur'
},
{
max
:
100
,
message
:
'名称长度限制100个字符以内'
,
trigger
:
'blur'
},
],
icdCode
:
[
{
required
:
true
,
message
:
'请输入ICD编码'
,
trigger
:
'blur'
},
{
max
:
20
,
message
:
'编码长度限制20个字符以内'
,
trigger
:
'blur'
},
],
icdType
:
[
{
required
:
true
,
message
:
'请选择类型'
,
trigger
:
'blur'
},
],
alias
:
[
{
max
:
20
,
message
:
'别名长度限制20个字符以内'
,
trigger
:
'blur'
},
]
},
isDiseaseNameRepeat
:
false
,
}
},
created
()
{
this
.
getList
();
this
.
getIcdType
();
},
methods
:
{
handleSizeChange
(
val
)
{
// 每页多少条 切换
this
.
searchParams
.
pageSize
=
val
;
this
.
getList
();
},
handleCurrentChange
(
val
)
{
// 当前第几页 切换
this
.
searchParams
.
page
=
val
;
this
.
getList
();
},
handleGoSearch
()
{
this
.
searchParams
.
page
=
1
;
this
.
getList
();
},
getList
()
{
let
params
=
this
.
searchParams
;
openLoading
(
this
);
this
.
$axios
.
get
(
localStorage
.
getItem
(
"lectureUrl"
)
+
'/medicineDictionary/icdContents/list'
,
{
params
}
)
.
then
((
res
)
=>
{
closeLoading
(
this
);
// console.log('list @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ', res.data)
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
if
(
data
.
data
.
icdContentsList
&&
data
.
data
.
icdContentsList
.
length
>
0
)
{
this
.
tableData
=
data
.
data
.
icdContentsList
;
// this.tableData.map((item) => {
// item.isEdit = false;
// });
}
else
{
this
.
tableData
=
[];
}
this
.
totalRows
=
data
.
data
.
total
;
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
},
getIcdType
()
{
// http://dev-sc.yunqueyi.com/basic-data/constants?typeCode=P227
openLoading
(
this
);
this
.
$axios
.
get
(
localStorage
.
getItem
(
"lectureUrl"
)
+
'/basic-data/constants?typeCode=P227'
,
{}
)
.
then
((
res
)
=>
{
closeLoading
(
this
);
// console.log('类型》》》》》》》》》》》》》》》》》》 ', res.data)
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
if
(
data
.
data
&&
data
.
data
.
length
>
0
)
{
this
.
icdTypeList
=
data
.
data
;
}
else
{
this
.
icdTypeList
=
[];
}
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
},
returnICDType
(
type
)
{
let
list
=
this
.
icdTypeList
;
if
(
list
&&
list
.
length
>
0
){
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
no
==
type
){
return
list
[
i
].
value
;
}
}
}
else
{
return
''
;
}
},
handleNewAdd
()
{
this
.
newVisible
=
true
;
this
.
$refs
[
'addSubmitForm'
]
&&
this
.
$refs
[
'addSubmitForm'
].
resetFields
();
},
handleSubmit
()
{
this
.
$refs
[
'addSubmitForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
// 验证 pass
// 请求 编码是否重复、名称是否重复接口,
// this.checkRepeat();
openLoading
(
this
);
this
.
$axios
.
get
(
localStorage
.
getItem
(
"lectureUrl"
)
+
`/medicineDictionary/icdContents/check/
${
this
.
addSubmitForm
.
icdCode
}
/
${
this
.
addSubmitForm
.
diseaseName
}
`
,
{}
)
.
then
((
res
)
=>
{
closeLoading
(
this
);
// console.log('校验是否重复 ', res.data)
let
data
=
res
.
data
;
if
(
data
.
code
==
"216003"
)
{
// ICD 编码重复
this
.
$message
({
showClose
:
true
,
message
:
'ICD编码与现有编码重复!请修改后再提交~'
,
type
:
'error'
,
customClass
:
'icd-code-repeat'
});
return
;
}
else
if
(
data
.
code
==
"216005"
){
// ICD 名称重复
this
.
isDiseaseNameRepeat
=
true
;
this
.
confirmAddVisible
=
true
;
}
else
if
(
data
.
code
==
"000000"
){
this
.
isDiseaseNameRepeat
=
false
;
this
.
confirmAddVisible
=
true
;
}
else
{
this
.
isDiseaseNameRepeat
=
false
;
this
.
$message
.
error
(
data
.
message
);
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
}
});
},
handleBack
()
{
this
.
confirmAddVisible
=
false
;
},
// 新增 最终确认
handleSubmitConfirm
()
{
let
data
=
this
.
addSubmitForm
;
let
cb
=
()
=>
{
this
.
confirmAddVisible
=
false
;
this
.
newVisible
=
false
;
this
.
getList
();
};
this
.
addOrEdit
(
data
,
cb
);
},
handleEdit
(
row
)
{
// console.log('row... ', row)
this
.
editVisible
=
true
;
const
{
diseaseName
,
icdCode
,
icdType
,
alias
,
id
,
icdTypeValue
}
=
row
;
let
data
=
{
diseaseName
,
icdCode
,
icdType
,
alias
,
id
,
icdTypeValue
,
};
this
.
rowData
=
data
;
},
handleConfirmEdit
()
{
const
{
diseaseName
,
icdCode
,
icdType
,
alias
,
id
}
=
this
.
rowData
;
let
data
=
{
diseaseName
,
icdCode
,
icdType
,
alias
,
id
,
};
let
cb
=
()
=>
{
this
.
editVisible
=
false
;
this
.
getList
();
}
this
.
addOrEdit
(
data
,
cb
);
},
// 新增或编辑
addOrEdit
(
data
,
cb
){
openLoading
(
this
);
this
.
$axios
.
post
(
localStorage
.
getItem
(
"lectureUrl"
)
+
'/medicineDictionary/icdContents'
,
data
)
.
then
((
res
)
=>
{
closeLoading
(
this
);
// console.log('新增最终结果:', res);
cb
&&
cb
();
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
},
handleChangeStop
(
row
)
{
this
.
showStopOrActiveModal
=
true
;
this
.
currentRowData
=
row
;
},
handleFinalConfirmStop
()
{
let
row
=
this
.
currentRowData
;
let
data
=
{
id
:
row
.
id
,
status
:
row
.
status
==
1
?
2
:
1
,
}
openLoading
(
this
);
this
.
$axios
.
post
(
localStorage
.
getItem
(
"lectureUrl"
)
+
'/medicineDictionary/icdContents/update/status'
,
data
)
.
then
((
res
)
=>
{
this
.
showStopOrActiveModal
=
false
;
closeLoading
(
this
);
// console.log('res>>> ', res.data)
if
(
res
.
data
.
code
==
'000000'
){
this
.
getList
();
// 重新拉去列表
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
},
}
}
</
script
>
<
style
lang=
"less"
>
.code-library-wrap{
.top-title{
color: #333333;
}
.pagination-style{
margin-top: 30px;
float: right;
}
.input{ width: 200px; }
.confirm-add{
.el-dialog__body{
padding: 25px 100px 30px;
.info{
overflow: hidden;
&.name-repeat{
line-height: 30px;
color: red;
}
p{
float: left;
line-height: 30px;
}
.title{ width: 70px; }
.value{
width: 400px;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
}
}
.tips{
text-align: center; color: red; margin-top: 30px;
}
}
}
.edit-dialog-wrap{
.red-star .el-form-item__label::before{
content: '*';
color: #F56C6C;
margin-right: 4px;
}
}
}
.icd-code-repeat{
z-index: 9999 !important;
}
</
style
>
src/views/diagnose-manage/diagnose-manage.vue
已删除
100644 → 0
浏览文件 @
ae215edb
<
template
>
<div
class=
"diagnose-manage-wrap"
>
<h2>
常见诊断
</h2>
<el-row
:gutter=
"30"
style=
"margin-top: 20px;"
>
<el-form
:inline=
"true"
ref=
"searchParam"
:model=
"searchParam"
label-width=
"100px"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"别名:"
>
<el-input
v-model=
"searchParam.alias"
size=
"small"
class=
"input"
clearable
>
</el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
style=
"text-align: right"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"searchHandle"
>
搜索
</el-button>
<el-button
type=
"success"
size=
"small"
@
click=
"addHandle"
>
新增
</el-button>
</el-col>
</el-form>
</el-row>
<el-table
:data=
"tableData"
border
style=
"width: 100%"
>
<el-table-column
prop=
"icdCode"
label=
"ICD11编码"
min-width=
"150"
align=
"center"
></el-table-column>
<el-table-column
prop=
"diseaseName"
label=
"名称"
min-width=
"150"
align=
"center"
></el-table-column>
<el-table-column
label=
"别名"
prop=
"alias"
min-width=
"150"
align=
"center"
></el-table-column>
<el-table-column
prop=
"seqNo"
label=
"排序"
min-width=
"220"
align=
"center"
>
<template
slot-scope=
"scope"
>
<div>
<span
style=
"margin-right:15px;"
>
{{
scope
.
row
.
seqNo
}}
</span>
<el-button
icon=
"el-icon-edit"
size=
"mini"
@
click
.
prevent=
"toEidtSort(scope.row)"
></el-button>
</div>
<!--
<div
v-if=
"!scope.row.isEdit"
>
<span
style=
"margin-right:15px;"
>
{{
scope
.
row
.
seqNo
}}
</span>
<el-button
icon=
"el-icon-edit"
size=
"mini"
@
click
.
prevent=
"toEidtSort(scope.row)"
></el-button>
</div>
<div
v-else
>
<el-input
type=
"text"
size=
"small"
v-model=
"scope.row.sortNoEdit"
minlength=
"1"
maxlength=
"3"
@
keyup
.
native=
"validateNumber(scope.row.sortNoEdit,scope.row)"
style=
"width: 80px"
>
</el-input>
<el-button
size=
"mini"
style=
"margin-left:10px;"
@
click
.
prevent=
"cancelHandle(scope.row)"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent=
"saveHandle(scope.row)"
>
保存
</el-button>
</div>
-->
</
template
>
</el-table-column>
<el-table-column
label=
"最近更新"
min-width=
"150"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
formatDate
(
scope
.
row
.
modifiedTime
)
}}
{{
scope
.
row
.
modifiedName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
fixed=
"right"
align=
"center"
min-width=
"130"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"danger"
size=
"small"
@
click=
"deleteLayout(scope.row)"
>
移除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-row
type=
"flex"
justify=
"end"
style=
"margin-top: 20px;"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"searchParam.page"
:page-sizes=
"[15, 30, 50, 100]"
:page-size=
"searchParam.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalRows"
>
</el-pagination>
</el-row>
<el-dialog
title=
"新增"
:visible
.
sync=
"dialogVisible"
width=
"30%"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
@
close=
"addCancel"
center
>
<el-form
ref=
"addForm"
:model=
"addForm"
label-width=
"70px"
:rules=
"rules"
>
<el-form-item
label=
"别名"
prop=
"alias"
>
<el-select
v-model=
"addForm.alias"
filterable
clearable
style=
"width:80%"
placeholder=
"请选择ICD11编码别名"
>
<el-option
v-for=
"item in aliasList"
:key=
"item.icdCode"
:label=
"item.alias"
:value=
"item.alias"
style=
"max-width: 600px;"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"排序"
>
<el-input
v-model=
"addForm.seqNo"
type=
"text"
class=
"input"
minlength=
"1"
maxlength=
"3"
@
keyup
.
native=
"validateNumber(addForm.seqNo,2)"
clearable
style=
"width:80%"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"addCancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"addConfirm"
>
确 定
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"编辑排序"
:visible
.
sync=
"dialogVisibleEdit"
width=
"450px"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
@
close=
"editCancel"
center
>
<el-form
ref=
"editForm"
:model=
"editForm"
label-width=
"120px"
:rules=
"editRules"
label-suffix=
":"
>
<el-form-item
label=
"别名"
prop=
"alias"
>
<p>
{{editForm.alias}}
</p>
</el-form-item>
<el-form-item
label=
"当前排序"
>
<p>
{{editForm.seqNo}}
</p>
</el-form-item>
<el-form-item
label=
"修改排序"
>
<el-input
v-model=
"editForm.seqNoNew"
type=
"text"
class=
"input"
minlength=
"1"
maxlength=
"3"
@
keyup
.
native=
"validateNumber(editForm.seqNoNew,1)"
clearable
style=
"width:80%"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"editCancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"editConfirm"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
openLoading
,
closeLoading
,
}
from
'../../common/utils'
;
export
default
{
components
:
{},
data
()
{
return
{
searchParam
:
{
alias
:
''
,
page
:
1
,
pageSize
:
15
,
},
addForm
:
{
alias
:
''
,
seqNo
:
null
,
},
tableData
:
[],
totalRows
:
1
,
dialogVisible
:
false
,
aliasList
:
[],
dialogVisibleEdit
:
false
,
editForm
:
{
seqNoNew
:
''
,
},
rules
:
{
alias
:
[{
required
:
true
,
message
:
'请选择别名'
,
trigger
:
'change'
}],
},
editRules
:
{},
}
},
created
()
{
this
.
getCommonList
();
this
.
getAliasList
();
},
methods
:
{
getCommonList
()
{
let
params
=
{
...
this
.
searchParam
,
};
openLoading
(
this
);
this
.
$axios
.
get
(
localStorage
.
getItem
(
"lectureUrl"
)
+
'/medicineDictionary/icdCommonDiagnosis/list'
,
{
params
}
).
then
((
res
)
=>
{
closeLoading
(
this
);
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
if
(
data
.
data
.
icdContentsList
&&
data
.
data
.
icdContentsList
.
length
>
0
)
{
this
.
tableData
=
data
.
data
.
icdContentsList
;
this
.
tableData
.
map
((
item
)
=>
{
item
.
isEdit
=
false
;
});
}
else
{
this
.
tableData
=
[];
}
this
.
totalRows
=
data
.
data
.
total
;
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
},
getAliasList
()
{
openLoading
(
this
);
this
.
$axios
.
get
(
localStorage
.
getItem
(
"lectureUrl"
)
+
'/medicineDictionary/icdContents/alias'
,
).
then
((
res
)
=>
{
closeLoading
(
this
);
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
this
.
aliasList
=
data
.
data
;
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
},
searchHandle
()
{
this
.
searchParam
.
page
=
1
;
this
.
getCommonList
();
},
addHandle
()
{
this
.
dialogVisible
=
true
;
},
deleteLayout
(
row
)
{
let
params
=
{
id
:
row
.
id
}
this
.
$confirm
(
'此操作将移除该常用诊断, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
openLoading
(
this
);
this
.
$axios
.
delete
(
localStorage
.
getItem
(
"lectureUrl"
)
+
'/medicineDictionary/icdCommonDiagnosis/'
,
{
data
:
params
}
).
then
((
res
)
=>
{
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
this
.
$message
.
success
(
'移除成功'
)
this
.
searchParam
.
page
=
1
;
this
.
getCommonList
();
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消移除'
});
});
},
handleSizeChange
(
pageSize
)
{
this
.
searchParam
.
pageSize
=
pageSize
;
this
.
searchParam
.
page
=
1
;
this
.
getCommonList
();
},
handleCurrentChange
(
page
)
{
this
.
searchParam
.
page
=
page
;
this
.
getCommonList
();
},
toEidtSort
(
row
)
{
// row.isEdit = true;
this
.
dialogVisibleEdit
=
true
;
this
.
editForm
=
row
;
},
cancelHandle
(
row
)
{
row
.
isEdit
=
false
;
row
.
sortNoEdit
=
null
;
},
saveHandle
(
row
)
{
let
params
=
{
seqNo
:
row
.
sortNoEdit
,
id
:
row
.
id
,
};
//请求更新排序接口
openLoading
(
this
);
this
.
$axios
.
post
(
localStorage
.
getItem
(
"lectureUrl"
)
+
`/medicineDictionary/icdCommonDiagnosis/update/seqNo`
,
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
row
.
isEdit
=
false
;
row
.
sortNoEdit
=
null
;
this
.
searchParam
.
page
=
1
;
this
.
getCommonList
();
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
}).
catch
((
error
)
=>
{
row
.
isEdit
=
false
;
row
.
sortNoEdit
=
null
;
this
.
$message
.
error
(
'网络出现点问题'
)
})
//接口请求成功后
// row.seqNo = row.sortNoEdit;
},
addCancel
()
{
this
.
dialogVisible
=
false
this
.
$refs
.
addForm
.
resetFields
();
this
.
addForm
.
seqNo
=
null
;
},
addConfirm
()
{
this
.
$refs
[
'addForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
icdCode
;
this
.
aliasList
.
map
((
item
)
=>
{
if
(
item
.
alias
==
this
.
addForm
.
alias
)
{
icdCode
=
item
.
icdCode
;
}
})
let
params
=
{
...
this
.
addForm
,
icdCode
:
icdCode
,
};
//请求接口
openLoading
(
this
);
this
.
$axios
.
post
(
localStorage
.
getItem
(
"lectureUrl"
)
+
'/medicineDictionary/icdCommonDiagnosis'
,
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
this
.
$refs
.
addForm
.
resetFields
();
this
.
addForm
.
seqNo
=
null
;
this
.
dialogVisible
=
false
this
.
$message
.
success
(
'新增成功'
)
this
.
searchParam
.
page
=
1
;
this
.
getCommonList
();
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
}
else
{
// this.$refs.addForm.resetFields()
return
false
;
}
});
},
editCancel
()
{
this
.
dialogVisibleEdit
=
false
;
},
editConfirm
()
{
let
params
=
{
seqNo
:
this
.
editForm
.
seqNoNew
,
id
:
this
.
editForm
.
id
,
};
//请求更新排序接口
openLoading
(
this
);
this
.
$axios
.
post
(
localStorage
.
getItem
(
"lectureUrl"
)
+
`/medicineDictionary/icdCommonDiagnosis/update/seqNo`
,
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
this
.
dialogVisibleEdit
=
false
;
this
.
$message
.
success
(
'修改成功'
)
this
.
searchParam
.
page
=
1
;
this
.
getCommonList
();
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
'网络出现点问题'
)
})
},
validateNumber
(
num
,
pra
)
{
num
=
num
.
replace
(
/
[^\.\d]
/g
,
''
);
num
=
num
.
replace
(
'.'
,
''
);
if
(
num
==
0
)
{
num
=
null
;
}
if
(
pra
===
1
)
{
this
.
editForm
.
seqNoNew
=
num
;
}
else
if
(
pra
===
2
)
{
this
.
addForm
.
seqNo
=
num
;
}
else
{
pra
.
sortNoEdit
=
num
;
}
},
formatDate
(
now
)
{
let
d
=
new
Date
(
now
);
let
year
=
d
.
getFullYear
();
let
month
=
d
.
getMonth
()
+
1
;
let
date
=
d
.
getDate
();
month
=
(
month
<
10
)
?
`0
${
month
}
`
:
month
;
date
=
(
date
<
10
)
?
`0
${
date
}
`
:
date
;
return
year
+
"-"
+
month
+
"-"
+
date
;
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.diagnose-manage-wrap{
color: #333333;
.el-button--mini, .el-button--mini.is-round{
padding: 5px;
}
}
</
style
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录