diff --git a/webapp/src/components/tabContentComponents/slideScanComponents/paneSlideScan.vue b/webapp/src/components/tabContentComponents/slideScanComponents/paneSlideScan.vue
index 5ed5c4b0..35943256 100644
--- a/webapp/src/components/tabContentComponents/slideScanComponents/paneSlideScan.vue
+++ b/webapp/src/components/tabContentComponents/slideScanComponents/paneSlideScan.vue
@@ -11,135 +11,6 @@
:modal-progress="true"
/>
-
@@ -151,74 +22,12 @@ export default {
taskSubmitter
},
- data: function() {
- return {
- scanUri: null,
- stepValue: 0,
- hostDeviceName: null,
- message: null,
- // Scan info
- username: "",
- currentTime: this.getLocalDatetimeString(),
- patientID: "",
- sampleType: "thin",
- scanRunning: false,
- // Scan settings
- bayer: false,
- grid: [10, 10, 9],
- stride_size: [800, 600, 10],
- fast_autofocus: true,
- autofocus_dz: 2000,
- style: "raster",
- use_video_port: false
- };
- },
-
computed: {
backendOK() {
return this.thingAvailable("smart_scan");
},
smartScanUri() {
return this.thingActionUrl("smart_scan", "sample_scan");
- },
- currentTimeForm: {
- get() {
- // Chop the timezone information from the end
- return this.currentTime.substr(0, 19);
- },
- set(val) {
- // Get timezone
- var dt = new Date();
- var tzo = -dt.getTimezoneOffset(),
- dif = tzo >= 0 ? "+" : "-",
- pad = function(num) {
- var norm = Math.floor(Math.abs(num));
- return (norm < 10 ? "0" : "") + norm;
- };
- // Stick to the end of the new timestring from the form
- this.currentTime = val + dif + pad(tzo / 60) + ":" + pad(tzo % 60);
- }
- },
-
- payload: {
- get() {
- return {
- filename: `${this.patientID}_${this.sampleType}`,
- temporary: false,
- bayer: this.bayer,
- grid: this.grid,
- stride_size: this.stride_size,
- fast_autofocus: this.fast_autofocus,
- autofocus_dz: this.autofocus_dz,
- use_video_port: this.use_video_port,
- annotations: {
- patientID: this.patientID,
- username: this.username,
- clientDatetime: this.currentTime
- },
- tags: ["slidescan"]
- };
- }
}
},
@@ -226,82 +35,7 @@ export default {
onScanError: function(error) {
this.scanRunning = false;
this.modalError(error);
- },
-
- decrement: function() {
- if (this.stepValue > 0) {
- this.stepValue = this.stepValue - 1;
- }
- },
-
- increment: function() {
- // Validate sections
- if (this.stepValue == 0) {
- if (!this.username) {
- this.message = "Please enter your name";
- return false;
- }
- }
- if (this.stepValue == 1) {
- if (!this.patientID) {
- this.message = "Please enter a patient ID";
- return false;
- }
- }
- // Upper bound on section number
- if (this.stepValue < 3) {
- this.stepValue = this.stepValue + 1;
- this.message = "";
- return true;
- }
- },
-
- restart: function() {
- this.stepValue = 0;
- this.patientID = "";
- this.currentTime = this.getLocalDatetimeString();
- },
-
- getLocalDatetimeString: function() {
- var dt = new Date();
- var tzo = -dt.getTimezoneOffset(),
- dif = tzo >= 0 ? "+" : "-",
- pad = function(num) {
- var norm = Math.floor(Math.abs(num));
- return (norm < 10 ? "0" : "") + norm;
- };
- return (
- dt.getFullYear() +
- "-" +
- pad(dt.getMonth() + 1) +
- "-" +
- pad(dt.getDate()) +
- "T" +
- pad(dt.getHours()) +
- ":" +
- pad(dt.getMinutes()) +
- ":" +
- pad(dt.getSeconds()) +
- dif +
- pad(tzo / 60) +
- ":" +
- pad(tzo % 60)
- );
}
}
};
-
-