style(ai): 格式化 AI API 错误消息和调整 AI 视图布局
- 格式化 Ollama 和 OpenAI API 的错误消息字符串以提高可读性 - 移除 AI 视图中的 BaseURL 输入字段并硬编码为固定端点 - 简化 AI 视图中 API 调用的基础 URL 配置逻辑 - 修复多个组件中的代码格式和空格缩进问题 - 清理经销商订单视图中的多余注释和代码结构 - 调整表单组件的标签和布局格式以提升用户体验
This commit is contained in:
@@ -14,14 +14,17 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { GradeParam } from '@/api/user/grade/model';
|
||||
import {ref, watch} from 'vue';
|
||||
import {utils, writeFile} from 'xlsx';
|
||||
import {message} from 'ant-design-vue';
|
||||
import {ShopDealerCapital} from "@/api/shop/shopDealerCapital/model";
|
||||
import {getTenantId} from "@/utils/domain";
|
||||
import useSearch from "@/utils/use-search";
|
||||
import {ShopDealerOrder, ShopDealerOrderParam} from "@/api/sdy/sdyDealerOrder/model";
|
||||
import {pageShopDealerOrder} from "@/api/shop/shopDealerOrder";
|
||||
import { ref, watch } from 'vue';
|
||||
import { utils, writeFile } from 'xlsx';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { ShopDealerCapital } from '@/api/shop/shopDealerCapital/model';
|
||||
import { getTenantId } from '@/utils/domain';
|
||||
import useSearch from '@/utils/use-search';
|
||||
import {
|
||||
ShopDealerOrder,
|
||||
ShopDealerOrderParam
|
||||
} from '@/api/sdy/sdyDealerOrder/model';
|
||||
import { pageShopDealerOrder } from '@/api/shop/shopDealerOrder';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -43,7 +46,7 @@
|
||||
};
|
||||
|
||||
// 表单数据
|
||||
const {where} = useSearch<ShopDealerOrderParam>({
|
||||
const { where } = useSearch<ShopDealerOrderParam>({
|
||||
keywords: '',
|
||||
userId: undefined,
|
||||
orderNo: undefined,
|
||||
@@ -114,27 +117,23 @@
|
||||
workbook.Sheets[sheetName] = sheet;
|
||||
// 设置列宽
|
||||
sheet['!cols'] = [
|
||||
{wch: 10},
|
||||
{wch: 20},
|
||||
{wch: 20},
|
||||
{wch: 15},
|
||||
{wch: 10},
|
||||
{wch: 10},
|
||||
{wch: 20}
|
||||
{ wch: 10 },
|
||||
{ wch: 20 },
|
||||
{ wch: 20 },
|
||||
{ wch: 15 },
|
||||
{ wch: 10 },
|
||||
{ wch: 10 },
|
||||
{ wch: 20 }
|
||||
];
|
||||
message.loading('正在导出...');
|
||||
setTimeout(() => {
|
||||
writeFile(
|
||||
workbook,
|
||||
`${sheetName}.xlsx`
|
||||
);
|
||||
writeFile(workbook, `${sheetName}.xlsx`);
|
||||
}, 1000);
|
||||
})
|
||||
.catch((msg) => {
|
||||
message.error(msg);
|
||||
})
|
||||
.finally(() => {
|
||||
});
|
||||
.finally(() => {});
|
||||
};
|
||||
|
||||
watch(
|
||||
|
||||
Reference in New Issue
Block a user