text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cbc4f78a"],{"23da":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("page-header-wrapper",[r("a-card",{attrs:{bordered:!1,bodyStyle:{paddingBottom:0}}},[e.hasPermission(e.collection.warn_select_button)?r("div",{staticClass:"table-page-search-wrapper"},[r("a-form-model",{attrs:{layout:"inline",model:e.queryParam}},[r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{md:6,sm:24}},[r("a-form-model-item",{attrs:{label:"告警ID"}},[r("a-input",{attrs:{placeholder:"请输入",maxLength:64},model:{value:e.queryParam.id,callback:function(t){e.$set(e.queryParam,"id",t)},expression:"queryParam.id"}})],1)],1),r("a-col",{attrs:{md:6,sm:24}},[r("a-form-model-item",{attrs:{label:"告警类型"}},[r("a-select",{attrs:{"option-filter-prop":"children",placeholder:"请选择告警类型",allowClear:""},model:{value:e.queryParam.warnType,callback:function(t){e.$set(e.queryParam,"warnType",t)},expression:"queryParam.warnType"}},e._l(e.warnTypeList,(function(t){return r("a-select-option",{key:t.warnType},[e._v(" "+e._s(t.warnTypeName)+" ")])})),1)],1)],1),r("a-col",{attrs:{md:6,sm:24}},[r("a-form-item",{attrs:{label:"所属单位"}},[r("a-tree-select",{staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":e.departmentTree,placeholder:"请选择单位","tree-default-expand-all":"",treeNodeFilterProp:"title",allowClear:""},model:{value:e.queryParam.ownerId,callback:function(t){e.$set(e.queryParam,"ownerId",t)},expression:"queryParam.ownerId"}})],1)],1),r("a-col",{attrs:{md:6,sm:24}},[r("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"right"}},[r("a-button",{on:{click:e.reset}},[e._v("重置")]),r("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary"},on:{click:function(t){return e.$refs.table.refresh(!0)}}},[e._v("查询")])],1)])],1)],1)],1):e._e()]),r("a-card",{staticClass:"card-margin",attrs:{bordered:!1}},[r("s-table",{ref:"table",attrs:{size:"default",rowKey:"id",columns:e.columns,data:e.loadData,alert:!1,showPagination:"auto",rowSelection:null},scopedSlots:e._u([{key:"action",fn:function(t,a){return r("span",{},[r("a",{attrs:{disabled:!(!a.isDeal&&a.entityId)},on:{click:function(t){return e.locateItem(a)}}},[e._v("定位")])])}}])})],1),r("a-modal",{attrs:{title:!0===e.isEdit?"处理记录":"添加记录",visible:e.visible,"confirm-loading":e.confirmLoading,width:"700px"},on:{ok:e.handleOk,cancel:e.handleCancel}},[r("a-form-model",{ref:"ruleForm",attrs:{model:e.form,"label-col":{span:8},"wrapper-col":{span:14}}},[r("a-row",{attrs:{gutter:48}},[r("a-col",{attrs:{md:24,sm:24}},[r("a-form-model-item",{attrs:{label:"备注"}},[r("a-textarea",{model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1)],1)],1)],1)},n=[],o=(r("1d43"),r("16ca"),r("4cd5"),r("2af9")),s=r("9e04"),i=r("760e"),c=[{code:0,name:"未处理"},{code:1,name:"已处理"}],l=[{code:"0",name:"停止告警"},{code:"1",name:"正在告警"}],d={name:"SosRecord",components:{STable:o["f"],Ellipsis:o["c"]},data:function(){var e=this;this.DEAL_TYPE=c,this.WARN_TYPE=l;var t=this.$store.state.department.departmentTree,r=this.$store.state.department.flatDepartmentTree;return{collection:i["a"].warn.warn_select_menu,departmentTree:t,flatDepartmentTree:r,columns:[{title:"告警名称",dataIndex:"warnTypeName"},{title:"围栏名称",dataIndex:"railName"},{title:"报警状态",dataIndex:"warnStatus",customRender:function(t){return e.getNameByCode(t,l)}},{title:"告警时间",dataIndex:"createTime",sorter:!0},{title:"告警源",dataIndex:"detailInfo",customRender:function(e,t){var r;try{r=JSON.parse(t.detailInfo)}catch(n){r={}}var a=r.personnelName||r.vehiclePlatNo||r.serialNumber;return a||t.serialNumber}},{title:"所属单位",dataIndex:"ownerId",customRender:function(e){return e&&r[e]?r[e]["name"]:"-"}},{title:"操作",scopedSlots:{customRender:"action"}}],warnTypeList:[],queryParam:{},loadData:function(t){var r=Object.assign({},t,e.queryParam,{});return Object(s["b"])(r).then((function(e){return e.body}))},selectedRowKeys:[],selectedRows:[],form:{},visible:!1,confirmLoading:!1,isEdit:!1}},created:function(){},mounted:function(){var e=this;this.$route&&this.$route.query&&this.$route.query.eventId&&(this.queryParam={id:this.$route.query.eventId},setTimeout(this.$refs.table.refresh(!0),500)),this.$route&&this.$route.query&&this.$route.query.warnType&&(this.queryParam={warnType:this.$route.query.warnType,isDeal:0},setTimeout(this.$refs.table.refresh(!0),500)),Object(s["c"])().then((function(t){t.body&&t.body.length>0&&(e.warnTypeList=t.body)}))},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange,getCheckboxProps:function(e){return{props:{disabled:!!e.isDeal}}}}}},methods:{hasPermission:function(e){return Object(i["b"])(e)},reset:function(){this.queryParam={},this.rangePicker=[],this.$refs.table.refresh(!0)},hdlDownLoad:function(){},editItem:function(e){this.$refs.ruleForm&&this.$refs.ruleForm.clearValidate(),this.isEdit=!0,this.form=e,this.visible=!0},locateItem:function(e){this.$router.push({path:"/DataAnalysis/TargetTrace?id=".concat(e.entityId,"&type=").concat(e.entityType,"&serialNumber=").concat(e.serialNumber,"&ownerId=").concat(e.ownerId)})},handleBatchUpdate:function(){this.$refs.ruleForm&&this.$refs.ruleForm.clearValidate(),this.isEdit=!1,this.form={},this.visible=!0},handleOk:function(){var e=this;this.$refs.ruleForm.validate((function(t){t&&(e.confirmLoading=!0,e.isEdit&&Object(s["g"])(e.form).then((function(t){if(!t||200!==t.code)throw new Error(t.message);return e.$message.success("处理成功！"),e.$refs.table.refresh(!1),e.visible=!1,e.confirmLoading=!1,e.selectedRowKeys=[],e.selectedRows=[],t.body})).catch((function(t){e.$message.error(t.message||"处理失败！"),e.confirmLoading=!1})))}))},handleCancel:function(e){this.visible=!1},onSelectChange:function(e,t){this.selectedRowKeys=e,this.selectedRows=t},getNameByCode:function(e,t){var r="";if(t&&t.length>0){var a=t.find((function(t){return t.code===e}));a&&(r=a.name)}return r}}},u=d,m=r("5d22"),f=Object(m["a"])(u,a,n,!1,null,null,null);t["default"]=f.exports},"9e04":function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"g",(function(){return i})),r.d(t,"c",(function(){return c})),r.d(t,"a",(function(){return l})),r.d(t,"f",(function(){return d})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return m}));r("16ca");var a=r("b775"),n="/location-engine",o={getWarnRecordList:"".concat(n,"/warnRecord/page"),updateWarnRecord:"".concat(n,"/warnRecord/handleWarnRecord"),deleteWarnRecord:"".concat(n,"/warnRecord/delete_batchDel"),getWarnTypeList:"".concat(n,"/warnRecord/warnTypeList"),getSosRecordList:"".concat(n,"/sosRecord/page"),updateSosRecord:"".concat(n,"/sosRecord/handleSosRecordId"),deleteSosRecord:"".concat(n,"/sosRecord/delete_batchDel"),warnRecordStatistics:"".concat(n,"/warnRecord/warnRecordStatistics"),personAlarmTest:"".concat(n,"/test/triggerSosAlarm"),railAlarmTest:"".concat(n,"/test/triggerRailAlarm")};function s(e){return Object(a["b"])({url:o.getWarnRecordList,method:"get",params:e})}function i(e){return Object(a["b"])({url:o.updateWarnRecord,method:"POST",data:e})}function c(){return Object(a["b"])({url:o.getWarnTypeList,method:"GET"})}function l(e){return Object(a["b"])({url:o.getSosRecordList,method:"get",params:e})}function d(e){return Object(a["b"])({url:o.updateSosRecord,method:"POST",data:e})}function u(e){return Object(a["b"])({url:o.personAlarmTest,method:"PUT",params:e})}function m(e){return Object(a["b"])({url:o.railAlarmTest,method:"PUT",params:e})}}}]);