Merge pull request '[教学实践] - 作业中增加作业设计及单任务编辑' (#300) from zouyf_dev into main

Reviewed-on: #300
This commit is contained in:
zouyf 2024-10-09 16:19:26 +08:00
commit 9c21458c57
5 changed files with 51 additions and 17 deletions

View File

@ -183,10 +183,10 @@ const clickMenu = ({isOuter, path, disabled, id}) =>{
// ID
const { id, rootid } = sessionStore.get('subject.curNode')
if(fullPath.indexOf('?') == -1){
fullPath += `?unitId=${id}&bookeId=${rootid}`
fullPath += `?unitId=${id}&bookId=${rootid}`
}
else{
fullPath += `&unitId=${id}&bookeId=${rootid}`
fullPath += `&unitId=${id}&bookId=${rootid}`
}
}
fullPath = fullPath.replaceAll('//', '/')

View File

@ -86,10 +86,16 @@
<span>布置</span>
</el-button>
</div>
<div class="item-popover-item">
<el-button text @click="reSetHomeWork(item, index)">
<i class="iconfont icon-bianji"></i>
<span>编辑</span>
</el-button>
</div>
<div class="item-popover-item">
<el-button text @click="deleteHomework(item)">
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
<span style="color: red;">删除</span>
</el-button>
</div>
</template>
@ -110,7 +116,7 @@
<div class="item-popover-item" v-if="userInfo.userId === Number(item.createUserId)">
<el-button text @click="deleteTalk(item)">
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
<span style="color: red;">删除</span>
</el-button>
</div>
<div class="item-popover-item">
@ -168,7 +174,7 @@ export default {
}
}
},
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-reSet': null, 'on-delhomework': null,'on-filearg': null },
data() {
return {
listenList: [],
@ -275,6 +281,10 @@ export default {
setHomeWork(item) {
this.$emit('on-set', item)
},
//
reSetHomeWork(item) {
this.$emit('on-reSet', item)
},
//
deleteHomework(item){
this.$emit('on-delhomework', item)

View File

@ -76,7 +76,7 @@
<div class="item-popover-item">
<el-button text @click="deleteTalk(item)">
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
<span style="color: red;">删除</span>
</el-button>
</div>
</template>

View File

@ -116,22 +116,20 @@
</el-checkbox-group>
</el-tab-pane>
<el-tab-pane label="作业" name="作业">
<!-- <div class="prepare-body-header">
<div class="prepare-body-header">
<div>
<label style="font-size: 15px">{{ currentWorkList.length }}个作业</label>&nbsp;
<el-button size="small" @click="handleOutLink('feedback')">作业反馈</el-button>
<el-button size="small" @click="handleOutLink('homeWork')">布置作业</el-button>
<el-button size="small" @click="handleOutLink('homeWork')">作业设计</el-button>
</div>
</div>-->
</div>
<div class="prepare-work-wrap">
<file-list-item
v-for="(item, index) in currentWorkList"
:key="index"
:item="item"
:index="index"
@on-move="onMoveSingleFile"
@on-delete="deleteTalk"
@on-set="openSet"
@on-reSet="openReSet"
@on-delhomework="delhomework"
>
</file-list-item>
@ -596,6 +594,7 @@ export default {
openReserv() {
this.$refs['reservDialog'].openDialog()
},
//
handleOutLink(key) {
if (key == 'homeWork') {
@ -609,12 +608,15 @@ export default {
let unitId = this.uploadData.levelSecondId
? this.uploadData.levelSecondId
: this.uploadData.levelFirstId
if (key == 'gk') {
fullPath += `?unitId=${unitId}`
} else {
fullPath += `&unitId=${unitId}`
let bookId = this.uploadData.textbookId;
if(fullPath.indexOf('?') == -1){
fullPath += `?unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
}
else{
fullPath += `&unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
}
}
//
ipcRenderer.send('openWindow', {
key,
@ -632,6 +634,27 @@ export default {
this.row = row
this.setDialog = true
},
//
openReSet(row) {
//
this.isOpenHomework = true;
// key linkConfig.js
let configObj = outLink()['homeWork']
let fullPath = configObj.fullPath
let unitId = this.uploadData.levelSecondId
? this.uploadData.levelSecondId
: this.uploadData.levelFirstId
let bookId = this.uploadData.textbookId;
fullPath += `&unitId=${unitId}&bookId=${bookId}&courseWorkId=${row.id}`
//
ipcRenderer.send('openWindow', {
key: 'homeWork',
fullPath: fullPath,
cookieData: { ...configObj.data }
})
},
//
delhomework(item) {
this.isLoading = true
@ -874,6 +897,7 @@ export default {
width: 100%;
flex: 1;
overflow: auto;
margin-top: 10px;
}
.prepare-body-main {
flex: 1;

View File

@ -61,7 +61,7 @@
@click="delRow(item)"
>
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
<span style="color: red;">删除</span>
</div>
<div class="item-popover-item" @click="downloadFile(item)">
<i class="iconfont icon-xiazai"></i>