huangxw 4 săptămâni în urmă
părinte
comite
e631901c19

+ 4 - 4
src/pages.json

@@ -110,16 +110,16 @@
                 },
                 // 标记三无一全基地
                 {
-                    "path": "mark-swyq-base/index",
+                    "path": "mark-base/index",
                     "style": {
-                        "navigationBarTitleText": "标记三无一全基地"
+                        "navigationBarTitleText": "标记基地"
                     }
                 },
                 // 标记三无一全基地详情
                 {
-                    "path": "mark-swyq-base-detail/index",
+                    "path": "mark-base-detail/index",
                     "style": {
-                        "navigationBarTitleText": "三无一全基地详情"
+                        "navigationBarTitleText": "标记基地详情"
                     }
                 }
             ]

+ 6 - 8
src/pages/plant/base/index.vue

@@ -119,11 +119,10 @@
                                                     <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?.swyqMedicineName }}三无一全基地</view>
-                                                        <view class="base-status-gap-2" v-if="item?.swyqRes == '2'">标记{{ item?.swyqMedicineName }}三无一全基地未通过审核</view>
-                                                        <view class="base-status-gap-0" v-if="item?.swyqRes == '0'">标记{{ item?.swyqMedicineName }}三无一全基地待审核</view>
+                                                    <template v-for="(resq, index) in item?.resInfo" :key="index">
+                                                        <view class="base-status-gap-1" v-if="resq?.res == '1'">获评{{ resq?.medicineName }}{{ selectDictLabel(pt_base_form, resq?.type) }}基地</view>
+                                                        <view class="base-status-gap-2" v-if="resq?.res == '2'">标记{{ resq?.medicineName }}{{ selectDictLabel(pt_base_form, resq?.type) }}基地未通过审核</view>
+                                                        <view class="base-status-gap-0" v-if="resq?.res == '0'">标记{{ resq?.medicineName }}{{ selectDictLabel(pt_base_form, resq?.type) }}基地待审核</view>
                                                     </template>
                                                 </view>
                                             </view>
@@ -189,7 +188,7 @@ import { useClientRequest } from '@/utils/request';
 import { setCipByNum } from '@/utils/public';
 import { useInfoStore } from '@/store';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { pt_base_type, pt_org_type } = toRefs<any>(proxy?.useDict('pt_base_type', 'pt_org_type'));
+const { pt_base_type, pt_org_type, pt_base_form } = toRefs<any>(proxy?.useDict('pt_base_type', 'pt_org_type', 'pt_base_form'));
 const infoStore = useInfoStore();
 // 获取用户信息
 const avatar = computed(() => infoStore.userInfo?.avatar || '');
@@ -269,8 +268,7 @@ interface BaseData {
     plantingVarieties: PlantingVariety[];
     coordinates: Coordinate[][]; // 二维坐标数组
     tempFlag?: number | string;
-    swyqRes?: string;
-    swyqMedicineName?: string;
+    resInfo?: any[];
 }
 const instance = getCurrentInstance();
 const list = ref<BaseData[]>();

+ 32 - 24
src/plant/base/base-detail/index.vue

@@ -295,29 +295,37 @@
             </template>
         </view>
         <template #bottom>
