This commit is contained in:
2025-04-15 13:41:28 +08:00
parent ba387f5297
commit 85b885fdb5
4 changed files with 46 additions and 17 deletions

10
src/config/getData01.js Normal file
View File

@@ -0,0 +1,10 @@
import {post} from '@js/http.js'
/** 点位配置大屏展示页面 */
// 区域下拉框
export const selectAreaList = () => post('api/screen/selectAreaList', {})
// 点位下拉框
export const getPointInfo = (code) => post('api/screen/point/getPointInfo', {
area_code: code
})

View File

@@ -59,6 +59,7 @@
</template>
<script>
import { selectAreaList } from '@js/getData01'
import SelectOpt from '@components/select.vue'
export default {
components: {
@@ -68,14 +69,22 @@ export default {
return {
loginname: '',
password: '',
options: [{value: '1', label: '称重'}, {value: '2', label: '入库'}],
// options: [{value: '1', label: '称重'}, {value: '2', label: '入库'}],
options: [],
value: this.$store.getters.equipId,
baseUrl: this.$store.getters.baseUrl,
setTime: this.$store.getters.setTime / 1000,
fullscreen: false
}
},
mounted () {
this.initData()
},
methods: {
async initData () {
let res = await selectAreaList()
this.options = res.content
},
getCc () {
const screenWidth = window.screen.width
const screenHeight = window.screen.height
@@ -95,13 +104,14 @@ export default {
equipId: this.value
}
this.$store.dispatch('setConfig', obj)
if (this.value === '1') {
this.$router.push('/Weight')
} else if (this.value === '2') {
this.$router.push('/InStore')
} else if (this.value === '3') {
this.$router.push('/Prod')
}
this.$router.push('/pointstatus')
// if (this.value === '1') {
// this.$router.push('/Weight')
// } else if (this.value === '2') {
// this.$router.push('/InStore')
// } else if (this.value === '3') {
// this.$router.push('/Prod')
// }
let element = document.documentElement
if (this.fullscreen) {
if (document.exitFullscreen) {

View File

@@ -12,9 +12,9 @@
:style="{
width: item.width + 'px',
height: item.height + 'px',
left: item.x + 'px',
top: item.y + 'px',
backgroundImage: 'url(' + item.imageUrl + ')'
left: item.x_value + 'px',
top: item.y_value + 'px',
backgroundImage: 'url(' + baseUrl + '/file/图片/' + item.icon_url + ')'
}"
>
</div>
@@ -22,11 +22,13 @@
</template>
<script>
import {dwzt} from '@js/mork001.js'
// import {dwzt} from '@js/mork001.js'
import { getPointInfo } from '@js/getData01'
export default {
name: 'PointStatus',
data () {
return {
baseUrl: this.$store.getters.baseUrl,
timeOut: null,
interTime: this.$store.getters.setTime,
timer: null,
@@ -47,6 +49,7 @@ export default {
}
},
mounted () {
console.log(this.$store.getters.equipId, 'equipId')
this.initData()
this.refresh()
},
@@ -60,11 +63,17 @@ export default {
this.initData()
}, this.interTime)
},
// async initData () {
// let res = await dwzt()
// clearInterval(this.timeOut)
// this.bgUrl = res.bgUrl
// this.retData = res.pointArr
// }
async initData () {
let res = await dwzt()
let res = await getPointInfo(this.$store.getters.equipId)
clearInterval(this.timeOut)
this.bgUrl = res.bgUrl
this.retData = res.pointArr
// this.bgUrl = res.bgUrl
this.retData = res.content
}
}
}

View File

@@ -1,7 +1,7 @@
import * as types from '../types'
import { getStore, setStore } from '@js/mUtils.js'
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.59:8080' : 'http://10.26.138.21:8010'
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.10.41:8012' : 'http://192.168.10.41:8012'
/**
* App通用配置
@@ -9,7 +9,7 @@ const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.59:8
const state = {
baseUrl: getStore('baseUrl') || baseUrl,
setTime: getStore('setTime') || 50000,
equipId: getStore('equipId') || '1'
equipId: getStore('equipId') || ''
}
const actions = {