From d60a1bc3326ff222daeb21926985a03fc42c60f8 Mon Sep 17 00:00:00 2001
From: cool <653314653@qq.com>
Date: Mon, 18 Mar 2024 15:16:36 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E7=AE=A1=E7=90=86=E5=9B=BE?=
=?UTF-8?q?=E7=89=87=E9=A2=84=E8=A7=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ah-jjzhgd-web/src/api/basic/project.js | 9 ++++
ah-jjzhgd-web/src/permission.js | 2 +-
.../src/views/basic/project/index.vue | 44 +++++++++++++++++--
3 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/ah-jjzhgd-web/src/api/basic/project.js b/ah-jjzhgd-web/src/api/basic/project.js
index 7d02013..0d92053 100644
--- a/ah-jjzhgd-web/src/api/basic/project.js
+++ b/ah-jjzhgd-web/src/api/basic/project.js
@@ -146,3 +146,12 @@ export function getTowerList(data) {
})
}
+// 工程图片预览
+export function getViewImageList(data) {
+ return request({
+ url: '/system/sys/pro/viewProFile',
+ method: 'get',
+ params: data
+ })
+}
+
diff --git a/ah-jjzhgd-web/src/permission.js b/ah-jjzhgd-web/src/permission.js
index b038b14..53d7b15 100644
--- a/ah-jjzhgd-web/src/permission.js
+++ b/ah-jjzhgd-web/src/permission.js
@@ -30,7 +30,7 @@ router.beforeEach(async(to, from, next) => {
if (roles?.length > 0) {
next()
} else {
- console.log('refresh---')
+ // console.log('refresh---')
await store.dispatch('user/setUserRoles', ['admin'])
const accessRoutes = await store.dispatch('permission/generateRoutes', store.getters.roles)
router.addRoutes(accessRoutes)
diff --git a/ah-jjzhgd-web/src/views/basic/project/index.vue b/ah-jjzhgd-web/src/views/basic/project/index.vue
index b9ae92a..88aa835 100644
--- a/ah-jjzhgd-web/src/views/basic/project/index.vue
+++ b/ah-jjzhgd-web/src/views/basic/project/index.vue
@@ -76,8 +76,30 @@
-
-
+
+
+ {{ row.proFileNum }}
+
+
+
+
+
+ {{ row.proImgFileNum }}
+
+
+
@@ -302,7 +324,7 @@ import {
deleteProjectItem,
downloadProjectTemplate,
exportProject, getBuildList, getProjectItemDetail,
- getProjectList,
+ getProjectList, getViewImageList,
importProject, updateProjectItem
} from '@/api/basic/project'
@@ -349,6 +371,7 @@ export default {
imageList: [],
imageList2: [],
delFiles: [],
+ currentImageViewList: [],
imageUploadLimit: 1,
imageUploadLimit2: 5,
tableKey: 0,
@@ -672,6 +695,21 @@ export default {
handleClosedCompleteModal() {
this.$refs['completeForm'].resetFields()
this.completeForm = _.cloneDeep(defaultCompleteTmp)
+ },
+ // 图片预览
+ handleViewImage(row, index, type) {
+ const reqData = {
+ proId: row.proId,
+ fileType: type
+ }
+ const refName = type === '1' ? 'imageView2' : 'imageView'
+ getViewImageList(reqData).then(res => {
+ const { data } = res
+ this.currentImageViewList = data.map(item => {
+ return item.base64Url
+ })
+ this.$refs[refName].showViewer = true
+ })
}
}
}