فهرست منبع

秸秆还田管理\农业基础数据管理\农业机械化管理添加部门查询栏

刘浩男 1 سال پیش
والد
کامیت
2daaccfab0
34فایلهای تغییر یافته به همراه451 افزوده شده و 197 حذف شده
  1. 1 138
      data-ui/src/views/data/digitalagriculture/LivestockInfo/index.vue
  2. 16 1
      data-ui/src/views/data/digitalagriculture/StillField/index.vue
  3. 20 3
      data-ui/src/views/data/digitalagriculture/implements_info/index.vue
  4. 19 3
      data-ui/src/views/data/digitalagriculture/information/index.vue
  5. 18 2
      data-ui/src/views/data/digitalagriculture/machinery_info/index.vue
  6. 17 1
      data-ui/src/views/data/digitalagriculture/plant_info/index.vue
  7. 17 2
      data-ui/src/views/data/digitalagriculture/prevention/index.vue
  8. 17 2
      data-ui/src/views/data/digitalagriculture/schedule/index.vue
  9. 18 2
      data-ui/src/views/data/digitalagriculture/seed_info/index.vue
  10. 17 2
      data-ui/src/views/data/digitalagriculture/seedingProgress/index.vue
  11. 17 2
      data-ui/src/views/data/digitalagriculture/seedlingProgress/index.vue
  12. 17 2
      data-ui/src/views/data/digitalagriculture/sowingSchedule/index.vue
  13. 18 2
      data-ui/src/views/data/digitalagriculture/subsidy_info/index.vue
  14. 17 2
      data-ui/src/views/data/digitalagriculture/supervise/index.vue
  15. 17 2
      data-ui/src/views/data/digitalagriculture/train/index.vue
  16. 17 2
      data-ui/src/views/data/digitalagriculture/trash_can/index.vue
  17. 16 2
      data-ui/src/views/data/digitalresources/grid/index.vue
  18. 36 5
      data-ui/src/views/data/digitaltraffic/level/index.vue
  19. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmImplementsInfoMapper.xml
  20. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmLivestockMapper.xml
  21. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmMachineryInfoMapper.xml
  22. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmPesticideInformationMapper.xml
  23. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmPlantInfoMapper.xml
  24. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmSeedInfoMapper.xml
  25. 8 2
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmSeedingProgressMapper.xml
  26. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmSeedlingProgressMapper.xml
  27. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmSowingScheduleMapper.xml
  28. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmSubsidyInfoMapper.xml
  29. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmTechnologyTrainMapper.xml
  30. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmTrashCanMapper.xml
  31. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmVillageAnimalPreventionMapper.xml
  32. 16 4
      src/main/resources/mapper/digitalagriculture/CenterdataTStrawStillFieldMapper.xml
  33. 8 2
      src/main/resources/mapper/digitalresource/CenterdataTFarmGridMapper.xml
  34. 8 2
      src/main/resources/mapper/digitaltraffic/CenterdataTSupermapLevelMapper.xml

+ 1 - 138
data-ui/src/views/data/digitalagriculture/LivestockInfo/index.vue

@@ -71,87 +71,17 @@ export default {
     return {
       // 遮罩层
       loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 显示超图经纬度
-      showLongitude: false,
-      // 显示超图弹层标题
-      titleLongitude: '经纬度',
-      // 总条数
-      total: 0,
-      // 弹出层宽度
-      labelWidth: '150px',
-      // 文本框宽度
-      inputStyle: 'width: 310px',
-      // 畜牧信息统计信息表格数据
-      AgriculturalMachineryInfoList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
       // 部门名称
       deptName: undefined,
-      // 部门树选项
-      deptOptions: undefined,
-      // 导入参数
-      upload: {
-        // 是否显示导入弹出层
-        open: false,
-        // 导入弹出层标题
-        title: '',
-        // 是否禁用上传
-        isUploading: false,
-        // 是否更新已经存在的数据
-        updateSupport: 0,
-        // 设置上传的请求头部
-        headers: {Authorization: 'Bearer ' + getToken()},
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + '/center-data/AgriculturalMachineryInfo/import/importData'
-      },
-      // 是否禁用弹出层表单
-      disable: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        name: null,
-        deptId: null,
-        deptName: null,
-        varieties: null,
-        designMaintainCount: null,
-        designOfftakeCount: null,
-        realityMaintainCount: null,
-        realityOfftakeCount: null,
-      },
       // 表单参数
       form: {},
-      // 正整数校验
-      checkNonnegativeInteger: checkNonnegativeInteger,
-      validPhoneMobile: validPhoneMobile,
-      checkPositiveDecimal: checkPositiveDecimal,
+
     };
   },
   created() {
     this.getList();
     this.getTreeselect();
   },
