feat(ai-web): 增加Feedback详情展示和处理情况确认
This commit is contained in:
@@ -4,6 +4,8 @@ import {amisRender, commonInfo, crudCommonOptions, mappingField, mappingItem} fr
|
||||
|
||||
const FeedbackDiv = styled.div`
|
||||
.feedback-list-images {
|
||||
margin-top: 10px;
|
||||
|
||||
.antd-Img-container {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
@@ -84,17 +86,24 @@ const Feedback: React.FC = () => {
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
name: 'source',
|
||||
label: '故障描述',
|
||||
},
|
||||
{
|
||||
name: 'pictures',
|
||||
label: '相关截图',
|
||||
width: 200,
|
||||
className: 'feedback-list-images',
|
||||
type: 'images',
|
||||
enlargeAble: true,
|
||||
enlargeWithGallary: true,
|
||||
type: 'flex',
|
||||
direction: 'column',
|
||||
items: [
|
||||
{
|
||||
type: 'tpl',
|
||||
className: 'white-space-pre',
|
||||
tpl: '${source}',
|
||||
},
|
||||
{
|
||||
className: 'feedback-list-images',
|
||||
type: 'images',
|
||||
enlargeAble: true,
|
||||
enlargeWithGallary: true,
|
||||
source: '${pictures}',
|
||||
showToolbar: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
@@ -105,9 +114,107 @@ const Feedback: React.FC = () => {
|
||||
{
|
||||
type: 'operation',
|
||||
label: '操作',
|
||||
width: 150,
|
||||
width: 200,
|
||||
buttons: [
|
||||
{
|
||||
visibleOn: '${status === \'ANALYSIS_SUCCESS\'}',
|
||||
type: 'action',
|
||||
label: '重新分析',
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'ajax',
|
||||
api: {
|
||||
method: 'get',
|
||||
url: `${commonInfo.baseAiUrl}/feedback/reanalysis`,
|
||||
data: {
|
||||
id: '${id}',
|
||||
},
|
||||
},
|
||||
confirmText: '确认执行重新分析?',
|
||||
confirmTitle: '重新分析',
|
||||
},
|
||||
{
|
||||
disabledOn: '${status === \'ANALYSIS_PROCESSING\'}',
|
||||
type: 'action',
|
||||
label: '详情',
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '报障详情',
|
||||
size: 'lg',
|
||||
closeOnOutside: true,
|
||||
actions: [
|
||||
{
|
||||
visibleOn: '${status !== \'FINISHED\'}',
|
||||
type: 'action',
|
||||
actionType: 'close',
|
||||
label: '取消',
|
||||
},
|
||||
{
|
||||
visibleOn: '${status !== \'FINISHED\'}',
|
||||
type: 'submit',
|
||||
label: '确认',
|
||||
level: 'primary',
|
||||
},
|
||||
],
|
||||
body: {
|
||||
debug: commonInfo.debug,
|
||||
type: 'form',
|
||||
mode: 'normal',
|
||||
api: {
|
||||
method: 'post',
|
||||
url: `${commonInfo.baseAiUrl}/feedback/conclude`,
|
||||
data: {
|
||||
id: '${id}',
|
||||
conclusion: '${conclusion|default:undefined}',
|
||||
},
|
||||
},
|
||||
body: [
|
||||
{
|
||||
type: 'textarea',
|
||||
name: 'source',
|
||||
label: '报障描述',
|
||||
static: true,
|
||||
},
|
||||
{
|
||||
type: 'control',
|
||||
name: 'pictures',
|
||||
label: '相关截图',
|
||||
body: {
|
||||
type: 'images',
|
||||
enlargeAble: true,
|
||||
enlargeWithGallary: true,
|
||||
showToolbar: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'control',
|
||||
name: 'analysis',
|
||||
label: 'AI辅助分析',
|
||||
body: {
|
||||
type: 'markdown',
|
||||
},
|
||||
},
|
||||
{
|
||||
visibleOn: '${status !== \'FINISHED\'}',
|
||||
type: 'textarea',
|
||||
name: 'conclusion',
|
||||
label: '结论',
|
||||
},
|
||||
{
|
||||
visibleOn: '${status === \'FINISHED\'}',
|
||||
type: 'textarea',
|
||||
name: 'conclusion',
|
||||
label: '结论',
|
||||
static: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
disabledOn: '${status === \'ANALYSIS_PROCESSING\'}',
|
||||
type: 'action',
|
||||
label: '删除',
|
||||
className: 'text-danger hover:text-red-600',
|
||||
@@ -121,8 +228,8 @@ const Feedback: React.FC = () => {
|
||||
id: '${id}',
|
||||
},
|
||||
},
|
||||
confirmText: '确认删除',
|
||||
confirmTitle: '删除',
|
||||
confirmText: '删除后将无法恢复,确认删除?',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user