少量更改
This commit is contained in:
@@ -135,7 +135,7 @@ const responseErrorHandler = (error: any) => {
|
||||
if (error.message === 'Network Error') {
|
||||
ElMessage.error('网络连接错误,请检查网络设置');
|
||||
} else {
|
||||
ElMessage.error('网络异常,请检查连接');
|
||||
// ElMessage.error('网络异常,请检查连接');
|
||||
}
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
<template>
|
||||
<el-dialog title="是否导出产品" v-model="isShowDialog" width="400px">
|
||||
<div style="text-align: center; padding: 20px 0">
|
||||
<p style="margin-bottom: 20px; font-size: 14px; color: #606266">确定要导出产品数据吗?</p>
|
||||
<el-dialog title="导出产品数据" v-model="isShowDialog" width="450px" align-center>
|
||||
<div class="export-content">
|
||||
<div class="export-icon">
|
||||
<el-icon class="icon-download"><Download /></el-icon>
|
||||
</div>
|
||||
<p class="export-text">确定要导出产品数据吗?</p>
|
||||
<p class="export-tip">导出的文件将包含所有产品信息</p>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="isShowDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="handleExport" :loading="loading">导出</el-button>
|
||||
</span>
|
||||
<el-button type="primary" @click="handleExport" :loading="loading">
|
||||
<el-icon><Download /></el-icon>
|
||||
导出
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -15,6 +22,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { Download } from '@element-plus/icons-vue';
|
||||
import { exportProduct } from '/@/api/customerService/product';
|
||||
|
||||
const isShowDialog = ref(false);
|
||||
@@ -97,3 +105,39 @@ defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.export-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 20px 0;
|
||||
|
||||
.export-icon {
|
||||
margin-bottom: 16px;
|
||||
.icon-download {
|
||||
font-size: 48px;
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.export-text {
|
||||
margin: 0 0 12px 0;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.export-tip {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -314,7 +314,7 @@ const generateTemplateZip = async (): Promise<Blob> => {
|
||||
const zip = new JSZip();
|
||||
const templateFolder = zip.folder('产品导入模板');
|
||||
if (templateFolder) {
|
||||
templateFolder.file('产品基本信息模板.txt', createTextFile('产品名称:\n产品详情:', '产品基本信息模板.txt'));
|
||||
templateFolder.file('产品名称.txt', createTextFile('产品详情:', '产品名称.txt'));
|
||||
// templateFolder.file('使用说明.txt', createTextFile('使用说明', '使用说明.txt'));
|
||||
}
|
||||
return await zip.generateAsync({ type: 'blob', compression: 'DEFLATE' });
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<el-table-column prop="rag_doc_id" label="已上传知识库" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.rag_doc_id ? 'success' : 'info'" effect="light">
|
||||
{{ row.rag_doc_id ? '已训练' : '未训练' }}
|
||||
{{ row.rag_doc_id ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -64,7 +64,7 @@
|
||||
<el-table-column label="操作" width="220">
|
||||
<template #default="scope">
|
||||
<el-button style="color: #67c23a" size="small" text type="primary" @click="onTrainProduct(scope.row)">
|
||||
<el-icon><Mic /></el-icon>训练
|
||||
<el-icon><Mic /></el-icon>上传
|
||||
</el-button>
|
||||
<el-button style="color: deepskyblue" size="small" text type="primary" @click="onOpenEditRole(scope.row)">
|
||||
<el-icon><EditPen /></el-icon>修改
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
<template>
|
||||
<el-dialog title="是否导出产品" v-model="isShowDialog" width="400px">
|
||||
<div style="text-align: center; padding: 20px 0">
|
||||
<p style="margin-bottom: 20px; font-size: 14px; color: #606266">确定要导数据吗?</p>
|
||||
<el-dialog title="导出产品数据" v-model="isShowDialog" width="450px" align-center>
|
||||
<div class="export-content">
|
||||
<div class="export-icon">
|
||||
<el-icon class="icon-download"><Download /></el-icon>
|
||||
</div>
|
||||
<p class="export-text">确定要导出产品数据吗?</p>
|
||||
<p class="export-tip">导出的文件将包含所有产品信息</p>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="isShowDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="handleExport" :loading="loading">导出</el-button>
|
||||
</span>
|
||||
<el-button type="primary" @click="handleExport" :loading="loading">
|
||||
<el-icon><Download /></el-icon>
|
||||
导出
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -15,6 +22,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { Download } from '@element-plus/icons-vue';
|
||||
import { exportProduct } from '/@/api/customerService/report';
|
||||
|
||||
const isShowDialog = ref(false);
|
||||
@@ -97,3 +105,39 @@ defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.export-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 20px 0;
|
||||
|
||||
.export-icon {
|
||||
margin-bottom: 16px;
|
||||
.icon-download {
|
||||
font-size: 48px;
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.export-text {
|
||||
margin: 0 0 12px 0;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.export-tip {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user