1 |
- webpackJsonp([56],{"2DQJ":function(a,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:a.loading,expression:"loading"}],attrs:{id:"LabelAdministration"}},[e("div",{staticClass:"labelDiv clear"},[e("div",{staticClass:"clear",staticStyle:{display:"inline-block"}},[e("div",{staticClass:"oneLabel"},[a._m(0),a._v(" "),a.oneTagList.flag||0==a.oneTagList.arr.length?a._e():e("ul",a._l(a.oneTagList.arr,function(t,s){return e("li",{key:"oneTagList"+s,staticClass:"clear tagListHover",class:a.oneTagList.id==t.id?"active":"",on:{click:function(e){return a.tagEvent(t,1)}}},[e("div",{staticClass:"labelName"},[a._v(a._s(t.name))]),a._v(" "),a._m(1,!0),a._v(" "),e("div",{staticClass:"relieve",on:{click:function(e){return e.stopPropagation(),a.relieveTag({id:t.id,name:t.name,status:1})}}},[a._v("解除")])])}),0),a._v(" "),a.oneTagList.flag||0!=a.oneTagList.arr.length?a._e():e("div",{staticClass:"noLevelTag"},[a._v("暂无标签,"),e("span",{on:{click:function(t){return a.addTagEvent({status:1})}}},[a._v("去添加标签")])]),a._v(" "),e("div",{staticClass:"labelTotal clear"},[e("span",{staticClass:"total"},[a._v("共"+a._s(a.oneTagList.arr.length)+"个")]),a._v(" "),e("span",{staticClass:"addTag",on:{click:function(t){return a.addTagEvent({status:1})}}},[a._v("+ 添加标签")])])]),a._v(" "),a.level>=2?e("div",{staticClass:"oneLabel"},[a._m(2),a._v(" "),a.twoTagList.flag||0==a.twoTagList.arr.length?a._e():e("ul",a._l(a.twoTagList.arr,function(t,s){return e("li",{key:"twoTagList"+s,staticClass:"clear tagListHover",class:a.twoTagList.id==t.id?"active":"",on:{click:function(e){return a.tagEvent(t,2)}}},[e("div",{staticClass:"labelName"},[a._v(a._s(t.name))]),a._v(" "),a._m(3,!0),a._v(" "),e("div",{staticClass:"relieve",on:{click:function(e){return e.stopPropagation(),a.relieveTag({id:t.id,name:t.name,status:2})}}},[a._v("解除")])])}),0),a._v(" "),a.twoTagList.flag||0!=a.twoTagList.arr.length?a._e():e("div",{staticClass:"noLevelTag"},[a._v("暂无标签,"),e("span",{on:{click:function(t){return a.addTagEvent({status:2})}}},[a._v("去添加标签")])]),a._v(" "),e("div",{staticClass:"labelTotal clear"},[e("span",{staticClass:"total"},[a._v("共"+a._s(a.twoTagList.arr.length)+"个")]),a._v(" "),e("span",{staticClass:"addTag",on:{click:function(t){return a.addTagEvent({status:2})}}},[a._v("+ 添加标签")])])]):a._e(),a._v(" "),a.level>=3?e("div",{staticClass:"oneLabel otherLabel"},[a._m(4),a._v(" "),a.threeTagList.flag||0==a.threeTagList.arr.length?a._e():e("ul",a._l(a.threeTagList.arr,function(t,s){return e("li",{key:"threeTagList"+s,staticClass:"clear threeTagHover"},[e("div",{staticClass:"labelName"},[a._v(a._s(t.name))]),a._v(" "),e("div",{staticClass:"labelNum"}),a._v(" "),e("div",{staticClass:"relieve",on:{click:function(e){return e.stopPropagation(),a.relieveTag({id:t.id,name:t.name,status:3})}}},[a._v("解除")])])}),0),a._v(" "),a.threeTagList.flag||0!=a.threeTagList.arr.length?a._e():e("div",{staticClass:"noLevelTag"},[a._v("暂无标签,"),e("span",{on:{click:function(t){return a.addTagEvent({status:3})}}},[a._v("去添加标签")])]),a._v(" "),e("div",{staticClass:"labelTotal clear"},[e("span",{staticClass:"total"},[a._v("共"+a._s(a.threeTagList.arr.length)+"个")]),a._v(" "),e("span",{staticClass:"addTag",on:{click:function(t){return a.addTagEvent({status:3})}}},[a._v("+ 添加标签")])])]):a._e()])]),a._v(" "),e("my-dialog",{staticClass:"addTagToast",attrs:{visible:a.dialogFlag,width:"440px"},on:{"update:visible":function(t){a.dialogFlag=t}}},[e("h3",[a._v("添加标签\n "),e("span",[a._v(a._s(2==a.addLevel?a.oneTagList.name:3==a.addLevel?a.oneTagList.name+"_"+a.twoTagList.name:""))])]),a._v(" "),e("div",{staticClass:"searchInput"},[e("el-input",{staticClass:"input",attrs:{placeholder:"请输入内容",size:"small",clearable:""},on:{clear:function(t){a.searchResult.arr=[],a.searchResult.flag=!1}},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&a._k(t.keyCode,"enter",13,t.key,"Enter")?null:a.tag_searchSign()}},model:{value:a.searchKeyWord,callback:function(t){a.searchKeyWord="string"==typeof t?t.trim():t},expression:"searchKeyWord"}}),a._v(" "),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return a.tag_searchSign()}}},[a._v("搜索")])],1),a._v(" "),a.searchResult.flag&&0!=a.searchResult.arr.length?e("ul",{staticClass:"tagList"},a._l(a.searchResult.arr,function(t,s){return e("li",{key:"searchResult"+s,staticClass:"clear",class:0==t.level?"yesHover":""},[e("span",{staticClass:"name"},[a._v(a._s(t.name))]),a._v(" "),0==t.level?e("span",{staticClass:"add",on:{click:function(e){return a.tag_addSign({name:t.name})}}},[a._v("+ 添加")]):e("span",{staticClass:"hint"},[a._v(a._s("已被使用:"+t.sign))])])}),0):a._e(),a._v(" "),a.searchResult.flag&&0==a.searchResult.arr.length?e("div",{staticClass:"noTag"},[e("div",{staticClass:"noTagHint"},[a._v("无结果")]),a._v(" "),e("el-button",{staticStyle:{display:"block",margin:"auto"},attrs:{type:"primary",size:"small"},on:{click:function(t){return a.tag_addSign({name:""})}}},[a._v("添加该标签")])],1):a._e()])],1)},staticRenderFns:[function(){var a=this.$createElement,t=this._self._c||a;return t("div",{staticClass:"title clear"},[t("span",{staticClass:"labelTitle"},[this._v("一级标签")])])},function(){var a=this.$createElement,t=this._self._c||a;return t("div",{staticClass:"labelNum"},[t("i",{staticClass:"el-icon-arrow-right"})])},function(){var a=this.$createElement,t=this._self._c||a;return t("div",{staticClass:"title clear"},[t("span",{staticClass:"labelTitle"},[this._v("二级标签")])])},function(){var a=this.$createElement,t=this._self._c||a;return t("div",{staticClass:"labelNum"},[t("i",{staticClass:"el-icon-arrow-right"})])},function(){var a=this.$createElement,t=this._self._c||a;return t("div",{staticClass:"title clear"},[t("span",{staticClass:"labelTitle"},[this._v("三级标签")])])}]};var i=e("C7Lr")({data:function(){return{dialogFlag:!1,id:0,searchKeyWord:"",searchResult:{flag:!1,arr:[]},oneTagList:{flag:!0,id:0,name:"",arr:[]},twoTagList:{flag:!0,id:0,name:"",arr:[]},threeTagList:{flag:!0,id:0,arr:[]},level:1,addLevel:1,loading:!1}},created:function(){this.tag_signList(0)},methods:{addTagEvent:function(a){var t=a.status;this.addLevel=t,this.dialogFlag=!0},tagEvent:function(a,t){this.id=a.id,1==t&&(this.oneTagList.id=a.id,this.oneTagList.name=a.name,this.level=2),2==t&&(this.twoTagList.id=a.id,this.twoTagList.name=a.name,this.level=3),this.tag_signList(this.id)},relieveTag:function(a){var t=this,e=a.id,s=a.name,i=a.status;this.$confirm("您确定要解除《"+s+"》标签?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.tag_unlockSign(e,i)}).catch(function(){})},tag_unlockSign:function(a,t){var e=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.tag_unlockSign,{params:{id:a,type:2}}).then(function(a){if(a=a.data,e.loading=!1,a&&0==a.errno){e.addLevel=t,e.level=t;var s=1==e.addLevel?0:2==e.addLevel?e.oneTagList.id:3==e.addLevel?e.twoTagList.id:"";e.tag_signList(s,"add"),e.$message({type:"success",message:"标签解除成功!"})}else e.$message({message:a.err,type:"warning"})}).catch(function(a){e.loading=!1})},tag_signList:function(a,t){var e=this;this.loading=!0,1==this.level&&(this.oneTagList.flag=!0),2==this.level&&(this.twoTagList.flag=!0),3==this.level&&(this.threeTagList.flag=!0),this.$axios.get(this.URL.BASEURL+this.URL.tag_signList,{params:{id:a,type:2}}).then(function(a){a=a.data,e.loading=!1,1==e.level&&(e.oneTagList.flag=!1),2==e.level&&(e.twoTagList.flag=!1),3==e.level&&(e.threeTagList.flag=!1),a&&0==a.errno?"add"==t?(1==e.addLevel&&(e.oneTagList.arr=a.rst),2==e.addLevel&&(e.twoTagList.arr=a.rst),3==e.addLevel&&(e.threeTagList.arr=a.rst)):(1==e.level&&(e.oneTagList.arr=a.rst),2==e.level&&(e.twoTagList.arr=a.rst),3==e.level&&(e.threeTagList.arr=a.rst)):e.$message({message:a.err,type:"warning"})}).catch(function(a){e.loading=!1,1==e.level&&(e.oneTagList.flag=!1),2==e.level&&(e.twoTagList.flag=!1),3==e.level&&(e.threeTagList.flag=!1)})},tag_searchSign:function(){var a=this;this.searchResult.flag=!1,this.$axios.get(this.URL.BASEURL+this.URL.tag_searchSign,{params:{name:this.searchKeyWord,type:2}}).then(function(t){t=t.data,a.loading=!1,a.searchResult.flag=!0,t&&0==t.errno?a.searchResult.arr=t.rst:a.$message({message:t.err,type:"warning"})}).catch(function(t){a.loading=!1})},tag_addSign:function(a){var t=this,e=a.name;this.$axios.get(this.URL.BASEURL+this.URL.tag_addSign,{params:{parent_id:1==this.addLevel?0:2==this.addLevel?this.oneTagList.id:3==this.addLevel?this.twoTagList.id:"",level:this.addLevel,name:e||this.searchKeyWord,type:2}}).then(function(a){if(a=a.data,t.loading=!1,a&&0==a.errno){t.searchKeyWord="",t.searchResult={flag:!1,arr:[]},t.dialogFlag=!1;var e=1==t.addLevel?0:2==t.addLevel?t.oneTagList.id:3==t.addLevel?t.twoTagList.id:"";t.tag_signList(e,"add")}else t.$message({message:a.err,type:"warning"})}).catch(function(a){t.loading=!1})}}},s,!1,function(a){e("uOAy")},"data-v-2215d679",null);t.default=i.exports},uOAy:function(a,t){}});
|