个人信息显示组织

This commit is contained in:
fan 2022-12-08 17:19:36 +08:00
parent a4b77f0e86
commit 9cbfd0068b
2 changed files with 8 additions and 102 deletions

View File

@ -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;

View File

@ -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();
},