Your Name
2022-09-29 6f954f70f54e492157b97db314eaaaeb12192580
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-581c"],{"4USf":function(e,r,a){"use strict";var t=a("8OAN");a.n(t).a},"8OAN":function(e,r,a){},LiUj:function(e,r,a){"use strict";a.r(r);var t=a("cLjf"),o=a.n(t),l=a("YReu"),i=a.n(l),s=a("omC7"),n=a.n(s),c=a("hDQ3"),m=a.n(c),p=a("3sVZ"),u={name:"spaceForm",components:{},props:["workerList","departList"],data:function(){return{form:{operatorUids:[],workType:2,workLevel:0,workContent:"",workLocation:"",workDetail:{csDepId:null,csName:"",csOriginalName:"",otherSpecialWork:[]},workTimeLine:[],expStartTime:"",hazardIdentification:"",expEndTime:""},csDepList:[{label:"单位一",value:1},{label:"单位二",value:2},{label:"单位三",value:3},{label:"单位四",value:4},{label:"单位五",value:5},{label:"单位六",value:6}],otherWorkList:[{label:"动火作业",value:1},{label:"受限空间作业",value:2},{label:"吊装作业",value:3},{label:"动土作业",value:4},{label:"断路作业",value:5},{label:"高处作业",value:6},{label:"临时用电作业",value:7},{label:"盲板抽堵作业",value:8}],applyRules:{operatorUids:[{required:!0,message:"该内容不能为空",trigger:"change"}],workType:[{required:!0,message:"该内容不能为空",trigger:"change"}],workContent:[{required:!0,message:"该内容不能为空",trigger:"blur"}],hazardIdentification:[{required:!0,message:"该内容不能为空",trigger:"blur"}],workLocation:[{required:!0,message:"该内容不能为空",trigger:"blur"}],workTimeLine:[{required:!0,message:"该内容不能为空",trigger:"blur"}],"workDetail.csDepId":[{required:!0,message:"该内容不能为空",trigger:"blur"}],"workDetail.csName":[{required:!0,message:"该内容不能为空",trigger:"blur"}],"workDetail.csOriginalName":[{required:!0,message:"该内容不能为空",trigger:"blur"}]}}},methods:{submitForm:function(){var e=this;this.$refs.ruleFormRef.validate(function(){var r=m()(o.a.mark(function r(a,t){var l,s,c;return o.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!a){r.next=12;break}return e.form.expStartTime=JSON.parse(n()(e.form.workTimeLine))[0],e.form.expEndTime=JSON.parse(n()(e.form.workTimeLine))[1],l=JSON.parse(n()(e.form)),l.workTimeLine,(s=i()(l,["workTimeLine"])).workDetail.otherSpecialWork=s.workDetail.otherSpecialWork.join(","),console.log(s,"data"),r.next=8,Object(p.a)().postSpaceApply(s);case 8:"200"===(c=r.sent).data.code?(e.$message({type:"success",message:"提交成功!"}),e.$refs.ruleFormRef.clearValidate(),e.form={operatorUids:[],workType:2,workLevel:0,workContent:"",workLocation:"",workDetail:{csDepId:null,csName:"",csOriginalName:"",otherSpecialWork:[]},workTimeLine:[],expStartTime:"",hazardIdentification:"",expEndTime:""}):e.$message({type:"warning",message:c.data.msg}),r.next=13;break;case 12:console.log("error submit!",t);case 13:case"end":return r.stop()}},r,e)}));return function(e,a){return r.apply(this,arguments)}}())}}},f=(a("4USf"),a("ZrdR")),d=Object(f.a)(u,function(){var e=this,r=e.$createElement,a=e._self._c||r;return a("div",{staticClass:"home-container"},[a("div",{staticStyle:{height:"100%"}},[a("el-form",{ref:"ruleFormRef",attrs:{model:e.form,"label-width":"150px",rules:e.applyRules}},[a("div",{staticClass:"homeCard"},[a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"作业人",prop:"operatorUids"}},[a("el-select",{attrs:{multiple:""},model:{value:e.form.operatorUids,callback:function(r){e.$set(e.form,"operatorUids",r)},expression:"form.operatorUids"}},e._l(e.workerList,function(e){return a("el-option",{key:e.id,attrs:{label:e.realname+"("+e.username.toString().replace(/^(\d{3})\d{4}(\d{4})$/,"$1****$2")+")",value:e.id}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"作业内容",prop:"workContent"}},[a("el-input",{attrs:{autosize:"",type:"textarea",placeholder:"请输入作业内容"},model:{value:e.form.workContent,callback:function(r){e.$set(e.form,"workContent",r)},expression:"form.workContent"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"作业时间",prop:"workTimeLine"}},[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetimerange","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:e.form.workTimeLine,callback:function(r){e.$set(e.form,"workTimeLine",r)},expression:"form.workTimeLine"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"作业地址",prop:"workLocation"}},[a("el-input",{attrs:{autosize:"",type:"textarea",placeholder:"请输入作业地址"},model:{value:e.form.workLocation,callback:function(r){e.$set(e.form,"workLocation",r)},expression:"form.workLocation"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"受限空间所属单位",prop:"workDetail.csDepId"}},[a("el-select",{model:{value:e.form.workDetail.csDepId,callback:function(r){e.$set(e.form.workDetail,"csDepId",r)},expression:"form.workDetail.csDepId"}},e._l(e.departList,function(e){return a("el-option",{key:e.id,attrs:{label:e.department,value:e.id}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"受限空间名称",prop:"workDetail.csName"}},[a("el-input",{attrs:{autosize:"",type:"textarea",placeholder:"请输入"},model:{value:e.form.workDetail.csName,callback:function(r){e.$set(e.form.workDetail,"csName",r)},expression:"form.workDetail.csName"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"空间内原有介质",prop:"workDetail.csOriginalName"}},[a("el-input",{attrs:{autosize:"",type:"textarea",placeholder:"请输入"},model:{value:e.form.workDetail.csOriginalName,callback:function(r){e.$set(e.form.workDetail,"csOriginalName",r)},expression:"form.workDetail.csOriginalName"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"危险辨识",prop:"hazardIdentification"}},[a("el-input",{attrs:{autosize:"",type:"textarea",placeholder:"请输入危险辨识"},model:{value:e.form.hazardIdentification,callback:function(r){e.$set(e.form,"hazardIdentification",r)},expression:"form.hazardIdentification"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"关联作业",prop:"workDetail.otherSpecialWork"}},[a("el-select",{attrs:{multiple:""},model:{value:e.form.workDetail.otherSpecialWork,callback:function(r){e.$set(e.form.workDetail,"otherSpecialWork",r)},expression:"form.workDetail.otherSpecialWork"}},e._l(e.otherWorkList,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1)],1)],1)],1)]),e._v(" "),a("div",{staticClass:"applyBtn"},[a("el-button",{attrs:{type:"primary",size:"large",plain:""},on:{click:function(r){e.submitForm()}}},[e._v("发起申请")])],1)],1)])},[],!1,null,"d2d57414",null);d.options.__file="space.vue";r.default=d.exports},YReu:function(e,r,a){"use strict";r.__esModule=!0,r.default=function(e,r){var a={};for(var t in e)r.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a}}}]);