(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-12507c79","chunk-dcbbc23a","chunk-5f494878"],{"0b9b":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("el-upload",{ref:"upload",staticClass:"upload-files",attrs:{headers:t.headers,action:t.$store.getters.updateURL+"/content/importExcel",limit:1,"on-success":t.handleUpload,"on-progress":t.handleProgress,"on-error":t.handleError,data:t.params,"show-file-list":!1}},[e("el-button",{attrs:{type:"secondary"}},[t._v(t._s(t.$t("批量上传")))])],1)},i=[],r={props:["lang"],data:function(){return{headers:{Authorization:"Bearer ".concat(this.$store.getters.token)},params:{lang:""}}},watch:{lang:{handler:function(t){this.params={lang:t}},immediate:!0}},created:function(){},methods:{handleProgress:function(t){this.$emit("update:loading",!0)},handleUpload:function(t){this.$refs.upload.clearFiles(),0==t.code?(this.$emit("update:loading",!1),this.$emit("success")):this.$emit("update:loading",!1)},handleError:function(){this.$emit("update:loading",!1)}}},s=r,o=(a("fc28"),a("2877")),l=Object(o["a"])(s,n,i,!1,null,"1726a5c1",null);e["default"]=l.exports},"7f6c":function(t,e,a){"use strict";var n=a("365c");function i(t){var e="/websiteSetting/read";return n["a"].get(e,t)}function r(t){var e="/websiteSetting/update";return n["a"].post(e,t)}function s(t){var e="/websiteLang/index";return n["a"].get(e,t)}function o(t){var e="/websiteLang/save";return n["a"].post(e,t)}function l(t){var e="/websiteLang/system";return n["a"].get(e,t)}function c(t){var e="/websiteServer/read";return n["a"].get(e,t)}function u(t){var e="/websiteServer/update";return n["a"].post(e,t)}e["a"]={basicInfo:i,basicUpdate:r,langInfo:s,langUpdate:o,systemLang:l,serverInfo:c,serverUpdate:u}},"816b":function(t,e,a){"use strict";var n=a("365c");function i(t){var e="/module/index";return n["a"].get(e,t)}function r(t){var e="/module/save";return n["a"].post(e,t)}function s(t){var e="/module/update";return n["a"].post(e,t)}function o(t){var e="/module/delete";return n["a"].post(e,t)}function l(t){var e="/module/read";return n["a"].get(e,t)}function c(t){var e="/category/getModuleCate";return n["a"].get(e,t)}function u(t){var e="/moduleField/index";return n["a"].get(e,t)}function d(t){var e="/moduleField/save";return n["a"].post(e,t)}function m(t){var e="/moduleField/update";return n["a"].post(e,t)}function f(t){var e="/moduleField/delete";return n["a"].post(e,t)}function p(t){var e="/moduleField/read";return n["a"].get(e,t)}function h(t){var e="/module/all";return n["a"].get(e,t)}function g(t){var e="/module/field";return n["a"].get(e,t)}e["a"]={moduleList:i,moduleSave:r,moduleUpdate:s,moduleDelete:o,moduleInfo:l,fieldList:u,fieldSave:d,fieldUpdate:m,fieldDelete:f,fieldInfo:p,getModuleCate:c,moduleTable:h,moduleField:g}},"99f5":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"container",attrs:{id:"order"}},[e("el-tabs",{staticClass:"tab-card tabs-white",attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.langList,(function(t){return e("el-tab-pane",{key:t.id,attrs:{label:t.lang,name:t.lang}})})),1),e("div",{staticClass:"content"},[e("TableSearch",{attrs:{model:t.params},scopedSlots:t._u([{key:"btn",fn:function(){return[e("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.handleRouterContent}},[t._v(" "+t._s(t.$t("新增内容"))+" ")]),e("el-dropdown",{attrs:{trigger:"click"},on:{command:t.handleCommand}},[e("span",{staticClass:"el-dropdown-link el-icon-paperclip"},[t._v(" "+t._s(t.$t("查看副表"))+" ")]),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.moduleData,(function(a){return e("el-dropdown-item",{key:a.id,attrs:{command:a.id}},[t._v(" "+t._s(a.title)+" ")])})),1)],1),e("el-button",{attrs:{type:"secondary"},on:{click:function(e){return t.handleOffline()}}},[t._v(" "+t._s(t.$t("批量禁用"))+" ")]),e("el-button",{attrs:{type:"secondary"},on:{click:function(e){return t.handleDelete()}}},[t._v(" "+t._s(t.$t("批量删除"))+" ")]),e("UploadFiles",{attrs:{loading:t.loading,lang:t.activeName},on:{"update:loading":function(e){t.loading=e},success:t.handleReset}})]},proxy:!0}])},[[e("el-form-item",{attrs:{label:"".concat(t.$t("文章标题"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入文章标题"),size:"small"},model:{value:t.params.title,callback:function(e){t.$set(t.params,"title",e)},expression:"params.title"}})],1),e("el-form-item",{attrs:{label:"".concat(t.$t("栏目"),":")}},[e("el-select",{attrs:{multiple:"",filterable:""},model:{value:t.params.category_id,callback:function(e){t.$set(t.params,"category_id",e)},expression:"params.category_id"}},t._l(t.columnDataSource,(function(t){return e("el-option",{key:t.id,attrs:{label:t.title,value:t.id+""}})})),1)],1),e("el-form-item",{attrs:{label:"".concat(t.$t("状态"),":")}},[e("el-select",{model:{value:t.params.status,callback:function(e){t.$set(t.params,"status",e)},expression:"params.status"}},t._l(t.articleTypeEnums,(function(t,a){return e("el-option",{key:a,attrs:{label:t,value:a}})})),1)],1),e("el-form-item",[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleSearch("search")}}},[t._v(" "+t._s(t.$t("搜索"))+" ")]),e("el-button",{attrs:{size:"small"},on:{click:t.handleReset}},[t._v(" "+t._s(t.$t("重置"))+" ")])],1)]],2),e("BaseTable",{ref:"baseTable",attrs:{request:t.request,params:t.params,"is-request":!1},on:{"update:params":function(e){t.params=e},"selection-change":t.handleSelectionChange}},[e("el-table-column",{attrs:{type:"selection",width:"50"}}),e("el-table-column",{attrs:{label:"ID",prop:"id",width:"55"}}),e("el-table-column",{attrs:{label:t.$t("标题"),prop:"title","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-link",{attrs:{href:a.row.url,target:"_blank"}},[t._v(" "+t._s(a.row.title)+" ")])]}}])}),e("el-table-column",{attrs:{align:t.$t("副标题"),width:"120px"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-popover",{attrs:{placement:"top-start",title:"",width:"",trigger:"click",content:a.row.sub_title}},[e("span",{staticClass:"subTitle",attrs:{slot:"reference"},slot:"reference"},[t._v(" "+t._s(a.row.sub_title)+" ")])])]}}])}),e("el-table-column",{attrs:{label:t.$t("栏目"),width:"120px"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.getCategoryName(e.row.category))+" ")]}}])}),e("el-table-column",{attrs:{label:t.$t("排序"),prop:"sort",width:"60px"}}),e("el-table-column",{attrs:{label:t.$t("状态"),width:"150px"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.articleTypeEnums[e.row.new_status])+" ")]}}])}),e("el-table-column",{attrs:{label:t.$t("缩略图"),width:"100px"},scopedSlots:t._u([{key:"default",fn:function(a){return[a.row.thumbnail?e("el-image",{staticStyle:{width:"100%",height:"auto"},attrs:{src:a.row.thumbnail.url,fit:"cover","preview-src-list":[a.row.thumbnail.url]}},[e("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[e("i",{staticClass:"el-icon-picture-outline"})])]):t._e()]}}])}),e("el-table-column",{attrs:{label:t.$t("发布时间"),prop:"publish_time",width:"160px"}}),e("el-table-column",{attrs:{label:t.$t("点击量"),prop:"hits",width:"70px"}}),e("el-table-column",{attrs:{label:t.$t("操作"),fixed:"right",width:"150px",align:"right"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("EditBtn",{on:{click:function(e){return t.editor(a.row)}}}),e("DelBtn",{attrs:{"confirm-content":t.$t("内容放入回收站")},on:{success:function(e){return t.handleDelete(a.row.id)}}}),e("BaseDropdown",{on:{command:function(e){return t.operationCommand(e,a.row)}}},[1===a.row.new_status?e("el-dropdown-item",{attrs:{command:"disabled"}},[t._v(" "+t._s(t.$t("禁用"))+" ")]):t._e(),5===a.row.new_status?e("el-dropdown-item",{attrs:{command:"un-disabled"}},[t._v(" "+t._s(t.$t("启用"))+" ")]):t._e(),e("el-dropdown-item",{attrs:{command:"copy"}},[t._v(" "+t._s(t.$t("复制"))+" ")])],1)]}}])})],1)],1)],1)},i=[],r=a("5530"),s=a("c14f"),o=a("1da1"),l=(a("99af"),a("a15b"),a("d81d"),a("14d9"),a("b0c0"),a("e9f5"),a("ab43"),a("d3b7"),a("7632")),c=a("816b"),u=a("7f6c"),d={1:"已发布",2:"待发布",3:"待审核",4:"被驳回",5:"已下线",6:"草稿"},m=a("0b9b"),f={components:{UploadFiles:m["default"]},data:function(){return{request:l["a"].contentList,loading:!1,articleTypeEnums:d,columnDataSource:[],params:{website_id:"",lang:"",category_id:[],title:""},list:[],options:[],contentData:[],moduleData:"",checkedKeys:[],val:{},totalAmount:"",category_id:"",activeName:"zh",langList:[],tableSelectionData:[]}},computed:{siteId1:function(){return this.$store.getters.siteId}},watch:{siteId1:function(t,e){this.siteId=t,t&&(this.params.website_id=t,this.$router.push({query:{}}),this.params.category_id=[],this.getLang())}},created:function(){this.siteId=this.$store.getters.siteId;var t=this.$route.query.lang;if(t&&(this.activeName=t),this.$route.query.category_id)if(Array.isArray(this.$route.query.category_id))this.params.category_id=this.$route.query.category_id;else{var e=this.$route.query.category_id+"";this.params.category_id=[e]}this.siteId&&(this.getLang(),this.params.website_id=this.siteId),this.getModule()},methods:{operationCommand:function(t,e){switch(t){case"disabled":this.handleOffline(e.id);break;case"un-disabled":this.handleOffline(e.id,"online");break;case"copy":this.handleCopy(e);break}},handleSelectionChange:function(t){this.tableSelectionData=t},handleDelete:function(t){var e=this;return Object(o["a"])(Object(s["a"])().m((function a(){var n,i;return Object(s["a"])().w((function(a){while(1)switch(a.n){case 0:if(t){a.n=1;break}if(e.tableSelectionData.length){a.n=1;break}return e.$message.error(e.$t("请先选中数据")),a.a(2);case 1:return n=e.tableSelectionData.map((function(t){return t.id})),a.n=2,l["a"].deleteContent({ids:t||n});case 2:i=a.v,0==i.code&&(e.$message.success(i.msg),e.getContent());case 3:return a.a(2)}}),a)})))()},handleOffline:function(t,e){var a=this;return Object(o["a"])(Object(s["a"])().m((function n(){var i,r,o;return Object(s["a"])().w((function(n){while(1)switch(n.n){case 0:if(t){n.n=1;break}if(a.tableSelectionData.length){n.n=1;break}return a.$message.error(a.$t("请先选中数据")),n.a(2);case 1:return n.n=2,a.$confirm("".concat(a.$t("此操作将该内容")).concat("online"===e?a.$t("启用"):a.$t("禁用"),", ").concat(a.$t("是否继续")),a.$t("提示"),{confirmButtonText:a.$t("确定"),cancelButtonText:a.$t("取消")}).catch((function(t){}));case 2:if(i=n.v,!i){n.n=4;break}return r=a.tableSelectionData.map((function(t){return t.id})),n.n=3,l["a"].changeContentStatus({id:t||r,status:"online"===e?1:2});case 3:o=n.v,0==o.code&&(a.$message.success(i.msg),a.getContent());case 4:return n.a(2)}}),n)})))()},handleReset:function(){this.params.title="",this.params.category_id=[],this.params.status="",this.$refs.baseTable.getList("search")},getCategoryName:function(t){return t.map((function(t){return t.title})).join(",")},handleRouterContent:function(){this.$router.push({name:"addContent",query:{lang:0==this.activeName?"zh":this.activeName}})},getCategoryList:function(){var t=this;return Object(o["a"])(Object(s["a"])().m((function e(){var a,n;return Object(s["a"])().w((function(e){while(1)switch(e.n){case 0:return e.n=1,c["a"].getModuleCate(Object(r["a"])(Object(r["a"])({},t.params),{},{site_id:[t.siteId],lang:0==t.activeName?"zh":t.activeName}));case 1:n=e.v,t.columnDataSource=(null===(a=n.data)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.category)||[];case 2:return e.a(2)}}),e)})))()},topOpt:function(t){var e=this,a={id:t.id,is_top:t.is_top};l["a"].topOpt(a).then((function(t){0==t.code&&e.$message.success(t.msg)}))},recommend:function(t){var e=this,a={id:t.id,is_recommend:t.is_recommend,type:"recommend"};l["a"].recommendAndStatus(a).then((function(t){0==t.code&&e.$message.success(t.msg)}))},getLang:function(){var t=this;u["a"].langInfo({site_id:this.siteId}).then((function(e){t.langList=e.data,e.data.length>0&&(t.params.lang=t.activeName),t.getCategoryList(),t.getContent("search")}))},handleClick:function(t){this.activeName=t.name,this.params.lang=t.name,this.getCategoryList(),this.handleReset()},handleSearch:function(){this.$router.push({query:{category_id:this.params.category_id}}),this.getContent("search")},getContent:function(t){this.$refs.baseTable.getList(t)},getModule:function(){var t=this;c["a"].moduleList({website_id:this.website_id}).then((function(e){t.moduleData=e.data}))},handleCommand:function(t){this.$router.push({name:"ColumnInfo",query:{id:t,website_id:this.siteId}})},handleCopy:function(t){this.$router.push({name:"updateContent",query:{id:t.id,lang:this.activeName,module_id:t.module_id,website_id:this.siteId,type:"copy"}})},editor:function(t){var e=this,a={id:t.id,module_id:t.module_id,lang:this.activeName,website_id:this.siteId};l["a"].contentInfo(a).then((function(a){if(0==a.code){var n=a.data.content.website,i=a.data.content.category;e.$router.push({name:"updateContent",query:{id:t.id,category_id:i,module_id:t.module_id,lang:e.activeName,siteId:n}})}}))},check:function(t){this.$router.push({name:"ColumnInfo",query:{id:this.siteId}})}}},p=f,h=(a("cf57"),a("2877")),g=Object(h["a"])(p,n,i,!1,null,"4dc07ea0",null);e["default"]=g.exports},adb8:function(t,e,a){},c37c:function(t,e,a){},cf57:function(t,e,a){"use strict";a("c37c")},fc28:function(t,e,a){"use strict";a("adb8")}}]);