-  filters:{
-    //标题截取前20
-    filterText(value) {
-      if (!value) return "";
-      if (value.toString().indexOf('.0')!==-1) {
-        return value.slice(0, value.toString().length-2);
-      }
-      // alert(value)
-      return value;
-    },
-  },
   methods: {
     showMap() {
       this.showLongitude = true
@@ -167,16 +97,6 @@ export default {
       this.form.deptId = e.deptId
       this.form.deptName = e.deptName
     },
-    // 筛选节点
-    filterNode(value, data) {
-      if (!value) return true
-      return data.label.indexOf(value) !== -1
-    },
-    // 节点单击事件
-    handleNodeClick(data) {
-      this.queryParams.deptId = data.id
-      this.handleQuery()
-    },
     /** 查询畜牧信息技术列表 */
     getList() {
       this.loading = true;
@@ -199,63 +119,6 @@ export default {
     hx(node) {
       this.queryParams.deptId = node.id
     },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        name: null,
-        deptId: null,
-        deptName: null,
-        varieties: null,
-        designMaintainCount: null,
-        designOfftakeCount: null,
-        realityMaintainCount: null,
-        realityOfftakeCount: null,
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.queryParams.deptId = undefined;
-      this.queryParams.varieties = undefined;
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length !== 1
-      this.multiple = !selection.length
-    },
-    /** 下载模板操作 */
-    importTemplate() {
-      this.download('/center-data/AgriculturalMachineryInfo/importTemplate', {}, `AgriculturalMachineryInfo_template_${new Date().getTime()}.xlsx`)
-    },
-    // 文件上传中处理
-    handleFileUploadProgress(event, file, fileList) {
-      this.upload.isUploading = true
-    },
-    // 文件上传成功处理
-    handleFileSuccess(response, file, fileList) {
-      this.upload.open = false
-      this.upload.isUploading = false
-      this.$refs.upload.clearFiles()
-      this.$alert('<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' + response.msg + '</div>', '导入结果', {dangerouslyUseHTMLString: true})
-      this.getList()
-    },
-    // 提交上传文件
-    submitFileForm() {
-      this.$refs.upload.submit()
-    },
     /** 导出按钮操作 */
     handleExport() {
       this.download('/center-data/livestockinfo/export', {

+ 16 - 1
data-ui/src/views/data/digitalagriculture/StillField/index.vue

@@ -38,6 +38,7 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
+
           <!--<el-form-item label="还田人" prop="stillUserName" v-if="['3'].includes(routeParams.stillFieldType)">-->
             <!--<el-input-->
               <!--v-model="queryParams.stillUserName"-->
@@ -149,6 +150,15 @@
               <!--@keyup.enter.native="handleQuery"-->
             <!--/>-->
           <!--</el-form-item>-->
+          <el-form-item prop="deptId" v-if="['3','1'].includes(routeParams.stillFieldType)"label-width="120px">
+            <template slot="label">
+              <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+              <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+            </template>
+            <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                        placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+            <el-input v-model="queryParams.deptName" v-if="false"/>
+          </el-form-item>
           <el-form-item>
             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -523,7 +533,7 @@ export default {
         updateDate: null,
         remarks: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         stillFieldType: null,
       },
       // 表单参数
@@ -672,6 +682,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -799,6 +810,10 @@ export default {
         this.queryParams.endStillTime = "";
         this.$message.error("请选择时间大于还田开始时间");
       }
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
     }
   }
 };

+ 20 - 3
data-ui/src/views/data/digitalagriculture/implements_info/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item label-width="130px" label="农具品牌" prop="brand">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+      <el-form-item label="农具品牌" prop="brand">
         <el-input
           v-model="queryParams.brand"
           placeholder="请输入农具品牌"
@@ -10,7 +10,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="农具用途" prop="purpose">
+      <el-form-item label="农具用途" prop="purpose">
         <el-input
           v-model="queryParams.purpose"
           placeholder="请输入农具用途"
@@ -19,6 +19,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <!--<el-form-item label-width="auto" label="农具库存" prop="stock">
         <el-input
           v-model="queryParams.stock"
@@ -326,6 +335,8 @@ export default {
         ownership: null,
         createDate: null,
         updateDate: null,
+        deptId: null,
+        deptName: 0,
         remarks: null,
       },
       // 表单参数
@@ -425,6 +436,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -522,6 +534,11 @@ export default {
         ...this.queryParams
       }, `农具信息_${format_date(new Date())}.xlsx`)
     }
+    ,
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
+    }
   }
 };
 </script>

