From aa3be397219f5d83c4d8ab992e96cb464d20126f Mon Sep 17 00:00:00 2001
From: zhuhao <979263092@qq.com>
Date: Thu, 12 Dec 2024 16:55:08 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E7=A0=94=E5=AD=A6=E7=9B=B8=E5=85=B3?=
=?UTF-8?q?=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.production | 2 +-
src/renderer/src/layout/components/Aside.vue | 6 +++---
src/renderer/src/views/profile/index.vue | 10 ++++++++--
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/.env.production b/.env.production
index b7f30f3..0919367 100644
--- a/.env.production
+++ b/.env.production
@@ -22,4 +22,4 @@ VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
VITE_APP_WS_URL = 'wss://file.ysaix.com:7868'
# 是否显示开发工具
-VITE_SHOW_DEV_TOOLS = 'true'
+VITE_SHOW_DEV_TOOLS = 'false'
diff --git a/src/renderer/src/layout/components/Aside.vue b/src/renderer/src/layout/components/Aside.vue
index 9182498..ba32ca5 100644
--- a/src/renderer/src/layout/components/Aside.vue
+++ b/src/renderer/src/layout/components/Aside.vue
@@ -11,7 +11,7 @@
- -
+
-
学校认证
{{ userStore.DeptInfo.register.schoolName }}
@@ -19,8 +19,8 @@
- 加入学校
- 个人中心
- - 学校管理
- - 班级中心
+ - 学校管理
+ - 班级中心
- 退出登录
diff --git a/src/renderer/src/views/profile/index.vue b/src/renderer/src/views/profile/index.vue
index 93fc043..9b7fff4 100644
--- a/src/renderer/src/views/profile/index.vue
+++ b/src/renderer/src/views/profile/index.vue
@@ -4,7 +4,7 @@
{{ state.user.nickName }}
-
@@ -35,7 +35,7 @@ import { getUserProfile } from '@/api/system/user'
import pkc from "../../../../../package.json"
//选择学校和班级
import selectClass from './components/selectClass.vue'
-
+import useUserStore from '@/store/modules/user'
const version = ref(pkc.version)
const activeTab = ref('userinfo')
@@ -46,6 +46,12 @@ const state = reactive({
postGroup: {}
})
+const isStadium = () => {
+ let user = useUserStore().user
+ let roles = user.roles
+ return roles.some(item => item.roleKey === 'stadium')
+}
+
const isSubject = ref(false)
async function getUser() {
getUserProfile().then((response) => {
From 99c26145d8de8832d9c9b2e5750a6587cbc24448 Mon Sep 17 00:00:00 2001
From: lyc
Date: Thu, 12 Dec 2024 17:14:39 +0800
Subject: [PATCH 2/6] edit
---
.../Editor/CanvasTool/MaterialDialog.vue | 13 +++++++--
.../src/views/Editor/CanvasTool/index.vue | 28 +++++++++++++------
src/renderer/src/layout/components/Header.vue | 1 -
.../views/teachingDesign/container/right.vue | 3 --
4 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue
index 9ad6322..a680871 100644
--- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue
+++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue
@@ -20,6 +20,7 @@ import { ref, reactive, onMounted, computed } from 'vue';
import { sessionStore } from '@/utils/store'
import { getSmarttalkPage } from '@/api/file'
import { getFileSuffix, urlToBase64 } from '@/utils/ruoyi.js'
+import * as commUtils from '@/utils/comm.js'
const emit = defineEmits(['insertMaterial', 'close'])
@@ -62,12 +63,18 @@ const fileUrl = computed(() => (item) =>{
// 插入
const onInsert = async (item) =>{
+
+ const bolb = commUtils.base64ToBlob(item.fileFullPath)
+
+ const file = commutils.blobToFile(bolb, item.fileShowName)
+
+
+
if(videoSuffix.indexOf(getFileSuffix(item.fileShowName)) != -1){
- emit('insertMaterial',{ type: 'video', data: item.fileFullPath })
+ emit('insertMaterial',{ type: 'video', file })
}
else{
- const base64 = await urlToBase64(item.fileFullPath)
- emit('insertMaterial',{ type: 'img', data: base64 })
+ emit('insertMaterial',{ type: 'img', file })
}
}
diff --git a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
index 879865f..7780a65 100644
--- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
+++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
@@ -132,7 +132,7 @@
- { createImageElement(url); imgVisible = false }" />
+
@@ -165,6 +165,7 @@ import { PPTApi } from '../../../api'
import TextCreateImg from '@/components/ai-kolors/index.vue'
import { toPng } from 'html-to-image' // 引入html-to-image库
+
const mainStore = useMainStore()
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
const { canUndo, canRedo } = storeToRefs(useSnapshotStore())
@@ -274,21 +275,30 @@ const toggleNotesPanel = () => {
// 插入素材
interface MaterialParams {
type: string,
- data: string
+ file: any
}
const insertMaterial = (item: MaterialParams) =>{
- const { type, data } = item
- if(type == 'video'){
- createVideoElement(data)
- }
- else{
- createImageElement(data)
- }
+ const { type, file } = item
+ PPTApi.toRousrceUrl(file).then(data=>{
+ if(type == 'video'){
+ createVideoElement(data)
+ }
+ else{
+ createImageElement(data)
+ }
+ })
materiaVisible.value = false
}
// 文生图
const imgVisible = ref(false)
+const insertImg = async (file: any) =>{
+ PPTApi.toRousrceUrl(file).then(data=>{
+ createImageElement(data)
+ imgVisible.value = false
+ })
+}
+