|
|
|
|
@ -1,9 +1,17 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-descriptions class="margin-top" style="font-size: 1.2em;">
|
|
|
|
|
<el-descriptions-item label="用户总数" label-style="border-left: solid 2px #419EFF;">{{ count.userNum }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="已注册用户" label-style="border-left: solid 2px #419EFF;">{{ count.userRegisterNum }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="已绑定仪器用户数" label-style="border-left: solid 2px #419EFF;">{{ count.userDeviceNum }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="用户总数" label-style="border-left: solid 2px #419EFF;">{{
|
|
|
|
|
count.userNum
|
|
|
|
|
}}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="已注册用户" label-style="border-left: solid 2px #419EFF;">{{
|
|
|
|
|
count.userRegisterNum
|
|
|
|
|
}}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="已绑定仪器用户数" label-style="border-left: solid 2px #419EFF;">
|
|
|
|
|
{{ count.userDeviceNum }}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
|
<el-form-item label="用户类型" prop="userType">
|
|
|
|
|
@ -308,7 +316,7 @@
|
|
|
|
|
<el-button type="primary" @click="submitEditRemark()">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
|
|
<el-form ref="form" :model="form" label-width="120px">
|
|
|
|
|
<el-form-item label="头像" prop="headimg">
|
|
|
|
|
<el-avatar shape="circle" :size="50" :src="form.headimg"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -415,39 +423,40 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 发送话术 -->
|
|
|
|
|
<!-- 小程序标签批量操作 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="batchMiniProgramVisible" width="50%"
|
|
|
|
|
:before-close="cancelMiniProgramDialog">
|
|
|
|
|
<el-form ref="form" :model="form" label-width="150px">
|
|
|
|
|
<el-form ref="miniProgramForm" :model="miniProgramForm" :rules="batchMiniProgramRules" label-width="150px">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="100">
|
|
|
|
|
<el-form-item label="小程序标签" prop="tagIdArray" label-width="90px">
|
|
|
|
|
<treeselect v-model="tagIdArray" :options="chatTagOptions" :multiple="true" :show-count="true"
|
|
|
|
|
<el-form-item label="小程序标签" prop="tagIdArray" label-width="100px">
|
|
|
|
|
<treeselect v-model="miniProgramForm.tagIdArray" :options="chatTagOptions" :multiple="true"
|
|
|
|
|
:show-count="true"
|
|
|
|
|
placeholder="请选择小程序标签" :disable-branch-nodes="true"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="cancelMiniProgramDialog(true)">重 置</el-button>
|
|
|
|
|
<el-button @click="cancelMiniProgramDialog(false)">重 置</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitBatchOperate">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 积分批量操作 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="batchIntegralVisible" width="50%" :before-close="cancelIntegralDialog">
|
|
|
|
|
<el-form ref="form" :model="integralForm" label-width="150px">
|
|
|
|
|
<el-form :model="integralForm" ref="integralForm" :rules="batchIntegralRules" label-width="150px">
|
|
|
|
|
<el-form-item label="类型" prop="source">
|
|
|
|
|
<el-select v-model="integralForm.source" style="width: 50%">
|
|
|
|
|
<el-option label="增加" :value="1"></el-option>
|
|
|
|
|
<el-option label="减少" :value="2"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="变动积分" prop="headimg">
|
|
|
|
|
<el-form-item label="变动积分" prop="floatScore">
|
|
|
|
|
<el-input-number v-model="integralForm.floatScore" controls-position="right" :min="1"
|
|
|
|
|
:max="1000"></el-input-number>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="说明 " prop="username">
|
|
|
|
|
<el-form-item label="说明 " prop="remarkContent">
|
|
|
|
|
<el-input v-model="integralForm.remarkContent"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
@ -459,7 +468,7 @@
|
|
|
|
|
|
|
|
|
|
<!-- 备注批量操作 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="batchRemarkVisible" width="50%" :before-close="cancelRemarkDialog">
|
|
|
|
|
<el-form ref="form" :model="remarkForm" label-width="150px">
|
|
|
|
|
<el-form ref="remarkForm" :model="remarkForm" :rules="batchRemarkRules" label-width="150px">
|
|
|
|
|
<el-form-item label="备注 " prop="content">
|
|
|
|
|
<el-input v-model="remarkForm.content" placeholder="请输入备注"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -473,7 +482,7 @@
|
|
|
|
|
<!-- 话术批量操作 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="batchScriptVisible" width="600px" append-to-body
|
|
|
|
|
:before-close="cancelscriptDialog">
|
|
|
|
|
<el-form ref="form" :model="scriptForm" label-width="80px">
|
|
|
|
|
<el-form ref="scriptForm" :model="scriptForm" :rules="batchScriptRules" label-width="150px">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="类型" prop="isCustom">
|
|
|
|
|
@ -487,7 +496,7 @@
|
|
|
|
|
<!-- 话术模板发送 -->
|
|
|
|
|
<el-row v-if="scriptForm.isCustom == 0">
|
|
|
|
|
<el-col :span="40">
|
|
|
|
|
<el-form-item label="话术二级标题选择" prop="scriptTemplateId" label-width="90px">
|
|
|
|
|
<el-form-item label="话术二级标题选择" prop="scriptTemplateId">
|
|
|
|
|
<treeselect v-model="scriptForm.scriptTemplateId" :options="scriptOptions" :show-count="true"
|
|
|
|
|
@select="selectTree"
|
|
|
|
|
placeholder="请选择话术" :disable-branch-nodes="true"/>
|
|
|
|
|
@ -788,13 +797,17 @@ export default {
|
|
|
|
|
// 保存页面的,市区
|
|
|
|
|
saveCityList: null,
|
|
|
|
|
saveAreaList: null,
|
|
|
|
|
// 批量操作下拉项选择
|
|
|
|
|
batchOperateValue: null,
|
|
|
|
|
// 批量操作:小程序标签
|
|
|
|
|
batchMiniProgramVisible: false,
|
|
|
|
|
chatTagOptions: [],
|
|
|
|
|
scriptOptions: [],
|
|
|
|
|
tagIdArray: [],
|
|
|
|
|
|
|
|
|
|
// 批量操作类型-下拉项选择
|
|
|
|
|
batchOperateValue: null,
|
|
|
|
|
// 批量操作:小程序标签
|
|
|
|
|
batchMiniProgramVisible: false,
|
|
|
|
|
miniProgramForm: {
|
|
|
|
|
tagIdArray: []
|
|
|
|
|
},
|
|
|
|
|
// 批量操作:积分
|
|
|
|
|
batchIntegralVisible: false,
|
|
|
|
|
integralForm: {
|
|
|
|
|
@ -812,7 +825,7 @@ export default {
|
|
|
|
|
batchRemarkVisible: null,
|
|
|
|
|
scriptForm: {
|
|
|
|
|
userIdList: null,
|
|
|
|
|
isCustom: null,
|
|
|
|
|
isCustom: 0,
|
|
|
|
|
scriptTemplateId: null,
|
|
|
|
|
scriptName: null,
|
|
|
|
|
titile: null,
|
|
|
|
|
@ -922,7 +935,66 @@ export default {
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {}
|
|
|
|
|
batchMiniProgramRules: {
|
|
|
|
|
tagIdArray: [
|
|
|
|
|
{required: true, message: '请选择小程序标签', trigger: 'change'}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
batchIntegralRules: {
|
|
|
|
|
source: [
|
|
|
|
|
{required: true, message: '请选择积分操作类型', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
floatScore: [
|
|
|
|
|
{required: true, message: '请输入变动积分', trigger: 'change'}
|
|
|
|
|
],
|
|
|
|
|
remarkContent: [
|
|
|
|
|
{required: true, message: '输入积分操作说明', trigger: 'blur'},
|
|
|
|
|
{min: 1, max: 500, message: '长度在 3 到 500 个字符', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
batchRemarkRules: {
|
|
|
|
|
content: [
|
|
|
|
|
{required: true, message: '请输入备注', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
batchScriptRules: {
|
|
|
|
|
isCustom: [
|
|
|
|
|
{required: true, message: '请选择话术类型', trigger: 'change'}
|
|
|
|
|
],
|
|
|
|
|
scriptTemplateId: [
|
|
|
|
|
{required: true, message: '请选择话术模板', trigger: 'change'}
|
|
|
|
|
],
|
|
|
|
|
scriptContent: [
|
|
|
|
|
{required: true, message: '请选择话术模板'}
|
|
|
|
|
],
|
|
|
|
|
titile: [
|
|
|
|
|
{required: true, message: '请输入话术标题', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
content: [
|
|
|
|
|
{required: true, message: '请输入话术内容', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
type: [
|
|
|
|
|
{required: true, message: '请选择跳转类型', trigger: 'change'}
|
|
|
|
|
],
|
|
|
|
|
link: [
|
|
|
|
|
{required: true, message: '请输入链接地址', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
linkParams: [
|
|
|
|
|
{required: true, message: '请输入跳转参数', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
redirectAppid: [
|
|
|
|
|
{required: true, message: '请输入小程序APPID', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
redirectUrl: [
|
|
|
|
|
{required: true, message: '请输入小程序页面', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
videoNo: [
|
|
|
|
|
{required: true, message: '请输入视频号ID', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
feedId: [
|
|
|
|
|
{required: true, message: '请输入视频号feedId', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
@ -1007,10 +1079,12 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
// 关闭添加小程序标签窗口
|
|
|
|
|
cancelMiniProgramDialog() {
|
|
|
|
|
cancelMiniProgramDialog(isclose) {
|
|
|
|
|
this.title = null;
|
|
|
|
|
this.tagIdArray = [];
|
|
|
|
|
this.batchMiniProgramVisible = false;
|
|
|
|
|
this.miniProgramForm.tagIdArray = [];
|
|
|
|
|
if (isclose) {
|
|
|
|
|
this.batchMiniProgramVisible = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
cancelIntegralDialog() {
|
|
|
|
|
this.integralForm.source = null;
|
|
|
|
|
@ -1416,45 +1490,69 @@ export default {
|
|
|
|
|
submitBatchOperate() {
|
|
|
|
|
// 批量添加小程序标签
|
|
|
|
|
if (this.batchOperateValue == 1) {
|
|
|
|
|
batchAddMiniProgramTag(this.tagIdArray, this.ids).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量添加小程序标签成功");
|
|
|
|
|
this.cancelMiniProgramDialog(true);
|
|
|
|
|
})
|
|
|
|
|
this.$refs["miniProgramForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
batchAddMiniProgramTag(this.miniProgramForm.tagIdArray, this.ids).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量添加小程序标签成功");
|
|
|
|
|
this.cancelMiniProgramDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 批量删除小程序标签
|
|
|
|
|
if (this.batchOperateValue == 2) {
|
|
|
|
|
batchDelMiniProgramTag(this.tagIdArray, this.ids).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量添加小程序标签成功");
|
|
|
|
|
this.cancelMiniProgramDialog(true);
|
|
|
|
|
})
|
|
|
|
|
this.$refs["miniProgramForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
batchDelMiniProgramTag(this.miniProgramForm.tagIdArray, this.ids).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量删除小程序标签成功");
|
|
|
|
|
this.cancelMiniProgramDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 全量添加小程序标签
|
|
|
|
|
if (this.batchOperateValue == 3) {
|
|
|
|
|
allAddMiniProgramTag(this.tagIdArray, this.queryParams).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("全量添加小程序标签成功");
|
|
|
|
|
this.cancelMiniProgramDialog(true);
|
|
|
|
|
})
|
|
|
|
|
this.$refs["miniProgramForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
allAddMiniProgramTag(this.miniProgramForm.tagIdArray, this.queryParams).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("全量添加小程序标签成功");
|
|
|
|
|
this.cancelMiniProgramDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 全量删除小程序标签
|
|
|
|
|
if (this.batchOperateValue == 4) {
|
|
|
|
|
allDelMiniProgramTag(this.tagIdArray, this.queryParams).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("全量删除小程序标签成功");
|
|
|
|
|
this.cancelMiniProgramDialog(true);
|
|
|
|
|
})
|
|
|
|
|
this.$refs["miniProgramForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
allDelMiniProgramTag(this.miniProgramForm.tagIdArray, this.queryParams).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("全量删除小程序标签成功");
|
|
|
|
|
this.cancelMiniProgramDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 批量操作积分
|
|
|
|
|
if (this.batchOperateValue == 5) {
|
|
|
|
|
batchChangIntegral(this.ids, this.integralForm).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量操作积分成功");
|
|
|
|
|
this.cancelIntegralDialog(true);
|
|
|
|
|
this.$refs["integralForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
batchChangIntegral(this.ids, this.integralForm).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量操作积分成功");
|
|
|
|
|
this.cancelIntegralDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 全量操作积分
|
|
|
|
|
if (this.batchOperateValue == 6) {
|
|
|
|
|
allChangIntegral(this.integralForm, this.queryParams).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量操作积分成功");
|
|
|
|
|
this.cancelIntegralDialog(true);
|
|
|
|
|
this.$refs["integralForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
allChangIntegral(this.integralForm, this.queryParams).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量操作积分成功");
|
|
|
|
|
this.cancelIntegralDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1477,19 +1575,25 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 批量操作备注
|
|
|
|
|
if (this.batchOperateValue == 9) {
|
|
|
|
|
console.log("批量备注");
|
|
|
|
|
this.remarkForm.userIdList = this.ids;
|
|
|
|
|
batchAddRemark(this.remarkForm).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量备注成功");
|
|
|
|
|
this.cancelRemarkDialog(true);
|
|
|
|
|
this.$refs["remarkForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.remarkForm.userIdList = this.ids;
|
|
|
|
|
batchAddRemark(this.remarkForm).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量备注成功");
|
|
|
|
|
this.cancelRemarkDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 全量操作备注
|
|
|
|
|
if (this.batchOperateValue == 10) {
|
|
|
|
|
console.log("全量备注");
|
|
|
|
|
allAddRemark(this.remarkForm.content, this.queryParams).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量备注成功");
|
|
|
|
|
this.cancelRemarkDialog(true);
|
|
|
|
|
this.$refs["remarkForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
allAddRemark(this.remarkForm.content, this.queryParams).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量备注成功");
|
|
|
|
|
this.cancelRemarkDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|