webpackJsonp([95],{"0Fug":function(e,t){},MPZN:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Dd8w"),i=a.n(n),s=a("NYxO"),r=a("mtWM"),o=a.n(r),l={created:function(){this.getData()},data:function(){return{totalNumber:0,totalPage:0,currentPage:1,pageSize:20,tableData:[],name:"",multipleMode:!1,loading:!1}},computed:i()({},Object(s.b)(["tableHeight"]),{selection:function(){return this.$refs.table.selection.map(function(e){return e.id})}}),methods:{pageSizeChange:function(e){this.pageSize=e,this.getData()},currentPageChange:function(e){this.currentPage=e,this.getData()},getData:function(){var e=this,t={};this.name&&(t.name=this.name),this.$http.get({url:"/rest/repository/process-definitions",data:t}).then(function(t){e.totalNumber=t.data.length;var a=e.currentPage-1;e.tableData=t.data.splice((a<0?0:a)*e.pageSize,e.pageSize)})},toggleMultipleMode:function(e){this.multipleMode=e,e||this.$refs.table.clearSelection()},editRow:function(e){window.open(this.$baseUrl+"/modeler.html?modelId="+e.id)},operation1:function(){this.$notify({title:"提示",message:this.selection})},operation2:function(){this.$message("操作2")},changeState:function(e,t){var a=this;this.$alert("确认"+(t?"激活":"挂起")+"？","警告",{type:"warning"}).then(function(){return o.a.put("/rest/repository/process-definitions/"+e.id,{action:t?"activate":"suspend",includeProcessInstances:!1})}).then(function(){a.$message.success("操作成功"),a.getData()}).catch(function(e){"cancel"===e||a.$message.error("操作失败")})},deleteDeployment:function(e){var t=this;this.$alert("确认删除？","警告",{type:"error"}).then(function(){return t.$http.post({url:"/activiti/process/deleteDeployment",data:{deploymentId:e.deploymentId}})}).then(function(e){e.success?(t.$message.success("删除成功"),t.getData()):t.$message.error("删除失败")}).catch(function(){t.$message.error("删除失败")})}}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"filters-container"}),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.$store.state.fetchingData,expression:"$store.state.fetchingData"}],ref:"table",attrs:{data:e.tableData,height:e.tableHeight,"row-key":"id"}},[e.multipleMode?a("el-table-column",{attrs:{align:"center",type:"selection","min-width":"50"}}):e._e(),e._v(" "),a("el-table-column",{attrs:{prop:"id",label:"id",width:"150"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"description",label:"描述"}}),e._v(" "),a("el-table-column",{attrs:{prop:"version",label:"版本",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.suspended?a("el-tag",{attrs:{size:"mini",type:"info"}},[e._v("已挂起")]):a("el-tag",{attrs:{size:"mini",type:"success"}},[e._v("已激活")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[n.suspended?a("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(t){e.changeState(n,!0)}}},[e._v("激活\n                ")]):a("el-button",{attrs:{type:"warning",size:"mini",plain:""},on:{click:function(t){e.changeState(n,!1)}}},[e._v("挂起")]),e._v(" "),a("el-button",{attrs:{type:"danger",size:"mini",plain:""},on:{click:function(t){e.deleteDeployment(n)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("div",{staticClass:"pagination-wrapper"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[10,20,30,40,50],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalNumber},on:{"size-change":e.pageSizeChange,"current-change":e.currentPageChange}})],1)],1)},staticRenderFns:[]};var u=a("VU/8")(l,c,!1,function(e){a("0Fug")},"data-v-7e8ac627",null);t.default=u.exports}});