chunk-933bb68e.43c8320d.js 13 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(" 导入兑换码 ")])],1),e._v(" "),o("save-form",{attrs:{inline:!0,model:e.searchForm},on:{submit:e.search}},[o("el-form-item",{attrs:{label:"客户端"}},[o("el-select",{attrs:{clearable:""},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search",t)},expression:"searchForm.search"}},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",[o("el-button",{attrs:{type:"danger","native-type":"submit"}},[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:"400px",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"}},[e.isNew?o("el-form-item",{attrs:{label:"客户端",prop:"platform"}},[o("el-select",{staticStyle:{width:"100% !important"},attrs:{clearable:""},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._e(),e._v(" "),e.isNew?o("el-form-item",{attrs:{label:"版本号",prop:"version"}},[o("el-input",{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._e(),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(" "),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._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)},i=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("h2",[o("div",{staticClass:"squrt"}),e._v("\n APP版本控制\n ")])}],n=o("db72"),a=(o("386d"),o("99b4")),s=o("333d"),l=o("5f87"),c=o("e762"),u=o("3908"),d={components:{pagination:s["a"]},data:function(){return{sectionVisible:!1,tableList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},searchForm:{search: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"}]},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()},init:function(){this.getList()},getList:function(){var e=this;this.searchForm.search?this.searchForm.search:this.searchForm.search=null,Object(a["b"])({search:this.searchForm.search,page:this.rules.page,rows:this.rules.limit}).then((function(t){200==t.code&&(e.tableList=t.data.rows.map((function(e){return Object(n["a"])(Object(n["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(a["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(a["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())}}},p=d,m=o("2877"),f=Object(m["a"])(p,r,i,!1,null,null,null);t["default"]=f.exports},"09f4":function(e,t,o){"use strict";o.d(t,"a",(function(){return a})),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 i(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function n(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function a(e,t,o){var a=n(),s=e-a,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var n=Math.easeInOutQuad(c,a,s,t);i(n),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,i="function"===typeof btoa,n="function"===typeof Buffer,a="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,""),h=e=>{let t,o,r,i,n="";const a=e.length%3;for(let s=0;s<e.length;){if((o=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=o<<16|r<<8|i,n+=c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}return a?n.slice(0,a-3)+"===".substring(a):n},v=i?e=>btoa(e):n?e=>Buffer.from(e,"binary").toString("base64"):h,g=n?e=>Buffer.from(e).toString("base64"):e=>{const t=4096;let o=[];for(let r=0,i=e.length;r<i;r+=t)o.push(p.apply(null,e.subarray(r,r+t)));return v(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,_=e=>e.replace(F,w),y=n?e=>Buffer.from(e,"utf8").toString("base64"):s?e=>g(s.encode(e)):e=>v(_(e)),x=(e,t=!1)=>t?f(y(e)):y(e),A=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,k=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))}},C=e=>e.replace(A,k),U=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,i="";for(let n=0;n<e.length;)t=u[e.charAt(n++)]<<18|u[e.charAt(n++)]<<12|(o=u[e.charAt(n++)])<<6|(r=u[e.charAt(n++)]),i+=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 i},E=r?e=>atob(b(e)):n?e=>Buffer.from(e,"base64").toString("binary"):U,S=n?e=>m(Buffer.from(e,"base64")):e=>m(E(e),e=>e.charCodeAt(0)),$=n?e=>Buffer.from(e,"base64").toString("utf8"):a?e=>a.decode(S(e)):e=>C(E(e)),L=e=>b(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),T=e=>$(L(e))}}]);