|
@@ -8,22 +8,27 @@
|
|
|
}
|
|
|
</route>
|
|
|
<template>
|
|
|
- <view class="containe px-4 overflow-hidden">
|
|
|
+ <view class="containe px-4">
|
|
|
<!-- 渐变色 -->
|
|
|
<view class="top-content"></view>
|
|
|
- <view class="overflow-hidden pt-2 px-4" :style="{ marginTop: safeAreaInsets?.top + 'px' }">
|
|
|
+ <view
|
|
|
+ class="overflow-hidden header header-fixed header-bg"
|
|
|
+ :style="{ paddingTop: safeAreaInsets?.top + 'px' }"
|
|
|
+ >
|
|
|
<wd-badge modelValue="12">
|
|
|
- <wd-icon name="dong" size="26px" />
|
|
|
+ <wd-icon name="dong" size="52rpx" />
|
|
|
</wd-badge>
|
|
|
+ <view class="input-box mt-2" @click="handleSerch">
|
|
|
+ <wd-icon name="search" />
|
|
|
+ 请输入牛号
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="input-box mt-2">
|
|
|
- <wd-icon name="search" v-model="serchVal" @focus="focus" />
|
|
|
- 请输入牛号
|
|
|
- </view>
|
|
|
- <view class="work mt-4 shadow-xl">
|
|
|
- <view class="mt-4 mb-4 px-2 title">工作进度</view>
|
|
|
- <view class="work-box">
|
|
|
+ <!-- 进度 -->
|
|
|
+ <view class="work shadow-xl">
|
|
|
+ <view class="mt-4 mb-4 px-2 pb-2 title">工作进度</view>
|
|
|
+ <view class="work-box flex justify-around">
|
|
|
<wd-circle
|
|
|
+ customClass="z-index: -1; position: reletive;"
|
|
|
v-model="current"
|
|
|
color="#f59e0b"
|
|
|
:strokeWidth="15"
|
|
@@ -37,28 +42,112 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 常用工具 -->
|
|
|
- <view class="work mt-4 shadow-xl">
|
|
|
+ <view class="work mt-4 shadow-xl work-t">
|
|
|
<view class="mt-4 mb-4 px-2 title">常用工具</view>
|
|
|
- <view></view>
|
|
|
+ <view class="work-box-t flex justify-between flex-row flex-wrap">
|
|
|
+ <view
|
|
|
+ class="work-item mb-4 px-4"
|
|
|
+ v-for="item in workList"
|
|
|
+ :key="item.id"
|
|
|
+ @click="addBattle(item)"
|
|
|
+ >
|
|
|
+ <image :src="item.img" mode="scaleToFill" class="image" />
|
|
|
+ <view>
|
|
|
+ {{ item.title }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-// import PLATFORM from '@/utils/platform'
|
|
|
+import { getAuth } from '@/service/index/auth'
|
|
|
|
|
|
defineOptions({
|
|
|
name: 'Home',
|
|
|
})
|
|
|
|
|
|
// 获取屏幕边界到安全区域距离
|
|
|
-const current = ref(20)
|
|
|
const { safeAreaInsets } = uni.getSystemInfoSync()
|
|
|
-const serchVal = ref('')
|
|
|
-const focus = (val) => {
|
|
|
- console.log(val, 'focus')
|
|
|
+const workList = reactive([
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ img: '../../static/images/work/称重.png',
|
|
|
+ title: '称重登记',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ img: '../../static/images/work/治疗.png',
|
|
|
+ title: '登记治疗',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ img: '../../static/images/work/发病.png',
|
|
|
+ title: '诊断',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 4,
|
|
|
+ img: '../../static/images/work/流产.png',
|
|
|
+ title: '流产登记',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 5,
|
|
|
+ img: '../../static/images/work/脖环绑定.png',
|
|
|
+ title: '脖环制定',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 6,
|
|
|
+ img: '../../static/images/work/result.png',
|
|
|
+ title: '治疗结果',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 7,
|
|
|
+ img: '../../static/images/work/发情.png',
|
|
|
+ title: '发情',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 8,
|
|
|
+ img: '../../static/images/work/配种.png',
|
|
|
+ title: '配种',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 9,
|
|
|
+ img: '../../static/images/work/孕检.png',
|
|
|
+ title: '孕检登记',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 10,
|
|
|
+ img: '../../static/images/work/进围产.png',
|
|
|
+ title: '进围产',
|
|
|
+ },
|
|
|
+])
|
|
|
+const current = ref(20)
|
|
|
+
|
|
|
+// 接口请求参数
|
|
|
+const logins = async () => {
|
|
|
+ const { data } = await getAuth({
|
|
|
+ username: 'shanshan',
|
|
|
+ password: '123456',
|
|
|
+ })
|
|
|
+ console.log(data, 'hss')
|
|
|
+}
|
|
|
+
|
|
|
+// 搜索页面跳转
|
|
|
+const handleSerch = () => {
|
|
|
+ uni.navigateTo({ url: '/pages/serch/serch?title=navigate' })
|
|
|
+}
|
|
|
+
|
|
|
+// 常用工具页面跳转
|
|
|
+const addBattle = (val) => {
|
|
|
+ console.log(val, '工具类型')
|
|
|
+ uni.navigateTo({ url: '/pages/battleForm/battleForm?title=1' })
|
|
|
}
|
|
|
|
|
|
+onMounted(() => {
|
|
|
+ logins()
|
|
|
+})
|
|
|
+
|
|
|
// 测试 uni API 自动引入
|
|
|
onLoad(() => {
|
|
|
console.log('onload')
|
|
@@ -66,19 +155,42 @@ onLoad(() => {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.work-item {
|
|
|
+ // border: 1px solid red;
|
|
|
+ width: 22%;
|
|
|
+ font-size: 32rpx;
|
|
|
+ text-align: center;
|
|
|
+ height: 200rpx;
|
|
|
+}
|
|
|
+.header {
|
|
|
+ margin-left: -32rpx;
|
|
|
+ margin-right: -32rpx;
|
|
|
+ padding: 32rpx;
|
|
|
+}
|
|
|
+.header-fixed {
|
|
|
+ position: sticky;
|
|
|
+ z-index: 10;
|
|
|
+ top: 0;
|
|
|
+}
|
|
|
+.header-bg {
|
|
|
+ background: linear-gradient(to bottom, #f59e0b, #f6d7a7);
|
|
|
+ // background-color: #fafafa;
|
|
|
+}
|
|
|
+.image {
|
|
|
+ width: 100rpx;
|
|
|
+ height: 100rpx;
|
|
|
+ margin-bottom: 30rpx;
|
|
|
+}
|
|
|
.containe {
|
|
|
- background: #fafafa;
|
|
|
- overflow: hidden;
|
|
|
- height: 100vh;
|
|
|
- position: relative;
|
|
|
- z-index: -99;
|
|
|
+ // background: #fafafa;
|
|
|
+ // position: relative;
|
|
|
}
|
|
|
.input-box {
|
|
|
- border-radius: 24rpx;
|
|
|
+ border-radius: 44rpx;
|
|
|
background: #fff;
|
|
|
- height: 60rpx;
|
|
|
- margin-top: 10rpx;
|
|
|
- line-height: 60rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ margin-top: 44rpx;
|
|
|
+ line-height: 74rpx;
|
|
|
text-align: center;
|
|
|
color: #6b7280;
|
|
|
}
|
|
@@ -86,51 +198,47 @@ onLoad(() => {
|
|
|
position: fixed;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
- right: 0%;
|
|
|
- bottom: 0;
|
|
|
+ right: 0;
|
|
|
background: linear-gradient(to bottom, #f59e0b, #fffbeb);
|
|
|
z-index: -1;
|
|
|
- height: 260px;
|
|
|
+ height: 422rpx;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.inputs {
|
|
|
border-radius: 10%;
|
|
|
}
|
|
|
.cards {
|
|
|
- margin: 10px 0;
|
|
|
+ margin: 10rpx 0;
|
|
|
}
|
|
|
.work {
|
|
|
- border-radius: 10px;
|
|
|
- overflow-y: scroll;
|
|
|
+ border-radius: 28rpx;
|
|
|
background-color: $uni-text-color-inverse;
|
|
|
- font-size: 14px;
|
|
|
+ font-size: 32rpx;
|
|
|
color: $uni-text-color;
|
|
|
- padding: 0px 5px 5px 5px;
|
|
|
- box-shadow: 0 4px 8px 0 $uni-bg-color-grey;
|
|
|
+ padding: 10rpx;
|
|
|
+ box-shadow: 8rpx 16rpx 32rpx 0 $uni-bg-color-grey;
|
|
|
}
|
|
|
.title {
|
|
|
- color: #262626;
|
|
|
- font-size: 20px;
|
|
|
+ color: #333;
|
|
|
+ font-size: 40rpx;
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
-.work-box {
|
|
|
- display: flex;
|
|
|
- justify-content: space-around;
|
|
|
|
|
|
+.work-box {
|
|
|
.do-work {
|
|
|
- font-size: 20px;
|
|
|
+ font-size: 40rpx;
|
|
|
color: #ea580c;
|
|
|
font-weight: 600;
|
|
|
- margin-top: 30px;
|
|
|
+ margin-top: 74rpx;
|
|
|
}
|
|
|
.num {
|
|
|
color: #ea580c;
|
|
|
- font-size: 20px;
|
|
|
- padding-left: 15px;
|
|
|
+ font-size: 40rpx;
|
|
|
+ padding-left: 14rpx;
|
|
|
}
|
|
|
.num1 {
|
|
|
color: #f59e0b;
|
|
|
- font-size: 14px;
|
|
|
+ font-size: 28rpx;
|
|
|
}
|
|
|
}
|
|
|
</style>
|