睿能科技
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
14 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-12d5cac0","chunk-75e6bd0a","chunk-17d4821d"],{"0b9b":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("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}},[a("el-button",{attrs:{type:"secondary"}},[t._v(t._s(t.$t("批量上传")))])],1)},r=[],i={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=i,o=(a("b687"),a("2877")),l=Object(o["a"])(s,n,r,!1,null,"1726a5c1",null);e["default"]=l.exports},5887:function(t,e,a){},"7f6c":function(t,e,a){"use strict";var n=a("365c");function r(t){var e="/websiteSetting/read";return n["a"].get(e,t)}function i(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:r,basicUpdate:i,langInfo:s,langUpdate:o,systemLang:l,serverInfo:c,serverUpdate:u}},"816b":function(t,e,a){"use strict";var n=a("365c");function r(t){var e="/module/index";return n["a"].get(e,t)}function i(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 h(t){var e="/moduleField/read";return n["a"].get(e,t)}function f(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:r,moduleSave:i,moduleUpdate:s,moduleDelete:o,moduleInfo:l,fieldList:u,fieldSave:d,fieldUpdate:m,fieldDelete:p,fieldInfo:h,getModuleCate:c,moduleTable:f,moduleField:g}},"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-dropdown",{attrs:{trigger:"click"},on:{command:t.handleCommand}},[a("span",{staticClass:"el-dropdown-link el-icon-paperclip"},[t._v(" "+t._s(t.$t("查看副表"))+" ")]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.moduleData,(function(e){return a("el-dropdown-item",{key:e.id,attrs:{command:e.id}},[t._v(" "+t._s(e.title)+" ")])})),1)],1),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("批量删除"))+" ")]),a("UploadFiles",{attrs:{loading:t.loading,lang:t.activeName},on:{"update:loading":function(e){t.loading=e},success:t.handleReset}})]},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:{align:t.$t("副标题"),width:"120px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-popover",{attrs:{placement:"top-start",title:"",width:"",trigger:"click",content:e.row.sub_title}},[a("span",{staticClass:"subTitle",attrs:{slot:"reference"},slot:"reference"},[t._v(" "+t._s(e.row.sub_title)+" ")])])]}}])}),a("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))+" ")]}}])}),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("复制"))+" ")])],1)]}}])})],1)],1)],1)},r=[],i=a("5530"),s=a("1da1"),o=(a("96cf"),a("d81d"),a("99af"),a("a15b"),a("b0c0"),a("7632")),l=a("816b"),c=a("7f6c"),u={1:"已发布",2:"待发布",3:"待审核",4:"被驳回",5:"已下线",6:"草稿"},d=a("0b9b"),m={components:{UploadFiles:d["default"]},data:function(){return{request:o["a"].contentList,loading:!1,articleTypeEnums:u,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(s["a"])(regeneratorRuntime.mark((function a(){var n,r;return regeneratorRuntime.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,o["a"].deleteContent({ids:t||n});case 7:r=a.sent,0==r.code&&(e.$message.success(r.msg),e.getContent());case 9:case"end":return a.stop()}}),a)})))()},handleOffline:function(t,e){var a=this;return Object(s["a"])(regeneratorRuntime.mark((function n(){var r,i,s;return regeneratorRuntime.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(r=n.sent,!r){n.next=13;break}return i=a.tableSelectionData.map((function(t){return t.id})),n.next=11,o["a"].changeContentStatus({id:t||i,status:"online"===e?1:2});case 11:s=n.sent,0==s.code&&(a.$message.success(r.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(s["a"])(regeneratorRuntime.mark((function e(){var a,n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,l["a"].getModuleCate(Object(i["a"])(Object(i["a"])({},t.params),{},{site_id:[t.siteId],lang:0==t.activeName?"zh":t.activeName}));case 2:r=e.sent,t.columnDataSource=(null===(a=r.data)||void 0===a||null===(n=a[0])||void 0===n?void 0:n.category)||[];case 4:case"end":return e.stop()}}),e)})))()},topOpt:function(t){var e=this,a={id:t.id,is_top:t.is_top};o["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"};o["a"].recommendAndStatus(a).then((function(t){0==t.code&&e.$message.success(t.msg)}))},getLang:function(){var t=this;c["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;l["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};o["a"].contentInfo(a).then((function(a){if(0==a.code){var n=a.data.content.website,r=a.data.content.category;e.$router.push({name:"updateContent",query:{id:t.id,category_id:r,module_id:t.module_id,lang:e.activeName,siteId:n}})}}))},check:function(t){this.$router.push({name:"ColumnInfo",query:{id:this.siteId}})}}},p=m,h=(a("a964"),a("2877")),f=Object(h["a"])(p,n,r,!1,null,"4dc07ea0",null);e["default"]=f.exports},a964:function(t,e,a){"use strict";a("f386")},b687:function(t,e,a){"use strict";a("5887")},f386:function(t,e,a){}}]);