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
9.0 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0cb1b92e"],{"51b6":function(t,e,a){"use strict";a("c818")},"7f6c":function(t,e,a){"use strict";var s=a("365c");function o(t){var e="/websiteSetting/read";return s["a"].get(e,t)}function i(t){var e="/websiteSetting/update";return s["a"].post(e,t)}function r(t){var e="/websiteLang/index";return s["a"].get(e,t)}function n(t){var e="/websiteLang/save";return s["a"].post(e,t)}function l(t){var e="/websiteLang/system";return s["a"].get(e,t)}function c(t){var e="/websiteServer/read";return s["a"].get(e,t)}function d(t){var e="/websiteServer/update";return s["a"].post(e,t)}e["a"]={basicInfo:o,basicUpdate:i,langInfo:r,langUpdate:n,systemLang:l,serverInfo:c,serverUpdate:d}},"9b78":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container",attrs:{id:"tag"}},[a("el-tabs",{staticClass:"tab-card tabs-white",attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.params.lang,callback:function(e){t.$set(t.params,"lang",e)},expression:"params.lang"}},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("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.goAdd}},[t._v(" "+t._s(t.$t("添加标签"))+" ")]),a("BaseTable",{ref:"baseTable",attrs:{request:t.request,params:t.params,"is-request":!1},on:{"update:params":function(e){t.params=e}}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"80px"}}),a("el-table-column",{attrs:{prop:"title",label:t.$t("标签名称")}}),a("el-table-column",{attrs:{prop:"tag_hit",label:t.$t("标签点击数"),width:"90px"}}),a("el-table-column",{attrs:{prop:"article_count",label:t.$t("标签文章数")}}),a("el-table-column",{attrs:{prop:"is_recommend",label:t.$t("是否推荐"),width:"300px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":2,"active-text":t.$t("推荐"),"inactive-text":t.$t("不推荐"),"active-color":"var(--huocms-com-color-primary)","inactive-color":"rgba(0,0,0,0.1)"},on:{change:function(a){return t.changeRecommend(e.row)}},model:{value:e.row.is_recommend,callback:function(a){t.$set(e.row,"is_recommend",a)},expression:"scope.row.is_recommend"}})]}}])}),a("el-table-column",{attrs:{prop:"status",label:t.$t("状态"),width:"200px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":2,"active-text":t.$t("正常"),"inactive-text":t.$t("禁用"),"active-color":"var(--huocms-com-color-primary)","inactive-color":"rgba(0,0,0,0.1)"},on:{change:function(a){return t.changeStatus(e.row)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),a("el-table-column",{attrs:{label:t.$t("seo标题"),prop:"seo_title"}}),a("el-table-column",{attrs:{label:t.$t("seo关键词"),prop:"seo_keywords","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:t.$t("seo描述"),prop:"seo_description","show-overflow-tooltip":""}}),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.edit(e.row)}}}),a("DelBtn",{attrs:{"confirm-content":t.$t("删除该标签")},on:{success:function(a){return t.dele(e.row)}}})]}}])})],1),a("BaseDialog",{attrs:{title:t.addForm.id?this.$t("编辑"):this.$t("添加"),"dialog-show":t.dialogShow,width:"50%",footer:""},on:{"update:dialogShow":function(e){t.dialogShow=e},"update:dialog-show":function(e){t.dialogShow=e},submit:t.submit}},[a("el-form",{ref:"addForm",attrs:{model:t.addForm,rules:t.rules,"label-position":"top"}},[a("el-form-item",{attrs:{label:t.$t("标签名称")+":",prop:"title"}},[a("el-input",{model:{value:t.addForm.title,callback:function(e){t.$set(t.addForm,"title",e)},expression:"addForm.title"}})],1),a("el-form-item",{attrs:{label:t.$t("标签文章数")+":",prop:"article_count"}},[a("el-input",{model:{value:t.addForm.article_count,callback:function(e){t.$set(t.addForm,"article_count",e)},expression:"addForm.article_count"}})],1),a("el-form-item",{attrs:{label:t.$t("标签点击数")+":",prop:"tag_hit"}},[a("el-input",{model:{value:t.addForm.tag_hit,callback:function(e){t.$set(t.addForm,"tag_hit",e)},expression:"addForm.tag_hit"}})],1),a("el-form-item",{attrs:{label:"Title:",prop:"seo_title"}},[a("el-input",{model:{value:t.addForm.seo_title,callback:function(e){t.$set(t.addForm,"seo_title",e)},expression:"addForm.seo_title"}})],1),a("el-form-item",{attrs:{label:"Keyword:",prop:"seo_keywords"}},[a("el-input",{model:{value:t.addForm.seo_keywords,callback:function(e){t.$set(t.addForm,"seo_keywords",e)},expression:"addForm.seo_keywords"}})],1),a("el-form-item",{attrs:{label:"Description:",prop:"seo_description"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.addForm.seo_description,callback:function(e){t.$set(t.addForm,"seo_description",e)},expression:"addForm.seo_description"}})],1),a("el-form-item",{attrs:{label:t.$t("状态")+":"}},[a("el-switch",{attrs:{"active-text":t.$t("正常"),"inactive-text":t.$t("隐藏"),"active-value":1,"inactive-value":2,"active-color":"var(--huocms-com-color-primary)","inactive-color":"rgba(0,0,0,0.2)"},model:{value:t.addForm.status,callback:function(e){t.$set(t.addForm,"status",e)},expression:"addForm.status"}})],1),a("el-form-item",{attrs:{label:t.$t("是否推荐")+":"}},[a("el-switch",{attrs:{"active-text":t.$t("推荐"),"inactive-text":t.$t("不推荐"),"active-value":1,"inactive-value":2,"active-color":"var(--huocms-com-color-primary)","inactive-color":"rgba(0,0,0,0.2)"},model:{value:t.addForm.is_recommend,callback:function(e){t.$set(t.addForm,"is_recommend",e)},expression:"addForm.is_recommend"}})],1)],1)],1)],1)],1)},o=[],i=a("5530"),r=(a("b0c0"),a("d28d")),n=a("7f6c"),l={data:function(){return{request:r["a"].tagList,params:{lang:"",website_id:""},tagData:[],langList:[],dialogShow:!1,addForm:{id:"",title:"",article_count:"",is_recommend:"",tag_hit:"",status:"",seo_keywords:"",seo_title:"",seo_description:""},rules:{title:[{required:!0,message:this.$t("请输入标签名称"),trigger:"blur"}]}}},computed:{siteId1:function(){return this.$store.getters.siteId}},watch:{siteId1:{handler:function(t){t&&(this.siteId=t,this.params.website_id=t,this.getLang())},immediate:!0}},methods:{changeRecommend:function(t){var e=this;this.addForm={id:t.id,title:t.title,article_count:t.article_count,is_recommend:t.is_recommend,tag_hit:t.tag_hit,status:t.status,seo_keywords:t.seo_keywords,seo_title:t.seo_title,seo_description:t.seo_description,website_id:this.siteId,lang:this.params.lang},r["a"].tagUpdate(Object(i["a"])({},this.addForm)).then((function(t){0==t.code&&(e.dialogShow=!1,e.$message.success(t.msg),e.$refs.baseTable.getList())}))},changeStatus:function(t){var e=this;this.addForm={id:t.id,title:t.title,article_count:t.article_count,is_recommend:t.is_recommend,tag_hit:t.tag_hit,status:t.status,seo_keywords:t.seo_keywords,seo_title:t.seo_title,seo_description:t.seo_description,website_id:this.siteId,lang:this.params.lang},r["a"].tagUpdate(Object(i["a"])({},this.addForm)).then((function(t){0==t.code&&(e.dialogShow=!1,e.$message.success(t.msg),e.$refs.baseTable.getList())}))},handleClick:function(t){this.params.lang=t.name,this.$refs.baseTable.getList("search")},getLang:function(){var t=this;n["a"].langInfo({site_id:this.siteId}).then((function(e){t.langList=e.data,e.data.length>0&&(t.params.lang=e.data[0].lang,t.$refs.baseTable.getList("search"))}))},goAdd:function(){this.addForm.id="",this.addForm={title:"",article_count:"",is_recommend:2,tag_hit:"",status:1,seo_keywords:"",seo_title:"",seo_description:"",website_id:this.siteId,lang:this.params.lang},this.dialogShow=!0},edit:function(t){this.addForm={id:t.id,title:t.title,article_count:t.article_count,is_recommend:t.is_recommend,tag_hit:t.tag_hit,status:t.status,seo_keywords:t.seo_keywords,seo_title:t.seo_title,seo_description:t.seo_description,website_id:this.siteId,lang:this.params.lang},this.dialogShow=!0},submit:function(){var t=this;this.$refs.addForm.validate((function(e){e?t.addForm.id?r["a"].tagUpdate(Object(i["a"])({},t.addForm)).then((function(e){0==e.code&&(t.dialogShow=!1,t.$message.success(e.msg),t.$refs.baseTable.getList())})):r["a"].tagSave(Object(i["a"])({},t.addForm)).then((function(e){0==e.code&&(t.dialogShow=!1,t.$message.success(e.msg),t.$refs.baseTable.getList("search"))})):t.$message.error(t.$t("请填写必要信息"))}))},dele:function(t){var e=this;r["a"].tagDelete({id:t.id}).then((function(t){0==t.code&&(e.$message.success(t.msg),e.$refs.baseTable.getList("search"))}))}}},c=l,d=(a("51b6"),a("2877")),u=Object(d["a"])(c,s,o,!1,null,"ce30c0d2",null);e["default"]=u.exports},c818:function(t,e,a){},d28d:function(t,e,a){"use strict";var s=a("365c");function o(t){var e="/tag/backendIndex";return s["a"].get(e,t)}function i(t){var e="/tag/save";return s["a"].post(e,t)}function r(t){var e="/tag/update";return s["a"].post(e,t)}function n(t){var e="/tag/delete";return s["a"].post(e,t)}e["a"]={tagList:o,tagSave:i,tagUpdate:r,tagDelete:n}}}]);