zhouwx
2024-08-19 3cc4abeb92d11d7a8b365928c5aa9452679fe06c
责任人增加筛选条件
已修改2个文件
89 ■■■■ 文件已修改
src/views/Admin/contactBook/contactors.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Admin/sameLevel.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Admin/contactBook/contactors.vue
@@ -24,16 +24,18 @@
          </div>
        </div>
        <div style="margin: 20px 0;display: flex;justify-content: space-between">
          <div>
          <div style="display: flex;align-items: center">
            <a-button  type="primary" style="margin-right: 10px" @click="editData('add',{})">新增</a-button>
            <a-button  type="primary" @click="massImport()">批量导入</a-button>
          </div>
          <a-button type="primary" @click="openExport">批量导出</a-button>
<!--          <download-excel :data="json_data" :fields="json_fields" name="责任人导出.xlsx" >-->
<!--            <a-button type="primary">批量导出</a-button>-->
<!--          </download-excel>-->
        </div>
        <div style="display: flex;align-items: center;margin-bottom: 15px">
          <a-input v-model="search.searchParams.name" placeholder="请输入姓名" style="width: 250px;margin-right: 10px"></a-input>
          <a-input v-model="search.searchParams.phone" placeholder="请输入电话" style="width: 250px;margin-right: 10px"></a-input>
          <a-input v-model="search.searchParams.company" placeholder="请输入单位" style="width: 250px;margin-right: 10px"></a-input>
          <a-button  type="primary" style="margin-right: 10px" @click="getUserList()">查询</a-button>
          <a-button   @click="resetSearch()">重置</a-button>
        </div>
        <div class="table-cont">
@@ -96,6 +98,11 @@
      </a-form-model>
    </a-modal>
    <a-modal v-model="importDialog" title="导入失败列表" :footer="null" centered :afterClose="closeImportDialog">
      <span style="margin-bottom: 20px;font-size: 16px">{{errorMsg}}</span>
      <a-table :columns="errColumns" :data-source="errorData"  :rowKey="record=>record.id" bordered :pagination="false" :scroll="{y:'200px'}">
      </a-table>
    </a-modal>
  </div>
</template>
@@ -133,12 +140,14 @@
      unittype: null,
      districtId: null,
      currentKey: [],
      importDialog:false,
      search:{
        pageIndex: 1,
        pageSize: 10,
        searchParams: {
          name: '',
          phone: '',
          company: '',
          orgStructureId: null
        }
      },
@@ -208,6 +217,14 @@
        onChange: ( page, pageSize ) => this.onPageChange(page,pageSize),
        showTotal: total => `共 ${total} 条`
      },
      paginationErr: {
        current: 1,
        defaultCurrent: 1,
        defaultPageSize: 10,
        total: 0,
        onChange: ( page, pageSize ) => this.onPageChangeErr(page,pageSize),
        showTotal: total => `共 ${total} 条`
      },
      fieldNames:{
        label: 'name',
        value: 'id',
@@ -245,7 +262,21 @@
          }
        },
      },
      json_data: []
      json_data: [],
      errorData: [],
      errorMsg: '',
      errColumns:[
        {
          title: '姓名',
          dataIndex: 'name',
          key: 'name'
        },
        {
          title: '失败原因',
          dataIndex: 'errorMsg',
          key: 'errorMsg'
        },
      ],
    }
  },
  created() {
@@ -309,6 +340,11 @@
          this.uploadLoading = false
          this.visible = false
          await this.getUserList()
          if(res.data.data && res.data.data.length>0){
            this.errorMsg = res.data.msg
            this.errorData = res.data.data
            this.importDialog = true;
          }
        }else{
          this.$message.warning(res.data.msg);
          this.uploadLoading = false
@@ -322,6 +358,11 @@
      this.exportAreaId = null;
      this.json_data = [];
      this.exportDialog = false;
    },
    closeImportDialog(){
      this.errorMsg = '';
      this.errorData = [];
      this.importDialog = false;
    },
    async getStructure(){
      const t = this
@@ -392,6 +433,7 @@
        searchParams: {
          name: '',
          phone: '',
          company: '',
          orgStructureId: null
        }
      }
@@ -423,6 +465,12 @@
      t.search = {
        pageIndex: 1,
        pageSize: 10,
        searchParams: {
          name: '',
          phone: '',
          company: '',
          orgStructureId: t.search.searchParams.orgStructureId
        }
      }
      t.getUserList()
    },
src/views/Admin/sameLevel.vue
@@ -1,20 +1,26 @@
<template>
  <div class="inner">
    <a-row type="flex" justify="space-between" style="margin-bottom: 20px">
      <a-col :span="4" v-if="unittype && unittype !== null">
      <a-col :span="4" v-if="unittype && unittype !== null" style="margin-bottom: 10px">
        <a-button type="primary" @click="editData('add',{})">新增用户</a-button>
      </a-col>
      <a-col :span="20">
        <a-row type="flex" :gutter="14">
          <a-col :span="6">
      <a-col :span="24">
        <a-row type="flex" :gutter="24">
          <a-col :span="4">
            <a-select v-model="search.searchParams.peerRecipientGroupId" placeholder="选择分组" style="width: 100%" @change="handleChange" allowClear show-search :filter-option="filterOption">
              <a-select-option v-for="item in groupData" :value="item.id" :key="item.id">{{item.name}}</a-select-option>
            </a-select>
          </a-col>
          <a-col :span="6">
          <a-col :span="3">
            <a-input v-model="search.searchParams.company" placeholder="单位名称" style="width: 100%"/>
          </a-col>
          <a-col :span="6" v-if="unittype == null || !unittype">
          <a-col :span="3">
            <a-input v-model="search.searchParams.name" placeholder="姓名" style="width: 100%"/>
          </a-col>
          <a-col :span="3">
            <a-input v-model="search.searchParams.phone" placeholder="电话" style="width: 100%"/>
          </a-col>
          <a-col :span="4" v-if="unittype == null || !unittype">
            <a-cascader :options="areaData" v-model="areaVal" placeholder="所属区域" expandTrigger="hover" :fieldNames="fieldNames" changeOnSelect @change="onChange" style="width: 100%"/>
          </a-col>
          <a-col :span="6">
@@ -74,6 +80,8 @@
          city: '',
          area: '',
          town: '',
          name: '',
          phone: '',
          peerRecipientGroupId: undefined
        }
      },
@@ -148,8 +156,9 @@
  methods:{
    async getUserList(){
      const t = this
      if(t.search.searchParams.province == '' && t.search.searchParams.city == '' && t.search.searchParams.area == '' && t.search.searchParams.company == '' && t.search.searchParams.peerRecipientGroupId == undefined){
      if(t.search.searchParams.phone == '' && t.search.searchParams.recipientName == '' && t.search.searchParams.province == '' && t.search.searchParams.city == '' && t.search.searchParams.area == '' && t.search.searchParams.company == '' && t.search.searchParams.peerRecipientGroupId == undefined){
        const {searchParams,...data} = t.search
        console.log(data,'data')
        const res = await getRecipient(data)
        if(res.data.code == 100){
          t.tableData = res.data.data
@@ -206,6 +215,8 @@
          city: '',
          area: '',
          town: '',
          name: '',
          phone: '',
          peerRecipientGroupId: undefined
        }
      }
@@ -305,6 +316,8 @@
        city: '',
        area: '',
        town: '',
        name: '',
        phone: '',
        peerRecipientGroupId: undefined
      }
      if(value[0]){