更新文件上传时的逻辑操作
parent
766b29901f
commit
a311d2fd39
|
|
@ -775,6 +775,7 @@ export const get_format_checks = (data, form_value, is_format = false, type = ''
|
|||
}
|
||||
return { is_error, error_text }
|
||||
};
|
||||
|
||||
// 复选框和复选下拉框的校验逻辑
|
||||
export const checkbox_range_handle = (data, form_value) => {
|
||||
const { min_num = '', max_num = '' } = data;
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
this.$emit('dataAddressChange', { value: e.detail.value, id: this.propDataId });
|
||||
},
|
||||
input_value_blur(e) {
|
||||
// 重新编辑一下历史数据
|
||||
// 重新编辑一下历史数据
|
||||
this.setData({
|
||||
detailed_value: e.detail.value,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@
|
|||
// 校验数据
|
||||
this.$emit('dataCheck', { is_error, error_text, value: new_time_data, id: this.propDataId });
|
||||
// 发送数据
|
||||
this.$emit('dataChange', { value: new_time_data, id: this.propDataId });
|
||||
// this.$emit('dataChange', { value: new_time_data, id: this.propDataId });
|
||||
},
|
||||
date_handle(time0, time1) {
|
||||
if (isEmpty(time0) || isEmpty(time1)) {
|
||||
|
|
@ -185,7 +185,7 @@
|
|||
// 校验数据
|
||||
this.$emit('dataCheck', { is_error, error_text, value: date, id: this.propDataId });
|
||||
|
||||
this.$emit('dataChange', { value: date, id: this.propDataId });
|
||||
// this.$emit('dataChange', { value: date, id: this.propDataId });
|
||||
},
|
||||
mask_click() {
|
||||
this.z_index_change('');
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
// 校验数据
|
||||
this.$emit('dataCheck', { is_error, error_text, value: date, id: this.propDataId });
|
||||
|
||||
this.$emit('dataChange', { value: date, id: this.propDataId });
|
||||
// this.$emit('dataChange', { value: date, id: this.propDataId });
|
||||
},
|
||||
mask_click() {
|
||||
this.z_index_change('');
|
||||
|
|
|
|||
|
|
@ -298,10 +298,12 @@
|
|||
const err_list = line_error[0].com_data;
|
||||
// 如果当前行有错误
|
||||
if (err_list && err_list.common_config && err_list.common_config.is_error == '1') {
|
||||
const key_type = ['select-multi', 'checkbox', 'radio-btns', 'select', 'address', 'date', 'upload-img', 'upload-video', 'upload-attachments', 'date-group'];
|
||||
const name = key_type.includes(line_error[0].key) || ['select-multi', 'checkbox', 'radio-btns', 'select'].includes(err_list.type) ? '选择' : '填写';
|
||||
if (err_list.common_config.error_text == '此项为必填项') {
|
||||
return `请填写「${err_list.title}」`;
|
||||
return `请${name}「${err_list.title}」`;
|
||||
} else {
|
||||
return `请正确填写「${err_list.title}」`;
|
||||
return `请正确${name}「${err_list.title}」`;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@
|
|||
this.setData({
|
||||
form_value: list,
|
||||
});
|
||||
this.$emit('dataChange', { value: list, id: this.propDataId });
|
||||
const { is_error = '0', error_text = '' } = get_format_checks(com_data, list);
|
||||
this.$emit('dataCheck', { is_error, error_text, value: list, id: this.propDataId });
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue