Merge branch 'feature-20240104' of https://gitee.com/yunqiang_technology/floatomcloud into feature-20240104

master
blak-kong 2 years ago
commit 97e5081e9e

@ -88,7 +88,6 @@ public class SysTag extends BaseEntity
}
@NotBlank(message = "标签名称不能为空")
@Size(min = 0, max = 30, message = "标签名称长度不能超过30个字符")
public String getTagName()
{
return tagName;

@ -102,11 +102,21 @@ public class WxUserMemberVm extends BaseEntity {
*/
List<Integer> wecomTags;
/**
*
*/
Integer wecomTagNum;
/**
*
*/
List<Integer> miniProgramTags;
/**
*
*/
Integer miniProgramTagNum;
public WxUserMemberVm() {
@ -263,4 +273,19 @@ public class WxUserMemberVm extends BaseEntity {
this.miniProgramTags = miniProgramTags;
}
public Integer getWecomTagNum() {
return wecomTagNum;
}
public void setWecomTagNum(Integer wecomTagNum) {
this.wecomTagNum = wecomTagNum;
}
public Integer getMiniProgramTagNum() {
return miniProgramTagNum;
}
public void setMiniProgramTagNum(Integer miniProgramTagNum) {
this.miniProgramTagNum = miniProgramTagNum;
}
}

@ -3,6 +3,7 @@ package com.flossom.common.core.mapper;
import com.flossom.common.core.domain.entity.WxUserMember;
import com.flossom.common.core.domain.req.WxUserMemberVm;
import com.flossom.common.core.domain.ret.WxUserMemberRet;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -84,4 +85,8 @@ public interface WxUserMemberMapper {
List<WxUserMember> selectWxUserMemberByMobile(@Param("mobile") String mobile);
List<WxUserMember> selectWxUserMemberByIdList(@Param("userIdList") List<Integer> userIdList);
List<WxUserMemberRet> selectWxUserMemberRetByIdList(@Param("userIdList") List<Integer> userIdList);
List<WxUserMemberRet> selectWxUserMemberRetListByVm(WxUserMemberVm wxUserMemberVm);
}

@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="userPhone != null and userPhone != ''"> and user_phone = #{userPhone}</if>
<if test="userPhone != null and userPhone != ''"> and user_phone like concat('%', #{userPhone}, '%')</if>
<if test="source != null and source != ''"> and source = #{source}</if>
<if test="floatScore != null "> and float_score = #{floatScore}</if>
<if test="soureId != null "> and soure_id = #{soureId}</if>
@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and create_time &lt;= #{createTime}
</if>
</where>
order by create_time desc
</select>
<select id="selectWxUserIntegralLogById" parameterType="Long" resultMap="WxUserIntegralLogResult">

@ -38,6 +38,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark" />
</resultMap>
<resultMap type="WxUserMemberRet" id="WxUserMemberRetResult">
<result property="id" column="id" />
<result property="nickname" column="nickname" />
<result property="headimg" column="headimg" />
<result property="username" column="username" />
<result property="credit" column="credit" />
<result property="expireCredit" column="expire_credit" />
<result property="openid" column="openid" />
<result property="unionid" column="unionid" />
<result property="userType" column="user_type" />
<result property="level" column="level" />
<result property="mobile" column="mobile" />
<result property="provinceId" column="province_id" />
<result property="cityId" column="city_id" />
<result property="areaId" column="area_id" />
<result property="province" column="province" />
<result property="city" column="city" />
<result property="area" column="area" />
<result property="birthday" column="birthday" />
<result property="clock" column="clock" />
<result property="activity" column="activity" />
<result property="wechat" column="wechat" />
<result property="isAbutment" column="is_abutment" />
<result property="isCompleteInformation" column="is_complete_information" />
<result property="devicesNum" column="devices_num" />
<result property="loginTime" column="login_time" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectWxUserMemberVo">
select id, nickname, headimg, username, credit, expire_credit, openid, unionid, user_type, level, mobile, province_id, city_id, area_id, province, city, area, birthday, clock, activity, wechat, is_abutment, login_time, is_complete_information, devices_num, status, create_by, create_time, update_by, update_time, remark from wx_user_member
</sql>
@ -95,7 +129,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT <include refid="fieldList" />
<where>
<if test="nickname != null and nickname != ''"> and member.nickname like concat('%', #{nickname}, '%')</if>
<if test="creditStart != null and creditEnd != null"> and member.credit &gt;= #{creditStart} and member.credit &lt;= #{creditEnd}</if>
<if test="creditStart != null"> and member.credit &gt;= #{creditStart} </if>
<if test="creditEnd != null"> and member.credit &lt;= #{creditEnd}</if>
<if test="userType != null "> and member.user_type = #{userType}</if>
<if test="provinceId != null and provinceId != ''"> and member.province_id = #{provinceId}</if>
<if test="cityId != null and cityId != ''"> and member.city_id = #{cityId}</if>
@ -121,19 +156,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params != null and params.endTime != null">
and member.create_time &lt;= #{params.endTime}
</if>
<if test="deviceNumStart != null and deviceNumEnd != null"> and member.devices_num &gt;= #{deviceNumStart} and member.devices_num &lt;= #{deviceNumEnd}</if>
<if test="deviceNumStart != null"> and member.devices_num &gt;= #{deviceNumStart}</if>
<if test="deviceNumEnd != null"> and member.devices_num &lt;= #{deviceNumEnd}</if>
<if test="wecomTags != null and wecomTags.size > 0" >
and id in (
SELECT
DISTINCT user_id
user_id
FROM
wx_user_tag
WHERE
tag_id IN
type = 2
AND tag_id IN
<foreach item="wecomTag" collection="wecomTags" open="(" separator="," close=")">
#{wecomTag}
</foreach>
GROUP BY
user_id
HAVING
COUNT( DISTINCT tag_id ) = #{wecomTagNum}
)
</if>
<if test="miniProgramTags != null and miniProgramTags.size > 0" >
@ -143,10 +183,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
wx_user_tag
WHERE
tag_id IN
type = 1
AND tag_id IN
<foreach item="miniProgramTag" collection="miniProgramTags" open="(" separator="," close=")">
#{miniProgramTag}
</foreach>
GROUP BY
user_id
HAVING
COUNT( DISTINCT tag_id ) = #{miniProgramTagNum}
)
</if>
and member.status = 0
@ -310,5 +355,87 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</select>
<select id="selectWxUserMemberRetByIdList" resultMap="WxUserMemberRetResult">
SELECT <include refid="fieldList" />
where id in
<foreach item="id" collection="userIdList" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectWxUserMemberRetListByVm" resultMap="WxUserMemberRetResult">
SELECT <include refid="fieldList" />
<where>
<if test="nickname != null and nickname != ''"> and member.nickname like concat('%', #{nickname}, '%')</if>
<if test="creditStart != null"> and member.credit &gt;= #{creditStart} </if>
<if test="creditEnd != null"> and member.credit &lt;= #{creditEnd}</if>
<if test="userType != null "> and member.user_type = #{userType}</if>
<if test="provinceId != null and provinceId != ''"> and member.province_id = #{provinceId}</if>
<if test="cityId != null and cityId != ''"> and member.city_id = #{cityId}</if>
<if test="areaId != null and areaId != ''"> and member.area_id = #{areaId}</if>
<if test="birthday != null "> and member.birthday = #{birthday}</if>
<if test="id!=null and id !=''">
and
<foreach collection="id.split(',')" index="index" item="item" open="(" separator="OR"
close=")">
member.id LIKE concat('%', #{item}, '%')
</foreach>
</if>
<if test="mobile!=null and mobile !=''">
OR
<foreach collection="mobile.split(',')" index="index" item="item" open="(" separator="OR"
close=")">
member.mobile like concat('%', #{item}, '%')
</foreach>
</if>
<if test="params != null and params.beginTime != null">
and member.create_time &gt;= #{params.beginTime}
</if>
<if test="params != null and params.endTime != null">
and member.create_time &lt;= #{params.endTime}
</if>
<if test="deviceNumStart != null"> and member.devices_num &gt;= #{deviceNumStart}</if>
<if test="deviceNumEnd != null"> and member.devices_num &lt;= #{deviceNumEnd}</if>
<if test="wecomTags != null and wecomTags.size > 0" >
and id in (
SELECT
user_id
FROM
wx_user_tag
WHERE
type = 2
AND tag_id IN
<foreach item="wecomTag" collection="wecomTags" open="(" separator="," close=")">
#{wecomTag}
</foreach>
GROUP BY
user_id
HAVING
COUNT( DISTINCT tag_id ) = #{wecomTagNum}
)
</if>
<if test="miniProgramTags != null and miniProgramTags.size > 0" >
and id in (
SELECT
DISTINCT user_id
FROM
wx_user_tag
WHERE
type = 1
AND tag_id IN
<foreach item="miniProgramTag" collection="miniProgramTags" open="(" separator="," close=")">
#{miniProgramTag}
</foreach>
GROUP BY
user_id
HAVING
COUNT( DISTINCT tag_id ) = #{miniProgramTagNum}
)
</if>
and member.status = 0
</where>
order by member.id desc
</select>
</mapper>

@ -357,36 +357,34 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService {
@Override
public List<WxUserMemberRet> selectWxUserMemberRetList(WxUserMemberVm wxUserMemberVm) {
List<WxUserMemberRet> list = new ArrayList<>();
List<WxUserMember> wxUserMembers = wxUserMemberMapper.selectWxUserMemberListByVm(wxUserMemberVm);
if (wxUserMembers != null && wxUserMembers.size() > 0) {
WxUserMemberRet wxUserMemberRet;
for (WxUserMember wxUserMember : wxUserMembers) {
wxUserMemberRet = new WxUserMemberRet();
BeanUtils.copyProperties(wxUserMember, wxUserMemberRet);
if (wxUserMemberVm.getWecomTags() != null) {
wxUserMemberVm.setWecomTagNum(wxUserMemberVm.getWecomTags().size());
}
if (wxUserMemberVm.getMiniProgramTags() != null) {
wxUserMemberVm.setMiniProgramTagNum(wxUserMemberVm.getMiniProgramTags().size());
}
List<WxUserMemberRet> wxUserMemberRetList = wxUserMemberMapper.selectWxUserMemberRetListByVm(wxUserMemberVm);
if (wxUserMemberRetList != null && wxUserMemberRetList.size() > 0) {
for (WxUserMemberRet wxUserMemberRet : wxUserMemberRetList) {
WxUserTag wxUserTag = new WxUserTag();
wxUserTag.setUserId(wxUserMember.getId());
wxUserTag.setUserId(wxUserMemberRet.getId());
wxUserTag.setType(TagTypeStatus.MINI_PROGRAM.getCode());
wxUserMemberRet.setMiniProgramTags(wxUserTagMapper.selectWxUserTagList(wxUserTag));
wxUserTag.setType(TagTypeStatus.ENTERPRISE_WECHAT.getCode());
wxUserMemberRet.setWecomTags(wxUserTagMapper.selectWxUserTagList(wxUserTag));
list.add(wxUserMemberRet);
}
}
return list;
return wxUserMemberRetList;
}
@Override
public List<WxUserMemberRet> selectWxUserMemberByIdList(List<Integer> userIdList) {
List<WxUserMemberRet> list = new ArrayList<>();
List<WxUserMember> wxUserMembers = wxUserMemberMapper.selectWxUserMemberByIdList(userIdList);
if (wxUserMembers != null && wxUserMembers.size() > 0) {
WxUserMemberRet wxUserMemberRet;
for (WxUserMember wxUserMember : wxUserMembers) {
wxUserMemberRet = new WxUserMemberRet();
BeanUtils.copyProperties(wxUserMember, wxUserMemberRet);
List<WxUserMemberRet> wxUserMemberRetList = wxUserMemberMapper.selectWxUserMemberRetByIdList(userIdList);
if (wxUserMemberRetList != null && wxUserMemberRetList.size() > 0) {
for (WxUserMemberRet wxUserMemberRet : wxUserMemberRetList) {
WxUserTag wxUserTag = new WxUserTag();
wxUserTag.setUserId(wxUserMember.getId());
wxUserTag.setUserId(wxUserMemberRet.getId());
wxUserTag.setType(TagTypeStatus.MINI_PROGRAM.getCode());
wxUserMemberRet.setMiniProgramTags(wxUserTagMapper.selectWxUserTagList(wxUserTag));
wxUserTag.setType(TagTypeStatus.ENTERPRISE_WECHAT.getCode());

@ -87,8 +87,8 @@
<el-table-column label="用户手机号码" align="center" prop="userPhone" />
<el-table-column label="类型" align="center" prop="source" >
<template slot-scope="scope">
<span v-show="scope.row.source == 1"></span>
<span v-show="scope.row.source == 2"></span>
<span v-show="scope.row.source == 1"></span>
<span v-show="scope.row.source == 2"></span>
</template>
</el-table-column>
<el-table-column label="浮动分数" align="center" prop="floatScore" >
@ -193,7 +193,7 @@ export default {
pageSize: 10,
userName: null,
userPhone: null,
source: null,
source: '',
floatScore: null,
soureId: null,
remarkContent: null,

@ -21,8 +21,8 @@
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"

@ -16,7 +16,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="用户类型" prop="userType">
<el-select v-model="queryParams.userType" @keyup.enter.native="handleQuery" style="width: 50%">
<el-option label="全部" value=""></el-option>
<el-option label="全部" :value="null"></el-option>
<el-option label="会员" :value="1"></el-option>
<el-option label="游客" :value="0"></el-option>
</el-select>
@ -99,6 +99,7 @@
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
value-format="yyyy-MM-dd HH:mm:ss"
end-placeholder="结束日期"
align="right">
</el-date-picker>
@ -114,14 +115,18 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="仪器数量" prop="credit">
<el-input-number v-model="queryParams.deviceNumStart" @keyup.enter.native="handleQuery"></el-input-number>
<el-input-number :min="0" :precision="0" v-model="queryParams.deviceNumStart"
@keyup.enter.native="handleQuery"></el-input-number>
<el-input-number v-model="queryParams.deviceNumEnd" @keyup.enter.native="handleQuery"></el-input-number>
<el-input-number :min="0" :precision="0" v-model="queryParams.deviceNumEnd"
@keyup.enter.native="handleQuery"></el-input-number>
</el-form-item>
<el-form-item label="积分范围" prop="credit">
<el-input-number v-model="queryParams.creditStart" @keyup.enter.native="handleQuery"></el-input-number>
<el-input-number :min="0" :precision="0" v-model="queryParams.creditStart"
@keyup.enter.native="handleQuery"></el-input-number>
<el-input-number v-model="queryParams.creditEnd" @keyup.enter.native="handleQuery"></el-input-number>
<el-input-number :min="0" :precision="0" v-model="queryParams.creditEnd"
@keyup.enter.native="handleQuery"></el-input-number>
</el-form-item>
<!-- <el-form-item label="购买渠道" prop="purchaseChannels">-->
<!-- <el-select v-model="queryParams.purchaseChannels" multiple placeholder="请选择">-->
@ -199,7 +204,7 @@
<!-- 显示表格 -->
<el-table v-loading="loading" :data="memberList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column fixed="left" type="selection" width="55" align="center"/>
<el-table-column label="头像" align="center">
<template slot-scope="scope">
<el-avatar shape="circle" :size="50" :src="scope.row.headimg"/>
@ -275,7 +280,7 @@
</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleUpdate(scope.row)" v-hasPermi="['system:member:edit']">
</el-button>
@ -461,7 +466,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelIntegralDialog(true)"> </el-button>
<el-button @click="cancelIntegralDialog(false)"> </el-button>
<el-button type="primary" @click="submitBatchOperate"> </el-button>
</div>
</el-dialog>
@ -470,18 +475,19 @@
<el-dialog :title="title" :visible.sync="batchRemarkVisible" width="50%" :before-close="cancelRemarkDialog">
<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-input v-model="remarkForm.content" type="textarea" placeholder="请输入备注" show-word-limit minlength="1"
maxlength="100"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelRemarkDialog(true)"> </el-button>
<el-button @click="cancelRemarkDialog(false)"> </el-button>
<el-button type="primary" @click="submitBatchOperate"> </el-button>
</div>
</el-dialog>
<!-- 话术批量操作 -->
<el-dialog :title="title" :visible.sync="batchScriptVisible" width="600px" append-to-body
:before-close="cancelscriptDialog">
:before-close="cancelScriptDialog">
<el-form ref="scriptForm" :model="scriptForm" :rules="batchScriptRules" label-width="150px">
<el-row>
<el-col :span="24">
@ -504,7 +510,7 @@
</el-col>
<el-col :span="40">
<el-form-item label="话术通知内容" prop="scriptContent">
<el-input v-model="scriptForm.scriptContent"/>
<el-input v-model="scriptForm.scriptContent" disabled/>
</el-form-item>
</el-col>
</el-row>
@ -512,17 +518,19 @@
<el-row v-if="scriptForm.isCustom == 1">
<el-col :span="24">
<el-form-item label="话术标题" prop="titile">
<el-input v-model="scriptForm.titile" placeholder="请输入话术标题"/>
<el-input v-model="scriptForm.titile" placeholder="请输入话术标题" show-word-limit minlength="1"
maxlength="50"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="话术内容" prop="content">
<el-input v-model="scriptForm.content" type="textarea" placeholder="请输入话术内容"/>
<el-input v-model="scriptForm.content" type="textarea" placeholder="请输入话术内容" show-word-limit
minlength="1" maxlength="500"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="小程序标签" prop="tagIdArray" label-width="90px">
<treeselect v-model="tagIdArray" :options="chatTagOptions" :multiple="true" :show-count="true"
<treeselect v-model="scriptForm.tagIds" :options="chatTagOptions" :multiple="true" :show-count="true"
placeholder="请选择小程序标签" :disable-branch-nodes="true"/>
</el-form-item>
</el-col>
@ -577,7 +585,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBatchOperate"> </el-button>
<el-button @click="cancelscriptDialog"> </el-button>
<el-button @click="cancelScriptDialog(false)"> </el-button>
</div>
</el-dialog>
@ -633,7 +641,7 @@
<template>
<el-table :data="userIntegralLogQuery.userIntegralLogList" @sort-change="userIntegralSortChang"
:default-sort="{prop: 'createTime', order: 'desc'}" :stripe="true" style="width: 100%">
<el-table-column type="index" width="50"></el-table-column>
<el-table-column type="index" width="50" label="序号"></el-table-column>
<el-table-column prop="source" label="类型" width="100px">
<template slot-scope="scope">
<span v-show="scope.row.source == 1"></span>
@ -837,10 +845,11 @@ export default {
redirectUrl: null,
videoNo: null,
feedId: null,
tagNames: [],
tagIds: [],
//
scriptContent: null,
//
tagIds: [],
tagNames: [],
},
//
userScriptLogVisible: false,
@ -887,7 +896,6 @@ export default {
createTime: null,
wecomTags: null,
miniProgramTags: null,
},
//
queryParams: {
@ -1054,31 +1062,23 @@ export default {
this.provinceList = Response.data
})
},
getCityList(pid, isSave) {
getCityList(pid) {
if (pid == '') {
return;
}
this.queryParams.cityId = null;
this.queryParams.areaId = null;
getRegionByPid(pid).then(Response => {
if (isSave) {
this.saveCityList = Response.data;
} else {
this.cityList = Response.data;
}
})
},
getAreaByPid(pid, isSave) {
getAreaByPid(pid) {
if (pid == '') {
return;
}
this.queryParams.areaId = null;
getRegionByPid(pid).then(Response => {
if (isSave) {
this.saveAreaList = Response.data;
} else {
this.areaList = Response.data;
}
})
},
// -
@ -1104,7 +1104,7 @@ export default {
this.form.cityId = null;
this.form.areaId = null;
getRegionByPid(pid).then(Response => {
this.saveCityList = Response.data;
this.saveCityList = Response.data;
})
},
getSaveAreaByPid(pid) {
@ -1113,7 +1113,7 @@ export default {
}
this.form.areaId = null;
getRegionByPid(pid).then(Response => {
this.saveAreaList = Response.data;
this.saveAreaList = Response.data;
})
},
clearSaveOption(option) {
@ -1136,78 +1136,95 @@ export default {
this.reset();
},
//
cancelMiniProgramDialog(isclose) {
cancelMiniProgramDialog(isClose) {
this.title = null;
this.miniProgramForm.tagIdArray = [];
if (isclose) {
if (isClose) {
this.batchMiniProgramVisible = false;
}
},
cancelIntegralDialog() {
cancelIntegralDialog(isClose) {
this.integralForm.source = null;
this.integralForm.floatScore = null;
this.integralForm.remarkContent = "后台操作";
this.batchIntegralVisible = false;
if (isClose) {
this.batchIntegralVisible = false;
}
},
cancelRemarkDialog() {
cancelRemarkDialog(isClose) {
this.remarkForm.content = null;
this.batchRemarkVisible = false;
if (isClose) {
this.batchRemarkVisible = false;
}
},
cancelUserScriptLogDialog() {
this.userScriptLogVisible = false;
this.userScriptLogQuery.total = 0;
this.userScriptLogQuery.pageNum = 1;
this.userScriptLogQuery.pageSize = 10;
this.userScriptLogQuery.wxUserId = null;
this.userScriptLogQuery.userScriptList = null;
this.userScriptLogQuery = {
total: 0,
pageNum: 1,
pageSize: 10,
wxUserId: null,
userScriptList: null,
orderByColumn: "createTime",
isAsc: "desc"
}
},
cancelUserIntegralLogDialog() {
this.userIntegralLogVisible = false;
this.userIntegralLogQuery.total = 0
this.userIntegralLogQuery.pageNum = 1;
this.userIntegralLogQuery.pageSize = 10;
this.userIntegralLogQuery.userId = null;
this.userIntegralLogQuery.userIntegralLogList = null;
this.userIntegralLogQuery = {
total: 0,
pageNum: 1,
pageSize: 10,
userIntegralLogList: null,
userId: null,
orderByColumn: "createTime",
isAsc: "desc"
}
},
cancelExportFieldsDialog() {
this.allFields = false;
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;
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,
}
},
cancelscriptDialog() {
this.scriptForm.isCustom = null;
this.scriptForm.scriptName = null;
this.scriptForm.titile = null;
this.scriptForm.content = null;
this.scriptForm.tagType = null;
this.scriptForm.type = null;
this.scriptForm.link = null;
this.scriptForm.linkParams = null;
this.scriptForm.redirectAppid = null;
this.scriptForm.redirectUrl = null;
this.scriptForm.videoNo = null;
this.scriptForm.feedId = null;
this.scriptForm.tagNames = null;
this.scriptForm.tagIds = null;
this.scriptForm.scriptContent = null;
this.tagIdArray = [];
this.scriptForm.scriptTemplateId = null;
this.scriptForm.scriptContent = null;
this.batchScriptVisible = false;
cancelScriptDialog(isClose) {
this.scriptForm = {
userIdList: null,
isCustom: 0,
scriptTemplateId: null,
scriptName: null,
titile: null,
content: null,
tagType: null,
type: null,
link: null,
linkParams: null,
redirectAppid: null,
redirectUrl: null,
videoNo: null,
feedId: null,
scriptContent: null,
tagNames: [],
tagIds: [],
}
if (isClose) {
this.batchScriptVisible = false;
}
},
/** 查询部门下拉树结构 */
getDeptTree() {
@ -1221,8 +1238,8 @@ export default {
this.scriptOptions = response.data;
});
},
//
clearScript() {
//
if (this.scriptForm.isCustom == 0) {
this.scriptForm.scriptName = null;
this.scriptForm.titile = null;
@ -1237,13 +1254,12 @@ export default {
this.scriptForm.feedId = null;
this.scriptForm.tagNames = null;
this.scriptForm.tagIds = null;
this.scriptForm.scriptContent = null;
this.tagIdArray = [];
}
//
if (this.scriptForm.isCustom == 1) {
this.scriptForm.scriptTemplateId = null;
this.scriptForm.scriptContent = null;
this.scriptForm.type = 0;
}
},
selectTree(raw, instanceId) {
@ -1265,8 +1281,11 @@ export default {
password: null,
userQr: null,
province: null,
provinceId: null,
city: null,
cityId: null,
area: null,
areaId: null,
birthday: null,
clock: null,
activity: null,
@ -1285,6 +1304,52 @@ export default {
};
this.resetForm("form");
},
//
resetQueryParams() {
//
this.queryParams = {
pageNum: 1,
pageSize: 10,
nickname: null,
headimg: null,
username: null,
deviceNumStart: undefined,
deviceNumEnd: undefined,
creditStart: undefined,
creditEnd: undefined,
openid: null,
unionid: null,
userType: null,
level: null,
mobile: null,
password: null,
userQr: null,
provinceId: null,
province: null,
cityId: null,
city: null,
areaId: null,
area: null,
birthday: null,
clock: null,
activity: null,
wechat: null,
code: null,
isAbutment: null,
collagenDay: null,
collagenMount: null,
loginTime: null,
status: null,
// createTime: [],
devicesName: [], //
wecomTags: [], //
miniProgramTags: [], //
purchaseChannels: [], //
isCompleteInformation: null, //
wxUserRemarkList: null, //
};
this.resetForm("queryForm");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -1293,7 +1358,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.resetQueryParams();
this.handleQuery();
},
/** 批量操作按钮,显示批量操作弹窗 */
@ -1315,22 +1380,18 @@ export default {
return
}
if (this.batchOperateValue == 1) {
console.log("批量添加小程序标签");
this.title = "添加小程序标签";
}
if (this.batchOperateValue == 2) {
console.log("批量删除小程序标签");
this.title = "删除小程序标签";
}
this.batchMiniProgramVisible = true;
}
if (this.batchOperateValue == 3 || this.batchOperateValue == 4) {
if (this.batchOperateValue == 3) {
console.log("全量添加小程序标签");
this.title = "添加小程序标签";
}
if (this.batchOperateValue == 4) {
console.log("全量删除小程序标签");
this.title = "添加小程序标签";
}
this.batchMiniProgramVisible = true;
@ -1338,7 +1399,6 @@ export default {
/* 批量操作:加减分 */
if (this.batchOperateValue == 5) {
console.log("批量加减积分");
if (this.ids.length == 0) {
this.$message({
message: '请选择要操作的数据',
@ -1347,15 +1407,15 @@ export default {
return
}
this.batchIntegralVisible = true;
this.title = "批量加减积分";
}
if (this.batchOperateValue == 6) {
console.log("全量加减积分");
this.batchIntegralVisible = true;
this.title = "全量加减积分";
}
/* 批量操作:发送话术 */
if (this.batchOperateValue == 7) {
console.log("批量发送话术");
if (this.ids.length == 0) {
this.$message({
message: '请选择要操作的数据',
@ -1364,15 +1424,15 @@ export default {
return
}
this.batchScriptVisible = true;
this.title = "批量发送话术";
}
if (this.batchOperateValue == 8) {
console.log("全量发送话术");
this.batchScriptVisible = true;
this.title = "全量发送话术";
}
/* 批量操作: 备注 */
if (this.batchOperateValue == 9) {
console.log("批量备注");
if (this.ids.length == 0) {
this.$message({
message: '请选择要操作的数据',
@ -1381,15 +1441,15 @@ export default {
return
}
this.batchRemarkVisible = true;
this.title = "批量备注";
}
if (this.batchOperateValue == 10) {
console.log("全量备注");
this.batchRemarkVisible = true;
this.title = "全量备注";
}
/* 批量操作:注销账号 */
if (this.batchOperateValue == 11) {
console.log("注销账号");
if (this.ids.length == 0) {
this.$message({
message: '请选择要操作的数据',
@ -1413,7 +1473,6 @@ export default {
/* 批量操作:导出数据 */
if (this.batchOperateValue == 12) {
console.log("导出数据");
if (this.ids.length == 0) {
this.$message({
message: '请选择要操作的数据',
@ -1424,7 +1483,6 @@ export default {
this.exportFieldsVisible = true;
}
if (this.batchOperateValue == 13) {
console.log("导出全量数据");
this.exportFieldsVisible = true;
}
}
@ -1446,17 +1504,17 @@ export default {
this.reset();
const id = row.id || this.ids
getMember(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改用户";
//
if (this.form.provinceId != null) {
this.getCityList(this.form.provinceId, true);
if (response.data.provinceId != null) {
this.getSaveCityList(response.data.provinceId);
}
if (this.form.areaId != null) {
this.getAreaByPid(this.form.cityId, true);
if (response.data.areaId != null) {
this.getSaveAreaByPid(response.data.cityId);
}
this.form = response.data;
this.open = true;
this.title = "修改用户";
});
},
//
@ -1616,17 +1674,15 @@ export default {
/* 批量操作:发送话术 */
if (this.batchOperateValue == 7) {
this.scriptForm.userIdList = this.ids;
this.scriptForm.tagIds = this.tagIdArray;
batchSendScript(this.scriptForm).then(Response => {
this.$modal.msgSuccess("批量发送话术成功");
this.cancelscriptDialog(true);
this.cancelScriptDialog(true);
})
}
if (this.batchOperateValue == 8) {
this.scriptForm.tagIds = this.tagIdArray;
allSendScript(this.scriptForm, this.queryParams).then(Response => {
this.$modal.msgSuccess("全量发送话术成功");
this.cancelscriptDialog(true);
this.cancelScriptDialog(true);
})
}
@ -1698,7 +1754,7 @@ export default {
if (this.form.wxUserRemarkList != null && this.form.wxUserRemarkList.length > 0) {
let that = this;
this.form.wxUserRemarkList.forEach(function (item) {
if (item.id = that.editRemarkForm.id) {
if (item.id == that.editRemarkForm.id) {
item.content = that.editRemarkForm.content;
}
})

@ -111,7 +111,7 @@
<el-row>
<el-col :span="24" v-if="topAdd">
<el-form-item label="话术名称" prop="scriptName">
<el-input v-model="form.scriptName" placeholder="请输入话术名称" />
<el-input v-model="form.scriptName" placeholder="请输入话术名称" maxlength="50" show-word-limit/>
</el-form-item>
</el-col>
<el-col :span="24" v-if="!topAdd">
@ -417,7 +417,17 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除名称为"' + row.titile + '"的数据项?').then(function() {
let tip;
let title;
if(row.titile == null) {
tip = row.scriptName
title = '话术标题';
} else {
tip = row.titile
title = '话术名称';
}
this.$modal.confirm('是否确认删除' + title + '为"' + tip + '"的数据项?').then(function() {
return delTemplate(row.id);
}).then(() => {
this.getList();

@ -108,7 +108,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="标签名称" prop="tagName">
<el-input v-model="form.tagName" placeholder="请输入标签名称" maxlength="100"/>
<el-input v-model="form.tagName" placeholder="请输入标签名称"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -274,10 +274,25 @@ export default {
},
/** 提交按钮 */
submitForm: function() {
if(this.form.parentId != null) {
if(this.form.tagName.length > 100) {
this.$modal.msgError("标签名称不能大于100个字符");
return;
}
} else {
if(this.form.tagName.length > 50) {
this.$modal.msgError("标签名称不能大于50个字符");
return;
}
}
this.$refs["form"].validate(valid => {
if (valid) {
this.form.type = 1;
if (this.form.id != undefined) {
if(this.form.parentId == null) {
this.$modal.msgError("请选择上级标签");
return;
}
updateDept(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;

Loading…
Cancel
Save