huangxw il y a 4 semaines
Parent
commit
c368330bf9

+ 6 - 5
src/audit/plant/base/audit-list/models/gap-base.vue

@@ -21,7 +21,7 @@
                 <template v-for="(item, index) in list" :key="index">
                     <view class="b-radius bg-#fff pd4-46-20-20-36 p-rtv mb-20" @click.stop="$u.route({ url: '/audit/plant/base/audit-detail/index', params: { id: item.id, viewType: 'gapbase' } })">
                         <view class="mb-10">
-                            <view class="c-#333 f-s-34 f-w-5 pb-5">{{ item?.gapBaseName }}</view>
+                            <view class="c-#333 f-s-34 f-w-5 pb-5">{{ item?.baseName }}</view>
                             <view class="c-#999 f-s-24">{{ item?.ratedDate }}获评</view>
                         </view>
                         <view class="d-flex pb-5">
@@ -31,12 +31,12 @@
                             </view>
                             <view class="w-50%">
                                 <text class="c-#666 f-s-28">基地面积:</text>
-                                <text class="c-#333 f-s-28 f-w-5">{{ item?.area }}{{ item?.areaUnit || '亩' }}</text>
+                                <text class="c-#333 f-s-28 f-w-5">{{ item?.gapInfo?.area }}{{ item?.gapInfo?.areaUnit || '亩' }}</text>
                             </view>
                         </view>
                         <view class="pb-20">
                             <text class="c-#666 f-s-28">基地地址:</text>
-                            <text class="c-#333 f-s-28 f-w-5">{{ item?.adcodeName }}{{ item?.address }}</text>
+                            <text class="c-#333 f-s-28 f-w-5">{{ item?.gapInfo?.adcodeName }}{{ item?.gapInfo?.address }}</text>
                         </view>
                         <view class="d-flex">
                             <view class="flex1 ov-hd"></view>
