Merge branch 'dev' of https://git.cloud.tencent.com/joylink/jl-nclient into dev
This commit is contained in:
commit
30433bfcd0
@ -60,17 +60,6 @@ export function getTrainingDetail(args) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取实训详细内容*/
|
||||
export function getTrainingMapDetail(args) {
|
||||
return request({
|
||||
url: `/api/training/${args.id}/map`,
|
||||
method: 'get',
|
||||
params: {
|
||||
group: args.group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加实训*/
|
||||
export function addTraining(data) {
|
||||
return request({
|
||||
|
@ -1,8 +1,8 @@
|
||||
export default {
|
||||
code: 'code',
|
||||
name: 'name',
|
||||
status: 'status',
|
||||
remarks: 'remarks',
|
||||
code: 'Code',
|
||||
name: 'Name',
|
||||
status: 'Status',
|
||||
remarks: 'Remarks',
|
||||
createDirectory: 'Create dictionary',
|
||||
editDictionary: 'Edit dictionary',
|
||||
deleteSuccess: 'Successful deletion',
|
||||
@ -10,7 +10,16 @@ export default {
|
||||
createSuccess: 'Create successful',
|
||||
updateSuccess: 'Update successful',
|
||||
destory: 'Destory',
|
||||
simulationGroup: 'Simulation group',
|
||||
username: 'User name',
|
||||
phoneNumber: 'Cell-phone number'
|
||||
simulationGroup: 'Simulation Group',
|
||||
username: 'User Name',
|
||||
phoneNumber: 'Cell-phone Number',
|
||||
skinCode: 'Skin Code',
|
||||
prdType: 'Product Type',
|
||||
simulationType: 'Simulation Type',
|
||||
simulationGroupId: 'Simulation Member ID',
|
||||
productName: 'Product Name',
|
||||
isError: 'Is Error',
|
||||
isSuspend: 'Is Suspend',
|
||||
isDrivingAsplanned: 'Whether to drive as planned',
|
||||
delUserSimulationIsContinue: 'This operation will delete the user simulation data. Do you want to continue?'
|
||||
};
|
||||
|
@ -12,5 +12,14 @@ export default {
|
||||
destory: '销 毁',
|
||||
simulationGroup: '仿真Group',
|
||||
username: '用户名',
|
||||
phoneNumber: '手机号'
|
||||
phoneNumber: '手机号',
|
||||
skinCode: '皮肤编号',
|
||||
prdType: '产品类型',
|
||||
simulationType: '仿真类型',
|
||||
simulationGroupId: '仿真成员ID',
|
||||
productName: '产品名称',
|
||||
isError: '是否错误',
|
||||
isSuspend: '是否暂停',
|
||||
isDrivingAsplanned: '是否按计划行车',
|
||||
delUserSimulationIsContinue: '此操作将删除此用户仿真数据, 是否继续?'
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ export function loadMapData(skinCode) {
|
||||
});
|
||||
}
|
||||
|
||||
export function loadMapDataById(mapId) {
|
||||
export function loadMapDataById(mapId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getPublishMapVersionById(mapId).then(resp => {
|
||||
var version = resp.data;
|
||||
|
@ -169,6 +169,9 @@ export default {
|
||||
},
|
||||
isDrive() {
|
||||
return this.$route.query.prdType == '04';
|
||||
},
|
||||
trainingId() {
|
||||
return this.$route.query.trainingId;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -343,11 +346,10 @@ export default {
|
||||
this.$store.dispatch('training/end', null);
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
|
||||
const trainingId = this.$route.query.trainingId;
|
||||
if (parseInt(trainingId)) {
|
||||
if (parseInt(this.trainingId)) {
|
||||
// 设置地图数据
|
||||
// 设置实训数据
|
||||
const resp = await getTrainingStepsDetail(trainingId, { group: this.group });
|
||||
const resp = await getTrainingStepsDetail(this.trainingId, { group: this.group });
|
||||
if (resp && resp.code == 200) {
|
||||
const stepdData = this.trainingObj = resp.data;
|
||||
const rest = await getProductDetail(stepdData.prdCode);
|
||||
|
@ -65,7 +65,7 @@ export default {
|
||||
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {
|
||||
const h = this.$createElement;
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
title: this.$t('global.tips'),
|
||||
message: h('i', { style: 'color:' + opt.color }, '请点击开始考试操作')
|
||||
});
|
||||
}
|
||||
|
@ -38,7 +38,13 @@ export default {
|
||||
...mapGetters('map', [
|
||||
'mapData',
|
||||
'mapDeviceStatus'
|
||||
])
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
trainingId() {
|
||||
return this.$route.params.trainingId;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route(newVal) {
|
||||
@ -66,15 +72,12 @@ export default {
|
||||
this.$store.dispatch('training/reset');
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
|
||||
const trainingId = this.$route.params.trainingId;
|
||||
const group = this.$route.query.group;
|
||||
if (parseInt(trainingId)) {
|
||||
this.trainingObj = { id: trainingId, name: this.$route.params.trainingName };
|
||||
if (parseInt(this.trainingId)) {
|
||||
this.trainingObj = { id: this.trainingId, name: this.$route.params.trainingName };
|
||||
// 获取实训的详细数据
|
||||
// 加载地图数据
|
||||
// 设置实训数据
|
||||
|
||||
getTrainingStepsDetail(trainingId, { group }).then(response => {
|
||||
getTrainingStepsDetail(this.trainingId, { group: this.group }).then(response => {
|
||||
const stepdData = response.data;
|
||||
getProductDetail(stepdData.prdCode).then(res => {
|
||||
loadMapData(stepdData.skinCode).then(() => {
|
||||
|
@ -19,7 +19,7 @@ export default {
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
labelWidth: '130px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
group: {
|
||||
@ -36,21 +36,21 @@ export default {
|
||||
},
|
||||
skinCode: {
|
||||
type: 'select',
|
||||
label: '皮肤编号',
|
||||
label: this.$t('system.skinCode'),
|
||||
config: {
|
||||
data: this.$ConstSelect.skinCode
|
||||
}
|
||||
},
|
||||
prdType: {
|
||||
type: 'select',
|
||||
label: '产品类型',
|
||||
label: this.$t('system.prdType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
type: {
|
||||
type: 'select',
|
||||
label: '仿真类型',
|
||||
label: this.$t('system.simulationType'),
|
||||
config: {
|
||||
data: this.$ConstSelect.SimulationType
|
||||
}
|
||||
@ -64,11 +64,11 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '用户名称',
|
||||
title: this.$t('system.username'),
|
||||
prop: 'creator.name'
|
||||
},
|
||||
{
|
||||
title: '用户电话',
|
||||
title: this.$t('system.phoneNumber'),
|
||||
prop: 'creator.mobile'
|
||||
},
|
||||
{
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
prop: 'group'
|
||||
},
|
||||
{
|
||||
title: '是否错误',
|
||||
title: this.$t('system.isError'),
|
||||
prop: 'error',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.error, 'Whether'); },
|
||||
@ -88,11 +88,11 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '产品',
|
||||
title: this.$t('system.productName'),
|
||||
prop: 'mapPrdVO.name'
|
||||
},
|
||||
{
|
||||
title: '是否暂停',
|
||||
title: this.$t('system.isSuspend'),
|
||||
prop: 'pause',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.pause, 'Whether'); },
|
||||
@ -104,7 +104,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '是否按计划行车',
|
||||
title: this.$t('system.isDrivingAsplanned'),
|
||||
prop: 'runAsPlan',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.runAsPlan, 'Whether'); },
|
||||
@ -116,21 +116,21 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '皮肤编号',
|
||||
title: this.$t('system.skinCode'),
|
||||
prop: 'skinCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.$ConstSelect.skinCode, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '仿真类型',
|
||||
title: this.$t('system.simulationType'),
|
||||
prop: 'type',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.type, this.$ConstSelect.SimulationType, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '仿真成员ID',
|
||||
title: this.$t('system.simulationGroupId'),
|
||||
prop: 'sessionList',
|
||||
type: 'basicText',
|
||||
columnValue: (row) => { return this.listJoiningTogether(row.sessionList); }
|
||||
@ -170,17 +170,17 @@ export default {
|
||||
return sessionId;
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除此用户仿真数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('global.delUserSimulationIsContinue'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteExistingSimulation(row.group).then(response => {
|
||||
this.$message.success('删除成功');
|
||||
this.$message.success(this.$t('system.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox('删除失败');
|
||||
this.$messageBox(this.$t('error.deleteFailed'));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user