Merge branch 'test' of git.cloud.tencent.com:joylink/jl-nclient into test

This commit is contained in:
sunzhenyu 2019-10-22 17:42:20 +08:00
commit c7cb769c1a
11 changed files with 285 additions and 183 deletions

View File

@ -491,5 +491,6 @@ export default {
settingTrain: 'Setting train', settingTrain: 'Setting train',
sourceTrainWindow: 'Source train window', sourceTrainWindow: 'Source train window',
trainWindow: 'Train window', trainWindow: 'Train window',
targetTrainWindow: 'Target train window' targetTrainWindow: 'Target train window',
category: 'category'
}; };

View File

@ -487,6 +487,7 @@ export default {
settingTrain: '设置列车', settingTrain: '设置列车',
sourceTrainWindow: '源车次窗', sourceTrainWindow: '源车次窗',
trainWindow: '车次窗', trainWindow: '车次窗',
targetTrainWindow: '目的车次窗' targetTrainWindow: '目的车次窗',
category: '类别'
}; };

View File

@ -52,19 +52,18 @@
:disabled="targetCodeIsDisabled" :disabled="targetCodeIsDisabled"
/> />
</el-form-item> </el-form-item>
<el-form-item v-if="formModel.trainType == '03'" :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber"> <el-form-item v-if="formModel.trainType == '03'" :label="this.$t('menu.category')+this.$t('global.colon')" prop="category">
<el-select <el-select
:id="domIdTrainNumber" :id="domIdTrainNumber"
v-model="formModel.groupNumber" v-model="formModel.category"
filterable filterable
:disabled="trainNumberIsDisabled" :disabled="true"
@change="trainNumberChange"
> >
<el-option <el-option
v-for="train in trainList" v-for="item in categoryList"
:key="train.groupNumber" :key="item.value"
:label="train.groupNumber" :label="item.name"
:value="train.groupNumber" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -99,12 +98,16 @@ export default {
data() { data() {
return { return {
trainList: [], trainList: [],
categoryList: [
{ name: 'MM', value: '01' }
],
formModel: { formModel: {
tripNumber: '', tripNumber: '',
groupNumber: '', groupNumber: '',
trainType: '01', trainType: '01',
serviceNumber: '', serviceNumber: '',
targetCode: '' targetCode: '',
category: 'MM'
}, },
rules: { rules: {
@ -252,6 +255,15 @@ export default {
'formModel.tripNumber': function(val) { 'formModel.tripNumber': function(val) {
if (val.length == 4) { if (val.length == 4) {
this.trainNoChange(val); this.trainNoChange(val);
} else {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: val,
trainType: this.formModel.trainType,
serviceNumber: '',
targetCode: '',
category: 'MM'
};
} }
} }
}, },
@ -278,12 +290,12 @@ export default {
const model = this.$store.getters['map/getDeviceByCode'](selected.code); const model = this.$store.getters['map/getDeviceByCode'](selected.code);
this.formModel = { this.formModel = {
groupNumber: model.groupNumber, groupNumber: model.groupNumber,
tripNumber: model.tripNumber, tripNumber: `${model.directionCode}${model.tripNumber}`,
trainType: model.type, trainType: model.type,
serviceNumber: '', serviceNumber: model.serviceNumber,
targetCode: '' targetCode: model.targetCode,
category: 'MM'
}; };
debugger;
/** 加载列车数据*/ /** 加载列车数据*/
this.loadInitData(this.map); this.loadInitData(this.map);
@ -340,7 +352,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
val: `${tripNumber}`, val: tripNumber,
operation: '' operation: ''
}; };
@ -351,16 +363,27 @@ export default {
} }
OperateHandler.backStep(1); OperateHandler.backStep(1);
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
console.log(valid, response, 111); if (valid) {
if (valid && response.data) { if (response.data) {
this.formModel = { this.formModel = {
groupNumber: this.formModel.groupNumber, groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber, tripNumber: tripNumber,
trainType: '01', trainType: this.formModel.trainType,
serviceNumber: response.data.serviceNumber, serviceNumber: response.data.serviceNumber,
targetCode: response.data.tripNumber targetCode: response.data.targetCode,
category: 'MM'
}; };
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: this.formModel.trainType,
serviceNumber: '',
targetCode: '',
category: 'MM'
};
}
} }
}); });
}, },
@ -413,7 +436,7 @@ export default {
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation, operation: OperationEvent.Train.editTrainId.menu.operation,
messages: [this.$t('tip.editTrainIdTip')], messages: [this.$t('tip.editTrainIdTip')],
val: `01::${this.formModel.tripNumber}` val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
}; };
this.loading = true; this.loading = true;

