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

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3703fca5"],{"29c3":function(t,e,i){"use strict";i("fc51")},"7f6c":function(t,e,i){"use strict";var a=i("365c");function s(t){var e="/websiteSetting/read";return a["a"].get(e,t)}function n(t){var e="/websiteSetting/update";return a["a"].post(e,t)}function o(t){var e="/websiteLang/index";return a["a"].get(e,t)}function r(t){var e="/websiteLang/save";return a["a"].post(e,t)}function l(t){var e="/websiteLang/system";return a["a"].get(e,t)}function c(t){var e="/websiteServer/read";return a["a"].get(e,t)}function d(t){var e="/websiteServer/update";return a["a"].post(e,t)}e["a"]={basicInfo:s,basicUpdate:n,langInfo:o,langUpdate:r,systemLang:l,serverInfo:c,serverUpdate:d}},d212:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"container",attrs:{id:"container"}},[i("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 i("el-tab-pane",{key:t.id,attrs:{label:t.lang,name:t.lang}})})),1),i("div",{staticClass:"content"},[i("div",{staticClass:"table-search"},[i("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.goAdd}},[t._v(" "+t._s(t.$t("添加栏目"))+" ")]),i("el-button",{attrs:{type:"primary",icon:"el-icon-document-copy"},on:{click:function(e){t.dialogShow=!0}}},[t._v(" "+t._s(t.$t("复制站点栏目"))+" ")]),i("el-input",{model:{value:t.category_title,callback:function(e){t.category_title=e},expression:"category_title"}}),i("el-button",{staticClass:"search-btn",attrs:{type:"primary"},on:{click:t.handleSearch}},[t._v(" "+t._s(t.$t("搜索"))+" ")]),i("el-button",{staticClass:"reset-btn",on:{click:t.handleReset}},[t._v(" "+t._s(t.$t("重置"))+" ")])],1),i("el-table",{ref:"refTable",attrs:{data:t.tableData,"row-key":"id",indent:30,"expand-row-keys":t.defaultKeys},on:{"row-click":t.expandChange}},[i("el-table-column",{attrs:{label:"ID",width:"150px",prop:"id"}}),i("el-table-column",{attrs:{label:t.$t("栏目名称"),prop:"title"}}),i("el-table-column",{attrs:{label:t.$t("栏目地址"),prop:"fullUrl"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{on:{click:function(t){t.stopPropagation()}}},[i("el-popover",{attrs:{placement:"top-start",title:"",width:"",trigger:"click",content:e.row.fullUrl}},[i("span",{staticClass:"subTitle",attrs:{slot:"reference"},slot:"reference"},[t._v(" "+t._s(e.row.fullUrl)+" ")])])],1)]}}])}),i("el-table-column",{attrs:{label:t.$t("缩略图"),width:"100px",prop:"thumbnail"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.thumbnail?i("el-image",{staticStyle:{width:"32px",height:"32px"},attrs:{src:e.row.thumbnail.url,fit:"cover","preview-src-list":[e.row.thumbnail.url]}},[i("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[i("i",{staticClass:"el-icon-picture-outline"})])]):t._e()]}}])}),i("el-table-column",{attrs:{label:t.$t("栏目排序"),prop:"sort",width:"120px",align:"center"}}),i("el-table-column",{attrs:{label:t.$t("是否启用"),prop:"status",width:"250px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("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.2)"},on:{change:function(i){return t.disableUser(e.row)}},model:{value:e.row.status,callback:function(i){t.$set(e.row,"status",i)},expression:"scope.row.status"}})]}}])}),i("el-table-column",{attrs:{label:t.$t("操作"),align:"right",fixed:"right",width:"150px"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("EditBtn",{on:{click:function(i){return i.stopPropagation(),t.editor(e.row)}}}),i("DelBtn",{attrs:{"tips-content":t.$t("删除该栏目")},on:{success:function(i){return t.del(e.row)}}}),i("span",{on:{click:function(t){t.stopPropagation()}}},[i("BaseDropdown",{on:{command:function(i){return t.handleCommand(i,e.row)}}},[i("el-dropdown-item",{attrs:{command:"add"}},[t._v(" "+t._s(t.$t("添加子栏目"))+" ")]),1==e.row.is_design?i("el-dropdown-item",{attrs:{command:"view"}},[t._v(" "+t._s(t.$t("可视化设计"))+" ")]):t._e()],1)],1)]}}])})],1),i("BaseDialog",{staticClass:"copy",attrs:{title:t.$t("选择站点"),"dialog-show":t.dialogShow,width:"40%",footer:""},on:{"update:dialogShow":function(e){t.dialogShow=e},"update:dialog-show":function(e){t.dialogShow=e},submit:t.goCopy}},[i("el-form",{attrs:{data:t.copyForm,"label-position":"top"}},[i("el-form-item",{attrs:{label:t.$t("目标站点")}},[i("el-select",{attrs:{multiple:""},model:{value:t.copyForm.target_site,callback:function(e){t.$set(t.copyForm,"target_site",e)},expression:"copyForm.target_site"}},t._l(t.options,(function(e){return i("el-option",{key:e.id,attrs:{label:e.domain,value:e.id,disabled:e.id==t.siteId}})})),1)],1)],1)],1)],1)],1)},s=[],n=(i("a434"),i("b0c0"),i("14d9"),i("7632")),o=i("37cb"),r=i("7f6c"),l={data:function(){return{dialogShow:!1,tableData:[],options:[],copyForm:[],value:"",website_id:"",searchForm:{website_id:""},langList:"",activeName:"",addForm:{title:"",parent_id:0,website_id:"",alias:"",module_id:"",list_tpl:"",detail_tpl:"",type:""},siteId:"",defaultKeys:[],category_title:""}},computed:{siteId1:function(){return this.$store.getters.siteId}},watch:{siteId1:{handler:function(t){t&&(this.siteId=t,this.getLang())},immediate:!0,deep:!0}},created:function(){this.siteId=this.$store.getters.siteId;var t=this.$route.query.key;if(t){var e=t.split("-");e.splice(0,1),this.defaultKeys=e}var i=this.$route.query.lang;i&&(this.activeName=i),this.siteId&&this.getLang(),this.getWebList()},methods:{handleCommand:function(t,e){switch(t){case"add":this.add(e);break;case"view":this.viewDesign(e);break}},viewDesign:function(t){var e="/design/index?website_id="+this.siteId+"&lang="+this.activeName+"&html="+t.design_path;window.open(e)},goCopy:function(){var t=this,e={original_site:this.siteId,lang:this.activeName,target_site:this.copyForm.target_site};n["a"].copyColumn(e).then((function(e){0==e.code&&(t.$message.success(e.msg),t.dialogShow=!1)}))},disableUser:function(t){var e=this,i={id:t.id,status:t.status};n["a"].updateStatus(i).then((function(t){0==t.code&&e.$message.success(t.msg)}))},getLang:function(){var t=this;r["a"].langInfo({site_id:this.siteId}).then((function(e){var i;(t.langList=e.data,t.$route.query.lang)||(t.activeName=(null===(i=e.data[0])||void 0===i?void 0:i.lang)||t.activeName||"zh");t.getList()}))},handleClick:function(t){this.$route.query.lang&&(this.$route.query.lang=t.name),this.activeName=t.name,this.getList()},expandChange:function(t,e,i){this.$refs.refTable.toggleRowExpansion(t)},getWebList:function(){var t=this;o["a"].websiteList().then((function(e){t.options=e.data}))},del:function(t){var e=this,i={website_id:this.siteId,id:t.id,lang:this.activeName};n["a"].columnDelete(i).then((function(t){0==t.code&&(e.$message.success(t.msg),e.getList())}))},goAdd:function(){this.$router.push({name:"addColumn",query:{pid:0,website_id:this.siteId,lang:this.activeName}})},add:function(t){this.$router.push({name:"addColumn",query:{path:t.path,id:t.id,website_id:this.siteId,lang:this.activeName,module_id:t.module_id}})},editor:function(t){this.$router.push({name:"updateColumn",query:{id:t.id,website_id:t.website_id,lang:t.lang}})},submit:function(){var t=this;this.$refs.addForm.validate((function(e){if(e)if(t.addForm.id)n["a"].columnUpdate(t.addForm).then((function(e){0==e.code&&(t.$message.success(e.msg),t.getList())}));else{t.addForm.title,t.addForm.parent_id,t.website_id,t.addForm.alias,t.addForm.module_id,t.addForm.list_tpl,t.addForm.type,t.addForm.detail_tpl;n["a"].columnSave(t.addForm).then((function(e){0==e.code&&(t.$message.success(e.msg),t.getList())}))}else t.$message.error(t.$t("请填写必要信息"))}))},getList:function(){var t=this,e={website_id:this.siteId,lang:this.activeName,category_title:this.category_title};n["a"].columnList(e).then((function(e){t.tableData=e.data}))},handleSearch:function(){this.getList()},handleReset:function(){this.category_title="",this.getList()}}},c=l,d=(i("29c3"),i("f451"),i("2877")),u=Object(d["a"])(c,a,s,!1,null,"2beaff70",null);e["default"]=u.exports},e956:function(t,e,i){},f451:function(t,e,i){"use strict";i("e956")},fc51:function(t,e,i){}}]);