@@ -90,6 +90,7 @@ const tabs = ref([
 const form = ref({
     keyword: '',
     res: '0',
+    applyType: '1'
 });
 const query = async (pageNum: number, pageSize: number) => {
     const params = {
@@ -100,7 +101,7 @@ const query = async (pageNum: number, pageSize: number) => {
     if (pageNum === 1) {
         getBaseCount();
     }
-    const res = await useClientRequest.get<any>('/plt-api/app/gapCertificationInfo/pageListApproval', params);
+    const res = await useClientRequest.get<any>('/plt-api/app/base/querySwyqList', params);
     if (!res || res.code !== 200) return;
     const { rows } = res;
     paging.value.complete(rows);
@@ -109,7 +110,7 @@ const typeNums = ref<Array<{ label: string; value: string }>>([]);
 // 获取统计信息
 const getBaseCount = async () => {
     try {
-        const res = await useClientRequest.get('/plt-api/app/gapCertificationInfo/gapApprovalCount', form.value);
+        const res = await useClientRequest.get('/plt-api/app/base/baseApprovalCount', form.value);
         if (res?.code === 200) {
             console.log(res);
             typeNums.value = res.data?.map((item: any) => {

+ 5 - 4
src/audit/plant/base/audit-list/models/swyq-base.vue

@@ -6,9 +6,9 @@
             <!-- 如果希望其他view跟着页面滚动,可以放在z-paging标签内 -->
             <view class="d-flex a-c pd2-10-24">
                 <view class="min-w-240 flex1">
-                    <ut-action-sheet v-model="form.swyqRes" :tabs="typeNums" @change="onRefresh" title="选择审核状态">
+                    <ut-action-sheet v-model="form.res" :tabs="typeNums" @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">{{ selectDictLabel(typeNums, form.swyqRes) || '全部' }}</view>
+                            <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{ selectDictLabel(typeNums, form.res) || '全部' }}</view>
                             <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="ml-5"></up-icon>
                         </view>
                     </ut-action-sheet>
@@ -64,7 +64,7 @@
                                 >
                             </view>
                         </view>
-                        <view class="status-tag" :class="{ [`bg-res-${item?.swyqRes}`]: true }">{{ selectDictLabel(tabs, item?.swyqRes) }}</view>
+                        <view class="status-tag" :class="{ [`bg-res-${item?.res}`]: true }">{{ selectDictLabel(tabs, item?.res) }}</view>
                         <image class="swyq_tag_item_logo" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/audit/plant/swyq_tag_item_logo.png" mode="widthFix" />
                     </view>
                 </template>
@@ -89,7 +89,8 @@ const tabs = ref([
 ]);
 const form = ref({
     keyword: '',
-    swyqRes: '0',
+    res: '0',
+    applyType: '2'
 });
 const query = async (pageNum: number, pageSize: number) => {
     const params = {

+ 25 - 23
src/components/ut-action-sheet/ut-action-sheet.vue

@@ -8,31 +8,33 @@
         <view @click="showModel = true" class="flex1">
             <slot></slot>
         </view>
-        <up-popup v-model:show="showModel" mode="center" round="30rpx" :safeAreaInsetBottom="false" closeable @close="showModel = false">
-            <view class="w-700">
-                <view class="pd-24">
-                    <view class="f-s-32 c-#333 f-w-500">{{ title }}</view>
-                </view>
-                <scroll-view scroll-y style="max-height: 70vh">
-                    <view class="pd3-10-24-24">
-                        <ut-row gap="16rpx">
-                            <template v-for="(item, index) in options" :key="index">
-                                <ut-col :span="item.span">
-                                    <view @click="clickCol(item)" class="ut-custom-item-sheet p-rtv" :class="{ active: checkeds[item.value] }"
-                                        >{{ item?.remark || item?.name }}
-                                        <image v-if="checkeds[item.value]" class="w-40 h-40 checked-icon" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-lm/price/checked1.png" mode="widthFix" />
-                                    </view>
-                                </ut-col>
-                            </template>
-                        </ut-row>
+        <root-portal>
+            <up-popup v-model:show="showModel" mode="center" round="30rpx" :safeAreaInsetBottom="false" closeable @close="showModel = false">
+                <view class="w-700">
+                    <view class="pd-24">
+                        <view class="f-s-32 c-#333 f-w-500">{{ title }}</view>
+                    </view>
+                    <scroll-view scroll-y style="max-height: 70vh">
+                        <view class="pd3-10-24-24">
+                            <ut-row gap="16rpx">
+                                <template v-for="(item, index) in options" :key="index">
+                                    <ut-col :span="item.span">
+                                        <view @click="clickCol(item)" class="ut-custom-item-sheet p-rtv" :class="{ active: checkeds[item.value] }"
+                                            >{{ item?.remark || item?.name }}
+                                            <image v-if="checkeds[item.value]" class="w-40 h-40 checked-icon" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-lm/price/checked1.png" mode="widthFix" />
+                                        </view>
+                                    </ut-col>
+                                </template>
+                            </ut-row>
+                        </view>
+                    </scroll-view>
+                    <view v-if="multiple" class="d-flex j-c pd-24">
+                        <up-button class="mr-20" @click="onCancel">取消</up-button>
+                        <up-button type="primary" @click="onConfirm">确定</up-button>
                     </view>
-                </scroll-view>
-                <view v-if="multiple" class="d-flex j-c pd-24">
-                    <up-button class="mr-20" @click="onCancel">取消</up-button>
-                    <up-button type="primary" @click="onConfirm">确定</up-button>
                 </view>
-            </view>
-        </up-popup>
+            </up-popup>
+        </root-portal>
     </template>
 </template>
 <script setup lang="ts">

+ 6 - 15
src/components/ut-datetime-picker/ut-datetime-picker.vue

@@ -11,18 +11,9 @@
         <view @click.stop="showTime = true" class="ut-datetime-picker" :class="{ 'ut-datetime-picker--border': border }">
             <slot></slot>
         </view>
-        <up-datetime-picker
-            v-model:show="showTime"
-            :minDate="minDateTs"
-            :maxDate="maxDateTs"
-            ref="datetimePickerRef"
-            :title="title"
-            v-model="form.startTime"
-            :mode="mode"
-            @cancel="cancel"
-            confirmColor="#2a6d52"
-            @confirm="confirm"
-        ></up-datetime-picker>
+        <root-portal>
+            <up-datetime-picker v-model:show="showTime" :minDate="minDateTs" :maxDate="maxDateTs" ref="datetimePickerRef" :title="title" v-model="form.startTime" :mode="mode" @cancel="cancel" confirmColor="#2a6d52" @confirm="confirm"></up-datetime-picker>
+        </root-portal>
     </template>
 </template>
 <script setup lang="ts">
@@ -52,7 +43,7 @@ const props = withDefaults(defineProps<Props>(), {
     maxDate: new Date(2050, 0, 1).getTime(),
     dateFields: 'day',
     // 留空以便按粒度自动输出:year→{y},month→{y}-{m},day→{y}-{m}-{d}
-    dateFormat: ''
+    dateFormat: '',
 });
 
 const emit = defineEmits<{
@@ -72,7 +63,7 @@ const toTs = (v: number | string | Date | undefined | null): number => {
 };
 
 const form = ref({
-    startTime: toTs(props.modelValue as any)
+    startTime: toTs(props.modelValue as any),
 });
 
 // 当使用原生 picker 的 date 模式时,格式化绑定和边界值(随粒度变化)
@@ -130,4 +121,4 @@ const onPickerChange = (e: any) => {
 const cancel = () => {
     showTime.value = false;
 };
-</script>
+</script>

+ 76 - 81
src/components/ut-picker-area/ut-picker-area.vue

@@ -1,77 +1,74 @@
 <template>
-    <u-popup :show="show" mode="bottom" round="30rpx" closeable @close="close">
-        <view class="up-picker-area d-flex flex-cln">
-            <!-- 标题 -->
-            <view class="area-title">{{ title }}</view>
-            <!-- 顶部链路 -->
-            <view class="area-breadcrumb">
-                <!-- 全国根:selectCodeMax 为空或 000000 时显示 -->
-                <template v-if="isNationRoot">
-                    <view class="crumb disabled" @click="onClickNationBreadcrumb">全国</view>
-                    <view class="sep" v-if="selectedCodes.length">/</view>
-                </template>
-                <!-- 基础链路(selectCodeMax 的完整链路),仅最后一个可点击以切换到第一页(市级) -->
-                <template v-for="(code, idx) in baseChain" :key="'base-' + code">
-                    <view class="crumb" :class="idx === baseChain.length - 1 ? '' : 'disabled'" @click="idx === baseChain.length - 1 && onClickBaseBreadcrumb()">
-                        {{ getNameByCode(code) }}
-                    </view>
-                    <view class="sep" v-if="idx < baseChain.length - 1 || selectedCodes.length">/</view>
-                </template>
-
-                <!-- 选中链路 -->
-                <template v-for="(code, idx) in selectedCodes" :key="'sel-' + code">
-                    <view class="crumb" :class="{ active: idx === currentSwiper }" @click="jumpToLevel(idx)">
-                        {{ getNameByCode(code) }}
-                    </view>
-                    <view class="sep" v-if="idx < selectedCodes.length - 1">/</view>
-                </template>
-            </view>
+    <root-portal>
+        <u-popup :show="show" mode="bottom" round="30rpx" closeable @close="close">
+            <view class="up-picker-area d-flex flex-cln">
+                <!-- 标题 -->
+                <view class="area-title">{{ title }}</view>
+                <!-- 顶部链路 -->
+                <view class="area-breadcrumb">
+                    <!-- 全国根:selectCodeMax 为空或 000000 时显示 -->
+                    <template v-if="isNationRoot">
+                        <view class="crumb disabled" @click="onClickNationBreadcrumb">全国</view>
+                        <view class="sep" v-if="selectedCodes.length">/</view>
+                    </template>
+                    <!-- 基础链路(selectCodeMax 的完整链路),仅最后一个可点击以切换到第一页(市级) -->
+                    <template v-for="(code, idx) in baseChain" :key="'base-' + code">
+                        <view class="crumb" :class="idx === baseChain.length - 1 ? '' : 'disabled'" @click="idx === baseChain.length - 1 && onClickBaseBreadcrumb()">
+                            {{ getNameByCode(code) }}
+                        </view>
+                        <view class="sep" v-if="idx < baseChain.length - 1 || selectedCodes.length">/</view>
+                    </template>
 
-            <!-- 滑动列区域 -->
-            <view class="area-body">
-                <swiper :current="currentSwiper" @change="onSwiperChange" class="area-swiper">
-                    <template v-for="(parent, colIdx) in columnParents" :key="'col-' + parent">
-                        <swiper-item>
-                            <scroll-view
-                              :id="`sv-${colIdx}`"
-                              scroll-y
-                              class="area-scroll"
-                              :scroll-into-view="scrollIntoViewArr[colIdx]"
-                            >
-                                <!-- 顶部特殊项:全国(仅全国范围且首列显示) -->
-                                <view v-if="isNationRoot && colIdx === 0" class="picker-item" :id="`area-item-0-000000`" @click="onPickNation">
-                                    <view class="name" :class="{ selected: currentValue === '000000' }">全国</view>
-                                    <up-icon v-if="currentValue === '000000'" name="checkbox-mark" color="#000" size="36rpx" />
-                                </view>
-
-                                <!-- 顶部特殊项:选择范围自身(非全国,首列显示),如 云南省 -->
-                                <view v-else-if="!isNationRoot && colIdx === 0" class="picker-item" :id="`area-item-0-${canonical6(baseRoot)}`" @click="onPickBaseRoot">
-                                    <view class="name" :class="{ selected: currentValue === baseRoot }">{{ getNameByCode(baseRoot) }}</view>
-                                    <up-icon v-if="currentValue === baseRoot" name="checkbox-mark" color="#000" size="36rpx" />
-                                </view>
-
-                                <!-- 正常子级项 -->
-                                <template v-for="item in childrenMap[parent] || []" :key="item.adcdCode">
-                                    <view class="picker-item" :id="`area-item-${colIdx}-${canonical6(item.adcdCode)}`" @click="onPick(item, colIdx)">
-                                        <view class="name" :class="{ selected: canonical6(selectedCodes[colIdx]) === canonical6(item.adcdCode) }">
-                                            {{ item.adcdName }}
-                                        </view>
-                                        <up-icon v-if="canonical6(selectedCodes[colIdx]) === canonical6(item.adcdCode)" name="checkbox-mark" color="#000" size="36rpx" />
-                                    </view>
-                                </template>
-                            </scroll-view>
-                        </swiper-item>
+                    <!-- 选中链路 -->
+                    <template v-for="(code, idx) in selectedCodes" :key="'sel-' + code">
+                        <view class="crumb" :class="{ active: idx === currentSwiper }" @click="jumpToLevel(idx)">
+                            {{ getNameByCode(code) }}
+                        </view>
+                        <view class="sep" v-if="idx < selectedCodes.length - 1">/</view>
                     </template>
-                </swiper>
-            </view>
+                </view>
+
+                <!-- 滑动列区域 -->
+                <view class="area-body">
+                    <swiper :current="currentSwiper" @change="onSwiperChange" class="area-swiper">
+                        <template v-for="(parent, colIdx) in columnParents" :key="'col-' + parent">
+                            <swiper-item>
+                                <scroll-view :id="`sv-${colIdx}`" scroll-y class="area-scroll" :scroll-into-view="scrollIntoViewArr[colIdx]">
+                                    <!-- 顶部特殊项:全国(仅全国范围且首列显示) -->
+                                    <view v-if="isNationRoot && colIdx === 0" class="picker-item" :id="`area-item-0-000000`" @click="onPickNation">
+                                        <view class="name" :class="{ selected: currentValue === '000000' }">全国</view>
+                                        <up-icon v-if="currentValue === '000000'" name="checkbox-mark" color="#000" size="36rpx" />
+                                    </view>
 
-            <!-- 底部操作 -->
-            <view class="area-footer">
-                <up-button class="btn" @click="close">取消</up-button>
-                <up-button class="btn" color="#2A6D52" @click="confirmPick">确定</up-button>
+                                    <!-- 顶部特殊项:选择范围自身(非全国,首列显示),如 云南省 -->
+                                    <view v-else-if="!isNationRoot && colIdx === 0" class="picker-item" :id="`area-item-0-${canonical6(baseRoot)}`" @click="onPickBaseRoot">
+                                        <view class="name" :class="{ selected: currentValue === baseRoot }">{{ getNameByCode(baseRoot) }}</view>
+                                        <up-icon v-if="currentValue === baseRoot" name="checkbox-mark" color="#000" size="36rpx" />
+                                    </view>
+
+                                    <!-- 正常子级项 -->
+                                    <template v-for="item in childrenMap[parent] || []" :key="item.adcdCode">
+                                        <view class="picker-item" :id="`area-item-${colIdx}-${canonical6(item.adcdCode)}`" @click="onPick(item, colIdx)">
+                                            <view class="name" :class="{ selected: canonical6(selectedCodes[colIdx]) === canonical6(item.adcdCode) }">
+                                                {{ item.adcdName }}
+                                            </view>
+                                            <up-icon v-if="canonical6(selectedCodes[colIdx]) === canonical6(item.adcdCode)" name="checkbox-mark" color="#000" size="36rpx" />
+                                        </view>
+                                    </template>
+                                </scroll-view>
+                            </swiper-item>
+                        </template>
+                    </swiper>
+                </view>
+
+                <!-- 底部操作 -->
+                <view class="area-footer">
+                    <up-button class="btn" @click="close">取消</up-button>
+                    <up-button class="btn" color="#2A6D52" @click="confirmPick">确定</up-button>
+                </view>
             </view>
-        </view>
-    </u-popup>
+        </u-popup>
+    </root-portal>
     <up-toast ref="uToastRef" />
 </template>
 
@@ -395,7 +392,6 @@ const applyModelValue = async (val: MaybeStringNumber): Promise<void> => {
     const maxCols = Math.max(0, props.maxLevel - baseL);
     const picked = full.slice(base.length, base.length + maxCols);
 
-    
     selectedCodes.value = picked;
     currentValue.value = picked.length ? picked[picked.length - 1] : baseRoot.value;
     await ensureColumnsData();
@@ -440,7 +436,7 @@ const onPick = async (item: AreaItem, colIdx: number) => {
     // 是否达到允许的最后一列(相对 baseRoot 的列数)
     const baseL = codeLevel(baseRoot.value);
     const maxCols = Math.max(0, props.maxLevel - baseL);
-    const reachedFinalColumn = (colIdx + 1) >= maxCols;
+    const reachedFinalColumn = colIdx + 1 >= maxCols;
     if (reachedFinalColumn) {
         scrollToAllSelected();
         confirmPick();
@@ -486,11 +482,11 @@ const onPickBaseRoot = async (): Promise<void> => {
 
 // 组装完整名称:包含基础链路与已选链路(全国仅返回“全国”)
 const buildFullName = (): string => {
-  if (currentValue.value === '000000') return '全国';
-  const baseNames = baseChain.value.map((code) => getNameByCode(code));
-  // 若当前值是 baseRoot 自身(选择范围自身),则不重复追加 selectedCodes
-  const selNames = selectedCodes.value.map((code) => getNameByCode(code));
-  return [...baseNames, ...selNames].filter(Boolean).join('');
+    if (currentValue.value === '000000') return '全国';
+    const baseNames = baseChain.value.map((code) => getNameByCode(code));
+    // 若当前值是 baseRoot 自身(选择范围自身),则不重复追加 selectedCodes
+    const selNames = selectedCodes.value.map((code) => getNameByCode(code));
+    return [...baseNames, ...selNames].filter(Boolean).join('');
 };
 
 const confirmPick = (): void => {
@@ -505,7 +501,7 @@ const confirmPick = (): void => {
         value: currentValue.value,
         name: getNameByCode(currentValue.value),
         fullNames: nameList.join(''),
-        fullName // 新增:完整地址名称
+        fullName, // 新增:完整地址名称
     });
     close();
 };
@@ -558,14 +554,14 @@ watch(
         currentSwiper.value = 0;
         await rebuildByInputs();
     },
-    { immediate: true }
+    { immediate: true },
 );
 
 watch(
     () => props.modelValue,
     async (nv) => {
         await applyModelValue(String(nv || ''));
-    }
+    },
 );
 
 // 每次列父集合变化时,刷新列数据并滚动
@@ -576,7 +572,7 @@ watch(
         // 定位到当前列并滚动选中项
         currentSwiper.value = Math.max(0, Math.min(currentSwiper.value, columnParents.value.length - 1));
         scrollToAllSelected();
-    }
+    },
 );
 
 // 点击顶部“全国”:切到省级并滚动到省级区域
@@ -672,7 +668,6 @@ const onClickBaseBreadcrumb = async (): Promise<void> => {
     /* 移除 will-change 与像素滚动相关样式,仅保留稳定布局 */
 }
 
-
 .picker-item {
     display: flex;
     align-items: center;

+ 1 - 1
src/plant/base/base-edit/index.vue

@@ -40,7 +40,7 @@
                 <view class="h-1" id="buildDatepppp"></view>
                 <ut-datetime-picker v-model="form.baseInfo.buildDate" mode="date" dateFields="month">
                     <up-form-item borderBottom label="建设时间" prop="baseInfo.buildDate">
-                        <up-input v-model="form.baseInfo.buildDate" placeholder="请选择基地建设年份" border="none" clearable></up-input>
+                        <up-input v-model="form.baseInfo.buildDate" readonly placeholder="请选择基地建设年份" border="none" clearable></up-input>
                         <template #right>
                             <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
                         </template>