View File

@ -22,6 +22,7 @@ import JointTraining from '@/views/jointTraining/index';
import Error401 from '@/views/error-page/401'; import Error401 from '@/views/error-page/401';
import Errpr404 from '@/views/error-page/404'; import Errpr404 from '@/views/error-page/404';
import SkinCode from '@/views/map/skinCode/index'; import SkinCode from '@/views/map/skinCode/index';
import SkinCodeDraft from '@/views/map/skinCode/draft'; import SkinCodeDraft from '@/views/map/skinCode/draft';
import Mapdraft from '@/views/map/mapdraft/index'; import Mapdraft from '@/views/map/mapdraft/index';
@ -29,6 +30,7 @@ import Mapedit from '@/views/map/mapdraft/mapedit/index';
import Runplan from '@/views/map/runplan/index'; import Runplan from '@/views/map/runplan/index';
import MapProduct from '@/views/map/product/index'; import MapProduct from '@/views/map/product/index';
import RunplanView from '@/views/map/runplan/chart'; import RunplanView from '@/views/map/runplan/chart';
import Trainingrecord from '@/views/lesson/trainingrecord/index'; import Trainingrecord from '@/views/lesson/trainingrecord/index';
import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index'; import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index';
import Taskmanage from '@/views/lesson/taskmanage/list'; import Taskmanage from '@/views/lesson/taskmanage/list';
@ -37,6 +39,7 @@ import TrainingRuleEdit from '@/views/lesson/trainingRule/detail/index';
import Trainingmanage from '@/views/lesson/trainingmanage/index'; import Trainingmanage from '@/views/lesson/trainingmanage/index';
import LessonEdit from '@/views/lesson/lessoncategory/index'; import LessonEdit from '@/views/lesson/lessoncategory/index';
import LessonHome from '@/views/lesson/home'; import LessonHome from '@/views/lesson/home';
import LessonDetail from '@/views/lesson/details';
import ScriptmanageHome from '@/views/scriptManage/home'; import ScriptmanageHome from '@/views/scriptManage/home';
import ScriptDisplay from '@/views/scriptManage/display/index'; import ScriptDisplay from '@/views/scriptManage/display/index';
@ -60,7 +63,6 @@ import ScreenMonitorDetail from '@/views/screenMonitor/detail/index';
import PlanMonitorEditTool from '@/views/planMonitor/editTool/index'; import PlanMonitorEditTool from '@/views/planMonitor/editTool/index';
import PlanMonitorEditUserTool from '@/views/planMonitor/editTool/userindex'; import PlanMonitorEditUserTool from '@/views/planMonitor/editTool/userindex';
import PlanMonitor from '@/views/planMonitor/index'; import PlanMonitor from '@/views/planMonitor/index';
import PlanMonitorHome from '@/views/planMonitor/home'; import PlanMonitorHome from '@/views/planMonitor/home';
import PlanMonitorDetail from '@/views/planMonitor/detail'; import PlanMonitorDetail from '@/views/planMonitor/detail';
@ -94,12 +96,10 @@ import OrderList from '@/views/orderauthor/order/list';
import OrderDraft from '@/views/orderauthor/order/draft'; import OrderDraft from '@/views/orderauthor/order/draft';
import Author from '@/views/orderauthor/author/index'; import Author from '@/views/orderauthor/author/index';
import AuthorDraft from '@/views/orderauthor/author/draft/ruleForm'; import AuthorDraft from '@/views/orderauthor/author/draft/ruleForm';
import Permission from '@/views/orderauthor/permission/index'; import Permission from '@/views/orderauthor/permission/index';
import PermissionDetail from '@/views/orderauthor/permission/detail'; import PermissionDetail from '@/views/orderauthor/permission/detail';
import PermissionDraft from '@/views/orderauthor/permission/draft/ruleForm'; import PermissionDraft from '@/views/orderauthor/permission/draft/ruleForm';
import PermissionCreate from '@/views/orderauthor/permission/create/index'; import PermissionCreate from '@/views/orderauthor/permission/create/index';
import UserRules from '@/views/orderauthor/rules/index'; import UserRules from '@/views/orderauthor/rules/index';
import UserRulesDetail from '@/views/orderauthor/rules/detail'; import UserRulesDetail from '@/views/orderauthor/rules/detail';
@ -358,11 +358,11 @@ export const asyncRouter = [
component: Mapedit, component: Mapedit,
hidden: true hidden: true
}, },
{ // {
path: 'lesson/edit/:type', // path: 'lesson/edit/:type',
component: LessonEdit, // component: LessonEdit,
hidden: true // hidden: true
}, // },
{ {
path: 'runPlan/detail/:mapId', path: 'runPlan/detail/:mapId',
component: PlanMonitorDetail, component: PlanMonitorDetail,
@ -381,6 +381,18 @@ export const asyncRouter = [
component: LessonHome, component: LessonHome,
hidden: true hidden: true
}, },
{
path: 'lesson/details',
component: LessonDetail,
hidden: true,
children: [
{
path: 'edit/:type',
component: LessonEdit,
hidden: true
}
]
},
{ {
path: 'lesson/training/:trainingId/:trainingName', path: 'lesson/training/:trainingId/:trainingName',
component: TrainingrecordManage, component: TrainingrecordManage,

View File

@ -3,9 +3,9 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰 // BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
} else { } else {
BASE_API = process.env.VUE_APP_BASE_API; BASE_API = process.env.VUE_APP_BASE_API;

View File

@ -13,7 +13,7 @@
<b>{{ $t('global.courseName') }}: {{ lessonName }}</b> <b>{{ $t('global.courseName') }}: {{ lessonName }}</b>
</div> </div>
<div style="margin:50px"> <div style="margin:50px">
<p style="font-size: 14px; margin-bottom: 20px"> {{ $t('approval.courseDescription')}}: <p style="font-size: 14px; margin-bottom: 20px"> {{ $t('approval.courseDescription') }}:
<span style="color: #808080 !important;">{{ lessonRemark }}</span> <span style="color: #808080 !important;">{{ lessonRemark }}</span>
</p> </p>
</div> </div>
@ -25,17 +25,18 @@
row-key="id" row-key="id"
border border
default-expand-all default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"> :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column <el-table-column
prop="name" prop="name"
border border
:label="this.$t('approval.chapterTrainingName')"> :label="this.$t('approval.chapterTrainingName')"
</el-table-column> />
<el-table-column <el-table-column
prop="remarks" prop="remarks"
border border
:label="this.$t('approval.instructions')"> :label="this.$t('approval.instructions')"
</el-table-column> />
</el-table> </el-table>
</el-scrollbar> </el-scrollbar>
</el-card> </el-card>
@ -45,40 +46,40 @@
</template> </template>
<script> <script>
import {reviewLessonDetail} from '@/api/designPlatform'; import {reviewLessonDetail} from '@/api/designPlatform';
export default { export default {
name: 'LessonApprovalDetail', name: 'LessonApprovalDetail',
components: { components: {
}, },
watch: { data() {
return {
loading: false,
tableData: [],
lessonName: '',
lessonRemark: '',
showDetail: false
};
}, },
computed: { computed: {
height() { height() {
return this.$store.state.app.height - 260; return this.$store.state.app.height - 260;
} }
}, },
data() { watch: {
return{
loading: false,
tableData: [],
lessonName: '',
lessonRemark: '',
showDetail: false
}
}, },
created() { created() {
}, },
mounted() { mounted() {
// this.loadInitData(); // this.loadInitData();
}, },
beforeDestroy(){ beforeDestroy() {
}, },
methods: { methods: {
show(lessonId){ show(lessonId) {
this.showDetail = true; this.showDetail = true;
this.loadInitData(lessonId); this.loadInitData(lessonId);
}, },
@ -89,12 +90,12 @@
this.lessonName = response.data[0].name; this.lessonName = response.data[0].name;
this.lessonRemark = response.data[0].remarks; this.lessonRemark = response.data[0].remarks;
this.loading = false; this.loading = false;
}).catch(error=>{ }).catch(()=>{
this.$messageBox(this.$t('approval.failedToGetCourseData')) this.$messageBox(this.$t('approval.failedToGetCourseData'));
}); });
}, },
doClose() { doClose() {
} }
} }
} };
</script> </script>

