Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
karname-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
Reza Sahebgharan
karname-ui
Commits
c0f88371
Commit
c0f88371
authored
Sep 29, 2019
by
Reza Sahebgharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prev next button
parent
d45904ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
126 additions
and
36 deletions
+126
-36
Worklist.vue
client/components/Worklist.vue
+124
-28
i18n.js
client/plugins/i18n.js
+2
-2
worklist.js
imports/api/methods/worklist.js
+0
-6
No files found.
client/components/Worklist.vue
View file @
c0f88371
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<v-card
tile
>
<v-card
tile
>
<v-card-actions>
<v-card-actions>
<v-row
style=
"margin:auto"
>
<v-row
style=
"margin:auto"
>
<v-col
cols=
"12"
sm=
"
8
"
class=
"d-flex justify-space-around align-baseline"
>
<v-col
cols=
"12"
sm=
"
6
"
class=
"d-flex justify-space-around align-baseline"
>
<v-combobox
<v-combobox
v-model=
"selectedDevice"
v-model=
"selectedDevice"
:items=
"deviceCodeItems"
:items=
"deviceCodeItems"
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
class=
"ma-4"
class=
"ma-4"
item-text=
"Text"
item-text=
"Text"
item-value=
"Value"
item-value=
"Value"
return-object
>
>
<template
v-if=
"noDataCombo"
v-slot:no-data
>
<template
v-if=
"noDataCombo"
v-slot:no-data
>
<v-list-item>
<v-list-item>
...
@@ -32,14 +33,8 @@
...
@@ -32,14 +33,8 @@
</v-list-item>
</v-list-item>
</
template
>
</
template
>
</v-combobox>
</v-combobox>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"searchPatients()"
:disabled=
"btnDisabled"
>
{{$t('WorkList.seachBtn')}}
</v-btn>
</v-col>
</v-col>
<v-col
cols=
"12"
sm=
"
4"
class=
"d-flex justify-space-around align-center
"
>
<v-col
cols=
"12"
sm=
"
6"
class=
"d-flex justify-space-around align-center flex-wrap
"
>
<v-btn
color=
"success"
text
@
click=
"toggleAllOrUnknown=0"
>
<v-btn
color=
"success"
text
@
click=
"toggleAllOrUnknown=0"
>
<v-icon
left
v-if=
"toggleAllOrUnknown==0"
>
done
</v-icon>
<v-icon
left
v-if=
"toggleAllOrUnknown==0"
>
done
</v-icon>
<strong>
{{$t("WorkList.AllBtn")}}
</strong>
<strong>
{{$t("WorkList.AllBtn")}}
</strong>
...
@@ -72,16 +67,38 @@
...
@@ -72,16 +67,38 @@
disable-pagination
disable-pagination
:sort-by
.
sync=
"sortByTable"
:sort-by
.
sync=
"sortByTable"
:sort-desc
.
sync=
"sortDescTable"
:sort-desc
.
sync=
"sortDescTable"
height=
"
550
"
height=
"
61vh
"
>
>
<
template
v-slot:top
>
<
template
v-slot:top
>
<div>
<v-progress-linear
:active=
"fetchWorklistLoading"
:indeterminate=
"fetchWorklistLoading"
color=
"cyan lighten-2"
></v-progress-linear>
</div>
<v-toolbar
flat
color=
"white"
>
<v-toolbar
flat
color=
"white"
>
<
v-toolbar-title>
{{
devicemap
==
""
?
$t
(
"WorkList.noDevicemap"
):
devicemap
}}
</v-toolbar-title
>
<
!--
<v-toolbar-title>
{{
devicemap
==
""
?
$t
(
"WorkList.noDevicemap"
):
devicemap
}}
</v-toolbar-title>
--
>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"editPatients()"
>
<v-icon
small
left
>
edit
</v-icon>
<strong>
{{
$t
(
'WorkList.editBtn'
)
}}
</strong>
</v-btn>
<v-divider
class=
"mx-4"
inset
vertical
></v-divider>
<v-divider
class=
"mx-4"
inset
vertical
></v-divider>
<v-dialog
v-model=
"editDialog"
max-width=
"900px"
>
<v-dialog
v-model=
"editDialog"
max-width=
"900px"
>
<v-card
class=
"grey lighten-4"
>
<v-card
class=
"grey lighten-4"
>
<v-progress-linear
:active=
"editLoading"
:indeterminate=
"editLoading"
absolute
top
color=
"cyan lighten-2"
></v-progress-linear>
<v-card-title>
<v-card-title>
<v-icon
@
click=
"close"
class=
"mr-1"
>
close
</v-icon>
<v-icon
@
click=
"close"
class=
"mr-1"
>
close
</v-icon>
<span
class=
"headline"
>
Edit Patient Information
</span>
<span
class=
"headline"
>
Edit Patient Information
</span>
...
@@ -353,13 +370,25 @@
...
@@ -353,13 +370,25 @@
</v-card-text>
</v-card-text>
<v-card-actions
class=
"justify-center align-center"
>
<v-card-actions
class=
"justify-center align-center"
>
<v-btn
depressed
color=
"blue darken-1"
text
>
<v-btn
depressed
color=
"blue darken-1"
text
@
click=
"prevPatient"
:disabled=
"prevDisabled"
>
<v-icon
color=
"blue darken-1"
>
keyboard_arrow_left
</v-icon>
<v-icon
color=
"blue darken-1"
>
keyboard_arrow_left
</v-icon>
</v-btn>
</v-btn>
<v-btn
color=
"blue darken-1"
text
@
click=
"savePatient"
>
<v-btn
color=
"blue darken-1"
text
@
click=
"savePatient"
>
<v-icon>
save
</v-icon>
<v-icon>
save
</v-icon>
</v-btn>
</v-btn>
<v-btn
depressed
color=
"blue darken-1"
text
>
<v-btn
depressed
color=
"blue darken-1"
text
@
click=
"nextPatient"
:disabled=
"nextDisabled"
>
<v-icon
color=
"blue darken-1"
>
keyboard_arrow_right
</v-icon>
<v-icon
color=
"blue darken-1"
>
keyboard_arrow_right
</v-icon>
</v-btn>
</v-btn>
</v-card-actions>
</v-card-actions>
...
@@ -367,9 +396,9 @@
...
@@ -367,9 +396,9 @@
</v-dialog>
</v-dialog>
</v-toolbar>
</v-toolbar>
</
template
>
</
template
>
<
template
v-slot:item
.
Action=
"{ item }"
>
<
!-- <
template v-slot:item.Action="{ item }">
<v-icon small @click="editPatients(item)">edit</v-icon>
<v-icon small @click="editPatients(item)">edit</v-icon>
</
template
>
</template>
-->
</v-data-table>
</v-data-table>
</v-col>
</v-col>
</v-row>
</v-row>
...
@@ -385,10 +414,9 @@ export default {
...
@@ -385,10 +414,9 @@ export default {
searchPatients
()
{
searchPatients
()
{
if
(
this
.
selectedDevice
&&
this
.
devicemap
!=
this
.
selectedDevice
.
Value
)
{
if
(
this
.
selectedDevice
&&
this
.
devicemap
!=
this
.
selectedDevice
.
Value
)
{
let
self
=
this
;
let
self
=
this
;
this
.
btnDisabled
=
true
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Value
,
function
()
{
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Value
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
Value
;
self
.
devicemap
=
self
.
selectedDevice
.
Value
;
self
.
btnDisabled
=
false
;
});
});
}
}
...
@@ -397,6 +425,15 @@ export default {
...
@@ -397,6 +425,15 @@ export default {
}
}
},
},
editPatients
(
item
)
{
editPatients
(
item
)
{
if
(
item
==
undefined
)
{
var
item
=
this
.
selectedItem
;
if
(
this
.
selectedPatientInTable
==
undefined
||
this
.
selectedPatientInTable
.
length
==
0
)
return
;
}
this
.
editedItemParts
=
{
this
.
editedItemParts
=
{
EnglishFirstNameParts0
:
""
,
EnglishFirstNameParts0
:
""
,
EnglishFirstNameParts1
:
""
,
EnglishFirstNameParts1
:
""
,
...
@@ -435,7 +472,42 @@ export default {
...
@@ -435,7 +472,42 @@ export default {
close
()
{
close
()
{
this
.
editDialog
=
false
;
this
.
editDialog
=
false
;
},
},
nextPatient
()
{
let
index
=
this
.
sortedItems
.
findIndex
(
patient
=>
patient
.
_id
==
this
.
selectedItem
.
_id
);
this
.
nextDisabled
=
false
;
this
.
prevDisabled
=
false
;
if
(
index
==
-
1
)
this
.
prevDisabled
=
true
;
if
(
index
==
this
.
sortedItems
.
length
-
2
)
this
.
nextDisabled
=
true
;
if
(
index
+
1
>
this
.
sortedItems
.
length
-
1
)
{
this
.
nextDisabled
=
true
;
return
;
}
this
.
editPatients
(
this
.
sortedItems
[
index
+
1
]);
},
prevPatient
()
{
let
index
=
this
.
sortedItems
.
findIndex
(
patient
=>
patient
.
_id
==
this
.
selectedItem
.
_id
);
this
.
nextDisabled
=
false
;
this
.
prevDisabled
=
false
;
if
(
index
==
-
1
)
{
index
=
1
;
this
.
prevDisabled
=
true
;
}
index
==
0
?
(
this
.
prevDisabled
=
true
)
:
""
;
if
(
index
-
1
<
0
)
{
this
.
prevDisabled
=
true
;
return
;
}
this
.
editPatients
(
this
.
sortedItems
[
index
-
1
]);
},
savePatient
()
{
savePatient
()
{
debugger
;
debugger
;
this
.
selectedItem
.
EnglishFirstNameParts
=
[
this
.
selectedItem
.
EnglishFirstNameParts
=
[
...
@@ -469,8 +541,14 @@ export default {
...
@@ -469,8 +541,14 @@ export default {
].
filter
(
elm
=>
{
].
filter
(
elm
=>
{
return
elm
&&
elm
.
length
>
0
;
return
elm
&&
elm
.
length
>
0
;
});
});
this
.
editLoading
=
true
;
Meteor
.
call
(
"EditworklistItem"
,
this
.
selectedItem
,
function
(
error
)
{
let
self
=
this
;
Meteor
.
call
(
"EditworklistItem"
,
this
.
selectedItem
,
function
(
error
,
result
)
{
self
.
editLoading
=
false
;
console
.
log
(
result
);
//alert(error);
//alert(error);
});
});
}
}
...
@@ -479,13 +557,17 @@ export default {
...
@@ -479,13 +557,17 @@ export default {
devicemap
:
""
,
devicemap
:
""
,
selectedDevice
:
undefined
,
selectedDevice
:
undefined
,
deviceComboSearch
:
null
,
deviceComboSearch
:
null
,
btnDisabled
:
false
,
noDataCombo
:
true
,
noDataCombo
:
true
,
toggleAllOrUnknown
:
0
,
toggleAllOrUnknown
:
0
,
selectedPatientInTable
:
undefined
,
selectedPatientInTable
:
undefined
,
sortByTable
:
undefined
,
sortByTable
:
undefined
,
sortDescTable
:
undefined
,
sortDescTable
:
undefined
,
editDialog
:
false
,
editDialog
:
false
,
editLoading
:
false
,
prevDisabled
:
false
,
nextDisabled
:
false
,
fetchWorklistLoading
:
false
,
editedItemParts
:
{
editedItemParts
:
{
EnglishFirstNameParts0
:
"EnglishFirstNameParts0"
,
EnglishFirstNameParts0
:
"EnglishFirstNameParts0"
,
EnglishFirstNameParts1
:
"EnglishFirstNameParts1"
,
EnglishFirstNameParts1
:
"EnglishFirstNameParts1"
,
...
@@ -537,11 +619,11 @@ export default {
...
@@ -537,11 +619,11 @@ export default {
class
:
"text-center"
class
:
"text-center"
});
});
}
}
headers
.
unshift
({
//
headers.unshift({
text
:
"Action"
,
//
text: "Action",
value
:
"Action"
,
//
value: "Action",
class
:
"text-center"
//
class: "text-center"
});
//
});
return
headers
;
return
headers
;
}
}
return
[];
return
[];
...
@@ -556,7 +638,6 @@ export default {
...
@@ -556,7 +638,6 @@ export default {
);
);
});
});
}
}
return
this
.
worklist
;
return
this
.
worklist
;
}
}
return
[];
return
[];
...
@@ -580,8 +661,19 @@ export default {
...
@@ -580,8 +661,19 @@ export default {
worklist
:
(
newWorklist
,
oldWorklist
)
=>
{
worklist
:
(
newWorklist
,
oldWorklist
)
=>
{
console
.
log
(
newWorklist
);
console
.
log
(
newWorklist
);
},
},
"$subReady.worklist"
(
ready
)
{
"$subReady.worklist"
(
ready
)
{},
this
.
btnDisabled
=
!
ready
;
selectedDevice
(
newDevice
,
oldDevice
)
{
if
(
this
.
selectedDevice
&&
this
.
selectedDevice
.
Value
)
{
let
self
=
this
;
this
.
fetchWorklistLoading
=
true
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Value
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
Value
;
self
.
fetchWorklistLoading
=
false
;
});
}
// } else {
// alert("لطفا یکی از دستگاه ها را انتخاب نمایید");
// }
},
},
selectedPatientInTable
(
newSelected
,
oldSelected
)
{
selectedPatientInTable
(
newSelected
,
oldSelected
)
{
if
(
this
.
sortByTable
&&
this
.
sortByTable
.
length
>
0
)
{
if
(
this
.
sortByTable
&&
this
.
sortByTable
.
length
>
0
)
{
...
@@ -604,6 +696,10 @@ export default {
...
@@ -604,6 +696,10 @@ export default {
}
else
{
}
else
{
this
.
sortedItems
=
this
.
patientsOfTable
;
this
.
sortedItems
=
this
.
patientsOfTable
;
}
}
if
(
newSelected
)
{
this
.
selectedItem
=
newSelected
[
0
];
}
}
}
}
}
};
};
...
@@ -612,7 +708,7 @@ export default {
...
@@ -612,7 +708,7 @@ export default {
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.wholeLayout {
.wholeLayout {
height: calc(~"
98
vh - 106px");
height: calc(~"
75
vh - 106px");
}
}
td,
td,
th {
th {
...
...
client/plugins/i18n.js
View file @
c0f88371
...
@@ -63,7 +63,7 @@ const messages = {
...
@@ -63,7 +63,7 @@ const messages = {
WorkList
:
{
WorkList
:
{
deviceComboboxLabel
:
'please select a device'
,
deviceComboboxLabel
:
'please select a device'
,
deviceComboboxNoDataMatch
:
'No results matching'
,
deviceComboboxNoDataMatch
:
'No results matching'
,
seachBtn
:
'search
'
,
editBtn
:
'edit
'
,
deviceComboboxNoDataMatch1
:
''
,
deviceComboboxNoDataMatch1
:
''
,
AllBtn
:
"All"
,
AllBtn
:
"All"
,
UnknownBtn
:
"Correction Needed"
,
UnknownBtn
:
"Correction Needed"
,
...
@@ -131,7 +131,7 @@ const messages = {
...
@@ -131,7 +131,7 @@ const messages = {
WorkList
:
{
WorkList
:
{
deviceComboboxLabel
:
'لطفا یک دستگاه را انتخاب نمایید'
,
deviceComboboxLabel
:
'لطفا یک دستگاه را انتخاب نمایید'
,
deviceComboboxNoDataMatch
:
'هیچ نتیجه ای برابر با'
,
deviceComboboxNoDataMatch
:
'هیچ نتیجه ای برابر با'
,
seachBtn
:
'جستجو
'
,
editBtn
:
'ویرایش
'
,
deviceComboboxNoDataMatch1
:
'یافت نشد'
,
deviceComboboxNoDataMatch1
:
'یافت نشد'
,
AllBtn
:
"همه"
,
AllBtn
:
"همه"
,
UnknownBtn
:
"نیازمند اصلاح"
,
UnknownBtn
:
"نیازمند اصلاح"
,
...
...
imports/api/methods/worklist.js
View file @
c0f88371
...
@@ -20,14 +20,9 @@ Meteor.methods({
...
@@ -20,14 +20,9 @@ Meteor.methods({
this
.
unblock
();
this
.
unblock
();
if
(
this
.
userId
)
{
if
(
this
.
userId
)
{
try
{
try
{
const
result
=
HTTP
.
call
(
'GET'
,
`http://192.168.0.156/Broker/HISIntegration.svc/rest/Fetchworklist/
${
devicemap
}
`
);
const
result
=
HTTP
.
call
(
'GET'
,
`http://192.168.0.156/Broker/HISIntegration.svc/rest/Fetchworklist/
${
devicemap
}
`
);
let
worklistHttp
=
JSON
.
parse
(
result
.
content
);
let
worklistHttp
=
JSON
.
parse
(
result
.
content
);
Worklist
.
remove
({
_userid
:
this
.
userId
,
_devicemap
:
devicemap
});
Worklist
.
remove
({
_userid
:
this
.
userId
,
_devicemap
:
devicemap
});
worklistHttp
.
WorkListItems
.
forEach
((
patient
)
=>
{
worklistHttp
.
WorkListItems
.
forEach
((
patient
)
=>
{
Worklist
.
insert
({
Worklist
.
insert
({
...
patient
,
...
patient
,
...
@@ -35,7 +30,6 @@ Meteor.methods({
...
@@ -35,7 +30,6 @@ Meteor.methods({
_devicemap
:
devicemap
_devicemap
:
devicemap
});
});
})
})
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
...
...
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