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) {
|
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'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -79,6 +79,7 @@ export default {
|
|||||||
schema: {
|
schema: {
|
||||||
selectProduct: 'Please select product type',
|
selectProduct: 'Please select product type',
|
||||||
loadScript: 'Load Script',
|
loadScript: 'Load Script',
|
||||||
|
selectRoles: 'Select Roles',
|
||||||
previewRunDiagram: 'Preview Run Diagram',
|
previewRunDiagram: 'Preview Run Diagram',
|
||||||
loadRunDiagram: 'Load Run Diagram',
|
loadRunDiagram: 'Load Run Diagram',
|
||||||
faultSetting: 'Fault Setting',
|
faultSetting: 'Fault Setting',
|
||||||
|
@ -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'
|
||||||
};
|
};
|
||||||
|
@ -79,6 +79,7 @@ export default {
|
|||||||
schema: {
|
schema: {
|
||||||
selectProduct: '请选择产品类型',
|
selectProduct: '请选择产品类型',
|
||||||
loadScript: '加载剧本',
|
loadScript: '加载剧本',
|
||||||
|
selectRoles: '选择角色',
|
||||||
previewRunDiagram: '运行图预览',
|
previewRunDiagram: '运行图预览',
|
||||||
loadRunDiagram: '运行图加载',
|
loadRunDiagram: '运行图加载',
|
||||||
faultSetting: '故障设置',
|
faultSetting: '故障设置',
|
||||||
|
@ -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: {
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
switch(obj.type){
|
switch(obj.type){
|
||||||
case 'scriptDesign':{
|
case 'scriptDesign':{
|
||||||
setSessionStorage('designType', '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;
|
break;
|
||||||
}
|
}
|
||||||
case 'lessonDesign': {
|
case 'lessonDesign': {
|
||||||
|
@ -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' });
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
@runPlanViewShow="runPlanViewShow"
|
@runPlanViewShow="runPlanViewShow"
|
||||||
@faultChooseShow="faultChooseShow"
|
@faultChooseShow="faultChooseShow"
|
||||||
@runQuestLoadShow="runQuestLoadShow"
|
@runQuestLoadShow="runQuestLoadShow"
|
||||||
|
@runAddRolesLoadShow="runAddRolesLoadShow"
|
||||||
@switchMode="switchMode"
|
@switchMode="switchMode"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -468,8 +469,14 @@ export default {
|
|||||||
async runQuestLoadShow() {
|
async runQuestLoadShow() {
|
||||||
this.$refs.addQuest.doShow();
|
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) {
|
async selectQuest(row, id) {
|
||||||
|
debugger;
|
||||||
try {
|
try {
|
||||||
const res = await loadScript(row.id, id, this.group);
|
const res = await loadScript(row.id, id, this.group);
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-button-group>
|
<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="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="!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>
|
<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() {
|
isDemon() {
|
||||||
return this.$route.params.mode === 'demon';
|
return this.$route.params.mode === 'demon';
|
||||||
|
},
|
||||||
|
isDesignPlatform(){
|
||||||
|
return this.$route.fullPath.includes('design/display/demon');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -151,6 +156,9 @@ export default {
|
|||||||
viewRunQuest() {
|
viewRunQuest() {
|
||||||
this.$emit('runQuestLoadShow');
|
this.$emit('runQuestLoadShow');
|
||||||
},
|
},
|
||||||
|
viewScriptRoles(){
|
||||||
|
this.$emit('runAddRolesLoadShow');
|
||||||
|
},
|
||||||
switchMode(swch) {
|
switchMode(swch) {
|
||||||
this.$emit('switchMode', swch);
|
this.$emit('switchMode', swch);
|
||||||
}
|
}
|
||||||
|
@ -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}`);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 创建
|
// 创建
|
||||||
@ -234,7 +245,15 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
previewScript(index,row){
|
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() {
|
// loadInitData() {
|
||||||
// this.mapList = [];
|
// this.mapList = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user