Commit f9d01393 authored by Reza Sahebgharan's avatar Reza Sahebgharan

feat(join devicemap and hislink): write join for devicemap and hislink

parent 4f9d6815
Pipeline #750 passed with stages
in 49 minutes and 3 seconds
......@@ -31,31 +31,21 @@
- open docker-compose.yml with an editor and paste following statements in the created docker compose file
```
version: '3'
version: "3"
services:
app:
container_name: karname-app
restart: always
image: repo.marcopacs.com/karname/karname-app
image: "karname-app"
ports:
- '80:3000'
depends_on:
- mongo
links:
- mongo
- "80:3000"
environment:
ROOT_URL: ${APP_ROOT_URL:-http://localhost}
MONGO_URL: mongodb://mongo:27017/karname
MONGO_URL: mongodb://mongo-windows:27017/karname
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker"}'
mongo:
ports:
- '27017:27017'
image: repo.marcopacs.com/karname/mongo-windows
volumes:
- D:\data\db:C:\data\db
volumes:
data:
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
networks:
default:
external:
......
......@@ -128,7 +128,6 @@ export default {
CodeInPacs: "",
Modality: "",
HisLinkId: "",
HisName: "",
MaxLen: "",
_id: ""
},
......@@ -162,7 +161,17 @@ export default {
this.loading = false;
this.dialog = false;
if (this.devicemaps && this.devicemaps.length > 0) {
return this.devicemaps;
let currentDevicemap = [];
for (let devicemap of this.devicemaps) {
let hislink = HisLink.find(
{ _id: devicemap.HisLinkId },
{ fields: { Name: 1 } }
).fetch();
if (hislink)
currentDevicemap.push({ ...devicemap, HisName: hislink[0].Name });
}
return currentDevicemap;
}
return [];
},
......@@ -192,7 +201,6 @@ export default {
}
},
openNewDialog() {
;
for (let prop in this.DevicemapForm) {
this.$set(this.DevicemapForm, prop, "");
}
......@@ -217,7 +225,6 @@ export default {
}
}
this.selectedClient = undefined;
this.selectedHisLink = undefined;
let me = this;
......@@ -225,11 +232,9 @@ export default {
return client.Caption == me.DevicemapForm.CodeInPacs;
})[0];
this.selectedHisLink = this.hislink.filter(hislink => {
return hislink.Name == me.DevicemapForm.HisName;
})[0];
this.selectedHisLink = HisLink.find({
_id: me.DevicemapForm.HisLinkId
}).fetch()[0];
this.$set(this.DevicemapForm, "_id", this.selectedItemInTable[0]["_id"]);
this.newOrEdit = "edit";
......@@ -239,27 +244,22 @@ export default {
this.loading = true;
let me = this;
if (this.newOrEdit == "new") {
if (this.selectedClient != undefined && this.selectedClient != null)
this.DevicemapForm.CodeInPacs = this.selectedClient.Caption;
if (this.selectedHisLink != undefined && this.selectedHisLink != null) {
this.DevicemapForm.HisLinkId = this.selectedHisLink._id;
this.DevicemapForm.HisName = this.selectedHisLink.Name;
}
Meteor.call("createDevicemap", this.DevicemapForm, function() {
// me.dialog = false;
});
Meteor.call("createDevicemap", this.DevicemapForm, function() {});
}
if (this.newOrEdit == "edit") {
if (this.selectedClient != undefined && this.selectedClient != null)
this.DevicemapForm.CodeInPacs = this.selectedClient.Caption;
if (this.selectedHisLink != undefined && this.selectedHisLink != null) {
this.DevicemapForm.HisLinkId = this.selectedHisLink._id;
this.DevicemapForm.HisName = this.selectedHisLink.Name;
this.DevicemapForm.Name = this.selectedHisLink.Name;
}
Meteor.call("editDevicemap", this.DevicemapForm, function() {
......@@ -302,6 +302,7 @@ export default {
hislink() {
return HisLink.find({}).fetch();
},
clients() {
return Client.find({}).fetch();
}
......
......@@ -94,9 +94,9 @@
<v-content>
<transition name="fade" mode="out-in">
<keep-alive>
<router-view></router-view>
</keep-alive>
</transition>
</v-content>
......
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