|
@@ -116,6 +116,30 @@
|
|
:answerQ="answerQ"
|
|
:answerQ="answerQ"
|
|
:sStudent="sStudent"
|
|
:sStudent="sStudent"
|
|
></answerPanel>
|
|
></answerPanel>
|
|
|
|
+ <askPanel
|
|
|
|
+ v-if="askPanelVisible"
|
|
|
|
+ @setAskPanelVisible="setAskPanelVisible"
|
|
|
|
+ :panelVisible="askPanelVisible"
|
|
|
|
+ :courseid="courseid"
|
|
|
|
+ :courseType="courseType"
|
|
|
|
+ :taskCount="taskCount"
|
|
|
|
+ :toolindex="toolindex"
|
|
|
|
+ :isTeacher="isTeacher"
|
|
|
|
+ :askJson="askJson"
|
|
|
|
+ :sStudent="sStudent"
|
|
|
|
+ ></askPanel>
|
|
|
|
+ <choosePanel
|
|
|
|
+ v-if="choosePanelVisible"
|
|
|
|
+ @setChoosePanelVisible="setChoosePanelVisible"
|
|
|
|
+ :panelVisible="choosePanelVisible"
|
|
|
|
+ :courseid="courseid"
|
|
|
|
+ :courseType="courseType"
|
|
|
|
+ :taskCount="taskCount"
|
|
|
|
+ :toolindex="toolindex"
|
|
|
|
+ :isTeacher="isTeacher"
|
|
|
|
+ :chooseJson="chooseJson"
|
|
|
|
+ :sStudent="sStudent"
|
|
|
|
+ ></choosePanel>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -134,6 +158,8 @@ import { tools } from '@/const/index'
|
|
import Works from './works.vue'
|
|
import Works from './works.vue'
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
import answerPanel from './answerPanel.vue'
|
|
import answerPanel from './answerPanel.vue'
|
|
|
|
+import askPanel from './askPanel.vue'
|
|
|
|
+import choosePanel from './choosePanel.vue'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
@@ -170,11 +196,19 @@ export default {
|
|
},
|
|
},
|
|
answerPanelVisible: {
|
|
answerPanelVisible: {
|
|
type: Boolean
|
|
type: Boolean
|
|
|
|
+ },
|
|
|
|
+ askPanelVisible: {
|
|
|
|
+ type: Boolean
|
|
|
|
+ },
|
|
|
|
+ choosePanelVisible: {
|
|
|
|
+ type: Boolean
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
Works,
|
|
Works,
|
|
- answerPanel
|
|
|
|
|
|
+ answerPanel,
|
|
|
|
+ askPanel,
|
|
|
|
+ choosePanel
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -184,7 +218,7 @@ export default {
|
|
noWorksS: [],
|
|
noWorksS: [],
|
|
isWorkTool: [16, 32, 57, 4, 45, 15, 1, 3, 6, 7, 26, 41, 47, 48, 52, 50, 40, 63], //, 49
|
|
isWorkTool: [16, 32, 57, 4, 45, 15, 1, 3, 6, 7, 26, 41, 47, 48, 52, 50, 40, 63], //, 49
|
|
canWork: [16, 50], //, 49
|
|
canWork: [16, 50], //, 49
|
|
- canWork2: [15],
|
|
|
|
|
|
+ canWork2: [15,4,45],
|
|
fileType: 0,
|
|
fileType: 0,
|
|
tools: tools,
|
|
tools: tools,
|
|
proVisible: false,
|
|
proVisible: false,
|
|
@@ -196,7 +230,9 @@ export default {
|
|
sStudent: {},
|
|
sStudent: {},
|
|
isTeacher: false,
|
|
isTeacher: false,
|
|
toolindex: 0,
|
|
toolindex: 0,
|
|
- answerQ: ''
|
|
|
|
|
|
+ answerQ: '',
|
|
|
|
+ askJson: {},
|
|
|
|
+ chooseJson: {}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -218,7 +254,17 @@ export default {
|
|
if (!newValue) {
|
|
if (!newValue) {
|
|
this.getWorks()
|
|
this.getWorks()
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ askPanelVisible(newValue) {
|
|
|
|
+ if (!newValue) {
|
|
|
|
+ this.getWorks()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ choosePanelVisible(newValue) {
|
|
|
|
+ if (!newValue) {
|
|
|
|
+ this.getWorks()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapGetters(['userinfo']),
|
|
...mapGetters(['userinfo']),
|
|
@@ -236,6 +282,12 @@ export default {
|
|
setPanelVisible(bool) {
|
|
setPanelVisible(bool) {
|
|
this.$emit('update:answerPanelVisible', bool)
|
|
this.$emit('update:answerPanelVisible', bool)
|
|
},
|
|
},
|
|
|
|
+ setAskPanelVisible(bool) {
|
|
|
|
+ this.$emit('update:askPanelVisible', bool)
|
|
|
|
+ },
|
|
|
|
+ setChoosePanelVisible(bool) {
|
|
|
|
+ this.$emit('update:choosePanelVisible', bool)
|
|
|
|
+ },
|
|
arrayToArray(arrayo, arrayt) {
|
|
arrayToArray(arrayo, arrayt) {
|
|
const array1 = arrayo
|
|
const array1 = arrayo
|
|
const array2 = arrayt
|
|
const array2 = arrayt
|
|
@@ -540,7 +592,7 @@ export default {
|
|
wid: works[j].id,
|
|
wid: works[j].id,
|
|
works: works[j].content,
|
|
works: works[j].content,
|
|
sName: works[j].name,
|
|
sName: works[j].name,
|
|
- type: 2,
|
|
|
|
|
|
+ type: 4,
|
|
time: works[j].time,
|
|
time: works[j].time,
|
|
score: works[j].score,
|
|
score: works[j].score,
|
|
img: works[j].img,
|
|
img: works[j].img,
|
|
@@ -851,7 +903,7 @@ export default {
|
|
window.AWS.config.region = 'cn-northwest-1' // 设置区域
|
|
window.AWS.config.region = 'cn-northwest-1' // 设置区域
|
|
|
|
|
|
// eslint-disable-next-line prettier/prettier
|
|
// eslint-disable-next-line prettier/prettier
|
|
- var bucket = new window.AWS.S3({ params: { Bucket: 'ccrb' }}) // 选择桶
|
|
|
|
|
|
+ var bucket = new window.AWS.S3({ params: { Bucket: 'ccrb' } }) // 选择桶
|
|
var _this = this
|
|
var _this = this
|
|
_this.progress = 0
|
|
_this.progress = 0
|
|
_this.proVisible = true
|
|
_this.proVisible = true
|
|
@@ -888,13 +940,13 @@ export default {
|
|
}
|
|
}
|
|
bucket
|
|
bucket
|
|
.upload(params, options)
|
|
.upload(params, options)
|
|
- .on('httpUploadProgress', function(evt) {
|
|
|
|
|
|
+ .on('httpUploadProgress', function (evt) {
|
|
// 这里可以写进度条
|
|
// 这里可以写进度条
|
|
// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
|
|
// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
|
|
_this.progress = parseInt((evt.loaded / evt.total) * 100)
|
|
_this.progress = parseInt((evt.loaded / evt.total) * 100)
|
|
_this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2)
|
|
_this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2)
|
|
})
|
|
})
|
|
- .send(function(err, data) {
|
|
|
|
|
|
+ .send(function (err, data) {
|
|
_this.progress = 100
|
|
_this.progress = 100
|
|
_this.isFinishSize = _this.isAllSize
|
|
_this.isFinishSize = _this.isAllSize
|
|
if (cfindex2 === files.length - 1 || cfindex2 > files.length - 1) {
|
|
if (cfindex2 === files.length - 1 || cfindex2 > files.length - 1) {
|
|
@@ -1000,7 +1052,7 @@ export default {
|
|
window.AWS.config.region = 'cn-northwest-1' // 设置区域
|
|
window.AWS.config.region = 'cn-northwest-1' // 设置区域
|
|
|
|
|
|
// eslint-disable-next-line prettier/prettier
|
|
// eslint-disable-next-line prettier/prettier
|
|
- var bucket = new window.AWS.S3({ params: { Bucket: 'ccrb' }}) // 选择桶
|
|
|
|
|
|
+ var bucket = new window.AWS.S3({ params: { Bucket: 'ccrb' } }) // 选择桶
|
|
var _this = this
|
|
var _this = this
|
|
_this.progress = 0
|
|
_this.progress = 0
|
|
_this.proVisible = true
|
|
_this.proVisible = true
|
|
@@ -1034,13 +1086,13 @@ export default {
|
|
}
|
|
}
|
|
bucket
|
|
bucket
|
|
.upload(params, options)
|
|
.upload(params, options)
|
|
- .on('httpUploadProgress', function(evt) {
|
|
|
|
|
|
+ .on('httpUploadProgress', function (evt) {
|
|
// 这里可以写进度条
|
|
// 这里可以写进度条
|
|
// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
|
|
// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
|
|
_this.progress = parseInt((evt.loaded / evt.total) * 100)
|
|
_this.progress = parseInt((evt.loaded / evt.total) * 100)
|
|
_this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2)
|
|
_this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2)
|
|
})
|
|
})
|
|
- .send(function(err, data) {
|
|
|
|
|
|
+ .send(function (err, data) {
|
|
_this.progress = 100
|
|
_this.progress = 100
|
|
_this.isFinishSize = _this.isAllSize
|
|
_this.isFinishSize = _this.isAllSize
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -1275,6 +1327,14 @@ export default {
|
|
this.isTeacher = true
|
|
this.isTeacher = true
|
|
this.answerQ = content.answerQ
|
|
this.answerQ = content.answerQ
|
|
this.setPanelVisible(true)
|
|
this.setPanelVisible(true)
|
|
|
|
+ } else if (tool === 4) {
|
|
|
|
+ this.isTeacher = true
|
|
|
|
+ this.askJson = content
|
|
|
|
+ this.setAskPanelVisible(true)
|
|
|
|
+ }else if(tool == 45){
|
|
|
|
+ this.isTeacher = true
|
|
|
|
+ this.chooseJson = content
|
|
|
|
+ this.setChoosePanelVisible(true)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|