|
|
@@ -0,0 +1,132 @@
|
|
|
+<template>
|
|
|
+ <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id">
|
|
|
+ <el-table-column type="selection" width="50" fixed="left"></el-table-column>
|
|
|
+ <el-table-column label="基础信息" width="340" prop="name" fixed="left">
|
|
|
+ <template #default="scope">
|
|
|
+ <div class="goods-img">
|
|
|
+ <div class="img">
|
|
|
+ <el-image
|
|
|
+ style="width: 54px; height: 54px"
|
|
|
+ :src="scope.row.avatar"
|
|
|
+ :zoom-rate="1.2"
|
|
|
+ :max-scale="7"
|
|
|
+ :min-scale="0.2"
|
|
|
+ :preview-src-list="[scope.row.avatar]"
|
|
|
+ preview-teleported
|
|
|
+ z-index="999"
|
|
|
+ fit="cover"></el-image>
|
|
|
+ </div>
|
|
|
+ <div class="name">
|
|
|
+ <span>{{ scope.row.nickname }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="OpenId" prop="id">
|
|
|
+ <template #default="scope">
|
|
|
+ <div class="price">{{ scope.row.openid }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="手机号码" width="120" prop="id">
|
|
|
+ <template #default="scope">
|
|
|
+ <div class="price">{{ scope.row.mobile }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="注册时间" prop="create_at" width="180"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="160" align="left" fixed="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button-group>
|
|
|
+ <el-button type="danger" text size="small" @click="table_del(scope.row)">解除拉黑</el-button>
|
|
|
+ </el-button-group>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </scTable>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ list: {
|
|
|
+ apiObj: this.$API.black.list
|
|
|
+ },
|
|
|
+ dataSelect:[],
|
|
|
+ dataSelectFull:[],
|
|
|
+ searchKey:{}
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+
|
|
|
+ table_del(data){
|
|
|
+ this.$confirm(`解除拉黑后,恢复该用户的下单权限`, '提示', {
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async ()=>{
|
|
|
+ var resp = await this.$API.black.undel.post({"id":data.id});
|
|
|
+ if (resp.code == 0) {
|
|
|
+ return this.$message.error(resp.msg);
|
|
|
+ }
|
|
|
+ this.$message.success(resp.msg);
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ }).catch(()=>{})
|
|
|
+ },
|
|
|
+ refresh(){
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ },
|
|
|
+ upData(data){
|
|
|
+ this.$refs.table.upData(data)
|
|
|
+ },
|
|
|
+ handleSuccess(){
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ },
|
|
|
+ sortChange(event){
|
|
|
+ if (event.order) {
|
|
|
+ var data = {
|
|
|
+ "field":event.prop,
|
|
|
+ "order":event.order
|
|
|
+ }
|
|
|
+ this.$refs.table.upData(data)
|
|
|
+ } else {
|
|
|
+ this.$refs.table.reload(this.searchKey)
|
|
|
+ }
|
|
|
+ return ;
|
|
|
+ },
|
|
|
+ selectionChange(event){
|
|
|
+ this.dataSelect = [];
|
|
|
+ var arr = [];
|
|
|
+ var arrCompany = [];
|
|
|
+ event.forEach(function(val,index){
|
|
|
+ arr[index] = val.id;
|
|
|
+ arrCompany[index] = val;
|
|
|
+ });
|
|
|
+ this.dataSelectFull = arrCompany;
|
|
|
+ this.dataSelect = arr;
|
|
|
+ this.$emit("success",this.dataSelect);
|
|
|
+ this.$emit("successFull",this.dataSelectFull);
|
|
|
+ },
|
|
|
+ table_passwd(row){
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.userPasswd.open("edit").setData(row)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+.goods-img{display: flex;gap: 5px;}
|
|
|
+.goods-img .name span{display: block;}
|
|
|
+.goods-img .name span.dec{color: #999;font-size: 12px;}
|
|
|
+.goods-price,.price{display: flex;align-items: center;gap: 5px;font-size: 14px;}
|
|
|
+.goods-price .del{text-decoration: line-through;}
|
|
|
+.goods-price span{background-color: #fff !important;
|
|
|
+ border: 1px solid #d3d9e0 !important;
|
|
|
+ border-radius: 4px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ color: #6c737a !important;
|
|
|
+ display: inline-flex;
|
|
|
+ flex: none;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 18px !important;
|
|
|
+ padding: 1px 6px !important;text-decoration: none;}
|
|
|
+</style>
|