瀏覽代碼

修改页面

lisy 1 周之前
父節點
當前提交
0813bee228

+ 7 - 7
src/pages.json

@@ -131,12 +131,6 @@
                     "style": {
                         "navigationBarTitleText": "创建种养殖任务"
                     }
-                },
-                {
-                    "path": "por-torganism/index",
-                    "style": {
-                        "navigationBarTitleText": "选择动植物类型"
-                    }
                 }
             ]
         },
@@ -144,7 +138,7 @@
         {
             "root": "plant/storage",
             "pages": [
-               // 库房管理
+                // 库房管理
                 {
                     "path": "storage-room/list/index",
                     "style": {
@@ -208,6 +202,12 @@
                     "style": {
                         "navigationBarTitleText": "选择GAP获评信息"
                     }
+                },
+                {
+                    "path": "por-torganism/index",
+                    "style": {
+                        "navigationBarTitleText": "选择动植物类型"
+                    }
                 }
             ]
         }

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

@@ -254,7 +254,7 @@ const query = async (pageNum: number, pageSize: number) => {
         pageSize,
         ...form.value,
     };
-    const res = await useClientRequest.get('/plt-api/app/base/pageList', params);
+    const res = await useClientRequest.get('/plt-api/app/plantationTask/list', params);
     if (res) {
         const { rows } = res;
         paging.value.complete(rows);

文件差異過大導致無法顯示
+ 762 - 160
src/plant/port/port-create/index.vue


+ 29 - 21
src/plant/port/por-torganism/index.vue → src/tools/por-torganism/index.vue

@@ -9,7 +9,7 @@
             </view>
         </template>
         <view class="pd-24" v-if="!showSearch">
-            <template>
+            <template v-if="speArray.length">
                 <view class="f-s-32 c-#333 f-w-5 mb-20">主营品种</view>
                 <view class="d-flex a-c f-w-w">
                     <spe-lable class="mr-20 mb-20" v-for="(item, index) in speArray" :key="index" :text="item?.medicineName" size="30rpx" :id="item?.id" @click="changeSpe(item?.medicineName)" />
@@ -18,8 +18,8 @@
             <template>
                 <ut-empty></ut-empty>
                 <view class="d-flex flex-cln j-c a-c">
-                    <view class="c-#ccc f-s-28">可请前往<text class="c-primary">基地-主营品种配置</text>页面进行</view>
-                    <view class="c-#ccc f-s-28">主营品种配置,配置后即可快捷选择</view>
+                    <view class="c-#ccc f-s-28">您可以直接搜索,或前往<text class="c-primary">基地-主营品种配置</text>页面进行</view>
+                    <view class="c-#ccc f-s-28">主营品种配置,配置后下次即可快捷选择</view>
                 </view>
             </template>
         </view>
@@ -27,31 +27,32 @@
             <view class="f-s-32 c-#333 f-w-5 mb-20">搜索结果</view>
             <view class="pd-30 d-flex bg-#FBFDFB border-#37A954 b-radius mb-20" v-for="(item, index) in list" :key="index">
                 <up-radio-group v-model="radiovalue1">
-                    <view class="">
-                        <view class="mb-20">
-                            <text class="c-#333 f-s-34 f-w-5 mr-5">{{ item?.varietyName }}</text>
-                            <text class="c-#666 f-s-24">{{ item?.latinName }}</text>
-                        </view>
-                        <view class="mb-20">
-                            <text class="c-#333 f-s-28 f-w-5 mr-5">{{ item?.genusName }}</text>
-                            <text class="c-#666 f-s-24">{{ item?.genusLatinName }}</text>
-                        </view>
+                    <view class="d-flex w-100%">
                         <view class="">
-                            <text class="c-#666 f-s-24">产出:</text>
-                            <text class="c-#666 f-s-24">{{ item?.medicineName }}</text>
+                            <view class="mb-20 ov-hd tx-ov">
+                                <text class="c-#333 f-s-34 f-w-5 mr-5">{{ item?.varietyName }}</text>
+                                <text class="c-#666 f-s-24 tx-ov ov-hd">{{ item?.latinName }}</text>
+                            </view>
+                            <view class="mb-20">
+                                <text class="c-#333 f-s-28 f-w-5 mr-5">{{ item?.genusName }}</text>
+                                <text class="c-#666 f-s-24 tx-ov ov-hd">{{ item?.genusLatinName }}</text>
+                            </view>
+                            <view class="">
+                                <text class="c-#666 f-s-24">产出:</text>
+                                <text class="c-#666 f-s-24 tx-ov ov-hd">{{ item?.medicineName }}</text>
+                            </view>
+                        </view>
+                        <view class="flex1"></view>
+                        <view class="d-flex j-c a-c">
+                            <up-radio activeColor="#37A954" label="" :name="item?.id"></up-radio>
                         </view>
-                    </view>
-                    <view class="flex1"></view>
-                    <view class="d-flex j-c a-c">
-                        <up-radio activeColor="#37A954" label="" :name="item?.id"></up-radio>
                     </view>
                 </up-radio-group>
             </view>
         </view>
         <template #bottom v-if="showSearch">
             <view class="pd-24 d-flex j-c gap-20 base-bottom-wrap">
-                <up-button type="primary" @click="navigateBackOrHome()">取消</up-button>
-                <up-button type="primary" @click="save()">完成</up-button>
+                <up-button type="primary" @click="save()">确认选择</up-button>
             </view>
         </template>
     </z-paging>
@@ -89,6 +90,10 @@ const changeSpe = (data: string) => {
     changeSeach();
 };
 const getSpecies = async () => {
+    console.log('getSpecies');
+    if (form.value?.keyword) {
+        return;
+    }
     const res = await useClientRequest.get('/plt-api/app/cpyVariety/list');
     if (res.code === 200) {
         speArray.value = res.data;
@@ -97,11 +102,14 @@ const getSpecies = async () => {
 const radiovalue1 = ref('苹果');
 const save = () => {
     const res = list.value.find((item) => item.id === radiovalue1.value);
-    console.log(res);
+    if (!res) return;
     uni.$emit('updateBiologicalname', { msg: res });
     uni.navigateBack({ delta: 1 });
 };
 onMounted(() => {
     getSpecies();
 });
+onUnload(() => {
+    console.log('????');
+});
 </script>

+ 0 - 0
src/plant/port/por-torganism/models/speLable.vue → src/tools/por-torganism/models/speLable.vue


+ 3 - 0
src/tools/select-cpy-member/index.vue

@@ -49,6 +49,9 @@ const onRefresh = () => {
         console.error('Error refreshing address list:', e);
     }
 };
+onUnload(() => {
+    uni.$off('selectCpyMember');
+});
 </script>
 <style lang="scss" scoped>
 .select-item-card {

+ 12 - 9
src/tools/select-gap-info/index.vue

@@ -36,10 +36,10 @@
             </view>
         </view>
 
-            <template #empty >
-                <ut-empty class="mg-at" size="28rpx" color="#999" padding="10rpx" image="/static/images/plant/noEmptyBase.png">暂无获评GAP基地信息~</ut-empty>
-                <view class="f-s-28 c-#ccc w-600 text-center">如已获评GAP信息,请前往<span class="c-primary">基地-GAP基地获评信息</span>添加后再来选择若未获评GAP基地,可前往各地官方渠道进行GAP基地申报</view>
-            </template>
+        <template #empty>
+            <ut-empty class="mg-at" size="28rpx" color="#999" padding="10rpx" image="/static/images/plant/noEmptyBase.png">暂无获评GAP基地信息~</ut-empty>
+            <view class="f-s-28 c-#ccc w-600 text-center">如已获评GAP信息,请前往<span class="c-primary">基地-GAP基地获评信息</span>添加后再来选择若未获评GAP基地,可前往各地官方渠道进行GAP基地申报</view>
+        </template>
         <template #bottom>
             <view class="pd-20 d-flex">
                 <up-button type="primary" @click="confirmSelect">确认选择</up-button>
@@ -54,7 +54,7 @@ const list = ref<any[]>([]);
 const form = ref({
     keyword: '',
     res: '1',
-    gapBaseType: ''
+    gapBaseType: '',
 });
 const query = async (pageNum: number, pageSize: number) => {
     const res = await useClientRequest.get('/plt-api/app/gapCertificationInfo/pageList', {
@@ -72,14 +72,14 @@ const clickItem = (item: any) => {
 };
 // 确认选择
 const confirmSelect = () => {
-    const selectedItem = list.value.find(item => item.id === checkedId.value);
+    const selectedItem = list.value.find((item) => item.id === checkedId.value);
     if (selectedItem) {
         uni.$emit('selectGapInfo', selectedItem);
         uni.navigateBack();
     } else {
         uni.showToast({
             title: '请选择一项GAP基地获评信息',
-            icon: 'none'
+            icon: 'none',
         });
     }
 };
@@ -93,7 +93,10 @@ const onRefresh = () => {
 onLoad((options: any) => {
     form.value.res = options?.res || '1';
     form.value.gapBaseType = options?.baseType || '';
-})
+});
+onUnload(() => {
+    uni.$off('selectGapInfo');
+});
 </script>
 <style lang="scss" scoped>
 .select-item-card {
@@ -107,7 +110,7 @@ onLoad((options: any) => {
     }
     &.active {
         border-color: $u-primary;
-        background-color: #EBF6EE;
+        background-color: #ebf6ee;
     }
 }
 </style>

+ 5 - 2
src/tools/select-medicine/index.vue

@@ -9,7 +9,7 @@
         <view class="base-content pd-20">
             <view :class="{ active: item.id === checkedId }" v-for="(item, index) in list" :key="item.id" @click="clickItem(item)" class="bg-fff mb-10 pd-20 select-item-card">
                 <view class="f-s-30 c-#333 f-w-600">{{ item?.varietyName }}</view>
-                    <view class="f-s-28 c-#999">{{ item.latinName }}</view>
+                <view class="f-s-28 c-#999">{{ item.latinName }}</view>
             </view>
         </view>
     </z-paging>
@@ -25,7 +25,7 @@ const query = async (pageNum: number, pageSize: number) => {
     const res = await useClientRequest.get('/plt-api/app/cpyVariety/pageList', {
         ...form.value,
         pageNum: pageNum,
-        pageSize: pageSize
+        pageSize: pageSize,
     });
     if (res.code == 200) {
         paging.value.complete(res.rows || []);
@@ -44,6 +44,9 @@ const onRefresh = () => {
         console.error('Error refreshing address list:', e);
     }
 };
+onUnload(() => {
+    uni.$off('medicineSelected');
+});
 </script>
 <style lang="scss" scoped>
 .select-item-card {

部分文件因文件數量過多而無法顯示