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