chunk-e7d1c926.f6b4359f.js 6.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e7d1c926"],{"523a":function(t,e,r){},"668b":function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));r("a4d3"),r("e01a"),r("b636"),r("d28b"),r("e260"),r("d3b7"),r("e6cf"),r("3ca3"),r("ddb0");function n(t){var e,r,n,a=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);a--;){if(r&&null!=(e=t[r]))return e.call(t);if(n&&null!=(e=t[n]))return new i(e.call(t));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function i(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:e}}))}return i=function(t){this.s=t,this.n=t.next},i.prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var r=this.s["return"];return void 0===r?Promise.resolve({value:t,done:!0}):e(r.apply(this.s,arguments))},throw:function(t){var r=this.s["return"];return void 0===r?Promise.reject(t):e(r.apply(this.s,arguments))}},new i(t)}},"911c":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("Header",{attrs:{title:"演习详情"}}),n("div",{staticClass:"main"},[n("p",{staticClass:"tabTitle"},[t._v("演习过程确认项")]),t._l(t.itemObj.drillProcessList,(function(e,r){return n("div",{key:r,staticClass:"course"},[n("p",[t._v(t._s(r+1+"、"+e.contentInfo))]),1===t.itemObj.drillStatus?n("p",{staticClass:"type",on:{click:function(e){return t.getStatus(r)}}},[t._v(t._s(1===e.confirmStatus?"确认":"√"))]):t._e()])})),n("p",{staticClass:"tabTitle"},[1===t.itemObj.drillStatus?n("span",{staticStyle:{color:"red"}},[t._v("* ")]):t._e(),t._v("演习图片")]),n("div",{staticClass:"imagesList"},[1===t.itemObj.drillStatus?n("van-uploader",{attrs:{"after-read":t.afterRead,multiple:""},model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}},[n("img",{attrs:{src:r("5b02"),alt:""}})]):n("div",t._l(t.itemObj.drillPicList,(function(e,r){return n("img",{key:r,staticClass:"imgs",attrs:{src:t.baseUrl+e.picUrl,alt:""},on:{click:function(r){return t.seeImage(e.picUrl)}}})})),0)],1),1===t.itemObj.drillStatus?n("van-button",{staticClass:"add",attrs:{type:"primary"},on:{click:t.add}},[t._v("提交")]):t._e()],2),n("van-image-preview",{attrs:{images:t.imageList,closeable:!0,loop:!1,closeOnPopstate:!0},model:{value:t.imageShow,callback:function(e){t.imageShow=e},expression:"imageShow"}})],1)},i=[],a=(r("a623"),r("4160"),r("159b"),r("96cf"),r("1da1")),s=r("5530"),o=r("668b"),c=r("2f62"),u=r("9ded"),l={name:"VueSkDetails",computed:Object(s["a"])({},Object(c["b"])("baseUrl",["baseUrl"])),data:function(){return{itemObj:{},fileList:[],imageShow:!1,imageList:[],drillPicList:[]}},mounted:function(){var t=this;console.log(this.$route.query.id),Object(u["a"])({id:this.$route.query.id}).then((function(e){var r=e.data;200===r.code&&(console.log(r.data),t.itemObj=r.data)}))},methods:{getStatus:function(t){console.log(this.itemObj.drillProcessList[t]),this.itemObj.drillProcessList[t].confirmStatus=2},seeImage:function(t){this.imageList=[],this.imageList.push(this.baseUrl+t),this.imageShow=!0},add:function(){var t=this;return Object(a["a"])(regeneratorRuntime.mark((function e(){var r,n,i,a,s,c,l,d,f,p,m;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.itemObj.drillProcessList.every((function(t){return 2===t.confirmStatus}))){e.next=4;break}t.$notify({type:"warning",message:"请先选择所有确认项后进行提交!",duration:1e3}),e.next=57;break;case 4:if(t.drillPicList=[],!t.fileList.length){e.next=56;break}r=!0,n=!1,e.prev=8,a=Object(o["a"])(t.fileList);case 10:return e.next=12,a.next();case 12:return s=e.sent,r=s.done,e.next=16,s.value;case 16:if(c=e.sent,r){e.next=34;break}return l=c,d=new FormData,d.append("file",l.file),e.next=23,Object(u["f"])(d);case 23:if(f=e.sent,p=f.data,200!==p.code){e.next=29;break}t.drillPicList.push({picUrl:p.fileName}),e.next=31;break;case 29:return t.$notify({type:"danger",message:p.msg,duration:1e3}),e.abrupt("return");case 31:r=!0,e.next=10;break;case 34:e.next=40;break;case 36:e.prev=36,e.t0=e["catch"](8),n=!0,i=e.t0;case 40:if(e.prev=40,e.prev=41,r||null==a.return){e.next=45;break}return e.next=45,a.return();case 45:if(e.prev=45,!n){e.next=48;break}throw i;case 48:return e.finish(45);case 49:return e.finish(40);case 50:m=[],console.log(t.itemObj),t.itemObj.drillProcessList.forEach((function(t){m.push({id:t.id,confirmStatus:t.confirmStatus})})),Object(u["e"])({id:t.itemObj.id,drillProcessList:m,drillPicList:t.drillPicList}).then((function(e){var r=e.data;200===r.code&&(t.$notify({type:"success",message:r.msg,duration:1e3}),t.$router.go(-1))})),e.next=57;break;case 56:t.$notify({type:"warning",message:"演习图片不能为空",duration:1e3});case 57:case"end":return e.stop()}}),e,null,[[8,36,40,50],[41,,45,49]])})))()},afterRead:function(t){console.log(this.fileList)}}},d=l,f=(r("e9f6"),r("2877")),p=Object(f["a"])(d,n,i,!1,null,"3aea4eac",null);e["default"]=p.exports},"9ded":function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"e",(function(){return s})),r.d(e,"f",(function(){return o})),r.d(e,"d",(function(){return c})),r.d(e,"c",(function(){return u}));var n=r("b775");function i(t){return Object(n["a"])({url:"/app/drill/plan/list",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/app/drill/plan/getInfo",method:"get",params:t})}function s(t){return Object(n["a"])({url:"/app/drill/plan/startPlan",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/app/common/upload",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/app/login",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/app/getInfo",method:"get",params:t})}},a623:function(t,e,r){"use strict";var n=r("23e7"),i=r("b727").every,a=r("a640"),s=a("every");n({target:"Array",proto:!0,forced:!s},{every:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},b636:function(t,e,r){var n=r("e065");n("asyncIterator")},e9f6:function(t,e,r){"use strict";var n=r("523a"),i=r.n(n);i.a}}]);