mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 20:21:08 +03:30
Finish production
This commit is contained in:
@@ -3,17 +3,84 @@
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Test Resualt" text>
|
||||
<v-layout align-center wrap class="my-3">
|
||||
<v-flex xs12 md2 sm2>
|
||||
<v-text-field class="pa-2" label="Name" color="black"></v-text-field>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-text-field
|
||||
class="pa-2"
|
||||
v-model="filter.auto_clave_id"
|
||||
label="autoClaveId"
|
||||
color="black"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2>
|
||||
<v-text-field class="pa-2" label="Date" color="black"></v-text-field>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-text-field
|
||||
class="pa-2"
|
||||
v-model="filter.testType_name"
|
||||
label="TestType Name"
|
||||
color="black"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2>
|
||||
<v-text-field class="pa-2" label="Hospital" color="black"></v-text-field>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-text-field
|
||||
class="pa-2"
|
||||
v-model="filter.hospital"
|
||||
label="Hospital"
|
||||
color="black"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex class xs12 md2 sm2>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-text-field
|
||||
class="pa-2"
|
||||
v-model="filter.user_name"
|
||||
label="User Name"
|
||||
color="black"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md3>
|
||||
<v-menu
|
||||
lazy
|
||||
:close-on-content-click="true"
|
||||
transition="v-scale-transition"
|
||||
offset-y
|
||||
v-model="fromMenu"
|
||||
>
|
||||
<v-text-field
|
||||
required
|
||||
slot="activator"
|
||||
label="FromDate"
|
||||
v-model="filter.fromPicker"
|
||||
></v-text-field>
|
||||
<v-date-picker
|
||||
color="pink"
|
||||
no-title
|
||||
v-model="filter.fromPicker"
|
||||
:date-format="date => new Date(date).toDateString()"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md3>
|
||||
<v-menu
|
||||
lazy
|
||||
:close-on-content-click="true"
|
||||
transition="v-scale-transition"
|
||||
offset-y
|
||||
v-model="upToMenu"
|
||||
>
|
||||
<v-text-field
|
||||
required
|
||||
slot="activator"
|
||||
label="FromDate"
|
||||
v-model="filter.upToPicker"
|
||||
></v-text-field>
|
||||
<v-date-picker
|
||||
color="pink"
|
||||
no-title
|
||||
v-model="filter.upToPicker"
|
||||
:date-format="date => new Date(date).toDateString()"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex class xs12 md2 sm3>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load(null, null)">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
|
||||
<span class="white--text">Filter</span>
|
||||
</v-btn>
|
||||
@@ -40,8 +107,12 @@
|
||||
</template>
|
||||
<template slot="items" slot-scope="{ item }">
|
||||
<td class="headline font-weight-light">{{ item.autoclave_id }}</td>
|
||||
<td class="title font-weight-light">{{ item.test_type ? item.test_type.name : 'Archived Test' }}</td>
|
||||
<td class="title font-weight-light" >{{ item.user.medical_center.name }}</td>
|
||||
<td
|
||||
class="title font-weight-light"
|
||||
>{{ item.test_type ? item.test_type.name : 'Archived Test' }}</td>
|
||||
<td
|
||||
class="title font-weight-light"
|
||||
>{{ item.user.medical_center.name }}</td>
|
||||
<td class="title font-weight-light">{{ item.user.name }}</td>
|
||||
<td class="title font-weight-light">{{ item.result }}</td>
|
||||
<td class="title font-weight-light">{{ item.created_at }}</td>
|
||||
@@ -51,7 +122,8 @@
|
||||
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
|
||||
<span>Show</span>
|
||||
</v-btn>
|
||||
<router-link v-if="$hasRole('Admin') || item.user_id == $store.state.user.id"
|
||||
<router-link
|
||||
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id"
|
||||
:to="{name: 'EditTestResult', params: {testResult: item.id}}"
|
||||
>
|
||||
<v-btn color="orange" class="mr-2">
|
||||
@@ -139,6 +211,16 @@ export default {
|
||||
align: "right"
|
||||
}
|
||||
],
|
||||
filter: {
|
||||
auto_clave_id: '',
|
||||
testType_name: '',
|
||||
hospital: '',
|
||||
user_name: '',
|
||||
fromPicker: '',
|
||||
upToPicker: '',
|
||||
},
|
||||
fromMenu: '',
|
||||
upToMenu: '',
|
||||
items: [],
|
||||
currentPage: 1,
|
||||
lastPage: 1
|
||||
@@ -153,8 +235,18 @@ export default {
|
||||
methods: {
|
||||
...mapMutations("modal", ["changeCurrentModal"]),
|
||||
async load(page = 1, verified = null) {
|
||||
let filter = '?';
|
||||
for (const key in this.filter) {
|
||||
if (this.filter.hasOwnProperty(key)) {
|
||||
filter += `${key}=${this.filter[key]}&`;
|
||||
}
|
||||
}
|
||||
if (verified) {
|
||||
filter += `verified=${verified}&`;
|
||||
}
|
||||
filter += (page) ? `page=${page}` : `page=1`;
|
||||
const result = await ApiService.get(
|
||||
urls.listTestResult(page, verified)
|
||||
urls.listTestResult(filter)
|
||||
);
|
||||
if (result && result.status == 200) {
|
||||
this.items = result.data.data.data;
|
||||
@@ -187,7 +279,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalResult"])
|
||||
@@ -198,7 +290,10 @@ export default {
|
||||
},
|
||||
getModalResult(testResult) {
|
||||
for (const key in this.items) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResult.id) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResult.id
|
||||
) {
|
||||
this.items[key] = testResult;
|
||||
}
|
||||
}
|
||||
@@ -206,3 +301,14 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.v-btn--floating {
|
||||
padding: 0!important;
|
||||
}
|
||||
.theme--light.v-btn.v-btn--flat {
|
||||
color: rgba(0,0,0,.87)!important;
|
||||
}
|
||||
.v-btn--floating, .v-btn--icon:before {
|
||||
border-radius: 50%!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user