|
5 | 5 | <GridContent>
|
6 | 6 | <Row Gutter="24">
|
7 | 7 | <Col Lg="7" Md="24">
|
8 |
| - <Spin Spinning=@loadding> |
9 |
| - <label>搜索图谱内容</label> |
10 |
| - <Select TItem="string" |
11 |
| - TItemValue="string" |
12 |
| - ValueProperty="c=>c" |
13 |
| - LabelProperty="c=>c" |
14 |
| - DataSource="@_indexList" |
15 |
| - @bind-Value="@_index" |
16 |
| - Placeholder="选择索引" |
17 |
| - OnSelectedItemChanged="OnSelectedItemChangedHandler" > |
18 |
| - </Select> |
19 |
| - <Input @bind-Value="_input" Style="margin-top:10px;" Placeholder="问题" /> |
20 |
| - <TextArea @bind-Value="_output" Style="margin-top:10px;" MinRows="8" Placeholder="答案" /> |
21 |
| - <Button Type="@ButtonType.Primary" Style="margin-top:10px;" OnClick="Search">节点搜索</Button> |
22 |
| - <Button Type="@ButtonType.Primary" Style="margin-top:10px;" OnClick="Search1">社区搜索</Button> |
23 |
| - <a href="/graph?index=@_index" target="_blank" style="margin-left:10px;">查看图谱</a> |
24 |
| - </Spin> |
| 8 | + <Card Title="搜索图谱内容" Style="height:100%;" Bordered> |
| 9 | + <Spin Spinning=@loadding> |
| 10 | + <div style="margin-bottom:16px;"> |
| 11 | + <Text Strong>选择索引</Text> |
| 12 | + <Select TItem="string" |
| 13 | + TItemValue="string" |
| 14 | + ValueProperty="c=>c" |
| 15 | + LabelProperty="c=>c" |
| 16 | + DataSource="@_indexList" |
| 17 | + @bind-Value="@_index" |
| 18 | + Placeholder="选择索引" |
| 19 | + Style="width:100%;" |
| 20 | + OnSelectedItemChanged="OnSelectedItemChangedHandler"> |
| 21 | + </Select> |
| 22 | + </div> |
| 23 | + |
| 24 | + <div style="margin-bottom:16px;"> |
| 25 | + <Text Strong>提问</Text> |
| 26 | + <Input @bind-Value="_input" Placeholder="请输入您的问题" AllowClear /> |
| 27 | + </div> |
| 28 | + |
| 29 | + <div style="margin-bottom:16px;"> |
| 30 | + <Text Strong>回答结果</Text> |
| 31 | + <TextArea @bind-Value="_output" MinRows="8" MaxRows="12" Placeholder="回答将显示在这里" Style="width:100%;" /> |
| 32 | + </div> |
| 33 | + |
| 34 | + <div style="display:flex; gap:8px; margin-top:16px;"> |
| 35 | + <Button Type="@ButtonType.Primary" OnClick="Search" Block> |
| 36 | + <Icon Type="search" /> 节点搜索 |
| 37 | + </Button> |
| 38 | + <Button Type="@ButtonType.Primary" OnClick="Search1" Block> |
| 39 | + <Icon Type="cluster" /> 社区搜索 |
| 40 | + </Button> |
| 41 | + </div> |
| 42 | + |
| 43 | + <Divider Style="margin:16px 0;" /> |
| 44 | + |
| 45 | + <a href="/graph?index=@_index" target="_blank"> |
| 46 | + <Button Type="@ButtonType.Link" Block> |
| 47 | + <Icon Type="eye" /> 查看完整图谱 |
| 48 | + </Button> |
| 49 | + </a> |
| 50 | + </Spin> |
| 51 | + </Card> |
25 | 52 | </Col>
|
| 53 | + |
26 | 54 | <Col Lg="7" Md="24">
|
27 |
| - <label>导入文本数据</label> |
28 |
| - <Input @bind-Value="_importIndex" Placeholder="索引名称,可以一个文件一个,也可以多个文件公用一个" /> |
29 |
| - <TextArea @bind-Value="_importText" Style="margin-top:10px;" MinRows="8" Placeholder="输入文本进行导入" /> |
30 |
| - <Button Type="@ButtonType.Primary" Style="margin-top:10px;" OnClick="InputText">导入</Button> |
31 |
| - |
| 55 | + <Card Title="导入文本数据" Style="height:100%;" Bordered> |
| 56 | + <div style="margin-bottom:16px;"> |
| 57 | + <Text Strong>索引名称</Text> |
| 58 | + <Input @bind-Value="_importIndex" Placeholder="索引名称,可以一个文件一个,也可以多个文件公用一个" AllowClear /> |
| 59 | + </div> |
| 60 | + |
| 61 | + <div style="margin-bottom:16px;"> |
| 62 | + <Text Strong>文本内容</Text> |
| 63 | + <TextArea @bind-Value="_importText" MinRows="10" MaxRows="14" Placeholder="输入文本进行导入" Style="width:100%;" /> |
| 64 | + </div> |
| 65 | + |
| 66 | + <Button Type="@ButtonType.Primary" OnClick="InputText" Block> |
| 67 | + <Icon Type="import" /> 导入文本 |
| 68 | + </Button> |
| 69 | + </Card> |
32 | 70 | </Col>
|
33 | 71 |
|
34 | 72 | <Col Lg="10" Md="24">
|
35 |
| - <label>导入txt数据</label> |
36 |
| - <Input @bind-Value="_importIndex" Placeholder="索引名称,可以一个文件一个,也可以多个文件公用一个" /> |
37 |
| - |
38 |
| - <Upload Action="@("api/Graph/ImportTxt?index="+_importIndex)" |
39 |
| - Name="file" |
40 |
| - Accept="text/plain" |
41 |
| - BeforeUpload="BeforeUpload" |
42 |
| - OnSingleCompleted="OnSingleCompleted" Style="margin-top:10px;"> |
43 |
| - <Button Icon="upload" Style="margin-top:10px;"> |
44 |
| - <span>上传文档</span> |
45 |
| - </Button> |
46 |
| - </Upload> |
| 73 | + <Card Title="导入TXT文件" Style="height:100%;" Bordered> |
| 74 | + <div style="margin-bottom:16px;"> |
| 75 | + <Text Strong>索引名称</Text> |
| 76 | + <Input @bind-Value="_importIndex" Placeholder="索引名称,可以一个文件一个,也可以多个文件公用一个" AllowClear /> |
| 77 | + </div> |
| 78 | + |
| 79 | + <div style="margin-top:24px; text-align:center;"> |
| 80 | + <Upload Action="@("api/Graph/ImportTxt?index="+_importIndex)" |
| 81 | + Name="file" |
| 82 | + Accept="text/plain" |
| 83 | + BeforeUpload="BeforeUpload" |
| 84 | + OnSingleCompleted="OnSingleCompleted" |
| 85 | + Style="width:100%;" |
| 86 | + Drag> |
| 87 | + <p class="ant-upload-drag-icon" style="margin-bottom:8px;"> |
| 88 | + <Icon Type="inbox" Style="font-size:48px; color:#40a9ff;" /> |
| 89 | + </p> |
| 90 | + <p class="ant-upload-text" style="font-size:16px;">点击或拖拽文件到此区域上传</p> |
| 91 | + <p class="ant-upload-hint" style="color:#888;"> |
| 92 | + 支持单个或批量上传,仅支持TXT文本文件 |
| 93 | + </p> |
| 94 | + </Upload> |
| 95 | + </div> |
| 96 | + <a href="https://gw.antsk.cn" target="_blank">更多文件导入类型可以查看AntSK项目</a> |
| 97 | + </Card> |
47 | 98 | </Col>
|
48 | 99 | </Row>
|
49 | 100 | </GridContent>
|
|
0 commit comments