个人信息显示组织
This commit is contained in:
parent
a4b77f0e86
commit
9cbfd0068b
@ -172,6 +172,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_box">
|
||||
<div class="title">组织:</div>
|
||||
<div class="content_box_info">{{ userInfo.companyName }}</div>
|
||||
</div>
|
||||
<div class="form_box">
|
||||
<div class="title">{{ $t('global.passWord') }}:</div>
|
||||
<div class="content_box_info">
|
||||
@ -286,7 +290,8 @@ export default {
|
||||
mobile: '',
|
||||
email: '',
|
||||
passWord: '',
|
||||
companyId: ''
|
||||
companyId: '',
|
||||
companyName: ''
|
||||
},
|
||||
editInfo: {
|
||||
name: '',
|
||||
@ -374,7 +379,8 @@ export default {
|
||||
mobile: user.mobile,
|
||||
email: user.email,
|
||||
passWord: '',
|
||||
companyId: user.companyId
|
||||
companyId: user.companyId,
|
||||
companyName: user.companyName
|
||||
};
|
||||
this.wmOpenId = user.wmOpenId || '';
|
||||
this.oldPassWord = user.password;
|
||||
|
@ -13,13 +13,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic, getTopic } from '@/utils/stomp';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
|
||||
import { getMemberListCommon, getUserListCommon } from '@/api/rtSimulation';
|
||||
import BaSiDi from './baSiDi';
|
||||
import RpsDialog from './rps';
|
||||
import TroDialog from './tro';
|
||||
@ -67,15 +64,6 @@ export default {
|
||||
mode() {
|
||||
return this.$route.params.mode;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
isDemon() {
|
||||
return this.mode === 'demon' && !this.project.includes('drts');
|
||||
},
|
||||
isContest() {
|
||||
return this.mode === 'demon' && this.project.includes('drts');
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
@ -85,41 +73,19 @@ export default {
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
},
|
||||
projectDevice() {
|
||||
return this.$route.query.projectDevice;
|
||||
},
|
||||
isRunPlan() {
|
||||
return this.$store.state.training.started;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() { // 窗口缩放
|
||||
this.setWindowSize();
|
||||
},
|
||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
if (this.planRunning) {
|
||||
this.$store.dispatch('training/simulationStart');
|
||||
}
|
||||
},
|
||||
'$store.state.socket.memberChangeCount': function () { // 仿真成员变更
|
||||
this.initMemberUserInfo();
|
||||
},
|
||||
'$store.state.socket.simulationStart':function(val) {
|
||||
if (val) {
|
||||
this.$store.dispatch('training/simulationStart');
|
||||
}
|
||||
},
|
||||
$route() {
|
||||
if (!this.isLesson && !this.isExam) {
|
||||
this.initLoadData();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') {
|
||||
@ -137,8 +103,6 @@ export default {
|
||||
const _that = this;
|
||||
window.onbeforeunload = () => { _that.clearSubscribe(); _that.clearSubscribeNew(); };
|
||||
this.setWindowSize();
|
||||
this.initLoadData();
|
||||
this.initMemberUserInfo(true);
|
||||
this.$store.dispatch('app/animationsClose');
|
||||
this.$refs.troDialog.doClose();
|
||||
},
|
||||
@ -177,76 +141,12 @@ export default {
|
||||
openTra() {
|
||||
this.$refs.traDialog.doShow();
|
||||
},
|
||||
initMemberUserInfo(isFirst = false) {
|
||||
if (this.$route.query.newApi + '' === 'true') {
|
||||
getMemberListCommon(this.$route.query.group).then(resp => {
|
||||
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.$store.state.user.id });
|
||||
getUserListCommon(this.$route.query.group).then(res => {
|
||||
this.$store.dispatch('training/setSimulationUserList', res.data);
|
||||
if (isFirst) { this.subscribeNew(); }
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取所有仿真用户失败!');
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取仿真成员列表失败!');
|
||||
});
|
||||
} else {
|
||||
// 获取仿真成员列表
|
||||
getSimulationMemberList(this.$route.query.group).then(resp => {
|
||||
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.$store.state.user.id });
|
||||
getAllSimulationUser(this.$route.query.group).then(res => {
|
||||
this.$store.dispatch('training/setSimulationUserList', res.data);
|
||||
if (isFirst) {
|
||||
this.subscribe();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取所有仿真用户失败!');
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取仿真成员列表失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
// 设置各个按钮的定位
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.offset = 10;
|
||||
this.offsetBottom = 15;
|
||||
const menuBar = document.getElementById('menuBar');
|
||||
const menuTool = document.getElementById('menuTool');
|
||||
const menuBottom = document.getElementById('menuButton');
|
||||
const menuButtonsBox = document.getElementById('menuButtons_box');
|
||||
const textStatus = document.getElementById('textStatus');
|
||||
if (menuBar) {
|
||||
this.offset = (menuBar.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (menuTool) {
|
||||
this.offset = (menuTool.offsetHeight || 0) + 15;
|
||||
}
|
||||
const buttonWidth = this.width - 1200; // B box widht
|
||||
if (menuBottom && buttonWidth < 780) {
|
||||
this.offsetBottom = (menuBottom.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (menuButtonsBox) {
|
||||
this.tipBottom = (menuButtonsBox.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (textStatus) {
|
||||
this.textStatusHeight = textStatus.offsetHeight || 0;
|
||||
textStatus.style.top = this.offset - 15 + 'px';
|
||||
}
|
||||
});
|
||||
},
|
||||
// 缩放设置
|
||||
setWindowSize() {
|
||||
const width = this.width;
|
||||
const height = this.height;
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
},
|
||||
// 初始化
|
||||
initLoadData() {
|
||||
this.group = this.$route.query.group;
|
||||
this.$store.dispatch('training/reset');
|
||||
},
|
||||
troClick() {
|
||||
this.$refs.troDialog.doShow();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user