Merge branch 'dev_product' of https://git.cloud.tencent.com/joylink/jl-nclient into dev_product
This commit is contained in:
commit
1ece7eb215
@ -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'
|
||||
});
|
||||
}
|
||||
|
@ -79,6 +79,7 @@ export default {
|
||||
schema: {
|
||||
selectProduct: 'Please select product type',
|
||||
loadScript: 'Load Script',
|
||||
selectRoles: 'Select Roles',
|
||||
previewRunDiagram: 'Preview Run Diagram',
|
||||
loadRunDiagram: 'Load Run Diagram',
|
||||
faultSetting: 'Fault Setting',
|
||||
|
@ -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'
|
||||
};
|
||||
|
@ -79,6 +79,7 @@ export default {
|
||||
schema: {
|
||||
selectProduct: '请选择产品类型',
|
||||
loadScript: '加载剧本',
|
||||
selectRoles: '选择角色',
|
||||
previewRunDiagram: '运行图预览',
|
||||
loadRunDiagram: '运行图加载',
|
||||
faultSetting: '故障设置',
|
||||
|
@ -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: {
|
||||
|
@ -112,7 +112,7 @@
|
||||
switch(obj.type){
|
||||
case 'scriptDesign':{
|
||||
setSessionStorage('designType', 'scriptDesign');
|
||||
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}` });
|
||||
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?skinCode=${obj.skinCode}` });
|
||||
break;
|
||||
}
|
||||
case 'lessonDesign': {
|
||||
|
@ -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' });
|
||||
|
@ -38,6 +38,7 @@
|
||||
@runPlanViewShow="runPlanViewShow"
|
||||
@faultChooseShow="faultChooseShow"
|
||||
@runQuestLoadShow="runQuestLoadShow"
|
||||
@runAddRolesLoadShow="runAddRolesLoadShow"
|
||||
@switchMode="switchMode"
|
||||
/>
|
||||
|
||||
@ -468,8 +469,14 @@ export default {
|
||||
async runQuestLoadShow() {
|
||||
this.$refs.addQuest.doShow();
|
||||
},
|
||||
async runAddRolesLoadShow(){
|
||||
// this.$refs.addQuest.doShow();
|
||||
let row={id:this.$route.query.scriptId}
|
||||
this.$refs.addQuest.handleLoad(1, row);
|
||||
},
|
||||
// 选择脚本
|
||||
async selectQuest(row, id) {
|
||||
debugger;
|
||||
try {
|
||||
const res = await loadScript(row.id, id, this.group);
|
||||
if (res && res.code == 200) {
|
||||
|
@ -5,7 +5,9 @@
|
||||
</el-select>
|
||||
|
||||
<el-button-group>
|
||||
<el-button v-if="isDemon" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{$t('display.schema.loadScript')}}</el-button>
|
||||
<!-- viewRunQuest -->
|
||||
<el-button v-if="isDemon && isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{$t('display.schema.selectRoles')}}</el-button>
|
||||
<el-button v-if="isDemon && !isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{$t('display.schema.loadScript')}}</el-button>
|
||||
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{$t('display.schema.previewRunDiagram')}}</el-button>
|
||||
<el-button v-if="!runing && !isPlan && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{$t('display.schema.loadRunDiagram')}}</el-button>
|
||||
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{$t('display.schema.faultSetting')}}</el-button>
|
||||
@ -65,6 +67,9 @@ export default {
|
||||
},
|
||||
isDemon() {
|
||||
return this.$route.params.mode === 'demon';
|
||||
},
|
||||
isDesignPlatform(){
|
||||
return this.$route.fullPath.includes('design/display/demon');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -151,6 +156,9 @@ export default {
|
||||
viewRunQuest() {
|
||||
this.$emit('runQuestLoadShow');
|
||||
},
|
||||
viewScriptRoles(){
|
||||
this.$emit('runAddRolesLoadShow');
|
||||
},
|
||||
switchMode(swch) {
|
||||
this.$emit('switchMode', swch);
|
||||
}
|
||||
|
@ -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}`);
|
||||
})
|
||||
},
|
||||
// 创建
|
||||
@ -234,7 +245,15 @@ export default {
|
||||
});
|
||||
},
|
||||
previewScript(index,row){
|
||||
debugger;
|
||||
scriptRecordNotify(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id,skinCode:this.$route.query.skinCode,try:0};
|
||||
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
|
||||
// skinCode=02&group=16-128-757&prdType=02&mapId=18&code=JLFZZX-1&goodsId=&try=0
|
||||
}
|
||||
// loadInitData() {
|
||||
// this.mapList = [];
|
||||
|
Loading…
Reference in New Issue
Block a user