(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-fe72"],{"5W5M":function(e,t,a){"use strict";a.d(t,"g",function(){return r}),a.d(t,"b",function(){return n}),a.d(t,"d",function(){return l}),a.d(t,"i",function(){return c}),a.d(t,"f",function(){return o}),a.d(t,"e",function(){return u}),a.d(t,"a",function(){return d}),a.d(t,"c",function(){return p}),a.d(t,"h",function(){return m});var s=a("t3Un"),i=a("X4fA");function r(e){return Object(s.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/dictionary-types",method:"get",params:e||{}})}function n(e){return Object(s.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/adddictionary-types",method:"post",data:e})}function l(e){return Object(s.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/deldictionary-types",method:"post",data:e})}function c(e){return Object(s.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/putdictionary-types",method:"post",data:e})}function o(e){return Object(s.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/dictionary-items",method:"get",params:e||{}})}function u(e){return Object(s.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/dictionaryAllItems",method:"get",params:e||{}})}function d(e){return Object(s.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/adddictionary-items",method:"post",data:e})}function p(e){return Object(s.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/deldictionary-items",method:"post",data:e})}function m(e){return Object(s.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/putdictionary-items",method:"post",data:e})}},YjeI:function(e,t,a){},"j+dn":function(e,t,a){"use strict";a.r(t);var s=a("14Xm"),i=a.n(s),r=a("D3Ub"),n=a.n(r),l=a("QbLZ"),c=a.n(l),o=a("jJIE"),u=a.n(o),d=a("L2JU"),p=a("7Qib"),m=a("t3Un"),h=a("X4fA");function f(e){return Object(m.a)({headers:{Authorization:Object(h.a)()},url:"http://39.104.85.193:4105/selfcheckreport/find/list",method:"post",data:e})}var y=a("WZwz"),v=a("5W5M"),b={name:"safetyRiskTroubleStatistics",filters:{parseLevel:function(e){return 3}},computed:c()({},Object(d.b)(["userType"])),data:function(){return{tableKey:0,status:1,yhlevel:"",selfCheckData:[],cityList:[],provinceList:[],districtList:[],streetList:[],committeeList:[],validTime:["",""],safetySuperVisionList:[],yhlevelList:[{id:1,name:"一般隐患"},{id:2,name:"重大隐患"}],statusList:[{id:1,name:"未整改"},{id:2,name:"已整改"}],listLoading:!1,pageSize:10,recordTotal:0,currentPage:1,pageTotal:0,title:"",company:"",code:"",selfCheckVisible:!1,selfCheckFormRules:{yhdesc:[{required:!0,message:"自查问题隐患描述不能为空",trigger:"blur"}],endtTime:[{required:!0,message:"检查时间不能为空",trigger:"change"}],yhlevel:[{required:!0,message:"隐患等级不能为空",trigger:"change"}],solution:[{required:!0,message:"整改措施不能为空",trigger:"blur"}],price:[{required:!0,message:"整改资金(元)不能为空",trigger:"blur"}],chargeperson:[{required:!0,message:"责任人不能为空",trigger:"blur"}],status:[{required:!0,message:"隐患状态不能为空",trigger:"change"}]},listQuery:{city:"",committee:"",district:"",eid:null,ename:"",endTime:"",page:1,pageSize:10,province:"",startTime:"",status:"",street:"",totalCount:0,yhlevel:""},selfCheckForm:{id:null,yhdesc:"",endtime:"",yhlevel:"",solution:"",price:"",chargeperson:"",status:""}}},created:function(){this.getSelfCheckData(),this.getProvince(),this.getSafetySuperVisionList()},methods:{getSelfCheckData:function(){var e=this;return n()(i.a.mark(function t(){var a,s;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.listLoading=!0,e.listQuery.eid="null"===u.a.get("isSupervision")?"":u.a.get("isSupervision"),t.next=4,f(e.listQuery);case 4:"200"===(a=t.sent).data.code&&a.data.result?(s=JSON.parse(a.data.message),e.recordTotal=s.totalCount,e.pageSize=s.pageSize,e.pageTotal=Object(p.a)(s.totalCount,s.pageSize),e.currentPage=s.current,e.selfCheckData=a.data.result):(e.$message({message:a.data.message,type:"warning"}),"未找到结果"===a.data.message&&(e.selfCheckData=[])),e.listLoading=!1;case 7:case"end":return t.stop()}},t,e)}))()},showSelfCheckForm:function(e,t){var a=this;this.selfCheckVisible=!0,this.$nextTick(function(){a.$refs.selfCheckForm.clearValidate()}),"新增"===t?(this.title="新增",this.selfCheckForm={id:null,yhdesc:"",endtime:"",yhlevel:"",solution:"",price:"",chargeperson:"",status:""}):(this.title="编辑",this.selfCheckForm=e)},submitSelfCheck:function(){var e=this;this.$refs.selfCheckForm.validate(function(t){t?(e.selfCheckForm.price=parseInt(e.selfCheckForm.price),"新增"===e.title?function(e){return Object(m.a)({headers:{Authorization:Object(h.a)()},url:"http://39.104.85.193:4105/selfcheckreport/new",method:"post",data:e})}(e.selfCheckForm).then(function(t){"200"===t.data.code?(e.selfCheckVisible=!1,e.getSelfCheckData(),e.$notify({type:"success",duration:2e3,message:"新增成功",title:"成功"})):e.$message({type:"warning",message:t.data.message})}):(e.$delete(e.selfCheckForm,"checktime"),function(e){return Object(m.a)({headers:{Authorization:Object(h.a)()},url:"http://39.104.85.193:4105/selfcheckreport/update",method:"post",data:e})}(e.selfCheckForm).then(function(t){"200"===t.data.code?(e.selfCheckVisible=!1,e.getSelfCheckData(),e.$notify({type:"success",duration:2e3,title:"成功",message:"编辑成功"})):e.$message({type:"warning",message:t.data.message})}))):e.$message({type:"warning",message:"请完善基本信息"})})},exportToExcel:function(){var e=this;return n()(i.a.mark(function t(){var s,r,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(s={}).eid=u.a.get("isSupervision")||"",s.status=e.status,s.yhlevel=e.yhlevel,t.next=6,f(s);case 6:"200"===(r=t.sent).data.code?null===r.data.result||r.data.result===[]?e.$message({message:"无数据可导出",type:"warning"}):(n=r.data.result.map(function(e){return{ename:e.ename,yhdesc:e.yhdesc,endtime:e.endtime,yhlevel:1===e.endtime?"一般隐患":"重大隐患",solution:e.ename,price:e.ename,chargeperson:e.ename,status:1===e.status?"未整改":"已整改"}}),Promise.all([a.e("chunk-0d49"),a.e("chunk-5aa0")]).then(a.bind(null,"S/jZ")).then(function(t){var a=e.formatJson(["ename","yhdesc","endtime","yhlevel","solution","price","chargeperson","status"],n);t.export_json_to_excel({header:["单位名称","自查问题隐患描述","检查时间","隐患等级","整改措施","整改资金(元)","责任人","隐患状态"],data:a,filename:"安全隐患风险统计"})})):e.$message({message:r.data.message,type:"warning"});case 8:case"end":return t.stop()}},t,e)}))()},getProvince:function(){var e=this;return n()(i.a.mark(function t(){var a;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(y.b)();case 2:"200"===(a=t.sent).data.code&&(e.provinceList=a.data.result.provinceList);case 4:case"end":return t.stop()}},t,e)}))()},changeArea:function(e){var t=this;return n()(i.a.mark(function a(){var s,r,n,l;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if("province"!==e){a.next=12;break}return t.listQuery.city="",t.listQuery.district="",t.listQuery.street="",t.listQuery.committee="",t.areaListQuery={type:2,parenttype:1,parentname:t.listQuery.province},a.next=8,Object(y.a)(t.areaListQuery);case 8:"200"===(s=a.sent).data.code&&(t.cityList=s.data.result),a.next=40;break;case 12:if("city"!==e){a.next=23;break}return t.listQuery.district="",t.listQuery.street="",t.listQuery.committee="",t.areaListQuery={type:3,parenttype:2,parentname:t.listQuery.city},a.next=19,Object(y.a)(t.areaListQuery);case 19:"200"===(r=a.sent).data.code&&(t.districtList=r.data.result),a.next=40;break;case 23:if("district"!==e){a.next=33;break}return t.listQuery.street="",t.listQuery.committee="",t.areaListQuery={type:4,parenttype:3,parentname:t.listQuery.district},a.next=29,Object(y.a)(t.areaListQuery);case 29:"200"===(n=a.sent).data.code&&(t.streetList=n.data.result),a.next=40;break;case 33:if("street"!==e){a.next=40;break}return t.listQuery.committee="",t.areaListQuery={type:5,parenttype:4,parentname:t.listQuery.street},a.next=38,Object(y.a)(t.areaListQuery);case 38:"200"===(l=a.sent).data.code&&(t.committeeList=l.data.result);case 40:case"end":return a.stop()}},a,t)}))()},getSafetySuperVisionList:function(){var e=this;return n()(i.a.mark(function t(){var a,s;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(a={}).dictionaryType="安全监管分类",t.next=4,Object(v.e)(a);case 4:s=t.sent,e.safetySuperVisionList=s.data.result;case 6:case"end":return t.stop()}},t,e)}))()},formatJson:function(e,t){return t.map(function(t){return e.map(function(e){return t[e]})})},giveTime:function(){this.listQuery.startTime=this.validTime[0],this.listQuery.endTime=this.validTime[1]},refreshHandle:function(){this.getSelfCheckData()},handleSizeChange:function(e){this.listQuery.pageSize=e,this.getSelfCheckData()},handleCurrentChange:function(e){this.listQuery.pageIndex=e,this.getSelfCheckData()}}},g=(a("kxf1"),a("KHd+")),k=Object(g.a)(b,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"filter-container"},[a("div",{staticStyle:{display:"block","padding-top":"10px"}},[a("div",{staticClass:"basic_search",staticStyle:{"padding-top":"10px"}},[a("span",[e._v("按时间查询:")]),e._v(" "),a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["00:00:00","23:59:59"]},on:{change:function(t){e.giveTime()}},model:{value:e.validTime,callback:function(t){e.validTime=t},expression:"validTime"}})],1),e._v(" "),a("div",{staticClass:"basic_search",staticStyle:{"padding-top":"10px"}},[a("span",[e._v("按单位名称:")]),e._v(" "),a("el-input",{staticStyle:{width:"200px"},attrs:{filterable:"",clearable:""},model:{value:e.listQuery.ename,callback:function(t){e.$set(e.listQuery,"ename",t)},expression:"listQuery.ename"}})],1),e._v(" "),a("div",{staticClass:"basic_search"},[a("span",[e._v("隐患状态:")]),e._v(" "),a("el-select",{staticStyle:{width:"200px"},model:{value:e.listQuery.status,callback:function(t){e.$set(e.listQuery,"status",t)},expression:"listQuery.status"}},e._l(e.statusList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),a("div",{staticClass:"basic_search"},[a("span",[e._v("隐患等级:")]),e._v(" "),a("el-select",{staticStyle:{width:"200px"},model:{value:e.listQuery.yhlevel,callback:function(t){e.$set(e.listQuery,"yhlevel",t)},expression:"listQuery.yhlevel"}},e._l(e.yhlevelList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),a("div",{staticClass:"basic_search"},[a("span",[e._v("区域:")]),e._v(" "),a("el-select",{attrs:{clearable:"",filterable:""},on:{change:function(t){e.changeArea("province")}},model:{value:e.listQuery.province,callback:function(t){e.$set(e.listQuery,"province",t)},expression:"listQuery.province"}},e._l(e.provinceList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.name}})}))],1),e._v(" "),a("div",{staticClass:"basic_search"},[a("el-select",{attrs:{prop:"city",clearable:"",filterable:""},on:{change:function(t){e.changeArea("city")}},model:{value:e.listQuery.city,callback:function(t){e.$set(e.listQuery,"city",t)},expression:"listQuery.city"}},e._l(e.cityList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.name}})}))],1),e._v(" "),a("div",{staticClass:"basic_search"},[a("el-select",{attrs:{clearable:"",filterable:""},on:{change:function(t){e.changeArea("district")}},model:{value:e.listQuery.district,callback:function(t){e.$set(e.listQuery,"district",t)},expression:"listQuery.district"}},e._l(e.districtList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.name}})}))],1),e._v(" "),a("div",{staticClass:"basic_search"},[a("el-select",{attrs:{clearable:"",filterable:""},on:{change:function(t){e.changeArea("street")}},model:{value:e.listQuery.street,callback:function(t){e.$set(e.listQuery,"street",t)},expression:"listQuery.street"}},e._l(e.streetList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.name}})}))],1),e._v(" "),a("div",{staticClass:"basic_search"},[a("el-select",{attrs:{clearable:"",filterable:""},model:{value:e.listQuery.committee,callback:function(t){e.$set(e.listQuery,"committee",t)},expression:"listQuery.committee"}},e._l(e.committeeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.name}})}))],1),e._v(" "),a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px","margin-top":"10px"},attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:e.refreshHandle}},[e._v("搜索")]),e._v(" "),a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px","margin-top":"10px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(t){e.showSelfCheckForm("","新增")}}},[e._v("新增")]),e._v(" "),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-download"},on:{click:e.exportToExcel}},[e._v("导出")])],1)]),e._v(" "),a("div",{staticClass:"table_content"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.selfCheckData,border:"",fit:"","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"企业名称",prop:"ename",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"自查问题隐患描述",prop:"yhdesc",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"检查时间",prop:"endtime",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"隐患等级",prop:"yhlevel",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.yhlevelList,function(s){return a("div",[a("div",{directives:[{name:"show",rawName:"v-show",value:s.id===t.row.yhlevel,expression:"item.id === scope.row.yhlevel"}]},[e._v(e._s(s.name))])])})}}])}),e._v(" "),a("el-table-column",{attrs:{label:"整改措施",prop:"solution",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"整改资金(元)",prop:"price",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"责任人",prop:"chargeperson",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"隐患状态",prop:"status",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.statusList,function(s){return a("div",[a("div",{directives:[{name:"show",rawName:"v-show",value:t.row.status===s.id,expression:"scope.row.status === item.id"}]},[a("el-tag",{attrs:{type:1===t.row.status?"danger":"success"}},[e._v("\n "+e._s(s.name)+"\n ")])],1)])})}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"280","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"show",rawName:"v-show",value:1===t.row.status,expression:"scope.row.status === 1"}],attrs:{type:"text"},on:{click:function(a){e.showSelfCheckForm(t.row,"编辑")}}},[e._v("编辑")])]}}])})],1),e._v(" "),a("br"),e._v(" "),a("el-pagination",{directives:[{name:"show",rawName:"v-show",value:e.pageTotal>0,expression:"pageTotal>0"}],staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-sizes":[10,20,30,50],"page-size":e.pageSize,total:e.recordTotal,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}),e._v(" "),a("br")],1),e._v(" "),a("el-dialog",{attrs:{title:e.title,visible:e.selfCheckVisible,"modal-append-to-body":!1,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(t){e.selfCheckVisible=t}}},[a("el-form",{ref:"selfCheckForm",attrs:{rules:e.selfCheckFormRules,model:e.selfCheckForm,"label-position":"right","label-width":"165px"}},[a("el-form-item",{attrs:{label:"自查问题隐患描述",prop:"yhdesc"}},[a("el-input",{staticClass:"analyseUnit_input",attrs:{type:"textarea",row:2},model:{value:e.selfCheckForm.yhdesc,callback:function(t){e.$set(e.selfCheckForm,"yhdesc",t)},expression:"selfCheckForm.yhdesc"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"检查时间",prop:"endtime"}},[a("el-date-picker",{staticClass:"analyseUnit_input",attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetime",placeholder:"请选择检查时间"},model:{value:e.selfCheckForm.endtime,callback:function(t){e.$set(e.selfCheckForm,"endtime",t)},expression:"selfCheckForm.endtime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"隐患等级",prop:"yhlevel"}},[a("el-select",{staticClass:"analyseUnit_input",model:{value:e.selfCheckForm.yhlevel,callback:function(t){e.$set(e.selfCheckForm,"yhlevel",t)},expression:"selfCheckForm.yhlevel"}},e._l(e.yhlevelList,function(e){return a("el-option",{key:e.id,attrs:{value:e.id,label:e.name}})}))],1),e._v(" "),a("el-form-item",{attrs:{label:"整改措施",prop:"solution"}},[a("el-input",{staticClass:"analyseUnit_input",attrs:{type:"textarea",row:2},model:{value:e.selfCheckForm.solution,callback:function(t){e.$set(e.selfCheckForm,"solution",t)},expression:"selfCheckForm.solution"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"整改资金(元)",prop:"price"}},[a("el-input",{staticClass:"analyseUnit_input",attrs:{type:"number",step:"0.01"},model:{value:e.selfCheckForm.price,callback:function(t){e.$set(e.selfCheckForm,"price",t)},expression:"selfCheckForm.price"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"责任人",prop:"chargeperson"}},[a("el-input",{staticClass:"analyseUnit_input",model:{value:e.selfCheckForm.chargeperson,callback:function(t){e.$set(e.selfCheckForm,"chargeperson",t)},expression:"selfCheckForm.chargeperson"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"隐患状态",prop:"status"}},[a("el-select",{staticClass:"analyseUnit_input",model:{value:e.selfCheckForm.status,callback:function(t){e.$set(e.selfCheckForm,"status",t)},expression:"selfCheckForm.status"}},e._l(e.statusList,function(e){return a("el-option",{key:e.id,attrs:{value:e.id,label:e.name}})}))],1)],1),e._v(" "),a("div",{attrs:{align:"right"}},[a("el-button",{on:{click:function(t){e.selfCheckVisible=!1}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitSelfCheck()}}},[e._v("确认")])],1)],1)],1)},[],!1,null,"22cff4c1",null);k.options.__file="safetyRiskTroubleStatistics.vue";t.default=k.exports},kxf1:function(e,t,a){"use strict";var s=a("YjeI");a.n(s).a}}]);
|