diff --git a/pages/form-input/components/form-input/form-input-base.vue b/pages/form-input/components/form-input/form-input-base.vue index 513080b7..b3188af4 100644 --- a/pages/form-input/components/form-input/form-input-base.vue +++ b/pages/form-input/components/form-input/form-input-base.vue @@ -23,11 +23,11 @@ - + - - + + @@ -368,7 +368,7 @@ export default { com_data.form_value = this.propData[name] || ''; com_data.form_value_code = this.propData[`${ name }_verify`] || ''; } else if (item.key ==='date-group') { - com_data.form_value = [ this.propData[`${ name }`].start || '' , this.propData[`${ name }`].end || ''] || []; + com_data.form_value = [ this.propData[`${ name }_start`] || '' , this.propData[`${ name }_end`] || ''] || []; } else if (item.key == 'address') { com_data.province_id = this.propData[`${ name }_province_id`] || ''; com_data.city_id = this.propData[`${ name }_city_id`] || ''; @@ -444,13 +444,13 @@ export default { /* * 其他的备注信息修改 */ - data_outer_change(e) { + data_other_change(e) { const { value, id } = e; // 改变对应id的数据 const data = [...this.data_list]; data.forEach(item => { if (item.id == id && item.com_data) { - item.com_data.outer_value = value; + item.com_data.other_value = value; } }); this.setData({ data_list: data }); @@ -478,13 +478,13 @@ export default { /* * 其他的值修改后校验的数据更新 */ - data_outer_check(e) { + data_other_check(e) { const { is_error, error_text, value, id } = e; // 改变对应id的数据 const data = [...this.data_list]; data.forEach(item => { if (item.id == id && item.com_data && item.com_data.common_config) { - item.com_data.outer_value = value + item.com_data.other_value = value item.com_data.common_config.is_error = is_error; item.com_data.common_config.error_text = error_text; } @@ -647,7 +647,8 @@ export default { submit_data[`${ name }_verify`] = com_data?.form_value_code || ''; } } else if (item.key ==='date-group') { - submit_data[`${ name }`] = { 'start': value[0] || '' , 'end': value[1] || '' } || {}; + submit_data[`${ name }_start`] = value[0] || ''; + submit_data[`${ name }_end`] = value[1] || ''; } else if (item.key == 'address') { submit_data[`${ name }_province_id`] = value[0] || ''; submit_data[`${ name }_city_id`] = value[1] || ''; @@ -699,9 +700,9 @@ export default { } // 其他字段的格式验证 else if (this.fieldCheckMap[item.key]) { - let field_data = this.fieldCheckMap[data_item.key]; - if (['single-text', 'select', 'radio-btns'].includes(data_item.com_data.type)) { - field_data = this.fieldCheckMap[data_item.com_data.type]; + let field_data = this.fieldCheckMap[item.key]; + if (['single-text', 'select', 'radio-btns'].includes(item.com_data.type)) { + field_data = this.fieldCheckMap[item.com_data.type]; } const { is_format, type } = field_data; const { is_error = '0', error_text = '' } = get_format_checks(com_data, com_data.form_value, is_format, type); @@ -791,7 +792,8 @@ export default { submit_data[`${ subform_name }_city_name`] = subform_com_data.city_name || '' submit_data[`${ subform_name }_county_name`] = subform_com_data.county_name || '' } else if (item.key ==='date-group') { - submit_data[`${ subform_name }`] = { 'start': value[0] || '' , 'end': value[1] || '' } || {}; + submit_data[`${ subform_name }_start`] = subform_value[0] || ''; + submit_data[`${ subform_name }_end`] = subform_value[1] || ''; } else if (['checkbox', 'select-multi'].includes(item.key)) { submit_data[subform_name] = subform_value; if (subform_com_data.is_add_option == '1') { diff --git a/pages/form-input/components/form-input/radio.vue b/pages/form-input/components/form-input/radio.vue index 773f88d3..f320bcc7 100644 --- a/pages/form-input/components/form-input/radio.vue +++ b/pages/form-input/components/form-input/radio.vue @@ -9,7 +9,7 @@ @@ -49,7 +49,7 @@ is_multicolour: '0', dialog_value: '', option_value: '', - outer_value: '', + other_value: '', }; }, watch: { @@ -83,22 +83,22 @@ color_style: get_color_style(this.propMobile), option_list: com_data?.option_list || [], form_value: com_data?.form_value || [], - outer_value: com_data?.outer_value || '', + other_value: com_data?.other_value || '', option_value: option_value, }); }, - input_outer_value_event(e) { + input_other_value_event(e) { this.setData({ - outer_value: e.detail.value, + other_value: e.detail.value, }); // 执行校验逻辑 - this.data_outer_check({ detail: { value: this.outer_value } }); + this.data_other_check({ detail: { value: this.other_value } }); // 传递参数给父级 - this.$emit('dataOuterChange', { value: e.detail.value, id: this.propDataId }); + this.$emit('dataOtherChange', { value: e.detail.value, id: this.propDataId }); }, - data_outer_check(e) { + data_other_check(e) { const { is_error = '0', error_text = '' } = get_format_checks(this.com_data, e.detail.value, false, ''); - this.$emit('dataOuterCheck', { is_error, error_text, value: e.detail.value, id: this.propDataId }); + this.$emit('dataOtherCheck', { is_error, error_text, value: e.detail.value, id: this.propDataId }); }, // 校验逻辑 data_check(e) { diff --git a/pages/form-input/components/form-input/select.vue b/pages/form-input/components/form-input/select.vue index 801b3755..b6076345 100644 --- a/pages/form-input/components/form-input/select.vue +++ b/pages/form-input/components/form-input/select.vue @@ -1,24 +1,26 @@