|
@@ -1,7 +1,14 @@
|
|
|
<template>
|
|
|
<div class="airportInfo scroll-y">
|
|
|
<div class="wrap">
|
|
|
- <Minheader :is-auth="true" :is-statuser="true" @addForm="addForm">
|
|
|
+ <Minheader
|
|
|
+ :is-auth="true"
|
|
|
+ :is-statuser="true"
|
|
|
+ :is-Search="true"
|
|
|
+ @addForm="addForm"
|
|
|
+ @searchForms="searchForms"
|
|
|
+ @clearForm="clearForm"
|
|
|
+ >
|
|
|
<template #header>
|
|
|
<div class="status flex-wrap">
|
|
|
<div class="manageTitle">查询模板</div>
|
|
@@ -37,7 +44,8 @@ import Minheader from "@/components/minheader/index.vue";
|
|
|
import Dialog from "@/components/dialog/index.vue";
|
|
|
import { Query, GeneralDataReception } from "@/api/webApi";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
-const width = ref('200px')
|
|
|
+import { el } from "element-plus/es/locale";
|
|
|
+const width = ref("200px");
|
|
|
const router = useRouter();
|
|
|
const dataId = ref<String>("4"); //请求id
|
|
|
const page = ref<number>(0); //分页参数
|
|
@@ -65,6 +73,7 @@ const tableForm = reactive({
|
|
|
}); //弹窗内容
|
|
|
//列表
|
|
|
const tableData = ref([]);
|
|
|
+const tableDatcopy = ref([]);
|
|
|
//表头
|
|
|
const state = reactive({
|
|
|
list: [
|
|
@@ -185,6 +194,7 @@ const getQuery = async () => {
|
|
|
rowTitle.value = titleColumn.columnName;
|
|
|
}
|
|
|
tableData.value.push(...returnData.listValues);
|
|
|
+ tableDatcopy.value.push(...returnData.listValues);
|
|
|
tableCols.value = returnData.columnSet;
|
|
|
tableCols.value.forEach((element) => {
|
|
|
element.label = element.columnLabel;
|
|
@@ -245,6 +255,27 @@ const generalDataReception = async (data) => {
|
|
|
resetForm();
|
|
|
}
|
|
|
};
|
|
|
+//搜索
|
|
|
+const searchForms = (data) => {
|
|
|
+ if (data) {
|
|
|
+ tableData.value = [];
|
|
|
+ tableDatcopy.value.forEach((element) => {
|
|
|
+ if (element.queryTemplateID == data) {
|
|
|
+ tableData.value.push(element);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ tableData.value = [];
|
|
|
+ page.value = 0;
|
|
|
+ getQuery();
|
|
|
+ }
|
|
|
+};
|
|
|
+//清除
|
|
|
+const clearForm = () => {
|
|
|
+ tableData.value = [];
|
|
|
+ page.value = 0;
|
|
|
+ getQuery();
|
|
|
+};
|
|
|
onMounted(() => {
|
|
|
getQuery();
|
|
|
});
|