This commit is contained in:
parent
f3b289d16c
commit
6ff32be2bb
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -359,7 +359,14 @@
|
||||||
@dragover.prevent
|
@dragover.prevent
|
||||||
@drop="onHeaderDrop(index)"
|
@drop="onHeaderDrop(index)"
|
||||||
>
|
>
|
||||||
<span v-if="item.isLatest" class="new-tag">
|
<span
|
||||||
|
v-if="
|
||||||
|
item.isLatest &&
|
||||||
|
displayCompareList &&
|
||||||
|
displayCompareList.length > 1
|
||||||
|
"
|
||||||
|
class="new-tag"
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
src="/images/cars/new.png"
|
src="/images/cars/new.png"
|
||||||
alt="最新品号"
|
alt="最新品号"
|
||||||
|
|
@ -1358,7 +1365,7 @@ const handleInput = (value, options = {}) => {
|
||||||
|
|
||||||
// 重新解析条件,确保使用最新的条件顺序
|
// 重新解析条件,确保使用最新的条件顺序
|
||||||
parsedConditions.value = parseConditions(newValue);
|
parsedConditions.value = parseConditions(newValue);
|
||||||
|
|
||||||
// 清理精准查询条件:如果原条件有精准查询标记,需要移除或更新
|
// 清理精准查询条件:如果原条件有精准查询标记,需要移除或更新
|
||||||
if (preciseConditions.value.length > 0) {
|
if (preciseConditions.value.length > 0) {
|
||||||
// 找到引用原索引的精准查询条件
|
// 找到引用原索引的精准查询条件
|
||||||
|
|
@ -1463,7 +1470,7 @@ const handleInput = (value, options = {}) => {
|
||||||
// 同步更新 parsedConditions,确保 tag 显示与输入框内容一致
|
// 同步更新 parsedConditions,确保 tag 显示与输入框内容一致
|
||||||
const newConditions = parseConditions(normalizedValue);
|
const newConditions = parseConditions(normalizedValue);
|
||||||
parsedConditions.value = newConditions;
|
parsedConditions.value = newConditions;
|
||||||
|
|
||||||
// 清理不再存在的精准查询条件
|
// 清理不再存在的精准查询条件
|
||||||
if (preciseConditions.value.length > 0) {
|
if (preciseConditions.value.length > 0) {
|
||||||
preciseConditions.value = preciseConditions.value.filter((preciseCond) => {
|
preciseConditions.value = preciseConditions.value.filter((preciseCond) => {
|
||||||
|
|
@ -1477,7 +1484,7 @@ const handleInput = (value, options = {}) => {
|
||||||
return exists;
|
return exists;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 同步精准查询条件的索引
|
// 同步精准查询条件的索引
|
||||||
syncPreciseConditionsIndex();
|
syncPreciseConditionsIndex();
|
||||||
|
|
||||||
|
|
@ -1510,16 +1517,14 @@ const fetchSearchHints = async (keyword) => {
|
||||||
// 如果正在编辑中间的条件,需要重新排序:将正在编辑的条件移到最后一个位置
|
// 如果正在编辑中间的条件,需要重新排序:将正在编辑的条件移到最后一个位置
|
||||||
let conditionsToProcess = [...parsedConditions.value];
|
let conditionsToProcess = [...parsedConditions.value];
|
||||||
let reorderedInputWord = currentInput.value.trim();
|
let reorderedInputWord = currentInput.value.trim();
|
||||||
|
|
||||||
if (activeIndex >= 0 && activeIndex < conditionsToProcess.length - 1) {
|
if (activeIndex >= 0 && activeIndex < conditionsToProcess.length - 1) {
|
||||||
// 正在编辑中间的条件,需要重新排序
|
// 正在编辑中间的条件,需要重新排序
|
||||||
const [editedCondition] = conditionsToProcess.splice(activeIndex, 1);
|
const [editedCondition] = conditionsToProcess.splice(activeIndex, 1);
|
||||||
conditionsToProcess.push(editedCondition);
|
conditionsToProcess.push(editedCondition);
|
||||||
|
|
||||||
// 重新构建 inputWord,将被编辑的条件移到最后一个位置
|
// 重新构建 inputWord,将被编辑的条件移到最后一个位置
|
||||||
const reorderedParts = parts
|
const reorderedParts = parts.map((p) => p.trim()).filter((p) => p);
|
||||||
.map((p) => p.trim())
|
|
||||||
.filter((p) => p);
|
|
||||||
if (activeIndex < reorderedParts.length) {
|
if (activeIndex < reorderedParts.length) {
|
||||||
const [editedPart] = reorderedParts.splice(activeIndex, 1);
|
const [editedPart] = reorderedParts.splice(activeIndex, 1);
|
||||||
reorderedParts.push(editedPart);
|
reorderedParts.push(editedPart);
|
||||||
|
|
@ -1560,7 +1565,7 @@ const fetchSearchHints = async (keyword) => {
|
||||||
const isValueFromSuggestion = allValues.value.some(
|
const isValueFromSuggestion = allValues.value.some(
|
||||||
(item) => String(item.value) === String(condition.value)
|
(item) => String(item.value) === String(condition.value)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isValueFromSuggestion) {
|
if (isValueFromSuggestion) {
|
||||||
// 从下拉框选择的值,放在 fieldValue 里
|
// 从下拉框选择的值,放在 fieldValue 里
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue