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 line
11 KiB
1 line
11 KiB
1 year ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-510bdcef"],{"1c70":function(t,e,i){},"448b":function(t,e,i){"use strict";i.r(e),i("b0c0");var n=i("c7eb"),o=i("1da1"),a=i("5530"),s=(i("14d9"),i("a434"),i("d81d"),i("d3b7"),i("159b"),i("a9e3"),i("2f62")),r=i("a9e7"),d=i("c2c6"),c=i("c276"),l=i("d708");a={data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},formValidate:{page:1,limit:20,title:""},styles:{height:"calc(100% - 55px)",overflow:"auto",paddingBottom:"53px",position:"static"},loading:!1,pwdModal:!1,buildModals:!1,pwd:"",tabList:[],codeBuildList:[],total:0,columns1:[{title:"ID",key:"id",width:80},{title:"菜单名",key:"name",minWidth:130},{title:"表名",key:"table_name",minWidth:130},{title:"字符集",key:"table_collation",minWidth:130},{title:"表备注",key:"table_comment",minWidth:130},{title:"添加时间",key:"add_time",minWidth:130},{title:"操作",slot:"action",fixed:"right",minWidth:150}],FromData:null,titleFrom:"",groupId:0,addId:"",editorList:[],indexEditor:0,code:"",contextData:null,fileType:"",className:"",spinShow:!1,modals:!1,editor:"",editorIndex:[],title:"",editId:0}},computed:Object(a.a)(Object(a.a)({},Object(s.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.getList()},beforeDestroy:function(){this.source&&this.source.close()},methods:{crudSaveFile:function(){var t=this,e={filepath:this.editorIndex[this.indexEditor].pathname,comment:this.editorList[this.indexEditor].editor.getValue(),pwd:this.pwd};Object(r.k)(this.editId,e).then((function(e){t.pwd="",t.$message.success(e.msg)})).catch((function(e){t.$message.error(e.msg)}))},downLoad:function(t){Object(r.g)(t.id).then((function(t){window.open(t.data.download_url,"_blank")}))},buildCode:function(){var t;this.buildModals=!0,"undefined"!=typeof EventSource&&(t=l.a.apiBaseURL+"/system/crud/npm?token="+Object(c.c)("token"),this.source=new EventSource(t),this.source.onopen=function(t){},this.source.onmessage=function(t){},this.source.onerror=function(t){})},goList:function(t){this.$router.push({path:this.$routeProStr+"/system/config/system_group/list/"+t.id})},getList:function(){var t=this;this.loading=!0,Object(r.i)(this.formValidate).then(function(){var e=Object(o.a)(Object(n.a)().mark((function e(i){var o;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=i.data,t.tabList=o.list,t.total=o.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$message.error(e.msg)}))},userSearchs:function(){this.formValidate.page=1,this.getList()},groupAdd:function(){this.$router.push({name:"system_code_generation"})},del:function(t,e,i){var n=this;e={title:e,num:i,url:"system/crud/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){n.$message.success(t.msg),n.tabList.splice(i,1),n.getList()})).catch((function(t){n.$message.error(t.msg)}))},edit:function(t){var e=this;this.spinShow=!0,this.title=t.name,this.$nextTick((function(i){e.openfile(t.id,!1)}))},editItem:function(t){this.$router.push({name:"system_code_generation",query:{id:t.id}})},openfile:function(t){var e=this;try{this.editId=t;var i=this;this.editorIndex=[],this.editorList=[],Object(r.f)(t).then(function(){var t=Object(o.a)(Object(n.a)().mark((function t(o){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o.data.file[0],o.data.file.map((function(t,n){var o=t;e.editorIndex.push({tab:!0,index:n+"",title:o.name,file_name:o.file_name,pathname:o.path}),i.code=o.content,e.initEditor(n,o.content),e.$nextTick((function(t){i.editorList[n].path=o.path,i.editorList[n].oldCode=i.content,i.editorIndex[n].title=o.name,i.editorIndex[n].file_name=o.file_name}))})),i.modals=!0,i.spinShow=!1;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){i.catchFun(t)}))}catch(t){}},winChanges:function(){this.className?this.className="":this.className="diy-f
|