|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d225786"],{e511:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"main-content"},[e._m(0),t("div",{staticClass:"content"},[t("div",{},[t("VueTable",{ref:"table",attrs:{config:e.config},on:{tableCheck:e.tableCheck}},[t("template",{slot:"footer"},[t("div",{staticClass:"table-footer"})])],2)],1),t("Drawer",{attrs:{drawerTitle:"审核",drawerVrisible:e.add_vrisible},on:{drawerClose:e.addClose}},[t("div",{staticStyle:{padding:"30px"}},[t("FromCard",[t("template",{slot:"title"},[e._v("审核信息")]),[t("VueForm",{ref:"addForm",attrs:{formObj:e.addForm},scopedSlots:e._u([{key:"date",fn:function(){return[t("el-time-picker",{attrs:{"is-range":"","range-separator":"至","value-format":"HH:MM:SS","start-placeholder":"开始时间","end-placeholder":"结束时间",placeholder:"选择时间范围"},on:{change:e.dateTimeChange},model:{value:e.addDate,callback:function(t){e.addDate=t},expression:"addDate"}})]},proxy:!0}])},[t("template",{slot:"imgUrls"},[[t("el-upload",{attrs:{action:e.$baseUrl+"upload/uploadAnnouncement","on-success":e.ImgeSuccess,"file-list":e.imglist,"on-exceed":e.handleExceed,limit:1,accept:".jpg,.png,.JPG,.PNG","before-upload":e.beforeAvatarUpload}},[t("el-button",{attrs:{icon:"el-icon-edit",size:"small"}},[e._v("上传图片")]),t("span",{staticStyle:{"margin-left":"10px","font-size":"12px",color:"#444444"}},[e._v("建议比例:3:2")]),t("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t("span",[e._v("支持扩展名:png,jpg")])])],1)]],2)],2)]],2)],1),t("div",{attrs:{slot:"footer"},slot:"footer"},[t("button",{staticClass:"btn-orange",on:{click:function(t){return e.addSubmit()}}},[t("span",[t("i",{staticClass:"el-icon-circle-check"}),e._v("提交")])]),t("button",{staticClass:"btn-gray",on:{click:e.addClose}},[t("span",[e._v("取消")])])])])],1)])])},s=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"main-titel"},[t("span",[e._v("火灾报警记录")])])}],r=a("2b74"),i={data(){return{add_vrisible:!1,addDate:null,addForm:{ruleForm:{},form_item:[{type:"Select",label:"审核状态",placeholder:"请选择",width:"100%",options:[{value:1,label:"通过"},{value:2,label:"不通过"}],prop:"status"},{type:"Slot",label:"图片上传",placeholder:"请输入",width:"100%",prop:"imgUrls",slotName:"imgUrls"},{type:"textarea",label:"备注",placeholder:"请输入",width:"50%",prop:"remakes"}]},table_row:[],imglist:[],activeName:"0",config:{thead:[{label:"序号",type:"index",width:"80"},{label:"设备号",prop:"deviceNo",width:"100"},{label:"报警号",prop:"alarmNo",width:"100"},{label:"报警类型",prop:"alarmType",width:"auto",type:"function",callback(e,t){switch(e.alarmType){case"C":return"数值报警";case"X":return"状态报警";default:break}}},{label:"设备名称",prop:"deviceName",width:"auto"},{label:"报警时间",prop:"alarmTime",width:"auto"}],table_data:[],url:"alarmFireAlarmList",data:{pageNum:1,size:10}}}},methods:{add(e){e.length>1?this.$message.error("只能操作一条数据"):e.length?1!==e[0].status?this.$message({message:"该审核已结束",type:"error"}):this.add_vrisible=!0:this.$message.error("请选择")},addClose(){this.$refs.addForm.reset(),this.add_vrisible=!1},addSubmit(){let e={...this.addForm.ruleForm,id:this.table_row[0].id};Object(r["e"])(e).then(e=>{e.status&&(this.$message({message:e.message,type:"success"}),this.$refs.table.loadData(),this.addClose())})},dateTimeChange(e){this.addForm.ruleForm.openStartDate=e[0],this.addForm.ruleForm.openEndDate=e[1]},handleClick(e,t){let a=null;a=0!=this.activeName?this.activeName:null;const l={pageNum:1,size:10,status:a};this.$refs.table.requestData(l)},tableCheck(e){this.table_row=e},del(e){if(e.length){let e=[];for(let t=0;t<this.table_row.length;t++)e.push(this.table_row[t].id);this.$confirm("是否确认删除?删除不可恢复","删除",{confirmButtonText:"确定",cancelButtonText:"取消",confirmButtonClass:"confirmButton",cancelButtonClass:"cancelButton"}).then(()=>{this.$refs.table.tableDelete(e)}).catch(e=>{})}else this.$message.error("请选中需要删除的数据")},ImgeSuccess(e,t){this.addForm.ruleForm.imgUrls[0]=t.response.url},beforeAvatarUpload(e){const t=e.size/1024/1024<2,a="image/png"===e.type,l="image/jpeg"===e.type;return a||l||this.$message.error("上传头像图片只能是 JPG/PNG 格式!"),t||this.$message.error("上传头像图片大小不能超过 2MB!"),(a||l)&&t},handleExceed(e,t){this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${e.length} 个文件,共选择了 ${e.length+t.length} 个文件`)}}},o=i,n=a("2877"),d=Object(n["a"])(o,l,s,!1,null,null,null);t["default"]=d.exports}}]);
|