Merge remote-tracking branch 'remotes/origin/test'
This commit is contained in:
commit
2dd277e633
@ -33,17 +33,27 @@ class Handler {
|
||||
}
|
||||
|
||||
afterValid(operation, valid) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const basicInfo = store.getters['training/basicInfo'];
|
||||
if (basicInfo.id && valid) {
|
||||
const group = router.currentRoute.query.group;
|
||||
sendTrainingNextStepNew({ trainingId: basicInfo.id, operation: operation }, group);
|
||||
}
|
||||
|
||||
sendTrainingNextStepNew({ trainingId: basicInfo.id, operation: operation }, group).then(res=>{
|
||||
if (!valid) {
|
||||
this.pop();
|
||||
} else if (operation.cancel === true) {
|
||||
this.clear();
|
||||
}
|
||||
resolve();
|
||||
}).catch(error => {
|
||||
if (!valid) {
|
||||
this.pop();
|
||||
} else if (operation.cancel === true) {
|
||||
this.clear();
|
||||
}
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getWholeParam() {
|
||||
@ -94,7 +104,7 @@ class Handler {
|
||||
this.storeOperation(operation);
|
||||
const rtn = { valid: false, response: null };
|
||||
const valid = ValidateHandler.vaildate(this.getTrainingMode(), operation);
|
||||
this.afterValid(operation, valid);
|
||||
this.afterValid(operation, valid).then(()=>{
|
||||
rtn.valid = valid;
|
||||
if (operation.cmdType && valid) {
|
||||
const command = this.getCommand(operation);
|
||||
@ -113,6 +123,7 @@ class Handler {
|
||||
resolve(rtn);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
notify(lineCode) {
|
||||
|
@ -1,13 +1,16 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="joylink-card map-list-main">
|
||||
<div class="clearfix">
|
||||
<div>
|
||||
<div class="mapListName">
|
||||
<span>{{ $t('map.publishedMapList') }}</span>
|
||||
</div>
|
||||
<template v-if="!getMapByCode">
|
||||
<filter-city ref="filerCity" filter-empty :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
</template>
|
||||
</div>
|
||||
<div class="text_item">
|
||||
<filter-city v-if="!getMapByCode" ref="filerCity" filter-empty :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||
<el-input v-if="!getMapByCode" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<div class="tree_mian_box">
|
||||
<el-tree ref="tree" class="tree_box" :data="treeList" :default-expanded-keys="defaultShowKeys" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent">
|
||||
<el-tree ref="tree" :data="treeList" :default-expanded-keys="defaultShowKeys" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent">
|
||||
<span slot-scope="{ node:tnode, data }">
|
||||
<span class="el-icon-tickets" :style="{color: data.valid ? 'green':''}" />
|
||||
<span> {{ tnode.label }}</span>
|
||||
@ -15,7 +18,6 @@
|
||||
</el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
|
||||
@ -231,45 +233,28 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.back-home {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #3ea726;
|
||||
}
|
||||
}
|
||||
.text_item{
|
||||
height: 100%;
|
||||
padding-top: 47px;
|
||||
.tree_mian_box{
|
||||
height: calc(100% - 76px);
|
||||
}
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.map-list-main{
|
||||
text-align:left;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
}
|
||||
.clearfix{
|
||||
padding: 0 20px;
|
||||
.mapListName{
|
||||
padding: 15px 0px 15px 20px;
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
box-sizing: border-box;
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
position: absolute;
|
||||
width:100%;
|
||||
}
|
||||
.tree_box{
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-tree {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #e4e3e3 !important;
|
||||
}
|
||||
|
@ -1,12 +1,15 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="joylink-card map-list-main">
|
||||
<div class="clearfix">
|
||||
<div>
|
||||
<div class="mapListName">
|
||||
<span>{{ $t('global.mapList') }}</span>
|
||||
</div>
|
||||
<template v-if="!IsProject">
|
||||
<filter-city ref="filerCity" filter-empty local-param-name="training_cityCode" @filterSelectChange="refresh" />
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
</template>
|
||||
</div>
|
||||
<div class="left-map-list">
|
||||
<filter-city v-if="!getMapByCode" ref="filerCity" filter-empty local-param-name="training_cityCode" @filterSelectChange="refresh" />
|
||||
<el-input v-if="!getMapByCode" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<div style="height: calc(100% - 76px); overflow: auto;">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeList"
|
||||
@ -33,7 +36,6 @@
|
||||
</el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getTrainingSystemList, getSubSystemInfo, getSubSystemByProjectCode } from '@/api/trainingPlatform';
|
||||
@ -65,9 +67,9 @@ export default {
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
getMapByCode() {
|
||||
const project = getSessionStorage('project');
|
||||
return GetMapListByProjectList.includes(project);
|
||||
IsProject() {
|
||||
// 实训平台 是否为通过项目code获取地图列表的项目
|
||||
return GetMapListByProjectList.includes(this.project);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -76,7 +78,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.getMapByCode) {
|
||||
if (this.IsProject) {
|
||||
this.refresh();
|
||||
}
|
||||
},
|
||||
@ -148,7 +150,7 @@ export default {
|
||||
this.filterSelect = filterSelect;
|
||||
try {
|
||||
let res = {};
|
||||
if (this.getMapByCode) {
|
||||
if (this.IsProject) {
|
||||
res = await getSubSystemByProjectCode();
|
||||
} else {
|
||||
res = await getTrainingSystemList(filterSelect);
|
||||
@ -210,37 +212,26 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.clearfix{
|
||||
width:100%;
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
padding-left: 17px;
|
||||
position:absolute;
|
||||
}
|
||||
.back-home {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #3ea726;
|
||||
}
|
||||
.mapListName{
|
||||
padding: 15px 0px 15px 17px;
|
||||
}
|
||||
.left-map-list{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-top: 47px;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.map-list-main{
|
||||
text-align:left;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-tree {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #e4e3e3 !important;
|
||||
}
|
||||
|
@ -61,23 +61,14 @@ export default {
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.examList {
|
||||
height: 100%;
|
||||
float: left;
|
||||
}
|
||||
/deep/ .scrollbar-wrapper{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
/deep/ .el-scrollbar__bar.is-horizontal {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user