Compare commits

..

No commits in common. "f60fdbafa0222d09fdc7a661f32746c3791ed973" and "67320f897e58ed37250a2b474efff661f095f846" have entirely different histories.

1 changed files with 3 additions and 10 deletions

View File

@ -94,14 +94,13 @@
</div> </div>
</template> </template>
<template v-else> <template v-else>
<!-- 判断是不是自己创建的课件--> <div class="item-popover-item">
<div class="item-popover-item" v-if="userInfo.userId === Number(item.createUserId)">
<el-button text @click="editTalk(item, index)"> <el-button text @click="editTalk(item, index)">
<i class="iconfont icon-bianji"></i> <i class="iconfont icon-bianji"></i>
<span>重命名</span> <span>重命名</span>
</el-button> </el-button>
</div> </div>
<div class="item-popover-item" v-if="userInfo.userId === Number(item.createUserId)"> <div class="item-popover-item">
<el-button text @click="deleteTalk(item)"> <el-button text @click="deleteTalk(item)">
<i class="iconfont icon-shanchu"></i> <i class="iconfont icon-shanchu"></i>
<span>删除</span> <span>删除</span>
@ -141,7 +140,6 @@ import { asyncLocalFile } from '@/utils/talkFile'
import { toTimeText } from '@/utils/date' import { toTimeText } from '@/utils/date'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file' import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file'
import useUserStore from '@/store/modules/user'
const { ipcRenderer } = window.electron || {} const { ipcRenderer } = window.electron || {}
export default { export default {
@ -164,13 +162,11 @@ export default {
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null }, emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null },
data() { data() {
return { return {
listenList: [], listenList: []
userInfo:{}
} }
}, },
methods: { methods: {
editTalk(item) { editTalk(item) {
console.log(item,this.userInfo,'this.userInfo')
ElMessageBox.prompt('请输入新的名称', '重命名', { ElMessageBox.prompt('请输入新的名称', '重命名', {
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -257,9 +253,6 @@ export default {
deleteHomework(item){ deleteHomework(item){
this.$emit('on-delhomework', item) this.$emit('on-delhomework', item)
} }
},
mounted() {
this.userInfo = useUserStore().user
} }
} }
</script> </script>