Browse Source

Merge branch 'dev' into dev-2.0

lyq 1 year ago
parent
commit
73e0b6b806
100 changed files with 3676 additions and 2358 deletions
  1. 16 2
      data-ui/src/views/data/basicdata/car/index.vue
  2. 20 5
      data-ui/src/views/data/basicdata/carrepair/index.vue
  3. 16 2
      data-ui/src/views/data/basicdata/firehydrant/index.vue
  4. 17 1
      data-ui/src/views/data/basicdata/watercrane/index.vue
  5. 16 1
      data-ui/src/views/data/basicdata/waterintake/index.vue
  6. 8 141
      data-ui/src/views/data/digitalagriculture/LivestockInfo/index.vue
  7. 205 166
      data-ui/src/views/data/digitalagriculture/StillField/index.vue
  8. 20 4
      data-ui/src/views/data/digitalagriculture/agricultural_cooperatives/index.vue
  9. 20 4
      data-ui/src/views/data/digitalagriculture/agricultural_machinery_info/index.vue
  10. 18 2
      data-ui/src/views/data/digitalagriculture/along/index.vue
  11. 6 183
      data-ui/src/views/data/digitalagriculture/animalhusbandry_info/index.vue
  12. 19 3
      data-ui/src/views/data/digitalagriculture/botany_protect_info/index.vue
  13. 17 2
      data-ui/src/views/data/digitalagriculture/breedingFarm/index.vue
  14. 16 2
      data-ui/src/views/data/digitalagriculture/cesspitCollect/index.vue
  15. 19 3
      data-ui/src/views/data/digitalagriculture/chemical_fertilizer_info/index.vue
  16. 17 2
      data-ui/src/views/data/digitalagriculture/enterprise/index.vue
  17. 16 2
      data-ui/src/views/data/digitalagriculture/excrementdispose/index.vue
  18. 301 261
      data-ui/src/views/data/digitalagriculture/farmland/index.vue
  19. 23 8
      data-ui/src/views/data/digitalagriculture/filingsLivestock/index.vue
  20. 17 1
      data-ui/src/views/data/digitalagriculture/garbage_transfer/index.vue
  21. 16 2
      data-ui/src/views/data/digitalagriculture/greenhousefilm/index.vue
  22. 20 3
      data-ui/src/views/data/digitalagriculture/implements_info/index.vue
  23. 19 3
      data-ui/src/views/data/digitalagriculture/information/index.vue
  24. 23 8
      data-ui/src/views/data/digitalagriculture/livestock/index.vue
  25. 18 2
      data-ui/src/views/data/digitalagriculture/machinery_info/index.vue
  26. 16 2
      data-ui/src/views/data/digitalagriculture/modification/index.vue
  27. 17 1
      data-ui/src/views/data/digitalagriculture/plant_info/index.vue
  28. 17 2
      data-ui/src/views/data/digitalagriculture/prevention/index.vue
  29. 17 2
      data-ui/src/views/data/digitalagriculture/schedule/index.vue
  30. 18 2
      data-ui/src/views/data/digitalagriculture/seed_info/index.vue
  31. 17 2
      data-ui/src/views/data/digitalagriculture/seedingProgress/index.vue
  32. 17 2
      data-ui/src/views/data/digitalagriculture/seedlingProgress/index.vue
  33. 18 3
      data-ui/src/views/data/digitalagriculture/sowingSchedule/index.vue
  34. 18 2
      data-ui/src/views/data/digitalagriculture/subsidy_info/index.vue
  35. 17 2
      data-ui/src/views/data/digitalagriculture/supervise/index.vue
  36. 17 2
      data-ui/src/views/data/digitalagriculture/train/index.vue
  37. 17 2
      data-ui/src/views/data/digitalagriculture/trash_can/index.vue
  38. 17 2
      data-ui/src/views/data/digitalemergency/enterprises/index.vue
  39. 17 1
      data-ui/src/views/data/digitalemergency/material/index.vue
  40. 16 2
      data-ui/src/views/data/digitalemergency/team/index.vue
  41. 16 2
      data-ui/src/views/data/digitalemergency/warehouse/index.vue
  42. 20 6
      data-ui/src/views/data/digitalenvironment/LeaveField/index.vue
  43. 16 2
      data-ui/src/views/data/digitalenvironment/biggas/index.vue
  44. 16 9
      data-ui/src/views/data/digitalenvironment/keyenterprise/index.vue
  45. 16 2
      data-ui/src/views/data/digitalenvironment/monitor/index.vue
  46. 255 238
      data-ui/src/views/data/digitalenvironment/person/index.vue
  47. 17 2
      data-ui/src/views/data/digitalenvironment/sewageoutlet/index.vue
  48. 17 1
      data-ui/src/views/data/digitalenvironment/sourcepollution/index.vue
  49. 16 2
      data-ui/src/views/data/digitalfirecontrol/basiclinkageforce/index.vue
  50. 16 2
      data-ui/src/views/data/digitalfirecontrol/fireforce/index.vue
  51. 17 1
      data-ui/src/views/data/digitalfirecontrol/foamliquid/index.vue
  52. 17 1
      data-ui/src/views/data/digitalfirecontrol/fulltimestation/index.vue
  53. 16 2
      data-ui/src/views/data/digitalfirecontrol/keyplaces/index.vue
  54. 17 2
      data-ui/src/views/data/digitalfirecontrol/otherlinkageforce/index.vue
  55. 16 2
      data-ui/src/views/data/digitalfirecontrol/person/index.vue
  56. 16 2
      data-ui/src/views/data/digitalfirecontrol/sensor/index.vue
  57. 15 1
      data-ui/src/views/data/digitalforest/afforestation/index.vue
  58. 16 2
      data-ui/src/views/data/digitalforest/afforestationarea/index.vue
  59. 1 1
      data-ui/src/views/data/digitalforest/afforestationtask/index.vue
  60. 16 2
      data-ui/src/views/data/digitalforest/animal/index.vue
  61. 16 2
      data-ui/src/views/data/digitalforest/changbrand/index.vue
  62. 17 2
      data-ui/src/views/data/digitalforest/channel/index.vue
  63. 16 2
      data-ui/src/views/data/digitalforest/fireteam/index.vue
  64. 19 2
      data-ui/src/views/data/digitalforest/gridLevel/index.vue
  65. 16 2
      data-ui/src/views/data/digitalforest/keyFireproofPlots/index.vue
  66. 16 2
      data-ui/src/views/data/digitalforest/landing/index.vue
  67. 16 2
      data-ui/src/views/data/digitalforest/linBan/index.vue
  68. 17 2
      data-ui/src/views/data/digitalforest/linBanTrees/index.vue
  69. 223 143
      data-ui/src/views/data/digitalforest/linleader/index.vue
  70. 16 4
      data-ui/src/views/data/digitalforest/resources/index.vue
  71. 16 2
      data-ui/src/views/data/digitalforest/trees/index.vue
  72. 16 3
      data-ui/src/views/data/digitalresources/construction/index.vue
  73. 16 3
      data-ui/src/views/data/digitalresources/deposit/index.vue
  74. 289 270
      data-ui/src/views/data/digitalresources/farm/farmland/index.vue
  75. 16 2
      data-ui/src/views/data/digitalresources/farm/info/index.vue
  76. 16 2
      data-ui/src/views/data/digitalresources/grid/index.vue
  77. 16 2
      data-ui/src/views/data/digitalresources/hazard/index.vue
  78. 16 2
      data-ui/src/views/data/digitalresources/person/index.vue
  79. 17 1
      data-ui/src/views/data/digitaltraffic/bridge/index.vue
  80. 17 1
      data-ui/src/views/data/digitaltraffic/culvert/index.vue
  81. 18 5
      data-ui/src/views/data/digitaltraffic/hub/index.vue
  82. 44 3
      data-ui/src/views/data/digitaltraffic/level/index.vue
  83. 16 2
      data-ui/src/views/data/digitaltraffic/trafficperson/index.vue
  84. 17 1
      data-ui/src/views/data/digitaltraffic/warningSign/index.vue
  85. 17 1
      data-ui/src/views/data/digitalwater/battlefield/index.vue
  86. 224 208
      data-ui/src/views/data/digitalwater/ceaner/index.vue
  87. 305 286
      data-ui/src/views/data/digitalwater/channelblueline/index.vue
  88. 17 1
      data-ui/src/views/data/digitalwater/garbagestation/index.vue
  89. 266 250
      data-ui/src/views/data/digitalwater/hechang/index.vue
  90. 98 14
      data-ui/src/views/data/digitalwater/length/index.vue
  91. 17 1
      data-ui/src/views/data/digitalwater/outletsewage/index.vue
  92. 16 2
      data-ui/src/views/data/digitalwater/plan/index.vue
  93. 17 1
      data-ui/src/views/data/digitalwater/reach/index.vue
  94. 17 1
      data-ui/src/views/data/digitalwater/reservoir/index.vue
  95. 17 1
      data-ui/src/views/data/digitalwater/river/index.vue
  96. 17 3
      data-ui/src/views/data/digitalwater/task/index.vue
  97. 1 1
      data-ui/src/views/data/digitalwater/track/index.vue
  98. 17 1
      data-ui/src/views/data/digitalwater/wadebridgeculvert/index.vue
  99. 17 1
      data-ui/src/views/data/digitalwater/watergate/index.vue
  100. 0 0
      data-ui/src/views/data/digitalwater/waterproject/index.vue

+ 16 - 2
data-ui/src/views/data/basicdata/car/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="车牌号" prop="licenseNum">
         <el-input
           v-model="queryParams.licenseNum"
