Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-composition-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宁路鹏
vue-composition-api
Commits
9c1ea2ce
Commit
9c1ea2ce
authored
Mar 07, 2023
by
tangyufeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iconfont.css
parent
08b47a3e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
381 additions
and
239 deletions
+381
-239
src/styles/media/components/outClinicalpathway.scss
+32
-4
src/utils/http.js
+47
-31
src/views/Entrypath.vue
+18
-92
src/views/outClinicalpathway.vue
+284
-112
No files found.
src/styles/media/components/outClinicalpathway.scss
View file @
9c1ea2ce
@import
"../../mixin.scss"
;
// 1024
@media
screen
and
(
min-width
:
769px
)
and
(
max-width
:
1024px
)
{
.outClinicalpathway
{
...
...
@@ -19,11 +20,13 @@
width
:
50%
!
important
;
}
}
&
_t2
{
span
{
width
:
50%
!
important
;
}
}
&
_t3
{
width
:
20%
!
important
;
...
...
@@ -31,6 +34,7 @@
width
:
50%
!
important
;
}
}
&
_t4
{
width
:
30%
!
important
;
...
...
@@ -40,16 +44,19 @@
}
}
}
&
_right
{
height
:
50%
!
important
;
width
:
100%
!
important
;
justify-content
:
flex-end
!
important
;
}
}
&
_table
{
&
_left
{
width
:
20%
!
important
;
}
&
_right
{
width
:
79%
!
important
;
}
...
...
@@ -77,11 +84,13 @@
width
:
50%
!
important
;
}
}
&
_t2
{
span
{
width
:
50%
!
important
;
}
}
&
_t3
{
width
:
20%
!
important
;
...
...
@@ -89,6 +98,7 @@
width
:
50%
!
important
;
}
}
&
_t4
{
width
:
30%
!
important
;
...
...
@@ -98,18 +108,21 @@
}
}
}
&
_right
{
height
:
50%
!
important
;
width
:
100%
!
important
;
justify-content
:
flex-end
!
important
;
}
}
&
_table
{
&
_left
{
width
:
20%
!
important
;
}
&
_right
{
width
:
79
%
!
important
;
width
:
100
%
!
important
;
}
}
}
...
...
@@ -126,11 +139,13 @@
width
:
60%
!
important
;
}
}
&
_t2
{
span
{
width
:
60%
!
important
;
}
}
&
_t3
{
width
:
20%
!
important
;
...
...
@@ -138,6 +153,7 @@
width
:
60%
!
important
;
}
}
&
_t4
{
width
:
28%
!
important
;
...
...
@@ -148,12 +164,14 @@
}
}
}
&
_table
{
&
_left
{
width
:
15%
!
important
;
}
&
_right
{
width
:
84
%
!
important
;
width
:
100
%
!
important
;
}
}
}
...
...
@@ -170,11 +188,13 @@
width
:
60%
!
important
;
}
}
&
_t2
{
span
{
width
:
60%
!
important
;
}
}
&
_t3
{
width
:
20%
!
important
;
...
...
@@ -182,6 +202,7 @@
width
:
60%
!
important
;
}
}
&
_t4
{
width
:
28%
!
important
;
...
...
@@ -192,12 +213,14 @@
}
}
}
&
_table
{
&
_left
{
width
:
15%
!
important
;
}
&
_right
{
width
:
84
%
!
important
;
width
:
100
%
!
important
;
}
}
}
...
...
@@ -214,11 +237,13 @@
width
:
60%
!
important
;
}
}
&
_t2
{
span
{
width
:
60%
!
important
;
}
}
&
_t3
{
width
:
20%
!
important
;
...
...
@@ -226,6 +251,7 @@
width
:
60%
!
important
;
}
}
&
_t4
{
width
:
28%
!
important
;
...
...
@@ -236,12 +262,14 @@
}
}
}
&
_table
{
&
_left
{
width
:
15%
!
important
;
}
&
_right
{
width
:
84
%
!
important
;
width
:
100
%
!
important
;
}
}
}
...
...
src/utils/http.js
View file @
9c1ea2ce
import
Vue
from
'vue'
import
Vue
from
"vue"
;
import
axios
from
'axios'
import
axios
from
"axios"
;
import
'element-ui/lib/theme-chalk/index.css'
;
import
"element-ui/lib/theme-chalk/index.css"
;
import
{
getItem
}
from
'@/utils/auth'
import
{
getItem
}
from
"@/utils/auth"
;
axios
.
defaults
.
timeout
=
120000
axios
.
defaults
.
timeout
=
120000
;
axios
.
defaults
.
headers
.
post
[
'Content-Type'
]
=
'application/json;charset=utf-8'
axios
.
defaults
.
headers
.
post
[
"Content-Type"
]
=
"application/json;charset=utf-8"
;
var
domain
=
'/api/api'
var
domain
=
"/api/api"
;
function
createHeader
()
{
const
token
=
getItem
(
'svToken'
);
const
token
=
getItem
(
"svToken"
);
return
token
?
{
Authorization
:
`Bearer
${
token
}
`
}
:
{};
}
function
errorMsg
(
d
)
{
if
(
d
.
response
.
status
==
'401'
)
{
Vue
.
prototype
.
$message
.
error
(
'登录信息失效,重新登录!'
);
console
.
log
(
d
.
response
);
if
(
d
.
response
.
status
==
"401"
)
{
Vue
.
prototype
.
$message
.
error
(
"登录信息失效,重新登录!"
);
sessionStorage
.
clear
();
this
.
$router
.
push
(
"/login"
).
catch
((
err
)
=>
{
...
...
@@ -29,30 +28,26 @@ function errorMsg(d) {
});
//改变路由
}
if
(
d
.
response
)
{
// 请求已发出,但服务器响应的状态码不在 2xx 范围内
console
.
log
(
d
.
response
);
}
if
(
Vue
.
prototype
.
$notify
)
{
Vue
.
prototype
.
$message
.
error
(
d
?
d
.
response
.
data
.
message
:
'服务器端错误'
);
Vue
.
prototype
.
$message
.
error
(
d
?
d
.
response
.
data
.
message
:
"服务器端错误"
);
}
else
{
alert
(
d
?
d
.
response
.
data
.
message
:
'服务器端错误'
)
alert
(
d
?
d
.
response
.
data
.
message
||
d
.
response
.
data
:
"服务器端错误"
);
}
}
let
loadingInstance
;
let
loadingOption
=
{
//加载loading
let
loadingOption
=
{
//加载loading
fullscreen
:
true
,
text
:
'正在加载...'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.5)'
}
text
:
"正在加载..."
,
spinner
:
"el-icon-loading"
,
background
:
"rgba(0, 0, 0, 0.5)"
,
}
;
axios
.
interceptors
.
response
.
use
(
(
response
)
=>
{
if
(
response
.
status
===
200
)
{
...
...
@@ -64,7 +59,7 @@ axios.interceptors.response.use(
(
error
)
=>
{
if
(
error
.
response
.
status
==
401
)
{
window
.
sessionStorage
.
clear
();
window
.
location
.
href
=
'/'
;
window
.
location
.
href
=
"/"
;
}
return
Promise
.
reject
(
error
);
...
...
@@ -72,14 +67,12 @@ axios.interceptors.response.use(
);
export
default
{
post
(
url
,
params
,
option
)
{
loadingInstance
=
Vue
.
prototype
.
$loading
(
loadingOption
);
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
post
(
domain
+
url
,
params
,
{
...
{
headers
:
createHeader
()
},
...
option
})
.
post
(
domain
+
url
,
params
,
{
...
{
headers
:
createHeader
()
},
...
option
})
.
then
((
res
)
=>
{
if
(
res
.
status
!==
200
)
{
errorMsg
(
res
.
data
);
...
...
@@ -92,7 +85,31 @@ export default {
resolve
(
res
.
data
.
data
||
res
.
data
);
})
.
catch
((
error
)
=>
{
loadingInstance
.
close
();
errorMsg
(
error
);
reject
(
error
);
});
});
},
//医院的接口数据用
postFn
(
url
,
params
,
option
)
{
loadingInstance
=
Vue
.
prototype
.
$loading
(
loadingOption
);
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
post
(
domain
+
url
,
params
,
{
...{
headers
:
createHeader
()
},
...
option
})
.
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
status
!==
200
)
{
errorMsg
(
res
.
data
);
reject
(
res
.
data
);
return
;
}
loadingInstance
.
close
();
resolve
(
res
.
data
);
})
.
catch
((
error
)
=>
{
loadingInstance
.
close
();
errorMsg
(
error
);
...
...
@@ -104,7 +121,7 @@ export default {
loadingInstance
=
Vue
.
prototype
.
$loading
(
loadingOption
);
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
get
(
domain
+
url
,
{
...
{
headers
:
createHeader
()
},
...
option
})
.
get
(
domain
+
url
,
{
...
{
headers
:
createHeader
()
},
...
option
})
.
then
((
res
)
=>
{
if
(
res
.
status
!==
200
)
{
errorMsg
(
res
.
data
);
...
...
@@ -121,4 +138,4 @@ export default {
});
});
},
}
\ No newline at end of file
};
src/views/Entrypath.vue
View file @
9c1ea2ce
...
...
@@ -22,12 +22,7 @@
</div>
</div>
<div
class=
"Entrypath_top_right"
>
<el-button
style=
"background-color: #0283bb; color: #ffff"
size=
"mini"
@
click=
"okbtn()"
>
确定进入路径
</el-button
>
<el-button
style=
"background-color: #0283bb; color: #ffff"
size=
"mini"
@
click=
"okbtn()"
>
确定进入路径
</el-button>
</div>
</div>
<div
class=
"Entrypath_table"
>
...
...
@@ -40,41 +35,19 @@
</div>
<div
class=
"Entrypath_table_lefttab_select_chack"
>
<el-button
style=
"
background-color: #ffff;
color: #91cbcd;
margin-right: 10px;
border: 1px solid #91cbcd;
"
style=
"background-color: #ffff; color: #91cbcd; margin-right: 10px; border: 1px solid #91cbcd"
plain
size=
"mini"
@
click=
"selectbtn()"
>
查询
</el-button
>
<el-checkbox
v-model=
"checked"
label=
"只显示推荐路径"
size=
"large"
@
change=
"checkchange"
/>
<el-checkbox
v-model=
"checked"
label=
"只显示推荐路径"
size=
"large"
@
change=
"checkchange"
/>
</div>
</div>
<div
class=
"Entrypath_table_lefttab_table"
>
<el-table
ref=
"leftTable"
:data=
"LefttableData"
border
height=
"100%"
stripe
@
row-click=
"rowclick"
:highlight-current-row=
"true"
>
<el-table
ref=
"leftTable"
:data=
"LefttableData"
border
height=
"100%"
stripe
@
row-click=
"rowclick"
:highlight-current-row=
"true"
>
<el-table-column
type=
"index"
/>
<el-table-column
show-overflow-tooltip
property=
"clinical_route_name"
label=
"路径名称"
/>
<el-table-column
show-overflow-tooltip
property=
"clinical_route_name"
label=
"路径名称"
/>
</el-table>
</div>
</div>
...
...
@@ -93,16 +66,8 @@
stripe
:header-cell-style=
"
{ background: '#0184bc', color: '#ffff' }"
>
<el-table-column
show-overflow-tooltip
property=
"code"
label=
"诊断编码"
/>
<el-table-column
show-overflow-tooltip
property=
"name"
label=
"诊断名称"
/>
<el-table-column
show-overflow-tooltip
property=
"code"
label=
"诊断编码"
/>
<el-table-column
show-overflow-tooltip
property=
"name"
label=
"诊断名称"
/>
</el-table>
</div>
<!-- 第二个表格 -->
...
...
@@ -116,16 +81,8 @@
stripe
:header-cell-style=
"
{ background: '#0184bc', color: '#ffff' }"
>
<el-table-column
show-overflow-tooltip
property=
"code"
label=
"手术编码"
/>
<el-table-column
show-overflow-tooltip
property=
"name"
label=
"手术名称"
/>
<el-table-column
show-overflow-tooltip
property=
"code"
label=
"手术编码"
/>
<el-table-column
show-overflow-tooltip
property=
"name"
label=
"手术名称"
/>
</el-table>
</div>
<!-- 第三个表格 -->
...
...
@@ -139,11 +96,7 @@
stripe
:header-cell-style=
"
{ background: '#0184bc', color: '#ffff' }"
>
<el-table-column
show-overflow-tooltip
property=
"describe"
label=
"进入路径标准"
/>
<el-table-column
show-overflow-tooltip
property=
"describe"
label=
"进入路径标准"
/>
</el-table>
</div>
</div>
...
...
@@ -153,14 +106,7 @@
</
template
>
<
script
>
import
http
from
"../utils/http"
;
import
{
reactive
,
toRefs
,
onMounted
,
nextTick
,
computed
,
ref
,
}
from
"@vue/composition-api"
;
import
{
reactive
,
toRefs
,
onMounted
,
nextTick
,
computed
,
ref
}
from
"@vue/composition-api"
;
import
{
decimal
}
from
"../utils/decimal"
;
import
{
img
}
from
"../assets/img/zu.png"
;
import
{
Message
,
MessageBox
}
from
"element-ui"
;
...
...
@@ -209,11 +155,7 @@ export default {
};
//获取标识
const
getIsRoute
=
()
=>
{
http
.
post
(
`/ClinicalRoute/ClinicalRoute/IsRoute?pid=
${
route
.
value
.
query
.
pid
}
`
,
{}
)
http
.
post
(
`/ClinicalRoute/ClinicalRoute/IsRoute?pid=
${
route
.
value
.
query
.
pid
}
`
,
{})
.
then
((
data
)
=>
{
state
.
IsRoute
=
data
;
})
...
...
@@ -221,11 +163,7 @@ export default {
};
//获取患者信息
const
gettopdata
=
()
=>
{
http
.
post
(
`/ClinicalRoute/ClinicalRoute/GetPatientInfo?pid=
${
route
.
value
.
query
.
pid
}
`
,
{}
)
http
.
post
(
`/ClinicalRoute/ClinicalRoute/GetPatientInfo?pid=
${
route
.
value
.
query
.
pid
}
`
,
{})
.
then
((
data
)
=>
{
state
.
topdata
=
data
;
//如果标识为false 跳转到临床路径外放页面
...
...
@@ -251,11 +189,7 @@ export default {
};
//获取左侧表格数据
const
getLeftdata
=
()
=>
{
http
.
post
(
`/ClinicalRoute/ClinicalRoute/GetPatientRoutes?pid=
${
route
.
value
.
query
.
pid
}
&searchQuery=
${
state
.
pathinput
}
&flag=
${
state
.
checked
}
`
,
{}
)
http
.
post
(
`/ClinicalRoute/ClinicalRoute/GetPatientRoutes?pid=
${
route
.
value
.
query
.
pid
}
&searchQuery=
${
state
.
pathinput
}
&flag=
${
state
.
checked
}
`
,
{})
.
then
((
data
)
=>
{
state
.
LefttableData
=
data
;
})
...
...
@@ -266,11 +200,7 @@ export default {
state
.
iscid
=
row
.
id
;
var
loadingInstance1
=
Loading
.
service
(
loadingOption1
);
//获取右侧数据
http
.
post
(
`/ClinicalRoute/ClinicalRoute/GetCRRuleDescribe?crid=
${
row
.
id
}
`
,
{}
)
http
.
post
(
`/ClinicalRoute/ClinicalRoute/GetCRRuleDescribe?crid=
${
row
.
id
}
`
,
{})
.
then
((
data
)
=>
{
state
.
OnetableData
=
data
.
diagInfo
;
//诊断信息
state
.
TwotableData
=
data
.
opsInfo
;
...
...
@@ -300,11 +230,7 @@ export default {
type
:
"warning"
,
});
}
else
if
(
state
.
iscid
!=
0
)
{
http
.
post
(
`/ClinicalRoute/ClinicalRoute/CreatePatientRoute?pid=
${
route
.
value
.
query
.
pid
}
&crid=
${
state
.
iscid
}
`
,
{}
)
http
.
post
(
`/ClinicalRoute/ClinicalRoute/CreatePatientRoute?pid=
${
route
.
value
.
query
.
pid
}
&crid=
${
state
.
iscid
}
`
,
{})
.
then
((
data
)
=>
{
Message
({
message
:
"成功"
,
...
...
@@ -328,9 +254,9 @@ export default {
});
};
onMounted
(
()
=>
{
onMounted
(
async
()
=>
{
getIsRoute
();
gettopdata
();
await
gettopdata
();
getLeftdata
();
});
...
...
src/views/outClinicalpathway.vue
View file @
9c1ea2ce
...
...
@@ -86,7 +86,7 @@
<!-- 表格 -->
<div
class=
"outClinicalpathway_table_right"
>
<div
class=
"outClinicalpathway_table_right_radio"
>
<el-radio-group
v-model
=
"radio"
@
input=
"radiochange"
>
<el-radio-group
:value
=
"radio"
@
input=
"radiochange"
>
<el-radio
:label=
"1"
>
长期医嘱
</el-radio>
<el-radio
:label=
"2"
>
临时医嘱
</el-radio>
</el-radio-group>
...
...
@@ -106,20 +106,20 @@
size=
"mini"
:row-class-name=
"rowClass"
>
<el-table-column
type=
"selection"
:selectable=
"selectEnable"
width=
"5
5
"
/>
<el-table-column
type=
"selection"
:selectable=
"selectEnable"
width=
"5
0
"
/>
<el-table-column
show-overflow-tooltip
property=
"advice_name"
label=
"路径名称"
width=
"1
5
0"
/>
<el-table-column
show-overflow-tooltip
property=
"advice_name"
label=
"路径名称"
width=
"1
3
0"
/>
<el-table-column
show-overflow-tooltip
property=
"tickTime"
label=
"当前时间"
width=
"145"
>
<
template
#
default=
"scope"
>
<span
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1"
>
{{
scope
.
row
.
tickTime
}}
</span>
</
template
>
</el-table-column>
<el-table-column
show-overflow-tooltip
property=
"orderType"
label=
"类型"
width=
"
6
0"
/>
<el-table-column
show-overflow-tooltip
property=
"orderType"
label=
"类型"
width=
"
5
0"
/>
<el-table-column
show-overflow-tooltip
property=
"project_name"
label=
"医院项目名称"
width=
"2
2
0"
/>
<el-table-column
show-overflow-tooltip
property=
"project_name"
label=
"医院项目名称"
width=
"2
0
0"
/>
<el-table-column
show-overflow-tooltip
property=
"specifications"
label=
"规格说明"
width=
"80"
/>
<el-table-column
show-overflow-tooltip
property=
"dosage"
label=
"药品剂型"
width=
"
8
0"
/>
<el-table-column
show-overflow-tooltip
property=
"dosage"
label=
"药品剂型"
width=
"
7
0"
/>
<el-table-column
show-overflow-tooltip
property=
"isAntibiotic"
label=
"抗生素"
width=
"85"
>
<
template
#
default=
"scope"
>
<el-select
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1"
size=
"mini"
v-model=
"scope.row.isAntibiotic"
>
...
...
@@ -155,7 +155,7 @@
<span
v-else
>
{{
scope
.
row
.
medicUseMode
}}
</span>
</
template
>
</el-table-column>
<el-table-column
show-overflow-tooltip
property=
"medicUsePlan"
label=
"频率"
width=
"1
0
0"
>
<el-table-column
show-overflow-tooltip
property=
"medicUsePlan"
label=
"频率"
width=
"1
1
0"
>
<
template
#
default=
"scope"
>
<el-select
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1"
size=
"mini"
v-model=
"scope.row.medicUsePlan"
>
<el-option
v-for=
"item in medicUsePlanoptions"
:key=
"item.id"
:label=
"item.describe"
:value=
"item.describe"
>
</el-option>
...
...
@@ -187,53 +187,112 @@
<el-table-column
prop=
"description"
label=
"诊断描述"
width=
"150"
>
<
template
#
default=
"scope"
>
<div
style=
"display: flex; height: 100%; flex-direction: column; justify-content: center; align-items: center"
>
<
!--
<
div
style=
"display: flex; height: 100%; flex-direction: column; justify-content: center; align-items: center"
>
<div
style=
"display: flex"
>
<span
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type == 2"
style=
"color: red"
>
*
</span>
<span
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit"
style=
"color: red"
>
*
</span
>
<el-input
size=
"mini"
validate-event
type=
"textarea"
:autosize=
"
{ minRows: 2 }"
placeholder="请输入内容"
v-if="scope.row.advice_name == null
&&
scope.row.ischeck == 1
&&
scope.row.type != 1"
v-if="scope.row.advice_name == null
&&
scope.row.ischeck == 1
&&
scope.row.type != 1
&&
scope.row.isedit
"
v-model="scope.row.description"
>
</el-input>
</div>
<span
style=
"font-size: 12px; color: red"
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type
== 2
&& scope.row.description == ''"
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type
!= 1
&& scope.row.description == ''"
>
请输入内容
</span
>
</div>
</div>
-->
<el-form
:model=
"scope.row"
label-width=
"15px"
label-position=
"left"
ref=
"numberValidateForm"
class=
"demo-ruleForm"
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit"
>
<el-form-item
prop=
"description"
:rules=
"[
{ required: true, message: '请输入内容' }]">
<template
#
label
>
<span></span></
template
>
<el-input
v-model=
"scope.row.description"
autocomplete=
"off"
placeholder=
"请输入内容"
type=
"textarea"
:autosize=
"{ minRows: 2 }"
></el-input>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column
prop=
"symptom"
label=
"症状及体征"
width=
"150"
>
<
template
#
default=
"scope"
>
<div
style=
"display: flex; height: 100%; flex-direction: column; justify-content: center; align-items: center"
>
<
!--
<
div
style=
"display: flex; height: 100%; flex-direction: column; justify-content: center; align-items: center"
>
<div
style=
"display: flex"
>
<span
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type == 2"
style=
"color: red"
>
*
</span>
<span
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit"
style=
"color: red"
>
*
</span
>
<el-input
size=
"mini"
type=
"textarea"
:autosize=
"
{ minRows: 2 }"
placeholder="请输入内容"
v-if="scope.row.advice_name == null
&&
scope.row.ischeck == 1
&&
scope.row.type != 1"
v-if="scope.row.advice_name == null
&&
scope.row.ischeck == 1
&&
scope.row.type != 1
&&
scope.row.isedit
"
v-model="scope.row.symptom"
>
</el-input>
</div>
<span
style=
"font-size: 12px; color: red"
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type
== 2
&& scope.row.symptom == ''"
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type
!= 1
&& scope.row.symptom == ''"
>
请输入内容
</span
>
</div>
</div>
-->
<el-form
:model=
"scope.row"
label-width=
"15px"
label-position=
"left"
ref=
"numberValidateForm1"
class=
"demo-ruleForm"
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit"
>
<el-form-item
prop=
"symptom"
:rules=
"[
{ required: true, message: '请输入内容' }]">
<template
#
label
>
<span></span></
template
>
<el-input
v-model=
"scope.row.symptom"
autocomplete=
"off"
placeholder=
"请输入内容"
type=
"textarea"
:autosize=
"{ minRows: 2 }"
></el-input>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
property=
"emergency"
label=
"急诊"
width=
"85"
>
<
template
#
default=
"scope"
>
<el-select
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.isedit"
size=
"mini"
v-model=
"scope.row.emergency"
>
<el-option
v-for=
"item in chargeTypeoptions"
:key=
"item.label"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<!--
<span
v-else
>
{{
isObj
[
scope
.
row
.
emergency
]
}}
</span>
-->
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"80"
>
<
template
#
default=
"scope"
>
<el-button
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type != 1"
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type != 1
&& scope.row.isedit
"
size=
"mini"
type=
"primary"
@
click=
"goSeeScore(scope.row, scope.$index, scope)"
...
...
@@ -251,25 +310,13 @@
<el-input
v-model=
"goSeeform.chiefComplaint"
:autosize=
"{ minRows: 2 }"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
<el-form-item
label=
"检查目的:"
>
<el-input
v-model=
"goSeeform.inspectionPurpose"
:autosize=
"{ minRows: 2 }"
type=
"textarea"
placeholder=
"请输入内容"
:disabled=
"distype == 3 ? true : false"
/>
<el-input
v-model=
"goSeeform.inspectionPurpose"
:autosize=
"{ minRows: 2 }"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
<el-form-item
label=
"既往史:"
>
<el-input
v-model=
"goSeeform.pastHistory"
:autosize=
"{ minRows: 2 }"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
<el-form-item
label=
"其他辅助项目:"
>
<el-input
v-model=
"goSeeform.auxiliaryItems"
:autosize=
"{ minRows: 2 }"
type=
"textarea"
placeholder=
"请输入内容"
:disabled=
"distype == 3 ? true : false"
/>
<el-input
v-model=
"goSeeform.auxiliaryItems"
:autosize=
"{ minRows: 2 }"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
<el-form-item
label=
"备注:"
>
<el-input
v-model=
"goSeeform.inspectRemarks"
:autosize=
"{ minRows: 2 }"
type=
"textarea"
placeholder=
"请输入内容"
/>
...
...
@@ -305,12 +352,15 @@ export default {
const
route
=
useRoute
();
const
router
=
useRouter
();
const
fromRef
=
ref
();
const
goSeefromRef
=
ref
();
function
tableLayout
()
{
nextTick
(()
=>
{
fromRef
.
value
.
doLayout
();
});
}
const
numberValidateForm
=
ref
();
const
numberValidateForm1
=
ref
();
const
monthlyPlanTable
=
ref
();
const
multipleTable
=
ref
();
const
transformTime
=
computed
(()
=>
{
...
...
@@ -325,13 +375,19 @@ export default {
inHosNum
:
""
,
// 住院次数
clinical_route_name
:
""
,
// 符合临床路径
},
multipleSelection
:
[],
//被选择的数据
multipleSelection1
:
[],
//被选择的数据
selectArr
:
[],
tableData
:
[],
//表格数据
yztype
:
{
1
:
"长期医嘱"
,
2
:
"临时医嘱"
,
},
isObj
:
{
0
:
"否"
,
1
:
"是"
,
},
//被点击的index
timeindex
:
null
,
case_routeid
:
null
,
//点击左侧时间线的天数id
...
...
@@ -355,9 +411,11 @@ export default {
chargeTypeoptions
:
[
{
label
:
"是"
,
value
:
1
,
},
{
label
:
"否"
,
value
:
0
,
},
],
tempRow
:
{},
//储存正在编辑的行
...
...
@@ -391,7 +449,7 @@ export default {
};
//表格当前行样式
const
rowClass
=
({
row
,
index
})
=>
{
if
(
row
.
isClass
==
true
)
{
if
(
row
.
isClass
)
{
return
"rowStyleclass"
;
}
else
{
return
""
;
...
...
@@ -481,7 +539,9 @@ export default {
// 选中父节点时,子节点一起选中取消
const
select
=
(
selection
,
row
)
=>
{
console
.
log
(
"row--父节点"
,
row
);
console
.
log
(
"row--父节点"
,
row
,
selection
);
console
.
log
(
selection
.
filter
((
item
)
=>
!
item
.
children
));
row
.
tickTime
=
transformTimestampnow
();
// 选中
console
.
log
(
...
...
@@ -496,17 +556,23 @@ export default {
)
{
row
.
ischeck
=
1
;
if
(
row
.
children
)
{
row
.
children
.
map
((
j
)
=>
{
console
.
log
(
row
.
children
.
filter
((
item
)
=>
item
.
isForbidden
));
row
.
children
.
filter
((
item
)
=>
item
.
isForbidden
)
.
map
((
j
)
=>
{
j
.
tickTime
=
transformTimestampnow
();
j
.
edit
=
false
;
console
.
log
(
j
.
type
);
toggleSelection
(
j
,
true
);
});
}
//取消
}
else
{
if
(
row
.
children
)
{
row
.
children
.
map
((
p
)
=>
{
p
.
ischeck
=
2
;
p
.
isClass
=
false
;
toggleSelection
(
p
,
false
);
});
}
else
{
...
...
@@ -517,10 +583,7 @@ export default {
};
// 控制选框是否被选中
const
toggleSelection
=
(
row
,
select
)
=>
{
console
.
log
(
row
,
select
);
if
(
row
)
{
// console.log("row-亮", row);
nextTick
(()
=>
{
multipleTable
.
value
&&
multipleTable
.
value
.
toggleRowSelection
(
row
,
select
);
});
...
...
@@ -548,7 +611,9 @@ export default {
if
(
isSelect
)
{
selection
.
map
((
el
)
=>
{
if
(
el
.
children
)
{
el
.
children
.
map
((
j
)
=>
{
el
.
children
.
filter
((
item
)
=>
item
.
isForbidden
)
.
map
((
j
)
=>
{
toggleSelection
(
j
,
true
);
});
}
...
...
@@ -567,7 +632,26 @@ export default {
//当选择项发生变化时会触发该事件
const
SelectionChange
=
(
val
)
=>
{
state
.
multipleSelection
=
val
;
// state.multipleSelection = val;
if
(
state
.
radio
==
1
)
{
state
.
multipleSelection
=
val
.
filter
((
item
)
=>
!
item
.
children
);
}
else
{
state
.
multipleSelection1
=
val
.
filter
((
item
)
=>
!
item
.
children
);
}
if
(
state
.
multipleSelection
.
length
)
{
state
.
multipleSelection
.
filter
((
item
)
=>
item
.
type
!=
1
)
.
map
((
item
,
index
)
=>
{
index
==
0
?
(
item
.
isedit
=
true
)
:
(
item
.
isedit
=
false
);
});
}
if
(
state
.
multipleSelection1
.
length
)
{
state
.
multipleSelection1
.
filter
((
item
)
=>
item
.
type
!=
1
)
.
map
((
item
,
index
)
=>
{
index
==
0
?
(
item
.
isedit
=
true
)
:
(
item
.
isedit
=
false
);
});
}
};
//获取左侧时间线数据
...
...
@@ -589,68 +673,149 @@ export default {
}
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
};
//获取标识
const
getIsRoute
=
()
=>
{
http
.
post
(
`/ClinicalRoute/ClinicalRoute/IsRoute?pid=
${
route
.
value
.
query
.
pid
}
`
,
{})
.
then
((
data
)
=>
{
console
.
log
(
data
);
if
(
data
)
{
router
.
push
({
path
:
"Entrypath"
,
query
:
{
pid
:
route
.
value
.
query
.
pid
,
},
});
});
}
})
.
catch
((
error
)
=>
{});
};
//单选
const
radiochange
=
()
=>
{
const
getTableData
=
()
=>
{
http
.
post
(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=
${
route
.
value
.
query
.
pid
}
&case_routeid=
${
state
.
case_routeid
}
&searchQuery=
${
state
.
inhosdays
}
`
,
{}
)
.
then
((
data
)
=>
{
state
.
newtable1
=
data
.
route1
;
state
.
newtable2
=
data
.
route2
;
if
(
state
.
radio
==
1
)
{
state
.
tableData
=
data
.
route1
;
state
.
tableData
.
map
((
el
)
=>
{
// console.log(" el",el);
if
(
el
.
children
)
{
for
(
let
i
=
0
;
i
<
el
.
children
.
length
;
i
++
)
{
if
(
el
.
children
[
i
].
ischeck
==
1
)
{
toggleSelection
(
el
.
children
[
i
],
true
);
toggleSelection
(
el
,
true
);
}
}
}
});
state
.
newtable1
=
state
.
tableData
;
// state.tableData.map((el) => {
// if (el.children) {
// for (let i = 0; i
<
el
.
children
.
length
;
i
++
)
{
// if (el.children[i].ischeck == 1) {
// toggleSelection(el.children[i], true);
// toggleSelection(el, true);
// }
// }
// }
// });
// state.newtable1 = state.tableData;
}
else
if
(
state
.
radio
==
2
)
{
state
.
tableData
=
data
.
route2
;
state
.
tableData
.
map
((
el
)
=>
{
// console.log(" el",el);
if
(
el
.
children
)
{
for
(
let
i
=
0
;
i
<
el
.
children
.
length
;
i
++
)
{
if
(
el
.
children
[
i
].
ischeck
==
1
)
{
toggleSelection
(
el
.
children
[
i
],
true
);
toggleSelection
(
el
,
true
);
// state.tableData.map((el) => {
// if (el.children) {
// for (let i = 0; i
<
el
.
children
.
length
;
i
++
)
{
// if (el.children[i].ischeck == 1) {
// toggleSelection(el.children[i], true);
// toggleSelection(el, true);
// }
// }
// }
// });
// state.newtable2 = state.tableData;
}
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
};
//单选
const
radiochange
=
(
e
)
=>
{
if
(
numberValidateForm
.
value
||
numberValidateForm1
.
value
)
{
numberValidateForm
.
value
.
validate
((
valid
)
=>
{
if
(
valid
)
{
numberValidateForm1
.
value
.
validate
((
valid
)
=>
{
if
(
valid
)
{
state
.
radio
=
e
;
if
(
state
.
radio
==
1
)
{
state
.
tableData
=
state
.
newtable1
;
state
.
multipleSelection
.
map
((
j
)
=>
{
toggleSelection
(
j
,
true
);
});
}
else
{
state
.
tableData
=
state
.
newtable2
;
state
.
multipleSelection1
.
map
((
p
)
=>
{
toggleSelection
(
p
,
true
);
});
}
}
else
{
console
.
log
(
"error submit!!"
);
return
false
;
}
});
state
.
newtable2
=
state
.
tableData
;
}
else
{
console
.
log
(
"error submit!!"
);
return
false
;
}
});
}
else
{
state
.
radio
=
e
;
if
(
state
.
radio
==
1
)
{
state
.
tableData
=
state
.
newtable1
;
state
.
multipleSelection
.
map
((
j
)
=>
{
toggleSelection
(
j
,
true
);
});
}
else
{
state
.
tableData
=
state
.
newtable2
;
state
.
multipleSelection1
.
map
((
p
)
=>
{
toggleSelection
(
p
,
true
);
});
}
}
})
.
catch
((
error
)
=>
{});
};
//点击左侧时间线 获取右侧表格数据
const
timeclick
=
(
val
)
=>
{
state
.
timeindex
=
val
.
inhosdays
;
state
.
case_routeid
=
val
.
case_routeid
;
state
.
inhosdays
=
val
.
inhosdays
;
radiochange
();
getTableData
();
};
//保存医嘱
const
joinorder
=
()
=>
{
state
.
objtable
.
route1
=
state
.
newtable1
;
state
.
objtable
.
route2
=
state
.
newtable2
;
if
(
state
.
multipleSelection
.
length
||
state
.
multipleSelection1
.
length
)
{
if
(
numberValidateForm
.
value
||
numberValidateForm1
.
value
)
{
numberValidateForm
.
value
.
validate
((
valid
)
=>
{
if
(
valid
)
{
numberValidateForm1
.
value
.
validate
((
valid
)
=>
{
if
(
valid
)
{
saveSetPatientRoutes
();
}
else
{
console
.
log
(
"error submit!!"
);
return
false
;
}
});
}
else
{
console
.
log
(
"error submit!!"
);
return
false
;
}
});
}
else
{
saveSetPatientRoutes
();
}
}
};
const
saveSetPatientRoutes
=
()
=>
{
state
.
objtable
.
route1
=
state
.
multipleSelection
;
state
.
objtable
.
route2
=
state
.
multipleSelection1
;
http
.
post
(
`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=
${
route
.
value
.
query
.
pid
}
`
,
state
.
objtable
)
.
then
((
data
)
=>
{
.
then
(
async
(
data
)
=>
{
// console.log("data.hisUrl", data.hisUrl);
state
.
hisUrl
=
data
.
hisUrl
.
split
(
"api/"
)[
2
];
console
.
log
(
state
.
hisUrl
);
// console.log("state.hisUrl", state.hisUrl);
//临时西药
state
.
tempMedicalDrug
=
data
.
tempMedicalDrug
;
...
...
@@ -660,103 +825,105 @@ export default {
state
.
tempMedicalCheckout
=
data
.
tempMedicalCheckout
;
//长期西药
state
.
longMedical
=
data
.
longMedical
;
await
posttempMedicalDrug
();
await
posttempMedicalcheck
();
await
posttempMedicalCheckout
();
await
postlongMedical
();
})
.
catch
((
error
)
=>
{});
};
// 调用his接口 临时西药
http
.
post
(
`/
${
state
.
hisUrl
}
`
,
{
const
posttempMedicalDrug
=
()
=>
{
http
.
postFn
(
`/
${
state
.
hisUrl
}
`
,
{
method
:
"tempMedical"
,
type
:
1
,
data
:
state
.
tempMedicalDrug
,
})
.
then
((
data
)
=>
{
.
then
((
res
)
=>
{
//重新获取左侧时间线数据
getlefttime
();
if
(
res
.
code
==
"0"
)
{
Message
({
message
:
data
.
message
,
message
:
res
.
msg
,
type
:
"success"
,
});
console
.
log
(
"临时西药"
);
if
(
data
.
code
==
"0"
)
{
Message
({
message
:
`临时西药
${
data
.
msg
}
`
,
type
:
"success"
,
});
}
else
if
(
data
.
code
==
"1"
)
{
}
else
{
Message
({
message
:
`临时西药失败`
,
message
:
res
.
msg
,
type
:
"error"
,
});
}
})
.
catch
((
error
)
=>
{});
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
};
// 调用his接口 临时检查
http
.
post
(
`/
${
state
.
hisUrl
}
`
,
{
const
posttempMedicalcheck
=
()
=>
{
http
.
postFn
(
`/
${
state
.
hisUrl
}
`
,
{
method
:
"tempMedical"
,
type
:
3
,
data
:
state
.
tempMedicalcheck
,
})
.
then
((
data
)
=>
{
console
.
log
(
"临时检查"
);
if
(
data
.
code
==
"0"
)
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
"0"
)
{
Message
({
message
:
`临时
${
data
.
msg
}
`
,
message
:
res
.
msg
,
type
:
"success"
,
});
}
else
if
(
data
.
code
==
"1"
)
{
}
else
{
Message
({
message
:
`临时检查失败`
,
message
:
res
.
msg
,
type
:
"error"
,
});
}
})
.
catch
((
error
)
=>
{});
};
// 调用his接口 临时检验
http
.
post
(
`/
${
state
.
hisUrl
}
`
,
{
const
posttempMedicalCheckout
=
()
=>
{
http
.
postFn
(
`/
${
state
.
hisUrl
}
`
,
{
method
:
"tempMedical"
,
type
:
4
,
data
:
state
.
tempMedicalCheckout
,
})
.
then
((
data
)
=>
{
console
.
log
(
"临时检验"
);
if
(
data
.
code
==
"0"
)
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
"0"
)
{
Message
({
message
:
`临时
${
data
.
msg
}
`
,
message
:
res
.
msg
,
type
:
"success"
,
});
}
else
if
(
data
.
code
==
"1"
)
{
}
else
{
Message
({
message
:
`临时检验失败`
,
message
:
res
.
msg
,
type
:
"error"
,
});
}
})
.
catch
((
error
)
=>
{});
};
// 调用his接口 长期西药
http
.
post
(
`/
${
state
.
hisUrl
}
`
,
{
const
postlongMedical
=
()
=>
{
http
.
postFn
(
`/
${
state
.
hisUrl
}
`
,
{
method
:
"longMedical"
,
type
:
1
,
data
:
state
.
longMedical
,
})
.
then
((
data
)
=>
{
console
.
log
(
"长期西药"
);
if
(
data
.
code
==
"0"
)
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
"0"
)
{
Message
({
message
:
`长期西药
${
data
.
msg
}
`
,
message
:
res
.
msg
,
type
:
"success"
,
});
}
else
if
(
data
.
code
==
"1"
)
{
}
else
{
Message
({
message
:
`长期西药失败`
,
message
:
res
.
msg
,
type
:
"error"
,
});
}
})
.
catch
((
error
)
=>
{});
})
.
catch
((
error
)
=>
{});
};
//获取病情变异--变异原因下拉框
const
getreasonoptions
=
()
=>
{
...
...
@@ -819,6 +986,7 @@ export default {
};
onMounted
(()
=>
{
getIsRoute
();
gettopdata
();
getlefttime
();
gemedicUseModeoptions
();
...
...
@@ -828,9 +996,7 @@ export default {
return
{
...
toRefs
(
state
),
decimal
,
monthlyPlanTable
,
multipleTable
,
SelectionChange
,
...
...
@@ -844,6 +1010,8 @@ export default {
variation
,
fromOKbtn
,
fromRef
,
numberValidateForm
,
numberValidateForm1
,
close
,
joinorder
,
getreasonoptions
,
...
...
@@ -871,6 +1039,7 @@ export default {
//
选中当前行样式
::v-deep
.rowStyleclass
{
font-weight
:
700
;
background-color
:
#f5f7fa
;
}
//
时间线样式
::v-deep
.el-timeline-item__tail
{
...
...
@@ -1123,5 +1292,8 @@ export default {
}
}
}
/* .el-form-item {
margin: 0;
} */
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment