zhouwenxuan
2023-12-21 167f0e41147847aed50259811a40730b1d223f20
src/views/Admin/userManage.vue
@@ -10,7 +10,7 @@
            <a-cascader :options="areaData" v-model="areaVal" placeholder="行政规划" expandTrigger="hover" :fieldNames="fieldNames" changeOnSelect @change="onChange" style="width: 100%"/>
          </a-col>
          <a-col :span="4">
            <a-select v-model="search.searchParams.unittype" placeholder="监管层级" style="width: 100%">
            <a-select v-model="search.searchParams.unittype" placeholder="监管层级" style="width: 100%" clearable>
              <a-select-option :value="1">
                省级
              </a-select-option>
@@ -28,7 +28,7 @@
          <a-col :span="4">
            <a-input v-model="search.searchParams.realName" placeholder="姓名" style="width: 100%"/>
          </a-col>
          <a-col :span="4">
          <a-col :span="6">
            <a-button type="primary" @click="getUserList">查询</a-button>
            <a-button style="margin-left: 12px" @click="resetSearch">重置</a-button>
          </a-col>
@@ -148,6 +148,7 @@
        {
          title: '操作',
          key: 'action',
          width: '18%',
          scopedSlots: { customRender: 'action' },
        },
      ],
@@ -171,7 +172,6 @@
  created() {
    const t = this
    t.unittype = getUserInfo().unittype
    console.log(t.unittype,'unit')
    t.getUserList()
    t.getDistrictInfo()
  },
@@ -215,14 +215,15 @@
        cancelText: '取消',
        okText: '确认',
        centered: true,
        async onOk() {
          let res = await delUser(row.id)
          if(res.data.code == 100){
            t.$message.success('删除用户信息成功');
            t.getUserList()
          }else{
            t.$message.warning(res.data.msg);
          }
        onOk() {
          delUser(row.id).then(res=>{
            if(res.data.code == 100){
              t.$message.success('删除用户信息成功');
              t.getUserList()
            }else{
              t.$message.warning(res.data.msg);
            }
          })
        },
        onCancel() {
          console.log('Cancel');
@@ -267,7 +268,6 @@
    onChange(value) {
      const t = this
      t.search.searchParams.districtId = value[value.length - 1]
      console.log(value,'val')
    },
    findAreaById(data,value) {
      for (const node of data) {