This commit is contained in:
zyy 2019-11-19 16:39:35 +08:00
commit 6ab6f83ae8
22 changed files with 67 additions and 57 deletions

View File

@ -14,7 +14,7 @@
<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script> <script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>
<script src="https://cdn.bootcss.com/vuex/3.1.0/vuex.min.js"></script> <script src="https://cdn.bootcss.com/vuex/3.1.0/vuex.min.js"></script>
<script src="https://cdn.bootcss.com/vue-router/3.0.6/vue-router.min.js"></script> <script src="https://cdn.bootcss.com/vue-router/3.1.2/vue-router.min.js"></script>
<script src="https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script> <script src="https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>
<script src="https://cdn.bootcss.com/element-ui/2.7.2/index.js"></script> <script src="https://cdn.bootcss.com/element-ui/2.7.2/index.js"></script>

View File

@ -178,9 +178,10 @@ export default {
confirm() { confirm() {
const roleName = this.memberList.find(elem=>{ return elem.id == this.form.role; }); const roleName = this.memberList.find(elem=>{ return elem.id == this.form.role; });
this.$emit('selectQuest', this.row, this.form.role, this.mapLocation, roleName.role);
this.doClose(); this.doClose();
this.roleDoClose(); this.roleDoClose();
this.$emit('selectQuest', this.row, this.form.role, this.mapLocation, roleName.role);
}, },
roleDoClose() { roleDoClose() {

View File

@ -159,9 +159,6 @@ export default {
skinCode() { skinCode() {
return this.$route.query.skinCode; return this.$route.query.skinCode;
}, },
mapId() {
return this.$route.query.mapId;
},
isLesson() { isLesson() {
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage'; return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
}, },

View File

@ -47,15 +47,13 @@ export default {
rules() { rules() {
const crules = { const crules = {
name: [ name: [
// { required: true, message: this.$t('scriptRecord.inputScriptName'), trigger: 'blur' },
// { required: true, message: this.$t('scriptRecord.inputScriptName'), trigger: 'change' }
{ validator: this.validateScriptName, trigger: 'blur' }, { validator: this.validateScriptName, trigger: 'blur' },
{ validator: this.validateScriptName, trigger: 'change' } { validator: this.validateScriptName, trigger: 'change' }
],
description: [
{ validator: this.validateDescription, trigger: 'blur' },
{ validator: this.validateDescription, trigger: 'change' }
] ]
// description:[
// { required: true, message: this.$t('scriptRecord.inputScriptDescription'), trigger: 'blur' },
// { required: true, message: this.$t('scriptRecord.inputScriptDescription'), trigger: 'change' }
// ]
}; };
return crules; return crules;
} }
@ -69,6 +67,14 @@ export default {
return callback(); return callback();
} }
}, },
validateDescription(rule, value, callback) {
if (value.trim().length === 0) {
this.formModel.description = this.formModel.name.replace(/\s/g, '');
return callback(new Error(this.$t('scriptRecord.inputScriptDescription')));
} else {
return callback();
}
},
doShow(questid) { doShow(questid) {
if (questid) { if (questid) {
getQuestById(questid).then(resp=>{ getQuestById(questid).then(resp=>{

View File

@ -140,16 +140,15 @@ export default {
justify-content: space-between; justify-content: space-between;
&__head { &__head {
height: 30px;
display: flex; display: flex;
align-items: center; align-items: center;
background: #f0f0f0; background: #f0f0f0;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
padding: 10px;
&--title { &--title {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
padding:10px 0px 10px 10px;
} }
} }
@ -216,6 +215,8 @@ export default {
outline: none; outline: none;
resize: none; resize: none;
font-size: 16px; font-size: 16px;
padding-left: 10px;
padding-top: 10px;
} }
&--send { &--send {

View File

@ -119,9 +119,11 @@ export default {
&--title { &--title {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
margin-left:10px;
} }
&--add { &--add {
margin-right:2px;
/deep/ .el-button.is-circle { /deep/ .el-button.is-circle {
padding: 5px; padding: 5px;
} }

View File

@ -59,7 +59,7 @@ export default {
return { label: 'nickName' }; return { label: 'nickName' };
}, },
treeHeight() { treeHeight() {
return this.height - 40; return this.height - 64;
}, },
filterMembers() { filterMembers() {
return this.members.filter(e =>{ return e.nickName.includes(this.filterText); }); return this.members.filter(e =>{ return e.nickName.includes(this.filterText); });
@ -97,7 +97,6 @@ export default {
border: 1px solid #ccc; border: 1px solid #ccc;
&__head { &__head {
height: 30px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -105,13 +104,14 @@ export default {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
&--title { &--title {
padding:10px 0px;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
&--notes { &--notes {
font-size: 16px; font-size: 16px;
height: 100%; padding:10px 0px;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
} }
@ -124,6 +124,7 @@ export default {
height: auto; height: auto;
min-height: calc(100%-200px); min-height: calc(100%-200px);
max-height: calc(100%-200px); max-height: calc(100%-200px);
border-bottom: 1px #ccc solid;
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;

View File

@ -129,9 +129,11 @@ export default {
&--title { &--title {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
margin-left:10px;
} }
&--add { &--add {
margin-right:2px;
/deep/ .el-button.is-circle { /deep/ .el-button.is-circle {
padding: 5px; padding: 5px;
} }

View File

@ -365,7 +365,7 @@ export default {
this.loading = true; this.loading = true;
await putJointTrainingExit(this.group); await putJointTrainingExit(this.group);
this.loading = false; this.loading = false;
this.$router.push({ path: `/trainingPlatform/detail/${this.$route.query.subSystem}`, query: {mapId: this.room.mapId}}); history.go(-1);
} catch (error) { } catch (error) {
this.$emit('message', {type:'error', message: this.$t('error.operationFailure')}); this.$emit('message', {type:'error', message: this.$t('error.operationFailure')});
} }
@ -381,7 +381,6 @@ export default {
background: #fff; background: #fff;
&__head { &__head {
height: 60px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -393,6 +392,7 @@ export default {
&--title { &--title {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
padding: 10px 0px;
.label { .label {
font-size: 16px; font-size: 16px;