change
This commit is contained in:
@@ -73,6 +73,7 @@ export default {
|
||||
options: [],
|
||||
value: this.$store.getters.equipId,
|
||||
baseUrl: this.$store.getters.baseUrl,
|
||||
bgUrl: '',
|
||||
setTime: this.$store.getters.setTime / 1000,
|
||||
fullscreen: false
|
||||
}
|
||||
@@ -98,10 +99,16 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
this.options.map(el => {
|
||||
if (el.value === this.value) {
|
||||
this.bgUrl = el.background_url
|
||||
}
|
||||
})
|
||||
let obj = {
|
||||
baseUrl: this.baseUrl,
|
||||
setTime: this.setTime * 1000,
|
||||
equipId: this.value
|
||||
equipId: this.value,
|
||||
bgUrl: this.bgUrl
|
||||
}
|
||||
this.$store.dispatch('setConfig', obj)
|
||||
this.$router.push('/pointstatus')
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<section
|
||||
class="cbox"
|
||||
:style="{
|
||||
backgroundImage: 'url(' + bgUrl + ')'
|
||||
width: screenWidth + 'px',
|
||||
height: screenHeight + 'px',
|
||||
backgroundImage: 'url(' + baseUrl + '/file/图片/' + bgUrl + ')'
|
||||
}"
|
||||
>
|
||||
<div
|
||||
@@ -28,11 +30,13 @@ export default {
|
||||
name: 'PointStatus',
|
||||
data () {
|
||||
return {
|
||||
screenWidth: 1920,
|
||||
screenHeight: 1080,
|
||||
bgUrl: this.$store.getters.bgUrl,
|
||||
baseUrl: this.$store.getters.baseUrl,
|
||||
timeOut: null,
|
||||
interTime: this.$store.getters.setTime,
|
||||
timer: null,
|
||||
bgUrl: '',
|
||||
retData: []
|
||||
// retData: [
|
||||
// {
|
||||
@@ -50,6 +54,7 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
console.log(this.$store.getters.equipId, 'equipId')
|
||||
console.log(this.$store.getters.bgUrl, 'bgUrl')
|
||||
this.initData()
|
||||
this.refresh()
|
||||
},
|
||||
@@ -82,8 +87,8 @@ export default {
|
||||
<style scoped>
|
||||
.cbox {
|
||||
position: relative;
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
/* width: 1920px;
|
||||
height: 1080px; */
|
||||
text-align: center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ body {
|
||||
-khtml-user-select:none;/*早期浏览器*/
|
||||
user-select:none;
|
||||
background-color: #050830;
|
||||
background: #05032a center center / 100% 100% url(../images/screen1/bg.jpg) no-repeat;
|
||||
/* background: #05032a center center / 100% 100% url(../images/screen1/bg.jpg) no-repeat; */
|
||||
}
|
||||
|
||||
div, p {
|
||||
|
||||
@@ -9,7 +9,8 @@ const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.10.41:8
|
||||
const state = {
|
||||
baseUrl: getStore('baseUrl') || baseUrl,
|
||||
setTime: getStore('setTime') || 50000,
|
||||
equipId: getStore('equipId') || ''
|
||||
equipId: getStore('equipId') || '',
|
||||
bgUrl: getStore('bgUrl') || ''
|
||||
}
|
||||
|
||||
const actions = {
|
||||
@@ -17,6 +18,7 @@ const actions = {
|
||||
setStore('baseUrl', res.baseUrl)
|
||||
setStore('setTime', res.setTime)
|
||||
setStore('equipId', res.equipId)
|
||||
setStore('bgUrl', res.bgUrl)
|
||||
commit(types.COM_CONFIG, res)
|
||||
}
|
||||
}
|
||||
@@ -24,7 +26,8 @@ const actions = {
|
||||
const getters = {
|
||||
baseUrl: state => state.baseUrl,
|
||||
setTime: state => state.setTime,
|
||||
equipId: state => state.equipId
|
||||
equipId: state => state.equipId,
|
||||
bgUrl: state => state.bgUrl
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
@@ -32,6 +35,7 @@ const mutations = {
|
||||
state.baseUrl = res.baseUrl
|
||||
state.setTime = res.setTime
|
||||
state.equipId = res.equipId
|
||||
state.bgUrl = res.bgUrl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user