Commit 20798bf4 authored by vip's avatar vip

Merge remote-tracking branch 'origin/master'

parents dc63d6dd eaa4ee48
This diff is collapsed.
This diff is collapsed.
...@@ -44,110 +44,26 @@ ...@@ -44,110 +44,26 @@
<div class="class-6" > <div class="class-6" >
</div> </div>
<div class="class-7" > <div class="class-7" >
<div class="class-8" > <div class="panel">
<div class="class-9"> <div class="panel-title">
常用功能 常用功能
</div> </div>
</div> <div class="v-space"></div>
<div class="class-10" > <div class="panel-content" style="flex-direction: row;flex-wrap: wrap; flex: unset">
<div @click="jumpArtcleManager" <div class="mitem"
class="class-11" > @click="window.parent.indexVue.openParentMenuInTitle(item.title)"
<div class="class-12" > v-for="item in alwaysList">
<!--图片开始--> <!--图标开始-->
<img <i :class="['iconfont',item.icon]"></i>
src="${base}/static/ms-admin/5.0.0/images/1578362848002.png" <div class="item-title">
class="class-13" /> {{ item.title }}
<!--图片结束--> </div>
</div> <!--文本结束-->
<div class="class-14">
文章管理
</div>
</div>
<div @click="jumpCategorymanager" class="class-15" >
<div class="class-16" >
<!--图片开始-->
<img
src="${base}/static/ms-admin/5.0.0/images/1578363219309.png"
class="class-17" />
<!--图片结束-->
</div>
<div class="class-18">
栏目管理
</div>
</div>
<div @click="jumpStaticManager" class="class-19" >
<div class="class-20" >
<!--图片开始-->
<img
src="${base}/static/ms-admin/5.0.0/images/1578363549912.png"
class="class-21" />
<!--图片结束-->
</div>
<div class="class-22">
静态化
</div>
</div>
<div @click="jumpAdmininstatorManager" class="class-23" >
<div class="class-24" >
<!--图片开始-->
<img
src="${base}/static/ms-admin/5.0.0/images/1578363754088.png"
class="class-25" />
<!--图片结束-->
</div>
<div class="class-26">
管理员管理
</div>
</div>
<div @click="jumpUserManager" class="class-27" >
<div class="class-28" >
<!--图片开始-->
<img
src="${base}/static/ms-admin/5.0.0/images/1578364450652.png"
class="class-29" />
<!--图片结束-->
</div>
<div class="class-30">
角色管理
</div>
</div>
<div @click="jumpMenuManager" class="class-31" >
<div class="class-32" >
<!--图片开始-->
<img
src="${base}/static/ms-admin/5.0.0/images/1578363880431.png"
class="class-33" />
<!--图片结束-->
</div>
<div class="class-34">
菜单管理
</div>
</div>
<div @click="jumpTemplateManager" class="class-35" >
<div class="class-36" >
<!--图片开始-->
<img
src="${base}/static/ms-admin/5.0.0/images/1578363998984.png"
class="class-37" />
<!--图片结束-->
</div>
<div class="class-38">
模板管理
</div>
</div>
<div @click="jumpApplicationManager" class="class-39" >
<div class="class-40" >
<!--图片开始-->
<img
src="${base}/static/ms-admin/5.0.0/images/1578364095317.png"
class="class-41" />
<!--图片结束-->
</div>
<div class="class-42">
应用设置
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!--大容器开始--> <!--大容器开始-->
<div class="class-43" > <div class="class-43" >
...@@ -431,7 +347,8 @@ ...@@ -431,7 +347,8 @@
data: { data: {
base: ms.base, base: ms.base,
msNewsLast: '', msNewsLast: '',
msNewsPath: '' msNewsPath: '',
alwaysList: [], //常用功能列表
}, },
methods: { methods: {
jumpArtcleManager: function () { jumpArtcleManager: function () {
...@@ -481,6 +398,12 @@ ...@@ -481,6 +398,12 @@
"modelUrl": "model/index.do" "modelUrl": "model/index.do"
}); });
}, },
getAlwaysList: function () {
var markList = localStorage.getItem("markList");
if (markList) {
this.alwaysList = JSON.parse(markList)
}
},
//模板管理 //模板管理
jumpTemplateManager: function () { jumpTemplateManager: function () {
window.parent.indexVue.open({ window.parent.indexVue.open({
...@@ -490,6 +413,9 @@ ...@@ -490,6 +413,9 @@
"modelUrl": "template/index.do" "modelUrl": "template/index.do"
}); });
}, },
setCallBackFun: function () {
window.parent.indexVue.addCallBackFun(this.getAlwaysList);
},
//应用管理 //应用管理
jumpApplicationManager: function () { jumpApplicationManager: function () {
window.parent.indexVue.open({ window.parent.indexVue.open({
...@@ -530,14 +456,71 @@ ...@@ -530,14 +456,71 @@
that.msNewsLast = res.data.data.rows[0].contentTitle.toString(); that.msNewsLast = res.data.data.rows[0].contentTitle.toString();
that.msNewsPath = 'https://ms.mingsoft.net/html/1/203/202/' + res.data.data.rows[0].id + '.html'; that.msNewsPath = 'https://ms.mingsoft.net/html/1/203/202/' + res.data.data.rows[0].id + '.html';
}); });
this.setCallBackFun();
} }
}, },
created: function () { created: function () {
this.getNewsLast(); this.getNewsLast();
this.getAlwaysList();
} }
}); });
</script> </script>
<style> <style>
.panel-content .mitem {
color: #333333;
cursor: pointer;
outline-offset: -1px;
height: 88px;
flex-direction: column;
display: flex;
animation-duration: 1s;
width: 88px;
background-repeat: no-repeat;
align-items: center;
}
.panel .panel-content .mitem:hover i ,.panel .panel-content .mitem:hover .item-title{
color:#409EFF
}
.panel-content .mitem i {
font-size: 36px;
}
.panel {
color: #333333;
padding: 10px;
outline-offset: -1px;
flex: 1;
background-color: rgba(255, 255, 255, 1);
flex-direction: column;
display: flex;
animation-duration: 1s;
background-repeat: no-repeat;
}
.panel .panel-title {
color: #333333;
word-wrap: break-word;
font-weight: bold;
display: inline-block;
animation-duration: 1s;
font-size: 16px;
padding-left: 10px;
margin-top: 5px;
}
.panel .panel-content {
color: #333333;
padding-right: 10px;
padding-bottom: 10px;
outline-offset: -1px;
flex: 1;
padding-top: 10px;
max-width: 100%;
flex-direction: column;
display: flex;
animation-duration: 1s;
width: 100%;
padding-left: 10px;
background-repeat: no-repeat;
}
.custom-body { .custom-body {
} }
.class-1 .class-1
......
...@@ -120,12 +120,6 @@ a:link,a:visited,a:active{text-decoration: none; color:#409EFF;} ...@@ -120,12 +120,6 @@ a:link,a:visited,a:active{text-decoration: none; color:#409EFF;}
border-radius: 10px; border-radius: 10px;
background-color: rgba(144,147,153,.5); background-color: rgba(144,147,153,.5);
} }
/*缩略图*/
.el-upload-list--picture-card .el-upload-list__item-thumbnail {
width: 100%;
height: auto!important;
}
/*饿了么滚动样式*/ /*饿了么滚动样式*/
.ms-scrollbar .el-scrollbar__wrap{ .ms-scrollbar .el-scrollbar__wrap{
overflow-x: hidden; overflow-x: hidden;
......
...@@ -141,7 +141,7 @@ textarea::-webkit-input-placeholder { ...@@ -141,7 +141,7 @@ textarea::-webkit-input-placeholder {
flex: 1; flex: 1;
height: 320px; height: 320px;
background: #fff; background: #fff;
padding: 20px 26px; padding: 20px 54px;
} }
.login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form h1 { .login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form h1 {
line-height: 1; line-height: 1;
...@@ -173,7 +173,7 @@ textarea::-webkit-input-placeholder { ...@@ -173,7 +173,7 @@ textarea::-webkit-input-placeholder {
} }
.login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form .ms-admin-form-item-code .el-form-item__content .el-input__inner, .login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form .ms-admin-form-item-code .el-form-item__content .el-input__inner,
.login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form .ms-admin-form-item-code .el-form-item__content .el-input { .login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form .ms-admin-form-item-code .el-form-item__content .el-input {
width: 110px; width: 97px;
} }
.login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form .ms-admin-form-item-code .el-form-item__content > img { .login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form .ms-admin-form-item-code .el-form-item__content > img {
width: 66px; width: 66px;
...@@ -183,7 +183,7 @@ textarea::-webkit-input-placeholder { ...@@ -183,7 +183,7 @@ textarea::-webkit-input-placeholder {
.login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form .ms-admin-form-item-code .el-form-item__content p { .login .ms-admin-login-container .ms-admin-login-main .ms-admin-login-warp .ms-admin-login-form .ms-admin-form-item-code .el-form-item__content p {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 1; line-height: 17px;
flex-direction: column; flex-direction: column;
margin: 0; margin: 0;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -47,6 +47,13 @@ ...@@ -47,6 +47,13 @@
"unicode": "e6c2", "unicode": "e6c2",
"unicode_decimal": 59074 "unicode_decimal": 59074
}, },
{
"icon_id": "174849",
"name": "特色服务icon",
"font_class": "tesefuwuicon",
"unicode": "e7a2",
"unicode_decimal": 59298
},
{ {
"icon_id": "247483", "icon_id": "247483",
"name": "书", "name": "书",
...@@ -740,6 +747,13 @@ ...@@ -740,6 +747,13 @@
"unicode": "e6aa", "unicode": "e6aa",
"unicode_decimal": 59050 "unicode_decimal": 59050
}, },
{
"icon_id": "2228997",
"name": "打折",
"font_class": "dazhe",
"unicode": "e79e",
"unicode_decimal": 59294
},
{ {
"icon_id": "2245822", "icon_id": "2245822",
"name": "红包", "name": "红包",
...@@ -1104,6 +1118,13 @@ ...@@ -1104,6 +1118,13 @@
"unicode": "e615", "unicode": "e615",
"unicode_decimal": 58901 "unicode_decimal": 58901
}, },
{
"icon_id": "3512889",
"name": "地址",
"font_class": "dizhi",
"unicode": "e79f",
"unicode_decimal": 59295
},
{ {
"icon_id": "3555825", "icon_id": "3555825",
"name": "加", "name": "加",
...@@ -1384,6 +1405,13 @@ ...@@ -1384,6 +1405,13 @@
"unicode": "e6e1", "unicode": "e6e1",
"unicode_decimal": 59105 "unicode_decimal": 59105
}, },
{
"icon_id": "4480718",
"name": "网页",
"font_class": "wangye",
"unicode": "e7a0",
"unicode_decimal": 59296
},
{ {
"icon_id": "4549366", "icon_id": "4549366",
"name": "水滴", "name": "水滴",
...@@ -1566,6 +1594,20 @@ ...@@ -1566,6 +1594,20 @@
"unicode": "e917", "unicode": "e917",
"unicode_decimal": 59671 "unicode_decimal": 59671
}, },
{
"icon_id": "5296173",
"name": "承诺函",
"font_class": "chengnuohan",
"unicode": "e8f9",
"unicode_decimal": 59641
},
{
"icon_id": "5296174",
"name": "正品行货",
"font_class": "zhengpinhanghuo",
"unicode": "e8fa",
"unicode_decimal": 59642
},
{ {
"icon_id": "5309436", "icon_id": "5309436",
"name": "电源", "name": "电源",
...@@ -2119,6 +2161,13 @@ ...@@ -2119,6 +2161,13 @@
"unicode": "ebf4", "unicode": "ebf4",
"unicode_decimal": 60404 "unicode_decimal": 60404
}, },
{
"icon_id": "7731245",
"name": "优惠券",
"font_class": "youhuiquan1",
"unicode": "e79a",
"unicode_decimal": 59290
},
{ {
"icon_id": "7782114", "icon_id": "7782114",
"name": "裁剪", "name": "裁剪",
...@@ -2665,6 +2714,13 @@ ...@@ -2665,6 +2714,13 @@
"unicode": "e82f", "unicode": "e82f",
"unicode_decimal": 59439 "unicode_decimal": 59439
}, },
{
"icon_id": "9739958",
"name": "9-劳联保险@三合一",
"font_class": "-laolianbaoxiansanheyi",
"unicode": "e7a3",
"unicode_decimal": 59299
},
{ {
"icon_id": "9742421", "icon_id": "9742421",
"name": "清空", "name": "清空",
...@@ -2931,6 +2987,13 @@ ...@@ -2931,6 +2987,13 @@
"unicode": "e738", "unicode": "e738",
"unicode_decimal": 59192 "unicode_decimal": 59192
}, },
{
"icon_id": "10833932",
"name": "商户管理",
"font_class": "shanghuguanli",
"unicode": "e79d",
"unicode_decimal": 59293
},
{ {
"icon_id": "11043027", "icon_id": "11043027",
"name": "多行文本", "name": "多行文本",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*!
SerializeJSON jQuery plugin.
https://github.com/marioizquierdo/jquery.serializeJSON
version 2.8.1 (Dec, 2016)
Copyright (c) 2012, 2017 Mario Izquierdo
Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*/
!function(a){if("function"==typeof define&&define.amd)define(["jquery"],a);else if("object"==typeof exports){var b=require("jquery");module.exports=a(b)}else a(window.jQuery||window.Zepto||window.$)}(function(a){"use strict";a.fn.serializeJSON=function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o;return c=a.serializeJSON,d=this,e=c.setupOpts(b),f=d.serializeArray(),c.readCheckboxUncheckedValues(f,e,d),g={},a.each(f,function(a,b){h=b.name,i=b.value,k=c.extractTypeAndNameWithNoType(h),l=k.nameWithNoType,m=k.type,m||(m=c.attrFromInputWithName(d,h,"data-value-type")),c.validateType(h,m,e),"skip"!==m&&(n=c.splitInputNameIntoKeysArray(l),j=c.parseValue(i,h,m,e),o=!j&&c.shouldSkipFalsy(d,h,l,m,e),o||c.deepSet(g,n,j,e))}),g},a.serializeJSON={defaultOptions:{checkboxUncheckedValue:void 0,parseNumbers:!1,parseBooleans:!1,parseNulls:!1,parseAll:!1,parseWithFunction:null,skipFalsyValuesForTypes:[],skipFalsyValuesForFields:[],customTypes:{},defaultTypes:{string:function(a){return String(a)},number:function(a){return Number(a)},boolean:function(a){var b=["false","null","undefined","","0"];return b.indexOf(a)===-1},null:function(a){var b=["false","null","undefined","","0"];return b.indexOf(a)===-1?a:null},array:function(a){return JSON.parse(a)},object:function(a){return JSON.parse(a)},auto:function(b){return a.serializeJSON.parseValue(b,null,null,{parseNumbers:!0,parseBooleans:!0,parseNulls:!0})},skip:null},useIntKeysAsArrayIndex:!1},setupOpts:function(b){var c,d,e,f,g,h;h=a.serializeJSON,null==b&&(b={}),e=h.defaultOptions||{},d=["checkboxUncheckedValue","parseNumbers","parseBooleans","parseNulls","parseAll","parseWithFunction","skipFalsyValuesForTypes","skipFalsyValuesForFields","customTypes","defaultTypes","useIntKeysAsArrayIndex"];for(c in b)if(d.indexOf(c)===-1)throw new Error("serializeJSON ERROR: invalid option '"+c+"'. Please use one of "+d.join(", "));return f=function(a){return b[a]!==!1&&""!==b[a]&&(b[a]||e[a])},g=f("parseAll"),{checkboxUncheckedValue:f("checkboxUncheckedValue"),parseNumbers:g||f("parseNumbers"),parseBooleans:g||f("parseBooleans"),parseNulls:g||f("parseNulls"),parseWithFunction:f("parseWithFunction"),skipFalsyValuesForTypes:f("skipFalsyValuesForTypes"),skipFalsyValuesForFields:f("skipFalsyValuesForFields"),typeFunctions:a.extend({},f("defaultTypes"),f("customTypes")),useIntKeysAsArrayIndex:f("useIntKeysAsArrayIndex")}},parseValue:function(b,c,d,e){var f,g;return f=a.serializeJSON,g=b,e.typeFunctions&&d&&e.typeFunctions[d]?g=e.typeFunctions[d](b):e.parseNumbers&&f.isNumeric(b)?g=Number(b):!e.parseBooleans||"true"!==b&&"false"!==b?e.parseNulls&&"null"==b&&(g=null):g="true"===b,e.parseWithFunction&&!d&&(g=e.parseWithFunction(g,c)),g},isObject:function(a){return a===Object(a)},isUndefined:function(a){return void 0===a},isValidArrayIndex:function(a){return/^[0-9]+$/.test(String(a))},isNumeric:function(a){return a-parseFloat(a)>=0},optionKeys:function(a){if(Object.keys)return Object.keys(a);var b,c=[];for(b in a)c.push(b);return c},readCheckboxUncheckedValues:function(b,c,d){var e,f,g,h,i;null==c&&(c={}),i=a.serializeJSON,e="input[type=checkbox][name]:not(:checked):not([disabled])",f=d.find(e).add(d.filter(e)),f.each(function(d,e){if(g=a(e),h=g.attr("data-unchecked-value"),null==h&&(h=c.checkboxUncheckedValue),null!=h){if(e.name&&e.name.indexOf("[][")!==-1)throw new Error("serializeJSON ERROR: checkbox unchecked values are not supported on nested arrays of objects like '"+e.name+"'. See https://github.com/marioizquierdo/jquery.serializeJSON/issues/67");b.push({name:e.name,value:h})}})},extractTypeAndNameWithNoType:function(a){var b;return(b=a.match(/(.*):([^:]+)$/))?{nameWithNoType:b[1],type:b[2]}:{nameWithNoType:a,type:null}},shouldSkipFalsy:function(b,c,d,e,f){var g=a.serializeJSON,h=g.attrFromInputWithName(b,c,"data-skip-falsy");if(null!=h)return"false"!==h;var i=f.skipFalsyValuesForFields;if(i&&(i.indexOf(d)!==-1||i.indexOf(c)!==-1))return!0;var j=f.skipFalsyValuesForTypes;return null==e&&(e="string"),!(!j||j.indexOf(e)===-1)},attrFromInputWithName:function(a,b,c){var d,e,f;return d=b.replace(/(:|\.|\[|\]|\s)/g,"\\$1"),e='[name="'+d+'"]',f=a.find(e).add(a.filter(e)),f.attr(c)},validateType:function(b,c,d){var e,f;if(f=a.serializeJSON,e=f.optionKeys(d?d.typeFunctions:f.defaultOptions.defaultTypes),c&&e.indexOf(c)===-1)throw new Error("serializeJSON ERROR: Invalid type "+c+" found in input name '"+b+"', please use one of "+e.join(", "));return!0},splitInputNameIntoKeysArray:function(b){var c,d;return d=a.serializeJSON,c=b.split("["),c=a.map(c,function(a){return a.replace(/\]/g,"")}),""===c[0]&&c.shift(),c},deepSet:function(b,c,d,e){var f,g,h,i,j,k;if(null==e&&(e={}),k=a.serializeJSON,k.isUndefined(b))throw new Error("ArgumentError: param 'o' expected to be an object or array, found undefined");if(!c||0===c.length)throw new Error("ArgumentError: param 'keys' expected to be an array with least one element");f=c[0],1===c.length?""===f?b.push(d):b[f]=d:(g=c[1],""===f&&(i=b.length-1,j=b[i],f=k.isObject(j)&&(k.isUndefined(j[g])||c.length>2)?i:i+1),""===g?!k.isUndefined(b[f])&&a.isArray(b[f])||(b[f]=[]):e.useIntKeysAsArrayIndex&&k.isValidArrayIndex(g)?!k.isUndefined(b[f])&&a.isArray(b[f])||(b[f]=[]):!k.isUndefined(b[f])&&k.isObject(b[f])||(b[f]={}),h=c.slice(1),k.deepSet(b[f],h,d,e))}}});
\ No newline at end of file
/**
* jQuery serializeObject
* @copyright 2014, macek <paulmacek@gmail.com>
* @link https://github.com/macek/jquery-serialize-object
* @license BSD
* @version 2.5.0
*/
!function(e,i){if("function"==typeof define&&define.amd)define(["exports","jquery"],function(e,r){return i(e,r)});else if("undefined"!=typeof exports){var r=require("jquery");i(exports,r)}else i(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,i){function r(e,r){function n(e,i,r){return e[i]=r,e}function a(e,i){for(var r,a=e.match(t.key);void 0!==(r=a.pop());)if(t.push.test(r)){var u=s(e.replace(/\[\]$/,""));i=n([],u,i)}else t.fixed.test(r)?i=n([],r,i):t.named.test(r)&&(i=n({},r,i));return i}function s(e){return void 0===h[e]&&(h[e]=0),h[e]++}function u(e){switch(i('[name="'+e.name+'"]',r).attr("type")){case"checkbox":return"on"===e.value?!0:e.value;default:return e.value}}function f(i){if(!t.validate.test(i.name))return this;var r=a(i.name,u(i));return l=e.extend(!0,l,r),this}function d(i){if(!e.isArray(i))throw new Error("formSerializer.addPairs expects an Array");for(var r=0,t=i.length;t>r;r++)this.addPair(i[r]);return this}function o(){return l}function c(){return JSON.stringify(o())}var l={},h={};this.addPair=f,this.addPairs=d,this.serialize=o,this.serializeJSON=c}var t={validate:/^[a-z_][a-z0-9_]*(?:\[(?:\d*|[a-z0-9_]+)\])*$/i,key:/[a-z0-9_]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_]+$/i};return r.patterns=t,r.serializeObject=function(){return new r(i,this).addPairs(this.serializeArray()).serialize()},r.serializeJSON=function(){return new r(i,this).addPairs(this.serializeArray()).serializeJSON()},"undefined"!=typeof i.fn&&(i.fn.serializeObject=r.serializeObject,i.fn.serializeJSON=r.serializeJSON),e.FormSerializer=r,r});
/*
[Leo.C, Studio] (C)2004 - 2008
$Hanization: LeoChung $
$E-Mail: who@imll.net $
$HomePage: http://imll.net $
$Date: 2008/11/8 18:02 $
*/
/*
A simple class for displaying file information and progress
Note: This is a demonstration only and not part of SWFUpload.
Note: Some have had problems adapting this class in IE7. It may not be suitable for your application.
*/
// Constructor
// file is a SWFUpload file object
// targetID is the HTML element id attribute that the FileProgress HTML structure will be added to.
// Instantiating a new FileProgress object with an existing file will reuse/update the existing DOM elements
function FileProgress(file, targetID) {
this.fileProgressID = file.id;
this.opacity = 100;
this.height = 0;
this.fileProgressWrapper = document.getElementById(this.fileProgressID);
if (!this.fileProgressWrapper) {
this.fileProgressWrapper = document.createElement("div");
this.fileProgressWrapper.className = "progressWrapper";
this.fileProgressWrapper.id = this.fileProgressID;
this.fileProgressElement = document.createElement("div");
this.fileProgressElement.className = "progressContainer";
var progressCancel = document.createElement("a");
progressCancel.className = "progressCancel";
progressCancel.href = "#";
progressCancel.style.visibility = "hidden";
progressCancel.appendChild(document.createTextNode(" "));
var progressText = document.createElement("div");
progressText.className = "progressName";
progressText.appendChild(document.createTextNode(file.name));
var progressBar = document.createElement("div");
progressBar.className = "progressBarInProgress";
var progressStatus = document.createElement("div");
progressStatus.className = "progressBarStatus";
progressStatus.innerHTML = "&nbsp;";
this.fileProgressElement.appendChild(progressCancel);
this.fileProgressElement.appendChild(progressText);
this.fileProgressElement.appendChild(progressStatus);
this.fileProgressElement.appendChild(progressBar);
this.fileProgressWrapper.appendChild(this.fileProgressElement);
document.getElementById(targetID).appendChild(this.fileProgressWrapper);
} else {
this.fileProgressElement = this.fileProgressWrapper.firstChild;
}
this.height = this.fileProgressWrapper.offsetHeight;
}
FileProgress.prototype.setProgress = function (percentage) {
this.fileProgressElement.className = "progressContainer green";
this.fileProgressElement.childNodes[3].className = "progressBarInProgress";
this.fileProgressElement.childNodes[3].style.width = percentage + "%";
};
FileProgress.prototype.setComplete = function () {
this.fileProgressElement.className = "progressContainer blue";
this.fileProgressElement.childNodes[3].className = "progressBarComplete";
this.fileProgressElement.childNodes[3].style.width = "";
var oSelf = this;
setTimeout(function () {
oSelf.disappear();
}, 10000);
};
FileProgress.prototype.setError = function () {
this.fileProgressElement.className = "progressContainer red";
this.fileProgressElement.childNodes[3].className = "progressBarError";
this.fileProgressElement.childNodes[3].style.width = "";
var oSelf = this;
setTimeout(function () {
oSelf.disappear();
}, 5000);
};
FileProgress.prototype.setCancelled = function () {
this.fileProgressElement.className = "progressContainer";
this.fileProgressElement.childNodes[3].className = "progressBarError";
this.fileProgressElement.childNodes[3].style.width = "";
var oSelf = this;
setTimeout(function () {
oSelf.disappear();
}, 2000);
};
FileProgress.prototype.setStatus = function (status) {
this.fileProgressElement.childNodes[2].innerHTML = status;
};
// Show/Hide the cancel button
FileProgress.prototype.toggleCancel = function (show, swfUploadInstance) {
this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden";
if (swfUploadInstance) {
var fileID = this.fileProgressID;
this.fileProgressElement.childNodes[0].onclick = function () {
swfUploadInstance.cancelUpload(fileID);
return false;
};
}
};
// Fades out and clips away the FileProgress box.
FileProgress.prototype.disappear = function () {
var reduceOpacityBy = 15;
var reduceHeightBy = 4;
var rate = 30; // 15 fps
if (this.opacity > 0) {
this.opacity -= reduceOpacityBy;
if (this.opacity < 0) {
this.opacity = 0;
}
if (this.fileProgressWrapper.filters) {
try {
this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity = this.opacity;
} catch (e) {
// If it is not set initially, the browser will throw an error. This will set it if it is not set yet.
this.fileProgressWrapper.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + this.opacity + ")";
}
} else {
this.fileProgressWrapper.style.opacity = this.opacity / 100;
}
}
if (this.height > 0) {
this.height -= reduceHeightBy;
if (this.height < 0) {
this.height = 0;
}
this.fileProgressWrapper.style.height = this.height + "px";
}
if (this.height > 0 || this.opacity > 0) {
var oSelf = this;
setTimeout(function () {
oSelf.disappear();
}, rate);
} else {
this.fileProgressWrapper.style.display = "none";
}
};
\ No newline at end of file
/*
[Leo.C, Studio] (C)2004 - 2008
$Hanization: LeoChung $
$E-Mail: who@imll.net $
$HomePage: http://imll.net $
$Date: 2008/11/8 18:02 $
*/
/* Demo Note: This demo uses a FileProgress class that handles the UI for displaying the file name and percent complete.
The FileProgress class is not part of SWFUpload.
*/
/* **********************
Event Handlers
These are my custom event handlers to make my
web application behave the way I went when SWFUpload
completes different tasks. These aren't part of the SWFUpload
package. They are part of my application. Without these none
of the actions SWFUpload makes will show up in my application.
********************** */
function fileQueued(file) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setStatus("正在等待...");
progress.toggleCancel(true, this);
} catch (ex) {
this.debug(ex);
}
}
function fileQueueError(file, errorCode, message) {
try {
if (errorCode === SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {
alert("您正在上传的文件队列过多.\n" + (message === 0 ? "您已达到上传限制" : "您最多能选择 " + (message > 1 ? "上传 " + message + " 文件." : "一个文件.")));
return;
}
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setError();
progress.toggleCancel(false);
switch (errorCode) {
case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
progress.setStatus("文件尺寸过大.");
this.debug("错误代码: 文件尺寸过大, 文件名: " + file.name + ", 文件尺寸: " + file.size + ", 信息: " + message);
break;
case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
progress.setStatus("无法上传零字节文件.");
this.debug("错误代码: 零字节文件, 文件名: " + file.name + ", 文件尺寸: " + file.size + ", 信息: " + message);
break;
case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
progress.setStatus("不支持的文件类型.");
this.debug("错误代码: 不支持的文件类型, 文件名: " + file.name + ", 文件尺寸: " + file.size + ", 信息: " + message);
break;
default:
if (file !== null) {
progress.setStatus("未处理的错误");
}
this.debug("错误代码: " + errorCode + ", 文件名: " + file.name + ", 文件尺寸: " + file.size + ", 信息: " + message);
break;
}
} catch (ex) {
this.debug(ex);
}
}
function fileDialogComplete(numFilesSelected, numFilesQueued) {
try {
if (numFilesSelected > 0) {
document.getElementById(this.customSettings.cancelButtonId).disabled = false;
}
/* I want auto start the upload and I can do that here */
this.startUpload();
} catch (ex) {
this.debug(ex);
}
}
function uploadStart(file) {
try {
/* I don't want to do any file validation or anything, I'll just update the UI and
return true to indicate that the upload should start.
It's important to update the UI here because in Linux no uploadProgress events are called. The best
we can do is say we are uploading.
*/
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setStatus("正在上传...");
progress.toggleCancel(true, this);
}
catch (ex) {}
return true;
}
function uploadProgress(file, bytesLoaded, bytesTotal) {
try {
var percent = Math.ceil((bytesLoaded / bytesTotal) * 100);
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setProgress(percent);
progress.setStatus("正在上传...");
} catch (ex) {
this.debug(ex);
}
}
function uploadSuccess(file, serverData) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setComplete();
progress.setStatus("上传成功");
progress.toggleCancel(false);
} catch (ex) {
this.debug(ex);
}
}
function uploadError(file, errorCode, message) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setError();
progress.toggleCancel(false);
switch (errorCode) {
case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
progress.setStatus("上传错误: " + message);
this.debug("错误代码: HTTP错误, 文件名: " + file.name + ", 信息: " + message);
break;
case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
progress.setStatus("上传失败");
this.debug("错误代码: 上传失败, 文件名: " + file.name + ", 文件尺寸: " + file.size + ", 信息: " + message);
break;
case SWFUpload.UPLOAD_ERROR.IO_ERROR:
progress.setStatus("服务器 (IO) 错误");
this.debug("错误代码: IO 错误, 文件名: " + file.name + ", 信息: " + message);
break;
case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
progress.setStatus("安全错误");
this.debug("错误代码: 安全错误, 文件名: " + file.name + ", 信息: " + message);
break;
case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
progress.setStatus("超出上传限制.");
this.debug("错误代码: 超出上传限制, 文件名: " + file.name + ", 文件尺寸: " + file.size + ", 信息: " + message);
break;
case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
progress.setStatus("无法验证. 跳过上传.");
this.debug("错误代码: 文件验证失败, 文件名: " + file.name + ", 文件尺寸: " + file.size + ", 信息: " + message);
break;
case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
// If there aren't any files left (they were all cancelled) disable the cancel button
if (this.getStats().files_queued === 0) {
document.getElementById(this.customSettings.cancelButtonId).disabled = true;
}
progress.setStatus("取消");
progress.setCancelled();
break;
case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
progress.setStatus("停止");
break;
default:
progress.setStatus("未处理的错误: " + errorCode);
this.debug("错误代码: " + errorCode + ", 文件名: " + file.name + ", 文件尺寸: " + file.size + ", 信息: " + message);
break;
}
} catch (ex) {
this.debug(ex);
}
}
function uploadComplete(file) {
if (this.getStats().files_queued === 0) {
document.getElementById(this.customSettings.cancelButtonId).disabled = true;
}
}
// This event comes from the Queue Plugin
function queueComplete(numFilesUploaded) {
var status = document.getElementById("divStatus");
status.innerHTML = numFilesUploaded + " 个文件" + (numFilesUploaded === 1 ? "" : "s") + "已上传.";
}
/*
* SWFUpload jQuery Plugin v1.0.0
*
* Copyright (c) 2009 Adam Royle
* Licensed under the MIT license.
*
*/
(function($){
var defaultHandlers = ['swfupload_loaded_handler','file_queued_handler','file_queue_error_handler','file_dialog_start_handler','file_dialog_complete_handler','upload_start_handler','upload_progress_handler','upload_error_handler','upload_success_handler','upload_complete_handler','queue_complete_handler'];
var additionalHandlers = [];
$.fn.swfupload = function(){
var args = $.makeArray(arguments);
return this.each(function(){
var swfu;
if (args.length == 1 && typeof(args[0]) == 'object') {
swfu = $(this).data('__swfu');
if (!swfu) {
var settings = args[0];
var $magicUploadControl = $(this);
var handlers = [];
$.merge(handlers, defaultHandlers);
$.merge(handlers, additionalHandlers);
$.each(handlers, function(i, v){
var eventName = v.replace(/_handler$/, '').replace(/_([a-z])/g, function(){ return arguments[1].toUpperCase(); });
settings[v] = function() {
var event = $.Event(eventName);
$magicUploadControl.trigger(event, $.makeArray(arguments));
return !event.isDefaultPrevented();
};
});
$(this).data('__swfu', new SWFUpload(settings));
}
} else if (args.length > 0 && typeof(args[0]) == 'string') {
var methodName = args.shift();
swfu = $(this).data('__swfu');
if (swfu && swfu[methodName]) {
swfu[methodName].apply(swfu, args);
}
}
});
};
$.swfupload = {
additionalHandlers: function() {
if (arguments.length === 0) {
return additionalHandlers.slice();
} else {
$(arguments).each(function(i, v){
$.merge(additionalHandlers, $.makeArray(v));
});
}
},
defaultHandlers: function() {
return defaultHandlers.slice();
},
getInstance: function(el) {
return $(el).data('__swfu');
}
};
})(jQuery);
\ No newline at end of file
/*
[Leo.C, Studio] (C)2004 - 2008
$Hanization: LeoChung $
$E-Mail: who@imll.net $
$HomePage: http://imll.net $
$Date: 2008/11/8 18:02 $
*/
/*
Queue Plug-in
Features:
*Adds a cancelQueue() method for cancelling the entire queue.
*All queued files are uploaded when startUpload() is called.
*If false is returned from uploadComplete then the queue upload is stopped.
If false is not returned (strict comparison) then the queue upload is continued.
*Adds a QueueComplete event that is fired when all the queued files have finished uploading.
Set the event handler with the queue_complete_handler setting.
*/
var SWFUpload;
if (typeof(SWFUpload) === "function") {
SWFUpload.queue = {};
SWFUpload.prototype.initSettings = (function (oldInitSettings) {
return function () {
if (typeof(oldInitSettings) === "function") {
oldInitSettings.call(this);
}
this.customSettings.queue_cancelled_flag = false;
this.customSettings.queue_upload_count = 0;
this.settings.user_upload_complete_handler = this.settings.upload_complete_handler;
this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler;
this.settings.queue_complete_handler = this.settings.queue_complete_handler || null;
};
})(SWFUpload.prototype.initSettings);
SWFUpload.prototype.startUpload = function (fileID) {
this.customSettings.queue_cancelled_flag = false;
this.callFlash("StartUpload", false, [fileID]);
};
SWFUpload.prototype.cancelQueue = function () {
this.customSettings.queue_cancelled_flag = true;
this.stopUpload();
var stats = this.getStats();
while (stats.files_queued > 0) {
this.cancelUpload();
stats = this.getStats();
}
};
SWFUpload.queue.uploadCompleteHandler = function (file) {
var user_upload_complete_handler = this.settings.user_upload_complete_handler;
var continueUpload;
if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) {
this.customSettings.queue_upload_count++;
}
if (typeof(user_upload_complete_handler) === "function") {
continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true;
} else {
continueUpload = true;
}
if (continueUpload) {
var stats = this.getStats();
if (stats.files_queued > 0 && this.customSettings.queue_cancelled_flag === false) {
this.startUpload();
} else if (this.customSettings.queue_cancelled_flag === false) {
this.queueEvent("queue_complete_handler", [this.customSettings.queue_upload_count]);
this.customSettings.queue_upload_count = 0;
} else {
this.customSettings.queue_cancelled_flag = false;
this.customSettings.queue_upload_count = 0;
}
}
};
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/**
* 字典类
* 初始化:ms.dict.list("A类型,B类型,C类型","子业务类型")
* 获取值:ms.dict.getDictValue("A类型标签") ;ms.dict.getDictValue("C类型标签",3)
* 获取值:ms.dict.getDictLabel("B类型值",2)
*/
(function() {
var dictData;
/**
* 获取所有字典类型的数组集合
* @param dictType 字典类型 支持多个类型用英文逗号隔开
* @param isChild 子业务类型 可选
*/
function list(dictType,isChild) {
var _dict={
dictType:dictType,
isChild:isChild,
}
ms.http.get(ms.manager+'/mdiy/dict/dictList.do', _dict).then(function (res) {
if(res.code==200){
dict.dictData = res.data;
}
}).catch(function (err) {
console.log(err);
});
}
function get(index, dictLabel, dictValue,isChild){
var dicts= (dict.dictData?dict.dictData[index-1]:[]).filter(function(element,index,self){
if(dictLabel&&dictLabel!=element.dictLabel){
return false
}else if(dictValue&&dictValue!=element.dictValue){
return false
}
return true
})
if(dicts.length){
return dicts[0];
}else {
return null;
}
}
/**
* 获取字典列表
* @param index list方法中dictType的索引值 从1开始
* @returns {*}
*/
function getList(index){
if(index){
return dict.dictData[0]
}else {
return dict.dictData[index-1]
}
}
/**
* 获取字典值
* @param dictLabel 字典标签值
* @param index list方法中dictType的索引值 从1开始
* @param defaultValue 默认值
* @returns {string|string|rules.dictValue|{message, required}}
*/
function getDictValue( dictLabel, index, defaultValue) {
if (!defaultValue) {
defaultValue="";
}
var dictEntity = ''
if (index && dictLabel) {
dictEntity = get(index, dictLabel, null);
}
if (!index && dictLabel) {
dictEntity = get(1, dictLabel, null);
}
if(dictEntity){
return dictEntity.dictValue;
}
return defaultValue;
}
/**
* 获取字典标签
* @param dictValue 字典值
* @param index list方法中dictType的索引值 从1开始
* @param defaultValue 默认值
* @returns {string|string|rules.dictLabel|{message, required}|data.mdiyFormRule.dictLabel|{trigger, message, required}}
*/
function getDictLabel( dictValue, index, defaultValue) {
if (!defaultValue) {
defaultValue = "";
}
var dictEntity = ''
if(!index && dictValue){
dictEntity = get(1,"", dictValue, null);
}
if (index && dictValue) {
dictEntity = get(index,"", dictValue, null);
}
if(dictEntity){
return dictEntity.dictLabel;
}
return defaultValue;
}
var dict = {
list: list,
dictData: dictData,
getList:getList,
getDictValue:getDictValue,
getDictLabel:getDictLabel,
}
if (typeof ms != "object") {
window.ms = {};
}
window.ms.dict = dict;
}());
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