Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
Vue-Dashboard
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高源
Vue-Dashboard
Commits
b5c25409
Commit
b5c25409
authored
Jun 20, 2025
by
User
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表格搜索区域和数据源、配置获取优化
parent
74076394
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
10 deletions
+14
-10
.env.test
.env.test
+1
-1
SearchForm.vue
src/views/tableComponent/codet/components/SearchForm.vue
+0
-0
TableSettingsDrawer.vue
...s/tableComponent/codet/components/TableSettingsDrawer.vue
+13
-9
index.vue
src/views/tableComponent/index.vue
+0
-0
No files found.
.env.test
View file @
b5c25409
# backend service base url, test environment
VITE_SERVICE_BASE_URL
=
'http://
localhost:80
'
VITE_SERVICE_BASE_URL
=
'http://
datav.kivii.org
'
# other backend service base url, test environment
VITE_OTHER_SERVICE_BASE_URL
=
`{
...
...
src/views/tableComponent/codet/components/SearchForm.vue
View file @
b5c25409
This diff is collapsed.
Click to expand it.
src/views/tableComponent/codet/components/TableSettingsDrawer.vue
View file @
b5c25409
...
...
@@ -196,9 +196,9 @@ const applySettings = (settings: any) => {
});
}
// 如果有转换规则,自动应用转换
// 如果有转换规则,自动应用转换
(静默模式,避免在数据未加载时显示错误)
if
(
settings
.
transformSettings
.
transformRules
?.
length
>
0
)
{
tableMethods
.
applyTransformations
();
tableMethods
.
applyTransformations
(
true
);
}
}
};
...
...
@@ -208,10 +208,11 @@ const handleGetSettings = async () => {
try
{
// 在请求前检查必要的配置参数
if
(
!
uiConfig
.
GetUrl
||
!
uiConfig
.
Type
)
{
// console.warn('缺少必要的配置参数,无法获取配置
');
return
;
console
.
log
(
'📋 缺少必要的配置参数,无法获取配置,需要调用字段匹配接口
'
);
return
false
;
// 返回false表示没有获取到配置
}
console
.
log
(
'📋 尝试从 GetUrl 获取配置:'
,
uiConfig
.
GetUrl
);
const
response
=
await
axios
.
post
(
uiConfig
.
GetUrl
,
{
Type
:
uiConfig
.
Type
,
InternalCode
:
uiConfig
.
InternalCode
,
...
...
@@ -220,15 +221,18 @@ const handleGetSettings = async () => {
if
(
response
.
data
?.
Parameters
)
{
settings
.
value
=
JSON
.
parse
(
response
.
data
.
Parameters
);
// console.log('
获取到的配置信息:', settings.value);
console
.
log
(
'✅
获取到的配置信息:'
,
settings
.
value
);
applySettings
(
settings
.
value
);
// window.$message?.success('配置信息获取成功');
console
.
log
(
'✅ 配置信息获取成功,跳过字段匹配接口'
);
return
true
;
// 返回true表示成功获取到配置
}
else
{
// console.log('没有获取到配置参数,使用默认配置');
console
.
log
(
'⚠️ 没有获取到配置参数,需要调用字段匹配接口'
);
return
false
;
// 返回false表示没有获取到配置
}
}
catch
(
error
)
{
// console.error('获取配置失败:', error);
window
.
$message
?.
error
(
'获取配置失败'
);
console
.
error
(
'❌ 获取配置失败:'
,
error
);
// window.$message?.error('获取配置失败');
return
false
;
// 返回false表示获取配置失败
}
};
...
...
src/views/tableComponent/index.vue
View file @
b5c25409
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment