mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-14 04:21:26 +03:30
ss
This commit is contained in:
@@ -73,7 +73,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.name]"
|
||||
v-model="formData[item.id]"
|
||||
:label="item.name"
|
||||
color="black"
|
||||
></v-text-field>
|
||||
@@ -81,7 +81,7 @@
|
||||
multiple
|
||||
v-if="item.type == 'Select'"
|
||||
:items="item.options"
|
||||
v-model="formData[item.name]"
|
||||
v-model="formData[item.id]"
|
||||
:label="item.name"
|
||||
color="black"
|
||||
item-text="title"
|
||||
@@ -93,7 +93,7 @@
|
||||
v-for="(optionValue, keyOption) in item.options"
|
||||
:key="keyOption"
|
||||
:label="optionValue.title"
|
||||
v-model="formData[item.name]"
|
||||
v-model="formData[item.id]"
|
||||
:value="optionValue.id"
|
||||
></v-checkbox>
|
||||
</v-container>
|
||||
@@ -109,7 +109,7 @@
|
||||
>
|
||||
<v-text-field
|
||||
v-if="children.type == 'Text'"
|
||||
v-model="formData[children.name]"
|
||||
v-model="formData[children.id]"
|
||||
:label="children.name"
|
||||
color="black"
|
||||
></v-text-field>
|
||||
@@ -117,7 +117,7 @@
|
||||
multiple
|
||||
v-if="children.type == 'Select'"
|
||||
:items="children.options"
|
||||
v-model="formData[children.name]"
|
||||
v-model="formData[children.id]"
|
||||
:label="children.name"
|
||||
color="black"
|
||||
item-text="title"
|
||||
@@ -129,7 +129,7 @@
|
||||
v-for="(optionValue, keyOption) in children.options"
|
||||
:key="keyOption"
|
||||
:label="optionValue.title"
|
||||
v-model="formData[children.name]"
|
||||
v-model="formData[children.id]"
|
||||
:value="optionValue.id"
|
||||
></v-checkbox>
|
||||
</v-container>
|
||||
@@ -203,16 +203,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].name] = [];
|
||||
this.formData[result.data.data.inputs[key].children[keyForm].id] = [];
|
||||
} else {
|
||||
this.formData[result.data.data.inputs[key].children[keyForm].name] = '';
|
||||
this.formData[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].name] = [];
|
||||
this.formData[result.data.data.inputs[key].id] = [];
|
||||
} else {
|
||||
this.formData[result.data.data.inputs[key].name] = '';
|
||||
this.formData[result.data.data.inputs[key].id] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user