第一次提交
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
"name":"司机管理",
|
||||
"icon":"iconxiugaiyonghuxinxi",
|
||||
"label":"driver",
|
||||
"colorOpen":true,
|
||||
"submenu":[
|
||||
{
|
||||
"name":"司机列表",
|
||||
@@ -22,6 +23,7 @@
|
||||
"name":"油品分发",
|
||||
"icon":"iconbiangeng",
|
||||
"label":"distributeReverse",
|
||||
"colorOpen":false,
|
||||
"submenu":[
|
||||
{
|
||||
"name":"分发列表",
|
||||
@@ -41,6 +43,7 @@
|
||||
"name":"订单管理",
|
||||
"icon":"iconzhangdanchaxun",
|
||||
"label":"oilOrder",
|
||||
"colorOpen":false,
|
||||
"submenu":[
|
||||
{
|
||||
"icon":"iconzhangdanchaxun",
|
||||
@@ -54,6 +57,7 @@
|
||||
"name":"动销排名",
|
||||
"icon":"iconjiagebiangeng",
|
||||
"label":"ranking",
|
||||
"colorOpen":false,
|
||||
"submenu":[
|
||||
{
|
||||
"icon":"iconjiagebiangeng",
|
||||
@@ -73,6 +77,7 @@
|
||||
"name":"调价管理",
|
||||
"icon":"iconxiugaijiage",
|
||||
"label":"priceAdjust",
|
||||
"colorOpen":false,
|
||||
"submenu":[
|
||||
{
|
||||
"icon":"iconxiugaijiage",
|
||||
@@ -87,5 +92,25 @@
|
||||
"lable":"priceTask:info:list"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"油站账户管理",
|
||||
"icon":"iconqichexiangguan-jiayouzhan",
|
||||
"label":"oilAccount",
|
||||
"colorOpen":false,
|
||||
"submenu":[
|
||||
{
|
||||
"icon":"iconxiugaijiage",
|
||||
"name":"油站公司充值",
|
||||
"router":"/oilAccount/page/companyRecharge/index",
|
||||
"lable":"sys:siteCompany:recharge"
|
||||
},
|
||||
{
|
||||
"icon":"iconxiugaijiage",
|
||||
"name":"油站账户充值",
|
||||
"router":"/oilAccount/page/accountRecharge/index",
|
||||
"lable":"sys:siteAcct:recharge"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -19,7 +19,7 @@
|
||||
width: 100%;
|
||||
height: 740rpx;
|
||||
background-color: #ADCEFF;
|
||||
top: 310rpx;
|
||||
top: 350rpx;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -69,9 +69,10 @@
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
z-index: 2;
|
||||
line-height: 22rpx;
|
||||
margin-top: 12rpx;
|
||||
|
||||
}
|
||||
|
||||
.home_page_menu_name {
|
||||
@@ -93,6 +94,7 @@
|
||||
align-items: center;
|
||||
z-index: 3;
|
||||
transform: rotate(180deg);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.home_page_menu_item {
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
<view class="home_page_container">
|
||||
<view :style="{paddingTop:styles.top+styles.height + 'px'}" class="home_page_header">
|
||||
<view class="home_page_header_title">
|
||||
{{user.name?`Hi ,${user.name}` : user.userPhone?user.userPhone:'暂未设置'}}
|
||||
<uni-icons @tap.stop='close()' class="iconclass" color="#ffffff" custom-prefix="iconfont" type="iconkaiguan" size="35">
|
||||
{{user.name?`Hi ,${user.name}` : user.userPhone?user.userPhone:'暂未设置'}}
|
||||
<uni-icons @tap.stop='close()' class="iconclass" color="#ffffff" custom-prefix="iconfont"
|
||||
type="iconkaiguan" size="35">
|
||||
</uni-icons>
|
||||
</view>
|
||||
<view class="home_page_header_identity">{{user.roles[0].roleName}}</view>
|
||||
@@ -20,15 +21,17 @@
|
||||
<view @click="menuClick(index)" class="home_page_menu_item" v-for="(item,index) in menuList"
|
||||
:style="{left:item.x,top:item.y,transform:`rotate(${180+trackingPosition.fangle}deg)`}">
|
||||
<uni-icons class="menu_icon" :style="{transform:`scale(${menuIndex==index?1.2:1})`}"
|
||||
:color="menuIndex==index? '#2866FF': '#ffffff'" custom-prefix="iconfont" :type="item.icon"
|
||||
:color="item.colorOpen? '#2866FF': '#ffffff'" custom-prefix="iconfont" :type="item.icon"
|
||||
size="25"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{transform:`translateY(${menuIndex!==null&&Submenu?0:-433}rpx)`}" class="Submenu">
|
||||
<view @tap.stop="jump(item)" v-if="user.authList.includes(item.lable)" v-for="(item,index) in menuList[menuIndex].submenu" class="Submenu_item">
|
||||
<view :style="{transform:`translateY(${Submenu?0:-433}rpx)`}" class="Submenu">
|
||||
<view @tap.stop="jump(item)" v-if="user.authList.includes(item.lable)"
|
||||
v-for="(item,index) in menuList[menuIndex].submenu" class="Submenu_item">
|
||||
<view @tap.stop="collectionFn(item)" class="label">
|
||||
<uni-icons :color=" iconFn(item) " custom-prefix="iconfont" type="iconshoucang-yishoucang" size="30"></uni-icons>
|
||||
<uni-icons :color=" iconFn(item) " custom-prefix="iconfont" type="iconshoucang-yishoucang"
|
||||
size="30"></uni-icons>
|
||||
</view>
|
||||
<view class="Submenu_item_name">{{item.name}}</view>
|
||||
</view>
|
||||
@@ -38,17 +41,19 @@
|
||||
<view @tap.stop="remove(item)" class="tip">
|
||||
<uni-icons custom-prefix="iconfont" color="#ffffff" type="iconchiping" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="collection_item_name">
|
||||
<view class="collection_item_name">
|
||||
<uni-icons custom-prefix="iconfont" color="#2866FF" :type="item.icon" size="30"></uni-icons>
|
||||
<view class="collection_item_text">{{item.name}}</view>
|
||||
<view class="collection_item_text">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="collectionbg">
|
||||
<view v-for="(item,index) in 3" class="collection_itembg">
|
||||
<view>
|
||||
<text>点击</text> <uni-icons style="margin-left: 10rpx;" color="#bbbbbb" custom-prefix="iconfont" type="iconshoucang-yishoucang" size="12"></uni-icons>
|
||||
<text>点击</text>
|
||||
<uni-icons style="margin-left: 10rpx;" color="#bbbbbb" custom-prefix="iconfont"
|
||||
type="iconshoucang-yishoucang" size="12"></uni-icons>
|
||||
</view>
|
||||
<view>收藏</view>
|
||||
<view>收藏</view>
|
||||
<!--
|
||||
<view>Here</view> -->
|
||||
</view>
|
||||
@@ -63,8 +68,8 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
user:null,
|
||||
collection:[],
|
||||
user: null,
|
||||
collection: [],
|
||||
menuList: [],
|
||||
trackingPosition: {
|
||||
angle: 0,
|
||||
@@ -91,9 +96,13 @@
|
||||
created() {
|
||||
this.initFn();
|
||||
},
|
||||
watch:{
|
||||
collection:function(n,o){
|
||||
uni.setStorageSync('collection',n);
|
||||
watch: {
|
||||
menuIndex: (n, o) => {
|
||||
|
||||
console.log(n, 'menuIndex')
|
||||
},
|
||||
collection: function(n, o) {
|
||||
uni.setStorageSync('collection', n);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -101,7 +110,7 @@
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认退出登录',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
oilIdentityApi.logoutAuthSystem().then(res => {
|
||||
uni.redirectTo({
|
||||
@@ -113,57 +122,57 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
jump(e){
|
||||
if(this.user.authList.includes(e.lable)){
|
||||
jump(e) {
|
||||
if (this.user.authList.includes(e.lable)) {
|
||||
uni.navigateTo({
|
||||
url:e.router,
|
||||
url: e.router,
|
||||
fail(e) {
|
||||
console.log('失败')
|
||||
},
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title:'暂无权限',
|
||||
icon:'none'
|
||||
title: '暂无权限',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
remove(e){
|
||||
let indexk ;
|
||||
this.collection.forEach((item,index)=>{
|
||||
if(e.name==item.name){
|
||||
remove(e) {
|
||||
let indexk;
|
||||
this.collection.forEach((item, index) => {
|
||||
if (e.name == item.name) {
|
||||
indexk = index
|
||||
}
|
||||
})
|
||||
this.collection.splice(indexk,1);
|
||||
this.collection.splice(indexk, 1);
|
||||
},
|
||||
iconFn(e){
|
||||
return this.collection.filter((item)=>e.name==item.name).length==0?'#bbbbbb':'#FFB730';
|
||||
iconFn(e) {
|
||||
return this.collection.filter((item) => e.name == item.name).length == 0 ? '#bbbbbb' : '#FFB730';
|
||||
},
|
||||
initFn() {
|
||||
this.menuList = menus
|
||||
this.menuList = JSON.parse(JSON.stringify(menus))
|
||||
this.menuList.forEach((item, index) => {
|
||||
item = Object.assign(item, this.circularPositioning(index))
|
||||
item = Object.assign(item, this.circularPositioning(index));
|
||||
})
|
||||
this.trackingPosition.x = this.menuList[0].x;
|
||||
this.trackingPosition.y = this.menuList[0].y;
|
||||
this.collection = uni.getStorageSync('collection')||[];
|
||||
this.collection = uni.getStorageSync('collection') || [];
|
||||
this.user = uni.getStorageSync('user');
|
||||
},
|
||||
collectionFn(e){
|
||||
collectionFn(e) {
|
||||
console.log(this.collection)
|
||||
if(this.collection.length==0){
|
||||
if (this.collection.length == 0) {
|
||||
this.collection.unshift(e)
|
||||
}else{
|
||||
let repeatTest = this.collection.filter((item)=>e.name==item.name).length==0?true:false;
|
||||
if(repeatTest){
|
||||
if(this.collection.length>=3){
|
||||
this.collection.splice(this.collection.length-1,1)
|
||||
} else {
|
||||
let repeatTest = this.collection.filter((item) => e.name == item.name).length == 0 ? true : false;
|
||||
if (repeatTest) {
|
||||
if (this.collection.length >= 3) {
|
||||
this.collection.splice(this.collection.length - 1, 1)
|
||||
}
|
||||
this.collection.unshift(e)
|
||||
}else{
|
||||
} else {
|
||||
this.remove(e)
|
||||
// uni.showToast({
|
||||
// title:'无需重复添加',
|
||||
@@ -172,24 +181,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
gestureAnalysis(e) {
|
||||
console.log(e, '*****')
|
||||
},
|
||||
indexDis(e){
|
||||
gestureAnalysis(e) {},
|
||||
indexDis(e) {
|
||||
let x = this.menuIndex
|
||||
let y = e
|
||||
console.log(x,y)
|
||||
console.log(x, y)
|
||||
let average = 360 / this.menuList.length;
|
||||
let a = x-y;
|
||||
let b = this.menuList.length - 1 - (x-y-1);
|
||||
let deg = a>b?b*average:a*average;
|
||||
if(b>a){
|
||||
this.trackingPosition.angle = deg*-1
|
||||
}else{
|
||||
this.trackingPosition.angle = deg
|
||||
}
|
||||
console.log(this.trackingPosition.angle)
|
||||
|
||||
let a = x - y;
|
||||
let b = this.menuList.length - 1 - (x - y - 1);
|
||||
let deg = a > b ? b * average : a * average;
|
||||
if (b > a) {
|
||||
this.trackingPosition.angle = deg * -1
|
||||
} else {
|
||||
this.trackingPosition.angle = deg
|
||||
}
|
||||
console.log(this.trackingPosition.angle)
|
||||
|
||||
this.menuIndex = null
|
||||
setTimeout(() => {
|
||||
this.menuIndex = e
|
||||
@@ -228,18 +235,22 @@
|
||||
// console.log("4inde:{},aaa:{}",i,aaa)
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
// // NO=8
|
||||
this.Submenu = true
|
||||
this.Submenu = false
|
||||
let average = 360 / this.menuList.length;
|
||||
this.trackingPosition.angle = index * average;
|
||||
this.trackingPosition.fangle = -this.trackingPosition.angle;
|
||||
this.menuIndex = null
|
||||
// this.menuIndex = null
|
||||
if (this.menuList[this.menuIndex].colorOpen) {
|
||||
this.menuList[this.menuIndex].colorOpen = false
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.menuIndex = index
|
||||
this.menuList[this.menuIndex].colorOpen = true
|
||||
this.Submenu = true
|
||||
}, 500);
|
||||
|
||||
},
|
||||
circularPositioning(index, position) {
|
||||
let avd = this.PI / this.menuList.length //每一个 img-box 对应的角度
|
||||
|
||||
Reference in New Issue
Block a user