This commit is contained in:
fan 2019-10-25 13:00:04 +08:00
commit 2e49c6499f
11 changed files with 31 additions and 42 deletions

View File

@ -101,10 +101,10 @@ export default {
])
},
mounted() {
this.routes = this.$router.options.routes;
this.routes = this.$router.options.routes;
if (this.$route.fullPath.indexOf('design/userlist')>=0) {
this.activePath='/design/userlist/home';
} else if (this.$route.fullPath.indexOf('design/lesson')>=0 || this.$route.fullPath.indexOf('design/script')>=0 || this.$route.fullPath.indexOf('design/runPlan')>=0) {
this.activePath='/design/userlist/home';
} else if (this.$route.fullPath.includes('design/lesson') || this.$route.fullPath.includes('design/script') || this.$route.fullPath.includes('design/runPlan') || this.$route.fullPath.includes('design/mapPreview')) {
this.activePath='/design/home';
} else {
this.activePath=this.$route.path;

View File

@ -3,9 +3,9 @@
<div class="main-container">
<navbar />
<app-main :style="{width: width+'px', height: height+'px'}" />
<el-footer style="height:30px;text-align:right;line-height: 30px;">
<span style="font-size:14px;">Copyright ©2018 北京玖琏科技有限公司 京ICP备18028522号</span>
</el-footer>
<el-footer style="height:30px;text-align:right;line-height: 30px;">
<span style="font-size:14px;">Copyright ©2018 北京玖琏科技有限公司 京ICP备18028522号</span>
</el-footer>
</div>
</div>
</template>

View File

@ -128,9 +128,7 @@ export default {
},
created() {
listPublishMap().then(response=>{
response.data.forEach(elem => {
this.mapList.push({ value: elem.id, label: elem.name });
});
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
this.queryForm.queryObject.mapId.config.data = this.mapList;
});
},

View File

@ -129,10 +129,8 @@
//
this.skinList = [];
const res = await getSkinCodeList();
res.data.forEach(elem => {
this.queryForm.queryObject.mapId.config.data.push({ value: elem.code, label: elem.name });
this.skinList.push({ value: elem.code, label: elem.name });
});
this.skinList = res.data.map(elem => { return { value: elem.code, label: elem.name } });
this.queryForm.queryObject.mapId.config.data=this.skinList;
} catch (error) {
console.error(error, '获取发布地图');
}

View File

@ -131,10 +131,8 @@
this.mapList = [];
const res = await listPublishMap();
this.allMapList=res.data;
res.data.forEach(elem => {
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
this.mapList.push({ value: elem.id, label: elem.name });
});
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name } });
this.queryForm.queryObject.mapId.config.data=this.mapList;
} catch (error) {
console.error(error, '获取发布地图');
}

View File

@ -15,7 +15,7 @@
@node-click="clickEvent"
>
<!-- @node-contextmenu="showContextMenu" -->
<span slot-scope="{ node:tnode, data }">
<span slot-scope="{ node:tnode, data }" >
<span
class="el-icon-tickets"
:style="{color: data.valid ? 'green':''}"
@ -132,6 +132,7 @@ export default {
this.treeData = this.treeList = [];
try {
const res = await listPublishMap({cityCode: filterSelect});
res.data.forEach(elem=>{
// debugger;
// elem.children.find(n => { return n.name.includes("")})
@ -140,35 +141,28 @@ export default {
id:'1',
name:'地图预览',
type:'mapPreview',
mapId: elem.id,
hidden:false
},
{
id: '2',
name: '课程设计',
type: 'lessonDesign',
mapId: elem.id,
skinCode: elem.skinCode,
hidden:this.isAdministrator()
},
mapId: elem.id
}
];
this.isAdministrator()?elem.children.push({id: '2',name: '课程设计',type: 'lessonDesign',mapId: elem.id,skinCode: elem.skinCode}):'';
elem.children.push(
{
id: '3',
name: '剧本设计',
type: 'scriptDesign',
mapId: elem.id,
skinCode: elem.skinCode,
hidden:false
skinCode: elem.skinCode
// code:elem.children.find(n => { return n.name.includes("")})
},
});
elem.children.push(
{
id: '4',
name: '运行图设计',
type: 'runPlanDesign',
mapId: elem.id,
skinCode: elem.skinCode,
hidden:false
skinCode: elem.skinCode
}
];
);
});
this.treeData = res.data;
this.treeList = this.filterText
@ -191,7 +185,7 @@ export default {
this.$store.dispatch('config/resize', { width: width, height: height });
},
isAdministrator() {
return this.$store.state.user.roles.indexOf(superAdmin) || this.$store.state.user.roles.indexOf(admin);
return this.$store.state.user.roles.includes(superAdmin) || this.$store.state.user.roles.includes(admin);
},
// createMap() {
// this.$emit("createMap");

View File

@ -77,6 +77,7 @@
await loadMapDataById(mapId);
await this.$store.dispatch('training/setMapDefaultState');
await this.$store.dispatch('map/setTrainWindowShow', false);
await this.$store.dispatch('map/clearJlmapTrainView');
} catch (error) {
this.$messageBox(`获取地图数据失败: ${error.message}`);
this.endViewLoading();

View File

@ -61,7 +61,7 @@ export default {
return this.$store.state.config.width;
},
height() {
return this.$store.state.config.height;
return this.$store.state.config.height - 30;
},
show() {
if (this.mode == TrainingMode.EDIT || this.mode == TrainingMode.MAP_EDIT) {

View File

@ -81,7 +81,7 @@ export default {
},
computed: {
cardHeight() {
return this.$store.state.app.height - 195;
return this.$store.state.app.height - 195-30;
}
},
watch: {

View File

@ -14,10 +14,10 @@
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.batchOperation')" name="three">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<!-- style="display: flex;justify-content: center;" -->
<!-- style="display: flex;justify-content: center;" -->
<div style="text-align:center;">
<el-button type="danger" size="big" @click="removeTrainWindow">{{ $t('map.deleteTrainWindow') }}</el-button>
<el-button type="primary" size="big" @click="createTrainWindow" style="margin-top:10px">{{ $t('map.createTrainWindow') }}</el-button>
<el-button type="primary" size="big" style="margin-top:10px" @click="createTrainWindow">{{ $t('map.createTrainWindow') }}</el-button>
</div>
</el-scrollbar>
</el-tab-pane>

View File

@ -4,7 +4,7 @@
<div class="runPlanList">{{$t('planMonitor.openRunPlan.runPlanList')}}</div>
<el-button size="small" type="primary" @click="handleCreate" class="createRunPlan" v-if="isCreate">{{$t('planMonitor.createRunningDiagram')}}</el-button>
</div>
<el-table :data="runPlanList" height="600" stripe
<el-table :data="runPlanList" height="500" stripe
border
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
<el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" />
@ -75,7 +75,7 @@ export default {
},
computed: {
height() {
return this.$store.state.app.height - 50-30;
return this.$store.state.app.height - 60 -30;
},
skinCode() {
return this.$route.query.skinCode || '02';