|
|
|
|
@ -98,51 +98,26 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<!-- <el-row :gutter="10" class="mb8">-->
|
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- plain-->
|
|
|
|
|
<!-- icon="el-icon-plus"-->
|
|
|
|
|
<!-- size="mini"-->
|
|
|
|
|
<!-- @click="handleAdd"-->
|
|
|
|
|
<!-- v-hasPermi="['system:instrument:add']"-->
|
|
|
|
|
<!-- >新增</el-button>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="success"-->
|
|
|
|
|
<!-- plain-->
|
|
|
|
|
<!-- icon="el-icon-edit"-->
|
|
|
|
|
<!-- size="mini"-->
|
|
|
|
|
<!-- :disabled="single"-->
|
|
|
|
|
<!-- @click="handleUpdate"-->
|
|
|
|
|
<!-- v-hasPermi="['system:instrument:edit']"-->
|
|
|
|
|
<!-- >修改</el-button>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="danger"-->
|
|
|
|
|
<!-- plain-->
|
|
|
|
|
<!-- icon="el-icon-delete"-->
|
|
|
|
|
<!-- size="mini"-->
|
|
|
|
|
<!-- :disabled="multiple"-->
|
|
|
|
|
<!-- @click="handleDelete"-->
|
|
|
|
|
<!-- v-hasPermi="['system:instrument:remove']"-->
|
|
|
|
|
<!-- >删除</el-button>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="warning"-->
|
|
|
|
|
<!-- plain-->
|
|
|
|
|
<!-- icon="el-icon-download"-->
|
|
|
|
|
<!-- size="mini"-->
|
|
|
|
|
<!-- @click="handleExport"-->
|
|
|
|
|
<!-- v-hasPermi="['system:instrument:export']"-->
|
|
|
|
|
<!-- >导出</el-button>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<!-- 批量操作下拉选项 -->
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-select v-model="batchOperateValue" placeholder="批量操作" size="mini" clearable>
|
|
|
|
|
<el-option label="导出数据" :value="1"></el-option>
|
|
|
|
|
<el-option label="导出全量数据" :value="2"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-warning"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="batchOperate()"
|
|
|
|
|
>确认
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="userInstrumentList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
@ -326,6 +301,61 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 导出字段选择弹窗 -->
|
|
|
|
|
<el-dialog title="自定义导出字段" :visible.sync="exportFieldsVisible" width="50%"
|
|
|
|
|
:before-close="cancelExportFieldsDialog">
|
|
|
|
|
<el-form ref="form" label-width="150px">
|
|
|
|
|
<el-form-item label="全部字段" prop="allFields">
|
|
|
|
|
<el-switch v-model="allFields" @click.native="isExportAllFields()"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-form :inline="true" ref="form" :model="exportFieldList" label-width="150px">
|
|
|
|
|
<el-form-item label="会员昵称" prop="nickname">
|
|
|
|
|
<el-switch v-model="exportFieldList.nickname" :active-value="'nickname'" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="用户编号 " prop="id">
|
|
|
|
|
<el-switch v-model="exportFieldList.id" active-value="id" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="手机号 " prop="mobile">
|
|
|
|
|
<el-switch v-model="exportFieldList.mobile" active-value="mobile" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="生日 " prop="birthday">
|
|
|
|
|
<el-switch v-model="exportFieldList.birthday" active-value="birthday" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="地区 " prop="province" @click.native="exportArea()">
|
|
|
|
|
<el-switch v-model="exportFieldList.province" active-value="province" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="用户注册时间 " prop="createTime">
|
|
|
|
|
<el-switch v-model="exportFieldList.createTime" active-value="createTime" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="仪器数量 " prop="devicesNum">
|
|
|
|
|
<el-switch v-model="exportFieldList.devicesNum" active-value="devicesNum" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="仪器名称 " prop="devicesName">
|
|
|
|
|
<el-switch v-model="exportFieldList.devicesName" active-value="devicesName" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="小程序标签 " prop="miniProgramTags">
|
|
|
|
|
<el-switch v-model="exportFieldList.miniProgramTags" active-value="miniProgramTags" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="企微标签 " prop="wecomTags">
|
|
|
|
|
<el-switch v-model="exportFieldList.wecomTags" active-value="wecomTags" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="积分 " prop="credit">
|
|
|
|
|
<el-switch v-model="exportFieldList.credit" active-value="credit" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="即将过期积分 " prop="expireCredit">
|
|
|
|
|
<el-switch v-model="exportFieldList.expireCredit" active-value="expireCredit" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="unionid " prop="unionid">
|
|
|
|
|
<el-switch v-model="exportFieldList.unionid" active-value="unionid" :inactive-value="null"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="cancelExportFieldsDialog()">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitBatchOperate">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -347,6 +377,8 @@ export default {
|
|
|
|
|
id: "",
|
|
|
|
|
serial: "",
|
|
|
|
|
},
|
|
|
|
|
// 批量操作类型-下拉项选择
|
|
|
|
|
batchOperateValue: null,
|
|
|
|
|
// 序列号标题
|
|
|
|
|
serialTitle: "换绑序列号",
|
|
|
|
|
// 序列号弹窗
|
|
|
|
|
@ -379,6 +411,28 @@ export default {
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
allFields: false,
|
|
|
|
|
exportFieldList: {
|
|
|
|
|
id: null,
|
|
|
|
|
nickname: null,
|
|
|
|
|
credit: null,
|
|
|
|
|
expireCredit: null,
|
|
|
|
|
unionid: null,
|
|
|
|
|
mobile: null,
|
|
|
|
|
province: null,
|
|
|
|
|
city: null,
|
|
|
|
|
area: null,
|
|
|
|
|
birthday: null,
|
|
|
|
|
devicesNum: null,
|
|
|
|
|
devicesName: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
wecomTags: null,
|
|
|
|
|
miniProgramTags: null,
|
|
|
|
|
},
|
|
|
|
|
exportFieldsForm: {
|
|
|
|
|
userIdList: null,
|
|
|
|
|
exportFields: null,
|
|
|
|
|
},
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
@ -403,6 +457,8 @@ export default {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
userInstrumentId: null,
|
|
|
|
|
},
|
|
|
|
|
// 导出数据选择字段
|
|
|
|
|
exportFieldsVisible: false,
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
@ -645,7 +701,106 @@ export default {
|
|
|
|
|
this.guaranteeOpen = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 批量操作
|
|
|
|
|
batchOperate() {
|
|
|
|
|
if (this.batchOperateValue == null) {
|
|
|
|
|
this.$message.error("请选择您的操作");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.batchOperateValue == 1) {
|
|
|
|
|
if (this.ids.length == 0) {
|
|
|
|
|
this.$message.error("请选择数据");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.exportFieldsVisible = true;
|
|
|
|
|
},
|
|
|
|
|
// 取消操作
|
|
|
|
|
cancelExportFieldsDialog() {
|
|
|
|
|
this.allFields = false;
|
|
|
|
|
this.exportFieldsVisible = false
|
|
|
|
|
this.exportFieldList = {
|
|
|
|
|
id: null,
|
|
|
|
|
nickname: null,
|
|
|
|
|
credit: null,
|
|
|
|
|
expireCredit: null,
|
|
|
|
|
unionid: null,
|
|
|
|
|
mobile: null,
|
|
|
|
|
province: null,
|
|
|
|
|
city: null,
|
|
|
|
|
area: null,
|
|
|
|
|
birthday: null,
|
|
|
|
|
devicesNum: null,
|
|
|
|
|
devicesName: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
wecomTags: null,
|
|
|
|
|
miniProgramTags: null,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 批量操作
|
|
|
|
|
submitBatchOperate() {
|
|
|
|
|
// 导出用户数据
|
|
|
|
|
if (this.batchOperateValue == 1) {
|
|
|
|
|
let exportFields = Object.values(this.exportFieldList).filter(val => val != null);
|
|
|
|
|
if (exportFields.length == 0) {
|
|
|
|
|
this.$modal.msgError("请选择导出字段");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.exportFieldsForm.userIdList = this.ids;
|
|
|
|
|
this.exportFieldsForm.exportFields = exportFields;
|
|
|
|
|
this.download('/system/member/batchExport', {
|
|
|
|
|
...this.exportFieldsForm
|
|
|
|
|
}, `微信会员_${new Date().getTime()}.xlsx`);
|
|
|
|
|
this.cancelExportFieldsDialog();
|
|
|
|
|
}
|
|
|
|
|
if (this.batchOperateValue == 2) {
|
|
|
|
|
let exportFields = Object.values(this.exportFieldList).filter(val => val != null);
|
|
|
|
|
if (exportFields.length == 0) {
|
|
|
|
|
this.$modal.msgError("请选择导出字段");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.download('/system/member/allExport', {
|
|
|
|
|
...Object.assign({}, this.queryParams, {exportFields: exportFields})
|
|
|
|
|
}, `微信会员_${new Date().getTime()}.xlsx`)
|
|
|
|
|
this.cancelExportFieldsDialog();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
isExportAllFields() {
|
|
|
|
|
if (this.allFields) {
|
|
|
|
|
this.exportFieldList.nickname = "nickname";
|
|
|
|
|
this.exportFieldList.id = "id";
|
|
|
|
|
this.exportFieldList.credit = "credit";
|
|
|
|
|
this.exportFieldList.expireCredit = "expireCredit";
|
|
|
|
|
this.exportFieldList.unionid = "unionid";
|
|
|
|
|
this.exportFieldList.mobile = "mobile";
|
|
|
|
|
this.exportFieldList.province = "province";
|
|
|
|
|
this.exportFieldList.city = "city";
|
|
|
|
|
this.exportFieldList.area = "area";
|
|
|
|
|
this.exportFieldList.birthday = "birthday";
|
|
|
|
|
this.exportFieldList.devicesNum = "devicesNum";
|
|
|
|
|
this.exportFieldList.devicesName = "devicesName";
|
|
|
|
|
this.exportFieldList.createTime = "createTime";
|
|
|
|
|
this.exportFieldList.wecomTags = "wecomTags";
|
|
|
|
|
this.exportFieldList.miniProgramTags = "miniProgramTags";
|
|
|
|
|
} else {
|
|
|
|
|
this.exportFieldList.nickname = null;
|
|
|
|
|
this.exportFieldList.id = null;
|
|
|
|
|
this.exportFieldList.credit = null;
|
|
|
|
|
this.exportFieldList.expireCredit = null;
|
|
|
|
|
this.exportFieldList.unionid = null;
|
|
|
|
|
this.exportFieldList.mobile = null;
|
|
|
|
|
this.exportFieldList.province = null;
|
|
|
|
|
this.exportFieldList.city = null;
|
|
|
|
|
this.exportFieldList.area = null;
|
|
|
|
|
this.exportFieldList.birthday = null;
|
|
|
|
|
this.exportFieldList.devicesNum = null;
|
|
|
|
|
this.exportFieldList.devicesName = null;
|
|
|
|
|
this.exportFieldList.createTime = null;
|
|
|
|
|
this.exportFieldList.wecomTags = null;
|
|
|
|
|
this.exportFieldList.miniProgramTags = null;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|