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) {
|
||||||
const basicInfo = store.getters['training/basicInfo'];
|
return new Promise((resolve, reject) => {
|
||||||
if (basicInfo.id && valid) {
|
const basicInfo = store.getters['training/basicInfo'];
|
||||||
const group = router.currentRoute.query.group;
|
if (basicInfo.id && valid) {
|
||||||
sendTrainingNextStepNew({ trainingId: basicInfo.id, operation: operation }, group);
|
const group = router.currentRoute.query.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,24 +104,25 @@ 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);
|
||||||
if (command) {
|
if (command) {
|
||||||
CommandHandler.execute(command.id, command.get()).then(response => {
|
CommandHandler.execute(command.id, command.get()).then(response => {
|
||||||
rtn.response = response;
|
rtn.response = response;
|
||||||
resolve(rtn);
|
resolve(rtn);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
rtn.response = '获取指令失败,暂无指令或参数传值不正确,请检查指令字典';
|
||||||
|
reject(rtn);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
rtn.response = '获取指令失败,暂无指令或参数传值不正确,请检查指令字典';
|
resolve(rtn);
|
||||||
reject(rtn);
|
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
resolve(rtn);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
<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>
|
||||||
<span>{{ $t('map.publishedMapList') }}</span>
|
<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>
|
||||||
<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 />
|
<span slot-scope="{ node:tnode, data }">
|
||||||
<div class="tree_mian_box">
|
<span class="el-icon-tickets" :style="{color: data.valid ? 'green':''}" />
|
||||||
<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> {{ tnode.label }}</span>
|
||||||
<span slot-scope="{ node:tnode, data }">
|
</span>
|
||||||
<span class="el-icon-tickets" :style="{color: data.valid ? 'green':''}" />
|
</el-tree>
|
||||||
<span> {{ tnode.label }}</span>
|
|
||||||
</span>
|
|
||||||
</el-tree>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -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%;
|
display:flex;
|
||||||
position: relative;
|
flex-direction:column;
|
||||||
|
}
|
||||||
|
.mapListName{
|
||||||
|
padding: 15px 0px 15px 20px;
|
||||||
|
border-bottom: 1px solid #EBEEF5;
|
||||||
}
|
}
|
||||||
.clearfix{
|
|
||||||
padding: 0 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>
|
||||||
<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,37 +1,39 @@
|
|||||||
<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>
|
||||||
<span>{{ $t('global.mapList') }}</span>
|
<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>
|
||||||
<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-tree
|
||||||
<el-input v-if="!getMapByCode" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
ref="tree"
|
||||||
<div style="height: calc(100% - 76px); overflow: auto;">
|
:data="treeList"
|
||||||
<el-tree
|
node-key="key"
|
||||||
ref="tree"
|
:props="{children: 'children',label: 'name'}"
|
||||||
:data="treeList"
|
highlight-current
|
||||||
node-key="key"
|
:span="22"
|
||||||
:props="{children: 'children',label: 'name'}"
|
:filter-node-method="filterNode"
|
||||||
highlight-current
|
:default-expanded-keys="expandList"
|
||||||
:span="22"
|
@node-click="clickEvent"
|
||||||
:filter-node-method="filterNode"
|
@node-expand="nodeExpand"
|
||||||
:default-expanded-keys="expandList"
|
@node-collapse="nodeCollapse"
|
||||||
@node-click="clickEvent"
|
>
|
||||||
@node-expand="nodeExpand"
|
<span slot-scope="{ node }">
|
||||||
@node-collapse="nodeCollapse"
|
<span
|
||||||
>
|
class="el-icon-tickets"
|
||||||
<span slot-scope="{ node }">
|
/>
|
||||||
<span
|
<span v-if="node.data.id ==='Simulation'"> {{ node.data.name+ $t('global.simulationSystem') }}</span>
|
||||||
class="el-icon-tickets"
|
<span v-else-if="node.data.id ==='Lesson'"> {{ node.data.name+ $t('global.lessonSystem') }}</span>
|
||||||
/>
|
<span v-else-if="node.data.id ==='Exam'"> {{ node.data.name+ $t('global.examSystem') }}</span>
|
||||||
<span v-if="node.data.id ==='Simulation'"> {{ node.data.name+ $t('global.simulationSystem') }}</span>
|
<span v-else-if="node.data.id ==='Plan'"> {{ node.data.name+ $t('global.runPlanSystem') }}</span>
|
||||||
<span v-else-if="node.data.id ==='Lesson'"> {{ node.data.name+ $t('global.lessonSystem') }}</span>
|
<span v-else> {{ node.data.name }}</span>
|
||||||
<span v-else-if="node.data.id ==='Exam'"> {{ node.data.name+ $t('global.examSystem') }}</span>
|
</span>
|
||||||
<span v-else-if="node.data.id ==='Plan'"> {{ node.data.name+ $t('global.runPlanSystem') }}</span>
|
</el-tree>
|
||||||
<span v-else> {{ node.data.name }}</span>
|
|
||||||
</span>
|
|
||||||
</el-tree>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -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