-            <view class="pd-20 d-flex">
-                <template v-if="!+form.baseInfo?.tempFlag">
-                    <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/mark-swyq-base/index', params: { id: did } })" v-if="!form?.baseInfo?.swyqRes" class="mr-20" color="#18BECA">去标记为三无一全基地{{ '>' }}</up-button>
-                    <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/mark-swyq-base-detail/index', params: { id: did } })" v-if="['2'].includes(form?.baseInfo?.swyqRes)" class="mr-20" color="#FC333F">
-                        <view>
-                            <view>标记为三无一全基地</view>
-                            <view>未通过{{ '>' }}</view>
-                        </view>
-                    </up-button>
-                    <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/mark-swyq-base-detail/index', params: { id: did } })" v-if="['0'].includes(form?.baseInfo?.swyqRes)" class="mr-20" color="#F4A91A">
-                        <view>
-                            <view>标记为三无一全基地</view>
-                            <view>待审核{{ '>' }}</view>
-                        </view>
-                    </up-button>
-                    <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/mark-swyq-base-detail/index', params: { id: did } })" v-if="['1'].includes(form?.baseInfo?.swyqRes)" class="mr-20" color="#AECEBF">
-                        <view>
-                            <view>标记为三无一全基地</view>
-                            <view>已通过{{ '>' }}</view>
-                        </view>
-                    </up-button>
-                </template>
-                <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/base-edit/index', params: { id: did } })" type="primary">去修改</up-button>
+            <view class="pd-20">
+                <ut-row gap="10rpx">
+                    <template v-if="!+form.baseInfo?.tempFlag">
+                        <template v-for="(item, index) in form?.baseInfo?.resInfo" :key="index">
+                            <ut-col :span="15">
+                                <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/mark-base/index', params: { id: did, type: item?.type } })" v-if="!item?.res" color="#18BECA">去标记为{{ selectDictLabel(pt_base_form, item?.type) }}基地{{ '>' }}</up-button>
+                                <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/mark-base-detail/index', params: { id: did, type: item?.type } })" v-if="['2'].includes(item?.res)" color="#FC333F">
+                                    <view>
+                                        <view>标记为{{ selectDictLabel(pt_base_form, item?.type) }}基地</view>
+                                        <view>未通过{{ '>' }}</view>
+                                    </view>
+                                </up-button>
+                                <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/mark-base-detail/index', params: { id: did, type: item?.type } })" v-if="['0'].includes(item?.res)" color="#F4A91A">
+                                    <view>
+                                        <view>标记为{{ selectDictLabel(pt_base_form, item?.type) }}基地</view>
+                                        <view>待审核{{ '>' }}</view>
+                                    </view>
+                                </up-button>
+                                <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/mark-base-detail/index', params: { id: did, type: item?.type } })" v-if="['1'].includes(item?.res)" color="#AECEBF">
+                                    <view>
+                                        <view>标记为{{ selectDictLabel(pt_base_form, item?.type) }}基地</view>
+                                        <view>已通过{{ '>' }}</view>
+                                    </view>
+                                </up-button>
+                            </ut-col>
+                        </template>
+                    </template>
+                    <ut-col :span="30">
+                        <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/base-edit/index', params: { id: did } })" type="primary">去修改</up-button>
+                    </ut-col>
+                </ut-row>
             </view>
         </template>
     </z-paging>
@@ -326,7 +334,7 @@
 import { useClientRequest } from '@/utils/request';
 import { getUrlParams, recursiveDecodeURIComponent } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { yes_no, pt_org_type, pt_base_type, pt_water_type, pt_soil_type, pt_soil_texture, pt_light_type, pt_capacity_unit } = toRefs<any>(proxy?.useDict('yes_no', 'pt_org_type', 'pt_base_type', 'pt_water_type', 'pt_soil_type', 'pt_soil_texture', 'pt_light_type', 'pt_capacity_unit'));
