Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
8cc1dd66d1
@ -3,10 +3,13 @@ export default {
|
|||||||
inserted: function (el, obj) {
|
inserted: function (el, obj) {
|
||||||
// 这是需要页面刚加载就能进行聚焦操作使用的钩子函数,可以省略的,视具体需求而定
|
// 这是需要页面刚加载就能进行聚焦操作使用的钩子函数,可以省略的,视具体需求而定
|
||||||
// 对值进行判断
|
// 对值进行判断
|
||||||
if (obj.value) {
|
const dom = el.querySelector('input') || el.querySelector('textarea');
|
||||||
// 聚焦元素
|
dom.focus();
|
||||||
el.focus();
|
// el.focus();
|
||||||
}
|
// if (obj.value) {
|
||||||
|
// // 聚焦元素
|
||||||
|
// el.focus();
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
// 当指令所在组件的 VNode 及其子 VNode 全部更新后调用
|
// 当指令所在组件的 VNode 及其子 VNode 全部更新后调用
|
||||||
// 这是每当绑定的值发生改变时触发的钩子函数
|
// 这是每当绑定的值发生改变时触发的钩子函数
|
||||||
|
@ -19,13 +19,18 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
raceList:{
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
mapList: [],
|
isEdit:false,
|
||||||
taskStatusList: [],
|
|
||||||
formModel: {
|
formModel: {
|
||||||
name: '',
|
name: '',
|
||||||
mapId: '',
|
mapId: '',
|
||||||
@ -34,11 +39,19 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
raceInfoList() {
|
||||||
|
const racelist = [];
|
||||||
|
this.raceList.forEach(each=>{
|
||||||
|
racelist.push({label:each.name, value:each.id});
|
||||||
|
});
|
||||||
|
return racelist;
|
||||||
|
},
|
||||||
form() {
|
form() {
|
||||||
const form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'name', label: '实操名称', type: 'text' },
|
{ prop: 'name', label: '实操名称', type: 'text' },
|
||||||
|
{ prop:'raceId', label:'竞赛名称', type:'select', options:this.raceInfoList, disabled:this.isEdit},
|
||||||
{ prop: 'description', label: '实操描述', type: 'textarea' }
|
{ prop: 'description', label: '实操描述', type: 'textarea' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -53,6 +66,9 @@ export default {
|
|||||||
description: [
|
description: [
|
||||||
{ validator: this.validateDescription, trigger: 'blur' },
|
{ validator: this.validateDescription, trigger: 'blur' },
|
||||||
{ validator: this.validateDescription, trigger: 'change' }
|
{ validator: this.validateDescription, trigger: 'change' }
|
||||||
|
],
|
||||||
|
raceId:[
|
||||||
|
{ required: true, message: '请选择竞赛', trigger: 'change' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
@ -82,12 +98,13 @@ export default {
|
|||||||
this.formModel = data;
|
this.formModel = data;
|
||||||
this.formModel.id = questid;
|
this.formModel.id = questid;
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
|
this.isEdit = true;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.formModel.mapId = this.$route.params.mapId;
|
this.formModel.mapId = this.$route.params.mapId;
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
|
this.isEdit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
doCreate() {
|
doCreate() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<query-list-page ref="user" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<query-list-page ref="user" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<create-practice ref="createPractice" title="创建实操" @reloadTable="reloadTable" @create="handleConfirmCreate" />
|
<create-practice ref="createPractice" :race-list="raceList" title="创建实操" @reloadTable="reloadTable" @create="handleConfirmCreate" />
|
||||||
<create-practice ref="modifyPractice" title="修改实操" @reloadTable="reloadTable" @create="handleConfirmModify" />
|
<create-practice ref="modifyPractice" :race-list="raceList" title="修改实操" @reloadTable="reloadTable" @create="handleConfirmModify" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -132,7 +132,8 @@ export default {
|
|||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
doRecord(index, row) {
|
doRecord(index, row) {
|
||||||
practiceRecordNotify(row.id).then(resp => {
|
// row.id
|
||||||
|
practiceRecordNotify(83).then(resp => {
|
||||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode};
|
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode};
|
||||||
this.$router.push({ path: `${UrlConfig.practiceDisplayNew}/practice`, query });
|
this.$router.push({ path: `${UrlConfig.practiceDisplayNew}/practice`, query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
|
@ -24,8 +24,6 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
mapList: [],
|
|
||||||
taskStatusList: [],
|
|
||||||
formModel: {
|
formModel: {
|
||||||
name: '',
|
name: '',
|
||||||
mapId: '',
|
mapId: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user