|
|
@@ -4,7 +4,7 @@
|
|
|
<ut-navbar :title="did && !+form?.baseInfo?.tempFlag ? '编辑基地' : '添加基地'" :fixed="false" border></ut-navbar>
|
|
|
<view class="bg-fff pd2-0-24">
|
|
|
<view class="pd-5"></view>
|
|
|
- <ut-tabs v-model="activeTab" :tabs="tabs" mode="btw" @change="changeActiveTab"></ut-tabs>
|
|
|
+ <ut-tabs v-model="activeTab" :tabs="tabs[form?.baseInfo?.baseType]" mode="btw" @change="changeActiveTab"></ut-tabs>
|
|
|
</view>
|
|
|
</template>
|
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
|
|
|
@@ -475,11 +475,23 @@ import { generateUniqueId } from '@/utils/public';
|
|
|
import FormPlot from './models/form-plot.vue';
|
|
|
import { getUrlParams, recursiveDecodeURIComponent } from '@/utils/ruoyi';
|
|
|
// import { $uGetRect } from 'uview-plus'
|
|
|
-const tabs = reactive([
|
|
|
- { label: '基本信息', value: 'base' },
|
|
|
- { label: '地块信息', value: 'plot' },
|
|
|
- { label: '选址依据及环境信息', value: 'environment' },
|
|
|
-]);
|
|
|
+const tabs = reactive<any>({
|
|
|
+ 1: [
|
|
|
+ { label: '基本信息', value: 'base' },
|
|
|
+ { label: '地块信息', value: 'plot' },
|
|
|
+ { label: '选址依据及环境信息', value: 'environment' },
|
|
|
+ ],
|
|
|
+ 2: [
|
|
|
+ { label: '基本信息', value: 'base' },
|
|
|
+ { label: '圈舍信息', value: 'plot' },
|
|
|
+ { label: '选址依据及环境信息', value: 'environment' },
|
|
|
+ ],
|
|
|
+ 3: [
|
|
|
+ { label: '基本信息', value: 'base' },
|
|
|
+ { label: '培养架信息', value: 'plot' },
|
|
|
+ { label: '环境信息', value: 'environment' },
|
|
|
+ ],
|
|
|
+});
|
|
|
const activeTab = ref('base');
|
|
|
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'));
|