产品分化调整
This commit is contained in:
parent
1f27473d44
commit
0fac6ce22e
@ -38,7 +38,7 @@ function getRouteInfo(to) {
|
||||
clientId = LoginParams.DaPing.clientId;
|
||||
} else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath) || /^\/planEdit/.test(toRoutePath)) {
|
||||
loginPath = loginPlanPage;
|
||||
getTokenInfo = getPlanToken;
|
||||
getTokenInfo = getToken;
|
||||
clientId = LoginParams.LianJiHua.clientId;
|
||||
} else if (/^\/design/.test(toRoutePath)) {
|
||||
loginPath = loginDesignPage;
|
||||
|
@ -199,10 +199,13 @@ export const UrlConfig = {
|
||||
pay: '/plan/pay'
|
||||
},
|
||||
design: {
|
||||
prefix: '/design'
|
||||
prefix: '/design',
|
||||
// tool: '/design/tool',
|
||||
// detail: '/plan/detail',
|
||||
// pay: '/plan/pay'
|
||||
mapDraw: '/design/map/draw',
|
||||
lessonEdit: '/design/lesson/edit',
|
||||
runPlan: '/design/runPlan/detail'
|
||||
},
|
||||
replay: {
|
||||
prefix: '/replay'
|
||||
@ -384,6 +387,23 @@ export const asyncRouter = [
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'map/draw/:mapId/:view',
|
||||
component: Mapedit,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'lesson/edit',
|
||||
component: Lessoncategory,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'runPlan/detail/:lessonId',
|
||||
component: PlanMonitorDetail,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ export default {
|
||||
window.event.cancelBubble = true;
|
||||
const odiv = e.target;
|
||||
const disY = e.clientY - odiv.offsetTop ;
|
||||
console.log(e.clientY,odiv.offsetHeight,odiv.offsetTop);
|
||||
document.onmousemove = (e) => {
|
||||
let top = e.clientY - disY;
|
||||
if (top > maxNum) {
|
||||
@ -77,11 +76,10 @@ export default {
|
||||
odiv.style.top = top + 'px';
|
||||
this.$emit('drapHeight', top);
|
||||
this.heightUps = top;
|
||||
console.log(top,'====');
|
||||
};
|
||||
document.onmouseup = (e) => {
|
||||
if (this.isSave) {
|
||||
if (this.heightUps > minNum) { // 左侧菜单宽度必须大于150 才可以设置
|
||||
if (this.heightUps > minNum) {
|
||||
localStore('upHeight', JSON.stringify(this.heightUps));
|
||||
}
|
||||
}
|
||||
|
@ -134,6 +134,18 @@
|
||||
// this.$router.push({ path: `${UrlConfig.trainingPlatform.prodDetail}/${this.mapId}/${obj.id}` });
|
||||
break;
|
||||
}
|
||||
case 'mapDesign': {
|
||||
this.resize();
|
||||
this.$router.push({ path: `${UrlConfig.design.mapDraw}/0/draft`, query: { name: '' } });
|
||||
break;
|
||||
}
|
||||
case 'lessonDesign': {
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonEdit}` });
|
||||
break;
|
||||
}
|
||||
case 'runPlanDesign': {
|
||||
this.$router.push({ path: `${UrlConfig.design.runPlan}/14` })
|
||||
}
|
||||
}
|
||||
},
|
||||
async refresh(filterSelect) {
|
||||
@ -141,7 +153,7 @@
|
||||
this.treeData = this.treeList = [];
|
||||
try {
|
||||
const res = await getPublishMapTree(filterSelect);
|
||||
|
||||
|
||||
res.data.forEach(elem=>{
|
||||
if(elem.children)
|
||||
{
|
||||
@ -171,7 +183,7 @@
|
||||
});
|
||||
|
||||
this.treeData = res.data;
|
||||
|
||||
|
||||
this.treeList = this.filterText
|
||||
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
|
||||
: res.data;
|
||||
@ -187,6 +199,12 @@
|
||||
},
|
||||
drapHeight(height) {
|
||||
this.heightUp = Number(height);
|
||||
},
|
||||
resize() {
|
||||
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
|
||||
const width = this.$store.state.app.width - 521 - this.widthLeft;
|
||||
const height = this.$store.state.app.height - 90;
|
||||
this.$store.dispatch('config/resize', { width: width, height: height });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div class="mainContext">
|
||||
<div class="treeContext">
|
||||
<cource-category
|
||||
ref="tree"
|
||||
:height="height"
|
||||
@publishCreate="publishCreate"
|
||||
@lessonCreate="lessonCreate"
|
||||
@lessonEdit="lessonEdit"
|
||||
@chapterCreate="chapterCreate"
|
||||
@chapterEdit="chapterEdit"
|
||||
@treeSort="treeSort"
|
||||
/>
|
||||
</div>
|
||||
<!--<div class="treeContext">-->
|
||||
<!--<cource-category-->
|
||||
<!--ref="tree"-->
|
||||
<!--:height="height"-->
|
||||
<!--@publishCreate="publishCreate"-->
|
||||
<!--@lessonCreate="lessonCreate"-->
|
||||
<!--@lessonEdit="lessonEdit"-->
|
||||
<!--@chapterCreate="chapterCreate"-->
|
||||
<!--@chapterEdit="chapterEdit"-->
|
||||
<!--@treeSort="treeSort"-->
|
||||
<!--/>-->
|
||||
<!--</div>-->
|
||||
<div class="draftContext" :style="{width: width +'px'}">
|
||||
<div v-if="lessonShow">
|
||||
<lesson-edit ref="lesson" :height="height" @refresh="refresh" />
|
||||
|
@ -4,7 +4,19 @@
|
||||
<div class="map-view">
|
||||
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="onContextmenu" />
|
||||
</div>
|
||||
<map-create ref="mapCreate" :skin-code="skinCode" @refresh="refresh" @editmap="handleNodeClick" />
|
||||
<div class="map-draft">
|
||||
<el-button type="text" style="float: right; padding: 3px 0" @click="createMap">{{ $t('map.newConstruction') }}</el-button>
|
||||
<el-button type="text" class="uploadDemo">
|
||||
<input
|
||||
ref="files"
|
||||
type="file"
|
||||
class="file_box"
|
||||
accept=".json, application/json"
|
||||
@change="importf"
|
||||
>
|
||||
{{ $t('map.importMap') }}
|
||||
</el-button>
|
||||
<div v-show="viewDraft==='draft'">
|
||||
<map-operate
|
||||
ref="mapOperate"
|
||||
@ -51,6 +63,7 @@ import { checkLoginLine } from '@/api/login';
|
||||
import JlmapVisual from '@/views/jlmap/index';
|
||||
import MapOperate from './mapoperate/index';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import MapCreate from '../mapmanage/create';
|
||||
|
||||
import ConfigMap from './configMap';
|
||||
|
||||
@ -62,7 +75,8 @@ export default {
|
||||
JlmapVisual,
|
||||
MapOperate,
|
||||
DataRelation,
|
||||
ConfigMap
|
||||
ConfigMap,
|
||||
MapCreate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -299,7 +313,39 @@ export default {
|
||||
// 设置显示中心
|
||||
setCenter(code) {
|
||||
this.$refs.jlmapVisual.setCenter(code);
|
||||
}
|
||||
},
|
||||
createMap() {
|
||||
this.$refs.mapCreate.show();
|
||||
},
|
||||
importf() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在导入中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
setTimeout(() => {
|
||||
const obj = this.$refs.files;
|
||||
if (!obj.files) return;
|
||||
const f = obj.files[0];
|
||||
const reader = new FileReader();
|
||||
const that = this;
|
||||
reader.readAsText(f, 'utf-8');
|
||||
reader.onload = function(e) {
|
||||
const data = e.target.result;
|
||||
postBuildMapImport(JSON.parse(data)).then(res => {
|
||||
loading.close();
|
||||
that.$message.success('导入成功!');
|
||||
that.refresh();
|
||||
loading.close();
|
||||
}).catch(error => {
|
||||
loading.close();
|
||||
that.$message.error('导入失败' + error.message);
|
||||
});
|
||||
obj.value = '';
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -345,4 +391,23 @@ export default {
|
||||
margin-right: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.uploadDemo {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
float: right;
|
||||
padding: 3px 0;
|
||||
margin-right: 3px;
|
||||
cursor: pointer;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user