detection-business/pages/manage/NewdeviceManage.vue

115 lines
2.2 KiB
Vue
Raw Normal View History

2025-02-19 18:01:29 +08:00
<template>
2025-02-21 09:22:56 +08:00
<view class="">
2025-02-19 18:01:29 +08:00
2025-02-21 09:22:56 +08:00
<headersVue :titles="titles">
<u-icon name="arrow-left" color="#fff" size="18"></u-icon>
</headersVue>
<view class="content">
2025-02-19 18:01:29 +08:00
2025-02-21 09:22:56 +08:00
<view class="box_">
<view class="box_list" v-for="(item, index) in tabList">
<view class="" @click="gettap(item)">
<image :src=iconArr[index] mode=""></image>
2025-02-21 15:03:52 +08:00
<view class="name_">{{ item.categoryName }}</view>
<view class="">{{ item.count }}</view>
2025-02-21 09:22:56 +08:00
</view>
</view>
2025-02-19 18:01:29 +08:00
2025-02-21 09:22:56 +08:00
</view>
</view>
</view>
2025-02-19 18:01:29 +08:00
</template>
<script>
2025-02-21 09:22:56 +08:00
import headersVue from '../../components/header/headers.vue';
import {getDictDataByType} from "@/utils/utils";
2025-02-21 15:03:52 +08:00
import request from "@/utils/request";
2025-02-19 18:01:29 +08:00
2025-02-21 09:22:56 +08:00
export default {
data() {
return {
titles: "设备管理",
List: [],
show: false,
status: 'loading',
tabList:[],
iconArr:["/static/imgs/s1.png","/static/imgs/s2.png","/static/imgs/s3.png","/static/imgs/s4.png"]
}
},
components: {
headersVue
},
onLoad() {
2025-02-21 15:03:52 +08:00
// this.getTab()
this.getCount()
2025-02-21 09:22:56 +08:00
},
methods: {
gettap(value) {
uni.navigateTo({
2025-02-21 15:03:52 +08:00
url: `/pages/manage/informationManage?value=${value.categoryId}`
2025-02-21 09:22:56 +08:00
})
},
async getTab() {
const data = await getDictDataByType("ins_equ_type");
this.tabList = [...this.tabList, ...data];
2025-02-21 15:03:52 +08:00
},
getCount() {
const data = request({
url: '/system/equInfo/queryEquipmentCountByCategory',
method: 'get'
});
this.tabList = data.then(res => {
this.tabList = res.data
})
2025-02-21 09:22:56 +08:00
},
},
}
2025-02-19 18:01:29 +08:00
</script>
<style scoped lang="scss">
2025-02-21 09:22:56 +08:00
.content {
background: #F7F8FC;
width: 100%;
height: 100vh;
box-sizing: border-box;
padding: 30rpx;
padding-top: 200rpx;
}
.box_ {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
2025-02-21 15:03:52 +08:00
margin-top: 40rpx;
2025-02-21 09:22:56 +08:00
}
.box_list {
width: 328rpx;
height: 396rpx;
background: #fff;
border-radius: 18px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
margin-bottom: 30rpx;
image {
width: 130rpx;
height: 130rpx;
}
}
.name_ {
font-size: 28rpx;
color: #000000;
}
.num_ {
font-size: 36rpx;
color: #000000;
}
2025-02-19 18:01:29 +08:00
</style>