(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-364e"],{H5jp:function(t,e,r){"use strict";r.r(e);var n=r("6ZY3"),o=r.n(n),i=r("cLjf"),a=r.n(i),u=r("hDQ3"),s=r.n(u),c=r("jJIE"),h=r.n(c),l=r("sZnh"),f={props:["basicInformation","title"],name:"index",data:function(){return{ifApply:"",ifCompany:"",ifConstruction:"",ifApplyButton:"",ifCompanyButton:"",disabled:"",fileForm:{},header:{Authorization:""},fileRoad:"http://222.92.213.21:8006/zhongtai/task/upload",dialogVisible:!1,dialogImageUrl:"",riskAndDanger:[],safetyOrganizeAction:[],workSecurityAction:[],fileList:[],fileListOne:[],fileListTwo:[],fileListThree:[],uploadForm:{taskcode:"",type:""}}},mounted:function(){this.getFileList()},methods:{onPreview:function(t){var e=this;return s()(a.a.mark(function r(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:window.open("http://222.92.213.21:8006/zhongtai/upload/"+t.fileurl,"_blank");case 1:case"end":return e.stop()}},r,e)}))()},getFileList:function(){var t=this;return s()(a.a.mark(function e(){var r,n,i,u,s;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r={}).taskCode=t.basicInformation.code,e.next=4,Object(l.f)(r);case 4:if("200"===(n=e.sent).data.code){for(i in t.fileList=[],t.fileListOne=[],t.fileListTwo=[],t.fileListThree=[],t.fileList=n.data.result,t.fileList.map(function(t){return o()(t,{name:t.originalname})}),t.fileList)"事故救援预案"===t.fileList[i].type&&t.fileListOne.push(t.fileList[i]);for(u in t.fileList)"作业人员身体健康"===t.fileList[u].type&&t.fileListTwo.push(t.fileList[u]);for(s in t.fileList)"作业资质证书"===t.fileList[s].type&&t.fileListThree.push(t.fileList[s])}case 6:case"end":return e.stop()}},e,t)}))()},submit:function(){this.uploadForm.type="事故救援预案",this.uploadForm.taskcode=this.basicInformation.code,this.header.Authorization=h.a.get("token"),this.$refs.upload.submit()},handlePictureCardPreview:function(t){this.dialogImageUrl=t.url,this.dialogVisible=!0},handleChangeOne:function(t,e){this.uploadForm.type="事故救援预案",this.uploadForm.taskcode=this.basicInformation.code,this.header.Authorization=h.a.get("token")},handleChangeTwo:function(t,e){this.uploadForm.type="作业人员身体健康",this.uploadForm.taskcode=this.basicInformation.code,this.header.Authorization=h.a.get("token")},handleChangeThree:function(t,e){this.uploadForm.type="作业资质证书",this.uploadForm.taskcode=this.basicInformation.code,this.header.Authorization=h.a.get("token")},onSuccess:function(t){"200"===t.code&&(this.$notify({type:"success",duration:2e3,message:"上传成功",title:"成功"}),this.getFileList())},onRemove:function(t,e){var r=this;return this.$confirm("确定移除 "+t.name+"?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var e={};e.id=t.id,Object(l.e)(e).then(function(t){"200"===t.data.code?(r.$notify({type:"success",duration:2e3,message:"删除成功",title:"成功"}),r.getFileList()):r.$message({type:"warning",message:t.data.message})})})},goNext:function(){"施工单位确认"===this.title?this.$emit("changeToConstructionConfirm"):this.$emit("confirmConstruction")}}},d=(r("PnnT"),r("ZrdR")),p=Object(d.a)(f,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("el-form",{ref:"form",attrs:{model:t.fileForm,"label-width":"160px","label-position":"right"}},[t.ifCompany?r("el-form-item",{attrs:{label:"事故救援预案:"}},[r("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{accept:".pdf,.jpg,.png",action:t.fileRoad,headers:t.header,data:t.uploadForm,"on-preview":t.onPreview,"file-list":t.fileListOne}})],1):t._e(),t._v(" "),t.ifConstruction?r("el-form-item",{attrs:{label:"作业人员身体健康:"}},[r("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{accept:".pdf,.jpg,.png",action:t.fileRoad,headers:t.header,data:t.uploadForm,"on-change":t.handleChangeTwo,"auto-upload":!0,"on-remove":t.onRemove,"on-success":t.onSuccess,"on-preview":t.onPreview,"file-list":t.fileListTwo}},[r("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1)],1):t._e(),t._v(" "),t.ifConstruction?r("el-form-item",{attrs:{label:"作业资质证书:"}},[r("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{accept:".pdf,.jpg,.png",action:t.fileRoad,headers:t.header,data:t.uploadForm,"on-change":t.handleChangeThree,"on-remove":t.onRemove,"on-success":t.onSuccess,"auto-upload":!0,"on-preview":t.onPreview,"file-list":t.fileListThree}},[r("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1)],1):t._e()],1),t._v(" "),r("div",{staticStyle:{"padding-top":"20px"},attrs:{align:"center"}},[r("el-button",{attrs:{type:"primary"},on:{click:t.goNext}},[t._v("下一步")])],1),t._v(" "),r("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[r("img",{attrs:{width:"100%",src:t.dialogImageUrl,alt:""}})])],1)},[],!1,null,"1f79a056",null);p.options.__file="constructionFile.vue";e.default=p.exports},PnnT:function(t,e,r){"use strict";var n=r("m9eA");r.n(n).a},cLjf:function(t,e,r){t.exports=r("xOJF")},hDQ3:function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r("Asgo"));e.default=function(t){return function(){var e=t.apply(this,arguments);return new n.default(function(t,r){return function o(i,a){try{var u=e[i](a),s=u.value}catch(t){return void r(t)}if(!u.done)return n.default.resolve(s).then(function(t){o("next",t)},function(t){o("throw",t)});t(s)}("next")})}}},k4Ii:function(t,e){!function(e){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",c="object"==typeof t,h=e.regeneratorRuntime;if(h)c&&(t.exports=h);else{(h=e.regeneratorRuntime=c?t.exports:{}).wrap=w;var l="suspendedStart",f="suspendedYield",d="executing",p="completed",m={},g={};g[a]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(T([])));y&&y!==n&&o.call(y,a)&&(g=y);var b=k.prototype=O.prototype=Object.create(g);j.prototype=b.constructor=k,k.constructor=j,k[s]=j.displayName="GeneratorFunction",h.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===j||"GeneratorFunction"===(e.displayName||e.name))},h.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(b),t},h.awrap=function(t){return{__await:t}},x(z.prototype),z.prototype[u]=function(){return this},h.AsyncIterator=z,h.async=function(t,e,r,n){var o=new z(w(t,e,r,n));return h.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(b),b[s]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},h.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},h.values=T,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(F),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;F(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}}}function w(t,e,r,n){var o=e&&e.prototype instanceof O?e:O,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(a,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var s=L(t,e,r);if("normal"===s.type){if(n=r.done?p:f,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=p,r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function L(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function O(){}function j(){}function k(){}function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function z(t){var e;this._invoke=function(r,n){function i(){return new Promise(function(e,i){!function e(r,n,i,a){var u=L(t[r],t,n);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(c).then(function(t){s.value=t,i(s)},a)}a(u.arg)}(r,n,e,i)})}return e=e?e.then(i,i):i()}}function _(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,_(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=L(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,m;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=r,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},m9eA:function(t,e,r){},sZnh:function(t,e,r){"use strict";r.d(e,"h",function(){return i}),r.d(e,"j",function(){return a}),r.d(e,"a",function(){return u}),r.d(e,"b",function(){return s}),r.d(e,"p",function(){return c}),r.d(e,"q",function(){return h}),r.d(e,"g",function(){return l}),r.d(e,"f",function(){return f}),r.d(e,"e",function(){return d}),r.d(e,"o",function(){return p}),r.d(e,"n",function(){return m}),r.d(e,"k",function(){return g}),r.d(e,"i",function(){return v}),r.d(e,"m",function(){return y}),r.d(e,"c",function(){return b}),r.d(e,"d",function(){return w}),r.d(e,"l",function(){return L});var n=r("X4fA"),o=r("t3Un");function i(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/info/review",method:"get",params:t||{}})}function a(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/info/viewable",method:"get",params:t||{}})}function u(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/create",method:"post",data:t})}function s(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/create/second",method:"post",data:t})}function c(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/update",method:"post",data:t})}function h(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/update/second",method:"post",data:t})}function l(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/getSelfCheck",method:"get",params:t||{}})}function f(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/getFiles",method:"post",params:t||{}})}function d(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/deleteFile",method:"post",params:t||{}})}function p(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/submit",method:"post",params:t||{}})}function m(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/construction/review",method:"post",data:t})}function g(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/part/review",method:"post",data:t})}function v(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/involve/review",method:"post",data:t})}function y(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/security/review",method:"post",data:t})}function b(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/changeSupervisor",method:"post",data:t})}function w(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/changeWorker",method:"post",data:t})}function L(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/task/workCert-regenerate?code="+t,method:"get"})}},xOJF:function(t,e,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r("k4Ii"),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}}}]);
|