Compare commits
10 Commits
b4864bc109
...
15b9f38810
Author | SHA1 | Date |
---|---|---|
yangws | 15b9f38810 | |
小杨 | a34883abbb | |
小杨 | 8f8016cb0b | |
lyc | e43573bae2 | |
lyc | 83d885bcbe | |
lyc | b5669a97f1 | |
lyc | be2afadd43 | |
朱浩 | a62dde1b93 | |
朱浩 | 82548ce937 | |
朱浩 | aa3be39721 |
|
@ -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 = 'true'
|
||||
VITE_SHOW_DEV_TOOLS = 'false'
|
||||
|
|
|
@ -55,12 +55,13 @@ export class PPTApi {
|
|||
// 变量
|
||||
static isUpdate = true // 是否更新数据
|
||||
|
||||
// 获取所有幻灯片列表
|
||||
static getSlideList(parentid: (Number | String)): Promise<Boolean> {
|
||||
// 获取所有幻灯片列表 isUpdate为true不更新
|
||||
static getSlideList(parentid: (Number | String),isUpdate?:Boolean): 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)
|
||||
|
@ -70,11 +71,12 @@ export class PPTApi {
|
|||
// 如果没有数据,默认空白页
|
||||
return {id: o.id,elements:[],background:{type:"solid",color:"#fff"}}
|
||||
})
|
||||
// 活动列表处理
|
||||
const workList = (res.rows || []).map(o => o.activityContent)
|
||||
const workItem = [...res.rows]
|
||||
// slidesStore.updateSlideIndex(0) // 下标0 为第一页
|
||||
slidesStore.setSlides(slides) // 写入数据
|
||||
}
|
||||
// 活动列表处理
|
||||
const workList = (res.rows || []).map(o => o.activityContent)
|
||||
const workItem = res.rows ? [...res.rows] : []
|
||||
// 写入作业列表数据
|
||||
slidesStore.setWorkList(workList)
|
||||
// 获取所有的pptlist的数据
|
||||
|
@ -111,7 +113,6 @@ 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)
|
||||
|
@ -134,7 +135,9 @@ export class PPTApi {
|
|||
const isAdd = !/^\d+$/.test(currentSlide.id) // 是否新增
|
||||
if (isAdd) { // 新增的幻灯片(id 为非数字,说明是新增的幻灯片)
|
||||
const bool = await this.addSlide(currentSlide)
|
||||
bool && this.batchUpdateSlides(newData, true) // 批量更新-排序
|
||||
bool && await this.batchUpdateSlides(newData, true) // 批量更新-排序
|
||||
const resource = sessionStore.get('curr.resource')||{}
|
||||
await PPTApi.getSlideList(resource.id)
|
||||
} else { // 防抖-更新
|
||||
if (!this.isUpdate) return this.isUpdate = true // 下次更新数据
|
||||
const params = {
|
||||
|
|
|
@ -145,21 +145,16 @@ 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 }
|
||||
|
|
|
@ -302,9 +302,9 @@ const getData = async (data: WorkItem) => {
|
|||
dialogVisible.value = false
|
||||
}
|
||||
const upDateData = async () => {
|
||||
// await PPTApi.updateSlide(paramData.value)
|
||||
loadingActive.value = true
|
||||
await updateEntpcoursefileNew(paramData.value)
|
||||
await PPTApi.updateSlide(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 })
|
||||
|
|
|
@ -91,10 +91,12 @@ 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()
|
||||
|
||||
/*****************提示词相关****************/
|
||||
|
||||
|
@ -137,7 +139,7 @@ const curTemplate = reactive({ name: '', id: '' })
|
|||
const templateList = ref([])
|
||||
const childTempList = ref([])
|
||||
const getTemplateList = () => {
|
||||
modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => {
|
||||
modelList({ createUser: user.userId, 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]);
|
||||
|
@ -161,7 +163,7 @@ const isStarted = ref([]);
|
|||
const listRef = ref()
|
||||
// 查询模板结果
|
||||
const getTempResult = () => {
|
||||
tempResult({ mainModelId: curTemplate.id, pageNum: 1, pageSize: 10000 }).then(res => {
|
||||
tempResult({ mainModelId: curTemplate.id, pageNum: 1, pageSize: 10000, ex1: curNode.id }).then(res => {
|
||||
let rows = res.rows
|
||||
childTempList.value.forEach(item => {
|
||||
rows.forEach(el => {
|
||||
|
@ -309,7 +311,7 @@ const againResult = async (index, item) => {
|
|||
await nextTick()
|
||||
childTempList.value[index].loading = true
|
||||
item.aiShow = true
|
||||
params.prompt = `按照${item.name}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||
params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||
const { data } = await completion(params)
|
||||
childTempList.value[index].answer = getResult(data.answer);
|
||||
isStarted.value[index] = true
|
||||
|
@ -333,7 +335,7 @@ const getCompletion = async () => {
|
|||
try {
|
||||
item.loading = true
|
||||
item.aiShow = true
|
||||
params.prompt = `按照${item.name}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||
params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||
const { data } = await completion(params)
|
||||
item.answer = getResult(data.answer)
|
||||
onSaveTemp(item)
|
||||
|
@ -377,7 +379,8 @@ const onSaveTemp = (item) => {
|
|||
mainModelId: curTemplate.id,
|
||||
modelId: item.id,
|
||||
examDocld: '',
|
||||
content: item.answer
|
||||
content: item.answer,
|
||||
ex1: curNode.id
|
||||
}
|
||||
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="dev_api + userStore.user.avatar" />
|
||||
<el-image class="user-img" :src="userStore.user.avatar ==='/img/avatar-default.jpg' ? defaultUserImg : dev_api + userStore.user.avatar" />
|
||||
<span>{{ userStore.user.nickName }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="head-aside">
|
||||
<ul >
|
||||
<li v-if="!isStadium" :class="computedregistertype==1 || computedregistertype==3?'auth-li':'auth-li pointer-events'" @click="onUserTo('/schoolCertification')" >
|
||||
<li v-if="isStadium() !== true" :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" @click="onUserTo('/schoolManagement')">学校管理</li>
|
||||
<li v-if="!isStadium" @click="onUserTo('/class')">班级中心</li>
|
||||
<li v-if="isStadium() !== true" @click="onUserTo('/schoolManagement')">学校管理</li>
|
||||
<li v-if="isStadium() !== true" @click="onUserTo('/class')">班级中心</li>
|
||||
<li @click="logout">退出登录</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -59,6 +59,7 @@ 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 || {}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<!-- 裁剪+效果 -->
|
||||
<div class="box">
|
||||
<div class="box_1">
|
||||
<img :src="dev_api + filePath" ref="image" />
|
||||
<img :src="filePath" ref="image" />
|
||||
</div>
|
||||
|
||||
<!--裁剪完的图片-->
|
||||
|
@ -164,7 +164,7 @@ export default {
|
|||
// 页面刷新自动执行
|
||||
onMounted(() => {
|
||||
if (props.filePath) {
|
||||
dataFile.image.src = dev_api.value + props.filePath;
|
||||
dataFile.image.src = props.filePath;
|
||||
copper();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<userAvatar />
|
||||
<div class="info">
|
||||
<div class="info-name">{{ state.user.nickName }}</div>
|
||||
<div class="infomation">
|
||||
<div class="infomation" v-if="isStadium() !== true" >
|
||||
<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,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) => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="user-info-head" @click="editCropper()">
|
||||
<img :src="dev_api + options.img" title="点击上传头像" class="img-circle img-lg" />
|
||||
<img :src="options.img" title="点击上传头像" class="img-circle img-lg" />
|
||||
<el-dialog
|
||||
v-model="open"
|
||||
append-to-body
|
||||
|
@ -23,6 +23,7 @@ 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()
|
||||
|
||||
|
@ -32,7 +33,7 @@ const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
|
|||
|
||||
//图片裁剪数据
|
||||
const options = reactive({
|
||||
img: userStore.user.avatar, // 裁剪图片的地址
|
||||
img: userStore.user.avatar ==='/img/avatar-default.jpg' ? defaultUserImg : dev_api + userStore.user.avatar, // 裁剪图片的地址
|
||||
autoCrop: true, // 是否默认生成截图框
|
||||
autoCropWidth: 400, // 默认生成截图框宽度
|
||||
autoCropHeight: 400, // 默认生成截图框高度
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="所属学校" prop="identity">
|
||||
<div style="display: flex;">
|
||||
<div>{{ userStore.DeptInfo.register.schoolName }}</div>
|
||||
<div>{{ userStore.DeptInfo.register ? userStore.DeptInfo.register.schoolName : '' }}</div>
|
||||
<div>
|
||||
<el-button type="primary" link>更改学校</el-button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue