去除日志输出
This commit is contained in:
parent
cc4bbc4dbe
commit
063ab62109
|
|
@ -1359,20 +1359,17 @@ const handleCheckedBaseFieldChange = (value) => {
|
||||||
baseFieldIsIndeterminate.value = checkedCount > 0 && checkedCount < baseFields.value.length
|
baseFieldIsIndeterminate.value = checkedCount > 0 && checkedCount < baseFields.value.length
|
||||||
}
|
}
|
||||||
// 报价字段全选操作
|
// 报价字段全选操作
|
||||||
const handleCheckAllPriceFieldChange = (val) => {
|
const handleCheckAllPriceFieldChange = (val) => {
|
||||||
console.log('全选报价字段', val)
|
|
||||||
checkedPriceFields.value = []
|
checkedPriceFields.value = []
|
||||||
if (val) {
|
if (val) {
|
||||||
priceFields.value.forEach(element => {
|
priceFields.value.forEach(element => {
|
||||||
checkedPriceFields.value.push(element.propertyPath)
|
checkedPriceFields.value.push(element.propertyPath)
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ToolOptions.value.length == 8) {
|
if (ToolOptions.value.length == 8) {
|
||||||
console.log('待处理报价', exportForm.value.mediaTypeExport, activeIndex.value)
|
|
||||||
// 查找指定类型的报价字段
|
// 查找指定类型的报价字段
|
||||||
let curPriceFields = exportForm.value.mediaTypeExport.filter(item => item.type == activeIndex.value);
|
let curPriceFields = exportForm.value.mediaTypeExport.filter(item => item.type == activeIndex.value);
|
||||||
if (curPriceFields.length > 0) {
|
if (curPriceFields.length > 0) {
|
||||||
console.log('过滤后的数据', curPriceFields[0].exportPriceFields)
|
|
||||||
curPriceFields[0].exportPriceFields = [...checkedPriceFields.value] // 使用数组索引
|
curPriceFields[0].exportPriceFields = [...checkedPriceFields.value] // 使用数组索引
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1383,16 +1380,13 @@ const handleCheckAllPriceFieldChange = (val) => {
|
||||||
curPriceFields[0].exportPriceFields = [...checkedPriceFields.value] // 使用数组索引
|
curPriceFields[0].exportPriceFields = [...checkedPriceFields.value] // 使用数组索引
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ToolOptions.value.length == 0) {
|
if (ToolOptions.value.length == 0) {
|
||||||
console.log('待处理报价', exportForm.value.mediaTypeExport, 0)
|
|
||||||
// 查找指定类型的报价字段
|
// 查找指定类型的报价字段
|
||||||
let curPriceFields = exportForm.value.mediaTypeExport.filter(item => item.type == 0);
|
let curPriceFields = exportForm.value.mediaTypeExport.filter(item => item.type == 0);
|
||||||
if (curPriceFields.length > 0) {
|
if (curPriceFields.length > 0) {
|
||||||
console.log('过滤后的数据', curPriceFields[0].exportPriceFields)
|
|
||||||
curPriceFields[0].exportPriceFields = [...checkedPriceFields.value] // 使用数组索引
|
curPriceFields[0].exportPriceFields = [...checkedPriceFields.value] // 使用数组索引
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('处理后的报价字段', exportForm.value.mediaTypeExport)
|
|
||||||
} else {
|
} else {
|
||||||
if (ToolOptions.value.length == 8) {
|
if (ToolOptions.value.length == 8) {
|
||||||
// 查找指定类型的报价字段
|
// 查找指定类型的报价字段
|
||||||
|
|
@ -1413,16 +1407,14 @@ const handleCheckAllPriceFieldChange = (val) => {
|
||||||
if (curPriceFields.length > 0) {
|
if (curPriceFields.length > 0) {
|
||||||
curPriceFields[0].exportPriceFields = []
|
curPriceFields[0].exportPriceFields = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('处理后的报价字段', exportForm.value.mediaTypeExport)
|
|
||||||
}
|
}
|
||||||
priceFieldIsIndeterminate.value = false
|
priceFieldIsIndeterminate.value = false
|
||||||
// 更新选择状态
|
// 更新选择状态
|
||||||
checkPriceFieldSelectStatus()
|
checkPriceFieldSelectStatus()
|
||||||
}
|
}
|
||||||
// 单个选择报价字段
|
// 单个选择报价字段
|
||||||
const handleCheckedPriceFieldChange = (value) => {
|
const handleCheckedPriceFieldChange = (value) => {
|
||||||
console.log('单个选择报价字段', value)
|
|
||||||
const checkedCount = value.length
|
const checkedCount = value.length
|
||||||
priceFieldCheckAll.value = checkedCount === priceFields.value.length
|
priceFieldCheckAll.value = checkedCount === priceFields.value.length
|
||||||
priceFieldIsIndeterminate.value = checkedCount > 0 && checkedCount < priceFields.value.length
|
priceFieldIsIndeterminate.value = checkedCount > 0 && checkedCount < priceFields.value.length
|
||||||
|
|
@ -1530,19 +1522,15 @@ const getMediaExcelPriceField = () => {
|
||||||
// 判断报价信息是否存在指定类型数据
|
// 判断报价信息是否存在指定类型数据
|
||||||
const handleCheckPriceField = (_mediaType) => {
|
const handleCheckPriceField = (_mediaType) => {
|
||||||
// 获取当前的所有要导出的报价字段
|
// 获取当前的所有要导出的报价字段
|
||||||
const currentMediaTypeExport = [...exportForm.value.mediaTypeExport]; // 创建副本以避免直接修改原数组
|
const currentMediaTypeExport = [...exportForm.value.mediaTypeExport]; // 创建副本以避免直接修改原数组
|
||||||
console.log('要导出的报价字段', currentMediaTypeExport)
|
|
||||||
// 过滤掉指定类型的旧数据
|
// 过滤掉指定类型的旧数据
|
||||||
const filteredFields = currentMediaTypeExport.filter(item => item.type !== _mediaType);
|
const filteredFields = currentMediaTypeExport.filter(item => item.type !== _mediaType);
|
||||||
console.log('要导出的报价旧数据', filteredFields)
|
|
||||||
// 判断是否有指定类型数据
|
// 判断是否有指定类型数据
|
||||||
const _mediaTypeArr = currentMediaTypeExport.filter(item => item.type == _mediaType);
|
const _mediaTypeArr = currentMediaTypeExport.filter(item => item.type == _mediaType);
|
||||||
console.log('当前类型的报价数据', _mediaTypeArr)
|
|
||||||
// 如果数据不存在
|
// 如果数据不存在
|
||||||
if (_mediaTypeArr.length == 0) {
|
if (_mediaTypeArr.length == 0) {
|
||||||
filteredFields.push({ type: _mediaType, exportPriceFields: [] }); // 使用 push 追加新文件
|
filteredFields.push({ type: _mediaType, exportPriceFields: [] }); // 使用 push 追加新文件
|
||||||
exportForm.value.mediaTypeExport = [...filteredFields]; // 更新 ref
|
exportForm.value.mediaTypeExport = [...filteredFields]; // 更新 ref
|
||||||
console.log('更新后的数据', exportForm.value.mediaTypeExport)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 类型切换
|
// 类型切换
|
||||||
|
|
@ -1635,8 +1623,7 @@ const handleChangeType = (_type) => {
|
||||||
checkedPriceFields.value = currentCheckedFields
|
checkedPriceFields.value = currentCheckedFields
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let wlType = _type + 1
|
let wlType = _type + 1
|
||||||
console.log('网络类型', wlType)
|
|
||||||
handleCheckPriceField(wlType)
|
handleCheckPriceField(wlType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user