|
|
|
|
webpackJsonp([14],{1048:function(e,t,n){"use strict";t.__esModule=!0;var r=h(n(36)),i=n(123),o=n(807),a=n(983),s=h(n(682)),l=h(n(224)),c=h(n(646)),u=h(n(670)),d=h(n(654)),f=h(n(650));function h(e){return e&&e.__esModule?e:{default:e}}var p=void 0;t.default={name:"resource-list-create-FILE",data:function(){return{suffix:"sh",fileName:"",desc:"",fileTypeList:o.filtTypeArr,content:"",spinnerLoading:!1}},props:{},methods:Object.assign({},(0,i.mapActions)("resource",["createResourceFile"]),{ok:function(){var e=this;this._validation()&&(this.spinnerLoading=!0,this.createResourceFile({type:"FILE",fileName:this.fileName,suffix:this.suffix,desc:this.desc,content:p.getValue()}).then(function(t){e.$message.success(t.msg),setTimeout(function(){e.spinnerLoading=!1,e.$router.push({name:"file"})},800)}).catch(function(t){e.$message.error(t.msg||""),e.spinnerLoading=!1}))},_validation:function(){return this.fileName?!!p.getValue()||(this.$message.warning(""+r.default.$t("请输入资源内容")),!1):(this.$message.warning(""+r.default.$t("请输入资源名称")),!1)},_handlerEditor:function(){p=(0,s.default)("code-create-mirror",{mode:"shell",readOnly:!1}),this.keypress=function(){p.getOption("readOnly")||p.showHint({completeSingle:!1})},p.on("keypress",this.keypress)},_onChange:function(e){p.setOption("mode",a.handlerSuffix["."+e.label])}}),watch:{},created:function(){},mounted:function(){this._handlerEditor()},destroyed:function(){p.toTextArea(),p.off($(".code-create-mirror"),"keypress",this.keypress)},computed:{},components:{mSecondaryMenu:d.default,mListConstruction:f.default,mConditions:u.default,mSpin:c.default,mListBoxF:l.default}}},1161:function(e,t,n){var r=n(1162);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(35)("30474df2",r,!0,{})},1162:function(e,t,n){(e.exports=n(34)(!1)).push([e.i,".resource-create-model{padding:30px}.CodeMirror{border:1px solid #dddedd;border-radius:3px}",""])},1163:function(e,t,n){"use strict";var r={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"main-layout-box"},[n("m-secondary-menu",{attrs:{type:"resource"}}),e._v(" "),n("m-list-construction",{attrs:{title:e.$t("创建文件")}},[n("template",{slot:"content"},[n("div",{staticClass:"resource-create-model"},[n("m-list-box-f",[n("template",{slot:"name"},[n("b",[e._v("*")]),e._v(e._s(e.$t("文件名称")))]),e._v(" "),n("template",{slot:"content"},[n("x-input",{staticStyle:{width:"300px"},attrs:{type:"input",placeholder:e.$t("请输入name"),autocomplete:"off"},model:{value:e.fileName,callback:function(t){e.fileName=t},expression:"fileName"}})],1)],2),e._v(" "),n("m-list-box-f",[n("template",{slot:"name"},[n("b",[e._v("*")]),e._v(e._s(e.$t("文件格式")))]),e._v(" "),n("template",{slot:"content"},[n("x-select",{staticStyle:{width:"100px"},on:{"on-change":e._onChange},model:{value:e.suffix,callback:function(t){e.suffix=t},expression:"suffix"}},e._l(e.fileTypeList,function(e){return n("x-option",{key:e,attrs:{value:e,label:e}})}),1)],1)],2),e._v(" "),n("m-list-box-f",[n("template",{slot:"name"},[e._v(e._s(e.$t("描述")))]),e._v(" "),n("template",{slot:"content"},[n("x-input",{staticStyle:{width:"430px"},attrs:{type:"textarea",placeholder:e.$t("请输入desc"),autocomplete:"off"},model:{value:e.desc,callback:function(t){e.desc=t},expression:"desc"}})],1)],2),e._v(" "),n("m-list-box-f",[n("template",{slot:"name"},[n("b",[e._v("*")]),e._v(e._s(e.$t("文件内容")))]),e._v(" "),n("template",{slot:"content"},[n("textarea",{attrs:{id:"code-create-mirror",name:"code-create-mirror"}})])],2),e._v(" "),n("m-list-box-f",[n("template",{slot:"name"},[e._v(" ")]),e._v(" "),n("template",{slot:"content"},[n("div",{staticClass:"submit"},[n("x-button",{directives:[{name:"ps",rawName:"v-ps",value:["GENERAL_USER"],expression:"['GENERAL_USER']"}],attrs:{type:"primary",shape:"circle",loading:e.spinnerLoading},on:{click:function(t){return e.ok()}}},[e._v(e._s(e.spinnerLoading?"Loading...":e.$t("确认创建"))+" ")]),e._v(" "),n("x-button",{attrs:{type:"text"},on:{click:function(){return e.$router.push(
|