Bläddra i källkod

修改基地详情

huangxw 2 veckor sedan
förälder
incheckning
795ca2e435

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

@@ -80,7 +80,7 @@
                     </up-sticky>
                     <view class="pd-16">
                         <template>
-                            <view v-for="(item, index) in list" :key="index" class="b-radius bg-#fff pd-20 mb-20">
+                            <view v-for="(item, index) in list" :key="index" class="b-radius bg-#fff pd-20 mb-20" @click="$u.route({ url: '/plant/base/base-detail/index', params: { id: item.id } })">
                                 <view class="c-333 f-s-34 pd-5 f-w-5">{{ item?.baseName }}</view>
                                 <view class="c-ccc f-s-24 pd-5 pt-0">{{ item?.baseCode }}</view>
                                 <view class="d-flex a-c">

+ 54 - 2
src/plant/base/base-detail/index.vue

@@ -1,3 +1,55 @@
 <template>
-    <view>页面内容</view>
-</template>
+    <z-paging ref="paging" bgColor="#F7F7F7" safe-area-inset-bottom paging-class="paging-btm-shadow" scroll-with-animation>
+        <template #top>
+            <ut-navbar title="基地详情" :fixed="false" border></ut-navbar>
+            <view class="bg-fff mb-20">
+                <view class="pd-5"></view>
+                <ut-tabs v-model="activeTab" :tabs="tabs" mode="btw" @change="changeActiveTab"></ut-tabs>
+            </view>
+        </template>
+      
+        <template #bottom>
+            <view class="pd-20 d-flex">
+                
+            </view>
+        </template>
+    </z-paging>
+</template>
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+const tabs = reactive([
+    { label: '基本信息', value: 'base' },
+    { label: '地块信息', value: 'plot' },
+    { label: '选址依据及环境信息', value: 'environment' },
+]);
+const activeTab = ref('base');
+const mapUnitByBaseType: any = {
+    '1': '亩',
+    '2': '平方米',
+    '3': '平方米',
+};
+const changeActiveTab = (value: string) => {
+    activeTab.value = value;
+};
+</script>
+<style lang="scss" scoped>
+.z-paging-wrap {
+    position: absolute;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    left: 0;
+}
+
+.btn-aree-center {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+}
+.plot-item {
+    border: 1rpx solid rgba($u-primary, 0.4);
+    border-radius: 10rpx;
+}
+</style>

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

@@ -511,7 +511,7 @@ const form = ref<any>({
         orgType: '',
         contactId: '',
         contactName: '',
-        gapId: '',
+        gapId: undefined,
         gapInfo: {
             adcode: '',
             adcodeName: '',
@@ -699,7 +699,7 @@ const selectCpyMember = () => {
 const selectGapInfo = () => {
     uni.$on('selectGapInfo', (item: any) => {
         console.log(item);
-        form.value.baseInfo.gapId = item.id;
+        form.value.baseInfo.gapId = item.id || undefined;
         form.value.baseInfo.gapBaseInfo = item;
         uni.$off('selectGapInfo');
     });