Your Name
2022-10-25 df7046445cfdb39857f9fe1dc747ab04a61c860e
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-4fc3"],{"6jkF":function(t,e,n){"use strict";var a=n("Zl/u");n.n(a).a},GiRh:function(t,e,n){t.exports={default:n("k2L4"),__esModule:!0}},S3Oy:function(t,e,n){var a=n("Xp5O"),i=n("S5+y"),r=n("iorM"),o=n("DMUv").f;t.exports=function(t){return function(e){for(var n,l=r(e),s=i(l),c=s.length,u=0,h=[];c>u;)n=s[u++],a&&!o.call(l,n)||h.push(t?[n,l[n]]:l[n]);return h}}},UyGd:function(t,e,n){"use strict";n.d(e,"j",function(){return r}),n.d(e,"h",function(){return o}),n.d(e,"i",function(){return l}),n.d(e,"l",function(){return s}),n.d(e,"e",function(){return c}),n.d(e,"k",function(){return u}),n.d(e,"f",function(){return h}),n.d(e,"c",function(){return d}),n.d(e,"b",function(){return f}),n.d(e,"d",function(){return p}),n.d(e,"a",function(){return m}),n.d(e,"g",function(){return b});var a=n("X4fA"),i=n("t3Un");function r(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetySelfInspection/page",method:"post",data:t})}function o(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetySelfInspection/info",method:"post",data:t})}function l(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetySelfInspection/itemInfo",method:"post",data:t})}function s(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetySelfInspection/modItemInfo",method:"post",data:t})}function c(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetySelfInspection/add",method:"post",data:t})}function u(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetySelfInspection/mod",method:"post",data:t})}function h(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetySelfInspection/del",method:"post",data:t})}function d(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/elementManagement/getElementTree",method:"post",data:t})}function f(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/getUserList",method:"post",data:t})}function p(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetyInspectionItem/infoElementA",method:"post",data:t})}function m(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetyInspectionItem/info",method:"post",data:t})}function b(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.22:8006/zhongtai/safetySelfInspection/finish",method:"post",data:t})}},"Zl/u":function(t,e,n){},if6n:function(t,e,n){"use strict";n.r(e);var a=n("GiRh"),i=n.n(a),r=n("NNB3"),o=n("UyGd"),l={components:{Titlename:r.a},data:function(){return{dialogVisible:!1,form:{name:""},id:"",formInline:{user:"",region:""},list:[],lists:[],listType:[],typeId:"",remark:""}},created:function(){this.id=this.$route.query.id,this.typeId=this.$route.query.type,this.safeInitem(this.id)},methods:{finish:function(){for(var t=this,e="",n=[],a=0;a<this.listType.length;a++)e=null!=this.listType[a].safetyInspectionItemResult,n.push(e);if(-1==n.indexOf(!1)){this.id;this.$confirm("确定要结单吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.g)({id:t.id}).then(function(e){"200"===e.data.code?(t.$notify({title:"成功",message:"结单成功",type:"success",duration:2e3}),t.$router.push({path:"/safetyproduction/safetyproduction/checklistself"})):t.$message({message:e.data.message,type:"warning"})})}).catch(function(t){})}else alert("所有的检查项评审后才可以结单!")},safeInitem:function(t){var e=this;Object(o.h)({id:t}).then(function(t){200==t.data.code&&(e.list=t.data.result),e.listType=t.data.result.itemList;for(var n=e.checkSameDataA(e.list.itemList),a=0;a<n.length;a++)n[a].child=e.checkSameData(n[a].child),n[a].elementAWeight=n[a].child[0].elementAWeight,n[a].child.points=n[a].child.point;e.lists=n;for(var i="",r=0;r<n.length;r++)r<n.length-1?i+="("+n[r].elementAName+" * "+n[r].elementAWeight+") + ":i+="("+n[r].elementAName+" * "+n[r].elementAWeight+")";if(e.remark+=i,2==e.typeId){for(var o="",l=" = ",s=0,c=0;c<n.length;c++){var u=n[c].child;o=0;for(var h=0;h<u.length;h++)o+=u[h].point;s+=o*n[c].elementAWeight,c<n.length-1?l+="("+o+" * "+n[c].elementAWeight+") + ":l+="("+o+" * "+n[c].elementAWeight+") = "}l+=s,e.remark+=l}})},checkSameDataA:function(t){var e={};return t.forEach(function(t,n){var a=t.elementAName;e[a]||(e[a]={elementAName:a,elementAWeight:"",child:[]}),e[a].child.push(t)}),i()(e)},checkSameData:function(t){var e={};t.forEach(function(t,n){var a=t.elementBName;e[a]||(e[a]={elementBName:a,point:"",elementAWeight:t.elementAWeight,points:t.point,child:[]}),e[a].child.push(t)});for(var n=i()(e),a=0;a<n.length;a++){for(var r=n[a].points,o=0;o<n[a].child.length;o++)if(0!=n[a].child[o].safetyInspectionItemResult)for(var l=0;l<n[a].child[o].selfDeductionList.length;l++)r-=n[a].child[o].selfDeductionList[l].point;else{r=0}n[a].point=r>0?r:0}return n},handleClick:function(t){this.$router.push({path:"/review",query:{idC:t.id,id:this.id}})}}},s=(n("6jkF"),n("ZrdR")),c=Object(s.a)(l,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"box-right"},[2!=t.typeId?n("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:function(e){t.finish()}}},[t._v("结单")]):t._e(),t._v(" "),n("div",{staticClass:"point"},[t._v("\n          所有A级要素总分= "+t._s(t.remark)+"\n      ")]),t._v(" "),t._l(t.lists,function(e,a){return n("div",{key:a,staticStyle:{padding:"0 0 20px 0"}},[n("div",{staticClass:"title"},[t._v("\n        A级要素:"),n("span",[t._v(t._s(e.elementAName))])]),t._v(" "),t._l(e.child,function(e,a){return n("div",{key:a},[n("el-row",{staticClass:"titles"},[n("el-col",{attrs:{span:6}},[n("p",[n("span",[t._v("B级要素:")]),t._v(t._s(e.elementBName))])]),t._v(" "),n("el-col",{attrs:{span:6}},[n("p",[n("span",[t._v("总分:")]),t._v(t._s(e.points))])]),t._v(" "),n("el-col",{attrs:{span:6}},[n("p",[n("span",[t._v("得分:")]),t._v(t._s(e.point))])])],1),t._v(" "),n("el-row",[n("el-col",{attrs:{span:24}},[n("el-table",{attrs:{border:"",data:e.child,"header-cell-style":{background:"#eef1f6",color:"#606266"},"cell-style":{background:"#fff",color:"#606266"}}},[n("el-table-column",{attrs:{prop:"standardizationRequirements",align:"center",label:"标准化要求"}}),t._v(" "),n("el-table-column",{attrs:{prop:"enterpriseStandard",align:"center",label:"企业达标标准"}}),t._v(" "),n("el-table-column",{attrs:{prop:"reviewMethod",align:"center",label:"评审方法"}}),t._v(" "),n("el-table-column",{attrs:{prop:"veto",align:"center",label:"否决项"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"评审结果"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.safetyInspectionItemResult?n("span",[t._v("否决")]):t._e(),t._v(" "),1==e.row.safetyInspectionItemResult?n("span",[t._v("扣分")]):t._e()]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"扣分项",type:"expand",width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-table",{attrs:{data:e.row.selfDeductionList,border:"","header-cell-style":{background:"#eef1f6",color:"#606266"},"cell-style":{background:"#fff",color:"#606266"}}},[n("el-table-column",{attrs:{prop:"name",align:"center",label:"扣分项"}}),t._v(" "),n("el-table-column",{attrs:{prop:"point",align:"center",label:"扣分"}}),t._v(" "),n("el-table-column",{attrs:{prop:"remark",align:"center",label:"扣分备注"}})],1)]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"remark",align:"center",label:"备注"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作",width:"200px"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text",size:"small",disabled:2==t.typeId},on:{click:function(n){t.handleClick(e.row)}}},[t._v("评审")])]}}])})],1)],1)],1)],1)})],2)})],2)])},[],!1,null,"44d0376e",null);c.options.__file="gojudging.vue";e.default=c.exports},k2L4:function(t,e,n){n("tCn3"),t.exports=n("zpmP").Object.values},tCn3:function(t,e,n){var a=n("fCtq"),i=n("S3Oy")(!1);a(a.S,"Object",{values:function(t){return i(t)}})}}]);