Commit 3baca37d authored by Reza Sahebgharan's avatar Reza Sahebgharan

feat(rtl support and multilanguage): add rtl support to main.vue and multilanguage

parent f37b9bb2
Pipeline #845 passed with stages
in 150 minutes and 17 seconds
......@@ -9,7 +9,7 @@
<h5>©2005-{{ new Date().getFullYear() }} MARCO PACS</h5>
<!-- <v-menu transition="slide-x-transition">
<v-menu transition="slide-x-transition">
<template v-slot:activator="{ on }">
<v-btn
class="changeLangBtn"
......@@ -25,7 +25,7 @@
<v-list-item-title>{{lng.name}}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu> -->
</v-menu>
</v-footer>
</template>
......
<template>
<v-container>
<v-snackbar color="primary" v-model="snackbar" top>
Are You Sure?
<v-btn color="pink" @click="deleteClient">yes</v-btn>
<v-btn color="pink" @click="snackbar = false">no</v-btn>
{{$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-dialog v-model="dialog" max-width="600px">
<v-card>
<v-card-title>
<span class="headline">{{newOrEdit=="new"?"New":"Edit"}} Client</span>
<span>{{newOrEdit=="new"?$t("Client.newText"):$t("Client.editText")}} {{$t("Client.clientName")}}</span>
</v-card-title>
<v-card-text>
<v-container>
......@@ -38,7 +38,7 @@
color="blue darken-1"
text
@click="createOrEditClient"
>{{newOrEdit=="new"?"Create":"Edit"}}</v-btn>
>{{newOrEdit=="new"?$t("Client.createBtn"):$t("Client.editBtn")}}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
......@@ -108,7 +108,7 @@ export default {
snackbar: false,
alertSnackbar: false,
alertText: "",
loading:false
loading: false
};
},
computed: {
......@@ -147,7 +147,6 @@ export default {
}
},
openNewDialog() {
for (let prop in this.ClientForm) {
this.$set(this.ClientForm, prop, "");
}
......@@ -157,7 +156,7 @@ export default {
},
openEditDialog() {
if (this.selectedItemInTable.length == 0) {
this.alertSnackbarMethod("please select one of clients");
this.alertSnackbarMethod(this.$t("Client.clientSelectStatement"));
return;
}
for (let prop in this.ClientForm) {
......@@ -188,14 +187,14 @@ export default {
let me = this;
this.snackbar = false;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of clients");
me.alertSnackbarMethod(me.$t("Client.clientSelectStatement"));
return;
}
let deleteHislink = {};
deleteHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deleteClient", deleteHislink, function() {
me.alertSnackbarMethod("Client has been deleted");
me.alertSnackbarMethod(this.$t("Client.clientDeleteStatement"));
});
},
deleteSnackbar() {
......
<template>
<v-container>
<v-snackbar color="primary" v-model="snackbar" top>
Are You Sure?
<v-btn color="pink" @click="deleteDevicemap">yes</v-btn>
<v-btn color="pink" @click="snackbar = false">no</v-btn>
{{$t("DeviceMap.DeleteMessage")}}
<v-btn color="pink" @click="deleteDevicemap">{{$t("DeviceMap.YesBtn")}}</v-btn>
<v-btn color="pink" @click="snackbar = false">{{$t("DeviceMap.NoBtn")}}</v-btn>
</v-snackbar>
<v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar>
<v-dialog v-model="dialog" max-width="600px">
<v-card>
<v-card-title>
<span class="headline">{{newOrEdit=="new"?"New":"Edit"}} DeviceMap</span>
<span>{{newOrEdit=="new"?$t("DeviceMap.newText"):$t("DeviceMap.editText")}} {{$t("DeviceMap.devicemapName")}}</span>
</v-card-title>
<v-card-text>
<v-container>
......@@ -58,7 +58,7 @@
color="blue darken-1"
text
@click="createOrEditDevicemap"
>{{newOrEdit=="new"?"Create":"Edit"}}</v-btn>
>{{newOrEdit=="new"?$t("DeviceMap.createBtn"):$t("DeviceMap.editBtn")}}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
......@@ -217,7 +217,7 @@ export default {
},
openEditDialog() {
if (this.selectedItemInTable.length == 0) {
this.alertSnackbarMethod("please select one of devicemaps");
this.alertSnackbarMethod(this.$t("DeviceMap.devicemapSelectStatement"));
return;
}
for (let prop in this.DevicemapForm) {
......@@ -276,14 +276,14 @@ export default {
let me = this;
this.snackbar = false;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of devicemaps");
me.alertSnackbarMethod(me.$t("DeviceMap.devicemapSelectStatement"));
return;
}
let deleteHislink = {};
deleteHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deleteDevicemap", deleteHislink, function() {
me.alertSnackbarMethod("Devicemap has been deleted");
me.alertSnackbarMethod(me.$t("DeviceMap.devicemapDeleteStatement"));
});
},
deleteSnackbar() {
......
<template>
<v-container fluid>
<v-snackbar color="primary" v-model="snackbar" top>
Are You Sure?
<v-btn color="pink" @click="deleteHislink">yes</v-btn>
<v-btn color="pink" @click="snackbar = false">no</v-btn>
{{$t("HISLink.DeleteMessage")}}
<v-btn color="pink" @click="deleteHislink">{{$t("HISLink.YesBtn")}}</v-btn>
<v-btn color="pink" @click="snackbar = false">{{$t("HISLink.NoBtn")}}</v-btn>
</v-snackbar>
<v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar>
<v-dialog v-model="dialog" max-width="600px">
<v-card>
<v-card-title>
<span class="headline">{{newOrEdit=="new"?"New":"Edit"}} HISLink</span>
<span>{{newOrEdit=="new"?$t("HISLink.newText"):$t("HISLink.editText")}} {{$t("HISLink.HISLinkName")}}</span>
</v-card-title>
<v-card-text>
<v-container>
......@@ -86,7 +86,7 @@
color="blue darken-1"
text
@click="createOrEditHisLink"
>{{newOrEdit=="new"?"Create":"Edit"}}</v-btn>
>{{newOrEdit=="new"?$t("HISLink.createBtn"):$t("HISLink.editBtn")}}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
......@@ -249,7 +249,7 @@ export default {
},
openEditDialog() {
if (this.selectedItemInTable.length == 0) {
this.alertSnackbarMethod("please select one of hislinks");
this.alertSnackbarMethod(this.$t("HISLink.hislinkSelectStatement"));
return;
}
for (let prop in this.HisLinkForm) {
......@@ -280,14 +280,14 @@ export default {
let me = this;
this.snackbar = false;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks");
me.alertSnackbarMethod(me.$t("HISLink.hislinkSelectStatement"));
return;
}
let deleteHislink = {};
deleteHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deleteHisLink", deleteHislink, function() {
me.alertSnackbarMethod("HisLink has been deleted");
me.alertSnackbarMethod(me.$t("HISLink.hislinkDeleteStatement"));
});
},
deleteSnackbar() {
......@@ -300,33 +300,33 @@ export default {
activeHislink() {
let me = this;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks");
me.alertSnackbarMethod(me.$t("HISLink.hislinkSelectStatement"));
return;
}
let activeHislink = {};
activeHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("activeHisLink", activeHislink, function() {
me.alertSnackbarMethod("HisLink has been activated");
me.alertSnackbarMethod(me.$t("HISLink.hislinkActiveStatement"));
});
},
deactiveHislink() {
let me = this;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks");
me.alertSnackbarMethod(me.$t("HISLink.hislinkSelectStatement"));
return;
}
let deactiveHislink = {};
deactiveHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deactiveHisLink", deactiveHislink, function() {
me.alertSnackbarMethod("HisLink has been deactivated");
me.alertSnackbarMethod(me.$t("HISLink.hislinkDeactiveStatement"));
});
},
authenticateHislink() {
let me = this;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks");
me.alertSnackbarMethod(me.$t("HISLink.hislinkSelectStatement"));
return;
}
let authenticateHislink = {
......@@ -360,12 +360,12 @@ export default {
result
) {
if (err) {
me.alertSnackbarMethod("authenticate failed");
me.alertSnackbarMethod(me.$t("HISLink.hislinkAuthenticateFailed"));
}
me.alertSnackbarMethod(
JSON.parse(result.content).Result == true
? "authenticate success"
: "authenticate failed"
? me.$t("HISLink.hislinkAuthenticateSuccess")
: me.$t("HISLink.hislinkAuthenticateFailed")
);
});
}
......
<template>
<v-container>
<v-snackbar color="primary" v-model="snackbar" top>
Are You Sure?
<v-btn color="pink" @click="deleteUser">yes</v-btn>
<v-btn color="pink" @click="snackbar = false">no</v-btn>
{{$t("Users.DeleteMessage")}}
<v-btn color="pink" @click="deleteUser">{{$t("Users.YesBtn")}}</v-btn>
<v-btn color="pink" @click="snackbar = false">{{$t("Users.NoBtn")}}</v-btn>
</v-snackbar>
<v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar>
<v-dialog v-model="dialog" max-width="600px">
<v-card>
<v-card-title>
<span class="headline">{{newOrEdit=="new"?"New":"Edit"}} User</span>
<span>{{newOrEdit=="new"?$t("Users.newText"):$t("Users.editText")}} {{$t("Users.UserName")}}</span>
</v-card-title>
<v-card-text>
<v-container>
......@@ -32,7 +32,7 @@
color="blue darken-1"
text
@click="createOrEditUser"
>{{newOrEdit=="new"?"Create":"Edit"}}</v-btn>
>{{newOrEdit=="new"?$t("Users.createBtn"):$t("Users.editBtn")}}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
......@@ -93,7 +93,7 @@ export default {
newOrEdit: "",
UserForm: {
username: "",
password:"",
password: "",
_id: ""
},
snackbar: false,
......@@ -147,7 +147,7 @@ export default {
},
openEditDialog() {
if (this.selectedItemInTable.length == 0) {
this.alertSnackbarMethod("please select one of users");
this.alertSnackbarMethod(this.$t("Users.userSelectStatement"));
return;
}
for (let prop in this.UserForm) {
......@@ -175,18 +175,18 @@ export default {
}
},
deleteUser() {
debugger
debugger;
let me = this;
this.snackbar = false;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of users");
me.alertSnackbarMethod(this.$t("Users.userSelectStatement"));
return;
}
let deleteUser = {};
deleteUser._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deleteUser1", deleteUser, function() {
me.alertSnackbarMethod("User has been deleted");
me.alertSnackbarMethod(this.$t("Users.userDeleteStatement"));
});
},
deleteSnackbar() {
......@@ -195,7 +195,7 @@ export default {
alertSnackbarMethod(text) {
this.alertText = text;
this.alertSnackbar = true;
},
}
// beforeRouteEnter(to, from, next) {
// next(vm => {
// if (
......@@ -215,7 +215,7 @@ export default {
users: []
},
users() {
return Meteor.users.find({username: { $ne: "marcoadmin" } }).fetch();
return Meteor.users.find({ username: { $ne: "marcoadmin" } }).fetch();
}
}
};
......
......@@ -83,6 +83,96 @@
<strong>{{$t('WorkList.editBtn')}}</strong>
</v-btn>
<v-divider class="mx-4" inset vertical></v-divider>
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="registerDialog=true">
<strong>{{$t("WorkList.Register")}}</strong>
</v-btn>
<v-dialog v-model="registerDialog" max-width="900px">
<v-card>
<v-progress-linear
:active="registerLoading"
:indeterminate="registerLoading"
absolute
top
color="cyan lighten-2"
></v-progress-linear>
<v-card-title>
<v-icon @click="closeRegisterPatient" class="mr-1">close</v-icon>
<span>{{$t("WorkList.RegisterPatient")}}</span>
</v-card-title>
<v-card-text class="ma-0 pa-0" v-if="$vuetify.breakpoint.mdAndUp">
<v-container class="cyan lighten-2" style="border-radius: 5px;">
<v-card class="pa-3 pr-6 ma-4">
<v-row dense>
<v-col md="4">
<v-text-field
label="FarsiFirstName"
v-model="registerPatient.FarsiFirstName"
type="text"
></v-text-field>
</v-col>
<v-col md="4">
<v-text-field
label="FarsiLastName"
v-model="registerPatient.FarsiLastName"
type="text"
></v-text-field>
</v-col>
<v-col md="4">
<v-text-field label="HISID" v-model="registerPatient.HISID" type="text"></v-text-field>
</v-col>
<v-col md="4">
<v-text-field
label="Modality"
v-model="registerPatient.Modality"
type="text"
></v-text-field>
</v-col>
<v-col md="4">
<v-text-field
label="PatientAge"
v-model="registerPatient.PatientAge"
type="text"
></v-text-field>
</v-col>
</v-row>
</v-card>
</v-container>
</v-card-text>
<v-card-text class="ma-0 pa-0" v-else>
<v-container class="cyan lighten-2" style="border-radius: 5px;">
<v-card class="pa-3 pr-6 ma-4">
<v-row dense>
<v-col cols="6">
<v-text-field label="FarsiFirstName" type="text"></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field label="FarsiLastName" type="text"></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field label="HISID" type="text"></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field label="Modality" type="text"></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field label="PatientAge" type="text"></v-text-field>
</v-col>
</v-row>
</v-card>
</v-container>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="blue darken-1"
class="white--text"
@click="registerPatientMethod"
>{{$t("WorkList.CreatePatient")}}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="editDialog" max-width="900px">
<v-card class="grey lighten-4">
......@@ -95,7 +185,7 @@
></v-progress-linear>
<v-card-title>
<v-icon @click="close" class="mr-1">close</v-icon>
<span class="headline">Edit Patient Information</span>
<span >{{$t("WorkList.EditRegisterPatient")}}</span>
</v-card-title>
<v-card-text class="ma-0 pa-0" v-if="$vuetify.breakpoint.mdAndUp">
......@@ -514,6 +604,22 @@ import DeviceCode from "../../imports/api/collections/devicecode.js";
import { Tracker } from "meteor/tracker";
export default {
methods: {
registerPatientMethod(item) {
debugger;
let me = this;
this.registerLoading = true;
Meteor.call("Register", this.registerPatient, function(err, result) {
me.registerLoading = false;
me.registerPatient = {
FarsiFirstName: "",
FarsiLastName: "",
HISID: "",
Modality: "",
PatientAge: ""
};
me.closeRegisterPatient();
});
},
activerow: function(item) {
if (this.sortByTable && this.sortByTable.length > 0) {
const items = this.patientsOfTable.sort((a, b) => {
......@@ -530,7 +636,6 @@ export default {
return 0;
}
});
console.log(items);
this.sortedItems = items;
} else {
this.sortedItems = this.patientsOfTable;
......@@ -545,8 +650,11 @@ export default {
// this.$set(item, "selected", true);
},
searchPatients() {
debugger
if (this.selectedDevice && this.devicemap != this.selectedDevice.GroupName) {
debugger;
if (
this.selectedDevice &&
this.devicemap != this.selectedDevice.GroupName
) {
let self = this;
Meteor.call("Fetchworklist", this.selectedDevice.GroupName, function() {
self.devicemap = self.selectedDevice.GroupName;
......@@ -605,6 +713,9 @@ export default {
close() {
this.editDialog = false;
},
closeRegisterPatient() {
this.registerDialog = false;
},
nextPatient() {
let index = this.sortedItems.findIndex(
patient => patient._id == this.selectedItem._id
......@@ -678,7 +789,7 @@ export default {
});
let { selected, ...selectedItemClone } = this.selectedItem;
debugger
debugger;
this.editLoading = true;
let self = this;
Meteor.call("EditworklistItem", selectedItemClone, function(
......@@ -718,8 +829,17 @@ export default {
FarsiLastNameParts1: "FarsiLastNameParts1",
FarsiLastNameParts2: "FarsiLastNameParts2"
},
registerPatient: {
FarsiFirstName: "",
FarsiLastName: "",
HISID: "",
Modality: "",
PatientAge: ""
},
registerLoading: false,
selectedItem: undefined,
sortedItems: undefined
sortedItems: undefined,
registerDialog: false
}),
mounted() {
Meteor.call("getDeviceCodes");
......@@ -799,12 +919,13 @@ export default {
watch: {
"$subReady.worklist"(ready) {},
selectedDevice(newDevice, oldDevice) {
debugger
console.log(newDevice)
if (this.selectedDevice && this.selectedDevice.GroupName) {
let self = this;
this.fetchWorklistLoading = true;
Meteor.call("Fetchworklist", this.selectedDevice.GroupName, function() {
self.devicemap = self.selectedDevice.GroupName;
console.log(self.devicemap);
self.fetchWorklistLoading = false;
});
}
......
......@@ -67,15 +67,68 @@ const messages = {
deviceComboboxNoDataMatch1: '',
AllBtn: "All",
UnknownBtn: "Correction Needed",
noDevicemap: 'no device'
noDevicemap: 'no device',
Register: "Register",
CreatePatient: "Create",
RegisterPatient: "Register Patient",
EditRegisterPatient: "Edit Patient Information"
},
HISLink: {
DeleteMessage: "Are You Sure?",
YesBtn: "yes",
NoBtn: "no",
newText: "New",
editText: "Edit",
HISLinkName: "HISLink",
createBtn: "Create",
newBtn: "New",
editBtn: "Edit",
deleteBtn: "Delete",
activeBtn: "Active",
deactiveBtn: "Deactive",
authenticateBtn: "Authenticate"
authenticateBtn: "Authenticate",
hislinkSelectStatement: "please select one of hislinks",
hislinkDeleteStatement: "HisLink has been deleted",
hislinkActiveStatement: "HisLink has been activated",
hislinkDeactiveStatement: "HisLink has been deactivated",
hislinkAuthenticateFailed: "authenticate failed",
hislinkAuthenticateSuccess: "authenticate success"
},
Client: {
DeleteMessage: "Are You Sure?",
YesBtn: "yes",
NoBtn: "no",
newText: "New",
editText: "Edit",
clientName: "Client",
createBtn: "Create",
editBtn: "Edit",
clientSelectStatement: "please select one of Clients",
clientDeleteStatement: "Client has been deleted",
},
DeviceMap: {
DeleteMessage: "Are You Sure?",
YesBtn: "yes",
NoBtn: "no",
newText: "New",
editText: "Edit",
devicemapName: "DeviceMap",
createBtn: "Create",
editBtn: "Edit",
devicemapSelectStatement: "please select one of DeviceMaps",
devicemapDeleteStatement: "Devicemap has been deleted",
},
Users: {
DeleteMessage: "Are You Sure?",
YesBtn: "yes",
NoBtn: "no",
newText: "New",
editText: "Edit",
UserName: "Users",
createBtn: "Create",
editBtn: "Edit",
userSelectStatement: "please select one of users",
userDeleteStatement: "user has been deleted",
}
},
......@@ -143,15 +196,69 @@ const messages = {
deviceComboboxNoDataMatch1: 'یافت نشد',
AllBtn: "همه",
UnknownBtn: "نیازمند اصلاح",
noDevicemap: 'دستگاه انتخاب نشده است'
noDevicemap: 'دستگاه انتخاب نشده است',
Register: "ثبت",
CreatePatient: "ایجاد",
RegisterPatient: "ایجاد بیمار",
EditRegisterPatient: "ویرایش اطلاعات بیمار"
},
HISLink: {
DeleteMessage: "آیا مطمین هستید؟",
YesBtn: "بله",
NoBtn: "نه",
newText: "جدید",
editText: "ویرایش",
HISLinkName: "HISLink",
createBtn: "ایجاد",
newBtn: "جدید",
editBtn: "ویرایش",
deleteBtn: "حذف",
activeBtn: "فعال",
deactiveBtn: "غیرفعال",
authenticateBtn: "تصدیق کردن"
authenticateBtn: "تصدیق کردن",
hislinkSelectStatement: "لطفا یکی از hislink ها را انتخاب نمایید",
hislinkDeleteStatement: "HISLink حذف گردید",
hislinkActiveStatement: "HISLink فعال شد",
hislinkDeactiveStatement: "HISLink غیرفعال شد",
hislinkAuthenticateFailed: "authenticate failed",
hislinkAuthenticateSuccess: "authenticate success"
},
Client: {
DeleteMessage: "آیا مطمین هستید؟",
YesBtn: "بله",
NoBtn: "نه",
newText: "جدید",
editText: "ویرایش",
clientName: "Client",
createBtn: "ایجاد",
editBtn: "ویرایش",
clientSelectStatement: "لطفا یکی از Client ها را انتخاب نمایید",
clientDeleteStatement: "Client حذف گردید",
},
DeviceMap: {
DeleteMessage: "آیا مطمین هستید؟",
YesBtn: "بله",
NoBtn: "نه",
newText: "جدید",
editText: "ویرایش",
devicemapName: "DeviceMap",
createBtn: "ایجاد",
editBtn: "ویرایش",
devicemapSelectStatement: "لطفا یکی از DeviceMap ها را انتخاب نمایید",
devicemapDeleteStatement: "DeviceMap حذف گردید",
},
Users: {
DeleteMessage: "آیا مطمین هستید؟",
YesBtn: "بله",
NoBtn: "نه",
newText: "جدید",
editText: "ویرایش",
UserName: "کاربر",
createBtn: "ایجاد",
editBtn: "ویرایش",
userSelectStatement: "لطفا یکی از کاربر ها را انتخاب نمایید",
userDeleteStatement: "کاربر حذف گردید",
}
}
......
......@@ -140,8 +140,8 @@ const routes = [{
path: "worklist",
name: "worklist",
components: {
edit_worklist: WorkList
default: WorkList,
// edit_worklist: WorkList
}
}, {
path: "hislink",
......
<template>
<v-app id="inspire">
<template v-if="!$vuetify.rtl">
<!-- <v-navigation-drawer v-model="drawerRight" app right clipped :width="$vuetify.breakpoint.width/3" bottom>
<v-list dense>
<v-list-item @click.stop="right = !right">
<v-list-item-action>
<v-icon>mdi-exit-to-app</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Open Temporary Drawer</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-navigation-drawer>-->
<!-- <keep-alive>
<router-view name="edit_worklist"></router-view>
</keep-alive>-->
<v-app-bar app clipped-left color="teal lighten-3" dark>
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<v-toolbar-title class="red--text">Karname</v-toolbar-title>
<v-spacer></v-spacer>
<!-- <v-app-bar-nav-icon @click.stop="drawerRight = !drawerRight"></v-app-bar-nav-icon> -->
</v-app-bar>
<!-- <v-navigation-drawer v-model="drawer" app clipped>
<v-list dense>
<v-list-item @click.stop="left = !left">
<v-list-item-action>
<v-icon>mdi-exit-to-app</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Open Temporary Drawer</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>left
</v-navigation-drawer>-->
<v-navigation-drawer v-model="drawer" app clipped>
<v-list nav dense>
<v-list-item-group v-model="item" color="primary">
......@@ -46,7 +13,6 @@
<!-- <v-list-item-icon>
<v-icon v-text="item.icon"></v-icon>
</v-list-item-icon>-->
<v-list-item-content>
<v-list-item-title v-text="item.text"></v-list-item-title>
</v-list-item-content>
......@@ -56,56 +22,41 @@
</v-navigation-drawer>
</template>
<!-- <template v-if="$vuetify.rtl">
<v-navigation-drawer v-model="drawer" app clipped>
<v-list dense>
<v-list-item @click.stop="left = !left">
<v-list-item-action>
<v-icon>mdi-exit-to-app</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Open Temporary Drawer</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>left
</v-navigation-drawer>
<template v-if="$vuetify.rtl">
<v-app-bar app clipped-right color="teal lighten-3" dark>
<v-app-bar app clipped-left color="teal lighten-3" dark>
<v-app-bar-nav-icon @click.stop="drawerRight = !drawerRight"></v-app-bar-nav-icon>
<v-spacer></v-spacer>
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<v-toolbar-title>Toolbar</v-toolbar-title>
</v-app-bar>
<v-toolbar-title class="red--text">Karname</v-toolbar-title>
<v-spacer></v-spacer>
<v-navigation-drawer v-model="drawerRight" app right>
<v-list dense>
<v-list-item @click.stop="right = !right">
<v-list-item-action>
<v-icon>mdi-exit-to-app</v-icon>
</v-list-item-action>
</v-app-bar>
<v-navigation-drawer v-model="drawer" app clipped right>
<v-list nav dense>
<v-list-item-group v-model="item" color="primary">
<v-list-item v-for="(item, i) in updatedItems" :key="i" :to="item.url">
<!-- <v-list-item-icon>
<v-icon v-text="item.icon"></v-icon>
</v-list-item-icon>-->
<v-list-item-content>
<v-list-item-title>Open Temporary Drawer</v-list-item-title>
<v-list-item-title v-text="item.text"></v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>right
</v-list-item-group>
</v-list>
</v-navigation-drawer>
</template>-->
<!-- <v-navigation-drawer v-model="left" fixed temporary></v-navigation-drawer> -->
</template>
<v-content>
<transition name="fade" mode="out-in">
<router-view></router-view>
</transition>
<transition name="fade" mode="out-in">
<!-- <transition name="fade" mode="out-in">
<keep-alive>
<router-view name="edit_worklist"></router-view>
</keep-alive>
</transition>
</transition> -->
</v-content>
<!-- <v-navigation-drawer v-model="right" fixed right temporary></v-navigation-drawer> -->
<app-footer></app-footer>
</v-app>
</template>
......
import { Mongo } from 'meteor/mongo';
import { Meteor } from 'meteor/meteor';
let internalWorklist = 'internalWorklist';
let Worklist;
if (Meteor.isClient || Meteor.isCordova) {
Worklist = new Mongo.Collection(internalWorklist);
}
if (Meteor.isServer) {
Worklist = new Mongo.Collection(internalWorklist);
}
export default Worklist;
\ No newline at end of file
......@@ -3,14 +3,10 @@ import { Meteor } from 'meteor/meteor';
let Worklist;
if (Meteor.isClient || Meteor.isCordova) {
Worklist = new Mongo.Collection('worklist')
Worklist = new Mongo.Collection('tempworklist');
}
if (Meteor.isServer) {
Worklist = new Mongo.Collection('worklist', { connection: null })
Worklist = new Mongo.Collection('tempworklist');
}
export default Worklist;
\ No newline at end of file
......@@ -3,19 +3,26 @@ import { check } from 'meteor/check';
import { Accounts } from 'meteor/accounts-base';
import { HTTP } from 'meteor/http';
let uuidv4 = require("uuid/v4");
// Accounts.onLogin(function(user) {
// debugger;
// console.log(",", user.user._id)
// });
import Worklist from '../collections/worklist.js';
import InternalWorklist from '../collections/internalworklist.js';
let internalWorklistName = 'internalWorklist';
// import workListItemSchema from '../collections/worklistItemSchema.js';
Meteor.methods({
'Fetchworklist' (devicemap) {
debugger
check(devicemap, String);
if (devicemap.length == 0) {
return true;
}
this.unblock();
if (this.userId) {
try {
......@@ -23,15 +30,18 @@ Meteor.methods({
let worklistHttp = JSON.parse(result.content);
Worklist.remove({ _userid: this.userId, _devicemap: devicemap });
worklistHttp.WorkListItems.forEach((patient) => {
delete patient._id;
Worklist.insert({
...patient,
_userid: this.userId,
_devicemap: devicemap
});
})
});
return true
} catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console.log(e);
return false;
}
}
......@@ -83,7 +93,7 @@ Meteor.methods({
// "StudyInstanceUID": "1.3.12.2.1107.5.2.30.26719.6.8122118808"
// }
// try {
debugger;
if (this.userId) {
delete item._id;
// workListItemSchema.validate(item);
......@@ -97,9 +107,26 @@ Meteor.methods({
const result = HTTP.call('POST', `${Meteor.settings.worklistUrl}/HISIntegration.svc/rest/EditworklistItem`, options);
let result1 = JSON.parse(result.content);
delete result1._id;
let update = Worklist.update({ AdmissionID: item.AdmissionID }, { $set: result1 });
let update = Worklist.update({ AdmissionID: result1.AdmissionID }, { $set: result1 }, { multi: true });
return true;
}
},
Register(item) {
if (this.userId) {
item._id = uuidv4();
InternalWorklist.insert({
...item
});
// Worklist.remove({ _userid: this.userId, _devicemap: internalWorklistName });
// Worklist.insert({
// ...item,
// _userid: this.userId,
// _devicemap: internalWorklistName
// });
return true;
}
}
});
\ No newline at end of file
......@@ -8,7 +8,7 @@ Meteor.publish("devicemaps", function() {
}
return DeviceMap.find({}, {
reactive: true,
disableOplog: false,
disableOplog: true,
pollingThrottleMs: 1000,
pollingIntervalMs: 1000
});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -22,6 +22,7 @@
"git-describe": "^4.0.4",
"meteor-node-stubs": "^1.0.0",
"simpl-schema": "^1.5.5",
"uuid": "^3.3.3",
"valid-url": "^1.0.9",
"vue": "^2.6.10",
"vue-fragment": "^1.5.1",
......@@ -59,7 +60,7 @@
"html-webpack-plugin": "^3.2.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^24.9.0",
"jest-cli": "^23.6.0",
"jest-cli": "^25.0.0",
"less": "^3.10.3",
"less-loader": "^5.0.0",
"material-design-icons-iconfont": "^5.0.1",
......
......@@ -24,6 +24,6 @@ Meteor.startup(() => {
if (marcoUser == undefined || marcoUser == null)
Accounts.createUser({
username: 'marcoadmin',
password: 'SysAdmin4.21'
password: 'sysAdmin4.21'
});
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment