chunk-eabcb0f8.2c777286.js 10 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-eabcb0f8"],{7879:function(e,t,a){},"803d":function(e,t,a){"use strict";a("7879")},"9bb4":function(e,t,a){"use strict";var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"kindeditor"},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:e.outContent,expression:"outContent"}],attrs:{id:e.id,name:"content"},domProps:{value:e.outContent},on:{input:function(t){t.target.composing||(e.outContent=t.target.value)}}})])},l=[],n=(a("a9e3"),a("c7ea"),a("8187"),a("475d"),{name:"kindeditor",data:function(){return{editor:null,outContent:this.content}},props:{content:{type:String,default:""},id:{type:String,required:!0},width:{type:String},height:{type:String},minWidth:{type:Number,default:650},minHeight:{type:Number,default:100},items:{type:Array,default:function(){return["undo","redo","|","preview","print","cut","copy","paste","plainpaste","wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","clearhtml","quickformat","selectall","|","fullscreen","/","formatblock","fontname","fontsize","|","forecolor","hilitecolor","bold","italic","underline","strikethrough","lineheight","removeformat"]}},noDisableItems:{type:Array,default:function(){return["source","fullscreen"]}},filterMode:{type:Boolean,default:!0},htmlTags:{type:Object,default:function(){return{font:["color","size","face",".background-color"],span:["style"],div:["class","align","style"],table:["class","border","cellspacing","cellpadding","width","height","align","style"],"td,th":["class","align","valign","width","height","colspan","rowspan","bgcolor","style"],a:["class","href","target","name","style"],embed:["src","width","height","type","loop","autostart","quality","style","align","allowscriptaccess","/"],img:["src","width","height","border","alt","title","align","style","/"],hr:["class","/"],br:["/"],"p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6":["align","style"],"tbody,tr,strong,b,sub,sup,em,i,u,strike":[]}}},wellFormatMode:{type:Boolean,default:!0},resizeType:{type:Number,default:2},themeType:{type:String,default:"default"},langType:{type:String,default:"zh-CN"},designMode:{type:Boolean,default:!0},fullscreenMode:{type:Boolean,default:!1},basePath:{type:String},themesPath:{type:String},pluginsPath:{type:String,default:""},langPath:{type:String},minChangeSize:{type:Number,default:5},loadStyleMode:{type:Boolean,default:!0},urlType:{type:String,default:""},newlineTag:{type:String,default:"p"},pasteType:{type:Number,default:2},dialogAlignType:{type:String,default:"page"},shadowMode:{type:Boolean,default:!0},zIndex:{type:Number,default:811213},useContextmenu:{type:Boolean,default:!0},syncType:{type:String,default:"form"},indentChar:{type:String,default:"\t"},cssPath:{type:[String,Array]},cssData:{type:String},bodyClass:{type:String,default:"ke-content"},colorTable:{type:Array},afterCreate:{type:Function},afterChange:{type:Function},afterTab:{type:Function},afterFocus:{type:Function},afterBlur:{type:Function},afterUpload:{type:Function},uploadJson:{type:String},fileManagerJson:{type:Function},allowPreviewEmoticons:{type:Boolean,default:!0},allowImageUpload:{type:Boolean,default:!0},allowFlashUpload:{type:Boolean,default:!0},allowMediaUpload:{type:Boolean,default:!0},allowFileUpload:{type:Boolean,default:!0},allowFileManager:{type:Boolean,default:!1},fontSizeTable:{type:Array,default:function(){return["9px","10px","12px","14px","16px","18px","24px","32px"]}},imageTabIndex:{type:Number,default:0},formatUploadUrl:{type:Boolean,default:!0},fullscreenShortcut:{type:Boolean,default:!1},extraFileUploadParams:{type:Array,default:function(){return[]}},filePostName:{type:String,default:"imgFile"},fillDescAfterUploadImage:{type:Boolean,default:!1},afterSelectFile:{type:Function},pagebreakHtml:{type:String,default:"<hr style=”page-break-after: always;” class=”ke-pagebreak” />"},allowImageRemote:{type:Boolean,default:!0},autoHeightMode:{type:Boolean,default:!1},fixToolBar:{type:Boolean,default:!1},tabIndex:{type:Number}},watch:{content:function(e){this.editor&&e!==this.outContent&&this.editor.html(e)},outContent:function(e){this.$emit("update:content",e),this.$emit("on-content-change",e)}},mounted:function(){var e=this;e.editor=window.KindEditor.create("#"+this.id,{width:e.width,height:e.height,minWidth:e.minWidth,minHeight:e.minHeight,items:e.items,noDisableItems:e.noDisableItems,filterMode:e.filterMode,htmlTags:e.htmlTags,wellFormatMode:e.wellFormatMode,resizeType:e.resizeType,themeType:e.themeType,langType:e.langType,designMode:e.designMode,fullscreenMode:e.fullscreenMode,basePath:e.basePath,themesPath:e.cssPath,pluginsPath:e.pluginsPath,langPath:e.langPath,minChangeSize:e.minChangeSize,loadStyleMode:e.loadStyleMode,urlType:e.urlType,newlineTag:e.newlineTag,pasteType:e.pasteType,dialogAlignType:e.dialogAlignType,shadowMode:e.shadowMode,zIndex:e.zIndex,useContextmenu:e.useContextmenu,syncType:e.syncType,indentChar:e.indentChar,cssPath:e.cssPath,cssData:e.cssData,bodyClass:e.bodyClass,colorTable:e.colorTable,afterCreate:e.afterCreate,afterChange:function(){e.afterChange,e.outContent=this.html()},afterTab:e.afterTab,afterFocus:e.afterFocus,afterBlur:e.afterBlur,afterUpload:e.afterUpload,uploadJson:e.uploadJson,fileManagerJson:e.fileManagerJson,allowPreviewEmoticons:e.allowPreviewEmoticons,allowImageUpload:e.allowImageUpload,allowFlashUpload:e.allowFlashUpload,allowMediaUpload:e.allowMediaUpload,allowFileUpload:e.allowFileUpload,allowFileManager:e.allowFileManager,fontSizeTable:e.fontSizeTable,imageTabIndex:e.imageTabIndex,formatUploadUrl:e.formatUploadUrl,fullscreenShortcut:e.fullscreenShortcut,extraFileUploadParams:e.extraFileUploadParams,filePostName:e.filePostName,fillDescAfterUploadImage:e.fillDescAfterUploadImage,afterSelectFile:e.afterSelectFile,pagebreakHtml:e.pagebreakHtml,allowImageRemote:e.allowImageRemote,autoHeightMode:e.autoHeightMode,fixToolBar:e.fixToolBar,tabIndex:e.tabIndex})}}),r=n,i=a("2877"),s=Object(i["a"])(r,o,l,!1,null,null,null);t["a"]=s.exports},e91d:function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.addProtocolTypeDialog?a("el-dialog",{attrs:{title:e.addProtocolTypeTitle,visible:e.addProtocolTypeDialog,width:"800px","close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){e.addProtocolTypeDialog=t},close:e.cancel}},[a("el-form",{ref:"ruleForm",staticStyle:{"margin-bottom":"15px"},attrs:{model:e.ruleForm,rules:e.rules,inline:""}},[a("el-form-item",{attrs:{label:"模版类型:"}},[e._v(" "+e._s(e.treeName)+" ")]),a("el-form-item",{staticStyle:{"margin-left":"30px"},attrs:{label:"模版名称:",prop:"protocolTemplateName"}},[a("el-input",{model:{value:e.ruleForm.protocolTemplateName,callback:function(t){e.$set(e.ruleForm,"protocolTemplateName",t)},expression:"ruleForm.protocolTemplateName"}})],1),a("el-form-item",{staticStyle:{"margin-left":"30px"},attrs:{label:"状态:",prop:"status"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:e.ruleForm.status,callback:function(t){e.$set(e.ruleForm,"status",t)},expression:"ruleForm.status"}})],1)],1),a("div",{staticStyle:{"max-height":"65vh",overflow:"auto"}},[a("editor",{attrs:{id:"editor_id",height:"500px",content:e.ruleForm.protocolTemplateContent,loadStyleMode:!1},on:{"update:content":function(t){return e.$set(e.ruleForm,"protocolTemplateContent",t)},"on-content-change":e.onContentChange}})],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancel}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)],1):e._e()],1)},l=[],n=a("c7eb"),r=a("1da1"),i=(a("ac1f"),a("5319"),a("5873")),s=a("943d"),u=a("bc3a"),d=a.n(u),p=a("9bb4"),c={name:"AddProtocolTypeDialog",components:{VueEditor:i["a"],editor:p["a"]},props:{listInId:{type:String,default:""},treeName:{type:String,default:""},editTable:{type:Object,default:{}},addProtocolTypeTitle:{type:String,default:""}},computed:{editorStyle:function(){var e={};for(var t in this.editorClass){var a=t.replace(/([A-Z])/g,(function(e){return"-".concat(e.toLowerCase())}));e[a]=this.editorClass[t]}return e}},watch:{editTable:function(e){this.ruleForm=e}},data:function(){return{editorText:"直接初始化值",editorTextCopy:"",addProtocolTypeDialog:!1,diagnosisTypeTemplateList:[],ruleForm:{protocolTemplateName:"",status:1,protocolTemplateContent:""},rules:{protocolTemplateName:[{required:!0,message:"请输入模版名称",trigger:"blur"}]}}},mounted:function(){var e=this;this.$nextTick((function(){console.log(e.ruleForm,"this.ruleForm"),e.ruleForm=e.editTable}))},methods:{cancel:function(){this.addProtocolTypeDialog=!1},onContentChange:function(e){this.ruleForm.protocolTemplateContent=e},submit:function(){var e=this;return Object(r["a"])(Object(n["a"])().mark((function t(){var a,o;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("新建"!==e.addProtocolTypeTitle){t.next=11;break}return e.ruleForm.protocolType=e.listInId,t.next=4,Object(s["Qb"])(e.ruleForm);case 4:if(a=t.sent,200===a.code){t.next=7;break}return t.abrupt("return",e.$message.error(a.msg));case 7:e.ruleForm={protocolTemplateName:"",status:1,protocolTemplateContent:""},e.$message.success("新建成功!"),t.next=19;break;case 11:return e.ruleForm.protocolType=e.listInId,t.next=14,Object(s["Tb"])(e.ruleForm);case 14:if(o=t.sent,200===o.code){t.next=17;break}return t.abrupt("return",e.$message.error(o.msg));case 17:e.ruleForm={protocolTemplateName:"",status:1,protocolTemplateContent:""},e.$message.success("编辑成功!");case 19:e.$parent.initList(),e.addProtocolTypeDialog=!1;case 21:case"end":return t.stop()}}),t)})))()},handleImageAdded:function(e,t,a,o){var l=new FormData;l.append("image",e),d()({url:"https://fakeapi.yoursite.com/images",method:"POST",data:l}).then((function(e){var l=e.data.url;t.insertEmbed(a,"image",l),o()})).catch((function(e){console.log(e)}))}}},m=c,f=(a("803d"),a("2877")),g=Object(f["a"])(m,o,l,!1,null,"5e494dab",null);t["default"]=g.exports}}]);