|
@@ -58,7 +58,7 @@
|
|
|
<view class="b-radius pt-0 bg-#f7f7f7" style="border: 1rpx solid #fff; border-bottom-color: transparent; margin-top: -40rpx">
|
|
<view class="b-radius pt-0 bg-#f7f7f7" style="border: 1rpx solid #fff; border-bottom-color: transparent; margin-top: -40rpx">
|
|
|
<up-sticky :offset-top="stickyTop" zIndex="10">
|
|
<up-sticky :offset-top="stickyTop" zIndex="10">
|
|
|
<view class="pd-24 p-rtv bg-#f7f7f7">
|
|
<view class="pd-24 p-rtv bg-#f7f7f7">
|
|
|
- <image src="/static/images/plant/basePlotBG.png" class="w-100%" mode="widthFix" style="position: absolute; top: 0; left: 0;"></image>
|
|
|
|
|
|
|
+ <image src="/static/images/plant/basePlotBG.png" class="w-100%" mode="widthFix" style="position: absolute; top: 0; left: 0"></image>
|
|
|
<view class="d-flex a-c mb-26 p-rtv">
|
|
<view class="d-flex a-c mb-26 p-rtv">
|
|
|
<view class="p-rtv d-flex flex-cln">
|
|
<view class="p-rtv d-flex flex-cln">
|
|
|
<view class="c-333 f-s-32 f-w-5 z-index-1">基地与地块管理</view>
|
|
<view class="c-333 f-s-32 f-w-5 z-index-1">基地与地块管理</view>
|
|
@@ -69,10 +69,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="d-flex a-c p-rtv">
|
|
<view class="d-flex a-c p-rtv">
|
|
|
<view class="w-220">
|
|
<view class="w-220">
|
|
|
- <ut-action-sheet v-model="form.queryType" :tabs="[{ label: '全部', value: '' }]" @change="onRefresh" title="选择原料类型">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.queryType" :tabs="typeNums" @change="onRefresh" title="选择原料类型">
|
|
|
<view class="d-flex search-select-item a-c">
|
|
<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 class="flex1 ov-hd f-s-26 c-333 text-center f-w-5 w-s-no up-line-1">{{ selectDictLabel(typeNums, form?.queryType) || '全部' }} </view>
|
|
|
|
|
+ <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="ml-5"></up-icon>
|
|
|
</view>
|
|
</view>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
</view>
|
|
</view>
|
|
@@ -102,22 +102,46 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="c-333 f-s-28 pd-5">
|
|
<view class="c-333 f-s-28 pd-5">
|
|
|
<text class="c-#666">基地地址:</text>
|
|
<text class="c-#666">基地地址:</text>
|
|
|
- <text class="f-w-5">{{ item?.gapInfo?.address || '-' }}</text>
|
|
|
|
|
|
|
+ <text class="f-w-5">{{ (item?.gapInfo?.adcodeName || '') + (item?.gapInfo?.address || '') || '-' }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="item?.plantingVarieties?.length" class="c-333 f-s-28 pd-5 d-flex">
|
|
<view v-if="item?.plantingVarieties?.length" class="c-333 f-s-28 pd-5 d-flex">
|
|
|
<text class="c-#666 w-s-no">当前在地品种:</text>
|
|
<text class="c-#666 w-s-no">当前在地品种:</text>
|
|
|
<text class="ov-hd tx-ov w-s-no f-w-5">{{ item.plantingVarieties?.map((items) => items.variety).join('、') || '-' }}</text>
|
|
<text class="ov-hd tx-ov w-s-no f-w-5">{{ item.plantingVarieties?.map((items) => items.variety).join('、') || '-' }}</text>
|
|
|
<text v-if="item?.plantingVarieties?.length" class="flex1 w-s-no f-w-5">等{{ item.plantingVarieties?.length }}个品种</text>
|
|
<text v-if="item?.plantingVarieties?.length" class="flex1 w-s-no f-w-5">等{{ item.plantingVarieties?.length }}个品种</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="pd-10"></view>
|
|
|
|
|
- <view v-if="item.gapInfo?.basePic" class="p-rtv">
|
|
|
|
|
- <image class="w-full h-310" :src="item.gapInfo?.basePic" mode="aspectFill"></image>
|
|
|
|
|
- <view class="d-flex flex-cln a-ed" style="position: absolute; bottom: 20rpx; right: 0">
|
|
|
|
|
- <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20 mb-10" style="border-radius: 10rpx 0 0 10rpx; width: max-content">{{ item?.contactName }}负责</view>
|
|
|
|
|
- <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20 mb-10" style="border-radius: 10rpx 0 0 10rpx; width: max-content">公司+合作社</view>
|
|
|
|
|
- <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20" style="border-radius: 10rpx 0 0 10rpx; width: max-content">经度:E{{ item?.gapInfo?.lng }} 纬度:N{{ item?.gapInfo?.lat }}</view>
|
|
|
|
|
|
|
+ <template v-if="item.gapInfo?.basePic">
|
|
|
|
|
+ <view class="pd-10"></view>
|
|
|
|
|
+ <view class="p-rtv">
|
|
|
|
|
+ <image class="w-full h-310" :src="item.gapInfo?.basePic" mode="aspectFill"></image>
|
|
|
|
|
+ <view class="d-flex flex-cln a-ed" style="position: absolute; bottom: 20rpx; right: 0">
|
|
|
|
|
+ <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20 mb-10" style="border-radius: 10rpx 0 0 10rpx; width: max-content">{{ item?.contactName }}负责</view>
|
|
|
|
|
+ <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20 mb-10" style="border-radius: 10rpx 0 0 10rpx; width: max-content">{{ selectDictLabel(pt_org_type, item?.orgType) }}</view>
|
|
|
|
|
+ <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20" style="border-radius: 10rpx 0 0 10rpx; width: max-content">经度:E{{ item?.gapInfo?.lng }} 纬度:N{{ item?.gapInfo?.lat }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view style="position: absolute; top: 20rpx; left: 0">
|
|
|
|
|
+ <view class="base-status-gap-1" v-if="+item?.gapFlag">获评{{ item?.gapInfo?.medicineName }}GAP基地</view>
|
|
|
|
|
+ <template v-if="item?.swyqRes">
|
|
|
|
|
+ <view class="base-status-gap-1" v-if="item?.swyqRes == '1'">获评{{ item?.swyqVarietyName }}三无一全基地</view>
|
|
|
|
|
+ <view class="base-status-gap-2" v-if="item?.swyqRes == '2'">标记{{ item?.swyqVarietyName }}三无一全基地未通过审核</view>
|
|
|
|
|
+ <view class="base-status-gap-0" v-if="item?.swyqRes == '0'">标记{{ item?.swyqVarietyName }}三无一全基地待审核</view>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <view v-if="item?.contactName" class="c-333 f-s-28 pd-5">
|
|
|
|
|
+ <text class="c-#666">负责人:</text>
|
|
|
|
|
+ <text class="f-w-5">{{ item?.contactName || '-' }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-if="item?.orgType" class="c-333 f-s-28 pd-5">
|
|
|
|
|
+ <text class="c-#666">组织方式:</text>
|
|
|
|
|
+ <text class="f-w-5">{{ selectDictLabel(pt_org_type, item?.orgType) }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-if="item?.orgType" class="c-333 f-s-28 pd-5">
|
|
|
|
|
+ <text class="c-#666">经纬度:</text>
|
|
|
|
|
+ <text class="f-w-5">E{{ item?.gapInfo?.lng }},N{{ item?.gapInfo?.lat }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </template>
|
|
|
<view v-if="+(item?.tempFlag ?? 0)" class="temp_flag">暂存</view>
|
|
<view v-if="+(item?.tempFlag ?? 0)" class="temp_flag">暂存</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-swipe-action-item>
|
|
</up-swipe-action-item>
|
|
@@ -165,7 +189,7 @@ import { useClientRequest } from '@/utils/request';
|
|
|
import { setCipByNum } from '@/utils/public';
|
|
import { setCipByNum } from '@/utils/public';
|
|
|
import { useInfoStore } from '@/store';
|
|
import { useInfoStore } from '@/store';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const { pt_base_type } = toRefs<any>(proxy?.useDict('pt_base_type'));
|
|
|
|
|
|
|
+const { pt_base_type, pt_org_type } = toRefs<any>(proxy?.useDict('pt_base_type', 'pt_org_type'));
|
|
|
const infoStore = useInfoStore();
|
|
const infoStore = useInfoStore();
|
|
|
// 获取用户信息
|
|
// 获取用户信息
|
|
|
const avatar = computed(() => infoStore.userInfo?.avatar || '');
|
|
const avatar = computed(() => infoStore.userInfo?.avatar || '');
|
|
@@ -199,6 +223,7 @@ interface GapInfo {
|
|
|
res: string;
|
|
res: string;
|
|
|
auditor: number;
|
|
auditor: number;
|
|
|
msg: string;
|
|
msg: string;
|
|
|
|
|
+ adcodeName?: string;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 种植品种类型
|
|
// 种植品种类型
|
|
@@ -244,6 +269,8 @@ interface BaseData {
|
|
|
plantingVarieties: PlantingVariety[];
|
|
plantingVarieties: PlantingVariety[];
|
|
|
coordinates: Coordinate[][]; // 二维坐标数组
|
|
coordinates: Coordinate[][]; // 二维坐标数组
|
|
|
tempFlag?: number | string;
|
|
tempFlag?: number | string;
|
|
|
|
|
+ swyqRes?: string;
|
|
|
|
|
+ swyqVarietyName?: string;
|
|
|
}
|
|
}
|
|
|
const instance = getCurrentInstance();
|
|
const instance = getCurrentInstance();
|
|
|
const list = ref<BaseData[]>();
|
|
const list = ref<BaseData[]>();
|
|
@@ -350,13 +377,19 @@ const clickTempSwipe = async (event: object) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+const typeNums = ref<any[]>([]);
|
|
|
// 获取统计信息
|
|
// 获取统计信息
|
|
|
const getBaseCount = async () => {
|
|
const getBaseCount = async () => {
|
|
|
try {
|
|
try {
|
|
|
const res = await useClientRequest.get('/plt-api/app/base/getBaseCount');
|
|
const res = await useClientRequest.get('/plt-api/app/base/getBaseCount');
|
|
|
if (res?.code === 200) {
|
|
if (res?.code === 200) {
|
|
|
console.log(res);
|
|
console.log(res);
|
|
|
-
|
|
|
|
|
|
|
+ typeNums.value = res.data?.map((item: any) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ label: `${item.name}(${item.num})`,
|
|
|
|
|
+ value: item.type,
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('获取地块统计信息失败:', error);
|
|
console.error('获取地块统计信息失败:', error);
|
|
@@ -368,6 +401,7 @@ onMounted(() => {
|
|
|
.select('#topup-navbar')
|
|
.select('#topup-navbar')
|
|
|
.boundingClientRect((data: any) => {
|
|
.boundingClientRect((data: any) => {
|
|
|
console.log(data);
|
|
console.log(data);
|
|
|
|
|
+
|
|
|
stickyTop.value = data.top + data.height;
|
|
stickyTop.value = data.top + data.height;
|
|
|
})
|
|
})
|
|
|
.exec();
|
|
.exec();
|
|
@@ -387,10 +421,7 @@ onShow(() => {
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
border-radius: 10rpx;
|
|
border-radius: 10rpx;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
- padding-left: 16rpx;
|
|
|
|
|
- padding-right: 16rpx;
|
|
|
|
|
- padding-top: 14rpx;
|
|
|
|
|
- padding-bottom: 14rpx;
|
|
|
|
|
|
|
+ padding: 12rpx;
|
|
|
}
|
|
}
|
|
|
.temp_flag {
|
|
.temp_flag {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -402,4 +433,28 @@ onShow(() => {
|
|
|
padding: 4rpx 16rpx;
|
|
padding: 4rpx 16rpx;
|
|
|
border-radius: 0 16rpx 0 16rpx;
|
|
border-radius: 0 16rpx 0 16rpx;
|
|
|
}
|
|
}
|
|
|
|
|
+.base-status-gap-1 {
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ background-image: linear-gradient(to right, #37a954, #a4d14e);
|
|
|
|
|
+ padding: 6rpx 24rpx 6rpx 16rpx;
|
|
|
|
|
+ border-radius: 0 20rpx 20rpx 0;
|
|
|
|
|
+}
|
|
|
|
|
+.base-status-gap-2 {
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ background: rgba(#fc333f, 0.8);
|
|
|
|
|
+ padding: 6rpx 24rpx 6rpx 16rpx;
|
|
|
|
|
+ border-radius: 0 20rpx 20rpx 0;
|
|
|
|
|
+}
|
|
|
|
|
+.base-status-gap-0 {
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ background: rgba(#ffad11, 0.8);
|
|
|
|
|
+ padding: 6rpx 24rpx 6rpx 16rpx;
|
|
|
|
|
+ border-radius: 0 20rpx 20rpx 0;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|