|
@@ -24,7 +24,7 @@
|
|
<!-- 宫格 -->
|
|
<!-- 宫格 -->
|
|
<view class="grid-body">
|
|
<view class="grid-body">
|
|
<view class="grid uni-row">
|
|
<view class="grid uni-row">
|
|
- <view class="grid-item" v-for="(item, index) in items" :key="index" @click="enterItem" >
|
|
|
|
|
|
+ <view class="grid-item" v-for="(item, index) in items" :key="index" @click="enterItem(item)" >
|
|
<!-- 您的网格项内容 -->
|
|
<!-- 您的网格项内容 -->
|
|
<uni-icons class="my-icon" :type="item.iconType" size="40" :color="item.colorClass" ></uni-icons>
|
|
<uni-icons class="my-icon" :type="item.iconType" size="40" :color="item.colorClass" ></uni-icons>
|
|
<text class="text">{{ item.text }}</text>
|
|
<text class="text">{{ item.text }}</text>
|
|
@@ -45,20 +45,21 @@
|
|
}
|
|
}
|
|
type Item={
|
|
type Item={
|
|
colorClass:string,
|
|
colorClass:string,
|
|
- iconType:string,
|
|
|
|
|
|
+ iconType:string,
|
|
|
|
+ path:string,
|
|
text:string
|
|
text:string
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
items: [
|
|
items: [
|
|
- {colorClass: 'blue', iconType: "person-filled", text: "用户管理" },
|
|
|
|
- {colorClass: 'blue', iconType: "download", text: "数据下载" },
|
|
|
|
- {colorClass: 'blue', iconType: "list", text: "任务管理" },
|
|
|
|
- {colorClass: 'orange', iconType: "mic", text: "声像记录" },
|
|
|
|
- {colorClass: 'orange', iconType: "calendar", text: "检验记录" },
|
|
|
|
- {colorClass: 'orange', iconType: "gear-filled", text: "关键工序" },
|
|
|
|
- {colorClass: 'green', iconType: "folder-add-filled", text: "文档查阅" },
|
|
|
|
- {colorClass: 'green', iconType: "cloud-upload", text: "数据上传" },
|
|
|
|
- {colorClass: 'green', iconType: "wallet-filled", text: "日志管理" }
|
|
|
|
|
|
+ {colorClass: 'blue', iconType: "person-filled", text: "用户管理",path:"" },
|
|
|
|
+ {colorClass: 'blue', iconType: "download", text: "数据下载",path:"" },
|
|
|
|
+ {colorClass: 'blue', iconType: "list", text: "任务管理",path:"" },
|
|
|
|
+ {colorClass: 'orange', iconType: "mic", text: "声像记录", path:"/pages/work/record/RecordList"},
|
|
|
|
+ {colorClass: 'orange', iconType: "calendar", text: "检验记录",path:"/pages/work/report/InspectionList" },
|
|
|
|
+ {colorClass: 'orange', iconType: "gear-filled", text: "关键工序",path:"" },
|
|
|
|
+ {colorClass: 'green', iconType: "folder-add-filled", text: "文档查阅",path:"" },
|
|
|
|
+ {colorClass: 'green', iconType: "cloud-upload", text: "数据上传",path:"" },
|
|
|
|
+ {colorClass: 'green', iconType: "wallet-filled", text: "日志管理",path:"" }
|
|
] as Item[],
|
|
] as Item[],
|
|
current: 0 as number,
|
|
current: 0 as number,
|
|
swiperDotIndex: 0 as number,
|
|
swiperDotIndex: 0 as number,
|
|
@@ -83,10 +84,16 @@
|
|
},
|
|
},
|
|
enterItem(e) {
|
|
enterItem(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
|
|
+ if (e.path) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: e.path
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: '模块建设中~',
|
|
title: '模块建设中~',
|
|
icon: 'none'
|
|
icon: 'none'
|
|
});
|
|
});
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|