(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-67748d0a"],{1366:function(e,t,a){"use strict";a("162d")},"162d":function(e,t,a){},"45e8":function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"dataModelManage",staticStyle:{height:"calc(100% - 140px)"}},[a("div",{staticClass:"topDiv"},[a("span",{staticClass:"title"},[e._v("数据模型管理")]),a("button",{staticClass:"addProcess",on:{click:function(t){return e.$router.push({path:"addDataModel"})}}},[e._v(" 新建模型 ")])]),a("div",{staticClass:"searchBar"},[a("el-form",{ref:"form",staticStyle:{width:"100%"},attrs:{model:e.searchForm,"label-width":"100px"}},[a("el-row",[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"标签"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:e.searchForm.modelTitle,callback:function(t){e.$set(e.searchForm,"modelTitle",t)},expression:"searchForm.modelTitle"}})],1)],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"名称"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:e.searchForm.modelName,callback:function(t){e.$set(e.searchForm,"modelName",t)},expression:"searchForm.modelName"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",[a("button",{staticClass:"searchBtn button_ty",on:{click:e.searchData}},[e._v(" 查询 ")]),a("button",{staticClass:"button_ty",on:{click:e.reset}},[e._v("重置")])])],1)],1)],1)],1),a("div",{staticClass:"main"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"modelName",label:"名称"}}),a("el-table-column",{attrs:{prop:"modelTitle",label:"标签"}}),a("el-table-column",{attrs:{label:"类型",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[0==t.row.modelType?a("span",{staticStyle:{color:"orange"}},[e._v("基础对象")]):e._e(),1==t.row.modelType?a("span",{staticStyle:{color:"#2a3bd3"}},[e._v("业务对象")]):e._e(),2==t.row.modelType?a("span",{staticStyle:{color:"yellowgreen"}},[e._v("基础对象(延伸)")]):e._e()])]}}])}),a("el-table-column",{attrs:{prop:"createdTime",label:"最后修改人"}}),a("el-table-column",{attrs:{prop:"updatedTime",label:"最后修改日期"}}),a("el-table-column",{attrs:{prop:"description",label:"描述"}}),a("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"operation"},[a("span",{on:{click:function(a){return e.editTable(t.row)}}},[e._v("编辑")]),a("span",{staticStyle:{color:"red"},on:{click:function(a){return e.deleteTable(t.row)}}},[e._v("删除")])])]}}])})],1),a("el-pagination",{staticStyle:{"text-align":"right","margin-right":"20px","margin-top":"30px"},attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.pageSize},on:{"current-change":e.pageChange}})],1)])},o=[],s=(a("a4d3"),a("e01a"),a("5530")),n={name:"dataModelManage",data:function(){return{addDialogVisible2:!1,updateDialogVisible:!1,searchForm:{modelTitle:"",modelName:""},addProcessDialog:!1,pageSize:9,total:0,nowPage:0,tableData:[],tableForm:{}}},created:function(){this.getAllModel()},methods:{getAllModel:function(){var e=this,t=Object(s["a"])(Object(s["a"])({page:this.nowPage,size:this.pageSize},this.searchForm),{},{orders:[{coulmn:"updatedTime",direction:"DESC"}]});this.$axios.getAllEntity(t).then((function(t){e.total=t.data.data.totalElements,e.tableData=t.data.data.content})).catch((function(e){console.log(e.response)}))},getDate:function(e){var t=new Date(e),a=t.getFullYear()+"-",l=(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-",o=t.getDate()<10?"0"+t.getDate():t.getDate(),s=(t.getHours()<10?"0"+t.getHours():t.getHours())+":",n=(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":",i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return a+l+o+" "+s+n+i},searchData:function(){this.getAllModel()},reset:function(){this.searchForm={tableCnName:"",tableName:""},this.getAllModel()},pageChange:function(e){this.nowPage=e-1,this.getAllModel()},editTable:function(e){var t=e.modelName,a=e.modelTitle,l=e.modelType,o=e.parentTable,s=e.description,n=e.id,i={id:n,modelName:t,modelTitle:a,modelType:l,parentTable:o,description:s};sessionStorage.setItem("ty_model",JSON.stringify(i)),this.$router.push({path:"addDataModel",query:{tableId:e.id}})},deleteTable:function(e){var t=this;this.$confirm("此操作将永久删除该模型, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(a){var l={id:e.id,dbName:e.modelName};t.$axios.deleteModel(l).then((function(e){console.log(e),t.getAllModel(),t.$message({message:e.data.message,type:"success"})})).catch((function(e){t.$message.error(e.response.data.data)}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))}}},i=n,r=(a("1366"),a("2877")),c=Object(r["a"])(i,l,o,!1,null,"5d22eef2",null);t["default"]=c.exports}}]);