Commit dfab5df0 by zhangmeng

fix:修改了props sendType传值

parent b1626751
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"_from": "@gic-test/vue-gic-confirm-people@^1.0.2",
"_id": "@gic-test/vue-gic-confirm-people@1.0.2",
"_inBundle": false,
"_integrity": "sha1-AFkmY2d2PXgz7ELwGQCfKSryzBY=",
"_location": "/@gic-test/vue-gic-confirm-people",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@gic-test/vue-gic-confirm-people@^1.0.2",
"name": "@gic-test/vue-gic-confirm-people",
"escapedName": "@gic-test%2fvue-gic-confirm-people",
"scope": "@gic-test",
"rawSpec": "^1.0.2",
"saveSpec": null,
"fetchSpec": "^1.0.2"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "http://www.gicdev.com:7001/@gic-test/vue-gic-confirm-people/download/@gic-test/vue-gic-confirm-people-1.0.2.tgz",
"_shasum": "0059266367763d7833ec42f019009f292af2cc16",
"_spec": "@gic-test/vue-gic-confirm-people@^1.0.2",
"_where": "C:\\Users\\Administrator\\Desktop\\private",
"browserslist": [ "browserslist": [
"> 1%", "> 1%",
"last 2 versions", "last 2 versions",
...@@ -61,5 +36,5 @@ ...@@ -61,5 +36,5 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules", "build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot" "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot"
}, },
"version": "1.0.3" "version": "1.0.5"
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<el-table-column type="selection" width="55" :selectable="selectable" ></el-table-column> <el-table-column type="selection" width="55" :selectable="selectable" ></el-table-column>
<el-table-column :render-header="renderHeader" min-width="120" :show-overflow-tooltip="true"> <el-table-column :render-header="renderHeader" min-width="120" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<img class="avatar-img" style="vertical-align: middle;" :src="scope.row.photoUrl || avatar" width="40px" height="40px" alt="" srcset=""> <img class="avatar-img" style="vertical-align: middle;" :src="filterAvatar(scope.row.photoUrl)" width="40px" height="40px" alt="" srcset="">
<span class="avatar"> <span class="avatar">
<p>{{ scope.row.name || '--' }}</p> <p>{{ scope.row.name || '--' }}</p>
<p style="color:#909399; font-size:13px;">{{ scope.row.cardNo || '--'}}</p> <p style="color:#909399; font-size:13px;">{{ scope.row.cardNo || '--'}}</p>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="会员信息" min-width="120" :show-overflow-tooltip="true"> <el-table-column label="会员信息" min-width="120" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<img class="avatar-img" style="vertical-align: middle;" :src="scope.row.photoUrl || avatar" width="40px" height="40px" alt="" srcset=""> <img class="avatar-img" style="vertical-align: middle;" :src="filterAvatar(scope.row.photoUrl)" width="40px" height="40px" alt="" srcset="">
<span class="avatar"> <span class="avatar">
<p>{{ scope.row.name || '--' }}</p> <p>{{ scope.row.name || '--' }}</p>
<p style="color:#909399; font-size:13px;">{{ scope.row.cardNo || '--' }}</p> <p style="color:#909399; font-size:13px;">{{ scope.row.cardNo || '--' }}</p>
...@@ -68,7 +68,11 @@ function uniqueByType(arr, type) { ...@@ -68,7 +68,11 @@ function uniqueByType(arr, type) {
} }
let allList = []; let allList = [];
let sendTypeTips = {
card:'',
wechat:'未关注公众号的用户不可选择',
message:'没有手机号的用户不可选择'
};
export default { export default {
name:'vue-gic-confirm-people', name:'vue-gic-confirm-people',
props:{ props:{
...@@ -82,10 +86,15 @@ export default { ...@@ -82,10 +86,15 @@ export default {
return [] return []
} }
}, },
onlyWxMember:{ /* 发送类型 卡券 短信 微信
type:Number, * 卡券 不需要提示 要判断是否有openid row.openid
default:1 * 微信 需要提示(未关注公众号的用户不可选择) 是否关注 row.attentionStatus === 1
}, * 短信 需要提示(没有手机号的用户不可选择) 要判断是否有手机号码 row.phoneNumber
*/
sendType:{
type:String,
default:'card'
}
}, },
data() { data() {
return { return {
...@@ -109,6 +118,9 @@ export default { ...@@ -109,6 +118,9 @@ export default {
} }
}, },
methods:{ methods:{
filterAvatar(img) {
return img?img.replace(/^http(s)?/,'https'):this.avatar;
},
handleSelectionChange(val) { handleSelectionChange(val) {
// console.log(val) // console.log(val)
this.leftSelected = val; this.leftSelected = val;
...@@ -132,7 +144,7 @@ export default { ...@@ -132,7 +144,7 @@ export default {
this.leftSelected = [] this.leftSelected = []
let params = { let params = {
searchParams:this.keyWord, searchParams:this.keyWord,
onlyWxMember:this.onlyWxMember, onlyWxMember: this.sendType === 'wechat' ? 1 : 0 ,
requestProject:'gic-web' requestProject:'gic-web'
} }
this.axios.post('/api-marketing/member-search-engine',qs.stringify(params), this.axios.post('/api-marketing/member-search-engine',qs.stringify(params),
...@@ -176,12 +188,23 @@ export default { ...@@ -176,12 +188,23 @@ export default {
renderHeader(h,{column,$index}) { renderHeader(h,{column,$index}) {
return h('span',[ return h('span',[
h('span',{style:'font-weight:500;'},'会员信息'), h('span',{style:'font-weight:500;'},'会员信息'),
h('span',{style:'font-weight:500;font-size:12px;color:#909399;margin-left:5px;'},this.onlyWxMember?'未关注公众号用户不可选择':'') h('span',{style:'font-weight:500;font-size:12px;color:#909399;margin-left:5px;'},sendTypeTips[this.sendType])
], ])
)
}, },
selectable(row,index) { selectable(row,index) {
return !this.onlyWxMember || 1 === row.attentionStatus; let selectFlag = true;
switch(this.sendType) {
case 'message':
selectFlag = !!row.phoneNumber;
break;
case 'wecaht':
selectFlag = row.attentionStatus === 1;
break;
case 'card':
selectFlag = !!row.openid;
break;
}
return selectFlag;
} }
} }
} }
......
...@@ -92,7 +92,7 @@ module.exports = { ...@@ -92,7 +92,7 @@ module.exports = {
} }
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map' module.exports.devtool = false
// http://vue-loader.vuejs.org/en/workflow/production.html // http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([ module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({ new webpack.DefinePlugin({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment