This commit is contained in:
zyy 2019-11-14 09:22:06 +08:00
commit 9a87784c59
27 changed files with 572 additions and 342 deletions

View File

@ -115,3 +115,12 @@ export function putPermissionOwner(data) {
data: data.owner
});
}
/** 查询用户权限领取的用户列表 */
export function gotPermissionUserList(params) {
return request({
url: `/api/userPermission/gotUserList`,
method: 'get',
params: params
});
}

View File

@ -158,3 +158,10 @@ export function givePermission(data) {
});
}
/** 查询权限分发领取用户列表 */
export function distributeUsers(distributeId) {
return request({
url: `/api/distribute/${distributeId}/distributeUsers`,
method: 'get'
});
}

View File

@ -116,6 +116,7 @@
v-if="button.show === undefined ? ((button.showControl === undefined) ? true: button.showControl(scope.row)): button.show"
:key="idx"
size="mini"
style="margin-top: 5px;"
:type="button.type ? button.type : 'primary'"
:disabled="isTableBtnDisabled(button, scope.$index, scope.row)"
@click="button.handleClick(scope.$index, scope.row) "

View File

@ -104,5 +104,6 @@ export default {
getRealDeviceListFailed: 'Get real device list failed!',
deleteRealDeviceFailed: 'Delete real device failed!',
checkTheValidityFirst: 'Please check the validity first!',
permissionAtLeast:'At least one of the number of permissions is more than 0'
permissionAtLeast:'At least one of the number of permissions is more than 0',
permissionTimeError:'End time must be more than start time'
};

View File

