剧本预览页面调整
This commit is contained in:
parent
571e221413
commit
35eacb299c
@ -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'
|
||||
});
|
||||
}
|
||||
|
@ -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'
|
||||
};
|
||||
|
@ -89,5 +89,8 @@ export default {
|
||||
status: '状态',
|
||||
applyRevoke: '撤回',
|
||||
publish: '发布',
|
||||
revokeReason: '驳回原因'
|
||||
revokeReason: '驳回原因',
|
||||
language: '语言',
|
||||
chinese: '中文',
|
||||
english: '英文'
|
||||
};
|
||||
|
@ -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: {
|
||||
|
@ -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: {
|
||||
|
@ -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: {
|
||||
|
@ -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: {
|
||||
|
@ -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: {
|
||||
|
@ -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' });
|
||||
|
@ -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;">
|
||||
|
@ -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}`);
|
||||
})
|
||||
},
|
||||
// 创建
|
||||
|
Loading…
Reference in New Issue
Block a user