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
c540a96f
Commit
c540a96f
authored
Feb 09, 2020
by
Reza Sahebgharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(add register panel): add register panel to siderbar
parent
2332ff54
Pipeline
#1035
passed with stage
in 35 minutes and 43 seconds
Changes
21
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
390 additions
and
182 deletions
+390
-182
packages
.meteor/packages
+1
-0
versions
.meteor/versions
+1
-0
first.test.js
__test__/first.test.js
+1
-1
Client.vue
client/components/Client.vue
+2
-2
DeviceMap.vue
client/components/DeviceMap.vue
+2
-2
HisLink.vue
client/components/HisLink.vue
+41
-18
HisWorklist.vue
client/components/HisWorklist.vue
+31
-2
RegisterRoute.vue
client/components/RegisterRoute.vue
+223
-0
UserSetting.vue
client/components/UserSetting.vue
+2
-2
Users.vue
client/components/Users.vue
+4
-4
Worklist.vue
client/components/Worklist.vue
+7
-7
i18n.js
client/plugins/i18n.js
+18
-13
routes.js
client/plugins/routes.js
+12
-98
Main.vue
client/views/Main.vue
+11
-3
worklist4hislink.js
imports/api/collections/worklist4hislink.js
+14
-15
changePassword.js
imports/api/methods/changePassword.js
+1
-1
users.js
imports/api/methods/users.js
+7
-7
worklist.js
imports/api/methods/worklist.js
+2
-2
clients.js
imports/api/server/publications/clients.js
+1
-1
devicemap.js
imports/api/server/publications/devicemap.js
+1
-1
worklist4hislink.js
imports/api/server/publications/worklist4hislink.js
+8
-3
No files found.
.meteor/packages
View file @
c540a96f
...
@@ -16,3 +16,4 @@ accounts-password@1.5.2
...
@@ -16,3 +16,4 @@ accounts-password@1.5.2
ardatan:webpack
ardatan:webpack
ardatan:webpack-dev-middleware
ardatan:webpack-dev-middleware
tmeasday:publish-counts
.meteor/versions
View file @
c540a96f
...
@@ -62,6 +62,7 @@ sha@1.0.9
...
@@ -62,6 +62,7 @@ sha@1.0.9
shell-server@0.4.0
shell-server@0.4.0
socket-stream-client@0.2.2
socket-stream-client@0.2.2
srp@1.0.12
srp@1.0.12
tmeasday:publish-counts@0.8.0
tracker@1.2.0
tracker@1.2.0
underscore@1.0.10
underscore@1.0.10
url@1.2.0
url@1.2.0
...
...
__test__/first.test.js
View file @
c540a96f
...
@@ -25,7 +25,7 @@ afterEach(() => {
...
@@ -25,7 +25,7 @@ afterEach(() => {
describe
(
'AppFooter'
,
()
=>
{
describe
(
'AppFooter'
,
()
=>
{
test
(
'is a Vue instance'
,
()
=>
{
test
(
'is a Vue instance'
,
()
=>
{
debugger
expect
(
wrapper
.
isVueInstance
).
toBeTruthy
();
expect
(
wrapper
.
isVueInstance
).
toBeTruthy
();
});
});
...
...
client/components/Client.vue
View file @
c540a96f
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<v-text-field
<v-text-field
v-model=
"search"
v-model=
"search"
append-icon=
"search"
append-icon=
"search"
label=
"Search
"
:label=
"$t('DataTableSearch')
"
single-line
single-line
hide-details
hide-details
style=
"width:400px"
style=
"width:400px"
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
single-select
single-select
:sort-by
.
sync=
"sortByTable"
:sort-by
.
sync=
"sortByTable"
:sort-desc
.
sync=
"sortDescTable"
:sort-desc
.
sync=
"sortDescTable"
height=
"
73
vh"
height=
"
62
vh"
@
click:row=
"clickRow"
@
click:row=
"clickRow"
:search=
"search"
:search=
"search"
></v-data-table>
></v-data-table>
...
...
client/components/DeviceMap.vue
View file @
c540a96f
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
<v-text-field
<v-text-field
v-model=
"search"
v-model=
"search"
append-icon=
"search"
append-icon=
"search"
label=
"Search
"
:label=
"$t('DataTableSearch')
"
single-line
single-line
hide-details
hide-details
style=
"width:400px"
style=
"width:400px"
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
single-select
single-select
:sort-by
.
sync=
"sortByTable"
:sort-by
.
sync=
"sortByTable"
:sort-desc
.
sync=
"sortDescTable"
:sort-desc
.
sync=
"sortDescTable"
height=
"
73
vh"
height=
"
62
vh"
@
click:row=
"clickRow"
@
click:row=
"clickRow"
:search=
"search"
:search=
"search"
></v-data-table>
></v-data-table>
...
...
client/components/HisLink.vue
View file @
c540a96f
...
@@ -108,13 +108,28 @@
...
@@ -108,13 +108,28 @@
>
>
<strong>
{{
$t
(
"HISLink.editBtn"
)
}}
</strong>
<strong>
{{
$t
(
"HISLink.editBtn"
)
}}
</strong>
</v-btn>
</v-btn>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"deleteSnackbar"
:disabled=
"this.selectedItemInTable.length == 0"
>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"deleteSnackbar"
:disabled=
"this.selectedItemInTable.length == 0"
>
<strong>
{{
$t
(
"HISLink.deleteBtn"
)
}}
</strong>
<strong>
{{
$t
(
"HISLink.deleteBtn"
)
}}
</strong>
</v-btn>
</v-btn>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"activeHislink"
:disabled=
"this.selectedItemInTable.length == 0"
>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"activeHislink"
:disabled=
"this.selectedItemInTable.length == 0"
>
<strong>
{{
$t
(
"HISLink.activeBtn"
)
}}
</strong>
<strong>
{{
$t
(
"HISLink.activeBtn"
)
}}
</strong>
</v-btn>
</v-btn>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"deactiveHislink"
:disabled=
"this.selectedItemInTable.length == 0"
>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"deactiveHislink"
:disabled=
"this.selectedItemInTable.length == 0"
>
<strong>
{{
$t
(
"HISLink.deactiveBtn"
)
}}
</strong>
<strong>
{{
$t
(
"HISLink.deactiveBtn"
)
}}
</strong>
</v-btn>
</v-btn>
<v-btn
<v-btn
...
@@ -125,7 +140,12 @@
...
@@ -125,7 +140,12 @@
>
>
<strong>
{{
$t
(
"HISLink.authenticateBtn"
)
}}
</strong>
<strong>
{{
$t
(
"HISLink.authenticateBtn"
)
}}
</strong>
</v-btn>
</v-btn>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"getWorklist"
:disabled=
"this.selectedItemInTable.length == 0"
>
<v-btn
color=
"rgb(94, 181, 177,.85)"
class=
"white--text"
@
click=
"getWorklist"
:disabled=
"this.selectedItemInTable.length == 0"
>
<strong>
{{
$t
(
"HISLink.getWorklistBtn"
)
}}
</strong>
<strong>
{{
$t
(
"HISLink.getWorklistBtn"
)
}}
</strong>
</v-btn>
</v-btn>
</v-col>
</v-col>
...
@@ -142,7 +162,7 @@
...
@@ -142,7 +162,7 @@
<v-text-field
<v-text-field
v-model=
"search"
v-model=
"search"
append-icon=
"search"
append-icon=
"search"
label=
"Search
"
:label=
"$t('DataTableSearch')
"
single-line
single-line
hide-details
hide-details
style=
"width:400px"
style=
"width:400px"
...
@@ -163,29 +183,29 @@
...
@@ -163,29 +183,29 @@
single-select
single-select
:sort-by
.
sync=
"sortByTable"
:sort-by
.
sync=
"sortByTable"
:sort-desc
.
sync=
"sortDescTable"
:sort-desc
.
sync=
"sortDescTable"
height=
"
73
vh"
height=
"
62
vh"
@
click:row=
"clickRow"
@
click:row=
"clickRow"
:search=
"search"
:search=
"search"
></v-data-table>
></v-data-table>
</v-card>
</v-card>
</v-col>
</v-col>
</v-row>
</v-row>
<his-worklist
<
!--
<
his-worklist
:HisWorklistDialogProp=
"HisWorklistDialog"
:HisWorklistDialogProp=
"HisWorklistDialog"
:closeDialog=
"closeHisWorklistMethod"
:closeDialog=
"closeHisWorklistMethod"
:selectedBrand=
"selectedBrand"
:selectedBrand=
"selectedBrand"
></his-worklist>
></his-worklist>
-->
</v-container>
</v-container>
</
template
>
</
template
>
<
script
>
<
script
>
import
HisLink
from
"../../imports/api/collections/hislink.js"
;
import
HisLink
from
"../../imports/api/collections/hislink.js"
;
import
Brands
from
"../../imports/api/collections/brands.js"
;
import
Brands
from
"../../imports/api/collections/brands.js"
;
import
{
Meteor
}
from
"meteor/meteor"
;
import
{
Meteor
}
from
"meteor/meteor"
;
import
HisWorklist
from
"./HisWorklist.vue"
;
//
import HisWorklist from "./HisWorklist.vue";
export
default
{
export
default
{
components
:
{
//
components: {
HisWorklist
//
HisWorklist
},
//
},
data
()
{
data
()
{
return
{
return
{
sortByTable
:
undefined
,
sortByTable
:
undefined
,
...
@@ -212,7 +232,7 @@ export default {
...
@@ -212,7 +232,7 @@ export default {
alertSnackbar
:
false
,
alertSnackbar
:
false
,
alertText
:
""
,
alertText
:
""
,
loading
:
false
,
loading
:
false
,
HisWorklistDialog
:
false
,
//
HisWorklistDialog: false,
selectedBrand
:
null
,
selectedBrand
:
null
,
search
:
""
search
:
""
};
};
...
@@ -264,10 +284,10 @@ export default {
...
@@ -264,10 +284,10 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
closeHisWorklistMethod
()
{
//
closeHisWorklistMethod() {
this
.
HisWorklistDialog
=
false
;
//
this.HisWorklistDialog = false;
this
.
selectedBrand
=
null
;
//
this.selectedBrand = null;
},
//
},
clickRow
(
item
)
{
clickRow
(
item
)
{
if
(
if
(
this
.
selectedItemInTable
.
length
>
0
&&
this
.
selectedItemInTable
.
length
>
0
&&
...
@@ -418,7 +438,10 @@ export default {
...
@@ -418,7 +438,10 @@ export default {
let
Brand
=
this
.
selectedItemInTable
[
0
].
Brand
;
let
Brand
=
this
.
selectedItemInTable
[
0
].
Brand
;
this
.
selectedBrand
=
Brand
;
this
.
selectedBrand
=
Brand
;
this
.
HisWorklistDialog
=
true
;
this
.
$router
.
push
({
name
:
"register"
,
params
:
{
selectedBrand
:
Brand
}
});
// this.HisWorklistDialog = true;
}
}
},
},
meteor
:
{
meteor
:
{
...
...
client/components/HisWorklist.vue
View file @
c540a96f
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
</v-row>
-->
</v-row>
-->
<v-row
dense
>
<v-row
dense
>
<v-data-table
<v-data-table
ref=
"patientsDatatable"
:headers=
"headerOfTable"
:headers=
"headerOfTable"
:items=
"itemsOfTable"
:items=
"itemsOfTable"
item-key=
"_id"
item-key=
"_id"
...
@@ -30,6 +31,8 @@
...
@@ -30,6 +31,8 @@
fixed-header
fixed-header
disable-sort
disable-sort
height=
"600px"
height=
"600px"
disable-pagination
hide-default-footer
></v-data-table>
></v-data-table>
</v-row>
</v-row>
</v-card>
</v-card>
...
@@ -46,9 +49,11 @@ export default {
...
@@ -46,9 +49,11 @@ export default {
props
:
[
"HisWorklistDialogProp"
,
"closeDialog"
,
"selectedBrand"
],
props
:
[
"HisWorklistDialogProp"
,
"closeDialog"
,
"selectedBrand"
],
data
:
()
=>
({
data
:
()
=>
({
HisWorklistLoading
:
false
,
HisWorklistLoading
:
false
,
HisWorklistDialog
:
false
HisWorklistDialog
:
false
,
limit
:
15
// selectedBrand: null
// selectedBrand: null
}),
}),
mounted
()
{},
computed
:
{
computed
:
{
itemsOfBrands
()
{
itemsOfBrands
()
{
if
(
this
.
brands
&&
this
.
brands
.
length
>
0
)
{
if
(
this
.
brands
&&
this
.
brands
.
length
>
0
)
{
...
@@ -92,6 +97,14 @@ export default {
...
@@ -92,6 +97,14 @@ export default {
watch
:
{
watch
:
{
"$subReady.worklist4hislink"
(
ready
)
{
"$subReady.worklist4hislink"
(
ready
)
{
this
.
HisWorklistLoading
=
false
;
this
.
HisWorklistLoading
=
false
;
if
(
this
.
$refs
.
patientsDatatable
)
{
this
.
$refs
.
patientsDatatable
.
$el
.
querySelector
(
".v-data-table__wrapper"
)
.
removeEventListener
(
"scroll"
,
this
.
onScroll
);
this
.
$refs
.
patientsDatatable
.
$el
.
querySelector
(
".v-data-table__wrapper"
)
.
addEventListener
(
"scroll"
,
this
.
onScroll
);
}
},
},
HisWorklistDialog
(
newvalue
,
oldvalue
)
{
HisWorklistDialog
(
newvalue
,
oldvalue
)
{
if
(
newvalue
==
false
)
{
if
(
newvalue
==
false
)
{
...
@@ -107,13 +120,29 @@ export default {
...
@@ -107,13 +120,29 @@ export default {
methods
:
{
methods
:
{
internalCloseDialog
()
{
internalCloseDialog
()
{
this
.
HisWorklistDialog
=
false
;
this
.
HisWorklistDialog
=
false
;
},
onScroll
(
e
)
{
this
.
offsetTop
=
e
.
target
.
scrollTop
;
let
element
=
this
.
$refs
.
patientsDatatable
.
$el
.
querySelector
(
".v-data-table__wrapper"
);
var
scrollHeight
=
element
.
scrollHeight
;
var
divHeight
=
element
.
clientHeight
;
var
scrollerEndPoint
=
scrollHeight
-
divHeight
;
var
divScrollerTop
=
e
.
target
.
scrollTop
;
if
(
divScrollerTop
===
scrollerEndPoint
)
{
this
.
limit
+=
10
;
}
}
}
},
},
meteor
:
{
meteor
:
{
$subscribe
:
{
$subscribe
:
{
// brands: [],
// brands: [],
worklist4hislink
:
function
()
{
worklist4hislink
:
function
()
{
return
[
this
.
selectedBrand
];
console
.
log
(
true
);
this
.
HisWorklistLoading
=
true
;
return
[{
brand
:
this
.
selectedBrand
,
limit
:
this
.
limit
}];
}
}
},
},
// brands() {
// brands() {
...
...
client/components/RegisterRoute.vue
0 → 100644
View file @
c540a96f
<
template
>
<v-container>
<!--
<v-snackbar
color=
"primary"
v-model=
"snackbar"
top
>
{{
$t
(
"Client.DeleteMessage"
)
}}
<v-btn
color=
"pink"
@
click=
"deleteClient"
>
{{
$t
(
"Client.YesBtn"
)
}}
</v-btn>
<v-btn
color=
"pink"
@
click=
"snackbar = false"
>
{{
$t
(
"Client.NoBtn"
)
}}
</v-btn>
</v-snackbar>
<v-snackbar
color=
"primary"
v-model=
"alertSnackbar"
:timeout=
"2000"
>
{{
alertText
}}
</v-snackbar>
-->
<v-row
justify=
"center"
dense
class=
"flex-wrap mb-6"
>
<v-col
md=
"7"
lg=
"6"
cols=
"12"
>
<v-card
tile
>
<v-card-actions>
<v-row
style=
"margin:auto"
class=
"justify-center align-center flex-wrap"
>
<v-col
cols=
"6"
>
<v-autocomplete
:items=
"itemsOfHISLinks"
:label=
"$t('RegisterRoute.HISLinkCombo')"
v-model=
"selectedBrand"
item-text=
"Name"
item-value=
"Brand"
></v-autocomplete>
</v-col>
</v-row>
</v-card-actions>
</v-card>
</v-col>
</v-row>
<v-row
justify=
"center"
dense
class=
"flex-wrap mt-6"
>
<v-col
md=
"9"
cols=
"12"
>
<v-card
class=
"justify-center"
>
<v-progress-linear
:active=
"HisWorklistLoading"
:indeterminate=
"HisWorklistLoading"
absolute
top
color=
"cyan lighten-2"
></v-progress-linear>
<v-card-title>
<strong>
{{
worklist4hislink
.
length
}}
/
{{
count
}}
</strong>
<v-spacer></v-spacer>
<v-text-field
v-model=
"search"
append-icon=
"search"
:label=
"$t('DataTableSearch')"
single-line
hide-details
style=
"width:400px"
class=
"flex-grow-0"
></v-text-field>
</v-card-title>
<v-data-table
ref=
"patientsDatatable"
:headers=
"headerOfTable"
:items=
"itemsOfTable"
item-key=
"_id"
class=
"elevation-1"
style=
"width:100%"
fixed-header
disable-sort
:height=
"tableHeight"
disable-pagination
hide-default-footer
:search=
"search"
></v-data-table>
<v-btn
v-if=
"showMore"
class=
"primary"
tile
block
@
click=
"loadMoreFn"
>
{{
$t
(
"RegisterRoute.ShowMoreBtn"
)
}}
</v-btn>
</v-card>
</v-col>
</v-row>
</v-container>
</
template
>
<
script
>
import
HisLink
from
"../../imports/api/collections/hislink.js"
;
import
{
Meteor
}
from
"meteor/meteor"
;
import
BrandCollections
from
"../../imports/api/collections/worklist4hislink.js"
;
import
{
Mongo
}
from
"meteor/mongo"
;
import
{
Counts
}
from
"meteor/tmeasday:publish-counts"
;
export
default
{
data
()
{
return
{
search
:
""
,
selectedBrand
:
null
,
HisWorklistLoading
:
false
,
limit
:
5
,
prevLeft
:
0
,
showMore
:
false
,
tableHeight
:
"62vh"
,
count
:
0
};
},
computed
:
{
itemsOfHISLinks
()
{
if
(
this
.
hislink
&&
this
.
hislink
.
length
>
0
)
{
return
this
.
hislink
;
}
return
[];
},
itemsOfTable
()
{
if
(
this
.
worklist4hislink
&&
this
.
worklist4hislink
.
length
>
0
)
{
let
worklistArray
=
[];
for
(
let
worklist
of
this
.
worklist4hislink
)
{
let
tempWorklist
=
{};
for
(
let
prop
in
worklist
)
{
tempWorklist
[
prop
]
=
JSON
.
stringify
(
worklist
[
prop
]);
}
worklistArray
.
push
(
tempWorklist
);
}
return
worklistArray
;
}
return
[];
},
headerOfTable
()
{
if
(
this
.
worklist4hislink
&&
this
.
worklist4hislink
.
length
>
0
)
{
let
headerNames
=
[];
let
worklist
=
this
.
worklist4hislink
[
0
];
for
(
let
prop
in
worklist
)
{
headerNames
.
push
({
text
:
prop
,
value
:
prop
,
class
:
"text-center"
,
width
:
180
});
}
return
headerNames
;
}
return
[];
}
},
created
()
{
if
(
this
.
$route
.
params
.
selectedBrand
)
this
.
selectedBrand
=
this
.
$route
.
params
.
selectedBrand
;
},
methods
:
{
onScroll
(
e
)
{
let
currentLeft
=
e
.
target
.
scrollLeft
;
if
(
this
.
prevLeft
!=
currentLeft
)
{
this
.
prevLeft
=
currentLeft
;
return
;
}
let
element
=
this
.
$refs
.
patientsDatatable
.
$el
.
querySelector
(
".v-data-table__wrapper"
);
let
scrollHeight
=
element
.
scrollHeight
;
let
divHeight
=
element
.
clientHeight
;
let
scrollerEndPoint
=
scrollHeight
-
divHeight
;
let
divScrollerTop
=
e
.
target
.
scrollTop
;
if
(
divScrollerTop
===
scrollerEndPoint
)
{
this
.
count
=
Counts
.
get
(
"brandCount"
);
if
(
this
.
worklist4hislink
.
length
<
this
.
count
)
{
this
.
limit
+=
5
;
}
}
},
loadMoreFn
()
{
this
.
count
=
Counts
.
get
(
"brandCount"
);
this
.
worklist4hislink
.
length
<
this
.
count
?
(
this
.
limit
+=
5
)
:
""
;
},
checkScrollExistiance
()
{
if
(
this
.
worklist4hislink
&&
this
.
worklist4hislink
.
length
>
0
)
{
let
me
=
this
;
setTimeout
(
function
()
{
let
element
=
me
.
$refs
.
patientsDatatable
.
$el
.
querySelector
(
".v-data-table__wrapper"
);
let
scrollHeight
=
element
.
scrollHeight
;
let
divHeight
=
element
.
clientHeight
;
if
(
divHeight
>=
scrollHeight
)
{
me
.
tableHeight
=
"59vh"
;
me
.
showMore
=
true
;
}
else
{
me
.
tableHeight
=
"62vh"
;
me
.
showMore
=
false
;
}
},
500
);
}
}
},
watch
:
{
"$subReady.worklist4hislink"
(
ready
)
{
this
.
HisWorklistLoading
=
false
;
if
(
this
.
$refs
.
patientsDatatable
)
{
this
.
$refs
.
patientsDatatable
.
$el
.
querySelector
(
".v-data-table__wrapper"
)
.
removeEventListener
(
"scroll"
,
this
.
onScroll
);
this
.
$refs
.
patientsDatatable
.
$el
.
querySelector
(
".v-data-table__wrapper"
)
.
addEventListener
(
"scroll"
,
this
.
onScroll
);
this
.
checkScrollExistiance
();
}
}
},
meteor
:
{
$subscribe
:
{
hislink
:
[],
worklist4hislink
:
function
()
{
this
.
HisWorklistLoading
=
true
;
return
[{
brand
:
this
.
selectedBrand
,
limit
:
this
.
limit
}];
}
},
hislink
()
{
return
HisLink
.
find
({}).
fetch
();
},
worklist4hislink
()
{
if
(
this
.
selectedBrand
==
null
)
return
[];
this
.
count
=
Counts
.
get
(
"brandCount"
);
if
(
BrandCollections
[
this
.
selectedBrand
])
return
BrandCollections
[
this
.
selectedBrand
].
find
({}).
fetch
();
else
{
BrandCollections
[
this
.
selectedBrand
]
=
new
Mongo
.
Collection
(
this
.
selectedBrand
);
return
BrandCollections
[
this
.
selectedBrand
].
find
({}).
fetch
();
}
}
}
};
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
client/components/UserSetting.vue
View file @
c540a96f
...
@@ -91,7 +91,7 @@ export default {
...
@@ -91,7 +91,7 @@ export default {
this
.
alertSnackbar
=
true
;
this
.
alertSnackbar
=
true
;
},
},
saveUserProfile
()
{
saveUserProfile
()
{
debugger
;
;
this
.
loading
=
true
;
this
.
loading
=
true
;
if
(
this
.
newSelectedLang
==
null
||
this
.
newSelectedLang
==
undefined
)
{
if
(
this
.
newSelectedLang
==
null
||
this
.
newSelectedLang
==
undefined
)
{
this
.
alertSnackbarMethod
(
this
.
$t
(
"UserSetting.chooseLanguage"
));
this
.
alertSnackbarMethod
(
this
.
$t
(
"UserSetting.chooseLanguage"
));
...
@@ -163,7 +163,7 @@ export default {
...
@@ -163,7 +163,7 @@ export default {
},
},
selectedLang
:
{
selectedLang
:
{
get
()
{
get
()
{
debugger
;
;
if
(
this
.
users
&&
this
.
users
.
length
>
0
)
{
if
(
this
.
users
&&
this
.
users
.
length
>
0
)
{
this
.
newSelectedLang
=
this
.
users
[
0
].
profile
.
language
;
this
.
newSelectedLang
=
this
.
users
[
0
].
profile
.
language
;
return
this
.
users
[
0
].
profile
.
language
;
return
this
.
users
[
0
].
profile
.
language
;
...
...
client/components/Users.vue
View file @
c540a96f
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
<v-text-field
<v-text-field
v-model=
"search"
v-model=
"search"
append-icon=
"search"
append-icon=
"search"
label=
"Search
"
:label=
"$t('DataTableSearch')
"
single-line
single-line
hide-details
hide-details
style=
"width:400px"
style=
"width:400px"
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
single-select
single-select
:sort-by
.
sync=
"sortByTable"
:sort-by
.
sync=
"sortByTable"
:sort-desc
.
sync=
"sortDescTable"
:sort-desc
.
sync=
"sortDescTable"
height=
"
73
vh"
height=
"
62
vh"
@
click:row=
"clickRow"
@
click:row=
"clickRow"
:search=
"search"
:search=
"search"
></v-data-table>
></v-data-table>
...
@@ -277,7 +277,7 @@ export default {
...
@@ -277,7 +277,7 @@ export default {
createOrEditUser
()
{
createOrEditUser
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
let
me
=
this
;
let
me
=
this
;
debugger
;
if
(
this
.
newOrEdit
==
"new"
)
{
if
(
this
.
newOrEdit
==
"new"
)
{
const
username
=
this
.
UserForm
.
username
;
const
username
=
this
.
UserForm
.
username
;
const
password
=
this
.
UserForm
.
password
;
const
password
=
this
.
UserForm
.
password
;
...
@@ -390,7 +390,7 @@ export default {
...
@@ -390,7 +390,7 @@ export default {
}
}
},
},
deleteUser
()
{
deleteUser
()
{
debugger
;
let
me
=
this
;
let
me
=
this
;
this
.
snackbar
=
false
;
this
.
snackbar
=
false
;
if
(
this
.
selectedItemInTable
.
length
==
0
)
{
if
(
this
.
selectedItemInTable
.
length
==
0
)
{
...
...
client/components/Worklist.vue
View file @
c540a96f
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
<v-text-field
<v-text-field
v-model=
"search"
v-model=
"search"
append-icon=
"search"
append-icon=
"search"
label=
"Search
"
:label=
"$t('DataTableSearch')
"
single-line
single-line
hide-details
hide-details
style=
"width:400px"
style=
"width:400px"
...
@@ -523,7 +523,7 @@
...
@@ -523,7 +523,7 @@
import
Worklist
from
"../../imports/api/collections/worklist.js"
;
import
Worklist
from
"../../imports/api/collections/worklist.js"
;
import
Clients
from
"../../imports/api/collections/clients.js"
;
import
Clients
from
"../../imports/api/collections/clients.js"
;
import
HisWorklist
from
"./HisWorklist.vue"
;
//
import HisWorklist from "./HisWorklist.vue";
export
default
{
export
default
{
methods
:
{
methods
:
{
...
@@ -557,7 +557,7 @@ export default {
...
@@ -557,7 +557,7 @@ export default {
// this.$set(item, "selected", true);
// this.$set(item, "selected", true);
},
},
searchPatients
()
{
searchPatients
()
{
debugger
;
if
(
if
(
this
.
selectedDevice
&&
this
.
selectedDevice
&&
this
.
devicemap
!=
this
.
selectedDevice
.
Caption
this
.
devicemap
!=
this
.
selectedDevice
.
Caption
...
@@ -660,7 +660,7 @@ export default {
...
@@ -660,7 +660,7 @@ export default {
this
.
activerow
(
this
.
sortedItems
[
index
-
1
]);
this
.
activerow
(
this
.
sortedItems
[
index
-
1
]);
},
},
savePatient
()
{
savePatient
()
{
debugger
;
this
.
selectedItem
.
EnglishFirstNameParts
=
[
this
.
selectedItem
.
EnglishFirstNameParts
=
[
this
.
editedItemParts
.
EnglishFirstNameParts0
,
this
.
editedItemParts
.
EnglishFirstNameParts0
,
this
.
editedItemParts
.
EnglishFirstNameParts1
,
this
.
editedItemParts
.
EnglishFirstNameParts1
,
...
@@ -694,7 +694,7 @@ export default {
...
@@ -694,7 +694,7 @@ export default {
});
});
let
{
selected
,
...
selectedItemClone
}
=
this
.
selectedItem
;
let
{
selected
,
...
selectedItemClone
}
=
this
.
selectedItem
;
debugger
;
this
.
editLoading
=
true
;
this
.
editLoading
=
true
;
let
self
=
this
;
let
self
=
this
;
Meteor
.
call
(
"EditworklistItem"
,
selectedItemClone
,
function
(
Meteor
.
call
(
"EditworklistItem"
,
selectedItemClone
,
function
(
...
@@ -736,7 +736,8 @@ export default {
...
@@ -736,7 +736,8 @@ export default {
},
},
selectedItem
:
undefined
,
selectedItem
:
undefined
,
sortedItems
:
undefined
,
sortedItems
:
undefined
,
search
:
""
search
:
""
,
offsetTop
:
0
}),
}),
computed
:
{
computed
:
{
clientsItems
()
{
clientsItems
()
{
...
@@ -817,7 +818,6 @@ export default {
...
@@ -817,7 +818,6 @@ export default {
this
.
fetchWorklistLoading
=
true
;
this
.
fetchWorklistLoading
=
true
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Caption
,
function
()
{
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Caption
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
Caption
;
self
.
devicemap
=
self
.
selectedDevice
.
Caption
;
console
.
log
(
self
.
devicemap
);
self
.
fetchWorklistLoading
=
false
;
self
.
fetchWorklistLoading
=
false
;
});
});
}
}
...
...
client/plugins/i18n.js
View file @
c540a96f
...
@@ -160,15 +160,15 @@ const messages = {
...
@@ -160,15 +160,15 @@ const messages = {
Client
:
"Client"
,
Client
:
"Client"
,
Users
:
"Users"
,
Users
:
"Users"
,
Setting
:
"Setting"
,
Setting
:
"Setting"
,
Signout
:
"Signout"
,
Register
:
"Register"
},
RegisterRoute
:
{
HISLinkCombo
:
"HISLink"
,
ShowMoreBtn
:
"show more..."
},
DataTableSearch
:
"search"
Signout
:
"Signout"
}
// NavigationBar: {
// Worklist: "لیست کاری",
// HISLink: "درگاه HIS",
// DeviceMap: "نگاشت",
// Client: "دستگاه"
// }
},
},
'fa'
:
{
'fa'
:
{
Login
:
{
Login
:
{
...
@@ -259,7 +259,7 @@ const messages = {
...
@@ -259,7 +259,7 @@ const messages = {
activeBtn
:
"فعال"
,
activeBtn
:
"فعال"
,
deactiveBtn
:
"غیرفعال"
,
deactiveBtn
:
"غیرفعال"
,
authenticateBtn
:
"تصدیق کردن"
,
authenticateBtn
:
"تصدیق کردن"
,
getWorklistBtn
:
"
لیست بیماران
"
,
getWorklistBtn
:
"
فهرست
"
,
hislinkSelectStatement
:
"لطفا یکی از hislink ها را انتخاب نمایید"
,
hislinkSelectStatement
:
"لطفا یکی از hislink ها را انتخاب نمایید"
,
hislinkDeleteStatement
:
"HISLink حذف گردید"
,
hislinkDeleteStatement
:
"HISLink حذف گردید"
,
hislinkActiveStatement
:
"HISLink فعال شد"
,
hislinkActiveStatement
:
"HISLink فعال شد"
,
...
@@ -310,7 +310,7 @@ const messages = {
...
@@ -310,7 +310,7 @@ const messages = {
minimum5Character
:
"رمز باید حداقل دارای 5 کاراکتر باشد"
minimum5Character
:
"رمز باید حداقل دارای 5 کاراکتر باشد"
},
},
HisWorklist
:
{
HisWorklist
:
{
title
:
"
لیست بیماران
"
title
:
"
فهرست
"
},
},
UserSetting
:
{
UserSetting
:
{
language
:
"زبان"
,
language
:
"زبان"
,
...
@@ -327,9 +327,14 @@ const messages = {
...
@@ -327,9 +327,14 @@ const messages = {
Client
:
"دستگاه"
,
Client
:
"دستگاه"
,
Users
:
"کاربران"
,
Users
:
"کاربران"
,
Setting
:
"تنظیمات"
,
Setting
:
"تنظیمات"
,
Signout
:
"خروج"
Signout
:
"خروج"
,
Register
:
"فهرست"
}
},
RegisterRoute
:
{
HISLinkCombo
:
"درگاه HIS"
,
ShowMoreBtn
:
"بیشتر..."
},
DataTableSearch
:
"جستجو"
}
}
};
};
...
...
client/plugins/routes.js
View file @
c540a96f
// const Login = () =>
// import ('../views/Login.vue')
// const Home = () =>
// import ('../views/Home.vue')
// const Register = () =>
// import ('../views/Register.vue')
// const ChangePassword = () =>
// import ('../views/ChangePassword.vue')
// const Main = () =>
// import ('../views/Main.vue')
// const EditWorkList = () =>
// import ('../components/EditWorkList.vue')
// const WorkList = () =>
// import ('../components/Worklist.vue')
// import Login from '../views/Login.vue';
// import Home from '../views/Home.vue';
// import Register from '../views/Register.vue';
// import ChangePassword from '../views/ChangePassword.vue';
// import Main from '../views/Main.vue';
// import EditWorkList from '../components/EditWorkList.vue';
// import WorkList from '../components/Worklist.vue';
// import AppVersion from '../views/AppVersion.vue';
// const routes = [{
// path: '/',
// component: () =>
// import ('../views/Home.vue'),
// name: 'Home'
// },
// {
// path: '/appversion',
// component: AppVersion,
// name: 'AppVersion'
// },
// {
// path: '/signin',
// component: () =>
// import ('../views/Login.vue'),
// name: 'signin'
// },
// {
// path: '/signup',
// component: () =>
// import ('../views/Register.vue'),
// name: 'signup'
// },
// {
// path: '/changePassword',
// component: () =>
// import ('../views/ChangePassword.vue'),
// name: 'changePassword'
// }, {
// path: '/main',
// component: () =>
// import ('../views/Main.vue'),
// name: 'main',
// children: [{
// path: "worklist",
// name: "worklist",
// components: {
// default: () =>
// import ('../components/Worklist.vue'),
// edit_worklist: () =>
// import ('../components/EditWorkList.vue')
// }
// }]
// }
// ];
// export default routes;
import
Login
from
'../views/Login.vue'
;
import
Login
from
'../views/Login.vue'
;
import
Home
from
'../views/Home.vue'
;
import
Home
from
'../views/Home.vue'
;
// import Register from '../views/Register.vue';
// import Register from '../views/Register.vue';
...
@@ -101,12 +7,13 @@ import Main from '../views/Main.vue';
...
@@ -101,12 +7,13 @@ import Main from '../views/Main.vue';
import
EditWorkList
from
'../components/EditWorkList.vue'
;
import
EditWorkList
from
'../components/EditWorkList.vue'
;
import
RegisterPatient
from
'../components/RegisterPatient.vue'
;
import
RegisterPatient
from
'../components/RegisterPatient.vue'
;
// import WorkList from '../components/Worklist.vue';
// import WorkList from '../components/Worklist.vue';
//
import HisLink from '../components/HisLink.vue';
import
HisLink
from
'../components/HisLink.vue'
;
import
DeviceMap
from
'../components/DeviceMap.vue'
;
import
DeviceMap
from
'../components/DeviceMap.vue'
;
import
Client
from
'../components/Client.vue'
;
import
Client
from
'../components/Client.vue'
;
import
Users
from
'../components/Users.vue'
;
import
Users
from
'../components/Users.vue'
;
import
UserSetting
from
'../components/UserSetting.vue'
;
import
UserSetting
from
'../components/UserSetting.vue'
;
import
RegisterRoute
from
'../components/RegisterRoute.vue'
;
import
AppVersion
from
'../views/AppVersion.vue'
;
import
AppVersion
from
'../views/AppVersion.vue'
;
...
@@ -151,9 +58,9 @@ const routes = [{
...
@@ -151,9 +58,9 @@ const routes = [{
},
{
},
{
path
:
"hislink"
,
path
:
"hislink"
,
name
:
"hislink"
,
name
:
"hislink"
,
//
component: HisLink
component
:
HisLink
component
:
()
=>
//
component: () =>
import
(
'../components/HisLink.vue'
)
//
import ('../components/HisLink.vue')
},
{
},
{
path
:
"devicemap"
,
path
:
"devicemap"
,
name
:
"devicemap"
,
name
:
"devicemap"
,
...
@@ -170,6 +77,13 @@ const routes = [{
...
@@ -170,6 +77,13 @@ const routes = [{
path
:
"usersetting"
,
path
:
"usersetting"
,
name
:
"usersetting"
,
name
:
"usersetting"
,
component
:
UserSetting
component
:
UserSetting
},
{
path
:
"register"
,
name
:
"register"
,
component
:
RegisterRoute
// component: () =>
// import ('../components/RegisterRoute.vue')
}]
}]
}
}
];
];
...
...
client/views/Main.vue
View file @
c540a96f
...
@@ -152,7 +152,7 @@ import RegisterPatient from "../components/RegisterPatient.vue";
...
@@ -152,7 +152,7 @@ import RegisterPatient from "../components/RegisterPatient.vue";
import
{
mapActions
}
from
"vuex"
;
import
{
mapActions
}
from
"vuex"
;
export
default
{
export
default
{
mounted
()
{
mounted
()
{
debugger
;
this
.
items
.
push
({
this
.
items
.
push
({
text
:
this
.
$t
(
"NavigationBar.Worklist"
),
text
:
this
.
$t
(
"NavigationBar.Worklist"
),
url
:
"/main/worklist"
url
:
"/main/worklist"
...
@@ -169,6 +169,10 @@ export default {
...
@@ -169,6 +169,10 @@ export default {
text
:
this
.
$t
(
"NavigationBar.Client"
),
text
:
this
.
$t
(
"NavigationBar.Client"
),
url
:
"/main/client"
url
:
"/main/client"
});
});
this
.
items
.
push
({
text
:
this
.
$t
(
"NavigationBar.Register"
),
url
:
"/main/register"
});
},
},
components
:
{
components
:
{
"app-footer"
:
AppFooter
,
"app-footer"
:
AppFooter
,
...
@@ -188,7 +192,7 @@ export default {
...
@@ -188,7 +192,7 @@ export default {
},
},
computed
:
{
computed
:
{
// getCurrentRoute(){
// getCurrentRoute(){
// debugger
// return this.$router.currentRoute.name == "worklist"
// return this.$router.currentRoute.name == "worklist"
// },
// },
...
@@ -244,7 +248,7 @@ export default {
...
@@ -244,7 +248,7 @@ export default {
},
},
selectedLang
:
{
selectedLang
:
{
get
()
{
get
()
{
debugger
;
if
(
this
.
users
&&
this
.
users
.
length
>
0
)
{
if
(
this
.
users
&&
this
.
users
.
length
>
0
)
{
return
this
.
users
[
0
].
profile
.
language
;
return
this
.
users
[
0
].
profile
.
language
;
}
else
{
}
else
{
...
@@ -293,6 +297,10 @@ export default {
...
@@ -293,6 +297,10 @@ export default {
text
:
this
.
$t
(
"NavigationBar.Client"
),
text
:
this
.
$t
(
"NavigationBar.Client"
),
url
:
"/main/client"
url
:
"/main/client"
});
});
this
.
items
.
push
({
text
:
this
.
$t
(
"NavigationBar.Register"
),
url
:
"/main/register"
});
}
}
},
},
meteor
:
{
meteor
:
{
...
...
imports/api/collections/worklist4hislink.js
View file @
c540a96f
...
@@ -5,7 +5,7 @@ import internalWorklist from '../collections/internalworklist';
...
@@ -5,7 +5,7 @@ import internalWorklist from '../collections/internalworklist';
let
collections
=
{};
let
collections
=
{};
if
(
Meteor
.
isServer
)
{
if
(
Meteor
.
isServer
)
{
debugger
const
result
=
HTTP
.
call
(
'GET'
,
`
${
Meteor
.
settings
.
worklistUrl
}
/HISIntegration.svc/rest/GetHISBrandsRest`
);
const
result
=
HTTP
.
call
(
'GET'
,
`
${
Meteor
.
settings
.
worklistUrl
}
/HISIntegration.svc/rest/GetHISBrandsRest`
);
let
brandsHttpResult
=
JSON
.
parse
(
result
.
content
);
let
brandsHttpResult
=
JSON
.
parse
(
result
.
content
);
...
@@ -26,20 +26,18 @@ if (Meteor.isServer) {
...
@@ -26,20 +26,18 @@ if (Meteor.isServer) {
}
}
if
(
Meteor
.
isClient
||
Meteor
.
isCordova
)
{
if
(
Meteor
.
isClient
||
Meteor
.
isCordova
)
{
Meteor
.
call
(
"getBrandsName"
,
function
(
err
,
result
)
{
// Meteor.call("getBrandsName", function(err, result) {
// let collectionNames = result;
let
collectionNames
=
result
;
// // let collectionNames = ["TestWLS"];
// let collectionNames = ["TestWLS"];
// for (let collName of collectionNames) {
for
(
let
collName
of
collectionNames
)
{
// if (collName != "InternalHis")
if
(
collName
!=
"InternalHis"
)
// collections[collName] = new Mongo.Collection(collName);
collections
[
collName
]
=
new
Mongo
.
Collection
(
collName
);
// else
else
// collections[collName] = internalWorklist;
collections
[
collName
]
=
internalWorklist
;
// }
}
// });
});
collections
[
"InternalHis"
]
=
internalWorklist
;
}
}
export
default
collections
;
export
default
collections
;
\ No newline at end of file
imports/api/methods/changePassword.js
View file @
c540a96f
...
@@ -7,7 +7,7 @@ import { check } from 'meteor/check';
...
@@ -7,7 +7,7 @@ import { check } from 'meteor/check';
Meteor
.
methods
({
Meteor
.
methods
({
'changePass'
(
username
,
oldPassword
,
newPassword
)
{
'changePass'
(
username
,
oldPassword
,
newPassword
)
{
debugger
;
this
.
unblock
();
this
.
unblock
();
check
(
username
,
String
);
check
(
username
,
String
);
check
(
oldPassword
,
String
);
check
(
oldPassword
,
String
);
...
...
imports/api/methods/users.js
View file @
c540a96f
...
@@ -10,7 +10,7 @@ Meteor.methods({
...
@@ -10,7 +10,7 @@ Meteor.methods({
this
.
unblock
();
this
.
unblock
();
if
(
this
.
userId
)
{
if
(
this
.
userId
)
{
try
{
try
{
debugger
;
let
userExists
=
Meteor
.
users
.
findOne
({
username
:
item
.
username
});
let
userExists
=
Meteor
.
users
.
findOne
({
username
:
item
.
username
});
if
(
userExists
==
undefined
||
userExists
==
null
)
if
(
userExists
==
undefined
||
userExists
==
null
)
Accounts
.
createUser
({
Accounts
.
createUser
({
...
@@ -34,7 +34,7 @@ Meteor.methods({
...
@@ -34,7 +34,7 @@ Meteor.methods({
this
.
unblock
();
this
.
unblock
();
if
(
this
.
userId
)
{
if
(
this
.
userId
)
{
try
{
try
{
debugger
;
Meteor
.
users
.
update
({
_id
:
item
.
_id
},
{
$set
:
{
"profile.fullName"
:
item
.
fullName
}
},
{
upsert
:
true
})
Meteor
.
users
.
update
({
_id
:
item
.
_id
},
{
$set
:
{
"profile.fullName"
:
item
.
fullName
}
},
{
upsert
:
true
})
// Accounts.setPassword(item._id, item.password, { logout: true })
// Accounts.setPassword(item._id, item.password, { logout: true })
return
true
return
true
...
@@ -49,7 +49,7 @@ Meteor.methods({
...
@@ -49,7 +49,7 @@ Meteor.methods({
this
.
unblock
();
this
.
unblock
();
if
(
this
.
userId
)
{
if
(
this
.
userId
)
{
try
{
try
{
debugger
;
Accounts
.
setPassword
(
item
.
_id
,
item
.
password
,
{
logout
:
true
})
Accounts
.
setPassword
(
item
.
_id
,
item
.
password
,
{
logout
:
true
})
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -60,11 +60,11 @@ Meteor.methods({
...
@@ -60,11 +60,11 @@ Meteor.methods({
}
}
},
},
"deleteUser1"
(
item
)
{
"deleteUser1"
(
item
)
{
debugger
this
.
unblock
();
this
.
unblock
();
if
(
this
.
userId
)
{
if
(
this
.
userId
)
{
try
{
try
{
debugger
;
Meteor
.
users
.
remove
({
_id
:
item
.
_id
});
Meteor
.
users
.
remove
({
_id
:
item
.
_id
});
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -75,11 +75,11 @@ Meteor.methods({
...
@@ -75,11 +75,11 @@ Meteor.methods({
}
}
},
},
"editUserProfile"
(
item
)
{
"editUserProfile"
(
item
)
{
debugger
;
this
.
unblock
();
this
.
unblock
();
if
(
this
.
userId
)
{
if
(
this
.
userId
)
{
try
{
try
{
debugger
;
// db.collection.update( { _id:...} , { $set: { some_key.param2 : new_info } }
// db.collection.update( { _id:...} , { $set: { some_key.param2 : new_info } }
Meteor
.
users
.
update
({
_id
:
this
.
userId
},
{
$set
:
{...
item
}
},
{
upsert
:
true
})
Meteor
.
users
.
update
({
_id
:
this
.
userId
},
{
$set
:
{...
item
}
},
{
upsert
:
true
})
return
true
return
true
...
...
imports/api/methods/worklist.js
View file @
c540a96f
...
@@ -6,7 +6,7 @@ import { HTTP } from 'meteor/http';
...
@@ -6,7 +6,7 @@ import { HTTP } from 'meteor/http';
let
uuidv4
=
require
(
"uuid/v4"
);
let
uuidv4
=
require
(
"uuid/v4"
);
// Accounts.onLogin(function(user) {
// Accounts.onLogin(function(user) {
//
debugger;
//
// console.log(",", user.user._id)
// console.log(",", user.user._id)
// });
// });
...
@@ -47,7 +47,7 @@ Meteor.methods({
...
@@ -47,7 +47,7 @@ Meteor.methods({
}
}
},
},
"EditworklistItem"
(
item
)
{
"EditworklistItem"
(
item
)
{
// debugger;
// const item = {
// const item = {
// "Accession": "",
// "Accession": "",
// "AdmissionID": "1501",
// "AdmissionID": "1501",
...
...
imports/api/server/publications/clients.js
View file @
c540a96f
...
@@ -2,7 +2,7 @@ import Clients from '../../collections/clients.js';
...
@@ -2,7 +2,7 @@ import Clients from '../../collections/clients.js';
import
{
check
}
from
'meteor/check'
;
import
{
check
}
from
'meteor/check'
;
Meteor
.
publish
(
"clients"
,
function
()
{
Meteor
.
publish
(
"clients"
,
function
()
{
debugger
;
// if (!this.userId) {
// if (!this.userId) {
// return this.ready();
// return this.ready();
// }
// }
...
...
imports/api/server/publications/devicemap.js
View file @
c540a96f
...
@@ -2,7 +2,7 @@ import DeviceMap from '../../collections/devicemap';
...
@@ -2,7 +2,7 @@ import DeviceMap from '../../collections/devicemap';
import
{
check
}
from
'meteor/check'
;
import
{
check
}
from
'meteor/check'
;
Meteor
.
publish
(
"devicemaps"
,
function
()
{
Meteor
.
publish
(
"devicemaps"
,
function
()
{
debugger
;
if
(
!
this
.
userId
)
{
if
(
!
this
.
userId
)
{
return
this
.
ready
();
return
this
.
ready
();
}
}
...
...
imports/api/server/publications/worklist4hislink.js
View file @
c540a96f
import
{
check
}
from
'meteor/check'
;
import
{
check
}
from
'meteor/check'
;
import
{
Mongo
}
from
'meteor/mongo'
import
{
Mongo
}
from
'meteor/mongo'
import
Collections
from
'../../collections/worklist4hislink.js'
;
import
Collections
from
'../../collections/worklist4hislink.js'
;
import
{
Counts
}
from
'meteor/tmeasday:publish-counts'
;
Meteor
.
publish
(
"worklist4hislink"
,
function
({
brand
,
limit
})
{
Meteor
.
publish
(
"worklist4hislink"
,
function
(
brand
)
{
debugger
if
(
brand
==
null
)
{
if
(
brand
==
null
)
{
return
[];
return
[];
}
}
...
@@ -12,12 +13,15 @@ Meteor.publish("worklist4hislink", function(brand) {
...
@@ -12,12 +13,15 @@ Meteor.publish("worklist4hislink", function(brand) {
}
}
const
userid
=
this
.
userId
;
const
userid
=
this
.
userId
;
check
(
brand
,
String
);
check
(
brand
,
String
);
check
(
limit
,
Number
);
Counts
.
publish
(
this
,
'brandCount'
,
Collections
[
brand
].
find
(),
{
noReady
:
true
});
// let Worklist = new Mongo.Collection(brand);
// let Worklist = new Mongo.Collection(brand);
// console.log(Worklist.find({ _userid: userid, _devicemap: devicemap }).fetch())
// console.log(Worklist.find({ _userid: userid, _devicemap: devicemap }).fetch())
return
Collections
[
brand
].
find
({},
{
return
Collections
[
brand
].
find
({},
{
disableOplog
:
true
,
disableOplog
:
true
,
// pollingThrottleMs: 1000,
// pollingThrottleMs: 1000,
pollingIntervalMs
:
1000
pollingIntervalMs
:
1000
,
limit
:
limit
});
});
});
});
\ No newline at end of file
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