@@ -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>
@@ -374,7 +383,7 @@
           maintenance: null,
           nextMaintenance: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {
@@ -520,6 +529,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -581,6 +591,10 @@
         this.download('sooka-sponest-center-data/car/export', {
           ...this.queryParams
         }, `车辆管理_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 20 - 5
data-ui/src/views/data/basicdata/carrepair/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item label="维修车牌号" prop="licenseNum" label-width="120px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
+      <el-form-item label="维修车牌号" prop="licenseNum" >
         <el-input
           v-model="queryParams.licenseNum"
           placeholder="请输入维修车牌号"
@@ -9,7 +9,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="维修时间" prop="repairTime" label-width="120px">
+      <el-form-item label="维修时间" prop="repairTime" >
         <el-date-picker clearable
                         v-model="queryParams.repairTime"
                         type="date"
@@ -17,7 +17,7 @@
                         placeholder="请选择维修时间">
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="负责人" prop="charger" label-width="120px">
+      <el-form-item label="负责人" prop="charger" >
         <el-input
           v-model="queryParams.charger"
           placeholder="请输入负责人"
@@ -25,6 +25,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>
@@ -101,7 +110,7 @@
       <el-table-column label="创建时间" align="center" prop="createTime"/>
       <el-table-column label="修改人" align="center" prop="updateName"/>
       <el-table-column label="修改时间" align="center" prop="updateTime"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px" >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -245,6 +254,7 @@
           carId: null,
           licenseNum: null,
           repairTime: null,
+          deptName: 0,
           cost: null,
           charger: null,
           remarks: null
@@ -340,6 +350,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -418,6 +429,10 @@
         this.download('sooka-sponest-center-data/carrepair/export', {
           ...this.queryParams
         }, `车辆保养_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/basicdata/firehydrant/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name" label-width="120px">
         <el-input
           v-model="queryParams.name"
@@ -19,6 +19,15 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item prop="deptId" 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 label="经度" prop="longitude">
          <el-input
            v-model="queryParams.longitude"
@@ -400,7 +409,7 @@
           firehydrantPerson: null,
           firehydrantTel: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           dataStatus: null,
         },
         // 表单参数
@@ -555,6 +564,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName=0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -616,6 +626,10 @@
         this.download('sooka-sponest-center-data/firehydrant/export', {
           ...this.queryParams
         }, `消火栓_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 1
data-ui/src/views/data/basicdata/watercrane/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -9,6 +9,16 @@
           @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="longitude" @dblclick.native="showMap">
          <el-input
            v-model="queryParams.longitude"
@@ -380,6 +390,7 @@
           watercraneTel: null,
           dataStatus: null,
           dataDeptId: null,
+          deptName: 0,
           specificLocation:null
         },
         // 表单参数
@@ -529,6 +540,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -590,6 +602,10 @@
         this.download('sooka-sponest-center-data/watercrane/export', {
           ...this.queryParams
         }, `水鹤管理_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 1
data-ui/src/views/data/basicdata/waterintake/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -41,6 +41,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="数据所属部门(政或党的id)" prop="dataDeptId">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.dataDeptId"-->
@@ -315,6 +324,7 @@
           waterintakeTel: null,
           dataStatus: null,
           dataDeptId: null,
+          deptName: 0,
           specificLocation:null
         },
         // 表单参数
@@ -446,6 +456,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -524,6 +535,10 @@
         this.download('sooka-sponest-center-data/waterintake/export', {
           ...this.queryParams
         }, `取水口_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 8 - 141
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,
+      AgriculturalMachineryInfoList:{}
     };
   },
   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,24 +97,18 @@ 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;
       listLivestockCount(this.queryParams).then(response => {
         this.AgriculturalMachineryInfoList = response.rows;
-        // const firstItem = this.AgriculturalMachineryInfoList.shift(); // 移除第一条数据并保存到firstItem
-        // this.AgriculturalMachineryInfoList.push(firstItem); // 将firstItem添加到数据源的末尾
-        this.total = response.total;
+        //查询到的数据去除逗号
+        this.AgriculturalMachineryInfoList.forEach(item => {
+          item.designMaintainCount = item.designMaintainCount.replace(/,/g, '');
+          item.designOfftakeCount = item.designOfftakeCount.replace(/,/g, '');
+          item.realityMaintainCount = item.realityMaintainCount.replace(/,/g, '');
+          item.realityOfftakeCount = item.realityOfftakeCount.replace(/,/g, '');
+        });
         this.loading = false;
       });
     },
@@ -199,63 +123,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', {

+ 205 - 166
data-ui/src/views/data/digitalagriculture/StillField/index.vue

@@ -2,7 +2,8 @@
   <div class="app-container">
     <el-row :gutter="20">
       <!--部门数据-->
-      <el-col :span="['2'].includes(routeParams.stillFieldType)?4:0" :xs="24" v-if="['2'].includes(routeParams.stillFieldType)">
+      <el-col :span="['2'].includes(routeParams.stillFieldType)?4:0" :xs="24"
+              v-if="['2'].includes(routeParams.stillFieldType)">
         <div class="head-container">
           <el-input
             v-model="deptName"
@@ -28,7 +29,8 @@
       </el-col>
       <!--用户数据-->
       <el-col :span="['2'].includes(routeParams.stillFieldType)?20:24" :xs="24">
-        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px" @submit.native.prevent>
+        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px"
+                 @submit.native.prevent>
           <el-form-item label="标题" prop="stillName">
             <el-input
               v-model="queryParams.stillName"
@@ -38,33 +40,34 @@
               @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"-->
-              <!--placeholder="请输入还田人"-->
-              <!--clearable-->
-              <!--size="small"-->
-              <!--@keyup.enter.native="handleQuery"-->
-            <!--/>-->
+          <!--<el-input-->
+          <!--v-model="queryParams.stillUserName"-->
+          <!--placeholder="请输入还田人"-->
+          <!--clearable-->
+          <!--size="small"-->
+          <!--@keyup.enter.native="handleQuery"-->
+          <!--/>-->
           <!--</el-form-item>-->
           <!--<el-form-item label="所属市" prop="city" v-if="['3'].includes(routeParams.stillFieldType)">-->
-            <!--<el-input-->
-              <!--v-model="queryParams.city"-->
-              <!--placeholder="请输入所属市"-->
-              <!--clearable-->
-              <!--size="small"-->
-              <!--@keyup.enter.native="handleQuery"-->
-            <!--/>-->
+          <!--<el-input-->
+          <!--v-model="queryParams.city"-->
+          <!--placeholder="请输入所属市"-->
+          <!--clearable-->
+          <!--size="small"-->
+          <!--@keyup.enter.native="handleQuery"-->
+          <!--/>-->
           <!--</el-form-item>-->
-        <!--  <el-form-item label="所属乡(镇、街)" prop="village" v-if="['3'].includes(routeParams.stillFieldType)">
-            <el-input
-              v-model="queryParams.village"
-              placeholder="请输入所属乡(镇、街)"
-              clearable
-              size="small"
-              @keyup.enter.native="handleQuery"
-            />
-          </el-form-item>-->
+          <!--  <el-form-item label="所属乡(镇、街)" prop="village" v-if="['3'].includes(routeParams.stillFieldType)">
+              <el-input
+                v-model="queryParams.village"
+                placeholder="请输入所属乡(镇、街)"
+                clearable
+                size="small"
+                @keyup.enter.native="handleQuery"
+              />
+            </el-form-item>-->
           <el-form-item label="联系电话" prop="stillPhone" v-if="['3'].includes(routeParams.stillFieldType)">
             <el-input
               v-model="queryParams.stillPhone"
@@ -75,30 +78,30 @@
             />
           </el-form-item>
           <!--<el-form-item label="还田面积(单位㎡)" prop="stillArea">-->
-            <!--<el-input-->
-              <!--v-model="queryParams.leaveArea"-->
-              <!--placeholder="请输入还田面积(单位㎡)"-->
-              <!--clearable-->
-              <!--size="small"-->
-              <!--@keyup.enter.native="handleQuery"-->
-            <!--/>-->
+          <!--<el-input-->
+          <!--v-model="queryParams.leaveArea"-->
+          <!--placeholder="请输入还田面积(单位㎡)"-->
+          <!--clearable-->
+          <!--size="small"-->
+          <!--@keyup.enter.native="handleQuery"-->
+          <!--/>-->
           <!--</el-form-item>-->
           <!--<el-form-item label="还田量(单位kg)" prop="stillAmount">-->
-            <!--<el-input-->
-              <!--v-model="queryParams.leaveAmount"-->
-              <!--placeholder="请输入还田量(单位kg)"-->
-              <!--clearable-->
-              <!--size="small"-->
-              <!--@keyup.enter.native="handleQuery"-->
-            <!--/>-->
+          <!--<el-input-->
+          <!--v-model="queryParams.leaveAmount"-->
+          <!--placeholder="请输入还田量(单位kg)"-->
+          <!--clearable-->
+          <!--size="small"-->
+          <!--@keyup.enter.native="handleQuery"-->
+          <!--/>-->
           <!--</el-form-item>-->
           <!--<el-form-item label="还田时间" prop="stillTime" v-if="['2','3'].includes(routeParams.stillFieldType)">-->
-            <!--<el-date-picker clearable size="small"-->
-                            <!--v-model="queryParams.stillTime"-->
-                            <!--type="year"-->
-                            <!--value-format="yyyy"-->
-                            <!--placeholder="选择还田时间">-->
-            <!--</el-date-picker>-->
+          <!--<el-date-picker clearable size="small"-->
+          <!--v-model="queryParams.stillTime"-->
+          <!--type="year"-->
+          <!--value-format="yyyy"-->
+          <!--placeholder="选择还田时间">-->
+          <!--</el-date-picker>-->
           <!--</el-form-item>-->
           <el-form-item label="所属县(市丶区)" prop="district" v-if="['3'].includes(routeParams.stillFieldType)">
             <el-input
@@ -110,15 +113,16 @@
             />
           </el-form-item>
           <!--<el-form-item label="地块编号" prop="landInfoId" v-if="['3'].includes(routeParams.stillFieldType)">-->
-            <!--<el-input-->
-              <!--v-model="queryParams.landInfoId"-->
-              <!--placeholder="请输入地块编号"-->
-              <!--clearable-->
-              <!--size="small"-->
-              <!--@keyup.enter.native="handleQuery"-->
-            <!--/>-->
+          <!--<el-input-->
+          <!--v-model="queryParams.landInfoId"-->
+          <!--placeholder="请输入地块编号"-->
+          <!--clearable-->
+          <!--size="small"-->
+          <!--@keyup.enter.native="handleQuery"-->
+          <!--/>-->
           <!--</el-form-item>-->
-          <el-form-item label="还田开始时间" prop="startStillTime" v-if="['2','3'].includes(routeParams.stillFieldType)"label-width="120px">
+          <el-form-item label="还田开始时间" prop="startStillTime" v-if="['2','3'].includes(routeParams.stillFieldType)"
+                        label-width="120px">
             <el-date-picker clearable
                             @change="startStillTimeChange"
                             v-model="queryParams.startStillTime"
@@ -129,7 +133,8 @@
                             placeholder="请选择还田开始时间">
             </el-date-picker>
           </el-form-item>
-          <el-form-item label="还田结束时间" prop="endStillTime" v-if="['2','3'].includes(routeParams.stillFieldType)" label-width="120px">
+          <el-form-item label="还田结束时间" prop="endStillTime" v-if="['2','3'].includes(routeParams.stillFieldType)"
+                        label-width="120px">
             <el-date-picker clearable
                             @change="endStillTimeChange"
                             v-model="queryParams.endStillTime"
@@ -141,14 +146,24 @@
             </el-date-picker>
           </el-form-item>
           <!--<el-form-item label="补助金额" prop="subsidyMoney" v-if="['3'].includes(routeParams.stillFieldType)">-->
-            <!--<el-input-->
-              <!--v-model="queryParams.subsidyMoney"-->
-              <!--placeholder="请输入补助金额"-->
-              <!--clearable-->
-              <!--size="small"-->
-              <!--@keyup.enter.native="handleQuery"-->
-            <!--/>-->
+          <!--<el-input-->
+          <!--v-model="queryParams.subsidyMoney"-->
+          <!--placeholder="请输入补助金额"-->
+          <!--clearable-->
+          <!--size="small"-->
+          <!--@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>
@@ -164,7 +179,8 @@
               size="mini"
               @click="handleAdd"
               v-hasPermi="['StillField:StillField:add']"
-            >新增</el-button>
+            >新增
+            </el-button>
           </el-col>
           <el-col :span="1.5" v-if="['1'].includes(routeParams.stillFieldType)">
             <el-button
@@ -175,7 +191,8 @@
               :disabled="single"
               @click="handleUpdate"
               v-hasPermi="['StillField:StillField:edit']"
-            >修改</el-button>
+            >修改
+            </el-button>
           </el-col>
           <el-col :span="1.5" v-if="['1'].includes(routeParams.stillFieldType)">
             <el-button
@@ -186,18 +203,19 @@
               :disabled="multiple"
               @click="handleDelete"
               v-hasPermi="['StillField:StillField:remove']"
-            >删除</el-button>
+            >删除
+            </el-button>
           </el-col>
           <!--<el-col :span="1.5">-->
-            <!--<el-button-->
-              <!--type="info"-->
-              <!--plain-->
-              <!--icon="el-icon-upload2"-->
-              <!--size="mini"-->
-              <!--@click="handleImport"-->
-              <!--v-hasPermi="['StillField:StillField:import']"-->
-            <!--&gt;导入-->
-            <!--</el-button>-->
+          <!--<el-button-->
+          <!--type="info"-->
+          <!--plain-->
+          <!--icon="el-icon-upload2"-->
+          <!--size="mini"-->
+          <!--@click="handleImport"-->
+          <!--v-hasPermi="['StillField:StillField:import']"-->
+          <!--&gt;导入-->
+          <!--</el-button>-->
           <!--</el-col>-->
           <el-col :span="1.5" v-if="['1', '2', '3'].includes(routeParams.stillFieldType)">
             <el-button
@@ -207,55 +225,59 @@
               size="mini"
               @click="handleExport"
               v-hasPermi="['StillField:StillField:export']"
-            >导出</el-button>
+            >导出
+            </el-button>
           </el-col>
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
 
         <el-table v-loading="loading" :data="StillFieldList" @selection-change="handleSelectionChange">
-          <el-table-column type="selection" width="55" align="center" />
+          <el-table-column type="selection" width="55" align="center"/>
           <!--<el-table-column label="${comment}" align="center" prop="id" />-->
-          <el-table-column label="标题" align="center" prop="stillName" />
-          <el-table-column label="还田面积(单位㎡)" align="center" prop="stillArea" />
-          <el-table-column label="还田类型" align="center" prop="stillType" >
+          <el-table-column label="标题" align="center" prop="stillName"/>
+          <el-table-column label="还田面积(单位㎡)" align="center" prop="stillArea"/>
+          <el-table-column label="还田类型" align="center" prop="stillType">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.farm_returning_type" :value="scope.row.stillType"/>
             </template>
           </el-table-column>
-          <el-table-column label="联系电话" align="center" prop="stillPhone" />
+          <el-table-column label="联系电话" align="center" prop="stillPhone"/>
           <el-table-column label="还田时间" align="center" prop="stillTime" width="180">
             <template slot-scope="scope">
               <span>{{ scope.row.stillTime }}年</span>
             </template>
           </el-table-column>
-          <el-table-column label="所属部门" align="center" prop="deptName" />
-          <el-table-column label="创建人" align="center" prop="createName" />
-          <el-table-column label="创建时间" align="center" prop="createTime" />
-          <el-table-column label="修改人" align="center" prop="updateName" />
-          <el-table-column label="修改时间" align="center" prop="updateTime" />
+          <el-table-column label="所属部门" align="center" prop="deptName"/>
+          <el-table-column label="创建人" align="center" prop="createName"/>
+          <el-table-column label="创建时间" align="center" prop="createTime"/>
+          <el-table-column label="修改人" align="center" prop="updateName"/>
+          <el-table-column label="修改时间" align="center" prop="updateTime"/>
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button v-if="['2', '3'].includes(routeParams.stillFieldType)"
-                size="mini"
-                type="text"
-                icon="el-icon-view"
-                @click="handleDetail(scope.row)"
-                v-hasPermi="['StillField:StillField:edit']"
-              >详情</el-button>
+                         size="mini"
+                         type="text"
+                         icon="el-icon-view"
+                         @click="handleDetail(scope.row)"
+                         v-hasPermi="['StillField:StillField:edit']"
+              >详情
+              </el-button>
               <el-button v-if="['1'].includes(routeParams.stillFieldType)"
-                size="mini"
-                type="text"
-                icon="el-icon-edit"
-                @click="handleUpdate(scope.row)"
-                v-hasPermi="['StillField:StillField:edit']"
-              >修改</el-button>
+                         size="mini"
+                         type="text"
+                         icon="el-icon-edit"
+                         @click="handleUpdate(scope.row)"
+                         v-hasPermi="['StillField:StillField:edit']"
+              >修改
+              </el-button>
               <el-button v-if="['1'].includes(routeParams.stillFieldType)"
-                size="mini"
-                type="text"
-                icon="el-icon-delete"
-                @click="handleDelete(scope.row)"
-                v-hasPermi="['StillField:StillField:remove']"
-              >删除</el-button>
+                         size="mini"
+                         type="text"
+                         icon="el-icon-delete"
+                         @click="handleDelete(scope.row)"
+                         v-hasPermi="['StillField:StillField:remove']"
+              >删除
+              </el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -275,18 +297,18 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="150px">
         <el-row :gutter="20">
           <el-col :span="12">
-        <el-form-item label="标题" prop="stillName">
-          <el-input v-model="form.stillName" placeholder="请输入标题" maxlength="20"/>
-        </el-form-item>
-        <el-form-item label="还田面积(单位㎡)" prop="stillArea">
-          <el-input v-model="form.stillArea" placeholder="请输入还田面积(单位㎡)" maxlength="20"/>
-        </el-form-item>
-        <el-form-item label="还田量(单位kg)" prop="stillAmount">
-          <el-input v-model="form.stillAmount" placeholder="请输入还田量(单位kg)" maxlength="20"/>
-        </el-form-item>
-        <el-form-item label="联系电话" prop="stillPhone">
-          <el-input v-model="form.stillPhone" placeholder="请输入联系电话" maxlength="13"/>
-        </el-form-item>
+            <el-form-item label="标题" prop="stillName">
+              <el-input v-model="form.stillName" placeholder="请输入标题" maxlength="20"/>
+            </el-form-item>
+            <el-form-item label="还田面积(单位㎡)" prop="stillArea">
+              <el-input v-model="form.stillArea" placeholder="请输入还田面积(单位㎡)" maxlength="20"/>
+            </el-form-item>
+            <el-form-item label="还田量(单位kg)" prop="stillAmount">
+              <el-input v-model="form.stillAmount" placeholder="请输入还田量(单位kg)" maxlength="20"/>
+            </el-form-item>
+            <el-form-item label="联系电话" prop="stillPhone">
+              <el-input v-model="form.stillPhone" placeholder="请输入联系电话" maxlength="13"/>
+            </el-form-item>
             <el-form-item label="还田类型" prop="stillType">
               <el-select v-model="form.stillType" placeholder="请选择还田类型">
                 <el-option
@@ -299,43 +321,44 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-        <el-form-item label="还田时间" prop="stillTime">
-          <el-date-picker clearable size="small"
-            v-model="form.stillTime"
-            type="year"
-            value-format="yyyy"
-            placeholder="选择还田时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="所属县(市)区" prop="district">
-          <el-input v-model="form.district" placeholder="请输入所属县(市)区" maxlength="20"/>
-        </el-form-item>
-        <el-form-item label="所属乡镇(街)" prop="village">
-          <el-input v-model="form.village" placeholder="请输入所属乡镇(街)" maxlength="20"/>
-        </el-form-item>
+            <el-form-item label="还田时间" prop="stillTime">
+              <el-date-picker clearable size="small"
+                              v-model="form.stillTime"
+                              type="year"
+                              value-format="yyyy"
+                              placeholder="选择还田时间">
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item label="所属县(市)区" prop="district">
+              <el-input v-model="form.district" placeholder="请输入所属县(市)区" maxlength="20"/>
+            </el-form-item>
+            <el-form-item label="所属乡镇(街)" prop="village">
+              <el-input v-model="form.village" placeholder="请输入所属乡镇(街)" maxlength="20"/>
+            </el-form-item>
             <el-form-item label="所属部门" prop="deptId" :label-width="labelWidth">
-<!--              <treeselect-->
-<!--                v-if="!disable"-->
-<!--                :flat="false"-->
-<!--                :allowSelectingDisabledDescendants="true"-->
-<!--                v-model="form.deptId" :options="deptOptions" :show-count="true"-->
-<!--                placeholder="请选择所属部门"/>-->
-<!--              <el-select v-model="form.deptName" placeholder="请选择所属部门" :style="inputStyle" v-if="disable" :disabled="disable">-->
-<!--                <el-option-->
-<!--                  v-for="dept in deptOptions"-->
-<!--                  :key="dept.deptId"-->
-<!--                  :label="dept.deptName"-->
-<!--                  :value="dept"-->
-<!--                />-->
-<!--              </el-select>-->
-<!--              <deptselector :setValue=setDataDeptId :dataDeptId="form.deptId"-->
-<!--                            v-model="form.deptId"></deptselector>-->
-              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true" :noResultsText="'空'" :noOptionsText="'空'"
+              <!--              <treeselect-->
+              <!--                v-if="!disable"-->
+              <!--                :flat="false"-->
+              <!--                :allowSelectingDisabledDescendants="true"-->
+              <!--                v-model="form.deptId" :options="deptOptions" :show-count="true"-->
+              <!--                placeholder="请选择所属部门"/>-->
+              <!--              <el-select v-model="form.deptName" placeholder="请选择所属部门" :style="inputStyle" v-if="disable" :disabled="disable">-->
+              <!--                <el-option-->
+              <!--                  v-for="dept in deptOptions"-->
+              <!--                  :key="dept.deptId"-->
+              <!--                  :label="dept.deptName"-->
+              <!--                  :value="dept"-->
+              <!--                />-->
+              <!--              </el-select>-->
+              <!--              <deptselector :setValue=setDataDeptId :dataDeptId="form.deptId"-->
+              <!--                            v-model="form.deptId"></deptselector>-->
+              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
+                          :noResultsText="'空'" :noOptionsText="'空'"
                           placeholder="请选择部门" @select="hx"/>
             </el-form-item>
-        <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" maxlength="30"/>
-        </el-form-item>
+            <el-form-item label="备注" prop="remarks">
+              <el-input v-model="form.remarks" placeholder="请输入备注" maxlength="30"/>
+            </el-form-item>
           </el-col>
         </el-row>
       </el-form>
@@ -360,13 +383,14 @@
               <label>{{ form.stillAmount }}</label>
             </el-form-item>
             <!--<el-form-item label="还田人:" prop="stillUserName">-->
-              <!--<label>{{ form.stillUserName }}</label>-->
+            <!--<label>{{ form.stillUserName }}</label>-->
             <!--</el-form-item>-->
             <el-form-item label="联系电话:" prop="stillPhone">
               <label>{{ form.stillPhone }}</label>
             </el-form-item>
             <el-form-item label="还田类型:" prop="stillType">
-              <label v-for="(dict, index) in dict.type.farm_returning_type" v-if="form.stillType == dict.value" >{{dict.label}}</label>
+              <label v-for="(dict, index) in dict.type.farm_returning_type"
+                     v-if="form.stillType == dict.value">{{ dict.label }}</label>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -379,7 +403,7 @@
             <el-form-item label="所属乡(镇、街):" prop="village">
               <label>{{ form.village }}</label>
             </el-form-item>
-            <el-form-item label="所属部门:" prop="deptId" >
+            <el-form-item label="所属部门:" prop="deptId">
               <label>{{ form.deptName }}</label>
             </el-form-item>
             <el-form-item label="备注:" prop="remarks">
@@ -430,18 +454,24 @@
 </template>
 
 <script>
-import { listStillField, getStillField, delStillField, addStillField, updateStillField } from "@/api/data/digitalagriculture/StillField/StillField";
+import {
+  listStillField,
+  getStillField,
+  delStillField,
+  addStillField,
+  updateStillField
+} from "@/api/data/digitalagriculture/StillField/StillField";
 import {checkPositiveDecimal, checkNonnegativeInteger, validPhoneMobile} from "@/api/rules/rules";
 import deptselector from '@/views/components/deptselector'
-import { getToken } from '@/utils/auth'
-import { treeselect } from '@/api/system/dept'
+import {getToken} from '@/utils/auth'
+import {treeselect} from '@/api/system/dept'
 import Treeselect from '@riophae/vue-treeselect'
 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import {format_date} from "@/views/data/common/dateExport";
 
 export default {
   name: "StillField",
-  dicts:['farm_returning_type'],
+  dicts: ['farm_returning_type'],
   components: {
     deptselector,
     Treeselect,
@@ -493,7 +523,7 @@ export default {
         // 是否更新已经存在的数据
         updateSupport: 0,
         // 设置上传的请求头部
-        headers: { Authorization: 'Bearer ' + getToken() },
+        headers: {Authorization: 'Bearer ' + getToken()},
         // 上传的地址
         url: process.env.VUE_APP_BASE_API + '/center-data/StillField/import/importData'
       },
@@ -523,7 +553,7 @@ export default {
         updateDate: null,
         remarks: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         stillFieldType: null,
       },
       // 表单参数
@@ -562,11 +592,11 @@ export default {
           {required: true, message: "还田类型不能为空", trigger: "change"},
         ],
         stillName: [
-          { required: true, message: "标题不能为空", trigger: "blur" },
-          { min: 2, max: 20, message: '标题长度必须介于 2 和 20 之间', trigger: 'blur' }
+          {required: true, message: "标题不能为空", trigger: "blur"},
+          {min: 2, max: 20, message: '标题长度必须介于 2 和 20 之间', trigger: 'blur'}
         ],
         stillPhone: [
-          { required: true, message: "联系电话不能为空", trigger: "blur" },
+          {required: true, message: "联系电话不能为空", trigger: "blur"},
           {validator: validPhoneMobile, trigger: 'blur'}
         ],
       }
@@ -626,6 +656,9 @@ export default {
     getList() {
       this.loading = true;
       this.queryParams.stillFieldType = this.routeParams.stillFieldType;// 查询秸秆还田信息类型
+      if (this.queryParams.stillFieldType === 2) {
+        this.queryParams.deptId = null;
+      }
       listStillField(this.queryParams).then(response => {
         this.StillFieldList = response.rows;
         this.total = response.total;
@@ -672,13 +705,14 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -736,12 +770,13 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否删除选中的数据').then(function() {
+      this.$modal.confirm('是否删除选中的数据').then(function () {
         return delStillField(ids);
       }).then(() => {
         this.getList();
         this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      }).catch(() => {
+      });
     },
     /** 导入按钮操作 */
     handleImport() {
@@ -761,7 +796,7 @@ export default {
       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.$alert('<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' + response.msg + '</div>', '导入结果', {dangerouslyUseHTMLString: true})
       this.getList()
     },
     // 提交上传文件
@@ -770,11 +805,11 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
-      let str = this.$route.query.stillFieldType=='3' ? '秸秆还田统计':(this.$route.query.stillFieldType=='1'?'秸秆还田上报':'秸秆还田台账');
+      let str = this.$route.query.stillFieldType == '3' ? '秸秆还田统计' : (this.$route.query.stillFieldType == '1' ? '秸秆还田上报' : '秸秆还田台账');
 
       this.download('/center-data/StillField/export', {
         ...this.queryParams
-      }, str+`_${format_date(new Date())}.xlsx`)
+      }, str + `_${format_date(new Date())}.xlsx`)
     },
     /** 还田开始时间 */
     startStillTimeChange(value) {
@@ -799,6 +834,10 @@ export default {
         this.queryParams.endStillTime = "";
         this.$message.error("请选择时间大于还田开始时间");
       }
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
     }
   }
 };

+ 20 - 4
data-ui/src/views/data/digitalagriculture/agricultural_cooperatives/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="name">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+      <el-form-item  label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入名称"
@@ -27,7 +27,7 @@
           placeholder="选择注册时间">
         </el-date-picker>
       </el-form-item>-->
-      <el-form-item label-width="130px" label="法人姓名" prop="legalPerson">
+      <el-form-item  label="法人姓名" prop="legalPerson">
         <el-input
           v-model="queryParams.legalPerson"
           placeholder="请输入法人姓名"
@@ -36,7 +36,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="联系电话" prop="phone">
+      <el-form-item  label="联系电话" prop="phone">
         <el-input
           v-model="queryParams.phone"
           placeholder="请输入联系电话"
@@ -81,6 +81,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>
@@ -462,6 +471,8 @@
           createDate: null,
           updateDate: null,
           remarks: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -630,6 +641,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -723,6 +735,10 @@
         this.download('/center-data/Cooperatives/export', {
           ...this.queryParams
         }, `农民合作社_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 20 - 4
data-ui/src/views/data/digitalagriculture/agricultural_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="name">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+      <el-form-item  label="单位名称" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入单位名称"
@@ -10,7 +10,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="法人姓名" prop="legalPerson">
+      <el-form-item  label="法人姓名" prop="legalPerson">
         <el-input
           v-model="queryParams.legalPerson"
           placeholder="请输入法人姓名"
@@ -19,7 +19,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="联系电话" prop="phone">
+      <el-form-item  label="联系电话" prop="phone">
         <el-input
           v-model="queryParams.phone"
           placeholder="请输入联系电话"
@@ -28,6 +28,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>
@@ -328,6 +337,8 @@
           createDate: null,
           updateDate: null,
           remarks: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -459,6 +470,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -556,6 +568,10 @@
         this.download('/center-data/AgriculturalMachineryInfo/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/along/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>
@@ -219,7 +228,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           time: null,
           address: null,
           cornGrowingPeriod: null,
@@ -231,6 +241,7 @@
           soyaGrowingPeriod: null,
           soyaHeight: null,
           soyaBladeNum: null
+
         },
         // 表单参数
         form: {},
@@ -331,6 +342,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -392,6 +404,10 @@
         this.download('center-data/along/export', {
           ...this.queryParams
         }, `粮食作物长势_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 6 - 183
data-ui/src/views/data/digitalagriculture/animalhusbandry_info/index.vue

@@ -71,64 +71,14 @@ import {
       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: {},
         // 正整数校验
@@ -167,24 +117,17 @@ import {
         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;
         listAnimalHusbandryInfo(this.queryParams).then(response => {
           this.AgriculturalMachineryInfoList = response.rows;
-          // const firstItem = this.AgriculturalMachineryInfoList.shift(); // 移除第一条数据并保存到firstItem
-          // this.AgriculturalMachineryInfoList.push(firstItem); // 将firstItem添加到数据源的末尾
-          this.total = response.total;
+          this.AgriculturalMachineryInfoList.forEach(item => {
+            item.designMaintainCount = item.designMaintainCount.replace(/,/g, '');
+            item.designOfftakeCount = item.designOfftakeCount.replace(/,/g, '');
+            item.realityMaintainCount = item.realityMaintainCount.replace(/,/g, '');
+            item.realityOfftakeCount = item.realityOfftakeCount.replace(/,/g, '');
+          });
           this.loading = false;
         });
       },
@@ -199,126 +142,6 @@ import {
       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
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
-        this.open = true;
-        this.title = "添加畜牧信息技术信息";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        let _this = this;
-        const id = row.id || this.ids
-        getAgriculturalMachineryInfo(id).then(response => {
-          this.form = response.data;
-          this.title = "修改畜牧信息技术信息";
-          this.open = true;
-          // treeselect().then(response => {
-          //   _this.deptOptions = response.data;
-          //   treeselectAll().then(response => {
-          //     addDeptToTreeSelect(_this.form.deptId, _this.deptOptions, response.data[0]);
-          //     this.open = true;
-          //   });
-          // });
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            // this.form.deptName = this.deptOptions.filter((item) => {
-            //   return this.form.deptId == item.id;
-            // })[0].label;
-            if (this.form.id != null) {
-              updateAgriculturalMachineryInfo(this.form).then(response => {
-                this.$modal.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addAgriculturalMachineryInfo(this.form).then(response => {
-                this.$modal.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
-          }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids;
-        this.$modal.confirm('是否删除选中的数据?').then(function () {
-          return delAgriculturalMachineryInfo(ids);
-        }).then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        }).catch(() => {
-        });
-      },
-      /** 导入按钮操作 */
-      handleImport() {
-        this.upload.title = '导入'
-        this.upload.open = true
-      },
-      /** 下载模板操作 */
-      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/husbandry/export', {

+ 19 - 3
data-ui/src/views/data/digitalagriculture/botany_protect_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="name">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+      <el-form-item  label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入名称"
@@ -10,7 +10,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="详细通讯地址" prop="address">
+      <el-form-item  label="详细通讯地址" prop="address">
         <el-input
           v-model="queryParams.address"
           placeholder="请输入详细通讯地址"
@@ -90,6 +90,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>
@@ -443,6 +452,8 @@
           createDate: null,
           updateDate: null,
           remarks: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -602,6 +613,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -695,6 +707,10 @@
         this.download('/center-data/BotanyProtectInfo/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/breedingFarm/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="true" label-width="90px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="true"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -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>
@@ -342,7 +351,8 @@
           processing: null,
           longitude: null,
           latitude: null,
-
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -487,6 +497,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -549,6 +560,10 @@
         this.download('center-data/breedingFarm/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/digitalagriculture/cesspitCollect/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"
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"
              @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
@@ -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>
@@ -217,7 +226,7 @@ export default {
         createName: null,
         updateName: null,
         deptId: null,
-        deptName: null
+        deptName: 0
       },
       // 表单参数
       form: {},
@@ -327,6 +336,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -388,6 +398,10 @@ export default {
       this.download('center-data/cesspitCollect/export', {
         ...this.queryParams
       }, `粪污收集点_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 19 - 3
data-ui/src/views/data/digitalagriculture/chemical_fertilizer_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="name">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+      <el-form-item  label="化肥名称" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入化肥名称"
@@ -10,7 +10,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="厂家" prop="manufactor">
+      <el-form-item  label="厂家" prop="manufactor">
         <el-input
           v-model="queryParams.manufactor"
           placeholder="请输入厂家"
@@ -37,6 +37,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>
@@ -330,6 +339,8 @@ export default {
         createDate: null,
         updateDate: null,
         remarks: null,
+        deptId: null,
+        deptName: 0,
       },
       // 表单参数
       form: {},
@@ -425,6 +436,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -511,6 +523,10 @@ export default {
       this.download('/center-data/ChemicalFertilizerInfo/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/enterprise/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>
@@ -309,7 +318,7 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           name: null,
@@ -323,6 +332,7 @@
           designScale: null,
           contacts: null,
           phone: null,
+          deptId: null,
         },
 
         // 表单参数
@@ -471,6 +481,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -574,6 +585,10 @@
         this.download('center-data/enterprise/export', {
           ...this.queryParams
         }, str+`_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalagriculture/excrementdispose/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"
@@ -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>
@@ -282,7 +291,7 @@
           updateTime: null,
           remarks: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -404,6 +413,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -471,6 +481,10 @@
         this.download('center-data/excrementdispose/export', {
           ...this.queryParams
         }, `区域性粪污处置中心_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 301 - 261
data-ui/src/views/data/digitalagriculture/farmland/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"
@@ -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>
         <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>
@@ -148,7 +157,8 @@
               <el-input v-model="form.supermapCode" placeholder="请输入地图编码" maxlength="20"/>
             </el-form-item>
             <el-form-item label="面积(单位㎡)" prop="area">
-              <el-input v-model="form.area" placeholder="请输入面积" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"  maxlength="20"/>
+              <el-input v-model="form.area" placeholder="请输入面积"
+                        onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" maxlength="20"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -171,7 +181,7 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="所属部门" prop="deptId"  class="form-style">
+            <el-form-item label="所属部门" prop="deptId" class="form-style">
               <deptselector :setValue=setDataDeptId :dataDeptId="form.deptId"></deptselector>
             </el-form-item>
           </el-col>
@@ -183,8 +193,10 @@
       </div>
     </el-dialog>
     <!-- 添加区域标记 -->
-    <el-dialog :title="titleLongitude":visible.sync="regionalFlagOpen" width="1000px" >
-      <areaSupermap ref="fireAreaSupermap"  v-if="regionalFlagOpen"  style="width: 100%;height:74vh" :mapDiv="'farmlandSuperMap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"  :showAreaLatLng="showAreaLatLng"></areaSupermap>
+    <el-dialog :title="titleLongitude" :visible.sync="regionalFlagOpen" width="1000px">
+      <areaSupermap ref="fireAreaSupermap" v-if="regionalFlagOpen" style="width: 100%;height:74vh"
+                    :mapDiv="'farmlandSuperMap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']"
+                    :isSideBySide="false" :showAreaLatLng="showAreaLatLng"></areaSupermap>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitRegionalFlag">确 定</el-button>
         <el-button @click="cancelRegionalFlag">取 消</el-button>
@@ -194,264 +206,292 @@
 </template>
 
 <script>
-    import {
-        listFarmland,
-        getFarmland,
-        delFarmland,
-        addFarmland,
-        updateFarmland
-    } from "@/api/data/digitalagriculture/farmland/farmland";
-    import deptselector from '@/views/components/deptselector'
-    import areaSupermap from '@/views/components/supermap'
-
-    import {addRegionalFlag,
-        getRegionalFlag,
-        delRegionalFlag } from "@/api/data/digitalresources/info";
-    import {format_date} from "@/views/data/common/dateExport";
-
-    export default {
-        components: {deptselector,areaSupermap},
-        name: "Farmland",
-        dicts: ['farm_field_attribute', 'sys_normal_disable'],
+import {
+  listFarmland,
+  getFarmland,
+  delFarmland,
+  addFarmland,
+  updateFarmland
+} from "@/api/data/digitalagriculture/farmland/farmland";
+import deptselector from '@/views/components/deptselector'
+import areaSupermap from '@/views/components/supermap'
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {
+  addRegionalFlag,
+  getRegionalFlag,
+  delRegionalFlag
+} from "@/api/data/digitalresources/info";
+import {format_date} from "@/views/data/common/dateExport";
+import {treeselect} from "@/api/system/dept";
+import {getSysUserList} from "@/api/data/digitalwater/task";
 
-        data() {
-            return {
-                //区域标记
-                regionalFlagObj:{
-                    eventId:null,
-                    array:[],
-                    type:'2',
-                },
-              regionalFlagOpen:false,
+export default {
+  components: {deptselector, areaSupermap,Treeselect},
+  name: "Farmland",
+  dicts: ['farm_field_attribute', 'sys_normal_disable'],
 
-              titleLongitude:'永久基本农田管理区域标记',
-                // 遮罩层
-                loading: true,
-                // 选中数组
-                ids: [],
-                // 非单个禁用
-                single: true,
-                // 非多个禁用
-                multiple: true,
-                // 显示搜索条件
-                showSearch: true,
-                // 总条数
-                total: 0,
-                // 永久基本农田管理表格数据
-                farmlandList: [],
-                // 弹出层标题
-                title: "",
-                // 是否显示弹出层
-                open: false,
-                // 查询参数
-                queryParams: {
-                    pageNum: 1,
-                    pageSize: 10,
-                    name: null,
-                    code: null,
-                    attribute: null,
-                    city: null,
-                    district: null,
-                    village: null,
-                    area: null,
-                    type: null,
-                    supermapCode: null,
-                    createDate: null,
-                    updateDate: null,
-                    remarks: null,
-                    deptId: null,
-                    deptName: null
-                },
-                // 表单参数
-                form: {},
-                // 表单校验
-                rules: {
-                  name: [
-                    {required: true, message: "地块名称不能为空", trigger: "blur"}
-                  ],
-                  code: [
-                    {required: true, message: "地块编码不能为空", trigger: "blur"}
-                  ],
-                  supermapCode: [
-                    {required: true, message: "地图编码不能为空", trigger: "blur"}
-                  ],
-                  attribute: [
-                    {required: true, message: "地块属性不能为空", trigger: "blur"}
-                  ],
-                  city: [
-                    {required: true, message: "城市不能为空", trigger: "blur"}
-                  ],
-                  type: [
-                    {required: true, message: "状态不能为空", trigger: "blur"}
-                  ],
-                  area: [
-                    {required: true, message: "面积不能为空", trigger: "blur"}
-                  ],
-                  deptId: [
-                    {required: true, message: "所属部门不能为空", trigger: "change"}
-                  ],
-                }
-            };
-        },
-        created() {
-            this.getList();
-        },
-        methods: {
-            showAreaLatLng: function(latlng) {
-                console.log(latlng);
-                this.regionalFlagObj.array = latlng;
-                this.$modal.msgSuccess("获取成功");
-            },
-            showLineLatLng: function(latlng) {
-                // this.form.longitude = latlng
-                alert(latlng)
-            },
-            /** 区域标记按钮操作 */
-            regionalFlagAdd(row){
-                const eventId = row.id;
-                getRegionalFlag(eventId).then(response =>{
-                    console.log(response);
-                    if(response != null && response.length>0){
-                        setTimeout(() => {
-                            this.$refs.fireAreaSupermap.setGraphicsList(response,"red")
-                        }, 1000);
-                        this.regionalFlagObj.array = response;
-                    }else{
-                        this.regionalFlagObj.array = null;
-                    }
-                    this.regionalFlagObj.eventId = eventId;
-                })
-                this.regionalFlagOpen = true;
-                console.log(this.regionalFlagObj)
-            },
-            /** 区域标记取消按钮操作 */
-            cancelRegionalFlag(){
-                this.regionalFlagOpen = false;
-            },
-            /** 区域标记确定按钮操作 */
-            submitRegionalFlag(){
-                delRegionalFlag(this.regionalFlagObj.eventId);
-                addRegionalFlag(this.regionalFlagObj).then(response =>{
-                    this.$modal.msgSuccess("操作成功");
-                    this.regionalFlagOpen = false;
-                });
-            },
-            setDataDeptId(e) {
-                this.form.deptId = e.deptId
-                this.form.deptName = e.deptName
-            },
-            hx(node) {
+  data() {
+    return {
+      //区域标记
+      regionalFlagObj: {
+        eventId: null,
+        array: [],
+        type: '2',
+      },
+      regionalFlagOpen: false,
 
-                this.form.deptId = node.id
-                this.form.deptName = node.label
-            },
-            /** 查询永久基本农田管理列表 */
-            getList() {
-                this.loading = true;
-                listFarmland(this.queryParams).then(response => {
-                    this.farmlandList = response.rows;
-                    this.total = response.total;
-                    this.loading = false;
-                });
-            },
-            // 取消按钮
-            cancel() {
-                this.open = false;
-                this.reset();
-            },
-            // 表单重置
-            reset() {
-                this.form = {
-                    id: null,
-                    name: null,
-                    code: null,
-                    attribute: null,
-                    city: null,
-                    district: null,
-                    village: null,
-                    area: null,
-                    type: null,
-                    supermapCode: null,
-                    createBy: null,
-                    createDate: null,
-                    updateBy: null,
-                    updateDate: null,
-                    remarks: null,
-                    delFlag: null,
-                    deptId: null,
-                    deptName: null
-                };
-                this.resetForm("form");
-            },
-            /** 搜索按钮操作 */
-            handleQuery() {
-                this.queryParams.pageNum = 1;
-                this.getList();
-            },
-            /** 重置按钮操作 */
-            resetQuery() {
-                this.resetForm("queryForm");
-                this.handleQuery();
-            },
-            // 多选框选中数据
-            handleSelectionChange(selection) {
-                this.ids = selection.map(item => item.id)
-                this.single = selection.length !== 1
-                this.multiple = !selection.length
-            },
-            /** 新增按钮操作 */
-            handleAdd() {
-                this.reset();
-                this.open = true;
-                this.title = "添加永久基本农田管理";
-            },
-            /** 修改按钮操作 */
-            handleUpdate(row) {
-                this.reset();
-                const id = row.id || this.ids
-                getFarmland(id).then(response => {
-                    this.form = response.data;
-                    this.open = true;
-                    this.title = "修改永久基本农田管理";
-                });
-            },
-            /** 提交按钮 */
-            submitForm() {
-                this.$refs["form"].validate(valid => {
-                    if (valid) {
-                        if (this.form.id != null) {
-                            updateFarmland(this.form).then(response => {
-                                this.$modal.msgSuccess("修改成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        } else {
-                            addFarmland(this.form).then(response => {
-                                this.$modal.msgSuccess("新增成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        }
-                    }
-                });
-            },
-            /** 删除按钮操作 */
-            handleDelete(row) {
-                const ids = row.id || this.ids;
-                this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
-                    return delFarmland(ids);
-                }).then(() => {
-                    this.getList();
-                    this.$modal.msgSuccess("删除成功");
-                }).catch(() => {
-                });
-            },
-            /** 导出按钮操作 */
-            handleExport() {
-                this.download('center-data/farmland/export', {
-                    ...this.queryParams
-                }, `永久基本农田管理_${format_date(new Date())}.xlsx`)
-            }
-        }
+      titleLongitude: '永久基本农田管理区域标记',
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      deptOptions: [],
+      // 永久基本农田管理表格数据
+      farmlandList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        code: null,
+        attribute: null,
+        city: null,
+        district: null,
+        village: null,
+        area: null,
+        type: null,
+        supermapCode: null,
+        createDate: null,
+        updateDate: null,
+        remarks: null,
+        deptId: null,
+        deptName: 0
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        name: [
+          {required: true, message: "地块名称不能为空", trigger: "blur"}
+        ],
+        code: [
+          {required: true, message: "地块编码不能为空", trigger: "blur"}
+        ],
+        supermapCode: [
+          {required: true, message: "地图编码不能为空", trigger: "blur"}
+        ],
+        attribute: [
+          {required: true, message: "地块属性不能为空", trigger: "blur"}
+        ],
+        city: [
+          {required: true, message: "城市不能为空", trigger: "blur"}
+        ],
+        type: [
+          {required: true, message: "状态不能为空", trigger: "blur"}
+        ],
+        area: [
+          {required: true, message: "面积不能为空", trigger: "blur"}
+        ],
+        deptId: [
+          {required: true, message: "所属部门不能为空", trigger: "change"}
+        ],
+      }
     };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    showAreaLatLng: function (latlng) {
+      console.log(latlng);
+      this.regionalFlagObj.array = latlng;
+      this.$modal.msgSuccess("获取成功");
+    },
+    showLineLatLng: function (latlng) {
+      // this.form.longitude = latlng
+      alert(latlng)
+    },
+    /** 区域标记按钮操作 */
+    regionalFlagAdd(row) {
+      const eventId = row.id;
+      getRegionalFlag(eventId).then(response => {
+        console.log(response);
+        if (response != null && response.length > 0) {
+          setTimeout(() => {
+            this.$refs.fireAreaSupermap.setGraphicsList(response, "red")
+          }, 1000);
+          this.regionalFlagObj.array = response;
+        } else {
+          this.regionalFlagObj.array = null;
+        }
+        this.regionalFlagObj.eventId = eventId;
+      })
+      this.regionalFlagOpen = true;
+      console.log(this.regionalFlagObj)
+    },
+    /** 区域标记取消按钮操作 */
+    cancelRegionalFlag() {
+      this.regionalFlagOpen = false;
+    },
+    /** 区域标记确定按钮操作 */
+    submitRegionalFlag() {
+      delRegionalFlag(this.regionalFlagObj.eventId);
+      addRegionalFlag(this.regionalFlagObj).then(response => {
+        this.$modal.msgSuccess("操作成功");
+        this.regionalFlagOpen = false;
+      });
+    },
+    hx(node) {
+      this.form.dataDeptId = node.id
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField("deptId")
+    },
+    setDataDeptId(e) {
+      this.form.deptId = e.deptId;
+      this.form.deptName = e.deptName;
+      if (e.deptId !== '') {
+        this.getSysUserList(e.deptId)
+      }
+    },
+    getSysUserList(deptId) {
+      const params = Object.assign({})
+      params.deptId = deptId
+      getSysUserList(params).then(response => {
+        this.userList = response.data;
+      })
+    },
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data
+      })
+    },
+    /** 查询永久基本农田管理列表 */
+    getList() {
+      this.loading = true;
+      listFarmland(this.queryParams).then(response => {
+        this.farmlandList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        code: null,
+        attribute: null,
+        city: null,
+        district: null,
+        village: null,
+        area: null,
+        type: null,
+        supermapCode: null,
+        createBy: null,
+        createDate: null,
+        updateBy: null,
+        updateDate: null,
+        remarks: null,
+        delFlag: null,
+        deptId: null,
+        deptName: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    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)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加永久基本农田管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getFarmland(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改永久基本农田管理";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateFarmland(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addFarmland(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
+        return delFarmland(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('center-data/farmland/export', {
+        ...this.queryParams
+      }, `永久基本农田管理_${format_date(new Date())}.xlsx`)
+    }
+  }
+};
 </script>

+ 23 - 8
data-ui/src/views/data/digitalagriculture/filingsLivestock/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px" @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"
@@ -25,6 +25,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>
@@ -199,36 +208,36 @@
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="设计存栏数量" prop="designMaintainCount">
-              <el-input v-model="form.designMaintainCount" placeholder="请输入设计存栏数量"  maxlength="20"/>
+              <el-input v-model="form.designMaintainCount" placeholder="请输入设计存栏数量"  maxlength="10"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="设计出栏数量" prop="designOfftakeCount">
-              <el-input v-model="form.designOfftakeCount" placeholder="请输入设计出栏数量"  maxlength="20"/>
+              <el-input v-model="form.designOfftakeCount" placeholder="请输入设计出栏数量"  maxlength="10"/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="实际存栏数量" prop="realityMaintainCount">
-              <el-input v-model="form.realityMaintainCount" placeholder="请输入实际存栏数量" maxlength="20"/>
+              <el-input v-model="form.realityMaintainCount" placeholder="请输入实际存栏数量" maxlength="10"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="实际出栏数量" prop="realityOfftakeCount">
-              <el-input v-model="form.realityOfftakeCount" placeholder="请输入实际出栏数量" maxlength="20"/>
+              <el-input v-model="form.realityOfftakeCount" placeholder="请输入实际出栏数量" maxlength="10"/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="储尿池容积" prop="urineReservoirArea">
-              <el-input v-model="form.urineReservoirArea" placeholder="请输入储尿池容积" maxlength="20"/>
+              <el-input v-model="form.urineReservoirArea" placeholder="请输入储尿池容积" maxlength="10"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="堆粪场面积" prop="dumpArea">
-              <el-input v-model="form.dumpArea" placeholder="请输入堆粪场面积" maxlength="20"/>
+              <el-input v-model="form.dumpArea" placeholder="请输入堆粪场面积" maxlength="10"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -332,7 +341,7 @@
           pageSize: 10,
           name: null,
           address: null,
-          deptName: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           contacts: null,
@@ -344,6 +353,7 @@
           realityOfftakeCount: null,
           urineReservoirArea: null,
           dumpArea: null,
+          deptId: null,
           dataSource: null
         },
         // 表单参数
@@ -494,6 +504,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -564,6 +575,10 @@
         this.download('center-data/filingsLivestock/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/garbage_transfer/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="100px" label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -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>
@@ -233,6 +242,8 @@
           createDate: null,
           updateDate: null,
           remarks: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -350,6 +361,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -420,6 +432,10 @@
         this.download('/center-data/garbageTransfer/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/digitalagriculture/greenhousefilm/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px" @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"
@@ -25,6 +25,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>
@@ -372,7 +381,7 @@
           greenhouseArea: null,
           hothouseBuilds: null,
           hothouseArea: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -519,6 +528,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -586,6 +596,10 @@
         this.download('center-data/greenhousefilm/export', {
           ...this.queryParams
         }, `棚膜信息_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      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;
       }
     }
   };

+ 23 - 8
data-ui/src/views/data/digitalagriculture/livestock/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px" @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"
@@ -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>
@@ -172,36 +181,36 @@
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="设计存栏数量" prop="designMaintainCount">
-              <el-input v-model="form.designMaintainCount" placeholder="请输入设计存栏数量" maxlength="20"/>
+              <el-input v-model="form.designMaintainCount" placeholder="请输入设计存栏数量" maxlength="10"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="设计出栏数量" prop="designOfftakeCount">
-              <el-input v-model="form.designOfftakeCount" placeholder="请输入设计出栏数量" maxlength="20"/>
+              <el-input v-model="form.designOfftakeCount" placeholder="请输入设计出栏数量" maxlength="10"/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="实际存栏数量" prop="realityMaintainCount">
-              <el-input v-model="form.realityMaintainCount" placeholder="请输入实际存栏数量" maxlength="20"/>
+              <el-input v-model="form.realityMaintainCount" placeholder="请输入实际存栏数量" maxlength="10"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="实际出栏数量" prop="realityOfftakeCount">
-              <el-input v-model="form.realityOfftakeCount" placeholder="请输入实际出栏数量" maxlength="20"/>
+              <el-input v-model="form.realityOfftakeCount" placeholder="请输入实际出栏数量" maxlength="10"/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="储尿池容积" prop="urineReservoirArea">
-              <el-input v-model="form.urineReservoirArea" placeholder="请输入储尿池容积" maxlength="20"/>
+              <el-input v-model="form.urineReservoirArea" placeholder="请输入储尿池容积" maxlength="10"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="堆粪场面积" prop="dumpArea">
-              <el-input v-model="form.dumpArea" placeholder="请输入堆粪场面积" maxlength="20"/>
+              <el-input v-model="form.dumpArea" placeholder="请输入堆粪场面积" maxlength="10"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -303,7 +312,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           name: null,
@@ -476,6 +486,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -543,6 +554,10 @@
         this.download('center-data/livestock/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;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalagriculture/modification/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"
@@ -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>
@@ -275,7 +284,7 @@
           updateTime: null,
           remarks: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -393,6 +402,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -460,6 +470,10 @@
         this.download('center-data/modification/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;
       }
     }
   };

+ 18 - 3
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>
@@ -93,7 +102,7 @@
       <el-table-column label="创建时间" align="center" prop="createTime" />
       <el-table-column label="修改人" align="center" prop="updateName" />
       <el-table-column label="修改时间" align="center" prop="updateTime" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  fixed="right">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  fixed="right" width="120px">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -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;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalemergency/enterprises/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="true" label-width="90px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="true"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -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>
@@ -279,7 +288,8 @@
           remark: null,
           phone: null,
           contacts: null,
-
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -411,9 +421,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)

+ 17 - 1
data-ui/src/views/data/digitalemergency/material/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <!--      <el-form-item label="删除人" prop="deleteBy">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.deleteBy"-->
@@ -125,6 +125,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>
@@ -376,6 +385,8 @@
           createTime:null,
           updateName:null,
           updateTime:null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -484,9 +495,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)

+ 16 - 2
data-ui/src/views/data/digitalemergency/team/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -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>
@@ -269,7 +278,7 @@ export default {
         dataStatus: null,
         name: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         teamType: null,
         teamNature: null,
         expertiseAreas: null,
@@ -435,9 +444,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 16 - 2
data-ui/src/views/data/digitalemergency/warehouse/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -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>
@@ -233,7 +242,7 @@ export default {
         dataStatus: null,
         name: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         longitude: null,
         latitude: null,
         createName:null,
@@ -359,9 +368,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 20 - 6
data-ui/src/views/data/digitalenvironment/LeaveField/index.vue

@@ -28,7 +28,7 @@
       </el-col>
       <!--用户数据-->
       <el-col :span="['2'].includes(routeParams.leaveFieldType)?20:24" :xs="24">
-        <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="leaveName">
             <el-input
               v-model="queryParams.leaveName"
@@ -47,7 +47,7 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-          <el-form-item label="所属县(市)区" prop="district" v-if="['3'].includes(routeParams.leaveFieldType)" label-width="120px">
+          <el-form-item label="所属县(市)区" prop="district" v-if="['3'].includes(routeParams.leaveFieldType)" >
             <el-input
               v-model="queryParams.district"
               placeholder="请输入所属县(市)区"
@@ -56,7 +56,7 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-          <el-form-item label="所属乡镇(街)" prop="village" v-if="['3'].includes(routeParams.leaveFieldType)" label-width="120px">
+          <el-form-item label="所属乡镇(街)" prop="village" v-if="['3'].includes(routeParams.leaveFieldType)" >
             <el-input
               v-model="queryParams.village"
               placeholder="请输入所属乡镇(街)"
@@ -83,7 +83,7 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-          <el-form-item label="离田开始时间" prop="startLeaveTime"v-if="['2','3'].includes(routeParams.leaveFieldType)" label-width="120px">
+          <el-form-item label="离田开始时间" prop="startLeaveTime"v-if="['2','3'].includes(routeParams.leaveFieldType)" >
             <el-date-picker clearable
                             @change="startLeaveTimeChange"
                             v-model="queryParams.startLeaveTime"
@@ -92,7 +92,7 @@
                             placeholder="请选择离田开始时间">
             </el-date-picker>
           </el-form-item>
-          <el-form-item label="离田结束时间" prop="endLeaveTime"v-if="['2','3'].includes(routeParams.leaveFieldType)" label-width="120px">
+          <el-form-item label="离田结束时间" prop="endLeaveTime"v-if="['2','3'].includes(routeParams.leaveFieldType)" >
             <el-date-picker clearable
                             @change="endLeaveTimeChange"
                             v-model="queryParams.endLeaveTime"
@@ -101,6 +101,15 @@
                             placeholder="请选择离田结束时间">
             </el-date-picker>
           </el-form-item>
+          <el-form-item prop="deptId" v-if="['1','3'].includes(routeParams.leaveFieldType)">
+            <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="subsidyMoney" v-if="['3'].includes(routeParams.leaveFieldType)">-->
           <!--<el-input-->
           <!--v-model="queryParams.subsidyMoney"-->
@@ -511,7 +520,7 @@
           updateDate: null,
           remarks: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           leaveFieldType: null,
         },
         // 表单参数
@@ -646,9 +655,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)

+ 16 - 2
data-ui/src/views/data/digitalenvironment/biggas/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="gasName">
         <el-input
           v-model="queryParams.gasName"
@@ -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>
         <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,7 @@
           gasName: null,
           address: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           createName: null,
           updateName: null,
           userId: null,
@@ -312,9 +321,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)

+ 16 - 9
data-ui/src/views/data/digitalenvironment/keyenterprise/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"
@@ -28,14 +28,14 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="地址" prop="address">
-        <el-input
-          v-model="queryParams.address"
-          placeholder="请输入地址"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
+      <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>
@@ -280,6 +280,8 @@
           name: null,
           address: null,
           legalPerson: null,
+          deptId: null,
+          deptName: 0,
           code: null,
         },
         // 表单参数
@@ -409,9 +411,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)

+ 16 - 2
data-ui/src/views/data/digitalenvironment/monitor/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"
@@ -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>
@@ -286,7 +295,7 @@
           pageNum: 1,
           pageSize: 10,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           district: null,
@@ -421,9 +430,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)

+ 255 - 238
data-ui/src/views/data/digitalenvironment/person/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"
@@ -10,6 +10,16 @@
           @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>
@@ -127,14 +137,15 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-<!--            <el-form-item label="姓名" prop="name">
-              <el-input v-model="form.name" placeholder="请输入姓名" maxlength="20" disabled/>
-            </el-form-item>-->
+            <!--            <el-form-item label="姓名" prop="name">
+                          <el-input v-model="form.name" placeholder="请输入姓名" maxlength="20" disabled/>
+                        </el-form-item>-->
             <el-form-item label="行政职务" prop="position">
               <el-input v-model="form.position" placeholder="请输入行政职务" maxlength="20"/>
             </el-form-item>
             <el-form-item label="所属部门" prop="deptId" class="form-style">
-              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true" :noResultsText="'空'" :noOptionsText="'空'"
+              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
+                          :noResultsText="'空'" :noOptionsText="'空'"
                           placeholder="请选择部门" @select="hx"/>
             </el-form-item>
           </el-col>
@@ -156,7 +167,7 @@
               </el-select>
             </el-form-item>
             <el-form-item label="联系电话" prop="phone">
-              <el-input v-model="form.phone" placeholder="请输入联系电话"  disabled maxlength="20"/>
+              <el-input v-model="form.phone" placeholder="请输入联系电话" disabled maxlength="20"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -193,240 +204,246 @@
 </template>
 
 <script>
-    import {listPerson, getPerson, delPerson, addPerson, updatePerson} from "@/api/data/digitalenvironment/person";
-    import Deptselector from '@/views/components/deptselector';
-    import {
-        selectUserList
-    } from "@/api/data/digitalforest/linleader/linleader";
-    import {treeselect} from "@/api/system/dept";
-    import Treeselect from "@riophae/vue-treeselect";
-    import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-    export default {
-        dicts: ['centerdata_hydroenergy_plan_rank', 'centerdata_environment_job','sys_user_sex'],
-        components: {
-            Deptselector,
-          Treeselect
-        },
-        setDataDeptId(e) {
-            this.form.deptId = e.deptId;
-            this.form.deptName = e.deptName;
-        },
-        name: "Person",
-        data() {
-            return {
-                disabled:false,
-                userList: [],
-              deptOptions: undefined,
-                // 遮罩层
-                loading: true,
-                // 选中数组
-                ids: [],
-                // 非单个禁用
-                single: true,
-                // 非多个禁用
-                multiple: true,
-                // 显示搜索条件
-                showSearch: true,
-                // 总条数
-                total: 0,
-                // 资源人员表格数据
-                personList: [],
-                // 弹出层标题
-                title: "",
-                // 是否显示弹出层
-                open: false,
-                // 查询参数
-                queryParams: {
-                    pageNum: 1,
-                    pageSize: 10,
-                    name: null,
-                    sex: null,
-                    phone: null,
-                    attachId: null,
-                    post: null,
-                    position: null,
-                    introduction: null,
-                    riverwayLengthCounty: null,
-                    deptId: null,
-                    deptName: null,
-                    createName: null,
-                    updateName: null,
-                    dataStatus: null,
-                    userId: null
-                },
-                // 表单参数
-                form: {
-                    dialogImageUrl: '',
-                    imageUrl: ''
-                },
-                // 表单校验
-                rules: {
-                    sex: [
-                        {required: true, message: "性别不能为空", trigger: "change"}
-                    ],
-                    deptId: [
-                        {required: true, message: "所属部门不能为空", trigger: "change"}
-                    ],
-                    name: [
-                        {required: true, message: "姓名不能为空", trigger: "change"}
-                    ],
-                    post: [
-                        {required: true, message: "岗位不能为空", trigger: "change"}
-                    ],
-                    userId: [
-                        {required: true, message: "关联用户不能为空", trigger: "change"}
-                    ],
-                    environmentJob: [
-                        {required: true, message: "职务不能为空", trigger: "change"}
-                    ]
-                }
-            };
-        },
-        created() {
-            this.getList();
-          this.getTreeselect();
+import {listPerson, getPerson, delPerson, addPerson, updatePerson} from "@/api/data/digitalenvironment/person";
+import Deptselector from '@/views/components/deptselector';
+import {
+  selectUserList
+} from "@/api/data/digitalforest/linleader/linleader";
+import {treeselect} from "@/api/system/dept";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
-          selectUserList().then(response => {
-                this.userList = response.data;
-            });
-        },
-        methods: {
-          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")
-          },
-            a(event) {
-                this.form.name = event.nickName
-                this.form.sex = event.sex
-                this.form.phone = event.phonenumber
-            },
-            getUrl(url) {
-                this.form.dialogImageUrl = url;
-                this.form.attachId = url;
-            },
-            setDataDeptId(e) {
-                this.form.deptId = e.deptId;
-                this.form.deptName = e.deptName;
-            },
-            /** 查询环保人员列表 */
-            getList() {
-                this.loading = true;
-                listPerson(this.queryParams).then(response => {
-                    this.personList = response.rows;
-                    this.total = response.total;
-                    this.loading = false;
-                });
-            },
-            // 取消按钮
-            cancel() {
-                this.open = false;
-                this.reset();
-            },
-            // 表单重置
-            reset() {
-                this.form = {
-                    id: null,
-                    name: null,
-                    sex: null,
-                    phone: null,
-                    attachId: null,
-                    post: null,
-                    position: null,
-                    introduction: null,
-                    riverwayLengthCounty: null,
-                    deptId: null,
-                    deptName: null,
-                    createBy: null,
-                    createName: null,
-                    createTime: null,
-                    updateBy: null,
-                    updateName: null,
-                    updateTime: null,
-                    dataStatus: "0",
-                    userId: null
-                };
-                this.resetForm("form");
-            },
-            /** 搜索按钮操作 */
-            handleQuery() {
-                this.queryParams.pageNum = 1;
-                this.getList();
-            },
-            /** 重置按钮操作 */
-            resetQuery() {
-                this.resetForm("queryForm");
-                this.handleQuery();
-            },
-            // 多选框选中数据
-            handleSelectionChange(selection) {
-                this.ids = selection.map(item => item.id)
-                this.single = selection.length !== 1
-                this.multiple = !selection.length
-            },
-            /** 新增按钮操作 */
-            handleAdd() {
-                this.reset();
-                this.open = true;
-                this.title = "添加环保人员";
-                this.disabled=false;
+export default {
+  dicts: ['centerdata_hydroenergy_plan_rank', 'centerdata_environment_job', 'sys_user_sex'],
+  components: {
+    Deptselector,
+    Treeselect
+  },
+  setDataDeptId(e) {
+    this.form.deptId = e.deptId;
+    this.form.deptName = e.deptName;
+  },
+  name: "Person",
+  data() {
+    return {
+      disabled: false,
+      userList: [],
+      deptOptions: undefined,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 资源人员表格数据
+      personList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        sex: null,
+        phone: null,
+        attachId: null,
+        post: null,
+        position: null,
+        introduction: null,
+        riverwayLengthCounty: null,
+        deptId: null,
+        deptName: 0,
+        createName: null,
+        updateName: null,
+        dataStatus: null,
+        userId: null
+      },
+      // 表单参数
+      form: {
+        dialogImageUrl: '',
+        imageUrl: ''
+      },
+      // 表单校验
+      rules: {
+        sex: [
+          {required: true, message: "性别不能为空", trigger: "change"}
+        ],
+        deptId: [
+          {required: true, message: "所属部门不能为空", trigger: "change"}
+        ],
+        name: [
+          {required: true, message: "姓名不能为空", trigger: "change"}
+        ],
+        post: [
+          {required: true, message: "岗位不能为空", trigger: "change"}
+        ],
+        userId: [
+          {required: true, message: "关联用户不能为空", trigger: "change"}
+        ],
+        environmentJob: [
+          {required: true, message: "职务不能为空", trigger: "change"}
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
 
-            },
-            /** 修改按钮操作 */
-            handleUpdate(row) {
-                this.reset();
-                const id = row.id || this.ids
-                this.disabled=true;
-                getPerson(id).then(response => {
-                    this.form = response.data;
-                    this.open = true;
-                    this.title = "修改环保人员";
+    selectUserList().then(response => {
+      this.userList = response.data;
+    });
+  },
+  methods: {
+    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")
+    },
+    a(event) {
+      this.form.name = event.nickName
+      this.form.sex = event.sex
+      this.form.phone = event.phonenumber
+    },
+    getUrl(url) {
+      this.form.dialogImageUrl = url;
+      this.form.attachId = url;
+    },
+    setDataDeptId(e) {
+      this.form.deptId = e.deptId;
+      this.form.deptName = e.deptName;
+    },
+    /** 查询环保人员列表 */
+    getList() {
+      this.loading = true;
+      listPerson(this.queryParams).then(response => {
+        this.personList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        sex: null,
+        phone: null,
+        attachId: null,
+        post: null,
+        position: null,
+        introduction: null,
+        riverwayLengthCounty: null,
+        deptId: null,
+        deptName: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        dataStatus: "0",
+        userId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    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)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加环保人员";
+      this.disabled = false;
 
-                });
-            },
-            /** 提交按钮 */
-            submitForm() {
-                this.$refs["form"].validate(valid => {
-                    if (valid) {
-                        if (this.form.id != null) {
-                            updatePerson(this.form).then(response => {
-                                this.$modal.msgSuccess("修改成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        } else {
-                            addPerson(this.form).then(response => {
-                                this.$modal.msgSuccess("新增成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        }
-                    }
-                });
-            },
-            /** 删除按钮操作 */
-            handleDelete(row) {
-                const ids = row.id || this.ids;
-                this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
-                    return delPerson(ids);
-                }).then(() => {
-                    this.getList();
-                    this.$modal.msgSuccess("删除成功");
-                }).catch(() => {
-                });
-            },
-            /** 导出按钮操作 */
-            handleExport() {
-                this.download('/center-data/environmentPerson/export', {
-                    ...this.queryParams
-                }, `环保人员_${new Date().getTime()}.xlsx`)
-            }
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      this.disabled = true;
+      getPerson(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改环保人员";
+
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updatePerson(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPerson(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
         }
-    };
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
+        return delPerson(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('/center-data/environmentPerson/export', {
+        ...this.queryParams
+      }, `环保人员_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
 </script>

+ 17 - 2
data-ui/src/views/data/digitalenvironment/sewageoutlet/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px" @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"
@@ -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>
@@ -295,7 +304,8 @@ export default {
         name: null,
         sewageOneClassification: null,
         sewageTwoClassification: null,
-        deptName: null,
+        deptId: null,
+        deptName: 0,
         notes: null,
         type: null,
       },
@@ -427,9 +437,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 17 - 1
data-ui/src/views/data/digitalenvironment/sourcepollution/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"
@@ -29,6 +29,15 @@
           />
         </el-select>
       </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>
@@ -239,6 +248,8 @@
           name: null,
           address: null,
           type: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -354,9 +365,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)

+ 16 - 2
data-ui/src/views/data/digitalfirecontrol/basiclinkageforce/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="institutionName">
         <el-input
           v-model="queryParams.institutionName"
@@ -64,6 +64,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>
@@ -310,7 +319,7 @@ export default {
         fireFightingTruckNum: null,
         fireFightingTruckTonnage: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         phone:null,
         contacts:null,
         createName:null,
@@ -454,9 +463,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 16 - 2
data-ui/src/views/data/digitalfirecontrol/fireforce/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"
@@ -73,6 +73,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>
@@ -324,7 +333,7 @@ export default {
         longitude: null,
         latitude: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName:null,
         createTime:null,
         updateName:null,
@@ -471,9 +480,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 17 - 1
data-ui/src/views/data/digitalfirecontrol/foamliquid/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="company">
         <el-input
           v-model="queryParams.company"
@@ -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>
         <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>
@@ -262,6 +271,8 @@ export default {
         createTime:null,
         updateName:null,
         updateTime:null,
+        deptId: null,
+        deptName: 0,
       },
       // 表单参数
       form: {},
@@ -390,9 +401,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 17 - 1
data-ui/src/views/data/digitalfirecontrol/fulltimestation/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"
@@ -28,6 +28,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>
@@ -263,6 +272,8 @@ export default {
         createTime:null,
         updateName:null,
         updateTime:null,
+        deptId: null,
+        deptName: 0,
       },
       // 表单参数
       form: {},
@@ -382,9 +393,14 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
+    },
     getCenterMonitorlList() {
       selectCenterMonitorlList({pageNum: 1, pageSize: 10}).then(response => {
         this.deviceList = response.data;

+ 16 - 2
data-ui/src/views/data/digitalfirecontrol/keyplaces/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"
@@ -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>
@@ -248,7 +257,7 @@ export default {
         longitude: null,
         latitude: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName:null,
         createTime:null,
         updateName:null,
@@ -389,9 +398,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 17 - 2
data-ui/src/views/data/digitalfirecontrol/otherlinkageforce/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="company">
         <el-input
           v-model="queryParams.company"
@@ -55,6 +55,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>
@@ -293,11 +302,12 @@ export default {
         longitude: null,
         latitude: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName:null,
         createTime:null,
         updateName:null,
         updateTime:null,
+
       },
       // 表单参数
       form: {},
@@ -424,9 +434,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 16 - 2
data-ui/src/views/data/digitalfirecontrol/person/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"
@@ -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>
@@ -259,7 +268,7 @@ export default {
         introduction: null,
         riverwayLengthCounty: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName: null,
         updateName: null,
         dataStatus: null,
@@ -387,9 +396,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 16 - 2
data-ui/src/views/data/digitalfirecontrol/sensor/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"
@@ -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>
@@ -240,7 +249,7 @@ export default {
         longitude: null,
         latitude: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName: null,
         updateName: null,
         phone:null,
@@ -378,9 +387,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 15 - 1
data-ui/src/views/data/digitalforest/afforestation/index.vue

@@ -33,6 +33,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="executive">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.executive"-->
@@ -413,7 +422,7 @@
           completion: null,
           afforestationRemarks: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           dataStatus: null,
           forestFarmId: null,
           forestFarmName: null,
@@ -548,6 +557,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -634,6 +644,10 @@
         this.download('sooka-sponest-center-data/afforestation/export', {
           ...this.queryParams
         }, `植树计划_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalforest/afforestationarea/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" @submit.native.prevent>
       <el-form-item label="区域编号" prop="afforestationareaCode">
         <el-input
           v-model="queryParams.afforestationareaCode"
@@ -49,6 +49,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="部门id" prop="deptId">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.deptId"-->
@@ -375,7 +384,7 @@ export default {
         forestRegionalDivision: null,
         coverage: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         dataStatus: null,
         dataDeptId: null,
         points: null,
@@ -587,6 +596,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -667,6 +677,10 @@ export default {
       this.download('sooka-sponest-center-data/afforestationarea/export', {
         ...this.queryParams
       }, `植树区域_${new Date().getTime()}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
     }
   }
 };

+ 1 - 1
data-ui/src/views/data/digitalforest/afforestationtask/index.vue

@@ -259,7 +259,7 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="区域" prop="points" @dblclick.native="showMap">
-              <el-input v-model="form.points" placeholder="鼠标双击选择区域" :disabled="disabled" disabled/>
+              <el-input v-model="form.points" placeholder="鼠标双击选择区域" :disabled="disabled" readonly/>
             </el-form-item>
           </el-col>
         </el-row>

+ 16 - 2
data-ui/src/views/data/digitalforest/animal/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" v-if="['2','1','3'].includes(routeParams.wildlifeType)" :inline="true"
-             v-show="showSearch" label-width="68px" @submit.native.prevent>
+             v-show="showSearch" @submit.native.prevent>
       <el-form-item label="动物种类" prop="type">
         <el-select v-model="queryParams.type" placeholder="请选择动物种类" clearable size="small">
           <el-option
@@ -12,6 +12,15 @@
           />
         </el-select>
       </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="deviceList" v-if="['2'].includes(routeParams.wildlifeType)" clearable  label-width="120px">
           <el-select v-model="queryParams.deviceList" filterable placeholder="请选择上报设备">
             <el-option
@@ -390,7 +399,7 @@ export default {
         latitude: null,
         attachId: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         appearTime: null,
         wildlifeType: null,
       },
@@ -550,6 +559,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -644,6 +654,10 @@ export default {
         ...this.queryParams
       }, `${this.title}_${new Date().getTime()}.xlsx`)
     },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
+    }
   }
 };
 </script>

+ 16 - 2
data-ui/src/views/data/digitalforest/changbrand/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="brandName">
         <el-input
           v-model="queryParams.brandName"
@@ -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>
@@ -242,7 +251,7 @@
           longitude: null,
           latitude: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -366,6 +375,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -427,6 +437,10 @@
         this.download('sooka-sponest-center-data/changbrand/export', {
           ...this.queryParams
         }, `林长牌_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalforest/channel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -9,6 +9,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+
       <!--      <el-form-item label="经度" prop="longitude">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.longitude"-->
@@ -57,6 +58,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="部门id" prop="deptId">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.deptId"-->
@@ -368,7 +378,7 @@
           channelPerson: null,
           channelTel: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           dataStatus: null,
           forestFarm: null,
           administrativePosition: null,
@@ -523,6 +533,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -602,6 +613,10 @@
         this.download('sooka-sponest-center-data/channel/export', {
           ...this.queryParams
         }, `水源信息_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalforest/fireteam/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -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>
@@ -321,7 +330,7 @@
           fireteamPerson: null,
           fireteamTel: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           dataStatus: null
         },
         // 表单参数
@@ -467,6 +476,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -528,6 +538,10 @@
         this.download('sooka-sponest-center-data/fireteam/export', {
           ...this.queryParams
         }, `防火队_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 19 - 2
data-ui/src/views/data/digitalforest/gridLevel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px" @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"
@@ -20,6 +20,15 @@
           />
         </el-select>
       </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>
@@ -270,7 +279,7 @@ export default {
         person: null,
         tel: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         initParentId: "0",
       },
       lazyQueryParams:{
@@ -451,10 +460,14 @@ export default {
       if(this.queryParams.forestGridLevel != null && this.queryParams.forestGridLevel != "") {
         this.queryParams.initParentId = null;
       }
+      if(this.queryParams.deptId != null && this.queryParams.deptId != "") {
+        this.queryParams.initParentId = null;
+      }
       this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm('queryForm')
       this.handleQuery()
     },
@@ -518,6 +531,10 @@ export default {
         this.$modal.msgSuccess('删除成功')
       }).catch(() => {
       })
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
     }
   }
 }

+ 16 - 2
data-ui/src/views/data/digitalforest/keyFireproofPlots/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90"
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
              @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
@@ -20,6 +20,15 @@
           />
         </el-select>
       </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>
@@ -272,7 +281,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         dataDeptId: null,
         name: null,
         latitude: null,
@@ -406,6 +415,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -469,6 +479,10 @@ export default {
       this.download('sooka-sponest-center-data/keyFireproofPlots/export', {
         ...this.queryParams
       }, `重点防火地块_${new Date().getTime()}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 16 - 2
data-ui/src/views/data/digitalforest/landing/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90"
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
              @submit.native.prevent>
       <!--      <el-form-item label="纬度" prop="latitude">-->
       <!--        <el-input-->
@@ -90,6 +90,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>
@@ -361,7 +370,7 @@ export default {
         landingPerson: null,
         landingArea: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         dataStatus: null,
         dataDeptId: null
       },
@@ -501,6 +510,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -579,6 +589,10 @@ export default {
       this.download('sooka-sponest-center-data/landing/export', {
         ...this.queryParams
       }, `起降点_${new Date().getTime()}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 16 - 2
data-ui/src/views/data/digitalforest/linBan/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="farmName">
         <el-input
           v-model="queryParams.farmName"
@@ -64,6 +64,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>
@@ -260,7 +269,7 @@ export default {
         datasetNames: null,
         name: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         linBanTreesId: null
       },
       // 表单参数
@@ -348,6 +357,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm('queryForm')
       this.handleQuery()
     },
@@ -438,6 +448,10 @@ export default {
       this.download('/sooka-sponest-center-data/linBan/export', {
         ...this.queryParams
       }, `林班数据图层_${new Date().getTime()}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 }

+ 17 - 2
data-ui/src/views/data/digitalforest/linBanTrees/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <!--                        <el-form-item label="上级部门" prop="parentId">
                                   <el-input
                                           v-model="queryParams.parentId"
@@ -37,6 +37,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="supermapAddress">
                                   <el-input
                                           v-model="queryParams.supermapAddress"
@@ -209,7 +218,7 @@ export default {
         linBanTreesName: null,
         supermapAddress: null,
         deptId: null,
-        deptName: null
+        deptName: 0
       },
       // 表单参数
       form: {},
@@ -305,6 +314,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm('queryForm')
       this.handleQuery()
     },
@@ -362,7 +372,12 @@ export default {
         this.$modal.msgSuccess('删除成功')
       }).catch(() => {
       })
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 }
 </script>
+

+ 223 - 143
data-ui/src/views/data/digitalforest/linleader/index.vue

@@ -1,152 +1,178 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item label="姓名" prop="linName" label-width="100px">
-        <el-input
-          v-model="queryParams.linName"
-          placeholder="请输入姓名"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="电话" prop="linPhone" label-width="100px">
-        <el-input
-          v-model="queryParams.linPhone"
-          placeholder="请输入电话"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="负责网格" prop="linGridName" label-width="100px">
-        <el-input
-          v-model="queryParams.linGridName"
-          placeholder="请输入负责网格"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <!-- <el-form-item label="关联用户ID" prop="linUserId">
-         <el-input
-           v-model="queryParams.linUserId"
-           placeholder="请输入关联用户ID"
-           clearable
-           @keyup.enter.native="handleQuery"
-         />
-       </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>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['forest:linleader:add']"
-        >新增
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['forest:linleader:edit']"
-        >修改
-        </el-button>
+    <el-row :gutter="20">
+      <!--部门数据-->
+      <el-col :span="4" :xs="24">
+        <div class="head-container">
+          <el-input
+            v-model="deptName"
+            placeholder="请输入部门名称"
+            clearable
+            size="small"
+            prefix-icon="el-icon-search"
+            style="margin-bottom: 20px"
+          >
+            <el-button slot="append" @click="changeQueryType" v-if="!queryThisLevel">本级及下级</el-button>
+            <el-button slot="append" @click="changeQueryType" v-if="queryThisLevel">只查询本级</el-button>
+          </el-input>
+        </div>
+        <div class="head-container tree-scrollbar" style="height: 700px;overflow-y:auto;">
+          <el-tree
+            :data="deptOptions"
+            :props="defaultProps"
+            :expand-on-click-node="false"
+            :filter-node-method="filterNode"
+            ref="tree"
+            node-key="id"
+            :default-expanded-keys="[100]"
+            @node-click="handleNodeClick"
+          />
+        </div>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['forest:linleader:remove']"
-        >删除
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['forest:linleader:export']"
-        >导出
-        </el-button>
+      <!--林长数据-->
+      <el-col :span="20" :xs="24">
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+          <el-form-item label="姓名" prop="linName" label-width="100px">
+            <el-input
+              v-model="queryParams.linName"
+              placeholder="请输入姓名"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="电话" prop="linPhone" label-width="100px">
+            <el-input
+              v-model="queryParams.linPhone"
+              placeholder="请输入电话"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="负责网格" prop="linGridName" label-width="100px">
+            <el-input
+              v-model="queryParams.linGridName"
+              placeholder="请输入负责网格"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </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>
+          </el-form-item>
+        </el-form>
+
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd"
+              v-hasPermi="['forest:linleader:add']"
+            >新增
+            </el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="success"
+              plain
+              icon="el-icon-edit"
+              size="mini"
+              :disabled="single"
+              @click="handleUpdate"
+              v-hasPermi="['forest:linleader:edit']"
+            >修改
+            </el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="danger"
+              plain
+              icon="el-icon-delete"
+              size="mini"
+              :disabled="multiple"
+              @click="handleDelete"
+              v-hasPermi="['forest:linleader:remove']"
+            >删除
+            </el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="warning"
+              plain
+              icon="el-icon-download"
+              size="mini"
+              @click="handleExport"
+              v-hasPermi="['forest:linleader:export']"
+            >导出
+            </el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+
+        <el-table v-loading="loading" :data="linleaderList" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="55" align="center"/>
+          <!--<el-table-column label="主键id" align="center" prop="id"/>-->
+          <el-table-column label="姓名" align="center" prop="linName"/>
+          <el-table-column label="性别" align="center" prop="linSex">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.linSex"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="林长级别" align="center" prop="linLevel">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.forest_lin_level" :value="scope.row.linLevel"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="手机号" align="center" prop="linPhone"/>
+          <el-table-column label="负责网格" align="center" prop="linGridName"/>
+          <el-table-column label="编号" align="center" prop="linNumber"/>
+          <el-table-column label="职务" align="center" prop="linJob">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.forest_lin_job" :value="scope.row.linJob"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="职责" align="center" prop="linDuty"/>
+          <el-table-column label="责任区" align="center" prop="linResponsibility"/>
+          <el-table-column label="所属部门" align="center" prop="deptName"/>
+          <el-table-column label="创建人" align="center" prop="createName" />
+          <el-table-column label="创建时间" align="center" prop="createTime" />
+          <el-table-column label="修改人" align="center" prop="updateName" />
+          <el-table-column label="修改时间" align="center" prop="updateTime" />
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="handleUpdate(scope.row)"
+                v-hasPermi="['forest:linleader:edit']"
+              >修改
+              </el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.row)"
+                v-hasPermi="['forest:linleader:remove']"
+              >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="pageList"
+        />
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="linleaderList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center"/>
-      <!--<el-table-column label="主键id" align="center" prop="id"/>-->
-      <el-table-column label="姓名" align="center" prop="linName"/>
-      <el-table-column label="性别" align="center" prop="linSex">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.linSex"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="林长级别" align="center" prop="linLevel">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.forest_lin_level" :value="scope.row.linLevel"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="手机号" align="center" prop="linPhone"/>
-      <el-table-column label="负责网格" align="center" prop="linGridName"/>
-      <el-table-column label="编号" align="center" prop="linNumber"/>
-      <el-table-column label="职务" align="center" prop="linJob">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.forest_lin_job" :value="scope.row.linJob"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="职责" align="center" prop="linDuty"/>
-      <el-table-column label="责任区" align="center" prop="linResponsibility"/>
-      <el-table-column label="所属部门" align="center" prop="deptName"/>
-      <el-table-column label="创建人" align="center" prop="createName" />
-      <el-table-column label="创建时间" align="center" prop="createTime" />
-      <el-table-column label="修改人" align="center" prop="updateName" />
-      <el-table-column label="修改时间" align="center" prop="updateTime" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['forest:linleader:edit']"
-          >修改
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['forest:linleader:remove']"
-          >删除
-          </el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
 
     <!-- 添加或修改林长管理对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="850px" class="form-style">
@@ -254,6 +280,13 @@
           </el-col>
         </el-row>
         <el-row>
+          <el-col :span="12">
+            <el-form-item label="序号" prop="num">
+              <el-input-number v-model="form.num" :min="1" :max="99999"></el-input-number>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="24">
             <el-form-item label="责任区" prop="linResponsibility">
               <el-input v-model="form.linResponsibility" placeholder="请输入备注" type="textarea" maxlength="200"/>
@@ -295,6 +328,8 @@
     dicts: ['forest_lin_level', 'forest_lin_job', 'forest_lin_position', 'forest_llinchang_lin_type', 'sys_user_sex'],
     data() {
       return {
+        //左侧组织机构数查询方式  true查询本级  false查询本级及下级
+        queryThisLevel: false,
         // 部门树选项
         deptOptions: [],
         // 林业网格层级信息树选项
@@ -314,6 +349,8 @@
         total: 0,
         // 林长管理表格数据
         linleaderList: [],
+        // 部门名称
+        deptName: undefined,
         // 弹出层标题
         title: "",
         // 是否显示弹出层
@@ -335,10 +372,15 @@
           linUserId: null,
           linName: null,
           linSex: null,
+          deptId: undefined,
           linPhone: null
         },
         // 表单参数
         form: {},
+        defaultProps: {
+          children: 'children',
+          label: 'label'
+        },
         // 表单校验
         rules: {
           linName: [
@@ -369,6 +411,12 @@
         gridList: []
       };
     },
+    watch: {
+      // 根据名称筛选部门树
+      deptName(val) {
+        this.$refs.tree.filter(val)
+      }
+    },
     created() {
       this.getList();
       listAllGrid(this.queryParams).then(response => {
@@ -468,17 +516,20 @@
           deptName: null,
           linName: null,
           linSex: null,
+          num:99,
           linPhone: null
         };
         this.resetForm("form");
       },
       /** 搜索按钮操作 */
       handleQuery() {
+        this.queryParams.deptId = null
         this.queryParams.pageNum = 1;
         this.getList();
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptId = null
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -545,6 +596,35 @@
         this.download('sooka-sponest-center-data/linleader/export', {
           ...this.queryParams
         }, `林长管理_${new Date().getTime()}.xlsx`)
+      },
+      //点击按钮修改是否只查询本级部门用户
+      changeQueryType(){
+        this.queryThisLevel = !this.queryThisLevel;
+      },
+      /**分页列表方法**/
+      pageList(){
+        if(!this.queryThisLevel){
+          this.queryParams.deptName = 0
+        }else {
+          this.queryParams.deptName = null
+        }
+        this.getList();
+      },
+      // 筛选节点
+      filterNode(value, data) {
+        if (!value) return true
+        return data.label.indexOf(value) !== -1
+      },
+      // 节点单击事件
+      handleNodeClick(data) {
+        this.queryParams.deptId = data.id;
+        this.queryParams.pageNum = 1;
+        if(!this.queryThisLevel){
+          this.queryParams.deptName = 0
+        }else {
+          this.queryParams.deptName = null
+        }
+        this.getList();
       }
     }
   };

+ 16 - 4
data-ui/src/views/data/digitalforest/resources/index.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"
-             @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" @submit.native.prevent>
       <el-form-item label="地类" prop="groundClass">
         <el-input
           v-model="queryParams.groundClass"
@@ -20,12 +19,20 @@
           />
         </el-select>
       </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>
       </el-form-item>
     </el-form>
-
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -258,7 +265,7 @@
           forestCategory: null,
           forestTenure: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           dataStatus: null,
           dataDeptId: null
         },
@@ -355,6 +362,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -433,6 +441,10 @@
         this.download('sooka-sponest-center-data/resources/export', {
           ...this.queryParams
         }, `林业资源_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalforest/trees/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" @submit.native.prevent>
       <el-form-item label="名称" prop="treesName">
         <el-input
           v-model="queryParams.treesName"
@@ -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>
@@ -297,7 +306,7 @@
           treesType: null,
           treesRemarks: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {
@@ -455,6 +464,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -516,6 +526,10 @@
         this.download('sooka-sponest-center-data/trees/export', {
           ...this.queryParams
         }, `珍稀古树_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 16 - 3
data-ui/src/views/data/digitalresources/construction/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"
@@ -10,7 +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>
@@ -285,7 +293,7 @@ export default {
         phone: null,
         person: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName: null,
         updateName: null,
         dataStatus: null
@@ -443,9 +451,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 16 - 3
data-ui/src/views/data/digitalresources/deposit/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"
@@ -19,7 +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>
         <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>
@@ -310,7 +318,7 @@
           phone: null,
           person: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           introduction: null,
           createName: null,
           updateName: null,
@@ -486,9 +494,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)

+ 289 - 270
data-ui/src/views/data/digitalresources/farm/farmland/index.vue

@@ -1,6 +1,7 @@
 <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"
@@ -19,6 +20,16 @@
           @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>
@@ -152,7 +163,8 @@
               <el-input v-model="form.supermapCode" placeholder="请输入地图编码" maxlength="20"/>
             </el-form-item>
             <el-form-item label="面积(单位㎡)" prop="area">
-              <el-input v-model="form.area" placeholder="请输入面积" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"  maxlength="20"/>
+              <el-input v-model="form.area" placeholder="请输入面积"
+                        onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" maxlength="20"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -188,285 +200,292 @@
       </div>
     </el-dialog>
     <!-- 添加区域标记 -->
-<!--    <el-dialog :title="titleLongitude":visible.sync="regionalFlagOpen" width="1000px" >-->
-<!--      <areaSupermap ref="fireAreaSupermap"  v-if="regionalFlagOpen"  style="width: 100%;height:74vh" :mapDiv="'farmlandSuperMap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"  :showAreaLatLng="showAreaLatLng"></areaSupermap>-->
-<!--      <div slot="footer" class="dialog-footer">-->
-<!--        <el-button type="primary" @click="submitRegionalFlag">确 定</el-button>-->
-<!--        <el-button @click="cancelRegionalFlag">取 消</el-button>-->
-<!--      </div>-->
-<!--    </el-dialog>-->
+    <!--    <el-dialog :title="titleLongitude":visible.sync="regionalFlagOpen" width="1000px" >-->
+    <!--      <areaSupermap ref="fireAreaSupermap"  v-if="regionalFlagOpen"  style="width: 100%;height:74vh" :mapDiv="'farmlandSuperMap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"  :showAreaLatLng="showAreaLatLng"></areaSupermap>-->
+    <!--      <div slot="footer" class="dialog-footer">-->
+    <!--        <el-button type="primary" @click="submitRegionalFlag">确 定</el-button>-->
+    <!--        <el-button @click="cancelRegionalFlag">取 消</el-button>-->
+    <!--      </div>-->
+    <!--    </el-dialog>-->
     <ISuperMapAreaMarker ref="ISuperMap" v-if="regionalFlagOpen" @send="send"/>
   </div>
 </template>
 
 <script>
-    import {
-        listFarmland,
-        getFarmland,
-        delFarmland,
-        addFarmland,
-        updateFarmland
-    } from "@/api/data/digitalresources/farmland";
-    import deptselector from '@/views/components/deptselector'
-    import areaSupermap from '@/views/components/supermap'
+import {
+  listFarmland,
+  getFarmland,
+  delFarmland,
+  addFarmland,
+  updateFarmland
+} from "@/api/data/digitalresources/farmland";
+import deptselector from '@/views/components/deptselector'
+import areaSupermap from '@/views/components/supermap'
 
-    import { listInfo, getInfo, delInfo, addInfo, updateInfo, addRegionalFlag,
-        getRegionalFlag,
-        delRegionalFlag } from "@/api/data/digitalresources/info";
-    import Treeselect from "@riophae/vue-treeselect";
-    import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-    import {treeselect} from "@/api/system/dept";
-    import ISuperMapAreaMarker from "@/views/data/common/ISuperMapAreaMarker";
-    export default {
-        components: {Treeselect, deptselector,areaSupermap,ISuperMapAreaMarker},
-        name: "Farmland",
-        dicts: ['farm_field_attribute', 'sys_normal_disable'],
+import {
+  listInfo, getInfo, delInfo, addInfo, updateInfo, addRegionalFlag,
+  getRegionalFlag,
+  delRegionalFlag
+} from "@/api/data/digitalresources/info";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {treeselect} from "@/api/system/dept";
+import ISuperMapAreaMarker from "@/views/data/common/ISuperMapAreaMarker";
 
-        data() {
-            return {
-                //区域标记
-              regionalFlagObj: {
-                eventId: null,
-                latLngs: [],
-                type: '2',
-                name:null,
-              },
-              regionalFlagObj1: [],
-              regionalFlagOpen:false,
-              sign:3,
-              titleLongitude:'永久基本农田管理区域标记',
-                // 遮罩层
-                loading: true,
-                // 选中数组
-                ids: [],
-                // 非单个禁用
-                single: true,
-                // 非多个禁用
-                multiple: true,
-                // 显示搜索条件
-                showSearch: true,
-                // 总条数
-                total: 0,
-                // 永久基本农田管理表格数据
-                farmlandList: [],
-                // 弹出层标题
-                title: "",
-                // 是否显示弹出层
-                open: false,
-                // 查询参数
-                queryParams: {
-                    pageNum: 1,
-                    pageSize: 10,
-                    name: null,
-                    code: null,
-                    attribute: null,
-                    city: null,
-                    district: null,
-                    village: null,
-                    area: null,
-                    type: null,
-                    supermapCode: null,
-                    createDate: null,
-                    updateDate: null,
-                    remarks: null,
-                    deptId: null,
-                    deptName: null
-                },
-                // 表单参数
-                form: {},
-                // 表单校验
-                rules: {
-                  name: [
-                    {required: true, message: "地块名称不能为空", trigger: "blur"}
-                  ],
-                  code: [
-                    {required: true, message: "地块编码不能为空", trigger: "blur"}
-                  ],
-                  supermapCode: [
-                    {required: true, message: "地图编码不能为空", trigger: "blur"}
-                  ],
-                  attribute: [
-                    {required: true, message: "地块属性不能为空", trigger: "blur"}
-                  ],
-                  city: [
-                    {required: true, message: "城市不能为空", trigger: "blur"}
-                  ],
-                  type: [
-                    {required: true, message: "状态不能为空", trigger: "blur"}
-                  ],
-                  area: [
-                    {required: true, message: "面积不能为空", trigger: "blur"}
-                  ],
-                  deptId: [
-                    {required: true, message: "所属部门不能为空", trigger: "change"}
-                  ],
-                }
-            };
-        },
-        created() {
-            this.getList();
-            this.getTreeselect();
-        },
-        methods: {
-          getTreeselect() {
-            treeselect().then(response => {
-              this.deptOptions = response.data
-            })
-          },
+export default {
+  components: {Treeselect, deptselector, areaSupermap, ISuperMapAreaMarker},
+  name: "Farmland",
+  dicts: ['farm_field_attribute', 'sys_normal_disable'],
 
+  data() {
+    return {
+      //区域标记
+      regionalFlagObj: {
+        eventId: null,
+        latLngs: [],
+        type: '2',
+        name: null,
+      },
+      regionalFlagObj1: [],
+      regionalFlagOpen: false,
+      sign: 3,
+      titleLongitude: '永久基本农田管理区域标记',
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 永久基本农田管理表格数据
+      farmlandList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        code: null,
+        attribute: null,
+        city: null,
+        district: null,
+        village: null,
+        area: null,
+        type: null,
+        supermapCode: null,
+        createDate: null,
+        updateDate: null,
+        remarks: null,
+        deptId: null,
+        deptName: 0
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        name: [
+          {required: true, message: "地块名称不能为空", trigger: "blur"}
+        ],
+        code: [
+          {required: true, message: "地块编码不能为空", trigger: "blur"}
+        ],
+        supermapCode: [
+          {required: true, message: "地图编码不能为空", trigger: "blur"}
+        ],
+        attribute: [
+          {required: true, message: "地块属性不能为空", trigger: "blur"}
+        ],
+        city: [
+          {required: true, message: "城市不能为空", trigger: "blur"}
+        ],
+        type: [
+          {required: true, message: "状态不能为空", trigger: "blur"}
+        ],
+        area: [
+          {required: true, message: "面积不能为空", trigger: "blur"}
+        ],
+        deptId: [
+          {required: true, message: "所属部门不能为空", trigger: "change"}
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data
+      })
+    },
 
 
-            /** 区域标记按钮操作 */
-            regionalFlagAdd(row) {
-              const eventId = row.id;
-              this.regionalFlagObj.eventId= eventId;
-              this.showMap(eventId)
-              // getRegionalFlag(eventId).then(response => {
-              //   this.regionalFlagObj1 = response.data;
-              // })
-            },
-          showMap(eventId) {
-            this.regionalFlagOpen = true;
-            this.$nextTick(() => {
-              this.$refs.ISuperMap.initP(this.sign, {
-                longitude: undefined,
-                latitude: undefined,
-                xiantude: undefined
-              },eventId)
-            })
-          },
-          send(val) {
-            if (val===true){
-              this.regionalFlagOpen = false;
-              return;
-            }
-            if (this.sign === 2 || this.sign === 3) this.regionalFlagObj.latLngs = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
-            this.regionalFlagObj.name = val.name;
-            addRegionalFlag(this.regionalFlagObj).then(res =>{
-              this.$modal.msgSuccess(res.msg);
-              this.$refs.ISuperMap.getRegionalFlag();
-            });
-            // this.regionalFlagOpen = false
+    /** 区域标记按钮操作 */
+    regionalFlagAdd(row) {
+      const eventId = row.id;
+      this.regionalFlagObj.eventId = eventId;
+      this.showMap(eventId)
+      // getRegionalFlag(eventId).then(response => {
+      //   this.regionalFlagObj1 = response.data;
+      // })
+    },
+    showMap(eventId) {
+      this.regionalFlagOpen = true;
+      this.$nextTick(() => {
+        this.$refs.ISuperMap.initP(this.sign, {
+          longitude: undefined,
+          latitude: undefined,
+          xiantude: undefined
+        }, eventId)
+      })
+    },
+    send(val) {
+      if (val === true) {
+        this.regionalFlagOpen = false;
+        return;
+      }
+      if (this.sign === 2 || this.sign === 3) this.regionalFlagObj.latLngs = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+      this.regionalFlagObj.name = val.name;
+      addRegionalFlag(this.regionalFlagObj).then(res => {
+        this.$modal.msgSuccess(res.msg);
+        this.$refs.ISuperMap.getRegionalFlag();
+      });
+      // this.regionalFlagOpen = false
 
-          },
+    },
 
-            setDataDeptId(e) {
-                this.form.deptId = e.deptId
-                this.form.deptName = e.deptName
-            },
-          hx(node) {
-            this.form.dataDeptId = node.id
-            this.form.deptId = node.id
-            this.form.deptName = node.label
-            this.$refs.form.validateField("deptId")
-          },
-            /** 查询永久基本农田管理列表 */
-            getList() {
-                this.loading = true;
-                listFarmland(this.queryParams).then(response => {
-                    this.farmlandList = response.rows;
-                    this.total = response.total;
-                    this.loading = false;
-                });
-            },
-            // 取消按钮
-            cancel() {
-                this.open = false;
-                this.reset();
-            },
-            // 表单重置
-            reset() {
-                this.form = {
-                    id: null,
-                    name: null,
-                    code: null,
-                    attribute: null,
-                    city: null,
-                    district: null,
-                    village: null,
-                    area: null,
-                    type: null,
-                    supermapCode: null,
-                    createBy: null,
-                    createDate: null,
-                    updateBy: null,
-                    updateDate: null,
-                    remarks: null,
-                    delFlag: null,
-                    deptId: null,
-                    deptName: null
-                };
-                this.resetForm("form");
-            },
-            /** 搜索按钮操作 */
-            handleQuery() {
-                this.queryParams.pageNum = 1;
-                this.getList();
-            },
-            /** 重置按钮操作 */
-            resetQuery() {
-                this.resetForm("queryForm");
-                this.handleQuery();
-            },
-            // 多选框选中数据
-            handleSelectionChange(selection) {
-                this.ids = selection.map(item => item.id)
-                this.single = selection.length !== 1
-                this.multiple = !selection.length
-            },
-            /** 新增按钮操作 */
-            handleAdd() {
-                this.reset();
-                this.open = true;
-                this.title = "添加永久基本农田管理";
-            },
-            /** 修改按钮操作 */
-            handleUpdate(row) {
-                this.reset();
-                const id = row.id || this.ids
-                getFarmland(id).then(response => {
-                    this.form = response.data;
-                    this.open = true;
-                    this.title = "修改永久基本农田管理";
-                });
-            },
-            /** 提交按钮 */
-            submitForm() {
-                this.$refs["form"].validate(valid => {
-                    if (valid) {
-                        if (this.form.id != null) {
-                            updateFarmland(this.form).then(response => {
-                                this.$modal.msgSuccess("修改成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        } else {
-                            addFarmland(this.form).then(response => {
-                                this.$modal.msgSuccess("新增成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        }
-                    }
-                });
-            },
-            /** 删除按钮操作 */
-            handleDelete(row) {
-                const ids = row.id || this.ids;
-                this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
-                    return delFarmland(ids);
-                }).then(() => {
-                    this.getList();
-                    this.$modal.msgSuccess("删除成功");
-                }).catch(() => {
-                });
-            },
-            /** 导出按钮操作 */
-            handleExport() {
-                this.download('center-data/farmland/export', {
-                    ...this.queryParams
-                }, `永久基本农田管理_${new Date().getTime()}.xlsx`)
-            }
+    setDataDeptId(e) {
+      this.form.deptId = e.deptId
+      this.form.deptName = e.deptName
+    },
+    hx(node) {
+      this.form.dataDeptId = node.id
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField("deptId")
+    },
+    /** 查询永久基本农田管理列表 */
+    getList() {
+      this.loading = true;
+      listFarmland(this.queryParams).then(response => {
+        this.farmlandList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        code: null,
+        attribute: null,
+        city: null,
+        district: null,
+        village: null,
+        area: null,
+        type: null,
+        supermapCode: null,
+        createBy: null,
+        createDate: null,
+        updateBy: null,
+        updateDate: null,
+        remarks: null,
+        delFlag: null,
+        deptId: null,
+        deptName: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    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)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加永久基本农田管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getFarmland(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改永久基本农田管理";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateFarmland(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addFarmland(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
         }
-    };
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
+        return delFarmland(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('center-data/farmland/export', {
+        ...this.queryParams
+      }, `永久基本农田管理_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
 </script>

+ 16 - 2
data-ui/src/views/data/digitalresources/farm/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="name">
         <el-input
           v-model="queryParams.name"
@@ -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>
@@ -302,7 +311,7 @@
           updateDate: null,
           remarks: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -456,9 +465,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)

+ 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)

+ 16 - 2
data-ui/src/views/data/digitalresources/hazard/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"
@@ -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>
@@ -306,7 +315,7 @@
           phone: null,
           person: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           createName: null,
           updateName: null,
           dataStatus: null,
@@ -444,9 +453,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)

+ 16 - 2
data-ui/src/views/data/digitalresources/person/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"
@@ -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>
@@ -246,7 +255,7 @@ export default {
         introduction: null,
         riverwayLengthCounty: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName: null,
         updateName: null,
         dataStatus: null,
@@ -363,9 +372,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 17 - 1
data-ui/src/views/data/digitaltraffic/bridge/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"
@@ -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>
@@ -254,6 +263,8 @@
           pageNum: 1,
           pageSize: 10,
           name: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -383,9 +394,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)

+ 17 - 1
data-ui/src/views/data/digitaltraffic/culvert/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"
@@ -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>
@@ -261,6 +270,8 @@
           pageNum: 1,
           pageSize: 10,
           name: null,
+          deptId: null,
+          deptName:0
         },
         // 表单参数
         form: {},
@@ -390,9 +401,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)

+ 18 - 5
data-ui/src/views/data/digitaltraffic/hub/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="crossingName">
         <el-input
           v-model="queryParams.crossingName"
@@ -28,7 +28,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>
@@ -195,7 +203,7 @@
                     sectionName: null,
                     congestionPoint: null,
                     deptId: null,
-                    deptName: null,
+                    deptName: 0,
                     createName: null,
                     updateName: null,
                     dataStatus: null
@@ -283,9 +291,14 @@
             },
             /** 重置按钮操作 */
             resetQuery() {
-                this.resetForm("queryForm");
-                this.handleQuery();
+              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)

+ 44 - 3
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" label-width="100px" @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,6 +26,23 @@
             size="small"
             @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="personName" >
+          <el-input
+            v-model="queryParams.personName"
+            placeholder="请输入负责人"
+            clearable
+            size="small"
+            @keyup.enter.native="handleQuery"/>
+        </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>
@@ -89,6 +106,7 @@
         <el-table-column label="经度" align="center" prop="longitude"/>
         <el-table-column label="纬度" align="center" prop="latitude"/>
         <el-table-column label="所属部门" align="center" prop="deptName"/>
+        <el-table-column label="负责人" align="center" prop="personName" />
         <el-table-column label="创建人" align="center" prop="createName" />
         <el-table-column label="创建时间" align="center" prop="createTime" />
         <el-table-column label="修改人" align="center" prop="updateName" />
@@ -131,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: [],
       // 非单个禁用
@@ -163,13 +186,15 @@ export default {
         mapName: null,
         deptId: null,
         type: null,
-        deptName: null
+        personName: null,
+        deptName: 0
       },
     };
   },
   created() {
     this.queryParams.type = this.$route.query.type;
     this.getList();
+    this.getTreeselect();
   },
   methods: {
     refresh() {
@@ -189,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

+ 16 - 2
data-ui/src/views/data/digitaltraffic/trafficperson/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"
@@ -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>
@@ -248,7 +257,7 @@ export default {
         introduction: null,
         riverwayLengthCounty: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName: null,
         updateName: null,
         dataStatus: null,
@@ -362,9 +371,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 17 - 1
data-ui/src/views/data/digitaltraffic/warningSign/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"
@@ -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>
@@ -231,6 +240,8 @@
           pageNum: 1,
           pageSize: 10,
           name: null,
+          deptId: null,
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -345,9 +356,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)

+ 17 - 1
data-ui/src/views/data/digitalwater/battlefield/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"
@@ -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="法人" prop="legalPerson">-->
 <!--        <el-input-->
 <!--          v-model="queryParams.legalPerson"-->
@@ -299,6 +308,8 @@
           pageSize: 10,
           name: null,
           scale: null,
+          deptId: null,
+          deptName: 0,
           legalPerson: null,
           creditCode: null,
         },
@@ -418,9 +429,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)

+ 224 - 208
data-ui/src/views/data/digitalwater/ceaner/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"
@@ -10,6 +10,16 @@
           @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>
@@ -69,7 +79,7 @@
     <el-table v-loading="loading" :data="ceanerList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="姓名" align="center" prop="name"/>
-<!--      <el-table-column label="性别" align="center" prop="sex"/>-->
+      <!--      <el-table-column label="性别" align="center" prop="sex"/>-->
       <el-table-column label="性别" align="center" prop="sex">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
@@ -121,12 +131,12 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-<!--            <el-form-item label="性别" prop="sex">-->
-<!--              <el-select v-model="form.sex" placeholder="请输入性别">-->
-<!--                <el-option label="男" value="男" />-->
-<!--                <el-option label="女" value="女" />-->
-<!--              </el-select>-->
-<!--            </el-form-item>-->
+            <!--            <el-form-item label="性别" prop="sex">-->
+            <!--              <el-select v-model="form.sex" placeholder="请输入性别">-->
+            <!--                <el-option label="男" value="男" />-->
+            <!--                <el-option label="女" value="女" />-->
+            <!--              </el-select>-->
+            <!--            </el-form-item>-->
             <el-form-item label="性别" prop="sex">
               <el-select v-model="form.sex" placeholder="请选择性别">
                 <el-option
@@ -155,20 +165,20 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="负责区域" prop="area">
-              <el-input v-model="form.area" placeholder="请输入负责区域"  maxlength="20"/>
+              <el-input v-model="form.area" placeholder="请输入负责区域" maxlength="20"/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="24">
             <el-form-item label="备注" prop="remark">
-              <el-input v-model="form.remark" placeholder="请输入备注"  type="textarea" maxlength="200" />
+              <el-input v-model="form.remark" placeholder="请输入备注" type="textarea" maxlength="200"/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="头像" prop="attachId" >
+            <el-form-item label="头像" prop="attachId">
               <ImageUpload ref="ImageUpload" :limit="1" :fileType="['png', 'jpg', 'jpeg']" :value="form.attachId"
                            @input="getUrl"></ImageUpload>
             </el-form-item>
@@ -184,204 +194,210 @@
 </template>
 
 <script>
-    import {listCeaner, getCeaner, delCeaner, addCeaner, updateCeaner} from "@/api/data/digitalwater/ceaner";
-    import Deptselector from '@/views/components/deptselector.vue';
-    import { validPhoneMobile } from "@/api/rules/rules";
-    import {treeselect} from "@/api/system/dept";
-    import Treeselect from "@riophae/vue-treeselect";
-    import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-    export default {
-        components: {Deptselector,Treeselect},
-      dicts: ['sys_user_sex'],
-        name: "Ceaner",
-        data() {
-            return {
-                // 遮罩层
-                loading: true,
-                deptOptions: undefined,
-                // 选中数组
-                ids: [],
-                // 非单个禁用
-                single: true,
-                // 非多个禁用
-                multiple: true,
-                // 显示搜索条件
-                showSearch: true,
-                // 总条数
-                total: 0,
-                // 保洁员管理表格数据
-                ceanerList: [],
-                // 弹出层标题
-                title: "",
-                // 是否显示弹出层
-                open: false,
-                // 查询参数
-                queryParams: {
-                    pageNum: 1,
-                    pageSize: 10,
-                    name: null,
-                    sex: null,
-                    phone: null,
-                    attachId: null,
-                    area: null,
-                    deptId: null,
-                    deptName: null,
-                    createName: null,
-                    updateName: null,
-                    dataStatus: null
-                },
-                // 表单参数
-                form: {
-                  attachId: null
-                },
-                // 表单校验
-                rules: {
+import {listCeaner, getCeaner, delCeaner, addCeaner, updateCeaner} from "@/api/data/digitalwater/ceaner";
+import Deptselector from '@/views/components/deptselector.vue';
+import {validPhoneMobile} from "@/api/rules/rules";
+import {treeselect} from "@/api/system/dept";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
-                    name: [
-                        {required: true, message: "姓名不能为空", trigger: "blur"}
-                    ],
-                    sex: [
-                        {required: true, message: "性别不能为空", trigger: "change"}
-                    ],
-                    phone: [
-                      { validator: validPhoneMobile,trigger: 'blur'}
-                    ],
+export default {
+  components: {Deptselector, Treeselect},
+  dicts: ['sys_user_sex'],
+  name: "Ceaner",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      deptOptions: undefined,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 保洁员管理表格数据
+      ceanerList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        sex: null,
+        phone: null,
+        attachId: null,
+        area: null,
+        deptId: null,
+        deptName: 0,
+        createName: null,
+        updateName: null,
+        dataStatus: null
+      },
+      // 表单参数
+      form: {
+        attachId: null
+      },
+      // 表单校验
+      rules: {
 
-                    deptId: [
-                        {required: true, message: "所属部门不能为空", trigger: "change"}
-                    ],
-                }
-            };
-        },
-        created() {
-            this.getList();
-            this.getTreeselect();
-        },
-        methods: {
-          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")
-          },
-            getUrl(url) {
-                this.form.attachId = url;
-            },
-            setDataDeptId(e) {
-                this.form.deptId = e.deptId;
-                this.form.deptName = e.deptName;
-            },
-            /** 查询保洁员管理列表 */
-            getList() {
-                this.loading = true;
-                listCeaner(this.queryParams).then(response => {
-                    this.ceanerList = response.rows;
-                    this.total = response.total;
-                    this.loading = false;
-                });
-            },
-            // 取消按钮
-            cancel() {
-                this.open = false;
-                this.reset();
-            },
-            // 表单重置
-            reset() {
-                this.form = {
-                    id: null,
-                    name: null,
-                    sex: null,
-                    phone: null,
-                    attachId: null,
-                    area: null,
-                    remark: null,
-                    deptId: null,
-                    deptName: null,
-                    createBy: null,
-                    createName: null,
-                    createTime: null,
-                    updateBy: null,
-                    updateName: null,
-                    updateTime: null,
-                    dataStatus: "0"
-                };
-                this.resetForm("form");
-            },
-            /** 搜索按钮操作 */
-            handleQuery() {
-                this.queryParams.pageNum = 1;
-                this.getList();
-            },
-            /** 重置按钮操作 */
-            resetQuery() {
-                this.resetForm("queryForm");
-                this.handleQuery();
-            },
-            // 多选框选中数据
-            handleSelectionChange(selection) {
-                this.ids = selection.map(item => item.id)
-                this.single = selection.length !== 1
-                this.multiple = !selection.length
-            },
-            /** 新增按钮操作 */
-            handleAdd() {
-                this.reset();
-                this.open = true;
-                this.title = "添加保洁员管理";
-            },
-            /** 修改按钮操作 */
-            handleUpdate(row) {
-                this.reset();
-                const id = row.id || this.ids
-                getCeaner(id).then(response => {
-                    this.form = response.data;
-                    this.open = true;
-                    this.title = "修改保洁员管理";
-                });
-            },
-            /** 提交按钮 */
-            submitForm() {
-              console.log( this.form.sex)
-                this.$refs["form"].validate(valid => {
-                    if (valid) {
-                        if (this.form.id != null) {
-                            updateCeaner(this.form).then(response => {
-                                this.$modal.msgSuccess("修改成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        } else {
-                            addCeaner(this.form).then(response => {
-                                this.$modal.msgSuccess("新增成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        }
-                    }
-                });
-            },
-            /** 删除按钮操作 */
-            handleDelete(row) {
-                const ids = row.id || this.ids;
-                this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
-                    return delCeaner(ids);
-                }).then(() => {
-                    this.getList();
-                    this.$modal.msgSuccess("删除成功");
-                }).catch(() => {
-                });
-            },
-            /** 导出按钮操作 */
-            handleExport() {
-                this.download('center-data/ceaner/export', {
-                    ...this.queryParams
-                }, `保洁员管理_${new Date().getTime()}.xlsx`)
-            }
-        }
+        name: [
+          {required: true, message: "姓名不能为空", trigger: "blur"}
+        ],
+        sex: [
+          {required: true, message: "性别不能为空", trigger: "change"}
+        ],
+        phone: [
+          {validator: validPhoneMobile, trigger: 'blur'}
+        ],
+
+        deptId: [
+          {required: true, message: "所属部门不能为空", trigger: "change"}
+        ],
+      }
     };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    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")
+    },
+    getUrl(url) {
+      this.form.attachId = url;
+    },
+    setDataDeptId(e) {
+      this.form.deptId = e.deptId;
+      this.form.deptName = e.deptName;
+    },
+    /** 查询保洁员管理列表 */
+    getList() {
+      this.loading = true;
+      listCeaner(this.queryParams).then(response => {
+        this.ceanerList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        sex: null,
+        phone: null,
+        attachId: null,
+        area: null,
+        remark: null,
+        deptId: null,
+        deptName: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        dataStatus: "0"
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    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)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加保洁员管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getCeaner(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改保洁员管理";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      console.log(this.form.sex)
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateCeaner(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCeaner(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
+        return delCeaner(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('center-data/ceaner/export', {
+        ...this.queryParams
+      }, `保洁员管理_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
 </script>

+ 305 - 286
data-ui/src/views/data/digitalwater/channelblueline/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"
@@ -29,6 +29,16 @@
           @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="deptOptionsa" 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>
@@ -99,14 +109,14 @@
       <el-table-column label="所在河流" align="center" prop="river">
         <template slot-scope="scope">
           <span v-for="river in riverList" :key="river.id" :label="river.name" :value="river.id">
-            <span v-if="scope.row.river == river.id">{{river.name}}</span>
+            <span v-if="scope.row.river == river.id">{{ river.name }}</span>
           </span>
         </template>
       </el-table-column>
       <el-table-column label="所在河段" align="center" prop="reach">
         <template slot-scope="scope">
           <span v-for="reach in reachList" :key="reach.id" :label="reach.name" :value="reach.id">
-            <span v-if="scope.row.reach == reach.id">{{reach.name}}</span>
+            <span v-if="scope.row.reach == reach.id">{{ reach.name }}</span>
           </span>
         </template>
       </el-table-column>
@@ -175,7 +185,8 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="归属机构" prop="institutionId">
-              <Treeselect v-model="form.institutionId" :options="deptOptionsa" :show-count="true" placeholder="请选择归属机构"
+              <Treeselect v-model="form.institutionId" :options="deptOptionsa" :show-count="true"
+                          placeholder="请选择归属机构"
                           @select="hx" :noResultsText="'空'" :noOptionsText="'空'"/>
             </el-form-item>
           </el-col>
@@ -240,12 +251,12 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="面积m³" prop="area">
-              <el-input v-model="form.area" placeholder="请输入面积" maxlength = "20"/>
+              <el-input v-model="form.area" placeholder="请输入面积" maxlength="20"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="所属部门" prop="deptId">
-<!--              <Deptselector :setValue=setDataDeptId :dataDeptId="form.deptId"/>-->
+              <!--              <Deptselector :setValue=setDataDeptId :dataDeptId="form.deptId"/>-->
               <treeselect v-model="form.deptId" :options="deptOptionsa" multiple:false :show-count="true"
                           placeholder="请选择部门" @select="bm" :noResultsText="'空'" :noOptionsText="'空'"/>
 
@@ -285,289 +296,297 @@
 </template>
 
 <script>
-    import {
-        addChannelblueline,
-        delChannelblueline,
-        getChannelblueline,
-        listAllReach,
-        listChannelblueline,
-        updateChannelblueline
-    } from "@/api/data/digitalwater/channelblueline";
-    import {listAllRiver} from "@/api/data/digitalwater/reach";
-    import {checkPositiveDecimal,checkLat,checkLon,validPhoneMobile} from "@/api/rules/rules";
-    import {treeselect} from "@/api/system/dept";
-    import Deptselector from '@/views/components/deptselector.vue';
-    import Supermap from '@/views/components/supermap.vue';
-    import Treeselect from "@riophae/vue-treeselect";
-    import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-    import {selectCenterMonitorlList} from "@/api/data/digitalforest/animal/animal";
-    import ISuperMap from "@/views/data/common/ISuperMap";
-    import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-    import DataImageUpload from "@/components/ImageUpload/dataUpload.vue";
-    export default {
-        name: "Channelblueline",
-        components: {DataImageUpload, Deptselector, Supermap, Treeselect,ISuperMap},
-        dicts: ['centerdata_attr_type'],
-        data() {
-            return {
-                // 遮罩层
-                loading: true,
-                deptOptionsa: undefined,
-                sign: 1,
-                ISuperMapvisible: false,
+import {
+  addChannelblueline,
+  delChannelblueline,
+  getChannelblueline,
+  listAllReach,
+  listChannelblueline,
+  updateChannelblueline
+} from "@/api/data/digitalwater/channelblueline";
+import {listAllRiver} from "@/api/data/digitalwater/reach";
+import {checkPositiveDecimal, checkLat, checkLon, validPhoneMobile} from "@/api/rules/rules";
+import {treeselect} from "@/api/system/dept";
+import Deptselector from '@/views/components/deptselector.vue';
+import Supermap from '@/views/components/supermap.vue';
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {selectCenterMonitorlList} from "@/api/data/digitalforest/animal/animal";
+import ISuperMap from "@/views/data/common/ISuperMap";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import DataImageUpload from "@/components/ImageUpload/dataUpload.vue";
 
-              // 选中数组
-                ids: [],
-                // 非单个禁用
-                single: true,
-                // 非多个禁用
-                multiple: true,
-                // 显示搜索条件
-                showSearch: true,
-                // 总条数
-                total: 0,
-              cameraList:[],//设备集合
-                // 河道蓝线资源表格数据
-                channelbluelineList: [],
-                // 弹出层标题
-                title: "",
-                // 是否显示弹出层
-                open: false,
-                // 查询参数
-                queryParams: {
-                    pageNum: 1,
-                    pageSize: 10,
-                    name: null,
-                    attrType: null,
-                    riverLeader: null,
-                },
-                // 表单参数
-                form: {},
-                checkPositiveDecimal: checkPositiveDecimal,
+export default {
+  name: "Channelblueline",
+  components: {DataImageUpload, Deptselector, Supermap, Treeselect, ISuperMap},
+  dicts: ['centerdata_attr_type'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      deptOptionsa: undefined,
+      sign: 1,
+      ISuperMapvisible: false,
 
-                // 表单校验
-                rules: {
-                    name: [
-                        {required: true, message: "名称不能为空", trigger: "blur"}
-                    ],
-                    attrType: [
-                        {required: true, message: "属性类型不能为空", trigger: "change"}
-                    ],
-                    institutionId: [
-                        {required: true, message: "归属机构不能为空", trigger: "change"}
-                    ],
-                    river: [
-                        {required: true, message: "所在河流不能为空", trigger: "change"}
-                    ],
-                    reach: [
-                        {required: true, message: "所在河段不能为空", trigger: "change"}
-                    ],
-                    riverLeader: [
-                        {required: true, message: "河长不能为空", trigger: "change"}
-                    ],
-                    longitude: [
-                        {required: true, message: "经度不能为空", trigger: "change"},
-                        {validator: checkLon, trigger: 'blur'}
-                    ],
-                    latitude: [
-                        {required: true, message: "纬度不能为空", trigger: "change"},
-                      {validator: checkLat, trigger: 'blur'}
-                    ],
-                    contactsPhone: [
-                      {required: true, message: '电话不能为空', trigger: 'blur'},
-                      {validator: validPhoneMobile, trigger: 'blur'}
-                    ],
-                    area: [
-                        {validator: checkPositiveDecimal, trigger: 'blur'}
-                    ],
-                    deptId: [
-                        {required: true, message: "所属部门不能为空", trigger: "change"}
-                    ],
-                },
-                showLongitude: false,
-                riverList: [],
-                reachList: []
-            };
-        },
-        created() {
-            this.getList();
-            this.getTreeselect();
-            listAllRiver(this.queryParams).then(response => {
-                this.riverList = response.data;
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      cameraList: [],//设备集合
+      // 河道蓝线资源表格数据
+      channelbluelineList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        attrType: null,
+        riverLeader: null,
+        deptId: null,
+        deptName: 0,
+      },
+      // 表单参数
+      form: {},
+      checkPositiveDecimal: checkPositiveDecimal,
+
+      // 表单校验
+      rules: {
+        name: [
+          {required: true, message: "名称不能为空", trigger: "blur"}
+        ],
+        attrType: [
+          {required: true, message: "属性类型不能为空", trigger: "change"}
+        ],
+        institutionId: [
+          {required: true, message: "归属机构不能为空", trigger: "change"}
+        ],
+        river: [
+          {required: true, message: "所在河流不能为空", trigger: "change"}
+        ],
+        reach: [
+          {required: true, message: "所在河段不能为空", trigger: "change"}
+        ],
+        riverLeader: [
+          {required: true, message: "河长不能为空", trigger: "change"}
+        ],
+        longitude: [
+          {required: true, message: "经度不能为空", trigger: "change"},
+          {validator: checkLon, trigger: 'blur'}
+        ],
+        latitude: [
+          {required: true, message: "纬度不能为空", trigger: "change"},
+          {validator: checkLat, trigger: 'blur'}
+        ],
+        contactsPhone: [
+          {required: true, message: '电话不能为空', trigger: 'blur'},
+          {validator: validPhoneMobile, trigger: 'blur'}
+        ],
+        area: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        deptId: [
+          {required: true, message: "所属部门不能为空", trigger: "change"}
+        ],
+      },
+      showLongitude: false,
+      riverList: [],
+      reachList: []
+    };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+    listAllRiver(this.queryParams).then(response => {
+      this.riverList = response.data;
+    });
+    listAllReach(this.queryParams).then(response => {
+      this.reachList = response.data;
+    });
+    selectCenterMonitorlList(this.queryParams).then(response => {
+      this.cameraList = response.data;
+    });
+  },
+  methods: {
+    /** 上传 */
+    getUrl(url) {
+      this.form.attachPaths = url
+    },
+    riverLabel(river) {
+      this.form.riverLabel = river.name
+    },
+    reachLabel(reach) {
+      this.form.reachLabel = reach.name
+    },
+    bm(node) {
+      this.form.dataDeptId = node.id
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField("deptId")
+    },
+    showLatLng: function (lat, lng) {
+      this.form.latitude = lat;
+      this.form.longitude = lng;
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptionsa = response.data;
+      });
+    },
+    hx(node) {
+      this.form.institutionId = node.id;
+      this.form.institutionName = node.label;
+    },
+    /** 查询河道蓝线资源列表 */
+    getList() {
+      this.loading = true;
+      listChannelblueline(this.queryParams).then(response => {
+        this.channelbluelineList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        attrType: null,
+        institutionId: null,
+        institutionName: null,
+        address: null,
+        river: null,
+        reach: null,
+        riverLeader: null,
+        contactsPhone: null,
+        area: null,
+        longitude: null,
+        latitude: null,
+        deptId: null,
+        deptName: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        dataStatus: "0"
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.deptName = 0;
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加河道蓝线资源";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getChannelblueline(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改河道蓝线资源";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateChannelblueline(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
             });
-            listAllReach(this.queryParams).then(response => {
-                this.reachList = response.data;
+          } else {
+            addChannelblueline(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
             });
-          selectCenterMonitorlList(this.queryParams).then(response => {
-            this.cameraList = response.data;
-          });
-        },
-        methods: {
-          /** 上传 */
-          getUrl(url) {
-            this.form.attachPaths=url
-          },
-          riverLabel(river) {
-            this.form.riverLabel = river.name
-          },
-          reachLabel(reach) {
-            this.form.reachLabel = reach.name
-          },
-          bm(node) {
-            this.form.dataDeptId = node.id
-            this.form.deptId = node.id
-            this.form.deptName = node.label
-            this.$refs.form.validateField("deptId")
-          },
-            showLatLng: function (lat, lng) {
-                this.form.latitude = lat;
-                this.form.longitude = lng;
-            },
-            /** 查询部门下拉树结构 */
-            getTreeselect() {
-                treeselect().then(response => {
-                    this.deptOptionsa = response.data;
-                });
-            },
-            hx(node) {
-                this.form.institutionId = node.id;
-                this.form.institutionName = node.label;
-            },
-            /** 查询河道蓝线资源列表 */
-            getList() {
-                this.loading = true;
-                listChannelblueline(this.queryParams).then(response => {
-                    this.channelbluelineList = response.rows;
-                    this.total = response.total;
-                    this.loading = false;
-                });
-            },
-            // 取消按钮
-            cancel() {
-                this.open = false;
-                this.reset();
-            },
-            // 表单重置
-            reset() {
-                this.form = {
-                    id: null,
-                    name: null,
-                    attrType: null,
-                    institutionId: null,
-                    institutionName: null,
-                    address: null,
-                    river: null,
-                    reach: null,
-                    riverLeader: null,
-                    contactsPhone: null,
-                    area: null,
-                    longitude: null,
-                    latitude: null,
-                    deptId: null,
-                    deptName: null,
-                    createBy: null,
-                    createName: null,
-                    createTime: null,
-                    updateBy: null,
-                    updateName: null,
-                    updateTime: null,
-                    dataStatus: "0"
-                };
-                this.resetForm("form");
-            },
-            /** 搜索按钮操作 */
-            handleQuery() {
-                this.queryParams.pageNum = 1;
-                this.getList();
-            },
-            /** 重置按钮操作 */
-            resetQuery() {
-                this.resetForm("queryForm");
-                this.handleQuery();
-            },
-            // 多选框选中数据
-            handleSelectionChange(selection) {
-                this.ids = selection.map(item => item.id)
-                this.single = selection.length !== 1
-                this.multiple = !selection.length
-            },
-            /** 新增按钮操作 */
-            handleAdd() {
-                this.reset();
-                this.open = true;
-                this.title = "添加河道蓝线资源";
-            },
-            /** 修改按钮操作 */
-            handleUpdate(row) {
-                this.reset();
-                const id = row.id || this.ids
-                getChannelblueline(id).then(response => {
-                    this.form = response.data;
-                    this.open = true;
-                    this.title = "修改河道蓝线资源";
-                });
-            },
-            /** 提交按钮 */
-            submitForm() {
-                this.$refs["form"].validate(valid => {
-                    if (valid) {
-                        if (this.form.id != null) {
-                            updateChannelblueline(this.form).then(response => {
-                                this.$modal.msgSuccess("修改成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        } else {
-                            addChannelblueline(this.form).then(response => {
-                                this.$modal.msgSuccess("新增成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        }
-                    }
-                });
-            },
-            /** 删除按钮操作 */
-            handleDelete(row) {
-                const ids = row.id || this.ids;
-                this.$modal.confirm('是否确认删除所选数据项?').then(function () {
-                    return delChannelblueline(ids);
-                }).then(() => {
-                    this.getList();
-                    this.$modal.msgSuccess("删除成功");
-                }).catch(() => {
-                });
-            },
-
-          showMap() {
-            this.ISuperMapvisible = true;
-            this.$nextTick(() => {
-              this.$refs.ISuperMap.init(this.sign, {
-                id: this.form.id,
-                longitude: this.form.longitude,
-                latitude: this.form.latitude,
-                xiantude: this.form.longitude//this.form.longitude换成每个页面对应线或者面对应的字段
-              })
-            })
-          },
-          send(val) {
-            if (val===true){
-              this.ISuperMapvisible = false;
-              return;
-            }
-            if (this.sign === 1) {
-              this.form.longitude = val.longitude;
-              this.form.latitude = val.latitude;
-            }
-            if (this.sign === 2 || this.sign === 3) this.form.longitude = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
-            this.ISuperMapvisible = false
-          },
-            /** 导出按钮操作 */
-            handleExport() {
-                this.download('sooka-sponest-center-data/channelblueline/export', {
-                    ...this.queryParams
-                }, `河道蓝线资源_${new Date().getTime()}.xlsx`)
-            }
+          }
         }
-    };
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除所选数据项?').then(function () {
+        return delChannelblueline(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+
+    showMap() {
+      this.ISuperMapvisible = true;
+      this.$nextTick(() => {
+        this.$refs.ISuperMap.init(this.sign, {
+          id: this.form.id,
+          longitude: this.form.longitude,
+          latitude: this.form.latitude,
+          xiantude: this.form.longitude//this.form.longitude换成每个页面对应线或者面对应的字段
+        })
+      })
+    },
+    send(val) {
+      if (val === true) {
+        this.ISuperMapvisible = false;
+        return;
+      }
+      if (this.sign === 1) {
+        this.form.longitude = val.longitude;
+        this.form.latitude = val.latitude;
+      }
+      if (this.sign === 2 || this.sign === 3) this.form.longitude = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+      this.ISuperMapvisible = false
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('sooka-sponest-center-data/channelblueline/export', {
+        ...this.queryParams
+      }, `河道蓝线资源_${new Date().getTime()}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
+    }
+  }
+};
 </script>

+ 17 - 1
data-ui/src/views/data/digitalwater/garbagestation/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"
@@ -28,6 +28,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>
@@ -267,6 +276,8 @@
           name: null,
           code: null,
           principal: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -368,9 +379,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)

+ 266 - 250
data-ui/src/views/data/digitalwater/hechang/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"
@@ -10,6 +10,16 @@
           @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>
@@ -167,259 +177,265 @@
 </template>
 
 <script>
-    import {listHechang, getHechang, delHechang, addHechang, updateHechang} from "@/api/data/digitalwater/hechang";
-    import {listAll} from "@/api/data/digitalwater/length";
+import {listHechang, getHechang, delHechang, addHechang, updateHechang} from "@/api/data/digitalwater/hechang";
+import {listAll} from "@/api/data/digitalwater/length";
 
-    import deptselector from '@/views/components/deptselector'
-    import supermap from '@/views/components/supermap'
-    import {checkLat,checkLon} from "@/api/rules/rules";
-    import {treeselect} from "@/api/system/dept";
-    import ISuperMap from "@/views/data/common/ISuperMap";
-    import Treeselect from "@riophae/vue-treeselect";
-    import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-    export default {
-        components: {
-            deptselector,
-            supermap,
-          ISuperMap,
-          Treeselect
-        },
-        name: "Hechang",
-        data() {
-            return {
-                // 信息弹出层上的坐标弹层
-                showLongitude: false,
-                titleLongitude: '',
-                deptOptions: undefined,
-                sign: 1,
-                ISuperMapvisible: false,
+import deptselector from '@/views/components/deptselector'
+import supermap from '@/views/components/supermap'
+import {checkLat, checkLon} from "@/api/rules/rules";
+import {treeselect} from "@/api/system/dept";
+import ISuperMap from "@/views/data/common/ISuperMap";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
-              // 遮罩层
-                loading: true,
-                // 选中数组
-                ids: [],
-                // 非单个禁用
-                single: true,
-                // 非多个禁用
-                multiple: true,
-                // 显示搜索条件
-                showSearch: true,
-                // 总条数
-                total: 0,
-                // 河长牌表格数据
-                hechangList: [],
-                lengthList: [],
-                // 弹出层标题
-                title: "",
-                // 是否显示弹出层
-                open: false,
-                // 查询参数
-                queryParams: {
-                    pageNum: 1,
-                    pageSize: 10,
-                    name: null,
-                    number: null,
-                    longitude: null,
-                    latitude: null,
-                    hechangId: null,
-                    address: null,
-                    introduction: null,
-                    attachId: null,
-                    deptId: null,
-                    deptName: null,
-                    createName: null,
-                    updateName: null,
-                    dataStatus: null
-                },
-                // 表单参数
-                form: {
-                    dataDeptId: '',
-                    dialogImageUrl: '',
-                  attachId:null,
-                },
-                // 表单校验
-                rules: {
-                    name: [
-                        {required: true, message: '名称不能为空', trigger: 'blur'}
-                    ],
-                    deptId: [
-                        {required: true, message: '所属部门不能为空', trigger: 'change'}
-                    ],
-                    longitude: [
-                        {required: true, message: '经度不能为空', trigger: 'change'},
-                      {validator: checkLon, trigger: 'blur'}
-                    ],
-                    latitude: [
-                        {required: true, message: '纬度不能为空', trigger: 'change'},
-                        {validator: checkLat, trigger: 'blur'}
-                    ],
-                    hechangId: [
-                        {required: true, message: '所属河长不能为空', trigger: 'change'}
-                    ]
+export default {
+  components: {
+    deptselector,
+    supermap,
+    ISuperMap,
+    Treeselect
+  },
+  name: "Hechang",
+  data() {
+    return {
+      // 信息弹出层上的坐标弹层
+      showLongitude: false,
+      titleLongitude: '',
+      deptOptions: undefined,
+      sign: 1,
+      ISuperMapvisible: false,
 
-                }
-            };
-        },
-        created() {
-            this.getList();
-            this.getTreeselect();
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 河长牌表格数据
+      hechangList: [],
+      lengthList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        number: null,
+        longitude: null,
+        latitude: null,
+        hechangId: null,
+        address: null,
+        introduction: null,
+        attachId: null,
+        deptId: null,
+        deptName: 0,
+        createName: null,
+        updateName: null,
+        dataStatus: null
+      },
+      // 表单参数
+      form: {
+        dataDeptId: '',
+        dialogImageUrl: '',
+        attachId: null,
+      },
+      // 表单校验
+      rules: {
+        name: [
+          {required: true, message: '名称不能为空', trigger: 'blur'}
+        ],
+        deptId: [
+          {required: true, message: '所属部门不能为空', trigger: 'change'}
+        ],
+        longitude: [
+          {required: true, message: '经度不能为空', trigger: 'change'},
+          {validator: checkLon, trigger: 'blur'}
+        ],
+        latitude: [
+          {required: true, message: '纬度不能为空', trigger: 'change'},
+          {validator: checkLat, trigger: 'blur'}
+        ],
+        hechangId: [
+          {required: true, message: '所属河长不能为空', trigger: 'change'}
+        ]
 
-        },
-        methods: {
-          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")
-          },
-          showMap() {
-            this.ISuperMapvisible = true;
-            this.$nextTick(() => {
-              this.$refs.ISuperMap.init(this.sign, {
-                id: this.form.id,
-                longitude: this.form.longitude,
-                latitude: this.form.latitude,
-                xiantude: this.form.longitude//this.form.longitude换成每个页面对应线或者面对应的字段
-              })
-            })
-          },
-          send(val) {
-            if (val===true){
-              this.ISuperMapvisible = false;
-              return;
-            }
-            if (this.sign === 1) {
-              this.form.longitude = val.longitude;
-              this.form.latitude = val.latitude;
-            }
-            if (this.sign === 2 || this.sign === 3) this.form.longitude = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
-            this.ISuperMapvisible = false
-          },
-            getUrl(url) {
-                this.form.dialogImageUrl = url;
-                this.form.attachId = url;
-            },
-            setDataDeptId(e) {
-                this.form.deptId = e.deptId
-                this.form.deptName = e.deptName
-            },
-            /** 查询河长牌列表 */
-            getList() {
-                this.loading = true;
-                listHechang(this.queryParams).then(response => {
-                    this.hechangList = response.rows;
-                    this.total = response.total;
-                    this.loading = false;
-                });
-                this.queryParams.type = 2
-                listAll(this.queryParams).then(response => {
-                    this.lengthList = response.data
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
 
-                });
-            },
-            // 取消按钮
-            cancel() {
-                this.open = false;
-                this.reset();
-            },
-            // 表单重置
-            reset() {
-                this.form = {
-                    id: null,
-                    name: null,
-                    number: null,
-                    longitude: null,
-                    latitude: null,
-                    hechangId: null,
-                    address: null,
-                    introduction: null,
-                    attachId: null,
-                    deptId: null,
-                    deptName: null,
-                    createBy: null,
-                    createName: null,
-                    createTime: null,
-                    updateBy: null,
-                    updateName: null,
-                    updateTime: null,
-                    dataStatus: "0"
-                };
-                this.resetForm("form");
-            },
-            /** 搜索按钮操作 */
-            handleQuery() {
-                this.queryParams.pageNum = 1;
-                this.getList();
-            },
-            /** 重置按钮操作 */
-            resetQuery() {
-                this.resetForm("queryForm");
-                this.handleQuery();
-            },
-            // 多选框选中数据
-            handleSelectionChange(selection) {
-                this.ids = selection.map(item => item.id)
-                this.single = selection.length !== 1
-                this.multiple = !selection.length
-            },
-            /** 新增按钮操作 */
-            handleAdd() {
-                this.reset();
-                this.open = true;
-                this.title = "添加河长牌";
-            },
-            /** 修改按钮操作 */
-            handleUpdate(row) {
-                this.reset();
-                const id = row.id || this.ids
-                getHechang(id).then(response => {
-                    this.form = response.data;
-                    this.open = true;
-                    this.title = "修改河长牌";
-                });
-            },
-            /** 提交按钮 */
-            submitForm() {
-                this.$refs["form"].validate(valid => {
-                    if (valid) {
-                        if (this.form.id != null) {
-                            updateHechang(this.form).then(response => {
-                                this.$modal.msgSuccess("修改成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        } else {
-                            addHechang(this.form).then(response => {
-                                this.$modal.msgSuccess("新增成功");
-                                this.open = false;
-                                this.getList();
-                            });
-                        }
-                    }
-                });
-            },
-            /** 删除按钮操作 */
-            handleDelete(row) {
-                const ids = row.id || this.ids;
-                this.$modal.confirm('是否确认删除所选数据项?').then(function () {
-                    return delHechang(ids);
-                }).then(() => {
-                    this.getList();
-                    this.$modal.msgSuccess("删除成功");
-                }).catch(() => {
-                });
-            },
-            /** 导出按钮操作 */
-            handleExport() {
-                this.download('sooka-sponest-center-data/hechang/export', {
-                    ...this.queryParams
-                }, `河长牌_${new Date().getTime()}.xlsx`)
-            }
+  },
+  methods: {
+    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")
+    },
+    showMap() {
+      this.ISuperMapvisible = true;
+      this.$nextTick(() => {
+        this.$refs.ISuperMap.init(this.sign, {
+          id: this.form.id,
+          longitude: this.form.longitude,
+          latitude: this.form.latitude,
+          xiantude: this.form.longitude//this.form.longitude换成每个页面对应线或者面对应的字段
+        })
+      })
+    },
+    send(val) {
+      if (val === true) {
+        this.ISuperMapvisible = false;
+        return;
+      }
+      if (this.sign === 1) {
+        this.form.longitude = val.longitude;
+        this.form.latitude = val.latitude;
+      }
+      if (this.sign === 2 || this.sign === 3) this.form.longitude = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+      this.ISuperMapvisible = false
+    },
+    getUrl(url) {
+      this.form.dialogImageUrl = url;
+      this.form.attachId = url;
+    },
+    setDataDeptId(e) {
+      this.form.deptId = e.deptId
+      this.form.deptName = e.deptName
+    },
+    /** 查询河长牌列表 */
+    getList() {
+      this.loading = true;
+      listHechang(this.queryParams).then(response => {
+        this.hechangList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+      this.queryParams.type = 2
+      listAll(this.queryParams).then(response => {
+        this.lengthList = response.data
+
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        number: null,
+        longitude: null,
+        latitude: null,
+        hechangId: null,
+        address: null,
+        introduction: null,
+        attachId: null,
+        deptId: null,
+        deptName: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        dataStatus: "0"
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    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)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加河长牌";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getHechang(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改河长牌";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateHechang(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addHechang(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
         }
-    };
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除所选数据项?').then(function () {
+        return delHechang(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('sooka-sponest-center-data/hechang/export', {
+        ...this.queryParams
+      }, `河长牌_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
 </script>

+ 98 - 14
data-ui/src/views/data/digitalwater/length/index.vue

@@ -1,6 +1,35 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-row :gutter="20">
+    <el-col :span="4" :xs="24">
+      <div class="head-container">
+        <el-input
+          v-model="deptName"
+          placeholder="请输入部门名称"
+          clearable
+          size="small"
+          prefix-icon="el-icon-search"
+          style="margin-bottom: 20px"
+        >
+          <el-button slot="append" @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</el-button>
+          <el-button slot="append" @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</el-button>
+        </el-input>
+      </div>
+      <div class="head-container tree-scrollbar" style="height: 700px;overflow-y:auto;">
+        <el-tree
+          :data="deptOptions"
+          :props="defaultProps"
+          :expand-on-click-node="false"
+          :filter-node-method="filterNode"
+          ref="tree"
+          node-key="id"
+          :default-expanded-keys="[100]"
+          @node-click="handleNodeClick"
+        />
+      </div>
+    </el-col>
+    <el-col :span="20" :xs="24">
+    <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"
@@ -10,6 +39,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>
@@ -132,7 +170,8 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-
+    </el-col>
+    </el-row>
     <!-- 添加或修改河长名录对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="800px" class="form-style">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -179,6 +218,9 @@
               <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
                           placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"/>
             </el-form-item>
+            <el-form-item label="排序" prop="sort">
+              <el-input-number  v-model="form.sort" placeholder="请输入排序"  :min="1" :max="99999"></el-input-number>
+            </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="性别" prop="sex">
@@ -202,7 +244,9 @@
             <el-form-item label="行政职务" prop="adminiStrativeLinJob">
               <el-input v-model="form.adminiStrativeLinJob" placeholder="请输入行政职务" maxlength="50"/>
             </el-form-item>
+
           </el-col>
+
         </el-row>
         <el-col :span="24">
           <el-form-item label="责任区" prop="introduction">
@@ -230,11 +274,11 @@
 </template>
 
 <script>
-import {addLength, delLength, getLength, listLength, updateLength} from "@/api/data/digitalwater/length";
+import {addLength, delLength, getLength, listLength, updateLength,} from "@/api/data/digitalwater/length";
 import {selectUserList} from "@/api/data/digitalforest/linleader/linleader";
 import {gridlistAll} from "@/api/data/digitalresources/grid";
 import Deptselector from '@/views/components/deptselector';
-import {checkPositiveDecimal, validPhoneMobile} from "@/api/rules/rules";
+import { checkNonnegativeInteger, checkPositiveDecimal, validPhoneMobile } from '@/api/rules/rules'
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {treeselect} from "@/api/system/dept";
@@ -245,6 +289,13 @@ export default {
   dicts: ['centerdata_hydroenergy_plan_rank', 'traffic_lu_job', 'farm_tian_job', 'sys_user_sex', 'forest_lin_level'],
   data() {
     return {
+
+      defaultProps: {
+        children: 'children',
+        label: 'label'
+      },
+      // 部门名称
+      deptName: undefined,
       // 遮罩层
       loading: true,
       deptOptions: undefined,
@@ -277,7 +328,7 @@ export default {
         introduction: null,
         riverwayLengthCounty: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName: null,
         updateName: null,
         dataStatus: null
@@ -313,6 +364,10 @@ export default {
         phone: [
           {required: true, message: '联系电话不能为空', trigger: 'change'},
           {validator: validPhoneMobile, trigger: 'blur'}
+        ],
+        sort: [
+          {required: false, },
+          {validator: checkNonnegativeInteger, trigger: 'blur'}
         ]
       },
       userList: [],
@@ -334,7 +389,27 @@ export default {
       this.gridList = response;
     });
   },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val)
+    }
+  },
   methods: {
+
+// 筛选节点
+    filterNode(value, data) {
+      if (!value) return true
+      return data.label.indexOf(value) !== -1
+    },
+    // 节点单击事件
+    handleNodeClick(data) {
+      this.queryParams.deptId = data.id;
+      this.queryParams.pageNum = 1;
+      this.getList();
+
+    },
+
     getTreeselect() {
       treeselect().then(response => {
         this.deptOptions = response.data
@@ -379,6 +454,7 @@ export default {
     // 表单重置
     reset() {
       this.form = {
+        sort: 99,
         id: null,
         userId: null,
         name: null,
@@ -412,9 +488,15 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.deptName = undefined;
+      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)
@@ -423,6 +505,7 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
+
       this.reset();
       this.open = true;
       if (this.$route.query.type == 2) {
@@ -437,6 +520,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+
       this.reset();
       const id = row.id || this.ids
       getLength(id).then(response => {
@@ -477,8 +561,8 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       const type = this.$route.query.type;
-      this.$modal.confirm('是否确认删选中的数据项?').then(function () {
-        return delLength(ids,type);
+      this.$modal.confirm('是否确认删选中的数据项?').then(function() {
+        return delLength(ids, type);
       }).then(() => {
         this.getList();
         this.$modal.msgSuccess("删除成功");
@@ -487,14 +571,14 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
-      if (this.$route.query.type==2){
-        this.title="河长名录"
-      }else if(this.$route.query.type==3){
-        this.title="路长管理"
-      }else if (this.$route.query.type==6){
+      if (this.$route.query.type == 2) {
+        this.title = "河长名录"
+      } else if (this.$route.query.type == 3) {
+        this.title = "路长管理"
+      } else if (this.$route.query.type == 6) {
         this.title = "田长管理";
-      }else {
-        this.title="length"
+      } else {
+        this.title = "length"
       }
       this.download('sooka-sponest-center-data/length/export', {
         ...this.queryParams

+ 17 - 1
data-ui/src/views/data/digitalwater/outletsewage/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"
@@ -20,6 +20,15 @@
           />
         </el-select>
       </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,6 +296,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
+          deptId: null,
+          deptName: 0,
           name: null,
           sewageAttr: null,
         },
@@ -432,9 +443,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)

+ 16 - 2
data-ui/src/views/data/digitalwater/plan/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"
@@ -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>
@@ -218,7 +227,7 @@
           period: null,
           cycleFrequency: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           createName: null,
           updateName: null,
           dataStatus: null
@@ -313,6 +322,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -426,6 +436,10 @@
         this.download('center-data/water/plan/export', {
           ...this.queryParams
         }, `${this.title}_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 1
data-ui/src/views/data/digitalwater/reach/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"
@@ -28,6 +28,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>
@@ -302,6 +311,8 @@
           pageSize: 10,
           name: null,
           code: null,
+          deptId: null,
+          deptName: 0,
           riverLeader: null,
         },
         // 表单参数
@@ -479,9 +490,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)

+ 17 - 1
data-ui/src/views/data/digitalwater/reservoir/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"
@@ -28,6 +28,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>
@@ -290,6 +299,8 @@
           pageSize: 10,
           name: null,
           scale: null,
+          deptId: null,
+          deptName: 0,
           principal: null,
         },
         // 表单参数
@@ -438,6 +449,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -447,6 +459,10 @@
         this.single = selection.length !== 1
         this.multiple = !selection.length
       },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
+      },
       /** 新增按钮操作 */
       handleAdd() {
         this.reset();

+ 17 - 1
data-ui/src/views/data/digitalwater/river/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"
@@ -28,6 +28,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>
@@ -284,6 +293,8 @@
           pageSize: 10,
           name: null,
           riverSource: null,
+          deptId: null,
+          deptName: 0,
           estuary: null,
         },
         // 表单参数
@@ -434,9 +445,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)

+ 17 - 3
data-ui/src/views/data/digitalwater/task/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="planName">
         <el-input
           v-model="queryParams.planName"
@@ -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>
@@ -144,7 +153,7 @@
                       placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"/>
         </el-form-item>
         <el-form-item label="任务轨迹" prop="patrolTrajectory" @dblclick.native="showMapTwo">
-          <el-input v-model="form.patrolTrajectory" placeholder="鼠标双击选择任务轨迹" disabled maxlength="32"/>
+          <el-input v-model="form.patrolTrajectory" placeholder="鼠标双击选择任务轨迹" readonly maxlength="32"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -220,7 +229,7 @@
           taskName: null,
           status: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           createName: null,
           updateName: null,
           dataStatus: null
@@ -350,6 +359,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -469,6 +479,10 @@
         this.download('center-data/task/export', {
           ...this.queryParams
         }, `${this.title}_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 1 - 1
data-ui/src/views/data/digitalwater/track/index.vue

@@ -173,7 +173,7 @@
           <el-input v-model="form.type" placeholder="请选择类型"/>
         </el-form-item>-->
         <el-form-item label="任务轨迹" prop="patrolTrajectory" @dblclick.native="showMapTwo">
-          <el-input v-model="form.patrolTrajectory" placeholder="鼠标双击选择任务轨迹"  disabled maxlength="32"/>
+          <el-input v-model="form.patrolTrajectory" placeholder="鼠标双击选择任务轨迹"  readonly maxlength="32"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">

+ 17 - 1
data-ui/src/views/data/digitalwater/wadebridgeculvert/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"
@@ -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>
         <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>
@@ -259,6 +268,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
+          deptId: null,
+          deptName: 0,
           name: null,
           texture: null,
         },
@@ -401,9 +412,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)

+ 17 - 1
data-ui/src/views/data/digitalwater/watergate/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"
@@ -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>
@@ -266,6 +275,8 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        deptId: null,
+        deptName: 0,
         name: null,
       },
       // 表单参数
@@ -399,9 +410,14 @@ export default {
     },
     /** 重置按钮操作 */
     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)

+ 0 - 0
data-ui/src/views/data/digitalwater/waterproject/index.vue


Some files were not shown because too many files changed in this diff