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