(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-8c29"],{DWdD:function(t,e,a){"use strict";a.d(e,"d",function(){return r}),a.d(e,"f",function(){return n}),a.d(e,"g",function(){return l}),a.d(e,"a",function(){return d}),a.d(e,"j",function(){return c}),a.d(e,"i",function(){return u}),a.d(e,"e",function(){return o}),a.d(e,"h",function(){return h}),a.d(e,"b",function(){return f}),a.d(e,"c",function(){return p});var i=a("t3Un"),s=a("X4fA");function r(){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/menu",method:"get"})}function n(t,e){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/checkList?id="+t+"&level="+e,method:"get"})}function l(t,e){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/report?id="+t+"&code="+e,method:"get"})}function d(t){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/check",method:"post",data:t})}function c(t){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/putreport",method:"post",data:t})}function u(t){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/upload",method:"post",data:t})}function o(t){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/report",method:"post",data:t})}function h(t){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/viewReport?code="+t,method:"get"})}function f(t){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/commit?code="+t,method:"get"})}function p(t){return Object(i.a)({headers:{Authorization:Object(s.a)()},url:"http://39.104.85.193:4105/hiddenDanger/export/report",method:"post",data:t})}},YjTO:function(t,e,a){"use strict";var i=a("cd+n");a.n(i).a},"cd+n":function(t,e,a){},"fR+o":function(t,e,a){"use strict";a.r(e);var i=a("gDS+"),s=a.n(i),r=a("14Xm"),n=a.n(r),l=a("D3Ub"),d=a.n(l),c=a("DWdD"),u={name:"addSelfExam",data:function(){return{tableKey:"",id:"",level:"",test:"1",updateId:"",MenuList:[],dataList:[],tableData:[],answer:{findtime:"",level:"",memo:"",rectifycompletedate:"",rectifydeadline:"",rectifymeasure:"",rectifyprincipal:"",rectifystatus:"",resultid:"",url:""},dataForm:{applyperson:"",reportcode:"",reportid:"",report:[]},addProjectVisible:!1,listLoading:!1,defaultProps:{children:"submenu",label:"name"}}},created:function(){this.getMenuList(),this.getSelfExamList()},watch:{tableData:{handler:function(t,e){this.getSpanArr(this.tableData)},immediate:!0}},methods:{getMenuList:function(){var t=this;return d()(n.a.mark(function e(){var a;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(c.d)();case 2:a=e.sent,t.MenuList=a.data.result;case 4:case"end":return e.stop()}},e,t)}))()},getSelfExamList:function(){var t=this;return d()(n.a.mark(function e(){var a;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.listLoading=!0,"修改"!==t.$route.query.title){e.next=10;break}return t.level=t.$route.query.code,t.dataForm.reportcode=t.$route.query.code,t.dataForm.reportid=t.$route.query.id,e.next=7,Object(c.g)(t.id,t.level);case 7:a=e.sent,e.next=13;break;case 10:return e.next=12,Object(c.f)(t.id,t.level);case 12:a=e.sent;case 13:"200"===a.data.code?(t.dataList=a.data.result,t.tableData=a.data.result):t.$message({type:"warning",message:a.data.message}),t.listLoading=!1;case 15:case"end":return e.stop()}},e,t)}))()},objectSpanMethod:function(t){t.row,t.column;var e=t.rowIndex,a=t.columnIndex;if(0===a||1==a||2===a){var i=this.spanArr[e];return{rowspan:i,colspan:i>0?1:0}}},getSpanArr:function(t){this.spanArr=[],this.pos=0;for(var e=0;e<t.length;e++)0===e?(this.spanArr.push(1),this.pos=0):t[e].checkcontent===t[e-1].checkcontent||t[e].basis===t[e-1].basis||t[e].checkcriteria===t[e-1].checkcriteria?(this.spanArr[this.pos]+=1,this.spanArr.push(0)):(this.spanArr.push(1),this.pos=e)},submitAdd:function(){var t=this;return d()(n.a.mark(function e(){var a,i,r,l;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(i in t.dataForm.report=s()(t.dataList),a=new FormData,t.dataForm)void 0!=t.dataForm[i]&&""!=t.dataForm[i].toString()&&a.append(i,t.dataForm[i]);if("新增"!==t.$route.query.title){e.next=10;break}return e.next=6,Object(c.a)(a);case 6:"200"===(r=e.sent).data.code?(t.$router.go(-1),t.$notify({title:"成功",message:"新增成功",duration:2e3,type:"success"})):t.$message({message:r.data.message,type:"warning"}),e.next=14;break;case 10:return e.next=12,Object(c.j)(a);case 12:"200"===(l=e.sent).data.code?(t.$router.go(-1),t.$notify({title:"成功",message:"修改成功",duration:2e3,type:"success"})):t.$message({message:l.data.message,type:"warning"});case 14:case"end":return e.stop()}},e,t)}))()},addQualifiedProject:function(t,e){if(1==t){for(var a=0;a<this.dataList.length;a++)e.result1==this.dataList[a].result1&&(this.dataList[a].qualified=!0,this.dataList[a].unqualified=!1,this.dataList[a].answer.resultid=this.dataList[a].result1);for(var i=0;i<this.tableData.length;i++)e.result1==this.tableData[i].result1&&(this.tableData[i].qualified=!0,this.tableData[i].unqualified=!1,this.tableData[i].answer.resultid=this.tableData[i].result1)}else if(0==t){for(var s=0;s<this.dataList.length;s++)e.result1==this.dataList[s].result1&&(this.dataList[s].qualified=!1);for(var r=0;r<this.tableData.length;r++)e.result1==this.tableData[r].result1&&(this.tableData[r].qualified=!1)}},addUnqualifiedProject:function(t,e){if(1==t){this.addProjectVisible=!0,this.updateId=e.result1;for(var a=0;a<this.dataList.length;a++)this.dataList[a].result1==e.result1&&(null==this.dataList[a].answer.findtime?this.answer.findtime="":this.answer.findtime=this.dataList[a].answer.findtime,null==this.dataList[a].answer.level?this.answer.level="":this.answer.level=this.dataList[a].answer.level,null==this.dataList[a].answer.memo?this.answer.memo="":this.answer.memo=this.dataList[a].answer.memo,null==this.dataList[a].answer.rectifycompletedate?this.answer.rectifycompletedate="":this.answer.rectifycompletedate=this.dataList[a].answer.rectifycompletedate,null==this.dataList[a].answer.rectifydeadline?this.answer.rectifydeadline="":this.answer.rectifydeadline=this.dataList[a].answer.rectifydeadline,null==this.dataList[a].answer.rectifymeasure?this.answer.rectifymeasure="":this.answer.rectifymeasure=this.dataList[a].answer.rectifymeasure,null==this.dataList[a].answer.rectifyprincipal?this.answer.rectifyprincipal="":this.answer.rectifyprincipal=this.dataList[a].answer.rectifyprincipal,null==this.dataList[a].answer.rectifystatus?this.answer.rectifystatus="":this.answer.rectifystatus=this.dataList[a].answer.rectifystatus,null==this.dataList[a].answer.url?this.answer.url="":this.answer.url=this.dataList[a].answer.url,this.dataList[a].unqualified=!0,this.dataList[a].qualified=!1);for(var i=0;i<this.tableData.length;i++)e.result1==this.tableData[i].result1&&(null==this.dataList[i].answer.findtime?this.answer.findtime="":this.answer.findtime=this.dataList[i].answer.findtime,null==this.dataList[i].answer.level?this.answer.level="":this.answer.level=this.dataList[i].answer.level,null==this.dataList[i].answer.memo?this.answer.memo="":this.answer.memo=this.dataList[i].answer.memo,null==this.dataList[i].answer.rectifycompletedate?this.answer.rectifycompletedate="":this.answer.rectifycompletedate=this.dataList[i].answer.rectifycompletedate,null==this.dataList[i].answer.rectifydeadline?this.answer.rectifydeadline="":this.answer.rectifydeadline=this.dataList[i].answer.rectifydeadline,null==this.dataList[i].answer.rectifymeasure?this.answer.rectifymeasure="":this.answer.rectifymeasure=this.dataList[i].answer.rectifymeasure,null==this.dataList[i].answer.rectifyprincipal?this.answer.rectifyprincipal="":this.answer.rectifyprincipal=this.dataList[i].answer.rectifyprincipal,null==this.dataList[i].answer.rectifystatus?this.answer.rectifystatus="":this.answer.rectifystatus=this.dataList[i].answer.rectifystatus,null==this.dataList[i].answer.url?this.answer.url="":this.answer.url=this.dataList[i].answer.url,this.tableData[i].unqualified=!0,this.tableData[i].qualified=!1)}else{for(var s=0;s<this.dataList.length;s++)e.result1==this.dataList[s].result1&&(this.dataList[s].unqualified=!1);for(var r=0;r<this.tableData.length;r++)e.result1==this.tableData[r].result1&&(this.tableData[r].unqualified=!1)}},submit:function(){this.addProjectVisible=!1;for(var t=0;t<this.dataList.length;t++)this.updateId==this.dataList[t].result1&&(this.dataList[t].answer.unqualified=!0,this.dataList[t].answer.findtime=this.answer.findtime,this.dataList[t].answer.level=this.answer.level,this.dataList[t].answer.memo=this.answer.memo,this.dataList[t].answer.rectifycompletedate=this.answer.rectifycompletedate,this.dataList[t].answer.rectifydeadline=this.answer.rectifydeadline,this.dataList[t].answer.rectifymeasure=this.answer.rectifymeasure,this.dataList[t].answer.rectifyprincipal=this.answer.rectifyprincipal,this.dataList[t].answer.rectifystatus=this.answer.rectifystatus,this.dataList[t].answer.resultid=this.dataList[t].result0);for(var e=0;e<this.tableData.length;e++)this.updateId==this.tableData[e].result1&&(this.tableData[e].answer.unqualified=!0,this.tableData[e].answer.findtime=this.answer.findtime,this.tableData[e].answer.level=this.answer.level,this.tableData[e].answer.memo=this.answer.memo,this.tableData[e].answer.rectifycompletedate=this.answer.rectifycompletedate,this.tableData[e].answer.rectifydeadline=this.answer.rectifydeadline,this.tableData[e].answer.rectifymeasure=this.answer.rectifymeasure,this.tableData[e].answer.rectifyprincipal=this.answer.rectifyprincipal,this.tableData[e].answer.rectifystatus=this.answer.rectifystatus,this.tableData[e].answer.resultid=this.tableData[e].result0)},cancel:function(){this.addProjectVisible=!1;for(var t=0;t<this.dataList.length;t++)this.updateId==this.dataList[t].result1&&(this.dataList[t].unqualified=!1);for(var e=0;e<this.tableData.length;e++)this.updateId==this.dataList[e].result1&&(this.tableData[e].unqualified=!1)},handleNodeClick:function(t){if(this.tableData=[],"基础管理"===t.name)for(var e=0;e<this.dataList.length;e++)3!=this.dataList[e].parentmenuid&&4!=this.dataList[e].parentmenuid&&5!=this.dataList[e].parentmenuid&&6!=this.dataList[e].parentmenuid&&7!=this.dataList[e].parentmenuid&&8!=this.dataList[e].parentmenuid&&9!=this.dataList[e].parentmenuid&&10!=this.dataList[e].parentmenuid&&11!=this.dataList[e].parentmenuid&&12!=this.dataList[e].parentmenuid&&13!=this.dataList[e].parentmenuid||this.tableData.push(this.dataList[e]);else if("现场管理"===t.name)for(var a=0;a<this.dataList.length;a++)14!=this.dataList[a].parentmenuid&&15!=this.dataList[a].parentmenuid&&16!=this.dataList[a].parentmenuid&&17!=this.dataList[a].parentmenuid||this.tableData.push(this.dataList[a]);for(var i=0;i<this.dataList.length;i++)t.id==this.dataList[i].parentmenuid&&this.tableData.push(this.dataList[i])},uploadFile:function(){var t=this;return d()(n.a.mark(function e(){var a,i,s,r,l,d;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.$refs.upload.files,i=new FormData,a&&a.length>0)for(s=0;s<a.length;s++)i.append("file",a[s]);return e.next=5,Object(c.i)(i);case 5:if("200"===(r=e.sent).data.code){for(l=0;l<t.tableData.length;l++)t.updateId==t.tableData[l].result1&&(t.tableData[l].answer.url=r.data.result);for(d=0;d<t.dataList.length;d++)t.updateId==t.dataList[d].result1&&(t.dataList[d].answer.url=r.data.result);t.$message({title:"成功",message:"上传成功",type:"success",duration:2e3})}case 7:case"end":return e.stop()}},e,t)}))()},goBefore:function(){this.$router.go(-1)}}},o=(a("YjTO"),a("KHd+")),h=Object(o.a)(u,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("div",{staticStyle:{"margin-bottom":"10px"}},[i("img",{staticStyle:{width:"30px",height:"30px"},attrs:{src:a("zP6w"),align:"left"},on:{click:function(e){t.goBefore()}}})]),t._v(" "),i("div",{staticClass:"filter-container"},[i("div",{staticClass:"addSelfExam_tree"},[i("el-tree",{ref:"tree",staticClass:"right",staticStyle:{"overflow-y":"scroll"},attrs:{data:t.MenuList,props:t.defaultProps,"highlight-current":"","default-expand-all":""},on:{"node-click":t.handleNodeClick}}),t._v(" "),i("div",{staticClass:"left"},[i("div",[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],key:t.tableKey,attrs:{data:t.tableData,"span-method":t.objectSpanMethod,border:""}},[i("el-table-column",{attrs:{prop:"checkcontent",label:"检查内容",align:"center"}}),t._v(" "),i("el-table-column",{attrs:{prop:"checkcriteria",label:"检查标准",align:"center"}}),t._v(" "),i("el-table-column",{attrs:{prop:"basis",label:"参考依据",align:"center"}}),t._v(" "),i("el-table-column",{attrs:{label:"检查情况",align:"center"}},[i("el-table-column",{attrs:{prop:"checkresult1",label:"合格项目"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-checkbox",{attrs:{label:e.row.checkresult1},on:{change:function(a){t.addQualifiedProject(a,e.row)}},model:{value:e.row.qualified,callback:function(a){t.$set(e.row,"qualified",a)},expression:"scope.row.qualified"}})]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"checkresult0",label:"不合格项目"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-checkbox",{attrs:{label:e.row.checkresult0},on:{change:function(a){t.addUnqualifiedProject(a,e.row)}},model:{value:e.row.unqualified,callback:function(a){t.$set(e.row,"unqualified",a)},expression:"scope.row.unqualified"}})]}}])})],1)],1)],1),t._v(" "),i("div",{staticStyle:{"margin-top":"10px","margin-right":"10px"},attrs:{align:"right"}},[i("div",{staticClass:"basic_search"},[i("span",[t._v("申报人名称:")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.dataForm.applyperson,expression:"dataForm.applyperson"}],domProps:{value:t.dataForm.applyperson},on:{input:function(e){e.target.composing||t.$set(t.dataForm,"applyperson",e.target.value)}}})]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitAdd()}}},[t._v("确认")])],1)])],1)]),t._v(" "),i("el-dialog",{attrs:{visible:t.addProjectVisible,"append-to-body":"","close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.addProjectVisible=e}}},[i("el-form",{attrs:{model:t.answer,"label-position":"right","label-width":"140px",width:"600px"}},[i("el-form-item",{attrs:{label:"发现日期:"}},[i("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期时间"},model:{value:t.answer.findtime,callback:function(e){t.$set(t.answer,"findtime",e)},expression:"answer.findtime"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"隐患级别:"}},[i("el-radio",{attrs:{label:1},model:{value:t.answer.level,callback:function(e){t.$set(t.answer,"level",e)},expression:"answer.level"}},[t._v("一般隐患")]),t._v(" "),i("el-radio",{attrs:{label:2},model:{value:t.answer.level,callback:function(e){t.$set(t.answer,"level",e)},expression:"answer.level"}},[t._v("重大隐患")])],1),t._v(" "),i("el-form-item",{attrs:{label:"隐患描述:"}},[i("el-input",{model:{value:t.answer.memo,callback:function(e){t.$set(t.answer,"memo",e)},expression:"answer.memo"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"隐患整改情况:"}},[i("el-radio",{attrs:{label:1},model:{value:t.answer.rectifystatus,callback:function(e){t.$set(t.answer,"rectifystatus",e)},expression:"answer.rectifystatus"}},[t._v("正在整改")]),t._v(" "),i("el-radio",{attrs:{label:2},model:{value:t.answer.rectifystatus,callback:function(e){t.$set(t.answer,"rectifystatus",e)},expression:"answer.rectifystatus"}},[t._v("整改到位")])],1),t._v(" "),i("el-form-item",{attrs:{label:"整改期限:"}},[i("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期时间"},model:{value:t.answer.rectifydeadline,callback:function(e){t.$set(t.answer,"rectifydeadline",e)},expression:"answer.rectifydeadline"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"整改措施:"}},[i("el-radio",{attrs:{label:1},model:{value:t.answer.rectifymeasure,callback:function(e){t.$set(t.answer,"rectifymeasure",e)},expression:"answer.rectifymeasure"}},[t._v("立即整改")]),t._v(" "),i("el-radio",{attrs:{label:2},model:{value:t.answer.rectifymeasure,callback:function(e){t.$set(t.answer,"rectifymeasure",e)},expression:"answer.rectifymeasure"}},[t._v("限期整改")]),t._v(" "),i("el-radio",{attrs:{label:3},model:{value:t.answer.rectifymeasure,callback:function(e){t.$set(t.answer,"rectifymeasure",e)},expression:"answer.rectifymeasure"}},[t._v("停产停业整顿")])],1),t._v(" "),i("el-form-item",{attrs:{label:"整改负责人:"}},[i("el-input",{model:{value:t.answer.rectifyprincipal,callback:function(e){t.$set(t.answer,"rectifyprincipal",e)},expression:"answer.rectifyprincipal"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"文件:"}},[i("input",{ref:"upload",attrs:{id:"upload",type:"file"},on:{change:t.uploadFile}})])],1),t._v(" "),i("div",{staticStyle:{"margin-top":"10px"},attrs:{align:"right"}},[i("el-button",{on:{click:t.cancel}},[t._v("取消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submit()}}},[t._v("确认")])],1)],1)],1)},[],!1,null,"39c1c673",null);h.options.__file="addSelfExam.vue";e.default=h.exports},zP6w:function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjE4MjA2OTQwMzg5IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjM4MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PGRlZnM+PHN0eWxlIHR5cGU9InRleHQvY3NzIj48L3N0eWxlPjwvZGVmcz48cGF0aCBkPSJNOTc1Ljc0NCA0NjAuOGMyNi42NDk2IDAgNDguMjU2IDIyLjkxMiA0OC4yNTYgNTEuMiAwIDI3LjQxNzYtMjAuMzEzNiA0OS44MDQ4LTQ1LjgzNjggNTEuMTM2TDk3NS43NDQgNTYzLjJIMTUwLjY0MzJDMTI0LjAwNjQgNTYzLjIgMTAyLjQgNTQwLjI4OCAxMDIuNCA1MTJjMC0yNy40MTc2IDIwLjMxMzYtNDkuODA0OCA0NS44MzY4LTUxLjEzNkwxNTAuNjU2IDQ2MC44aDgyNS4xMTM2eiIgZmlsbD0iIzEyOTZkYiIgcC1pZD0iMzgyNiI+PC9wYXRoPjxwYXRoIGQ9Ik0zNzIuNzYxNiAxNDIuNzk2OGE1Mi4wNDQ4IDUyLjA0NDggMCAwIDEgNzMuMTAwOCAwLjQwOTYgNTAuODU0NCA1MC44NTQ0IDAgMCAxIDEuNTQ4OCA3MC4zNzQ0bC0xLjk1ODQgMi4wMjI0TDE0OC4zNjQ4IDUxMmwyOTcuNDk3NiAyOTYuNzkzNmE1MC44NTQ0IDUwLjg1NDQgMCAwIDEgMS41NjE2IDcwLjM4NzJsLTEuOTcxMiAyLjAyMjRhNTIuMDU3NiA1Mi4wNTc2IDAgMCAxLTcxLjA0IDEuNTM2bC0yLjA2MDgtMS45MzI4TDM2LjczNiA1NDguMzc3NmE1MS4yIDUxLjIgMCAwIDEgMC03Mi43NTUybDMzNi4wMjU2LTMzMi44MjU2eiIgZmlsbD0iIzEyOTZkYiIgcC1pZD0iMzgyNyI+PC9wYXRoPjwvc3ZnPg=="}}]);
|