diff --git a/src/store/modules/search/searchConfig.js b/src/store/modules/search/searchConfig.js
index ce103e4..595ccef 100644
--- a/src/store/modules/search/searchConfig.js
+++ b/src/store/modules/search/searchConfig.js
@@ -1,4 +1,5 @@
-import * as api from '@/api/system/notify.js';
+import * as api from '@/api/search/config.js';
+import * as systemAPI from '@/api/search/system.js';
import { ElMessage, ElMessageBox } from '@/plugins/element-plus';
const state = () => ({
code: 'SearchConfig',
@@ -7,6 +8,7 @@ const state = () => ({
total: 0,
opts: {
init: false,
+ system: [],
},
});
const getters = {};
@@ -32,6 +34,7 @@ const actions = {
commit('setOpts', {
...state.opts,
init: true,
+ system: (await systemAPI.search({ pageIndex: 1, length: 99999 }))?.records || [],
});
},
detail: async (context, id) => {
diff --git a/src/store/modules/search/searchSystem.js b/src/store/modules/search/searchSystem.js
index 1ace0e9..df1e3ff 100644
--- a/src/store/modules/search/searchSystem.js
+++ b/src/store/modules/search/searchSystem.js
@@ -1,4 +1,4 @@
-import * as api from '@/api/system/notify.js';
+import * as api from '@/api/search/system.js';
import { ElMessage, ElMessageBox } from '@/plugins/element-plus';
const state = () => ({
code: 'SearchSystem',
diff --git a/src/views/search/search/index.vue b/src/views/search/config/index.vue
similarity index 90%
rename from src/views/search/search/index.vue
rename to src/views/search/config/index.vue
index 0584b6c..2015d39 100644
--- a/src/views/search/search/index.vue
+++ b/src/views/search/config/index.vue
@@ -15,12 +15,16 @@
>
+
+
+
-
-
-
@@ -84,8 +88,12 @@
:model="formState.form"
:rules="formState.rules"
>
-
-
+
+
@@ -129,16 +137,6 @@
-
-
- 排序
-
-
-
-
取消
@@ -213,7 +211,6 @@
databaseName: null,
documentIdExp: null,
id: null,
- order: null,
searchCode: null,
searchFiled: null,
searchName: null,
@@ -224,7 +221,6 @@
author: [{ required: true, message: '作者不能为空' }],
databaseName: [{ required: true, message: '数据库名称不能为空' }],
documentIdExp: [{ required: true, message: 'ES文档ID不能为空' }],
- order: [{ required: true, message: '排序不能为空' }],
searchCode: [{ required: true, message: '搜索码不能为空' }],
searchFiled: [{ required: true, message: '搜索字段不能为空' }],
searchName: [{ required: true, message: '搜索名不能为空' }],
@@ -241,7 +237,6 @@
databaseName: null,
documentIdExp: null,
id: null,
- order: null,
searchCode: null,
searchFiled: null,
searchName: null,
@@ -257,8 +252,10 @@
try {
await proxy.$validate(refsForm);
let data = _.cloneDeep(formState.form);
- await store.dispatch('searchConfig/save', data);
- formState.formVisible = false;
+ let res = await store.dispatch('searchConfig/save', data);
+ if (res) {
+ formState.formVisible = false;
+ }
} catch (e) {
console.info('取消保存', e);
}
@@ -276,15 +273,20 @@
type: 'selection',
width: 60,
},
+ {
+ label: '所属系统',
+ prop: 'systemId',
+ minWidth: 120,
+ slots: {
+ default: ({ row }) =>
+ proxy.$dict(unref(opts).system, row.systemId, { label: 'systemName', value: 'id' }),
+ },
+ },
{
label: '主键',
prop: 'id',
width: 100,
},
- {
- label: '系统ID',
- prop: 'systemId',
- },
{
label: '作者',
prop: 'author',
@@ -309,21 +311,6 @@
),
},
},
- {
- prop: 'order',
- width: 100,
- slots: {
- header: () => (
-
- 排序
-
-
- ),
- },
- },
{
label: '搜索码',
prop: 'searchCode',
diff --git a/src/views/search/system/index.vue b/src/views/search/system/index.vue
index 73dc77b..38dc4e3 100644
--- a/src/views/search/system/index.vue
+++ b/src/views/search/system/index.vue
@@ -71,16 +71,6 @@
-
-
- 排序
-
-
-
-
取消
@@ -108,7 +98,6 @@
id: null,
databaseType: null,
datasource: null,
- order: null,
systemCode: null,
systemName: null,
},
@@ -125,7 +114,6 @@
id: null,
databaseType: null,
datasource: null,
- order: null,
systemCode: null,
systemName: null,
};
@@ -146,14 +134,12 @@
id: null,
databaseType: null,
datasource: null,
- order: null,
systemCode: null,
systemName: null,
},
rules: {
databaseType: [{ required: true, message: '数据库类型不能为空' }],
datasource: [{ required: true, message: '数据库配置不能为空' }],
- order: [{ required: true, message: '排序不能为空' }],
systemCode: [{ required: true, message: '系统编码不能为空' }],
systemName: [{ required: true, message: '系统名称不能为空' }],
},
@@ -179,8 +165,10 @@
try {
await proxy.$validate(refsForm);
let data = _.cloneDeep(formState.form);
- await store.dispatch('searchSystem/save', data);
- formState.formVisible = false;
+ let res = await store.dispatch('searchSystem/save', data);
+ if (res) {
+ formState.formVisible = false;
+ }
} catch (e) {
console.info('取消保存', e);
}
@@ -230,21 +218,6 @@
),
},
},
- {
- prop: 'order',
- width: 100,
- slots: {
- header: () => (
-
- 排序
-
-
- ),
- },
- },
{
label: '操作',
fixed: 'right',
diff --git a/vite.config.js b/vite.config.js
index 0ea91a2..9cd46bf 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -22,10 +22,10 @@ export default (configEnv) => {
'/api': {
// target: 'http://192.168.10.109:8090/', // 显雨
// target: 'http://192.168.10.5:4500', // 高玉
- // target: 'http://192.168.10.87:8090', // 罗战
+ target: 'http://192.168.10.87:8090', // 罗战
// target: 'http://192.168.10.93:8090', // 周渺
// target: 'http://192.168.10.124:8090', // 舒梦娇
- target: 'https://k8s-horse-gateway.mashibing.cn/', // 测试地址
+ // target: 'https://k8s-horse-gateway.mashibing.cn/', // 测试地址
// target: 'https://you-gateway.mashibing.com', // 生产环境
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),