1
0

feat(frontend): 优化数据产品展示和详情查看功能

- 在 constants.js 中更新了信息结构,使用空值合并运算符提高代码健壮性
- 在 main.js 中添加了样式文件导入,提升页面视觉效果
- 在 tab-market.js 中增加了数据产品详情对话框,丰富了产品信息展示内容
This commit is contained in:
2024-12-19 19:03:36 +08:00
parent 91e30fefe4
commit 74b0638a07
4 changed files with 44 additions and 6 deletions

View File

@@ -1,6 +1,5 @@
export const information = {
debug: true,
// baseUrl: '',
baseUrl: 'http://127.0.0.1:20080',
title: '可信供给中心',
}
@@ -17,8 +16,8 @@ export function useAmis(amisObject) {
struct,
{
data: {
debug: information.debug,
base: information.baseUrl,
debug: information.debug ?? false,
base: information.baseUrl ?? '',
},
},
{

View File

@@ -1,3 +1,4 @@
import './style.css'
import {apiGet, useAmis} from '../../components/constants.js'
import {userChangePasswordDialog} from "../../components/user/dialog-user-change-password.js";
import {tabUser} from "./tab-user.js";

View File

View File

@@ -1,4 +1,3 @@
import {wareDetailDialog} from "../../components/ware/dialog-ware.js";
import {apiGet, crudCommonOptions} from "../../components/constants.js";
import {authenticationAddDialog} from "../../components/permission/dialog-permission.js";
@@ -26,19 +25,58 @@ export function tabMarket() {
'reload',
],
mode: 'cards',
columnsCount: 3,
card: {
header: {
title: '${name}',
subTitle: '${createdTime}',
description: '${description}',
avatar: '${icon}',
avatarClassName: 'pull-left thumb-md avatar b-3x m-r'
},
body: '${TRUNCATE(description, 50)}',
actions: [
{
type: 'action',
label: '查看',
...wareDetailDialog(),
actionType: 'dialog',
dialog: {
title: '数据产品详情',
size: 'md',
actions: [],
body: {
type: 'service',
api: apiGet(`\${base}/ware/detail/\${id}`),
body: [
{
type: 'property',
title: '产品信息',
items: [
{
label: '名称',
content: '${name}',
},
{
label: '归属',
content: '${createdUsername}',
},
{
label: '创建时间',
content: '${createdTime}',
},
{
span: 3,
label: '描述',
content: '${description}',
},
]
},
{
type: 'tpl',
tpl: '${content|raw}'
}
]
}
}
},
{
type: 'action',