commit multi image

This commit is contained in:
saeid
2019-07-20 13:37:26 +04:30
parent 415bee6837
commit df0c790ecb
3 changed files with 24 additions and 8 deletions
+17 -1
View File
@@ -47,7 +47,7 @@
<v-text-field <v-text-field
name="autoclave" name="autoclave"
v-model="formData.device_id" v-model="formData.device_id"
:label="form.device_label" :label="formData.device_label"
color="black" color="black"
class="pa-2" class="pa-2"
></v-text-field> ></v-text-field>
@@ -343,6 +343,15 @@ export default {
); );
if (result && result.status == 200) { if (result && result.status == 200) {
this.formData = result.data.data; this.formData = result.data.data;
for (const key in result.data.data.imagesPath) {
if (result.data.data.imagesPath.hasOwnProperty(key)) {
result.data.data.imagesPath[key] = '/' + result.data.data.imagesPath[key];
}
}
this.formData.images = result.data.data.imagesPath;
this.images = result.data.data.imagesPath;
} }
} }
} }
@@ -399,6 +408,13 @@ export default {
} else { } else {
this.formData.result = "Reject"; this.formData.result = "Reject";
} }
},
formData(value) {
if (value.result == "Accept") {
this.result = true;
} else {
this.result = false;
}
} }
} }
}; };
+3 -3
View File
@@ -6,7 +6,7 @@
<v-flex xs12 md3 sm3> <v-flex xs12 md3 sm3>
<v-text-field <v-text-field
class="pa-2" class="pa-2"
v-model="filter.auto_clave_id" v-model="filter.device_id"
label="autoClaveId" label="autoClaveId"
color="black" color="black"
></v-text-field> ></v-text-field>
@@ -112,7 +112,7 @@
/> />
</template> </template>
<template slot="items" slot-scope="{ item }"> <template slot="items" slot-scope="{ item }">
<td class="headline font-weight-light">{{ item.autoclave_id }}</td> <td class="headline font-weight-light">{{ item.device_id }}</td>
<td <td
class="title font-weight-light" class="title font-weight-light"
>{{ item.test_type ? item.test_type.name : 'Archived Test' }}</td> >{{ item.test_type ? item.test_type.name : 'Archived Test' }}</td>
@@ -181,7 +181,7 @@ export default {
headers: [ headers: [
{ {
sortable: false, sortable: false,
text: "AutoClaveId", text: "AutoClave Or Washer Id",
value: "name" value: "name"
}, },
{ {
+3 -3
View File
@@ -102,7 +102,7 @@
<span>Edit</span> <span>Edit</span>
</v-btn> </v-btn>
</router-link> </router-link>
<v-btn color="orange darken-1" @click="generateBarcode(item.id)"> <v-btn color="orange darken-1" @click="generateBarcode(item.unique_code)">
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon> <v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
<span>Generate Barcode</span> <span>Generate Barcode</span>
</v-btn> </v-btn>
@@ -211,8 +211,8 @@ export default {
} }
} }
}, },
async generateBarcode(id) { async generateBarcode(code) {
const result = await ApiService.post(urls.TestTypeBarcode(id)); const result = await ApiService.post(urls.Barcode(code));
if (result && result.status == 200) { if (result && result.status == 200) {
this.changeCurrentModal({ this.changeCurrentModal({
modal: "modal-barcode-barcode", modal: "modal-barcode-barcode",