@ -100,10 +100,10 @@ export default {
permission: 'Permission',
orderSelectionItem: 'Order selection item',
orderDetails: 'Order details',
universalPackage: '万能权限',
createPackage: '创建权限',
package: '权限包',
basePackage: '基础权限',
universalPackage: 'Universal permissions',
createPackage: 'Create permissions',
package: 'Permissions on the package',
basePackage: 'Basic permissions',
statusType: 'Status type',
private: 'Private',
public: 'Public',
@ -111,6 +111,8 @@ export default {
selectGoods: 'Select Goods',
month: ' month',
yuan: ' yuan',
back: '返回',
next: '下一步'
back: 'back',
next: 'next',
transferAttribution: 'Transfer attribution',
distributionAttribution: 'Distribution attribution'
};

View File

@ -36,5 +36,6 @@ export default {
numOfDistribute:'Num of distribute',
numOfTransfer:'Num of transfer',
transferTips:'You can receive multiple permissions at a time, and the permissions you receive can continue to be transferred.',
distributeTips:'Only one permission can be obtained at a time. The permission received is a dedicated permission and cannot be redistributed.'
distributeTips:'Only one permission can be obtained at a time. The permission received is a dedicated permission and cannot be redistributed.',
distributeId: 'Distribute id'
};

View File

@ -221,5 +221,6 @@ export default {
copyMapSuccess: 'Copy map success!',
copyMapFail: 'Copy map fail!',
pushNewsSuccess: 'Push news success!',
pushNewsFailed: 'Push news failed!'
pushNewsFailed: 'Push news failed!',
notViewTheCoursePaper: 'When the number of permissions is less than 10, no issue to view the course paper!'
};

View File

@ -104,5 +104,6 @@ export default {
getRealDeviceListFailed: '获取真实设备列表失败!',
deleteRealDeviceFailed: '删除真实设备失败!',
checkTheValidityFirst: '请先进行有效性检查!',
permissionAtLeast:'至少有一种权限的数量大于0'
permissionAtLeast:'至少有一种权限的数量大于0',
permissionTimeError:'结束时间必须大于开始时间'
};

View File

@ -111,5 +111,7 @@ export default {
month: '月',
yuan: '元',
back: '返回',
next: '下一步'
next: '下一步',
transferAttribution: '转赠归属',
distributionAttribution: '分发归属'
};

View File

@ -43,6 +43,6 @@ export default {
numOfDistribute:'分发权限数量',
numOfTransfer:'转赠权限数量',
transferTips:'一次可以领取多个权限,领到的权限可以继续转赠',
distributeTips:'一次只能领取一个权限,领到的权限是专用权限,不可再次分发'
distributeTips:'一次只能领取一个权限,领到的权限是专用权限,不可再次分发',
distributeId: '分发ID'
};

View File

@ -221,5 +221,6 @@ export default {
copyMapSuccess: '复制地图成功!',
copyMapFail: '复制地图失败!',
pushNewsSuccess: '推送消息成功!',
pushNewsFailed: '推送消息失败!'
pushNewsFailed: '推送消息失败!',
notViewTheCoursePaper: '权限数量小于10时无发查看课程试卷'
};

View File

@ -1,5 +1,6 @@
<template>
<el-menu
ref="keMenu"
class="navbar"
router
:default-active="activePath"
@ -100,6 +101,13 @@ export default {
'routers'
])
},
watch: {
$route(val) {
if (val.path === '/orderauthor/rules/manage') {
this.$refs.keMenu.activeIndex = val.path;
}
}
},
mounted() {
this.routes = this.$router.options.routes;
if (this.$route.fullPath.indexOf('design/userlist') >= 0) {

View File

@ -10,6 +10,7 @@
type="datetimerange"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
@change="changeSelectDate"
/>
</el-form-item>
@ -76,6 +77,11 @@ export default {
name: 'GiveLesson',
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() < new Date(new Date().toLocaleDateString()).getTime();
}
},
dialogVisible: false,
closable:false,
isDisabled:true,
@ -221,6 +227,10 @@ export default {
}
model.userPermissionAndAmountVOList.push({'userPermissionId':data.id, 'amount':data.chooseNumber});
});
if (model.endTime <= model.startTime) {
this.$messageBox( this.$t('error.permissionTimeError'));
return false;
}
if (count <= 0) {
this.$messageBox( this.$t('error.permissionAtLeast'));
return false;

View File

@ -10,6 +10,7 @@
type="daterange"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
@change="changeSelectDate"
/>
</el-form-item>
@ -76,6 +77,11 @@ export default {
name: 'TansferPermission',
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() < new Date(new Date().toLocaleDateString()).getTime();
}
},
dialogVisible: false,
closable:false,
isDisabled:true,
@ -151,7 +157,6 @@ export default {
}
},
methods: {
setTotalMax() {
let endTime;
let startTime;
@ -222,6 +227,10 @@ export default {
}
model.userPermissionAndAmountVOList.push({'userPermissionId':data.id, 'amount':data.chooseNumber});
});
if (model.endTime <= model.startTime) {
this.$messageBox( this.$t('error.permissionTimeError'));
return false;
}
if (count <= 0) {
this.$messageBox( this.$t('error.permissionAtLeast'));
return false;

View File

@ -34,12 +34,8 @@
ref="menuSchema"
:offset="offset"
:group="group"
@runPlanLoadShow="runPlanLoadShow"
@runPlanViewShow="runPlanViewShow"
@faultChooseShow="faultChooseShow"
@runQuestLoadShow="runQuestLoadShow"
@runAddRolesLoadShow="runAddRolesLoadShow"
@switchMode="switchMode"
@selectQuest="selectQuest"
/>
<menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
@ -48,18 +44,11 @@
<Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" />
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
<fault-choose ref="faultChoose" :group="group" />
<run-plan-Load ref="runPlanLoad" :group="group" />
<run-plan-view ref="runPlanView" :group="group" />
<add-quest ref="addQuest" @selectQuest="selectQuest" />
<scheduling v-if="isShowScheduling" ref="scheduling" :group="group" />
</div>
</template>
<script>
import RunPlanLoad from './demon/runPlanLoad';
import RunPlanView from './demon/runPlanView';
import FaultChoose from './demon/faultChoose';
import MapSystemDraft from '@/views/mapsystem/index';
import MenuExam from '@/views/display/menuExam';
import MenuLesson from '@/views/display/menuLesson';
@ -70,7 +59,6 @@ import MenuSchema from '@/views/display/menuSchema';
import MenuSystemTime from '@/views/display/menuSystemTime';
import MenuPlan from '@/views/display/menuPlan';
import MenuScript from '@/views/display/menuScript';
import AddQuest from './demon/addQuest';
import Scheduling from './demon/scheduling';
import { mapGetters } from 'vuex';
import { getTrainingDetail, getTrainingStepsDetail } from '@/api/jmap/training';
@ -90,10 +78,6 @@ import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
export default {
name: 'DisplayDraft',
components: {
RunPlanLoad,
RunPlanView,
FaultChoose,
AddQuest,
MenuExam,
MenuLesson,
MenuReplay,
@ -459,15 +443,6 @@ export default {
this.endViewLoading();
}
},
//
async runQuestLoadShow() {
this.$refs.addQuest.doShow();
},
async runAddRolesLoadShow() {
// this.$refs.addQuest.doShow();
const row = {id: this.$route.query.scriptId};
this.$refs.addQuest.handleLoad(1, row);
},
//
async selectQuest(row, id, mapLocation, roleName) {
try {
@ -564,15 +539,6 @@ export default {
this.panelShow = true;
this.drivingShow = false;
},
runPlanViewShow() {
this.$refs.runPlanView.doShow();
},
runPlanLoadShow() {
this.$refs.runPlanLoad.doShow();
},
faultChooseShow() {
this.$refs.faultChoose.doShow();
},
setWindowSize() {
this.$nextTick(() => {
const width = this.size ? this.size.width : this.width;

View File

@ -157,9 +157,9 @@ export default {
this.$store.dispatch('training/simulationStart').then(() => {
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
});
}).catch(() => {
}).catch(error => {
this.isDisable = false;
this.$messageBox(this.$t('display.demon.startSimulationFail'));
this.$messageBox(error.message + '' + this.$t('display.demon.startSimulationFail'));
});
},
end() {

View File

@ -1,4 +1,5 @@
<template>
<div>
<div class="schema" :style="{top: offset+'px'}">
<el-select v-if="isScript" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
@ -18,8 +19,17 @@
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('display.schema.faultOperation') }}</el-radio-button>
</el-radio-group>
</div>
<fault-choose v-if="isDemon || isPlan || isScript" ref="faultChoose" :group="group" />
<run-plan-Load ref="runPlanLoad" :group="group" />
<run-plan-view ref="runPlanView" :group="group" />
<add-quest ref="addQuest" @selectQuest="selectQuest" />
</div>
</template>
<script>
import RunPlanLoad from './demon/runPlanLoad';
import RunPlanView from './demon/runPlanView';
import FaultChoose from './demon/faultChoose';
import AddQuest from './demon/addQuest';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { getStationList, queryRunPlan } from '@/api/runplan';
@ -28,6 +38,12 @@ import {getRpDetailByUserMapId} from '@/api/designPlatform';
export default {
name: 'MenuSchema',
components: {
RunPlanLoad,
RunPlanView,
FaultChoose,
AddQuest
},
props: {
group: {
type: String,
@ -63,7 +79,6 @@ export default {
},
isScript() {
return this.$route.params.mode === 'script';
// return false;
},
isDemon() {
return this.$route.params.mode === 'demon';
@ -143,19 +158,23 @@ export default {
this.runing = run;
},
setFault() {
this.$emit('faultChooseShow');
this.$refs.faultChoose.doShow();
},
loadRunPlan() {
this.$emit('runPlanLoadShow');
this.$refs.runPlanLoad.doShow();
},
viewRunPlan() {
this.$emit('runPlanViewShow');
this.$refs.runPlanView.doShow();
},
viewRunQuest() {
this.$emit('runQuestLoadShow');
this.$refs.addQuest.doShow();
},
viewScriptRoles() {
this.$emit('runAddRolesLoadShow');
const row = {id: this.$route.query.scriptId};
this.$refs.addQuest.handleLoad(1, row);
},
selectQuest(row, id, mapLocation, roleName) {
this.$emit('selectQuest', row, id, mapLocation, roleName);
},
switchMode(swch) {
this.$emit('switchMode', swch);

View File

@ -46,7 +46,7 @@
<el-button type="success" @click="buy">{{ $t('exam.buy') }}</el-button>
<el-button v-if="hasPermssion" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button>
<el-button v-if="isAddRule" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
<el-button v-if="hasPermssion" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
<el-button type="primary" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>
</div>
</el-card>
@ -152,10 +152,14 @@ export default {
},
checkCourse() {
this.loading = true;
if (this.isAddRule) {
this.$router.push({
path: `${UrlConfig.trainingPlatform.examRuleManage}`,
query: { lessonId: this.courseModel.id }
});
} else {
this.$messageBox(this.$t('tip.notViewTheCoursePaper'));
}
},
transfer() { //
this.loading = false;

View File

@ -17,7 +17,7 @@
</p>
<p class="list-item">
<span class="list-label">{{ $t('exam.examTimeAvailable') + ':' }}</span>
<span class="list-elem">{{ parseInt(examDetails.duration) / 60 + $t('exam.minutes') }}</span>
<span class="list-elem" v-html="parseInt(examDetails.duration) / 60 + $t('exam.minutes')" />
</p>
<p class="list-item">
<span class="list-label">{{ $t('exam.fullMarksInTheExam') + ':' }}</span>
@ -74,7 +74,7 @@ export default {
endTime: '',
fullPoint: '',
passingPoint: '',
duration: '',
duration: 0,
type: ''
},
typeList: [],

View File

@ -180,7 +180,7 @@ export default {
this.group = this.$route.query.group;
this.$store.dispatch('training/over').then(() => {
putJointTrainingSimulationUser(this.group).then(() => {
this.$router.push({ path: `/trainroom`, query: { group: this.group } });
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode } });
exitFullscreen();
});
});

View File

@ -352,6 +352,7 @@ export default {
this.ibpShow = false;
},
showIbp(deviceCode) {
if (!this.ibpShow) {
this.drivingShow = false;
this.panelShow = false;
this.ibpShow = true;
@ -362,6 +363,7 @@ export default {
Message.closeAll();
}
this.$refs.ibpPlate.show(deviceCode, this.ibpPart);
}
},
hidepanel() {
this.panelShow = false;

View File

@ -70,7 +70,7 @@ export default {
tagType: (row) => {
switch (row.canDistribute) {
case true: return 'success';
case false: return 'warning';
case false: return 'danger';
}
}
},
@ -82,7 +82,7 @@ export default {
tagType: (row) => {
switch (row.forever) {
case true: return 'success';
case false: return 'warning';
case false: return 'danger';
}
}
},
@ -143,6 +143,12 @@ export default {
type: '',
showControl: (row) => { return row.status == '1' && (row.source == '02' || row.source == '04'); }
},
{
name: this.$t('orderAuthor.distributionAttribution'),
handleClick: this.handleBelongs,
type: '',
showControl: (row) => { return row.amount !== row.remains; }
},
{
name: this.$t('orderAuthor.recovery'),
handleClick: this.handleRestore,
@ -175,7 +181,7 @@ export default {
});
},
formatterDate(row, porpInfo) {
return row[porpInfo.property] ? row[porpInfo.property] : '---';
return row[porpInfo.property] ? row[porpInfo.property] : this.$t('global.perpetual');
},
queryFunction(params) {
return listPackagePermission(params);
@ -235,6 +241,9 @@ export default {
this.reloadTable();
});
}).catch(() => { });
},
handleBelongs(index, row) {
this.$router.push({ path: `/orderauthor/rules/manage`, query: {distributeId: row.id}});
}
}
};

View File

@ -0,0 +1,151 @@
<template>
<el-dialog v-dialogDrag :title="this.$t('orderAuthor.transferAttribution')" :visible.sync="dialogShow" width="90%" top="20px" :before-close="close">
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { gotPermissionUserList } from '@/api/management/author';
export default {
name: 'Belong',
components: {
},
props:{
permissionTypeList:{
required:true,
type:Array
}
},
data() {
return {
dialogShow: false,
userPermissionId: '',
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '140px',
reset: true,
show: false,
queryObject: {
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('permission.userName'),
prop: 'userName'
},
{
title: this.$t('permission.permissionName'),
width: '200',
prop: 'permissionName'
},
{
title: this.$t('permission.permissionType'),
prop: 'permissionType',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('permission.permissionUseType'),
prop: 'canDistribute',
type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
tagType: (row) => {
switch (row.canDistribute) {
case true: return 'success';
case false: return 'danger';
}
}
},
{
title: this.$t('permission.isForever'),
prop: 'forever',
type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
tagType: (row) => {
switch (row.forever) {
case true: return 'success';
case false: return 'warning';
}
}
},
{
title: this.$t('permission.permissionTotal'),
prop: 'amount'
},
{
title: this.$t('permission.permissionRemains'),
prop: 'remains'
},
{
title: this.$t('permission.startTime'),
prop: 'startTime',
type: 'formatter',
formatter: this.formatterDate
},
{
title: this.$t('permission.endTime'),
prop: 'endTime',
type: 'formatter',
formatter: this.formatterDate
},
{
title: this.$t('permission.permissionStatus'),
prop: 'status',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
default: return 'danger';
}
}
}
],
actions: [
]
}
};
},
methods: {
doShow(id) {
this.userPermissionId = id;
this.dialogShow = true;
this.reloadTable();
},
close() {
this.id = '';
this.dialogShow = false;
},
queryFunction(params) {
if (this.userPermissionId) {
params['userPermissionId'] = this.userPermissionId;
return gotPermissionUserList(params);
}
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
},
turnback() {
this.$router.go(-1);
}
}
};
</script>