+const { yes_no, pt_org_type, pt_base_type, pt_water_type, pt_soil_type, pt_soil_texture, pt_light_type, pt_base_form } = toRefs<any>(proxy?.useDict('yes_no', 'pt_org_type', 'pt_base_type', 'pt_water_type', 'pt_soil_type', 'pt_soil_texture', 'pt_light_type', 'pt_base_form'));
 const tabs = reactive([
     { label: '基本信息', value: 'base' },
     { label: '地块信息', value: 'plot' },

+ 33 - 22
src/plant/base/mark-swyq-base-detail/index.vue → src/plant/base/mark-base-detail/index.vue

@@ -2,29 +2,29 @@
     <view class="ksqulc">
         <z-paging ref="paging" bgColor="#F7F7F7" safe-area-inset-bottom paging-class="paging-btm-shadow" refresher-only @onRefresh="onRefresh" scroll-with-animation>
             <template #top>
-                <ut-navbar title="标记为三无一全基地" :fixed="false" border></ut-navbar>
+                <ut-navbar :title="`标记为${selectDictLabel(pt_base_form, formRes.type)}基地`" :fixed="false" border></ut-navbar>
             </template>
             <view class="p-rtv">
                 <view ref="baseRef" class="pd-24" id="base12345">
                     <view class="startline-title">证明材料</view>
                 </view>
                 <view v-if="form" class="pd-24 bg-#fff mb-10 p-rtv">
-                    <image class="base_res_logo w-160 h-160" :src="`https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/base_res_logo${form?.baseInfo?.swyqRes}.png`" mode="widthFix" />
+                    <image class="base_res_logo w-160 h-160" :src="`https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/base_res_logo${formRes?.res}.png`" mode="widthFix" />
                     <view class="f-s-30 pd2-16-0 info-border-bottom">
                         <span class="c-#666">获评品种:</span>
-                        <span class="c-#333">{{ form?.baseInfo?.swyqMedicineName || '-' }}</span>
+                        <span class="c-#333">{{ formRes.medicineName || '-' }}</span>
                     </view>
                     <view class="f-s-30 pd2-16-0 info-border-bottom">
                         <span class="c-#666">获评时间:</span>
-                        <span class="c-#333">{{ form?.baseInfo?.swyqRatedDate || '-' }}</span>
+                        <span class="c-#333">{{ formRes.ratedDate || '-' }}</span>
                     </view>
-                    <view v-if="form?.baseInfo?.swyqCertFile" class="f-s-30 pd2-16-0 info-border-bottom">
+                    <view v-if="formRes.certFile" class="f-s-30 pd2-16-0 info-border-bottom">
                         <view class="f-s-30 c-#666 mb-10">官方公示证明材料</view>
-                        <ut-album :urls="form?.baseInfo?.swyqCertFile"></ut-album>
+                        <ut-album :urls="formRes.certFile"></ut-album>
                     </view>
-                    <view v-if="form?.baseInfo?.swyqUrl" class="f-s-30 pd2-16-0 info-border-bottom">
+                    <view v-if="formRes.certUrl" class="f-s-30 pd2-16-0 info-border-bottom">
                         <span class="c-#666">官方公示网址:</span>
-                        <span class="c-#333">{{ form?.baseInfo?.swyqUrl || '-' }}</span>
+                        <span class="c-#333">{{ formRes.certUrl || '-' }}</span>
                     </view>
                 </view>
                 <view ref="baseRef" class="pd-24" id="base12345">
@@ -64,10 +64,10 @@
                     </view>
                 </view>
             </view>
-            <template v-if="form?.baseInfo?.swyqRes == '2'" #bottom>
+            <template v-if="formRes.res == '2'" #bottom>
                 <view class="pd-20">
-                    <view v-if="form?.baseInfo?.msg" class="mb-16 c-#FC333F f-s-24">审核未通过原因:{{ form?.baseInfo?.msg || '-' }}</view>
-                    <up-button type="primary" @click="$u.route({ type: 'redirect', url: '/plant/base/mark-swyq-base/index', params: { id: did } })">去修改</up-button>
+                    <view v-if="formRes?.msg" class="mb-16 c-#FC333F f-s-24">审核未通过原因:{{ formRes?.msg || '-' }}</view>
+                    <up-button type="primary" @click="$u.route({ type: 'redirect', url: '/plant/base/mark-base/index', params: { id: did, type: formRes.type } })">去修改</up-button>
                 </view>
             </template>
         </z-paging>
@@ -77,13 +77,8 @@
 import { useClientRequest } from '@/utils/request';
 import { getUrlParams, recursiveDecodeURIComponent } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { yes_no, pt_org_type, pt_base_type, pt_water_type, pt_soil_type, pt_soil_texture, pt_light_type, pt_capacity_unit } = toRefs<any>(proxy?.useDict('yes_no', 'pt_org_type', 'pt_base_type', 'pt_water_type', 'pt_soil_type', 'pt_soil_texture', 'pt_light_type', 'pt_capacity_unit'));
-const tabs = reactive([
-    { label: '基本信息', value: 'base' },
-    { label: '地块信息', value: 'plot' },
-    { label: '选址依据及环境信息', value: 'environment' },
-]);
-const activeTab = ref('base');
+const {  pt_base_type, pt_base_form } = toRefs<any>(proxy?.useDict( 'pt_base_type', 'pt_base_form' ));
+
 const paging = ref<any>(null);
 const mapUnitByBaseType: any = {
     '1': '亩',
@@ -91,15 +86,29 @@ const mapUnitByBaseType: any = {
     '3': '平方米',
 };
 const form = ref<any>(null);
-
+const formRes = ref<any>({
+    type: '',
+    medicineCode: undefined,
+    medicineName: '',
+    ratedDate: '',
+    certFile: '',
+    certUrl: '',
+});
 
 const did = ref('');
 // 根据id获取基地详情
+// 根据id获取基地详情
 const getDetailById = async (id: string) => {
     const res = await useClientRequest.get(`/plt-api/app/base/getInfoAllById/${id}`);
-    if (res && res.code === 200) {
-        form.value = res.data || {};
-    }
+    if (!res || res.code !== 200) return;
+    form.value = res.data || {};
+    res?.data?.baseInfo?.resInfo?.forEach((item: any) => {
+        if (item?.type === formRes.value.type) {
+            formRes.value = {
+                ...item
+            }
+        }
+    });
 };
 const onRefresh = () => {
     getDetailById(did.value);
@@ -107,8 +116,10 @@ const onRefresh = () => {
 };
 // 判断节点是否在可视区域内如果在则切换tab createIntersectionObserver
 
+// 判断节点是否在可视区域内如果在则切换tab createIntersectionObserver
 onLoad((options: any) => {
     did.value = options?.id || getUrlParams(recursiveDecodeURIComponent(options?.q))?.id || '';
+    formRes.value.type = options?.type || getUrlParams(recursiveDecodeURIComponent(options?.q))?.type || '';
     getDetailById(did.value);
 });
 </script>

+ 45 - 43
src/plant/base/mark-swyq-base/index.vue → src/plant/base/mark-base/index.vue

@@ -2,51 +2,51 @@
     <view class="ksqulc">
         <z-paging ref="paging" bgColor="#F7F7F7" safe-area-inset-bottom paging-class="paging-btm-shadow" refresher-only @onRefresh="onRefresh" scroll-with-animation>
             <template #top>
-                <ut-navbar title="标记为三无一全基地" :fixed="false" border></ut-navbar>
+                <ut-navbar :title="`标记为${selectDictLabel(pt_base_form, formRes.type)}基地`" :fixed="false" border></ut-navbar>
             </template>
             <view class="p-rtv">
                 <view ref="baseRef" class="pd-24" id="base12345">
                     <view class="startline-title">证明材料</view>
                 </view>
                 <view class="pd-24 bg-#fff mb-10">
-                    <up-form class="p-rtv" labelPosition="top" :model="formSwyq" :rules="rulesSwyq" labelWidth="auto" ref="upFormRef">
+                    <up-form class="p-rtv" labelPosition="top" :model="formRes" :rules="rulesSwyq" labelWidth="auto" ref="upFormRef">
                         <!-- 校验定位:基地类型 -->
                         <!-- 基地信息部分 -->
                         <view>
                             <!-- 选择获评品种 -->
-                            <view class="h-1" id="swyqMedicineCodepppp"></view>
-                            <up-form-item @click="selectMedicine" borderBottom label="获评品种" required prop="swyqMedicineCode">
-                                <view v-if="formSwyq.swyqMedicineCode" class="f-s-30 c-333 f-w-5 flex1">{{ formSwyq.swyqMedicineName }}</view>
+                            <view class="h-1" id="medicineCodepppp"></view>
+                            <up-form-item @click="selectMedicine" borderBottom label="获评品种" required prop="medicineCode">
+                                <view v-if="formRes.medicineCode" class="f-s-30 c-333 f-w-5 flex1">{{ formRes.medicineName }}</view>
                                 <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择获评品种</view>
                                 <template #right>
                                     <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
                                 </template>
                             </up-form-item>
                             <!-- 校验定位:建设时间 -->
-                            <view class="h-1" id="swyqRatedDatepppp"></view>
-                            <ut-datetime-picker v-model="formSwyq.swyqRatedDate" mode="date" dateFields="day">
-                                <up-form-item borderBottom label="获评三无一全基地时间" required prop="swyqRatedDate">
-                                    <up-input v-model="formSwyq.swyqRatedDate" placeholder="请选择获评三无一全基地时间" border="none" clearable></up-input>
+                            <view class="h-1" id="ratedDatepppp"></view>
+                            <ut-datetime-picker v-model="formRes.ratedDate" mode="date" dateFields="day">
+                                <up-form-item borderBottom label="获评基地时间" required prop="ratedDate">
+                                    <up-input v-model="formRes.ratedDate" placeholder="请选择获评基地时间" border="none" clearable></up-input>
                                     <template #right>
                                         <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
                                     </template>
                                 </up-form-item>
                             </ut-datetime-picker>
                             <!-- 官方公示证明材料 -->
-                            <view class="h-1" id="swyqCertFilepppp"></view>
-                            <up-form-item borderBottom required prop="swyqCertFile">
+                            <view class="h-1" id="certFilepppp"></view>
+                            <up-form-item borderBottom required prop="certFile">
                                 <view class="flex1">
                                     <view style="margin-bottom: 10rpx">
                                         <span class="c-666 f-s-30">官方公示证明材料</span>
                                         <span class="f-s-26 c-999">(可上传9张)</span>
                                     </view>
-                                    <ut-upload v-model="formSwyq.swyqCertFile" :max-count="9"></ut-upload>
+                                    <ut-upload v-model="formRes.certFile" :max-count="9"></ut-upload>
                                 </view>
                             </up-form-item>
                             <!-- 官方公示网址 -->
-                            <view class="h-1" id="swyqUrlpppp"></view>
-                            <up-form-item borderBottom label="官方公示网址" prop="swyqUrl" required>
-                                <up-input v-model="formSwyq.swyqUrl" placeholder="请输入官方公示网址" border="none" clearable></up-input>
+                            <view class="h-1" id="certUrlpppp"></view>
+                            <up-form-item borderBottom label="官方公示网址" prop="certUrl" required>
+                                <up-input v-model="formRes.certUrl" placeholder="请输入官方公示网址" border="none" clearable></up-input>
                             </up-form-item>
                         </view>
                     </up-form>
@@ -100,7 +100,7 @@
 import { useClientRequest } from '@/utils/request';
 import { getUrlParams, recursiveDecodeURIComponent } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { yes_no, pt_org_type, pt_base_type, pt_water_type, pt_soil_type, pt_soil_texture, pt_light_type, pt_capacity_unit } = toRefs<any>(proxy?.useDict('yes_no', 'pt_org_type', 'pt_base_type', 'pt_water_type', 'pt_soil_type', 'pt_soil_texture', 'pt_light_type', 'pt_capacity_unit'));
+const {  pt_base_type, pt_base_form } = toRefs<any>(proxy?.useDict( 'pt_base_type', 'pt_base_form' ));
 const tabs = reactive([
     { label: '基本信息', value: 'base' },
     { label: '地块信息', value: 'plot' },
@@ -114,26 +114,25 @@ const mapUnitByBaseType: any = {
     '3': '平方米',
 };
 const form = ref<any>({});
-const formSwyq = ref<any>({
-    swyqVarietyId: undefined,
-    swyqMedicineName: '',
-    swyqRatedDate: '',
-    swyqCertFile: '',
-    swyqUrl: '',
+const formRes = ref<any>({
+    type: '',
+    medicineCode: undefined,
+    medicineName: '',
+    ratedDate: '',
+    certFile: '',
+    certUrl: '',
 });
 const rulesSwyq = reactive<any>({
-    swyqVarietyId: [{ type: 'number', required: true, message: '请选择获评品种', trigger: 'change' }],
-    swyqRatedDate: [{ required: true, message: '请选择获评三无一全基地时间', trigger: 'change' }],
-    swyqCertFile: [{ required: true, message: '请上传官方公示证明材料', trigger: 'change' }],
-    swyqUrl: [{ required: true, message: '请输入官方公示网址', trigger: 'change' }],
+    medicineCode: [{ required: true, message: '请选择获评品种' }],
+    ratedDate: [{ required: true, message: '请选择获评基地时间' }],
+    certFile: [{ required: true, message: '请上传官方公示证明材料' }],
+    certUrl: [{ required: true, message: '请输入官方公示网址' }],
 });
 // 改成去选择获评品种页面
 const selectMedicine = () => {
     uni.$on('medicineSelected', (medicine: any) => {
-        console.log(medicine);
-        
-        formSwyq.value.swyqMedicineCode = medicine.medicineCode;
-        formSwyq.value.swyqMedicineName = medicine.medicineName;
+        formRes.value.medicineCode = medicine.medicineCode;
+        formRes.value.medicineName = medicine.medicineName;
         uni.$off('medicineSelected');
     });
     uni.$u.route({
@@ -148,14 +147,15 @@ const did = ref('');
 // 根据id获取基地详情
 const getDetailById = async (id: string) => {
     const res = await useClientRequest.get(`/plt-api/app/base/getInfoAllById/${id}`);
-    if (res && res.code === 200) {
-        form.value = res.data || {};
-        formSwyq.value.swyqMedicineCode = res.data?.baseInfo?.swyqMedicineCode || undefined;
-        formSwyq.value.swyqMedicineName = res.data?.baseInfo?.swyqMedicineName || '';
-        formSwyq.value.swyqRatedDate = res.data?.baseInfo?.swyqRatedDate || '';
-        formSwyq.value.swyqCertFile = res.data?.baseInfo?.swyqCertFile || '';
-        formSwyq.value.swyqUrl = res.data?.baseInfo?.swyqUrl || '';
-    }
+    if (!res || res.code !== 200) return;
+    form.value = res.data || {};
+    res?.data?.baseInfo?.resInfo?.forEach((item: any) => {
+        if (item?.type === formRes.value.type) {
+            formRes.value = {
+                ...item
+            }
+        }
+    });
 };
 const onRefresh = () => {
     getDetailById(did.value);
@@ -178,11 +178,12 @@ const submitForm = async () => {
                 title: '提交中...',
             });
             try {
-                const res = did.value ?  await useClientRequest.post('/plt-api/app/base/updateSwyqBase', {
-                    ...formSwyq.value,
+                const res = formRes.value?.res ? await useClientRequest.post('/plt-api/app/base/updateSwyqBase', {
+                    ...formRes.value,
                     id: did.value,
                 }) : await useClientRequest.post('/plt-api/app/base/addSwyqBase', {
-                    ...formSwyq.value,
+                    ...formRes.value,
+                    id: did.value,
                 });
                 if (!res || res.code !== 200) return;
                 uni.hideLoading();
@@ -196,9 +197,10 @@ const submitForm = async () => {
                 // 返回上一页
                 uni.$u.route({
                     type: 'redirect',
-                    url: '/plant/base/mark-swyq-base-detail/index',
+                    url: '/plant/base/mark-base-detail/index',
                     params: {
                         id: did.value,
+                        type: formRes.value.type,
                     },
                 });
             } catch (error) {
@@ -210,9 +212,9 @@ const submitForm = async () => {
     );
 };
 // 判断节点是否在可视区域内如果在则切换tab createIntersectionObserver
-
 onLoad((options: any) => {
     did.value = options?.id || getUrlParams(recursiveDecodeURIComponent(options?.q))?.id || '';
+    formRes.value.type = options?.type || getUrlParams(recursiveDecodeURIComponent(options?.q))?.type || '';
     getDetailById(did.value);
 });
 </script>