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
19 KiB
1 lines
19 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-52f3e183"],{"17cb":function(e,t,a){"use strict";a("9486")},"4e82":function(e,t,a){"use strict";var i=a("23e7"),n=a("e330"),r=a("59ed"),s=a("7b0b"),l=a("07fa"),o=a("083a"),d=a("577e"),c=a("d039"),u=a("addb"),m=a("a640"),p=a("04d1"),h=a("d998"),_=a("2d00"),f=a("512ce"),b=[],g=n(b.sort),v=n(b.push),F=c((function(){b.sort(void 0)})),$=c((function(){b.sort(null)})),y=m("sort"),k=!c((function(){if(_)return _<70;if(!(p&&p>3)){if(h)return!0;if(f)return f<603;var e,t,a,i,n="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:a=3;break;case 68:case 71:a=4;break;default:a=2}for(i=0;i<47;i++)b.push({k:t+i,v:a})}for(b.sort((function(e,t){return t.v-e.v})),i=0;i<b.length;i++)t=b[i].k.charAt(0),n.charAt(n.length-1)!==t&&(n+=t);return"DGBEFHACIJK"!==n}})),w=F||!$||!y||!k,x=function(e){return function(t,a){return void 0===a?-1:void 0===t?1:void 0!==e?+e(t,a)||0:d(t)>d(a)?1:-1}};i({target:"Array",proto:!0,forced:w},{sort:function(e){void 0!==e&&r(e);var t=s(this);if(k)return void 0===e?g(t):g(t,e);var a,i,n=[],d=l(t);for(i=0;i<d;i++)i in t&&v(n,t[i]);u(n,x(e)),a=l(n),i=0;while(i<a)t[i]=n[i++];while(i<d)o(t,i++);return t}})},"815f":function(e,t,a){},"816b":function(e,t,a){"use strict";var i=a("365c");function n(e){var t="/module/index";return i["a"].get(t,e)}function r(e){var t="/module/save";return i["a"].post(t,e)}function s(e){var t="/module/update";return i["a"].post(t,e)}function l(e){var t="/module/delete";return i["a"].post(t,e)}function o(e){var t="/module/read";return i["a"].get(t,e)}function d(e){var t="/category/getModuleCate";return i["a"].get(t,e)}function c(e){var t="/moduleField/index";return i["a"].get(t,e)}function u(e){var t="/moduleField/save";return i["a"].post(t,e)}function m(e){var t="/moduleField/update";return i["a"].post(t,e)}function p(e){var t="/moduleField/delete";return i["a"].post(t,e)}function h(e){var t="/moduleField/read";return i["a"].get(t,e)}function _(e){var t="/module/all";return i["a"].get(t,e)}function f(e){var t="/module/field";return i["a"].get(t,e)}function b(e){var t="/preview";return i["a"].get(t,e)}t["a"]={moduleList:n,moduleSave:r,moduleUpdate:s,moduleDelete:l,moduleInfo:o,fieldList:c,fieldSave:u,fieldUpdate:m,fieldDelete:p,fieldInfo:h,getModuleCate:d,moduleTable:_,moduleField:f,preview:b}},8512:function(e,t,a){"use strict";a("815f")},"915c":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"main-box",attrs:{id:"addColumn"}},[a("BaseTitle",{attrs:{title:e.$t("栏目管理")},scopedSlots:e._u([{key:"right",fn:function(){return[a("BackBtn",{attrs:{"back-funtion":e.prev}})]},proxy:!0}])}),a("el-form",{ref:"addForm",staticClass:"flexForm",attrs:{model:e.addForm,rules:e.columnRules,"label-position":"top"}},[a("div",{staticClass:"left"},[a("SubTitle",{attrs:{title:e.$t("基本信息")}}),a("el-form-item",{attrs:{label:e.$t("上级栏目")+":",prop:"parent_id"}},[a("el-cascader",{attrs:{options:e.columnList,props:{label:"title",value:"id",checkStrictly:!0},"show-all-levels":!1},on:{change:e.changeColumn},model:{value:e.addForm.parent_id,callback:function(t){e.$set(e.addForm,"parent_id",t)},expression:"addForm.parent_id"}})],1),0!=e.parent_websiteId?a("el-form-item",{attrs:{label:e.$t("父站点栏目")+":",prop:"parent_map"}},[a("el-cascader",{attrs:{options:e.parentColumn,props:{label:"title",value:"id",checkStrictly:!0},"show-all-levels":!1},on:{change:e.changeParentColumn},model:{value:e.addForm.parent_map,callback:function(t){e.$set(e.addForm,"parent_map",t)},expression:"addForm.parent_map"}})],1):e._e(),0==e.parent_websiteId?a("el-form-item",{attrs:{label:e.$t("类型")+":",prop:"type"}},[a("el-radio-group",{on:{change:e.raidoChange},model:{value:e.addForm.type,callback:function(t){e.$set(e.addForm,"type",t)},expression:"addForm.type"}},[a("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("列表栏目")))]),a("el-radio",{attrs:{label:2}},[e._v(e._s(e.$t("频道封面")))]),a("el-radio",{attrs:{label:3}},[e._v(e._s(e.$t("跳转链接")))]),a("el-radio",{attrs:{label:4}},[e._v(e._s(e.$t("单页面")))])],1)],1):e._e(),a("el-form-item",{attrs:{label:e.$t("栏目名称")+":",prop:"title"}},[a("el-input",{model:{value:e.addForm.title,callback:function(t){e.$set(e.addForm,"title",t)},expression:"addForm.title"}})],1),0==e.parent_websiteId?a("div",[1==e.addForm.type||4==e.addForm.type?a("el-form-item",{attrs:{label:e.$t("栏目别名")+":"}},[a("el-input",{attrs:{placeholder:e.$t("栏目别名提示信息")},model:{value:e.addForm.alias,callback:function(t){e.$set(e.addForm,"alias",t)},expression:"addForm.alias"}})],1):e._e(),3==e.addForm.type?a("el-form-item",{attrs:{label:e.$t("访问地址")+":",prop:"alias"}},[a("el-input",{attrs:{placeholder:e.$t("访问地址提示")},model:{value:e.addForm.alias,callback:function(t){e.$set(e.addForm,"alias",t)},expression:"addForm.alias"}})],1):e._e(),3!=e.addForm.type?a("el-form-item",{attrs:{label:e.$t("模型")+":",prop:"module_id"}},[a("el-select",{attrs:{disabled:""},model:{value:e.addForm.module_id,callback:function(t){e.$set(e.addForm,"module_id",t)},expression:"addForm.module_id"}},e._l(e.moduleList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1):e._e(),1==e.addForm.type||4==e.addForm.type?a("div",[a("el-form-item",{attrs:{label:e.$t("列表页模板")+":",prop:"list_tpl"}},[a("el-select",{on:{change:e.changeList},model:{value:e.addForm.list_tpl,callback:function(t){e.$set(e.addForm,"list_tpl",t)},expression:"addForm.list_tpl"}},e._l(e.tempList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.file,value:e.file}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("详情页模板")+":",prop:1==e.addForm.type?"detail_tpl":" "}},[a("el-select",{attrs:{clearable:""},on:{change:e.changeDetail},model:{value:e.addForm.detail_tpl,callback:function(t){e.$set(e.addForm,"detail_tpl",t)},expression:"addForm.detail_tpl"}},e._l(e.detailTempList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.file,value:e.file}})})),1)],1)],1):e._e()],1):e._e(),a("el-form-item",{attrs:{label:e.$t("设为菜单")+":"}},[a("el-radio-group",{model:{value:e.addForm.is_menu,callback:function(t){e.$set(e.addForm,"is_menu",t)},expression:"addForm.is_menu"}},[a("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("开")))]),a("el-radio",{attrs:{label:2}},[e._v(e._s(e.$t("关")))]),e._v(" > ")],1)],1),a("el-form-item",{attrs:{label:e.$t("排序")+":"}},[a("el-input",{model:{value:e.addForm.sort,callback:function(t){e.$set(e.addForm,"sort",t)},expression:"addForm.sort"}})],1),a("el-form-item",{attrs:{label:e.$t("描述")+":"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:5,maxRows:8}},model:{value:e.addForm.description,callback:function(t){e.$set(e.addForm,"description",t)},expression:"addForm.description"}})],1),4==e.addForm.type?a("el-form-item",{attrs:{label:e.$t("内容")+":"}},[a("div",[a("MyTinymce",{ref:"myTinymce",attrs:{"tinymce-html":e.addForm.content,"show-btn":e.showBtn,"operation-btn":["inLine"]}})],1)]):e._e(),4!=e.addForm.type?a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submit()}}},[e._v(" "+e._s(e.$t("提交"))+" ")])],1):e._e()],1),a("div",{staticClass:"right"},[a("SubTitle",{attrs:{title:e.$t("SEO设置")}}),a("el-form-item",{attrs:{label:"Title:"}},[a("el-input",{model:{value:e.addForm.seo_title,callback:function(t){e.$set(e.addForm,"seo_title",t)},expression:"addForm.seo_title"}})],1),a("el-form-item",{attrs:{label:"Keyword:"}},[a("el-input",{model:{value:e.addForm.seo_keywords,callback:function(t){e.$set(e.addForm,"seo_keywords",t)},expression:"addForm.seo_keywords"}})],1),a("el-form-item",{attrs:{label:"Description:"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.addForm.seo_description,callback:function(t){e.$set(e.addForm,"seo_description",t)},expression:"addForm.seo_description"}})],1),a("SubTitle",{attrs:{title:e.$t("附件信息")}}),a("el-form-item",{attrs:{label:e.$t("搜索支持")+":",required:""}},[a("el-radio-group",{model:{value:e.addForm.is_search,callback:function(t){e.$set(e.addForm,"is_search",t)},expression:"addForm.is_search"}},[a("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("支持")))]),a("el-radio",{attrs:{label:2}},[e._v(e._s(e.$t("不支持")))]),e._v(" > ")],1)],1),a("el-form-item",{attrs:{label:e.$t("副标题")+":"}},[a("el-input",{model:{value:e.addForm.sub_title,callback:function(t){e.$set(e.addForm,"sub_title",t)},expression:"addForm.sub_title"}})],1),a("el-form-item",{attrs:{label:e.$t("简介")+":"}},[a("el-input",{model:{value:e.addForm.desc,callback:function(t){e.$set(e.addForm,"desc",t)},expression:"addForm.desc"}})],1),a("SubTitle",{attrs:{title:e.$t("栏目图片")}}),a("Attachment",{ref:"attachment",attrs:{"dialog-show":e.dialogShow,"attachment-type":e.attachmentType},on:{"update:dialogShow":function(t){e.dialogShow=t},"update:dialog-show":function(t){e.dialogShow=t},func:e.getData}}),a("el-form-item",{attrs:{size:"small",label:e.$t("缩略图")+":"}},[a("div",{staticClass:"attachment_imgBox",on:{click:function(t){return e.openList("thumbnail")}}},[e.addForm.thumbnail?a("img",{staticClass:"attachmentImg",attrs:{src:e.thumbnail}}):a("i",{staticClass:"el-icon-camera"}),e.addForm.thumbnail?a("span",{staticClass:"img-actions attachmentImg"},[a("span",{on:{click:function(t){return t.stopPropagation(),e.handleRemove(1)}}},[a("i",{staticClass:"el-icon-delete"})])]):e._e()])]),a("el-form-item",{attrs:{size:"small",label:e.$t("banner图")+":"}},[a("div",{staticClass:"attachment_imgBox",on:{click:function(t){return e.openList("banner")}}},[e.addForm.banner?a("img",{staticClass:"attachmentImg",attrs:{src:e.banner}}):a("i",{staticClass:"el-icon-camera"}),e.addForm.banner?a("span",{staticClass:"img-actions attachmentImg"},[a("span",{on:{click:function(t){return t.stopPropagation(),e.handleRemove(2)}}},[a("i",{staticClass:"el-icon-delete"})])]):e._e()])]),a("SubTitle",{attrs:{title:e.$t("审核设置")}}),a("el-form-item",{attrs:{label:e.$t("审核")+":"}},[a("el-radio-group",{model:{value:e.addForm.need_check,callback:function(t){e.$set(e.addForm,"need_check",t)},expression:"addForm.need_check"}},[a("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("需要审核")))]),a("el-radio",{attrs:{label:2}},[e._v(e._s(e.$t("无需审核")))])],1)],1),1==e.addForm.need_check?a("el-table",{attrs:{data:e.addForm.check_list}},[a("el-table-column",{attrs:{label:e.$t("审核步骤"),type:"index",width:"100",align:"center"}}),a("el-table-column",{attrs:{label:e.$t("审核人"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("ChoiceUser",{key:t.row.id,model:{value:t.row.check_users,callback:function(a){e.$set(t.row,"check_users",a)},expression:"scope.row.check_users"}})]}}],null,!1,2531076726)}),a("el-table-column",{attrs:{label:e.$t("审核方式"),width:"230",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio-group",{model:{value:t.row.examine_mode,callback:function(a){e.$set(t.row,"examine_mode",a)},expression:"scope.row.examine_mode"}},[a("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("或签")))]),a("el-radio",{attrs:{label:2}},[e._v(e._s(e.$t("会签")))])],1)]}}],null,!1,1137125735)}),a("el-table-column",{attrs:{label:e.$t("操作"),width:"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleDeleteTable(t)}}},[e._v(" "+e._s(e.$t("删除"))+" ")])]}}],null,!1,3780761696)})],1):e._e(),1==e.addForm.need_check?a("div",{staticClass:"add-table-btn",on:{click:e.handleAddTable}},[a("i",{staticClass:"el-icon-plus"}),e._v(" "+e._s(e.$t("添加"))+" ")]):e._e(),4==e.addForm.type?a("el-form-item",{staticStyle:{"margin-top":"16px"}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submit()}}},[e._v(" "+e._s(e.$t("提交"))+" ")])],1):e._e()],1)])],1)},n=[],r=a("5530"),s=a("ade3"),l=(a("14d9"),a("a434"),a("d3b7"),a("159b"),a("25f0"),a("d81d"),a("a4d3"),a("e01a"),a("4e82"),a("a15b"),a("c740"),a("7632")),o=a("816b"),d=a("12de"),c=a("e1bd"),u={data:function(){return{showBtn:!0,attachmentType:"",columnList:[],parentColumn:[],defaultKeys:[],attachmentLimit:10,dialogShow:!1,attachmentData:[],imagelist:[],imagetype:"",thumbnail:"",banner:"",myHeaders:{Authorization:"Bearer ".concat(this.$store.getters.token)},headers:{},imageUrl:"",imgUrl:this.$store.getters.updateURL,id:"",website_id:"",lang:"",moduleList:[],tempList:[],detailTempList:[],parent_id:"",addForm:Object(s["a"])(Object(s["a"])(Object(s["a"])({id:"",parent_id:"",title:"",website_id:"",alias:"",module_id:"",list_tpl:"",type:"",description:"",desc:"",detail_tpl:"",seo_description:"",seo_keywords:"",seo_title:"",thumbnail:"",lang:"",banner:"",sort:"",sub_title:"",content:"",is_search:2,is_menu:2,parent_map:""},"parent_map",""),"need_check",1),"check_list",[]),tempType:"1",columnRules:{type:[{required:"true",message:this.$t("请选择类型"),trigger:"change"}],parent_map:[{required:"true",message:this.$t("请选择父级站点栏目"),trigger:"change"}],title:[{required:"true",message:this.$t("请输入栏目名称"),trigger:"blur"}],alias:[{required:"true",message:this.$t("请输入栏目别名或访问地址"),trigger:"blur"}],module_id:[{required:"true",message:this.$t("请选择模型"),trigger:"change"}],list_tpl:[{required:"true",message:this.$t("请选择列表页模板"),trigger:"change"}],detail_tpl:[{required:"true",message:this.$t("请选择详情页模板"),trigger:"change"}]}}},computed:{siteId1:function(){return this.$store.getters.siteId}},watch:{siteId1:function(e,t){t&&this.$router.push({name:"Category"}),this.getMould(),e&&this.getTemp()}},created:function(){this.id=this.$route.query.id,this.website_id=this.$route.query.website_id,this.lang=this.$route.query.lang,this.parent_websiteId=this.$store.getters.parentId,this.getMould(),this.parent_websiteId&&this.getParentColumn(),this.id&&(this.getTemp(),this.getDetailTemp(),this.getColumnList(),this.getColumnInfo())},methods:{delField:function(e,t){this.fieldList.splice(t,1)},handleAddField:function(){var e="custom"+this.fieldNum;this.fieldList.push({key:e,value:""}),this.fieldNum++},handleRemove:function(e){1==e?(this.addForm.thumbnail="",this.thumbnail=""):(this.addForm.banner="",this.banner="")},handleDeleteTable:function(e){this.addForm.check_list.length>1?this.addForm.check_list.splice(e.$index,1):this.$message.error(this.$t("最少保留一条审核记录"))},handleAddTable:function(){this.addForm.check_list.push({id:Object(c["a"])(),check_users:[],examine_mode:1})},getData:function(e){e.length>1?this.$message.error(this.$t(this.$t("最多只能选择一张图片"))):("thumbnail"==this.imagetype?(this.addForm.thumbnail=e[0].id,this.thumbnail=e[0].url):"banner"==this.imagetype&&(this.addForm.banner=e[0].id,this.banner=e[0].url),this.dialogShow=!1)},openList:function(e){var t=this;this.dialogShow=!0,this.attachmentType=2,this.$nextTick((function(){t.$refs.attachment.getAttachmentList(),t.$refs.attachment.$refs.AttachmentCate.getCateList(0)})),this.imagetype=e},changeColumn:function(e){var t=this;this.defaultKeys=[],e.forEach((function(e){t.defaultKeys.push(e.toString())})),this.parent_id=e[e.length-1]},changeParentColumn:function(e){},getParentColumn:function(){var e=this,t={website_id:this.$store.getters.parentId,lang:this.lang};l["a"].columnList(t).then((function(t){e.parentColumn=t.data,e.getTypeList(e.parentColumn)}))},getColumnList:function(){var e=this,t={website_id:this.website_id,lang:this.lang};l["a"].columnList(t).then((function(t){e.columnList=t.data,e.columnList.unshift({title:e.$t("作为一级栏目"),id:0,children:[]}),e.getTypeList(e.columnList)}))},getTypeList:function(e){var t=this;e.forEach((function(e){e.children.length>0?t.getTypeList(e.children):e.children=void 0}))},changeList:function(e){},changeDetail:function(e){},getMould:function(){var e=this;o["a"].moduleList().then((function(t){e.moduleList=t.data}))},getTemp:function(){var e=this,t={website_id:this.website_id,lang:this.lang,type:this.tempType};d["a"].tempFiles(t).then((function(t){e.tempList=t.data}))},getDetailTemp:function(){var e=this,t={website_id:this.website_id,lang:this.lang,type:2};d["a"].tempFiles(t).then((function(t){e.detailTempList=t.data}))},getColumnInfo:function(){var e=this,t={website_id:this.website_id,id:this.id};l["a"].columnInfo(t).then((function(t){var a=t.data,i=a.check_list.map((function(e){return{examine_mode:e.examine_mode,check_users:e.check_users.split(",")}}));0==e.parent_websiteId?e.addForm={id:a.id,parent_id:[a.parent_id],title:a.title,website_id:a.website_id,alias:a.alias,module_id:a.module_id,list_tpl:a.list_tpl,type:a.type,desc:a.desc,description:a.description,detail_tpl:a.detail_tpl,seo_description:a.seo_description,seo_keywords:a.seo_keywords,seo_title:a.seo_title,thumbnail:a.thumbnail?a.thumbnail.id:null,lang:e.lang,banner:a.banner?a.banner.id:null,sort:a.sort,sub_title:a.sub_title,content:a.content,is_search:a.is_search,is_menu:a.is_menu,need_check:a.need_check,check_list:i}:e.addForm={id:a.id,parent_id:[a.parent_id],parent_map:a.parent_path,title:a.title,website_id:a.website_id,desc:a.desc,description:a.description,seo_description:a.seo_description,seo_keywords:a.seo_keywords,seo_title:a.seo_title,thumbnail:a.thumbnail?a.thumbnail.id:null,lang:e.lang,banner:a.banner?a.banner.id:null,sort:a.sort,sub_title:a.sub_title,is_search:a.is_search,is_menu:a.is_menu,need_check:a.need_check,check_list:i},1==a.type?(e.tempType=1,e.getTemp()):4==a.type&&(e.tempType=3,e.getTemp()),e.thumbnail=a.thumbnail?a.thumbnail.url:"",e.banner=a.banner?a.banner.url:"";var n=a.path.split("-"),r=[];n.length>2?(n.shift(),n.pop(),n.forEach((function(e){r.push(parseInt(e))})),e.addForm.parent_id=r):2==n.length&&(e.addForm.parent_id=[0])}))},raidoChange:function(e){1==e?(this.tempType=1,this.getTemp()):4==e&&(this.tempType=3,this.getTemp())},submit:function(){var e=this,t=[];if(1==this.addForm.need_check){t=this.addForm.check_list.map((function(e){return{check_users:e.check_users.join(","),examine_mode:e.examine_mode}}));var a=t.findIndex((function(e){return!e.check_users||!e.examine_mode}));if(a>=0||!this.addForm.check_list.length)return void this.$message.error(this.$t("请完善审核流程"))}this.$refs.addForm.validate((function(a){a?(e.addForm.parent_id.length&&(e.addForm.parent_id=e.addForm.parent_id[e.addForm.parent_id.length-1]),e.addForm.content=e.$refs.myTinymce?e.$refs.myTinymce.codeValue:"",l["a"].columnUpdate(Object(r["a"])(Object(r["a"])({},e.addForm),{},{check_list:t})).then((function(t){0==t.code&&(e.$message.success(t.msg),e.$store.dispatch("user/dynamicRoutes"),e.dialogShow=!1,e.$router.push({name:"Category",query:{key:t.data.path,lang:e.lang}}))}))):e.$message.error(e.$t("请填写必要信息"))}))},prev:function(){this.$router.push({name:"Category",query:{lang:this.lang}})}}},m=u,p=(a("8512"),a("17cb"),a("2877")),h=Object(p["a"])(m,i,n,!1,null,"0d385770",null);t["default"]=h.exports},9486:function(e,t,a){},e1bd:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));let i=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>(t&=63,e+=t<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_",e),"")}}]);
|