Compare commits
No commits in common. "f9efb76282eb405c7972a6fe6ee80cd5920b6b16" and "b4864bc109e7a78cffe79413115b21b316bfe71d" have entirely different histories.
f9efb76282
...
b4864bc109
|
@ -22,4 +22,4 @@ VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
|
|||
VITE_APP_WS_URL = 'wss://prev.ysaix.com:7868'
|
||||
|
||||
# 是否显示开发工具
|
||||
VITE_SHOW_DEV_TOOLS = 'false'
|
||||
VITE_SHOW_DEV_TOOLS = 'true'
|
||||
|
|
|
@ -7,14 +7,11 @@ import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
|||
import * as useStore from '../store' // pptist-状态管理
|
||||
import ChatWs from '@/plugins/socket' // 聊天socket
|
||||
import msgUtils from '@/plugins/modal' // 消息工具
|
||||
import * as Fullscreen from '../utils/fullscreen' // 全屏
|
||||
import useExecPlay from '../views/Screen/hooks/useExecPlay' // 播放控制
|
||||
|
||||
const slidesStore = useStore.useSlidesStore() // 幻灯片-状态管理
|
||||
const screenStore = useStore.useScreenStore() // 全屏-状态管理
|
||||
const classcourseStore = useStore.useClasscourseStore() // 课堂信息-状态管理
|
||||
const classcourse = sessionStore.get('curr.classcourse') // 课堂信息
|
||||
const execPlay = useExecPlay() // 播放控制
|
||||
|
||||
export class Classcourse {
|
||||
msgObj:ElMessageBox = null // 提示消息对象
|
||||
|
@ -30,9 +27,7 @@ export class Classcourse {
|
|||
load() {
|
||||
console.log('classcourse-load', classcourse)
|
||||
// 打开全屏
|
||||
const isCourse = !!classcourse
|
||||
if (isCourse) Fullscreen.enterFullscreen()
|
||||
screenStore.setScreening(isCourse)
|
||||
screenStore.setScreening(!!classcourse)
|
||||
// 如果课堂信息有值,则连接socket
|
||||
if (!!classcourse) {
|
||||
// 连接socket
|
||||
|
@ -41,15 +36,8 @@ export class Classcourse {
|
|||
this.classcourse = classcourse // 课堂信息
|
||||
this.id = classcourse.id // 课堂id
|
||||
// 如果课堂信息有paging,则更新当前页码
|
||||
const isPaging = !!classcourse.paging
|
||||
const isPaging = !!classcourse.paging||classcourse.paging==0
|
||||
if (isPaging) slidesStore.updateSlideIndex(classcourse.paging)
|
||||
// 如果课堂信息有paging,则更新动画播放状态
|
||||
const isAnim = !!classcourse.cartoonTimes
|
||||
if (isAnim) { // 动画播放
|
||||
for (let i = 0; i <= classcourse.cartoonTimes; i++) {
|
||||
execPlay.runAnimation(true) // 异步执行动画
|
||||
}
|
||||
}
|
||||
// 课堂信息-状态管理
|
||||
classcourseStore.setClasscourse(classcourse)
|
||||
// 待上课提示
|
||||
|
|
|
@ -55,28 +55,26 @@ export class PPTApi {
|
|||
// 变量
|
||||
static isUpdate = true // 是否更新数据
|
||||
|
||||
// 获取所有幻灯片列表 isUpdate为true不更新
|
||||
static getSlideList(parentid: (Number | String),isUpdate?:Boolean): Promise<Boolean> {
|
||||
// 获取所有幻灯片列表
|
||||
static getSlideList(parentid: (Number | String)): Promise<Boolean> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const params: object = { parentid, orderByColumn: 'fileidx', isAsc: 'asc', pageSize: 9999 }
|
||||
const res: Result = await API_entpcoursefile.listEntpcoursefileNew(params)
|
||||
if (res.code === 200) {
|
||||
if(!isUpdate){
|
||||
const slides = (res.rows || []).map(o => {
|
||||
if (!!o.datacontent) {
|
||||
const json = JSON.parse(o.datacontent)
|
||||
!!json && (json.id = o.id)
|
||||
return json
|
||||
}
|
||||
// 如果没有数据,默认空白页
|
||||
return {id: o.id,elements:[],background:{type:"solid",color:"#fff"}}
|
||||
})
|
||||
// slidesStore.updateSlideIndex(0) // 下标0 为第一页
|
||||
slidesStore.setSlides(slides) // 写入数据
|
||||
}
|
||||
const slides = (res.rows || []).map(o => {
|
||||
if (!!o.datacontent) {
|
||||
const json = JSON.parse(o.datacontent)
|
||||
!!json && (json.id = o.id)
|
||||
return json
|
||||
}
|
||||
// 如果没有数据,默认空白页
|
||||
return {id: o.id,elements:[],background:{type:"solid",color:"#fff"}}
|
||||
})
|
||||
// 活动列表处理
|
||||
const workList = (res.rows || []).map(o => o.activityContent)
|
||||
const workItem = res.rows ? [...res.rows] : []
|
||||
const workItem = [...res.rows]
|
||||
// slidesStore.updateSlideIndex(0) // 下标0 为第一页
|
||||
slidesStore.setSlides(slides) // 写入数据
|
||||
// 写入作业列表数据
|
||||
slidesStore.setWorkList(workList)
|
||||
// 获取所有的pptlist的数据
|
||||
|
@ -113,6 +111,7 @@ export class PPTApi {
|
|||
data.id = rid
|
||||
slidesStore.updateSlide(data)
|
||||
// msgUtils.msgSuccess('新增成功')
|
||||
PPTApi.getSlideList(resource.id)
|
||||
this.isUpdate = false // 新增后会触发监听,不再更新数据
|
||||
resolve(true)
|
||||
} else msgUtils.msgError('新增失败');resolve(false)
|
||||
|
@ -135,9 +134,7 @@ export class PPTApi {
|
|||
const isAdd = !/^\d+$/.test(currentSlide.id) // 是否新增
|
||||
if (isAdd) { // 新增的幻灯片(id 为非数字,说明是新增的幻灯片)
|
||||
const bool = await this.addSlide(currentSlide)
|
||||
bool && await this.batchUpdateSlides(newData, true) // 批量更新-排序
|
||||
const resource = sessionStore.get('curr.resource')||{}
|
||||
await PPTApi.getSlideList(resource.id)
|
||||
bool && this.batchUpdateSlides(newData, true) // 批量更新-排序
|
||||
} else { // 防抖-更新
|
||||
if (!this.isUpdate) return this.isUpdate = true // 下次更新数据
|
||||
const params = {
|
||||
|
|
|
@ -12,7 +12,6 @@ import Classcourse from './classcourse' // 课程相关
|
|||
import msgUtils from '@/plugins/modal' // 消息工具
|
||||
import { Homework } from './index' // api-作业相关
|
||||
import emitter from '@/utils/mitt' //mitt 事件总线
|
||||
import useExecPlay from '../views/Screen/hooks/useExecPlay' // 播放控制
|
||||
|
||||
/**
|
||||
* @description 监听器
|
||||
|
@ -22,7 +21,6 @@ export default () => {
|
|||
const classcourseStore = store.useClasscourseStore() // 课堂信息-状态管理
|
||||
const resource = sessionStore.get('curr.resource') // apt 资源
|
||||
const smarttalk = sessionStore.get('curr.smarttalk') // 备课资源
|
||||
const execPlay = useExecPlay() // 播放控制
|
||||
|
||||
// 监听幻灯片内容变化
|
||||
watch(() => slidesStore.slides, (newVal, oldVal) => {
|
||||
|
@ -84,11 +82,8 @@ export default () => {
|
|||
}
|
||||
break
|
||||
case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页
|
||||
const slideIndex = content?.current || 0
|
||||
const type = content?.animation
|
||||
if (type === 'Nextsteps') execPlay.execNext() // 下一步
|
||||
else if (type === 'Previoustep') execPlay.execPrev() // 上一步
|
||||
else slidesStore.updateSlideIndex(slideIndex) // 更新幻灯片下标
|
||||
const slideIndex = content.current
|
||||
slidesStore.updateSlideIndex(slideIndex) // 更新幻灯片下标
|
||||
break
|
||||
case MsgEnum.HEADS.MSG_homework: // 作业|活动-布置
|
||||
if (!content.classWorkId) return
|
||||
|
|
|
@ -145,16 +145,21 @@ export const useSlidesStore = defineStore('slides', {
|
|||
setWorkItem(list: Object[]) {
|
||||
this.workItem = list
|
||||
},
|
||||
addWorkItem(data: any) {
|
||||
const id = data?.id
|
||||
if (!id) return
|
||||
this.workItem.splice(this.slideIndex + 1, 0, data)
|
||||
this.slideIndex += 1
|
||||
},
|
||||
|
||||
addSlide(slide: Slide | Slide[]) {
|
||||
const slides = Array.isArray(slide) ? slide : [slide]
|
||||
for (const slide of slides) {
|
||||
if (slide.sectionTag) delete slide.sectionTag
|
||||
}
|
||||
// const addIndex = this.slideIndex + 1
|
||||
this.slides.splice(this.slideIndex, 0, ...slides)
|
||||
// this.slideIndex = addIndex
|
||||
},
|
||||
|
||||
updateSlide(props: Partial<Slide>, slideId?: string) {
|
||||
const slideIndex = slideId ? this.slides.findIndex(item => item.id === slideId) : this.slideIndex
|
||||
this.slides[slideIndex] = { ...this.slides[slideIndex], ...props }
|
||||
|
|
|
@ -168,10 +168,6 @@ const type = ref<WorkType[]>([
|
|||
label: '常规作业',
|
||||
value: 'primary'
|
||||
},
|
||||
{
|
||||
label: '框架梳理',
|
||||
value: 'primary'
|
||||
}
|
||||
])
|
||||
|
||||
const objItem = ref<any>({})
|
||||
|
@ -306,9 +302,9 @@ const getData = async (data: WorkItem) => {
|
|||
dialogVisible.value = false
|
||||
}
|
||||
const upDateData = async () => {
|
||||
// await PPTApi.updateSlide(paramData.value)
|
||||
loadingActive.value = true
|
||||
await PPTApi.updateSlide(paramData.value)
|
||||
// await updateEntpcoursefileNew(paramData.value)
|
||||
await updateEntpcoursefileNew(paramData.value)
|
||||
const resource = sessionStore.get('curr.resource')
|
||||
await PPTApi.getSlideList(resource.id)
|
||||
const res = await homeworklist({ ids: paramData.value.activityContent, pageSize: 100 })
|
||||
|
|
|
@ -19,10 +19,10 @@ export default () => {
|
|||
// 最小已播放页面索引
|
||||
const playedSlidesMinIndex = ref(slideIndex.value)
|
||||
|
||||
// 执行元素动画 isAsync 为 true 时,异步执行,否则同步执行
|
||||
const runAnimation = (isAsync: boolean) => {
|
||||
// 执行元素动画
|
||||
const runAnimation = () => {
|
||||
// 正在执行动画时,禁止其他新的动画开始
|
||||
if (inAnimation.value && !isAsync) return
|
||||
if (inAnimation.value) return
|
||||
|
||||
const { animations, autoNext } = formatedAnimations.value[animationIndex.value]
|
||||
animationIndex.value += 1
|
||||
|
@ -174,7 +174,6 @@ export default () => {
|
|||
|
||||
// 鼠标滚动翻页
|
||||
const mousewheelListener = throttle(function(e: WheelEvent) {
|
||||
e.preventDefault() // 阻止默认事件
|
||||
if (e.deltaY < 0) execPrev()
|
||||
else if (e.deltaY > 0) execNext()
|
||||
}, 500, { leading: true, trailing: false })
|
||||
|
@ -183,20 +182,20 @@ export default () => {
|
|||
const touchInfo = ref<{ x: number; y: number; } | null>(null)
|
||||
|
||||
const touchStartListener = (e: TouchEvent) => {
|
||||
e.preventDefault() // 阻止默认事件
|
||||
touchInfo.value = {
|
||||
// x: e.changedTouches[0].pageX,
|
||||
// y: e.changedTouches[0].pageY,
|
||||
x: e.changedTouches[0].clientX,
|
||||
y: e.changedTouches[0].clientY,
|
||||
x: e.changedTouches[0].pageX,
|
||||
y: e.changedTouches[0].pageY,
|
||||
}
|
||||
}
|
||||
const touchEndListener = (e: TouchEvent) => {
|
||||
if (!touchInfo.value) return
|
||||
const offsetX = Math.abs(touchInfo.value.x - e.changedTouches[0].clientX)
|
||||
const offsetY = e.changedTouches[0].clientY - touchInfo.value.y
|
||||
|
||||
const offsetX = Math.abs(touchInfo.value.x - e.changedTouches[0].pageX)
|
||||
const offsetY = e.changedTouches[0].pageY - touchInfo.value.y
|
||||
|
||||
if ( Math.abs(offsetY) > offsetX && Math.abs(offsetY) > 50 ) {
|
||||
touchInfo.value = null
|
||||
|
||||
if (offsetY > 0) execPrev()
|
||||
else execNext()
|
||||
}
|
||||
|
@ -204,7 +203,6 @@ export default () => {
|
|||
|
||||
// 快捷键翻页
|
||||
const keydownListener = (e: KeyboardEvent) => {
|
||||
e.preventDefault() // 阻止默认事件
|
||||
const key = e.key.toUpperCase()
|
||||
|
||||
if (key === KEYS.UP || key === KEYS.LEFT || key === KEYS.PAGEUP) execPrev()
|
||||
|
|
|
@ -71,11 +71,3 @@ export const addFileToKj = (id) => {
|
|||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export const getModelInfo = (params) => {
|
||||
return request({
|
||||
url: '/education/llmModel/getModelInfo',
|
||||
method: 'post',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
|
|
@ -91,12 +91,10 @@ import keywordDialog from './keyword-dialog.vue';
|
|||
import AdjustDialog from './adjust-dialog.vue'
|
||||
import EditDialog from './edit-dialog.vue'
|
||||
import TypingEffect from '@/components/typing-effect/index.vue'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import emitter from '@/utils/mitt';
|
||||
import { dataSetJson } from '@/utils/comm.js'
|
||||
|
||||
const props = defineProps(['curNode', 'type'])
|
||||
const { user } = useUserStore()
|
||||
|
||||
/*****************提示词相关****************/
|
||||
|
||||
|
@ -139,7 +137,7 @@ const curTemplate = reactive({ name: '', id: '' })
|
|||
const templateList = ref([])
|
||||
const childTempList = ref([])
|
||||
const getTemplateList = () => {
|
||||
modelList({ createUser: user.userId, model: props.type, type: 1, pageNum: 1, pageSize: 10000, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => {
|
||||
modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => {
|
||||
templateList.value = res.rows
|
||||
if(res.rows.length > 0){
|
||||
Object.assign(curTemplate, res.rows[0]);
|
||||
|
@ -163,7 +161,7 @@ const isStarted = ref([]);
|
|||
const listRef = ref()
|
||||
// 查询模板结果
|
||||
const getTempResult = () => {
|
||||
tempResult({ mainModelId: curTemplate.id, pageNum: 1, pageSize: 10000, ex1: curNode.id }).then(res => {
|
||||
tempResult({ mainModelId: curTemplate.id, pageNum: 1, pageSize: 10000 }).then(res => {
|
||||
let rows = res.rows
|
||||
childTempList.value.forEach(item => {
|
||||
rows.forEach(el => {
|
||||
|
@ -311,7 +309,7 @@ const againResult = async (index, item) => {
|
|||
await nextTick()
|
||||
childTempList.value[index].loading = true
|
||||
item.aiShow = true
|
||||
params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||
params.prompt = `按照${item.name}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||
const { data } = await completion(params)
|
||||
childTempList.value[index].answer = getResult(data.answer);
|
||||
isStarted.value[index] = true
|
||||
|
@ -335,7 +333,7 @@ const getCompletion = async () => {
|
|||
try {
|
||||
item.loading = true
|
||||
item.aiShow = true
|
||||
params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||
params.prompt = `按照${item.name}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||
const { data } = await completion(params)
|
||||
item.answer = getResult(data.answer)
|
||||
onSaveTemp(item)
|
||||
|
@ -379,8 +377,7 @@ const onSaveTemp = (item) => {
|
|||
mainModelId: curTemplate.id,
|
||||
modelId: item.id,
|
||||
examDocld: '',
|
||||
content: item.answer,
|
||||
ex1: curNode.id
|
||||
content: item.answer
|
||||
}
|
||||
tempSave(data).then(res => { })
|
||||
}
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
<el-popover ref="popoverRef" placement="right" trigger="hover" popper-class="popoverStyle" :tabindex="999" >
|
||||
<template #reference>
|
||||
<div class="user-info">
|
||||
<el-image class="user-img" :src="userStore.user.avatar ==='/img/avatar-default.jpg' ? defaultUserImg : dev_api + userStore.user.avatar" />
|
||||
<el-image class="user-img" :src="dev_api + userStore.user.avatar" />
|
||||
<span>{{ userStore.user.nickName }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="head-aside">
|
||||
<ul >
|
||||
<li v-if="isStadium() !== true" :class="computedregistertype==1 || computedregistertype==3?'auth-li':'auth-li pointer-events'" @click="onUserTo('/schoolCertification')" >
|
||||
<li v-if="!isStadium" :class="computedregistertype==1 || computedregistertype==3?'auth-li':'auth-li pointer-events'" @click="onUserTo('/schoolCertification')" >
|
||||
<i class="iconfont icon-renzheng-" :style="computedregistertype==4?'color:green;':''"></i>
|
||||
<span class="mlr-5" v-if="computedregistertype!=4">学校认证</span>
|
||||
<span class="mlr-5" v-else>{{ userStore.DeptInfo.register.schoolName }}</span>
|
||||
|
@ -19,8 +19,8 @@
|
|||
</li>
|
||||
<li v-if="computedregistertype!=4" :class="computedregistertype==1 || computedregistertype==2 ? '':'pointer-events'" @click="onUserTo('/joinSchool')">加入学校</li>
|
||||
<li @click="onUserTo('/profile')">个人中心</li>
|
||||
<li v-if="isStadium() !== true" @click="onUserTo('/schoolManagement')">学校管理</li>
|
||||
<li v-if="isStadium() !== true" @click="onUserTo('/class')">班级中心</li>
|
||||
<li v-if="!isStadium" @click="onUserTo('/schoolManagement')">学校管理</li>
|
||||
<li v-if="!isStadium" @click="onUserTo('/class')">班级中心</li>
|
||||
<li @click="logout">退出登录</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -59,7 +59,6 @@ import { ElMessageBox, ElMessage } from 'element-plus'
|
|||
import useUserStore from '@/store/modules/user'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
import pkc from "../../../../../package.json"
|
||||
import defaultUserImg from '@/assets/images/img-avatar.png'
|
||||
|
||||
|
||||
const { ipcRenderer } = window.electron || {}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<el-icon class="item-icon"><Flag /></el-icon>
|
||||
<div class="content-header-title">{{item.name}}</div>
|
||||
<div class="content-header-body">
|
||||
<div class="content-header-num">{{item.num}}</div>
|
||||
<div class="content-header-num">6</div>
|
||||
<div class="content-header-text">分析结果</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -83,7 +83,7 @@ import useUserStore from '@/store/modules/user' // 用户信息
|
|||
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||
import KjListItem from '@/views/prepare/container/kj-list-item.vue'
|
||||
import FileImage from '@/components/file-image/index.vue'
|
||||
import {creatAPT, getSmarttalkPage, getModelInfo} from '@/api/file'
|
||||
import {creatAPT, getSmarttalkPage} from '@/api/file'
|
||||
import {ArrowDown, Flag, Position} from '@element-plus/icons-vue'
|
||||
import {asyncLocalFile, parseCataByNode} from "@/utils/talkFile";
|
||||
import { dataSetJson } from '@/utils/comm' // 数据集id文生图
|
||||
|
@ -165,6 +165,9 @@ const uploadData = ref({
|
|||
fileRoot: '备课'
|
||||
})
|
||||
const currentFileList = ref([])
|
||||
// 页面加载
|
||||
onMounted(() => {
|
||||
})
|
||||
|
||||
const gotoRoute = (item) => {
|
||||
if (item.path) {
|
||||
|
@ -389,35 +392,6 @@ const changeBook = async(data) => {
|
|||
uploadData.value.levelSecondId = cata[1]
|
||||
uploadData.value.levelThirdId = cata[2]
|
||||
uploadData.value.textbookId = data.textBook.curBookId
|
||||
getModelInfo({cataid: currentNode.value.id}).then(res=>{
|
||||
console.log(res)
|
||||
if (res&&res.data) {
|
||||
tags.filter(item=>{
|
||||
switch (item.name) {
|
||||
case '课标分析':
|
||||
item.num = res.data.kbs
|
||||
break;
|
||||
case '教材分析':
|
||||
item.num = res.data.jcs
|
||||
break;
|
||||
case '考试分析':
|
||||
item.num = res.data.kss
|
||||
break;
|
||||
case '素材设计':
|
||||
item.num = res.data.scs
|
||||
break;
|
||||
case '作业设计':
|
||||
item.num = res.data.zys
|
||||
break;
|
||||
case '框架设计':
|
||||
item.num = res.data.kjs
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
getSmarttalkPage({
|
||||
...uploadData.value,
|
||||
orderByColumn: 'createTime',
|
||||
|
@ -495,11 +469,6 @@ const changeClass = async (type, row, other) => {
|
|||
break
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载
|
||||
onMounted(() => {
|
||||
})
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.model-wrap{
|
||||
|
|
|
@ -1131,7 +1131,6 @@ export default {
|
|||
position: absolute;
|
||||
right: 10px;
|
||||
top: 4px;
|
||||
z-index: 10;
|
||||
}
|
||||
.prepare-center-jxkj{
|
||||
height: 100%;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<!-- 裁剪+效果 -->
|
||||
<div class="box">
|
||||
<div class="box_1">
|
||||
<img :src="filePath" ref="image" />
|
||||
<img :src="dev_api + filePath" ref="image" />
|
||||
</div>
|
||||
|
||||
<!--裁剪完的图片-->
|
||||
|
@ -164,7 +164,7 @@ export default {
|
|||
// 页面刷新自动执行
|
||||
onMounted(() => {
|
||||
if (props.filePath) {
|
||||
dataFile.image.src = props.filePath;
|
||||
dataFile.image.src = dev_api.value + props.filePath;
|
||||
copper();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<userAvatar />
|
||||
<div class="info">
|
||||
<div class="info-name">{{ state.user.nickName }}</div>
|
||||
<div class="infomation" v-if="isStadium() !== true" >
|
||||
<div class="infomation">
|
||||
<selectClass v-if="!isSubject"/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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,12 +46,6 @@ 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) => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="user-info-head" @click="editCropper()">
|
||||
<img :src="options.img" title="点击上传头像" class="img-circle img-lg" />
|
||||
<img :src="dev_api + options.img" title="点击上传头像" class="img-circle img-lg" />
|
||||
<el-dialog
|
||||
v-model="open"
|
||||
append-to-body
|
||||
|
@ -23,7 +23,6 @@ import { uploadAvatar } from '@/api/system/user'
|
|||
import useUserStore from '@/store/modules/user'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import CropperImage from './cropperImage.vue'
|
||||
import defaultUserImg from '@/assets/images/img-avatar.png'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
|
@ -33,7 +32,7 @@ const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
|
|||
|
||||
//图片裁剪数据
|
||||
const options = reactive({
|
||||
img: userStore.user.avatar ==='/img/avatar-default.jpg' ? defaultUserImg : dev_api.value + userStore.user.avatar, // 裁剪图片的地址
|
||||
img: userStore.user.avatar, // 裁剪图片的地址
|
||||
autoCrop: true, // 是否默认生成截图框
|
||||
autoCropWidth: 400, // 默认生成截图框宽度
|
||||
autoCropHeight: 400, // 默认生成截图框高度
|
||||
|
@ -41,6 +40,7 @@ const options = reactive({
|
|||
outputType: 'png', // 默认生成截图为PNG格式
|
||||
previews: {} //预览数据
|
||||
})
|
||||
|
||||
const cropper = ref(null)
|
||||
|
||||
/** 编辑头像 */
|
||||
|
@ -69,7 +69,7 @@ function uploadImg(data) {
|
|||
|
||||
/** 关闭窗口 */
|
||||
function closeDialog() {
|
||||
options.img = userStore.user.avatar ==='/img/avatar-default.jpg' ? defaultUserImg : dev_api.value + userStore.user.avatar
|
||||
options.img = userStore.user.avatar
|
||||
options.visible = false
|
||||
}
|
||||
const cancle = () => {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="所属学校" prop="identity">
|
||||
<div style="display: flex;">
|
||||
<div>{{ userStore.DeptInfo.register ? userStore.DeptInfo.register.schoolName : '' }}</div>
|
||||
<div>{{ userStore.DeptInfo.register.schoolName }}</div>
|
||||
<div>
|
||||
<el-button type="primary" link>更改学校</el-button>
|
||||
</div>
|
||||
|
|
|
@ -346,7 +346,7 @@ const toRousrceUrl = async(o) => {
|
|||
if (o?.background?.image) await toRousrceUrl(o.background.image)
|
||||
if(o?.elements){
|
||||
for (let element of o.elements) {
|
||||
await toRousrceUrl(element);
|
||||
await this.toRousrceUrl(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue