From 8c3b2fb69cb5f30db9f7e26bd09efb8e0e1bb444 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 23 二月 2024 17:01:45 +0800
Subject: [PATCH] #
---
pages.json | 3
App.vue | 3
pages/project/jmAGV/home.vue | 182 ++++++++++++++++++++++++++++++++++++++-------
3 files changed, 158 insertions(+), 30 deletions(-)
diff --git a/App.vue b/App.vue
index bcd5738..88d3efe 100644
--- a/App.vue
+++ b/App.vue
@@ -18,6 +18,9 @@
background-color: #f8fafb;
font-family: Helvetica, sans-serif,'my-font';
}
+ page {
+ height: 100%;
+ }
@font-face {
font-family: my-font;
diff --git a/pages.json b/pages.json
index 633a62d..c588685 100644
--- a/pages.json
+++ b/pages.json
@@ -119,7 +119,10 @@
"style" :
{
"navigationBarTitleText": "涓婚〉",
+ "navigationStyle": "custom",
+ // 鍘绘帀椤堕儴瀵艰埅鏍�
"enablePullDownRefresh": false
+
}
}
diff --git a/pages/project/jmAGV/home.vue b/pages/project/jmAGV/home.vue
index 832bf8c..3897ed3 100644
--- a/pages/project/jmAGV/home.vue
+++ b/pages/project/jmAGV/home.vue
@@ -1,35 +1,37 @@
<template>
<view class="container">
- <view class="btn-box">
- <button>鍛煎彨绌虹洏澶�</button>
+ <!-- 宸� -->
+ <view class="zcard">
+ <view class="zcard-flex">
+ <view class="button-nk" v-for="item in groundSiteList" @click="click(item,'left')">{{item.name}}</view>
+ </view>
</view>
-
- <view class="btn-box">
- <button>鍛煎彨绌虹洏澶�</button>
+ <!-- 鍙� -->
+ <view class="zcard">
+ <view class="zcard-flex">
+ <view class="button-nk" style="background-color: brown;" v-for="item in traySiteList" @click="click(item,'right')">{{item.name}}</view>
+ </view>
</view>
- <view class="btn-box">
- <button>鍛煎彨绌虹洏澶�</button>
+ <view>
+ <uni-popup ref="revise" type="dialog">
+ <view class="popup">
+ <view>{{text}}</view>
+ <view class="button-nk" @click="upTray()">{{btnTitle1}}</view>
+ <view class="button-nk" @click="downTray">{{btnTitle2}}</view>
+ </view>
+ </uni-popup>
</view>
- <view class="btn-box">
- <button>鍛煎彨绌虹洏澶�</button>
- </view>
-
- <view class="btn-box">
- <button>鍛煎彨绌虹洏澶�</button>
- </view>
-
- <view class="btn-box">
- <button>鍛煎彨绌虹洏澶�</button>
- </view>
- <view class="btn-box">
- <button>鍛煎彨绌虹洏澶�</button>
- </view>
-
- <view class="btn-box">
- <button>鍛煎彨绌虹洏澶�</button>
- </view>
+ <!-- <view>
+ <uni-popup ref="revise2" type="dialog">
+ <view class="popup2">
+ <view>123</view>
+ <view class="button-nk" @click="inHouse">鎵樼洏-浠撳簱(鍏ュ簱)</view>
+ <view class="button-nk" @click="outHouse">浠撳簱-鎵樼洏(鍑哄簱)</view>
+ </view>
+ </uni-popup>
+ </view> -->
</view>
</template>
@@ -37,10 +39,75 @@
export default {
data() {
return {
-
+ baseUrl: '',
+ token: '',
+ groundSiteList: [
+ {name: '1鍙峰湴闈㈢珯',code:'1-C1',traget: '1-A1'},
+ {name: '2鍙峰湴闈㈢珯',code:'2-C1'},
+ {name: '3鍙峰湴闈㈢珯',code:'3-C1'},
+ {name: '4鍙峰湴闈㈢珯',code:'4-C1'},
+ {name: '5鍙峰湴闈㈢珯',code:'5-C1'},
+ {name: '6鍙峰湴闈㈢珯',code:'6-C1'},
+ {name: '7鍙峰湴闈㈢珯',code:'7-C1'},
+ {name: '8鍙峰湴闈㈢珯',code:'8-C1'},
+ {name: '9鍙峰湴闈㈢珯',code:'9-C1'},
+ {name: '10鍙峰湴闈㈢珯',code:'10-C1'}
+ ],
+ traySiteList: [
+ {name: '1鍙锋墭鐩樼珯',code:'1-A1'},
+ {name: '2鍙锋墭鐩樼珯',code:'2-A1'},
+ {name: '3鍙锋墭鐩樼珯',code:'3-A1'},
+ {name: '4鍙锋墭鐩樼珯',code:'4-A1'},
+ {name: '5鍙锋墭鐩樼珯',code:'5-A1'},
+ {name: '6鍙锋墭鐩樼珯',code:'6-A1'},
+ {name: '7鍙锋墭鐩樼珯',code:'7-A1'},
+ {name: '8鍙锋墭鐩樼珯',code:'8-A1'},
+ {name: '9鍙锋墭鐩樼珯',code:'9-A1'},
+ {name: '10鍙锋墭鐩樼珯',code:'10-A1'}
+ ],
+ item: '',
+ text: '',
+ btnTitle1: '',
+ btnTitle2: ''
}
},
+ onShow() {
+ let network = uni.getStorageSync('Network')
+ this.baseUrl = `http://${network[0].ip}:${network[0].port}/${network[0].address}`
+ this.token = uni.getStorageSync('token');
+ },
methods: {
+ click(item,type) {
+ this.item = item
+ this.text = item.name
+ if (type == 'left') {
+ this.btnTitle1 = '鍦伴潰绔欐斁缃墭鐩�(涓婃灦)'
+ this.btnTitle2 = '鍦伴潰绔欐斁缃墭鐩�(涓婃灦)'
+ } else {
+ this.btnTitle1 = '鎵樼洏-浠撳簱(鍏ュ簱)'
+ this.btnTitle2 = '浠撳簱-鎵樼洏(鍑哄簱)'
+ }
+ this.$refs.revise.open(type)
+ },
+ upTray() {
+ let _this = this
+ uni.request({
+ url: `${_this.baseUrl}/agv/inBound`,
+ data: {
+ originLocal: _this.item.code,
+ targetLocal: _this.item.traget,
+ type: 'load'
+ },
+ header: { 'token': uni.getStorageSync('token') },
+ method: 'POST',
+ success(res) {
+ console.log(res);
+ }
+ })
+ },
+ downTray() {
+
+ }
}
}
@@ -48,14 +115,69 @@
<style>
.container {
- height: 90vh;
- background-color: aqua;
+ height: 100%;
+ /* background-color: aqua; */
display: grid;
grid-template-columns: 50% 50%;
}
.btn-box {
- margin: 5%;
+ /* margin: 1%; */
+ background-color: azure;
}
-
+ .zcard {
+ margin: 10px 100px;
+ /* background-color: blanchedalmond; */
+ }
+ .zcard-flex {
+ /* background-color: coral; */
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ /* flex-direction: column; */
+ justify-content: space-around;
+ align-items: center;
+ }
+ .button-nk {
+ margin: 10rpx;
+ padding: 20rpx 70rpx;
+ /* background-color: azure; */
+ min-width: 200rpx;
+ /* margin: 0 auto; */
+ height: 50px;
+ text-align: center;
+ line-height: 50px;
+ font-size: 20px;
+ background-color: #409EFF;
+ color: #ECF0F1;
+ border-radius: 7px;
+ box-shadow: inset 4px 4px 4px rgba(0, 0, 0, .3),
+ inset -4px -4px 4px rgba(255, 255, 255, .4),
+ -4px -4px 5px rgba(0, 0, 0, .4);
+ }
+ .button-nk:active {
+ transform: translateY(2px) scale(0.99, 0.99);
+ box-shadow: inset 4px 4px 4px rgba(0, 0, 0, .3),
+ inset -4px -4px 8px rgba(255, 255, 255, .7),
+ -5px -5px 5px rgba(0, 0, 0, .3);
+ }
+ .popup {
+ background-color: #eee;
+ width: 30vw;
+ height: 100%;
+ padding: 0 10vw;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ }
+ .popup2 {
+ background-color: #eee;
+ width: 30vw;
+ height: 100%;
+ padding: 0 10vw;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ }
</style>
--
Gitblit v1.9.1