|
@@ -6,7 +6,8 @@
|
|
|
高级查询方案:
|
|
|
<a-tooltip placement="top" v-for="(item, index) in savedQueries.slice(0, visibleCount)">
|
|
|
<template #title>
|
|
|
- <span>双击取消查询 |<a-button type="link" @click.stop="() => handleDrawDelete(item.id)" danger>删除方案</a-button></span>
|
|
|
+ <span>双击取消查询 |<a-button type="link" @click.stop="() => handleDrawDelete(item.id)"
|
|
|
+ danger>删除方案</a-button></span>
|
|
|
</template>
|
|
|
<a-button :type="isActive(index) ? 'primary' : 'link'"
|
|
|
:key="index" @click.stop="() => handleQueryNameClick(index,item)"
|
|
@@ -196,10 +197,13 @@ const quickQuery = () => {
|
|
|
* 重置高级查询方案
|
|
|
*/
|
|
|
const resetQuery = () => {
|
|
|
+ // 选中的按钮取消
|
|
|
activeIndex.value = null
|
|
|
+ // 查询条件取消
|
|
|
queries.value = [{column: '', condition: 'like', term: '', mode: 'and'}];
|
|
|
console.log("props.rawData");
|
|
|
console.log(props.rawData);
|
|
|
+ // 返回查询数据喝状态
|
|
|
emit('update:searchedDataReset');
|
|
|
emit('update:searchedData', resetData.value);
|
|
|
|
|
@@ -229,7 +233,7 @@ const modeOptions = ref([
|
|
|
]);
|
|
|
|
|
|
// 查询条件数组
|
|
|
-const queries = ref([{column: '', condition: 'like', term: '', mode: 'and'}]);
|
|
|
+const queries = ref<any>([{column: '', condition: 'like', term: '', mode: 'and'}]);
|
|
|
|
|
|
// 保存的查询条件
|
|
|
const savedQueries = ref([]); // 这里存储保存的查询条件
|
|
@@ -516,6 +520,8 @@ const handleCancel = () => {
|
|
|
*/
|
|
|
const deleteQuery = (id: any) => {
|
|
|
savedQueries.value = savedQueries.value.filter(item => item.id !== id);
|
|
|
+ // 重新加载默认查询方案数据
|
|
|
+ resetQuery();
|
|
|
}
|
|
|
/**
|
|
|
* 后端删除高级查询记录
|