From e97f3fb9e7a054ec85fb05acfed59cc1d61cdb69 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Tue, 8 Oct 2024 20:49:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=97=8B=E8=BD=AC90=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/zy/zyInfo/ZyInfoV2List.vue | 32 +++++++++++++++-- .../components/ZyInfoStudentPiyueForm.vue | 35 ++++++++++++++++++- 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/src/views/zy/zyInfo/ZyInfoV2List.vue b/src/views/zy/zyInfo/ZyInfoV2List.vue index 1accb46..1890f73 100644 --- a/src/views/zy/zyInfo/ZyInfoV2List.vue +++ b/src/views/zy/zyInfo/ZyInfoV2List.vue @@ -584,8 +584,12 @@ -
- +
+ 顺时针旋转90度 + 逆时针旋转90度 +
+
+
@@ -667,6 +671,7 @@ const tableCcjgData = ref([]); const tableXshpData = ref([]); const rowSelectionKhnr = ref([]); const ylimgurl = ref(''); +const rotationAngle = ref(0); const SzybStudentModalpage = ref(); const registerScoreModal = ref(); @@ -736,6 +741,13 @@ function handleWxtx(record) { createMessage.success('发送成功'); } +function rotateImage() { + rotationAngle.value += 90; // 每次点击旋转90度 +} + +function rotateImage2() { + rotationAngle.value -= 90; // 每次点击旋转90度 +} function handleJscjbfb() { var list = tableData.value; @@ -1975,4 +1987,20 @@ onMounted(() => { .zbClass { margin-left: 15px; } +.image-container { + padding: 10px; + width:100%; /* 设置容器宽度 */ + height: auto; /* 设置容器高度 */ + overflow: hidden; /* 隐藏溢出的部分 */ + display: flex; + align-items: center; + justify-content: center; +} + +.rotated-image { + max-width: 100%; /* 最大宽度为容器宽度 */ + max-height: 100%; /* 最大高度为容器高度 */ + object-fit: contain; /* 保持图片内容不失真 */ + transform: rotate(90deg); /* 假设图片已经旋转90度 */ +} \ No newline at end of file diff --git a/src/views/zy/zyInfoStudent/components/ZyInfoStudentPiyueForm.vue b/src/views/zy/zyInfoStudent/components/ZyInfoStudentPiyueForm.vue index 8d60a69..eb6610b 100644 --- a/src/views/zy/zyInfoStudent/components/ZyInfoStudentPiyueForm.vue +++ b/src/views/zy/zyInfoStudent/components/ZyInfoStudentPiyueForm.vue @@ -7,7 +7,14 @@
- +
+ 顺时针旋转90度 + 逆时针旋转90度 +
+ +
+ +
@@ -100,6 +107,7 @@ import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; const confirmLoading = ref(false); const showType = ref('0'); const ylurl = ref(''); +const rotationAngle = ref(0); const zyInfo = ref({}); const globSetting = useGlobSetting(); const baseApiUrl = globSetting.domainUrl; @@ -111,6 +119,7 @@ const videoOpen = ref(false); const loop = ref(false); const videoUrl = ref(''); + //表单验证 const validatorRules = { score: [{ required: true, message: '请输入分数!' }], @@ -155,6 +164,13 @@ const videoUrl = ref(''); } +function rotateImage() { + rotationAngle.value += 90; // 每次点击旋转90度 +} + +function rotateImage2() { + rotationAngle.value -= 90; // 每次点击旋转90度 +} /** * 新增 */ @@ -367,4 +383,21 @@ video { display: block; max-width: 100%; /* 确保视频宽度不超过其容器宽度 */ } + +.image-container { + padding: 10px; + width:100%; /* 设置容器宽度 */ + height: auto; /* 设置容器高度 */ + overflow: hidden; /* 隐藏溢出的部分 */ + display: flex; + align-items: center; + justify-content: center; +} + +.rotated-image { + max-width: 100%; /* 最大宽度为容器宽度 */ + max-height: 100%; /* 最大高度为容器高度 */ + object-fit: contain; /* 保持图片内容不失真 */ + transform: rotate(90deg); /* 假设图片已经旋转90度 */ +}