长城期货
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
42 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3f1ed0c1","chunk-69bf6520"],{"07ac":function(t,e,a){"use strict";var o=a("23e7"),i=a("6f53").values;o({target:"Object",stat:!0},{values:function(t){return i(t)}})},"2afe":function(t,e,a){},"36a0":function(t,e,a){},"4e82":function(t,e,a){"use strict";var o=a("23e7"),i=a("e330"),n=a("59ed"),r=a("7b0b"),s=a("07fa"),l=a("083a"),c=a("577e"),u=a("d039"),d=a("addb"),m=a("a640"),p=a("3f7e"),f=a("99f4"),h=a("1212"),b=a("ea83"),g=[],_=i(g.sort),v=i(g.push),y=u((function(){g.sort(void 0)})),$=u((function(){g.sort(null)})),k=m("sort"),j=!u((function(){if(h)return h<70;if(!(p&&p>3)){if(f)return!0;if(b)return b<603;var t,e,a,o,i="";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(o=0;o<47;o++)g.push({k:e+o,v:a})}for(g.sort((function(t,e){return e.v-t.v})),o=0;o<g.length;o++)e=g[o].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}})),C=y||!$||!k||!j,F=function(t){return function(e,a){return void 0===a?-1:void 0===e?1:void 0!==t?+t(e,a)||0:c(e)>c(a)?1:-1}};o({target:"Array",proto:!0,forced:C},{sort:function(t){void 0!==t&&n(t);var e=r(this);if(j)return void 0===t?_(e):_(e,t);var a,o,i=[],c=s(e);for(o=0;o<c;o++)o in e&&v(i,e[o]);d(i,F(t)),a=s(i),o=0;while(o<a)e[o]=i[o++];while(o<c)l(e,o++);return e}})},"6f3e":function(t,e,a){},"6f53":function(t,e,a){"use strict";var o=a("83ab"),i=a("d039"),n=a("e330"),r=a("e163"),s=a("df75"),l=a("fc6a"),c=a("d1e7").f,u=n(c),d=n([].push),m=o&&i((function(){var t=Object.create(null);return t[2]=2,!u(t,2)})),p=function(t){return function(e){var a,i=l(e),n=s(i),c=m&&null===r(i),p=n.length,f=0,h=[];while(p>f)a=n[f++],o&&!(c?a in i:u(i,a))||d(h,t?[a,i[a]]:i[a]);return h}};t.exports={entries:p(!0),values:p(!1)}},"816b":function(t,e,a){"use strict";var o=a("365c");function i(t){var e="/module/index";return o["a"].get(e,t)}function n(t){var e="/module/save";return o["a"].post(e,t)}function r(t){var e="/module/update";return o["a"].post(e,t)}function s(t){var e="/module/delete";return o["a"].post(e,t)}function l(t){var e="/module/read";return o["a"].get(e,t)}function c(t){var e="/category/getModuleCate";return o["a"].get(e,t)}function u(t){var e="/moduleField/index";return o["a"].get(e,t)}function d(t){var e="/moduleField/save";return o["a"].post(e,t)}function m(t){var e="/moduleField/update";return o["a"].post(e,t)}function p(t){var e="/moduleField/delete";return o["a"].post(e,t)}function f(t){var e="/moduleField/read";return o["a"].get(e,t)}function h(t){var e="/module/all";return o["a"].get(e,t)}function b(t){var e="/module/field";return o["a"].get(e,t)}function g(t){var e="/preview";return o["a"].get(e,t)}function _(t){var e="/moduleField/relationValueList";return o["a"].get(e,t)}e["a"]={moduleList:i,moduleSave:n,moduleUpdate:r,moduleDelete:s,moduleInfo:l,fieldList:u,fieldSave:d,fieldUpdate:m,fieldDelete:p,fieldInfo:f,getModuleCate:c,moduleTable:h,moduleField:b,preview:g,relationValueList:_}},"9dbe":function(t,e,a){},a148:function(t,e,a){"use strict";a("36a0")},a1b9:function(t,e,a){"use strict";a("2afe")},a89e:function(t,e,a){"use strict";a("6f3e")},b41e:function(t,e,a){"use strict";a("9dbe")},c6c2:function(t,e,a){var o={"./add.vue":["ca30"],"./components/approvalReject.vue":["cfaa","chunk-2d222cb9"],"./components/form.vue":["e2be"],"./components/importButton.vue":["9aa0","chunk-2d0f022d"],"./components/updateForms.vue":["9531","chunk-cf5b431e"],"./components/uploadFiles.vue":["0b9b","chunk-5f494878"],"./content.vue":["99f5","chunk-69553349"],"./info.vue":["8e92","chunk-d28c4884"],"./update.vue":["f874","chunk-cf5b431e","chunk-47a73682"]};function i(t){if(!a.o(o,t))return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=o[t],i=e[0];return Promise.all(e.slice(1).map(a.e)).then((function(){return a(i)}))}i.keys=function(){return Object.keys(o)},i.id="c6c2",t.exports=i},ca30:function(t,e,a){"use strict";a.r(e);a("a4d3"),a("e01a"),a("4e82");var o=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-box",attrs:{id:"addContent"}},[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:"form",staticClass:"flexForm",attrs:{model:t.addForm,rules:t.rules,"label-position":"top"}},[e("div",{staticClass:"left"},[e("el-form",{ref:"searchForm",staticClass:"filter-form",attrs:{model:t.searchForm,rules:t.searchRules,"label-width":"top"}},[e("el-form-item",{attrs:{label:t.$t("站点"),prop:"site_id"}},[e("el-select",{attrs:{multiple:""},on:{change:t.webChange},model:{value:t.searchForm.site_id,callback:function(e){t.$set(t.searchForm,"site_id",e)},expression:"searchForm.site_id"}},t._l(t.webList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.domain,value:t.id}})})),1)],1),e("el-form-item",{attrs:{label:t.$t("主栏目"),prop:"category_id"}},[e("el-select",{attrs:{filterable:"",disabled:t.is_customContent},on:{change:t.handleChangeColumn},model:{value:t.searchForm.category_id,callback:function(e){t.$set(t.searchForm,"category_id",e)},expression:"searchForm.category_id"}},t._l(t.columnList,(function(a){return e("el-option-group",{key:a.id,attrs:{label:a.title}},t._l(a.category,(function(t){return e("el-option",{key:t.id,attrs:{label:0!=t.parent_id?"".concat(t.title):t.title,value:t.id,disabled:t.disabled}})})),1)})),1)],1),e("el-form-item",{attrs:{label:t.$t("副栏目")}},[e("el-select",{attrs:{filterable:"",multiple:""},model:{value:t.searchForm.subColumnId,callback:function(e){t.$set(t.searchForm,"subColumnId",e)},expression:"searchForm.subColumnId"}},t._l(t.subColumnList,(function(a){return e("el-option-group",{key:a.id,attrs:{label:a.title}},t._l(a.category,(function(t){return e("el-option",{key:t.id,attrs:{label:t.title,value:t.id,disabled:t.disabled}})})),1)})),1)],1)],1),e("SubTitle",{attrs:{title:t.$t("基本信息")}}),e("el-form-item",{attrs:{prop:"sub_content.title",label:"".concat(t.$t("标题"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入标题")},model:{value:t.addForm.sub_content.title,callback:function(e){t.$set(t.addForm.sub_content,"title",e)},expression:"addForm.sub_content.title"}})],1),e("el-form-item",{attrs:{prop:"sub_content.sub_title",label:"".concat(t.$t("副标题"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入副标题")},model:{value:t.addForm.sub_content.sub_title,callback:function(e){t.$set(t.addForm.sub_content,"sub_title",e)},expression:"addForm.sub_content.sub_title"}})],1),e("el-form-item",{attrs:{prop:"sub_content.description",label:"".concat(t.$t("简介"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入简介"),type:"textarea",autosize:{minRows:4}},model:{value:t.addForm.sub_content.description,callback:function(e){t.$set(t.addForm.sub_content,"description",e)},expression:"addForm.sub_content.description"}})],1),e("el-form-item",{attrs:{label:"".concat(t.$t("内容"),":")}},[e("div",[e("MyTinymce",{ref:"myTinymce",attrs:{"tinymce-html":t.content},on:{changeDescription:t.changeDescription}})],1)]),e("el-form-item",{attrs:{label:"".concat(t.$t("标签"),":")}},[e("el-input",{attrs:{placeholder:t.$t("标签之间用逗号隔开")},model:{value:t.addForm.sub_content.tag,callback:function(e){t.$set(t.addForm.sub_content,"tag",e)},expression:"addForm.sub_content.tag"}})],1)],1),e("div",{staticClass:"right"},[e("SubTitle",{attrs:{title:t.$t("SEO设置")}}),e("el-form-item",{attrs:{prop:"seo_title",label:"Title:"}},[e("el-input",{attrs:{placeholder:t.$t("请输入seo标题")},model:{value:t.addForm.sub_content.seo_title,callback:function(e){t.$set(t.addForm.sub_content,"seo_title",e)},expression:"addForm.sub_content.seo_title"}})],1),e("el-form-item",{attrs:{prop:"seo_keyword",label:"Keyword:"}},[e("el-input",{attrs:{placeholder:t.$t("请输入seo关键词")},model:{value:t.addForm.sub_content.seo_keyword,callback:function(e){t.$set(t.addForm.sub_content,"seo_keyword",e)},expression:"addForm.sub_content.seo_keyword"}})],1),e("el-form-item",{attrs:{prop:"seo_description",label:"Description:"}},[e("el-input",{attrs:{type:"textarea",placeholder:t.$t("请输入seo描述"),autosize:{minRows:4}},model:{value:t.addForm.sub_content.seo_description,callback:function(e){t.$set(t.addForm.sub_content,"seo_description",e)},expression:"addForm.sub_content.seo_description"}})],1),e("SubTitle",{attrs:{title:t.$t("其他信息")}}),e("el-form-item",{attrs:{prop:"author",label:"".concat(t.$t("作者"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入作者名称")},model:{value:t.addForm.sub_content.author,callback:function(e){t.$set(t.addForm.sub_content,"author",e)},expression:"addForm.sub_content.author"}})],1),e("el-form-item",{attrs:{label:"".concat(t.$t("模板"),":")}},[e("el-select",{model:{value:t.addForm.sub_content.detail_tpl,callback:function(e){t.$set(t.addForm.sub_content,"detail_tpl",e)},expression:"addForm.sub_content.detail_tpl"}},t._l(t.themeList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.file,value:t.file}})})),1)],1),e("el-form-item",{attrs:{prop:"url",label:"".concat(t.$t("跳转链接"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入跳转链接")},model:{value:t.addForm.sub_content.url,callback:function(e){t.$set(t.addForm.sub_content,"url",e)},expression:"addForm.sub_content.url"}})],1),e("el-form-item",{attrs:{label:"".concat(t.$t("发布时间"),":"),prop:"publish_time"}},[e("el-date-picker",{attrs:{type:"datetime",placeholder:t.$t("请选择发布时间"),"value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss"},model:{value:t.addForm.sub_content.publish_time,callback:function(e){t.$set(t.addForm.sub_content,"publish_time",e)},expression:"addForm.sub_content.publish_time"}})],1),e("el-form-item",{attrs:{prop:"hits",label:"".concat(t.$t("浏览量"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入浏览量")},model:{value:t.addForm.sub_content.hits,callback:function(e){t.$set(t.addForm.sub_content,"hits",e)},expression:"addForm.sub_content.hits"}})],1),e("el-form-item",{attrs:{prop:"sort",label:"".concat(t.$t("排序"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入排序")},model:{value:t.addForm.sub_content.sort,callback:function(e){t.$set(t.addForm.sub_content,"sort",e)},expression:"addForm.sub_content.sort"}})],1),e("el-form-item",{attrs:{prop:"status",label:"".concat(t.$t("状态"),":")}},[e("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.sub_content.status,callback:function(e){t.$set(t.addForm.sub_content,"status",e)},expression:"addForm.sub_content.status"}})],1),e("el-form-item",{attrs:{prop:"is_top",label:"".concat(t.$t("是否置顶"),":")}},[e("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.sub_content.is_top,callback:function(e){t.$set(t.addForm.sub_content,"is_top",e)},expression:"addForm.sub_content.is_top"}})],1),e("el-form-item",{attrs:{prop:"is_recommend",label:"".concat(t.$t("是否推荐"),":")}},[e("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.sub_content.is_recommend,callback:function(e){t.$set(t.addForm.sub_content,"is_recommend",e)},expression:"addForm.sub_content.is_recommend"}})],1),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.sub_content.thumbnail?e("img",{staticClass:"attachmentImg",attrs:{src:t.thumbnailImg}}):e("i",{staticClass:"el-icon-camera"}),t.addForm.sub_content.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("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}})],1),e("el-form-item",{attrs:{label:"".concat(t.$t("详情页banner"),":")}},[e("div",{staticClass:"attachment_imgBox",on:{click:function(e){return t.openList("cover")}}},[t.addForm.sub_content.cover?e("img",{staticClass:"attachmentImg",attrs:{src:t.coverImg}}):e("i",{staticClass:"el-icon-camera"}),t.addForm.sub_content.cover?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()])])],1)]),e("div",{staticStyle:{width:"100%"}},[e("SubTitle",{attrs:{title:t.$t("附加信息")}}),e("PublicForm",{ref:"PublicForm",attrs:{"form-obj":t.formObj,"form-data":t.formData,rules:t.mainRules}})],1),e("br"),e("div",{staticClass:"flexCenter"},[e("el-button",{staticClass:"tianBlue",attrs:{type:"primary"},on:{click:function(e){return t.onSubmit(3)}}},[t._v(" "+t._s(t.$t("暂存"))+" ")]),e("el-button",{attrs:{loading:t.loading,type:"primary"},on:{click:function(e){return t.onSubmit()}}},[t._v(" "+t._s(t.$t("提交"))+" ")]),e("el-button",{attrs:{loading:t.loading,type:"primary"},on:{click:function(e){return t.onSubmit(1,"back")}}},[t._v(" "+t._s(t.$t("保存并继续"))+" ")])],1),e("BaseDialog",{attrs:{title:t.$t("批量上传"),"dialog-show":t.dialogShow2,width:"50%",footer:""},on:{"update:dialogShow":function(e){t.dialogShow2=e},"update:dialog-show":function(e){t.dialogShow2=e},submit:function(e){t.dialogShow2=!1}}},[e("el-form",{attrs:{"label-position":"top"}},[e("el-form-item",{attrs:{label:"".concat(t.$t("文件"),":")}},[e("el-upload",{ref:"upload",staticClass:"bulkImort",attrs:{headers:t.myHeaders,action:t.$store.getters.updateURL+"content/articleUpload",data:t.bulkData,"show-file-list":!0,"on-success":t.bulkImportSuccess,"before-upload":t.beforeBulkImport,"on-change":t.bulkChange,multiple:!0}},[e("el-button",{attrs:{size:"small",type:"primary",icon:"el-icon-upload2"}},[t._v(" "+t._s(t.$t("批量上传"))+" ")])],1)],1),e("el-form-item",[e("el-checkbox",{on:{change:t.changePseudo},model:{value:t.pseudo,callback:function(e){t.pseudo=e},expression:"pseudo"}},[t._v(" "+t._s(t.$t("伪原创"))+" ")])],1)],1)],1)],1)},i=[],n=a("2909"),r=a("ade3"),s=a("c14f"),l=a("1da1"),c=a("5530"),u=(a("99af"),a("4de4"),a("7db0"),a("a15b"),a("14d9"),a("a434"),a("e9f5"),a("910d"),a("f665"),a("7d54"),a("d3b7"),a("07ac"),a("3ca3"),a("159b"),a("ddb0"),a("7632")),d=a("816b"),m=a("12de"),p=a("e2be"),f=a("d28d"),h=a("37cb"),b=a("2f62"),g={name:"AddArticle",components:{PublicForm:p["default"]},inject:["reload"],data:function(){return{is_customContent:!1,pseudo:!1,themeList:[],dialogShow2:!1,myHeaders:{Authorization:"Bearer ".concat(this.$store.getters.token)},bulkData:{},attachmentLimit:10,webList:[],type:"",dialogShow:!1,thumbnailImg:"",coverImg:"",attachmentData:[],content:"",html:"",formObj:[],formData:{},mainRules:[],searchForm:{model_id:"",category_id:[],site_id:[]},searchRules:{site_id:[{required:!0,message:this.$t("请选择站点"),trigger:"change"}],category_id:[{required:!0,message:this.$t("请选择栏目"),trigger:"change"}]},moduleList:[],columnList:[],subColumnList:[],currentModuleId:"",formTypeSource:{},website_id:"",headers:{},imageUrl:"",imgUrl:this.$store.getters.updateURL,checkList:[],tindata:"",ticShow:!1,options:[],value:"",pageLoading:!1,id:"",loading:!1,form:{label:"",title:"",cate_id:"",push_time:"",image_url:"",content:"",source:"词爪官方",is_hot:2},rules:{sub_content:{title:[{required:!0,message:this.$t("请选择文章标题"),trigger:"blur"}]},main_content:{title:[{required:!0,message:this.$t("请选择文章标题"),trigger:"blur"}]}},addForm:{website_id:"",category_id:"",sub_content:{title:"",sub_title:"",detail_tpl:"",description:"",thumbnail:"",cover:"",hits:"",author:"",status:1,url:"",is_top:"",is_recommend:"",sort:"",seo_title:"",seo_keyword:"",seo_description:""},main_content:{title:""}},tagData:[],attachmentType:""}},computed:Object(c["a"])({},Object(b["b"])(["siteId"])),watch:{siteId:function(t,e){e&&this.$router.push({name:"Content"})}},created:function(){this.lang=this.$route.query.lang,this.bulkData={module_id:this.$route.query.module_id,category_id:this.$route.query.category_id,pseudo:this.pseudo?"1":"2"},this.getWebList(),this.siteId&&this.getList(),this.getTemp()},mounted:function(){},updated:function(){this.bulkData.pseudo=this.pseudo?"1":"2"},methods:{handleRemove:function(t){1==t?(this.addForm.sub_content.thumbnail="",this.thumbnailImg=""):(this.addForm.sub_content.cover="",this.coverImg="")},handleChangeColumn:function(t){this.getSubColumnList(t),this.searchForm.subColumnId=[]},changePseudo:function(){},getColumnList:function(){var t=this;return Object(l["a"])(Object(s["a"])().m((function e(){var a;return Object(s["a"])().w((function(e){while(1)switch(e.n){case 0:if(!t.searchForm.site_id.length){e.n=2;break}return e.n=1,d["a"].getModuleCate({lang:t.lang,site_id:t.searchForm.site_id});case 1:a=e.v,t.columnList=a.data,t.$route.query.category_id&&(t.searchForm.category_id=+t.$route.query.category_id,t.getSubColumnList(t.$route.query.category_id),t.searchForm.subColumnId=[],t.is_customContent=!0),e.n=3;break;case 2:t.columnList=[];case 3:return e.a(2)}}),e)})))()},getSubColumnList:function(t){var e=this;this.searchForm.subColumnId=[];var a=[];this.columnList.find((function(a){var o=a.category.find((function(e){return e.id==t}));null!==o&&void 0!==o&&o.module_id&&(e.currentModuleId=o.module_id)})),this.columnList.forEach((function(o){a.push(Object(c["a"])(Object(c["a"])({},o),{},{category:o.category.filter((function(a){return a.module_id===e.currentModuleId&&a.id!==t}))}))})),this.subColumnList=a,this.getSubform()},getSubform:function(){var t=this;return Object(l["a"])(Object(s["a"])().m((function e(){var a,o;return Object(s["a"])().w((function(e){while(1)switch(e.n){case 0:return t.addForm.module_id=t.currentModuleId,t.addForm.category_id=t.searchForm.category_id,t.addForm.website_id=t.website_id,e.n=1,d["a"].fieldList({module_id:t.currentModuleId,lang:t.lang});case 1:a=e.v,0==a.code&&(t.formObj=[],o=Object.values(a.data),o.forEach((function(e){"checkbox"==e.form_type?t.$set(t.formData,e.table_field,[]):t.$set(t.formData,e.table_field,"");var a=[],o=[];"require"==e.validate_rule?(e.validate_rule=[{required:!0,message:t.$t("此内容为必填内容"),trigger:"blur"}],e.attach_data?(a=e.attach_data.split(","),a.forEach((function(t,e){o.push({label:t,value:e})})),t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",e.validate_rule),"options",e.attach_data?o:[]),"list",[]),"id",e.id))):t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",e.validate_rule),"list",[]),"id",e.id))):"date"==e.validate_rule||"time"==e.validate_rule?(e.validate_rule=[{required:!0,message:t.$t("请选择日期或时间"),trigger:"blur"}],e.attach_data?(a=e.attach_data.split(","),a.forEach((function(t,e){o.push({label:t,value:e})})),t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",e.validate_rule),"options",e.attach_data?o:[]),"list",[]),"id",e.id))):t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",e.validate_rule),"list",[]),"id",e.id))):"email"==e.validate_rule?(e.validate_rule=[{required:!0,message:t.$t("请输入邮箱"),trigger:"blur"}],e.attach_data?(a=e.attach_data.split(","),a.forEach((function(t,e){o.push({label:t,value:e})})),t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",e.validate_rule),"options",e.attach_data?o:[]),"list",[]),"id",e.id))):t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",e.validate_rule),"list",[]),"id",e.id))):"reference"==e.form_type?"has_one"==e.settings.relation||"belongs_to"==e.settings.relation?t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",""==e.validate_rule?[]:e.validate_rule),"options",[]),"list",[]),"id",e.id),"multiple",!1),"relation_file",e.settings.foreign_key)):t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",""==e.validate_rule?[]:e.validate_rule),"options",e.attach_data),"list",[]),"id",e.id),"multiple",!0),"relation_file",e.settings.foreign_key)):(e.validate_rule=[],e.attach_data?(a=e.attach_data.split(","),a.forEach((function(t,e){o.push({label:t,value:e})})),t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",e.validate_rule),"options",e.attach_data?o:[]),"list",[]),"id",e.id))):t.formObj.push(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({},e.form_type,!0),"label",e.form_title),"prop",e.table_field),"rules",e.validate_rule),"list",[]),"id",e.id)))})));case 2:return e.a(2)}}),e)})))()},getData:function(t){t.length>1?this.$message.error(this.$t(this.$t("最多只能选择一张图片"))):("thumbnail"==this.type?(this.addForm.sub_content.thumbnail=t[0].id,this.thumbnailImg=t[0].url):"cover"==this.type&&(this.addForm.sub_content.cover=t[0].id,this.coverImg=t[0].url),this.dialogShow=!1)},openList:function(t){var e=this;this.dialogShow=!0,this.attachmentType=2,this.$nextTick((function(){e.$refs.attachment.getAttachmentList(),e.$refs.attachment.$refs.AttachmentCate.getCateList(0)})),this.type=t},getTemp:function(){var t=this;m["a"].webTempList({website_id:this.siteId,lang:this.lang}).then((function(e){t.themeList=e.data}))},batchUpload:function(){var t=this;return 0==this.searchForm.site_id.length?(this.$message.error(this.$t("站点不能为空")),!1):this.searchForm.site_id.length>1?(this.$message.error(this.$t("只能选择一个站点下的栏目上传内容")),!1):(this.bulkData.category_id=this.searchForm.category_id,this.bulkData.website_id=this.searchForm.site_id[0],this.dialogShow2=!0,void this.$nextTick((function(e){t.$refs.upload.clearFiles()})))},changeDescription:function(t){this.addForm.sub_content.description=t},beforeBulkImport:function(t){var e="text/plain"===t.type;return e||this.$message.error(this.$t("批量上传仅支持txt")),e},bulkChange:function(t){t.length>1&&t.splice(0,1)},bulkImportSuccess:function(t,e){0==t.code&&this.$message.success(t.msg)},getList:function(){var t=this,e={limit:100,page:1,website_id:this.siteId,lang:this.lang};f["a"].tagList(e).then((function(e){t.tagData=e.data}))},getWebList:function(){var t=this;return Object(l["a"])(Object(s["a"])().m((function e(){var a;return Object(s["a"])().w((function(e){while(1)switch(e.n){case 0:return e.n=1,h["a"].websiteList();case 1:a=e.v,t.getTreeData(a.data);case 2:return e.a(2)}}),e)})))()},getTreeData:function(t){var e=this,a=[];function o(t){t.length&&t.forEach((function(t){a.push({id:t.id,domain:0!=t.parent_id?"--".concat(t.domain):t.domain,parent_id:t.parent_id}),t.children.length&&o(t.children)}))}o(t),this.webList=a,this.$nextTick((function(){e.siteId&&(e.searchForm.site_id=[+e.siteId]),e.getColumnList()}))},webChange:function(t){this.searchForm.site_id=t,this.searchForm.category_id=[],this.searchForm.subColumnId=[],this.getColumnList()},onSubmit:function(){var t=this,e=arguments.length>1?arguments[1]:void 0;this.addForm.sub_content=Object(c["a"])(Object(c["a"])({},this.addForm.sub_content),{},{content:this.getTin(),category_id:this.searchForm.category_id,sub_category_ids:this.searchForm.subColumnId.join(",")});var a=this.$refs.PublicForm.$refs.myTinymce;a&&a.forEach((function(e){t.formData[e.prop]=e.codeValue})),this.$refs.form.validate((function(a){if(a){var o={module_id:t.currentModuleId,category_id:[t.searchForm.category_id].concat(Object(n["a"])(t.searchForm.subColumnId)),lang:t.lang,main_content:t.formData,sub_content:t.addForm.sub_content};t.loading=!0,u["a"].contentSave(o).then((function(a){0==a.code&&(t.$message.success(a.msg),e?t.reload():t.prev()),t.loading=!1})),t.loading=!1}else t.$message.warning(t.$t("请填写必要信息"))}))},getTin:function(){var t=this.$refs.myTinymce.codeValue;return t},prev:function(){this.is_customContent?this.$router.push("/content/index/"+this.$route.query.category_id):this.$router.push({name:"Content",query:{category_id:this.searchForm.category_id,lang:this.lang}})}}},_=g,v=(a("a148"),a("a1b9"),a("2877")),y=Object(v["a"])(_,o,i,!1,null,"e75a02de",null);e["default"]=y.exports},d28d:function(t,e,a){"use strict";var o=a("365c");function i(t){var e="/tag/backendIndex";return o["a"].get(e,t)}function n(t){var e="/tag/save";return o["a"].post(e,t)}function r(t){var e="/tag/update";return o["a"].post(e,t)}function s(t){var e="/tag/delete";return o["a"].post(e,t)}e["a"]={tagList:i,tagSave:n,tagUpdate:r,tagDelete:s}},e2be:function(t,e,a){"use strict";a.r(e);a("a4d3"),a("e01a"),a("b0c0");var o=function(){var t=this,e=t._self._c;return e("el-form",{ref:"ruleForm",staticClass:"flexForm",attrs:{model:t.formData,"label-position":"top"}},[e("ContentAttachment",{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}}),t._l(t.formObj,(function(a,o){return e("div",{directives:[{name:"show",rawName:"v-show",value:!a.notShow,expression:"!formobj.notShow"}],key:o,staticClass:"form-item"},[e("el-form-item",{attrs:{label:a.label,prop:a.prop,rules:a.rules}},[a.input?e("el-input",{attrs:{size:"small",placeholder:a.placeholder},on:{input:function(e){return t.inputINPUT(e,o,a.prop)},change:function(e){return t.inputChange(e,o,a.prop)}},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}}):t._e(),a.textarea?e("el-input",{attrs:{size:"small",type:"textarea",placeholder:a.placeholder},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}}):t._e(),a.reference?e("el-select",{attrs:{filterable:"","remote-method":function(e){return t.remoteMethod(e,a.id,a)},loading:t.loading,remote:!0,size:"small",placeholder:a.placeholder,multiple:a.multiple},on:{focus:function(e){return t.selectFocus(e,a.id,a)}},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}},t._l(a.options,(function(t,o){return e("el-option",{key:o,attrs:{label:t.hc_relation_key,value:t[a.relation_file]}})})),1):t._e(),a.select?e("el-select",{attrs:{size:"small",placeholder:a.placeholder},on:{change:function(e){return t.selectChange(e,o,a.prop)}},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}},t._l(a.options,(function(t,a){return e("el-option",{key:a,attrs:{label:t.label,value:t.label}})})),1):t._e(),a.multiSelect?e("el-select",{attrs:{size:"small",multiple:"",placeholder:a.placeholder},on:{change:function(e){return t.selectChange(e,o,a.prop)}},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}},t._l(a.options,(function(t,a){return e("el-option",{key:a,attrs:{label:t.label,value:t.label+""}})})),1):t._e(),a.date?e("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",size:"small",placeholder:a.placeholder},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}}):t._e(),a.time?e("el-time-picker",{attrs:{"value-format":"HH:mm:ss",format:"HH:mm:ss",size:"small",placeholder:a.placeholder},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}}):t._e(),a.datetime?e("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetime",size:"small",placeholder:a.placeholder},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}}):t._e(),a.dateTimeRange?e("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss",size:"small",type:"datetimerange","range-separator":t.$t("至"),"start-placeholder":t.$t("开始日期"),"end-placeholder":t.$t("结束日期")},on:{change:function(e){return t.chooseTime(e,a.prop)}},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}}):t._e(),a.switch?e("el-switch",{attrs:{size:"small","active-value":a.options[0].label,"inactive-value":a.options[1].label,"active-text":a.options[0].label,"inactive-text":a.options[1].label,"active-color":"var(--huocms-com-color-primary)","inactive-color":"rgba(0,0,0,0.2)"},on:{change:function(e){return t.formSwitchChange(e,o,a.prop)}},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}}):t._e(),a.radio?e("el-radio-group",{model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}},t._l(a.options,(function(t,a){return e("el-radio",{key:a,attrs:{label:t.label,value:t.value}})})),1):t._e(),a.checkbox?e("el-checkbox-group",{on:{change:function(e){return t.changeCheck(e,o,a.prop)}},model:{value:t.formData[a.prop],callback:function(e){t.$set(t.formData,a.prop,e)},expression:"formData[formobj.prop]"}},t._l(a.options,(function(t,a){return e("el-checkbox",{key:a,attrs:{label:t.label}})})),1):t._e(),a.image?e("div",{staticClass:"upload"},[e("div",{staticClass:"attachment_imgBox",on:{click:function(e){return t.openAttList(a.prop,a)}}},[t.formData[a.prop]?e("img",{staticClass:"attachmentImg",attrs:{src:a.IMGURL}}):t._e(),t.formData[a.prop]?e("div",{staticClass:"delete-box"},[e("i",{staticClass:"el-icon-delete",on:{click:function(e){return e.stopPropagation(),t.handleDeleteImg(a.prop)}}})]):e("i",{staticClass:"el-icon-camera"})])]):t._e(),a.multiImage?e("div",{staticClass:"attachmentBtn"},[t.formData[a.prop]?e("div",{staticClass:"multiBox"},[e("draggable",{attrs:{list:a.list},on:{end:function(e){return t.handleEnd(a.prop,a.list)}}},t._l(a.list,(function(o,i){return e("div",{key:i,staticClass:"multiBoxItem"},[e("img",{staticClass:"attachmentImg",attrs:{src:o.url}}),e("el-input",{attrs:{size:"mini",placeholder:t.$t("描述")},on:{change:function(e){return t.changeDesc(o)}},model:{value:o.description,callback:function(e){t.$set(o,"description",e)},expression:"item.description"}}),e("i",{staticClass:"el-icon-circle-close",attrs:{type:"text"},on:{click:function(e){return t.delMultiImg(a.prop,a,o.id,i)}}})],1)})),0)],1):t._e(),e("div",{staticClass:"attachment_imgBox",on:{click:function(e){return t.openAttList(a.prop,a)}}},[e("i",{staticClass:"el-icon-camera"})])]):t._e(),a.contentGroup?e("div",{staticClass:"attachmentBtn content-group"},[t.formData[a.prop]?e("div",{staticClass:"multi-img-text"},[e("draggable",{attrs:{list:a.list},on:{end:function(e){return t.handleEnd(a.prop,a.list)}}},t._l(a.list,(function(o,i){return e("div",{key:i,staticClass:"multiBoxItem"},[e("div",{staticClass:"img-box",on:{click:function(e){return t.openAttList(a.prop,a,"single",i)}}},[e("img",{directives:[{name:"show",rawName:"v-show",value:o.url,expression:"item.url"}],staticClass:"attachmentImg",attrs:{src:o.url}}),o.url?t._e():e("i",{staticClass:"el-icon-camera"}),o.url?e("div",{staticClass:"delete-box"},[e("i",{staticClass:"el-icon-delete",on:{click:function(e){return e.stopPropagation(),t.handleDeleteMultiImg(o,a.prop,a.list)}}})]):t._e()]),e("div",{staticClass:"title-desc"},[e("el-input",{staticClass:"title-input",attrs:{size:"mini",placeholder:t.$t("标题")},on:{blur:function(e){return t.changeTitle(o,a.prop,a.list)}},model:{value:o.title,callback:function(e){t.$set(o,"title",e)},expression:"item.title"}}),e("ScEditor",{ref:"scEditor",refInFor:!0,attrs:{"show-btn":!1},on:{update:function(e){return t.updateEditor(e,o)},onClick:function(e){return t.changeDescription(o,a.prop,a.list)}},model:{value:o.description,callback:function(e){t.$set(o,"description",e)},expression:"item.description"}})],1),e("i",{staticClass:"el-icon-circle-close",attrs:{type:"text"},on:{click:function(e){return t.delContentGroup(a.prop,a,o.id,i)}}})])})),0)],1):t._e(),e("div",{staticClass:"attachment_imgBox",on:{click:function(e){return t.handleAddContentGroup(a.prop,a)}}},[e("i",{staticClass:"el-icon-plus"})])]):t._e(),a.video?e("div",{staticClass:"attachmentBtn"},[t.formData[a.prop]?e("div",{staticClass:"file-box"},[e("span",{staticClass:"file-name",on:{click:function(e){return t.handleDownloadFile(a)}}},[t._v(" "+t._s(a.name)+" ")]),e("i",{staticClass:"iconfont icon-shanchu",on:{click:function(e){return t.handleDeleteFile(a.prop)}}})]):t._e(),e("div",{staticStyle:{display:"inline-block"},on:{click:function(e){return t.openAttList(a.prop,a)}}},[t.formData[a.prop]?e("el-button",{staticClass:"blue",attrs:{type:"primary",size:"mini"}},[t._v(" "+t._s(t.$t("替换附件"))+" ")]):e("div",{staticClass:"attachment_imgBox"},[e("i",{staticClass:"el-icon-video-camera-solid"})])],1)]):t._e(),a.file?e("div",{staticClass:"attachmentBtn"},[t.formData[a.prop]?e("div",{staticClass:"file-box"},[e("span",{staticClass:"file-name",on:{click:function(e){return t.handleDownloadFile(a)}}},[t._v(" "+t._s(a.name)+" ")]),e("i",{staticClass:"iconfont icon-shanchu",on:{click:function(e){return t.handleDeleteFile(a.prop)}}})]):t._e(),e("div",{staticStyle:{display:"inline-block"},on:{click:function(e){return t.openAttList(a.prop,a)}}},[t.formData[a.prop]?e("el-button",{staticClass:"blue",attrs:{type:"primary",size:"mini"}},[t._v(" "+t._s(t.$t("替换附件"))+" ")]):e("div",{staticClass:"attachment_imgBox"},[e("i",{staticClass:"el-icon-document"})])],1)]):t._e(),a.multiVideo?e("div",{staticClass:"attachmentBtn"},[t.formData[a.prop]?e("div",{staticClass:"multiBox"},[e("draggable",{attrs:{list:a.list},on:{end:function(e){return t.handleEnd(a.prop,a.list)}}},t._l(a.list,(function(o,i){return e("div",{key:i,staticClass:"multi-file-box"},[e("div",{staticClass:"multiBoxItem multi-file"},[e("i",{staticClass:"el-icon-circle-close",attrs:{type:"text"},on:{click:function(e){return t.delMultiImg(a.prop,a,o.id,i)}}}),e("i",{staticClass:"el-icon-video-camera-solid"})]),e("p",{staticClass:"fileName",on:{click:function(e){return t.handleDownloadFile(a,i)}}},[t._v(" "+t._s(o.name)+" ")])])})),0)],1):t._e(),e("div",{staticClass:"attachment_imgBox",on:{click:function(e){return t.openAttList(a.prop,a)}}},[e("i",{staticClass:"el-icon-video-camera-solid"})])]):t._e(),a.multiFile?e("div",{staticClass:"attachmentBtn"},[t.formData[a.prop]?e("div",{staticClass:"multiBox"},[e("draggable",{attrs:{list:a.list},on:{end:function(e){return t.handleEnd(a.prop,a.list)}}},t._l(a.list,(function(o,i){return e("div",{key:i,staticClass:"multi-file-box"},[e("div",{staticClass:"multiBoxItem multi-file"},[e("i",{staticClass:"el-icon-circle-close",attrs:{type:"text"},on:{click:function(e){return t.delMultiImg(a.prop,a,o.id,i)}}}),e("i",{staticClass:"el-icon-tickets"})]),e("p",{staticClass:"fileName",on:{click:function(e){return t.handleDownloadFile(a,i)}}},[t._v(" "+t._s(o.name)+" ")])])})),0)],1):t._e(),e("div",{staticClass:"attachment_imgBox",on:{click:function(e){return t.openAttList(a.prop,a)}}},[e("i",{staticClass:"el-icon-document"})])]):t._e(),a.richText?e("div",{ref:a.prop,refInFor:!0},[e("div",[e("MyTinymce",{ref:"myTinymce",refInFor:!0,attrs:{prop:a.prop,"tinymce-html":t.content},on:{onClick:function(e){return t.input(a.prop)}}})],1)]):t._e()],1)],1)}))],2)},i=[],n=a("c14f"),r=a("1da1"),s=(a("c740"),a("d81d"),a("14d9"),a("a434"),a("e9f5"),a("7d54"),a("ab43"),a("d3b7"),a("25f0"),a("159b"),a("33fc")),l=a("1980"),c=a.n(l),u=a("816b"),d={components:{draggable:c.a},props:{formObj:{type:Array,required:!0},formData:{type:Object,required:!0}},data:function(){var t=this.$store.state.user.uploadFileUrl;return{loading:!1,is_one:!0,attachmentType:"",attachmentTotal:"",infiniteScroll:!1,attachmentLimit:10,dialogShow:!1,attachmentData:[],imagelist:[],content:"",text:[],tindata:"",myHeaders:{Authorization:"Bearer ".concat(this.$store.getters.token)},headers:{},imageUrl:"",imgUrl:this.$store.getters.updateURL,uploadUrl:t,image:"",images:"",dialogImageUrl:"",searchSelectLoading:!1,dialogVisible:!1,disabled:!1,uploadTitle:"",videos:[],text2:[],text3:[],tinType:"",prop:"",uploadType:"",content_group_index:""}},watch:{},created:function(){},methods:{selectFocus:function(t,e,a){var o=this;return Object(r["a"])(Object(n["a"])().m((function t(){var i;return Object(n["a"])().w((function(t){while(1)switch(t.n){case 0:return o.loading=!0,t.n=1,u["a"].relationValueList({id:e});case 1:i=t.v,0==i.code&&(a.options=i.data,o.loading=!1);case 2:return t.a(2)}}),t)})))()},remoteMethod:function(t,e,a){var o=this;this.loading=!0,u["a"].relationValueList({id:e,search:t}).then((function(t){0==t.code&&(a.options=t.data,o.loading=!1)}))},updateEditor:function(t,e){e.description=t},handleDownloadFile:function(t){window.open(t.IMGURL)},handleEnd:function(t,e){this.formData[t]=e.map((function(t){return t.id}))},changeDesc:function(t){return Object(r["a"])(Object(n["a"])().m((function e(){return Object(n["a"])().w((function(e){while(1)switch(e.n){case 0:return e.n=1,s["a"].attachmentUpdate(t);case 1:e.v;case 2:return e.a(2)}}),e)})))()},changeTitle:function(t,e,a){this.formData[e]=a},changeDescription:function(t,e,a){this.formData[e]=a},delContentGroup:function(t,e,a,o){this.formData[t].splice(o,1),this.secondData[t].splice(o,1),e.list.splice(o,1)},handleDeleteMultiImg:function(t,e,a){t.img="",t.url="",this.$forceUpdate()},handleAddContentGroup:function(t,e){var a=this;this.formObj.forEach((function(e){if(e.prop==t){a.formData[t].length<1&&(a.formData[t]=[]);var o={url:"",title:"",description:"",img:""};e.list.push(o)}}))},getData:function(t){var e=this;if(t.length>1&&this.is_one)this.$message.error(this.$t("最多只能选择一张图片"));else{if("image"==this.uploadType)this.formObj.forEach((function(a){a.prop==e.prop&&(a.IMGURL=t[0].url)})),this.formData[this.prop]=t[0].id;else if("multiImage"==this.uploadType)this.formObj.forEach((function(a){a.prop==e.prop&&(e.formData[e.prop].length<1&&(e.formData[e.prop]=[]),t.forEach((function(t){var o=t.id,i={name:t.name,url:t.url,description:t.description,id:t.id};e.formData[e.prop].push(o),a.list.push(i)})))}));else if("video"==this.uploadType)this.formObj.forEach((function(a){a.prop==e.prop&&(a.IMGURL=t[0].url,a.name=t[0].name)})),this.formData[this.prop]=t[0].id;else if("file"==this.uploadType)this.formObj.forEach((function(a){a.prop==e.prop&&(a.IMGURL=t[0].url,a.name=t[0].name)})),this.formData[this.prop]=t[0].id;else if("multiVideo"==this.uploadType)this.formObj.forEach((function(a){a.prop==e.prop&&(e.formData[e.prop].length<1&&(e.formData[e.prop]=[]),t.forEach((function(t){var o=t.id,i={name:t.name,description:t.description,url:t.url,id:t.id};e.formData[e.prop].push(o),a.list.push(i)})))}));else if("multiFile"==this.uploadType)this.formObj.forEach((function(a){a.prop==e.prop&&(e.formData[e.prop].length<1&&(e.formData[e.prop]=[]),t.forEach((function(t){var o=t.id,i={name:t.name,url:t.url,description:t.description,id:t.id};e.formData[e.prop].push(o),a.list.push(i)})))}));else if("contentGroup"==this.uploadType)if(this.is_one){var a={url:t[0].url,img:t[0].id};this.formObj.forEach((function(t){t.prop==e.prop&&(e.$set(t.list[e.content_group_index],"url",a.url),e.$set(t.list[e.content_group_index],"img",a.img))}))}else this.formObj.forEach((function(a){a.prop==e.prop&&(e.formData[e.prop].length<1&&(e.formData[e.prop]=[]),t.forEach((function(t){var o={url:t.url,title:t.name,description:t.description,img:t.id};e.formData[e.prop].push(o),a.list.push(o)})))}));this.dialogShow=!1}},delMultiImg:function(t,e,a,o){e.list.splice(o,1),this.formData[t].splice(o,1)},openAttList:function(t,e,a,o){this.content_group_index=null,e.image||e.multiImage||e.contentGroup?(this.attachmentType=2,e.image?this.uploadType="image":e.multiImage?(this.uploadType="multiImage",this.is_one=!1):(this.uploadType="contentGroup","single"==a?(this.is_one=!0,this.content_group_index=o):this.is_one=!1)):e.multiVideo||e.video?(this.attachmentType=3,e.video?this.uploadType="video":(this.uploadType="multiVideo",this.is_one=!1)):(this.attachmentType=0,e.file?this.uploadType="file":(this.uploadType="multiFile",this.is_one=!1)),this.dialogShow=!0,this.prop=t},handleDeleteFile:function(t){this.formData[t]=""},handleDeleteImg:function(t){this.formData[t]=""},input:function(t){this.tinType=t},changeCheck:function(t,e,a){this.formData[a]=t},chooseTime:function(t,e){this.formData[e]=t},selectChange:function(t,e,a){this.formData[a]=t},inputINPUT:function(t,e,a){this.$emit("inputINPUT",t,e,a)},inputChange:function(t,e,a){this.$emit("inputChange",t,e,a)},formSwitchChange:function(t,e,a){this.$emit("formSwitchChange",t,e,a)},buttonClick:function(t,e){this.$emit("buttonClick",t,e)},getTin:function(t){if(this.$refs.myTinymce){var e=this.$refs.myTinymce[0].codeValue;return this.formData[this.tinType]=e,e}},setTin:function(t){this.$refs.tin.setContent(t)},changeImages:function(t,e){},uploadSuccess:function(t,e,a,o){if(0==e.code){var i=[];o.forEach((function(t){t.response?i.push(t.response.data.id):i.push(t.id)})),this.formData[t]=i}},removeSuccess:function(t,e,a,o){var i=[];a.length>0?(a.forEach((function(t){i.push(t.response.data.id)})),this.formData[t]=i.toString()):this.formData[t]=""},handleRemove:function(t,e,a,o,i){this.formObj[i].uploadObj.hideUpload=e.length==a,this.pushUpload(t,e,a,o)},handlePictureCardPreview:function(t){this.dialogImageUrl=t.url,this.dialogVisible=!0},submitForm:function(){var t=this,e=Boolean;return this.$refs.ruleForm.validate((function(a){a?e=!0:(t.$message.warning(t.$t("请把信息填写完整")),e=!1)})),e},resetForm:function(t){var e=this;if(this.$refs.ruleForm.resetFields(),t)for(var a=function(a){e.$refs[t[a]][0].clearFiles();var o=e.formObj.findIndex((function(e){return e.prop==t[a]}));e.formObj[o].uploadObj.hideUpload=!1},o=0;o<t.length;o++)a(o)},validateFieldProp:function(t){var e=Boolean;return this.$refs.ruleForm.validateField(t,(function(t){e=!t})),e},pushUpload:function(t,e,a,o){a.length}}},m=d,p=(a("a89e"),a("b41e"),a("2877")),f=Object(p["a"])(m,o,i,!1,null,"be22b16e",null);e["default"]=f.exports}}]);