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
307d754b
Commit
307d754b
authored
Jan 31, 2023
by
wangshuangqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点击展示修改框
parent
31f28c0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
83 deletions
+76
-83
src/views/outClinicalpathway.vue
+76
-83
No files found.
src/views/outClinicalpathway.vue
View file @
307d754b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: wsq
* @Author: wsq
* @Date: 2022-04-22 15:20:58
* @Date: 2022-04-22 15:20:58
* @LastEditors: wsq
* @LastEditors: wsq
* @LastEditTime: 2023-01-3
0 13:51:13
* @LastEditTime: 2023-01-3
1 17:53:02
* @Description:
* @Description:
-->
-->
<
template
>
<
template
>
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
default-expand-all
default-expand-all
>
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
label=
"医嘱类型"
width=
"180"
>
<el-table-column
label=
"医嘱类型"
width=
"180"
fixed=
"left"
>
<
template
#
default=
"scope"
>
{{
yztype
[
scope
.
row
.
type
]
}}
</
template
>
<
template
#
default=
"scope"
>
{{
yztype
[
scope
.
row
.
type
]
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -150,24 +150,28 @@
...
@@ -150,24 +150,28 @@
property=
"advice_name"
property=
"advice_name"
label=
"路径名称"
label=
"路径名称"
width=
"150"
width=
"150"
fixed=
"left"
/>
/>
<el-table-column
<el-table-column
show-overflow-tooltip
show-overflow-tooltip
property=
"project_code"
property=
"project_code"
label=
"医院项目编码"
label=
"医院项目编码"
width=
"120"
width=
"120"
fixed=
"left"
/>
/>
<el-table-column
<el-table-column
show-overflow-tooltip
show-overflow-tooltip
property=
"project_name"
property=
"project_name"
label=
"医院项目名称"
label=
"医院项目名称"
width=
"150"
width=
"150"
fixed=
"left"
/>
/>
<el-table-column
<el-table-column
show-overflow-tooltip
show-overflow-tooltip
property=
"specifications"
property=
"specifications"
label=
"规格说明"
label=
"规格说明"
width=
"150"
/>
/>
<el-table-column
<el-table-column
show-overflow-tooltip
show-overflow-tooltip
...
@@ -181,10 +185,11 @@
...
@@ -181,10 +185,11 @@
width=
"110"
width=
"110"
>
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<span
v-if=
"tableIndex != scope.$index"
>
{{
<el-select
scope
.
row
.
isAntibiotic
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1"
}}
</span>
size=
"mini"
<el-select
v-else
size=
"mini"
v-model=
"scope.row.isAntibiotic"
>
v-model=
"scope.row.isAntibiotic"
>
<el-option
<el-option
v-for=
"item in chargeTypeoptions"
v-for=
"item in chargeTypeoptions"
:key=
"item.label"
:key=
"item.label"
...
@@ -193,19 +198,18 @@
...
@@ -193,19 +198,18 @@
>
>
</el-option>
</el-option>
</el-select>
</el-select>
<span
v-else
>
{{
scope
.
row
.
isAntibiotic
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"medicUseQuantity"
label=
"用量"
width=
"120"
>
<el-table-column
prop=
"medicUseQuantity"
label=
"用量"
width=
"120"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<span
v-if=
"tableIndex != scope.$index"
>
{{
scope
.
row
.
medicUseQuantity
}}
</span>
<el-input
<el-input
v-
else
v-
if=
"scope.row.advice_name == null && scope.row.ischeck == 1"
v-model=
"scope.row.medicUseQuantity"
v-model=
"scope.row.medicUseQuantity"
size=
"mini"
size=
"mini"
placeholder=
"请输入内容"
placeholder=
"请输入内容"
></el-input>
></el-input>
<span
v-else
>
{{
scope
.
row
.
medicUseQuantity
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -226,28 +230,24 @@
...
@@ -226,28 +230,24 @@
<el-table-column
prop=
"dropNumber"
label=
"滴数"
width=
"120"
>
<el-table-column
prop=
"dropNumber"
label=
"滴数"
width=
"120"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<span
v-if=
"tableIndex != scope.$index"
>
{{
scope
.
row
.
dropNumber
}}
</span>
<el-input
<el-input
v-
else
v-
if=
"scope.row.advice_name == null && scope.row.ischeck == 1"
v-model=
"scope.row.dropNumber"
v-model=
"scope.row.dropNumber"
size=
"mini"
size=
"mini"
placeholder=
"请输入内容"
placeholder=
"请输入内容"
></el-input>
></el-input>
<span
v-else
>
{{
scope
.
row
.
dropNumber
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"medicQuantity"
label=
"用药总量"
width=
"120"
>
<el-table-column
prop=
"medicQuantity"
label=
"用药总量"
width=
"120"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<span
v-if=
"tableIndex != scope.$index"
>
{{
scope
.
row
.
medicQuantity
}}
</span>
<el-input
<el-input
v-
else
v-
if=
"scope.row.advice_name == null && scope.row.ischeck == 1"
v-model=
"scope.row.medicQuantity"
v-model=
"scope.row.medicQuantity"
size=
"mini"
size=
"mini"
placeholder=
"请输入内容"
placeholder=
"请输入内容"
></el-input>
></el-input>
<span
v-else
>
{{
scope
.
row
.
medicQuantity
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -259,35 +259,18 @@
...
@@ -259,35 +259,18 @@
show-overflow-tooltip
show-overflow-tooltip
property=
"remark"
property=
"remark"
label=
"嘱托"
label=
"嘱托"
/>
width=
"400'"
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<div
<el-input
class=
"table_handle"
v-if=
"scope.row.advice_name == null && scope.row.ischeck == 1"
v-show=
"tableIndex != scope.$index"
v-model=
"scope.row.remark"
v-if=
"scope.row.advice_name == null"
size=
"mini"
>
type=
"textarea"
<el-button
:autosize=
"
{ minRows: 2 }"
size=
"mini"
placeholder="请输入内容"
type=
"info"
>
</el-input>
@
click=
"edit(scope.row, scope.$index)"
<span
v-else
>
{{
scope
.
row
.
remark
}}
</span>
>
编辑
</el-button
>
</div>
<div
class=
"table_handle"
v-show=
"tableIndex == scope.$index"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"confirm(scope.row, scope.$index)"
>
确定
</el-button
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"cancel(scope.row, scope.$index)"
>
取消
</el-button
>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -356,8 +339,6 @@ export default {
...
@@ -356,8 +339,6 @@ export default {
crid
:
null
,
crid
:
null
,
chickid
:
[],
//选中的id
chickid
:
[],
//选中的id
tableIndex
:
-
1
,
tempRow
:
{},
//储存正在编辑的行
chargeTypeoptions
:
[
chargeTypeoptions
:
[
{
{
label
:
"是"
,
label
:
"是"
,
...
@@ -366,27 +347,10 @@ export default {
...
@@ -366,27 +347,10 @@ export default {
label
:
"否"
,
label
:
"否"
,
},
},
],
],
tempRow
:
{},
//储存正在编辑的行
tempRowChildren
:
[],
});
});
//编辑
const
edit
=
(
row
,
index
)
=>
{
console
.
log
(
"row"
,
row
);
state
.
tableIndex
=
index
;
state
.
tempRow
=
_
.
cloneDeep
(
row
);
console
.
log
(
"state.tempRow "
,
state
.
tempRow
);
};
//取消
const
cancel
=
(
row
,
index
)
=>
{
if
(
!
row
.
id
)
{
//如果为空,删除当前行
state
.
tableData
.
splice
(
index
,
1
);
//前端删除
}
else
{
state
.
tableData
[
index
]
=
state
.
tempRow
;
}
state
.
tableIndex
=
-
1
;
};
//获取患者信息
//获取患者信息
const
gettopdata
=
()
=>
{
const
gettopdata
=
()
=>
{
http
http
...
@@ -414,30 +378,61 @@ export default {
...
@@ -414,30 +378,61 @@ export default {
// 选中父节点时,子节点一起选中取消
// 选中父节点时,子节点一起选中取消
const
select
=
(
selection
,
row
)
=>
{
const
select
=
(
selection
,
row
)
=>
{
console
.
log
(
"row--父节点"
,
row
);
// 选中
// 选中
if
(
if
(
selection
.
some
((
el
)
=>
{
selection
.
some
((
el
)
=>
{
return
row
.
id
===
el
.
id
;
return
row
.
id
===
el
.
id
;
})
})
)
{
)
{
// console.log("选中-row", row);
row
.
ischeck
=
1
;
row
.
ischeck
=
1
;
state
.
tempRow
=
_
.
cloneDeep
(
row
);
if
(
row
.
children
)
{
if
(
row
.
children
)
{
for
(
let
a
=
0
;
a
<
row
.
children
.
length
;
a
++
)
{
state
.
tempRowChildren
=
_
.
cloneDeep
(
row
.
children
[
a
]);
console
.
log
(
"state.tempRowChildren[a]"
,
state
.
tempRowChildren
);
}
row
.
children
.
map
((
j
)
=>
{
row
.
children
.
map
((
j
)
=>
{
toggleSelection
(
j
,
true
);
toggleSelection
(
j
,
true
);
});
});
}
}
//取消
//取消
}
else
{
}
else
{
// console.log("取消-row", row);
//取消的行数据
row
.
ischeck
=
2
;
if
(
row
.
children
)
{
if
(
row
.
children
)
{
row
.
children
.
map
((
j
)
=>
{
row
.
children
.
map
((
p
)
=>
{
j
.
ischeck
=
2
;
p
.
ischeck
=
2
;
toggleSelection
(
j
,
false
);
// for (var i = 0; i
<
state
.
tableData
.
length
;
i
++
)
{
// if (state.tableData[i].children.length > 0) {
// for (let j = 0; j
<
state
.
tableData
[
i
].
children
.
length
;
j
++
)
{
// if (state.tableData[i].children[j].id == p.id) {
// state.tableData[i].children[j] =
// state.tempRowChildren[j - 1];
// console.log("p.id", p.id);
// console.log(
// "state.tempRowChildren[j-1]",
// state.tempRowChildren[j - 1]
// );
// }
// }
// }
// }
toggleSelection
(
p
,
false
);
});
});
}
else
{
//取消选中 还原数据
for
(
var
i
=
0
;
i
<
state
.
tableData
.
length
;
i
++
)
{
if
(
state
.
tableData
[
i
].
children
.
length
>
0
)
{
for
(
let
j
=
0
;
j
<
state
.
tableData
[
i
].
children
.
length
;
j
++
)
{
if
(
state
.
tableData
[
i
].
children
[
j
].
id
==
row
.
id
)
{
state
.
tableData
[
i
].
children
[
j
]
=
state
.
tempRow
;
}
}
}
}
//取消的行数据
row
.
ischeck
=
2
;
}
}
}
}
};
};
...
@@ -493,7 +488,6 @@ export default {
...
@@ -493,7 +488,6 @@ export default {
//当选择项发生变化时会触发该事件
//当选择项发生变化时会触发该事件
const
SelectionChange
=
(
val
)
=>
{
const
SelectionChange
=
(
val
)
=>
{
state
.
multipleSelection
=
val
;
state
.
multipleSelection
=
val
;
// console.log("val", val);
};
};
//获取左侧时间线数据
//获取左侧时间线数据
...
@@ -551,12 +545,12 @@ export default {
...
@@ -551,12 +545,12 @@ export default {
state
.
inhosdays
=
val
.
inhosdays
;
state
.
inhosdays
=
val
.
inhosdays
;
http
http
.
post
(
.
post
(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=
${
route
.
value
.
query
.
pid
}
&case_routeid=
${
val
.
case_routeid
}
&searchQuery=
${
val
.
inhosdays
}
`
,
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=
${
route
.
value
.
query
.
pid
}
&case_routeid=
${
state
.
case_routeid
}
&searchQuery=
${
state
.
inhosdays
}
`
,
{}
{}
)
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
state
.
tableData
=
data
;
state
.
tableData
=
data
;
// console.log(" state.tableData", state.tableData);
state
.
tableData
.
map
((
el
)
=>
{
state
.
tableData
.
map
((
el
)
=>
{
// console.log(" el",el);
// console.log(" el",el);
if
(
el
.
children
)
{
if
(
el
.
children
)
{
...
@@ -573,7 +567,7 @@ export default {
...
@@ -573,7 +567,7 @@ export default {
};
};
//加入医嘱
//加入医嘱
const
joinorder
=
()
=>
{
const
joinorder
=
()
=>
{
//
console.log("加入按钮-tabledata", state.tableData);
console
.
log
(
"加入按钮-tabledata"
,
state
.
tableData
);
http
http
.
post
(
.
post
(
`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=
${
route
.
value
.
query
.
pid
}
`
,
`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=
${
route
.
value
.
query
.
pid
}
`
,
...
@@ -683,8 +677,7 @@ export default {
...
@@ -683,8 +677,7 @@ export default {
joinorder
,
joinorder
,
getreasonoptions
,
getreasonoptions
,
getTitle
,
getTitle
,
edit
,
confirm
,
cancel
,
};
};
},
},
};
};
...
@@ -869,7 +862,7 @@ export default {
...
@@ -869,7 +862,7 @@ export default {
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
&_left
{
&_left
{
width
:
1
5
%
;
width
:
1
0
%
;
height
:
100%
;
height
:
100%
;
margin-right
:
5px
;
margin-right
:
5px
;
background-color
:
#ffff
;
background-color
:
#ffff
;
...
@@ -888,7 +881,7 @@ export default {
...
@@ -888,7 +881,7 @@ export default {
}
}
}
}
&
_right
{
&
_right
{
width
:
8
4
%
;
width
:
8
9
%
;
height
:
100%
;
height
:
100%
;
//
overflow
:
scroll
;
//
overflow
:
scroll
;
}
}
...
...
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