Commit f8644faa authored by wujj's avatar wujj

资源更新

parent 7ffdf592
This diff is collapsed.
!function(e,t){"function"==typeof define&&define.amd?define("element/locale/en",["module","exports"],t):"undefined"!=typeof exports?t(module,exports):(t(t={exports:{}},t.exports),e.ELEMENT.lang=e.ELEMENT.lang||{},e.ELEMENT.lang.en=t.exports)}(this,function(e,t){"use strict";t.__esModule=!0,t.default={el:{colorpicker:{confirm:"OK",clear:"Clear"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:""},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}},e.exports=t.default});
\ No newline at end of file
!function(e,t){"function"==typeof define&&define.amd?define("element/locale/zh-CN",["module","exports"],t):"undefined"!=typeof exports?t(module,exports):(t(t={exports:{}},t.exports),e.ELEMENT.lang=e.ELEMENT.lang||{},e.ELEMENT.lang.zhCN=t.exports)}(this,function(e,t){"use strict";t.__esModule=!0,t.default={el:{colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"}}},e.exports=t.default});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
/** /**
* 封装http请求 * 封装http请求
*/ */
(function() { (function () {
axios.defaults.timeout = 1000 * 60; axios.defaults.timeout = 1000 * 60;
axios.defaults.baseURL = ''; axios.defaults.baseURL = '';
//http request 拦截器 //http request 拦截器
axios.interceptors.request.use( axios.interceptors.request.use(
function (config) {
function(config) {
config.headers = { config.headers = {
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
'Cache-Control': 'no-cache', 'Cache-Control': 'no-cache',
...@@ -23,23 +22,54 @@ ...@@ -23,23 +22,54 @@
} }
return config; return config;
}, },
function(error) { function (error) {
return Promise.reject(err); return Promise.reject(error);
} }
); );
//http response 拦截器 //http response 拦截器
axios.interceptors.response.use( axios.interceptors.response.use(
function(response) { function (response) {
//登录失效
if (response.data.bizCode == "401" && ms.isLoginRedirect) {
window.parent.location.href = ms.base + "/" + ms.login + "?backurl=" + encodeURIComponent(window.parent.location.href);
return;
}
return response; return response;
}, },
function(error) { function (error) {
if (error.response) {
let msg;
if (error.response.status == 401) {
msg = "登录失败";
} else if (error.response.status == 400) {
msg = "客户端错误";
} else if (error.response.status == 403) {
msg = "您的权限不足";
} else if (error.response.status == 404) {
msg = "请求不存在";
} else if (error.response.status == 423) {
msg = "账号被锁定!";
} else if (error.response.status == 500) {
msg = "服务器异常";
} else if (error.response.status == 501) {
msg = "您的操作被取消或不允许提交";
} else if (error.response.status == 423) {
msg = "服务器正在开小差....";
}
if (msg) {
var tempVue = document.createElement('div');
tempVue.id = "tempVue";
document.body.appendChild(tempVue)
new Vue({el: '#tempVue',}).$notify.error({
title: '错误',
message: msg,
type: 'warning'
});
if (error.response.status == 401) {
window.location.reload();
}
document.body.removeChild(tempVue);
}
}
return Promise.reject(error) return Promise.reject(error)
} }
) )
...@@ -52,7 +82,7 @@ ...@@ -52,7 +82,7 @@
headers: conf.headers == undefined ? null : conf.headers, headers: conf.headers == undefined ? null : conf.headers,
}); });
_axios.interceptors.request.use( _axios.interceptors.request.use(
function(config) { function (config) {
if (config.method === 'post' && config.headers["Content-Type"] === "application/x-www-form-urlencoded") { if (config.method === 'post' && config.headers["Content-Type"] === "application/x-www-form-urlencoded") {
config.data = Qs.stringify(config.data, { config.data = Qs.stringify(config.data, {
allowDots: true allowDots: true
...@@ -60,8 +90,8 @@ ...@@ -60,8 +90,8 @@
} }
return config; return config;
}, },
function(error) { function (error) {
return Promise.reject(err); return Promise.reject(error);
} }
); );
return _axios; return _axios;
...@@ -70,7 +100,6 @@ ...@@ -70,7 +100,6 @@
} }
/** /**
* 封装get方法 * 封装get方法
* @param url * @param url
...@@ -82,14 +111,14 @@ ...@@ -82,14 +111,14 @@
if (params == undefined) { if (params == undefined) {
params = {} params = {}
} }
return new Promise(function(resolve, reject) { return new Promise(function (resolve, reject) {
ajax().get(url, { ajax().get(url, {
params: params params: params
}) })
.then(function(response) { .then(function (response) {
resolve(response.data); resolve(response.data);
}) })
.catch(function(err) { .catch(function (err) {
reject(err) reject(err)
}) })
}) })
...@@ -109,11 +138,11 @@ ...@@ -109,11 +138,11 @@
data = {} data = {}
} }
return new Promise(function(resolve, reject) { return new Promise(function (resolve, reject) {
ajax(conf).post(url, data, conf) ajax(conf).post(url, data, conf)
.then(function(response) { .then(function (response) {
resolve(response.data); resolve(response.data);
}, function(err) { }, function (err) {
reject(err) reject(err)
}) })
}) })
...@@ -131,11 +160,11 @@ ...@@ -131,11 +160,11 @@
if (data == undefined) { if (data == undefined) {
data = {} data = {}
} }
return new Promise(function(resolve, reject) { return new Promise(function (resolve, reject) {
ajax(conf).patch(url, data, conf) ajax(conf).patch(url, data, conf)
.then(function(response) { .then(function (response) {
resolve(response); resolve(response);
}, function(err) { }, function (err) {
reject(err) reject(err)
}) })
}) })
...@@ -152,22 +181,69 @@ ...@@ -152,22 +181,69 @@
if (data == undefined) { if (data == undefined) {
data = {} data = {}
} }
return new Promise(function(resolve, reject) { return new Promise(function (resolve, reject) {
ajax(conf).put(url, data, conf) ajax(conf).put(url, data, conf)
.then(function(response) { .then(function (response) {
resolve(response.data); resolve(response.data);
}, function(err) { }, function (err) {
reject(err) reject(err)
}) })
}) })
} }
/**
* 下载资源
* @param url
* @param data
* @returns {Promise}
*/
function download(url, data) {
if (data == undefined) {
data = {}
}
return new Promise(function (resolve, reject) {
axios({
method: 'post',
// 请求地址
url: url,
// 参数
data: data,
// 表明返回服务器返回的数据类型
responseType: 'blob',
headers: {Accept: 'application/vnd.openxmlformats-officedocument'}
}).then((res) => { // 处理返回的文件流
const content = res.data
const blob = new Blob([content])
const fileName = res.headers["filename"];
if ('download' in document.createElement('a')) { // 非IE下载
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink)
} else { // IE10+下载
navigator.msSaveBlob(blob, fileName)
}
resolve(res);
}, function (err) {
reject(err)
})
})
}
var http = { var http = {
get: get, get: get,
post: post, post: post,
put: put, put: put,
patch: patch patch: patch,
download: download
} }
......
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("CountTo",[],e):"object"==typeof exports?exports.CountTo=e():t.CountTo=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=2)}([function(t,e,i){var n=i(4)(i(1),i(5),null,null);t.exports=n.exports},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(3);e.default={props:{startVal:{type:Number,required:!1,default:0},endVal:{type:Number,required:!1,default:2017},duration:{type:Number,required:!1,default:3e3},autoplay:{type:Boolean,required:!1,default:!0},decimals:{type:Number,required:!1,default:0,validator:function(t){return t>=0}},decimal:{type:String,required:!1,default:"."},separator:{type:String,required:!1,default:","},prefix:{type:String,required:!1,default:""},suffix:{type:String,required:!1,default:""},useEasing:{type:Boolean,required:!1,default:!0},easingFn:{type:Function,default:function(t,e,i,n){return i*(1-Math.pow(2,-10*t/n))*1024/1023+e}}},data:function(){return{localStartVal:this.startVal,displayValue:this.formatNumber(this.startVal),printVal:null,paused:!1,localDuration:this.duration,startTime:null,timestamp:null,remaining:null,rAF:null}},computed:{countDown:function(){return this.startVal>this.endVal}},watch:{startVal:function(){this.autoplay&&this.start()},endVal:function(){this.autoplay&&this.start()}},mounted:function(){this.autoplay&&this.start(),this.$emit("mountedCallback")},methods:{start:function(){this.localStartVal=this.startVal,this.startTime=null,this.localDuration=this.duration,this.paused=!1,this.rAF=(0,n.requestAnimationFrame)(this.count)},pauseResume:function(){this.paused?(this.resume(),this.paused=!1):(this.pause(),this.paused=!0)},pause:function(){(0,n.cancelAnimationFrame)(this.rAF)},resume:function(){this.startTime=null,this.localDuration=+this.remaining,this.localStartVal=+this.printVal,(0,n.requestAnimationFrame)(this.count)},reset:function(){this.startTime=null,(0,n.cancelAnimationFrame)(this.rAF),this.displayValue=this.formatNumber(this.startVal)},count:function(t){this.startTime||(this.startTime=t),this.timestamp=t;var e=t-this.startTime;this.remaining=this.localDuration-e,this.useEasing?this.countDown?this.printVal=this.localStartVal-this.easingFn(e,0,this.localStartVal-this.endVal,this.localDuration):this.printVal=this.easingFn(e,this.localStartVal,this.endVal-this.localStartVal,this.localDuration):this.countDown?this.printVal=this.localStartVal-(this.localStartVal-this.endVal)*(e/this.localDuration):this.printVal=this.localStartVal+(this.localStartVal-this.startVal)*(e/this.localDuration),this.countDown?this.printVal=this.printVal<this.endVal?this.endVal:this.printVal:this.printVal=this.printVal>this.endVal?this.endVal:this.printVal,this.displayValue=this.formatNumber(this.printVal),e<this.localDuration?this.rAF=(0,n.requestAnimationFrame)(this.count):this.$emit("callback")},isNumber:function(t){return!isNaN(parseFloat(t))},formatNumber:function(t){t=t.toFixed(this.decimals),t+="";var e=t.split("."),i=e[0],n=e.length>1?this.decimal+e[1]:"",a=/(\d+)(\d{3})/;if(this.separator&&!this.isNumber(this.separator))for(;a.test(i);)i=i.replace(a,"$1"+this.separator+"$2");return this.prefix+i+n+this.suffix}},destroyed:function(){(0,n.cancelAnimationFrame)(this.rAF)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),a=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=a.default,"undefined"!=typeof window&&window.Vue&&window.Vue.component("count-to",a.default)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=0,a="webkit moz ms o".split(" "),r=void 0,o=void 0;if("undefined"==typeof window)e.requestAnimationFrame=r=function(){},e.cancelAnimationFrame=o=function(){};else{e.requestAnimationFrame=r=window.requestAnimationFrame,e.cancelAnimationFrame=o=window.cancelAnimationFrame;for(var s=void 0,u=0;u<a.length&&(!r||!o);u++)s=a[u],e.requestAnimationFrame=r=r||window[s+"RequestAnimationFrame"],e.cancelAnimationFrame=o=o||window[s+"CancelAnimationFrame"]||window[s+"CancelRequestAnimationFrame"];r&&o||(e.requestAnimationFrame=r=function(t){var e=(new Date).getTime(),i=Math.max(0,16-(e-n)),a=window.setTimeout(function(){t(e+i)},i);return n=e+i,a},e.cancelAnimationFrame=o=function(t){window.clearTimeout(t)})}e.requestAnimationFrame=r,e.cancelAnimationFrame=o},function(t,e){t.exports=function(t,e,i,n){var a,r=t=t||{},o=typeof t.default;"object"!==o&&"function"!==o||(a=t,r=t.default);var s="function"==typeof r?r.options:r;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),i&&(s._scopeId=i),n){var u=Object.create(s.computed||null);Object.keys(n).forEach(function(t){var e=n[t];u[t]=function(){return e}}),s.computed=u}return{esModule:a,exports:r,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",[t._v("\n "+t._s(t.displayValue)+"\n")])},staticRenderFns:[]}}])});
//# sourceMappingURL=vue-count-to.min.js.map
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment