按钮管理发送内容修改未textarea 并增加高度,新增修改详情同理,回答框增加高度,
正在显示
6 个修改的文件
包含
51 行增加
和
21 行删除
| @@ -87,7 +87,14 @@ export const formSchema: FormSchema[] = [ | @@ -87,7 +87,14 @@ export const formSchema: FormSchema[] = [ | ||
| 87 | { | 87 | { |
| 88 | label: '发送内容', | 88 | label: '发送内容', |
| 89 | field: 'buttonValues', | 89 | field: 'buttonValues', |
| 90 | - component: 'Input', | 90 | + component: 'InputTextArea', // 替换为文本域组件 |
| 91 | + componentProps: { | ||
| 92 | + autoSize: { | ||
| 93 | + minRows: 1, // 最小行数 | ||
| 94 | + maxRows: 6, // 最大行数 | ||
| 95 | + }, | ||
| 96 | + style: { width: '100%' }, // 宽度自适应 | ||
| 97 | + }, | ||
| 91 | required: true, | 98 | required: true, |
| 92 | }, | 99 | }, |
| 93 | // TODO 主键隐藏字段,目前写死为ID | 100 | // TODO 主键隐藏字段,目前写死为ID |
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | </a-button> | 26 | </a-button> |
| 27 | </a-dropdown> | 27 | </a-dropdown> |
| 28 | <!-- 高级查询 --> | 28 | <!-- 高级查询 --> |
| 29 | - <super-query :config="superQueryConfig" @search="handleSuperQuery" /> | 29 | +<!-- <super-query :config="superQueryConfig" @search="handleSuperQuery" />--> |
| 30 | </template> | 30 | </template> |
| 31 | <!--操作栏--> | 31 | <!--操作栏--> |
| 32 | <template #action="{ record }"> | 32 | <template #action="{ record }"> |
| @@ -33,7 +33,7 @@ export const columns: BasicColumn[] = [ | @@ -33,7 +33,7 @@ export const columns: BasicColumn[] = [ | ||
| 33 | align: 'center', | 33 | align: 'center', |
| 34 | dataIndex: 'answerType', | 34 | dataIndex: 'answerType', |
| 35 | customRender: ({ text }) => { | 35 | customRender: ({ text }) => { |
| 36 | - const statusMap ={ | 36 | + const statusMap = { |
| 37 | 1: '问题库回答', | 37 | 1: '问题库回答', |
| 38 | 2: '模型回答', | 38 | 2: '模型回答', |
| 39 | 3: '未命中', | 39 | 3: '未命中', |
| @@ -55,7 +55,7 @@ export const searchFormSchema: FormSchema[] = [ | @@ -55,7 +55,7 @@ export const searchFormSchema: FormSchema[] = [ | ||
| 55 | { | 55 | { |
| 56 | label: '问题', | 56 | label: '问题', |
| 57 | field: 'question', | 57 | field: 'question', |
| 58 | - component: 'Input', | 58 | + component: 'Input', // 替换为文本域组件 |
| 59 | }, | 59 | }, |
| 60 | // 新增知识库选择字段 | 60 | // 新增知识库选择字段 |
| 61 | { | 61 | { |
| @@ -86,7 +86,23 @@ export const searchFormSchema: FormSchema[] = [ | @@ -86,7 +86,23 @@ export const searchFormSchema: FormSchema[] = [ | ||
| 86 | { | 86 | { |
| 87 | label: '回答方式', | 87 | label: '回答方式', |
| 88 | field: 'answerType', | 88 | field: 'answerType', |
| 89 | - component: 'Input', | 89 | + component: 'Select', |
| 90 | + componentProps: { | ||
| 91 | + options: [ | ||
| 92 | + { | ||
| 93 | + label: '未命中', | ||
| 94 | + value: 1, | ||
| 95 | + }, | ||
| 96 | + { | ||
| 97 | + label: '模型回答', | ||
| 98 | + value: 1, | ||
| 99 | + }, | ||
| 100 | + { | ||
| 101 | + label: '问题库回答', | ||
| 102 | + value: 1, | ||
| 103 | + }, | ||
| 104 | + ], | ||
| 105 | + }, | ||
| 90 | }, | 106 | }, |
| 91 | { | 107 | { |
| 92 | label: '是否存入', | 108 | label: '是否存入', |
| @@ -95,11 +111,11 @@ export const searchFormSchema: FormSchema[] = [ | @@ -95,11 +111,11 @@ export const searchFormSchema: FormSchema[] = [ | ||
| 95 | componentProps: { | 111 | componentProps: { |
| 96 | options: [ | 112 | options: [ |
| 97 | { | 113 | { |
| 98 | - label: '是', | 114 | + label: '已存入', |
| 99 | value: 1, | 115 | value: 1, |
| 100 | }, | 116 | }, |
| 101 | { | 117 | { |
| 102 | - label: '否', | 118 | + label: '未存入', |
| 103 | value: 0, | 119 | value: 0, |
| 104 | }, | 120 | }, |
| 105 | ], | 121 | ], |
| @@ -109,16 +125,6 @@ export const searchFormSchema: FormSchema[] = [ | @@ -109,16 +125,6 @@ export const searchFormSchema: FormSchema[] = [ | ||
| 109 | //表单数据 | 125 | //表单数据 |
| 110 | export const formSchema: FormSchema[] = [ | 126 | export const formSchema: FormSchema[] = [ |
| 111 | { | 127 | { |
| 112 | - label: '问题', | ||
| 113 | - field: 'question', | ||
| 114 | - component: 'Input', | ||
| 115 | - }, | ||
| 116 | - { | ||
| 117 | - label: '回答', | ||
| 118 | - field: 'answer', | ||
| 119 | - component: 'InputTextArea', | ||
| 120 | - }, | ||
| 121 | - { | ||
| 122 | label: '模型名称', | 128 | label: '模型名称', |
| 123 | field: 'name', // 注意:这里使用knowledgeId作为字段名 | 129 | field: 'name', // 注意:这里使用knowledgeId作为字段名 |
| 124 | component: 'Input', | 130 | component: 'Input', |
| @@ -134,6 +140,23 @@ export const formSchema: FormSchema[] = [ | @@ -134,6 +140,23 @@ export const formSchema: FormSchema[] = [ | ||
| 134 | }, | 140 | }, |
| 135 | }, | 141 | }, |
| 136 | }, | 142 | }, |
| 143 | + { | ||
| 144 | + label: '问题', | ||
| 145 | + field: 'question', | ||
| 146 | + component: 'Input', | ||
| 147 | + }, | ||
| 148 | + { | ||
| 149 | + label: '回答', | ||
| 150 | + field: 'answer', | ||
| 151 | + component: 'InputTextArea', | ||
| 152 | + componentProps: { | ||
| 153 | + autoSize: { | ||
| 154 | + minRows: 1, // 最小行数 | ||
| 155 | + maxRows: 10, // 最大行数 | ||
| 156 | + }, | ||
| 157 | + style: { width: '100%' }, // 宽度自适应 | ||
| 158 | + }, | ||
| 159 | + }, | ||
| 137 | // TODO 主键隐藏字段,目前写死为ID | 160 | // TODO 主键隐藏字段,目前写死为ID |
| 138 | { | 161 | { |
| 139 | label: '', | 162 | label: '', |
| @@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
| 24 | </a-button> | 24 | </a-button> |
| 25 | </a-dropdown> | 25 | </a-dropdown> |
| 26 | <!-- 高级查询 --> | 26 | <!-- 高级查询 --> |
| 27 | - <super-query :config="superQueryConfig" @search="handleSuperQuery" /> | 27 | +<!-- <super-query :config="superQueryConfig" @search="handleSuperQuery" />--> |
| 28 | </template> | 28 | </template> |
| 29 | <!--操作栏--> | 29 | <!--操作栏--> |
| 30 | <template #action="{ record }"> | 30 | <template #action="{ record }"> |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <BasicTable @register="registerTable" :rowSelection="rowSelection"> | 3 | <BasicTable @register="registerTable" :rowSelection="rowSelection"> |
| 4 | <template #tableTitle> | 4 | <template #tableTitle> |
| 5 | <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined">新增</a-button> | 5 | <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined">新增</a-button> |
| 6 | - <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls">导出</a-button> | 6 | +<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls">导出</a-button>--> |
| 7 | <a-button type="primary" preIcon="ant-design:import-outlined" @click="handleOpenImportModal">导入ZIP</a-button> | 7 | <a-button type="primary" preIcon="ant-design:import-outlined" @click="handleOpenImportModal">导入ZIP</a-button> |
| 8 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 8 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| 9 | <template #overlay> | 9 | <template #overlay> |
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <!--插槽:table标题--> | 5 | <!--插槽:table标题--> |
| 6 | <template #tableTitle> | 6 | <template #tableTitle> |
| 7 | <a-button type="primary" v-auth="'embeddings:embeddings:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> | 7 | <a-button type="primary" v-auth="'embeddings:embeddings:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> |
| 8 | - <a-button type="primary" v-auth="'embeddings:embeddings:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> | 8 | +<!-- <a-button type="primary" v-auth="'embeddings:embeddings:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>--> |
| 9 | <j-upload-button type="primary" v-auth="'embeddings:embeddings:importWord'" preIcon="ant-design:import-outlined" @click="onImportXls" | 9 | <j-upload-button type="primary" v-auth="'embeddings:embeddings:importWord'" preIcon="ant-design:import-outlined" @click="onImportXls" |
| 10 | >导入</j-upload-button | 10 | >导入</j-upload-button |
| 11 | > | 11 | > |
| @@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
| 24 | </a-button> | 24 | </a-button> |
| 25 | </a-dropdown> | 25 | </a-dropdown> |
| 26 | <!-- 高级查询 --> | 26 | <!-- 高级查询 --> |
| 27 | - <super-query :config="superQueryConfig" @search="handleSuperQuery" /> | 27 | +<!-- <super-query :config="superQueryConfig" @search="handleSuperQuery" />--> |
| 28 | </template> | 28 | </template> |
| 29 | <!--操作栏--> | 29 | <!--操作栏--> |
| 30 | <template #action="{ record }"> | 30 | <template #action="{ record }"> |
-
请 注册 或 登录 后发表评论