fix: 字段调整

feat-search-0611-xwk
向文可 2 years ago
parent d20aa839ae
commit da6caa5cd6

@ -22,61 +22,6 @@
:opts="opts.system"
/>
</el-form-item>
<el-form-item label="主键" prop="id">
<el-input v-model="state.condition.id" />
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input v-model="state.condition.author" />
</el-form-item>
<el-form-item label="数据库名称" prop="databaseName">
<el-input v-model="state.condition.databaseName" />
</el-form-item>
<el-form-item prop="documentIdExp">
<template #label>
<span>ES文档ID</span>
<el-tooltip
content="数据导入ES后作为ES文档id的字段使用占位符形式如:${offer_id}+${offer_sub_id}(连表查询一对多时要注意是多个表的主键连接才能确定唯一性)"
placement="top"
/>
</template>
<el-input v-model="state.condition.documentIdExp" />
</el-form-item>
<el-form-item prop="order">
<template #label>
<span>排序</span>
<el-tooltip
content="在字段名后加“:asc或:desc”指定升序降序多个字段使用逗号分隔省略排序默认使用升序"
placement="top"
/>
</template>
<el-input v-model="state.condition.order" />
</el-form-item>
<el-form-item label="搜索码" prop="searchCode">
<el-input v-model="state.condition.searchCode" />
</el-form-item>
<el-form-item prop="searchFiled">
<template #label>
<span>搜索字段</span>
<el-tooltip
content="搜索字段配置,格式“字段名/搜索类型”搜索类型即ES中字段的分词器类型模糊搜索standard拼音搜索pinyin全词匹配搜索keyword"
placement="top"
/>
</template>
<el-input v-model="state.condition.searchFiled" />
</el-form-item>
<el-form-item label="搜索名" prop="searchName">
<el-input v-model="state.condition.searchName" />
</el-form-item>
<el-form-item prop="syncCron">
<template #label>
<span>同步频率</span>
<el-tooltip
content="同步数据到ES的频率cron表达式示例* */30 * * * ?每30分钟同步一次"
placement="top"
/>
</template>
<el-input v-model="state.condition.syncCron" />
</el-form-item>
</el-form>
</template>
</table-list>
@ -95,37 +40,34 @@
:opts="opts.system"
/>
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input v-model="formState.form.author" />
<el-form-item label="搜索码" prop="searchCode">
<el-input v-model="formState.form.searchCode" />
</el-form-item>
<el-form-item label="数据库名称" prop="databaseName">
<el-input v-model="formState.form.databaseName" />
<el-form-item label="搜索名" prop="searchName">
<el-input v-model="formState.form.searchName" />
</el-form-item>
<el-form-item prop="documentIdExp">
<el-form-item prop="searchFiled">
<template #label>
<span>ES文档ID</span>
<span>搜索字段</span>
<el-tooltip
content="数据导入ES后作为ES文档id的字段使用占位符形式如:${offer_id}+${offer_sub_id}(连表查询一对多时要注意是多个表的主键连接才能确定唯一性)"
content="搜索字段配置,格式“字段名/搜索类型”搜索类型即ES中字段的分词器类型模糊搜索standard拼音搜索pinyin全词匹配搜索keyword"
placement="top"
/>
</template>
<el-input v-model="formState.form.documentIdExp" />
<el-input v-model="formState.form.searchFiled" />
</el-form-item>
<el-form-item label="搜索码" prop="searchCode">
<el-input v-model="formState.form.searchCode" />
<el-form-item label="数据库名称" prop="databaseName">
<el-input v-model="formState.form.databaseName" />
</el-form-item>
<el-form-item prop="searchFiled">
<el-form-item prop="documentIdExp">
<template #label>
<span>搜索字段</span>
<span>ES文档ID</span>
<el-tooltip
content="搜索字段配置,格式“字段名/搜索类型”搜索类型即ES中字段的分词器类型模糊搜索standard拼音搜索pinyin全词匹配搜索keyword"
content="数据导入ES后作为ES文档id的字段使用占位符形式如:${offer_id}+${offer_sub_id}(连表查询一对多时要注意是多个表的主键连接才能确定唯一性)"
placement="top"
/>
</template>
<el-input v-model="formState.form.searchFiled" />
</el-form-item>
<el-form-item label="搜索名" prop="searchName">
<el-input v-model="formState.form.searchName" />
<el-input v-model="formState.form.documentIdExp" />
</el-form-item>
<el-form-item prop="syncCron">
<template #label>
@ -137,6 +79,9 @@
</template>
<el-input v-model="formState.form.syncCron" />
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input v-model="formState.form.author" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="formState.formVisible = false">取消</el-button>
@ -161,15 +106,6 @@
}
const state = reactive({
condition: {
author: null,
databaseName: null,
documentIdExp: null,
id: null,
order: null,
searchCode: null,
searchFiled: null,
searchName: null,
syncCron: null,
systemId: null,
},
});
@ -182,15 +118,6 @@
);
const handleReset = () => {
state.condition = {
author: null,
databaseName: null,
documentIdExp: null,
id: null,
order: null,
searchCode: null,
searchFiled: null,
searchName: null,
syncCron: null,
systemId: null,
};
};
@ -283,57 +210,49 @@
},
},
{
label: '主键',
prop: 'id',
width: 100,
},
{
label: '作者',
prop: 'author',
label: '搜索码',
prop: 'searchCode',
},
{
label: '数据库名称',
prop: 'databaseName',
minWidth: 120,
label: '搜索名',
prop: 'searchName',
},
{
prop: 'documentIdExp',
prop: 'searchFiled',
minWidth: 120,
slots: {
header: () => (
<p>
<span>ES文档ID</span>
<span>搜索字段</span>
<ElTooltip
content="数据导入ES后作为ES文档id的字段使用占位符形式如:${offer_id}+${offer_sub_id}(连表查询一对多时要注意是多个表的主键连接才能确定唯一性)"
content="搜索字段配置,格式“字段名/搜索类型”搜索类型即ES中字段的分词器类型模糊搜索standard拼音搜索pinyin全词匹配搜索keyword"
placement="top"
/>
</p>
),
},
},
{
label: '搜索码',
prop: 'searchCode',
label: '数据库名称',
prop: 'databaseName',
minWidth: 120,
},
{
prop: 'searchFiled',
prop: 'documentIdExp',
minWidth: 120,
slots: {
header: () => (
<p>
<span>搜索字段</span>
<span>ES文档ID</span>
<ElTooltip
content="搜索字段配置,格式“字段名/搜索类型”搜索类型即ES中字段的分词器类型模糊搜索standard拼音搜索pinyin全词匹配搜索keyword"
content="数据导入ES后作为ES文档id的字段使用占位符形式如:${offer_id}+${offer_sub_id}(连表查询一对多时要注意是多个表的主键连接才能确定唯一性)"
placement="top"
/>
</p>
),
},
},
{
label: '搜索名',
prop: 'searchName',
},
{
prop: 'syncCron',
minWidth: 120,
@ -349,6 +268,10 @@
),
},
},
{
label: '作者',
prop: 'author',
},
{
label: '操作',
fixed: 'right',

@ -5,48 +5,14 @@
:code="code"
:config="config"
:data="list"
:operation="['create', 'search', 'remove']"
:operation="['create', 'remove']"
:reset="handleReset"
title="系统配置"
:total="total"
@create="handleCreate()"
@remove="handleRemove"
@search="handleSearch"
>
<template #search>
<el-form inline label-width="110px">
<el-form-item label="主键" prop="id">
<el-input v-model="state.condition.id" />
</el-form-item>
<el-form-item label="系统编码" prop="systemCode">
<el-input v-model="state.condition.systemCode" />
</el-form-item>
<el-form-item label="系统名称" prop="systemName">
<el-input v-model="state.condition.systemName" />
</el-form-item>
<el-form-item label="数据库类型" prop="databaseType">
<el-select v-model="state.condition.databaseType" :opts="opts.type" />
</el-form-item>
<el-form-item prop="datasource">
<template #label>
<span>数据库配置</span>
<el-tooltip content="格式“ip:port”" placement="top" />
</template>
<el-input v-model="state.condition.datasource" />
</el-form-item>
<el-form-item prop="order">
<template #label>
<span>排序</span>
<el-tooltip
content="在字段名后加“:asc或:desc”指定升序降序多个字段使用逗号分隔省略排序默认使用升序"
placement="top"
/>
</template>
<el-input v-model="state.condition.order" />
</el-form-item>
</el-form>
</template>
</table-list>
/>
<el-dialog v-model="formState.formVisible" :title="formState.form.id ? '编辑' : '添加' + '系统'" width="480px">
<el-form
ref="refsForm"
@ -94,13 +60,7 @@
store.dispatch('searchSystem/load');
}
const state = reactive({
condition: {
id: null,
databaseType: null,
datasource: null,
systemCode: null,
systemName: null,
},
condition: {},
});
watch(
() => state.condition,
@ -110,13 +70,7 @@
{ immediate: true, deep: true }
);
const handleReset = () => {
state.condition = {
id: null,
databaseType: null,
datasource: null,
systemCode: null,
systemName: null,
};
state.condition = {};
};
const handleSearch = async () => {
loading.value = true;
@ -186,11 +140,6 @@
type: 'selection',
width: 60,
},
{
label: '主键',
prop: 'id',
width: 100,
},
{
label: '系统编码',
prop: 'systemCode',

Loading…
Cancel
Save