Merge remote-tracking branch 'remotes/origin/master' into dev
# Conflicts: # src/i18n/langs/zh/rules.js # src/views/trainRoom/index.vue
This commit is contained in:
commit
fd2b66e984
42
src/App.vue
42
src/App.vue
@ -1,12 +1,52 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
<deomon-topic ref="deomonTopic"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { handleToken } from '@/utils/auth';
|
||||
import { creatSubscribe, perpetualTopic } from '@/utils/stomp';
|
||||
import DeomonTopic from '@/views/demonstration/deomonTopic';
|
||||
export default {
|
||||
name: 'App'
|
||||
name: 'App',
|
||||
components: {
|
||||
DeomonTopic
|
||||
// QuickMenu
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.roomInvite': function (val) {
|
||||
if (val.creatorId) {
|
||||
this.subscribeMessage(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.prohibitSystemContextMenu();
|
||||
this.subscribe();
|
||||
},
|
||||
methods: {
|
||||
prohibitSystemContextMenu() {
|
||||
window.document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
},
|
||||
subscribe() {
|
||||
this.$nextTick(() => {
|
||||
if (!this.$route.path.includes('/login') && this.$route.path != '/404') {
|
||||
const header = { group: '', 'X-Token': handleToken() };
|
||||
creatSubscribe(perpetualTopic, header);
|
||||
}
|
||||
});
|
||||
},
|
||||
subscribeMessage(res) {
|
||||
if (this.$refs.deomonTopic) {
|
||||
this.$refs.deomonTopic.doShow(res);
|
||||
this.$store.dispatch('socket/setRoomInvite');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
@ -427,6 +427,6 @@ export default {
|
||||
|
||||
thenList: '交路列表',
|
||||
startStation: '起始站',
|
||||
endStation: '终到站',
|
||||
endStation: '终到站'
|
||||
|
||||
};
|
||||
|
@ -133,6 +133,6 @@ export default {
|
||||
proximitySection: '请选择接近区段',
|
||||
accessPropertyType: '请选择进路性质类型',
|
||||
autoRouteType: '请选择自动进路类型',
|
||||
physicalSegmentData: '请选择进路物理区段数据',
|
||||
physicalSegmentData: '请选择进路物理区段数据'
|
||||
|
||||
};
|
||||
|
@ -4,16 +4,19 @@
|
||||
<span style="color: white;">{{ item.name }}</span>
|
||||
</el-menu-item>
|
||||
<deomon-list ref="deomonList" />
|
||||
<qcode ref="qcode" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DeomonList from '@/views/demonstration/deomonList';
|
||||
import Qcode from './Qcode';
|
||||
|
||||
export default {
|
||||
name: 'Entry',
|
||||
components: {
|
||||
DeomonList
|
||||
DeomonList,
|
||||
Qcode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -21,6 +24,10 @@ export default {
|
||||
{
|
||||
name: this.$t('global.quickEntry'),
|
||||
handle: this.quickEntry
|
||||
},
|
||||
{
|
||||
name: '扫码',
|
||||
handle: this.qcodeEntry
|
||||
}
|
||||
],
|
||||
stomp: null,
|
||||
@ -39,11 +46,16 @@ export default {
|
||||
methods: {
|
||||
quickEntry() {
|
||||
this.$refs.deomonList.doShow();
|
||||
},
|
||||
qcodeEntry() {
|
||||
this.$refs.qcode.doShow();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
||||
.avatar-wrapper{
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
93
src/layout/components/Qcode.vue
Normal file
93
src/layout/components/Qcode.vue
Normal file
@ -0,0 +1,93 @@
|
||||
<template>
|
||||
<el-dialog title="输入房间号" :visible.sync="centerDialogVisible" width="30%" center>
|
||||
<el-input v-model="input" placeholder="请输入房间号" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="comit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPermissionJoint } from '@/api/chat';
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
data() {
|
||||
return {
|
||||
centerDialogVisible: false,
|
||||
input: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShow() {
|
||||
return process.env.NODE_ENV == 'development';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.centerDialogVisible = true;
|
||||
},
|
||||
doClose() {
|
||||
this.centerDialogVisible = false;
|
||||
},
|
||||
async comit() {
|
||||
if (this.input) {
|
||||
try {
|
||||
await getPermissionJoint(`${this.input}`);
|
||||
this.centerDialogVisible = false;
|
||||
} catch (error) {
|
||||
this.$messageBox('扫码错误:' + error.message);
|
||||
}
|
||||
} else {
|
||||
this.$messageBox('请输入房间号');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.dashboard {
|
||||
&-container {
|
||||
margin: 30px;
|
||||
}
|
||||
|
||||
&-text {
|
||||
font-size: 30px;
|
||||
line-height: 46px;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-carousel {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.home-box {
|
||||
float: left;
|
||||
width: 100%;
|
||||
font-family: 'Microsoft YaHei';
|
||||
|
||||
.title {
|
||||
font-size: 45px;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
border-bottom: 2px dashed #333;
|
||||
padding-bottom: 15px;
|
||||
margin: 50px 200px 120px 200px;
|
||||
position: relative;
|
||||
|
||||
.logo-img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 55px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-box {
|
||||
width: 100%;
|
||||
padding: 0 300px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -7,6 +7,7 @@ var Stomp = require('stompjs');
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const websocketUrl = `${getBaseUrl()}/joylink-websocket?token=`;
|
||||
// const websocketUrl = `http://192.168.3.6:9000/joylink-websocket?token=`;
|
||||
|
||||
var StompClient = function (headers) {
|
||||
this.url = websocketUrl + handleToken();
|
||||
|
@ -9,7 +9,7 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<!-- <el-input placeholder="输入关键字进行过滤" v-model="filterText"></el-input> -->
|
||||
<!-- <el-input v-model="filterText" placeholder="输入关键字进行过滤" /> -->
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: height+'px'}">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>地图列表</span>
|
||||
<div v-if="role" class="back-home" @click="backHome">返回首页</div>
|
||||
<!-- <div v-if="role" class="back-home" @click="backHome">返回首页</div> -->
|
||||
</div>
|
||||
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" @filterSelectChange="refresh" @changeFilter="clearMapSelect" />
|
||||
<el-input v-model="filterText" placeholder="输入关键字进行过滤" clearable />
|
||||
@ -80,9 +80,9 @@ export default {
|
||||
this.clearMapSelect();
|
||||
},
|
||||
methods: {
|
||||
backHome() {
|
||||
this.$router.push({ path: `/` });
|
||||
},
|
||||
// backHome() {
|
||||
// this.$router.push({ path: `/` });
|
||||
// },
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>试题列表</span>
|
||||
<div v-if="role" class="back-home" @click="backHome">返回首页</div>
|
||||
<!-- <div v-if="role" class="back-home" @click="backHome">返回首页</div> -->
|
||||
</div>
|
||||
<filter-city
|
||||
ref="filerCity"
|
||||
@ -97,9 +97,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
backHome() {
|
||||
this.$router.push({ path: `/` });
|
||||
},
|
||||
// backHome() {
|
||||
// this.$router.push({ path: `/` });
|
||||
// },
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>课程列表</span>
|
||||
<div v-if="role" class="back-home" @click="backHome">返回首页</div>
|
||||
<!-- <div v-if="role" class="back-home" @click="backHome">返回首页</div> -->
|
||||
</div>
|
||||
<filter-city
|
||||
ref="filerCity"
|
||||
@ -108,9 +108,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
backHome() {
|
||||
this.$router.push({ path: `/` });
|
||||
},
|
||||
// backHome() {
|
||||
// this.$router.push({ path: `/` });
|
||||
// },
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user