|
|
|
|
@ -19,12 +19,19 @@
|
|
|
|
|
<div class="selector-item__label">建卡医院:</div>
|
|
|
|
|
<Input clearable v-model="select.hospital" style="width: 200px;" placeholder="建卡医院搜索" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-checkbox v-model="select.is_phone">存在手机号</el-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<Button type="primary" @click="getMembers">查询</Button>
|
|
|
|
|
<Button type="primary" @click="doSearch">查询</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<Button type="primary" @click="$refs['addMember'].isShow = true,$refs['addMember'].type = 'add'">新增会员</Button>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
@click="$refs['addMember'].isShow = true,$refs['addMember'].type = 'add'">新增会员</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<Button type="primary" @click="exportExel">导出</Button>
|
|
|
|
|
@ -34,19 +41,29 @@
|
|
|
|
|
</lx-header>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<xy-table :total="total" @pageSizeChange="pageSizeChange" @pageIndexChange="pageChange" :list="list" :table-item="table" @editor="editorShow" @delete="deleteMember"></xy-table>
|
|
|
|
|
<xy-table :total="total" @pageSizeChange="pageSizeChange" @pageIndexChange="pageChange" :list="list"
|
|
|
|
|
:table-item="table" @editor="editorShow" @delete="deleteMember"></xy-table>
|
|
|
|
|
|
|
|
|
|
<addMember ref="addMember" @refresh="getMembers"></addMember>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {index,destroy} from '@/api/member'
|
|
|
|
|
import {parseTime} from "@/utils"
|
|
|
|
|
import {download} from '@/utils/downloadRequest'
|
|
|
|
|
import {
|
|
|
|
|
index,
|
|
|
|
|
destroy
|
|
|
|
|
} from '@/api/member'
|
|
|
|
|
import {
|
|
|
|
|
parseTime
|
|
|
|
|
} from "@/utils"
|
|
|
|
|
import {
|
|
|
|
|
download
|
|
|
|
|
} from '@/utils/downloadRequest'
|
|
|
|
|
|
|
|
|
|
import addMember from './component/addMember'
|
|
|
|
|
import { Message } from 'element-ui'
|
|
|
|
|
import {
|
|
|
|
|
Message
|
|
|
|
|
} from 'element-ui'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addMember
|
|
|
|
|
@ -58,14 +75,14 @@ export default {
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
keywords: "",
|
|
|
|
|
area: "",
|
|
|
|
|
hospital:""
|
|
|
|
|
hospital: "",
|
|
|
|
|
is_phone: true
|
|
|
|
|
},
|
|
|
|
|
areas: ["吴中区", "吴江区", "姑苏区", "工业园区", "高新区", "相城区", "昆山", "常熟", "张家港", "太仓"],
|
|
|
|
|
|
|
|
|
|
total: 0,
|
|
|
|
|
list: [],
|
|
|
|
|
table:[
|
|
|
|
|
{
|
|
|
|
|
table: [{
|
|
|
|
|
prop: 'name',
|
|
|
|
|
label: '姓名',
|
|
|
|
|
width: 180,
|
|
|
|
|
@ -103,7 +120,11 @@ export default {
|
|
|
|
|
label: '推广人员',
|
|
|
|
|
width: 140,
|
|
|
|
|
customFn: (row) => {
|
|
|
|
|
return (<Tag color={row.promotion == 1 ? 'success' : 'error'}>{row.promotion == 1 ? '是' : '否'}</Tag>)
|
|
|
|
|
return ( < Tag color = {
|
|
|
|
|
row.promotion == 1 ? 'success' : 'error'
|
|
|
|
|
} > {
|
|
|
|
|
row.promotion == 1 ? '是' : '否'
|
|
|
|
|
} < /Tag>)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
@ -138,7 +159,8 @@ export default {
|
|
|
|
|
page: this.select.pageIndex,
|
|
|
|
|
keyword: this.select.keywords,
|
|
|
|
|
hospital: this.select.hospital,
|
|
|
|
|
area:this.select.area
|
|
|
|
|
area: this.select.area,
|
|
|
|
|
is_phone: this.select.is_phone ? 1 : ""
|
|
|
|
|
})
|
|
|
|
|
this.total = res.total
|
|
|
|
|
this.list = res.data
|
|
|
|
|
@ -162,7 +184,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
exportExel() {
|
|
|
|
|
download('/api/admin/member/index','get',{is_export:1},'用户列表.xlsx')
|
|
|
|
|
download('/api/admin/member/index', 'get', {
|
|
|
|
|
is_export: 1,
|
|
|
|
|
keyword: this.select.keywords,
|
|
|
|
|
hospital: this.select.hospital,
|
|
|
|
|
area: this.select.area,
|
|
|
|
|
is_phone: this.select.is_phone ? 1 : ""
|
|
|
|
|
}, '用户列表.xlsx')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
@ -178,6 +206,7 @@ export default {
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
align-items: center;
|
|
|
|
|
align-content: center;
|
|
|
|
|
|
|
|
|
|
&-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|