Commit dfab5df0 by zhangmeng

fix:修改了props sendType传值

parent b1626751
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("vue-gic-confirm-people",[],t):"object"==typeof exports?exports["vue-gic-confirm-people"]=t():e["vue-gic-confirm-people"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=3)}([function(e,t,r){"use strict";function n(e,t){for(var r=[],n={},i=0;i<e.length;i++)n[e[i][t]]||(r.push(e[i]),n[e[i][t]]=1);return r}var i=r(11),o=r.n(i),a=[];t.a={name:"vue-gic-confirm-people",props:{idType:{type:String,default:"openId"},list:{type:Array,default:function(){return[]}},onlyWxMember:{type:Number,default:1}},data:function(){return{loading:!1,keyWord:"",keyWordRight:"",leftList:[],rightList:[],leftSelected:[],rightSelected:[],avatar:r(14)}},watch:{rightList:function(e){var t=this;this.$emit("get-data",e.map(function(e){return e[t.idType]}).join(","))},list:function(e){a=this.rightList=e.slice()}},methods:{handleSelectionChange:function(e){this.leftSelected=e},handleSelectionChangeRight:function(e){this.rightSelected=e},toRight:function(){var e=this;this.leftSelected.map(function(t){e.rightList.indexOf(t)<0&&e.rightList.push(t)}),console.log(this.rightList.map(function(e){return e.memberId})),a=this.rightList=n(this.rightList,"memberId")},loadList:function(){var e=this;this.loading=!0,this.leftSelected=[];var t={searchParams:this.keyWord,onlyWxMember:this.onlyWxMember,requestProject:"gic-web"};this.axios.post("/api-marketing/member-search-engine",o.a.stringify(t),{}).then(function(t){0===t.data.errorCode&&t.data.result&&(e.leftList=t.data.result),e.loading=!1})},removeAll:function(){var e=this.rightList.slice();this.rightSelected.map(function(t){var r=e.indexOf(t);r>-1&&e.splice(r,1)}),a=this.rightList=e},remove:function(e){this.rightList.splice(e,1),a.splice(e,1)},filterRight:function(){var e=this;if(this.keyWordRight){var t=Object.assign([],this.rightList),r=t.filter(function(t){var r=!1;return t.cardNo&&(r=t.cardNo.indexOf(e.keyWordRight)>-1),t.memberName&&(r=t.memberName.indexOf(e.keyWordRight)>-1),r});this.rightList=r}else this.rightList=Object.assign([],a)},renderHeader:function(e,t){t.column,t.$index;return e("span",[e("span",{style:"font-weight:500;"},"会员信息"),e("span",{style:"font-weight:500;font-size:12px;color:#909399;margin-left:5px;"},this.onlyWxMember?"未关注公众号用户不可选择":"")])},selectable:function(e,t){return!this.onlyWxMember||1===e.attentionStatus}}}},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],i=0;i<t.length;++i)void 0!==t[i]&&n.push(t[i]);r.obj[r.prop]=n}}return t},a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},l=function e(t,r,i){if(!r)return t;if("object"!=typeof r){if(Array.isArray(t))t.push(r);else{if("object"!=typeof t)return[t,r];(i.plainObjects||i.allowPrototypes||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if("object"!=typeof t)return[t].concat(r);var o=t;return Array.isArray(t)&&!Array.isArray(r)&&(o=a(t,i)),Array.isArray(t)&&Array.isArray(r)?(r.forEach(function(r,o){n.call(t,o)?t[o]&&"object"==typeof t[o]?t[o]=e(t[o],r,i):t.push(r):t[o]=r}),t):Object.keys(r).reduce(function(t,o){var a=r[o];return n.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t},o)},s=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},c=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},u=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var o=t.charCodeAt(n);45===o||46===o||95===o||126===o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?r+=t.charAt(n):o<128?r+=i[o]:o<2048?r+=i[192|o>>6]+i[128|63&o]:o<55296||o>=57344?r+=i[224|o>>12]+i[128|o>>6&63]+i[128|63&o]:(n+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(n)),r+=i[240|o>>18]+i[128|o>>12&63]+i[128|o>>6&63]+i[128|63&o])}return r},d=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],a=i.obj[i.prop],l=Object.keys(a),s=0;s<l.length;++s){var c=l[s],u=a[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:a,prop:c}),r.push(u))}return o(t)},f=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},p=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))};e.exports={arrayToObject:a,assign:s,compact:d,decode:c,encode:u,isBuffer:p,isRegExp:f,merge:l}},function(e,t,r){"use strict";var n=String.prototype.replace,i=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),i={install:function(e,t){e.component(n.a.name,n.a)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(i),t.default=i},function(e,t,r){"use strict";function n(e){r(5)}var i=r(0),o=r(15),a=r(10),l=n,s=a(i.a,o.a,!1,l,"data-v-427b896f",null);t.a=s.exports},function(e,t,r){var n=r(6);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);r(8)("2e1c4e70",n,!0,{})},function(e,t,r){t=e.exports=r(7)(!1),t.push([e.i,".confirm-people[data-v-427b896f]{width:1000px}.confirm-people_l[data-v-427b896f],.confirm-people_r[data-v-427b896f]{display:inline-block;width:400px;border:1px solid #dcdfe6;vertical-align:middle}.confirm-people_l header[data-v-427b896f],.confirm-people_r header[data-v-427b896f]{height:66px;line-height:66px;padding:0 15px}.confirm-people_c[data-v-427b896f]{display:inline-block;vertical-align:middle;margin:0 10px}.confirm-people_c button[data-v-427b896f]{display:block;margin:10px auto}.confirm-people[data-v-427b896f] .avatar{display:inline-block;vertical-align:middle}.confirm-people[data-v-427b896f] .avatar-img{display:inline-block;vertical-align:middle;width:40px;height:40px;border-radius:2px;border:1px solid #e4e7ed}",""])},function(e,t){function r(e,t){var r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=n(i);return[r].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([o]).join("\n")}return[r].join("\n")}function n(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(n[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),t.push(a))}},t}},function(e,t,r){function n(e){for(var t=0;t<e.length;t++){var r=e[t],n=u[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(o(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(o(r.parts[i]));u[r.id]={id:r.id,refs:1,parts:a}}}}function i(){var e=document.createElement("style");return e.type="text/css",d.appendChild(e),e}function o(e){var t,r,n=document.querySelector("style["+g+'~="'+e.id+'"]');if(n){if(h)return v;n.parentNode.removeChild(n)}if(m){var o=p++;n=f||(f=i()),t=a.bind(null,n,o,!1),r=a.bind(null,n,o,!0)}else n=i(),t=l.bind(null,n),r=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else r()}}function a(e,t,r,n){var i=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function l(e,t){var r=t.css,n=t.media,i=t.sourceMap;if(n&&e.setAttribute("media",n),y.ssrId&&e.setAttribute(g,t.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var s="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!s)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c=r(9),u={},d=s&&(document.head||document.getElementsByTagName("head")[0]),f=null,p=0,h=!1,v=function(){},y=null,g="data-vue-ssr-id",m="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,r,i){h=r,y=i||{};var o=c(e,t);return n(o),function(t){for(var r=[],i=0;i<o.length;i++){var a=o[i],l=u[a.id];l.refs--,r.push(l)}t?(o=c(e,t),n(o)):o=[];for(var i=0;i<r.length;i++){var l=r[i];if(0===l.refs){for(var s=0;s<l.parts.length;s++)l.parts[s]();delete u[l.id]}}}};var b=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t){for(var r=[],n={},i=0;i<t.length;i++){var o=t[i],a=o[0],l=o[1],s=o[2],c=o[3],u={id:e+":"+i,css:l,media:s,sourceMap:c};n[a]?n[a].parts.push(u):r.push(n[a]={id:a,parts:[u]})}return r}},function(e,t){e.exports=function(e,t,r,n,i,o){var a,l=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(a=e,l=e.default);var c="function"==typeof l?l.options:l;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId=i);var u;if(o?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=u):n&&(u=n),u){var d=c.functional,f=d?c.render:c.beforeCreate;d?(c._injectStyles=u,c.render=function(e,t){return u.call(t),f(e,t)}):c.beforeCreate=f?[].concat(f,u):[u]}return{esModule:a,exports:l,options:c}}},function(e,t,r){"use strict";var n=r(12),i=r(13),o=r(2);e.exports={formats:o,parse:i,stringify:n}},function(e,t,r){"use strict";var n=r(1),i=r(2),o={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,l={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},s=function e(t,r,i,o,a,s,c,u,d,f,p,h){var v=t;if("function"==typeof c)v=c(r,v);else if(v instanceof Date)v=f(v);else if(null===v){if(o)return s&&!h?s(r,l.encoder):r;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||n.isBuffer(v)){if(s){return[p(h?r:s(r,l.encoder))+"="+p(s(v,l.encoder))]}return[p(r)+"="+p(String(v))]}var y=[];if(void 0===v)return y;var g;if(Array.isArray(c))g=c;else{var m=Object.keys(v);g=u?m.sort(u):m}for(var b=0;b<g.length;++b){var x=g[b];a&&null===v[x]||(y=Array.isArray(v)?y.concat(e(v[x],i(r,x),i,o,a,s,c,u,d,f,p,h)):y.concat(e(v[x],r+(d?"."+x:"["+x+"]"),i,o,a,s,c,u,d,f,p,h)))}return y};e.exports=function(e,t){var r=e,a=t?n.assign({},t):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!=typeof a.encoder)throw new TypeError("Encoder has to be a function.");var c=void 0===a.delimiter?l.delimiter:a.delimiter,u="boolean"==typeof a.strictNullHandling?a.strictNullHandling:l.strictNullHandling,d="boolean"==typeof a.skipNulls?a.skipNulls:l.skipNulls,f="boolean"==typeof a.encode?a.encode:l.encode,p="function"==typeof a.encoder?a.encoder:l.encoder,h="function"==typeof a.sort?a.sort:null,v=void 0!==a.allowDots&&a.allowDots,y="function"==typeof a.serializeDate?a.serializeDate:l.serializeDate,g="boolean"==typeof a.encodeValuesOnly?a.encodeValuesOnly:l.encodeValuesOnly;if(void 0===a.format)a.format=i.default;else if(!Object.prototype.hasOwnProperty.call(i.formatters,a.format))throw new TypeError("Unknown format option provided.");var m,b,x=i.formatters[a.format];"function"==typeof a.filter?(b=a.filter,r=b("",r)):Array.isArray(a.filter)&&(b=a.filter,m=b);var w=[];if("object"!=typeof r||null===r)return"";var j;j=a.arrayFormat in o?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var _=o[j];m||(m=Object.keys(r)),h&&m.sort(h);for(var O=0;O<m.length;++O){var S=m[O];d&&null===r[S]||(w=w.concat(s(r[S],S,_,u,d,f?p:null,b,h,v,y,x,g)))}var C=w.join(c),k=!0===a.addQueryPrefix?"?":"";return C.length>0?k+C:""}},function(e,t,r){"use strict";var n=r(1),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,l=n.split(t.delimiter,a),s=0;s<l.length;++s){var c,u,d=l[s],f=d.indexOf("]="),p=-1===f?d.indexOf("="):f+1;-1===p?(c=t.decoder(d,o.decoder),u=t.strictNullHandling?null:""):(c=t.decoder(d.slice(0,p),o.decoder),u=t.decoder(d.slice(p+1),o.decoder)),i.call(r,c)?r[c]=[].concat(r[c]).concat(u):r[c]=u}return r},l=function(e,t,r){for(var n=t,i=e.length-1;i>=0;--i){var o,a=e[i];if("[]"===a)o=[],o=o.concat(n);else{o=r.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,s=parseInt(l,10);!isNaN(s)&&a!==l&&String(s)===l&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(o=[],o[s]=n):o[l]=n}n=o}return n},s=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,s=o.exec(n),c=s?n.slice(0,s.index):n,u=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;null!==(s=a.exec(n))&&d<r.depth;){if(d+=1,!r.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+n.slice(s.index)+"]"),l(u,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:o.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:o.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?a(e,r):e,l=r.plainObjects?Object.create(null):{},c=Object.keys(i),u=0;u<c.length;++u){var d=c[u],f=s(d,i[d],r);l=n.merge(l,f,r)}return n.compact(l)}},function(e,t,r){e.exports=r.p+"head_default.png?1eda5d6c842073aaae963d666c3cd56b"},function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("section",{staticClass:"confirm-people"},[r("div",{staticClass:"confirm-people_l"},[r("header",[r("el-input",{staticStyle:{width:"370px"},attrs:{size:"small",placeholder:"请输入昵称卡号","prefix-icon":"el-icon-search",clearable:""},on:{change:e.loadList},model:{value:e.keyWord,callback:function(t){e.keyWord=t},expression:"keyWord"}})],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{tooltipEffect:"light",data:e.leftList,"tooltip-effect":"dark",height:"400px"},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55",selectable:e.selectable}}),e._v(" "),r("el-table-column",{attrs:{"render-header":e.renderHeader,"min-width":"120","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return[r("img",{staticClass:"avatar-img",staticStyle:{"vertical-align":"middle"},attrs:{src:t.row.photoUrl||e.avatar,width:"40px",height:"40px",alt:"",srcset:""}}),e._v(" "),r("span",{staticClass:"avatar"},[r("p",[e._v(e._s(t.row.name||"--"))]),e._v(" "),r("p",{staticStyle:{color:"#909399","font-size":"13px"}},[e._v(e._s(t.row.cardNo||"--"))])])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"gradeName",label:"会员等级",width:"100"}})],1)],1),e._v(" "),r("div",{staticClass:"confirm-people_c"},[r("el-button",{attrs:{type:"primary",icon:"el-icon-arrow-right",circle:""},on:{click:e.toRight}}),e._v(" "),r("el-button",{attrs:{icon:"el-icon-arrow-left",circle:""},on:{click:e.removeAll}})],1),e._v(" "),r("div",{staticClass:"confirm-people_r"},[r("header",[r("el-input",{staticStyle:{width:"370px"},attrs:{size:"small",placeholder:"请输入昵称卡号",clearable:"","prefix-icon":"el-icon-search"},on:{change:e.filterRight},model:{value:e.keyWordRight,callback:function(t){e.keyWordRight=t},expression:"keyWordRight"}})],1),e._v(" "),r("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{tooltipEffect:"light",data:e.rightList,"tooltip-effect":"dark",height:"400px"},on:{"selection-change":e.handleSelectionChangeRight}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),r("el-table-column",{attrs:{label:"会员信息","min-width":"120","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return[r("img",{staticClass:"avatar-img",staticStyle:{"vertical-align":"middle"},attrs:{src:t.row.photoUrl||e.avatar,width:"40px",height:"40px",alt:"",srcset:""}}),e._v(" "),r("span",{staticClass:"avatar"},[r("p",[e._v(e._s(t.row.name||"--"))]),e._v(" "),r("p",{staticStyle:{color:"#909399","font-size":"13px"}},[e._v(e._s(t.row.cardNo||"--"))])])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"gradeName",label:"会员等级",width:"100"}}),e._v(" "),r("el-table-column",{attrs:{prop:"gradeName",label:"操作",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){e.remove(t.$index)}}},[e._v("移除")])]}}])})],1)],1)])},i=[],o={render:n,staticRenderFns:i};t.a=o}])}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("vue-gic-confirm-people",[],t):"object"==typeof exports?exports["vue-gic-confirm-people"]=t():e["vue-gic-confirm-people"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=3)}([function(e,t,r){"use strict";function n(e,t){for(var r=[],n={},i=0;i<e.length;i++)n[e[i][t]]||(r.push(e[i]),n[e[i][t]]=1);return r}var i=r(11),o=r.n(i),a=[],l={card:"",wechat:"未关注公众号的用户不可选择",message:"没有手机号的用户不可选择"};t.a={name:"vue-gic-confirm-people",props:{idType:{type:String,default:"openId"},list:{type:Array,default:function(){return[]}},sendType:{type:String,default:"card"}},data:function(){return{loading:!1,keyWord:"",keyWordRight:"",leftList:[],rightList:[],leftSelected:[],rightSelected:[],avatar:r(14)}},watch:{rightList:function(e){var t=this;this.$emit("get-data",e.map(function(e){return e[t.idType]}).join(","))},list:function(e){a=this.rightList=e.slice()}},methods:{filterAvatar:function(e){return e?e.replace(/^http(s)?/,"https"):this.avatar},handleSelectionChange:function(e){this.leftSelected=e},handleSelectionChangeRight:function(e){this.rightSelected=e},toRight:function(){var e=this;this.leftSelected.map(function(t){e.rightList.indexOf(t)<0&&e.rightList.push(t)}),console.log(this.rightList.map(function(e){return e.memberId})),a=this.rightList=n(this.rightList,"memberId")},loadList:function(){var e=this;this.loading=!0,this.leftSelected=[];var t={searchParams:this.keyWord,onlyWxMember:"wechat"===this.sendType?1:0,requestProject:"gic-web"};this.axios.post("/api-marketing/member-search-engine",o.a.stringify(t),{}).then(function(t){0===t.data.errorCode&&t.data.result&&(e.leftList=t.data.result),e.loading=!1})},removeAll:function(){var e=this.rightList.slice();this.rightSelected.map(function(t){var r=e.indexOf(t);r>-1&&e.splice(r,1)}),a=this.rightList=e},remove:function(e){this.rightList.splice(e,1),a.splice(e,1)},filterRight:function(){var e=this;if(this.keyWordRight){var t=Object.assign([],this.rightList),r=t.filter(function(t){var r=!1;return t.cardNo&&(r=t.cardNo.indexOf(e.keyWordRight)>-1),t.memberName&&(r=t.memberName.indexOf(e.keyWordRight)>-1),r});this.rightList=r}else this.rightList=Object.assign([],a)},renderHeader:function(e,t){t.column,t.$index;return e("span",[e("span",{style:"font-weight:500;"},"会员信息"),e("span",{style:"font-weight:500;font-size:12px;color:#909399;margin-left:5px;"},l[this.sendType])])},selectable:function(e,t){var r=!0;switch(this.sendType){case"message":r=!!e.phoneNumber;break;case"wecaht":r=1===e.attentionStatus;break;case"card":r=!!e.openid}return r}}}},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],i=0;i<t.length;++i)void 0!==t[i]&&n.push(t[i]);r.obj[r.prop]=n}}return t},a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},l=function e(t,r,i){if(!r)return t;if("object"!=typeof r){if(Array.isArray(t))t.push(r);else{if("object"!=typeof t)return[t,r];(i.plainObjects||i.allowPrototypes||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if("object"!=typeof t)return[t].concat(r);var o=t;return Array.isArray(t)&&!Array.isArray(r)&&(o=a(t,i)),Array.isArray(t)&&Array.isArray(r)?(r.forEach(function(r,o){n.call(t,o)?t[o]&&"object"==typeof t[o]?t[o]=e(t[o],r,i):t.push(r):t[o]=r}),t):Object.keys(r).reduce(function(t,o){var a=r[o];return n.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t},o)},s=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},c=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},d=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var o=t.charCodeAt(n);45===o||46===o||95===o||126===o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?r+=t.charAt(n):o<128?r+=i[o]:o<2048?r+=i[192|o>>6]+i[128|63&o]:o<55296||o>=57344?r+=i[224|o>>12]+i[128|o>>6&63]+i[128|63&o]:(n+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(n)),r+=i[240|o>>18]+i[128|o>>12&63]+i[128|o>>6&63]+i[128|63&o])}return r},p=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],a=i.obj[i.prop],l=Object.keys(a),s=0;s<l.length;++s){var c=l[s],d=a[c];"object"==typeof d&&null!==d&&-1===r.indexOf(d)&&(t.push({obj:a,prop:c}),r.push(d))}return o(t)},u=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},f=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))};e.exports={arrayToObject:a,assign:s,compact:p,decode:c,encode:d,isBuffer:f,isRegExp:u,merge:l}},function(e,t,r){"use strict";var n=String.prototype.replace,i=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),i={install:function(e,t){e.component(n.a.name,n.a)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(i),t.default=i},function(e,t,r){"use strict";function n(e){r(5)}var i=r(0),o=r(15),a=r(10),l=n,s=a(i.a,o.a,!1,l,"data-v-d277124e",null);t.a=s.exports},function(e,t,r){var n=r(6);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);r(8)("4d27dc4e",n,!0,{})},function(e,t,r){t=e.exports=r(7)(!1),t.push([e.i,".confirm-people[data-v-d277124e]{width:1000px}.confirm-people_l[data-v-d277124e],.confirm-people_r[data-v-d277124e]{display:inline-block;width:400px;border:1px solid #dcdfe6;vertical-align:middle}.confirm-people_l header[data-v-d277124e],.confirm-people_r header[data-v-d277124e]{height:66px;line-height:66px;padding:0 15px}.confirm-people_c[data-v-d277124e]{display:inline-block;vertical-align:middle;margin:0 10px}.confirm-people_c button[data-v-d277124e]{display:block;margin:10px auto}.confirm-people[data-v-d277124e] .avatar{display:inline-block;vertical-align:middle}.confirm-people[data-v-d277124e] .avatar-img{display:inline-block;vertical-align:middle;width:40px;height:40px;border-radius:2px;border:1px solid #e4e7ed}",""])},function(e,t){function r(e,t){var r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=n(i);return[r].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([o]).join("\n")}return[r].join("\n")}function n(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(n[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),t.push(a))}},t}},function(e,t,r){function n(e){for(var t=0;t<e.length;t++){var r=e[t],n=d[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(o(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(o(r.parts[i]));d[r.id]={id:r.id,refs:1,parts:a}}}}function i(){var e=document.createElement("style");return e.type="text/css",p.appendChild(e),e}function o(e){var t,r,n=document.querySelector("style["+g+'~="'+e.id+'"]');if(n){if(h)return v;n.parentNode.removeChild(n)}if(m){var o=f++;n=u||(u=i()),t=a.bind(null,n,o,!1),r=a.bind(null,n,o,!0)}else n=i(),t=l.bind(null,n),r=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else r()}}function a(e,t,r,n){var i=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function l(e,t){var r=t.css,n=t.media,i=t.sourceMap;if(n&&e.setAttribute("media",n),y.ssrId&&e.setAttribute(g,t.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var s="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!s)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c=r(9),d={},p=s&&(document.head||document.getElementsByTagName("head")[0]),u=null,f=0,h=!1,v=function(){},y=null,g="data-vue-ssr-id",m="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,r,i){h=r,y=i||{};var o=c(e,t);return n(o),function(t){for(var r=[],i=0;i<o.length;i++){var a=o[i],l=d[a.id];l.refs--,r.push(l)}t?(o=c(e,t),n(o)):o=[];for(var i=0;i<r.length;i++){var l=r[i];if(0===l.refs){for(var s=0;s<l.parts.length;s++)l.parts[s]();delete d[l.id]}}}};var b=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t){for(var r=[],n={},i=0;i<t.length;i++){var o=t[i],a=o[0],l=o[1],s=o[2],c=o[3],d={id:e+":"+i,css:l,media:s,sourceMap:c};n[a]?n[a].parts.push(d):r.push(n[a]={id:a,parts:[d]})}return r}},function(e,t){e.exports=function(e,t,r,n,i,o){var a,l=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(a=e,l=e.default);var c="function"==typeof l?l.options:l;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId=i);var d;if(o?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=d):n&&(d=n),d){var p=c.functional,u=p?c.render:c.beforeCreate;p?(c._injectStyles=d,c.render=function(e,t){return d.call(t),u(e,t)}):c.beforeCreate=u?[].concat(u,d):[d]}return{esModule:a,exports:l,options:c}}},function(e,t,r){"use strict";var n=r(12),i=r(13),o=r(2);e.exports={formats:o,parse:i,stringify:n}},function(e,t,r){"use strict";var n=r(1),i=r(2),o={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,l={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},s=function e(t,r,i,o,a,s,c,d,p,u,f,h){var v=t;if("function"==typeof c)v=c(r,v);else if(v instanceof Date)v=u(v);else if(null===v){if(o)return s&&!h?s(r,l.encoder):r;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||n.isBuffer(v)){if(s){return[f(h?r:s(r,l.encoder))+"="+f(s(v,l.encoder))]}return[f(r)+"="+f(String(v))]}var y=[];if(void 0===v)return y;var g;if(Array.isArray(c))g=c;else{var m=Object.keys(v);g=d?m.sort(d):m}for(var b=0;b<g.length;++b){var x=g[b];a&&null===v[x]||(y=Array.isArray(v)?y.concat(e(v[x],i(r,x),i,o,a,s,c,d,p,u,f,h)):y.concat(e(v[x],r+(p?"."+x:"["+x+"]"),i,o,a,s,c,d,p,u,f,h)))}return y};e.exports=function(e,t){var r=e,a=t?n.assign({},t):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!=typeof a.encoder)throw new TypeError("Encoder has to be a function.");var c=void 0===a.delimiter?l.delimiter:a.delimiter,d="boolean"==typeof a.strictNullHandling?a.strictNullHandling:l.strictNullHandling,p="boolean"==typeof a.skipNulls?a.skipNulls:l.skipNulls,u="boolean"==typeof a.encode?a.encode:l.encode,f="function"==typeof a.encoder?a.encoder:l.encoder,h="function"==typeof a.sort?a.sort:null,v=void 0!==a.allowDots&&a.allowDots,y="function"==typeof a.serializeDate?a.serializeDate:l.serializeDate,g="boolean"==typeof a.encodeValuesOnly?a.encodeValuesOnly:l.encodeValuesOnly;if(void 0===a.format)a.format=i.default;else if(!Object.prototype.hasOwnProperty.call(i.formatters,a.format))throw new TypeError("Unknown format option provided.");var m,b,x=i.formatters[a.format];"function"==typeof a.filter?(b=a.filter,r=b("",r)):Array.isArray(a.filter)&&(b=a.filter,m=b);var w=[];if("object"!=typeof r||null===r)return"";var j;j=a.arrayFormat in o?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var _=o[j];m||(m=Object.keys(r)),h&&m.sort(h);for(var O=0;O<m.length;++O){var S=m[O];p&&null===r[S]||(w=w.concat(s(r[S],S,_,d,p,u?f:null,b,h,v,y,x,g)))}var C=w.join(c),k=!0===a.addQueryPrefix?"?":"";return C.length>0?k+C:""}},function(e,t,r){"use strict";var n=r(1),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,l=n.split(t.delimiter,a),s=0;s<l.length;++s){var c,d,p=l[s],u=p.indexOf("]="),f=-1===u?p.indexOf("="):u+1;-1===f?(c=t.decoder(p,o.decoder),d=t.strictNullHandling?null:""):(c=t.decoder(p.slice(0,f),o.decoder),d=t.decoder(p.slice(f+1),o.decoder)),i.call(r,c)?r[c]=[].concat(r[c]).concat(d):r[c]=d}return r},l=function(e,t,r){for(var n=t,i=e.length-1;i>=0;--i){var o,a=e[i];if("[]"===a)o=[],o=o.concat(n);else{o=r.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,s=parseInt(l,10);!isNaN(s)&&a!==l&&String(s)===l&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(o=[],o[s]=n):o[l]=n}n=o}return n},s=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,s=o.exec(n),c=s?n.slice(0,s.index):n,d=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;d.push(c)}for(var p=0;null!==(s=a.exec(n))&&p<r.depth;){if(p+=1,!r.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;d.push(s[1])}return s&&d.push("["+n.slice(s.index)+"]"),l(d,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:o.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:o.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?a(e,r):e,l=r.plainObjects?Object.create(null):{},c=Object.keys(i),d=0;d<c.length;++d){var p=c[d],u=s(p,i[p],r);l=n.merge(l,u,r)}return n.compact(l)}},function(e,t,r){e.exports=r.p+"head_default.png?1eda5d6c842073aaae963d666c3cd56b"},function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("section",{staticClass:"confirm-people"},[r("div",{staticClass:"confirm-people_l"},[r("header",[r("el-input",{staticStyle:{width:"370px"},attrs:{size:"small",placeholder:"请输入昵称卡号","prefix-icon":"el-icon-search",clearable:""},on:{change:e.loadList},model:{value:e.keyWord,callback:function(t){e.keyWord=t},expression:"keyWord"}})],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{tooltipEffect:"light",data:e.leftList,"tooltip-effect":"dark",height:"400px"},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55",selectable:e.selectable}}),e._v(" "),r("el-table-column",{attrs:{"render-header":e.renderHeader,"min-width":"120","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return[r("img",{staticClass:"avatar-img",staticStyle:{"vertical-align":"middle"},attrs:{src:e.filterAvatar(t.row.photoUrl),width:"40px",height:"40px",alt:"",srcset:""}}),e._v(" "),r("span",{staticClass:"avatar"},[r("p",[e._v(e._s(t.row.name||"--"))]),e._v(" "),r("p",{staticStyle:{color:"#909399","font-size":"13px"}},[e._v(e._s(t.row.cardNo||"--"))])])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"gradeName",label:"会员等级",width:"100"}})],1)],1),e._v(" "),r("div",{staticClass:"confirm-people_c"},[r("el-button",{attrs:{type:"primary",icon:"el-icon-arrow-right",circle:""},on:{click:e.toRight}}),e._v(" "),r("el-button",{attrs:{icon:"el-icon-arrow-left",circle:""},on:{click:e.removeAll}})],1),e._v(" "),r("div",{staticClass:"confirm-people_r"},[r("header",[r("el-input",{staticStyle:{width:"370px"},attrs:{size:"small",placeholder:"请输入昵称卡号",clearable:"","prefix-icon":"el-icon-search"},on:{change:e.filterRight},model:{value:e.keyWordRight,callback:function(t){e.keyWordRight=t},expression:"keyWordRight"}})],1),e._v(" "),r("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{tooltipEffect:"light",data:e.rightList,"tooltip-effect":"dark",height:"400px"},on:{"selection-change":e.handleSelectionChangeRight}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),r("el-table-column",{attrs:{label:"会员信息","min-width":"120","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return[r("img",{staticClass:"avatar-img",staticStyle:{"vertical-align":"middle"},attrs:{src:e.filterAvatar(t.row.photoUrl),width:"40px",height:"40px",alt:"",srcset:""}}),e._v(" "),r("span",{staticClass:"avatar"},[r("p",[e._v(e._s(t.row.name||"--"))]),e._v(" "),r("p",{staticStyle:{color:"#909399","font-size":"13px"}},[e._v(e._s(t.row.cardNo||"--"))])])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"gradeName",label:"会员等级",width:"100"}}),e._v(" "),r("el-table-column",{attrs:{prop:"gradeName",label:"操作",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){e.remove(t.$index)}}},[e._v("移除")])]}}])})],1)],1)])},i=[],o={render:n,staticRenderFns:i};t.a=o}])});
//# sourceMappingURL=vue-gic-confirm-people.js.map \ No newline at end of file
\ No newline at end of file
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