+ 19 - 3
data-ui/src/views/data/digitalagriculture/information/index.vue

@@ -1,12 +1,21 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item label="计划使用量(吨)" prop="planUsage" label-width="125px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
+      <el-form-item label="计划使用量(吨)" prop="planUsage" >
         <el-input v-model="queryParams.planUsage" placeholder="请输入计划使用量(吨)" maxlength="15"/>
       </el-form-item>
-      <el-form-item label="实际使用量(吨)" prop="realityUsage" label-width="125px">
+      <el-form-item label="实际使用量(吨)" prop="realityUsage" >
         <el-input v-model="queryParams.realityUsage" placeholder="请输入实际使用量(吨)" maxlength="15"/>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -176,6 +185,8 @@
           longitude: null,
           latitude: null,
           planUsage: null,
+          deptId: null,
+          deptName: 0,
           realityUsage: null
         },
         // 表单参数
@@ -255,6 +266,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -316,6 +328,10 @@
         this.download('center-data/information/export', {
           ...this.queryParams
         }, `农药信息_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 18 - 2
data-ui/src/views/data/digitalagriculture/machinery_info/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item label-width="130px" label="农机品牌" prop="brand">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" @submit.native.prevent>
+      <el-form-item  label="农机品牌" prop="brand">
         <el-input
           v-model="queryParams.brand"
           placeholder="请输入农机品牌"
@@ -10,6 +10,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -288,6 +297,8 @@
           ownership: null,
           createDate: null,
           updateDate: null,
+          deptId: null,
+          deptName: 0,
           remarks: null,
         },
         // 表单参数
@@ -388,6 +399,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -484,6 +496,10 @@
         this.download('/center-data/MachineryInfo/export', {
           ...this.queryParams
         }, `农机管理_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 1
data-ui/src/views/data/digitalagriculture/plant_info/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="年度" prop="year">
         <el-date-picker clearable
                         v-model="queryParams.year"
@@ -47,6 +47,15 @@
           <!--@keyup.enter.native="handleQuery"-->
         <!--/>-->
       <!--</el-form-item>-->
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -313,6 +322,8 @@ export default {
         createDate: null,
         updateDate: null,
         remarks: null,
+        deptId: null,
+        deptName: 0,
       },
       // 表单参数
       form: {},
@@ -423,6 +434,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -509,6 +521,10 @@ export default {
       this.download('/center-data/PlantInfo/export', {
         ...this.queryParams
       }, `种植管理_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/prevention/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="姓名" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -17,6 +17,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -185,7 +194,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           name: null,
           phone: null,
           address: null
@@ -266,6 +276,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -327,6 +338,10 @@
         this.download('center-data/prevention/export', {
           ...this.queryParams
         }, `村级动物防疫员_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/schedule/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="时间" prop="time">
         <el-date-picker clearable
                         v-model="queryParams.time"
@@ -9,6 +9,15 @@
                         placeholder="选择时间">
         </el-date-picker>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <!--      <el-form-item label="县乡村" prop="address">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.address"-->
@@ -269,7 +278,8 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        deptName: null,
+        deptId: null,
+        deptName: 0,
         time: null,
         address: null,
         cornReapArea: null,
@@ -402,6 +412,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -463,6 +474,10 @@ export default {
       this.download('center-data/schedule/export', {
         ...this.queryParams
       }, `秋收进度_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 18 - 2
data-ui/src/views/data/digitalagriculture/seed_info/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
       <!--<el-form-item label-width="auto" label="种子品种" prop="variety">-->
         <!--<el-input-->
           <!--v-model="queryParams.variety"-->
@@ -10,7 +10,7 @@
           <!--@keyup.enter.native="handleQuery"-->
         <!--/>-->
       <!--</el-form-item>-->
-      <el-form-item label-width="130px" label="种子名称" prop="name">
+      <el-form-item label="种子名称" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入种子名称"
@@ -80,6 +80,15 @@
           <!--@keyup.enter.native="handleQuery"-->
         <!--/>-->
       <!--</el-form-item>-->
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -373,6 +382,8 @@ export default {
         createDate: null,
         updateDate: null,
         remarks: null,
+        deptId: null,
+        deptName: 0,
       },
       // 表单参数
       form: {},
@@ -474,6 +485,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -560,6 +572,10 @@ export default {
       this.download('/center-data/SeedInfo/export', {
         ...this.queryParams
       }, `种子信息_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
     }
   }
 };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/seedingProgress/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="时间" prop="time">
         <el-date-picker clearable
                         v-model="queryParams.time"
@@ -9,6 +9,15 @@
                         placeholder="选择时间">
         </el-date-picker>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
 <!--      <el-form-item label="县乡村" prop="address">-->
 <!--        <el-input-->
 <!--          v-model="queryParams.address"-->
@@ -250,7 +259,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           time: null,
           address: null,
           cropsType: null,
@@ -356,6 +366,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -417,6 +428,10 @@
         this.download('center-data/seedingProgress/export', {
           ...this.queryParams
         }, `春耕播种进度_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/seedlingProgress/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="时间" prop="time">
         <el-date-picker clearable
                         v-model="queryParams.time"
@@ -9,6 +9,15 @@
                         placeholder="选择时间">
         </el-date-picker>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -193,7 +202,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           time: null,
           address: null,
           emergenceRate: null,
@@ -281,6 +291,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -342,6 +353,10 @@
         this.download('center-data/seedlingProgress/export', {
           ...this.queryParams
         }, `春耕出苗进度_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/sowingSchedule/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="时间" prop="time">
         <el-date-picker clearable
                         v-model="queryParams.time"
@@ -9,6 +9,15 @@
                         placeholder="选择时间">
         </el-date-picker>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -302,7 +311,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           longitude: null,
           time: null,
           address: null,
@@ -451,6 +461,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -512,6 +523,10 @@
         this.download('center-data/sowingSchedule/export', {
           ...this.queryParams
         }, `备春耕进度_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 18 - 2
data-ui/src/views/data/digitalagriculture/subsidy_info/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
       <!--<el-form-item label-width="auto" label="种植补贴金额" prop="subsidyMoney">-->
         <!--<el-input-->
           <!--v-model="queryParams.subsidyMoney"-->
@@ -28,7 +28,7 @@
           <!--@keyup.enter.native="handleQuery"-->
         <!--/>-->
       <!--</el-form-item>-->
-      <el-form-item label-width="130px" label="补贴人" prop="subsidies">
+      <el-form-item  label="补贴人" prop="subsidies">
         <el-input
           v-model="queryParams.subsidies"
           placeholder="请输入补贴人"
@@ -88,6 +88,15 @@
           <!--@keyup.enter.native="handleQuery"-->
         <!--/>-->
       <!--</el-form-item>-->
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -440,6 +449,8 @@ export default {
         createDate: null,
         updateDate: null,
         remarks: null,
+        deptId: null,
+        deptName: 0,
       },
       // 表单参数
       form: {},
@@ -555,6 +566,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -641,6 +653,10 @@ export default {
       this.download('/center-data/SubsidyInfo/export', {
         ...this.queryParams
       }, `补助管理_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/supervise/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="组织单位" prop="unit">
         <el-input
           v-model="queryParams.unit"
@@ -9,6 +9,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -257,7 +266,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           time: null,
@@ -379,6 +389,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -440,6 +451,10 @@
         this.download('center-data/supervise/export', {
           ...this.queryParams
         }, `农资监管_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/train/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" @submit.native.prevent>
       <el-form-item label="培训主题" prop="cultivateTheme">
         <el-input
           v-model="queryParams.cultivateTheme"
@@ -25,6 +25,15 @@
                         placeholder="选择培训时间">
         </el-date-picker>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -287,7 +296,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           cultivateTheme: null,
@@ -398,6 +408,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -459,6 +470,10 @@
         this.download('center-data/train/export', {
           ...this.queryParams
         }, `农民科技培训_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/trash_can/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -17,6 +17,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
      <!-- <el-form-item label="培训时间" prop="cultivateTime">
         <el-date-picker clearable
                         v-model="queryParams.cultivateTime"
@@ -212,7 +221,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           name:null,
@@ -336,6 +346,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -397,6 +408,10 @@
         this.download('center-data/trash/export', {
           ...this.queryParams
         },  `垃圾桶_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalresources/grid/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
 
       <el-form-item label="网格名称" prop="gridNetworkName">
         <el-input
@@ -20,6 +20,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -233,7 +242,7 @@
           gridNetworkName: null,
           gridNetworkNumber: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           gridQuartel: null,
           gridIntrafield: null,
           gridArea: null,
@@ -348,9 +357,14 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
+      },
       // 多选框选中数据
       handleSelectionChange(selection) {
         this.ids = selection.map(item => item.id)

+ 36 - 5
data-ui/src/views/data/digitaltraffic/level/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <div class="DAFF-common-layout-main DAFF-flex-main" v-if="!open">
-      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" @submit.native.prevent>
+      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" @submit.native.prevent label-width="100px">
         <el-form-item label="名称" prop="name">
           <el-input
             v-model="queryParams.name"
@@ -26,7 +26,16 @@
             size="small"
             @keyup.enter.native="handleQuery"/>
         </el-form-item>
-        <el-form-item label="负责人" prop="personName">
+        <el-form-item prop="deptId">
+          <template slot="label">
+            <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+            <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+          </template>
+          <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                      placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+          <el-input v-model="queryParams.deptName" v-if="false"/>
+        </el-form-item>
+        <el-form-item label="负责人" prop="personName" >
           <el-input
             v-model="queryParams.personName"
             placeholder="请输入负责人"
@@ -140,14 +149,19 @@
 import {delLevel, listLevel} from "@/api/data/digitalresources/level";
 import IForm from './IForm.vue'
 import {format_date} from "@/views/data/common/dateExport";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {treeselect} from "@/api/system/dept";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 export default {
   name: "Level",
-  components: {IForm},
+  components: {IForm,Treeselect},
   data() {
     return {
       // 遮罩层
       loading: true,
+      deptOptions: [],
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -172,14 +186,15 @@ export default {
         mapName: null,
         deptId: null,
         type: null,
-        deptName: null,
-        personName: null
+        personName: null,
+        deptName: 0
       },
     };
   },
   created() {
     this.queryParams.type = this.$route.query.type;
     this.getList();
+    this.getTreeselect();
   },
   methods: {
     refresh() {
@@ -199,9 +214,25 @@ export default {
       this.getList();
     },
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data
+      })
+    },
+    hx(node) {
+      this.form.dataDeptId = node.id
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField("deptId")
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
+    },
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
       this.single = selection.length !== 1

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmImplementsInfoMapper.xml

@@ -43,7 +43,14 @@
             <if test="updateName != null and updateName != ''">and updat_name = #{updateName}</if>
             <if test="updateTime != null ">and update_time = #{updateTime}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null  and deptId != ''">and a.deptId = #{deptId}</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         order by a.create_time desc

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmLivestockMapper.xml

@@ -44,7 +44,14 @@
         from centerdata_t_farm_livestock a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmMachineryInfoMapper.xml

@@ -45,7 +45,14 @@
             <if test="updateName != null and updateName != ''">and updat_name = #{updateName}</if>
             <if test="updateTime != null ">and update_time = #{updateTime}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null  and deptId != ''">and a.deptId = #{deptId}</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         order by a.create_time desc

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmPesticideInformationMapper.xml

@@ -31,7 +31,14 @@
         <include refid="selectCenterdataTFarmPesticideInformationVo"/>
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="planUsage != null  and planUsage != ''">and plan_usage like concat('%', #{planUsage}, '%')</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmPlantInfoMapper.xml

@@ -46,7 +46,14 @@
             <if test="createDate != null ">and a.create_date = #{createDate}</if>
             <if test="updateDate != null ">and a.update_date = #{updateDate}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null  and deptId != ''">and a.deptId = #{deptId}</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         ORDER BY year desc,a.create_time DESC

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmSeedInfoMapper.xml

@@ -47,7 +47,14 @@
             <if test="createDate != null ">and a.create_date = #{createDate}</if>
             <if test="updateDate != null ">and a.update_date = #{updateDate}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null  and deptId != ''">and a.deptId = #{deptId}</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         ORDER BY create_time DESC

+ 8 - 2
src/main/resources/mapper/digitalagriculture/CenterdataTFarmSeedingProgressMapper.xml

@@ -37,8 +37,14 @@
         from centerdata_t_farm_seeding_progress a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
-            <if test="time != null ">and time = #{time}</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>            <if test="time != null ">and time = #{time}</if>
             <if test="address != null  and address != ''">and address = #{address}</if>
             <if test="cropsType != null  and cropsType != ''">and crops_type = #{cropsType}</if>
             <if test="seedingArea != null  and seedingArea != ''">and seeding_area = #{seedingArea}</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmSeedlingProgressMapper.xml

@@ -31,7 +31,14 @@
         from centerdata_t_farm_seedling_progress a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="time != null ">and time = #{time}</if>
             <if test="address != null  and address != ''">and address = #{address}</if>
             <if test="emergenceRate != null  and emergenceRate != ''">and emergence_rate = #{emergenceRate}</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmSowingScheduleMapper.xml

@@ -46,7 +46,14 @@
         from centerdata_t_farm_sowing_schedule a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="time != null ">and time = #{time}</if>
             <if test="address != null  and address != ''">and address = #{address}</if>
             <if test="planMoney != null  and planMoney != ''">and plan_money = #{planMoney}</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmSubsidyInfoMapper.xml

@@ -53,7 +53,14 @@
             <if test="createDate != null ">and a.create_date = #{createDate}</if>
             <if test="updateDate != null ">and a.update_date = #{updateDate}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null  and deptId != ''">and a.deptId = #{deptId}</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         ORDER BY a.create_time DESC

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmTechnologyTrainMapper.xml

@@ -38,7 +38,14 @@
         from centerdata_t_farm_technology_train a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="cultivateTheme != null  and cultivateTheme != ''">and cultivate_theme like concat('%', #{cultivateTheme}, '%')</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmTrashCanMapper.xml

@@ -33,7 +33,14 @@
         from centerdata_t_farm_trashcan a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="code != null  and code != ''">and code like concat('%', #{code}, '%')</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmVillageAnimalPreventionMapper.xml

@@ -30,7 +30,14 @@
         from centerdata_t_farm_village_animal_prevention a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
             <if test="phone != null  and phone != ''">and a.phone like concat('%', #{phone}, '%')</if>
             <if test="address != null  and address != ''">and address = #{address}</if>

+ 16 - 4
src/main/resources/mapper/digitalagriculture/CenterdataTStrawStillFieldMapper.xml

@@ -55,8 +55,14 @@
             <if test="village != null  and village != ''">and a.village = #{village}</if>
             <if test="landInfoId != null  and landInfoId != ''">and a.land_info_id = #{landInfoId}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         order BY still_time DESC , create_time desc
@@ -121,8 +127,14 @@
             <if test="village != null  and village != ''">and a.village like concat('%', #{village}, '%')</if>
             <if test="landInfoId != null  and landInfoId != ''">and a.land_info_id like concat('%', #{landInfoId}, '%')</if>
             <if test="remarks != null  and remarks != ''">and a.remarks like concat('%', #{remarks}, '%')</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         order BY still_time DESC , create_time desc

+ 8 - 2
src/main/resources/mapper/digitalresource/CenterdataTFarmGridMapper.xml

@@ -53,8 +53,14 @@
             <if test="gridNetworkNumber != null  and gridNetworkNumber != ''">and grid_network_number like concat('%',
                 #{gridNetworkNumber}, '%')
             </if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="gridIntrafield != null  and gridIntrafield != ''">and grid_intrafield = #{gridIntrafield}</if>
             <if test="gridArea != null  and gridArea != ''">and grid_area = #{gridArea}</if>
             <if test="gridSupercode != null  and gridSupercode != ''">and grid_supercode = #{gridSupercode}</if>

+ 8 - 2
src/main/resources/mapper/digitaltraffic/CenterdataTSupermapLevelMapper.xml

@@ -44,10 +44,16 @@
             <if test="mapName != null  and mapName != ''">and map_name like concat('%', #{mapName}, '%')</if>
             <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
-            <if test="deptId != null  and deptId != ''">and dept_id = #{deptId}</if>
             <if test="type != null  and type != ''">and a.type = #{type}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
             <if test="personName != null and personName != ''">and p.person_name like concat('%',#{personName},'%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         GROUP BY a.id