View File

@ -1,31 +1,50 @@
<template> <template>
<div> <el-card>
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px' }"> <div slot="header" style="text-align: center;">
<b>{{ $t('lesson.courseName') + ': '+ name }}</b>
</div>
<div style="display: flex;align-items:flex-start">
<div class="tree_box">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-50) +'px' }">
<el-tree <el-tree
ref="tree" ref="tree"
style="width: 380px"
:data="treeList" :data="treeList"
node-key="id" node-key="id"
:props="defaultProps" :props="defaultProps"
default-expand-all
highlight-current highlight-current
:span="22" :span="22"
:filter-node-method="filterNode" :filter-node-method="filterNode"
:default-expanded-keys="expandList" :default-expanded-keys="expandList"
@node-contextmenu="showContextMenu"
@node-click="clickEvent" @node-click="clickEvent"
/> />
</el-scrollbar> </el-scrollbar>
</div>
<transition> <transition>
<router-view :style="{ position:'relative', left:widthLeft+'px', width: (width - widthLeft)+'px'}" :product-list="productList" /> <router-view />
</transition> </transition>
</div> </div>
</el-card>
</template> </template>
<script> <script>
import { getLessonTree } from '@/api/jmap/lessondraft'; import { getLessonTree } from '@/api/jmap/lessondraft';
import { DeviceMenu } from '@/scripts/ConstDic';
export default { export default {
name: 'LessonDetail', name: 'LessonDetail',
data() { data() {
return { return {
treeList: [],
defaultProps: {
children: 'children',
label: 'name',
disabled: this.showNode
},
name: '',
lessonId: '',
expandList: []
}; };
}, },
computed: { computed: {
@ -33,7 +52,7 @@ export default {
return this.$store.state.app.width - 481 - this.widthLeft; return this.$store.state.app.width - 481 - this.widthLeft;
}, },
height() { height() {
return this.$store.state.app.height - 90; return this.$store.state.app.height - 120;
} }
}, },
mounted() { mounted() {
@ -41,8 +60,53 @@ export default {
}, },
methods: { methods: {
initPageData() { initPageData() {
getLessonTree(this.$route.query.lessonId); getLessonTree(this.$route.query.lessonId || this.$route.query.id).then(resp => {
if (resp.data && resp.data[0]) {
this.name = resp.data[0].name;
this.lessonId = resp.data[0].id;
this.treeList = resp.data;
}
this.editLesson();
});
},
clickEvent(obj, node, ele) {
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
editLesson() {
this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.treeList[0].id, skinCode: this.$route.query.skinCode}} );
},
showNode(obj) {
return obj.type !== 'Training';
},
showContextMenu(e, obj, node, vueElem) {
if (obj && obj.type === 'TrainingType' || obj.type === 'Training') {
e.preventDefault();
this.point = {
x: e.clientX,
y: e.clientY
};
this.node = node;
const menu = DeviceMenu.Training;
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.tree_box{
position: relative;
left: 10px;
width: 400px;
padding-right: 10px;
}
.right_box{
}
</style>

View File

@ -342,6 +342,7 @@ export default {
}, },
goDetail(index, row) { goDetail(index, row) {
// this.$refs.lessonDetail.show(row.id); // this.$refs.lessonDetail.show(row.id);
this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, skinCode: this.$route.params.skinCode}});
} }
} }
}; };

