合并代码

This commit is contained in:
fan 2020-06-03 15:28:57 +08:00
parent f6997d3bd9
commit 0f5185702b
3 changed files with 32 additions and 23 deletions

View File

@ -174,7 +174,7 @@ export default {
});
},
generatePaper(index, row) {
this.$router.push({ path: `/design/race/generate`, query: {raceId:row.id} });
this.$router.push({ path: `/design/race/generate`, query: {raceId:row.id, mapId: row.mapId} });
}
}
};

View File

@ -56,8 +56,16 @@
:summary-method="getSummaries"
:show-summary="showSummary"
>
<el-table-column prop="name" label="实操名称" />
<el-table-column prop="creatorName" label="创建人" />
<el-table-column prop="question" label="实操名称">
<template slot-scope="scope">
<span>{{ scope.row.question.name }}</span>
</template>
</el-table-column>
<el-table-column prop="question" label="实操描述">
<template slot-scope="scope">
<span>{{ scope.row.question.description }}</span>
</template>
</el-table-column>
<el-table-column prop="score" label="分值">
<template slot-scope="scope">
<span v-if="!scope.row.editScope" @click="editScope(scope.row)">{{ scope.row.score }}</span>
@ -127,12 +135,13 @@ export default {
}
},
addOperateQuestionList(row) {
if (this.operateQuestionList.length) {
const length = this.operateQuestionList.length;
if (length) {
this.operateIndexList.push(row.id);
this.operateQuestionList.push(row);
this.operateQuestionList.push({id:length + 1, score:0, question: row});
} else {
this.operateIndexList = [row.id];
this.operateQuestionList = [row];
this.operateQuestionList = [{id:1, score:0, question: row}];
}
},
addTheoryQuestion() {

View File

@ -6,6 +6,7 @@
</template>
<script>
import { getPracticeList } from '@/api/race';
export default {
mixins: [
// WindowResizeHandler
@ -31,31 +32,27 @@ export default {
queryForm: {
reset: true,
labelWidth: '80px',
queryObject: {
name: {
type: 'text',
label: '实操名称'
}
}
queryObject: {}
},
queryList: {
// query: getPracticeList,
data:[
{id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
{id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
{id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
],
query: getPracticeList,
beforeQuery: this.beforeQuery,
// data:[
// {id:1, raceId:2, name:'', creatorName:''},
// {id:2, raceId:4, name:'', creatorName:'zyy'},
// {id:3, raceId:3, name:'', creatorName:''}
// ],
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '实操名称',
prop: 'name'
prop: 'name',
width: '400'
},
{
title: '创建人',
prop: 'creatorName',
width: '100'
title: '实操描述',
prop: 'description'
},
{
type: 'button',
@ -100,9 +97,12 @@ export default {
},
addQuestion(index, row) {
this.$set(row, 'paper', true);
row.score = 0;
this.$emit('addQuestion', row);
},
beforeQuery(params) {
params.mapId = this.$route.query.mapId;
return params;
},
afterQuery(data) {
if (data && data.list) {
const that = this;