| | |
| | | </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"> |
| | |
| | | |
| | | </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> |
| | | |
| | |
| | | unittype: null, |
| | | districtId: null, |
| | | currentKey: [], |
| | | importDialog:false, |
| | | search:{ |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | searchParams: { |
| | | name: '', |
| | | phone: '', |
| | | company: '', |
| | | orgStructureId: null |
| | | } |
| | | }, |
| | |
| | | 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', |
| | |
| | | } |
| | | }, |
| | | }, |
| | | json_data: [] |
| | | json_data: [], |
| | | errorData: [], |
| | | errorMsg: '', |
| | | errColumns:[ |
| | | { |
| | | title: '姓名', |
| | | dataIndex: 'name', |
| | | key: 'name' |
| | | }, |
| | | { |
| | | title: '失败原因', |
| | | dataIndex: 'errorMsg', |
| | | key: 'errorMsg' |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | 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 |
| | |
| | | this.exportAreaId = null; |
| | | this.json_data = []; |
| | | this.exportDialog = false; |
| | | }, |
| | | closeImportDialog(){ |
| | | this.errorMsg = ''; |
| | | this.errorData = []; |
| | | this.importDialog = false; |
| | | }, |
| | | async getStructure(){ |
| | | const t = this |
| | |
| | | searchParams: { |
| | | name: '', |
| | | phone: '', |
| | | company: '', |
| | | orgStructureId: null |
| | | } |
| | | } |
| | |
| | | t.search = { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | searchParams: { |
| | | name: '', |
| | | phone: '', |
| | | company: '', |
| | | orgStructureId: t.search.searchParams.orgStructureId |
| | | } |
| | | } |
| | | t.getUserList() |
| | | }, |
| | |
| | | <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"> |
| | |
| | | city: '', |
| | | area: '', |
| | | town: '', |
| | | name: '', |
| | | phone: '', |
| | | peerRecipientGroupId: undefined |
| | | } |
| | | }, |
| | |
| | | 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 |
| | |
| | | city: '', |
| | | area: '', |
| | | town: '', |
| | | name: '', |
| | | phone: '', |
| | | peerRecipientGroupId: undefined |
| | | } |
| | | } |
| | |
| | | city: '', |
| | | area: '', |
| | | town: '', |
| | | name: '', |
| | | phone: '', |
| | | peerRecipientGroupId: undefined |
| | | } |
| | | if(value[0]){ |