[教学实践] - 作业中增加作业设计及单任务编辑
This commit is contained in:
parent
8bddb166a3
commit
1a20fcc835
|
@ -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('//', '/')
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
<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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue