Commit 3ea112ad by 无尘

add: 增加会员分组编辑各个状态判断

parent 12935be7
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-会员标签</title><link href=./static/css/app.140047d57de1019167314b5081c01380.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.7e58408493ad6b35f196.js></script><script type=text/javascript src=./static/js/vendor.fe4f9863882480bf679b.js></script><script type=text/javascript src=./static/js/app.2f0c4f14231ba7aaf367.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-会员标签</title><link href=./static/css/app.b2f954806d47f5ed110421d244bd842c.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.83ad662c89d75539338d.js></script><script type=text/javascript src=./static/js/vendor.fe4f9863882480bf679b.js></script><script type=text/javascript src=./static/js/app.d06fd989e757882beb87.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -410,6 +410,9 @@ input:focus {
padding-right: 8px;
}
.p-r-20 {
padding-right: 20px;
}
.w-86 {
width: 86px;
}
......@@ -961,6 +964,17 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
position: absolute;
bottom: 3px;
right: 3px;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
cursor: pointer;
}
.common-libFields .common-lib__cell__radio .el-radio {
width: 50px;
height: 50px;
line-height: 50px;
}
.common-libFields .common-lib__cell__radio .el-radio__label {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([12],{"4yea":function(e,t){},oVck:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o("3Xzz"),a=(o("Mk6G"),o("3E4D"),o("Ch4/")),n=function(e,t){function o(e){return(e=e.toString())[1]?e:"0"+e}if(null!=e){var r=new Date(e),a=r.getFullYear(),n=r.getMonth()+1,l=r.getDate(),i=r.getHours(),u=r.getMinutes(),s=r.getSeconds();return[a,n,l].map(o).join(t||"-")+" "+[i,u,s].map(o).join(":")}return"--"},l=(o("PI0u"),o("P9l9")),i={name:"memberGroupList",data:function(){return{navpath:[{name:"首页",path:""},{name:"会员标签",path:""}],tagSearch:"",groupTableData:[{memberTagGroupId:1,describle:"标签列表数据",groupName:"123",isRealTime:1,latestUpdateTime:"2018-09-30 14:30:28",updateRate:"-",effectiveStatus:1,memberCount:"456566",createTime:"2018-09-30 14:30:28",expiredTime:"2018-09-30 14:30:28",popVisible:!1}],currentPage:1,pageSize:20,total:0}},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,"$&,")}},methods:{changeRoute:function(e){this.$router.push(e)},toAddGroup:function(){this.changeRoute("/memberGroupEdit")},clearSearch:function(){this.currentPage=1,this.getGroupList()},searchEnterFun:function(e){console.log(e),this.currentPage=1,this.getGroupList()},handleSizeChange:function(e){console.log("每页 "+e+" 条"),this.getGroupList()},handleCurrentChange:function(e){console.log("当前页: "+e),this.getGroupList()},toInvalid:function(e){console.log(e,"thisGroup");var t=this;t.$confirm("该分组失效后,不再更新数据,确认要失效吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var o={effectiveStatus:"0",memberTagGroupId:e.memberTagGroupId};t.updateGroup(o,e)}).catch(function(){})},updateGroup:function(e,t){Object(l.a)("/member-tag-group/simpleUpdate.json",e).then(function(o){console.log(o,"updateResult"),t.effectiveStatus=e.effectiveStatus||t.effectiveStatus,t.memberCount=e.memberCount||t.memberCount}).catch(function(e){console.log(e,"error")})},cancelDelTag:function(e,t){t.popVisible=!1},toDelTag:function(e,t){var o=this;o.$confirm("该分组覆盖"+o.$options.filters.formatNum(e.memberCount)+"人,一旦删除无法恢复,确认要删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){o.delGroup(e.memberTagGroupId,t)}).catch(function(){})},delGroup:function(e,t){var o=this,r={memberTagGroupId:e};Object(l.a)("/member-tag-group/delete.json",r).then(function(e){console.log(e,"delResult");var r=e.data;1!=r.errorCode?a.a.errorMsg(r):o.groupTableData.splice(t,1)}).catch(function(e){console.log(e),o.$message.error({duration:1e3,message:e.message})})},getGroupList:function(){var e=this,t={groupName:e.tagSearch,pageSize:e.pageSize,pageNum:e.currentPage};Object(l.a)("/member-tag-group/findList.json",t).then(function(t){console.log(t,"groupList");var o=t.data;if(1==o.errorCode)return e.total=o.result.totalCount,o.result.result.forEach(function(e,t){e.latestUpdateTime||(e.latestUpdateTime="- -"),e.createTime&&(e.createTime=n(e.createTime))}),void(e.groupTableData=o.result.result);a.a.errorMsg(o)}).catch(function(t){console.log(t),e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getGroupList()},components:{navCrumb:r.a}},u={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"memberGroupList-wrap common-wrap"},[o("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),o("div",{staticClass:"right-content"},[o("div",{staticClass:"right-box"},[o("div",{staticClass:"common-wrap__opt"},[o("el-input",{staticClass:"w-220",attrs:{placeholder:"请输入关键字搜索人群","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearSearch},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.searchEnterFun(t):null}},model:{value:e.tagSearch,callback:function(t){e.tagSearch=t},expression:"tagSearch"}}),e._v(" "),o("el-button",{staticClass:"fr",attrs:{type:"primary"},on:{click:e.toAddGroup}},[e._v("新增分组")])],1),e._v(" "),o("div",{staticClass:"common-wrap__table m-t-20"},[o("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:e.groupTableData,"tooltip-effect":"dark"}},[o("el-table-column",{attrs:{label:"分组名称",width:"150px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-popover",{attrs:{placement:"top-start",width:"200",trigger:"hover"}},[o("span",[e._v(e._s(t.row.describle))]),e._v(" "),o("a",{staticClass:"pointer",attrs:{slot:"reference",href:"/memberGroupDetail?memberTagGroupId="+t.row.memberTagGroupId},slot:"reference"},[e._v(e._s(t.row.groupName))])])]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"是否实时",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.isRealTime?"实时":"非实时")+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"最近更新时间",width:"150px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimeYMD")(t.row.latestUpdateTime))+"\n "),o("p",[e._v(e._s(e._f("formatTimeHMS")(t.row.latestUpdateTime)))])]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"更新频率",width:"150px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.updateRate)+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"state",label:"状态",width:"50px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.effectiveStatus?"有效":"失效")+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"peopleCover",label:"覆盖人数",width:"150px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatNum")(t.row.memberCount))+" 人\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"createTime",label:"创建时间",width:"150px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimeYMD")(t.row.createTime))+"\n "),o("p",[e._v(e._s(e._f("formatTimeHMS")(t.row.createTime)))])]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"recentUpdateDate",label:"到期时间",width:"150px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimeYMD")(t.row.effectiveDate))+"\n "),o("p",[e._v(e._s(e._f("formatTimeHMS")(t.row.effectiveDate)))])]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.effectiveStatus?o("el-button",{staticClass:"p-r-20",attrs:{type:"text",size:"small"},on:{click:function(o){e.toInvalid(t.row)}}},[e._v("失效")]):e._e(),e._v(" "),o("router-link",{staticClass:"edit-btn el-button--text p-r-20",attrs:{to:{path:"/memberGroupDetail",query:{memberTagGroupId:t.row.memberTagGroupId}}}},[e._v("详情")]),e._v(" "),o("router-link",{staticClass:"edit-btn el-button--text p-r-20",attrs:{to:{path:"/memberGroupEdit",query:{memberTagGroupId:t.row.memberTagGroupId}}}},[e._v("编辑")]),e._v(" "),o("el-button",{attrs:{type:"text",size:"small"},on:{click:function(o){e.toDelTag(t.row,t.$index)}}},[e._v("删除")])]}}])})],1)],1),e._v(" "),0!=e.groupTableData.length?o("div",{staticClass:"block common-wrap__page text-right"},[o("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[10,20,30,40],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()])]),e._v(" "),o("vue-gic-footer")],1)},staticRenderFns:[]};var s=o("VU/8")(i,u,!1,function(e){o("4yea")},"data-v-c6a2cf70",null);t.default=s.exports}});
//# sourceMappingURL=12.eab64c32b90535e29d75.js.map
\ No newline at end of file
webpackJsonp([12],{"2sdK":function(t,a){},q490:function(t,a,n){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var e=n("3Xzz"),s=n("BdFv"),i=(n("Mk6G"),n("3E4D"),n("Ch4/"),n("PI0u"),n("P9l9"),{name:"manualTagLib",data:function(){return{navpath:[{name:"首页",path:""},{name:"会员标签",path:""}],tagCategory:"manualTagList"}},methods:{},mounted:function(){},components:{navCrumb:e.a,tagLib:s.a}}),r={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"manualTagLib-wrap common-wrap"},[a("nav-crumb",{attrs:{navpath:this.navpath}}),this._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("tag-lib",{attrs:{tagCategory:this.tagCategory}})],1)]),this._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var o=n("VU/8")(i,r,!1,function(t){n("2sdK")},"data-v-c13eca0a",null);a.default=o.exports}});
//# sourceMappingURL=12.dece2fedb495aa36c9a6.js.map
\ No newline at end of file
webpackJsonp([13],{"2sdK":function(t,a){},q490:function(t,a,n){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var e=n("3Xzz"),s=n("BdFv"),i=(n("Mk6G"),n("3E4D"),n("Ch4/"),n("PI0u"),n("P9l9"),{name:"manualTagLib",data:function(){return{navpath:[{name:"首页",path:""},{name:"会员标签",path:""}],tagCategory:"manualTagList"}},methods:{},mounted:function(){},components:{navCrumb:e.a,tagLib:s.a}}),r={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"manualTagLib-wrap common-wrap"},[a("nav-crumb",{attrs:{navpath:this.navpath}}),this._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("tag-lib",{attrs:{tagCategory:this.tagCategory}})],1)]),this._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var o=n("VU/8")(i,r,!1,function(t){n("2sdK")},"data-v-c13eca0a",null);a.default=o.exports}});
//# sourceMappingURL=13.592dc8df338448632db8.js.map
\ No newline at end of file
webpackJsonp([19],{"8fha":function(t,a){},KN59:function(t,a,n){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var e=n("3Xzz"),i=(n("Mk6G"),n("3E4D"),n("Ch4/"),n("PI0u"),n("P9l9"),{name:"manualTagEdit",data:function(){return{navpath:[{name:"首页",path:""},{name:"会员标签",path:""}]}},methods:{},mounted:function(){},components:{navCrumb:e.a}}),s={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"manualTagEdit-wrap common-wrap"},[a("nav-crumb",{attrs:{navpath:this.navpath}}),this._v(" "),this._m(0),this._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"})])}]};var r=n("VU/8")(i,s,!1,function(t){n("8fha")},"data-v-564f4d34",null);a.default=r.exports}});
//# sourceMappingURL=19.4f681127cc3b6c7e3765.js.map
\ No newline at end of file
webpackJsonp([20],{"8fha":function(t,a){},KN59:function(t,a,n){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var e=n("3Xzz"),i=(n("Mk6G"),n("3E4D"),n("Ch4/"),n("PI0u"),n("P9l9"),{name:"manualTagEdit",data:function(){return{navpath:[{name:"首页",path:""},{name:"会员标签",path:""}]}},methods:{},mounted:function(){},components:{navCrumb:e.a}}),s={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"manualTagEdit-wrap common-wrap"},[a("nav-crumb",{attrs:{navpath:this.navpath}}),this._v(" "),this._m(0),this._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"})])}]};var r=n("VU/8")(i,s,!1,function(t){n("8fha")},"data-v-564f4d34",null);a.default=r.exports}});
//# sourceMappingURL=20.5edeab301229712ae055.js.map
\ No newline at end of file
webpackJsonp([20],{"8Brh":function(t,e){},"G/on":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("3Xzz"),n=a("5QTb"),s=(a("Mk6G"),a("3E4D")),o=a("Ch4/"),i=(a("PI0u"),a("P9l9")),l={name:"platformTagList",data:function(){return{navpath:[{name:"首页",path:""},{name:"会员标签",path:""}],tagLibName:"platformTag",tagSearch:"",tagTableData:[],selTagTableData:[],currentPage:1,pageSize:20,total:0,currentGroupId:0}},methods:{toAddMyTagLib:function(t,e){var a={};if("mult"===t){if(!this.selTagTableData.length)return this.$message.error({message:"请选择标签"}),!1;a.tagIds=[],this.selTagTableData.forEach(function(t,e){a.tagIds.push(t.tagId)}),a.tagIds=a.tagIds.join(","),this.addByTagId("addByTagIds",a)}else a.tagId=e,this.addByTagId("addByTagId",a)},addByTagId:function(t,e){var a=this;Object(i.a)("/enterpriseMemberTag/"+t,e).then(function(t){var e=t.data;1!=e.errorCode?o.a.errorMsg(e):s.a.showmsg("添加成功","success")}).catch(function(t){console.log(t),a.$message.error({duration:1e3,message:t.message})})},searchEnterFun:function(t){console.log(t),this.currentPage=1,this.getTagList()},clearSearch:function(){this.currentPage=1,this.getTagList()},handleSelectChange:function(t){console.log(t),this.selTagTableData=t},handleSizeChange:function(t){console.log("每页 "+t+" 条"),this.pageSize=t,this.getTagList()},handleCurrentChange:function(t){console.log("当前页: "+t),this.currentPage=t,this.getTagList()},getTagList:function(t){var e=this,a={tagName:e.tagSearch,tagLevelGroupId:e.currentGroupId,pageNum:e.currentPage,pageSize:e.pageSize};Object(i.a)("/memberTag/platformTagPageList",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tagTableData=a.result.result,void(e.total=a.result.totalCount);o.a.errorMsg(a)}).catch(function(t){console.log(t),e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(t,e){console.log("获取当前路由:",t);this.tagSearch=this.$route.query.searchName?this.$route.query.searchName:"",this.currentGroupId=this.$route.query.tagLevelGroupId?this.$route.query.tagLevelGroupId:0,this.getTagList()},deep:!0}},beforeMount:function(){},mounted:function(){console.log(this.$route.query),this.tagSearch=this.$route.query.searchName?this.$route.query.searchName:"",this.currentGroupId=this.$route.query.tagLevelGroupId?this.$route.query.tagLevelGroupId:0,this.getTagList()},components:{navCrumb:r.a,tagCategory:n.a}},c={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"platformTagList-wrap common-wrap"},[a("nav-crumb",{attrs:{navpath:t.navpath}}),t._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("div",{staticClass:"common-wrap__cateTags"},[a("tag-category",{attrs:{tagLibName:t.tagLibName}})],1),t._v(" "),a("div",{staticClass:"common-wrap__opt"},[a("el-input",{staticClass:"w-184",attrs:{placeholder:"请输入标签","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearSearch},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.searchEnterFun(e):null}},model:{value:t.tagSearch,callback:function(e){t.tagSearch=e},expression:"tagSearch"}}),t._v(" "),a("el-button",{staticClass:"fr",attrs:{type:"primary"},on:{click:function(e){t.toAddMyTagLib("mult")}}},[t._v("添加至我的标签库")])],1),t._v(" "),a("div",{staticClass:"common-wrap__table m-t-20"},[a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tagTableData,"tooltip-effect":"dark"},on:{"selection-change":t.handleSelectChange}},[a("el-table-column",{attrs:{type:"selection"}}),t._v(" "),a("el-table-column",{attrs:{prop:"tagName",label:"标签名称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"tagDescribe",label:"标签描述","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"是否实时"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(1==e.row.isActive?"实时":"非实时")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("router-link",{staticClass:"edit-btn el-button--text",attrs:{to:{path:"/myTagDetail",query:{tagId:e.row.tagId}}}},[t._v("详情")]),t._v(" "),a("el-button",{staticClass:"p-l-32",attrs:{type:"text",size:"small",disabled:1==e.row.isAdd},on:{click:function(a){t.toAddMyTagLib("single",e.row.tagId)}}},[t._v("\n 添加至我的标签库\n ")])]}}])})],1)],1),t._v(" "),0!=t.tagTableData.length?a("div",{staticClass:"block common-wrap__page text-right"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[10,20,30,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()])]),t._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var g=a("VU/8")(l,c,!1,function(t){a("8Brh")},"data-v-557c2d03",null);e.default=g.exports}});
//# sourceMappingURL=20.f003cb91f977e661e07a.js.map
\ No newline at end of file
webpackJsonp([22],{"cV+l":function(t,e){},oVck:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o("3Xzz"),a=(o("Mk6G"),o("3E4D"),o("Ch4/")),n=function(t,e){function o(t){return(t=t.toString())[1]?t:"0"+t}if(null!=t){var r=new Date(t),a=r.getFullYear(),n=r.getMonth()+1,i=r.getDate(),l=r.getHours(),s=r.getMinutes(),c=r.getSeconds();return[a,n,i].map(o).join(e||"-")+" "+[l,s,c].map(o).join(":")}return"--"},i=(o("PI0u"),o("P9l9")),l={name:"memberGroupList",data:function(){return{navpath:[{name:"首页",path:""},{name:"会员标签",path:""}],tagSearch:"",groupTableData:[{memberTagGroupId:1,describle:"标签列表数据",groupName:"123",isRealTime:1,latestUpdateTime:"2018-09-30 14:30:28",updateRate:"-",effectiveStatus:1,memberCount:"456566",createTime:"2018-09-30 14:30:28",expiredTime:"2018-09-30 14:30:28",popVisible:!1}],currentPage:1,pageSize:20,total:0}},filters:{formatTimeYMD:function(t){return console.log(t,"--"!=t?t.split(" ")[0]:"--"),"--"!=t?t.split(" ")[0]:"--"},formatTimeHMS:function(t){return"--"!=t?t.split(" ")[1]:"--"},formatNum:function(t){return(t+"").replace(/\d{1,3}(?=(\d{3})+$)/g,"$&,")}},methods:{changeRoute:function(t){this.$router.push(t)},toAddGroup:function(){this.changeRoute("/memberGroupEdit")},clearSearch:function(){this.currentPage=1,this.getGroupList()},searchEnterFun:function(t){console.log(t),this.currentPage=1,this.getGroupList()},handleSizeChange:function(t){console.log("每页 "+t+" 条"),this.getGroupList()},handleCurrentChange:function(t){console.log("当前页: "+t),this.getGroupList()},toInvalid:function(t){this.$confirm("该分组失效后,不再更新数据,确认要失效吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){}).catch(function(){}),this.$confirm("该分组正在被活动使用,无法删除!","提示",{confirmButtonText:"确定",type:"warning"}).then(function(){}).catch(function(){}),this.$confirm("该分组覆盖XX人,一旦删除无法恢复,确认要删除吗?","提示",{confirmButtonText:"确定",type:"warning"}).then(function(){}).catch(function(){})},cancelDelTag:function(t,e){e.popVisible=!1},toDelTag:function(t,e){var o=this;o.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){o.groupTableData.splice(t,1)}).catch(function(){})},delGroup:function(t){var e=this,o={memberTagGroupId:t};Object(i.a)("/member-tag-group/delete.json",o).then(function(t){var e=t.data;1!=e.errorCode&&a.a.errorMsg(e)}).catch(function(t){console.log(t),e.$message.error({duration:1e3,message:t.message})})},getGroupList:function(){var t=this,e={groupName:t.tagSearch,pageSize:t.pageSize,pageNum:t.currentPage};Object(i.a)("/member-tag-group/findList.json",e).then(function(e){var o=e.data;if(1==o.errorCode)return t.total=o.result.totalCount,o.result.result.forEach(function(t,e){t.latestUpdateTime||(t.latestUpdateTime="- -"),t.createTime&&(t.createTime=n(t.createTime))}),void(t.groupTableData=o.result.result);a.a.errorMsg(o)}).catch(function(e){console.log(e),t.$message.error({duration:1e3,message:e.message})})}},mounted:function(){this.getGroupList()},components:{navCrumb:r.a}},s={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"memberGroupList-wrap common-wrap"},[o("nav-crumb",{attrs:{navpath:t.navpath}}),t._v(" "),o("div",{staticClass:"right-content"},[o("div",{staticClass:"right-box"},[o("div",{staticClass:"common-wrap__opt"},[o("el-input",{staticClass:"w-184",attrs:{placeholder:"请输入关键字搜索人群","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearSearch},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.searchEnterFun(e):null}},model:{value:t.tagSearch,callback:function(e){t.tagSearch=e},expression:"tagSearch"}}),t._v(" "),o("el-button",{staticClass:"fr",attrs:{type:"primary"},on:{click:t.toAddGroup}},[t._v("新增分组")])],1),t._v(" "),o("div",{staticClass:"common-wrap__table m-t-20"},[o("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.groupTableData,"tooltip-effect":"dark"}},[o("el-table-column",{attrs:{label:"分组名称",width:"150px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-popover",{attrs:{placement:"top-start",width:"200",trigger:"hover"}},[o("span",[t._v(t._s(e.row.describle))]),t._v(" "),o("a",{staticClass:"pointer",attrs:{slot:"reference",href:"/memberGroupDetail?memberTagGroupId="+e.row.memberTagGroupId},slot:"reference"},[t._v(t._s(e.row.groupName))])])]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"是否实时",width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(1==e.row.isRealTime?"实时":"非实时")+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"最近更新时间",width:"150px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("formatTimeYMD")(e.row.latestUpdateTime))+"\n "),o("p",[t._v(t._s(t._f("formatTimeHMS")(e.row.latestUpdateTime)))])]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"更新频率",width:"150px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.updateRate)+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"state",label:"状态",width:"50px"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(1==e.row.effectiveStatus?"有效":"失效")+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"peopleCover",label:"覆盖人数",width:"150px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("formatNum")(e.row.memberCount))+" 人\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"createTime",label:"创建时间",width:"150px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("formatTimeYMD")(e.row.createTime))+"\n "),o("p",[t._v(t._s(t._f("formatTimeHMS")(e.row.createTime)))])]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"recentUpdateDate",label:"到期时间",width:"150px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("formatTimeYMD")(e.row.effectiveDate))+"\n "),o("p",[t._v(t._s(t._f("formatTimeHMS")(e.row.effectiveDate)))])]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{type:"text",size:"small"},on:{click:function(o){t.toInvalid(e.row.memberTagGroupId,e.row)}}},[t._v("失效")]),t._v(" "),o("router-link",{staticClass:"edit-btn el-button--text p-l-20",attrs:{to:{path:"/memberGroupDetail",query:{memberTagGroupId:e.row.memberTagGroupId}}}},[t._v("详情")]),t._v(" "),o("router-link",{staticClass:"edit-btn el-button--text p-l-20",attrs:{to:{path:"/memberGroupEdit",query:{memberTagGroupId:e.row.memberTagGroupId}}}},[t._v("编辑")]),t._v(" "),o("el-popover",{attrs:{placement:"top",width:"160"},model:{value:e.row.popVisible,callback:function(o){t.$set(e.row,"popVisible",o)},expression:"scope.row.popVisible"}},[o("p",{staticStyle:{"line-height":"1.5",padding:"10px 10px 20px"}},[t._v("确认删除吗?")]),t._v(" "),o("div",{staticStyle:{"text-align":"right",margin:"0"}},[o("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(o){t.cancelDelTag(e.$index,e.row)}}},[t._v("取消")]),t._v(" "),o("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(o){t.toDelTag(e.$index,e.row)}}},[t._v("确定")])],1),t._v(" "),o("el-button",{staticClass:"p-l-20",attrs:{slot:"reference",type:"text"},slot:"reference"},[t._v("\n 删除\n ")])],1)]}}])})],1)],1),t._v(" "),0!=t.groupTableData.length?o("div",{staticClass:"block common-wrap__page text-right"},[o("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[10,20,30,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()])]),t._v(" "),o("vue-gic-footer")],1)},staticRenderFns:[]};var c=o("VU/8")(l,s,!1,function(t){o("cV+l")},"data-v-21c10097",null);e.default=c.exports}});
//# sourceMappingURL=22.1d6faaea5525916db56d.js.map
\ No newline at end of file
webpackJsonp([22],{"G/on":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("3Xzz"),n=a("5QTb"),s=(a("Mk6G"),a("3E4D")),o=a("Ch4/"),i=(a("PI0u"),a("P9l9")),l={name:"platformTagList",data:function(){return{navpath:[{name:"首页",path:""},{name:"会员标签",path:""}],tagLibName:"platformTag",tagSearch:"",tagTableData:[],selTagTableData:[],currentPage:1,pageSize:20,total:0,currentGroupId:0}},methods:{toAddMyTagLib:function(t,e){var a={};if("mult"===t){if(!this.selTagTableData.length)return this.$message.error({message:"请选择标签"}),!1;a.tagIds=[],this.selTagTableData.forEach(function(t,e){a.tagIds.push(t.tagId)}),a.tagIds=a.tagIds.join(","),this.addByTagId("addByTagIds",a)}else a.tagId=e,this.addByTagId("addByTagId",a)},addByTagId:function(t,e){var a=this;Object(i.a)("/enterpriseMemberTag/"+t,e).then(function(t){var e=t.data;1!=e.errorCode?o.a.errorMsg(e):s.a.showmsg("添加成功","success")}).catch(function(t){console.log(t),a.$message.error({duration:1e3,message:t.message})})},searchEnterFun:function(t){console.log(t),this.currentPage=1,this.getTagList()},clearSearch:function(){this.currentPage=1,this.getTagList()},handleSelectChange:function(t){console.log(t),this.selTagTableData=t},handleSizeChange:function(t){console.log("每页 "+t+" 条"),this.pageSize=t,this.getTagList()},handleCurrentChange:function(t){console.log("当前页: "+t),this.currentPage=t,this.getTagList()},getTagList:function(t){var e=this,a={tagName:e.tagSearch,tagLevelGroupId:e.currentGroupId,pageNum:e.currentPage,pageSize:e.pageSize};Object(i.a)("/memberTag/platformTagPageList",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tagTableData=a.result.result,void(e.total=a.result.totalCount);o.a.errorMsg(a)}).catch(function(t){console.log(t),e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(t,e){console.log("获取当前路由:",t);this.tagSearch=this.$route.query.searchName?this.$route.query.searchName:"",this.currentGroupId=this.$route.query.tagLevelGroupId?this.$route.query.tagLevelGroupId:0,this.getTagList()},deep:!0}},beforeMount:function(){},mounted:function(){console.log(this.$route.query),this.tagSearch=this.$route.query.searchName?this.$route.query.searchName:"",this.currentGroupId=this.$route.query.tagLevelGroupId?this.$route.query.tagLevelGroupId:0,this.getTagList()},components:{navCrumb:r.a,tagCategory:n.a}},c={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"platformTagList-wrap common-wrap"},[a("nav-crumb",{attrs:{navpath:t.navpath}}),t._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("div",{staticClass:"common-wrap__cateTags"},[a("tag-category",{attrs:{tagLibName:t.tagLibName}})],1),t._v(" "),a("div",{staticClass:"common-wrap__opt"},[a("el-input",{staticClass:"w-184",attrs:{placeholder:"搜索标签","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearSearch},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.searchEnterFun(e):null}},model:{value:t.tagSearch,callback:function(e){t.tagSearch=e},expression:"tagSearch"}}),t._v(" "),a("el-button",{staticClass:"fr",attrs:{type:"primary"},on:{click:function(e){t.toAddMyTagLib("mult")}}},[t._v("添加至我的标签库")])],1),t._v(" "),a("div",{staticClass:"common-wrap__table m-t-20"},[a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tagTableData,"tooltip-effect":"dark"},on:{"selection-change":t.handleSelectChange}},[a("el-table-column",{attrs:{type:"selection"}}),t._v(" "),a("el-table-column",{attrs:{prop:"tagName",label:"标签名称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"tagDescribe",label:"标签描述","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"是否实时"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(1==e.row.isActive?"实时":"非实时")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("router-link",{staticClass:"edit-btn el-button--text",attrs:{to:{path:"/myTagDetail",query:{tagId:e.row.tagId}}}},[t._v("详情")]),t._v(" "),a("el-button",{staticClass:"p-l-32",attrs:{type:"text",size:"small",disabled:1==e.row.isAdd},on:{click:function(a){t.toAddMyTagLib("single",e.row.tagId)}}},[t._v("\n 添加至我的标签库\n ")])]}}])})],1)],1),t._v(" "),0!=t.tagTableData.length?a("div",{staticClass:"block common-wrap__page text-right"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[10,20,30,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()])]),t._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var g=a("VU/8")(l,c,!1,function(t){a("Pxno")},"data-v-0a0962de",null);e.default=g.exports},Pxno:function(t,e){}});
//# sourceMappingURL=22.6603002d07c6911180b9.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.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,f){for(var o,d,i,u=0,b=[];u<r.length;u++)d=r[u],c[d]&&b.push(c[d][0]),c[d]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);for(n&&n(r,a,f);b.length;)b.shift()();if(f)for(u=0;u<f.length;u++)i=t(t.s=f[u]);return i};var r={},c={26:0};function t(n){if(r[n])return r[n].exports;var c=r[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,t),c.l=!0,c.exports}t.e=function(e){var n=c[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,t){n=c[e]=[r,t]});n[2]=r;var a=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,t.nc&&f.setAttribute("nonce",t.nc),f.src=t.p+"static/js/"+e+"."+{0:"34aff793966d1eae3db3",1:"d1b66d4bf3d45b2621dd",2:"344d5c61c44868322e7e",3:"88a303fc10feb8b51091",4:"f6a8f25f4e8cc458879d",5:"0106258f51de87a40b57",6:"342634942187a3c3799a",7:"603cf6c29315d330cfdf",8:"740be8826411a62bfb4f",9:"6284684f59ae2a7586a8",10:"c71c26ffe9e929740644",11:"e85b90356083e5b3e250",12:"dece2fedb495aa36c9a6",13:"180d4fb52739083bd4f8",14:"e3674474da8a18925ba8",15:"6bff0bcecd6f1ce1319d",16:"f4036a24000959bd38c8",17:"022c9fbbc20807dfcca3",18:"7a971724ceedf92fdfcc",19:"4f681127cc3b6c7e3765",20:"f003cb91f977e661e07a",21:"cc4b11f9d593442a0878",22:"1d6faaea5525916db56d",25:"9ceafa4ee79176c87d81"}[e]+".js";var o=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(o);var n=c[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),c[e]=void 0)}return f.onerror=f.onload=d,a.appendChild(f),r},t.m=e,t.c=r,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="./",t.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.7e58408493ad6b35f196.js.map
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,f,o){for(var a,d,b,i=0,u=[];i<r.length;i++)d=r[i],t[d]&&u.push(t[d][0]),t[d]=0;for(a in f)Object.prototype.hasOwnProperty.call(f,a)&&(e[a]=f[a]);for(n&&n(r,f,o);u.length;)u.shift()();if(o)for(i=0;i<o.length;i++)b=c(c.s=o[i]);return b};var r={},t={26:0};function c(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,c){n=t[e]=[r,c]});n[2]=r;var f=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,c.nc&&o.setAttribute("nonce",c.nc),o.src=c.p+"static/js/"+e+"."+{0:"f0efb6cf1edf8e3d6289",1:"d1b66d4bf3d45b2621dd",2:"344d5c61c44868322e7e",3:"88a303fc10feb8b51091",4:"f6a8f25f4e8cc458879d",5:"0106258f51de87a40b57",6:"3004bd848377078afd45",7:"62b29fa48e68a71bc2b0",8:"740be8826411a62bfb4f",9:"f27e1b404e3ff1651f80",10:"c71c26ffe9e929740644",11:"e85b90356083e5b3e250",12:"eab64c32b90535e29d75",13:"592dc8df338448632db8",14:"e3674474da8a18925ba8",15:"6bff0bcecd6f1ce1319d",16:"f4036a24000959bd38c8",17:"022c9fbbc20807dfcca3",18:"7a971724ceedf92fdfcc",19:"edf29dcffb061d49ffea",20:"5edeab301229712ae055",21:"cc4b11f9d593442a0878",22:"6603002d07c6911180b9",25:"9ceafa4ee79176c87d81"}[e]+".js";var a=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=d,f.appendChild(o),r},c.m=e,c.c=r,c.d=function(e,n,r){c.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},c.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(n,"a",n),n},c.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},c.p="./",c.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.83ad662c89d75539338d.js.map
\ No newline at end of file
......@@ -20,14 +20,14 @@ Vue.axios.interceptors.request.use(config=> {
})
Vue.axios.interceptors.response.use(data=> {
console.log("response data:",data)
// console.log("response data:",data)
if (data.status && data.status == 200 && data.data.status == 'error') {
Message.error({message: data.data.msg});
return;
}
return data;
}, err=> {
console.log("response err:",err);
// console.log("response err:",err);
Message.error({message: err.response.message});
if (err.response.status == 504||err.response.status == 404) {
......
......@@ -23,7 +23,7 @@
label="标签名称"
show-overflow-tooltip>
<template slot-scope="scope">
<div class="myTagTab-name color-blue" @click="showTagShort(scope.row)">
<div class="myTagTab-name color-blue" @click="showTagShort(scope.row,'first')">
{{ scope.row.tagName }}
</div>
</template>
......@@ -75,7 +75,7 @@
label="标签名称"
show-overflow-tooltip>
<template slot-scope="scope">
<div class="myTagTab-name color-blue" @click="showTagShort(scope.row)">{{ scope.row.tagName }}</div>
<div class="myTagTab-name color-blue" @click="showTagShort(scope.row,'second')">{{ scope.row.tagName }}</div>
</template>
</el-table-column>
<el-table-column
......@@ -114,7 +114,10 @@
selTagData: {
type: Array
},
delTagId: String
delTagId: String,
returnEditObj: {
type: Object
}
},
data() {
return {
......@@ -242,10 +245,65 @@
ele.isAdd = false;
}
})
console.log(selIds)
console.log("已选的 ids:",selIds)
// 先更新暂存架数据
// that.getTempList(selIds)
if (that.addTagTabActive === 'first') {
// 如果当前操作时我的标签列表
if (!!selIds.length) {
that.temporaryData.forEach(function(ele,index){
if (selIds.includes(ele.tagId)) {
// console.log("yes data")
that.$refs.templateTable.toggleRowSelection(ele,true)
// console.log(ele,that.$refs.templateTable)
for(let el of that.selTagData){
if (el.tagId == ele.tagId) {
ele.tagParams = el.tagParams;
ele.tagValue = el.tagValue;
ele.newTagVal = el.newTagVal;
}
}
// console.log("新的 ele:",ele)
}else {
if (!!that.delTagId && that.delTagId != ele.tagId) {
// console.log("no data")
}
}
})
console.log("更新暂存架数据:",that.temporaryData,that.delTagId)
that.$forceUpdate()
}else {
that.$refs.templateTable.clearSelection()
}
}else {
// 在暂存架的时候
console.log('暂存架操作:')
}
// console.log("更新暂存架数据:",that.temporaryData)
},
/**
* 组件添加标签,判断暂存架已选
*/
checkTempSelectTag(selIds) {
const that = this
// 判断暂存架的已选状态
if (that.addTagTabActive === 'first') {
// 如果当前操作时我的标签列表
that.temporaryData.forEach(function(ele,index){
if (selIds.indexOf(ele.tagId) != -1) {
that.$refs.templateTable.toggleRowSelection(ele,true)
}
})
}
console.log("更新后暂存架数据:",that.temporaryData)
},
/**
* 点击子组件分类,改变当前分类 id
......@@ -269,7 +327,7 @@
/**
* 获取暂存架列表 API
*/
getTempList() {
getTempList(selIds) {
const that = this
const para = {
......@@ -293,7 +351,10 @@
})
// console.log(dataVal)
that.temporaryData = dataVal
// if (!!selIds && that.addTagTabActive === 'first') {
// that.checkTempSelectTag(selIds)
// }
return;
}
......@@ -316,7 +377,7 @@
handleSelectChange(val) {
var that = this
console.log(val);
// that.selectTableArr = val;
that.selectTableArr = val;
// // 返回暂存架已选数据
// that.$emit('returnTempData',val);
// // 返回暂存架数据
......@@ -328,13 +389,22 @@
*/
handleSelectAll(selection){
const that = this
if(!!selection.length){
that.selectTableArr = selection;
if (that.addTagTabActive === 'first') {
// 如果当前操作时我的标签列表
return false;
}
// 返回暂存架已选数据
that.$emit('returnTempData',selection);
}else {
that.selectTableArr = [];
// 返回暂存架已选数据
if (that.addTagTabActive === 'first') {
// 如果当前操作时我的标签列表
return false;
}
// 返回暂存架数据
that.$emit('returnTempTableData',that.temporaryData)
}
},
......@@ -344,16 +414,20 @@
*/
selectRow(selection, row){
const that = this
console.log(selection, row)
console.log("单选一行:",selection, row)
if(!!selection.length){
that.selectTableArr = selection;
// 判断是选择还是不选
let ids = that.selectTableArr.map(item=>item.tagId)
// 不选
if (ids.indexOf(row.tagId) == -1) {
// 返回暂存架已选标签 id
that.$emit('returnTempTagId',row.tagId)
}else{
// 选择一行,返回当前一行数据
that.$emit('returnTempRowData',row);
}
// 返回暂存架已选数据
that.$emit('returnTempData',selection);
}else {
that.selectTableArr = [];
// 返回暂存架已选标签 id
......@@ -364,10 +438,11 @@
/**
* 点击标签名,显示标签详情缩略版
*/
showTagShort(row) {
showTagShort(row,tab) {
const that = this
// that.toggleTagListFlag = false;
that.$emit('showShortDetail',row.tagId)
that.$emit('showTabActive',tab)
},
......@@ -379,32 +454,56 @@
// that.getTempList();
},
toDelTagId() {
/**
* 暂存架里编辑标签值返回 obj---改变当前原有值
*/
changeTempTagRowData(data){
const that = this
console.log("删除id:",that.delTagId)
if (!!that.delTagId) {
if (!!that.selectTableArr.length) {
that.selectTableArr.forEach(function(ele,index){
if (ele.tagId == that.delTagId) {
that.selectTableArr.splice(index,1)
}
})
if (!that.selectTableArr.length) {
that.$refs.templateTable.clearSelection();
return false;
}
console.log("标签值返回 obj:",data)
let newTagVal = JSON.parse(data.tagParams)
if (newTagVal.selectedVal != '') {
data.newTagVal = newTagVal.selectedVal
}else{
data.newTagVal = ''
}
let selTagArr = that.selectTableArr.map(item=>item.tagId)
console.log('已选 items:',selTagArr)
that.temporaryData.forEach(function(ele,index){
if (selTagArr.indexOf(ele.tagId) != -1) {
console.log(ele)
that.$refs.templateTable.toggleRowSelection(ele)
}
})
}else{
that.$refs.templateTable.clearSelection();
that.temporaryData.forEach(function(ele,index){
if (ele.tagId == data.tagId) {
ele.tagParams = data.tagParams;
ele.tagValue = data.tagValue;
ele.newTagVal = data.newTagVal
}
})
},
/**
* 已选标签为删除---更新暂存架的已选标志(删除后更新暂存架有些问题,暂时采用先删后增的方式解决)
*/
toDelTagId(delTagId) {
const that = this
console.log("删除id:",that.selTagData,delTagId)
if (!!that.selTagData.length) {
let temData = null;
that.temporaryData.forEach(function(ele,index){
if (ele.tagId == delTagId) {
temData = ele
that.temporaryData.splice(index,1)
}
})
let selTagArrData = that.selTagData.map(item=>item.tagId)
console.log('已选 items:',that.selTagData)
that.temporaryData.forEach(function(ele,index){
if (selTagArrData.indexOf(ele.tagId) != -1) {
that.$refs.templateTable.toggleRowSelection(ele,true)
console.log('已选 :')
}
})
console.log(temData)
that.temporaryData.push(JSON.parse(JSON.stringify(temData)))
that.$forceUpdate()
}else{
that.$refs.templateTable.clearSelection();
}
}
......@@ -414,12 +513,20 @@
selTagData: function(newData,oldData){
const that = this
console.log("selTagData:",newData)
// that.checkSelectTag();
that.checkSelectTag();
// that.getTempList();
},
delTagId: function(newData,oldData){
const that = this
if (!!newData) {
console.log('delTagId :',newData)
that.toDelTagId(newData)
}
},
returnEditObj: function(newData,oldData){
const that = this
if (!!newData && !!Object.keys(newData).length) {
that.changeTempTagRowData(newData)
}
}
},
......@@ -427,8 +534,6 @@
const that = this;
that.getTagList();
that.getTempList();
},
components: {
tagCategorySmall
......
......@@ -6,7 +6,7 @@
<div class="common-wrap__opt">
<el-input
class="w-184"
placeholder="请输入标签"
placeholder="搜索标签"
prefix-icon="el-icon-search"
v-model="tagSearch"
@keyup.enter.native="searchEnterFun">
......
......@@ -543,7 +543,8 @@
props: {
showTagDetail: Boolean,
tagShortId: String,
fromFlag: String // memberGroup: 会员分组-我的标签列表用; mytag: 我的标签列表用
fromFlag: String, // memberGroup: 会员分组-我的标签列表用; mytag: 我的标签列表用
tabActive: String, // tab 名字.我的标签列表/暂存架
},
data() {
return {
......@@ -1368,10 +1369,15 @@
// console.log(res,res.data,res.data.errorCode)
var resData = res.data
if (resData.errorCode == 1) {
showMsg.showmsg('添加成功','success');
if (that.tabActive != 'second') {
// 如果是在暂存架修改标签值
showMsg.showmsg('添加成功','success');
}
that.closeTagShortDialog()
// 如果来源是 会员标签编辑的时候
console.log("来源是 会员标签编辑:",that.fromFlag)
if (that.fromFlag == 'memberGroup') {
let sendObj = {
tagId: that.tagShortId,
......@@ -1382,7 +1388,7 @@
}
// that.closeTagShortDialog()
that.$emit('returnTagData',sendObj)
// return false;
return false;
}
// 更新暂存架
that.$emit('updateTemp');
......@@ -2204,11 +2210,15 @@
if (!newVal) {return false;}
that.getTagData(newVal)
},
fromFlag: function(newVal) {
const that = this;
console.log('fromFlag:',newVal)
}
},
mounted() {
const that = this;
that.tagShortVisible = that.showTagDetail;
console.log(that.tagShortId)
console.log("传入的 tagId:",that.tagShortId)
that.getcityData();
document.getElementById("app").style.zIndex = 1;
// that.getTagData(that.tagShortId)
......
......@@ -46,13 +46,13 @@ Vue.axios.interceptors.request.use(
});
Vue.axios.interceptors.response.use(
response => {
console.log("main:", response);
// console.log("main:", response);
if (response.status == 200 && response.data.errorCode == 1) {
// router.replace({
// path: 'login',
// query: {redirect: router.currentRoute.fullPath}
// })
console.log("main:", response);
// console.log("main:", response);
}
return response;
},
......
......@@ -10,7 +10,7 @@
<div class="common-wrap__opt">
<el-input
class="w-184"
placeholder="请输入标签"
placeholder="搜索标签"
prefix-icon="el-icon-search"
v-model="tagSearch"
clearable
......
......@@ -78,6 +78,7 @@
:fromFlag="fromFlag"
:showTagDetail="showTagDetail"
:tagShortId.sync="tagShortDetailId"
:tabActive="tabActiveName"
@hideTag="handleHideTag"
@returnTagData="returnTagData" >
</tagShortDetail>
......@@ -88,10 +89,13 @@
:delTagId="delTagId"
:addTagShow="showTagFlag"
:selTagData="selectedTagData"
:returnEditObj="returnEditObj"
@showTabActive="showTabActive"
@showShortDetail="showShortDetail"
@returnTempData="returnTempData"
@returnTempTableData="returnTempTableData"
@returnTempTagId="returnTempTagId">
@returnTempTagId="returnTempTagId"
@returnTempRowData="returnTempRowData">
</add-tag-view>
</div>
</template>
......@@ -212,6 +216,9 @@
tagShortDetailId: '', // 标签详情缩写版 id
fromFlag: 'memberGroup', // 参数--来源标志
delTagId: '',// 删掉 id
returnEditObj: {}, // 标签详情缩小版返回的对象
tabActiveName: 'first',// 我的标签列表/暂存架
}
},
......@@ -307,9 +314,9 @@
// 检查实时
that.checkRealTime();
that.delTagId = item.tagId;
setTimeout(function(){
that.$refs.addTagViewComponent.toDelTagId()
},10)
// setTimeout(function(){
// that.$refs.addTagViewComponent.toDelTagId()
// },10)
},
/**
......@@ -438,16 +445,24 @@
returnTagData(obj) {
const that = this;
console.log("返回obj:",obj)
that.returnEditObj = obj; // 标签详情编辑后返回的标签数据
if (that.tabActiveName == 'second') {
// 如果是在暂存架修改标签值
return false;
}
let allIds = !!that.selectedTagData.length? that.selectedTagData.map(item=>item.tagId): [];
if (allIds.indexOf(obj.tagId) != -1) {
// 存在覆盖
that.selectedTagData.forEach(function(ele,index){
let newList = JSON.parse(JSON.stringify(that.selectedTagData))
newList.forEach(function(ele,index){
if (ele.tagId == obj.tagId) {
ele.tagValue = obj.tagValue;
ele.tagParams = obj.tagParams;
}
})
that.selectedTagData = newList;
}else {
console.log(allIds.indexOf(obj.tagId))
// 不存在直接追加
......@@ -458,33 +473,53 @@
},
/**
* 子组件触发-- 暂存架选择后返回参数
* 子组件触发-- 全选---暂存架全选后返回参数
*/
returnTempData(arr){
const that = this;
console.log("暂存架已选:",arr)
console.log("暂存架全选数据:",arr)
if (!!arr.length) {
let tagIds = arr.map(item=>item.tagId)
let tagAllIds = arr.map(item=>item.tagId)
console.log(tagAllIds)
// 存在先删除,后追加新数据
that.selectedTagData.forEach(function(ele,index){
if (tagIds.indexOf(ele.tagId) != -1) {
that.selectedTagData.splice(index,1)
let midData = JSON.parse(JSON.stringify(that.selectedTagData))
let newMidData = [];
midData.forEach(function(ele,index){
// 全选中如果有标签不在 已选数据中,就要单独挑出来
if (!tagAllIds.includes(ele.tagId)) {
newMidData.push(ele)
}
})
// midData = midData.filter(item=>(tagIds.indexOf(item.tagId) == -1))
// console.log("处理已选的时候:",newMidData)
arr.forEach(function(ele,index){
that.selectedTagData.push(ele)
newMidData.push(ele)
})
that.selectedTagData = newMidData
// console.log("全选的时候:",newMidData)
that.handleReturnData(that.selectedTagData)
}
},
/**
* 子组件触发--返回暂存架数据
* 子组件触发--全不选---返回暂存架所有标签数据
*/
returnTempTableData(val){
returnTempTableData(arrData){
const that = this
console.log("返回暂存架数据:",val)
console.log("返回暂存架所有标签数据:",arrData)
let tagIds = arrData.map(item=>item.tagId);
// 存在先删除,后追加新数据
let midData = JSON.parse(JSON.stringify(that.selectedTagData))
let newMidData = [];
midData.forEach(function(ele,index){
if (!tagIds.includes(ele.tagId)) {
newMidData.push(ele);
}
})
console.log("全不选:",midData)
that.selectedTagData = newMidData;
that.handleReturnData(that.selectedTagData);
},
/**
......@@ -499,7 +534,33 @@
that.selectedTagData.splice(index,1)
}
})
console.log("返回暂存架标签 id 后:",that.selectedTagData)
// 更新 form 数据
that.ruleForm.selectedTag = that.selectedTagData
},
/**
* 子组件触发--返回暂存架当前标签数据
*/
returnTempRowData(row){
const that = this
// 判断当前标签是否在已选数据中
let delData = JSON.parse(JSON.stringify(that.selectedTagData))
delData.forEach(function(ele,index){
if (ele.tagId == row.tagId) {
ele.tagParams = row.tagParams;
ele.tagValue = row.tagValue;
ele.newTagVal = row.newTagVal;
}
})
let ids = delData.map(item=>item.tagId)
// 暂存架选择的标签不在已选数据中
if (ids.indexOf(row.tagId) == -1) {
delData.push(row)
}
that.selectedTagData = delData;
that.ruleForm.selectedTag = that.selectedTagData;
},
/**
......@@ -523,7 +584,15 @@
// 刷新暂存架
// console.log(that.$refs.addTagViewComponent)
that.$refs.addTagViewComponent.refreshTemp();
// that.$refs.addTagViewComponent.refreshTemp();
},
/**
* 子组件触发--返回当前 tab
*/
showTabActive(name){
const that = this;
that.tabActiveName = name;
}
},
......
......@@ -11,7 +11,7 @@
<div class="common-wrap__opt">
<el-input
class="w-184"
placeholder="请输入标签"
placeholder="搜索标签"
prefix-icon="el-icon-search"
v-model="tagSearch"
clearable
......
......@@ -10,7 +10,7 @@
<div class="common-wrap__opt">
<el-input
class="w-184"
placeholder="请输入标签"
placeholder="搜索标签"
prefix-icon="el-icon-search"
v-model="tagSearch"
clearable
......
......@@ -964,6 +964,17 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
position: absolute;
bottom: 3px;
right: 3px;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
cursor: pointer;
}
.common-libFields .common-lib__cell__radio .el-radio {
width: 50px;
height: 50px;
line-height: 50px;
}
.common-libFields .common-lib__cell__radio .el-radio__label {
......
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