feat(ai-web): 尝试使用jpa作为通用数据库后端
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import {amisRender, commonInfo, crudCommonOptions, mappingField, mappingItem} from '../../../util/amis.tsx'
|
||||
import {
|
||||
amisRender,
|
||||
commonInfo,
|
||||
crudCommonOptions,
|
||||
mappingField,
|
||||
mappingItem,
|
||||
pictureFromIds
|
||||
} from '../../../util/amis.tsx'
|
||||
|
||||
const FeedbackDiv = styled.div`
|
||||
.feedback-list-images {
|
||||
@@ -29,7 +36,16 @@ const Feedback: React.FC = () => {
|
||||
body: [
|
||||
{
|
||||
type: 'crud',
|
||||
api: `${commonInfo.baseAiUrl}/feedback/list`,
|
||||
api: {
|
||||
method: 'post',
|
||||
url: `${commonInfo.baseAiUrl}/feedback/list`,
|
||||
data: {
|
||||
page: {
|
||||
index: '${page}',
|
||||
size: '${perPage}',
|
||||
}
|
||||
}
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
@@ -46,7 +62,7 @@ const Feedback: React.FC = () => {
|
||||
body: {
|
||||
debug: commonInfo.debug,
|
||||
type: 'form',
|
||||
api: `${commonInfo.baseAiUrl}/feedback/add`,
|
||||
api: `${commonInfo.baseAiUrl}/feedback/save`,
|
||||
body: [
|
||||
{
|
||||
type: 'editor',
|
||||
@@ -100,7 +116,7 @@ const Feedback: React.FC = () => {
|
||||
type: 'images',
|
||||
enlargeAble: true,
|
||||
enlargeWithGallary: true,
|
||||
source: '${pictures}',
|
||||
source: pictureFromIds('pictures'),
|
||||
showToolbar: true,
|
||||
},
|
||||
],
|
||||
@@ -123,13 +139,7 @@ const Feedback: React.FC = () => {
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'ajax',
|
||||
api: {
|
||||
method: 'get',
|
||||
url: `${commonInfo.baseAiUrl}/feedback/reanalysis`,
|
||||
data: {
|
||||
id: '${id}',
|
||||
},
|
||||
},
|
||||
api: `get:${commonInfo.baseAiUrl}/feedback/reanalysis/\${id}`,
|
||||
confirmText: '确认执行重新分析?',
|
||||
confirmTitle: '重新分析',
|
||||
},
|
||||
@@ -186,6 +196,7 @@ const Feedback: React.FC = () => {
|
||||
enlargeAble: true,
|
||||
enlargeWithGallary: true,
|
||||
showToolbar: true,
|
||||
source: pictureFromIds('pictures'),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -221,13 +232,7 @@ const Feedback: React.FC = () => {
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'ajax',
|
||||
api: {
|
||||
method: 'get',
|
||||
url: `${commonInfo.baseAiUrl}/feedback/delete`,
|
||||
data: {
|
||||
id: '${id}',
|
||||
},
|
||||
},
|
||||
api: `get:${commonInfo.baseAiUrl}/feedback/remove/\${id}`,
|
||||
confirmTitle: '删除',
|
||||
confirmText: '删除后将无法恢复,确认删除?',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user