代码调整

This commit is contained in:
joylink_cuiweidong 2020-06-01 18:58:38 +08:00
parent 61ca059900
commit 7e83cc9505
2 changed files with 7 additions and 1 deletions

View File

@ -44,7 +44,7 @@ export default {
labelWidth: '120px',
items: [
{ prop: 'name', label: '实操名称', type: 'text' },
{ prop:'raceId', label:'竞赛名称', type:'select', options:this.mapList, disabled:this.isEdit},
{ prop:'mapId', label:'地图名称', type:'select', options:this.mapList, disabled:this.isEdit},
{ prop: 'description', label: '实操描述', type: 'textarea' }
]
};

View File

@ -6,6 +6,7 @@
</div>
</template>
<script>
import Cookies from 'js-cookie';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { getPracticeList, practiceRecordNotify } from '@/api/race';
import {updateScript, deleteScript, createScript} from '@/api/script';
@ -164,6 +165,11 @@ export default {
}
},
handleConfirmCreate(data) {
if (Cookies.get('user_lang') == 'en') {
data.lang = 'en';
} else {
data.lang = 'zh';
}
createScript(data).then(resp => {
this.reloadTable();
this.$message.success('创建实操试题成功');