diff --git a/src/views/organization/examManage/index.vue b/src/views/organization/examManage/index.vue
index 187362ca4..6ae1642f3 100644
--- a/src/views/organization/examManage/index.vue
+++ b/src/views/organization/examManage/index.vue
@@ -123,7 +123,7 @@ export default {
handleClick: this.handleEdit,
type: 'primary',
showControl: row => {
- return row.creatorId == this.userId
+ return row.creatorId == this.userId && row.state === 1
},
},
{
@@ -185,9 +185,7 @@ export default {
this.$router.push({ path: `/info/examRule/draft/add/0`, query: { source: 'org' } })
},
handleLock(index, data) {
- console.log(data)
- debugger
- lockPaper(data)
+ lockPaper(data.id)
.then(res => {
this.examRefresh()
this.$message.success('封存试卷成功!')
@@ -203,7 +201,7 @@ export default {
type: 'warning',
})
.then(() => {
- setExamEfficacy(data)
+ unlockPaper(data.id)
.then(res => {
this.examRefresh()
this.$message({
@@ -223,7 +221,24 @@ export default {
})
.catch(() => {})
},
- handleDelete(index, data) {},
+ handleDelete(index, data) {
+ this.$confirm('确定删除该试卷吗?', this.$t('global.tips'), {
+ confirmButtonText: this.$t('global.confirm'),
+ cancelButtonText: this.$t('global.cancel'),
+ type: 'warning',
+ })
+ .then(() => deletePaper(data.id))
+ .then(resp => {
+ this.examRefresh()
+ this.$message({
+ type: 'success',
+ message: '删除成功!',
+ })
+ })
+ .catch(res => {
+ this.$message({ type: 'error', message: '删除试卷失败!' })
+ })
+ },
examRefresh() {
this.$nextTick(() => {
this.$refs.examQueryListPage.refresh(true)
diff --git a/src/views/publish/examRule/draft/rule.vue b/src/views/publish/examRule/draft/rule.vue
index 7d622fd8d..42420626c 100644
--- a/src/views/publish/examRule/draft/rule.vue
+++ b/src/views/publish/examRule/draft/rule.vue
@@ -25,7 +25,7 @@
-
+
{{ Number(scope.row.amount) * Number(scope.row.score) }}
@@ -96,7 +96,6 @@ export default {
created() {},
methods: {
handleAdd() {
- this.changeCourseDisable()
this.$refs.addRule.show()
},
handleRuleSubmit(formData, isEdit) {
@@ -117,34 +116,11 @@ export default {
const index = data.$index
this.ruleList.splice(index, 1)
},
- // 判断类型是否选择过
- changeCourseDisable() {
- this.trainingTypeList.forEach(item => {
- item.disabled = false
- })
- for (const val in this.operationTypeMap) {
- this.operationTypeMap[val].forEach(item => {
- item.disabled = false
- })
- }
- this.ruleList.forEach(ele => {
- this.trainingTypeList.forEach(item => {
- if (ele.trainingType == item.value && !ele.operateType) {
- item.disabled = true
- }
- })
- ;(this.operationTypeMap[ele.trainingType] || []).forEach(item => {
- if (ele.operateType && ele.operateType == item.value) {
- item.disabled = true
- }
- })
- })
- },
+
checkTotolScores() {
return this.currentTotalScore === this.examData.fullScore
},
editRow(data) {
- this.changeCourseDisable()
this.editingIndex = data.$index
const list = JSON.stringify(data.row)
const detail = JSON.parse(list)