浏览代码

井筒-领域检索

xiaoqiao 1 年之前
父节点
当前提交
0f4578f88d

+ 2 - 2
src/main/java/com/bowintek/practice/controller/EsIndexController.java

@@ -75,7 +75,7 @@ public class EsIndexController {
     @GetMapping("/getFieldList")
     public BaseResponse<List<EsIndexfieldVo>> getFieldList(String indexId) throws Exception {
 
-        List<EsIndexfieldVo> result = esIndexService.getFieldList(indexId);
+        List<EsIndexfieldVo> result = esIndexService.getFieldList(indexId,null);
 
         return RespGenerstor.success(result);
     }
@@ -97,7 +97,7 @@ public class EsIndexController {
         PageInfo<EsIndexVo> result = esIndexService.getList(1, 999, null, null, null);
 
         result.getList().forEach(x->{
-            x.setFieldList( esIndexService.getFieldList(x.getIndexId()));
+            x.setFieldList( esIndexService.getFieldList(x.getIndexId(),null));
         });
         return RespGenerstor.success(result);
     }

+ 1 - 1
src/main/java/com/bowintek/practice/mapper/cquery/EsIndexCquery.java

@@ -8,5 +8,5 @@ import java.util.List;
 public interface EsIndexCquery {
 
     List<EsIndexVo> getList(String indexName, String indexCode, String indexIdsString);
-    List<EsIndexfieldVo> getFieldList(String indexId);
+    List<EsIndexfieldVo> getFieldList(String indexId,String parentId);
 }

+ 10 - 0
src/main/java/com/bowintek/practice/model/EsIndexfield.java

@@ -21,6 +21,8 @@ public class EsIndexfield {
 
     private Integer isDisplay;
 
+    private String parentId;
+
     public String getFieldId() {
         return fieldId;
     }
@@ -100,4 +102,12 @@ public class EsIndexfield {
     public void setIsDisplay(Integer isDisplay) {
         this.isDisplay = isDisplay;
     }
+
+    public String getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId == null ? null : parentId.trim();
+    }
 }

+ 70 - 0
src/main/java/com/bowintek/practice/model/EsIndexfieldExample.java

@@ -763,6 +763,76 @@ public class EsIndexfieldExample {
             addCriterion("isDisplay not between", value1, value2, "isDisplay");
             return (Criteria) this;
         }
+
+        public Criteria andParentIdIsNull() {
+            addCriterion("parentId is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdIsNotNull() {
+            addCriterion("parentId is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdEqualTo(String value) {
+            addCriterion("parentId =", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdNotEqualTo(String value) {
+            addCriterion("parentId <>", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdGreaterThan(String value) {
+            addCriterion("parentId >", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdGreaterThanOrEqualTo(String value) {
+            addCriterion("parentId >=", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdLessThan(String value) {
+            addCriterion("parentId <", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdLessThanOrEqualTo(String value) {
+            addCriterion("parentId <=", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdLike(String value) {
+            addCriterion("parentId like", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdNotLike(String value) {
+            addCriterion("parentId not like", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdIn(List<String> values) {
+            addCriterion("parentId in", values, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdNotIn(List<String> values) {
+            addCriterion("parentId not in", values, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdBetween(String value1, String value2) {
+            addCriterion("parentId between", value1, value2, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdNotBetween(String value1, String value2) {
+            addCriterion("parentId not between", value1, value2, "parentId");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 14 - 3
src/main/java/com/bowintek/practice/services/impl/EsIndexServiceImpl.java

@@ -37,7 +37,7 @@ public class EsIndexServiceImpl implements EsIndexService {
 
     @Override
     public PageInfo<EsIndexVo> getList(Integer page, Integer rows,
-                                       String indexName, String indexCode,List<String> idList) {
+                                       String indexName, String indexCode, List<String> idList) {
         PageHelper.startPage(page, rows);
 
         List<EsIndexVo> dataList = esIndexCquery.getList(indexName, indexCode, stringUtils.ListToInSql(idList));
@@ -92,14 +92,25 @@ public class EsIndexServiceImpl implements EsIndexService {
                     x.setFieldId(UUID.randomUUID().toString());
                     esIndexfieldMapper.insertSelective(x);
                 }
+                if (x.getChildFields() != null && x.getChildFields().size() > 0) {
+                    x.getChildFields().forEach(child -> {
+                        child.setParentId(x.getFieldId());
+                        child.setIndexId(model.getIndexId());
+                        child.setFieldId(UUID.randomUUID().toString());
+                        esIndexfieldMapper.insertSelective(child);
+                    });
+                }
             });
         }
         return result;
     }
 
     @Override
-    public List<EsIndexfieldVo> getFieldList(String indexId) {
-        List<EsIndexfieldVo> dbList = esIndexCquery.getFieldList(indexId);
+    public List<EsIndexfieldVo> getFieldList(String indexId, String parentId) {
+        List<EsIndexfieldVo> dbList = esIndexCquery.getFieldList(indexId, parentId);
+        dbList.forEach(x -> {
+            x.setChildFields(esIndexCquery.getFieldList(indexId, x.getFieldId()));
+        });
         return dbList;
     }
 

+ 1 - 1
src/main/java/com/bowintek/practice/services/impl/EsQueryServiceImpl.java

@@ -62,7 +62,7 @@ public class EsQueryServiceImpl implements EsQueryService {
                         .map(m->m.getIndexCode())
                         .distinct().collect(Collectors.toList());
 
-                List<EsIndexfieldVo> list2 = esIndexCquery.getFieldList(null);
+                List<EsIndexfieldVo> list2 = esIndexCquery.getFieldList(null,null);
                 pathCache = list2.stream().filter(p->p.getDataType().equals("NESTED"))
                         .map(m->m.getFieldCode())
                         .distinct().collect(Collectors.toList());

+ 1 - 1
src/main/java/com/bowintek/practice/services/service/EsIndexService.java

@@ -11,7 +11,7 @@ public interface EsIndexService {
                                 String indexName, String indexCode, List<String> idList);
     EsIndexVo getEsIndex(String indexId);
     int saveEsIndex(EsIndexVo model, List<EsIndexfieldVo> fieldList, String userId, String userName);
-    List<EsIndexfieldVo> getFieldList(String indexId);
+    List<EsIndexfieldVo> getFieldList(String indexId,String parentId);
     int delete(List<String> idList);
     List<EsIndexfieldVo> importData(List<EsIndexfieldVo> dataList);
 }

+ 3 - 0
src/main/java/com/bowintek/practice/vo/EsIndexfieldVo.java

@@ -3,10 +3,13 @@ package com.bowintek.practice.vo;
 import com.bowintek.practice.model.EsIndexfield;
 import lombok.Data;
 
+import java.util.List;
+
 @Data
 public class EsIndexfieldVo extends EsIndexfield {
     private  String queryTypeName;
     private String errorMessage;
     private String isSearchFieldText;
     private String isDisplayText;
+    private List<EsIndexfieldVo> childFields;
 }

+ 0 - 1
src/main/resources/generatorConfig.xml

@@ -118,7 +118,6 @@
             <columnOverride column="StandardMajorID" javaType="java.lang.Integer" jdbcType="INTEGER" />
             <table schema="" tableName="Sys_Log"><property name="useActualColumnNames" value="true"/></table>
         </table>-->
-        <table schema="" tableName="es_index"><property name="useActualColumnNames" value="true"/></table>
         <table schema="" tableName="es_indexField"><property name="useActualColumnNames" value="true"/></table>
     </context>
 </generatorConfiguration>

+ 20 - 5
src/main/resources/mapping/EsIndexfieldMapper.xml

@@ -12,6 +12,7 @@
     <result column="disOrder" jdbcType="INTEGER" property="disOrder" />
     <result column="isSearchField" jdbcType="INTEGER" property="isSearchField" />
     <result column="isDisplay" jdbcType="INTEGER" property="isDisplay" />
+    <result column="parentId" jdbcType="VARCHAR" property="parentId" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -73,7 +74,7 @@
   </sql>
   <sql id="Base_Column_List">
     fieldId, indexId, fieldCode, fieldName, fieldDesc, dataType, queryTypeId, disOrder, 
-    isSearchField, isDisplay
+    isSearchField, isDisplay, parentId
   </sql>
   <select id="selectByExample" parameterType="com.bowintek.practice.model.EsIndexfieldExample" resultMap="BaseResultMap">
     select
@@ -109,11 +110,11 @@
     insert into es_indexfield (fieldId, indexId, fieldCode, 
       fieldName, fieldDesc, dataType, 
       queryTypeId, disOrder, isSearchField, 
-      isDisplay)
+      isDisplay, parentId)
     values (#{fieldId,jdbcType=VARCHAR}, #{indexId,jdbcType=VARCHAR}, #{fieldCode,jdbcType=VARCHAR}, 
       #{fieldName,jdbcType=VARCHAR}, #{fieldDesc,jdbcType=VARCHAR}, #{dataType,jdbcType=VARCHAR}, 
       #{queryTypeId,jdbcType=INTEGER}, #{disOrder,jdbcType=INTEGER}, #{isSearchField,jdbcType=INTEGER}, 
-      #{isDisplay,jdbcType=INTEGER})
+      #{isDisplay,jdbcType=INTEGER}, #{parentId,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.bowintek.practice.model.EsIndexfield">
     insert into es_indexfield
@@ -148,6 +149,9 @@
       <if test="isDisplay != null">
         isDisplay,
       </if>
+      <if test="parentId != null">
+        parentId,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="fieldId != null">
@@ -180,6 +184,9 @@
       <if test="isDisplay != null">
         #{isDisplay,jdbcType=INTEGER},
       </if>
+      <if test="parentId != null">
+        #{parentId,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.bowintek.practice.model.EsIndexfieldExample" resultType="java.lang.Long">
@@ -221,6 +228,9 @@
       <if test="row.isDisplay != null">
         isDisplay = #{row.isDisplay,jdbcType=INTEGER},
       </if>
+      <if test="row.parentId != null">
+        parentId = #{row.parentId,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -237,7 +247,8 @@
       queryTypeId = #{row.queryTypeId,jdbcType=INTEGER},
       disOrder = #{row.disOrder,jdbcType=INTEGER},
       isSearchField = #{row.isSearchField,jdbcType=INTEGER},
-      isDisplay = #{row.isDisplay,jdbcType=INTEGER}
+      isDisplay = #{row.isDisplay,jdbcType=INTEGER},
+      parentId = #{row.parentId,jdbcType=VARCHAR}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -272,6 +283,9 @@
       <if test="isDisplay != null">
         isDisplay = #{isDisplay,jdbcType=INTEGER},
       </if>
+      <if test="parentId != null">
+        parentId = #{parentId,jdbcType=VARCHAR},
+      </if>
     </set>
     where fieldId = #{fieldId,jdbcType=VARCHAR}
   </update>
@@ -285,7 +299,8 @@
       queryTypeId = #{queryTypeId,jdbcType=INTEGER},
       disOrder = #{disOrder,jdbcType=INTEGER},
       isSearchField = #{isSearchField,jdbcType=INTEGER},
-      isDisplay = #{isDisplay,jdbcType=INTEGER}
+      isDisplay = #{isDisplay,jdbcType=INTEGER},
+      parentId = #{parentId,jdbcType=VARCHAR}
     where fieldId = #{fieldId,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 6 - 0
src/main/resources/mapping/cquery/EsIndexCQuery.xml

@@ -25,5 +25,11 @@
         <if test="indexId!='' and indexId!=null">
             and field.indexId = #{indexId}
         </if>
+        <if test="parentId!='' and parentId!=null">
+            and field.parentId = #{parentId}
+        </if>
+        <if test="parentId ==null">
+            and field.parentId is null
+        </if>
     </select>
 </mapper>

+ 1 - 1
vue/src/components/basic/excel/importExcel/importExcel.vue

@@ -2,7 +2,7 @@
   <a-button type="primary" @click="importShow" :functioncode="functioncode">{{ options.title }}</a-button>
 
   <a-modal v-model:visible="visible" :title="options.title" @ok="handleOk" :ok-text="'确认导入'"
-           :ok-button-props="okButtonProps" :z-index="998">
+           :ok-button-props="okButtonProps" :z-index="9998">
     <ImportExcel :date-format="'YYYY-MM-DD'" @select="selectFile" @success="addData" ref="importExcelRef"></ImportExcel>
     <div style="text-align: right;cursor: pointer;margin-top:10px;" v-if="options.template" @click="downTemp">
       {{ downTempLoad ? "正在下载..." : "下载模板" }}

+ 3 - 2
vue/src/views/esdomain/result.vue

@@ -3,7 +3,7 @@
     <div>
       <a-space>
         <a-select v-model:value="formState.tabName" :options="fieldList" class="operTexts"></a-select>
-        <a-input v-model:value="formState.subjectName" style="width: 400px"></a-input>
+        <QueryHistoryComplete v-model:value="formState.key" style="width: 285px"></QueryHistoryComplete>
         <a-button type="primary" html-type="submit" @click="onQuery">查询</a-button>
         <a-button @click="() => {formRef.resetFields();}">重置</a-button>
       </a-space>
@@ -146,10 +146,11 @@ import queryCriteria from '@/components/basic/es-result/query-criteria.vue';
 import {useTabsViewStore} from "@/store/modules/tabsView";
 import {getPaginationTotalTitle} from "@/utils/common";
 import type {TableProps} from "ant-design-vue";
+import QueryHistoryComplete from '@/components/basic/querylog/history-complete.vue'
 
 export default defineComponent({
   name: 'esdomainResult',
-  components: {tableView, listView, chatView, docView, cycleView, queryCriteria},
+  components: {tableView, listView, chatView, docView, cycleView, queryCriteria,QueryHistoryComplete},
   setup() {
 
     const route = useRoute();

+ 20 - 6
vue/src/views/esindex/edit.vue

@@ -21,7 +21,7 @@
           <a-col :span="8">
             <a-form-item :label-col="{span:6}" label="显示类型" name="displayType"
                          :rules="[{ required: true, message: '请选择显示类型!' }]">
-              <a-select  v-model:value="dataModel.displayType"
+              <a-select v-model:value="dataModel.displayType"
                         :options="displayTypeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
               </a-select>
             </a-form-item>
@@ -55,7 +55,8 @@
         <a-row>
           <a-col style="margin-bottom: 20px;">
             <a-table :columns="columns" :data-source="fieldData" :scroll="{ x:'100%', y: 500 }" :pagination="false"
-                     bordered>
+                     bordered :row-key="record=>record.fieldId"
+                     :rowClassName="record => record.childFields&&record.childFields.length>0?'': 'noExpand'">
               <template #bodyCell="{ column ,record,index}">
                 <template v-if="column.key === 'operation'">
                   <a-button type="link" size="small" @click="edit(record)">修改</a-button>
@@ -66,6 +67,10 @@
                   </a-popconfirm>
                 </template>
               </template>
+              <template #expandedRowRender="{ record}">
+                <a-table :columns="childColumns" :data-source="record.childFields" :pagination="false">
+                </a-table>
+              </template>
             </a-table>
           </a-col>
         </a-row>
@@ -105,7 +110,7 @@ interface FormState {
 export default defineComponent({
   name: 'esIndexEditForm',
   components: {
-    BUploadFile, FieldEdit,  BImportExcel
+    BUploadFile, FieldEdit, BImportExcel
   },
   setup() {
     const esIndex: EsIndex = {
@@ -113,7 +118,7 @@ export default defineComponent({
       indexCode: "",
       indexDesc: "",
       displayType: null,
-      displayTypeName:""
+      displayTypeName: ""
     }
     const formState = reactive<FormState>({dataModel: esIndex});
     const tabsViewStore = useTabsViewStore();
@@ -121,7 +126,7 @@ export default defineComponent({
     const fieldData = ref<EsIndexfield[]>([]);
     const displayTypeList = ref([{name: '', value: ''}]);
     const loading = ref(false);
-    const queryTypeList:any=ref([]);
+    const queryTypeList: any = ref([]);
     let isEdit = false;
 
     const onFinish = () => {
@@ -179,6 +184,8 @@ export default defineComponent({
       },
       {title: '操作', key: 'operation', fixed: 'right', width: 120, align: "center"},
     ];
+    const childColumns: TableColumnsType = [...columns.filter(x => x.key != 'operation')];
+
     const importOptions = ref<ImportProps>({
       title: "导入",
       url: 'esindex/importData',
@@ -233,7 +240,7 @@ export default defineComponent({
       edit, importOptions,
       onDelete,
       loadData,
-      fieldData, columns, loading,displayTypeList,
+      fieldData, columns, loading, displayTypeList, childColumns,
       isEdit, data, modalRef,
     };
   },
@@ -243,3 +250,10 @@ export default defineComponent({
   }
 })
 </script>
+<style lang="less">
+.noExpand {
+  .ant-table-row-expand-icon {
+    display: none;
+  }
+}
+</style>

+ 112 - 8
vue/src/views/esindex/fieldedit.vue

@@ -70,7 +70,43 @@
           </a-form-item>
         </a-col>
       </a-row>
-
+      <template v-if="dataModel.dataType=='NESTED'">
+        <a-divider orientation="left">字段定义</a-divider>
+        <a-row>
+          <a-col :span="24" style="margin-right: 20px;">
+            <div style="float: right;">
+              <Space>
+                <BImportExcel :options="importOptions" @success="onImportSuccess"></BImportExcel>
+                &nbsp;
+                <a-button @click="add()">
+                  <template #icon>
+                    <plus-circle-outlined/>
+                  </template>
+                  新增
+                </a-button>
+              </Space>
+            </div>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col style="margin-bottom: 20px;">
+            <a-table :columns="columns" :data-source="dataModel.childFields" :scroll="{ x:'100%', y: 500 }"
+                     :pagination="false"
+                     bordered>
+              <template #bodyCell="{ column ,record,index}">
+                <template v-if="column.key === 'operation'">
+                  <a-button type="link" size="small" @click="edit(record)">修改</a-button>
+                  <a-popconfirm placement="leftTop"
+                                title="是否删除数据?"
+                                @confirm="onDelete(index)">
+                    <a-button type="link" size="small">删除</a-button>
+                  </a-popconfirm>
+                </template>
+              </template>
+            </a-table>
+          </a-col>
+        </a-row>
+      </template>
       <a-row style="height: 20px"></a-row>
       <a-row type="flex">
         <a-col :span="24" style="text-align: right;margin-right: 20px;">
@@ -78,6 +114,7 @@
         </a-col>
       </a-row>
     </Form>
+    <FieldEdit ref="modalRef" :onSave="onFieldSave"></FieldEdit>
   </a-modal>
 </template>
 <script lang="ts">
@@ -86,13 +123,16 @@ import {defineComponent, reactive, ref} from "vue";
 import BUploadFile from "@/components/file/uploadFile.vue";
 import type {SelectProps} from "ant-design-vue";
 import {getDictionaryItemList} from "@/api/system/dictionary";
-import type {FormInstance} from 'ant-design-vue';
+import type {FormInstance, TableColumnsType} from 'ant-design-vue';
 import {DataTypeList} from '@/enums/dictions';
 import type {EsIndexfield} from "@/views/esindex/model";
+import FieldEdit from "@/views/esindex/fieldedit.vue";
+import type{ImportProps} from "@/components/basic/excel/importExcel/ImportProps";
+import BImportExcel from "@/components/basic/excel/importExcel/importExcel.vue";
 
 export default defineComponent({
   name: 'FieldEdit',
-  components: {BUploadFile, Form},
+  components: {BUploadFile, FieldEdit, BImportExcel,Form},
   props: {
     onSave: {
       type: Function,
@@ -104,20 +144,84 @@ export default defineComponent({
     const confirmLoading = ref<boolean>(false);
     const modalFormRef = ref<FormInstance>();
     const defaultValue = reactive<EsIndexfield>({
-      indexName:"",
+      indexName: "",
       fieldCode: "",
       fieldName: "",
       fieldDesc: "",
       dataType: null,
       queryTypeId: "",
       isSearchField: 1,
-      isDisplay:1
+      isDisplay: 1,
+      childFields: []
     });
     const dataModel = ref({...defaultValue});
     const queryTypeList = ref<SelectProps['options']>();
     const title = ref();
 
+    const columns: TableColumnsType = [
+      {
+        title: '序号', width: 80, dataIndex: 'num', key: 'num', align: "center", customRender: ({index}) => {
+          return `${index + 1}`;
+        }
+      },
+      {title: '字段编码', dataIndex: 'fieldCode', key: 'fieldCode', align: "center"},
+      {title: '字段名称', dataIndex: 'fieldName', key: 'fieldName', align: "center"},
+      {
+        title: '是否查询字段', dataIndex: 'isSearchField', key: 'isSearchField', align: "center", customRender: ({record}) =>
+          record.isSearchField == "1" ? "是" : "否"
+      },
+      {
+        title: '查询类型', dataIndex: 'queryTypeId', key: 'queryTypeId', align: "center", customRender: ({record}) =>
+          queryTypeList.value?.filter(x => x.value == record.queryTypeId)[0]?.name
+      },
+      {title: '显示排序', dataIndex: 'disOrder', key: 'disOrder', align: "center"},
+      {
+        title: '是否显示', dataIndex: 'isDisplay', key: 'isDisplay', align: "center", customRender: ({record}) =>
+          record.isDisplay == "1" ? "是" : "否"
+      },
+      {title: '操作', key: 'operation', fixed: 'right', width: 120, align: "center"},
+    ];
+    const modalRef = ref();
+    let isEdit = false;
+    const add = () => {
+      isEdit = false;
+      modalRef.value.show(null);
+    }
+    const edit = (record) => {
+      isEdit = true;
+      modalRef.value.show(record);
+    }
+    const onDelete = (record) => {
+      dataModel.value.childFields.splice(record, 1);
+    }
+    const onFieldSave = async (model: EsIndexfield) => {
+      if (!isEdit) {
+        dataModel.value.childFields.push(model);
+      }
+    }
 
+    const importOptions = ref<ImportProps>({
+      title: "导入",
+      url: 'esindex/importData',
+      columns: [
+        {cnName: "字段编码", enName: "fieldCode", width: 100},
+        {cnName: "字段名称", enName: "fieldName", width: 200},
+        {cnName: "字段描述", enName: "fieldDesc", width: 100},
+        {cnName: "数据类型", enName: "dataType", width: 150},
+        {cnName: "查询类型", enName: "queryTypeName", width: 100},
+        {cnName: "显示排序", enName: "disOrder", width: 200},
+        {cnName: "是否查询字段", enName: "isSearchFieldText", width: 200},
+        {cnName: "是否显示", enName: "isDisplayText", width: 100},
+      ],
+      template: {
+        tempFileName: "索引字段导入模板.xlsx",
+        url: '',
+        params: null
+      }
+    });
+    const onImportSuccess = (data: []) => {
+      dataModel.value.childFields = dataModel.value.childFields.concat(data);
+    }
     getDictionaryItemList({code: "queryType"}).then(data => {
       queryTypeList.value = data;
     });
@@ -127,7 +231,7 @@ export default defineComponent({
         record = {...defaultValue};
       }
       dataModel.value = record;
-      title.value = "主题字段定义";
+      title.value = "索引字段定义";
       visible.value = true;
     };
 
@@ -147,8 +251,8 @@ export default defineComponent({
       modalFormRef,
       visible, title,
       confirmLoading,
-      DataTypeList,
-      queryTypeList,
+      DataTypeList,onImportSuccess,importOptions,
+      queryTypeList, columns, add, modalRef, onFieldSave,edit,onDelete,
       show, handleOk, handleCancel,
     };
   },

+ 2 - 1
vue/src/views/esindex/model.ts

@@ -14,5 +14,6 @@ export interface EsIndexfield {
   dataType: string | null,
   queryTypeId: string,
   isSearchField: number,
-  isDisplay: number
+  isDisplay: number,
+  childFields:any[]
 }