feat(frontend): 优化数据产品展示和详情查看功能
- 在 constants.js 中更新了信息结构,使用空值合并运算符提高代码健壮性 - 在 main.js 中添加了样式文件导入,提升页面视觉效果 - 在 tab-market.js 中增加了数据产品详情对话框,丰富了产品信息展示内容
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
export const information = {
|
export const information = {
|
||||||
debug: true,
|
debug: true,
|
||||||
// baseUrl: '',
|
|
||||||
baseUrl: 'http://127.0.0.1:20080',
|
baseUrl: 'http://127.0.0.1:20080',
|
||||||
title: '可信供给中心',
|
title: '可信供给中心',
|
||||||
}
|
}
|
||||||
@@ -17,8 +16,8 @@ export function useAmis(amisObject) {
|
|||||||
struct,
|
struct,
|
||||||
{
|
{
|
||||||
data: {
|
data: {
|
||||||
debug: information.debug,
|
debug: information.debug ?? false,
|
||||||
base: information.baseUrl,
|
base: information.baseUrl ?? '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import './style.css'
|
||||||
import {apiGet, useAmis} from '../../components/constants.js'
|
import {apiGet, useAmis} from '../../components/constants.js'
|
||||||
import {userChangePasswordDialog} from "../../components/user/dialog-user-change-password.js";
|
import {userChangePasswordDialog} from "../../components/user/dialog-user-change-password.js";
|
||||||
import {tabUser} from "./tab-user.js";
|
import {tabUser} from "./tab-user.js";
|
||||||
|
|||||||
0
gringotts-frontend/pages/index/style.css
Normal file
0
gringotts-frontend/pages/index/style.css
Normal file
@@ -1,4 +1,3 @@
|
|||||||
import {wareDetailDialog} from "../../components/ware/dialog-ware.js";
|
|
||||||
import {apiGet, crudCommonOptions} from "../../components/constants.js";
|
import {apiGet, crudCommonOptions} from "../../components/constants.js";
|
||||||
import {authenticationAddDialog} from "../../components/permission/dialog-permission.js";
|
import {authenticationAddDialog} from "../../components/permission/dialog-permission.js";
|
||||||
|
|
||||||
@@ -26,19 +25,58 @@ export function tabMarket() {
|
|||||||
'reload',
|
'reload',
|
||||||
],
|
],
|
||||||
mode: 'cards',
|
mode: 'cards',
|
||||||
|
columnsCount: 3,
|
||||||
card: {
|
card: {
|
||||||
header: {
|
header: {
|
||||||
title: '${name}',
|
title: '${name}',
|
||||||
subTitle: '${createdTime}',
|
subTitle: '${createdTime}',
|
||||||
description: '${description}',
|
|
||||||
avatar: '${icon}',
|
avatar: '${icon}',
|
||||||
avatarClassName: 'pull-left thumb-md avatar b-3x m-r'
|
avatarClassName: 'pull-left thumb-md avatar b-3x m-r'
|
||||||
},
|
},
|
||||||
|
body: '${TRUNCATE(description, 50)}',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
type: 'action',
|
type: 'action',
|
||||||
label: '查看',
|
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',
|
type: 'action',
|
||||||
|
|||||||
Reference in New Issue
Block a user