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