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:
ival 2019-08-14 16:50:50 +08:00
commit fd2b66e984
11 changed files with 891 additions and 701 deletions

View File

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

View File

@ -427,6 +427,6 @@ export default {
thenList: '交路列表',
startStation: '起始站',
endStation: '终到站',
endStation: '终到站'
};

View File

@ -133,6 +133,6 @@ export default {
proximitySection: '请选择接近区段',
accessPropertyType: '请选择进路性质类型',
autoRouteType: '请选择自动进路类型',
physicalSegmentData: '请选择进路物理区段数据',
physicalSegmentData: '请选择进路物理区段数据'
};

View File

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

View 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>

View File

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

View File

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

View File

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

View File

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

View File

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