View File

@ -44,12 +44,12 @@
<div class="draft"> <div class="draft">
<el-button-group> <el-button-group>
<template v-if="!isEdit"> <template v-if="!isEdit">
<el-button v-if="courseModel.skinCode" type="primary" @click="create">{{$t('global.create')}}</el-button> <el-button v-if="courseModel.skinCode" type="primary" @click="create">{{ $t('global.create') }}</el-button>
<el-button type="primary" @click="back">{{$t('global.back')}}</el-button> <el-button type="primary" @click="back">{{ $t('global.back') }}</el-button>
</template> </template>
<template v-else> <template v-else>
<el-button type="primary" @click="update">{{$t('global.update')}}</el-button> <el-button type="primary" @click="update">{{ $t('global.update') }}</el-button>
<el-button type="primary" @click="back">{{$t('global.back')}}</el-button> <el-button type="primary" @click="back">{{ $t('global.back') }}</el-button>
</template> </template>
</el-button-group> </el-button-group>
</div> </div>

View File

@ -16,7 +16,6 @@
</template> </template>
<script> <script>
import CourceCategory from './category/tree';
import LessonEdit from './edit/lesson/index'; import LessonEdit from './edit/lesson/index';
import ChapterEdit from './edit/chapter/index'; import ChapterEdit from './edit/chapter/index';
import SortTree from './edit/sorttree/index'; import SortTree from './edit/sorttree/index';
@ -25,7 +24,6 @@ import localStore from 'storejs';
export default { export default {
name: 'LessonDraft', name: 'LessonDraft',
components: { components: {
CourceCategory,
LessonEdit, LessonEdit,
ChapterEdit, ChapterEdit,
SortTree SortTree
@ -45,12 +43,12 @@ export default {
return this.$store.state.app.width - localStore.get('LeftWidth'); return this.$store.state.app.width - localStore.get('LeftWidth');
}, },
height() { height() {
return this.$store.state.app.height - 102; return this.$store.state.app.height - 125;
} }
}, },
mounted() { mounted() {
const data = this.$route.query; const data = this.$route.query;
switch (this.$route.params.type){ switch (this.$route.params.type) {
case 'lessonCreate': case 'lessonCreate':
this.lessonCreate(data); this.lessonCreate(data);
break; break;

View File

@ -1,6 +1,6 @@
<template> <template>
<el-card :style="{height: height+'px'}"> <el-card :style="{height: height+'px'}">
<div class="runPlanHeader"> <div class="runPlanHeader" style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
<div class="runPlanList">{{$t('planMonitor.openRunPlan.runPlanList')}}</div> <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> <el-button size="small" type="primary" @click="handleCreate" class="createRunPlan" v-if="isCreate">{{$t('planMonitor.createRunningDiagram')}}</el-button>
</div> </div>
@ -8,7 +8,7 @@
border border
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;"> style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
<el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" /> <el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" />
<el-table-column :label="this.$t('global.status')"> <el-table-column :label="this.$t('global.status')" v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag>{{handlerStatus(scope.row)}}</el-tag> <el-tag>{{handlerStatus(scope.row)}}</el-tag>
</template> </template>
@ -16,6 +16,7 @@
<el-table-column <el-table-column
prop="explanation" prop="explanation"
show-overflow-tooltip show-overflow-tooltip
v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))"
:label="this.$t('planMonitor.explanation')"> :label="this.$t('planMonitor.explanation')">
</el-table-column> </el-table-column>
<el-table-column :label="this.$t('planMonitor.creationDate')"> <el-table-column :label="this.$t('planMonitor.creationDate')">