@ -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 = " "> < / e l - o p t i o n >
< el -option label = "全部" :value ="null "> < / e l - o p t i o n >
< el -option label = "会员" :value ="1" > < / e l - o p t i o n >
< el -option label = "游客" :value ="0" > < / e l - o p t i o n >
< / e l - s e l e c t >
@ -99,6 +99,7 @@
type = "datetimerange"
range - separator = "至"
start - placeholder = "开始日期"
value - format = "yyyy-MM-dd HH:mm:ss"
end - placeholder = "结束日期"
align = "right" >
< / e l - d a t e - p i c k e r >
@ -114,14 +115,18 @@
<!-- < / e l - s e l e c t > - - >
<!-- < / e l - f o r m - i t e m > - - >
< 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" > < / e l - i n p u t - n u m b e r >
至
< 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" > < / e l - i n p u t - n u m b e r >
< / e l - f o r m - i t e m >
< 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" > < / e l - i n p u t - n u m b e r >
至
< 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" > < / e l - i n p u t - n u m b e r >
< / e l - f o r m - i t e m >
<!-- < 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 @@
< / e l - b u t t o n >
< / template >
< / e l - t a b l e - c o l u m n >
< 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']" > 查 看
< / e l - b u t t o n >
@ -461,7 +466,7 @@
< / e l - f o r m - i t e m >
< / e l - f o r m >
< div slot = "footer" class = "dialog-footer" >
< el -button @click ="cancelIntegralDialog( tru e)"> 重 置 < / el -button >
< el -button @click ="cancelIntegralDialog( fals e)"> 重 置 < / el -button >
< el -button type = "primary" @click ="submitBatchOperate" > 确 定 < / el -button >
< / div >
< / e l - d i a l o g >
@ -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" / >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< div slot = "footer" class = "dialog-footer" >
< el -button @click ="cancelRemarkDialog( tru e)"> 重 置 < / el -button >
< el -button @click ="cancelRemarkDialog( fals e)"> 重 置 < / el -button >
< el -button type = "primary" @click ="submitBatchOperate" > 确 定 < / el -button >
< / div >
< / e l - d i a l o g >
<!-- 话术批量操作 -- >
< el -dialog :title ="title" :visible.sync ="batchScriptVisible" width = "600px" append -to -body
: before - close = "cancel s criptDialog">
: before - close = "cancel S criptDialog">
< el -form ref = "scriptForm" :model ="scriptForm" :rules ="batchScriptRules" label -width = " 150px " >
< el -row >
< el -col :span ="24" >
@ -504,7 +510,7 @@
< / e l - c o l >
< el -col :span ="40" >
< el -form -item label = "话术通知内容" prop = "scriptContent" >
< el -input v -model = " scriptForm.scriptContent " / >
< el -input v -model = " scriptForm.scriptContent " disabled / >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -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" / >
< / e l - f o r m - i t e m >
< / e l - c o l >
< 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" / >
< / e l - f o r m - i t e m >
< / e l - c o l >
< 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" / >
< / e l - f o r m - i t e m >
< / e l - c o l >
@ -577,7 +585,7 @@
< / e l - f o r m >
< div slot = "footer" class = "dialog-footer" >
< el -button type = "primary" @click ="submitBatchOperate" > 确 定 < / el -button >
< el -button @click ="cancel scriptDialog "> 取 消 < / el -button >
< el -button @click ="cancel ScriptDialog(false) "> 取 消 < / el -button >
< / div >
< / e l - d i a l o g >
@ -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" > < / e l - t a b l e - c o l u m n >
< el -table -column type = "index" width = "50" label = "序号" > < / e l - t a b l e - c o l u m n >
< 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 ( is c lose) {
cancelMiniProgramDialog ( is C lose) {
this . title = null ;
this . miniProgramForm . tagIdArray = [ ] ;
if ( is c lose) {
if ( is C lose) {
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 ,
/ / c r e a t e T i m e : [ ] ,
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 . reset Form( "queryForm" ) ;
this . reset QueryParams( ) ;
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 . get CityList( this . form . provinceId , true ) ;
if ( response . data . provinceId != null ) {
this . getSaveCityList ( response . data . provinceId ) ;
}
if ( this . form . areaId != null ) {
this . get AreaByPid( this . form . cityId , true ) ;
if ( response . data . areaId != null ) {
this . get SaveAreaByPid( 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 . cancel s criptDialog( true ) ;
this . cancel S criptDialog( true ) ;
} )
}
if ( this . batchOperateValue == 8 ) {
this . scriptForm . tagIds = this . tagIdArray ;
allSendScript ( this . scriptForm , this . queryParams ) . then ( Response => {
this . $modal . msgSuccess ( "全量发送话术成功" ) ;
this . cancel s criptDialog( true ) ;
this . cancel S criptDialog( 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 ;
}
} )