(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4c980062","chunk-ae7cb8dc","chunk-ae7cb8dc"],{"0a2c":function(e,t,a){},"1a80":function(e,t,a){},"21ea":function(e,t,a){},"22c1":function(e,t,a){"use strict";a("8d8d")},"2a3a":function(e,t,a){},"3d44":function(e,t,a){"use strict";a("0a2c")},"45ef":function(e,t,a){"use strict";a("d3c1")},"54dc":function(e,t,a){},5633:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"customBread"},[a("div",{staticClass:"page-header clearfix"},[a("div",{staticClass:"page-header-index-wide",staticStyle:{float:"left"}},[a("a-breadcrumb",{staticClass:"breadcrumb"},e._l(e.breadList.loopBread,(function(t){return a("a-breadcrumb-item",{key:t.name},[t.href?a("router-link",{attrs:{to:{path:t.href}}},[e._v("\n "+e._s(t.title)+"\n ")]):a("span",[e._v(e._s(t.title))])],1)})),1),a("div",{staticClass:"detail"},[a("div",{staticClass:"customBreadcrumb-current"},[a("h1",{staticClass:"title"},[e._v(e._s(e.breadList.current))]),e.breadList.showNote&&e.breadList.isText?a("a-tooltip",{attrs:{placement:"bottomLeft"}},[a("template",{slot:"title"},[a("div",{domProps:{innerHTML:e._s(e.noteRender())}})]),a("a-icon",{staticClass:"customBreadcrumb-icon",attrs:{type:"exclamation-circle"}})],2):e.breadList.showNote?a("a-popover",{attrs:{placement:"bottomLeft",overlayClassName:"custom-crumbcrumb-tips"}},[a("template",{slot:"content"},[a("div",{domProps:{innerHTML:e._s(e.noteRender())}})]),a("a-icon",{staticClass:"customBreadcrumb-icon",attrs:{type:"exclamation-circle"}})],2):e._e()],1)])],1),a("div",{staticClass:"customBreadRight"},[e._t("default")],2)])])},r=[],s={props:{breadList:{type:Object,required:!0}},methods:{noteRender:function(){var e=this.breadList.current;switch(e){case"热搜词":return'\n
\n
\n
\n \n
\n
\n
\n ';case"搜索暗文":return'\n
\n
\n
\n \n
\n
\n
\n ';case"搜索跳转":return'\n
\n
\n
\n 设置搜索词跳转到指定的落地页\n
\n
\n
\n ';case"搜索联想词":return'\n
\n
\n
\n \n
\n
\n
\n ';case"热推商品":return'\n
\n
\n
\n 搜索商品列表页、运营分类商品列表页、品牌商品列表页、店铺商品列表页的商品,优先展示热推商品,同为热推商品,按排序值由小到大展示。\n
\n
\n
\n ';case"搜索无结果关联词":return'\n
\n
\n
\n \n
\n
\n
\n ';case"商品排序得分":return'\n
\n
\n

商品综合排序规则说明:

\n
    \n
  1. 无库存商品,排在有库存商品之后
  2. \n
  3. 热推商品展示在前,非热推商品展示在后;热推商品按热推商品排序值由小到大排序
  4. \n
  5. 运营分类商品列表:按运营分类人工排值由小到大排序(不适用搜索商品列表页、品牌商品列表页、店铺商品列表页)
  6. \n
  7. \n 排序值相同,按系统自动计算的商品排序得分由大到小排序。
    \n 商品排序得分="0.7*支付件数+0.03*下单件数+0.02*加购件数+0.05*访问uv+0.2*新品得分(新品=1,否则=0)
    \n 支付件数:最近一年已支付状态订单的sku件数合计
    \n 下单件数:最近一年所有状态订单的sku件数合计
    \n 加购件数:最近一年加入购物车的sku件数合计
    \n 访问uv:最近一年商品浏览访问uv合计
    \n 新品得分:新品=1,否则=0。设置新品规则 >>\n
  8. \n
  9. 若人工排序值和系统排序值都相同,则按照搜索引擎返回的顺序排序
  10. \n
\n
\n
\n ';case"异款SPU规则":return'\n
\n
\n
\n 将属于规则设置范围内,且属于同一店铺、同一品牌、同一品类,且符合价格最大极差的不同款商品,聚合成一个SPU商品\n
\n
\n
\n ';case"主图视频":return'\n
\n
\n
\n 按SPU编码维度,通过第三方视频生成服务,使用商品主图生成主图视频\n
\n
\n
\n ';default:return""}}}},n=s,o=(a("22c1"),a("2877")),l=Object(o["a"])(n,i,r,!1,null,"ceaaba20",null);t["a"]=l.exports},"583f":function(e,t,a){"use strict";a("645e")},"645e":function(e,t,a){},"8d8d":function(e,t,a){},"8eef":function(e,t,a){"use strict";a("d6a4")},a2df:function(e,t,a){"use strict";a("21ea")},a3e8:function(e,t,a){"use strict";a("bbe8")},aabc:function(e,t,a){"use strict";a("1a80")},bbe8:function(e,t,a){},cf10:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("custom-bread",{attrs:{breadList:e.breadList}}),a("div",{staticClass:"matter-list-content"},[a("a-tabs",{attrs:{animated:!1},on:{change:e.onTabChange},model:{value:e.tabsName,callback:function(t){e.tabsName=t},expression:"tabsName"}},e._l(e.tabName,(function(t){return a("a-tab-pane",{key:t.value,attrs:{tab:t.name}},[a("div",{staticStyle:{height:"32px"}},[a("a-button",{directives:[{name:"permission",rawName:"v-permission",value:t.permission,expression:"item.permission"}],attrs:{type:"primary"},on:{click:function(a){return e.uploadImgVideo(t.value)}}},[e._v("上传"+e._s(t.name))])],1),a("a-layout",{staticClass:"matter-list-layout"},[a("a-layout-sider",{staticClass:"matter-list-layout-slider",attrs:{width:"200"}},[a("a-spin",{staticClass:"tree-spin",attrs:{spinning:e.treeSpinning}},[a("group-tree",{ref:"matterGroupTree",refInFor:!0,attrs:{dataSource:t.data,tabs:t},on:{selectTree:e.onSelectTree,updateGroupTree:e.updateTree,updateGroupTreeList:e.updateGroupTreeList}})],1)],1),a("a-layout-content",{staticClass:"matter-list-layout-content"},[a("a-spin",{attrs:{spinning:e.listSpinning}},[a("group-list",{attrs:{currentPage:e.query.page,tabs:t,dataSource:t.listData,treeData:t.data,groupTitle:e.groupName},on:{updateList:e.updateGroupList,queryList:e.handleSubmit}}),e.pageTotal>0?a("p-agination",{attrs:{total:e.pageTotal,currentPage:e.query.page,computedPageNumber:e.computedPageNumber,pageSize:e.query.limit},on:{jumpTableChange:e.jumpTableChange,selectPageSizeChange:e.selectPageSizeChange}}):e._e()],1)],1)],1)],1)})),1)],1),a("matter-img-upload",{ref:"matterImages",attrs:{treeData:e.uploadTreeData},on:{updateImgList:e.updateGroupList}}),a("matter-video-upload",{ref:"matterVideo",attrs:{treeData:e.uploadTreeData},on:{updateVideoSuccess:e.updateGroupList}}),a("edit-img",{ref:"editSingleImg"})],1)},r=[],s=(a("6b54"),a("ac6a"),a("c5f6"),a("5633")),n=a("5a22"),o=a("d460"),l=a("bf43"),c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("a-input-search",{staticStyle:{"margin-bottom":"8px"},attrs:{placeholder:"搜索分组"},on:{change:e.onSearch},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}}),a("a-tree",{staticClass:"antTreeCard",attrs:{"expanded-keys":e.expandedKeys,"auto-expand-parent":e.autoExpandParent,"tree-data":e.treeData,"selected-keys":e.selectedKeys},on:{expand:e.onExpand,select:e.onSelect},scopedSlots:e._u([{key:"title",fn:function(t){var i=t.title,r=t.key,s=t.parent_id,n=t.isDel,o=t.path;return[a("span",{staticClass:"title"},[i.length>5?a("a-tooltip",{attrs:{placement:"topLeft",title:i}},[e._v("\n "+e._s(i)+"\n ")]):[e._v("\n "+e._s(i)+"\n ")]],2),a("span",{staticClass:"but_operation"},[a("a-icon",{staticClass:"icon-edit",attrs:{type:"edit"},on:{click:function(t){return e.editTree(o,r,s,i,e.tabs.value)}}}),n?a("a-icon",{staticClass:"icon-edit",attrs:{type:"close"},on:{click:function(t){return e.closeTree(r,e.tabs.value,s,o)}}}):e._e()],1)]}}])}),a("a-button",{staticClass:"add-group",class:e.getPower()?"moveLeft":"",on:{click:e.addGroup}},[e._v("添加分组")]),a("group-manage",{ref:"groupManage",attrs:{listData:e.treeSelectData,tabs:e.tabs},on:{updateGroupTree:e.updateTree}}),a("edit-group",{ref:"batchModify",attrs:{listData:e.treeSelectData,tabs:e.tabs},on:{updateGroupTree:e.updateEditTree}}),a("group-del",{ref:"groupDel",on:{updateGroupTree:e.updateDelTree}})],1)},d=[],u=(a("20d6"),a("4f7f"),a("5df3"),a("1c4c"),a("2909")),m=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{width:"580px",title:"添加分组","ok-text":"确定","cancel-text":"取消",confirmLoading:e.confirmLoading},on:{ok:e.hideModal},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("a-form",{staticClass:"createPage",attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"所在分组",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{rules:[{required:!0}],initialValue:e.initValue}],expression:"['category_id',{\n rules:[{required:true}],initialValue: initValue\n }]"}],staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"300px",overflow:"auto"},"tree-data":e.listData,treeExpandedKeys:e.expandKeys,placeholder:"请选择",getPopupContainer:function(e){return e.parentNode}},on:{treeExpand:e.treeExpand}}),a("div",{staticStyle:{"font-size":"14px",height:"19px","line-height":"19px",color:"#999"}},[e._v("支持添加4级分组,列表仅展示可操作的分组")])],1),a("a-form-item",{attrs:{label:"分组名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入分组名称",pattern:/^(?!(\s+$))/},{max:10,message:"分组名称不能超过10个字符"}],validateTrigger:"blur",getValueFromEvent:function(e){return e.target.value.trim()}}],expression:"['name',\n {rules: [\n { required: true, message: '请输入分组名称',pattern: /^(?!(\\s+$))/},\n { max:10, message:'分组名称不能超过10个字符' }\n ],validateTrigger: 'blur',getValueFromEvent: event => {\n return event.target.value.trim()\n }}]"}],attrs:{placeholder:"请输入"},on:{change:e.changea}}),a("span",{staticClass:"characterLimit"},[e._v(e._s(e.groupNmaeValue.length)+"/10")])],1)],1)],1)},h=[],p=(a("7f7f"),a("0b8b")),f={data:function(){return{visible:!1,form:this.$form.createForm(this),labelCol:{span:6},wrapperCol:{span:15},initValue:0,expandKeys:[],confirmLoading:!1,groupNmaeValue:""}},props:{listData:{type:Array,require:!0,default:function(){return[]}},tabs:{type:Object,require:!0,default:function(){return{}}}},methods:{showModal:function(e){this.form.resetFields(),this.groupNmaeValue="",this.expandKeys=e,this.initValue=e[e.length-1],this.visible=!0},hideModal:function(){var e=this,t=this.form.validateFields;t((function(t,a){if(!t){e.confirmLoading=!0;var i="img"===e.tabs.value?p["a"]:p["b"];i(a).then((function(t){t?(e.$emit("updateGroupTree",e.tabs.value),e.$message.success("操作成功"),e.visible=!1,e.form.resetFields(),e.confirmLoading=!1):e.confirmLoading=!1})).catch((function(t){var a=e.form,i=a.validateFields,r=a.getFieldError,s=a.setFields;i(["name"],(function(a,i){a||r("name")||(s({name:{value:i.name,errors:[Error(t.message)]}}),e.confirmLoading=!1)}))}))}}))},changea:function(e){if(!e)return 0;this.groupNmaeValue=e.target.value},treeExpand:function(e){this.expandKeys=e}}},g=f,b=(a("a2df"),a("2877")),v=Object(b["a"])(g,m,h,!1,null,"3cd3550f",null),y=v.exports,_=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{width:"580px",title:"编辑分组","ok-text":"确定","cancel-text":"取消",confirmLoading:e.confirmLoading},on:{ok:e.hideModal},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("a-form",{staticClass:"createPage",attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"所在分组",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id",{rules:[{required:!0}],initialValue:e.initValue}],expression:"['parent_id',{\n rules:[{required:true}],initialValue: initValue\n }]"}],staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"300px",overflow:"auto"},"tree-data":e.listData,"tree-expanded-keys":e.expandKeys,placeholder:"请选择",getPopupContainer:function(e){return e.parentNode}},on:{treeExpand:e.treeExpand}}),a("div",{staticStyle:{"font-size":"14px",height:"19px","line-height":"19px",color:"#999"}},[e._v("支持添加4级分组,列表仅展示可操作的分组")])],1),a("a-form-item",{attrs:{label:"分组名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入分组名称",pattern:/^(?!(\s+$))/},{max:10,message:"分组名称不能超过10个字符"}],validateTrigger:"blur",getValueFromEvent:function(e){return e.target.value.trim()}}],expression:"['name',\n {rules: [\n { required: true, message: '请输入分组名称',pattern: /^(?!(\\s+$))/},\n { max:10, message:'分组名称不能超过10个字符' }\n ],validateTrigger: 'blur',getValueFromEvent: event => {\n return event.target.value.trim()\n }}]"}],attrs:{placeholder:"请输入"},on:{change:e.changea}}),a("span",{staticClass:"characterLimit"},[e._v(e._s(e.groupNameValue.length)+"/10")])],1)],1)],1)},x=[],C={data:function(){return{visible:!1,form:this.$form.createForm(this),labelCol:{span:6},wrapperCol:{span:15},initValue:0,expandKeys:[],listData:[],confirmLoading:!1,parent_id:"",groupNameValue:""}},props:{tabs:{type:Object,require:!0,default:function(){return{}}}},methods:{showModal:function(e,t,a,i,r,s){var n=this,o=this.form.setFieldsValue;this.form.resetFields(),this.expandKeys=t,this.initValue=i,this.listData=e,this.category_id=a,this.visible=!0,setTimeout((function(){o({name:r}),n.groupNameValue=r}))},hideModal:function(){var e=this,t=this.form.validateFields;t((function(t,a){if(!t){e.confirmLoading=!0,a.category_id=1*e.category_id;var i="img"===e.tabs.value?p["g"]:p["h"];i(a).then((function(t){if(t){var i="img"===e.tabs.value?"matterImgTree":"matterVideoTree",r=e.$ls.get(i)||"";r.title=a.name,e.$ls.set(i,r),e.$emit("updateGroupTree",a.name),e.$message.success("操作成功"),e.visible=!1,e.form.resetFields(),e.confirmLoading=!1}else e.confirmLoading=!1})).catch((function(t){var a=e.form,i=a.validateFields,r=a.getFieldError,s=a.setFields;i(["name"],(function(a,i){a||r("name")||(s({name:{value:i.name,errors:[Error(t.message)]}}),e.confirmLoading=!1)}))}))}}))},changea:function(e){if(!e)return 0;this.groupNameValue=e.target.value},treeExpand:function(e){this.expandKeys=e}}},w=C,k=(a("a3e8"),Object(b["a"])(w,_,x,!1,null,"2107f7d0",null)),$=k.exports,N=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{width:"354px","ok-text":"确定","cancel-text":"取消",closable:!1,confirmLoading:e.confirmLoading},on:{ok:e.hideModal},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("div",{staticStyle:{"font-weight":"bold","font-size":"14px",display:"flex","align-items":"center"},attrs:{slot:"title"},slot:"title"},[a("a-icon",{staticStyle:{"margin-right":"12px","font-size":"24px",color:"#faad14"},attrs:{type:"exclamation-circle",theme:"filled"}}),e._v("确定要删除所选分组吗?")],1),a("a-form",{staticClass:"group-del-content",attrs:{form:e.form}},[a("a-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{model:{value:e.resource,callback:function(t){e.resource=t},expression:"resource"}},[a("a-radio",{style:e.radioStyle,attrs:{value:2}},[e._v("\n 仅删除分组\n "),a("p",{staticClass:"tips"},[e._v("仅删除分组,组内全部图片将自动归入未分组")])]),a("a-radio",{style:e.radioStyle,attrs:{value:1}},[e._v("\n 删除分组全部内容\n "),a("p",{staticClass:"tips"},[e._v("删除图片不会对已使用图片的业务造成影响")])])],1)],1)],1)],1)},S=[],T={data:function(){return{visible:!1,form:this.$form.createForm(this),labelCol:{span:6},wrapperCol:{span:15},radioStyle:{display:"block"},resource:2,category_id:0,parent_id:[],parent_name:"",path:[],tabs:"",confirmLoading:!1}},methods:{showModal:function(e,t,a,i,r){this.form.resetFields(),this.resource=2,this.category_id=1*e.toString(),this.tabs=t,this.parent_id.splice(0,1,a),this.path=i,this.parent_name=r,this.visible=!0},hideModal:function(){var e=this,t=this.form.validateFields;t((function(t,a){if(!t){e.confirmLoading=!0,a.category_id=e.category_id,a.is_delete_resource=e.resource;var i="img"===e.tabs?p["e"]:p["f"];i(a).then((function(t){t?(e.$emit("updateGroupTree",e.parent_id,e.path,e.parent_name),e.$message.success("操作成功"),e.visible=!1,e.form.resetFields(),e.confirmLoading=!1):e.confirmLoading=!1}))}}))}}},V=T,L=(a("aabc"),Object(b["a"])(V,N,S,!1,null,"2877eb4a",null)),D=L.exports,q=[],E=function e(t){for(var a=0;a-1){a.push.apply(a,Object(u["a"])(e.path));var r=JSON.parse(JSON.stringify(e.path));r.pop(),i.push.apply(i,Object(u["a"])(r)),e.children&&e.children.length&&0!==e.parent_id&&e.children.forEach((function(e){a.push(e.key)}))}}));var r=Array.from(new Set(a)),s=Array.from(new Set(i));if(this.treeData=JSON.parse(JSON.stringify(this.copyData)),t)r.length?(this.treeData.forEach((function(e){var t=[];e.children.forEach((function(e){if(r.indexOf(e.key)<=-1&&t.push(e.key),e.children&&e.children.length){var a=[];e.children.forEach((function(e){if(r.indexOf(e.key)<=-1&&a.push(e.key),e.children&&e.children.length){var t=[];e.children.forEach((function(e){r.indexOf(e.key)<=-1&&t.push(e.key)})),t.map((function(t){e.children.splice(e.children.findIndex((function(e){return e.key===t})),1)}))}})),a.map((function(t){e.children.splice(e.children.findIndex((function(e){return e.key===t})),1)}))}})),t.map((function(t){e.children.splice(e.children.findIndex((function(e){return e.key===t})),1)}))})),Object.assign(this,{expandedKeys:s,searchValue:t})):Object.assign(this,{treeData:[]});else{var n="img"===this.tabs.value?"matterImgTree":"matterVideoTree",o=[];o.push(this.copyData[0].value),s=this.$ls.get(n)&&this.$ls.get(n).expandedKeys?this.$ls.get(n).expandedKeys:o,Object.assign(this,{expandedKeys:s,searchValue:t})}},onExpand:function(e){this.expandedKeys=e,this.autoExpandParent=!1},onSelect:function(e,t){if(0!==e.length){this.selectedKeys=e,this.level=t.selectedNodes[0].data.props.level,this.selectedData=t.selectedNodes[0].data.props.dataRef;var a=t.selectedNodes[0].data.props.dataRef.title,i={keys:e,expandedKeys:t.selectedNodes[0].data.props.path,level:t.selectedNodes[0].data.props.dataRef.level,un_grouped:t.selectedNodes[0].data.props.dataRef.un_grouped,title:a};"img"===this.tabs.value?this.$ls.set("matterImgTree",i):this.$ls.set("matterVideoTree",i),this.$emit("selectTree",e,a)}},editTree:function(e,t,a,i,r){var s=this,n="img"===this.tabs.value?p["m"]:p["n"];n({category_id:t}).then((function(n){var o=n.data;o&&s.$refs.batchModify.showModal(o.category_list,e,t,a,i,r)}))},closeTree:function(e,t,a,i){var r="",s="";q.forEach((function(e){e.key===a&&(r=e.key,i=e.path,s=e.title)})),this.$refs.groupDel.showModal(e,t,r,i,s)},addGroup:function(){if(4===this.level)this.$message.error("分组不能超过4级");else{if(2===this.level&&this.selectedData.un_grouped)return void this.$message.error("未分组不支持添加子分组");var e="img"===this.tabs.value?"matterImgTree":"matterVideoTree",t=[];t=this.$ls.get(e)?this.$ls.get(e).expandedKeys:this.selectedKeys,this.$refs.groupManage.showModal(t)}},getPower:function(){var e="img"===this.tabs.value?"site:/media/picture_upload":"site:/media/vedio_upload",t=this.$store.getters.roles,a=e;for(var i in t)if(i===a&&"0"===t[i])return!0},updateTree:function(){this.$emit("updateGroupTree")},updateEditTree:function(e){this.$emit("updateGroupTree",e)},updateDelTree:function(e,t,a){var i={keys:e,expandedKeys:t,title:a,un_grouped:0};this.selectedKeys=t,"img"===this.tabs.value?this.$ls.set("matterImgTree",i):this.$ls.set("matterVideoTree",i),this.$emit("updateGroupTreeList",a)}}},I=M,O=(a("3d44"),Object(b["a"])(I,c,d,!1,null,"2ce04dda",null)),A=O.exports,P=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"group-list-wrapper"},[a("div",{staticClass:"group-name"},[e._v("\n "+e._s(e.groupTitle)+"\n ")]),a("div",{staticClass:"search-form"},[a("a-form",{attrs:{form:e.form,layout:"inline"},on:{submit:e.handleSubmit}},[a("a-form-item",[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.tabs.name)+"名称")]),a("a-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入"},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name","string"===typeof t?t.trim():t)},expression:"formData.name"}})],1),a("a-form-item",{attrs:{label:"排序"}},[a("a-select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择"},model:{value:e.formData.order,callback:function(t){e.$set(e.formData,"order",t)},expression:"formData.order"}},[a("a-select-option",{attrs:{value:"desc"}},[e._v("最新上传在前")]),a("a-select-option",{attrs:{value:"asc"}},[e._v("最新上传在后")])],1)],1),a("a-button",{style:{marginRight:"8px"},attrs:{type:"primary","html-type":"submit"}},[e._v("查询")]),a("a-button",{on:{click:e.handleReset}},[e._v("重置")])],1)],1),a("div",{staticClass:"operate-btn"},[a("a-checkbox",{attrs:{indeterminate:e.indeterminate,checked:e.checkAll},on:{change:e.onCheckAllChange}},[e._v("\n 当页全选\n ")]),a("span",{staticClass:"division first"}),a("div",{staticClass:"selected-num"},[e._v("已选"+e._s(e.selectedNum)+"项 / 500")]),a("span",{staticClass:"division"}),a("div",{staticClass:"batch-btn"},[e._v("\n 批量操作\n "),a("a-button",{attrs:{disabled:!e.checkedArr.length},on:{click:e.onBatchModify}},[e._v("修改分组")]),"img"===e.tabs.value?a("a-button",{attrs:{disabled:!e.checkedArr.length},on:{click:e.onBatchExport}},[e._v("导出链接")]):e._e(),a("a-button",{attrs:{disabled:!e.checkedArr.length},on:{click:function(t){return e.onDel("batch")}}},[e._v("删除")])],1)],1),a("div",{staticClass:"table-wrapper",class:e.dataSource&&e.dataSource.length?"table-wrapper-height":null},[e.dataSource&&e.dataSource.length?a("a-checkbox-group",{on:{change:e.onChange},model:{value:e.checkedArr,callback:function(t){e.checkedArr=t},expression:"checkedArr"}},[a("div",{staticClass:"table-list"},e._l(e.dataSource,(function(t){return a("div",{key:t.entity_id,staticClass:"list-item"},["img"===e.tabs.value?a("img",{staticClass:"list-item-img",attrs:{src:t.url+"?imageMogr2/thumbnail/105x105",alt:"",width:"105",height:"105"},on:{click:function(a){return e.showPrevisible(t.url)}}}):a("video",{staticClass:"list-item-img",staticStyle:{"object-fit":"contain"},attrs:{src:t.url,poster:t.cover_url?t.cover_url+"?imageMogr2/thumbnail/105x105":null,objectFit:"contain",width:"105px",height:"105px"},on:{click:function(a){return e.showVideoPrevisible(t.url)}}},[e._v("\n 您的浏览器不支持 video 标签。\n ")]),a("a-checkbox",{staticClass:"item-checkbox",attrs:{value:t.entity_id}}),a("div",{staticClass:"info"},[a("div",{staticClass:"size"},[e._v(e._s(t.size))]),a("div",{staticClass:"operation"},[a("span",{staticClass:"edit",on:{click:function(a){return e.onEditImg(t)}}},[e._v("编辑 | ")]),a("a",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:e.copyMsg(t.url),expression:"copyMsg(item.url)",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:e.onCopy,expression:"onCopy",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:e.onError,expression:"onError",arg:"error"}],staticClass:"copy",attrs:{href:"javascript:;"}},[e._v("链接 | ")]),a("span",{staticClass:"del",on:{click:function(a){return e.onDel("single",t.entity_id)}}},[e._v("删除")])])]),a("div",{staticClass:"name"},[a("a-tooltip",{attrs:{placement:"topLeft",overlayStyle:{maxWidth:"220px",fontSize:"12px"},title:t.name+"."+t.ext}},[e._v("\n "+e._s(t.name+"."+t.ext)+"\n ")])],1)],1)})),0)]):a("div",{staticStyle:{"text-align":"center"}},[a("a-empty",{attrs:{image:e.simpleImage}},[a("span",{attrs:{slot:"description"},slot:"description"},[e._v(" 暂无数据,可点击左上角“上传"+e._s(e.tabs.name)+"”按钮添加")])])],1)],1),a("a-modal",{attrs:{title:"预览",destroyOnClose:!0,width:"648px",footer:null},model:{value:e.previewVisible,callback:function(t){e.previewVisible=t},expression:"previewVisible"}},[a("video",{attrs:{src:e.videoPreviewSrc,controls:"controls",width:"600px",height:"600px"}},[e._v("\n 您的浏览器不支持 video 标签。\n ")])]),a("edit-img",{ref:"editSingleImg",attrs:{treeData:e.treeData},on:{updateList:e.updateList}}),a("edit-video",{ref:"editSingleVideo",attrs:{treeData:e.treeData},on:{updateList:e.updateList}}),a("batch-update",{ref:"batchModify",attrs:{treeData:e.treeData,categoryId:e.category_id},on:{updateList:e.updateList}}),a("imagePreview",{ref:"imagePreview",attrs:{imgSet:e.transformImagePreview}}),a("export-success",{ref:"exportSuccess"})],1)},F=[],j=(a("ac4d"),a("8a81"),a("7514"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{width:"580px",title:"编辑图片","ok-text":"确定","cancel-text":"取消",confirmLoading:e.confirmLoading},on:{ok:e.hideModal},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("a-form",{staticClass:"createPage",attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"所在分组",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{rules:[{required:!0}],initialValue:e.defaultValue[0]}],expression:"['category_id',{\n rules:[{required:true}],initialValue: defaultValue[0]\n }]"}],staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"300px",overflow:"auto"},"tree-data":e.treeData,"tree-default-expanded-keys":e.defaultValue,placeholder:"请选择",getPopupContainer:function(e){return e.parentNode}}})],1),a("a-form-item",{attrs:{label:"图片名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入图片名称",pattern:/^(?!(\s+$))/},{min:1,max:50,message:"长度不能超过50个字"}],initialValue:e.img_name,validateTrigger:"blur",getValueFromEvent:function(e){return e.target.value.trim()}}],expression:"['name',\n {rules: [\n { required: true, message: '请输入图片名称',pattern: /^(?!(\\s+$))/},{min: 1, max: 50, message: '长度不能超过50个字'}\n ],initialValue: img_name,validateTrigger: 'blur',getValueFromEvent: event => {\n return event.target.value.trim()\n }}]"}],attrs:{placeholder:"请输入"}})],1)],1)],1)}),K=[],G={data:function(){return{visible:!1,form:this.$form.createForm(this),labelCol:{span:6},wrapperCol:{span:15},confirmLoading:!1,category_id:0,entity_id:0,img_name:"",defaultValue:[]}},props:{treeData:{type:Array,require:!0,default:function(){return[]}}},methods:{showModal:function(e,t,a){this.form.resetFields(),this.category_id=e,this.entity_id=t,this.img_name=a,this.defaultValue=[],this.defaultValue.push(e),this.visible=!0},hideModal:function(){var e=this,t=this.form.validateFields;t((function(t,a){if(!t){e.confirmLoading=!0,a.entity_id=e.entity_id;var i=e.$ls.get("matterChecked")||[],r=e.category_id===a.category_id;Object(p["s"])(a).then((function(t){if(t){if(e.$emit("updateList"),!r&&i.length){var s=i.filter((function(e){return e!==a.entity_id}));e.$ls.set("matterChecked",s)}e.$message.success("操作成功"),e.visible=!1,e.form.resetFields(),e.confirmLoading=!1}else e.confirmLoading=!1}))}}))}}},Q=G,z=(a("dd93"),Object(b["a"])(Q,j,K,!1,null,"c6201a9a",null)),B=z.exports,R=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{width:"580px",title:"编辑视频","ok-text":"确定","cancel-text":"取消",confirmLoading:e.confirmLoading},on:{ok:e.hideModal,cancel:e.hideCancel},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("a-form",{staticClass:"createPage",attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"所在分组",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{rules:[{required:!0}],initialValue:e.defaultValue[0]}],expression:"['category_id',{\n rules:[{required:true}],initialValue: defaultValue[0]\n }]"}],staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"300px",overflow:"auto"},"tree-data":e.treeData,"tree-default-expanded-keys":e.defaultValue,placeholder:"请选择",getPopupContainer:function(e){return e.parentNode}}})],1),a("a-form-item",{attrs:{label:"视频名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入视频名称",pattern:/^(?!(\s+$))/},{min:1,max:50,message:"长度不能超过50个字"}],initialValue:e.img_name,validateTrigger:"blur",getValueFromEvent:function(e){return e.target.value.trim()}}],expression:"['name',\n {rules: [\n { required: true, message: '请输入视频名称',pattern: /^(?!(\\s+$))/},{min: 1, max: 50, message: '长度不能超过50个字'}\n ],initialValue: img_name,validateTrigger: 'blur',getValueFromEvent: event => {\n return event.target.value.trim()\n }}]"}],attrs:{placeholder:"请输入"}})],1),a("a-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{label:"视频封面",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("upload-img",{ref:"cover_image",staticClass:"video_cover",attrs:{uploadTips:"建议封面尺寸和视频尺寸保持一致,大小不超过500KB,支持jpg/png/gif格式",editImg:e.detailOrigin,uploadAttr:"cover_image",addUploadAddress:"/api-cms/media/upload",namespace:"media_center"},on:{noticeAddress:e.noticeAddress}})],1)],1)],1)},J=[],U=a("9424"),H={data:function(){return{visible:!1,form:this.$form.createForm(this),labelCol:{span:6},wrapperCol:{span:15},confirmLoading:!1,category_id:0,entity_id:0,img_name:"",detailOrigin:"",cover_file_id:"",defaultValue:[]}},components:{uploadImg:U["a"]},props:{treeData:{type:Array,require:!0,default:function(){return[]}}},methods:{showModal:function(e,t,a,i,r){var s=this;this.form.resetFields(),this.category_id=e,this.entity_id=t,this.img_name=a,this.defaultValue=[],this.defaultValue.push(e),this.cover_file_id=r,this.detailOrigin=i,this.visible=!0,setTimeout((function(){s.$refs.cover_image.alreadyAdress(i)}))},hideModal:function(){var e=this,t=this.form.validateFields;t((function(t,a){if(!t){e.confirmLoading=!0,a.entity_id=e.entity_id,e.cover_file_id&&(a.cover_file_id=e.cover_file_id);var i=e.$ls.get("matterVideoChecked")||[],r=e.category_id===a.category_id;Object(p["t"])(a).then((function(t){if(t){if(e.$emit("updateList"),!r&&i.length){var s=i.filter((function(e){return e!==a.entity_id}));e.$ls.set("matterVideoChecked",s)}e.$message.success("操作成功"),e.$refs.cover_image.closePreView(),e.visible=!1,e.form.resetFields(),e.confirmLoading=!1}else e.confirmLoading=!1}))}}))},hideCancel:function(){this.visible=!1,this.cover_file_id="",this.$refs.cover_image.closePreView()},noticeAddress:function(e){this.cover_file_id=e.file_id}}},W=H,X=(a("583f"),Object(b["a"])(W,R,J,!1,null,"252c718c",null)),Y=X.exports,Z=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{width:"580px",title:"修改分组","ok-text":"确定","cancel-text":"取消",confirmLoading:e.confirmLoading},on:{ok:e.hideModal},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("a-form",{staticClass:"createPage",attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"所在分组",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{rules:[{required:!0}],initialValue:e.initValue}],expression:"['category_id',{\n rules:[{required:true}],initialValue: initValue\n }]"}],staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"300px",overflow:"auto"},"tree-data":e.treeData,treeExpandedKeys:e.expandKeys,placeholder:"请选择",getPopupContainer:function(e){return e.parentNode}},on:{treeExpand:e.treeExpand}})],1)],1)],1)},ee=[],te={data:function(){return{visible:!1,form:this.$form.createForm(this),labelCol:{span:6},wrapperCol:{span:15},confirmLoading:!1,tabName:"img",initValue:0,expandKeys:[]}},props:{treeData:{type:Array,require:!0,default:function(){return[]}},categoryId:{type:Number,require:!0,default:0}},methods:{showModal:function(e,t){this.form.resetFields(),this.expandKeys=t,this.initValue=t[t.length-1],this.tabName=e,this.visible=!0},hideModal:function(){var e=this,t=this.form.validateFields;t((function(t,a){if(!t){e.confirmLoading=!0;var i="img"===e.tabName?"matterChecked":"matterVideoChecked",r=e.$ls.get(i)||[];a.entity_id=r;var s="img"===e.tabName?p["c"]:p["d"];s(a).then((function(t){t?(e.$emit("updateList"),e.$message.success("操作成功"),e.$ls.remove(i),e.visible=!1,e.form.resetFields(),e.confirmLoading=!1):e.confirmLoading=!1}))}}))},treeExpand:function(e){this.expandKeys=e}}},ae=te,ie=(a("45ef"),Object(b["a"])(ae,Z,ee,!1,null,"132c6db9",null)),re=ie.exports,se=a("4ef0"),ne=a("fc25"),oe=a("2af9");function le(e,t){var a;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(a=ce(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,n=!0,o=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return n=e.done,e},e:function(e){o=!0,s=e},f:function(){try{n||null==a.return||a.return()}finally{if(o)throw s}}}}function ce(e,t){if(e){if("string"===typeof e)return de(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?de(e,t):void 0}}function de(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);athis.maxCheckedNum){var n=this.checkedArr;n.pop(),this.$message.error("最多可选".concat(this.maxCheckedNum).concat("video"===this.tabs.value?"个":"张").concat(this.tabs.name))}else r.push.apply(r,Object(u["a"])(e)),this.$ls.set(t,r),this.selectedNum=r.length;this.indeterminate=!!e.length&&e.lengththis.maxCheckedNum){if(this.selectedNum0,this.$message.error("最多可选".concat(this.maxCheckedNum).concat("video"===this.tabs.value?"个":"张").concat(this.tabs.name));this.checkAll=!1}else s.push.apply(s,ue),this.$ls.set(a,s),this.selectedNum=s.length}else{var p=this.$ls.get(a)||[],f=ue,g=p.filter((function(e){return!f.some((function(t){return e===t}))}));p=g,this.$ls.set(a,g),this.selectedNum=g.length}},handleReset:function(){this.formData={name:"",order:"desc"},this.checkedArr=[];var e="img"===this.tabs.value?"matterChecked":"matterVideoChecked";this.$ls.remove(e),this.$emit("queryList",this.formData)},handleSubmit:function(e){void 0!==e&&e.preventDefault(),this.$emit("queryList",this.formData)},onBatchModify:function(){var e="img"===this.tabs.value?"matterImgTree":"matterVideoTree",t=[];this.$ls.get(e)?t=this.$ls.get(e).expandedKeys:t.push(this.category_id),this.$refs.batchModify.showModal(this.tabs.value,t)},onEditImg:function(e){"img"===this.tabs.value?this.$refs.editSingleImg.showModal(e.category_id,e.entity_id,e.name):this.$refs.editSingleVideo.showModal(e.category_id,e.entity_id,e.name,e.cover_url,e.cover_file_id)},onDel:function(e,t){var a=this.tabs.name,i=this.localName,r="img"===this.tabs.value?p["p"]:p["q"],s=this,n=[];"batch"===e?n=this.$ls.get(i)||[]:n.push(t);var o={entity_id:n};this.$confirm({icon:"exclamation-circle",title:"确定要删除所选".concat(a,"吗?"),content:"删除".concat(a,"不会对已使用").concat(a,"的业务造成影响"),okText:"确定",cancelText:"取消",onOk:function(){r(o).then((function(e){if(e){var t=s.$ls.get(i)||[],a=n,r=t.filter((function(e){return!a.some((function(t){return e===t}))}));t=r,s.$ls.set(i,r),s.$emit("updateList"),s.$message.success("操作成功")}}))},onCancel:function(){}})},onBatchExport:function(){var e=this,t={entity_id:this.$ls.get("matterChecked")||[]},a={export_type:1,condition_params:JSON.stringify(t)};Object(p["i"])(a).then((function(t){t&&e.$refs.exportSuccess.showModal()}))},copyMsg:function(e){return e},onCopy:function(){this.$message.success("链接复制成功,请用ctrl+v粘贴即可")},onError:function(){this.$message.error("复制失败,请重试")},updateList:function(){this.$emit("updateList")},showPrevisible:function(e){this.$refs.imagePreview.imagePreview(e)},showVideoPrevisible:function(e){this.previewVisible=!0,this.videoPreviewSrc=e}},beforeCreate:function(){this.simpleImage=ne["a"].PRESENTED_IMAGE_SIMPLE}},he=me,pe=(a("8eef"),Object(b["a"])(he,P,F,!1,null,"105b981e",null)),fe=pe.exports,ge=[],be=function e(t){for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:"";this.treeSpinning=!0;var a="img"===this.tabsName?"matterImgTree":"matterVideoTree",i=this.$ls.get(a);i&&i.title?this.groupName=i.title:this.groupName="全部分组";var r="img"===this.tabsName?Object(p["l"])():Object(p["x"])();r.then((function(a){if(a&&0===a.status){var i=a.data.category_list[0].children;i.forEach((function(e){0===e.is_default&&(e.scopedSlots={title:"title"}),e.children&&e.children.length?(e.isDel=!1,e.children.forEach((function(e){e.scopedSlots={title:"title"},e.children&&e.children.length?(e.isDel=!1,e.children.forEach((function(e){e.isDel=!0,e.scopedSlots={title:"title"}}))):e.isDel=!0}))):e.isDel=!0})),"img"===e.tabsName?e.tabName[0].data=a.data.category_list:e.tabName[1].data=a.data.category_list,ge=[],be(a.data.category_list);var r="img"===e.tabsName?"matterImgTree":"matterVideoTree",s=e.$ls.get(r)||"";if("noUpdateList"!==t)if(s){var n=ge.some((function(t){return t.key===e.$ls.get(r).keys[0]}));n?e.requestQuery.category_id=1*e.$ls.get(r).keys.toString():(e.requestQuery.category_id=a.data.category_list[0].key,e.$ls.remove(r)),e.getTableList()}else e.requestQuery.category_id=a.data.category_list[0].key,e.getTableList();e.treeSpinning=!1}}))},getTableList:function(){var e=this;this.listSpinning=!0,this.requestQuery=Object.assign(this.query,this.requestQuery);var t="img"===this.tabsName?p["o"]:p["w"];t(this.requestQuery).then((function(t){t&&0===t.status?("img"===e.tabsName?e.tabName[0].listData=t.data.rows||[]:e.tabName[1].listData=t.data.rows||[],e.pageTotal=t.data.total,e.listSpinning=!1):(e.listSpinning=!1,e.resultNull())}))},jumpTableChange:function(e){this.query.page=e,this.getTableList(this.query)},selectPageSizeChange:function(e){this.query.limit=e;var t=Math.floor((this.pageTotal-1)/e)+1,a=this.query.page;a=a>t?t:a,0===t&&(a=this.query.page),this.query.page=a,this.getTableList(this.query)},resultNull:function(){this.listSpinning=!1,this.pageTotal=0,"img"===this.tabsName?this.tabName[0].listData=[]:this.tabName[1].listData=[]},onSelectTree:function(e,t){this.requestQuery.category_id=1*e.toString(),this.query.page=1,this.query.limit=50,this.groupName=t;var a="img"===this.tabsName?"matterChecked":"matterVideoChecked";this.$ls.remove(a),this.getTableList()},handleSubmit:function(e){this.query.page=1,this.requestQuery=Object.assign(this.requestQuery,e),this.getTableList()},uploadImgVideo:function(e){var t="img"===this.tabsName?"matterImgTree":"matterVideoTree",a=[];this.$ls.get(t)?a=this.$ls.get(t).expandedKeys:a.push(this.requestQuery.category_id),"img"===e?this.$refs.matterImages.showModal(a):this.$refs.matterVideo.showModal(a)},onEditImg:function(){this.$refs.editSingleImg.showModal()},onDel:function(){this.$confirm({icon:"exclamation-circle",title:"确定要删除所选图片吗?",content:"删除图片不会对已使用图片的业务造成影响",okText:"确定",cancelText:"取消",onOk:function(){},onCancel:function(){}})},updateTree:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e&&(this.groupName=e),this.initTreeData("noUpdateList")},updateGroupTreeList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e&&(this.groupName=e),this.initTreeData()},updateGroupList:function(){this.getTableList()},getMatterSelected:function(){this.$refs.matterSelected.showModal()},getMatterVideoSelected:function(){this.$refs.matterVideoSelected.showModal()}},created:function(){this.query.website_id=this.websiteId;var e=this.$route.params.tabName||"";"video"===e&&(this.tabsName="video"),this.initTreeData(),this.$store.commit("SET_Controller_hiddenMenu",!0)},beforeRouteLeave:function(e,t,a){this.$store.commit("SET_Controller_hiddenMenu",!1),a()}},ye=ve,_e=(a("f926"),Object(b["a"])(ye,i,r,!1,null,"5253bd16",null));t["default"]=_e.exports},d3c1:function(e,t,a){},d6a4:function(e,t,a){},dd93:function(e,t,a){"use strict";a("54dc")},f926:function(e,t,a){"use strict";a("2a3a")}}]);