chunk-933bb68e.4ded5b28.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-933bb68e"],{"0815":function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"m-container"},[e._m(0),e._v(" "),o("div",{staticClass:"m-core"},[o("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"appVersionInfo/add",expression:"'appVersionInfo/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.createEdi}},[e._v("\n 新建\n ")]),e._v(" "),o("el-upload",{directives:[{name:"permission",rawName:"v-permission",value:"import/importRedemptionCode",expression:"'import/importRedemptionCode'"}],staticStyle:{display:"inline-block","margin-left":"10px"},attrs:{action:"/api-web/import/importRedemptionCode","show-file-list":!1,"before-upload":e.beforeUpload,accept:".xlsx,.xls",headers:e.headers,"on-error":e.handleError,"on-success":e.handleSuccess}},[o("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"}},[e._v("\n 导入兑换码\n ")])],1),e._v(" "),o("save-form",{attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[o("el-form-item",{attrs:{label:"关键字"}},[o("el-input",{staticStyle:{"max-width":"180px"},attrs:{size:"default",placeholder:"编号/版本号/描述",clearable:""},model:{value:e.searchForm.keyword,callback:function(t){e.$set(e.searchForm,"keyword",t)},expression:"searchForm.keyword"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"客户端"}},[o("el-select",{attrs:{clearable:""},model:{value:e.searchForm.platform,callback:function(t){e.$set(e.searchForm,"platform",t)},expression:"searchForm.platform"}},e._l(e.sectionList,(function(e,t){return o("el-option",{key:t,attrs:{value:e.value,label:e.label}})})),1)],1),e._v(" "),o("el-form-item",{attrs:{label:"状态"}},[o("el-select",{attrs:{clearable:"",filterable:"",placeholder:"状态"},model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status",t)},expression:"searchForm.status"}},[o("el-option",{attrs:{label:"最新",value:"newest"}}),e._v(" "),o("el-option",{attrs:{label:"历史",value:"history"}})],1)],1),e._v(" "),o("el-form-item",[o("el-button",{attrs:{type:"danger","native-type":"submit"}},[e._v("搜索")]),e._v(" "),o("el-button",{attrs:{type:"primary","native-type":"reset"}},[e._v("重置")])],1)],1),e._v(" "),o("div",{staticClass:"tableWrap"},[o("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[o("el-table-column",{attrs:{align:"center",prop:"id",label:"编号"}}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"platform",label:"客户端"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",[e._v(e._s(e._f("editionFilter")(t.row.platform)))])]}}])}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"version",label:"版本号"}}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"isForceUpdate",label:"强制更新"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",[e._v(e._s(t.row.isForceUpdate?"是":"否"))])]}}])}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"status",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",[e._v(e._s(e._f("statusFilter")(t.row.status)))])]}}])}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"description",label:"描述"},scopedSlots:e._u([{key:"default",fn:function(e){return[o("overflow-text",{attrs:{text:e.row.description}})]}}])}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"downloadUrl",width:"120",label:"下载链接"},scopedSlots:e._u([{key:"default",fn:function(e){return[o("overflow-text",{attrs:{width:"120px",text:e.row.downloadUrl}})]}}])}),e._v(" "),o("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",[o("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"appVersionInfo/update",expression:"'appVersionInfo/update'"}],attrs:{type:"text"},on:{click:function(o){return e.resetEdit(t.row)}}},[e._v("修改")])],1)]}}])})],1),e._v(" "),o("pagination",{attrs:{sync:"",total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],1)],1),e._v(" "),e.sectionVisible?o("el-dialog",{attrs:{title:e.isNew?"版本添加":"版本修改",width:"550px",visible:e.sectionVisible},on:{"update:visible":function(t){e.sectionVisible=t}}},[e.sectionVisible?o("el-form",{ref:"sectionForm",attrs:{model:e.sectionForm,rules:e.sectionRules,"label-position":"right","label-width":"80px"}},[o("el-form-item",{attrs:{label:"客户端",prop:"platform"}},[o("el-select",{staticStyle:{width:"100% !important"},attrs:{clearable:"",disabled:!e.isNew},model:{value:e.sectionForm.platform,callback:function(t){e.$set(e.sectionForm,"platform",t)},expression:"sectionForm.platform"}},e._l(e.sectionList,(function(e,t){return o("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),o("el-form-item",{attrs:{label:"版本号",prop:"version"}},[o("el-input",{attrs:{disabled:!e.isNew},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.sectionForm.version,callback:function(t){e.$set(e.sectionForm,"version","string"===typeof t?t.trim():t)},expression:"sectionForm.version"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"强制更新",prop:"isForceUpdate"}},[o("el-select",{staticStyle:{width:"100% !important"},attrs:{clearable:""},model:{value:e.sectionForm.isForceUpdate,callback:function(t){e.$set(e.sectionForm,"isForceUpdate",t)},expression:"sectionForm.isForceUpdate"}},[o("el-option",{attrs:{label:"是",value:!0}}),e._v(" "),o("el-option",{attrs:{label:"否",value:!1}})],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"状态",prop:"status"}},[o("el-select",{staticStyle:{width:"100% !important"},attrs:{clearable:""},model:{value:e.sectionForm.status,callback:function(t){e.$set(e.sectionForm,"status",t)},expression:"sectionForm.status"}},[o("el-option",{attrs:{label:"最新",value:"newest"}}),e._v(" "),o("el-option",{attrs:{label:"历史",value:"history"}})],1)],1),e._v(" "),["android-teacher","android-student","android-education"].includes(e.sectionForm.platform)?o("el-form-item",{attrs:{label:"上传文件",prop:"downloadUrl",rules:[{required:!1}]}},[o("singe-file-upload",{attrs:{tips:"仅支持上传 APK, DMG, EXE",accept:".apk,.dmg,.exe"},model:{value:e.sectionForm.downloadUrl,callback:function(t){e.$set(e.sectionForm,"downloadUrl",t)},expression:"sectionForm.downloadUrl"}})],1):e._e(),e._v(" "),["android-teacher","android-student","android-education"].includes(e.sectionForm.platform)?o("el-form-item",{attrs:{label:"下载链接",prop:"downloadUrl"}},[o("el-input",{attrs:{type:"textarea"},model:{value:e.sectionForm.downloadUrl,callback:function(t){e.$set(e.sectionForm,"downloadUrl","string"===typeof t?t.trim():t)},expression:"sectionForm.downloadUrl"}})],1):e._e(),e._v(" "),o("el-form-item",{attrs:{label:"描述",prop:"description"}},[o("el-input",{attrs:{type:"textarea"},model:{value:e.sectionForm.description,callback:function(t){e.$set(e.sectionForm,"description",t)},expression:"sectionForm.description"}})],1)],1):e._e(),e._v(" "),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.sectionVisible=!1}}},[e._v("取 消")]),e._v(" "),e.isNew?o("el-button",{attrs:{type:"primary"},on:{click:e.createEdition}},[e._v("确 定")]):e._e(),e._v(" "),e.isNew?e._e():o("el-button",{attrs:{type:"primary"},on:{click:e.resetEdition}},[e._v("确 定")])],1)],1):e._e()],1)},a=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("h2",[o("div",{staticClass:"squrt"}),e._v("\n APP版本控制\n ")])}],i=o("5530"),n=o("99b4"),s=o("333d"),l=o("5f87"),c=o("e762"),u=o("3908"),d=o("c7f0"),p={components:{pagination:s["a"],Upload:d["a"]},data:function(){return{sectionVisible:!1,tableList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},searchForm:{keyword:null,platform:null,status:null},sectionList:[{value:"ios-teacher",label:"苹果-老师端"},{value:"ios-student",label:"苹果-学生端"},{value:"ios-education",label:"苹果-管理端"},{value:"android-teacher",label:"安卓-老师端"},{value:"android-student",label:"安卓-学生端"},{value:"android-education",label:"安卓-管理端"},{value:"ios-electron",label:"苹果-桌面端"},{value:"win-electron",label:"win-桌面端"}],sectionForm:{platform:"",version:"",isForceUpdate:"",downloadUrl:"",status:"",id:""},sectionRules:{platform:[{required:!0,message:"请选择客户端",trigger:"blur"}],version:[{required:!0,message:"请输入版本号",trigger:"blur"}],isForceUpdate:[{required:!0,message:"请选择是否强更",trigger:"blur"}],status:[{required:!0,message:"请选择版本状态",trigger:"blur"}],downloadUrl:[{required:!0,message:"请输入下载链接",trigger:"blur"}]},isNew:!1,headers:{Authorization:Object(l["b"])(),tenantId:Object(l["a"])()}}},activated:function(){this.init()},created:function(){this.init()},methods:{search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.searchForm={platform:"",version:"",isForceUpdate:"",downloadUrl:"",status:"",id:""},this.getList()},init:function(){this.getList()},getList:function(){var e=this;Object(n["b"])(Object(i["a"])(Object(i["a"])({},this.searchForm),{},{page:this.rules.page,rows:this.rules.limit})).then((function(t){200==t.code&&(e.tableList=t.data.rows.map((function(e){return Object(i["a"])(Object(i["a"])({},e),{},{downloadUrl:Object(c["a"])(e.downloadUrl||"")})})),e.rules.total=t.data.total)}))},beforeUpload:function(e){u["a"].startLoading()},handleSuccess:function(e,t,o){if(u["a"].endLoading(),200==e.code)this.$message.success(e.msg||"导入成功");else if(0==e.code){var r=this.fomatStr(e.msg);this.$alert(r,"导入结果",{confirmButtonText:"确定",dangerouslyUseHTMLString:!0,callback:function(e){}})}else this.$message.error(e.msg)},handleError:function(e,t,o){u["a"].endLoading()},createEdi:function(){this.isNew=!0,this.sectionVisible=!0},createEdition:function(){var e=this;this.$refs.sectionForm.validate((function(t){t&&Object(n["a"])(e.sectionForm).then((function(t){200==t.code&&(e.$message.success("新增成功"),e.sectionVisible=!1,e.getList())}))}))},resetEdit:function(e){var t=this;this.isNew=!1,this.$nextTick((function(){t.sectionForm=e})),this.sectionVisible=!0},resetEdition:function(){var e=this;Object(n["I"])(this.sectionForm).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.sectionVisible=!1,e.getList())}))}},filters:{statusFilter:function(e){return"newest"==e?"最新":"history"==e?"历史":""}},watch:{sectionVisible:function(e){e||(this.sectionForm={platform:"",version:"",isForceUpdate:"",downloadUrl:"",status:"",id:""},this.$refs["sectionForm"].resetFields())}}},m=p,f=o("2877"),b=Object(f["a"])(m,r,a,!1,null,null,null);t["default"]=b.exports},"09f4":function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),Math.easeInOutQuad=function(e,t,o,r){return e/=r/2,e<1?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(e,t,o){var n=i(),s=e-n,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var i=Math.easeInOutQuad(c,n,s,t);a(i),c<t?r(e):o&&"function"===typeof o&&o()};u()}},e762:function(e,t,o){"use strict";o.d(t,"b",(function(){return x})),o.d(t,"a",(function(){return T}));const r="function"===typeof atob,a="function"===typeof btoa,i="function"===typeof Buffer,n="function"===typeof TextDecoder?new TextDecoder:void 0,s="function"===typeof TextEncoder?new TextEncoder:void 0,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=Array.prototype.slice.call(l),u=(e=>{let t={};return e.forEach((e,o)=>t[e]=o),t})(c),d=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,p=String.fromCharCode.bind(String),m="function"===typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=(e=>e))=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),f=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),b=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),v=e=>{let t,o,r,a,i="";const n=e.length%3;for(let s=0;s<e.length;){if((o=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(a=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=o<<16|r<<8|a,i+=c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}return n?i.slice(0,n-3)+"===".substring(n):i},h=a?e=>btoa(e):i?e=>Buffer.from(e,"binary").toString("base64"):v,g=i?e=>Buffer.from(e).toString("base64"):e=>{const t=4096;let o=[];for(let r=0,a=e.length;r<a;r+=t)o.push(p.apply(null,e.subarray(r,r+t)));return h(o.join(""))},w=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?p(192|t>>>6)+p(128|63&t):p(224|t>>>12&15)+p(128|t>>>6&63)+p(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return p(240|t>>>18&7)+p(128|t>>>12&63)+p(128|t>>>6&63)+p(128|63&t)},F=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,y=e=>e.replace(F,w),_=i?e=>Buffer.from(e,"utf8").toString("base64"):s?e=>g(s.encode(e)):e=>h(y(e)),x=(e,t=!1)=>t?f(_(e)):_(e),k=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,A=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),o=t-65536;return p(55296+(o>>>10))+p(56320+(1023&o));case 3:return p((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return p((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},U=e=>e.replace(k,A),C=e=>{if(e=e.replace(/\s+/g,""),!d.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,o,r,a="";for(let i=0;i<e.length;)t=u[e.charAt(i++)]<<18|u[e.charAt(i++)]<<12|(o=u[e.charAt(i++)])<<6|(r=u[e.charAt(i++)]),a+=64===o?p(t>>16&255):64===r?p(t>>16&255,t>>8&255):p(t>>16&255,t>>8&255,255&t);return a},E=r?e=>atob(b(e)):i?e=>Buffer.from(e,"base64").toString("binary"):C,S=i?e=>m(Buffer.from(e,"base64")):e=>m(E(e),e=>e.charCodeAt(0)),$=i?e=>Buffer.from(e,"base64").toString("utf8"):n?e=>n.decode(S(e)):e=>U(E(e)),L=e=>b(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),T=e=>$(L(e))}}]);