Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_ls
This commit is contained in:
commit
ea99a2ed09
@ -64,6 +64,14 @@ export function publishTraining(data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 查询实现草稿发布轨迹 */
|
||||||
|
export function draftPubTrace(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v2/training/draft/pub/trace/find/page`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
/** 更新当前用户的某个实训草稿的大字段信息 */
|
/** 更新当前用户的某个实训草稿的大字段信息 */
|
||||||
export function updateTrainingContent(data) {
|
export function updateTrainingContent(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -10,6 +10,7 @@ export default {
|
|||||||
modify: 'modify',
|
modify: 'modify',
|
||||||
delete: 'delete',
|
delete: 'delete',
|
||||||
publish: 'publish',
|
publish: 'publish',
|
||||||
|
publishTrack: 'track',
|
||||||
preview: 'preview',
|
preview: 'preview',
|
||||||
mapLocation: 'Save map positioning',
|
mapLocation: 'Save map positioning',
|
||||||
saveBackground: 'Save Background',
|
saveBackground: 'Save Background',
|
||||||
|
@ -10,6 +10,7 @@ export default {
|
|||||||
modify: '修改',
|
modify: '修改',
|
||||||
delete: '删除',
|
delete: '删除',
|
||||||
publish: '发布',
|
publish: '发布',
|
||||||
|
publishTrack: '发布轨迹',
|
||||||
preview: '预览',
|
preview: '预览',
|
||||||
mapLocation: '保存地图定位',
|
mapLocation: '保存地图定位',
|
||||||
saveBackground: '保存背景',
|
saveBackground: '保存背景',
|
||||||
|
@ -7,17 +7,19 @@
|
|||||||
<el-button size="small" @click="showList">实训列表</el-button>
|
<el-button size="small" @click="showList">实训列表</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<TrainingList ref="trainingList" @updateDetails="updateDetails" @gradeRules="gradeRules" @closeAllDialog="closeAllDialog" />
|
<TrainingList ref="trainingList" @updateDetails="updateDetails" @gradeRules="gradeRules" @closeAllDialog="closeAllDialog" @draftTracK="draftTracK" />
|
||||||
<EditDetails ref="editDetails" :edit-data="editData" @openEditOperate="openEditOperate" @handleCondition="handleCondition" @publish="publish" @preview="preview" @gradeRules="gradeRules" />
|
<EditDetails ref="editDetails" :edit-data="editData" @openEditOperate="openEditOperate" @handleCondition="handleCondition" @publish="publish" @preview="preview" @gradeRules="gradeRules" />
|
||||||
<EditCondition ref="editCondition" v-dialogDrag :materials-list="materialsList" @editConditionFn="editConditionFn" @backStep="backStep" />
|
<EditCondition ref="editCondition" v-dialogDrag :materials-list="materialsList" @editConditionFn="editConditionFn" @backStep="backStep" />
|
||||||
<edit-operate ref="editOperate" v-dialogDrag @backStepList="backStepList" />
|
<edit-operate ref="editOperate" v-dialogDrag @backStepList="backStepList" />
|
||||||
<grade-rules ref="gradeRules" />
|
<grade-rules ref="gradeRules" />
|
||||||
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <!-- 成员管理 -->
|
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <!-- 成员管理 -->
|
||||||
<add-member ref="addMember" :station-list="stationList" />
|
<add-member ref="addMember" :station-list="stationList" />
|
||||||
|
<TrackList ref="trackList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import TrainingList from './trainingList.vue';
|
import TrainingList from './trainingList.vue';
|
||||||
|
import TrackList from './trackList.vue';
|
||||||
import EditDetails from './editDetails.vue';
|
import EditDetails from './editDetails.vue';
|
||||||
import EditCondition from './editCondition.vue';
|
import EditCondition from './editCondition.vue';
|
||||||
import EditOperate from './editOperate.vue';
|
import EditOperate from './editOperate.vue';
|
||||||
@ -31,6 +33,7 @@ export default {
|
|||||||
name:'DemonMenu',
|
name:'DemonMenu',
|
||||||
components:{
|
components:{
|
||||||
TrainingList,
|
TrainingList,
|
||||||
|
TrackList,
|
||||||
EditDetails,
|
EditDetails,
|
||||||
EditCondition,
|
EditCondition,
|
||||||
EditOperate,
|
EditOperate,
|
||||||
@ -45,7 +48,7 @@ export default {
|
|||||||
hoverBtn: false,
|
hoverBtn: false,
|
||||||
btnWidth: -600,
|
btnWidth: -600,
|
||||||
materialsList: [],
|
materialsList: [],
|
||||||
refsList: ['editDetails', 'editCondition'],
|
refsList: ['editDetails', 'editCondition', 'trackList'],
|
||||||
editData: {},
|
editData: {},
|
||||||
isAdmin: true
|
isAdmin: true
|
||||||
};
|
};
|
||||||
@ -81,7 +84,7 @@ export default {
|
|||||||
this.$refs.editDetails.backStep();
|
this.$refs.editDetails.backStep();
|
||||||
},
|
},
|
||||||
handleCondition(index, row, key) {
|
handleCondition(index, row, key) {
|
||||||
this.$refs.editCondition.doShow(row[key], index, key);
|
this.$refs.editCondition.doShow(row, index, key);
|
||||||
},
|
},
|
||||||
getMaterials() {
|
getMaterials() {
|
||||||
getTrainingMaterials().then(res => {
|
getTrainingMaterials().then(res => {
|
||||||
@ -100,6 +103,9 @@ export default {
|
|||||||
this.btnWidth = -600;
|
this.btnWidth = -600;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
draftTracK(row) {
|
||||||
|
this.$refs.trackList.doShow(row);
|
||||||
|
},
|
||||||
showList() {
|
showList() {
|
||||||
this.$refs.trainingList.doShow();
|
this.$refs.trainingList.doShow();
|
||||||
},
|
},
|
||||||
|
@ -61,6 +61,7 @@ export default {
|
|||||||
tabVisible: false,
|
tabVisible: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
roleDeviceCode: '', // 角色对应站点code
|
||||||
activeIndexPath: '',
|
activeIndexPath: '',
|
||||||
rowIndex: 0,
|
rowIndex: 0,
|
||||||
conditionKey: ''
|
conditionKey: ''
|
||||||
@ -106,6 +107,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
Object.values(this.mapStationDirectionData).forEach(item => {
|
Object.values(this.mapStationDirectionData).forEach(item => {
|
||||||
|
if (!this.roleDeviceCode || this.roleDeviceCode == item.relativeStationCode) {
|
||||||
let isAuto = true;
|
let isAuto = true;
|
||||||
if (item.runModel == 'S') {
|
if (item.runModel == 'S') {
|
||||||
isAuto = false;
|
isAuto = false;
|
||||||
@ -115,6 +117,7 @@ export default {
|
|||||||
name: `${item.name}_${item.labelEnum}(${isAuto ? '自动闭塞' : '半自动闭塞'})`,
|
name: `${item.name}_${item.labelEnum}(${isAuto ? '自动闭塞' : '半自动闭塞'})`,
|
||||||
_type: `${isAuto ? 'StationDirectionAuto' : 'StationDirectionSemi'}`
|
_type: `${isAuto ? 'StationDirectionAuto' : 'StationDirectionSemi'}`
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.getRouteList.forEach(item => {
|
this.getRouteList.forEach(item => {
|
||||||
list.push({
|
list.push({
|
||||||
@ -256,7 +259,10 @@ export default {
|
|||||||
this.$emit('backStep');
|
this.$emit('backStep');
|
||||||
this.doClose();
|
this.doClose();
|
||||||
},
|
},
|
||||||
doShow(data, rowIndex, conditionKey) {
|
doShow(row, rowIndex, conditionKey) {
|
||||||
|
const data = row[conditionKey];
|
||||||
|
const member = this.$store.state.training.memberData[row.memberId];
|
||||||
|
this.roleDeviceCode = member.deviceCode || '';
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.tabVisible = true;
|
this.tabVisible = true;
|
||||||
this.activeIndexPath = '';
|
this.activeIndexPath = '';
|
||||||
|
@ -268,6 +268,11 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCondition(index, row, key) {
|
handleCondition(index, row, key) {
|
||||||
console.log(key, '条件', index, row);
|
console.log(key, '条件', index, row);
|
||||||
|
const member = this.$store.state.training.memberData[row.memberId];
|
||||||
|
if (!member.userId) {
|
||||||
|
assignUsersPlayRoles([{ userId: this.$store.state.user.id, memberId: member.id}], this.$route.query.group).then(resp => {
|
||||||
|
}).catch(() => { this.$message.error('调整角色失败!'); });
|
||||||
|
}
|
||||||
this.$emit('handleCondition', index, row, key);
|
this.$emit('handleCondition', index, row, key);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
},
|
},
|
||||||
|
120
src/views/trainingManage/trackList.vue
Normal file
120
src/views/trainingManage/trackList.vue
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag title="草稿发布轨迹" :visible.sync="dialogVisible" width="1050px" :before-close="doClose" center>
|
||||||
|
<div>
|
||||||
|
<QueryListPage ref="queryListPage" :card-padding="10" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { draftPubTrace } from '@/api/trainingManage';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TrackList',
|
||||||
|
components:{},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
training: {},
|
||||||
|
draftId: '',
|
||||||
|
pagerConfig: {
|
||||||
|
pageSize: 'pageSize',
|
||||||
|
pageIndex: 'pageNum'
|
||||||
|
},
|
||||||
|
queryForm: {
|
||||||
|
labelWidth: '100px',
|
||||||
|
reset: true,
|
||||||
|
show:false
|
||||||
|
},
|
||||||
|
queryList: {
|
||||||
|
height: 500,
|
||||||
|
query: this.queryFunction,
|
||||||
|
selectCheckShow: false,
|
||||||
|
indexShow: true,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '实训草稿名称',
|
||||||
|
prop: 'draftName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '草稿实训是否存在',
|
||||||
|
prop: 'draftExist',
|
||||||
|
type: 'basicText',
|
||||||
|
columnValue: (row) => { return this.covertData(row, 'draftExist'); }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '已发布实训名称',
|
||||||
|
prop: 'pubName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '发布实训是否存在',
|
||||||
|
prop: 'pubExist',
|
||||||
|
type: 'basicText',
|
||||||
|
columnValue: (row) => { return this.covertData(row, 'pubExist'); }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '发布者名称',
|
||||||
|
prop: 'traceCreatorName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '发布时间',
|
||||||
|
prop: 'traceTime'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
group() {
|
||||||
|
return this.$route.query.group;
|
||||||
|
},
|
||||||
|
mapId() {
|
||||||
|
return this.$route.query.mapId;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
queryFunction(param) {
|
||||||
|
const params = {
|
||||||
|
...param,
|
||||||
|
desc: true,
|
||||||
|
draftId: this.draftId
|
||||||
|
};
|
||||||
|
return draftPubTrace(params);
|
||||||
|
},
|
||||||
|
doShow(row) {
|
||||||
|
console.log(row);
|
||||||
|
this.draftId = row.id;
|
||||||
|
this.getListData();
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
},
|
||||||
|
covertData(row, key) {
|
||||||
|
let s = '否';
|
||||||
|
if (row[key] == true) {
|
||||||
|
s = '是';
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
},
|
||||||
|
getListData() {
|
||||||
|
this.$refs.queryListPage && this.$refs.queryListPage.commitQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
/deep/ .el-dialog--center .el-dialog__body{
|
||||||
|
padding: 10px 25px 10px 25px;
|
||||||
|
}
|
||||||
|
.trainingHeader {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px 5px;
|
||||||
|
.flexNull {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag title="实训管理" :visible.sync="dialogVisible" width="1050px" :before-close="doClose" center>
|
<el-dialog v-dialogDrag title="实训管理" :visible.sync="dialogVisible" width="1250px" :before-close="doClose" center>
|
||||||
<div>
|
<div>
|
||||||
<div class="trainingHeader">
|
<div class="trainingHeader">
|
||||||
<div class="trainingList">实训草稿列表</div>
|
<div class="trainingList">实训草稿列表</div>
|
||||||
@ -82,7 +82,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('trainingManage.operate'),
|
title: this.$t('trainingManage.operate'),
|
||||||
width: '420',
|
width: '500',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('trainingManage.record'),
|
name: this.$t('trainingManage.record'),
|
||||||
@ -119,6 +119,12 @@ export default {
|
|||||||
handleClick: this.gradeRules,
|
handleClick: this.gradeRules,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
showControl:(row) => { return row.id; }
|
showControl:(row) => { return row.id; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: this.$t('trainingManage.publishTrack'),
|
||||||
|
handleClick: this.publishTrack,
|
||||||
|
type: 'primary',
|
||||||
|
showControl:(row) => { return row.id; }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -300,6 +306,9 @@ export default {
|
|||||||
this.$emit('gradeRules', row);
|
this.$emit('gradeRules', row);
|
||||||
// this.$refs.gradeRules.doShow();
|
// this.$refs.gradeRules.doShow();
|
||||||
},
|
},
|
||||||
|
publishTrack(index, row) {
|
||||||
|
this.$emit('draftTracK', row);
|
||||||
|
},
|
||||||
getListData() {
|
getListData() {
|
||||||
this.$refs.queryListPage && this.$refs.queryListPage.commitQuery();
|
this.$refs.queryListPage && this.$refs.queryListPage.commitQuery();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user