text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-55662192"],{"1bb2":function(e,t,a){"use strict";a("24c0")},"24c0":function(e,t,a){},"63be":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("page-header-wrapper",{attrs:{content:""}},[a("a-card",{staticClass:"table-page-search-wrapper",attrs:{bordered:!1}},[a("div",{staticClass:"queryTitle"},[a("p",[e._v(e._s(e.queryTitle))]),a("div",{staticClass:"addBtn"},[a("a-button",{attrs:{type:"primary"},on:{click:function(){return e.returnBack()}}},[e._v("返回")])],1)]),a("a-form-model",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules,"label-col":{span:6},"wrapper-col":{span:16}}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:24,sm:24}},[a("a-form-model-item",{attrs:{labelCol:{span:3},wrapperCol:{span:20},label:"排查计划模板",prop:"templateId"}},[a("a-select",{attrs:{placeholder:"请选择排查计划模板"},on:{change:e.selectTemplate},model:{value:e.form.templateId,callback:function(t){e.$set(e.form,"templateId",t)},expression:"form.templateId"}},e._l(e.taskTemplateData,(function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.title)+" ")])})),1)],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:12,sm:24}},[a("a-form-model-item",{attrs:{label:"排查类型",prop:"checkType"}},[a("a-select",{attrs:{placeholder:"请选择排查类型","label-in-value":""},on:{change:e.handleTypeChange},model:{value:e.form.checkType,callback:function(t){e.$set(e.form,"checkType",t)},expression:"form.checkType"}},e._l(e.checkTypeOptions,(function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(e._s(t.typeName))])})),1)],1)],1),a("a-col",{attrs:{md:12,sm:24}},[a("a-form-model-item",{attrs:{label:"任务名称",prop:"title"}},[a("a-input",{attrs:{placeholder:"请输入任务名称",allowClear:""},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:12,sm:24}},[a("a-form-model-item",{attrs:{label:"检查单位",prop:"checkDep"}},[a("a-tree-select",{staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":e.treeData,placeholder:"请选择检查单位","tree-default-expand-all":"",allowClear:"",multiple:"",labelInValue:!0},model:{value:e.form.checkDep,callback:function(t){e.$set(e.form,"checkDep",t)},expression:"form.checkDep"}})],1)],1),a("a-col",{attrs:{md:12,sm:24}},[a("a-form-model-item",{attrs:{label:"检查责任岗位",prop:"checkPost"}},[a("a-tree-select",{staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":e.workPositionList,placeholder:"请选择检查责任岗位","tree-default-expand-all":"",allowClear:"",multiple:"",labelInValue:!0},model:{value:e.form.checkPost,callback:function(t){e.$set(e.form,"checkPost",t)},expression:"form.checkPost"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:12,sm:24}},[a("a-form-model-item",{attrs:{label:"被查单位",prop:"inspectedDep"}},[a("a-tree-select",{staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":e.treeData,placeholder:"请选择被查单位","tree-default-expand-all":"",allowClear:"",multiple:"",labelInValue:!0},model:{value:e.form.inspectedDep,callback:function(t){e.$set(e.form,"inspectedDep",t)},expression:"form.inspectedDep"}})],1)],1),a("a-col",{attrs:{md:12,sm:24}},[a("a-form-model-item",{attrs:{label:"被查责任岗位",prop:"member"}},[a("a-tree-select",{staticStyle:{width:"100%"},attrs:{"dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":e.workPositionList,placeholder:"请选择被查责任岗位","tree-default-expand-all":"",allowClear:"",multiple:"",labelInValue:!0},model:{value:e.form.member,callback:function(t){e.$set(e.form,"member",t)},expression:"form.member"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:12,sm:24}},[a("a-form-model-item",{attrs:{label:"排查频次",prop:"type"}},[a("a-radio-group",{on:{change:function(t){return e.radioChange()}},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[a("a-radio",{staticClass:"radioStyle",attrs:{value:3,disabled:e.isNotDaily}},[a("span",{staticClass:"radioTitle"},[e._v("非自动")])]),a("a-radio",{staticClass:"radioStyle",attrs:{value:2,disabled:e.isNotDaily}},[a("div",{staticClass:"timeDiv"},[a("span",{staticClass:"radioTitle"},[e._v("月")]),2==e.form.type?a("a-form-model-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:"",prop:"checkFrequencys"}},[a("a-select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择",mode:"multiple"},model:{value:e.form.checkFrequencys,callback:function(t){e.$set(e.form,"checkFrequencys",t)},expression:"form.checkFrequencys"}},[a("a-select-option",{attrs:{value:"0"}},[e._v(" 一月 ")]),a("a-select-option",{attrs:{value:"1"}},[e._v(" 二月 ")]),a("a-select-option",{attrs:{value:"2"}},[e._v(" 三月 ")]),a("a-select-option",{attrs:{value:"3"}},[e._v(" 四月 ")]),a("a-select-option",{attrs:{value:"4"}},[e._v(" 五月 ")]),a("a-select-option",{attrs:{value:"5"}},[e._v(" 六月 ")]),a("a-select-option",{attrs:{value:"6"}},[e._v(" 七月 ")]),a("a-select-option",{attrs:{value:"7"}},[e._v(" 八月 ")]),a("a-select-option",{attrs:{value:"8"}},[e._v(" 九月 ")]),a("a-select-option",{attrs:{value:"9"}},[e._v(" 十月 ")]),a("a-select-option",{attrs:{value:"10"}},[e._v(" 十一月 ")]),a("a-select-option",{attrs:{value:"11"}},[e._v(" 十二月 ")])],1)],1):e._e()],1)]),a("a-radio",{staticClass:"radioStyle",attrs:{value:1,disabled:e.isNotDaily}},[a("div",{staticClass:"timeDiv"},[a("span",{staticClass:"radioTitle"},[e._v("周")]),1==e.form.type?a("a-form-model-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:"",prop:"checkFrequencys"}},[a("a-select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择",mode:"multiple"},model:{value:e.form.checkFrequencys,callback:function(t){e.$set(e.form,"checkFrequencys",t)},expression:"form.checkFrequencys"}},[a("a-select-option",{attrs:{value:"1"}},[e._v(" 周天 ")]),a("a-select-option",{attrs:{value:"2"}},[e._v(" 周一 ")]),a("a-select-option",{attrs:{value:"3"}},[e._v(" 周二 ")]),a("a-select-option",{attrs:{value:"4"}},[e._v(" 周三 ")]),a("a-select-option",{attrs:{value:"5"}},[e._v(" 周四 ")]),a("a-select-option",{attrs:{value:"6"}},[e._v(" 周五 ")]),a("a-select-option",{attrs:{value:"7"}},[e._v(" 周六 ")])],1)],1):e._e()],1)]),a("a-radio",{staticClass:"radioStyle",attrs:{value:0,disabled:e.isDaily}},[a("div",{staticClass:"timeDiv"},[a("span",{staticClass:"radioTitle"},[e._v("日")]),0==e.form.type?a("a-form-model-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:"",prop:"gapTimes"}},[a("a-input",{style:{width:200},attrs:{placeholder:"请输入时间间隔（分钟）"},model:{value:e.form.gapTimes,callback:function(t){e.$set(e.form,"gapTimes",t)},expression:"form.gapTimes"}})],1):e._e()],1)])],1)],1)],1),a("a-col",{attrs:{md:12,sm:24}},[3==e.form.type?a("a-form-model-item",{attrs:{label:"排查时间",prop:"dynamicStartTime"}},[a("a-date-picker",{attrs:{"show-time":"",format:"YYYY-MM-DD HH:mm:ss"},model:{value:e.form.dynamicStartTime,callback:function(t){e.$set(e.form,"dynamicStartTime",t)},expression:"form.dynamicStartTime"}})],1):e._e(),0==e.form.type?a("a-form-model-item",{staticClass:"timeDiv",attrs:{label:"排查时间"}},[a("div",{staticClass:"timeDiv"},[a("a-form-model-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:"",prop:"startTime"}},[a("a-time-picker",{attrs:{format:"HH:mm:ss",placeholder:"开始时间"},model:{value:e.form.startTime,callback:function(t){e.$set(e.form,"startTime",t)},expression:"form.startTime"}})],1),a("span",{staticStyle:{display:"inline-block",padding:"0 5px"}},[e._v("至")]),a("a-form-model-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:"",prop:"endTime"}},[a("a-time-picker",{attrs:{format:"HH:mm:ss",placeholder:"结束时间"},model:{value:e.form.endTime,callback:function(t){e.$set(e.form,"endTime",t)},expression:"form.endTime"}})],1)],1)]):e._e()],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:24,sm:24}},[a("a-form-model-item",{attrs:{labelCol:{span:3},wrapperCol:{span:20},label:"检查目的",prop:"checkPurpose"}},[a("a-textarea",{attrs:{placeholder:"请输入","auto-size":{minRows:3,maxRows:5}},model:{value:e.form.checkPurpose,callback:function(t){e.$set(e.form,"checkPurpose",t)},expression:"form.checkPurpose"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:24,sm:24}},[a("a-form-model-item",{attrs:{labelCol:{span:3},wrapperCol:{span:20},label:"检查总体要求",prop:"checkOverallRequirements"}},[a("a-textarea",{attrs:{placeholder:"请输入","auto-size":{minRows:3,maxRows:5}},model:{value:e.form.checkOverallRequirements,callback:function(t){e.$set(e.form,"checkOverallRequirements",t)},expression:"form.checkOverallRequirements"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:24,sm:24}},[a("div",{staticStyle:{padding:"0 3%"}},[a("p",{staticClass:"checkItems"},[a("span",[e._v("*")]),a("span",[e._v("检查项")])]),a("div",{staticClass:"addBtn"},[a("a-button",{attrs:{type:"primary"},on:{click:e.addNewItem}},[e._v("新增")]),a("a-upload",{attrs:{name:"exelFile",customRequest:e.importCheckTask,"before-upload":e.beforeUpload,showUploadList:!1}},[a("a-button",{staticClass:"titleBtn",attrs:{type:"primary"}},[e._v(" 导入 ")])],1),a("a-button",{attrs:{type:"primary"},on:{click:e.downloadTemplate}},[e._v("下载模板")])],1),a("a-table",{attrs:{size:"small","data-source":e.dataList,rowKey:"index",columns:e.checkItemsColumns},scopedSlots:e._u([{key:"checkType",fn:function(t,s){return e._l(e.checkTypeOptions,(function(t){return a("div",{key:t.id},[s.checkType==t.id?a("span",[e._v(e._s(t.typeName))]):e._e()])}))}},{key:"operation",fn:function(t,s){return[a("a",{staticClass:"operation",on:{click:function(t){return e.queryNewItem(s)}}},[e._v("详情")]),a("a-divider",{attrs:{type:"vertical"}}),s.flag&&1==s.flag?a("a",{staticClass:"operation",on:{click:function(t){return e.editNewItem(s)}}},[e._v("编辑")]):e._e(),s.flag&&1==s.flag?a("a-divider",{attrs:{type:"vertical"}}):e._e(),a("a",{staticClass:"operation deleteBtn",on:{click:function(t){return e.deleteNewItem(s)}}},[e._v("删除")])]}}])}),a("a-button",{staticClass:"addItems",attrs:{type:"dashed"},on:{click:function(t){return e.selectCheckItem()}}},[e._v(" 选择 ")])],1)])],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:24,sm:24}},[a("div",{staticClass:"footerBtn"},[a("a-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.handleOk}},[e._v("提交")])],1)])],1)],1)],1),e.addCheckModal.checkModalVisble?a("addModal",{attrs:{addCheckModal:e.addCheckModal},on:{deliverValue:e.receiveValue}}):e._e(),e.selectItemModal.selectItemVisible?a("selectCheckItemModal",{attrs:{selectItemModal:e.selectItemModal,transItemList:e.transItemList},on:{transferValue:e.cancelSelectModal,cancelTransferValue:e.cancelTransferValue}}):e._e()],1)},i=[],o=a("6abc"),r=(a("16ca"),a("3337"),a("1d43"),a("b3b0"),a("a5f8"),a("5b12"),a("9b5f"),a("27ae"),a("d447"),a("24a8"),a("fc13"),a("9dfd"),a("591f"),a("feb3"),a("bf2f"),a("47b8"),a("4200"),a("760e"),a("7625")),l=(a("ca00"),a("c855")),c=a("caaf"),m=a.n(c),n=a("c24f"),d=(a("35a0"),a("1df6")),p=(a("8b5b"),a("9b2d")),u=a.n(p),h={name:"addDangerInvestigation",components:{selectCheckItemModal:r["a"],addModal:l["a"]},data:function(){return{taskTemplateData:[],queryTitle:"",queryId:"",editTask:!1,loading:!1,form:{},rules:{templateId:[{required:!0,message:"请选择排查计划模板"}],title:[{required:!0,message:"请输入标题"},{required:!0,message:"信息包含特殊字符",trigger:"blur",pattern:/^[a-zA-Z0-9\u4E00-\u9FA5]+$/}],checkType:[{required:!0,message:"请选择排查类型"}],checkTypes:[{required:!0,message:"请选择检查类型"}],checkDep:[{required:!0,message:"请选择检查单位"}],inspectedDep:[{required:!0,message:"请选择被查单位"}],dynamicStartTime:[{required:!0,message:"请选择排查时间"}],gapTimes:[{required:!0,message:"请输入时间间隔"},{required:!0,message:"请输入数字",trigger:"blur",pattern:/^-?[0-9]*(\.[0-9]*)?$/}],startTime:[{required:!0,message:"请选择开始时间"}],endTime:[{required:!0,message:"请选择结束时间"}],type:[{required:!0,message:"请选择排查频次"}],checkFrequencys:[{required:!0,message:"请选择排查周期"}]},checkItemsColumns:[{title:"排查类型",dataIndex:"troubleshootingName"},{title:"检查类型",dataIndex:"checkTypeName",width:150,ellipsis:!0},{title:"检查项目",dataIndex:"checkProject",width:150,ellispis:!0},{title:"检查内容",dataIndex:"checkContent",width:150,ellipsis:!0},{title:"检查方式",dataIndex:"checkMode",width:100,ellipsis:!0},{title:"检查依据",dataIndex:"checkAccording",width:100,ellipsis:!0},{title:"操作",scopedSlots:{customRender:"operation"},width:"17%"}],checkTypeOptions:[],addCheckModal:{checkModalVisble:!1,isEdit:!1,isDisabled:!1,modalSource:"templateManage",modalTitle:"",itemDetails:{},checkType:{}},treeData:[],workPositionList:[],selectItemModal:{selectItemVisible:!1,checkType:""},templateId:"",addItemList:[],importItemList:[],transItemList:[],templateItemsList:[],tabVal:"",isDaily:!1,isNotDaily:!1}},computed:{dataList:function(){return[].concat(this.addItemList,this.importItemList,this.transItemList,this.templateItemsList)}},created:function(){},mounted:function(){this.treeData=u.a.get("departmentTree"),this.getCheckTypeTree(),this.getWorkPositionList(),this.getAllTaskTemplateList(),this.$route.query.id&&1==this.$route.query.type&&(this.getCheckTaskDetail(),this.editTask=!0),this.$route.query.tabVal&&(this.tabVal=this.$route.query.tabVal,1==this.tabVal?this.isDaily=!0:this.isNotDaily=!0)},methods:{moment:m.a,onBlur:function(){var e=/^-?[0-9]*(\.[0-9]*)?$/,t=this.form.gapTimes;e.test(t)||(this.form.gapTimes=void 0,this.$message.warning("请输入数字"))},getWorkPositionList:function(){var e=this;Object(n["r"])().then((function(t){200===t.code&&t.body&&t.body.map((function(t){e.workPositionList.push({label:t.name,value:t.id})}))}))},getAllTaskTemplateList:function(){var e=this;Object(d["p"])({}).then((function(t){200===t.code&&t.body.length&&(e.taskTemplateData=t.body)}))},getCheckTaskDetail:function(){var e=this;Object(d["r"])(this.$route.query.id).then((function(t){if(200===t.code){if(e.form=t.body,e.$set(e.form,"checkType",{label:e.form.troubleshootingName,key:e.form.troubleshootingId}),void 0!=e.form.checkDepId&&void 0!=e.form.checkDepName){var a,s,i=[];e.form.checkDepId.includes(",")&&e.form.checkDepName.includes(",")?(a=e.form.checkDepId.split(","),s=e.form.checkDepName.split(","),a.map((function(e,t){i.push({label:s[t],value:e})}))):(a=e.form.checkDepId,s=e.form.checkDepName,i.push({label:s,value:a})),e.$set(e.form,"checkDep",i)}if(void 0!=e.form.checkPostId&&void 0!=e.form.checkPostName){var o,r,l=[];e.form.checkPostId.includes(",")&&e.form.checkPostName.includes(",")?(o=e.form.checkPostId.split(","),r=e.form.checkPostName.split(","),o.map((function(e,t){l.push({label:r[t],value:e})}))):(o=e.form.checkPostId,r=e.form.checkPostName,l.push({label:r,value:o})),e.$set(e.form,"checkPost",l)}if(void 0!=e.form.inspectedDepId&&void 0!=e.form.inspectedDepName){var c,n,d=[];e.form.inspectedDepId.includes(",")&&e.form.inspectedDepName.includes(",")?(c=e.form.inspectedDepId.split(","),n=e.form.inspectedDepName.split(","),c.map((function(e,t){d.push({label:n[t],value:e})}))):(c=e.form.inspectedDepId,n=e.form.inspectedDepName,d.push({label:n,value:c})),e.$set(e.form,"inspectedDep",d)}if(void 0!=e.form.memberId&&void 0!=e.form.memberName){var p,u,h=[];e.form.memberId.includes(",")&&e.form.memberName.includes(",")?(p=e.form.memberId.split(","),u=e.form.memberName.split(","),p.map((function(e,t){h.push({label:u[t],value:e})}))):(p=e.form.memberId,u=e.form.memberName,h.push({label:u,value:p})),e.$set(e.form,"member",h)}e.form.checkFrequency&&e.form.checkFrequency.length&&e.$set(e.form,"checkFrequencys",e.form.checkFrequency.split(",")),e.form.startTime&&(e.form.startTime=m()(e.form.startTime,"HH:mm:ss")),e.form.endTime&&(e.form.endTime=m()(e.form.endTime,"HH:mm:ss")),e.form.standardImports.length&&(e.form.standardImports.map((function(t){t.index=e.getRandomID()})),e.addItemList=e.form.standardImports),e.form.standards.length&&(e.form.standards.map((function(t){t.index=e.getRandomID()})),e.transItemList=e.form.standards)}}))},selectTemplate:function(e){this.getTaskTemplateDetail(e)},getTaskTemplateDetail:function(e){var t=this;Object(d["y"])(e).then((function(e){if(200===e.code){var a=e.body;if(t.$set(t.form,"checkType",{label:a.troubleshootingName,key:a.troubleshootingId}),void 0!=a.checkDepId&&void 0!=a.checkDepName){var s,i,o=[];a.checkDepId.includes(",")&&a.checkDepName.includes(",")?(s=a.checkDepId.split(","),i=a.checkDepName.split(","),s.map((function(e,t){o.push({label:i[t],value:e})}))):(s=a.checkDepId,i=a.checkDepName,o.push({label:i,value:s})),t.$set(t.form,"checkDep",o)}if(void 0!=a.checkPostId&&void 0!=a.checkPostName){var r,l,c=[];a.checkPostId.includes(",")&&a.checkPostName.includes(",")?(r=a.checkPostId.split(","),l=a.checkPostName.split(","),r.map((function(e,t){c.push({label:l[t],value:e})}))):(r=a.checkPostId,l=a.checkPostName,c.push({label:l,value:r})),t.$set(t.form,"checkPost",c)}if(void 0!=a.inspectedDepId&&void 0!=a.inspectedDepName){var m,n,d=[];a.inspectedDepId.includes(",")&&a.inspectedDepName.includes(",")?(m=a.inspectedDepId.split(","),n=a.inspectedDepName.split(","),m.map((function(e,t){d.push({label:n[t],value:e})}))):(m=a.inspectedDepId,n=a.inspectedDepName,d.push({label:n,value:m})),t.$set(t.form,"inspectedDep",d)}if(void 0!=a.memberId&&void 0!=a.memberName){var p,u,h=[];a.memberId.includes(",")&&a.memberName.includes(",")?(p=a.memberId.split(","),u=a.memberName.split(","),p.map((function(e,t){h.push({label:u[t],value:e})}))):(p=a.memberId,u=a.memberName,h.push({label:u,value:p})),t.$set(t.form,"member",h)}a.standardImports.length&&(a.standardImports.map((function(e){e.index=t.getRandomID(),e.flag=0})),t.templateItemsList=a.standardImports),a.standards.length&&(a.standards.map((function(e){e.index=t.getRandomID()})),t.transItemList=a.standards),t.$set(t.form,"checkPurpose",a.checkPurpose),t.$set(t.form,"checkOverallRequirements",a.checkOverallRequirements)}}))},getRandomID:function(){return Number(Math.random().toString().substr(3,3)+Date.now()).toString(36)},getCheckTypeTree:function(){var e=this;Object(d["u"])().then((function(t){200===t.code&&(e.checkTypeOptions=t.body)}))},returnBack:function(){this.$router.replace({path:"/HiddenDangerInvestigation"})},radioChange:function(){this.$set(this.form,"checkFrequencys",void 0),this.$set(this.form,"gapTimes",void 0),this.$set(this.form,"startTime",void 0),this.$set(this.form,"endTime",void 0)},handleTypeChange:function(e){},downloadTemplate:function(){var e=this;Object(d["x"])().then((function(e){var t=window.URL.createObjectURL(new Blob([e])),a=document.createElement("a");a.style.display="none",a.href=t,a.setAttribute("download","检查项模板.xls"),document.body.appendChild(a),a.click()})).catch((function(t){e.$message.error("下载模板失败")}))},addNewItem:function(){void 0!=this.form.checkType?(this.addCheckModal.checkModalVisble=!0,this.addCheckModal.modalTitle="新增检查项",this.$set(this.addCheckModal.itemDetails,"troubleshooting",this.form.checkType)):this.$message.warning("请先选择排查类型")},beforeUpload:function(){void 0!=this.form.checkType||this.$message.warning("请先选择排查类型")},importCheckTask:function(e){var t=this,a=e.file,s=new FormData;s.append("exelFile",a),this.form.checkType&&(s.append("troubleshootingId",this.form.checkType.key),s.append("troubleshootingName",this.form.checkType.label)),Object(d["C"])(s).then((function(e){200===e.code&&e.body.length>0&&e.body.map((function(e,a){t.importItemList.push(Object(o["a"])({index:t.getRandomID(),flag:0,checkProject:e.title},e))}))}))},editNewItem:function(e){this.addCheckModal.checkModalVisble=!0,this.addCheckModal.modalTitle="编辑检查项",this.addCheckModal.isEdit=!0,this.$set(this.addCheckModal,"itemDetails",e)},queryNewItem:function(e){this.addCheckModal.checkModalVisble=!0,this.addCheckModal.modalTitle="查看检查项",this.addCheckModal.isDisabled=!0,this.$set(this.addCheckModal,"itemDetails",e)},deleteNewItem:function(e){for(var t=0;t<this.addItemList.length;t++)if(this.addItemList[t].index==e.index)return void this.addItemList.splice(t,1);for(var a=0;a<this.importItemList.length;a++)if(this.importItemList[a].index==e.index)return void this.importItemList.splice(a,1);for(var s=0;s<this.transItemList.length;s++)if(this.transItemList[s].index==e.index)return void this.transItemList.splice(s,1);for(var i=0;i<this.templateItemsList.length;i++)if(this.templateItemsList[i].index==e.index)return void this.templateItemsList.splice(i,1)},selectCheckItem:function(){var e=this;void 0!=this.form.checkType?(this.selectItemModal.selectItemVisible=!0,this.checkTypeOptions.map((function(t){t.id===e.form.checkType.key&&e.$set(e.selectItemModal,"checkType",Object(o["a"])({brevityCode:t.brevityCode},e.form.checkType))}))):this.$message.warning("请先选择排查类型")},cancelTransferValue:function(e){this.selectItemModal=e},cancelSelectModal:function(e){var t=this,a=e.targetItems;if(a.length){var s=[];s=a.map((function(e,a){return e.index=t.getRandomID(),e.id=e.key,e.checkProject=e.title,e})),this.transItemList=s}else this.transItemList=a;this.selectItemModal=e},receiveValue:function(e){var t={};if(""==e.modalTitle)this.addCheckModal=e;else if("编辑检查项"==e.modalTitle){t=e.newItem;var a=this.addItemList.findIndex((function(t){return t.index===e.newItem}));-1!=a&&this.$set(this.addItemList,t,a),this.$delete(e,"newItem"),this.$set(e,"itemDetails",{}),this.addCheckModal=e}else"新增检查项"==e.modalTitle&&(t=e.itemDetails,this.$set(t,"index",this.getRandomID()),this.$set(t,"flag",1),this.addItemList.push(t),this.$delete(e,"newItem"),this.$set(e,"itemDetails",{}),this.addCheckModal=e)},handleOk:function(){var e=this;this.$refs.ruleForm.validate((function(t){if(!t)return!1;if(e.dataList.length){if(e.$set(e.form,"troubleshootingName",e.form.checkType.label),e.$set(e.form,"troubleshootingId",e.form.checkType.key),e.form.checkDep){var a=[],s=[];e.form.checkDep.map((function(e){a.push(e.value),s.push(e.label)})),e.$set(e.form,"checkDepId",a.join()),e.$set(e.form,"checkDepName",s.join())}if(e.form.checkPost){var i=[],o=[];e.form.checkPost.map((function(e){i.push(e.value),o.push(e.label)})),e.$set(e.form,"checkPostId",i.join()),e.$set(e.form,"checkPostName",o.join())}if(e.form.inspectedDep){var r=[],l=[];e.form.inspectedDep.map((function(e){r.push(e.value),l.push(e.label)})),e.$set(e.form,"inspectedDepId",r.join()),e.$set(e.form,"ownerId",r.join()),e.$set(e.form,"inspectedDepName",l.join()),e.$set(e.form,"ownerName",l.join())}if(e.form.member){var c=[],n=[];e.form.member.map((function(e){c.push(e.value),n.push(e.label)})),e.$set(e.form,"memberId",c.join()),e.$set(e.form,"memberName",n.join())}e.form.checkFrequencys&&e.form.checkFrequencys.length&&e.$set(e.form,"checkFrequency",e.form.checkFrequencys.join()),e.form.startTime&&(e.form.startTime=m()(e.form.startTime).format("HH:mm:ss")),e.form.endTime&&(e.form.endTime=m()(e.form.endTime).format("HH:mm:ss")),e.form.dynamicStartTime&&(e.form.dynamicStartTime=m()(e.form.dynamicStartTime).format("YYYY-MM-DD HH:mm:ss"));var p=[],u=[];e.addItemList.length&&e.addItemList.map((function(e){u.push(e)})),e.importItemList.length&&e.importItemList.map((function(e){u.push(e)})),e.transItemList.length&&e.transItemList.map((function(e){p.push(e.id)})),e.templateItemsList.length&&e.templateItemsList.map((function(e){p.push(e.id)})),e.$set(e.form,"projects",p),e.$set(e.form,"standardImports",u),e.loading=!0,e.editTask?Object(d["l"])(e.form).then((function(t){200===t.code&&(e.loading=!1,e.$message.success("修改成功"),e.returnBack())})):Object(d["a"])(e.form).then((function(t){200===t.code&&(e.loading=!1,e.$message.success("添加成功"),e.returnBack())}))}else e.$message.warning("请填写检查项")}))}}},f=h,k=(a("1bb2"),a("5d22")),v=Object(k["a"])(f,s,i,!1,null,"5cd73dba",null);t["default"]=v.exports}}]);