mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 21:31:07 +03:30
pack && packages && items && cycle
This commit is contained in:
@@ -12,13 +12,12 @@
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-autocomplete
|
||||
<v-text-field
|
||||
class="pa-2"
|
||||
v-model="filter.result"
|
||||
label="Result"
|
||||
v-model="filter.size"
|
||||
label="Size"
|
||||
color="black"
|
||||
:items="result"
|
||||
></v-autocomplete>
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex class xs12 md2 sm3>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load()">
|
||||
@@ -47,9 +46,9 @@
|
||||
/>
|
||||
</template>
|
||||
<template slot="items" slot-scope="{ item }">
|
||||
<td class="title font-weight-light">{{ item.id }}</td>
|
||||
<td class="title font-weight-light">{{ item.name }}</td>
|
||||
<td class="title font-weight-light">{{ item.result }}</td>
|
||||
<td class="title font-weight-light">{{ item.created_at }}</td>
|
||||
<td class="title font-weight-light">{{ item.size }}</td>
|
||||
<td class="text-xs-right">
|
||||
<v-btn color="cyan" class="mr-2" @click="show(item.id)">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
|
||||
@@ -104,18 +103,18 @@ export default {
|
||||
headers: [
|
||||
{
|
||||
sortable: true,
|
||||
text: "ID",
|
||||
value: "id"
|
||||
},
|
||||
{
|
||||
sortable: false,
|
||||
text: "Name",
|
||||
value: "name"
|
||||
},
|
||||
{
|
||||
sortable: false,
|
||||
text: "Result",
|
||||
value: "result"
|
||||
},
|
||||
{
|
||||
sortable: false,
|
||||
text: "Date",
|
||||
value: "date"
|
||||
text: "Size",
|
||||
value: "size"
|
||||
},
|
||||
{
|
||||
sortable: false,
|
||||
@@ -126,9 +125,8 @@ export default {
|
||||
],
|
||||
filter: {
|
||||
name: '',
|
||||
result: '',
|
||||
size: '',
|
||||
},
|
||||
result: ['Pass', 'Fail'],
|
||||
items: [],
|
||||
currentPage: 1,
|
||||
lastPage: 1,
|
||||
@@ -180,34 +178,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async generateBarcode(code) {
|
||||
const result = await ApiService.post(urls.Barcode(code));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
properties: { result }
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalResult"])
|
||||
},
|
||||
watch: {
|
||||
currentPage(page) {
|
||||
this.load(page);
|
||||
},
|
||||
getModalResult(testResult) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResult.id
|
||||
) {
|
||||
this.items[key] = testResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user