Merge branch 'phpsMonitor' of http://47.97.1.152:5880/r/private into phpsMonitor
| | |
| | | "titleNView": false |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/webSocket", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "webSocket", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | ], |
| | | |
| | | ], |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | | "navigationBarTitleText": "uni-app", |
| | |
| | | <swiper-item class="swiper-item" v-for="(item,i) in swiperList" :key="i"> |
| | | <view style="width: 30%;">{{i+1}} / {{swiperList.length}}</view> |
| | | <!-- <view style="width: 30%;">料号: {{item.matnr}}</view> --> |
| | | <view style="width: 40%;">名称: {{item.maknx}}</view> |
| | | <view style="width: 30%;">订单: {{item.orderNo}}</view> |
| | | <view style="width: 40%;">料号: {{item.matnr}}</view> |
| | | <view style="width: 30%;">备注: {{item.orderNo}}</view> |
| | | |
| | | |
| | | <view style="width: 30%;">出库: {{item.count}} / 总数: {{item.total}}</view> |
| | | <view style="width: 40%;">规格: {{item.specs}}</view> |
| | | <view style="width: 40%;">名称: {{item.maknx}}</view> |
| | | <view style="width: 30%;">批号: {{item.batch}}</view> |
| | | |
| | | |
New file |
| | |
| | | <template> |
| | | <view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | ws: null, |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.ws = new WebSocket("ws://127.0.0.1:9090/pswcs/console/websocket") |
| | | this.ws.onopen = this.webSocketOnOpen |
| | | this.ws.onerror = this.webSocketOnError |
| | | this.ws.onmessage = this.webSocketOnMessage |
| | | this.ws.onclose = this.webSocketClose |
| | | // console.log(this.ws) |
| | | |
| | | }, |
| | | webSocketOnOpen(e) { |
| | | console.log("open"); |
| | | |
| | | this.sendWs(JSON.stringify({ |
| | | url: 'getTvConfig', |
| | | data: '1' |
| | | })) |
| | | }, |
| | | webSocketOnError(e) { |
| | | console.log(e); |
| | | }, |
| | | webSocketOnMessage(e) { |
| | | const result = JSON.parse(e.data); |
| | | if (result.url == "getTvConfig") { |
| | | console.log(result.result) |
| | | } |
| | | }, |
| | | webSocketClose(e) { |
| | | console.log("close"); |
| | | }, |
| | | sendWs(message) { |
| | | if (this.ws.readyState == WebSocket.OPEN) { |
| | | this.ws.send(message) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |