allen 2 lat temu
rodzic
commit
401db5854d

+ 162 - 162
src/router/index.js

@@ -49,168 +49,168 @@ export const constantRoutes = [
       }
     ]
   },
-  // {
-  //   path: '/waterCardManageDataDetail',
-  //   component: () => import('@/views/waterCardManage/dataDetail'),
-  //   hidden: true
-  // },
-  // {
-  //   path: '/',
-  //   component: Layout,
-  //   redirect: '/home',
-  //   children: [
-  //     {
-  //       path: 'home',
-  //       name: 'home',
-  //       meta: { title: '首页', icon: 'peoples' },
-  //       component: () => import('@/views/home')
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/gisShow',
-  //   component: Layout,
-  //   redirect: '/gisShow',
-  //   children: [
-  //     {
-  //       path: 'gisShow',
-  //       name: 'gisShow',
-  //       meta: { title: 'GIS 展示', icon: 'shopping' },
-  //       component: () => import('@/views/gisShow')
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/monitoringMamage',
-  //   component: Layout,
-  //   redirect: '/monitoringMamage',
-  //   children: [
-  //     {
-  //       path: 'monitoringMamage',
-  //       name: 'monitoringMamage',
-  //       meta: { title: '监测管理', icon: 'shopping' },
-  //       component: () => import('@/views/monitoringMamage')
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/peasantHouseholdManage',
-  //   component: Layout,
-  //   redirect: '/peasantHouseholdManage',
-  //   children: [
-  //     {
-  //       path: 'peasantHouseholdManage',
-  //       name: 'peasantHouseholdManage',
-  //       meta: { title: '农户管理', icon: 'peoples' },
-  //       component: () => import('@/views/peasantHouseholdManage')
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/waterCardManage',
-  //   component: Layout,
-  //   redirect: '/waterCardManage',
-  //   children: [
-  //     {
-  //       path: 'waterCardManage',
-  //       name: 'waterCardManage',
-  //       meta: { title: '水卡管理', icon: 'shopping' },
-  //       component: () => import('@/views/waterCardManage')
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/infrastructure',
-  //   component: Layout,
-  //   redirect: '/waterEstablishment',
-  //   meta: { title: '基础设施', icon: 'peoples' },
-  //   children: [
-  //     {
-  //       path: 'waterEstablishment',
-  //       name: 'waterEstablishment',
-  //       meta: { title: '水权设置', icon: 'shopping' },
-  //       component: () => import('@/views/infrastructure/waterEstablishment')
-  //     },
-  //     {
-  //       path: 'waterElectricityPriceSetting',
-  //       name: 'waterElectricityPriceSetting',
-  //       meta: { title: '水电价设置', icon: 'shopping' },
-  //       component: () =>
-  //         import('@/views/infrastructure/waterElectricityPriceSetting')
-  //     },
-  //     {
-  //       path: 'deviceSetup',
-  //       name: 'deviceSetup',
-  //       meta: { title: '设备管理', icon: 'shopping' },
-  //       component: () => import('@/views/infrastructure/deviceSetup')
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/dataReport',
-  //   component: Layout,
-  //   redirect: '/intakeWaterAnalysis',
-  //   meta: { title: '数据报表', icon: 'peoples' },
-  //   children: [
-  //     {
-  //       path: 'intakeWaterAnalysis',
-  //       name: 'intakeWaterAnalysis',
-  //       meta: { title: '用水统计(组织)', icon: 'shopping' },
-  //       component: () => import('@/views/dataReport/intakeWaterAnalysis')
-  //     },
-  //     {
-  //       path: 'saveWaterAnalysis',
-  //       name: 'saveWaterAnalysis',
-  //       meta: { title: '节水分析(农户)', icon: 'shopping' },
-  //       component: () => import('@/views/dataReport/saveWaterAnalysis')
-  //     },
-  //     {
-  //       path: 'waterConsumption',
-  //       name: 'waterConsumption',
-  //       meta: { title: '取水分析(机井)', icon: 'shopping' },
-  //       component: () => import('@/views/dataReport/waterConsumption')
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/waterSubsidy',
-  //   component: Layout,
-  //   redirect: '/waterSubsidy',
-  //   children: [
-  //     {
-  //       path: 'waterSubsidy',
-  //       name: 'waterSubsidy',
-  //       meta: { title: '节水政策补贴', icon: 'shopping' },
-  //       component: () => import('@/views/waterSubsidy')
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/waterMarket',
-  //   component: Layout,
-  //   redirect: '/waterMarket',
-  //   children: [
-  //     {
-  //       path: 'waterMarket',
-  //       name: 'waterMarket',
-  //       meta: { title: '水权交易', icon: 'shopping' },
-  //       component: () => import('@/views/waterMarket')
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/waterManage',
-  //   component: Layout,
-  //   redirect: '/waterManage',
-  //   children: [
-  //     {
-  //       path: 'waterManage',
-  //       name: 'waterManage',
-  //       meta: { title: '用水协会管理', icon: 'shopping' },
-  //       component: () => import('@/views/waterManage')
-  //     }
-  //   ]
-  // },
+  {
+    path: '/waterCardManageDataDetail',
+    component: () => import('@/views/waterCardManage/dataDetail'),
+    hidden: true
+  },
+  {
+    path: '/',
+    component: Layout,
+    redirect: '/home',
+    children: [
+      {
+        path: 'home',
+        name: 'home',
+        meta: { title: '首页', icon: 'peoples' },
+        component: () => import('@/views/home')
+      }
+    ]
+  },
+  {
+    path: '/gisShow',
+    component: Layout,
+    redirect: '/gisShow',
+    children: [
+      {
+        path: 'gisShow',
+        name: 'gisShow',
+        meta: { title: 'GIS 展示', icon: 'shopping' },
+        component: () => import('@/views/gisShow')
+      }
+    ]
+  },
+  {
+    path: '/monitoringMamage',
+    component: Layout,
+    redirect: '/monitoringMamage',
+    children: [
+      {
+        path: 'monitoringMamage',
+        name: 'monitoringMamage',
+        meta: { title: '监测管理', icon: 'shopping' },
+        component: () => import('@/views/monitoringMamage')
+      }
+    ]
+  },
+  {
+    path: '/peasantHouseholdManage',
+    component: Layout,
+    redirect: '/peasantHouseholdManage',
+    children: [
+      {
+        path: 'peasantHouseholdManage',
+        name: 'peasantHouseholdManage',
+        meta: { title: '农户管理', icon: 'peoples' },
+        component: () => import('@/views/peasantHouseholdManage')
+      }
+    ]
+  },
+  {
+    path: '/waterCardManage',
+    component: Layout,
+    redirect: '/waterCardManage',
+    children: [
+      {
+        path: 'waterCardManage',
+        name: 'waterCardManage',
+        meta: { title: '水卡管理', icon: 'shopping' },
+        component: () => import('@/views/waterCardManage')
+      }
+    ]
+  },
+  {
+    path: '/infrastructure',
+    component: Layout,
+    redirect: '/waterEstablishment',
+    meta: { title: '基础设施', icon: 'peoples' },
+    children: [
+      {
+        path: 'waterEstablishment',
+        name: 'waterEstablishment',
+        meta: { title: '水权设置', icon: 'shopping' },
+        component: () => import('@/views/infrastructure/waterEstablishment')
+      },
+      {
+        path: 'waterElectricityPriceSetting',
+        name: 'waterElectricityPriceSetting',
+        meta: { title: '水电价设置', icon: 'shopping' },
+        component: () =>
+          import('@/views/infrastructure/waterElectricityPriceSetting')
+      },
+      {
+        path: 'deviceSetup',
+        name: 'deviceSetup',
+        meta: { title: '设备管理', icon: 'shopping' },
+        component: () => import('@/views/infrastructure/deviceSetup')
+      }
+    ]
+  },
+  {
+    path: '/dataReport',
+    component: Layout,
+    redirect: '/intakeWaterAnalysis',
+    meta: { title: '数据报表', icon: 'peoples' },
+    children: [
+      {
+        path: 'intakeWaterAnalysis',
+        name: 'intakeWaterAnalysis',
+        meta: { title: '用水统计(组织)', icon: 'shopping' },
+        component: () => import('@/views/dataReport/intakeWaterAnalysis')
+      },
+      {
+        path: 'saveWaterAnalysis',
+        name: 'saveWaterAnalysis',
+        meta: { title: '节水分析(农户)', icon: 'shopping' },
+        component: () => import('@/views/dataReport/saveWaterAnalysis')
+      },
+      {
+        path: 'waterConsumption',
+        name: 'waterConsumption',
+        meta: { title: '取水分析(机井)', icon: 'shopping' },
+        component: () => import('@/views/dataReport/waterConsumption')
+      }
+    ]
+  },
+  {
+    path: '/waterSubsidy',
+    component: Layout,
+    redirect: '/waterSubsidy',
+    children: [
+      {
+        path: 'waterSubsidy',
+        name: 'waterSubsidy',
+        meta: { title: '节水政策补贴', icon: 'shopping' },
+        component: () => import('@/views/waterSubsidy')
+      }
+    ]
+  },
+  {
+    path: '/waterMarket',
+    component: Layout,
+    redirect: '/waterMarket',
+    children: [
+      {
+        path: 'waterMarket',
+        name: 'waterMarket',
+        meta: { title: '水权交易', icon: 'shopping' },
+        component: () => import('@/views/waterMarket')
+      }
+    ]
+  },
+  {
+    path: '/waterManage',
+    component: Layout,
+    redirect: '/waterManage',
+    children: [
+      {
+        path: 'waterManage',
+        name: 'waterManage',
+        meta: { title: '用水协会管理', icon: 'shopping' },
+        component: () => import('@/views/waterManage')
+      }
+    ]
+  },
   {
     path: '/login',
     component: () => import('@/views/login'),

+ 5 - 1
src/views/dataReport/intakeWaterAnalysis.vue

@@ -149,10 +149,14 @@ export default {
       return getAreaList(payload);
     },
     downloadHandler() {
+      const params = {
+        areaId: this.currentClickId,
+        year: this.currentYear
+      }
       this.download(
         'wpr/stat/area/export',
         {
-          ...this.queryParams
+          ...params
         },
         `FmsCrop_${new Date().getTime()}.xlsx`
       );

+ 8 - 1
src/views/dataReport/waterConsumption.vue

@@ -97,10 +97,17 @@ export default {
       this.$refs.tableRef.refresh(true);
     },
     downloadHandler() {
+      const [startTime, endTime] = this.dateValue ??= []
+      const params = {
+        areaId: this.currentClickId,
+        startTime,
+        endTime,
+        keyword: this.keyword
+      }
       this.download(
         'wpr/stat/water/export',
         {
-          ...this.queryParams
+          ...params
         },
         `FmsCrop_${new Date().getTime()}.xlsx`
       );

+ 13 - 6
src/views/peasantHouseholdManage/components/addedFarmers.vue

@@ -161,7 +161,6 @@
 
 <script>
 import { isValidIDCard, checkPhone } from '@/utils/index.js'
-import { assign } from 'lodash-es';
 import SelectTree from '@/components/SelectTree';
 import { addFarmer,editFarmer, getAreaInfo } from '@/api/farmer/list.js'
 
@@ -250,7 +249,7 @@ export default {
         farmerWramount: [
           {
             required: true, validator: (rule, value, callback) => {
-              if (!value) { callback(new Error('请输入水权')); return }
+              if (value == 0) { callback(new Error('请输入水权')); return }
               if (isNaN(value)) { callback(new Error('请正确输入您的水权')); return }
               if (this.isEdit) {
                 if (+value > (+this.residualWaterRight) + (+this.editFarmerData.farmerWrbalance)) {
@@ -279,7 +278,7 @@ export default {
       }
       if (!val) {
         this.$refs.baseForm.clearValidate()
-        this.baseForm = {}
+        this.baseForm = { areaId:'' }
         this.$emit('closeHandler')
         this.cusareaName = ''
         this.clearItem()
@@ -292,7 +291,7 @@ export default {
           this.handlerClick(val)
           this.cusareaName = val?.cusareaName || ''
         } else {
-          this.baseForm = {}
+          this.baseForm = { areaId: '' }
           this.cusareaName =  ''
         }
       },
@@ -304,6 +303,12 @@ export default {
       },
       deep: true,
       immediate: true
+    },
+    'baseForm.areaId': {
+      handler(val) {
+        val && this.$refs.baseForm.clearValidate('areaId')
+      },
+       deep: true
     }
   },
   methods: {
@@ -332,11 +337,14 @@ export default {
         areaId: item.areaId
       })
       const value = res?.data
-      this.baseForm.areaId = item?.areaId
+      const areaId = item?.areaId || ''
+      this.baseForm.areaId = areaId
+      this.$set(this.baseForm,'areaId', areaId)
       this.setItem(value)
     },
     resetForm() {
       this.dialogVisible = false;
+      this.cusareaName = ''
     },
     async handlerAddFarmer() {
       if(!this.isEdit){
@@ -356,7 +364,6 @@ export default {
       }
     },
     submitForm(formName) {
-      console.log(this.baseForm,'ajshdjaksdhajksdhj')
       this.$refs[formName].validate((valid) => {
         valid && this.handlerAddFarmer()
       })

+ 1 - 1
src/views/peasantHouseholdManage/index.vue

@@ -184,9 +184,9 @@ export default {
         {
           label: '农户身份证',
           prop: 'farmerIdcard',
+          width: 200,
           customRender: '',
           align: 'center',
-          width: 160
         },
         {
           label: '联系电话',

+ 9 - 5
src/views/waterMarket/component/waterDeal.vue

@@ -175,19 +175,23 @@ export default {
           {
             required: true, validator: (rule, value, callback) => {
               if (!value) callback(new Error('请选择您的卖方用水户'))
-              if (value === this.baseForm?.trxrcdBuyerid) { 
+              if (value === this.baseForm?.trxrcdBuyerid) {
                 callback(new Error('卖方和买方不能是同一个用户'))
                 return
+              } else { 
+                callback()
               }
            }, trigger: 'change' }
         ],
         trxrcdBuyerid: [
           { required: true, validator: (rule, value, callback) => {
               if (!value) callback(new Error('请选择您的买方用水户'))
-              if (value === this.baseForm?.trxrcdSellerid) {
-                callback(new Error('卖方和买方不能是同一个用户'))
-                return
-              }
+            if (value === this.baseForm?.trxrcdSellerid) {
+              callback(new Error('卖方和买方不能是同一个用户'))
+              return
+            } else { 
+              callback()
+            }
             },  trigger: 'change' }
         ],
         trxrcdPrice: [