|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532 |
- <template>
- <div class="app-container">
- <div style="margin-bottom:10px">
- <el-button type="success" @click="addBtn">新增</el-button>
- <el-button type="success" @click="importBtn">导入</el-button>
- <el-button type="success" @click="exportTempBtn">模版下载</el-button>
- </div>
- <!--搜索-->
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="账号">
- <el-input v-model.trim="searchParm.account" clearable placeholder="账号"></el-input>
- </el-form-item>
- <el-form-item label="昵称">
- <el-input v-model.trim="searchParm.nickName" clearable></el-input>
- </el-form-item>
- <el-form-item label="密码">
- <el-input v-model.trim="searchParm.pwd" clearable></el-input>
- </el-form-item>
- <el-form-item label="公司">
- <el-select v-model.trim="searchParm.companyId" placeholder="请选择">
- <el-option v-for="item in companys" :key="item.name" :label="item.name" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="平台">
- <el-select v-model.trim="searchParm.platformId" placeholder="请选择">
- <el-option
- v-for="item in platformList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goSearch">搜索</el-button>
- <el-button type="warning" @click="resetForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table
- ref="table"
- border
- size="small"
- :data="list"
- :header-cell-style="{textAlign:'center'}"
- :cell-style="{textAlign:'center'}"
- >
- <el-table-column label="序号" type="index" width="50" />
- <el-table-column label="账号" prop="account" />
- <el-table-column label="昵称" prop="nickName" />
- <el-table-column label="密码" prop="pwd" />
- <el-table-column label="公司" prop="companyName" />
- <el-table-column label="平台" prop="platformName" />
- <el-table-column label="VPNIP" prop="ipAddress" />
- <el-table-column label="信用卡卡号" prop="number" />
- <el-table-column label="州" prop="state" />
- <el-table-column label="国家" prop="contntryShort" />
- <el-table-column label="地址1" prop="addressline1" />
- <el-table-column label="状态" prop="status">
- <template slot-scope="scope">{{ scope.row.status | getStatus}}</template>
- </el-table-column>
- <el-table-column label="创建时间" prop="createdAt" />
- <el-table-column label="修改时间" prop="updatedAt" />
- <el-table-column label="操作" width="220">
- <template slot-scope="scope">
- <el-button type="info" @click="getBtnById(scope.row.id)">查看</el-button>
- <el-button type="warning" @click="editById(scope.row)">修改</el-button>
- <span v-if="scope.row.status != 7" slot="footer">
- <el-button type="danger" @click="delById(scope.row.id)" style="margin-left: 10px">删除</el-button>
- </span>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="searchParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- ></el-pagination>
- </div>
-
- <!--新增弹窗-->
- <el-dialog :visible.sync="dialogAddVisible" :title="dialogAddTitle" center width="45%">
- <div class="dialog-content">
- <el-form ref="addParm" size="small" :model="addParm" :rules="rules" label-width="100px">
- <el-form-item label="账号" prop="account">
- <el-input v-model.trim="addParm.account" clearable></el-input>
- </el-form-item>
- <el-form-item label="昵称" prop="nickName">
- <el-input v-model.trim="addParm.nickName" clearable></el-input>
- </el-form-item>
- <el-form-item label="密码" prop="pwd">
- <el-input v-model.trim="addParm.pwd" clearable></el-input>
- </el-form-item>
- <el-form-item label="公司" prop="companyId">
- <el-select v-model.trim="addParm.companyId" placeholder="请选择">
- <el-option
- v-for="item in companys"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="平台" prop="platformId">
- <el-select v-model.trim="addParm.platformId" placeholder="请选择">
- <el-option
- v-for="item in platformList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!--国家-->
- <el-form-item label="所属国家" prop="contntryShort">
- <el-input v-model.trim="addParm.contntryShort" clearable></el-input>
- </el-form-item>
- <!--VPN vpnId -->
- <el-input v-model.trim="addParm.vpnId" type="hidden" clearable></el-input>
- <el-form-item label="VPN地址" prop="vpnIp">
- <el-input v-model.trim="addParm.vpnIp" style="width:230px"></el-input>
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchVpn"
- style="width:130px"
- >请选择VPN</el-button>
- </el-form-item>
- <!--信用卡ID cardId -->
- <el-input v-model.trim="addParm.cardId" type="hidden" clearable></el-input>
- <el-form-item label="信用卡号" prop="cardNumber">
- <el-input v-model.trim="addParm.cardNumber" style="width:230px"></el-input>
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchCard"
- style="width:130px"
- >请选择信用卡</el-button>
- </el-form-item>
- <!--用户等级 level -->
- <el-form-item label="用户等级" prop="level">
- <el-select v-model.trim="addParm.level" placeholder="请选择">
- <el-option
- v-for="item in levelList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!--占用状态 occupyStatus -->
- <el-form-item label="占用状态" prop="occupyStatus">
- <el-select v-model.trim="addParm.occupyStatus" placeholder="请选择">
- <el-option
- v-for="item in occupyStatusList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!--状态 status -->
- <el-form-item label="状态" prop="status">
- <el-select v-model.trim="addParm.status" placeholder="请选择">
- <el-option
- v-for="item in statusList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!-- ********地址相关信息******** -->
- <!--firstname-->
- <el-form-item label="firstname" prop="firstname">
- <el-input v-model.trim="addParm.firstname" clearable></el-input>
- </el-form-item>
- <!--lastname-->
- <el-form-item label="lastname" prop="lastname">
- <el-input v-model.trim="addParm.lastname" clearable></el-input>
- </el-form-item>
- <!--电话-->
- <el-form-item label="电话" prop="tel">
- <el-input v-model.trim="addParm.tel" clearable></el-input>
- </el-form-item>
- <!--国家-->
- <el-form-item label="国家" prop="country">
- <el-input v-model.trim="addParm.country" clearable></el-input>
- </el-form-item>
- <!--州-->
- <el-form-item label="州" prop="state">
- <el-input v-model.trim="addParm.state" clearable></el-input>
- </el-form-item>
- <!--城市-->
- <el-form-item label="城市" prop="city">
- <el-input v-model.trim="addParm.city" clearable></el-input>
- </el-form-item>
- <!--地址1-->
- <el-form-item label="地址1" prop="addressline1">
- <el-input v-model.trim="addParm.addressline1" clearable></el-input>
- </el-form-item>
- <!--地址2-->
- <el-form-item label="地址2" prop="addressline2">
- <el-input v-model.trim="addParm.addressline2" clearable></el-input>
- </el-form-item>
- <!--税号-->
- <el-form-item label="税号" prop="vatNumber">
- <el-input v-model.trim="addParm.vatNumber" clearable></el-input>
- </el-form-item>
- <!--邮政编码-->
- <el-form-item label="邮政编码" prop="postalcode">
- <el-input v-model.trim="addParm.postalcode" clearable></el-input>
- </el-form-item>
- </el-form>
- </div>
- <span slot="footer">
- <el-button type="info" @click="sureAddCancle('addParm')">取消</el-button>
- <el-button type="primary" @click="sureAdd('addParm')">确认</el-button>
- </span>
- </el-dialog>
-
- <!--VPN选择弹窗-->
- <el-dialog
- width="75%"
- :visible.sync="dialogVpnVisible"
- :title="dialogVpnTittle"
- center
- append-to-body
- >
- <!-- 搜索VPN -->
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="所属国家简称">
- <el-input v-model.trim="searchVpnParm.contntryShort" clearable placeholder="所属国家简称"></el-input>
- </el-form-item>
- <el-form-item label="IP地址">
- <el-input v-model.trim="searchVpnParm.ipAddress" clearable placeholder="IP地址"></el-input>
- </el-form-item>
- <el-form-item label="父ip地址">
- <el-input v-model.trim="searchVpnParm.parentIpAddress" clearable placeholder="父ip地址"></el-input>
- </el-form-item>
- <el-form-item label="端口">
- <el-input v-model.trim="searchVpnParm.port" clearable placeholder="端口"></el-input>
- </el-form-item>
- <el-form-item label="名称">
- <el-input v-model.trim="searchVpnParm.name" clearable placeholder="名称"></el-input>
- </el-form-item>
- <el-form-item label="密码">
- <el-input v-model.trim="searchVpnParm.pwd" clearable placeholder="密码"></el-input>
- </el-form-item>
- <el-form-item label="mac地址">
- <el-input v-model.trim="searchVpnParm.mac" clearable placeholder="mac地址"></el-input>
- </el-form-item>
- <el-form-item label="VPS类型">
- <el-select v-model.trim="searchVpnParm.vpsType" placeholder="请选择">
- <el-option
- v-for="item in searchVpsTypeList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="经销商">
- <el-select v-model.trim="searchVpnParm.dealer" placeholder="请选择">
- <el-option
- v-for="item in searchDealerList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="状态">
- <el-select v-model.trim="searchVpnParm.status" placeholder="请选择">
- <el-option
- v-for="item in searchStatusList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goSearchVpn">搜索</el-button>
- <el-button type="warning" @click="resetVpnForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table
- ref="table"
- border
- size="small"
- :data="vpnList"
- :header-cell-style="{textAlign:'center'}"
- :cell-style="{textAlign:'center'}"
- >
- <el-table-column label="序号" type="index" width="50" />
- <el-table-column label="所属国家简称" prop="contntryShort" />
- <el-table-column label="IP地址" prop="ipAddress" />
- <el-table-column label="父ip地址" prop="parentIpAddress" />
- <el-table-column label="端口" prop="port" />
- <el-table-column label="名称" prop="name" />
- <el-table-column label="密码" prop="pwd" />
- <el-table-column label="VPS类型" prop="vpsType">
- <template slot-scope="scope">{{ scope.row.vpsType | getVpnVpsType}}</template>
- </el-table-column>
- <el-table-column label="经销商" prop="dealer">
- <template slot-scope="scope">{{ scope.row.dealer | getVpnDealer}}</template>
- </el-table-column>
- <el-table-column label="mac地址" prop="mac" />
- <el-table-column label="状态" prop="status">
- <template slot-scope="scope">{{ scope.row.status | getVpnStatus}}</template>
- </el-table-column>
- <el-table-column label="创建时间" prop="createdAt" />
- <el-table-column label="修改时间" prop="updatedAt" />
- <el-table-column label="操作">
- <template slot-scope="scope">
- <el-button type="success" @click="getVpnIpById(scope.row)">选中</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="searchVpnParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchVpnParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="vpnTotal"
- ></el-pagination>
- </div>
- </el-dialog>
-
- <!--信用卡选择弹窗-->
- <el-dialog
- width="75%"
- :visible.sync="dialogCardVisible"
- :title="dialogCardTittle"
- center
- append-to-body
- >
- <!--搜索信用卡-->
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="卡号">
- <el-input v-model.trim="searchCardParm.number" clearable placeholder="账号"></el-input>
- </el-form-item>
- <el-form-item label="PIN">
- <el-input v-model.trim="searchCardParm.pinNumber" clearable></el-input>
- </el-form-item>
- <el-form-item label="持卡人名称">
- <el-input v-model.trim="searchCardParm.holderName" clearable></el-input>
- </el-form-item>
- <el-form-item label="类型">
- <el-select v-model.trim="searchCardParm.type" placeholder="请选择">
- <el-option
- v-for="item in typeCardList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="卡商">
- <el-select v-model.trim="searchCardParm.cardDealer" placeholder="请选择">
- <el-option
- v-for="item in dealerCardList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="状态">
- <el-select v-model.trim="searchCardParm.status" placeholder="请选择">
- <el-option
- v-for="item in statusCardList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goSearchCard">搜索</el-button>
- <el-button type="warning" @click="resetCardForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table
- ref="table"
- border
- size="small"
- :data="cardList"
- :header-cell-style="{textAlign:'center'}"
- >
- <el-table-column label="序号" type="index" width="50" align="center" />
- <el-table-column label="卡号" prop="number" align="center" />
- <el-table-column label="PIN码" prop="pinNumber" align="center" />
- <el-table-column label="持卡人姓氏" prop="holderSurname" align="center" />
- <el-table-column label="持卡人名称" prop="holderName" align="center" />
- <el-table-column label="所属厂商" prop="cardDealer" align="center">
- <template slot-scope="scope">{{ scope.row.cardDealer | getCardDealer}}</template>
- </el-table-column>
- <el-table-column label="类型" prop="type" align="center">
- <template slot-scope="scope">{{ scope.row.type | getCardType}}</template>
- </el-table-column>
- <el-table-column label="状态" prop="status" align="center">
- <template slot-scope="scope">{{ scope.row.status | getCardStatus}}</template>
- </el-table-column>
- <el-table-column label="创建时间" prop="createdAt" align="center" />
- <el-table-column label="修改时间" prop="updatedAt" align="center" />
- <el-table-column label="操作" align="center">
- <template slot-scope="scope">
- <el-button type="success" @click="getCardById(scope.row)" align="center">选中</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="searchCardParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchCardParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="cardTotal"
- ></el-pagination>
- </div>
- </el-dialog>
-
- <!--修改弹窗-->
- <el-dialog :visible.sync="dialogEditVisible" :title="dialogEditTitle" center width="45%">
- <div class="dialog-content">
- <el-form ref="editParm" size="small" :model="editParm" :rules="rules" label-width="100px">
- <el-form-item label="账号" prop="account">
- <el-input v-model.trim="editParm.account" clearable></el-input>
- </el-form-item>
- <el-form-item label="昵称" prop="nickName">
- <el-input v-model.trim="editParm.nickName" clearable></el-input>
- </el-form-item>
- <el-form-item label="密码" prop="pwd">
- <el-input v-model.trim="editParm.pwd" clearable></el-input>
- </el-form-item>
- <el-form-item label="公司" prop="companyId">
- <el-select v-model.trim="editParm.companyId" placeholder="请选择">
- <el-option
- v-for="item in companys"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="平台" prop="platformId">
- <el-select v-model.trim="editParm.platformId" placeholder="请选择">
- <el-option
- v-for="item in platformList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!--国家-->
- <el-form-item label="所属国家" prop="contntryShort">
- <el-input v-model.trim="editParm.contntryShort" clearable></el-input>
- </el-form-item>
- <!--VPN vpnId -->
- <el-input v-model.trim="editParm.vpnId" type="hidden" clearable></el-input>
- <el-form-item label="VPN地址" prop="vpnIp">
- <el-input v-model.trim="editParm.vpnIp" disabled style="width:230px"></el-input>
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchVpn"
- style="width:130px"
- >请选择VPN</el-button>
- </el-form-item>
- <!--信用卡ID cardId -->
- <el-input v-model.trim="editParm.cardId" type="hidden" clearable></el-input>
- <el-form-item label="信用卡号" prop="cardNumber">
- <el-input v-model.trim="editParm.cardNumber" disabled style="width:230px"></el-input>
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchCard"
- style="width:130px"
- >请选择信用卡</el-button>
- </el-form-item>
- <!--用户等级 level -->
- <el-form-item label="用户等级" prop="level">
- <el-select v-model.trim="editParm.level" placeholder="请选择">
- <el-option
- v-for="item in levelList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!--占用状态 occupyStatus -->
- <el-form-item label="占用状态" prop="occupyStatus">
- <el-select v-model.trim="editParm.occupyStatus" placeholder="请选择">
- <el-option
- v-for="item in occupyStatusList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!--状态 status -->
- <el-form-item label="状态" prop="status">
- <el-select v-model.trim="editParm.status" placeholder="请选择">
- <el-option
- v-for="item in statusList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!-- ********地址相关信息******** -->
- <!--firstname-->
- <el-form-item label="firstname" prop="firstname">
- <el-input v-model.trim="editParm.firstname" clearable></el-input>
- </el-form-item>
- <!--lastname-->
- <el-form-item label="lastname" prop="lastname">
- <el-input v-model.trim="editParm.lastname" clearable></el-input>
- </el-form-item>
- <!--电话-->
- <el-form-item label="电话" prop="tel">
- <el-input v-model.trim="editParm.tel" clearable></el-input>
- </el-form-item>
- <!--国家-->
- <el-form-item label="国家" prop="country">
- <el-input v-model.trim="editParm.country" clearable></el-input>
- </el-form-item>
- <!--州-->
- <el-form-item label="州" prop="state">
- <el-input v-model.trim="editParm.state" clearable></el-input>
- </el-form-item>
- <!--城市-->
- <el-form-item label="城市" prop="city">
- <el-input v-model.trim="editParm.city" clearable></el-input>
- </el-form-item>
- <!--地址1-->
- <el-form-item label="地址1" prop="addressline1">
- <el-input v-model.trim="editParm.addressline1" clearable></el-input>
- </el-form-item>
- <!--地址2-->
- <el-form-item label="地址2" prop="addressline2">
- <el-input v-model.trim="editParm.addressline2" clearable></el-input>
- </el-form-item>
- <!--税号-->
- <el-form-item label="税号" prop="vatNumber">
- <el-input v-model.trim="editParm.vatNumber" clearable></el-input>
- </el-form-item>
- <!--邮政编码-->
- <el-form-item label="邮政编码" prop="postalcode">
- <el-input v-model.trim="editParm.postalcode" clearable></el-input>
- </el-form-item>
- </el-form>
- </div>
- <span slot="footer">
- <el-button type="info" @click="sureEditCancle('editParm')">取消</el-button>
- <el-button type="primary" @click="sureEdit('editParm')">确认</el-button>
- </span>
- </el-dialog>
-
- <!--详情弹窗-->
- <el-dialog :visible.sync="dialogDetailVisible" :title="dialogDetailTitle" center width="45%">
- <div class="dialog-content">
- <el-form ref="form" size="small" label-width="120px">
- <el-form-item label="账号" prop="account">
- <el-input v-model.trim="detailParm.account" :disabled="true"></el-input>
- </el-form-item>
- <el-form-item label="昵称" prop="nickName">
- <el-input v-model.trim="detailParm.nickName" :disabled="true"></el-input>
- </el-form-item>
- <el-form-item label="密码" prop="pwd">
- <el-input v-model.trim="detailParm.pwd" :disabled="true"></el-input>
- </el-form-item>
- <el-form-item label="公司" prop="companyId">
- <el-select v-model.trim="detailParm.companyId" disabled placeholder="请选择">
- <el-option
- v-for="item in companys"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="平台" prop="platformId">
- <el-select v-model.trim="detailParm.platformId" disabled placeholder="请选择">
- <el-option
- v-for="item in platformList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <!--国家-->
- <el-form-item label="国家" prop="contntryShort">
- <el-input v-model.trim="detailParm.contntryShort" disabled clearable></el-input>
- </el-form-item>
- <!--VPN vpnId -->
- <el-form-item label="VPNIP" prop="vpnIp">
- <el-input v-model.trim="detailParm.vpnIp" disabled clearable></el-input>
- </el-form-item>
- <!--信用卡ID cardId -->
- <el-form-item label="信用卡卡号" prop="cardNumber">
- <el-input v-model.trim="detailParm.cardNumber" disabled clearable></el-input>
- </el-form-item>
- <!--用户等级 level -->
- <el-form-item label="用户等级" prop="level">
- <el-select v-model.trim="detailParm.level" disabled placeholder="请选择">
- <el-option
- v-for="item in levelList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!--占用状态 occupyStatus -->
- <el-form-item label="占用状态" prop="occupyStatus">
- <el-select v-model.trim="detailParm.occupyStatus" disabled placeholder="请选择">
- <el-option
- v-for="item in occupyStatusList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!--状态 status -->
- <el-form-item label="状态" prop="status">
- <el-select v-model.trim="detailParm.status" disabled placeholder="请选择">
- <el-option
- v-for="item in statusList"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!--占用账户-->
- <el-form-item label="占用账户" prop="occupyAccount">
- <el-input v-model.trim="detailParm.occupyAccount" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--账户余额-->
- <el-form-item label="账户余额" prop="balance">
- <el-input v-model.trim="detailParm.balance" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--购买总金额-->
- <el-form-item label="账户购买总金额" prop="buyTotalMoney">
- <el-input v-model.trim="detailParm.buyTotalMoney" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--地址1-->
- <el-form-item label="地址1" prop="addressline1">
- <el-input v-model.trim="detailParm.addressline1" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--国家-->
- <el-form-item label="国家" prop="country">
- <el-input v-model.trim="detailParm.country" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--州-->
- <el-form-item label="州" prop="state">
- <el-input v-model.trim="detailParm.state" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--电话-->
- <el-form-item label="电话" prop="tel">
- <el-input v-model.trim="detailParm.tel" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--lastname-->
- <el-form-item label="lastname" prop="lastname">
- <el-input v-model.trim="detailParm.lastname" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--税号-->
- <el-form-item label="税号" prop="vatNumber">
- <el-input v-model.trim="detailParm.vatNumber" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--城市-->
- <el-form-item label="城市" prop="city">
- <el-input v-model.trim="detailParm.city" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--地址2-->
- <el-form-item label="地址2" prop="addressline2">
- <el-input v-model.trim="detailParm.addressline2" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--firstname-->
- <el-form-item label="firstname" prop="firstname">
- <el-input v-model.trim="detailParm.firstname" :disabled="true" clearable></el-input>
- </el-form-item>
- <!--邮政编码-->
- <el-form-item label="邮政编码" prop="postalcode">
- <el-input v-model.trim="detailParm.postalcode" :disabled="true" clearable></el-input>
- </el-form-item>
- </el-form>
- </div>
- </el-dialog>
-
- <!--买家导入 importBtn-->
- <el-dialog :visible.sync="dialogImportVisible" :title="dialogImportTitle" center width="23%">
- <div class="dialog-content">
- <el-upload
- class="upload-demo"
- drag
- ref="upload"
- :headers="uploadHeaders"
- :action="uploadFileUrl"
- :show-file-list="false"
- :on-success="uploadSuccess"
- :before-upload="beforeAvatarUpload"
- multiple
- >
- <i class="el-icon-upload"></i>
- <div class="el-upload__text">
- 将文件拖到此处,或
- <em>点击上传</em>
- </div>
- <div class="el-upload__tip" slot="tip">只能上传xlsl文件,且不超过10M</div>
- </el-upload>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- add,
- editById,
- delById,
- getList,
- getById,
- getVpnList,
- getCardList
- } from "@/api/group/buyer";
- import { getAll } from "@/api/group/company";
- export default {
- filters: {
- getStatus: function(value) {
- if (value == 1) {
- return "待注册";
- } else if (value == 2) {
- return "待验证";
- } else if (value == 3) {
- return "待完善";
- } else if (value == 4) {
- return "正常";
- } else if (value == 5) {
- return "异常";
- } else if (value == 6) {
- return "可用但已用";
- } else {
- return "删除";
- }
- },
- getVpnVpsType: function(value) {
- if (value == 1) {
- return "传统";
- }
- },
- getVpnDealer: function(value) {
- if (value == 1) {
- return "V2";
- }
- },
- getVpnStatus: function(value) {
- if (value == 1) {
- return "可用";
- } else if (value == 2) {
- return "禁用";
- }
- },
- getCardStatus: function(value) {
- if (value == 1) {
- return "正常";
- } else if (value == 2) {
- return "异常";
- } else {
- return "删除";
- }
- },
- getCardType: function(value) {
- if (value == 1) {
- return "Payoneer";
- } else if (value == 2) {
- return "万事达虚拟卡";
- } else {
- return "Visa信用卡";
- }
- },
- getCardDealer: function(value) {
- if (value == 1) {
- return "AmzKeys";
- } else {
- return "Airwallex";
- }
- }
- },
- // 数据
- data() {
- return {
- searchParm: {
- page: 1,
- pageSize: 10,
- account: null,
- sort: "created_at",
- order: "desc",
- nickName: null,
- pwd: null,
- companyId: null,
- platformId: null
- },
- searchVpnParm: {
- page: 1,
- pageSize: 10,
- sort: "created_at",
- order: "desc",
- contntryShort: null,
- ipAddress: null,
- parentIpAddress: null,
- port: null,
- name: null,
- pwd: null,
- vpsType: null,
- dealer: null,
- mac: null,
- status: null
- },
- searchCardParm: {
- page: 1,
- pageSize: 10,
- sort: "created_at",
- order: "desc",
- cardDealer: "",
- type: "",
- status: "",
- holderName: null,
- number: null,
- pinNumber: null
- },
- total: 0,
- vpnTotal: 0,
- cardTotal: 0,
- list: [],
- vpnList: [],
- cardList: [],
- dialogAddVisible: false,
- dialogAddTitle: "新增",
- dialogDetailVisible: false,
- dialogDetailTitle: "详情",
- dialogEditVisible: false,
- dialogEditTitle: "修改",
- dialogImportVisible: false,
- dialogImportTitle: "导入",
- dialogVpnTittle: "VPN列表",
- dialogVpnVisible: false,
- dialogCardTittle: "信用卡列表",
- dialogCardVisible: false,
- uploadHeaders:{ Authorization: this.$store.getters.token },
- uploadFileUrl: process.env.VUE_APP_BASE_API + "/api/ctBuyer/import",
- tempUrl: process.env.VUE_APP_BASE_API + "/api/ctBuyer/exportTemp",
- companys: [],
- addDialog: true,
- //买家表格:0 ;VPN表格:1 ;Card表格:2
- handleType: 0,
- platformList: [
- {
- id: 1,
- name: "敦煌"
- },
- {
- id: 2,
- name: "速卖通"
- },
- {
- id: 3,
- name: "马帮"
- }
- ],
- statusList: [
- {
- id: 1,
- name: "待注册"
- },
- {
- id: 2,
- name: "待验证"
- },
- {
- id: 3,
- name: "待完善"
- },
- {
- id: 4,
- name: "正常"
- },
- {
- id: 5,
- name: "异常"
- },
- {
- id: 6,
- name: "可用但已用"
- },
- {
- id: 7,
- name: "删除"
- }
- ],
- occupyStatusList: [
- {
- id: 1,
- name: "已占用"
- },
- {
- id: 2,
- name: "未占用"
- }
- ],
- levelList: [
- {
- id: 1,
- name: "普通"
- },
- {
- id: 2,
- name: "精品"
- },
- {
- id: 3,
- name: "压力"
- },
- {
- id: 4,
- name: "内部账号"
- }
- ],
- searchVpsTypeList: [
- {
- value: null,
- label: "全部"
- },
- {
- value: 1,
- label: "传统"
- }
- ],
- searchDealerList: [
- {
- value: null,
- label: "全部"
- },
- {
- value: 1,
- label: "V2"
- }
- ],
- searchStatusList: [
- {
- value: null,
- label: "全部"
- },
- {
- value: 1,
- label: "可用"
- },
- {
- value: 2,
- label: "禁用"
- }
- ],
- typeCardList: [
- {
- id: null,
- name: "全部"
- },
- {
- id: 1,
- name: "Payoneer"
- },
- {
- id: 2,
- name: "万事达虚拟卡"
- },
- {
- id: 3,
- name: "Visa信用卡"
- }
- ],
- dealerCardList: [
- {
- id: null,
- name: "全部"
- },
- {
- id: 1,
- name: "AmzKeys"
- },
- {
- id: 2,
- name: "Airwallex"
- }
- ],
- statusCardList: [
- {
- id: null,
- name: "全部"
- },
- {
- id: 1,
- name: "正常"
- },
- {
- id: 2,
- name: "异常"
- },
- {
- id: 3,
- name: "删除"
- }
- ],
- addParm: {
- id: null,
- nickName: "",
- pwd: "",
- account: "",
- companyId: null,
- platformId: null,
- vpnId: null,
- vpnIp: "",
- cardId: null,
- cardNumber: "",
- level: null,
- occupyStatus: null,
- addressline1: "",
- country: "",
- tel: "",
- lastname: "",
- vatNumber: "",
- city: "",
- addressline2: "",
- firstname: "",
- postalcode: "",
- status: null
- },
- detailParm: {
- id: null,
- nickName: "",
- pwd: "",
- account: "",
- companyId: null,
- platformId: null,
- contntryShort: "",
- vpnId: null,
- vpnIp: "",
- cardId: null,
- cardNumber: "",
- level: null,
- occupyStatus: null,
- addressline1: "",
- country: "",
- state: "",
- tel: "",
- lastname: "",
- vatNumber: "",
- city: "",
- addressline2: "",
- firstname: "",
- postalcode: "",
- status: null
- },
- editParm: {
- id: null,
- nickName: "",
- pwd: "",
- account: "",
- companyId: null,
- platformId: null,
- contntryShort: "",
- vpnId: null,
- vpnIp: "",
- cardId: null,
- cardNumber: "",
- level: null,
- occupyStatus: null,
- addressline1: "",
- country: "",
- state: "",
- tel: "",
- lastname: "",
- vatNumber: "",
- city: "",
- addressline2: "",
- firstname: "",
- postalcode: "",
- status: null
- },
- rules: {
- pwd: [{ required: true, message: "请输入密码", trigger: "blur" }],
- nickName: [{ required: true, message: "请输入昵称", trigger: "blur" }],
- account: [{ required: true, message: "请输入账号", trigger: "blur" }],
- companyId: [{ required: true, message: "请选择公司", trigger: "blur" }],
- platformId: [
- { required: true, message: "请选择平台", trigger: "blur" }
- ],
- contntryShort: [
- { required: true, message: "请输入所属国家", trigger: "blur" }
- ],
- vpnIp: [{ required: true, message: "请选择VPN地址", trigger: "blur" }],
- // cardNumber: [
- // { required: true, message: "请选择信用卡号", trigger: "blur" }
- // ],
- level: [{ required: true, message: "请选择用户等级", trigger: "blur" }],
- occupyStatus: [
- { required: true, message: "请选择占用状态", trigger: "blur" }
- ],
- status: [{ required: true, message: "请选择状态", trigger: "blur" }],
- addressline1: [
- { required: true, message: "请输入地址1", trigger: "blur" }
- ],
- country: [{ required: true, message: "请输入国家", trigger: "blur" }],
- state: [{ required: true, message: "请输入州", trigger: "blur" }],
- tel: [{ required: true, message: "请输入电话", trigger: "blur" }],
- lastname: [
- { required: true, message: "请输入lastname", trigger: "blur" }
- ],
- city: [{ required: true, message: "请输入城市", trigger: "blur" }],
- firstname: [
- { required: true, message: "请输入firstname", trigger: "blur" }
- ],
- postalcode: [
- { required: true, message: "请输入邮政编码", trigger: "blur" }
- ]
- }
- };
- },
- // 调用
- created() {
- this.goSearch();
- },
- //方法
- methods: {
- resetForm() {
- this.searchParm.account = null;
- this.searchParm.pwd = null;
- this.searchParm.nickName = null;
- this.searchParm.companyId = null;
- this.searchParm.platformId = null;
- this.goSearch();
- },
- //重置vpn列表
- resetVpnForm() {
- this.searchVpnParm.contntryShort = null;
- this.searchVpnParm.ipAddress = null;
- this.searchVpnParm.parentIpAddress = null;
- this.searchVpnParm.port = null;
- this.searchVpnParm.name = null;
- this.searchVpnParm.pwd = null;
- this.searchVpnParm.vpsType = null;
- this.searchVpnParm.dealer = null;
- this.searchVpnParm.mac = null;
- this.searchVpnParm.status = null;
- this.goSearchVpn();
- },
- //重置
- resetCardForm() {
- this.searchCardParm.cardDealer = null;
- this.searchCardParm.cardDealer = "";
- this.searchCardParm.type = "";
- this.searchCardParm.status = "";
- this.searchCardParm.holderName = null;
- this.searchCardParm.number = null;
- this.searchCardParm.pinNumber = null;
- this.goSearchCard();
- },
- // 查询
- goSearch() {
- this.searchParm.page = 1;
- this.getCompanyAll();
- this.getDataList();
- },
- goSearchVpn() {
- this.dialogVpnVisible = true;
- this.searchVpnParm.page = 1;
- this.handleType = 1;
- this.getVpnDataList();
- },
- goSearchCard() {
- this.dialogCardVisible = true;
- this.searchCardParm.page = 1;
- this.handleType = 2;
- this.getCardDataList();
- },
- // 获取所有公司信息
- getCompanyAll() {
- getAll()
- .then(res => {
- this.companys = res.data;
- if (res.code == 200) {
- console.log(this.companys);
- }
- })
- .catch(() => {});
- },
- // 导入
- importBtn() {
- this.dialogImportVisible = true;
- },
- //导入成功
- uploadSuccess(res, file) {
- this.dialogImportVisible = false;
- if (res.code == 200) {
- console.log("SHDJSHDJSHDJSHDJSH" + res.data);
- if (res.data == true) {
- this.$message.success("导入成功!");
- } else {
- window.location.href = res.data;
- this.$message.error("导入失败!");
- }
- }
- this.goSearch();
- },
- //excel模板导出
- exportTempBtn() {
- console.log(this.tempUrl);
- window.location.href = this.tempUrl;
- },
- beforeAvatarUpload(file) {
- console.log("uploadFileUrl=" + this.uploadFileUrl);
- console.log(file);
- const isLt10M = file.size / 1024 / 1024 < 10;
- if (!isLt10M) {
- this.$message.error("上传Excel文件大小不能超过 10MB!");
- }
- return isLt10M;
- },
- // 新增
- addBtn() {
- this.addParm = {
- id: null,
- nickName: "",
- pwd: "",
- account: "",
- companyId: null,
- platformId: null,
- platformName: "",
- vpnId: null,
- cardId: null,
- level: null,
- occupyStatus: null,
- addressline1: "",
- country: "",
- tel: "",
- lastname: "",
- vatNumber: "",
- city: "",
- addressline2: "",
- firstname: "",
- postalcode: "",
- status: null
- };
- this.addDialog = true;
- this.dialogAddTitle = "新增";
- this.dialogAddVisible = true;
- // this.$refs.addParm.clearValidate();
- },
- // 根据id删除
- delById(id) {
- this.$confirm("确认删除?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- delById({ id })
- .then(res => {
- if (res.code == 200) {
- this.$message.success("删除成功!");
- this.getDataList();
- }
- })
- .catch(err => {
- console.log(err);
- });
- })
- .catch(() => {
- this.$message.info("取消删除");
- });
- },
- // 修改
- editById(data) {
- getById({ id: data.id })
- .then(res => {
- if (res.code == 200) {
- this.editParm.id = res.data.id;
- this.editParm.nickName = res.data.nickName;
- this.editParm.pwd = res.data.pwd;
- this.editParm.account = res.data.account;
- this.editParm.companyId = res.data.companyId;
- this.editParm.platformId = res.data.platformId;
- this.editParm.contntryShort = res.data.contntryShort;
- this.editParm.vpnId = res.data.vpnId;
- this.editParm.vpnIp = res.data.ipAddress;
- this.editParm.cardId = res.data.cardId;
- this.editParm.cardNumber = data.number;
- this.editParm.level = res.data.level;
- this.editParm.occupyStatus = res.data.occupyStatus;
- this.editParm.addressline1 = res.data.addressline1;
- this.editParm.country = res.data.country;
- this.editParm.state = res.data.state;
- this.editParm.tel = res.data.tel;
- this.editParm.lastname = res.data.lastname;
- this.editParm.vatNumber = res.data.vatNumber;
- this.editParm.city = res.data.city;
- this.editParm.addressline2 = res.data.addressline2;
- this.editParm.firstname = res.data.firstname;
- this.editParm.postalcode = res.data.postalcode;
- this.editParm.status = res.data.status;
-
- this.addDialog = false;
- this.dialogEditVisible = true;
- this.$refs.editParm.clearValidate();
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- // 确认修改
- sureEdit(editParm) {
- this.$refs[editParm].validate((valid) => {
- if (valid) {
- this.$refs.editParm.clearValidate();
- editById(this.editParm)
- .then(res => {
- if (res.code == 200) {
- this.dialogEditVisible = false;
- this.$message.success("修改成功!");
- this.getDataList();
- }
- })
- .catch(err => {
- console.log(err);
- });
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- sureEditCancle(editParm) {
- this.dialogEditVisible=flase
- this.$refs.editParm.clearValidate();
- },
- // 确认新增
- sureAdd(addParm) {
- this.$refs[addParm].validate((valid) => {
- if (valid) {
- this.$refs.addParm.clearValidate();
- add(this.addParm)
- .then(res => {
- if (res.code == 200) {
- console.log(this.addParm);
- this.dialogAddVisible = false;
- this.$message.success("新增成功!");
- this.getDataList();
- }
- })
- .catch(err => {
- console.log(err);
- });
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- sureAddCancle(addParm) {
- this.dialogAddVisible=flase
- this.$refs.addParm.clearValidate();
- },
- // 查看根据id
- getBtnById(id) {
- getById({ id })
- .then(res => {
- if (res.code == 200) {
- this.detailParm.id = res.data.id;
- this.detailParm.nickName = res.data.nickName;
- this.detailParm.pwd = res.data.pwd;
- this.detailParm.account = res.data.account;
- this.detailParm.companyId = res.data.companyId;
- this.detailParm.platformId = res.data.platformId;
- this.detailParm.contntryShort = res.data.contntryShort;
- this.detailParm.vpnId = res.data.vpnId;
- this.detailParm.vpnIp = res.data.ipAddress;
- this.detailParm.cardNumber = res.data.number;
- this.detailParm.cardId = res.data.cardId;
- this.detailParm.level = res.data.level;
- this.detailParm.occupyStatus = res.data.occupyStatus;
- this.detailParm.occupyAccount = res.data.occupyAccount;
- this.detailParm.balance = res.data.balance;
- this.detailParm.buyTotalMoney = res.data.buyTotalMoney;
- this.detailParm.addressline1 = res.data.addressline1;
- this.detailParm.country = res.data.country;
- this.detailParm.state = res.data.state;
- this.detailParm.tel = res.data.tel;
- this.detailParm.lastname = res.data.lastname;
- this.detailParm.vatNumber = res.data.vatNumber;
- this.detailParm.city = res.data.city;
- this.detailParm.addressline2 = res.data.addressline2;
- this.detailParm.firstname = res.data.firstname;
- this.detailParm.postalcode = res.data.postalcode;
- this.detailParm.status = res.data.status;
-
- this.dialogDetailVisible = true;
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- getVpnIpById(data) {
- if (this.addDialog == true) {
- this.addParm.vpnIp = data.ipAddress;
- this.addParm.vpnId = data.id;
- } else {
- this.editParm.vpnIp = data.ipAddress;
- this.editParm.vpnId = data.id;
- }
- console.log(this.addParm.vpnId);
- this.dialogVpnVisible = false;
- this.$message.success("选择成功");
- },
- getCardById(data) {
- if (this.addDialog == true) {
- this.addParm.cardNumber = data.number;
- this.addParm.cardId = data.id;
- } else {
- this.editParm.cardNumber = data.number;
- this.editParm.cardId = data.id;
- }
-
- this.dialogCardVisible = false;
- this.$message.success("选择成功");
- },
- // 分页获取表格数据
- getDataList() {
- getList(this.searchParm)
- .then(res => {
- if (res.code == 200) {
- this.list = res.data.list;
- this.total = res.data.total;
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- //获取vpn信息
- getVpnDataList() {
- getVpnList(this.searchVpnParm)
- .then(res => {
- if (res.code == 200) {
- this.vpnList = res.data.list;
- this.vpnTotal = res.data.total;
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- //获取信用卡信息
- getCardDataList() {
- getCardList(this.searchCardParm)
- .then(res => {
- if (res.code == 200) {
- this.cardList = res.data.list;
- this.cardTotal = res.data.total;
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- // 分页
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- if (this.handleType == 0) {
- this.searchParm.pageSize = val;
- this.getDataList();
- } else if (this.handleType == 1) {
- this.searchVpnParm.pageSize = val;
- this.getVpnDataList();
- } else if (this.handleType == 2) {
- this.searchCardParm.pageSize = val;
- this.getCardDataList();
- }
- },
- handleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- if (this.handleType == 0) {
- this.searchParm.page = val;
- this.getDataList();
- } else if (this.handleType == 1) {
- this.searchVpnParm.page = val;
- this.getVpnDataList();
- } else if (this.handleType == 2) {
- this.searchCardParm.page = val;
- this.getCardDataList();
- }
- }
- }
- };
- </script>
-
- <style rel="stylesheet/scss" lang="scss" scoped>
- </style>
|