剧本预览页面调整
This commit is contained in:
parent
571e221413
commit
35eacb299c
@ -18,10 +18,17 @@ export function getScriptByIdList(id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 通过ID查询剧本的基础信息 */
|
/** 通过ID查询发布的剧本的详细信息 */
|
||||||
export function getScriptById(id) {
|
export function getScriptById(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/script/${id}/detail`,
|
url: `/api/script/${id}/detail`,
|
||||||
method: 'get'
|
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',
|
status: 'Status',
|
||||||
applyRevoke: 'Revoke',
|
applyRevoke: 'Revoke',
|
||||||
publish: 'Publish',
|
publish: 'Publish',
|
||||||
revokeReason: 'Revoke explanation'
|
revokeReason: 'Revoke explanation',
|
||||||
|
language: 'language',
|
||||||
|
chinese: 'Chinese Simplified',
|
||||||
|
english: 'English'
|
||||||
};
|
};
|
||||||
|
@ -89,5 +89,8 @@ export default {
|
|||||||
status: '状态',
|
status: '状态',
|
||||||
applyRevoke: '撤回',
|
applyRevoke: '撤回',
|
||||||
publish: '发布',
|
publish: '发布',
|
||||||
revokeReason: '驳回原因'
|
revokeReason: '驳回原因',
|
||||||
|
language: '语言',
|
||||||
|
chinese: '中文',
|
||||||
|
english: '英文'
|
||||||
};
|
};
|
||||||
|
@ -73,7 +73,7 @@ export default {
|
|||||||
this.$store.state.training.roles == 'BigScreen';
|
this.$store.state.training.roles == 'BigScreen';
|
||||||
},
|
},
|
||||||
isShowMenu() {
|
isShowMenu() {
|
||||||
return this.$store.state.training.prdType != '';
|
return this.$store.state.training.prdType;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -72,7 +72,7 @@ export default {
|
|||||||
this.$store.state.training.roles != 'BigScreen';
|
this.$store.state.training.roles != 'BigScreen';
|
||||||
},
|
},
|
||||||
isShowBar() {
|
isShowBar() {
|
||||||
return this.$store.state.training.prdType != '';
|
return this.$store.state.training.prdType;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -71,7 +71,7 @@ export default {
|
|||||||
this.$store.state.training.roles != 'BigScreen';
|
this.$store.state.training.roles != 'BigScreen';
|
||||||
},
|
},
|
||||||
isShowBar() {
|
isShowBar() {
|
||||||
return this.$store.state.training.prdType != '';
|
return this.$store.state.training.prdType;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -71,7 +71,7 @@ export default {
|
|||||||
this.$store.state.training.roles != 'BigScreen';
|
this.$store.state.training.roles != 'BigScreen';
|
||||||
},
|
},
|
||||||
isShowBar() {
|
isShowBar() {
|
||||||
return this.$store.state.training.prdType != '';
|
return this.$store.state.training.prdType;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -66,7 +66,7 @@ export default {
|
|||||||
this.$store.state.training.roles != 'BigScreen';
|
this.$store.state.training.roles != 'BigScreen';
|
||||||
},
|
},
|
||||||
isShowBar() {
|
isShowBar() {
|
||||||
return this.$store.state.training.prdType != '';
|
return this.$store.state.training.prdType;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getScriptPageListOnline, getScriptById } from '@/api/script';
|
import { getScriptPageListOnline, getScriptById,getDraftScriptById } from '@/api/script';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddQuest',
|
name: 'AddQuest',
|
||||||
@ -150,11 +150,12 @@ export default {
|
|||||||
},
|
},
|
||||||
async handleLoad(index, row) {
|
async handleLoad(index, row) {
|
||||||
this.row = 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 = [];
|
let newMemberList = [];
|
||||||
|
debugger;
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data.memberVOList && res.data.memberVOList.length > 0) {
|
if (res.data.playerVOList && res.data.playerVOList.length > 0) {
|
||||||
newMemberList = res.data.memberVOList.filter(item => item.hasPlay === true);
|
newMemberList = res.data.playerVOList.filter(item => item.hasPlay === true);
|
||||||
}
|
}
|
||||||
this.memberList = newMemberList || [];
|
this.memberList = newMemberList || [];
|
||||||
this.memberList.unshift({ id: '', name: this.$t('display.script.none'), role: 'no' });
|
this.memberList.unshift({ id: '', name: this.$t('display.script.none'), role: 'no' });
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<el-header style="height:50px;">
|
<el-header style="height:50px;">
|
||||||
<el-row class="actionList">
|
<el-row class="actionList">
|
||||||
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
|
<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-row>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main style="padding-top:10px;padding-bottom:10px;">
|
<el-main style="padding-top:10px;padding-bottom:10px;">
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Cookies from 'js-cookie';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
@ -138,7 +139,7 @@ export default {
|
|||||||
},
|
},
|
||||||
drawUp(index,row) {
|
drawUp(index,row) {
|
||||||
scriptRecordNotify(row.id).then(resp => {
|
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 });
|
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
@ -161,11 +162,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 确定创建
|
// 确定创建
|
||||||
handleConfirmCreate(data) {
|
handleConfirmCreate(data) {
|
||||||
|
if(Cookies.get("user_lang")=="en"){
|
||||||
|
data.lang='en';
|
||||||
|
}else{
|
||||||
|
data.lang='zh';
|
||||||
|
}
|
||||||
createQuest(data).then(resp => {
|
createQuest(data).then(resp => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$message.success('创建剧本成功');
|
this.$message.success(this.$t('scriptRecord.createScriptSuccess'));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`创建剧本失败: ${error.message}`);
|
this.$messageBox(`${this.$t('scriptRecord.createScriptFail')}: ${error.message}`);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//修改
|
//修改
|
||||||
@ -174,11 +180,16 @@ export default {
|
|||||||
},
|
},
|
||||||
//确认修改
|
//确认修改
|
||||||
handleConfirmModify(data){
|
handleConfirmModify(data){
|
||||||
|
if(Cookies.get("user_lang")=="en"){
|
||||||
|
data.lang='en';
|
||||||
|
}else{
|
||||||
|
data.lang='zh';
|
||||||
|
}
|
||||||
updateQuest(data.id,data).then(resp => {
|
updateQuest(data.id,data).then(resp => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$message.success('修改剧本成功');
|
this.$message.success(this.$t('scriptRecord.modifyScriptSuccess'));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`修改剧本失败: ${error.message}`);
|
this.$messageBox(`${this.$t('scriptRecord.modifyScriptFail')}: ${error.message}`);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 创建
|
// 创建
|
||||||
|
Loading…
Reference in New Issue
Block a user