qy-renren-qt/dist/2209300913/static/js/28.js
2022-09-30 09:18:17 +08:00

1 line
6.6 KiB
JavaScript

webpackJsonp([28,48],{COLL:function(a,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{dataForm:{key:""},dataList:[],pageIndex:1,pageSize:10,totalPage:0,dataListLoading:!1,addOrUpdateVisible:!1}},components:{AddOrUpdate:e("DN4S").default},activated:function(){this.getDataList()},methods:{getDataList:function(){var a=this;this.dataListLoading=!0,this.$http({url:this.$http.adornUrl("/work/mtalarmlog/list"),method:"get",params:this.$http.adornParams({page:this.pageIndex,limit:this.pageSize,key:this.dataForm.key})}).then(function(t){var e=t.data;e&&0===e.code?(a.dataList=e.page.list,a.totalPage=e.page.totalCount):(a.dataList=[],a.totalPage=0),a.dataListLoading=!1})},sizeChangeHandle:function(a){this.pageSize=a,this.pageIndex=1,this.getDataList()},currentChangeHandle:function(a){this.pageIndex=a,this.getDataList()},addOrUpdateHandle:function(a){var t=this;this.addOrUpdateVisible=!0,this.$nextTick(function(){t.$refs.addOrUpdate.init(a)})},deleteHandle:function(a){var t=this;this.$confirm("确定对[id="+a+"]进行删除操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$http({url:t.$http.adornUrl("/work/mtalarmlog/delete"),method:"post",data:t.$http.adornData(a,!1)}).then(function(a){var e=a.data;e&&0===e.code?t.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){t.getDataList()}}):t.$message.error(e.msg)})})}}},n={render:function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",{staticClass:"mod-config"},[e("el-form",{attrs:{inline:!0,model:a.dataForm},nativeOn:{keyup:function(t){if(!("button"in t)&&a._k(t.keyCode,"enter",13,t.key,"Enter"))return null;a.getDataList()}}},[e("el-form-item",[e("el-input",{attrs:{placeholder:"参数名",clearable:""},model:{value:a.dataForm.key,callback:function(t){a.$set(a.dataForm,"key",t)},expression:"dataForm.key"}})],1),a._v(" "),e("el-form-item",[e("el-button",{on:{click:function(t){a.getDataList()}}},[a._v("查询")])],1)],1),a._v(" "),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:a.dataListLoading,expression:"dataListLoading"}],staticStyle:{width:"100%"},attrs:{data:a.dataList,stripe:!0,"header-cell-style":{background:"#eef1f6",color:"#606266",height:"56px"},border:""}},[e("el-table-column",{attrs:{type:"index",label:"序号","header-align":"center",align:"center",width:"50"}}),a._v(" "),e("el-table-column",{attrs:{prop:"createTime","header-align":"center",align:"center",label:"添加时间"}}),a._v(" "),e("el-table-column",{attrs:{prop:"updateTime","header-align":"center",align:"center",label:"修改时间"}}),a._v(" "),e("el-table-column",{attrs:{prop:"alarmGrade","header-align":"center",align:"center",label:"报警级别"}}),a._v(" "),e("el-table-column",{attrs:{prop:"alarmType","header-align":"center",align:"center",label:"报警类型"}}),a._v(" "),e("el-table-column",{attrs:{prop:"alarmContent","header-align":"center",align:"center",label:"报警内容"}}),a._v(" "),e("el-table-column",{attrs:{prop:"description","header-align":"center",align:"center",label:"描述"}})],1),a._v(" "),e("el-pagination",{attrs:{"current-page":a.pageIndex,"page-sizes":[10,20,50,100],"page-size":a.pageSize,total:a.totalPage,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":a.sizeChangeHandle,"current-change":a.currentChangeHandle}}),a._v(" "),a.addOrUpdateVisible?e("add-or-update",{ref:"addOrUpdate",on:{refreshDataList:a.getDataList}}):a._e()],1)},staticRenderFns:[]},l=e("VU/8")(r,n,!1,null,null,null);t.default=l.exports},DN4S:function(a,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,alarmGrade:"",alarmType:"",alarmContent:"",description:""},dataRule:{alarmGrade:[{required:!0,message:"报警级别不能为空",trigger:"blur"}],alarmType:[{required:!0,message:"报警类型不能为空",trigger:"blur"}],alarmContent:[{required:!0,message:"报警内容不能为空",trigger:"blur"}]}}},methods:{init:function(a){var t=this;this.dataForm.id=a||"",this.visible=!0,this.$nextTick(function(){t.$refs.dataForm.resetFields(),t.dataForm.id&&t.$http({url:t.$http.adornUrl("/work/mtalarmlog/info/"+t.dataForm.id),method:"get",params:t.$http.adornParams()}).then(function(a){var e=a.data;e&&0===e.code&&(t.dataForm=e.mtAlarmLog)})})},dataFormSubmit:function(){var a=this;this.$refs.dataForm.validate(function(t){t&&a.$http({url:a.$http.adornUrl("/work/mtalarmlog/"+(a.dataForm.id?"update":"save")),method:"post",data:a.$http.adornData({id:a.dataForm.id||void 0,alarmGrade:a.dataForm.alarmGrade,alarmType:a.dataForm.alarmType,alarmContent:a.dataForm.alarmContent,description:a.dataForm.description})}).then(function(t){var e=t.data;e&&0===e.code?a.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){a.visible=!1,a.$emit("refreshDataList")}}):a.$message.error(e.msg)})})}}},n={render:function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("el-dialog",{attrs:{title:a.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:a.visible},on:{"update:visible":function(t){a.visible=t}}},[e("el-form",{ref:"dataForm",attrs:{model:a.dataForm,rules:a.dataRule,"label-width":"80px"},nativeOn:{keyup:function(t){if(!("button"in t)&&a._k(t.keyCode,"enter",13,t.key,"Enter"))return null;a.dataFormSubmit()}}},[e("el-form-item",{attrs:{label:"报警级别",prop:"alarmGrade"}},[e("el-input",{attrs:{placeholder:"报警级别",clearable:""},model:{value:a.dataForm.alarmGrade,callback:function(t){a.$set(a.dataForm,"alarmGrade",t)},expression:"dataForm.alarmGrade"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"报警类型",prop:"alarmType"}},[e("el-input",{attrs:{placeholder:"报警类型",clearable:""},model:{value:a.dataForm.alarmType,callback:function(t){a.$set(a.dataForm,"alarmType",t)},expression:"dataForm.alarmType"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"报警内容",prop:"alarmContent"}},[e("el-input",{attrs:{placeholder:"报警内容",clearable:""},model:{value:a.dataForm.alarmContent,callback:function(t){a.$set(a.dataForm,"alarmContent",t)},expression:"dataForm.alarmContent"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"描述",prop:"description"}},[e("el-input",{attrs:{placeholder:"描述",clearable:""},model:{value:a.dataForm.description,callback:function(t){a.$set(a.dataForm,"description",t)},expression:"dataForm.description"}})],1)],1),a._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(t){a.visible=!1}}},[a._v("取消")]),a._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(t){a.dataFormSubmit()}}},[a._v("确定")])],1)],1)},staticRenderFns:[]},l=e("VU/8")(r,n,!1,null,null,null);t.default=l.exports}});