mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 23:21:05 +03:30
next Edit
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs>
|
||||
<material-card
|
||||
color="black"
|
||||
title="Submit Test Result">
|
||||
<material-card color="black" title="Submit Test Result">
|
||||
<v-layout align-center justify-center wrap class="px-5 my-3">
|
||||
<v-flex xs12 sm4 md4>
|
||||
<v-autocomplete
|
||||
@@ -25,7 +23,11 @@
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 class="text-xs-center text-sm-center text-md-center">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" @click="selectTestType" style="padding:10px 60px;">
|
||||
<v-btn
|
||||
class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"
|
||||
@click="selectTestType"
|
||||
style="padding:10px 60px;"
|
||||
>
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-right</v-icon>
|
||||
<span class="black--text">GO</span>
|
||||
</v-btn>
|
||||
@@ -70,15 +72,49 @@
|
||||
class="pa-2"
|
||||
item-text="title"
|
||||
></v-select>
|
||||
<template v-if="item.type == 'CheckBox'">
|
||||
<v-container fluid v-if="item.type == 'Checkbox'">
|
||||
<p>{{ item.name }}</p>
|
||||
<v-container fluid v-for="(optionValue, keyOption) in item.options" :key="keyOption">
|
||||
<v-checkbox :label="option.title" v-model="form.data[key][item.name]" :value="optionValue"></v-checkbox>
|
||||
</v-container>
|
||||
<v-checkbox
|
||||
v-for="(optionValue, keyOption) in item.options"
|
||||
:key="keyOption"
|
||||
:label="optionValue.title"
|
||||
v-model="item[item.name]"
|
||||
:value="optionValue.title"
|
||||
></v-checkbox>
|
||||
</v-container>
|
||||
<template v-if="item.type == 'Form'">
|
||||
<v-layout row wrap>
|
||||
<h3>{{ item.name }}</h3>
|
||||
<v-flex v-for="(children, keyChildren) in item.children" :key="keyChildren">
|
||||
<v-text-field
|
||||
v-if="children.type == 'Text'"
|
||||
v-model="children[children.name]"
|
||||
:label="children.name"
|
||||
color="black"
|
||||
class="pa-2"
|
||||
></v-text-field>
|
||||
<v-select
|
||||
v-if="children.type == 'Select'"
|
||||
:items="children.options"
|
||||
v-model="children[children.name]"
|
||||
:label="children.name"
|
||||
color="black"
|
||||
class="pa-2"
|
||||
item-text="title"
|
||||
></v-select>
|
||||
<v-container fluid v-if="children.type == 'Checkbox'">
|
||||
<p>{{ children.name }}</p>
|
||||
<v-checkbox
|
||||
v-for="(optionValue, keyOption) in children.options"
|
||||
:key="keyOption"
|
||||
:label="optionValue.title"
|
||||
v-model="children[children.name]"
|
||||
:value="optionValue.title"
|
||||
></v-checkbox>
|
||||
</v-container>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
<!-- <template v-if="item.type == 'Form'">
|
||||
|
||||
</template> -->
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="px-5 my-3">
|
||||
@@ -96,7 +132,7 @@
|
||||
</v-btn>
|
||||
</router-link>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</v-form>
|
||||
</template>
|
||||
@@ -105,28 +141,23 @@ import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
export default {
|
||||
data: () => ({
|
||||
result: [
|
||||
'Accept',
|
||||
'Reject',
|
||||
],
|
||||
result: ["Accept", "Reject"],
|
||||
testTypeNames: [],
|
||||
searchInput: '',
|
||||
searchInput: "",
|
||||
form: {
|
||||
autoclave_id: '',
|
||||
result: '',
|
||||
data: [
|
||||
|
||||
]
|
||||
autoclave_id: "",
|
||||
result: "",
|
||||
data: []
|
||||
},
|
||||
filter: {
|
||||
name:'',
|
||||
unique_code:''
|
||||
name: "",
|
||||
unique_code: ""
|
||||
}
|
||||
}),
|
||||
created() {
|
||||
this.load();
|
||||
},
|
||||
methods:{
|
||||
methods: {
|
||||
async load() {
|
||||
const result = await ApiService.get(urls.listTestTypeName);
|
||||
this.testTypeNames = result.data.data;
|
||||
@@ -138,5 +169,5 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user