Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into zdg_dev
This commit is contained in:
commit
9ef4812acb
|
@ -1,17 +1,26 @@
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
export interface ScreenState {
|
export interface ScreenState {
|
||||||
screening: boolean
|
screening: boolean,
|
||||||
|
like: number,
|
||||||
|
doubt: number,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useScreenStore = defineStore('screen', {
|
export const useScreenStore = defineStore('screen', {
|
||||||
state: (): ScreenState => ({
|
state: (): ScreenState => ({
|
||||||
screening: false, // 是否进入放映状态
|
screening: false, // 是否进入放映状态
|
||||||
|
like:0, // 点赞数量
|
||||||
|
doubt:0, // 疑问数量
|
||||||
}),
|
}),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
setScreening(screening: boolean) {
|
setScreening(screening: boolean) {
|
||||||
this.screening = screening
|
this.screening = screening
|
||||||
},
|
},
|
||||||
|
// 打开点赞或疑问
|
||||||
|
openUpvote(type: 'like' | 'doubt'){
|
||||||
|
if (type === 'like') this.like++
|
||||||
|
else this.doubt++
|
||||||
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
|
@ -58,9 +58,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue'
|
import { ref , watchEffect} from 'vue'
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import { useSlidesStore } from '../../store'
|
import { useSlidesStore ,useScreenStore} from '../../store'
|
||||||
import type { ContextmenuItem } from '../../components/Contextmenu/types'
|
import type { ContextmenuItem } from '../../components/Contextmenu/types'
|
||||||
import { enterFullscreen } from '../../utils/fullscreen'
|
import { enterFullscreen } from '../../utils/fullscreen'
|
||||||
import useScreening from '../../hooks/useScreening'
|
import useScreening from '../../hooks/useScreening'
|
||||||
|
@ -108,7 +108,8 @@ const writingBoardToolVisible = ref(false)
|
||||||
const timerlVisible = ref(false)
|
const timerlVisible = ref(false)
|
||||||
const slideThumbnailModelVisible = ref(false)
|
const slideThumbnailModelVisible = ref(false)
|
||||||
const laserPen = ref(false)
|
const laserPen = ref(false)
|
||||||
|
const upvoteRef = ref(null)
|
||||||
|
const screenStore =useScreenStore()
|
||||||
const contextmenus = (): ContextmenuItem[] => {
|
const contextmenus = (): ContextmenuItem[] => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
@ -190,6 +191,14 @@ const contextmenus = (): ContextmenuItem[] => {
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
const likeCont = screenStore.like // 点赞
|
||||||
|
const doubtCount = screenStore.doubt // 疑问
|
||||||
|
if (likeCont > 0) upvoteRef.value?.trigger?.(1)
|
||||||
|
if (doubtCount > 0) upvoteRef.value?.trigger?.(2)
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -419,7 +419,7 @@ export default {
|
||||||
} else { // 列表-下课
|
} else { // 列表-下课
|
||||||
other.loading.value = false
|
other.loading.value = false
|
||||||
row.status = isApt ? head : '已结束'
|
row.status = isApt ? head : '已结束'
|
||||||
}
|
}
|
||||||
ElMessage({ type: 'success', message: `下课成功!` })
|
ElMessage({ type: 'success', message: `下课成功!` })
|
||||||
}, 1000)
|
}, 1000)
|
||||||
break
|
break
|
||||||
|
@ -604,8 +604,6 @@ export default {
|
||||||
// 设置进度条
|
// 设置进度条
|
||||||
this.pgDialog.pg.percentage = Math.floor(completed / total * 100)
|
this.pgDialog.pg.percentage = Math.floor(completed / total * 100)
|
||||||
}
|
}
|
||||||
console.log('结束', slides)
|
|
||||||
return
|
|
||||||
this.pgDialog.pg.percentage = 0
|
this.pgDialog.pg.percentage = 0
|
||||||
this.pgDialog.visible = false
|
this.pgDialog.visible = false
|
||||||
listEntpcourse({
|
listEntpcourse({
|
||||||
|
@ -642,8 +640,6 @@ export default {
|
||||||
}).then(async (res) => {
|
}).then(async (res) => {
|
||||||
|
|
||||||
const resSlides = slides.map(({id, ...slide}) => JSON.stringify(slide))
|
const resSlides = slides.map(({id, ...slide}) => JSON.stringify(slide))
|
||||||
console.log(resSlides)
|
|
||||||
return
|
|
||||||
let params = {
|
let params = {
|
||||||
parentid: slideid,
|
parentid: slideid,
|
||||||
entpid: resCourse.entpid,
|
entpid: resCourse.entpid,
|
||||||
|
|
Loading…
Reference in New Issue