(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6115399c"],{"1c35":function(t,e,i){"use strict";i("e4b2")},a427:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"layout",staticStyle:{"background-color":"#eee",height:"100%"}},[e("div",{staticClass:"header"},[e("van-icon",{staticClass:"vanIcon",attrs:{name:"arrow-left"},on:{click:t.backtrack}}),e("span",[t._v("演习情况")])],1),e("div",{staticClass:"textContent",staticStyle:{"background-color":"#eee"}},[e("div",{staticClass:"sample"},[e("van-cell-group",[e("van-cell",{attrs:{title:"演习名称",value:this.$route.query.drillName}}),e("van-cell",{attrs:{title:"演习类型",value:this.$route.query.drillType}}),e("van-cell",{attrs:{title:"演习地点",value:this.$route.query.drillArea}}),e("van-cell",{attrs:{title:"演习时长",value:t.getDuration(this.$route.query.drillDate)}})],1)],1),e("div",{staticClass:"sample"},[e("div",{staticStyle:{color:"blue",margin:"0.1rem","text-align":"left"}},[t._v(" 演习过程 ")]),e("van-list",{attrs:{finished:t.finished,"finished-text":"",error:t.error,"error-text":"请求失败,点击重新加载"},on:{"update:error":function(e){t.error=e},load:t.queryDrillProcess},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[e("ul",t._l(t.list,(function(i,s){return e("li",{key:s,staticClass:"item"},["2"===i.confirmStatus?e("van-cell",[e("p",[t._v(t._s(i.content))]),e("p",[t._v("已确认 确认人 "+t._s(i.confirmPerson)+" "+t._s(t.formatDate(i.confirmTime)))])]):e("van-cell",[e("p",[t._v(t._s(i.content))]),e("p",{staticStyle:{"border-style":"solid","border-width":"1px",color:"blue",width:"48px",padding:"5px",margin:"5px"},on:{click:function(e){return t.confirmationExercise(i.id,i.content)}}},[t._v("确认")])])],1)})),0)])],1)])])},r=[],o=i("c761"),n={name:"VueCli4VantIndex",data(){return{showPopover:!1,person:"请选择",fileList:[],list:[],error:!1,loading:!1,finished:!1,confirm:"确认",timer:null,user:{}}},components:{},mounted(){window.suplink.getUserInfo().then(t=>{"200"===t.code&&(this.user=t.data)}),window.history&&window.history.pushState&&(history.pushState(null,null,document.URL),window.addEventListener("popstate",this.fun,!1))},methods:{backtrack(){this.$router.go(-1)},onSelect(t){console.log(t),this.person=t.text},formatter(t){this.arrived=t,this.arriveNot=this.arriveAll-this.arrived},getPhoto(t){this.fileList=t.fileList},doEnd(){console.log(this.fileList),Object(o["t"])({id:"",recordId:this.$route.query.recordId,created:this.user.username,drillSignUrl:""}).then(({data:t})=>{console.log(t),200===t.code?(this.$emit("cloneSpecific",!1),this.$notify({type:"success",message:"操作成功!"})):this.$notify({type:"danger",message:t.msg})})},confirmationExercise(t,e){Object(o["a"])({id:t,recordId:this.$route.query.recordId,confirmPerson:this.user.username,confirmStatus:"1",content:e,planId:this.$route.query.planId}).then(({data:t})=>{console.log(t),200===t.code?(this.$emit("cloneSpecific",!1),this.$notify({type:"success",message:"\n 操作成功!"}),location.reload()):this.$notify({type:"danger",message:t.msg})})},queryDrillProcess(){this.loading=!1,Object(o["m"])({recordId:this.$route.query.recordId}).then(t=>{200===t.status?(this.loading=!1,console.log(t),this.list=t.data.data,this.loading=!1,this.finished=!0):this.$notify({type:"danger",message:data.msg})}).catch(()=>{this.loading=!1,this.$notify({})}),this.timer=setInterval(()=>{this.loading=!1,Object(o["m"])({recordId:this.$route.query.recordId}).then(t=>{200===t.status&&(this.loading=!1,console.log(t),this.list=t.data.data,this.loading=!1,this.finished=!0)}).catch(()=>{this.loading=!1})},1e4)},formatDate:function(t){var e=new Date(t),i=e.getFullYear(),s=e.getMonth()+1,r=e.getDate(),o=e.getHours(),n=e.getMinutes(),a=e.getSeconds();return`${i}-${s}-${r}:${o}:${n}:${a}`},getDuration:function(t){var e=t,i=new Date,s=i.getTime()-new Date(e).getTime(),r=(Math.floor(s/864e5),s%864e5),o=Math.floor(r/36e5),n=r%36e5,a=Math.floor(n/6e4),l=n%6e4,c=Math.round(l/1e3);return`${o}小时${a}分${c}秒`},fun:function(){this.$router.go(-1)}},destroyed(){window.removeEventListener("popstate",this.fun,!1)},beforeDestroy(){clearInterval(this.timer),this.timer=null}},a=n,l=(i("1c35"),i("2877")),c=Object(l["a"])(a,s,r,!1,null,"dea94d08",null);e["default"]=c.exports},e4b2:function(t,e,i){}}]);