View File

@ -2,21 +2,26 @@
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<detail ref="detail" :permission-type-list="PermissionTypeList" />
<belong ref="belong" :permission-type-list="PermissionTypeList" :effective-type-list="EffectiveTypeList" />
</div>
</template>
<script>
import { listPermision, setLessonPermisson } from '@/api/management/author';
import Detail from './detail';
import Belong from './belong';
import localStore from 'storejs';
export default {
name: 'Author',
components: {
Detail
Detail,
Belong
},
data() {
return {
PermissionTypeList: [],
belongForm: {},
EffectiveTypeList: [],
pagerConfig: {
pageSize: 'pageSize',
@ -49,6 +54,13 @@ export default {
{ value: true, label: this.$t('permission.public')}
]
}
},
distributeId: {
type: 'text',
label: this.$t('permission.distributeId'),
config: {
data: []
}
}
}
},
@ -63,7 +75,7 @@ export default {
},
{
title: this.$t('permission.permissionName'),
width: '260',
width: '200',
prop: 'permissionName'
},
{
@ -81,7 +93,7 @@ export default {
tagType: (row) => {
switch (row.canDistribute) {
case true: return 'success';
case false: return 'warning';
case false: return 'danger';
}
}
},
@ -93,7 +105,7 @@ export default {
tagType: (row) => {
switch (row.forever) {
case true: return 'success';
case false: return 'warning';
case false: return 'danger';
}
}
},
@ -133,24 +145,24 @@ export default {
{
type: 'button',
title: this.$t('global.operate'),
width: '200',
width: '300',
buttons: [
{
name: this.$t('orderAuthor.setupFailure'),
handleClick: this.handleEfficacy,
type: 'warning',
showControl: (row) => {
return row.status == '1';
return row.status === '1';
}
},
{
name: this.$t('orderAuthor.transferAttribution'),
handleClick: this.handleBelongs,
type: '',
showControl: (row) => {
return row.status === '1' && row.amount !== row.remains;
}
},
// {
// name: this.$t('orderAuthor.setupEffective'),
// type: 'primary',
// handleClick: this.handleEfficacy,
// showControl: (row) => {
// return row.status == '0';
// }
// },
{
name: this.$t('global.details'),
handleClick: this.handleRoleVest,
@ -165,6 +177,10 @@ export default {
}
};
},
created() {
this.handleOriginalForm();
},
mounted() {
this.loadInitData();
},
@ -172,6 +188,17 @@ export default {
handleRoleVest(index, row) {
this.$refs.detail.doShow(row.permissionId);
},
handleOriginalForm() {
if (this.$route.query.distributeId) {
const form = localStore.get(this.$route.path);
form.distributeId = this.$route.query.distributeId;
localStore.set(this.$route.path, form);
} else {
const form = localStore.get(this.$route.path);
form.distributeId = '';
localStore.set(this.$route.path, form);
}
},
loadInitData() {
this.$Dictionary.effectiveType().then(list => {
list.forEach(elem => {
@ -181,18 +208,14 @@ export default {
return true;
});
});
// this.$Dictionary.permissionType().then(list => {
// list.forEach(elem => {
// this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
// });
// this.$convertList(list, this.PermissionTypeList, elem => {
// return true;
// });
// });
this.$Dictionary.permissionType().then(list => {
this.$convertList(list, this.PermissionTypeList, elem => {
return true;
});
});
},
formatterDate(row, porpInfo) {
return row[porpInfo.property] ? row[porpInfo.property] : '---';
return row[porpInfo.property] ? row[porpInfo.property] : this.$t('global.perpetual');
},
queryFunction(params) {
return listPermision(params);
@ -216,6 +239,9 @@ export default {
this.reloadTable();
});
}).catch(() => { });
},
handleBelongs(index, row) {
this.$refs.belong.doShow(row.id);
}
}
};

View File

@ -120,7 +120,7 @@ export default {
}
],
actions: [
{ text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack }
// { text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack } //
]
}
};
@ -173,7 +173,7 @@ export default {
});
},
formatterDate(row, porpInfo) {
return row[porpInfo.property] ? row[porpInfo.property] : '---';
return row[porpInfo.property] ? row[porpInfo.property] : this.$t('global.perpetual');
},
queryFunction(params) {
if (this.$route.params.mapId) {