(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-spotCheck-spotCheckDetailAdd-spotCheckDetailAdd"],{"0e95":function(t,e,a){"use strict";a.r(e);var i=a("ef11"),s=a.n(i);for(var n in i)"default"!==n&&function(t){a.d(e,t,(function(){return i[t]}))}(n);e["default"]=s.a},"27ed":function(t,e,a){"use strict";var i;a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return n})),a.d(e,"a",(function(){return i}));var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"page"},[a("v-uni-view",{staticClass:"grace-list-items",staticStyle:{background:"#fff","margin-bottom":"16upx"}},[a("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[a("v-uni-text",{staticClass:"grace-icons icon-comments icon grace-blue"}),a("v-uni-text",{staticClass:"title grace-black"},[t._v("设备信息")])],1),a("v-uni-view",{staticClass:"grace-nowrap g-title-bx-row",staticStyle:{padding:"0 20upx"}},[a("v-uni-text",{staticClass:" grace-black9 g-card-w"},[t._v("设备编号:")]),a("v-uni-text",{staticClass:" grace-black5 grace-bold"},[t._v(t._s(t.dataValue.eqCode))])],1),a("v-uni-view",{staticClass:"grace-nowrap g-title-bx-row",staticStyle:{padding:"0 20upx"}},[a("v-uni-text",{staticClass:" grace-black9 g-card-w"},[t._v("设备名称:")]),a("v-uni-text",{staticClass:" grace-black5 grace-bold"},[t._v(t._s(t.dataValue.eqName))])],1)],1),a("v-uni-view",{staticClass:"g-line"}),a("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[a("v-uni-text",{staticClass:"grace-icons icon-article icon grace-blue"}),a("v-uni-text",{staticClass:"title grace-black"},[t._v("任务详情")])],1),a("v-uni-view",{staticClass:"list-bx"},[t._l(t.dataList,(function(e,i){return[a("v-uni-view",{staticClass:"list-item",attrs:{"data-index":i},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onListTap.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"li-hd"},[t._v("部位:"+t._s(e.partName))]),a("v-uni-text",{staticClass:"li-hd"},[t._v("检查内容:"+t._s(e.examine))]),a("v-uni-text",{staticClass:"li-hd"},[t._v("标准: "+t._s(e.standard))]),a("v-uni-image",{staticClass:"li-img",attrs:{src:0==e.checkResult?t.imgSuccess:t.imgFalse,mode:"aspectFit"}})],1)]}))],2),a("v-uni-view",{staticClass:"btn-bx"},[a("v-uni-button",{staticClass:"btn-sub",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.form_submit.apply(void 0,arguments)}}},[t._v("保存")]),a("v-uni-button",{staticClass:"btn-res",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.form_cancel.apply(void 0,arguments)}}},[t._v("取消")])],1)],1)},n=[]},"5cf5":function(t,e,a){var i=a("cfc5");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var s=a("4f06").default;s("2ce0f32b",i,!0,{sourceMap:!1,shadowMode:!1})},6310:function(t,e,a){"use strict";a.r(e);var i=a("27ed"),s=a("0e95");for(var n in s)"default"!==n&&function(t){a.d(e,t,(function(){return s[t]}))}(n);a("8e59");var o,c=a("f0c5"),r=Object(c["a"])(s["default"],i["b"],i["c"],!1,null,"5fac2766",null,!1,i["a"],o);e["default"]=r.exports},"8e59":function(t,e,a){"use strict";var i=a("5cf5"),s=a.n(i);s.a},cfc5:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".show-title[data-v-5fac2766]{height:%?60?%;background:#f2f2f2;padding-left:%?40?%}.title[data-v-5fac2766]{font-size:%?28?%;color:#333;font-weight:700}.list-bx[data-v-5fac2766]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;padding:%?30?%;-webkit-flex-wrap:wrap;flex-wrap:wrap;width:100%;height:auto}.list-item[data-v-5fac2766]{width:90%;min-height:%?90?%;border-bottom:%?1?% solid #d3d3d3;position:relative}.li-hd[data-v-5fac2766]{font-size:%?28?%;color:#333;margin-right:%?10?%;width:%?600?%;display:block;line-height:2}.li-img[data-v-5fac2766]{width:%?50?%;height:%?50?%;right:%?0?%;top:%?10?%;position:absolute}.btn-bx[data-v-5fac2766]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.btn-sub[data-v-5fac2766]{width:%?190?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-5fac2766]{width:%?190?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}",""]),t.exports=e},ef11:function(t,e,a){"use strict";a("4de4"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={data:function(){return{imgSuccess:"../../../../static/index/success.png",imgFalse:"../../../../static/index/false.png",code:"08.TLJ024",date:"2019-06-06",g_username:"epans",g_employeName:"Epans",g_employeId:"2",dataValue:{},dataList:[]}},onLoad:function(t){var e=this,a=uni.getStorageSync("g_employeName");e.g_employeName=a,console.log("前一个页面数据:",t);var i=t.code,s=t.eqId;e.code=i,e.eqId=s;var n=e.get_today(),o=uni.getStorageSync("g_username");e.g_username=o;var c=uni.getStorageSync("g_employeId"),r=uni.getStorageSync("g_pastureId");e.g_employeId=c,e.today_date=n;var d="/authdata/GetDataByName",l={name:"findAssetMainAPPV2",parammaps:{eqCode:i,pastureId:r}};e.ajax(d,l,"POST",e.get_card_data);var u="/authdata/GetDataByName",p={name:"findByBigIdSpotCheck",parammaps:{eqId:s}};e.ajax(u,p,"POST",e.get_list_data)},onBackPress:function(){return uni.redirectTo({url:"/pages/index/spotCheck/spotCheck"}),!0},methods:{onListTap:function(t){var e=this,a=t.currentTarget.dataset.index,i=e.dataList,s=i[a]["checkResult"];console.log("当前点击的数据",JSON.stringify(i[a])),0==s?(i[a]["checkResult"]="1",e.dataList=i):(i[a]["checkResult"]="0",e.dataList=i)},form_submit:function(){var t=this,e=uni.getStorageSync("g_employeId"),a=uni.getStorageSync("g_pastureId"),i=t.dataList,s=i.filter((function(t){return 0==t.checkResult})),n="检测"+i.length+"项,合格"+s.length+"项";console.log(n);var o={common:{returnmap:"0"},data:[{name:"checkSpotCheck",type:"v",parammaps:{assetNumber:t.dataValue.eqCode,checkdate:t.today_date}},{name:"insertBigSpotCheck1",resultname:"insertBigSpotcheck1",type:"e",parammaps:{assetNumber:t.dataValue.eqCode,assetName:t.dataValue.eqName,employeId:e,date:t.today_date,inspectionResults:n,assetTypeId:t.dataValue.eqClassId,pastureId:a,eqId:t.dataValue.eqId}},{name:"insertSpotList",resultmaps:{list:t.dataList},children:[{name:"insertSpotCheck1",type:"e",parammaps:{partName:"@insertSpotList.partName",examine:"@insertSpotList.examine",standard:"@insertSpotList.standard",note:"@insertSpotList.note",assetTypeId:"@insertSpotList.assetTypeId",checkResult:"@insertSpotList.checkResult",bigId:"@insertBigSpotcheck1.LastInsertId",partId:"@insertSpotList.partId"}}]},{name:"updateSpotCheckResults",type:"e",parammaps:{id:"@insertBigSpotcheck1.LastInsertId"}}]};console.log("需要发送的数据:"+JSON.stringify(o)),console.log("需要发送的数据:"+JSON.stringify(this.dataList));var c="/authdata/ExecDataByConfig";t.ajax(c,o,"POST",t.get_add_status)},form_cancel:function(t){uni.redirectTo({url:"/pages/index/spotCheck/spotCheck"})},form_quick:function(t){uni.redirectTo({url:"/pages/index/spotCheck/spotCheck"})},get_card_data:function(t){if("ok"==t.msg)if(null==t.data.list)uni.showToast({title:"获取设备信息失败,传递数据为空",duration:2e3,icon:"none"});else{console.log("设备信息:",JSON.stringify(t));var e=t.data.list[0];this.dataValue=e}else{var a=t.data;uni.showToast({title:"获取信息失败"+a,duration:2e3,icon:"none"})}},get_list_data:function(t){console.log("列表数据:",JSON.stringify(t)),this.dataList=t.data.list},get_add_status:function(t){if(console.log("保存状态:",t),"ok"==t.msg)uni.showToast({title:"保存成功",duration:500,icon:"none",success:function(t){setTimeout((function(){uni.redirectTo({url:"/pages/index/spotCheck/spotCheck"})}),1e3)}});else{console.log("进入保存失败……");var e=t.data;uni.showModal({title:"保存失败",content:e,showCancel:!1,success:function(t){t.confirm&&(console.log("用户点击确定"),uni.redirectTo({url:"/pages/index/spotCheck/spotCheck"}))}})}}}};e.default=i}}]);