|
@@ -33,6 +33,14 @@
|
|
|
v-else
|
|
|
/>
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ class="tool-box"
|
|
|
+ v-else-if="tools[step.tool[0]] && canWork2.indexOf(step.tool[0]) !== -1"
|
|
|
+ @click="addWork(step.tool[0], stepI, step)"
|
|
|
+ >
|
|
|
+ <div class="tool-img"><img :src="tools[step.tool[0]].img" /></div>
|
|
|
+ <div class="tool-name">{{ tools[step.tool[0]].name }}</div>
|
|
|
+ </div>
|
|
|
<div class="tool-box" v-else-if="tools[step.tool[0]]">
|
|
|
<div class="tool-img"><img :src="tools[step.tool[0]].img" /></div>
|
|
|
<div class="tool-name">{{ tools[step.tool[0]].name }}</div>
|
|
@@ -64,7 +72,7 @@
|
|
|
v-for="(student, noI) in noWorksS[stepI]"
|
|
|
:key="stepI + '-' + noI"
|
|
|
class="student"
|
|
|
- @click="teacherSubmit(step.tool[0], student, $event)"
|
|
|
+ @click="teacherSubmit(step.tool[0], student, $event, step)"
|
|
|
>
|
|
|
{{ student.student }}
|
|
|
<input
|
|
@@ -96,6 +104,18 @@
|
|
|
></el-progress>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <answerPanel
|
|
|
+ v-if="answerPanelVisible"
|
|
|
+ @setPanelVisible="setPanelVisible"
|
|
|
+ :panelVisible="answerPanelVisible"
|
|
|
+ :courseid="courseid"
|
|
|
+ :courseType="courseType"
|
|
|
+ :taskCount="taskCount"
|
|
|
+ :toolindex="toolindex"
|
|
|
+ :isTeacher="isTeacher"
|
|
|
+ :answerQ="answerQ"
|
|
|
+ :sStudent="sStudent"
|
|
|
+ ></answerPanel>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -113,6 +133,7 @@ import {
|
|
|
import { tools } from '@/const/index'
|
|
|
import Works from './works.vue'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
+import answerPanel from './answerPanel.vue'
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
@@ -146,10 +167,14 @@ export default {
|
|
|
},
|
|
|
isLoading: {
|
|
|
type: Boolean
|
|
|
+ },
|
|
|
+ answerPanelVisible: {
|
|
|
+ type: Boolean
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
- Works
|
|
|
+ Works,
|
|
|
+ answerPanel
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -159,6 +184,7 @@ export default {
|
|
|
noWorksS: [],
|
|
|
isWorkTool: [16, 32, 57, 4, 45, 15, 1, 3, 6, 7, 26, 41, 47, 48, 52, 50, 40, 63], //, 49
|
|
|
canWork: [16, 50], //, 49
|
|
|
+ canWork2: [15],
|
|
|
fileType: 0,
|
|
|
tools: tools,
|
|
|
proVisible: false,
|
|
@@ -167,7 +193,10 @@ export default {
|
|
|
isFinishSize: 0,
|
|
|
isAllSize: 0,
|
|
|
sTool: 0,
|
|
|
- sStudent: {}
|
|
|
+ sStudent: {},
|
|
|
+ isTeacher: false,
|
|
|
+ toolindex: 0,
|
|
|
+ answerQ: ''
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -184,6 +213,11 @@ export default {
|
|
|
if (newValue) {
|
|
|
this.getWorks()
|
|
|
}
|
|
|
+ },
|
|
|
+ answerPanelVisible(newValue) {
|
|
|
+ if (!newValue) {
|
|
|
+ this.getWorks()
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -199,6 +233,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ setPanelVisible(bool) {
|
|
|
+ this.$emit('update:answerPanelVisible', bool)
|
|
|
+ },
|
|
|
arrayToArray(arrayo, arrayt) {
|
|
|
const array1 = arrayo
|
|
|
const array2 = arrayt
|
|
@@ -1216,7 +1253,7 @@ export default {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- teacherSubmit(tool, studnet, e) {
|
|
|
+ teacherSubmit(tool, studnet, e, content) {
|
|
|
this.sStudent = studnet
|
|
|
this.sTool = tool
|
|
|
if (this.userinfo.type === 1) {
|
|
@@ -1224,8 +1261,21 @@ export default {
|
|
|
var el = e.currentTarget
|
|
|
el.getElementsByTagName('input')[0].click()
|
|
|
e.target.value = ''
|
|
|
+ } else if (tool === 15) {
|
|
|
+ this.isTeacher = false
|
|
|
+ this.answerQ = content.answerQ
|
|
|
+ this.setPanelVisible(true)
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ addWork(tool, toolindex, content) {
|
|
|
+ this.sStudent = {}
|
|
|
+ this.toolindex = toolindex
|
|
|
+ if (tool === 15) {
|
|
|
+ this.isTeacher = true
|
|
|
+ this.answerQ = content.answerQ
|
|
|
+ this.setPanelVisible(true)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|