Commit 871b8cd2 by xiaohai

文档更新

parent c9ecba19
...@@ -22,6 +22,7 @@ Vue.use(vueGicMemberGroup) ...@@ -22,6 +22,7 @@ Vue.use(vueGicMemberGroup)
:defaltSelected="defaltSelected" :defaltSelected="defaltSelected"
:height='height' :height='height'
:projectName="projectName" :projectName="projectName"
:headerList='headerList'
@handleDataTransferred="handleDataTransferred" @handleDataTransferred="handleDataTransferred"
@handleDataLeft="handleDataLeft"> @handleDataLeft="handleDataLeft">
</vue-gic-member-group> </vue-gic-member-group>
......
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("vue-gic-member-group",[],t):"object"==typeof exports?exports["vue-gic-member-group"]=t():e["vue-gic-member-group"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.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=1)}([function(e,t,r){"use strict";t.a={name:"vue-gic-member-group",props:{defaltSelected:{type:Array,default:function(){return[]}},height:{type:Number,default:543},projectName:{type:String,default:"memberTag"},headerList:{type:Array,default:function(){return["isRealTime","latestUpdateTime","updateType","effectiveStatus","effectiveDate","handle"]}}},data:function(){return{tableData:[],pageSize:20,currentPage:1,dataSearch:"",baseUrl:"",dataSearchSelected:"",selectedData:[],selectionToTransfer:[],selectionToRemove:[],countOfCoverTotal:0,totalPage:1,loading:!1}},directives:{loadmore:{bind:function(e,t){e.querySelector(".el-table__body-wrapper").addEventListener("scroll",function(){var e=1,r=this.scrollHeight-this.scrollTop===this.clientHeight&&this.scrollTop>e;this.scrollTop>e&&(e=this.scrollTop),this.scrollTop<e&&(e=this.scrollTop),r&&t.value()})}}},methods:{loadmore:function(){this.currentPage<this.totalPage&&(this.currentPage+=1,this.getGroupList())},getGroupList:function(){var e=this;e.loading=!0,e.axios.get(e.baseUrl+"/gic-member-tag-web/member-tag-group/findList.json?requestProject="+e.projectName+"&pageSize="+e.pageSize+"&pageNum="+e.currentPage+"&groupName="+e.dataSearch+"&effectiveStatus=1").then(function(t){if(1==t.data.errorCode)return e.tableData=e.tableData.concat(t.data.result.result),e.totalPage=t.data.result.totalPage,void(e.loading=!1);e.loading=!1,e.$message.error({duration:1e3,message:t.data.message})}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})},searchEnterFun:function(){this.tableData=[],this.getGroupList()},clearSearch:function(e){this[e]="","dataSearch"==e&&this.getGroupList()},handleSelectionChange:function(e){this.selectionToTransfer=e},selectToTransfer:function(){if(this.selectionToTransfer.length<1)return this.$message.error({duration:1e3,message:"请选择分组!"}),!1;this.selectedData=this.uniqueByGroupId(this.selectedData.concat(this.selectionToTransfer)),this.getMemberCountByGroups(),this.$emit("handleDataTransferred",this.selectedData,this.selectionToTransfer),this.$refs.originTable.clearSelection()},uniqueByGroupId:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"memberTagGroupId",r=[e[0]],n=1;n<e.length;n++)if(void 0===t)-1==r.indexOf(e[n])&&r.push(e[n]);else{e:for(var a=!1,o=0;o<r.length;o++)if(e[n][t]==r[o][t]){a=!0;break e}a||r.push(e[n])}return r},handleSelectedSelectionChange:function(e){this.selectionToRemove=e},selectToRemove:function(){if(this.selectionToRemove.length<1)return this.$message.error({duration:1e3,message:"请选择分组!"}),!1;var e=this.selectedData,t=this.selectionToRemove,r=new Set(e),n=new Set(t);this.selectedData=e.concat(t).filter(function(e){return!r.has(e)||!n.has(e)}),this.getMemberCountByGroups(),this.$emit("handleDataLeft",this.selectedData,this.selectionToRemove),this.$refs.selectedTable.clearSelection()},getMemberCountByGroups:function(){var e=this,t=e.selectedData;if(t.length<1)return e.countOfCoverTotal=0,!1;var r=[];t.forEach(function(e){r.push(e.memberTagGroupId)});var n=r.join(",");e.axios.get(e.baseUrl+"/gic-member-tag-web/member-tag-member/findMemberListByGroupIds.json?requestProject="+e.projectName+"&memberTagGroupIds="+n+"&pageName=memberSign").then(function(t){1==t.data.errorCode&&(e.countOfCoverTotal=t.data.result.page.totalCount)})}},filters:{formatTimeYMD:function(e){return e&&"- -"!=e?e.split(" ")[0]:"--"},formatTimeHMS:function(e){return e&&"- -"!=e?e.split(" ")[1]:"--"},formatNum:function(e){return(e+"").replace(/\d{1,3}(?=(\d{3})+$)/g,"$&,")},formatUpdateFrequency:function(e,t){switch(e){case 1:return"每天一次";case 2:var r=["一","二","三","四","五","六","日"];return t?"每周"+r[t-1]:"每周一次";case 3:return t?"每月"+t+"号":"每月一次";default:return"--"}}},beforeMount:function(){var e=this,t=window.location.origin;"-1"!=t.indexOf("localhost")?e.baseUrl="http://gicdev.demogic.com":e.baseUrl=t},mounted:function(){this.getGroupList(),this.defaltSelected.length>0&&(this.selectedData=this.uniqueByGroupId(this.selectedData.concat(this.defaltSelected))),this.getMemberCountByGroups()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),a={install:function(e,t){e.component(n.a.name,n.a)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(a),t.default=a},function(e,t,r){"use strict";function n(e){r(3)}var a=r(0),o=r(9),i=r(8),s=n,l=i(a.a,o.a,!1,s,null,null);t.a=l.exports},function(e,t,r){var n=r(4);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);r(6)("2cedf652",n,!0,{})},function(e,t,r){t=e.exports=r(5)(!1),t.push([e.i,".group-set-transfer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;background:#fff;padding:30px;box-sizing:border-box}.group-set-transfer a{color:#606266}.group-set-transfer .flex-1{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.group-set-transfer .w_100{width:100%}.group-set-transfer .m-b-26{margin-block-start:26px}.group-set-transfer .input-div{padding:20px 14px}.group-set-transfer>.table-container{height:100%;border:1px solid #dcdfe6;border-radius:4px}.group-set-transfer>.table-container .cover-count{height:42px;line-height:42px;text-align:center;border:none;color:#7e8c8d;font-size:14px}.group-set-transfer>.table-container .cover-count .count{color:#606266;margin:0 5px}.group-set-transfer .btn-box{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;width:80px;text-align:center}.group-set-transfer .btn-box .icon-container .transfer-icon{display:inline-block;width:43px;height:43px;line-height:44px;border-radius:100%;text-align:center;border:1px solid #dcdfe6;color:#dcdfe6;font-size:20px;cursor:pointer}.group-set-transfer .btn-box .icon-container .transfer-icon:hover{border:none;background:#409eff;color:#fff}.group-set-transfer .selected-list{width:356px;height:100%}",""])},function(e,t){function r(e,t){var r=e[1]||"",a=e[3];if(!a)return r;if(t&&"function"==typeof btoa){var o=n(a);return[r].concat(a.sources.map(function(e){return"/*# sourceURL="+a.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={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(n[o]=!0)}for(a=0;a<e.length;a++){var i=e[a];"number"==typeof i[0]&&n[i[0]]||(r&&!i[2]?i[2]=r:r&&(i[2]="("+i[2]+") and ("+r+")"),t.push(i))}},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 a=0;a<n.parts.length;a++)n.parts[a](r.parts[a]);for(;a<r.parts.length;a++)n.parts.push(o(r.parts[a]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(o(r.parts[a]));u[r.id]={id:r.id,refs:1,parts:i}}}}function a(){var e=document.createElement("style");return e.type="text/css",d.appendChild(e),e}function o(e){var t,r,n=document.querySelector("style["+v+'~="'+e.id+'"]');if(n){if(h)return m;n.parentNode.removeChild(n)}if(b){var o=p++;n=f||(f=a()),t=i.bind(null,n,o,!1),r=i.bind(null,n,o,!0)}else n=a(),t=s.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 i(e,t,r,n){var a=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=_(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function s(e,t){var r=t.css,n=t.media,a=t.sourceMap;if(n&&e.setAttribute("media",n),g.ssrId&&e.setAttribute(v,t.id),a&&(r+="\n/*# sourceURL="+a.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)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(7),u={},d=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,p=0,h=!1,m=function(){},g=null,v="data-vue-ssr-id",b="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,r,a){h=r,g=a||{};var o=c(e,t);return n(o),function(t){for(var r=[],a=0;a<o.length;a++){var i=o[a],s=u[i.id];s.refs--,r.push(s)}t?(o=c(e,t),n(o)):o=[];for(var a=0;a<r.length;a++){var s=r[a];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete u[s.id]}}}};var _=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={},a=0;a<t.length;a++){var o=t[a],i=o[0],s=o[1],l=o[2],c=o[3],u={id:e+":"+a,css:s,media:l,sourceMap:c};n[i]?n[i].parts.push(u):r.push(n[i]={id:i,parts:[u]})}return r}},function(e,t){e.exports=function(e,t,r,n,a,o){var i,s=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(i=e,s=e.default);var c="function"==typeof s?s.options:s;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),r&&(c.functional=!0),a&&(c._scopeId=a);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:i,exports:s,options:c}}},function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"group-set-transfer"},[r("div",{staticClass:"flex-1 table-container"},[r("div",{staticClass:"input-div"},[r("el-input",{staticClass:"w_100",attrs:{placeholder:"请输入关键字搜索人群","prefix-icon":"el-icon-search",clearable:""},on:{clear:function(t){e.clearSearch("dataSearch")}},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.searchEnterFun(t):null}},model:{value:e.dataSearch,callback:function(t){e.dataSearch=t},expression:"dataSearch"}})],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"},{name:"loadmore",rawName:"v-loadmore",value:e.loadmore,expression:"loadmore"}],ref:"originTable",attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.height-72},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),r("el-table-column",{attrs:{label:"分组名称","min-width":"170","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{placement:"top-start",trigger:"hover"}},[r("span",[e._v(e._s(t.row.describle))]),e._v(" "),r("a",{staticClass:"pointer",attrs:{slot:"reference",href:"#/memberGroupDetail?memberTagGroupId="+t.row.memberTagGroupId},slot:"reference"},[e._v(e._s(t.row.groupName))])])]}}])}),e._v(" "),e.headerList.indexOf("isRealTime")>-1?r("el-table-column",{attrs:{label:"是否实时","min-width":"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.isRealTime?"实时":"非实时")+"\n ")]}}])}):e._e(),e._v(" "),e.headerList.indexOf("latestUpdateTime")>-1?r("el-table-column",{attrs:{label:"最近更新时间","min-width":"120px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimeYMD")(t.row.latestUpdateTime))+"\n "),r("p",[e._v(e._s(e._f("formatTimeHMS")(t.row.latestUpdateTime)))])]}}])}):e._e(),e._v(" "),e.headerList.indexOf("updateType")>-1?r("el-table-column",{attrs:{label:"更新频率","min-width":"100px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.isRealTime?[e._v("\n "+e._s(e._f("formatUpdateFrequency")(t.row.updateType,t.row.updateDay))+"\n ")]:[e._v("\n --\n ")]]}}])}):e._e(),e._v(" "),e.headerList.indexOf("effectiveStatus")>-1?r("el-table-column",{attrs:{prop:"state",label:"状态","min-width":"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.effectiveStatus?"有效":"失效")+"\n ")]}}])}):e._e(),e._v(" "),e.headerList.indexOf("effectiveDate")>-1?r("el-table-column",{attrs:{prop:"recentUpdateDate",label:"到期时间","min-width":"100px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimeYMD")(t.row.effectiveDate))+"\n "),r("p",[e._v(e._s(e._f("formatTimeHMS")(t.row.effectiveDate)))])]}}])}):e._e(),e._v(" "),e.headerList.indexOf("handle")>-1?r("el-table-column",{attrs:{"min-width":"60px",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("router-link",{staticClass:"edit-btn el-button--text",attrs:{to:{path:"/memberGroupDetail",query:{memberTagGroupId:t.row.memberTagGroupId}}}},[e._v("详情")])]}}])}):e._e()],1)],1),e._v(" "),r("div",{staticClass:"btn-box",style:"height:"+e.height+"px"},[r("div",{staticClass:"icon-container"},[r("span",{staticClass:"transfer-icon el-icon-arrow-right m-b-26",on:{click:e.selectToTransfer}}),e._v(" "),r("span",{staticClass:"transfer-icon el-icon-arrow-left",on:{click:e.selectToRemove}})])]),e._v(" "),r("div",{staticClass:"selected-list table-container"},[r("div",{staticClass:"input-div"},[r("el-input",{staticClass:"w_100",attrs:{placeholder:"请输入关键字搜索人群","prefix-icon":"el-icon-search",clearable:""},on:{clear:function(t){e.clearSearch("dataSearchSelected")}},model:{value:e.dataSearchSelected,callback:function(t){e.dataSearchSelected=t},expression:"dataSearchSelected"}})],1),e._v(" "),r("el-table",{ref:"selectedTable",attrs:{data:e.selectedData.filter(function(t){return!e.dataSearchSelected||t.groupName.toLowerCase().includes(e.dataSearchSelected.toLowerCase())}),"tooltip-effect":"dark",height:e.height-114},on:{"selection-change":e.handleSelectedSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),r("el-table-column",{attrs:{label:"分组名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{placement:"top-start",trigger:"hover"}},[r("span",[e._v(e._s(t.row.describle))]),e._v(" "),r("a",{staticClass:"pointer",attrs:{slot:"reference",href:"/memberGroupDetail?memberTagGroupId="+t.row.memberTagGroupId},slot:"reference"},[e._v(e._s(t.row.groupName))])])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"是否实时",width:"116px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.isRealTime?"实时":"非实时")+"\n ")]}}])})],1),e._v(" "),r("p",{staticClass:"cover-count"},[e._v("已选中"),r("span",{staticClass:"count"},[e._v(e._s(e.countOfCoverTotal))]),e._v("人")])],1)])},a=[],o={render:n,staticRenderFns:a};t.a=o}])}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("vue-gic-member-group",[],t):"object"==typeof exports?exports["vue-gic-member-group"]=t():e["vue-gic-member-group"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.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=1)}([function(e,t,r){"use strict";t.a={name:"vue-gic-member-group",props:{defaltSelected:{type:Array,default:function(){return[]}},height:{type:Number,default:543},projectName:{type:String,default:"memberTag"},headerList:{type:Array,default:function(){return["isRealTime","latestUpdateTime","updateType","effectiveStatus","effectiveDate","handle"]}}},data:function(){return{tableData:[],pageSize:20,currentPage:1,dataSearch:"",baseUrl:"",dataSearchSelected:"",selectedData:[],selectionToTransfer:[],selectionToRemove:[],countOfCoverTotal:0,totalPage:1,loading:!1}},directives:{loadmore:{bind:function(e,t){e.querySelector(".el-table__body-wrapper").addEventListener("scroll",function(){var e=1,r=this.scrollHeight-this.scrollTop===this.clientHeight&&this.scrollTop>e;this.scrollTop>e&&(e=this.scrollTop),this.scrollTop<e&&(e=this.scrollTop),r&&t.value()})}}},methods:{loadmore:function(){this.currentPage<this.totalPage&&(this.currentPage+=1,this.getGroupList())},getGroupList:function(){console.log(this.headerList);var e=this;e.loading=!0,e.axios.get(e.baseUrl+"/gic-member-tag-web/member-tag-group/findList.json?requestProject="+e.projectName+"&pageSize="+e.pageSize+"&pageNum="+e.currentPage+"&groupName="+e.dataSearch+"&effectiveStatus=1").then(function(t){if(1==t.data.errorCode)return e.tableData=e.tableData.concat(t.data.result.result),e.totalPage=t.data.result.totalPage,void(e.loading=!1);e.loading=!1,e.$message.error({duration:1e3,message:t.data.message})}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})},searchEnterFun:function(){this.tableData=[],this.getGroupList()},clearSearch:function(e){this[e]="","dataSearch"==e&&this.getGroupList()},handleSelectionChange:function(e){this.selectionToTransfer=e},selectToTransfer:function(){if(this.selectionToTransfer.length<1)return this.$message.error({duration:1e3,message:"请选择分组!"}),!1;this.selectedData=this.uniqueByGroupId(this.selectedData.concat(this.selectionToTransfer)),this.getMemberCountByGroups(),this.$emit("handleDataTransferred",this.selectedData,this.selectionToTransfer),this.$refs.originTable.clearSelection()},uniqueByGroupId:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"memberTagGroupId",r=[e[0]],n=1;n<e.length;n++)if(void 0===t)-1==r.indexOf(e[n])&&r.push(e[n]);else{e:for(var a=!1,o=0;o<r.length;o++)if(e[n][t]==r[o][t]){a=!0;break e}a||r.push(e[n])}return r},handleSelectedSelectionChange:function(e){this.selectionToRemove=e},selectToRemove:function(){if(this.selectionToRemove.length<1)return this.$message.error({duration:1e3,message:"请选择分组!"}),!1;var e=this.selectedData,t=this.selectionToRemove,r=new Set(e),n=new Set(t);this.selectedData=e.concat(t).filter(function(e){return!r.has(e)||!n.has(e)}),this.getMemberCountByGroups(),this.$emit("handleDataLeft",this.selectedData,this.selectionToRemove),this.$refs.selectedTable.clearSelection()},getMemberCountByGroups:function(){var e=this,t=e.selectedData;if(t.length<1)return e.countOfCoverTotal=0,!1;var r=[];t.forEach(function(e){r.push(e.memberTagGroupId)});var n=r.join(",");e.axios.get(e.baseUrl+"/gic-member-tag-web/member-tag-member/findMemberListByGroupIds.json?requestProject="+e.projectName+"&memberTagGroupIds="+n+"&pageName=memberSign").then(function(t){1==t.data.errorCode&&(e.countOfCoverTotal=t.data.result.page.totalCount)})}},filters:{formatTimeYMD:function(e){return e&&"- -"!=e?e.split(" ")[0]:"--"},formatTimeHMS:function(e){return e&&"- -"!=e?e.split(" ")[1]:"--"},formatNum:function(e){return(e+"").replace(/\d{1,3}(?=(\d{3})+$)/g,"$&,")},formatUpdateFrequency:function(e,t){switch(e){case 1:return"每天一次";case 2:var r=["一","二","三","四","五","六","日"];return t?"每周"+r[t-1]:"每周一次";case 3:return t?"每月"+t+"号":"每月一次";default:return"--"}}},beforeMount:function(){var e=this,t=window.location.origin;"-1"!=t.indexOf("localhost")?e.baseUrl="http://gicdev.demogic.com":e.baseUrl=t},mounted:function(){this.getGroupList(),this.defaltSelected.length>0&&(this.selectedData=this.uniqueByGroupId(this.selectedData.concat(this.defaltSelected))),this.getMemberCountByGroups()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),a={install:function(e,t){e.component(n.a.name,n.a)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(a),t.default=a},function(e,t,r){"use strict";function n(e){r(3)}var a=r(0),o=r(9),i=r(8),s=n,l=i(a.a,o.a,!1,s,null,null);t.a=l.exports},function(e,t,r){var n=r(4);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);r(6)("5322ee8c",n,!0,{})},function(e,t,r){t=e.exports=r(5)(!1),t.push([e.i,".group-set-transfer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;background:#fff;padding:30px;box-sizing:border-box}.group-set-transfer a{color:#606266}.group-set-transfer .flex-1{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.group-set-transfer .w_100{width:100%}.group-set-transfer .m-b-26{margin-block-start:26px}.group-set-transfer .input-div{padding:20px 14px}.group-set-transfer>.table-container{height:100%;border:1px solid #dcdfe6;border-radius:4px}.group-set-transfer>.table-container .cover-count{height:42px;line-height:42px;text-align:center;border:none;color:#7e8c8d;font-size:14px}.group-set-transfer>.table-container .cover-count .count{color:#606266;margin:0 5px}.group-set-transfer .btn-box{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;width:80px;text-align:center}.group-set-transfer .btn-box .icon-container .transfer-icon{display:inline-block;width:43px;height:43px;line-height:44px;border-radius:100%;text-align:center;border:1px solid #dcdfe6;color:#dcdfe6;font-size:20px;cursor:pointer}.group-set-transfer .btn-box .icon-container .transfer-icon:hover{border:none;background:#409eff;color:#fff}.group-set-transfer .selected-list{width:356px;height:100%}",""])},function(e,t){function r(e,t){var r=e[1]||"",a=e[3];if(!a)return r;if(t&&"function"==typeof btoa){var o=n(a);return[r].concat(a.sources.map(function(e){return"/*# sourceURL="+a.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={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(n[o]=!0)}for(a=0;a<e.length;a++){var i=e[a];"number"==typeof i[0]&&n[i[0]]||(r&&!i[2]?i[2]=r:r&&(i[2]="("+i[2]+") and ("+r+")"),t.push(i))}},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 a=0;a<n.parts.length;a++)n.parts[a](r.parts[a]);for(;a<r.parts.length;a++)n.parts.push(o(r.parts[a]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(o(r.parts[a]));u[r.id]={id:r.id,refs:1,parts:i}}}}function a(){var e=document.createElement("style");return e.type="text/css",d.appendChild(e),e}function o(e){var t,r,n=document.querySelector("style["+v+'~="'+e.id+'"]');if(n){if(h)return m;n.parentNode.removeChild(n)}if(b){var o=p++;n=f||(f=a()),t=i.bind(null,n,o,!1),r=i.bind(null,n,o,!0)}else n=a(),t=s.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 i(e,t,r,n){var a=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=_(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function s(e,t){var r=t.css,n=t.media,a=t.sourceMap;if(n&&e.setAttribute("media",n),g.ssrId&&e.setAttribute(v,t.id),a&&(r+="\n/*# sourceURL="+a.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)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(7),u={},d=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,p=0,h=!1,m=function(){},g=null,v="data-vue-ssr-id",b="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,r,a){h=r,g=a||{};var o=c(e,t);return n(o),function(t){for(var r=[],a=0;a<o.length;a++){var i=o[a],s=u[i.id];s.refs--,r.push(s)}t?(o=c(e,t),n(o)):o=[];for(var a=0;a<r.length;a++){var s=r[a];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete u[s.id]}}}};var _=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={},a=0;a<t.length;a++){var o=t[a],i=o[0],s=o[1],l=o[2],c=o[3],u={id:e+":"+a,css:s,media:l,sourceMap:c};n[i]?n[i].parts.push(u):r.push(n[i]={id:i,parts:[u]})}return r}},function(e,t){e.exports=function(e,t,r,n,a,o){var i,s=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(i=e,s=e.default);var c="function"==typeof s?s.options:s;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),r&&(c.functional=!0),a&&(c._scopeId=a);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:i,exports:s,options:c}}},function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"group-set-transfer"},[r("div",{staticClass:"flex-1 table-container"},[r("div",{staticClass:"input-div"},[r("el-input",{staticClass:"w_100",attrs:{placeholder:"请输入关键字搜索人群","prefix-icon":"el-icon-search",clearable:""},on:{clear:function(t){e.clearSearch("dataSearch")}},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.searchEnterFun(t):null}},model:{value:e.dataSearch,callback:function(t){e.dataSearch=t},expression:"dataSearch"}})],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"},{name:"loadmore",rawName:"v-loadmore",value:e.loadmore,expression:"loadmore"}],ref:"originTable",attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.height-72},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),r("el-table-column",{attrs:{label:"分组名称","min-width":"170","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{placement:"top-start",trigger:"hover"}},[r("span",[e._v(e._s(t.row.describle))]),e._v(" "),r("a",{staticClass:"pointer",attrs:{slot:"reference",href:"#/memberGroupDetail?memberTagGroupId="+t.row.memberTagGroupId},slot:"reference"},[e._v(e._s(t.row.groupName))])])]}}])}),e._v(" "),e.headerList.indexOf("isRealTime")>-1?r("el-table-column",{attrs:{label:"是否实时","min-width":"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.isRealTime?"实时":"非实时")+"\n ")]}}])}):e._e(),e._v(" "),e.headerList.indexOf("latestUpdateTime")>-1?r("el-table-column",{attrs:{label:"最近更新时间","min-width":"120px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimeYMD")(t.row.latestUpdateTime))+"\n "),r("p",[e._v(e._s(e._f("formatTimeHMS")(t.row.latestUpdateTime)))])]}}])}):e._e(),e._v(" "),e.headerList.indexOf("updateType")>-1?r("el-table-column",{attrs:{label:"更新频率","min-width":"100px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.isRealTime?[e._v("\n "+e._s(e._f("formatUpdateFrequency")(t.row.updateType,t.row.updateDay))+"\n ")]:[e._v("\n --\n ")]]}}])}):e._e(),e._v(" "),e.headerList.indexOf("effectiveStatus")>-1?r("el-table-column",{attrs:{prop:"state",label:"状态","min-width":"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.effectiveStatus?"有效":"失效")+"\n ")]}}])}):e._e(),e._v(" "),e.headerList.indexOf("effectiveDate")>-1?r("el-table-column",{attrs:{prop:"recentUpdateDate",label:"到期时间","min-width":"100px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimeYMD")(t.row.effectiveDate))+"\n "),r("p",[e._v(e._s(e._f("formatTimeHMS")(t.row.effectiveDate)))])]}}])}):e._e(),e._v(" "),e.headerList.indexOf("handle")>-1?r("el-table-column",{attrs:{"min-width":"60px",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("router-link",{staticClass:"edit-btn el-button--text",attrs:{to:{path:"/memberGroupDetail",query:{memberTagGroupId:t.row.memberTagGroupId}}}},[e._v("详情")])]}}])}):e._e()],1)],1),e._v(" "),r("div",{staticClass:"btn-box",style:"height:"+e.height+"px"},[r("div",{staticClass:"icon-container"},[r("span",{staticClass:"transfer-icon el-icon-arrow-right m-b-26",on:{click:e.selectToTransfer}}),e._v(" "),r("span",{staticClass:"transfer-icon el-icon-arrow-left",on:{click:e.selectToRemove}})])]),e._v(" "),r("div",{staticClass:"selected-list table-container"},[r("div",{staticClass:"input-div"},[r("el-input",{staticClass:"w_100",attrs:{placeholder:"请输入关键字搜索人群","prefix-icon":"el-icon-search",clearable:""},on:{clear:function(t){e.clearSearch("dataSearchSelected")}},model:{value:e.dataSearchSelected,callback:function(t){e.dataSearchSelected=t},expression:"dataSearchSelected"}})],1),e._v(" "),r("el-table",{ref:"selectedTable",attrs:{data:e.selectedData.filter(function(t){return!e.dataSearchSelected||t.groupName.toLowerCase().includes(e.dataSearchSelected.toLowerCase())}),"tooltip-effect":"dark",height:e.height-114},on:{"selection-change":e.handleSelectedSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),r("el-table-column",{attrs:{label:"分组名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{placement:"top-start",trigger:"hover"}},[r("span",[e._v(e._s(t.row.describle))]),e._v(" "),r("a",{staticClass:"pointer",attrs:{slot:"reference",href:"/memberGroupDetail?memberTagGroupId="+t.row.memberTagGroupId},slot:"reference"},[e._v(e._s(t.row.groupName))])])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"是否实时",width:"116px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.isRealTime?"实时":"非实时")+"\n ")]}}])})],1),e._v(" "),r("p",{staticClass:"cover-count"},[e._v("已选中"),r("span",{staticClass:"count"},[e._v(e._s(e.countOfCoverTotal))]),e._v("人")])],1)])},a=[],o={render:n,staticRenderFns:a};t.a=o}])});
//# sourceMappingURL=vue-gic-member-group.js.map //# sourceMappingURL=vue-gic-member-group.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "@gic-test/vue-gic-member-group", "name": "@gic-test/vue-gic-member-group",
"description": "vue-gic-member-group Plugin", "description": "vue-gic-member-group Plugin",
"version": "1.0.26", "version": "1.0.28",
"license": "MIT", "license": "MIT",
"private": false, "private": false,
"author": "fairyly", "author": "fairyly",
......
...@@ -237,6 +237,7 @@ ...@@ -237,6 +237,7 @@
* 获取分组列表数据 * 获取分组列表数据
*/ */
getGroupList() { getGroupList() {
console.log(this.headerList);
const that = this; const that = this;
that.loading = true; that.loading = true;
that.axios.get(`${that.baseUrl}/gic-member-tag-web/member-tag-group/findList.json?requestProject=${that.projectName}&pageSize=${that.pageSize}&pageNum=${that.currentPage}&groupName=${that.dataSearch}&effectiveStatus=${1}`) that.axios.get(`${that.baseUrl}/gic-member-tag-web/member-tag-group/findList.json?requestProject=${that.projectName}&pageSize=${that.pageSize}&pageNum=${that.currentPage}&groupName=${that.dataSearch}&effectiveStatus=${1}`)
......
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