(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-91c8f9e2"],{"22ef":function(e,t,i){"use strict";i("f777")},"8cba":function(t,i,a){"use strict";a.r(i);var n=a("5530"),o=(a("b0c0"),function(){var e=this,t=e._self._c;return t("a-form-model",{ref:"ruleForm",staticClass:"form-add",attrs:{model:e.form,rules:e.rules,labelCol:{span:24},wrapperCol:{span:24}}},[t("a-spin",{attrs:{spinning:e.spinning}},[e.detailInfo&&e.detailInfo.length>0?e._l(e.detailInfo,(function(i,o){return t("div",{key:o,staticClass:"info"},[t("h3",{staticStyle:{"margin-bottom":"10px","font-size":"16px"}},[e._v("户号："+e._s(i.accNo?i.accNo:"--"))]),e.files.length>0||e.fileImgs.length>0?t("div",[t("h3",{staticStyle:{"margin-bottom":"10px","font-size":"16px"}},[e._v("附件信息：")]),t("div",{staticClass:"img-group-file"},[t("vue-viewer",{attrs:{multiple:"",thumb:e.fileImgs,"list-ul-class":"image-list",full:e.fileImgs},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",{staticClass:"iconfont icon-duoxuan_weixuanzhong",class:e.fileImgsStatus[i.index].checked?"icon-duoxuan_xuanzhong":"",on:{click:function(t){return t.stopPropagation(),e.fileUp(i.index,"fileImgs")}}})]}}],null,!0)}),e._l(e.files,(function(i,n){return["pdf"==e.isFileType(i.url)?t("div",{key:n,on:{click:function(t){return e.viewFile(i.url)}}},[t("i",{staticClass:"select-icon"}),t("a-icon",{staticClass:"icon-download",attrs:{type:"vertical-align-bottom"},on:{click:function(t){return t.stopPropagation(),e.downloadFile(i.url)}}}),t("img",{attrs:{src:a("b9de")}}),t("p",[e._v(e._s(i.url))]),t("span",{staticClass:"iconfont icon-duoxuan_weixuanzhong",class:i.checked?"icon-duoxuan_xuanzhong":"",on:{click:function(t){return t.stopPropagation(),e.fileUp(n,"files")}}})],1):e._e(),"xls"==e.isFileType(i.url)?t("div",{key:n,on:{click:function(t){return e.viewFile(i.url)}}},[t("a-icon",{staticClass:"icon-download",attrs:{type:"vertical-align-bottom"},on:{click:function(t){return t.stopPropagation(),e.downloadFile(i.url)}}}),t("img",{attrs:{src:a("ffdb")}}),t("p",[e._v(e._s(i.url))]),t("span",{staticClass:"iconfont icon-duoxuan_weixuanzhong",class:i.checked?"icon-duoxuan_xuanzhong":"",on:{click:function(t){return t.stopPropagation(),e.fileUp(n,"files")}}})],1):e._e(),"doc"==e.isFileType(i.url)?t("div",{key:n,on:{click:function(t){return e.viewFile(i.url)}}},[t("a-icon",{staticClass:"icon-download",attrs:{type:"vertical-align-bottom"},on:{click:function(t){return t.stopPropagation(),e.downloadFile(i.url)}}}),t("img",{attrs:{src:a("af4b")}}),t("p",[e._v(e._s(i.url))]),t("span",{staticClass:"iconfont icon-duoxuan_weixuanzhong",class:i.checked?"icon-duoxuan_xuanzhong":"",on:{click:function(t){return t.stopPropagation(),e.fileUp(n,"files")}}})],1):e._e(),"txt"==e.isFileType(i.url)?t("div",{key:n,on:{click:function(t){return e.viewFile(i.url)}}},[t("a-icon",{staticClass:"icon-download",attrs:{type:"vertical-align-bottom"},on:{click:function(t){return t.stopPropagation(),e.downloadFile(i.url)}}}),t("img",{attrs:{src:a("5c63")}}),t("p",[e._v(e._s(i.url))]),t("span",{staticClass:"iconfont icon-duoxuan_weixuanzhong",class:i.checked?"icon-duoxuan_xuanzhong":"",on:{click:function(t){return t.stopPropagation(),e.fileUp(n,"files")}}})],1):e._e()]}))],2),t("div",{staticClass:"select-file"},[t("h3",{staticStyle:{"margin-bottom":"10px","font-size":"16px"}},[e._v("勾选附件上传，已选"),t("span",{staticStyle:{color:"red"}},[e._v(e._s(e.selectFile.length))]),e._v("个文件")]),e.selectFile.length>0?t("div",{staticClass:"item-list"},e._l(e.selectFile,(function(i,n){return t("div",{key:n,staticClass:"item-img"},["pdf"==e.isFileType(i.url)?t("img",{attrs:{src:a("b9de")}}):"xls"==e.isFileType(i.url)?t("img",{attrs:{src:a("ffdb")}}):"doc"==e.isFileType(i.url)?t("img",{attrs:{src:a("af4b")}}):"txt"==e.isFileType(i.url)?t("img",{attrs:{src:a("5c63")}}):t("img",{attrs:{src:i.url}}),t("p",[e._v(e._s(i.newFileName))]),t("a-icon",{attrs:{type:"delete"},on:{click:function(t){return e.removeFile(i,n)}}})],1)})),0):e._e()])]):e._e(),t("label",{staticClass:"fixed-label"},[t("i",[e._v(e._s(o+1))])]),[2!=i.status?t("div",{staticClass:"item"},[t("h3",[e._v("审核内容：")]),t("div",{staticClass:"cur-model audit-content"},[t("h4",[t("label",[e._v("说明文字：")]),t("span",[e._v(e._s(i.remark))])]),i.files&&i.files.length>0?[t("h4",[t("label",[e._v("图片文字：")])]),t("div",{staticClass:"img-group"},e._l(i.files,(function(i,a){return t("div",{key:a},[t("viewer",{ref:"viewer",refInFor:!0,staticClass:"viewer",attrs:{images:i.files},on:{inited:function(t){return e.$viewer=t}}},[t("img",{attrs:{src:i.fileUrl}})])],1)})),0)]:e._e(),t("h4",[t("label",[e._v("疑点处理人：")]),t("span",[e._v(e._s(i.senderRoleName))])]),t("h4",[t("label",[e._v("水司名称：")]),t("span",[e._v(e._s(i.senderDeptName))])]),t("h4",[t("label",[e._v("提交时间：")]),t("span",[e._v(e._s(i.sendTime))])])],2)]):e._e()],1==i.status||6==i.status||9==i.status?[t("h3",{staticStyle:{"margin-bottom":"10px","font-size":"16px"}},[e._v("处理进度:")]),t("div",{staticClass:"item proces"},[t("componentProces",{attrs:{modelData:Object(n["a"])(Object(n["a"])({},e.modelData),{},{pageType:e.modelData.pageType})}})],1)]:e._e(),i.model?t("div",{staticClass:"item"},[t("h3",[e._v("当前预警等级：")]),t("div",{staticClass:"cur-model"},[t("p",[e._v("预警等级： "),3==i.nowGrade?t("a-tag",{staticStyle:{color:"red !important",width:"inherit"},attrs:{color:"red"}},[e._v("红色")]):1==i.nowGrade?t("a-tag",{staticStyle:{color:"blue !important",width:"inherit"},attrs:{color:"blue"}},[e._v("蓝色")]):t("a-tag",{staticStyle:{color:"orange !important",width:"inherit"},attrs:{color:"orange"}},[e._v("黄色")])],1),t("p",[e._v("模型名称： "),t("span",{style:{color:e.getColor(i.nowGrade)}},[e._v(e._s(i.model.name))])]),t("p",[e._v("触发条件： "),t("span",{style:{color:e.getColor(i.nowGrade)}},[e._v(e._s(i.model.condi))])]),t("p",[e._v("问题频次： "),t("span",{style:{color:e.getColor(i.nowGrade)}},[e._v(e._s(i.model.freq))])]),t("p",[e._v("监督事项： "),t("span",{style:{color:e.getColor(i.nowGrade)}},[e._v(e._s(i.model.item))])])])]):e._e(),2==e.mergeObj?[t("div",{staticClass:"item"},[t("a-form-model-item",{attrs:{prop:"actualSituation",label:"实际情况及原因分析"}},[t("a-textarea",{attrs:{placeholder:"填写实际情况及原因分析",rows:4},on:{change:function(t){return e.onChangeBatch(t,"actualSituation")}},model:{value:e.form.body[o].actualSituation,callback:function(t){e.$set(e.form.body[o],"actualSituation",t)},expression:"form.body[index].actualSituation"}})],1),t("a-form-model-item",{attrs:{prop:"remark",label:"处理内容"}},[t("a-textarea",{attrs:{placeholder:"填写处理内容",rows:4},on:{change:function(t){return e.onChangeBatch(t,"remark")}},model:{value:e.form.body[o].remark,callback:function(t){e.$set(e.form.body[o],"remark",t)},expression:"form.body[index].remark"}})],1)],1),t("div",{staticClass:"item"},[t("a-form-model-item",{attrs:{label:"上传本地文件：支持上传格式 pdf、docx、xlsx、txt、jpg、jpeg、png，最多可上传9个附件"}},[t("a-upload",{attrs:{fileList:e.fileList[o],"list-type":"picture",maxCount:9,multiple:"",accept:".jpg,.jpeg,.png,.gif,.tif,.bmp,.webp,.pdf,.PDF,.docx,.doc,.xls,.xlsx,.txt",remove:function(t){return e.remove(t,"fileList",o)},"before-upload":function(t){return e.beforeUpload(t,"fileList",o)}},on:{preview:function(t){return e.filePreview(t.url)},change:function(t){return e.handleChange(t,"fileList",o)}}},[t("a-button",{attrs:{type:"primary"}},[t("a-icon",{attrs:{type:"upload"}}),e._v("上传")],1)],1)],1)],1),t("div",{staticClass:"item"},[t("a-form-model-item",{attrs:{prop:"situation",label:"情况描述"}},[t("a-radio-group",{staticClass:"role-radio",staticStyle:{color:"red","vertical-align":"middle"},attrs:{name:"situation"},on:{change:function(t){return e.changeChecked(t,"situation")}},model:{value:e.form.body[o].situation,callback:function(t){e.$set(e.form.body[o],"situation",t)},expression:"form.body[index].situation"}},[t("a-radio",{attrs:{value:0}},[e._v("正常情况")]),t("a-radio",{attrs:{value:1}},[e._v("异常情况")])],1)],1)],1)]:e._e(),1!=e.mergeObj&&e.mergeObj||o!=e.detailInfo.length-1?e._e():[t("div",{staticClass:"item"},[t("a-form-model-item",{attrs:{prop:"actualSituation",label:"实际情况及原因分析"},on:{change:e.onChange}},[t("a-textarea",{attrs:{placeholder:"填写实际情况及原因分析",rows:4},on:{change:function(t){return e.onChange(t,"actualSituation")}},model:{value:e.form.body[0].actualSituation,callback:function(t){e.$set(e.form.body[0],"actualSituation",t)},expression:"form.body[0].actualSituation"}})],1),t("a-form-model-item",{attrs:{prop:"remark",label:"处理内容"},on:{change:e.onChange}},[t("a-textarea",{attrs:{placeholder:"填写处理内容",rows:4},on:{change:function(t){return e.onChange(t,"remark")}},model:{value:e.form.body[0].remark,callback:function(t){e.$set(e.form.body[0],"remark",t)},expression:"form.body[0].remark"}})],1)],1),t("div",{staticClass:"item"},[t("a-form-model-item",{attrs:{label:"上传本地文件：支持上传格式 pdf、docx、xlsx、txt、jpg、jpeg、png，最多可上传9个附件"}},[t("a-upload",{attrs:{fileList:e.fileList[0],"list-type":"picture",maxCount:9,multiple:"",accept:".jpg,.jpeg,.png,.gif,.tif,.bmp,.webp,.pdf,.PDF,.docx,.doc,.xls,.xlsx,.txt",remove:function(t){return e.remove(t,"fileList",0)},"before-upload":function(t){return e.beforeUpload(t,"fileList",0)}},on:{preview:function(t){return e.filePreview(t.url)},change:function(t){return e.handleChange(t,"fileList",0)}}},[t("a-button",{attrs:{type:"primary"}},[t("a-icon",{attrs:{type:"upload"}}),e._v("上传")],1)],1)],1)],1),t("div",{staticClass:"item"},[t("a-form-model-item",{attrs:{prop:"situation",label:"情况描述"}},[t("a-radio-group",{staticClass:"role-radio",staticStyle:{color:"red","vertical-align":"middle"},attrs:{name:"situation"},on:{change:function(t){return e.changeChecked(t,"situation")}},model:{value:e.form.body[0].situation,callback:function(t){e.$set(e.form.body[0],"situation",t)},expression:"form.body[0].situation"}},[t("a-radio",{attrs:{value:0}},[e._v("正常情况")]),t("a-radio",{attrs:{value:1}},[e._v("异常情况")])],1)],1)],1)]],2)})):e._e()],2),t("a-modal",{staticClass:"flie-modal body-top",class:"file"==e.modelType?"body-top":"",attrs:{title:e.modelTitle,width:"1200px",height:"100vh",destroyOnClose:!0,maskClosable:!1,visible:e.modelVisible,"confirm-loading":e.modelConfirmLoading},on:{cancel:function(t){e.modelVisible=!1}}},[t("iframe",{attrs:{src:e.iframeUrl,frameborder:"0",width:"100%",height:"100%",scrolling:"no"}})])],1)}),r=[],s=a("c7eb"),l=a("1da1"),c=(a("4de4"),a("c740"),a("caad"),a("a15b"),a("d81d"),a("a434"),a("a9e3"),a("d3b7"),a("2532"),a("498a"),a("159b"),a("b841")),u=a("5016"),d=a("3e83"),f={props:{modelData:{type:Object,function:function(){return{}}},selectedRow:{type:Array,function:function(){return[]}},mergeObj:{type:Number,default:null}},components:{componentProces:u["default"]},data:function(){return{modelTitle:"查看附件",modelType:"file",modelVisible:!1,modelConfirmLoading:!1,fileList:[[]],previewVisible:!1,isFormTrue:!1,spinning:!0,previewImage:"",fileData:[],constFile:[],uploading:!1,form:{ids:this.selectedRow.join(","),body:[{remark:"",actualSituation:"",fileIds:null,recordId:null,situation:null}]},rules:{actualSituation:[{required:!0,message:"填写实际情况及原因分析",trigger:"change"}],remark:[{required:!0,message:"填写审核理由",trigger:"change"}],situation:[{required:!0,message:"填选择情况描述",trigger:"change"}]},detailInfo:[],currentTime:"",DurationOfStay:6e5,intervalTime:0,fileImgs:[],files:[],iframeUrl:"",fileImgsStatus:[],selectFile:[]}},computed:{},mounted:function(){this.currentTime=(new Date).getTime(),this.checkouttime(),document.addEventListener("keydown",this.resetStartTime),document.addEventListener("touchstart",this.resetStartTime)},beforeDestroy:function(){document.removeEventListener("keydown",this.resetStartTime),document.removeEventListener("touchstart",this.resetStartTime),this.intervalTime&&clearInterval(this.intervalTime)},watch:{current:function(){this.fileList=[],this.constFile=[]}},created:function(){var e=this;return Object(l["a"])(Object(s["a"])().mark((function t(){return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.modelData.id&&(e.form.ids=e.modelData.id,e.form.body[0].recordId=e.modelData.id,e.getStaging()),e.modelData.assignStatus&&e.getDetil(),e.getFils(),e.mergeObj&&(e.getBatchDetails(),2==e.mergeObj?(e.fileList=e.selectedRow.map((function(){return[]})),e.form.ids=e.selectedRow.map((function(e){return e.recordId})).join(","),e.form.body=e.selectedRow.map((function(e){return{remark:"",fileIds:null,recordId:e.recordId,situation:null}}))):(e.form.ids=e.selectedRow.map((function(e){return e.recordId})).join(","),e.form.body[0].recordId=e.selectedRow[e.selectedRow.length-1].recordId));case 4:case"end":return t.stop()}}),t)})))()},methods:{fileUp:function(e,t){var i=this;"fileImgs"==t?this.fileImgsStatus[e].checked||Object(d["L"])({fileInfo:this[t][e]}).then((function(t){200===t.code&&(i.selectFile.push({url:t.url,id:t.id,newFileName:t.newFileName}),i.fileImgsStatus[e].checked=!0)})):this.files[e].checked||Object(d["L"])({fileInfo:this[t][e].url}).then((function(t){200===t.code&&(i.selectFile.push({url:t.url,id:t.id,newFileName:t.newFileName}),i.files[e].checked=!0)}))},changeChecked:function(e,t){var i=this;i.hasNullValues(i.form.body,t)?i.rules[t][0].required=!0:i.rules[t][0].required=!1},getFils:function(){var e=this;2==this.modelData.pageType&&Object(d["x"])({projectid:this.modelData.projectid,accNo:this.modelData.accNo}).then((function(t){200==t.code&&(e.fileImgs=t.data.filter((function(e){return e.includes("base64")})),e.fileImgsStatus=t.data.filter((function(e){return e.includes("base64")})).map((function(e){return{url:e,checked:!1}})),e.files=t.data.filter((function(e){return!e.includes("base64")})).map((function(e){return{url:e,checked:!1}})))})),1==this.modelData.pageType&&Object(d["y"])({accNo:this.modelData.accNo,recordId:this.modelData.id}).then((function(t){200==t.code&&(e.fileImgs=t.data.filter((function(e){return e.includes("base64")})),e.fileImgsStatus=t.data.filter((function(e){return e.includes("base64")})).map((function(e){return{url:e,checked:!1}})),e.files=t.data.filter((function(e){return!e.includes("base64")})).map((function(e){return{url:e,checked:!1}})))}))},onChange:function(e,t){var i=this;setTimeout((function(){e.target._value?i.rules[t][0].required=!1:i.rules[t][0].required=!0}),20)},hasEmptyValues:function(e,t){return e.some((function(e){return!e[t].trim()}))},hasNullValues:function(e,t){return e.some((function(e){return null==!e[t]}))},onChangeBatch:function(e,t){var i=this;setTimeout((function(){e.target._value&&!i.hasEmptyValues(i.form.body,t)?i.rules[t][0].required=!1:i.rules[t][0].required=!0}),20)},getBatchDetails:function(){var e=this;2==this.modelData.pageType?Object(d["c"])(this.selectedRow).then((function(t){200===t.code&&(e.detailInfo=t.data,e.spinning=!1)})):Object(d["e"])(this.selectedRow).then((function(t){200===t.code&&(e.detailInfo=t.data,e.spinning=!1)}))},resetStartTime:function(){this.currentTime=(new Date).getTime()},checkouttime:function(){var e=this;this.intervalTime=setInterval((function(){var t=(new Date).getTime();if(t-e.currentTime>e.DurationOfStay)return e.saveStaging(),!1}),3e4)},getStaging:function(){var e=this;2==this.modelData.pageType?Object(d["j"])({recordId:this.modelData.id}).then((function(t){200==t.code&&t.data&&(e.form=t.data,t.data.files&&t.data.files.length>0&&(e.fileList=t.data.files.map((function(e){return{uid:e.id,name:e.fileName,status:"done",url:e.url,thumbUrl:e.url}}))))})):Object(d["bb"])({recordId:this.modelData.id}).then((function(t){200==t.code&&t.data&&(e.form=t.data,t.data.files&&t.data.files.length>0&&(e.fileList=t.data.files.map((function(e){return{uid:e.id,name:e.fileName,status:"done",url:e.url,thumbUrl:e.url}}))))}))},saveStaging:function(){2==this.modelData.pageType?Object(d["d"])(Object(n["a"])(Object(n["a"])({},this.form),{},{isStaging:1})):Object(d["f"])(Object(n["a"])(Object(n["a"])({},this.form),{},{isStaging:1}))},getDetil:function(){var e=this;2==this.modelData.pageType?Object(d["c"])([{recordId:this.modelData.id,status:this.modelData.nowGrade}]).then((function(t){200===t.code&&(e.detailInfo=t.data,e.spinning=!1)})):Object(d["e"])([{recordId:this.modelData.id,status:this.modelData.nowGrade}]).then((function(t){200===t.code&&(e.detailInfo=t.data,e.spinning=!1)}))},onSubmit:function(){var t=this;return new Promise((function(i,a){t.$refs.ruleForm.validate((function(o){if(!o)return a(),!1;if(t.selectFile.length>0){var r=t.selectFile.map((function(e){return e.id})).join(",");t.form.body[0].fileIds?t.form.body[0].fileIds=t.form.body[0].fileIds+","+r:t.form.body[0].fileIds=r}2==t.modelData.pageType?Object(d["d"])(Object(n["a"])({},t.form)).then((function(a){200===a.code?(t.$notification.success({message:"成功",description:(JSON.stringify(t.modelData),"提交成功")}),i()):t.$notification.error({message:"失败",description:e.msg})})).catch((function(e){t.$notification.error({message:"失败",description:e.msg}),a()})):Object(d["f"])(Object(n["a"])({},t.form)).then((function(e){t.$notification.success({message:"成功",description:(JSON.stringify(t.modelData),"提交成功")}),i()})).catch((function(e){t.$notification.error({message:"失败",description:e.msg}),a()}))}))}))},beforeUpload:function(e,t,i){var a=this;"fileList"==t&&(this.uploading=!0);var n=new FormData;return[e].forEach((function(e){n.append("file",e)})),Object(c["a"])(n).then((function(e){200==e.data.code&&(a.fileList[i].push({uid:e.data.id,name:e.data.fileName,status:"done",url:e.data.url,thumbUrl:e.data.url}),a.form.body[i].fileIds=a.fileList[i].map((function(e){return e.uid})).join(","))})).catch((function(e){})).finally((function(){"fileList"==t&&(a.uploading=!1)})),!1},handleChange:function(e,t,i){e.fileList;var a=e.file;if("removed"==a.status&&"fileList"==t){var n=this.fileList[i].findIndex((function(e){return e.uid===a.uid}));this.fileList[i].splice(n,1),this.form.body[i].fileIds=this.fileList[i].map((function(e){return e.uid})).join(",")}},remove:function(e,t,i){if("fileList"==t){var a=this.fileList[i].findIndex((function(t){return t.uid===e.uid}));this.fileList[i].splice(a,1),this.form.body[i].fileIds=this.fileList[i].map((function(e){return e.uid})).join(",")}},removeFile:function(e,t){this.selectFile.splice(t,1)},filePreview:function(e){window.open(e,"_blank")},viewFile:function(e){var t=this;Object(d["u"])({fileName:e}).then((function(e){t.iframeUrl=e.data,window.open(t.iframeUrl,"_blank")}))},downloadFile:function(e){var t="/api/file/bz/download3?fileName=".concat(e),i=e.substring(e.lastIndexOf(".")+1);this.download(t,{},"","get",i)}}},m=f,p=(a("22ef"),a("2877")),g=Object(p["a"])(m,o,r,!1,null,"51c5ccbf",null);i["default"]=g.exports},f777:function(e,t,i){}}]);