You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
12 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-64cca1ad","chunk-993e1072"],{2937:function(t,e,a){"use strict";a("7242")},7242:function(t,e,a){},"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 p(t){var e="/moduleField/delete";return n["a"].post(e,t)}function f(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)}function b(t){var e="/preview";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:p,fieldInfo:f,getModuleCate:c,moduleTable:h,moduleField:g,preview:b}},"99f5":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"container",attrs:{id:"order"}},[a("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 a("el-tab-pane",{key:t.id,attrs:{label:t.lang,name:t.lang}})})),1),a("div",{staticClass:"content"},[a("TableSearch",{attrs:{model:t.params},scopedSlots:t._u([{key:"btn",fn:function(){return[a("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.handleRouterContent}},[t._v(" "+t._s(t.$t("新增内容"))+" ")]),a("el-button",{attrs:{type:"secondary"},on:{click:function(e){return t.handleOffline()}}},[t._v(" "+t._s(t.$t("批量禁用"))+" ")]),a("el-button",{attrs:{type:"secondary"},on:{click:function(e){return t.handleDelete()}}},[t._v(" "+t._s(t.$t("批量删除"))+" ")])]},proxy:!0}])},[[a("el-form-item",{attrs:{label:t.$t("文章标题")+":"}},[a("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),a("el-form-item",{attrs:{label:t.$t("栏目")+":"}},[a("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 a("el-option",{key:t.id,attrs:{label:t.title,value:t.id+""}})})),1)],1),a("el-form-item",{attrs:{label:t.$t("状态")+":"}},[a("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,e){return a("el-option",{key:e,attrs:{label:t,value:e}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleSearch("search")}}},[t._v(" "+t._s(t.$t("搜索"))+" ")]),a("el-button",{attrs:{size:"small"},on:{click:t.handleReset}},[t._v(" "+t._s(t.$t("重置"))+" ")])],1)]],2),a("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}},[a("el-table-column",{attrs:{type:"selection",width:"50"}}),a("el-table-column",{attrs:{label:"ID",prop:"id",width:"55"}}),a("el-table-column",{attrs:{label:t.$t("标题"),prop:"title","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{href:e.row.url,target:"_blank"}},[t._v(" "+t._s(e.row.title)+" ")])]}}])}),a("el-table-column",{attrs:{label:t.$t("栏目")},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.getCategoryName(e.row.category))+" ")]}}])}),a("el-table-column",{attrs:{label:t.$t("排序"),prop:"sort",width:"60px"}}),a("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])+" ")]}}])}),a("el-table-column",{attrs:{label:t.$t("缩略图"),width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.thumbnail?a("el-image",{staticStyle:{width:"100%",height:"auto"},attrs:{src:e.row.thumbnail.url,fit:"cover","preview-src-list":[e.row.thumbnail.url]}},[a("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[a("i",{staticClass:"el-icon-picture-outline"})])]):t._e()]}}])}),a("el-table-column",{attrs:{label:t.$t("发布时间"),prop:"publish_time",width:"160px"}}),a("el-table-column",{attrs:{label:t.$t("点击量"),prop:"hits",width:"70px"}}),a("el-table-column",{attrs:{label:t.$t("操作"),fixed:"right",width:"150px",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("EditBtn",{on:{click:function(a){return t.editor(e.row)}}}),a("DelBtn",{attrs:{"confirm-content":t.$t("内容放入回收站")},on:{success:function(a){return t.handleDelete(e.row.id)}}}),a("BaseDropdown",{on:{command:function(a){return t.operationCommand(a,e.row)}}},[1===e.row.new_status?a("el-dropdown-item",{attrs:{command:"disabled"}},[t._v(" "+t._s(t.$t("禁用"))+" ")]):t._e(),5===e.row.new_status?a("el-dropdown-item",{attrs:{command:"un-disabled"}},[t._v(" "+t._s(t.$t("启用"))+" ")]):t._e(),a("el-dropdown-item",{attrs:{command:"copy"}},[t._v(" "+t._s(t.$t("复制"))+" ")]),a("el-dropdown-item",{attrs:{command:"preview"}},[t._v(" "+t._s(t.$t("预览"))+" ")])],1)]}}])})],1)],1)],1)},i=[],r=a("5530"),s=a("c7eb"),o=a("1da1"),l=(a("14d9"),a("99af"),a("d81d"),a("a15b"),a("b0c0"),a("7632")),c=a("816b"),u=a("7f6c"),d=a("9d0b"),m={data:function(){return{request1:"/ContentImport/commission",request2:"/ContentImport/margin",request3:"/ContentImport/variety",request4:"/ContentImport/rule",request5:l["a"].calendar,request6:l["a"].intermediary,request:l["a"].contentList,loading:!1,articleTypeEnums:d["a"],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:{handlePreview:function(t){var e="".concat(this.$store.getters.updateURL,"preview?id=").concat(t.id,"&cid=").concat(t.category_id,"&lang=").concat(t.lang,"&website_id=").concat(this.params.website_id);window.open(e)},importMargin:function(){},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;case"preview":this.handlePreview(e);break}},handleSelectionChange:function(t){this.tableSelectionData=t},handleDelete:function(t){var e=this;return Object(o["a"])(Object(s["a"])().mark((function a(){var n,i;return Object(s["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(t){a.next=4;break}if(e.tableSelectionData.length){a.next=4;break}return e.$message.error(e.$t("请先选中数据")),a.abrupt("return");case 4:return n=e.tableSelectionData.map((function(t){return t.id})),a.next=7,l["a"].deleteContent({ids:t||n});case 7:i=a.sent,0==i.code&&(e.$message.success(i.msg),e.getContent());case 9:case"end":return a.stop()}}),a)})))()},handleOffline:function(t,e){var a=this;return Object(o["a"])(Object(s["a"])().mark((function n(){var i,r,o;return Object(s["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t){n.next=4;break}if(a.tableSelectionData.length){n.next=4;break}return a.$message.error(a.$t("请先选中数据")),n.abrupt("return");case 4:return n.next=6,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 6:if(i=n.sent,!i){n.next=13;break}return r=a.tableSelectionData.map((function(t){return t.id})),n.next=11,l["a"].changeContentStatus({id:t||r,status:"online"===e?1:2});case 11:o=n.sent,0==o.code&&(a.$message.success(i.msg),a.getContent());case 13:case"end":return n.stop()}}),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"])().mark((function e(){var a,n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c["a"].getModuleCate(Object(r["a"])(Object(r["a"])({},t.params),{},{site_id:[t.siteId],lang:0==t.activeName?"zh":t.activeName}));case 2:n=e.sent,t.columnDataSource=(null===(a=n.data)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.category)||[];case 4:case"end":return e.stop()}}),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){var a;(t.langList=e.data,t.$route.query.lang)||(t.activeName=null===(a=e.data[0])||void 0===a?void 0:a.lang);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=m,f=(a("2937"),a("2877")),h=Object(f["a"])(p,n,i,!1,null,"8706f422",null);e["default"]=h.exports},"9d0b":function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return r}));var n={1:"已发布",2:"待发布",3:"待审核",4:"被驳回",5:"已下线",6:"草稿"},i={1:"待审核",3:"审核通过",4:"审核拒绝",5:"已下线"},r={1:"内容审核",2:"删除审核"}}}]);