yahyahy 3 gadi atpakaļ
vecāks
revīzija
3c88bfb3ea

+ 53 - 0
src/api/core/gridInfo.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询网格信息列表
+export function listGridInfo(query) {
+  return request({
+    url: '/boman-web-core/gridInfo/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 网格
+export function listRoleergthwg(data) {
+  return request({
+    url: '/boman-web-core/gridInfo/treeSelect',
+    method: 'post',
+    data: data
+  })
+}
+
+// 查询网格信息详细
+export function getGridInfo(id) {
+  return request({
+    url: '/boman-web-core/gridInfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增网格信息
+export function addGridInfo(data) {
+  return request({
+    url: '/boman-web-core/gridInfo',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改网格信息
+export function updateGridInfo(data) {
+  return request({
+    url: '/boman-web-core/gridInfo',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除网格信息
+export function delGridInfo(id) {
+  return request({
+    url: '/boman-web-core/gridInfo/' + id,
+    method: 'delete'
+  })
+}

+ 3 - 1
src/api/index.js

@@ -29,10 +29,12 @@ export function listDevice(query) {
   })
 }
 
+
+
 // 折线图
 export function listzhex(query) {
   return request({
-    url: '/sts/twycrs/zrs',
+    url: '/boman-web-core/index/hjczLine',
     method: 'get',
     params: query
   })

+ 9 - 0
src/api/system/claim.js

@@ -90,6 +90,15 @@ export function exportInfo(query) {
 //   })
 // }
 
+
+// 网格
+export function listRoleergthwg(data) {
+  return request({
+    url: '/boman-web-core/gridInfo/treeSelect',
+    method: 'post',
+    data: data
+  })
+}
 // 查询身份证信息
 export function idces(query) {
   return request({

+ 10 - 0
src/api/system/residentss.js

@@ -77,6 +77,16 @@ export function listRoleergth(data) {
 }
 
 
+// 网格
+export function listRoleergthwg(data) {
+  return request({
+    url: '/boman-web-core/gridInfo/treeSelect',
+    method: 'post',
+    data: data
+  })
+}
+
+
 // 户籍地址搜索
 export function listRoleerseavh(data) {
   return request({

+ 9 - 0
src/api/system/user.js

@@ -10,6 +10,15 @@ export function listUser(query) {
   })
 }
 
+// 网格
+export function listRoleergthwg(data) {
+  return request({
+    url: '/boman-web-core/gridInfo/treeSelect',
+    method: 'post',
+    data: data
+  })
+}
+
 // 查询用户详细
 export function getUser(id) {
   return request({

+ 337 - 0
src/views/core/gridInfo/index.vue

@@ -0,0 +1,337 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="名称" prop="areaName">
+        <el-input
+          v-model="queryParams.areaName"
+          placeholder="请输入名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="排序" prop="sort">
+        <el-input
+          v-model="queryParams.sort"
+          placeholder="请输入排序"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="是否删除" prop="isDel">
+        <el-input
+          v-model="queryParams.isDel"
+          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>
+      </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="['core:gridInfo: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="['core:gridInfo: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="['core:gridInfo: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="['core:gridInfo:export']"
+        >导出</el-button>
+      </el-col> -->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="gridInfoList" @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="areaName" />
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="区域/网格" align="center" prop="type">
+         <template slot-scope="scope">
+           <span>{{scope.row.type == 0 ? '区域' : '网格'}}</span>
+         </template>
+      </el-table-column>
+      <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="['core:gridInfo:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['core:gridInfo: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="600px" append-to-body>
+
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <el-form-item label="网格或区域" prop="type">
+         <el-select @change="nhueoswe" v-model="form.type" placeholder="选择是网格或是区域" clearable style="width: 100%;">
+         	<el-option v-for="dict in typeOptionstyzandeh" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
+         </el-select>
+        </el-form-item>
+        <el-form-item label="父类网格" prop="pid" v-if="shoue">
+         <el-select v-model="form.pid" placeholder="选择父类网格" clearable style="width: 100%;">
+         	<el-option v-for="dict in typeOptionstyzandehfl" :key="dict.dictValue" :label="dict.areaName" :value="dict.id" />
+         </el-select>
+        </el-form-item>
+        <el-form-item label="名称" prop="areaName">
+          <el-input v-model="form.areaName" placeholder="请输入名称" />
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <el-input v-model="form.sort" placeholder="请输入排序" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listGridInfo, getGridInfo, delGridInfo, addGridInfo, updateGridInfo,listRoleergthwg } from "@/api/core/gridInfo";
+
+export default {
+  name: "GridInfo",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 网格信息表格数据
+      gridInfoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        areaName: null,
+        gridName: null,
+        sort: null,
+        type: null,
+        isDel: null
+      },
+      typeOptionstyzandehfl:[],
+      typeOptionstyzandeh:[
+        {
+          dictValue: 0,
+				  dictLabel: '区域',
+          },
+          {
+            dictValue: 1,
+            dictLabel: '网格',
+            }
+          ],
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        areaName: [
+          { required: true, message: "区域名称不能为空", trigger: "blur" }
+        ],
+        sort: [
+          { required: true, message: "排序不能为空", trigger: "blur" }
+        ],
+        type: [
+          { required: true, message: "网格或区域不能为空", trigger: "blur" }
+        ]
+      },
+      shoue:false
+    };
+  },
+  created() {
+    this.getList();
+    this.mnyesfjeropwg(0)
+  },
+  methods: {
+    /** 查询网格信息列表 */
+    getList() {
+      this.loading = true;
+      listGridInfo(this.queryParams).then(response => {
+        this.gridInfoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    mnyesfjeropwg(index){
+      this.loading = true;
+      let pids = {}
+      pids.pid= index
+      listRoleergthwg(pids).then(response => {
+      	this.typeOptionstyzandehfl = response.data;
+      	this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        areaName: null,
+        gridName: null,
+        sort: null,
+        type: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        isDel: 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
+      getGridInfo(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) {
+            updateGridInfo(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addGridInfo(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.confirm('是否确认删除网格信息编号为"' + ids + '"的数据项?').then(function() {
+        return delGridInfo(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('core/gridInfo/export', {
+        ...this.queryParams
+      }, `gridInfo_${new Date().getTime()}.xlsx`)
+    },
+    nhueoswe(data){
+       console.log(data)
+       if(data == 0){
+         //区域
+         this.shoue = false
+       }else{
+         //网格
+         this.shoue = true
+       }
+    }
+  }
+};
+</script>

+ 49 - 12
src/views/dashboard/LineChart.vue

@@ -62,15 +62,11 @@ export default {
       this.setOptions(this.chartData)
 
     },
-    setOptions({ x, y } = {}) {
+    setOptions({ czjs, czxz,hjjs,hjxz,time } = {}) {
       // console.log(x,y[0].data,45)
-      const datayc = y[0].data
-      const datazrs = y[1].data
-      const nameyc = y[0].name
-      const namezrs = y[1].name
       this.chart.setOption({
         xAxis: {
-          data: x,
+          data: time,
           boundaryGap: false,
           axisTick: {
             show: false
@@ -96,10 +92,10 @@ export default {
           }
         },
         legend: {
-          data: [nameyc, namezrs]
+          data: ''
         },
         series: [{
-          name: nameyc, itemStyle: {
+          name: '常住人口减少', itemStyle: {
             normal: {
               color: '#FF005A',
               lineStyle: {
@@ -110,12 +106,12 @@ export default {
           },
           smooth: true,
           type: 'line',
-          data: datayc,
+          data: czjs,
           animationDuration: 2800,
           animationEasing: 'cubicInOut'
         },
         {
-          name: namezrs,
+          name: '常住人口增加',
           smooth: true,
           type: 'line',
           itemStyle: {
@@ -130,10 +126,51 @@ export default {
               }
             }
           },
-          data:datazrs,
+          data:czxz,
           animationDuration: 2800,
           animationEasing: 'quadraticOut'
-        }]
+        },
+        {
+          name: '户籍人口增加',
+          smooth: true,
+          type: 'line',
+          itemStyle: {
+            normal: {
+              color: '#47d737',
+              lineStyle: {
+                color: '#47d737',
+                width: 2
+              },
+              areaStyle: {
+                color: '#f3f8ff'
+              }
+            }
+          },
+          data:hjxz,
+          animationDuration: 2800,
+          animationEasing: 'quadraticOut'
+        },
+        {
+          name: '户籍人口减少',
+          smooth: true,
+          type: 'line',
+          itemStyle: {
+            normal: {
+              color: '#fe4809',
+              lineStyle: {
+                color: '#fe4809',
+                width: 2
+              },
+              areaStyle: {
+                color: '#f3f8ff'
+              }
+            }
+          },
+          data:hjjs,
+          animationDuration: 2800,
+          animationEasing: 'quadraticOut'
+        },
+        ]
       })
     }
   }

+ 5 - 2
src/views/index.vue

@@ -97,7 +97,7 @@
     <!-- <panel-group @handleSetLineChartData="handleSetLineChartData" /> -->
 
     <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
-      <line-chart :chart-data="lineChartData" /></el-row>
+      <line-chart :chart-data="lineChartData"  v-if="nhye"/></el-row>
 
     <!-- <el-row :gutter="32">
       <el-col :xs="24" :sm="24" :lg="8">
@@ -178,7 +178,8 @@ export default {
       // 遮罩层
       loading: false,
       deviceIpOptions:{},
-      panelChartDatazhuzh:{}
+      panelChartDatazhuzh:{},
+      nhye:false
     };
   },
   mounted(){
@@ -246,6 +247,7 @@ export default {
      listDevice().then(response => {
        this.tableData = response.data;
        // this.panelChartDatas = this.deviceIpOptions
+       
      });
    },
    // 户籍列表
@@ -259,6 +261,7 @@ export default {
    zhexianList(){
      listzhex().then(response => {
        this.lineChartData = response.data;
+       this.nhye = true
        // this.panelChartDatas = this.deviceIpOptions
      });
    },

+ 165 - 51
src/views/system/claim/index.vue

@@ -6,17 +6,17 @@
 					<el-row>
 						<el-col :span="8">
 							<el-form-item label="身份证号" prop="idCard">
-								<el-input v-model="queryParams.idCard" placeholder="请输入身份证号码" style="width:280px;" clearable @keyup.enter.native="handleQuery" />
+								<el-input v-model="queryParams.idCard" placeholder="请输入身份证号码" style="width:265px;" clearable @keyup.enter.native="handleQuery" />
 							</el-form-item>
 						</el-col>
 		        <el-col :span="8">
 		        	<el-form-item label="姓名" prop="userName">
-		        		<el-input v-model="queryParams.userName" placeholder="请输入姓名" style="width:280px;" clearable @keyup.enter.native="handleQuery" />
+		        		<el-input v-model="queryParams.userName" placeholder="请输入姓名" style="width:265px;" clearable @keyup.enter.native="handleQuery" />
 		        	</el-form-item>
 		        </el-col>
 						<el-col :span="8">
 							<el-form-item label="联系号码" prop="phoneNum">
-								<el-input v-model="queryParams.phoneNum" placeholder="请输入联系号码" style="width:280px;"clearable @keyup.enter.native="handleQuery" />
+								<el-input v-model="queryParams.phoneNum" placeholder="请输入联系号码" style="width:265px;"clearable @keyup.enter.native="handleQuery" />
 							</el-form-item>
 						</el-col>
 
@@ -26,7 +26,7 @@
 					<el-row>
 		        <el-col :span="8">
 		        	<el-form-item label="年龄阶段" >
-		        		<el-select v-model="queryParams.params.age" placeholder="年龄阶段" style="width:280px;" clearable>
+		        		<el-select v-model="queryParams.params.age" placeholder="年龄阶段" style="width:265px;" clearable>
 		        			<el-option v-for="dict in angesList" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
 		        		</el-select>
 		        	</el-form-item>
@@ -55,7 +55,7 @@
 				<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" >认领</el-button>
 			</el-col>
 			<el-col :span="1.5">
-				<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" >删除</el-button>
+				<el-button type="danger" plain icon="el-icon-edit" size="mini" :disabled="multiple" @click="handleDelete" >变更</el-button>
 			</el-col>
       <el-col :span="1.5">
       	<el-button type="primary" plain icon="el-icon-view" size="mini"  @click="chajnd" >查看常住人口信息</el-button>
@@ -67,18 +67,18 @@
 			<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 		</el-row>
 
-		<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" stripe style="width: 100%" :height="tableMaxHeight">
+		<el-table v-if="nbdgywkajs == true" v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" stripe style="width: 100%" :height="tableMaxHeight">
 			<el-table-column type="selection" width="55" align="center" />
 			<el-table-column label="姓名" align="center" prop="userName" fixed width="100"/>
 			<el-table-column label="联系方式" align="center" prop="phoneNum" width="110" />
 			<el-table-column label="身份证号码" align="center" prop="idCard" width="180" />
-			<el-table-column label="户籍地址" align="center" prop="domicileSelect" width="250" />
-			<el-table-column label="居住地址" align="center" prop="nowInSelect"  />
+			<el-table-column label="户籍地址" align="center" prop="domicileSelect"  />
+			<!-- <el-table-column label="居住地址" align="center" prop="nowInSelect"  /> -->
 
 			<el-table-column label="操作" align="left" class-name="small-padding fixed-width" fixed="right"  width="160px">
 				<template slot-scope="scope">
 					<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" >查看认领</el-button>
-		      <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" class="hueya" >删除</el-button>
+		      <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDelete(scope.row)" class="hueya" >变更</el-button>
 
 				</template>
 			</el-table-column>
@@ -91,7 +91,7 @@
 			<el-form ref="form" :model="form" :rules="rules" label-width="100px">
 				<el-row>
 					<el-col :span="8" v-if="shouwef">
-						<el-form-item label="身份证号" prop="idCard"><el-input v-model="form.idCard" placeholder="请输入身份证号码" @blur="idcde" /></el-form-item>
+						<el-form-item label="身份证号" prop="idCard"><el-input v-model="form.idCard" placeholder="请输入身份证号码" @blur="idcde"  /></el-form-item>
 					</el-col>
 					<el-col :span="8" v-if="shouwef">
 						<el-form-item label="姓名" prop="userName"><el-input v-model="form.userName" placeholder="请输入姓名" /></el-form-item>
@@ -165,10 +165,11 @@
           	</el-row>
           </el-col>
 
-					<el-col :span="24" v-for="(item, index) in form.czrkJzdzList" :key="index">
+					<el-col :span="24" v-for="(item, index) in form.czrkJzdzList" :key="index" v-show="senlsduea == false || index !== 0">
             <el-col :span="12">
             	<el-form-item label="居住地址" prop="province">
                 <el-cascader
+
                 	:placeholder="item.plaed"
                 	:options="item.optiodne"
                 	:filterable="true"
@@ -178,11 +179,10 @@
                 	style="width: 100%;"
                 	:ref="'myCascaderf' + '' + index"
                   v-model="item.seleted"
-                  :key="cascaderKey"
                   @active-item-change="handleItemChange"
                   :class="[item.plaed == '请选择居住地址' ? '' : 'placf']"
                 ></el-cascader>
-                 <!-- @active-item-change="handleItemChange" -->
+                 <!-- @active-item-change="handleItemChange" v-if = 'nhdyesku' -->
             	</el-form-item>
               <!-- :key="cascaderKey"  seleted -->
 
@@ -202,7 +202,7 @@
             </el-col>
           </el-col>
 
-					<el-col :span="24" v-if="shouwef">
+					<el-col :span="24" >
 						<el-col :span="12">
 							<el-form-item label="户主" prop="houseType">
 								<el-select v-model="form.houseType" placeholder="户主" clearable style="width: 100%;"  @change="changese">
@@ -217,8 +217,8 @@
 							</el-form-item>
 						</el-col>
 					</el-col>
-          <el-col :span="24" v-if="shouwef">
-            <el-col :span="12">
+          <el-col :span="24" >
+            <el-col :span="12" >
                 <el-form-item label="与户主关系" prop="yhzgx">
                 	<el-select v-model="form.yhzgx" placeholder="与户主关系" clearable style="width: 100%;">
                 		<el-option v-for="dict in typeOptionstyzandeh" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel" />
@@ -226,10 +226,27 @@
                 </el-form-item>
             </el-col>
             <el-col :span="12">
-                <el-form-item label="备注" prop="remark">
-                	<el-input v-model="form.remark" type="input" placeholder="请输入户籍详细地址" />
-                </el-form-item>
+            	<el-form-item label="网格" prop="houseTyper">
+            		<el-cascader
+            			:placeholder="ndhesdweaf"
+            			:options="optionsListwg"
+            			filterable
+            			@change="chahetwoswge"
+            			:props="optionPropsssdwg"
+            			style="width: 100%;"
+            			@keyup.enter.native="handleQuery"
+                  :key="nhduesw"
+            		  ref = "cddfr"
+            		  @active-item-change="handleItemChangefrwg"
+                  :class="[ndhesdweaf == '点击选择网格' ? '' : 'placf']"
+            		></el-cascader>
+            	</el-form-item>
             </el-col>
+          </el-col>
+          <el-col :span="24">
+              <el-form-item label="备注" prop="remark">
+              	<el-input v-model="form.remark" type="input" placeholder="请输入户籍详细地址" />
+              </el-form-item>
           </el-col>
 				</el-row>
 			</el-form>
@@ -240,10 +257,10 @@
 		</el-dialog>
 
 		<!-- 图片预览 -->
-		<el-dialog :close-on-click-modal="false" title="删除原因" :visible.sync="imashow" width="800px" append-to-body >
+		<el-dialog :close-on-click-modal="false" title="变更原因" :visible.sync="imashow" width="800px" append-to-body >
       <el-form ref="formgt" :model="formgt" :rules="ruleshy" label-width="100px" style="padding-bottom: 30px;">
-      <el-form-item label="删除原因:" prop="houseType">
-      	<el-select v-model="formgt.houseType" placeholder="请选择删除原因" clearable style="width: 100%;">
+      <el-form-item label="变更:" prop="houseType">
+      	<el-select v-model="formgt.houseType" placeholder="请选择变更原因" clearable style="width: 100%;">
       		<el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
       	</el-select>
       </el-form-item>
@@ -276,7 +293,7 @@
 
 <script>
 import {listRoleergth } from '@/api/system/residentss';
-import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe,exportConfig,exportConfigtyr,importLog,delInfohy } from '@/api/system/claim';
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe,exportConfig,exportConfigtyr,importLog,delInfohy,listRoleergthwg } from '@/api/system/claim';
 import { treeselect } from '@/api/system/dept';
 import Treeselect from '@riophae/vue-treeselect';
 import { getToken } from '@/utils/auth';
@@ -304,7 +321,8 @@ export default {
 			dialogImageUrl: '',
 			// 弹出层标题
 			title: '',
-      totalfr:0,
+      totalfr:0,
+      ndhesdweaf:'点击选择网格',
 			// 是否显示弹出层
 			opens: false,
 			process: process.env.VUE_APP_BASE_API,
@@ -326,7 +344,8 @@ export default {
 				phoneNum: null,
 				keyIndustries: null,
 				isVaccination: null,
-				vaccineName: null,
+				vaccineName: null,
+        ndhesdweaf :'点击选择网格',
 				vaccinationTime: null,
 				vaccinationPlace: null,
 				contraindication: null,
@@ -337,7 +356,9 @@ export default {
 			config: [],
 			comfietg:[],
 			configther:[],
-			configfor:[],
+			configfor:[],
+      senlsduea:false,
+      nhduesw:0,
 			// 表单参数
 			form: {
 				nowIn: '',
@@ -360,7 +381,8 @@ export default {
             seleted:[],
             plaed:'请选择居住地址',
             optiodne:[],
-						disableg:false
+						disableg:false,
+            nbdgywkajs:false
 					}
 				]
 			},
@@ -442,6 +464,11 @@ export default {
       	value: 'areaId',
       	label: 'name',
       	checkStrictly: true,
+      },
+      optionPropsssdwg:{
+        value: 'id',
+        label: 'areaName',
+        checkStrictly: true,
       },
 			optionPropstwo: {
 				value: 'id',
@@ -499,7 +526,8 @@ export default {
 			hsuej: '',
 			jdourdjoaj: false,
 			jiezhong: false,
-			jiezheList: [],
+			jiezheList: [],
+      optionsListwg:[],
 			fireLise:{config:[]},
 			nameutaiL:0,
 			jue:false,
@@ -535,6 +563,7 @@ export default {
     this.mnyesfjer(0)
     this.mnyesfjers(0)
     this.mnyesfjerop(0)
+    this.mnyesfjeropwg(0)
     // this.getTreeselectjuetj()
 		// 重点行业
 		this.getDicts('person_type').then(response => {
@@ -671,6 +700,16 @@ export default {
         console.log(this.cascaderKey,8765)
       });
     },
+
+    mnyesfjeropwg(index){
+      this.loading = true;
+      let pids = {}
+      pids.pid= index
+      listRoleergthwg(pids).then(response => {
+      	this.optionsListwg = this.handleDatawg(response.data);
+      	this.loading = false;
+      });
+    },
     mnyesfjerty(index,val){
       this.loading = true;
       let pids = {}
@@ -1010,9 +1049,10 @@ export default {
 
          	handleData(data, val, level) {
             console.log(data,val,level,7536)
+            var that = this
    	        for (let i = 0; i < data.length; i++) {
    	          if(!data[i].children) {
-   	            this.$set(data[i], 'children', []);
+   	            that.$set(data[i], 'children', []);
    	          }
    	          if(data[i].areaId === val){
                 let vfer = {}
@@ -1020,25 +1060,73 @@ export default {
    	            listRoleergth(vfer).then(res => {
                   // this.cascaderKey = this.cascaderKey + 1
    	              if(res.data.length) {
-                    console.log(data[i].children,4567)
+                    console.log(i,4567)
    	                // data[i].children = res.data;
-                    this.$set(data[i], 'children', res.data)
-                    console.log(data[i].children,45678)
-                     this.nhdyesku = true
+                    that.$set(data[i], 'children', res.data)
+
+                     // this.nhdyesku = true
    	                data[i].children.forEach(ele => {
-   	                  this.$set(ele, 'children', [])
+   	                  that.$set(ele, 'children', [])
    	                });
+                    // console.log(data[i].children,45678)
    	              }else {
+
    	                data[i].children = undefined;
+
+
    	              }
+
    	            }).catch(err => {
    	            });
    	          }else {
    	            if(data[i].children.length){
-   	              this.handleData(data[i].children,val,level)
+   	              that.handleData(data[i].children,val,level)
    	            }
    	          }
    	        }
+              // console.log(data,666666)
+             return data;
+         },
+
+         handleItemChangefrwg(val) {
+           console.log(val,235)
+            let code = val ? val[val.length - 1] : '';  //需请求数据的上级地址的code值
+            let level = val.length + 1;  //需请求第几级地址
+            this.optionsListwg = this.handleDatawg(this.optionsListwg, code, level);
+            // this.cascaderKey = this.cascaderKey + 1
+         	},
+
+         handleDatawg(data, val, level) {
+            console.log(data,val,level,7536)
+            for (let i = 0; i < data.length; i++) {
+              if(!data[i].children) {
+                this.$set(data[i], 'children', []);
+              }
+              if(data[i].id === val){
+                let vfer = {}
+                vfer.pid = val
+                listRoleergthwg(vfer).then(res => {
+                  // this.cascaderKey = this.cascaderKey + 1
+                  if(res.data.length) {
+                    console.log(data[i].children,4567)
+                    // data[i].children = res.data;
+                    this.$set(data[i], 'children', res.data)
+                    console.log(data[i].children,45678)
+                     this.nhdyesku = true
+                    data[i].children.forEach(ele => {
+                      this.$set(ele, 'children', [])
+                    });
+                  }else {
+                    data[i].children = undefined;
+                  }
+                }).catch(err => {
+                });
+              }else {
+                if(data[i].children.length){
+                  this.handleDatawg(data[i].children,val,level)
+                }
+              }
+            }
 
              return data;
          },
@@ -1055,7 +1143,8 @@ export default {
 		getList() {
 			this.loading = true;
 			listInfo(this.queryParams).then(response => {
-				this.infoList = response.rows;
+				this.infoList = response.rows;
+        this.nbdgywkajs = true
 				this.total = response.total;
 				this.loading = false;
 			});
@@ -1183,7 +1272,7 @@ export default {
 		      this.form.region = response.data.region;
 		      this.form.regionId = response.data.regionId;
 		    }
-		
+
 		    if(response.data.villageTowns == null){
 		      this.form.villageTowns = null;
 		      this.form.villageTownsId = null;
@@ -1191,7 +1280,7 @@ export default {
 		      this.form.villageTowns = response.data.villageTowns;
 		      this.form.villageTownsId = response.data.villageTownsId;
 		    }
-		
+
 		    if(response.data.village == null){
 		      this.form.village = null;
 		      this.form.villageId = null;
@@ -1199,7 +1288,7 @@ export default {
 		      this.form.village = response.data.village;
 		      this.form.villageId = response.data.villageId;
 		    }
-		
+
 		    if(response.data.villagerGroupId == null){
 		      this.form.villagerGroup = null;
 		      this.form.villagerGroupId = null;
@@ -1207,7 +1296,7 @@ export default {
 		      this.form.villagerGroup = response.data.villagerGroup;
 		      this.form.villagerGroupId = response.data.villagerGroupId;
 		    }
-		
+
 		    if(response.data.province !== null && response.data.province !== ""){
 		    	this.nhdyesfgh = response.data.province;
 		      if(response.data.city !== null && response.data.city !== ""){
@@ -1229,9 +1318,9 @@ export default {
 		    }else{
 		    	this.nhdyesfgh ='点击选择户籍地址'
 		    }
-		
-		
-		
+
+
+
 		    if( response.data.czrkJzdzList !== null && response.data.czrkJzdzList.length !== 0  ){
 		    	// this.selected[0] = response.data.province;
 		      // for(var i = 0 ; i < response.data.czrkJzdzList.length ; i++){
@@ -1259,10 +1348,12 @@ export default {
 		        }else{
 		          route.plaed = '请选择居住地址'
 		        }
-		
+
 		      })
+
+          this.form.czrkJzdzList   = response.data.czrkJzdzList
 		    }
-		    this.form.czrkJzdzList   = response.data.czrkJzdzList
+
 		    this.form.phoneNum   = response.data.phoneNum
 		    this.form.houseType   = response.data.houseType
 		    this.form.nowIn   = response.data.nowIn
@@ -1342,7 +1433,8 @@ export default {
 				isVaccination: null,
 				vaccinationPlace: null,
 				contraindication: null,
-				nowIn: '',
+				nowIn: '',
+        gridId:null,
 				remark: null,
         residenceTown:null,
         residenceVillage:null,
@@ -1414,7 +1506,8 @@ export default {
 			this.form.province = this.selected[0];
 			this.villageTownshy = '';
 			this.naiseurya = '';
-			this.hsuej = '';
+			this.hsuej = '';
+      this.senlsduea = false
 			this.form.city = this.selected[1];
 			this.form.region = this.selected[2];
 			this.title = '添加人员信息';
@@ -1422,7 +1515,11 @@ export default {
 			this.jue = true
       this.nhdyesfgh = '点击选择户籍地址'
       this.shouwef = true
+      this.nameutaiL = 0
+      this.nhduesw = this.nhduesw +1
+      // this.nameutaiL = 0
       this.mnyesfjer(0)
+       this.ndhesdweaf = '点击选择网格'
       // this.form.province = '安徽省';
       // this.form.city = '安庆市';
       // this.form.region = '潜山市';
@@ -1438,7 +1535,8 @@ export default {
 			getInfo(id).then(response => {
 				this.form = response.data;
 				this.jue = false
-        this.nhdyesku = true
+        this.nhdyesku = true
+        this.senlsduea = true
 				if(response.data.province !== null && response.data.province !== ""){
 					this.nhdyesfgh = response.data.province;
           if(response.data.city !== null && response.data.city !== ""){
@@ -1462,6 +1560,7 @@ export default {
 				}
 
 				if(response.data.czrkJzdzList.length !== 0 && response.data.czrkJzdzList !== null){
+          response.data.czrkJzdzList.unshift(response.data.czrkJzdzList[0])
 					// this.selected[0] = response.data.province;
           // for(var i = 0 ; i < response.data.czrkJzdzList.length ; i++){
             // this.nameutaiL = i
@@ -1492,6 +1591,13 @@ export default {
           })
 				}
 
+        if(response.data.gridName !==null){
+          this.ndhesdweaf = response.data.gridName
+        }else{
+          this.ndhesdweaf = '点击选择网格'
+        }
+
+
 				// this.onSelected(this.selected)
 				setTimeout( ()=>{
 					this.jue = true
@@ -1659,7 +1765,10 @@ export default {
 				if (valid) {
 					if (this.form.id != null) {
 						// this.form.nowIn = this.naiseurya + this.form.nowIn;
-						// this.form.domicile = this.hsuej + this.form.domicile;
+						// this.form.domicile = this.hsuej + this.form.domicile;
+            this.form.czrkJzdzList = this.form.czrkJzdzList.splice(1)
+             this.senlsduea = false
+            console.log(this.form.czrkJzdzList)
 						updateInfo(this.form).then(response => {
 							this.msgSuccess('修改成功');
 							this.opens = false;
@@ -1692,7 +1801,7 @@ export default {
 		},
 		/** 删除按钮操作 */
 		handleDelete(row) {
-			const ids = row.id || this.ids;
+			const ids = row.id || this.ids[0];
       this.idfer = ids
       this.imashow = true;
 			// this.$confirm('是否确认删除疫苗信息编号为"' + ids + '"的数据项?', '警告', {
@@ -1867,7 +1976,12 @@ export default {
 			// );
 
 		},
-
+   chahetwoswge(data){
+     console.log(data)
+     this.form.gridId = data[data.length - 1]
+     console.log(this.form.gridId)
+
+   },
 		// 点击查看
 		chakei(row) {
 			console.log(row);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 447 - 326
src/views/system/resident/index.vue


+ 232 - 291
src/views/system/residentss/index.vue

@@ -2,7 +2,7 @@
 	<div class="app-container">
     <div style="margin-bottom: 20px;">
       <p style="font-size: 16px;line-height: 24px; color: #333; font-weight: 700;">当前单位:<span style="font-weight: 400; color: #009fe8; margin-right: 15px; ">{{dneyhsd.dqdw == null? '暂无数据' : dneyhsd.dqdw}}</span>
-镇:<span style="font-weight: 400; color: #009fe8; margin-right: 15px; ">{{dneyhsd.zhen == null? '暂无数据' : dneyhsd.zhen}}个</span>     村:<span style="font-weight: 400; color: #009fe8;margin-right: 15px;">{{dneyhsd.cun == null? '暂无数据' : dneyhsd.cun}}个</span>   组:<span style="font-weight: 400; color: #009fe8; margin-right: 15px;">{{dneyhsd.zu == null? '暂无数据' : dneyhsd.zu}}个</span>   常住人口:<span style="font-weight: 400; margin-right: 15px; color: #f66b0e;">{{dneyhsd.czrk == null? '暂无数据' : dneyhsd.czrk}}人</span>   <span @click="chakei(0)">新增:<span style="font-weight: 400; margin-right: 15px; color: #00b034;" >{{dneyhsd.xz == null? '暂无数据' : dneyhsd.xz}}人</span></span>  <span @click="chakei(1)">减少:<span style="font-weight: 400; margin-right: 15px; color: #fa2323;" >{{dneyhsd.js == null? '暂无数据' : dneyhsd.js}}人</span></span></p>
+镇:<span style="font-weight: 400; color: #009fe8; margin-right: 15px; ">{{dneyhsd.zhen == null? '暂无数据' : dneyhsd.zhen}}个</span>     村:<span style="font-weight: 400; color: #009fe8;margin-right: 15px;">{{dneyhsd.cun == null? '暂无数据' : dneyhsd.cun}}个</span>   组:<span style="font-weight: 400; color: #009fe8; margin-right: 15px;">{{dneyhsd.zu == null? '暂无数据' : dneyhsd.zu}}个</span>   常住人口:<span style="font-weight: 400; margin-right: 15px; color: #f66b0e;">{{dneyhsd.czzrs == null? '暂无数据' : dneyhsd.czzrs}}人</span>   <span @click="chakei(0)">新增:<span style="font-weight: 400; margin-right: 15px; color: #00b034;" >{{dneyhsd.czxz == null? '暂无数据' : dneyhsd.czxz}}人</span></span>  <span @click="chakei(1)">减少:<span style="font-weight: 400; margin-right: 15px; color: #fa2323;" >{{dneyhsd.czjs == null? '暂无数据' : dneyhsd.czjs}}人</span></span> 户籍人口:<span style="font-weight: 400; margin-right: 15px; color: #f66b0e;">{{dneyhsd.hjzrs == null? '暂无数据' : dneyhsd.hjzrs}}人</span>   <span @click="chakei(0)">新增:<span style="font-weight: 400; margin-right: 15px; color: #00b034;" >{{dneyhsd.hjxz == null? '暂无数据' : dneyhsd.hjxz}}人</span></span>  <span @click="chakei(1)">减少:<span style="font-weight: 400; margin-right: 15px; color: #fa2323;" >{{dneyhsd.hjjs == null? '暂无数据' : dneyhsd.hjjs}}人</span></span></p>
     </div>
 		<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="70px">
 			<el-row>
@@ -10,22 +10,22 @@
 					<el-row>
 						<el-col :span="6">
 							<el-form-item label="身份证号" prop="idCard">
-								<el-input v-model="queryParams.idCard" placeholder="请输入身份证号码" style="width:200px;" clearable @keyup.enter.native="handleQuery" />
+								<el-input v-model="queryParams.idCard" placeholder="请输入身份证号码" style="width:190px;" clearable @keyup.enter.native="handleQuery" />
 							</el-form-item>
 						</el-col>
             <el-col :span="6">
             	<el-form-item label="姓名" prop="userName">
-            		<el-input v-model="queryParams.userName" placeholder="请输入姓名" style="width:200px;" clearable @keyup.enter.native="handleQuery" />
+            		<el-input v-model="queryParams.userName" placeholder="请输入姓名" style="width:190px;" clearable @keyup.enter.native="handleQuery" />
             	</el-form-item>
             </el-col>
 						<el-col :span="6">
 							<el-form-item label="联系号码" prop="phoneNum">
-								<el-input v-model="queryParams.phoneNum" placeholder="请输入联系号码" style= "width:190px;"clearable @keyup.enter.native="handleQuery" />
+								<el-input v-model="queryParams.phoneNum" placeholder="请输入联系号码" style= "width:180px;"clearable @keyup.enter.native="handleQuery" />
 							</el-form-item>
 						</el-col>
             <el-col :span="6">
             	<el-form-item label="年龄阶段" >
-            		<el-select v-model="queryParams.params.age" placeholder="年龄阶段" style="width:190px;" clearable>
+            		<el-select v-model="queryParams.params.age" placeholder="年龄阶段" style="width:180px;" clearable>
             			<el-option v-for="dict in angesList" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
             		</el-select>
             	</el-form-item>
@@ -42,7 +42,7 @@
                 	filterable
                 	@change="chahetwos"
                 	:props="optionPropsssd"
-                	style="width: 140%;"
+                	style="width: 135%;"
                 	@keyup.enter.native="handleQuery"
                 	clearable
                   ref = "cdd"
@@ -91,7 +91,7 @@
 				<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" >修改</el-button>
 			</el-col>
 			<el-col :span="1.5">
-				<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" >删除</el-button>
+				<el-button type="danger" plain icon="el-icon-edit" size="mini" :disabled="multiple" @click="handleDelete" >变更</el-button>
 			</el-col>
       <el-col :span="1.5">
       	<el-button type="primary" plain icon="el-icon-view" size="mini"  @click="chajnd" >查看常住人口信息</el-button>
@@ -103,20 +103,21 @@
 			<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 		</el-row>
 
-		<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" stripe style="width: 100%" :height="tableMaxHeight">
+		<el-table v-if="nbdgywkajs == true" v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" stripe style="width: 100%" :height="tableMaxHeight">
 			<el-table-column type="selection" width="55" align="center" />
 			<el-table-column label="姓名" align="center" prop="userName"   width="110"/>
 			<el-table-column label="联系方式" align="center" prop="phoneNum" width="110" />
 			<el-table-column label="身份证号码" align="center" prop="idCard" width="180" />
-			<el-table-column label="户籍地址" align="center" prop="domicileSelect" width="250" />
+			<el-table-column label="户籍地址" align="center" prop="domicileSelect"  />
       <!-- nowInSelect -->
-			<el-table-column label="居住地址" align="center" prop="nowInSelect"  />
+			<!-- <el-table-column label="居住地址" align="center" prop="nowInSelect"/> -->
+
       <el-table-column label="是否户主" align="center" prop="houseType" width="90" />
       <el-table-column label="认领人" align="center" prop="rlr" width="90" />
 			<el-table-column label="操作" align="left" class-name="small-padding fixed-width" fixed="right"  width="120">
 				<template slot-scope="scope">
 					<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" >查看修改</el-button>
-					<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" class="hueya" >删除</el-button>
+					<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDelete(scope.row)" class="hueya" >变更</el-button>
           <el-button v-if="scope.row.houseType == '是'" size="mini" type="text" icon="el-icon-edit" @click="handleDeletefamide(scope.row)" class="hueya" >查看家庭成员</el-button>
 				</template>
 			</el-table-column>
@@ -172,8 +173,8 @@
           				<el-cascader
           					:placeholder="nhdyesfgh"
           					:options="optionsLists"
-          					:filterable="true"
           					separator="/"
+                    v-model="nhyeswdga"
           					@change="chahe"
           					:props="optionPropsss"
           					style="width: 100%;"
@@ -203,8 +204,9 @@
           	</el-row>
           </el-col>
 
-					<el-col :span="24" v-for="(item, index) in form.czrkJzdzList" :key="index">
-            <el-col :span="12">
+					<el-col :span="24" v-for="(item, index) in form.czrkJzdzList" :key="index"  v-show="senlsduea == false || index !== 0" >
+            <!-- v-show="senlsduea == false || index !== 0" -->
+            <el-col :span="12" >
             	<el-form-item label="居住地址" prop="province">
                 <el-cascader
                 	:placeholder="item.plaed"
@@ -217,9 +219,15 @@
                 	:ref="'myCascaderf' + '' + index"
                   v-model="item.seleted"
                   :key="cascaderKey"
+                  @expand-change="idjeus"
                   @active-item-change="handleItemChange"
                   :class="[item.plaed == '请选择居住地址' ? '' : 'placf']"
                 ></el-cascader>
+
+                <!-- v-if="jdourdjoaj == false && index == 0" -->
+
+                <!-- <treeselect v-model="item.seleted" :options="item.optiodne" :show-count="true" placeholder="请选择归属部门" :load-options="loadOptions" :normalizer="normalizer" /> -->
+                </el-form-item>
                  <!-- @active-item-change="handleItemChange" -->
             	</el-form-item>
               <!-- :key="cascaderKey"  seleted -->
@@ -264,19 +272,18 @@
                 </el-form-item>
             </el-col>
             <el-col :span="12">
-            	<el-form-item label="网格" prop="houseType">
+            	<el-form-item label="网格" prop="houseTyper">
             		<el-cascader
-            			placeholder="点击网格"
-            			:options="optionsList"
+            			:placeholder="ndhesdweaf"
+            			:options="optionsListwg"
             			filterable
-            			@change="chahetwos"
-            			:props="optionPropsssd"
-            			style="width: 140%;"
-            			@keyup.enter.native="handleQuery"
-            			clearable
-            		  ref = "cdd"
-            		  v-model="listd"
-            		  @active-item-change="handleItemChangefr"
+            			@change="chahetwoswge"
+            			:props="optionPropsssdwg"
+            			style="width: 100%;"
+            		  ref = "cddfr"
+                  :key="nhduesw"
+            		  @active-item-change="handleItemChangefrwg"
+                  :class="[ndhesdweaf == '点击选择网格' ? '' : 'placf']"
             		></el-cascader>
             	</el-form-item>
             </el-col>
@@ -295,10 +302,10 @@
 		</el-dialog>
 
 		<!-- 图片预览 -->
-		<el-dialog :close-on-click-modal="false" title="删除原因" :visible.sync="imashow" width="800px" append-to-body >
+		<el-dialog :close-on-click-modal="false" title="变更原因" :visible.sync="imashow" width="800px" append-to-body >
       <el-form ref="formgt" :model="formgt" :rules="ruleshy" label-width="100px" style="padding-bottom: 30px;">
-      <el-form-item label="删除原因:" prop="houseType">
-      	<el-select v-model="formgt.houseType" placeholder="请选择删除原因" clearable style="width: 100%;">
+      <el-form-item label="变更原因:" prop="houseType">
+      	<el-select v-model="formgt.houseType" placeholder="请选择变更原因" clearable style="width: 100%;">
       		<el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
       	</el-select>
       </el-form-item>
@@ -330,11 +337,12 @@
 </template>
 
 <script>
-import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe,exportConfig,exportConfigtyr,importLog,listInfotj,listRoleergth,listInfotjxz,listInfotjjs,listInfotjjsfaml } from '@/api/system/residentss';
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe,exportConfig,exportConfigtyr,importLog,listInfotj,listRoleergth,listInfotjxz,listInfotjjs,listInfotjjsfaml,listRoleergthwg } from '@/api/system/residentss';
 import { treeselect } from '@/api/system/dept';
 import Treeselect from '@riophae/vue-treeselect';
 import { getToken } from '@/utils/auth';
-import '@riophae/vue-treeselect/dist/vue-treeselect.css';
+import '@riophae/vue-treeselect/dist/vue-treeselect.css';
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 export default {
 	name: 'Info',
 	components: { Treeselect },
@@ -387,10 +395,13 @@ export default {
 					age:''
 				}
 			},
-			config: [],
+			config: [],
+      nhyeswdga:[],
 			comfietg:[],
 			configther:[],
-			configfor:[],
+			configfor:[],
+      optionsListwg:[],
+      nhduesw:0,
 			// 表单参数
 			form: {
 				nowIn: '',
@@ -414,7 +425,25 @@ export default {
             plaed:'请选择居住地址',
             optiodne:[],
 						disableg:false
-					}
+					},
+          {
+          	provinceId: '',
+          	province: '',
+          	deptId: '',
+          	cityId: '',
+          	city: '',
+          	regionId:'',
+            region: '',
+            townId: '',
+            town: '',
+            villageId: '',
+            village: '',
+            nowIn:'',
+            seleted:[],
+            plaed:'请选择居住地址',
+            optiodne:[],
+          	disableg:false
+          }
 				]
 			},
       // 用户导入参数
@@ -495,6 +524,11 @@ export default {
       	value: 'areaId',
       	label: 'name',
       	checkStrictly: true,
+      },
+      optionPropsssdwg:{
+        value: 'id',
+        label: 'areaName',
+        checkStrictly: true,
       },
 			optionPropstwo: {
 				value: 'id',
@@ -550,7 +584,8 @@ export default {
 			villageTownshy: undefined,
 			naiseurya: '',
 			hsuej: '',
-			jdourdjoaj: false,
+			jdourdjoaj: false,
+      senlsduea:false,
 			jiezhong: false,
 			jiezheList: [],
 			fireLise:{config:[]},
@@ -565,6 +600,7 @@ export default {
       list: [],
       listd:[],
       lser:[],
+      ndhesdweaf :'点击选择网格',
       dneyhsd:{},
       nhdyesfgh:'点击选择户籍地址',
       nhe:false,
@@ -578,7 +614,8 @@ export default {
       optionsLists:[],
       nhyeojd:false,
       ndhyuewkg:[],
-      nhdyesku:false
+      nhdyesku:false,
+      nbdgywkajs:false
 		};
 	},
 	created() {
@@ -587,6 +624,7 @@ export default {
     this.mnyesfjer(0)
     this.mnyesfjers(0)
     this.mnyesfjerop(0)
+    this.mnyesfjeropwg(0)
     this.getTreeselectjuetj()
 		// 重点行业
 		this.getDicts('person_type').then(response => {
@@ -629,9 +667,67 @@ export default {
                   this.changeTableMaxHeight()
 	},
 	methods: {
+
+    // 筛选节点
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.name.indexOf(value) !== -1;
+    },
     nhyeosdsef(){
      console.log(234)
-    },
+    },
+    /** 转换菜单数据结构 */
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.areaId,
+        label: node.name,
+        children: node.children
+      };
+    },
+    /** 初始化下拉框数据 **/
+        getRootModels() {
+           //初始化数据 只加载根节点
+           listRoleergth('0').then(response => {
+             // for(let index of response.data){
+             //   let modeInfo = {} ;
+             //   modeInfo.id = index.id
+             //   modeInfo.label = index.name;
+             //   modeInfo.children = null;
+             //   this.rootOptions.push(modeInfo);
+             // }
+             for(var i = 0 ; i < this.form.czrkJzdzList.length ; i++){
+               // this.nameutaiL = i
+               // this.mnyesfjerty(0)
+               this.form.czrkJzdzList[i].optiodne.push(response.data)
+             }
+           });
+         },
+    /** 加载子节点数据 **/
+         loadOptions({ action, parentNode, callback }){
+           console.log(action,125)
+           if (action === "LOAD_CHILDREN_OPTIONS") {
+           	  //加载点击节点的 子节点
+              var ndhes = {}
+              ndhes.pid = parentNode.areaId
+              listRoleergth(ndhes).then(response => {
+                let arr = [];
+                arr = response.data
+                // for(let index of response.data){
+                //   let chiledModeInfo = {} ;
+                //   chiledModeInfo.id = index.id
+                //   chiledModeInfo.label = index.name;
+                //   chiledModeInfo.children = null;
+                //   arr.push(chiledModeInfo);
+                // }
+                parentNode.children = arr;
+              });
+              callback();
+            }
+         },
+
 		onSelected(data,val) {
 			console.log(data, 125);
       if(this.opens == false){
@@ -730,14 +826,12 @@ export default {
       listRoleergth(pids).then(response => {
         // this.cascaderKey = this.cascaderKey + 1
         if(response.data.length == 0){
-          return
-        }
-        if(val !== undefined){
-          this.nameutaiL = val
+          return false
         }
         for(var i = 0 ; i < this.form.czrkJzdzList.length ; i++){
           // this.nameutaiL = i
           // this.mnyesfjerty(0)
+          console.log(i,7528)
           this.form.czrkJzdzList[i].optiodne = this.handleData(response.data);
         }
 
@@ -746,6 +840,7 @@ export default {
         console.log(this.cascaderKey,8765)
       });
     },
+
     mnyesfjerop(index){
       this.loading = true;
       let pids = {}
@@ -755,6 +850,16 @@ export default {
       	this.loading = false;
       });
     },
+
+    mnyesfjeropwg(index){
+      this.loading = true;
+      let pids = {}
+      pids.pid= index
+      listRoleergthwg(pids).then(response => {
+      	this.optionsListwg = this.handleDatawg(response.data);
+      	this.loading = false;
+      });
+    },
     mnyesfjers(index){
       this.loading = true;
       let pids = {}
@@ -769,224 +874,10 @@ export default {
         console.log(this.cascaderKey,8765)
       });
     },
-
-
-
-
-    // // 模拟请求一级节点
-    //      getfristChild() {
-    //       return [
-    //         {
-    //           label: "第一个",
-    //           hasChdild: true,
-    //           leaf: false,
-    //           pid: null,
-    //           value: "1",
-    //         },
-    //         {
-    //           label: "第2个",
-    //           hasChdild: true,
-    //           leaf: false,
-
-    //           pid: null,
-    //           value: "2",
-    //         },
-    //         {
-    //           label: "第3个",
-    //           hasChdild: true,
-    //           leaf: true,
-
-    //           pid: null,
-    //           value: "3",
-    //         },
-    //       ];
-    //     },
-    //     // 模拟请求子级节点
-    //      getOther(value) {
-    //       let res = [];
-    //       if (value == 1) {
-    //         res = [
-    //           {
-    //             label: "第一个1",
-    //             hasChdild: false,
-    //             pid: 1,
-    //             value: "11",
-    //             leaf: false, // 差别: 这里加了是否叶子节点属性,后面都加了
-    //           },
-    //           {
-    //             label: "第一个2",
-    //             hasChdild: false,
-    //             pid: 1,
-    //             value: "12",
-    //             leaf: false,
-    //           },
-    //         ];
-    //       }
-    //       if (value == 2) {
-    //         res = [
-    //           {
-    //             label: "第2个1",
-    //             hasChdild: false,
-    //             pid: 2,
-    //             leaf: true,
-    //             value: "5",
-    //           },
-    //           {
-    //             label: "第2个2",
-    //             hasChdild: false,
-    //             leaf: true,
-
-    //             pid: 2,
-    //             value: "6",
-    //           },
-    //         ];
-    //       }
-    //       if (value == 11) {
-    //         res = [
-    //           {
-    //             label: "第3个1",
-    //             hasChdild: false,
-    //             pid: 2,
-    //             leaf: true,
-
-    //             value: "111",
-    //           },
-    //           {
-    //             label: "第3个2",
-    //             hasChdild: false,
-    //             leaf: true,
-
-    //             pid: 2,
-    //             value: "112",
-    //           },
-    //         ];
-    //       }
-    //       return res;
-    //     },
-
-
-
-
-
-
-        // // 模拟请求一级节点
-        //      getfristChild() {
-        //       return [
-        //         {
-        //           label: "第一个",
-        //           hasChdild: true,
-        //           pid: null,
-        //           value: "1",
-        //         },
-        //         {
-        //           label: "第2个",
-        //           hasChdild: true,
-        //           pid: null,
-        //           value: "2",
-        //         },
-        //         {
-        //           label: "第3个",
-        //           hasChdild: true,
-        //           pid: null,
-        //           value: "3",
-        //         },
-        //       ];
-        //     },
-        //     // 模拟请求子级节点
-        //      getOther(value) {
-        //       let res = [];
-        //       if (value == 1) {
-        //         res = [
-        //           {
-        //             label: "第一个1",
-        //             hasChdild: false,
-        //             pid: 1,
-        //             value: "3",
-        //           },
-        //           {
-        //             label: "第一个2",
-        //             hasChdild: false,
-        //             pid: 1,
-        //             value: "4",
-        //           },
-        //         ];
-        //       }
-        //       if (value == 2) {
-        //         res = [
-        //           {
-        //             label: "第2个1",
-        //             hasChdild: false,
-        //             pid: 2,
-        //             value: "5",
-        //           },
-        //           {
-        //             label: "第2个2",
-        //             hasChdild: false,
-        //             pid: 2,
-        //             value: "6",
-        //           },
-        //         ];
-        //       }
-        //       return res;
-        //     },
-    // lazyLoads(node, resolve){
-    //   if (node.level == 0) {
-    //     console.log(node,2547);
-    //           if (this.list.length > 0) {
-    //             // 存在回显的id我们才去设置回显
-    //             let res =  this.format(); // 这里就是获取第一次要回显的内容了
-    //             console.log("00000", res);
-    //             this.optionsList = res; // 有回显第一次就直接给绑定的对象,不要resolve
-    //           } else {
-
-    //             let res =  this.getfristChild(); // 不存在就默认加载第一集节点
-    //             console.log(res,67)
-    //             resolve(res);
-    //           }
-    //         } else {
-    //           // 记录选择的,不然会点击字节点加载时丢失数据
-    //           let list = this.list;
-    //           // 有children属性了就不要再请求了,不然字节点会重复
-    //           if (!node.data.children) {
-    //             // 获取子节点数据
-    //             let res =  this.getOther(node.data.value);
-    //             setTimeout(() => {
-    //               // 模拟延时,实际不需要
-    //               resolve(res);
-    //             }, 100);
-    //           } else {
-    //             resolve([]);
-    //           }
-    //           // 重新把选择的id放回来-
-    //           // this.$nextTick(() => {
-    //           //   this.list = [...new Set([...this.list, ...list])]; //差别: 合并并且去重
-    //           // });
-    //           setTimeout(() => {
-    //             this.list = [...new Set([...this.list, ...list])]; //差别: 合并并且去重
-    //           }, 250);
-    //         }
-    // },
-
-    lazyLoads(node, resolve) {
-      console.log(node,34545678)
-          if (node.level == 0) {
-            let res =  this.mnyesfjer(0); // 不存在就默认加载第一集节点
-            resolve(res);
-          } else {
-            // 有children属性了就不要再请求了,不然字节点会重复
-            if (!node.data.children) {
-              // 获取子节点数据
-              let res =  this.mnyesfjer(node.data.areaId);
-              console.log(node.children)
-              let nfhh = node.children.push(res)
-              setTimeout(() => {
-                resolve(res);
-              }, 200);
-            } else {
-              resolve([]);
-            }
-          }
-        },
+   idjeus(data){
+    console.log(data,2347)
+    // this.cascaderKey = this.cascaderKey + 1
+   },
      format() {
           let res =  this.getfristChild(); // 拿一级数据
           this.list.forEach((item) => {
@@ -1030,18 +921,6 @@ export default {
             console.log(this.nameutaiL,2345)
             console.log(this.form.czrkJzdzList,12365)
             this.$set(this.form.czrkJzdzList[this.nameutaiL],'optiodne',this.handleData(this.form.czrkJzdzList[this.nameutaiL].optiodne, code, level))
-   	        // this.form.czrkJzdzList[this.nameutaiL].optiodne = this.handleData(this.form.czrkJzdzList[this.nameutaiL].optiodne, code, level);
-         	  // console.log(this.optionsList,23456)
-            // console.log(this.$refs.myCascaderf,2588)
-            // console.log(this.$refs['myCascaderf'][0].$refs.panel.clearCheckedNodes(),258)
-            // if(data !== 0){
-              // if(this.nhyeojd == true){
-              //   this.$refs['myCascaderf'][this.nameutaiL].$refs.panel.clearCheckedNodes()
-              // }
-            // }
-            // this.$refs['myCascaderf'][0].$refs.panel.clearCheckedNodes()
-            // console.log(this.$refs['myCascaderf'][this.nameutaiL].$refs.panel.checkedValue,345678)
-
           },
 
 
@@ -1076,7 +955,7 @@ export default {
    	                // data[i].children = res.data;
                     this.$set(data[i], 'children', res.data)
                     console.log(data[i].children,45678)
-                     this.nhdyesku = true
+                     // this.nhdyesku = true
    	                data[i].children.forEach(ele => {
    	                  this.$set(ele, 'children', [])
    	                });
@@ -1095,6 +974,47 @@ export default {
              return data;
          },
 
+         handleItemChangefrwg(val) {
+           console.log(val,235)
+            let code = val ? val[val.length - 1] : '';  //需请求数据的上级地址的code值
+            let level = val.length + 1;  //需请求第几级地址
+            this.optionsListwg = this.handleDatawg(this.optionsListwg, code, level);
+         	},
+         handleDatawg(data, val, level) {
+            console.log(data,val,level,7536)
+            for (let i = 0; i < data.length; i++) {
+              if(!data[i].children) {
+                this.$set(data[i], 'children', []);
+              }
+              if(data[i].id === val){
+                let vfer = {}
+                vfer.pid = val
+                listRoleergthwg(vfer).then(res => {
+                  // this.cascaderKey = this.cascaderKey + 1
+                  if(res.data.length) {
+                    console.log(data[i].children,4567)
+                    // data[i].children = res.data;
+                    this.$set(data[i], 'children', res.data)
+                    console.log(data[i].children,45678)
+                     this.nhdyesku = true
+                    data[i].children.forEach(ele => {
+                      this.$set(ele, 'children', [])
+                    });
+                  }else {
+                    data[i].children = undefined;
+                  }
+                }).catch(err => {
+                });
+              }else {
+                if(data[i].children.length){
+                  this.handleDatawg(data[i].children,val,level)
+                }
+              }
+            }
+
+             return data;
+         },
+
 		onSelectedtwo(data) {
 			console.log(data);
 			// province
@@ -1107,7 +1027,8 @@ export default {
 		getList() {
 			this.loading = true;
 			listInfo(this.queryParams).then(response => {
-				this.infoList = response.rows;
+				this.infoList = response.rows;
+        this.nbdgywkajs = true
 				this.total = response.total;
 				this.loading = false;
 			});
@@ -1133,16 +1054,6 @@ export default {
       });
     },
 
-		/** 转换角色数据结构 */
-		normalizer(node) {
-			// if (node.children && !node.children.length) {
-			//   delete node.children;
-			// }
-			return {
-				id: node.id,
-				label: node.roleName
-			};
-		},
 		// 点击组/角色
 		djieskle(node, instanceId) {
 			// this.personnel(node.id);
@@ -1293,6 +1204,7 @@ export default {
             this.mnyesfjerty(0)
           // }
           response.data.czrkJzdzList.filter(route =>{
+            route.seleted = []
             if(route.province !== ""){
               route.plaed =  route.province
               if(route.city !== ""){
@@ -1313,10 +1225,10 @@ export default {
             }else{
               route.plaed = '请选择居住地址'
             }
-
           })
+
+          this.form.czrkJzdzList   = response.data.czrkJzdzList
         }
-        this.form.czrkJzdzList   = response.data.czrkJzdzList
         this.form.phoneNum   = response.data.phoneNum
         this.form.houseType   = response.data.houseType
         this.form.nowIn   = response.data.nowIn
@@ -1331,7 +1243,7 @@ export default {
 			this.jiezhong = false;
 			this.imashow = false;
       this.errorlog=false;
-      this.$refs['myCascaderf' + '' + this.nameutaiL][0].$refs.panel.clearCheckedNodes()
+      this.form.czrkJzdzList = this.form.czrkJzdzList.splice(1)
 			this.reset();
 		},
 		gywoa() {
@@ -1398,7 +1310,8 @@ export default {
 				isVaccination: null,
 				vaccinationPlace: null,
 				contraindication: null,
-				nowIn: '',
+				nowIn: '',
+        gridId:null,
 				remark: null,
         residenceTown:null,
         residenceVillage:null,
@@ -1421,6 +1334,7 @@ export default {
             seleted:[],
             plaed:'请选择居住地址',
         	}
+
         ]
 			};
 			this.resetForm('form');
@@ -1474,9 +1388,14 @@ export default {
 			this.form.city = this.selected[1];
 			this.form.region = this.selected[2];
 			this.title = '添加信息';
-			this.jdourdjoaj = true;
+			this.jdourdjoaj = true;
+      this.senlsduea = false
 			this.jue = true
       this.nhdyesfgh = '点击选择户籍地址'
+       this.ndhesdweaf = '点击选择网格'
+       this.nameutaiL = 0
+       this.nhduesw = this.nhduesw + 1
+       this.nhyeswdga = []
       this.mnyesfjer(0)
       // this.form.province = '安徽省';
       // this.form.city = '安庆市';
@@ -1493,7 +1412,8 @@ export default {
 			getInfo(id).then(response => {
 				this.form = response.data;
 				this.jue = false
-        this.nhdyesku = true
+        this.nhdyesku = true
+        this.nhyeswdga = []
 				if(response.data.province !== null && response.data.province !== ""){
 					this.nhdyesfgh = response.data.province;
           if(response.data.city !== null && response.data.city !== ""){
@@ -1520,9 +1440,11 @@ export default {
 					// this.selected[0] = response.data.province;
           // for(var i = 0 ; i < response.data.czrkJzdzList.length ; i++){
             // this.nameutaiL = i
+            response.data.czrkJzdzList.unshift(response.data.czrkJzdzList[0])
             this.mnyesfjerty(0)
           // }
           response.data.czrkJzdzList.filter(route =>{
+            route.seleted = []
             if(route.province !== ""){
               route.plaed =  route.province
               if(route.city !== ""){
@@ -1547,6 +1469,13 @@ export default {
           })
 				}
 
+
+        if(response.data.gridName !==null){
+          this.ndhesdweaf = response.data.gridName
+        }else{
+          this.ndhesdweaf = '点击选择网格'
+        }
+
 				// this.onSelected(this.selected)
 				setTimeout( ()=>{
 					this.jue = true
@@ -1603,7 +1532,8 @@ export default {
 				this.naiseurya = '';
 				this.hsuej = '';
 				this.opens = true;
-				this.jdourdjoaj = false;
+				this.jdourdjoaj = false;
+        this.senlsduea = true
 				this.title = '查看编辑人口信息';
 			});
 		},
@@ -1705,6 +1635,14 @@ export default {
         this.queryParams.villageTownsIdXjd = undefined
         this.queryParams.villageIdXjd = data[ data.length - 1];
       }
+    },
+    chahetwoswge(data){
+      console.log(data)
+      if(this.opens == false){
+        return  false
+      }
+      this.form.gridId = data[data.length - 1]
+      console.log(this.form.gridId)
     },
 		/** 提交按钮 */
 		submitForm() {
@@ -1713,7 +1651,10 @@ export default {
 				if (valid) {
 					if (this.form.id != null) {
 						// this.form.nowIn = this.naiseurya + this.form.nowIn;
-						// this.form.domicile = this.hsuej + this.form.domicile;
+						// this.form.domicile = this.hsuej + this.form.domicile;
+             this.form.czrkJzdzList = this.form.czrkJzdzList.splice(1)
+             this.senlsduea = false
+            console.log(this.form.czrkJzdzList)
 						updateInfo(this.form).then(response => {
 							this.msgSuccess('修改成功');
 							this.opens = false;
@@ -1746,7 +1687,7 @@ export default {
 		},
 		/** 删除按钮操作 */
 		handleDelete(row) {
-			const ids = row.id || this.ids;
+			const ids = row.id || this.ids[0];
       this.idfer = ids
       this.imashow = true;
 			// this.$confirm('是否确认删除疫苗信息编号为"' + ids + '"的数据项?', '警告', {

+ 96 - 16
src/views/system/user/index.vue

@@ -300,15 +300,18 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="网格">
-              <el-select v-model="form.roleIds" multiple placeholder="请选择">
-                <el-option
-                  v-for="item in roleOptions"
-                  :key="item.id"
-                  :label="item.roleName"
-                  :value="item.id"
-                  :disabled="item.status == 1"
-                ></el-option>
-              </el-select>
+             <el-cascader
+             :placeholder="ndhesdweaf"
+             :options="optionsListwg"
+             filterable
+             @change="chahetwoswge"
+             :props="optionPropsssdwg"
+             style="width: 100%;"
+             ref = "cddfr"
+             :key="nhyes"
+             @active-item-change="handleItemChangefrwg"
+             :class="[ndhesdweaf == '点击选择网格' ? '' : 'placf']"
+             ></el-cascader>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -358,7 +361,7 @@
 </template>
 
 <script>
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus } from "@/api/system/user";
+import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus,listRoleergthwg } from "@/api/system/user";
 import { getToken } from "@/utils/auth";
 import { treeselect,treeselectdepts } from "@/api/system/dept";
 import Treeselect from "@riophae/vue-treeselect";
@@ -396,6 +399,7 @@ export default {
       initPassword: undefined,
       // 日期范围
       dateRange: [],
+      nhyes:0,
       // 状态数据字典
       statusOptions: [],
       // 性别状态字典
@@ -410,6 +414,7 @@ export default {
         children: "children",
         label: "label"
       },
+      ndhesdweaf :'点击选择网格',
       // 用户导入参数
       upload: {
         // 是否显示弹出层(用户导入)
@@ -425,6 +430,12 @@ export default {
         // 上传的地址
         url: process.env.VUE_APP_BASE_API + "/system/user/importData"
       },
+      optionsListwg:[],
+      optionPropsssdwg:{
+        value: 'id',
+        label: 'areaName',
+        checkStrictly: true,
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -481,6 +492,7 @@ export default {
   created() {
     this.getList();
     this.getTreeselect();
+    this.mnyesfjeropwg(0)
     this.getDicts("sys_normal_disable").then(response => {
       this.statusOptions = response.data;
     });
@@ -502,6 +514,16 @@ export default {
         }
       );
     },
+
+    mnyesfjeropwg(index){
+      this.loading = true;
+      let pids = {}
+      pids.pid= index
+      listRoleergthwg(pids).then(response => {
+      	this.optionsListwg = this.handleDatawg(response.data);
+      	this.loading = false;
+      });
+    },
     /** 查询部门下拉树结构 */
     getTreeselect() {
       treeselectdepts().then(response => {
@@ -529,7 +551,7 @@ export default {
 			   );
 			   // resolve();
 			 });
-		          
+
 		}
 		if (node.level >= 1) { // 点击之后触发
 		treeselect({id:node.key}).then(response => {
@@ -537,17 +559,17 @@ export default {
 		  return resolve(response.data);
 		  // resolve(response.data);
 		});
-		                    
+
 		                }
 		  //       if (node.level > 1) return resolve([]);
 				// if(node.level == 1){
-					
+
 				// }
 		// treeselect(node.id).then(response => {
 		//   // this.deptOptions = response.data;
 		//   resolve(response.data);
 		// });
-		 
+
 	},
     // 用户状态修改
     handleStatusChange(row) {
@@ -580,10 +602,13 @@ export default {
         phonenumber: undefined,
         email: undefined,
         sex: undefined,
+        gridId:null,
         status: "0",
+        gridId:null,
         remark: undefined,
         postIds: [],
-        roleIds: []
+        roleIds: [],
+        gridId:null
       };
       this.resetForm("form");
     },
@@ -614,7 +639,9 @@ export default {
         this.postOptions = response.posts;
         this.roleOptions = response.roles;
         this.open = true;
+        this.nhyes = this.nhyes + 1
         this.title = "添加用户";
+        this.ndhesdweaf = '点击选择网格'
         this.form.password = this.initPassword;
       });
     },
@@ -629,6 +656,11 @@ export default {
         this.roleOptions = response.roles;
         this.form.postIds = response.postIds;
         this.form.roleIds = response.roleIds;
+        if(response.data.gridName !==null){
+          this.ndhesdweaf = response.data.gridName
+        }else{
+          this.ndhesdweaf = '点击选择网格'
+        }
         this.open = true;
         this.title = "修改用户";
         this.form.password = "";
@@ -711,7 +743,55 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
-    }
+    },
+    chahetwoswge(data){
+      console.log(data)
+      this.form.gridId = data[data.length - 1]
+      console.log(this.form.gridId)
+
+    },
+    handleItemChangefrwg(val) {
+      console.log(val,235)
+       let code = val ? val[val.length - 1] : '';  //需请求数据的上级地址的code值
+       let level = val.length + 1;  //需请求第几级地址
+       this.optionsListwg = this.handleDatawg(this.optionsListwg, code, level);
+       this.cascaderKey = this.cascaderKey + 1
+    	},
+
+    handleDatawg(data, val, level) {
+       console.log(data,val,level,7536)
+       for (let i = 0; i < data.length; i++) {
+         if(!data[i].children) {
+           this.$set(data[i], 'children', []);
+         }
+         if(data[i].id === val){
+           let vfer = {}
+           vfer.pid = val
+           listRoleergthwg(vfer).then(res => {
+             // this.cascaderKey = this.cascaderKey + 1
+             if(res.data.length) {
+               console.log(data[i].children,4567)
+               // data[i].children = res.data;
+               this.$set(data[i], 'children', res.data)
+               console.log(data[i].children,45678)
+                this.nhdyesku = true
+               data[i].children.forEach(ele => {
+                 this.$set(ele, 'children', [])
+               });
+             }else {
+               data[i].children = undefined;
+             }
+           }).catch(err => {
+           });
+         }else {
+           if(data[i].children.length){
+             this.handleDatawg(data[i].children,val,level)
+           }
+         }
+       }
+
+        return data;
+    },
   }
 };
 </script>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels