Pārlūkot izejas kodu

消防人员可视化监控\消防力量管理\重点力量管理\压力传感器管理\基本联动力量管理\其他联动力量管理\泡沫液管理\专职站管理\消防人员管理

刘浩男 1 gadu atpakaļ
vecāks
revīzija
18265ae50f

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

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

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

@@ -63,8 +63,14 @@
             <if test="person3 != null  and person3 != ''">and person3 = #{person3}</if>
             <if test="person4 != null  and person4 != ''">and person4 = #{person4}</if>
             <if test="person5 != null  and person5 != ''">and person5 = #{person5}</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="introduction != null  and introduction != ''">and introduction = #{introduction}</if>
             <if test="mineralsStartTime != null  and mineralsStartTime != ''">and minerals_start_time = #{mineralsStartTime}</if>
             <if test="mineralsEndTime != null  and mineralsEndTime != ''">and minerals_end_time = #{mineralsEndTime}</if>

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

@@ -55,8 +55,14 @@
             <if test="personFour != null  and personFour != ''">and personFour = #{person_four}</if>
             <if test="phoneFive != null  and phoneFive != ''">and phoneFive = #{phone_five}</if>
             <if test="personFive != null  and personFive != ''">and personFive = #{person_five}</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="createName != null  and createName != ''">and create_name like concat('%', #{createName}, '%')
             </if>
             <if test="updateName != null  and updateName != ''">and update_name like concat('%', #{updateName}, '%')

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

@@ -62,8 +62,14 @@
             <if test="person3 != null  and person3 != ''">and person3 = #{person3}</if>
             <if test="person4 != null  and person4 != ''">and person4 = #{person4}</if>
             <if test="person5 != null  and person5 != ''">and person5 = #{person5}</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="createName != null  and createName != ''">and create_name like concat('%', #{createName}, '%')
             </if>
             <if test="updateName != null  and updateName != ''">and update_name like concat('%', #{updateName}, '%')

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

@@ -54,8 +54,14 @@
             <if test="createTime != null ">and create_time = #{createTime}</if>
             <if test="updateTime != null ">and update_time = #{updateTime}</if>
             <if test="remarks != null  and remarks != ''">and remarks = #{remarks}</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         ORDER BY a.land_calendar_years DESC,a.create_time DESC

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

@@ -46,8 +46,14 @@
             <if test="riverwayLengthCounty != null  and riverwayLengthCounty != ''">and riverway_length_county =
                 #{riverwayLengthCounty}
             </if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="createName != null  and createName != ''">and create_name like concat('%', #{createName}, '%')
             </if>
             <if test="updateName != null  and updateName != ''">and update_name like concat('%', #{updateName}, '%')