From 38452ff3a229ad1922d49f182f5595dc2a790693 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 30 Jun 2025 16:40:59 +0800
Subject: [PATCH] feat:帮助中心
---
src/views/dataCenter/dataCenter.vue | 2
src/page/index/top/top-qna.vue | 23 +----------
src/views/algorithmRepository/algorithmRepository.vue | 23 ++++++++---
src/views/system/helpCenter.vue | 31 +++++++++------
4 files changed, 39 insertions(+), 40 deletions(-)
diff --git a/src/page/index/top/top-qna.vue b/src/page/index/top/top-qna.vue
index d2f6b24..9430a53 100644
--- a/src/page/index/top/top-qna.vue
+++ b/src/page/index/top/top-qna.vue
@@ -65,27 +65,10 @@
ElMessage.warning('入门指南文件未找到');
return;
}
- fetch(rumenPath.value)
- .then((response) => response.blob())
- .then((res) => {
- let blob = new Blob([res], { type: "application/pdf" });
- // pdfurl即转化后的结果
- let pdfurl = window.URL.createObjectURL(blob);
- // 新标签页打开,即可预览并下载
- window.open(pdfurl);
- });
- } else if (val === 'systemupdate') {
- fetch(systemupdateFilePath.value)
- .then((response) => response.blob())
- .then((res) => {
- let blob = new Blob([res], { type: "application/pdf" });
- // pdfurl即转化后的结果
- let pdfurl = window.URL.createObjectURL(blob);
- // 新标签页打开,即可预览并下载
- window.open(pdfurl);
- });
-
+ window.open(rumenPath.value, '_blank');
+ } else if (val === 'systemupdate') {
+ window.open(systemupdateFilePath.value, '_blank');
}
diff --git a/src/views/algorithmRepository/algorithmRepository.vue b/src/views/algorithmRepository/algorithmRepository.vue
index 9c28908..adadf1a 100644
--- a/src/views/algorithmRepository/algorithmRepository.vue
+++ b/src/views/algorithmRepository/algorithmRepository.vue
@@ -102,9 +102,7 @@
</template>
<script setup>
-defineOptions({
- name: 'algorithmRepository',
-});
+
import { getDictionaryByCode } from '@/api/system/dictbiz';
import { getalgorithmList, selectDeviceList } from '@/api/algorithm';
import { getSmallImg } from '@/utils/util';
@@ -153,7 +151,18 @@
};
// 详情
const getList = () => {
- getalgorithmList(params.value).then(res => {
+const detailParams={
+ ai_type_key: params.value.ai_type_key,
+ start_date:params.value.start_date,
+ end_date: params.value.end_date,
+ device_name: params.value.device_name,
+ name:params.value.name,
+}
+ getalgorithmList(detailParams,{ current: params.value.current,
+ size: params.value.size,}).then(res => {
+
+ console.log('算法仓库',res.data.data);
+
loading.value = true;
detailData.value = res.data.data.records;
total.value = res.data.data.total;
@@ -279,14 +288,14 @@
.pictureitem {
display: grid;
grid-template-columns: repeat(5, 1fr);
- gap: 24px;
+ gap: 14px;
.imgitem {
border-radius: 12px 12px 0 0;
overflow: hidden;
.el-image {
width: 100%;
- height: 200px;
+ height: 170px;
display: block;
margin: 0;
padding: 0;
@@ -295,7 +304,7 @@
display: flex;
justify-content: space-between;
align-items: center;
- height: 42px;
+ height: 35px;
border-radius: 0 0 12px 12px;
overflow: hidden;
background: linear-gradient(180deg, #ffffff 0%, #e5edff 100%);
diff --git a/src/views/dataCenter/dataCenter.vue b/src/views/dataCenter/dataCenter.vue
index 2f5bea5..d8927d0 100644
--- a/src/views/dataCenter/dataCenter.vue
+++ b/src/views/dataCenter/dataCenter.vue
@@ -104,7 +104,7 @@
<el-pagination
v-model:current-page="jobListParams.current"
v-model:page-size="jobListParams.size"
- :page-sizes="[10, 20, 30, 40]"
+ :page-sizes="[15, 20, 30, 40]"
background
layout="total, sizes, prev, pager, next, jumper"
:total="total"
diff --git a/src/views/system/helpCenter.vue b/src/views/system/helpCenter.vue
index 82ac420..2fae289 100644
--- a/src/views/system/helpCenter.vue
+++ b/src/views/system/helpCenter.vue
@@ -60,20 +60,28 @@
});
};
// 查看
-const clickDetail = row => {
- if (!row.filePath) {
+// const clickDetail = row => {
+// if (!row.filePath) {
+// ElMessage.warning('没有可预览的文件');
+// return;
+// }
+// fetch(row.filePath)
+// .then(response => response.blob())
+// .then(res => {
+// let blob = new Blob([res], { type: 'application/pdf' });
+// // pdfurl即转化后的结果
+// let pdfurl = window.URL.createObjectURL(blob);
+// // 新标签页打开,即可预览并下载
+// window.open(pdfurl);
+// });
+// };
+const clickDetail = val => {
+ const filePath = val.filePath;
+ if (!val.filePath) {
ElMessage.warning('没有可预览的文件');
return;
}
- fetch(row.filePath)
- .then(response => response.blob())
- .then(res => {
- let blob = new Blob([res], { type: 'application/pdf' });
- // pdfurl即转化后的结果
- let pdfurl = window.URL.createObjectURL(blob);
- // 新标签页打开,即可预览并下载
- window.open(pdfurl);
- });
+ window.open(filePath, '_blank');
};
// 文件上传
const onUploadFileBefore = (file, row) => {
@@ -82,7 +90,6 @@
const formData = new FormData();
formData.append('file', file, file.name);
-
uploadFileAPI(formData).then(res => {
if (res.data.code === 200) {
const params = {
--
Gitblit v1.9.3