(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-073b8066"],{"0a5d":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"main-content"},[t._m(0),e("div",{staticClass:"content"},[e("div",{staticStyle:{width:"50px"}},[e("download-excel",{staticClass:"export-excel-wrapper",attrs:{fetch:t.fetchData,fields:t.json_fields,"before-finish":t.finishDownload,name:"巡检记录.xls"}},[e("el-button",{attrs:{size:"mini",icon:"el-icon-folder-add",plain:""}},[t._v("导出Excel(当前页)")])],1)],1),e("div",{},[e("VueTable",{ref:"table",attrs:{config:t.config},on:{tableCheck:t.tableCheck,exportTableConfig:t.exportTableConfig}},[e("template",{slot:"footer"},[e("div",{staticClass:"table-footer"})])],2)],1),e("Drawer",{attrs:{drawerTitle:"新增计划",drawerVrisible:t.add_vrisible},on:{drawerClose:t.addClose}},[e("div",{staticStyle:{padding:"30px"}},[e("FromCard",[e("template",{slot:"title"},[t._v("信息")]),[e("VueForm",{ref:"addForm",attrs:{formObj:t.addForm},scopedSlots:t._u([{key:"date",fn:function(){return[e("el-time-picker",{attrs:{"is-range":"","range-separator":"至","value-format":"HH:MM:SS","start-placeholder":"开始时间","end-placeholder":"结束时间",placeholder:"选择时间范围"},on:{change:t.dateTimeChange},model:{value:t.addDate,callback:function(e){t.addDate=e},expression:"addDate"}})]},proxy:!0},{key:"inspectionRouteId",fn:function(){return[e("el-select",{staticStyle:{width:"240px"},attrs:{"remote-method":t.remoteMethod,loading:t.loading,remote:"",filterable:"",placeholder:"请选择"},on:{change:t.change,focus:t.sefocus},model:{value:t.addForm.ruleForm.inspectionRouteId,callback:function(e){t.$set(t.addForm.ruleForm,"inspectionRouteId",e)},expression:"\n addForm.ruleForm\n .inspectionRouteId\n "}},t._l(t.options,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)]},proxy:!0},{key:"sysOrganization",fn:function(){return[e("el-select",{staticStyle:{width:"240px"},attrs:{"remote-method":t.remoteMethod,loading:t.loading,remote:"",filterable:"",placeholder:"请选择"},on:{change:t.sChange,focus:t.sefocus},model:{value:t.addForm.ruleForm.organizationId,callback:function(e){t.$set(t.addForm.ruleForm,"organizationId",e)},expression:"\n addForm.ruleForm.organizationId\n "}},t._l(t.sysOptions,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)]},proxy:!0}])})]],2)],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("button",{staticClass:"btn-orange",on:{click:function(e){return t.addSubmit()}}},[e("span",[e("i",{staticClass:"el-icon-circle-check"}),t._v("提交")])]),e("button",{staticClass:"btn-gray",on:{click:t.addClose}},[e("span",[t._v("取消")])])])])],1)])])},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-titel"},[e("span",[t._v("巡检记录")])])}],u=n("662b"),o=n("d63a"),i={data(){return{pageNum:1,size:10,add_vrisible:!1,addDate:null,options:[],sysOptions:[],loading:!1,addForm:{ruleForm:{name:null,code:"",inspectionRouteId:null,organizationId:null,isSort:"2"},form_item:[{type:"Slot",label:"路线",placeholder:"请输入",width:"50%",prop:"inspectionRouteId",slotName:"inspectionRouteId"},{type:"Input",label:"计划名称",placeholder:"请输入",width:"50%",prop:"name"},{type:"Slot",label:"部门",placeholder:"请输入",width:"50%",prop:"organizationId",slotName:"sysOrganization"},{type:"Select",label:"巡检人",placeholder:"请输入",width:"50%",prop:"inspector",options:[]},{type:"DateTime",label:"开始时间",placeholder:"请输入",width:"50%",prop:"planBeginDate"},{type:"Select",label:"检查频率",width:"50%",options:[{value:"1",label:"每天"},{value:"2",label:"每周"},{value:"3",label:"每月"}],prop:"checkRateType"}]},table_row:[],activeName:"0",json_fields:{"执行巡检编号":"code","执行巡检名称":"name","计划当次巡检开始时间":"beginDate","计划当次巡检结束时间":"endDate","实际当次巡检开始时间":"actualBeginDate","实际当次巡检结束时间":"actualEndDate","状态":{field:"status",callback:t=>{switch(t){case 1:return"待巡检";case 2:return"已巡检";case 3:return"巡检中";case 4:return"未巡检"}}},"巡检人姓名":"inspectorName","巡检人手机号":"inspectorTel"},config:{thead:[{label:"序号",type:"index",width:"80"},{label:"执行巡检编号",prop:"code",width:"auto"},{label:"执行巡检名称",prop:"name",width:"auto"},{label:"计划当次巡检开始时间",prop:"beginDate",width:"auto"},{label:"计划当次巡检结束时间",prop:"endDate",width:"auto"},{label:"实际当次巡检开始时间",prop:"actualBeginDate",width:"auto"},{label:"实际当次巡检结束时间",prop:"actualEndDate",width:"auto"},{label:"状态",prop:"status",width:"auto",type:"function",callback:(t,e)=>{switch(t.status){case 1:return"待巡检";case 2:return"已巡检";case 3:return"巡检中";case 4:return"未巡检"}}},{label:"巡检人姓名",prop:"inspectorName",width:"auto"},{label:"巡检人手机号",prop:"inspectorTel",width:"auto"}],table_data:[],url:"inspectionPlanExecuteList",search_item:[{type:"Input",label:"巡检编号",placeholder:"请输入",prop:"code"},{type:"Input",label:"巡检人手机号",placeholder:"请输入",prop:"inspectorTel"},{type:"select",label:"巡检状态",placeholder:"请选择",prop:"inspectionStatus",options:[{value:1,label:"待巡检"},{value:2,label:"已巡检"},{value:3,label:"巡检中"},{value:4,label:"未巡检"}]}],data:{pageNum:1,size:10}}}},props:{currentPage:{type:Number,default:1},limit:{type:Number,default:10},totalNumber:{type:Number,default:100},pageCount:{type:Number,default:1}},methods:{async fetchData(){let t={url:"inspectionPlanExecuteList",data:{pageNum:this.pageNum,size:this.size}};const e=await Object(u["b"])(t);return console.log(542),e},ExcelLoading(t,e){const n=this.$loading({lock:!0,text:"正在导出Excel"+t,spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});n.text=`正在导出Excel ${t}/${e}`,console.log(n.text)},finishDownload(){const t=this.$loading();t.close()},getUserList(t){let e={pageNum:1,size:20};this.loading=!0,Object(o["M"])(e).then(t=>{console.log(t),this.options=t.tableList,this.loading=!1}),Object(o["sb"])(e).then(t=>{this.sysOptions=t.data,this.loading=!1})},remoteMethod(t){this.getUserList(t)},sefocus(){this.getUserList()},change(t){console.log(t)},sChange(t){this.addForm.form_item[3].options=[];let e={pageNum:1,size:100,organizationId:t};Object(o["tb"])(e).then(t=>{console.log(t),t.tableList.forEach(t=>{let e={value:t.id,label:t.nickName};this.addForm.form_item[3].options.push(e)}),console.log(this.addForm.form_item[3].options),this.loading=!1})},add(){this.add_vrisible=!0},addClose(){this.$refs.addForm.reset(),this.add_vrisible=!1},addSubmit(){let t={...this.addForm.ruleForm};Object(o["D"])(t).then(t=>{t.status&&(this.$message({message:t.message,type:"success"}),this.$refs.table.loadData(),this.addClose())})},dateTimeChange(t){this.addForm.ruleForm.openStartDate=t[0],this.addForm.ruleForm.openEndDate=t[1]},handleClick(t,e){let n=null;n=0!=this.activeName?this.activeName:null;const r={pageNum:1,size:10,status:n};this.$refs.table.requestData(r)},tableCheck(t){this.table_row=t},exportTableConfig(t){this.pageNum=t.pageNum,this.size=t.size},del(t){if(t.length){let t=[];for(let e=0;e{this.$refs.table.tableDelete(t)}).catch(t=>{})}else this.$message.error("请选中需要删除的数据")},isEnable(t){console.log(t[0].id),t.length>1?this.$message.error("只能操作一条数据"):t.length?Object(o["E"])({id:t[0].id}).then(t=>{console.log(t),t.status&&(this.$message({message:t.message,type:"success"}),this.$refs.table.loadData(),this.addClose())}):this.$message.error("请选择")}}},s=i,d=n("2877"),l=Object(d["a"])(s,r,a,!1,null,null,null);e["default"]=l.exports},"662b":function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return u}));n("f2d9");var r=n("2b74");async function a(t,e){let n=[];const a=await Object(r["b"])(t);if(n.push(...a.tableList),a.pageCount>1)for(let u=1;u