This commit is contained in:
fan 2022-09-14 13:28:18 +08:00
commit 82857e9808
3 changed files with 37 additions and 2 deletions

View File

@ -82,7 +82,8 @@
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import { refreshExamList } from '@/api/management/userexam';
import { getTrainingDetailNew } from '@/api/jmap/training';
// import { getTrainingDetailNew } from '@/api/jmap/training';
import { loadTrainingInSimulation } from '@/api/jmap/training';
export default {
name: 'TipExamList',
@ -137,6 +138,9 @@ export default {
},
isLast() {
return this.examIndex == this.trainingList.length - 1;
},
group() {
return this.$route.query.group;
}
},
watch: {
@ -166,7 +170,8 @@ export default {
}
});
if (obj) {
getTrainingDetailNew(obj.trainingId).then(resp => {
loadTrainingInSimulation(this.group, obj.trainingId).then(resp => {
// getTrainingDetailNew(obj.trainingId).then(resp => {
this.courseModel = {
id: resp.data.id,
name: resp.data.name,

View File

@ -92,6 +92,18 @@ export default {
{label:'蓝', value:10},
{label:'白', value:11},
{label:'红闪', value:12}
],
SwitchIndication: [// N- R- NO-() EX-
{ label: '定位', value: 'N' },
{ label: '反位', value: 'R' },
{ label: '失表', value: 'NO' },
{ label: '挤叉', value: 'EX' }
],
DriveMode: [
{ label: '自动驾驶模式', value: 'AM' },
{ label: '人工驾驶模式', value: 'CM' },
{ label: '限制人工驾驶模式', value: 'RM' },
{ label: '非限制人工驾驶模式', value: 'NRM' }
]
}
};

View File

@ -64,6 +64,17 @@
:value="option.value"
/>
</el-select>
<div v-else-if="valueType == 'SECTION'">
<el-select v-model="formModel.v" placeholder="请选择值" size="mini">
<el-option
v-for="option in getSectionList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
<el-button :type="field == 'v' ? 'danger' : 'primary'" size="mini" @click="hover('v')">激活</el-button>
</div>
<el-input-number v-else-if="valueType=='int'" v-model="formModel.v" size="mini" style="width: 180px" />
<el-input v-else v-model="formModel.v" size="mini" style="width: 180px" />
</el-form-item>
@ -137,6 +148,13 @@ export default {
}
return type;
},
getSectionList() { //
let list = [];
list = this.getDeviceList.filter(item => {
return item._type == 'Section';
});
return list;
},
valueType() {
let type = '';
const findObj = this.getAttributeList.find(item => {