(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22c0d4"],{f21c:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("br"),a("br"),a("br"),a("el-row",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[e._v("app版本控制")])]),a("div",{staticClass:"text item"},[e._v(" 当前版本 "+e._s(e.Version)+" ")]),a("br"),a("div",{staticClass:"text item"},[e._v(" 时间 "+e._s(e._f("filterFmtDate")(e.CreatedAt))+" ")]),a("br"),a("div",{staticClass:"text item"},[e._v(" 文件名 "+e._s(e.FileName)+" ")]),a("br"),a("div",{staticClass:"text item"},[e._v(" 升级内容 "+e._s(e.UpdateContent)+" ")])])],1),a("el-col",{attrs:{span:10}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[e._v("wgt上传")])]),a("div",{staticClass:"text item"},[e._v(" 版本号 "),a("el-input",{attrs:{placeholder:"如1.1.1"},model:{value:e.upload.version,callback:function(t){e.$set(e.upload,"version",t)},expression:"upload.version"}})],1),a("div",{staticClass:"text item"},[e._v(" 更新内容 "),a("el-input",{attrs:{placeholder:"更新内容"},model:{value:e.upload.updateContent,callback:function(t){e.$set(e.upload,"updateContent",t)},expression:"upload.updateContent "}})],1),a("div",{staticClass:"text item"},[a("el-upload",{ref:"my-upload",staticClass:"upload-demo",attrs:{action:e.trueApi.UpVueFramework,"http-request":e.upqiniu,"show-file-list":!1,limit:1,"before-upload":e.beforeUpload}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")]),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("只能上传wgt文件，且不超过50mb")])],1)],1)])],1)],1)],1)},o=[],s=a("7c78"),i={name:"versionControlMefisto",data:function(){return{trueApi:{UpVueFramework:headbpi+"v1/Sensors/UpVueFramework",QueryVueFramework:headbpi+"v1/Sensors/QueryVueFramework"},falseApi:{UpVueFramework:"http://192.168.0.3:19096/v1/Sensors/UpVueFramework",QueryVueFramework:"http://192.168.0.3:19096/v1/Sensors/QueryVueFramework"},loading:!1,Version:"",CreatedAt:"",FileName:"",UpdateContent:"",fileList:[],upload:{version:"1.3.0",updateContent:"基础功能",file:[]}}},mounted:function(){this.QueryVueFramework()},methods:{upqiniu:function(e){var t=this;t.loading=!0;var a={headers:{"Content-Type":"multipart/form-data"}},r=new FormData;r.append("file",e.file),r.append("version",t.upload.version),r.append("updateContent",t.upload.updateContent),this.axios.post(this.trueApi.UpVueFramework,r,a).then((function(e){console.log(e.data),t.QueryVueFramework(),t.loading=!1,t.$refs["my-upload"].clearFiles()}))},beforeUpload:function(e){var t=e.size/1024/1024<50;return t||this.$message.error("上传wgt大小不能超过 50MB!"),t},QueryVueFramework:function(){var e=this,t={token:localStorage.token},a=s.stringify(t),r=e.trueApi.QueryVueFramework;axios.post(r,a).then((function(t){var a=t.data;0==a.Code?(e.Version=a.VueFramework.Version,e.CreatedAt=a.VueFramework.CreatedAt,e.FileName=a.VueFramework.FileName,e.UpdateContent=a.VueFramework.UpdateContent,e.upload.version=a.VueFramework.Version):console.log(a.Memo)}))}},filters:{filterFmtDate:function(e){return e?nonTfmtDate(e,16):"--"}}},n=i,l=a("cba8"),u=Object(l["a"])(n,r,o,!1,null,"e61e523c",null);t["default"]=u.exports}}]);