| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <template>
- <z-paging ref="paging" v-model="list" @onRefresh="onRefresh" bgColor="#f7f7f7" @query="query" safe-area-inset-bottom hide-empty-view>
- <template #top>
- <up-navbar title="GAP基地信息" @leftClick="navigateBackOrHome()" :fixed="false"></up-navbar>
- <view class="d-flex a-c pd-25">
- <view class="min-w-170 flex1">
- <ut-action-sheet v-model="form.type" :tabs="tabs" @change="onRefresh" title="选择基地类型">
- <view class="d-flex search-select-item a-c">
- <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{ '全部' }}</view>
- <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
- </view>
- </ut-action-sheet>
- </view>
- <view class="h-86 pl-20 w-100%">
- <ut-search ref="searchRef" v-model="form.keywords" @search="onRefresh" margin="0" :border="false" :placeholder="placeholder" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
- </view>
- </view>
- </template>
- <template>
- <template>
- <view class="pl-25 pr-25">
- <up-swipe-action>
- <up-swipe-action-item v-for="item in list" :name="item?.id" :key="item?.id" :options="optionsAction" @click="clickSwipe" class="mb-20">
- <view class="b-radius bg-#fff pd-20">
- <view class="c-#333 f-s-34 f-w-5 pb-5">德钦县拖顶乡洛沙村各尼拉三七GAP基地</view>
- <view class="c-#999 f-s-24 pb-20">2025年-05-12获评</view>
- <view class="d-flex pb-5">
- <view class="w-50%">
- <text class="c-#666 f-s-28">种养殖品种:</text>
- <text class="c-#333 f-s-28 f-w-5">三七</text>
- </view>
- <view class="w-50%">
- <text class="c-#666 f-s-28">基地面积:</text>
- <text class="c-#333 f-s-28 f-w-5">120亩</text>
- </view>
- </view>
- <view class="border-bottom-#f7f7f7 pb-20">
- <text class="c-#666 f-s-28">基地地址:</text>
- <text class="c-#333 f-s-28 f-w-5">云南省红河州个旧市卡房镇田心村小田心村268号工业园</text>
- </view>
- <view class="pl-5 pr-5 pt-20 pb-20 border-top-#f7f7f7 c-#FC333F">
- <text class="f-s-28">审核不通过原因:</text>
- <text class="f-s-28">云南省红河州个旧市卡房镇田心村小田心村268号工业园</text>
- </view>
- </view>
- </up-swipe-action-item>
- </up-swipe-action>
- </view>
- </template>
- <!-- 空数据处理 -->
- <template v-if="!address && list.length === 0">
- <ut-empty class="mg-at" size="28rpx" color="#999" padding="10rpx" image="/static/images/plant/noEmptyBase.png">非云南省内企业,无法获取已获评的GAP基地信息~</ut-empty>
- <view class="d-flex j-c f-s-28 c-#ccc">可点击底部按钮上传佐证材料添加获评信息</view>
- </template>
- <template v-if="address && list.length === 0">
- <ut-empty class="mg-at" size="28rpx" color="#999" padding="10rpx" image="/static/images/plant/noEmptyBase.png">暂无获评GAP基地信息~</ut-empty>
- <view class="d-flex j-c f-s-28 c-#ccc">如需认定GAP基地,可前往数字云药官网进行申报</view>
- <view class="d-flex j-c f-s-28 c-primary pd-15">https://www.shuziyunyao.com/</view>
- <up-button type="primary" class="b-radius" style="width: 340rpx" @click="copyText('https://www.shuziyunyao.com/')">复制网址</up-button>
- </template>
- </template>
- <template #bottom v-if="!address">
- <view class="base-bottom-wrap pd-20 pb-0">
- <up-button type="primary">
- <img class="w-38 h-36 mr-10" src="/static/images/plant/chooseGAP.png" alt="" mode="widthFix" />
- <text>添加GAP基地信息</text>
- </up-button>
- </view>
- </template>
- </z-paging>
- </template>
- <script setup lang="ts">
- import { copyText } from '@/utils/public';
- interface ListItem {
- id: number;
- name: string;
- }
- const paging = ref();
- const list = ref<ListItem[]>([]);
- const placeholder = ref('搜基地名称、品种、基地地址');
- const tabs = ref([
- { label: '全部', value: '' },
- { label: '有效', value: '0' },
- { label: '审核不通过', value: '1' },
- { label: '待审核', value: '2' },
- ]);
- // 判断是否是云南的企业
- const address = ref(false);
- const form = ref({
- keywords: '',
- type: '',
- });
- setTimeout(() => {
- address.value = true;
- }, 2000);
- const query = async (pageNum: number, pageSize: number) => {
- const params = {
- pageNum,
- pageSize,
- ...form.value,
- };
- // const res = await cpyList(params);
- let res: ListItem[] = [];
- //循环push10条数据
- for (let i = 0; i < 10; i++) {
- res.push({
- id: i + 1,
- name: `${i + 1}`,
- });
- }
- // const { rows } = res;
- paging.value.complete(res);
- };
- const onRefresh = () => {
- paging.value.reload();
- };
- // 处理地块数据
- const showAction = ref(false);
- const optionsAction = reactive([
- {
- text: '删除',
- style: {
- backgroundColor: '#f56c6c',
- },
- },
- ]);
- const clickSwipe = (index: object) => {
- console.log(index);
- };
- </script>
- <style lang="scss" scoped>
- // @import '@/assets/styles/theme.scss';
- .search-select-item {
- height: 86rpx;
- background-color: #fff;
- border-radius: 10rpx;
- box-sizing: border-box;
- padding-left: 16rpx;
- padding-right: 16rpx;
- padding-top: 14rpx;
- padding-bottom: 14rpx;
- }
- .u-page {
- padding: 0;
- }
- .u-demo-block__title {
- padding: 10px 0 2px 15px;
- }
- .swipe-action {
- &__content {
- padding: 25rpx 0;
- &__text {
- font-size: 15px;
- color: $u-main-color;
- padding-left: 30rpx;
- }
- }
- }
- </style>
|