Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly
This commit is contained in:
commit
c071b6a98d
@ -146,8 +146,13 @@ export default {
|
||||
playAllAudio() {
|
||||
this.$nextTick(function() {
|
||||
this.currentMessage = this.currentAudioList.shift();
|
||||
console.log(this.currentMessage, '************');
|
||||
if (this.currentMessage.type === 'Text') {
|
||||
return;
|
||||
}
|
||||
document.querySelector('#audioPlay').src = this.currentMessage.audioPath;
|
||||
document.querySelector('#audioPlay').play();
|
||||
console.log(document.querySelector('#audioPlay'), '--------------');
|
||||
this.$set(this.currentMessage, 'activeAuto', true);
|
||||
this.play = true;
|
||||
document.querySelector('#audioPlay').onended = () => {
|
||||
|
@ -92,8 +92,10 @@ export default {
|
||||
pqId: questionInfo.questionId,
|
||||
type: 2,
|
||||
subType: data.subType,
|
||||
cosplayMemberId: data.cosplayMemberId,
|
||||
trainDetail: data.trainDetail
|
||||
trainAnswerDetail: {
|
||||
cosplayMemberId: data.cosplayMemberId,
|
||||
trainDetail: data.trainDetail
|
||||
}
|
||||
};
|
||||
submitAnswer(postData).then(resp => {}).catch(() => { this.$message.error('记录数据失败!'); });
|
||||
});
|
||||
|
@ -64,7 +64,7 @@
|
||||
<span v-else>--</span>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1" style="text-align: center;">
|
||||
<el-button type="primary" size="mini" @click="deleteMember(index, 'METRO')">删除</el-button>
|
||||
<el-button type="primary" size="mini" @click="deleteMember(index, 'RAILWAY')">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -96,7 +96,7 @@
|
||||
<span v-else>--</span>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1" style="text-align: center;">
|
||||
<el-button type="primary" size="mini" @click="deleteMember(index, 'METRO')">删除</el-button>
|
||||
<el-button type="primary" size="mini" @click="deleteMember(index, 'EMERGENCY')">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
@ -1,12 +1,19 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogShow" width="400px" :before-close="doClose">
|
||||
<el-form ref="form111" :model="studentModel" :rules="rules" label-width="120px" size="mini">
|
||||
<el-form-item label="学生姓名:" prop="name">
|
||||
<el-form-item v-if="title === '新建学生'" label="类型:">
|
||||
<el-radio v-model="isAccount" :label="true">学号</el-radio>
|
||||
<el-radio v-model="isAccount" :label="false">手机号</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isAccount" label="学生姓名:" prop="name">
|
||||
<el-input v-model="studentModel.name" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学号:" prop="account">
|
||||
<el-form-item v-if="isAccount" label="学号:" prop="account">
|
||||
<el-input v-model="studentModel.account" style="width: 220px;" :disabled="title==='修改学生'" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!isAccount" label="手机号:" prop="mobile">
|
||||
<el-input v-model="studentModel.mobile" style="width: 220px;" :disabled="title==='修改学生'" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
@ -23,11 +30,13 @@ export default {
|
||||
name: 'CreateClass',
|
||||
data() {
|
||||
return {
|
||||
isAccount: true,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
studentModel: {
|
||||
name: '',
|
||||
account: ''
|
||||
account: '',
|
||||
mobile: ''
|
||||
},
|
||||
title: '新建学生'
|
||||
};
|
||||
@ -40,6 +49,9 @@ export default {
|
||||
],
|
||||
account: [
|
||||
{ required: true, message: '请输入学生学号', trigger: 'blur' }
|
||||
],
|
||||
mobile: [
|
||||
{ required: true, message: '请输入手机号', trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
return baseRules;
|
||||
@ -52,6 +64,8 @@ export default {
|
||||
if (row) {
|
||||
this.studentModel.name = row.name;
|
||||
this.studentModel.account = row.account;
|
||||
this.studentModel.mobile = row.mobile || '';
|
||||
this.isAccount = true;
|
||||
this.title = '修改学生';
|
||||
} else {
|
||||
this.title = '新建学生';
|
||||
@ -62,10 +76,15 @@ export default {
|
||||
create() {
|
||||
this.$refs.form111.validate((valid) => {
|
||||
if (valid) {
|
||||
const model = {
|
||||
let model = {
|
||||
account: this.studentModel.account,
|
||||
name: this.studentModel.name
|
||||
};
|
||||
if (!this.isAccount) {
|
||||
model = {
|
||||
mobile: this.studentModel.mobile
|
||||
};
|
||||
}
|
||||
createStudent( this.$route.query.classId, model).then(response => {
|
||||
this.$emit('refresh');
|
||||
this.doClose();
|
||||
|
Loading…
Reference in New Issue
Block a user