modal show & get tcamdata
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
<button class="gray square close" @click="sendMessage('close')">×</button>
|
||||
</div>
|
||||
<modal-container name="modal" :class="{'blur':applyBlurNc}"></modal-container>
|
||||
<modal-container container-name="modal2" :class="{'blur':applyBlurNc}"></modal-container>
|
||||
<modal-nc-container name="modal-nc"></modal-nc-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
+8
-4
@@ -1,12 +1,19 @@
|
||||
import Component from "vue-class-component";
|
||||
import Vue from "vue";
|
||||
import { ModalHelper, Modal } from "@/components/modals";
|
||||
import { Prop } from "vue-property-decorator";
|
||||
|
||||
@Component({
|
||||
components: { modal: Modal },
|
||||
})
|
||||
export default class ThermoModal extends Vue {
|
||||
|
||||
@Prop()
|
||||
TCamData: {
|
||||
imageSize: { x: number, y: number },
|
||||
rangeTemperature: { max: number, min: number },
|
||||
}
|
||||
|
||||
showPreview = 0;
|
||||
selectedImage: number = 0;
|
||||
serverPath = "/thermoprophet/colored";
|
||||
@@ -127,12 +134,9 @@ export default class ThermoModal extends Vue {
|
||||
'20201116-110618.jpg'];
|
||||
|
||||
close() {
|
||||
ModalHelper.HideModal();
|
||||
ModalHelper.HideModal("modal2");
|
||||
}
|
||||
|
||||
mounted() {
|
||||
for (const iterator of this.images) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
-1
@@ -29,6 +29,11 @@ export default class Thermocamera extends Vue {
|
||||
thermoImageOpacity: number = 0;
|
||||
resistanceMode = 0;
|
||||
|
||||
TCamData: {
|
||||
imageSize: { x: number, y: number },
|
||||
rangeTemperature: { max: number, min: number },
|
||||
} = null;
|
||||
|
||||
@Watch("warmers", { deep: true })
|
||||
async ChangedTemps() {
|
||||
|
||||
@@ -47,6 +52,7 @@ export default class Thermocamera extends Vue {
|
||||
}
|
||||
async mounted() {
|
||||
this.ChangedTemps();
|
||||
this.TCamData = await warmersService.GetTCamData();
|
||||
}
|
||||
|
||||
get selectedChannels(): Warmers.IChannel[] {
|
||||
@@ -169,6 +175,6 @@ export default class Thermocamera extends Vue {
|
||||
}
|
||||
|
||||
async openThermoModal() {
|
||||
ModalHelper.ShowModal(termoModal);
|
||||
ModalHelper.ShowModal(termoModal, "modal2");
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ export class WarmersService extends baseRestService {
|
||||
|
||||
async GetThermocameraStatus() {
|
||||
let result = await this.Get((await this.BASE_URL()) + "TCamData");
|
||||
warmersActions.setTcamStatus(store, result as Warmers.ICamStatus );
|
||||
warmersActions.setTcamStatus(store, result as Warmers.ICamStatus);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -42,12 +42,12 @@ export class WarmersService extends baseRestService {
|
||||
}
|
||||
|
||||
async setTCamMode(model: boolean) {
|
||||
let result = await this.Put<any>((await this.BASE_URL()) + "setTCamMode?enableTCam="+model, {}, true);
|
||||
let result = await this.Put<any>((await this.BASE_URL()) + "setTCamMode?enableTCam=" + model, {}, true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
async setTCamOn(model: boolean) {
|
||||
let result = await this.Put<any>((await this.BASE_URL()) + "setTCamOn?setTCamOn="+model,{}, true);
|
||||
let result = await this.Put<any>((await this.BASE_URL()) + "setTCamOn?setTCamOn=" + model, {}, true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -66,5 +66,13 @@ export class WarmersService extends baseRestService {
|
||||
return result;
|
||||
}
|
||||
|
||||
async GetTCamData() {
|
||||
let result = await this.Get<{
|
||||
imageSize: { x: number, y: number },
|
||||
rangeTemperature: { max: number, min: number },
|
||||
}>((await this.BASE_URL()) + "TCamData", true);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
export const warmersService = new WarmersService();
|
||||
Reference in New Issue
Block a user