Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pet-business-web
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘怀志
pet-business-web
Commits
6be2a9eb
Commit
6be2a9eb
authored
Jun 21, 2023
by
小费同学阿
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进度信息模块封装ui代码优化2
parent
f0a282d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
medical-record-management.vue
...s/medical-record-management/medical-record-management.vue
+16
-17
No files found.
src/views/medical-record-management/medical-record-management.vue
View file @
6be2a9eb
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
class=
"fourWordsBtn"
class=
"fourWordsBtn"
icon=
"el-icon-right"
icon=
"el-icon-right"
size=
"mini"
size=
"mini"
@
click=
"
select
All"
@
click=
"
check
All"
>
选择全部
>
选择全部
</el-button>
</el-button>
<!--反向选择-->
<!--反向选择-->
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
class=
"fourWordsBtn"
class=
"fourWordsBtn"
icon=
"el-icon-back"
icon=
"el-icon-back"
size=
"mini"
size=
"mini"
@
click=
"reverseSelect"
@
click=
"reverseSelect
ion
"
>
反向选择
>
反向选择
</el-button>
</el-button>
<!--批量导出-->
<!--批量导出-->
...
@@ -182,7 +182,6 @@
...
@@ -182,7 +182,6 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
listAllArticle
}
from
'@/api/business/article'
import
{
listRecord
}
from
'@/api/business/record'
import
{
listRecord
}
from
'@/api/business/record'
export
default
{
export
default
{
...
@@ -192,11 +191,11 @@ export default {
...
@@ -192,11 +191,11 @@ export default {
data
()
{
data
()
{
return
{
return
{
// 所有挂号信息ID(选择全部-临时表)
// 所有挂号信息ID(选择全部-临时表)
re
gister
Ids
:
[],
re
cord
Ids
:
[],
// 所有挂号信息ID(在不点击选择全部时-临时表)
// 所有挂号信息ID(在不点击选择全部时-临时表)
registerEmptyIds
:
[],
registerEmptyIds
:
[],
// 所有挂号信息ID(用于辅助, 里面的数据永远不变, 除了 新增/删除 数据时)
// 所有挂号信息ID(用于辅助, 里面的数据永远不变, 除了 新增/删除 数据时)
re
gister
IdsForever
:
[],
re
cord
IdsForever
:
[],
doctorNameList
:
[],
doctorNameList
:
[],
deptIdList
:
[],
deptIdList
:
[],
departIdList
:
[],
departIdList
:
[],
...
@@ -279,7 +278,7 @@ export default {
...
@@ -279,7 +278,7 @@ export default {
// 选择全部
// 选择全部
checkAll
()
{
checkAll
()
{
this
.
re
gisterIds
=
this
.
register
IdsForever
this
.
re
cordIds
=
this
.
record
IdsForever
// 标志位, 使得@select回调函数判断往哪个临时集合里添加
// 标志位, 使得@select回调函数判断往哪个临时集合里添加
this
.
isCheckAll
=
true
this
.
isCheckAll
=
true
// 调用手动勾选
// 调用手动勾选
...
@@ -291,9 +290,9 @@ export default {
...
@@ -291,9 +290,9 @@ export default {
// 在下一个dom触发
// 在下一个dom触发
this
.
$nextTick
().
then
(()
=>
{
this
.
$nextTick
().
then
(()
=>
{
// 当前页结合数据的id只要在临时集合里,就使得复选框勾选
// 当前页结合数据的id只要在临时集合里,就使得复选框勾选
this
.
re
gister
List
.
forEach
(
item
=>
{
this
.
re
cord
List
.
forEach
(
item
=>
{
if
(
this
.
isCheckAll
)
{
if
(
this
.
isCheckAll
)
{
if
(
this
.
re
gister
Ids
.
includes
(
item
.
id
))
{
if
(
this
.
re
cord
Ids
.
includes
(
item
.
id
))
{
this
.
$refs
.
table
.
toggleRowSelection
(
item
,
true
)
this
.
$refs
.
table
.
toggleRowSelection
(
item
,
true
)
}
}
}
else
{
}
else
{
...
@@ -306,12 +305,12 @@ export default {
...
@@ -306,12 +305,12 @@ export default {
}
,
}
,
// 反向选择(把永久临时集合和变化的临时集合做减法重新赋给变化的临时集合赋给)
// 反向选择(把永久临时集合和变化的临时集合做减法重新赋给变化的临时集合赋给)
reverseSelection
()
{
reverseSelection
()
{
console
.
log
(
'永久的集合'
,
this
.
re
gister
IdsForever
)
console
.
log
(
'永久的集合'
,
this
.
re
cord
IdsForever
)
console
.
log
(
'临时集合'
,
this
.
registerEmptyIds
)
console
.
log
(
'临时集合'
,
this
.
registerEmptyIds
)
if
(
this
.
isCheckAll
)
{
if
(
this
.
isCheckAll
)
{
this
.
registerEmptyIds
=
this
.
re
gisterIdsForever
.
filter
(
id
=>
!
this
.
register
Ids
.
includes
(
id
))
this
.
registerEmptyIds
=
this
.
re
cordIdsForever
.
filter
(
id
=>
!
this
.
record
Ids
.
includes
(
id
))
}
else
{
}
else
{
this
.
registerEmptyIds
=
this
.
re
gister
IdsForever
.
filter
(
id
=>
!
this
.
registerEmptyIds
.
includes
(
id
))
this
.
registerEmptyIds
=
this
.
re
cord
IdsForever
.
filter
(
id
=>
!
this
.
registerEmptyIds
.
includes
(
id
))
}
}
this
.
isCheckAll
=
false
this
.
isCheckAll
=
false
this
.
getList
()
this
.
getList
()
...
@@ -321,11 +320,11 @@ export default {
...
@@ -321,11 +320,11 @@ export default {
console
.
log
(
'selectChange'
,
selection
,
'----'
,
row
)
console
.
log
(
'selectChange'
,
selection
,
'----'
,
row
)
if
(
this
.
isCheckAll
)
{
if
(
this
.
isCheckAll
)
{
// 判断当前选中的存不存在,存在删除;不存在添加
// 判断当前选中的存不存在,存在删除;不存在添加
if
(
this
.
re
gister
Ids
.
includes
(
row
.
id
))
{
if
(
this
.
re
cord
Ids
.
includes
(
row
.
id
))
{
this
.
re
gisterIds
=
this
.
register
Ids
.
filter
(
id
=>
id
!==
row
.
id
)
this
.
re
cordIds
=
this
.
record
Ids
.
filter
(
id
=>
id
!==
row
.
id
)
console
.
log
(
'filter'
,
this
.
re
gister
Ids
.
filter
(
id
=>
id
!==
row
.
id
))
console
.
log
(
'filter'
,
this
.
re
cord
Ids
.
filter
(
id
=>
id
!==
row
.
id
))
}
else
{
}
else
{
this
.
re
gister
Ids
.
push
(
row
.
id
)
this
.
re
cord
Ids
.
push
(
row
.
id
)
}
}
}
else
{
}
else
{
if
(
this
.
registerEmptyIds
.
includes
(
row
.
id
))
{
if
(
this
.
registerEmptyIds
.
includes
(
row
.
id
))
{
...
@@ -367,8 +366,8 @@ export default {
...
@@ -367,8 +366,8 @@ export default {
this
.
recordList
=
response
.
rows
.
rows
this
.
recordList
=
response
.
rows
.
rows
console
.
log
(
'这是病历,我要开始取字段了!'
,
this
.
recordList
)
console
.
log
(
'这是病历,我要开始取字段了!'
,
this
.
recordList
)
// 获取全部挂号的id
// 获取全部挂号的id
this
.
re
gister
Ids
=
response
.
rows
.
idList
this
.
re
cord
Ids
=
response
.
rows
.
idList
this
.
re
gister
IdsForever
=
response
.
rows
.
idList
this
.
re
cord
IdsForever
=
response
.
rows
.
idList
this
.
total
=
response
.
total
this
.
total
=
response
.
total
this
.
loading
=
false
this
.
loading
=
false
this
.
manualCheck
()
this
.
manualCheck
()
...
...
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