This commit is contained in:
saeid
2019-05-11 19:30:05 +04:30
parent 496198b16a
commit 4abce3f4a7
49 changed files with 319 additions and 144141 deletions
+13 -13
View File
@@ -43,7 +43,7 @@
<v-divider></v-divider>
</v-layout>
<v-layout align-center justify-center wrap class="px-5 my-3">
<v-flex xs12 sm4 md3>
<v-flex xs12 sm4 md4>
<v-text-field
name="autoclave"
v-model="formData.autoclave_id"
@@ -52,7 +52,7 @@
class="pa-2"
></v-text-field>
</v-flex>
<v-flex xs12 sm4 md3>
<v-flex xs12 sm4 md4>
<v-select
:items="result"
v-model="formData.result"
@@ -61,7 +61,7 @@
class="pa-2"
></v-select>
</v-flex>
<v-flex xs12 sm4 md3>
<v-flex xs12 sm4 md4>
<div v-if="!image">
<input type="file" class="inputfile" @change="onFileChange">
<label for="file"><v-icon class="v-icon greylighten-3--text mr-2 caption IconHover">fas fa-chevron-right</v-icon>Choose a file</label>
@@ -74,7 +74,7 @@
<v-flex :class="['pa-2', item.size]" v-for="(item, key) in form" :key="key">
<v-text-field
v-if="item.type == 'Text'"
v-model="formData[item.id]"
v-model="formData[item.name+'_'+item.id]"
:label="item.name"
color="black"
></v-text-field>
@@ -82,7 +82,7 @@
multiple
v-if="item.type == 'Select'"
:items="item.options"
v-model="formData[item.id]"
v-model="formData[item.name+'_'+item.id]"
:label="item.name"
color="black"
item-text="title"
@@ -94,7 +94,7 @@
v-for="(optionValue, keyOption) in item.options"
:key="keyOption"
:label="optionValue.title"
v-model="formData[item.id]"
v-model="formData[item.name+'_'+item.id]"
:value="optionValue.id"
></v-checkbox>
</v-container>
@@ -110,7 +110,7 @@
>
<v-text-field
v-if="children.type == 'Text'"
v-model="formData[children.id]"
v-model="formData[children.name+'_'+children.id]"
:label="children.name"
color="black"
></v-text-field>
@@ -118,7 +118,7 @@
multiple
v-if="children.type == 'Select'"
:items="children.options"
v-model="formData[children.id]"
v-model="formData[children.name+'_'+children.id]"
:label="children.name"
color="black"
item-text="title"
@@ -130,7 +130,7 @@
v-for="(optionValue, keyOption) in children.options"
:key="keyOption"
:label="optionValue.title"
v-model="formData[children.id]"
v-model="formData[children.name+'_'+children.id]"
:value="optionValue.id"
></v-checkbox>
</v-container>
@@ -204,16 +204,16 @@ export default {
for (const keyForm in result.data.data.inputs[key].children) {
if (result.data.data.inputs[key].children.hasOwnProperty(keyForm)) {
if (result.data.data.inputs[key].children[keyForm].type == 'Checkbox' || result.data.data.inputs[key].children[keyForm].type == 'Select' ) {
this.formData[result.data.data.inputs[key].children[keyForm].id] = [];
this.formData[result.data.data.inputs[key].children[keyForm].name +'_'+ result.data.data.inputs[key].children[keyForm].id] = [];
} else {
this.formData[result.data.data.inputs[key].children[keyForm].id] = '';
this.formData[result.data.data.inputs[key].children[keyForm].name +'_'+ result.data.data.inputs[key].children[keyForm].id] = '';
}
}
}
} else if(result.data.data.inputs[key].type == 'Checkbox' || result.data.data.inputs[key].type == 'Select') {
this.formData[result.data.data.inputs[key].id] = [];
this.formData[result.data.data.inputs[key].name +'_'+ result.data.data.inputs[key].id] = [];
} else {
this.formData[result.data.data.inputs[key].id] = '';
this.formData[result.data.data.inputs[key].name +'_'+ result.data.data.inputs[key].id] = '';
}
}
}