剧本预览页面调整

This commit is contained in:
joylink_cuiweidong 2019-10-16 16:36:25 +08:00
parent 571e221413
commit 35eacb299c
11 changed files with 43 additions and 17 deletions

View File

@ -18,10 +18,17 @@ export function getScriptByIdList(id) {
});
}
/** 通过ID查询剧本的基础信息 */
/** 通过ID查询发布的剧本的详细信息 */
export function getScriptById(id) {
return request({
url: `/api/script/${id}/detail`,
method: 'get'
});
}
/** 通过ID查询未发布剧本的详细信息 */
export function getDraftScriptById(id) {
return request({
url: `/api/script/draft/${id}/detail`,
method: 'get'
});
}

View File

@ -88,5 +88,8 @@ export default {
status: 'Status',
applyRevoke: 'Revoke',
publish: 'Publish',
revokeReason: 'Revoke explanation'
revokeReason: 'Revoke explanation',
language: 'language',
chinese: 'Chinese Simplified',
english: 'English'
};

View File

@ -89,5 +89,8 @@ export default {
status: '状态',
applyRevoke: '撤回',
publish: '发布',
revokeReason: '驳回原因'
revokeReason: '驳回原因',
language: '语言',
chinese: '中文',
english: '英文'
};

View File

@ -73,7 +73,7 @@ export default {
this.$store.state.training.roles == 'BigScreen';
},
isShowMenu() {
return this.$store.state.training.prdType != '';
return this.$store.state.training.prdType;
}
},
watch: {

View File

@ -72,7 +72,7 @@ export default {
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() {
return this.$store.state.training.prdType != '';
return this.$store.state.training.prdType;
}
},
watch: {

View File

@ -71,7 +71,7 @@ export default {
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() {
return this.$store.state.training.prdType != '';
return this.$store.state.training.prdType;
}
},
watch: {

View File

@ -71,7 +71,7 @@ export default {
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() {
return this.$store.state.training.prdType != '';
return this.$store.state.training.prdType;
}
},
watch: {

View File

@ -66,7 +66,7 @@ export default {
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() {
return this.$store.state.training.prdType != '';
return this.$store.state.training.prdType;
}
},
watch: {

View File

@ -49,7 +49,7 @@
</template>
<script>
import { getScriptPageListOnline, getScriptById } from '@/api/script';
import { getScriptPageListOnline, getScriptById,getDraftScriptById } from '@/api/script';
export default {
name: 'AddQuest',
@ -150,11 +150,12 @@ export default {
},
async handleLoad(index, row) {
this.row = row;
const res = await getScriptById(row.id);
const res = this.$route.fullPath.includes('design/display/demon')?await getDraftScriptById(row.id):await getScriptById(row.id);
let newMemberList = [];
debugger;
if (res.code == 200) {
if (res.data.memberVOList && res.data.memberVOList.length > 0) {
newMemberList = res.data.memberVOList.filter(item => item.hasPlay === true);
if (res.data.playerVOList && res.data.playerVOList.length > 0) {
newMemberList = res.data.playerVOList.filter(item => item.hasPlay === true);
}
this.memberList = newMemberList || [];
this.memberList.unshift({ id: '', name: this.$t('display.script.none'), role: 'no' });

View File

@ -5,6 +5,7 @@
<el-header style="height:50px;">
<el-row class="actionList">
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
<span class="titleStyle">( {{$t('scriptRecord.language')}}: {{ $route.query.lang=="en"?$t('scriptRecord.english'):$t('scriptRecord.chinese') }} )</span>
</el-row>
</el-header>
<el-main style="padding-top:10px;padding-bottom:10px;">

View File

@ -71,6 +71,7 @@
</template>
<script>
import Cookies from 'js-cookie';
import ConstConfig from '@/scripts/ConstConfig';
import { UrlConfig } from '@/router/index';
import { mapGetters } from 'vuex';
@ -138,7 +139,7 @@ export default {
},
drawUp(index,row) {
scriptRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id };
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id,lang:row.lang };
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
launchFullscreen();
}).catch(error => {
@ -161,11 +162,16 @@ export default {
},
//
handleConfirmCreate(data) {
if(Cookies.get("user_lang")=="en"){
data.lang='en';
}else{
data.lang='zh';
}
createQuest(data).then(resp => {
this.reloadTable();
this.$message.success('创建剧本成功');
this.$message.success(this.$t('scriptRecord.createScriptSuccess'));
}).catch(error => {
this.$messageBox(`创建剧本失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.createScriptFail')}: ${error.message}`);
})
},
//
@ -174,11 +180,16 @@ export default {
},
//
handleConfirmModify(data){
if(Cookies.get("user_lang")=="en"){
data.lang='en';
}else{
data.lang='zh';
}
updateQuest(data.id,data).then(resp => {
this.reloadTable();
this.$message.success('修改剧本成功');
this.$message.success(this.$t('scriptRecord.modifyScriptSuccess'));
}).catch(error => {
this.$messageBox(`修改剧本失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.modifyScriptFail')}: ${error.message}`);
})
},
//