Your Name
2022-04-08 1f2a259f8cbb7eb0b12d12895116c309eb8cd609
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-331e"],{GiRh:function(t,e,n){t.exports={default:n("k2L4"),__esModule:!0}},Gp3n:function(t,e,n){"use strict";var i=n("YAjj");n.n(i).a},NNB3:function(t,e,n){"use strict";var i={name:"Titlename",props:{title:{type:String,default:"标题"}},data:function(){return{}}},a=(n("Gp3n"),n("ZrdR")),s=Object(a.a)(i,function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"app"},[e("div",{staticClass:"box"},[e("div",{staticClass:"dian"}),this._v(" "),e("div",{staticClass:"net"},[this._v(this._s(this.title))])])])},[],!1,null,"3c99051b",null);s.options.__file="index.vue";e.a=s.exports},NpNS:function(t,e,n){"use strict";n.r(e);var i=n("GiRh"),a=n.n(i),s=n("nKCB"),o=n.n(s),l=n("LGhb"),r=n.n(l),c=n("NNB3"),d=n("UyGd"),u={components:{Titlename:c.a},data:function(){return{dialogVisible:!1,show:!0,form:{inspectionName:"",inspector:"",inspectionTime:"",status:"",itemList:[]},formInline:{user:"",region:""},list:[],lists:[],nameList:[],tree:[],id:"",elementAName:"",arr:[],treeList:[],defaultProps:{children:"children",label:"label"},itemId:"",parent:[],rules:{inspectionName:[{required:!0,message:"自查清单名称不能为空",trigger:"blur"}],inspector:[{required:!0,message:"检查人名称为空",trigger:"blur"}],inspectionTime:[{required:!0,message:"检查时间不能为空",trigger:"blur"}]}}},created:function(){var t=this;this.TreeA(),Object(d.b)().then(function(e){200==e.data.code&&(t.nameList=e.data.result)}),this.id=this.$route.query.name,this.itemId=this.$route.query.id,this.itemInfo(this.$route.query.id)},methods:{itemInfo:function(t){var e=this;Object(d.h)({id:t}).then(function(t){if(200==t.data.code){e.form=t.data.result,e.list=t.data.result;for(var n=[],i=0;i<e.list.itemList.length;i++)n.push(e.list.itemList[i].elementA);e.treeList=r()(new o.a(n));var a=e.checkSameDataA(e.list.itemList);for(i=0;i<a.length;i++){for(var s=[],l=0;l<a[i].child.length;l++){var c={safetySelfInspectionId:"",safetyInspectionItemId:""};a[i].child[l].deductionList=a[i].child[l].selfDeductionList,console.log(a[i].child[l]),c.safetySelfInspectionId=a[i].child[l].safetySelfInspectionId,c.safetyInspectionItemId=a[i].child[l].safetyInspectionItemId,s.push(c)}a[i].id=s,a[i].child=e.checkSameData(a[i].child)}e.lists=a}})},TreeA:function(){var t=this;Object(d.c)().then(function(e){200==e.data.code&&(t.tree=e.data.result)})},TreeB:function(t){var e=this;Object(d.d)({id:t}).then(function(t){if("添加"==e.id){if(200==t.data.code){e.list=t.data.result;var n=[];(a={elementAName:"",id:[],child:[]}).elementAName=e.list[0].elementAName;for(var i=0;i<e.list.length;i++){(s={safetySelfInspectionId:"",safetyInspectionItemId:""}).safetyInspectionItemId=e.list[i].id,n.push(s)}if(a.id=n,a.child=e.checkSameData(e.list),-1==e.lists.findIndex(function(t){return t.elementAName===a.elementAName}))e.lists.push(a);else{i=e.lists.findIndex(function(t){return t.elementAName===a.elementAName});e.lists.splice(i,1)}}}else if("编辑"==e.id&&(e.list=t.data.result,0!=e.list.length)){var a;n=[];(a={elementAName:"",id:[],child:[]}).elementAName=e.list[0].elementAName;for(i=0;i<e.list.length;i++){var s;(s={safetySelfInspectionId:"",safetyInspectionItemId:""}).safetyInspectionItemId=e.list[i].id,s.safetySelfInspectionId=e.itemId,n.push(s)}if(a.id=n,a.child=e.checkSameData(e.list),-1==e.lists.findIndex(function(t){return t.elementAName===a.elementAName}))e.lists.push(a);else{i=e.lists.findIndex(function(t){return t.elementAName===a.elementAName});e.lists.splice(i,1)}}})},checkSameDataA:function(t){var e={};return t.forEach(function(t,n){var i=t.elementAName;e[i]||(e[i]={elementAName:i,id:{},child:[]}),e[i].child.push(t)}),a()(e)},checkSameData:function(t){var e={};return t.forEach(function(t,n){var i=t.elementBName;e[i]||(e[i]={elementBName:i,child:[]}),e[i].child.push(t)}),a()(e)},treeClick:function(t){this.TreeB(t.value)},handleClick:function(t){void 0!=t.safetyInspectionItemId?this.$router.push({path:"/reviewXG",query:{idX:t.safetyInspectionItemId,name:this.id,id:this.itemId}}):this.$router.push({path:"/reviewXG",query:{idX:t.id,name:this.id,id:this.itemId}})},open:function(t){this.dialogVisible=!0,this.form.status=t;for(var e=[],n=0;n<this.lists.length;n++)for(var i=0;i<this.lists[n].id.length;i++)e.push(this.lists[n].id[i]);this.form.itemList=e},closeDialog:function(){this.dialogVisible=!1},addC:function(){var t=this;this.$refs.form.validate(function(e){e&&("添加"==t.id?(console.log("添加",t.form),Object(d.e)(t.form).then(function(e){200==e.data.code&&(t.dialogVisible=!1,t.$notify({type:"success",duration:2e3,message:"新增成功",title:"成功"}),t.$router.push({path:"/checklistself"}))})):"编辑"==t.id&&(console.log("编辑",t.form),Object(d.k)(t.form).then(function(e){t.dialogVisible=!1,t.$notify({type:"success",duration:2e3,message:"编辑成功",title:"成功"})}),t.$router.push({path:"/checklistself"})))})},btnsQX:function(){this.show=!0}}},f=(n("vO1D"),n("ZrdR")),h=Object(f.a)(u,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"box"},[n("div",{staticClass:"box-left"},[n("Titlename",{attrs:{title:"检查项树"}}),t._v(" "),n("div",{staticClass:"box-left-content"},[n("el-tree",{ref:"tree",attrs:{data:t.tree,"node-key":"value","expand-on-click-node":!1,"default-checked-keys":t.treeList,"show-checkbox":""},on:{check:t.treeClick}})],1)],1),t._v(" "),""!=t.lists?n("div",{staticClass:"box-right"},[n("div",{staticClass:"btns"},[n("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:function(e){t.open(1)}}},[t._v("添加")]),t._v(" "),n("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:function(e){t.open(0)}}},[t._v("暂存")])],1),t._v(" "),t._l(t.lists,function(e,i){return n("div",{key:i,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,i){return n("div",{key:i},[n("el-row",{staticClass:"titles"},[n("el-col",{attrs:{span:6,offset:1}},[n("p",[n("span",[t._v("B级要素:")]),t._v(t._s(e.elementBName))])])],1),t._v(" "),n("el-row",[n("el-col",{attrs:{span:22,offset:1}},[n("el-table",{ref:"table",refInFor:!0,attrs:{border:"",stripe:!0,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:"name",align:"center",label:"评审标准"}},[n("el-table-column",{attrs:{prop:"veto",align:"center",label:"否决项"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",width:"80px",label:"扣分项",type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-table",{attrs:{border:"",data:e.row.deductionList,"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:"remark",align:"center",label:"扣分备注"}})],1)]}}])})],1),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"},on:{click:function(n){t.handleClick(e.row)}}},[t._v("修改")])]}}])})],1)],1)],1)],1)})],2)})],2):t._e()]),t._v(" "),n("el-dialog",{attrs:{title:t.id,visible:t.dialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("el-form",{ref:"form",attrs:{rules:t.rules,model:t.form,"label-width":"110px"}},[n("el-form-item",{attrs:{label:"自查清单名称",prop:"inspectionName"}},[n("el-input",{model:{value:t.form.inspectionName,callback:function(e){t.$set(t.form,"inspectionName",e)},expression:"form.inspectionName"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"检查人名称",prop:"inspector"}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:t.form.inspector,callback:function(e){t.$set(t.form,"inspector",e)},expression:"form.inspector"}},t._l(t.nameList,function(t){return n("el-option",{key:t.id,attrs:{label:t.realname,value:t.id}})}))],1),t._v(" "),n("el-form-item",{attrs:{label:"时间",prop:"inspectionTime"}},[n("el-col",{attrs:{span:11}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date","value-format":"yyyy-MM-dd",placeholder:"开始时间"},model:{value:t.form.inspectionTime,callback:function(e){t.$set(t.form,"inspectionTime",e)},expression:"form.inspectionTime"}})],1)],1)],1),t._v(" "),n("span",{staticClass:"dialog-footer",staticStyle:{"text-align":"center",display:"block"},attrs:{slot:"footer"},slot:"footer"},[n("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:t.addC}},[t._v("确 定")]),t._v(" "),n("el-button",{on:{click:t.closeDialog}},[t._v("取 消")])],1)],1)],1)},[],!1,null,"f623dd00",null);h.options.__file="new.vue";e.default=h.exports},S3Oy:function(t,e,n){var i=n("Xp5O"),a=n("S5+y"),s=n("iorM"),o=n("DMUv").f;t.exports=function(t){return function(e){for(var n,l=s(e),r=a(l),c=r.length,d=0,u=[];c>d;)n=r[d++],i&&!o.call(l,n)||u.push(t?[n,l[n]]:l[n]);return u}}},UyGd:function(t,e,n){"use strict";n.d(e,"j",function(){return s}),n.d(e,"h",function(){return o}),n.d(e,"i",function(){return l}),n.d(e,"l",function(){return r}),n.d(e,"e",function(){return c}),n.d(e,"k",function(){return d}),n.d(e,"f",function(){return u}),n.d(e,"c",function(){return f}),n.d(e,"b",function(){return h}),n.d(e,"d",function(){return p}),n.d(e,"a",function(){return m}),n.d(e,"g",function(){return b});var i=n("X4fA"),a=n("t3Un");function s(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetySelfInspection/page",method:"post",data:t})}function o(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetySelfInspection/info",method:"post",data:t})}function l(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetySelfInspection/itemInfo",method:"post",data:t})}function r(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetySelfInspection/modItemInfo",method:"post",data:t})}function c(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetySelfInspection/add",method:"post",data:t})}function d(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetySelfInspection/mod",method:"post",data:t})}function u(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetySelfInspection/del",method:"post",data:t})}function f(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/elementManagement/getElementTree",method:"post",data:t})}function h(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/getUserList",method:"post",data:t})}function p(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetyInspectionItem/infoElementA",method:"post",data:t})}function m(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetyInspectionItem/info",method:"post",data:t})}function b(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/safetySelfInspection/finish",method:"post",data:t})}},YAjj:function(t,e,n){},jTVI:function(t,e,n){},k2L4:function(t,e,n){n("tCn3"),t.exports=n("zpmP").Object.values},tCn3:function(t,e,n){var i=n("fCtq"),a=n("S3Oy")(!1);i(i.S,"Object",{values:function(t){return a(t)}})},vO1D:function(t,e,n){"use strict";var i=n("jTVI");n.n(i).a}}]);