1 line
5.9 KiB
JavaScript
1 line
5.9 KiB
JavaScript
webpackJsonp([470],{"El6+":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("bzuE"),o=a("ysqt"),i=a("3MlD"),n=(a("lbHh"),{components:{btnInput:o.a,DialogChooseSingleUser:i.a},data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,userName:"",userId:""},time:"",expenseOptions:[],btnDelDisabled:!0,btnOtherDisabled:!0,rowIds:[],tableData:[],formData:{},deleteBtn:!0,loading:!1,getUserList:[],selectDeptId:[],depOptions:[],pictLoading:!1,dialogLoading:!1,chooseUserVisible:!1,chooseID:"",config:s.a}},mounted:function(){},watch:{time:function(e){e?(this.search_data.startTime=e[0],this.search_data.endTime=e[1],this.deleteBtn=!0):(this.search_data.startTime="",this.search_data.endTime="")},search_data:{handler:function(e,t){e.userName==t.userName&&(this.deleteBtn=!0)},deep:!0}},methods:{clickRow:function(e){this.$refs.tb.toggleRowSelection(e)},exportExcel:function(){delete this.search_data.pagesize,delete this.search_data.pageno,this.$api.opLogAPI.exportExcel(this.search_data).then(function(e){})},getList:function(){var e=this;this.pictLoading=!0,this.$api.opLogAPI.pageList(this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.total=t.data.totalRows,e.tableData=t.data.datas?t.data.datas:[]):(e.total=0,e.tableData=[])}).catch(function(e){console.log(e)})},search:function(){this.search_data.pageno=1,this.getList(),this.deleteBtn=!1},handleCurrentChange:function(e){this.search_data.pageno=e,this.getList()},handleSizeChange:function(e){this.search_data.pagesize=e,this.getList()},export:function(){},getUser:function(e){console.log(e),e&&(this.search_data.userName=e.userName,this.search_data.userId=e.id)},remove:function(){var e=this;this.$confirm("确认删除查询的日志吗?","提示",{type:"warning"}).then(function(){e.$api.opLogAPI.batchRemove(e.search_data).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg?t.msg:"删除失败,请重试",type:"error"})}).catch(function(t){e.$message({message:"删除失败,请重试",type:"error"})})})},handleSelectionChange:function(e){this.rowIds=e,this.setBtn(e)},setBtn:function(e){var t=!0,a=!0;e.length>0?(a=!1,1==e.length&&(t=!1)):(t=!0,a=!0),this.btnDelDisabled=a,this.btnOtherDisabled=t}}}),r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-task sys-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"management:opLog:remove",expression:"'management:opLog:remove'"}],attrs:{type:"primary",disabled:e.deleteBtn},on:{click:function(t){return e.remove()}}},[e._v("删除")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"management:opLog:export",expression:"'management:opLog:export'"}],attrs:{type:"primary"},on:{click:function(t){return e.exportExcel()}}},[e._v("导出")])],1),e._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"用户名"}},[a("btn-input",{attrs:{valueText:e.search_data.userName,valueId:e.search_data.userId,chooseVisible:e.chooseUserVisible},on:{"update:valueText":function(t){return e.$set(e.search_data,"userName",t)},"update:value-text":function(t){return e.$set(e.search_data,"userName",t)},"update:valueId":function(t){return e.$set(e.search_data,"userId",t)},"update:value-id":function(t){return e.$set(e.search_data,"userId",t)},"update:chooseVisible":function(t){e.chooseUserVisible=t},"update:choose-visible":function(t){e.chooseUserVisible=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"40%"},attrs:{label:"时间范围"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}})],1)],1),e._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.search()}}},[e._v("查询")])],1)],1)])],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"",data:e.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"row-click":e.clickRow,"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"opUserName",align:"center",label:"操作用户","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",align:"center",label:"操作时间","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"opModule",align:"center",label:"模块","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"opDesc",align:"center",label:"业务对象","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"opType",align:"center",label:"操作名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"opIp",align:"center",label:"客户端IP","show-overflow-tooltip":""}})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.search_data.pageno,"page-sizes":e.pageSizes,"page-size":e.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),e._v(" "),a("DialogChooseSingleUser",{attrs:{visible:e.chooseUserVisible},on:{"update:visible":function(t){e.chooseUserVisible=t},change:e.getUser}})],1)},staticRenderFns:[]};var l=a("VU/8")(n,r,!1,function(e){a("jdz6")},"data-v-04f717bd",null);t.default=l.exports},jdz6:function(e,t){}}); |