添加项目文件。
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
.signNameCanvasBox {
|
||||
background: rgba(243, 243, 243, 1);
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 3rem;
|
||||
line-height: 3rem;
|
||||
padding-left: 2rem;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
color: rgba(46, 46, 46, 1);
|
||||
}
|
||||
|
||||
.title::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 1rem;
|
||||
transform: translateY(-50%);
|
||||
width: 0.29rem;
|
||||
height: 1.14rem;
|
||||
background: linear-gradient(225deg, rgba(87, 229, 199, 1) 0%, rgba(74, 192, 166, 1) 100%);
|
||||
border-radius: 0.14rem;
|
||||
}
|
||||
|
||||
.signToolLine {
|
||||
overflow: hidden;
|
||||
margin: 2rem 1rem 0;
|
||||
}
|
||||
|
||||
.signToolLine .btnItem {
|
||||
width: 44%;
|
||||
height: 3rem;
|
||||
text-align: center;
|
||||
line-height: 3rem;
|
||||
font-size: 1.14rem;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.signToolLine .btnItem.chongxie {
|
||||
float: left;
|
||||
color: rgba(37, 170, 141, 1);
|
||||
border-radius: 0.29rem;
|
||||
border: 0.04rem solid rgba(45, 197, 165, .3);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.signToolLine .btnItem.shengcheng {
|
||||
float: right;
|
||||
background: rgba(37, 170, 141, 1);
|
||||
border-radius: 0.29rem;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
92
WaterCloud.Web/wwwroot/js/lay-module/cardTable/cardTable.css
Normal file
92
WaterCloud.Web/wwwroot/js/lay-module/cardTable/cardTable.css
Normal file
@@ -0,0 +1,92 @@
|
||||
.project-list-item {
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: all .2s;
|
||||
}
|
||||
|
||||
.project-list-item:hover {
|
||||
box-shadow: 2px 0 4px rgba(0, 21, 41, .35);
|
||||
}
|
||||
|
||||
.project-list-item .project-list-item-cover {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
display: block;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
.project-list-item-body {
|
||||
padding: 20px;
|
||||
border: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.project-list-item .project-list-item-body>h2 {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.project-list-item .project-list-item-text {
|
||||
height: 40px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.project-list-item .project-list-item-desc {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.project-list-item .project-list-item-desc .time {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.project-list-item .project-list-item-desc .ew-head-list {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.ew-head-list .ew-head-list-item:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.ew-head-list .ew-head-list-item {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #fff;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
.ew-head-list .ew-head-list-item {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #fff;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
.cloud-card-component {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.cloud-card-component .layui-laypage .layui-laypage-curr .layui-laypage-em {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.ew-table-loading {
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
}
|
||||
.ew-table-loading > i {
|
||||
color: #999;
|
||||
font-size: 30px;
|
||||
}
|
||||
.ew-table-loading.ew-loading-float {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
375
WaterCloud.Web/wwwroot/js/lay-module/cardTable/cardTable.js
Normal file
375
WaterCloud.Web/wwwroot/js/lay-module/cardTable/cardTable.js
Normal file
@@ -0,0 +1,375 @@
|
||||
layui.define(['table', 'laypage', 'jquery', 'element', 'laytpl'], function (exports) {
|
||||
"use strict";
|
||||
var filePath = layui.cache.modules.cardTable
|
||||
.substr(0, layui.cache.modules.cardTable.lastIndexOf('/'));
|
||||
// 引入tablePlug.css
|
||||
layui.link(filePath + '/cardTable.css');
|
||||
var MOD_NAME = 'cardTable',
|
||||
$ = layui.jquery,
|
||||
element = layui.element,
|
||||
laytpl = layui.laytpl,
|
||||
laypage = layui.laypage;
|
||||
var _instances = {}; // 记录所有实例
|
||||
/* 默认参数 */
|
||||
var defaultOption = {
|
||||
elem: "#currentTableId",// 构建的模型
|
||||
url: "",// 数据 url 连接
|
||||
loading: true,//是否加载
|
||||
limit: 0, //每页数量默认是每行数量的双倍
|
||||
linenum: 4, //每行数量 2,3,4,6
|
||||
currentPage: 1,//当前页
|
||||
data: [], //静态数据
|
||||
limits: [], //页码
|
||||
page: true, //是否分页
|
||||
image: false,//图片模式
|
||||
layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],//分页控件
|
||||
request: {
|
||||
pageName: 'page' //页码的参数名称,默认:page
|
||||
, limitName: 'limit' //每页数据量的参数名,默认:limit
|
||||
, idName: 'id' //主键名称,默认:id
|
||||
, titleName: 'title' //标题名称,默认:title
|
||||
, imageName: 'image' //图片地址,默认:image
|
||||
, remarkName: 'remark' //备注名称,默认:remark
|
||||
, timeName: 'time' //时间名称,默认:time
|
||||
},
|
||||
response: {
|
||||
statusName: 'code' //规定数据状态的字段名称,默认:code
|
||||
, statusCode: 0 //规定成功的状态码,默认:0
|
||||
, msgName: 'msg' //规定状态信息的字段名称,默认:msg
|
||||
, countName: 'count' //规定数据总数的字段名称,默认:count
|
||||
, dataName: 'data' //规定数据列表的字段名称,默认:data
|
||||
},
|
||||
// 完 成 函 数
|
||||
done: function (res, curr, count) {
|
||||
|
||||
},
|
||||
toolbar: null
|
||||
};
|
||||
var card = function (opt) {
|
||||
_instances[opt.elem.substring(1)] = this;
|
||||
this.reload(opt);
|
||||
};
|
||||
/** 参数设置 */
|
||||
card.prototype.initOptions = function (opt) {
|
||||
this.option = $.extend(true, {}, defaultOption, opt);
|
||||
if (!this.option.limit || this.option.limit == 0) {
|
||||
this.option.limit = this.option.linenum * 2;
|
||||
}
|
||||
if (!this.option.limits || this.option.limits.length == 0) {
|
||||
this.option.limits = [this.option.limit];
|
||||
}
|
||||
};
|
||||
card.prototype.init = function () {
|
||||
var option = this.option;
|
||||
var url = option.url;
|
||||
var html = "";
|
||||
html += option.loading == true ? ' <div class="ew-table-loading">' : ' <div class="ew-table-loading layui-hide">';
|
||||
html += ' <i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop"></i>';
|
||||
html += ' </div>';
|
||||
$(option.elem).html(html);
|
||||
// 根 据 请 求 方 式 获 取 数 据
|
||||
html = "";
|
||||
if (!!url) {
|
||||
if (url.indexOf("?") >= 0) {
|
||||
url = url + '&v=1.0.0';
|
||||
}
|
||||
else {
|
||||
url = url + '?v=1.0.0';
|
||||
}
|
||||
if (!!option.page) {
|
||||
url = url + '&' + option.request.limitName + '=' + option.limit;
|
||||
url = url + '&' + option.request.pageName + '=' + option.currentPage;
|
||||
}
|
||||
if (!!option.where) {
|
||||
for (let key in option.where) {
|
||||
url = url + '&' + key + '=' + option.where[key];
|
||||
}
|
||||
}
|
||||
var data = getData(url);
|
||||
data = initData(data, option);
|
||||
if (data.code != option.response.statusCode) {
|
||||
option.data = [];
|
||||
option.count = 0;
|
||||
} else {
|
||||
option.data = data.data;
|
||||
option.count = data.count;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
if (!option.alldata) {
|
||||
option.alldata = option.data;
|
||||
}
|
||||
if (option.page) {
|
||||
var data = [];
|
||||
option.count = option.alldata.length;
|
||||
for (var i = (option.currentPage - 1) * option.limit; i < option.currentPage * option.limit && i < option.alldata.length; i++) {
|
||||
data.push(option.alldata[i]);
|
||||
}
|
||||
option.data = data;
|
||||
}
|
||||
}
|
||||
// 根据结果进行相应结构的创建
|
||||
if (!!option.data && option.data.length > 0) {
|
||||
html = createComponent(option.linenum, option.data, option.toolbar, option.image);
|
||||
html += "<div id='cardpage'></div>";
|
||||
}
|
||||
else {
|
||||
html = "<p>没有数据</p>";
|
||||
}
|
||||
$(option.elem).html(html);
|
||||
if (option.page) {
|
||||
// 初始化分页组件
|
||||
laypage.render({
|
||||
elem: 'cardpage'
|
||||
, count: option.count, limit: option.limit, limits: option.limits, curr: option.currentPage
|
||||
, layout: option.layout
|
||||
, jump: function (obj, first) {
|
||||
option.limit = obj.limit;
|
||||
option.currentPage = obj.curr;
|
||||
if (!first) {
|
||||
_instances[option.elem.substring(1)].reload(option);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
typeof option.done === 'function' && option.done(option, option.curr, option.count);
|
||||
}
|
||||
card.prototype.reload = function (opt) {
|
||||
this.initOptions(this.option ? $.extend(true, this.option, opt) : opt);
|
||||
this.init(); // 初始化表格
|
||||
this.events(); //事件
|
||||
}
|
||||
//表单事件
|
||||
card.prototype.on = function (events, callback) {
|
||||
return layui.onevent.call(this, MOD_NAME, events, callback);
|
||||
};
|
||||
card.prototype.events = function () {
|
||||
var that = this;
|
||||
var option = that.option;
|
||||
var filter = $(option.elem).attr('lay-filter');
|
||||
var elem = option.elem.substring(1);
|
||||
let timer = null;
|
||||
$(option.elem).unbind();
|
||||
//行事件
|
||||
$(option.elem).on('click', 'div[type=card]', function () { //单击行
|
||||
clearTimeout(timer);
|
||||
var that = this;
|
||||
timer = setTimeout(function () {
|
||||
getCheckedData(that, elem);
|
||||
var reElem = that;
|
||||
layui.event.call(that, MOD_NAME, 'row(' + filter + ')', {
|
||||
elem: that
|
||||
, value: _instances[elem].option.checkedItem
|
||||
, othis: reElem
|
||||
});
|
||||
}, 300)
|
||||
}).on('dblclick', 'div[type=card]', function () { //双击行
|
||||
clearTimeout(timer);
|
||||
getCheckedData(this, elem);
|
||||
var reElem = this;
|
||||
layui.event.call(this, MOD_NAME, 'rowDouble(' + filter + ')', {
|
||||
elem: this
|
||||
, value: _instances[elem].option.checkedItem
|
||||
, othis: reElem
|
||||
});
|
||||
});
|
||||
if (!!option.toolbar && !option.image) {
|
||||
$(option.elem).unbind('click');
|
||||
}
|
||||
//行工具条操作事件
|
||||
$(option.elem).on('click', '*[lay-event]', function () {
|
||||
getCheckedData(this, elem);
|
||||
layui.event.call(this, MOD_NAME, 'tool(' + filter + ')', { event: $(this).attr('lay-event'), value: _instances[elem].option.checkedItem });
|
||||
});
|
||||
};
|
||||
function getCheckedData(obj, elem) {
|
||||
var item = {};
|
||||
if (!obj.id) {
|
||||
return getCheckedData(obj.parentElement, elem);
|
||||
}
|
||||
var reElem = obj;
|
||||
$(reElem).addClass('layui-table-click').siblings().removeClass('layui-table-click');
|
||||
item.id = reElem.id;
|
||||
if (!obj.id || obj.nodeName == "DIV") {
|
||||
item.id = item.id.replace('card_', '');
|
||||
}
|
||||
var option = _instances[elem].option;
|
||||
for (var i = 0; i < option.data.length; i++) {
|
||||
if (item.id == option.data[i].id) {
|
||||
item[option.request.idName] = option.data[i].id;
|
||||
item[option.request.imageName] = option.data[i].image;
|
||||
item[option.request.titleName] = option.data[i].title;
|
||||
item[option.request.remarkName] = option.data[i].remark;
|
||||
item[option.request.timeName] = option.data[i].time;
|
||||
item = $.extend(JSON.parse(JSON.stringify(option.data[i])), item);
|
||||
if (option.request.idName != "id") {
|
||||
delete item.id;
|
||||
}
|
||||
if (option.request.imageName != "image") {
|
||||
delete item.image;
|
||||
}
|
||||
if (option.request.titleName != "title") {
|
||||
delete item.title;
|
||||
}
|
||||
if (option.request.remarkName != "remark") {
|
||||
delete item.remark;
|
||||
}
|
||||
if (option.request.timeName != "time") {
|
||||
delete item.time;
|
||||
}
|
||||
_instances[elem].option.checkedItem = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return item;
|
||||
}
|
||||
function createComponent(linenum, data, toolbar, image) {
|
||||
var html = "<div class='cloud-card-component'>"
|
||||
var content = createCards(linenum, data, toolbar, image);
|
||||
var page = "";
|
||||
content = content + page;
|
||||
html += content + "</div>"
|
||||
return html;
|
||||
}
|
||||
/** 创建指定数量的卡片 */
|
||||
function createCards(linenum, data, toolbar, image) {
|
||||
var content = "<div class='layui-row layui-col-space30'>";
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
content += createCard(linenum, data[i], i, toolbar, image);
|
||||
}
|
||||
content += "</div>";
|
||||
return content;
|
||||
}
|
||||
/** 创建一个卡片 */
|
||||
function createCard(linenum, item, index, toolbar, image) {
|
||||
var line = 12 / linenum;
|
||||
var tplData = $.extend(true, {
|
||||
LAY_INDEX: index
|
||||
}, item)
|
||||
var template = '';
|
||||
if (!!toolbar) {
|
||||
template = laytpl($('#' + toolbar).html() || '').render(tplData);
|
||||
}
|
||||
if (image) {
|
||||
return '<div type=card id=card_' + item.id + ' class="layui-col-md' + line + ' ew-datagrid-item" data-index="' + index + '" data-number="1"> <div class="project-list-item">' + (!!item.image ? ' <img class="project-list-item-cover" src="' + item.image + '">' : '') + ' </div > </div > ';
|
||||
}
|
||||
else {
|
||||
return '<div type=card id=card_' + item.id + ' class="layui-col-md' + line + ' ew-datagrid-item" data-index="' + index + '" data-number="1"> <div class="project-list-item">' + (!!item.image ? ' <img class="project-list-item-cover" src="' + item.image + '">' : '') + '<div class="project-list-item-body"> <h2>' + item.title + '</h2> <div class="project-list-item-text layui-text">' + item.remark + '</div> <div class="project-list-item-desc"> <span class="time">' + item.time + '</span>' + (!!template ? ' <div class="ew-head-list">' + template + '</div>' : '') + ' </div> </div > </div > </div > ';
|
||||
}
|
||||
|
||||
}
|
||||
/** 格式化返回参数 */
|
||||
function initData(tempData, option) {
|
||||
var data = {};
|
||||
data.code = tempData[option.response.statusName];
|
||||
data.msg = tempData[option.response.msgName];
|
||||
data.count = tempData[option.response.countName];
|
||||
var dataList = tempData[option.response.dataName];
|
||||
data.data = [];
|
||||
for (var i = 0; i < dataList.length; i++) {
|
||||
var item = {};
|
||||
item.id = dataList[i][option.request.idName];
|
||||
item.image = dataList[i][option.request.imageName];
|
||||
item.title = dataList[i][option.request.titleName];
|
||||
item.remark = dataList[i][option.request.remarkName];
|
||||
item.time = dataList[i][option.request.timeName];
|
||||
item = $.extend(JSON.parse(JSON.stringify(dataList[i])), item);
|
||||
if (option.request.idName != "id") {
|
||||
delete item[option.request.idName];
|
||||
}
|
||||
if (option.request.imageName != "image") {
|
||||
delete item[option.request.imageName];
|
||||
}
|
||||
if (option.request.titleName != "title") {
|
||||
delete item[option.request.titleName];
|
||||
}
|
||||
if (option.request.remarkName != "remark") {
|
||||
delete item[option.request.remarkName];
|
||||
}
|
||||
if (option.request.timeName != "time") {
|
||||
delete item[option.request.timeName];
|
||||
}
|
||||
data.data.push(item);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
/** 同 步 请 求 获 取 数 据 */
|
||||
function getData(url) {
|
||||
$.ajaxSettings.async = false;
|
||||
var redata = null;
|
||||
$.getJSON(url, function (data) {
|
||||
redata = data;
|
||||
}).fail(function () {
|
||||
redata = null;
|
||||
});
|
||||
return redata;
|
||||
}
|
||||
////卡片点击事件
|
||||
//window.cardTableCheckedCard = function (elem,obj) {
|
||||
// $(obj).addClass('layui-table-click').siblings().removeClass('layui-table-click');
|
||||
// var item = {};
|
||||
// item.id = obj.id;
|
||||
// item.image = $(obj).find('.project-list-item-cover')[0].src;
|
||||
// item.title = $(obj).find('h2')[0].innerHTML;
|
||||
// item.remark = $(obj).find('.project-list-item-text')[0].innerHTML;
|
||||
// item.time = $(obj).find('.time')[0].innerHTML;
|
||||
// _instances[elem.id].option.checkedItem = item;
|
||||
//}
|
||||
/** 对外提供的方法 */
|
||||
var tt = {
|
||||
/* 渲染 */
|
||||
render: function (options) {
|
||||
return new card(options);
|
||||
},
|
||||
/* 重载 */
|
||||
reload: function (id, opt) {
|
||||
_instances[id].option.checkedItem = null;
|
||||
_instances[id].reload(opt);
|
||||
},
|
||||
/* 获取选中数据 */
|
||||
getChecked: function (id) {
|
||||
var option = _instances[id].option;
|
||||
var data = option.checkedItem;
|
||||
if (!data) {
|
||||
return null;
|
||||
}
|
||||
return data;
|
||||
},
|
||||
/* 获取表格数据 */
|
||||
getAllData: function (id) {
|
||||
var option = _instances[id].option;
|
||||
var data = [];
|
||||
for (var i = 0; i < option.data.length; i++) {
|
||||
var item = {};
|
||||
item[option.request.idName] = option.data[i].id;
|
||||
item[option.request.imageName] = option.data[i].image;
|
||||
item[option.request.titleName] = option.data[i].title;
|
||||
item[option.request.remarkName] = option.data[i].remark;
|
||||
item[option.request.timeName] = option.data[i].time;
|
||||
item = $.extend(JSON.parse(JSON.stringify(option.data[i])), item);
|
||||
if (option.request.idName != "id") {
|
||||
delete item.id;
|
||||
}
|
||||
if (option.request.imageName != "image") {
|
||||
delete item.image;
|
||||
}
|
||||
if (option.request.titleName != "title") {
|
||||
delete item.title;
|
||||
}
|
||||
if (option.request.remarkName != "remark") {
|
||||
delete item.remark;
|
||||
}
|
||||
if (option.request.timeName != "time") {
|
||||
delete item.time;
|
||||
}
|
||||
data.push(item);
|
||||
}
|
||||
return data;
|
||||
},
|
||||
on: function (events, callback) {
|
||||
return this.on(this, MOD_NAME, events, callback);
|
||||
}
|
||||
}
|
||||
exports(MOD_NAME, tt);
|
||||
})
|
||||
184
WaterCloud.Web/wwwroot/js/lay-module/cron/cron.css
Normal file
184
WaterCloud.Web/wwwroot/js/lay-module/cron/cron.css
Normal file
@@ -0,0 +1,184 @@
|
||||
/**
|
||||
@ Name:layui.cron Cron表达式解析器
|
||||
@ Author:贝哥哥
|
||||
@ License:MIT
|
||||
*/
|
||||
|
||||
|
||||
/* 样式加载完毕的标识 */
|
||||
html #layuicss-cron {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 1989px;
|
||||
}
|
||||
|
||||
|
||||
/* 主体结构 */
|
||||
.layui-cron {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
margin: 5px 0;
|
||||
border-radius: 2px;
|
||||
font-size: 14px;
|
||||
-webkit-animation-duration: 0.3s;
|
||||
animation-duration: 0.3s;
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
background-color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 5px 0px;
|
||||
-webkit-animation-name: cron-upbit;
|
||||
animation-name: cron-upbit;
|
||||
border: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
@-webkit-keyframes cron-upbit {
|
||||
|
||||
/* 微微往上滑入 */
|
||||
from {
|
||||
-webkit-transform: translate3d(0, 20px, 0);
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
to {
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cron-upbit {
|
||||
from {
|
||||
transform: translate3d(0, 20px, 0);
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.layui-cron>.layui-tab {
|
||||
margin: 0;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* 表达式 */
|
||||
.cron-title {
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
margin: 10px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.cron-box {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.cron-box+.cron-box {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* 按钮 */
|
||||
.cron-footer-btns {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.cron-footer-btns span {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
margin: 0 0 0 -1px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #C9C9C9;
|
||||
background-color: #fff;
|
||||
white-space: nowrap;
|
||||
vertical-align: top;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
box-sizing: border-box;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.cron-footer-btns span:hover {
|
||||
color: #5FB878;
|
||||
}
|
||||
|
||||
|
||||
/* 表单 */
|
||||
.layui-cron .layui-form-radio {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.cron-form {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.cron-input-mid {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-top: 6px;
|
||||
background-color: #e5e5e5;
|
||||
padding: 0 12px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
border: 1px solid #ccc;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.cron-input {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-top: 6px;
|
||||
padding: 0 8px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
box-sizing: border-box;
|
||||
width: 80px;
|
||||
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
|
||||
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
|
||||
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
|
||||
}
|
||||
|
||||
.cron-input:focus {
|
||||
outline: 0;
|
||||
border: 1px solid #01AAED;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 4px 0px #01AAED;
|
||||
translate: 1s;
|
||||
}
|
||||
|
||||
.layui-cron .layui-form-checkbox[lay-skin="primary"] span {
|
||||
padding-right: 10px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
.layui-cron .layui-form-checkbox[lay-skin="primary"] {
|
||||
padding-left: 22px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.layui-cron input[type=number] {
|
||||
-moz-appearance:textfield;
|
||||
}
|
||||
.layui-cron input[type=number]::-webkit-inner-spin-button,
|
||||
.layui-cron input[type=number]::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
.cron-tips{
|
||||
color: grey;
|
||||
line-height: 28px;
|
||||
height: 28px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-top: 8px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
1137
WaterCloud.Web/wwwroot/js/lay-module/cron/cron.js
Normal file
1137
WaterCloud.Web/wwwroot/js/lay-module/cron/cron.js
Normal file
File diff suppressed because it is too large
Load Diff
113
WaterCloud.Web/wwwroot/js/lay-module/dtree/dtree.css
Normal file
113
WaterCloud.Web/wwwroot/js/lay-module/dtree/dtree.css
Normal file
@@ -0,0 +1,113 @@
|
||||
|
||||
/**************** 主题换肤 ****************/
|
||||
/* 默认风格*/
|
||||
.dtree-theme-item-this{background-color: #d2d2d2!important;}
|
||||
.dtree-theme-item:hover{background-color: #eaeceb!important;}
|
||||
.dtree-theme-item cite{font-size:12px!important;}
|
||||
.dtree-theme-item:hover cite{color:#fe7786!important;}
|
||||
|
||||
.dtree-theme-dtreefont{font-size: 16px!important;}
|
||||
.dtree-theme-ficon{color:#000!important;}
|
||||
.dtree-theme-icon{color:orange!important;}
|
||||
.dtree-theme-checkbox:hover{color:#fe7786!important;}
|
||||
.dtree-theme-choose{color:#fe7786!important;}
|
||||
|
||||
/* layui主题风格*/
|
||||
.dtree-layui-item-this{background: none!important;}
|
||||
.dtree-layui-item:hover{background: none!important;}
|
||||
.dtree-layui-item cite{font-size:14px!important;}
|
||||
.dtree-layui-item:hover cite{opacity:0.5;filter:Alpha(opacity=50);text-decoration: underline;}
|
||||
|
||||
.dtree-layui-dtreefont{font-size: 18px!important;}
|
||||
.dtree-layui-ficon{font-size: 18px!important;color:#393D49!important;}
|
||||
.dtree-layui-icon{color:#666!important;}
|
||||
.dtree-layui-checkbox:hover{color:#5FB878!important;}
|
||||
.dtree-layui-choose{color:#5FB878!important;}
|
||||
|
||||
/* laySimple主题风格*/
|
||||
.dtree-laySimple-item-this{background-color: #d2d2d2!important;}
|
||||
.dtree-laySimple-item:hover{background-color: #eaeceb!important;}
|
||||
.dtree-laySimple-item cite{font-size:12px!important;}
|
||||
.dtree-laySimple-item:hover cite{color:#01AAED!important;}
|
||||
|
||||
.dtree-laySimple-dtreefont{font-size: 16px!important;}
|
||||
.dtree-laySimple-ficon{font-size: 14px!important;color:#393D49!important;}
|
||||
.dtree-laySimple-icon{color:#393D49!important;}
|
||||
.dtree-laySimple-checkbox:hover{color:#01AAED!important;}
|
||||
.dtree-laySimple-choose{color:#01AAED!important;}
|
||||
/**************** 树基础 ****************/
|
||||
/* 菜单栏*/
|
||||
.dtree-menubar {padding-left: 10px;}
|
||||
.dtree-menubar .layui-btn-group .layui-btn-sm{height: 20px;line-height: 20px;padding: 0 5px;font-size: 12px;}
|
||||
.dtree-menubar .layui-btn-group .layui-btn-sm i{font-size: 12px!important;}
|
||||
|
||||
/* 工具栏*/
|
||||
.dtree-toolbar{position: absolute;z-index: 940520;padding: 0;background-color: #eceaeb;}
|
||||
.dtree-toolbar .layui-nav-child{position: static;}
|
||||
.dtree-toolbar .layui-nav-child dd{cursor: pointer;}
|
||||
.dtree-toolbar .layui-nav-child dd a i{font-size:16px;display: inline-block;margin: 0px 1px;color:#fe7786;}
|
||||
.dtree-toolbar .layui-nav-child dd a i:hover{font-weight: bold;}
|
||||
.dtree-toolbar .layui-nav-bar{display: none!important;}
|
||||
.dtree-toolbar-tool{padding: 30px;}
|
||||
|
||||
.dtree-toolbar-fixed{position: absolute;right: 5px;top: 2px;font-style: normal;transition: all .3s;-webkit-transition: all .3s;}
|
||||
/*.dtree-toolbar-fixed a{border:1px solid #fe7786;}*/
|
||||
.dtree-toolbar-fixed a i{font-size:14px;display: inline-block;margin: 0px 1px;color:#fe7786;}
|
||||
.dtree-toolbar-fixed a i:hover{opacity:0.8;filter:Alpha(opacity=80);}
|
||||
|
||||
/* 树基本*/
|
||||
.dtree{width:260px;}
|
||||
.dtree-nav-item{line-height:33px;padding-left:16px;}
|
||||
.dtree-nav-ul-sid{display: none;}
|
||||
.dtree-none-text{font-size: 12px;text-align: center;color: gray;}
|
||||
|
||||
/* 树线*/
|
||||
.dtree-nav-first-line,.dtree-nav-line,.dtree-nav-last-line{position: relative;}
|
||||
.dtree-nav-first-line:before{content:"";position: absolute;height: 0;border-left: 1px dotted #c0c4cc;}
|
||||
.dtree-nav-first-line:after{content:"";position: absolute;height: 0;border-top: 1px dotted #c0c4cc;}
|
||||
|
||||
.dtree-nav-line:before{content:"";position: absolute;top: 0;left: 7px;width: 0;height: 100%;border-left: 1px dotted #c0c4cc;}
|
||||
.dtree-nav-line:after{content:"";position: absolute;top: 16px;left: 8px;width: 9px;height: 0;border-top: 1px dotted #c0c4cc;}
|
||||
|
||||
.dtree-nav-last-line:before{content:"";position: absolute;top: 0;left: 7px;width: 0;height: 17px;border-left: 1px dotted #c0c4cc;}
|
||||
.dtree-nav-last-line:after{content:"";position: absolute;top: 16px;left: 8px;width: 9px;height: 0;border-top: 1px dotted #c0c4cc;}
|
||||
|
||||
|
||||
/* 图标及复选框*/
|
||||
.dtreefont{cursor: pointer;}
|
||||
.dtreefont-special{margin: 0 4px;}
|
||||
.dtree-nav-checkbox-div{display: inline-block;}
|
||||
.dtree-nav-checkbox-div>i{display: inline-block;margin: 0px 1px;}
|
||||
.dtree-nav-checkbox-div>i:last-child{margin-right: 4px;}
|
||||
.dtree-nav-checkbox-div>i:hover{opacity:0.8;filter:Alpha(opacity=80);}
|
||||
|
||||
/* 行 文字*/
|
||||
.dtree-nav-div{display:block;vertical-align:top;position:relative;}
|
||||
.dtree-nav-div cite{font-style: normal;cursor: pointer;}
|
||||
.dtree-nav-div:hover cite{opacity:0.7;filter:Alpha(opacity=70);transition: all .3s;-webkit-transition: all .3s;}
|
||||
|
||||
/* 规则属性*/
|
||||
.dtree-nav-show {display: block!important;}
|
||||
.dtree-nav-hide {display: none!important;}
|
||||
.dtree-nav-this {}
|
||||
.dtree-icon-hide {opacity:0;filter:Alpha(opacity=0);}
|
||||
.dtree-icon-null-open,.dtree-icon-null-close,.dtree-icon-null{margin: 0 2px;}
|
||||
.dtree-disabled{cursor: not-allowed; color:#c2c2c2!important;}
|
||||
.dtree-disabled:hover{color:#c2c2c2!important;}
|
||||
.dtree-nav-div cite.dtree-disabled{font-style: normal; cursor: not-allowed; color:#c2c2c2!important;}
|
||||
.dtree-nav-div>cite.dtree-disabled:hover{color:#c2c2c2!important;}
|
||||
|
||||
|
||||
/** 下拉树属性*/
|
||||
.dtree-select{position: absolute;max-height: 500px;height: 350px;overflow: auto;width: 99%;z-index: 123;display: none;border:1px solid silver;top: 42px;}
|
||||
.dtree-select-show{display: block!important;}
|
||||
.dtree-select-up{top: auto; bottom: 42px;}
|
||||
|
||||
/* 简单适配*/
|
||||
@media screen and (max-width:1700px) and (min-width:1300px){
|
||||
.dtree-nav-item {padding-left: 15px;}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
5543
WaterCloud.Web/wwwroot/js/lay-module/dtree/dtree.js
Normal file
5543
WaterCloud.Web/wwwroot/js/lay-module/dtree/dtree.js
Normal file
File diff suppressed because it is too large
Load Diff
229
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/dtreefont.css
Normal file
229
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/dtreefont.css
Normal file
@@ -0,0 +1,229 @@
|
||||
@font-face {
|
||||
font-family: 'dtreefont';
|
||||
src: url('dtreefont.eot?x3m8fp');
|
||||
src: url('dtreefont.eot?x3m8fp#iefix') format('embedded-opentype'),
|
||||
url('dtreefont.ttf?x3m8fp') format('truetype'),
|
||||
url('dtreefont.woff?x3m8fp') format('woff'),
|
||||
url('dtreefont.svg?x3m8fp#dtreefont') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[class^="dtree-icon-"], [class*=" dtree-icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change font */
|
||||
font-family: 'dtreefont' !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.dtree-icon-xiangxia1:before {
|
||||
content: "\e771";
|
||||
}
|
||||
.dtree-icon-normal-file:before {
|
||||
content: "\e60c";
|
||||
}
|
||||
.dtree-icon-xiangyou:before {
|
||||
content: "\e78f";
|
||||
}
|
||||
.dtree-icon-ok-circle:before {
|
||||
content: "\1005";
|
||||
}
|
||||
.dtree-icon-close1:before {
|
||||
content: "\1006";
|
||||
}
|
||||
.dtree-icon-close-fill:before {
|
||||
content: "\1007";
|
||||
}
|
||||
.dtree-icon-jian1:before {
|
||||
content: "\e600";
|
||||
}
|
||||
.dtree-icon-jia1:before {
|
||||
content: "\e601";
|
||||
}
|
||||
.dtree-icon-bianji:before {
|
||||
content: "\e602";
|
||||
}
|
||||
.dtree-icon-yonghu:before {
|
||||
content: "\e603";
|
||||
}
|
||||
.dtree-icon-shijian:before {
|
||||
content: "\e606";
|
||||
}
|
||||
.dtree-icon-fuxuankuang-banxuan:before {
|
||||
content: "\e607";
|
||||
}
|
||||
.dtree-icon-star:before {
|
||||
content: "\e608";
|
||||
}
|
||||
.dtree-icon-wenjianjiazhankai:before {
|
||||
content: "\e60e";
|
||||
}
|
||||
.dtree-icon-xiangmuxiaoxi:before {
|
||||
content: "\e60f";
|
||||
}
|
||||
.dtree-icon-search2:before {
|
||||
content: "\e615";
|
||||
}
|
||||
.dtree-icon-weibiaoti5:before {
|
||||
content: "\e618";
|
||||
}
|
||||
.dtree-icon-layim-theme:before {
|
||||
content: "\e61b";
|
||||
}
|
||||
.dtree-icon-shuye1:before {
|
||||
content: "\e61e";
|
||||
}
|
||||
.dtree-icon-add-circle:before {
|
||||
content: "\e61f";
|
||||
}
|
||||
.dtree-icon-xinxipilu:before {
|
||||
content: "\e620";
|
||||
}
|
||||
.dtree-icon-set-sm:before {
|
||||
content: "\e621";
|
||||
}
|
||||
.dtree-icon-about:before {
|
||||
content: "\e623";
|
||||
}
|
||||
.dtree-icon-chart-screen:before {
|
||||
content: "\e62a";
|
||||
}
|
||||
.dtree-icon-delete1:before {
|
||||
content: "\e640";
|
||||
}
|
||||
.dtree-icon-share3:before {
|
||||
content: "\e641";
|
||||
}
|
||||
.dtree-icon-youjian:before {
|
||||
content: "\e642";
|
||||
}
|
||||
.dtree-icon-check:before {
|
||||
content: "\e645";
|
||||
}
|
||||
.dtree-icon-close:before {
|
||||
content: "\e646";
|
||||
}
|
||||
.dtree-icon-favorfill:before {
|
||||
content: "\e64b";
|
||||
}
|
||||
.dtree-icon-favor:before {
|
||||
content: "\e64c";
|
||||
}
|
||||
.dtree-icon-fuxuankuangxuanzhong:before {
|
||||
content: "\e652";
|
||||
}
|
||||
.dtree-icon-fenguangbaobiao:before {
|
||||
content: "\e655";
|
||||
}
|
||||
.dtree-icon-jian:before {
|
||||
content: "\e656";
|
||||
}
|
||||
.dtree-icon-jia:before {
|
||||
content: "\e657";
|
||||
}
|
||||
.dtree-icon-fenzhijigou:before {
|
||||
content: "\e658";
|
||||
}
|
||||
.dtree-icon-roundcheckfill:before {
|
||||
content: "\e659";
|
||||
}
|
||||
.dtree-icon-roundcheck:before {
|
||||
content: "\e65a";
|
||||
}
|
||||
.dtree-icon-roundclosefill:before {
|
||||
content: "\e65b";
|
||||
}
|
||||
.dtree-icon-roundclose:before {
|
||||
content: "\e65c";
|
||||
}
|
||||
.dtree-icon-roundrightfill:before {
|
||||
content: "\e65d";
|
||||
}
|
||||
.dtree-icon-roundright:before {
|
||||
content: "\e65e";
|
||||
}
|
||||
.dtree-icon-like:before {
|
||||
content: "\e66c";
|
||||
}
|
||||
.dtree-icon-samefill:before {
|
||||
content: "\e671";
|
||||
}
|
||||
.dtree-icon-same:before {
|
||||
content: "\e672";
|
||||
}
|
||||
.dtree-icon-evaluate:before {
|
||||
content: "\e674";
|
||||
}
|
||||
.dtree-icon-circle1:before {
|
||||
content: "\e687";
|
||||
}
|
||||
.dtree-icon-radio:before {
|
||||
content: "\e688";
|
||||
}
|
||||
.dtree-icon-caidan_xunzhang:before {
|
||||
content: "\e68e";
|
||||
}
|
||||
.dtree-icon-pulldown:before {
|
||||
content: "\e6a0";
|
||||
}
|
||||
.dtree-icon-pullup:before {
|
||||
content: "\e6a1";
|
||||
}
|
||||
.dtree-icon-refresh:before {
|
||||
content: "\e6a4";
|
||||
}
|
||||
.dtree-icon-qrcode1:before {
|
||||
content: "\e6b0";
|
||||
}
|
||||
.dtree-icon-profile1:before {
|
||||
content: "\e6b7";
|
||||
}
|
||||
.dtree-icon-home1:before {
|
||||
content: "\e6b8";
|
||||
}
|
||||
.dtree-icon-homefill:before {
|
||||
content: "\e6bb";
|
||||
}
|
||||
.dtree-icon-roundaddfill:before {
|
||||
content: "\e6d8";
|
||||
}
|
||||
.dtree-icon-roundadd:before {
|
||||
content: "\e6d9";
|
||||
}
|
||||
.dtree-icon-fuxuankuang:before {
|
||||
content: "\e6f2";
|
||||
}
|
||||
.dtree-icon-wefill:before {
|
||||
content: "\e6f5";
|
||||
}
|
||||
.dtree-icon-sort:before {
|
||||
content: "\e701";
|
||||
}
|
||||
.dtree-icon-repair:before {
|
||||
content: "\e738";
|
||||
}
|
||||
.dtree-icon-shujudaping:before {
|
||||
content: "\e742";
|
||||
}
|
||||
.dtree-icon-dian:before {
|
||||
content: "\e7a5";
|
||||
}
|
||||
.dtree-icon-search_list_light:before {
|
||||
content: "\e807";
|
||||
}
|
||||
.dtree-icon-round_list_light:before {
|
||||
content: "\e82b";
|
||||
}
|
||||
.dtree-icon-star-fill:before {
|
||||
content: "\e832";
|
||||
}
|
||||
.dtree-icon-rate:before {
|
||||
content: "\e833";
|
||||
}
|
||||
.dtree-icon-move-up:before {
|
||||
content: "\ea47";
|
||||
}
|
||||
.dtree-icon-move-down:before {
|
||||
content: "\ea48";
|
||||
}
|
||||
BIN
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/dtreefont.eot
Normal file
BIN
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/dtreefont.eot
Normal file
Binary file not shown.
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="896" descent="-128" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " d="" />
|
||||
<glyph unicode="စ" glyph-name="ok-circle" d="M516.152-63.152c-60.696 0-119.595 11.895-175.057 35.353-53.555 22.652-101.646 55.073-142.936 96.365-41.291 41.291-73.713 89.382-96.364 142.936-23.458 55.462-35.353 114.36-35.353 175.056s11.895 119.595 35.353 175.057c22.652 53.555 55.073 101.646 96.364 142.936 41.29 41.291 89.382 73.713 142.936 96.364 55.462 23.458 114.36 35.353 175.057 35.353s119.595-11.895 175.057-35.353c53.555-22.652 101.645-55.073 142.936-96.364s73.712-89.381 96.364-142.936c23.459-55.462 35.353-114.36 35.353-175.057s-11.894-119.594-35.353-175.056c-22.652-53.555-55.072-101.645-96.364-142.936s-89.382-73.713-142.936-96.365c-55.461-23.458-114.36-35.353-175.057-35.353zM516.152 774.87c-214.116 0-388.312-174.196-388.312-388.312s174.196-388.312 388.312-388.312 388.312 174.196 388.312 388.312-174.195 388.312-388.312 388.312zM434.749 132.831l-225.256 225.257 79.595 79.594 145.661-145.661 308.47 308.468 79.594-79.595z" />
|
||||
<glyph unicode="ဆ" glyph-name="close1" d="M783.483 701.249l-271.483-271.474-271.483 271.474c-10.082 10.083-26.429 10.083-36.51 0-10.083-10.082-10.083-26.429 0-36.509l271.481-271.475-271.48-271.477c-10.083-10.081-10.083-26.428 0-36.508 10.082-10.082 26.429-10.082 36.51 0l271.482 271.475 271.483-271.475c10.082-10.082 26.429-10.082 36.513 0 10.081 10.083 10.081 26.428 0 36.508l-271.486 271.477 271.485 271.474c10.081 10.083 10.081 26.429 0 36.509-10.083 10.082-26.431 10.082-36.512 0.001z" />
|
||||
<glyph unicode="ဇ" glyph-name="close-fill" d="M512 822.022c-217.475 0-394.423-176.949-394.423-394.423s176.948-394.422 394.423-394.422c217.473 0 394.422 176.948 394.422 394.422s-176.949 394.423-394.422 394.423zM702.229 270.93c8.031-8.031 8.031-21.052 0-29.083s-21.052-8.031-29.083 0l-161.145 161.146-161.146-161.145c-8.031-8.031-21.052-8.031-29.083 0s-8.031 21.052 0 29.083l161.146 161.146-161.145 161.145c-8.031 8.031-8.031 21.052 0 29.083s21.052 8.031 29.083 0l161.146-161.146 161.144 161.146c8.031 8.031 21.052 8.031 29.083 0s8.031-21.052 0-29.083l-161.146-161.146 161.146-161.146z" />
|
||||
<glyph unicode="" glyph-name="jian1" d="M512.135 776.711c-216.356 0-392.38-176.025-392.38-392.38s176.025-392.38 392.38-392.38c216.356 0 392.381 176.024 392.381 392.38s-176.026 392.38-392.381 392.38zM512.135 40.996c-189.317 0-343.333 154.017-343.333 343.335s154.016 343.333 343.333 343.333c189.318 0 343.333-154.016 343.333-343.333 0-189.319-154.016-343.335-343.333-343.335zM659.278 408.854h-294.285c-13.556 0-24.524-10.968-24.524-24.523 0-13.531 10.968-24.524 24.524-24.524h294.285c13.556 0 24.524 10.993 24.524 24.524 0 13.555-10.968 24.523-24.524 24.523z" />
|
||||
<glyph unicode="" glyph-name="jia1" d="M511.515 775.812c-215.609 0-391.030-175.421-391.030-391.031s175.421-391.031 391.031-391.031c215.611 0 391.031 175.42 391.031 391.031s-175.42 391.031-391.032 391.031zM511.515 42.63c-188.665 0-342.151 153.484-342.151 342.151s153.486 342.152 342.151 342.152c188.666 0 342.153-153.486 342.153-342.152s-153.487-342.151-342.153-342.151zM658.152 409.221h-122.196v122.197c0 13.508-10.931 24.439-24.44 24.439s-24.439-10.931-24.439-24.439v-122.197h-122.196c-13.511 0-24.44-10.931-24.44-24.439 0-13.484 10.931-24.439 24.44-24.439h122.195v-122.197c0-13.484 10.931-24.439 24.439-24.439 13.51 0 24.44 10.955 24.44 24.439v122.197h122.196c13.51 0 24.44 10.955 24.44 24.439 0.001 13.509-10.93 24.44-24.439 24.44z" />
|
||||
<glyph unicode="" glyph-name="bianji" d="M468.551 64.961l402.683 477.563c25.851 30.583 21.845 76.822-8.738 102.551l-148.306 125.247c-30.583 25.851-76.822 21.845-102.551-8.738l-402.804-477.563-23.301-254.62c-0.85-9.345 2.913-18.569 10.073-24.637s16.869-8.253 25.972-5.825l246.974 66.021zM582.512 636.825l170.757-143.937-291.635-345.885-170.757 144.058 291.635 345.763zM676.569 725.783l148.427-125.125c6.068-5.098 6.796-14.442 1.699-20.511l-36.166-42.962-170.636 143.937 36.166 42.962c5.098 6.068 14.563 6.796 20.511 1.699zM246.701 65.447l15.899 173.185 152.189-128.281-168.087-44.905z" />
|
||||
<glyph unicode="" glyph-name="yonghu" d="M701.812 584.689c0-99.168-80.394-179.563-179.568-179.563-99.164 0-179.556 80.39-179.556 179.563 0 99.168 80.395 179.564 179.556 179.564 99.174 0 179.568-80.39 179.568-179.564zM780.721 159.555c0-123.196-115.728-140.102-258.479-140.102-142.74 0-258.468 16.894-258.468 140.094 0 123.192 115.726 223.067 258.479 223.067 142.749 0.003 258.468-99.869 258.468-223.056z" />
|
||||
<glyph unicode="" glyph-name="shijian" d="M512 839.111c-250.311 0-455.111-204.8-455.111-455.111s204.8-455.111 455.111-455.111 455.111 204.8 455.111 455.111-204.8 455.111-455.111 455.111M512-14.222c-221.867 0-398.222 176.355-398.222 398.222s176.355 398.222 398.222 398.222 398.222-176.355 398.222-398.222-176.355-398.222-398.222-398.222M512 384v284.444h-56.889v-341.333h284.445v56.889z" />
|
||||
<glyph unicode="" glyph-name="fuxuankuang-banxuan" d="M229.8 5.4c-50 0-90.7 40.7-90.7 90.7v284.3l752.9 1.5v-285.8c0-50-40.7-90.7-90.7-90.7h-571.5zM781.438-6h-535.875c-66.188 0-120.094 53.906-120.094 120.094v535.875c0 66.188 53.906 120.094 120.094 120.094h535.781c66.188 0 120.094-53.906 120.094-120.094v-535.875c0.094-66.188-53.813-120.094-120-120.094zM245.563 699.937c-27.563 0-49.969-22.406-49.969-49.969v-535.875c0-27.563 22.406-49.969 49.969-49.969h535.781c27.563 0 49.969 22.406 49.969 49.969v535.875c0 27.563-22.406 49.969-49.969 49.969h-535.781zM245.563 699.937" />
|
||||
<glyph unicode="" glyph-name="star" d="M749.625-84.153c-15.673 0-31.246 3.883-45.084 11.307l-192.526 103.637-192.469-103.609c-31.204-16.64-70.315-14.393-99.044 5.305-29.511 20.338-44.743 55.922-38.841 90.695l37.703 225.252-162.702 162.475c-25.003 24.889-33.465 60.985-22.059 94.194 11.349 32.91 40.064 56.576 74.965 61.753l221.326 32.896 96.128 199.58c15.488 32.085 48.853 52.807 84.992 52.807 36.167 0 69.518-20.736 84.964-52.807l96.156-199.58 221.298-32.91c34.873-5.163 63.616-28.8 74.98-61.696 11.392-33.28 2.944-69.362-22.030-94.251l-162.759-162.46 37.746-225.28c5.845-34.773-9.387-70.357-38.812-90.638-15.986-10.908-34.617-16.668-53.931-16.668zM512.014 91.548c4.636 0 9.273-1.138 13.483-3.385l205.938-110.862c12.373-6.642 28.316-5.803 39.936 2.133 11.392 7.836 17.124 21.006 14.891 34.304l-40.164 239.758c-1.508 9.088 1.451 18.332 7.964 24.832l173.141 172.843c9.458 9.429 12.686 23.026 8.405 35.484-4.38 12.672-15.701 21.874-29.525 23.922l-236.217 35.129c-9.316 1.38-17.365 7.296-21.447 15.787l-102.699 213.148c-6.030 12.53-19.257 20.608-33.707 20.608s-27.691-8.092-33.764-20.622l-102.642-213.134c-4.082-8.491-12.132-14.407-21.447-15.787l-236.231-35.129c-13.625-2.034-25.202-11.435-29.54-23.993-4.267-12.416-1.024-25.984 8.434-35.399l173.113-172.857c6.514-6.5 9.472-15.744 7.964-24.832l-40.135-239.744c-2.247-13.312 3.484-26.439 14.976-34.361 11.435-7.836 27.349-8.775 39.95-2.062l205.852 110.834c4.196 2.247 8.832 3.385 13.468 3.385zM200.32 439.211c-6.841 0-12.885 4.964-14.023 11.947-1.252 7.751 4.011 15.061 11.762 16.313l9.444 1.536c7.794 1.337 15.061-4.011 16.313-11.762s-4.011-15.061-11.762-16.313l-9.444-1.536c-0.754-0.128-1.536-0.185-2.29-0.185zM252.544 447.687c-6.684 0-12.644 4.722-13.938 11.534-1.493 7.708 3.556 15.175 11.264 16.654l153.927 29.696 58.055 133.148c3.157 7.182 11.548 10.496 18.716 7.353 7.211-3.143 10.51-11.52 7.367-18.716l-61.056-140.018c-1.877-4.295-5.746-7.396-10.354-8.277l-161.28-31.118c-0.91-0.185-1.806-0.256-2.702-0.256z" />
|
||||
<glyph unicode="" glyph-name="normal-file" d="M192 800v-832h640v620.992l-8.992 10.016-192 192-10.016 8.992h-428.992zM256 736h320v-192h192v-512h-512v704zM640 689.984l82.016-81.984h-82.016v82.016z" />
|
||||
<glyph unicode="" glyph-name="wenjianjiazhankai" d="M333.206 491.863h504.3v56.012c-0.012 61.888-50.179 112.055-112.066 112.067h-224.113c0 61.893-50.174 112.067-112.067 112.067v0h-224.133c-61.888-0.012-112.055-50.179-112.067-112.066v-560.313c0-14.289 2.964-27.837 7.832-40.39l160.246 320.535c36.685 55.779 50.191 112.088 112.067 112.088zM893.539 435.83h-504.279c-61.897 0-75.424-56.309-112.067-112.067l-168.121-280.145c0-61.897 50.191-56.033 112.067-56.033h504.3c61.876 0 75.403-11.96 112.067 56.033l168.079 280.145c0 0.006 0 0.014 0 0.021 0 61.881-50.164 112.045-112.045 112.045v0z" />
|
||||
<glyph unicode="" glyph-name="xiangmuxiaoxi" horiz-adv-x="1152" d="M578.575 733.268l-3.164 1.919c6.997-9.237 6.804-5.094 3.164-1.919v0zM177.111 329.683l358.478-161.157c31.662-14.924 45.32-14.924 79.641 0l358.479 161.158c17.676 8.218 24.14 47.012 24.14 67.918-23.022-11.541-55.653-27.978-56.318-28.158l-366.12-168.771-366.123 168.771c1.239-0.787-32.389 14.441-56.317 28.158 0-20.425 5.136-57.829 24.14-67.92v0zM575.411 31.842l-366.123 168.829c1.239-0.786-32.389 14.442-56.317 28.099 0-20.424 5.136-57.828 24.14-67.92l358.478-161.094c31.662-14.985 45.32-14.985 79.641 0l358.479 161.096c17.676 8.278 24.14 47.074 24.14 67.92-23.022-11.48-55.653-27.975-56.318-28.099l-366.12-168.831zM177.111 498.453l358.478-161.157c31.662-14.925 45.32-14.925 79.641 0l358.479 161.157c26.376 12.327 27.284 64.656 0 79.581l-358.478 189.27c-28.158 16.708-47.979 15.831-79.641 0l-358.479-189.27c-27.283-17.584-28.158-64.656 0-79.581v0zM575.411 735.187c0.374-0.122 0.702-0.314 0.97-0.522l365.152-196.392-366.122-154.329-366.123 154.328 366.123 196.915z" />
|
||||
<glyph unicode="" glyph-name="search2" d="M439.323 120.522c-49.28 0-97.098 9.657-142.127 28.7-43.48 18.389-82.523 44.706-116.044 78.226s-59.841 72.561-78.231 116.039c-19.043 45.028-28.7 92.845-28.7 142.123 0 49.284 9.656 97.105 28.7 142.133 18.389 43.479 44.71 82.52 78.232 116.039 33.519 33.515 72.563 59.833 116.044 78.219 45.027 19.040 92.846 28.695 142.126 28.695s97.099-9.654 142.127-28.695c43.481-18.386 82.526-44.704 116.045-78.221 33.521-33.518 59.842-72.56 78.231-116.039 19.042-45.029 28.7-92.849 28.7-142.133 0-49.278-9.657-97.095-28.702-142.123-18.389-43.477-44.708-82.52-78.229-116.039s-72.564-59.839-116.044-78.227c-45.028-19.043-92.847-28.698-142.128-28.698zM439.323 797.483c-171.976 0-311.888-139.906-311.888-311.875s139.912-311.874 311.888-311.874 311.888 139.907 311.888 311.874-139.912 311.875-311.888 311.875zM890.678-48.735c-22.122 0-42.904 8.562-58.542 24.115l-157.464 152.645 37.039 38.206 157.888-153.059c5.607-5.607 13.092-8.693 21.078-8.693 7.983 0 15.465 3.087 21.071 8.691 5.616 5.622 8.716 13.127 8.716 21.123 0 7.981-3.092 15.463-8.703 21.068l-0.302 0.307-152.746 157.563 38.208 37.035 152.612-157.427c15.571-15.638 24.145-36.423 24.145-58.549 0-22.196-8.626-43.055-24.287-58.736-15.668-15.666-36.515-24.288-58.714-24.288zM281.015 327.245c-42.34 42.321-65.653 98.584-65.644 158.421 0.008 59.818 23.319 116.075 65.638 158.408l37.635-37.62c-66.607-66.63-66.61-175.001-0.007-241.577l-37.621-37.632z" />
|
||||
<glyph unicode="" glyph-name="weibiaoti5" horiz-adv-x="1025" d="M458.632 712.273c12.75-33.75 48.75-57 86.25-58.5 10.5 0 12 0 21.75 0h354c31.5 0 57.75-27 57.75-58.5v-523.5c0-31.5-26.25-58.5-57.75-58.5h-808.5c-31.5 0-57.75 27-57.75 58.5v640.5c0 31.5 26.25 58.5 57.75 58.5h288.75M400.882 770.023v0c27.75-1.5 50.25-35.25 57.75-58.5" />
|
||||
<glyph unicode="" glyph-name="layim-theme" d="M958.831 538.643l-218.171 154.111h-100.54l-3.978-9.333c-0.371-0.872-38.022-86.861-124.773-88.667-35.692 0.764-67.207 15.5-93.681 43.828-20.659 22.106-30.375 44.584-30.457 44.777l-3.955 9.394h-100.588l-218.171-154.11 104.802-158.887 89.957 65.020-19.016-368.053h542.826l-19.016 368.052 89.957-65.019 104.803 158.887zM730.105 507.204l20.655-399.781h-478.174l20.656 399.781-115.939-83.798-36.324 55.070 159.44 111.642-19.276 30.639-160.079-112.090-14.548 22.056 185.921 131.33h71.078c5.332-10.044 15.434-26.78 30.952-43.581 32.048-34.696 72.257-53.486 116.346-54.411v-0.032c0.204 0.003 0.406 0.012 0.61 0.016 0.204-0.003 0.406-0.013 0.61-0.016v0.032c44.074 0.925 84.359 19.704 116.567 54.38 15.624 16.821 25.815 33.58 31.188 43.612h71.121l185.921-131.33-14.548-22.056-160.080 112.088-19.276-30.639 159.44-111.642-36.324-55.070-115.939 83.8z" />
|
||||
<glyph unicode="" glyph-name="shuye1" d="M515.2 734.4c1.3 0 2.4-0.2 3.4-0.6 27-11 216.1-231.5 212.2-426.3-3.2-163.8-151.2-176.9-198.1-176.9-8.9 0-14.1 0.5-14.1 0.5s-258.5 22-220 246.2c37.2 216.1 182 357 216.6 357.1M515.2 768c-52.5 0-122.8-93.3-136.4-112-40.7-56.1-93.7-149-115.1-273.2-12.5-72.5 1.5-134.1 41.5-183.3 72.6-89.2 204.6-101.4 210.2-101.9 1-0.1 7.3-0.6 17.3-0.6 110.9 0 230.4 55.1 233.5 209.9 2.2 111.7-52.9 224.7-99.4 299.8-41.3 66.5-104.3 145.8-134.2 158-5.5 2.2-11.3 3.3-17.4 3.3zM518.6 0.4c-9.8 0-17.7 7.5-17.7 16.8v716.6c0 9.3 7.9 16.8 17.7 16.8s17.7-7.5 17.7-16.8v-716.6c0-9.3-7.9-16.8-17.7-16.8zM518.6 459.7c-5.4 0-10.7 2.3-14.2 6.8-5.8 7.5-4.2 18 3.6 23.5l130.2 92.2c7.8 5.5 18.9 4 24.7-3.5s4.2-18-3.6-23.5l-130.2-92.2c-3.1-2.2-6.8-3.3-10.5-3.3zM518.6 225.1c-5.3 0-10.5 2.2-14 6.5-6 7.3-4.6 17.9 3.1 23.6l202.9 150.5c7.7 5.7 18.8 4.4 24.8-2.9s4.6-17.9-3.1-23.6l-202.8-150.5c-3.3-2.4-7.1-3.6-10.9-3.6zM518.6 323c-4.2 0-8.5 1.4-11.9 4.4l-185.3 160.2c-7.2 6.2-7.8 16.9-1.2 23.8s17.7 7.4 25 1.2l185.4-160.2c7.2-6.2 7.8-16.9 1.2-23.8-3.6-3.7-8.4-5.6-13.2-5.6z" />
|
||||
<glyph unicode="" glyph-name="add-circle" d="M675.040 412.736h-127.040v127.264c0 20.064-16.288 36.32-36.32 36.32-20.064 0-36.32-16.192-36.32-36.32v-127.232h-127.072c-20.064 0-36.352-16.32-36.352-36.352 0-20.064 16.224-36.352 36.352-36.352h127.072v-127.232c0-20 16.256-36.384 36.32-36.384 20.032 0 36.32 16.256 36.32 36.384v127.136h127.040c19.968 0 36.352 16.256 36.352 36.384-0.032 20.096-16.256 36.384-36.352 36.384v0zM511.328 830.56c-250.24 0-453.952-203.616-453.952-453.952s203.712-453.952 453.952-453.952c250.336 0 453.984 203.584 453.984 453.952 0 250.336-203.616 453.952-453.984 453.952v0zM511.328-20.576c-219.040 0-397.184 178.176-397.184 397.152 0 219.104 178.144 397.216 397.184 397.216s397.216-178.112 397.216-397.216c0.032-218.944-178.176-397.152-397.216-397.152v0zM511.328-20.576" />
|
||||
<glyph unicode="" glyph-name="xinxipilu" d="M369.647 225.683l-19.005 50.72-19.053-50.72h-50.704l41.179-31.699-18.989-57.093 47.566 34.888 47.583-34.888-19.036 57.093 41.206 31.699h-50.748zM350.643 453.792l-19.053-50.784h-50.704l41.179-31.714-18.989-57.068 47.566 34.895 47.583-34.895-19.036 57.068 41.206 31.714h-50.749l-19.004 50.784zM711.864 399.995h-207.876c-13.243 0-23.97-10.729-23.97-23.985 0-13.243 10.727-23.985 23.97-23.985h207.877c13.259 0 24.002 10.743 24.002 23.985-0.001 13.255-10.744 23.985-24.003 23.985zM767.831 767.778h-511.697c-70.645 0-127.908-57.263-127.908-127.925v-511.706c0-70.645 57.263-127.925 127.908-127.925h511.697c70.662 0 127.941 57.28 127.941 127.925v511.706c0 70.661-57.28 127.925-127.941 127.925zM516.231 719.806h163.153v-151.067l-67.988 42.786c-7.512 4.733-17.069 4.778-24.625 0.125l-70.539-43.411v151.566zM847.785 144.137c0-52.969-42.943-95.944-95.927-95.944h-479.733c-52.969 0-95.927 42.975-95.927 95.944v479.739c0 52.985 42.957 95.93 95.927 95.93h197.491v-193.277c0-8.447 4.578-16.223 11.948-20.346s16.395-3.937 23.579 0.499l93.695 57.652 91.446-57.527c3.78-2.389 8.089-3.592 12.43-3.592 3.873 0 7.745 0.968 11.258 2.904 7.42 4.108 12.040 11.931 12.040 20.41v193.277h25.846c52.984 0 95.927-42.944 95.927-95.93v-479.739zM711.864 208.099h-207.876c-13.243 0-23.97-10.711-23.97-23.985 0-13.243 10.727-23.985 23.97-23.985h207.877c13.259 0 24.002 10.743 24.002 23.985-0.001 13.275-10.744 23.985-24.003 23.985z" />
|
||||
<glyph unicode="" glyph-name="set-sm" d="M946.367 405.895c0.020 21.85-13.040 38.49-31.74 41.57-18.69 3.070-79.050 13.010-85.99 14.14-6.95 1.15-14.090 8.070-15.4 11.45-1.32 3.37-8.94 22.2-11.87 29.46-2.95 7.27-1.92 16.58 4.39 25.52 6.3 8.93 39.9 55.87 48.38 67.72 8.49 11.87 8.65 34.61-4.84 48.39-13.48 13.78-47.75 47.090-56.73 55.86-8.99 8.76-31.080 8.64-42.67 0.43-11.58-8.2-71.69-51.010-71.69-51.010s-9.97-6.89-20.67-2.64c-10.7 4.24-33.43 14.070-33.43 14.070s-7.19 5.43-9.68 19.79c-2.5 14.37-11.11 65.28-14.070 82.7-2.97 17.42-20.67 29.62-37.83 29.46-17.16-0.14-57.91 0-74.33 0s-32.26-15.68-34.75-29.46c-2.49-13.79-11.56-69.16-14.070-84.45-2.52-15.3-11.44-18.48-11.44-18.48s-19.56-8.060-29.91-12.31c-10.34-4.26-15.39-2.64-30.35 7.48-14.95 10.11-44.74 31.030-63.040 43.83-18.3 12.81-38.12 7.92-49.26-3.52s-36.060-35.77-51.020-50.43c-14.95-14.66-12.61-37.54 0.58-55.71 13.2-18.18 32.34-45.43 41.35-58.21s10.84-19.5 8.36-26.82c-2.49-7.34-6.64-16.58-11.43-27.72-4.81-11.13-9.69-13.64-27.86-17.010-17.36-3.21-58.42-9.92-77.4-13.31-18.99-3.37-30.66-21.43-30.66-41.81v-64.66c0-24.34 13.2-37.24 38.42-41.93s62.66-10.66 74.77-12.61c12.1-1.95 17.67-6.6 21.41-15.54 3.73-8.94 5.13-10.12 9.37-22.57 4.26-12.47 6.46-15.55-4.98-31.67-11.44-16.13-34.31-48.11-46.030-64.51-11.74-16.4-6.45-37.83 4.98-49.85 11.44-12.030 35.47-35.64 48.97-48.97 13.49-13.33 35.19-16.28 53.36-3.52 18.19 12.75 54.98 38.99 65.69 46.62 10.7 7.63 21.91 5.28 27.85 2.94 5.94-2.35 11.25-4.6 22-9.1 10.73-4.48 13.85-11.2 16.41-23.45 2.57-12.24 10.19-56.85 13.93-78.59 3.75-21.72 18.91-33.43 40.62-33.72 21.7-0.29 33.27-0.12 61.57 0 28.29 0.13 41.86 12.61 45.45 31.38 3.59 18.76 12.45 72.94 14.22 83.72 1.78 10.76 5.94 14.73 13.63 18.47 7.7 3.74 14.32 6.47 26.84 11.88 12.51 5.4 18.91 0.66 27.7-5.72 8.8-6.39 47.51-33.78 63.78-45.31 16.28-11.53 36.73-10.33 51.9 4.4 15.18 14.73 31.62 30.99 49.27 48.38 17.64 17.4 12.16 39.59 4.4 51.46-7.77 11.88-44.49 62.95-49.71 70.23-5.21 7.28-4.4 18.62-1.75 24.63 2.64 6.010 8.44 18.24 11.72 25.22 3.29 6.97 9.6 11.22 18.18 12.9 8.58 1.69 62.72 11 83.75 14.61 21.030 3.64 31.11 19.92 31.26 39.92 0.15 20.020 0.070 48.61 0.090 65.98zM908.587 338.615c0.21-5.76-4.66-10.65-8.82-11.38-4.17-0.73-63.26-11.38-81.48-14.29-18.21-2.92-33.23-15.070-38.72-28.060-3.98-9.44-5.47-13.51-10.59-26.96-5.12-13.44-4.64-32.19 2.56-42.26 7.2-10.080 46.82-64.9 50.38-70.45s4.27-11.95-1.28-17.5-40.99-41.2-47.39-47.39c-6.41-6.19-11.83-4.8-18.79 0-6.95 4.8-39.61 26.39-64.44 44.36-16.96 12.28-32.82 12.43-48.7 6.020-15.87-6.42 1.28 0.28-22.2-8.97s-30.23-27.62-33.73-48.24c-3.5-20.63-10.67-62.98-11.95-70.45s-5.55-11.1-13.66-11.1h-64.9c-8.11 0-11.74 2.99-14.52 11.95-2.77 8.97-10.030 54.87-12.8 74.29-2.78 19.43-13.82 36.12-24.77 40.56-10.94 4.45-4.98 2.14-27.32 11.1-22.34 8.97-39.63 4.5-51.23-3.84-11.61-8.34-58.64-42.69-65.33-46.96-6.68-4.28-14.65-3.28-18.35 0.42s-40.56 40.56-46.54 46.54c-5.98 5.98-5.36 12.92 0 20.49 5.36 7.58 28.39 40.76 40.99 57.95 12.59 17.2 17.93 34.74 9.82 53.49-8.12 18.74-4.42 10.24-12.39 28.6-7.96 18.36-24.28 24.46-38.42 26.9-14.14 2.43-68.88 11.53-76.85 13.23-7.97 1.71-11.95 7.26-11.95 14.090v66.18c0 9.53 7.67 12.44 12.38 13.23 4.7 0.8 54.22 9.18 73 12.39 18.79 3.2 36.36 11.32 43.55 29.030 7.19 17.7 4.27 11.1 11.1 27.32 6.83 16.23 3.8 33.94-7.68 49.96-11.49 16.010-38.85 54-44.4 61.9s-5.77 12.6 0.85 19.21c6.62 6.62 42.050 42.48 46.96 46.97 4.91 4.48 12.070 5.4 18.36 0.85 6.3-4.55 49.31-35.65 64.040-46.11s32.35-12.56 49.1-5.55c16.75 7.020 10.25 4.48 26.9 11.1s24.84 19.090 28.18 39.71c3.33 20.61 11.95 74.14 12.81 77.7 0.85 3.55 5.55 10.46 11.74 10.46s65.82-0.070 69.8 0c3.99 0.070 10.3-3.29 11.32-9.18 1.020-5.9 13.020-74.29 14.94-86.25 1.92-11.95 15.58-28.57 25.54-32.73s21.35-8.75 31.31-13.090c9.97-4.34 30.13-1.91 36.15 2.28 6.030 4.18 70.52 48.81 75.43 52.37s11.52 3.27 17.64-2.85 43.34-43.19 47.54-47.53c4.19-4.34 4.66-8.66 1.14-13.66-3.53-5.010-36.72-51.8-47.54-67.46-10.81-15.65-11.73-33.73-5.41-48.96 6.33-15.22 3.99-9.39 9.11-21.91 5.13-12.53 16.28-29.030 33.59-31.88s76.92-12.74 84.82-13.95c7.9-1.21 11.1-7.18 11.1-13.37s-0.21-62.55 0-68.32zM526.833 573.195c-110.45 0-200-89.54-200-200s89.55-200 200-200c110.46 0 200 89.54 200 200s-89.54 200-200 200zM526.833 208.195c-91.12 0-165 73.87-165 165s73.88 165 165 165c91.13 0 165-73.87 165-165s-73.87-165-165-165z" />
|
||||
<glyph unicode="" glyph-name="about" d="M514.272 834.608c-249.517 0-451.79-202.273-451.79-451.79s202.273-451.79 451.79-451.79 451.79 202.273 451.79 451.79-202.273 451.79-451.79 451.79zM514.272-20.129c-222.541 0-402.947 180.406-402.947 402.947s180.406 402.947 402.947 402.947 402.947-180.406 402.947-402.947-180.405-402.947-402.947-402.947zM514.295 593.979c-9.446-10.361-14.308-22.952-14.308-37.484 0-11.96 3.887-22.396 11.535-30.458 7.783-8.211 17.854-12.451 29.314-12.451 9.312 0 23.139 2.85 35.783 16.901 9.866 10.641 14.867 23.438 14.867 37.693 0 11.681-4.032 21.901-11.744 29.832-16.815 17.311-47.382 15.436-65.446-4.035zM549.461 293.283c-12.111-11.542-20.59-18.759-26.237-23.316 2.77 14.954 9.976 44.614 27.33 103.023 17.298 57.89 18.799 67.992 18.799 72.956 0 8.657-3.637 16.335-9.922 21.643-14.125 11.662-39.035 9.35-69.131-7.678-16.779-9.408-34.596-24.76-54.493-46.577l-10.377-11.542 34.425-26.549 8.819 8.715c9.573 9.293 16.086 15.352 20.412 19.394-26.295-86.46-39.093-140.191-39.093-164.262 0-10.907 3.172-19.971 9.573-26.839 6.46-7.039 15.51-10.737 25.892-10.737 10.146 0 21.792 3.926 35.922 11.949 12.741 7.212 31.883 23.030 58.642 48.191l10.838 10.392-31.307 30.475-10.091-9.238z" />
|
||||
<glyph unicode="" glyph-name="chart-screen" d="M963.931 179.219v34.824l-37.355-2.676v483.487h-235.163v70.463h-361.152v-70.463h-234.57v-480.81h-35.621v-34.824h432.583v-141.229h-90.314v-35.307h216.754v35.307h-90.314v141.228h435.153zM366.213 730.008h289.004v-35.307h-289.004v35.307zM364.818 332.731l-142.594 73.521 14.296 27.737 123.239-63.524 173.928 159.755 127.581-92.635 93.138 122.414 24.842-18.898-111.608-146.737-131.636 95.622-171.186-157.256z" />
|
||||
<glyph unicode="" glyph-name="delete1" d="M738.923 24.288h-451.956c-27.2 0-49.327 21.603-49.327 48.157v418.017c0 26.548 22.129 48.147 49.327 48.147h451.956c27.2 0 49.327-21.598 49.327-48.147v-418.017c0-26.555-22.129-48.157-49.327-48.157zM286.966 494.547c-4.447 0-7.168-2.644-7.168-4.084v-418.017c0-1.443 2.722-4.093 7.168-4.093h451.956c4.448 0 7.168 2.651 7.168 4.093v418.017c0 1.44-2.722 4.084-7.168 4.084h-451.956zM832.199 496.302h-640.401c-27.201 0-49.327 20.131-49.327 44.876v61.045c0 24.74 22.128 44.867 49.327 44.867h640.401c27.2 0 49.327-20.127 49.327-44.867v-61.045c0-24.744-22.129-44.876-49.327-44.876zM184.631 541.327c0.387-0.733 2.722-2.866 7.168-2.866h640.401c4.445 0 6.782 2.132 7.168 2.867v60.741c-0.393 0.736-2.733 2.863-7.168 2.863h-640.401c-4.437 0-6.776-2.128-7.168-2.863v-60.742zM600.748 605.354h-174.546c-27.201 0-49.327 20.13-49.327 44.876v10.736c0 24.74 22.128 44.867 49.327 44.867h174.546c27.2 0 49.327-20.126 49.327-44.867v-10.736c0-24.745-22.128-44.876-49.327-44.876zM419.034 650.378c0.387-0.733 2.722-2.865 7.168-2.865h174.546c4.446 0 6.782 2.131 7.168 2.865v10.432c-0.393 0.736-2.734 2.862-7.168 2.862h-174.546c-4.437 0-6.776-2.126-7.168-2.862v-10.432zM404.099 430.833h-30.097c-7.297 0-13.213-5.916-13.213-13.213v-272.34c0-7.297 5.916-13.212 13.213-13.212h30.098c7.297 0 13.212 5.916 13.212 13.212v272.341c0 7.297-5.916 13.213-13.212 13.213zM659.583 430.833h-30.097c-7.298 0-13.213-5.916-13.213-13.213v-272.34c0-7.297 5.917-13.212 13.213-13.212h30.097c7.297 0 13.212 5.916 13.212 13.212v272.341c0 7.297-5.916 13.213-13.212 13.213zM531.841 430.833h-30.098c-7.297 0-13.213-5.916-13.213-13.213v-272.34c0-7.297 5.917-13.212 13.213-13.212h30.098c7.297 0 13.212 5.916 13.212 13.212v272.341c0 7.297-5.916 13.213-13.212 13.213z" />
|
||||
<glyph unicode="" glyph-name="share3" d="M769.714 306.453c-51.754 0-97.702-24.851-126.571-63.269l-248.664 124.757c3.93 13.798 6.034 28.364 6.034 43.424 0 16.496-2.527 32.399-7.211 47.35l247.724 124.288c28.71-40.052 75.647-66.151 128.687-66.151 87.388 0 158.229 70.84 158.229 158.229s-70.841 158.229-158.229 158.229c-87.389 0-158.229-70.841-158.229-158.229 0-6.046 0.352-12.009 1.011-17.88l-261.275-131.085c-28.371 26.943-66.723 43.479-108.938 43.479-87.388 0-158.229-70.84-158.229-158.229s70.84-158.229 158.229-158.229c43.752 0 83.354 17.758 111.997 46.459l258.676-129.779c-0.964-7.062-1.474-14.266-1.474-21.592 0-87.389 70.84-158.229 158.229-158.229s158.229 70.84 158.229 158.229c-0.001 87.387-70.836 158.228-158.225 158.228v0z" />
|
||||
<glyph unicode="" glyph-name="youjian" d="M896.699 598.971c0 23.926-19.428 43.444-43.444 43.444h-684.849c-24.016 0-43.444-19.428-43.444-43.444v-433.090c0-23.926 19.428-43.444 43.444-43.444h684.939c23.926 0 43.444 19.428 43.444 43.444v433.090zM544.111 346.762l-0.18-0.18c-17.629-16.19-45.243-16.19-62.782 0.090l-284.769 256.166h633.85l-286.118-256.076zM383.737 380.672l-219.198-194.014v391.175l219.198-197.162zM413.779 354.048l40.566-36.338c15.92-14.661 36.518-22.487 58.105-22.487 0 0 0.090 0 0.090 0 21.587 0 42.185 7.825 58.015 22.397l42.994 38.407 218.929-193.924h-635.559l216.86 191.945zM642.871 382.471l214.251 191.675v-381.371l-214.251 189.696z" />
|
||||
<glyph unicode="" glyph-name="check" d="M887.904 597.792c-12.864 12.064-33.152 11.488-45.216-1.408l-426.752-454.368-233.12 229.696c-12.608 12.416-32.864 12.288-45.28-0.32-12.416-12.576-12.256-32.864 0.352-45.248l256.48-252.672c0.096-0.096 0.224-0.128 0.32-0.224s0.128-0.224 0.224-0.32c2.016-1.92 4.448-3.008 6.784-4.288 1.152-0.672 2.144-1.664 3.36-2.144 3.776-1.472 7.776-2.24 11.744-2.24 4.192 0 8.384 0.832 12.288 2.496 1.312 0.544 2.336 1.664 3.552 2.368 2.4 1.408 4.896 2.592 6.944 4.672 0.096 0.096 0.128 0.256 0.224 0.352 0.064 0.096 0.192 0.128 0.288 0.224l449.184 478.208c12.16 12.832 11.488 33.088-1.376 45.216z" />
|
||||
<glyph unicode="" glyph-name="close" d="M557.312 382.752l265.28 263.904c12.544 12.48 12.608 32.704 0.128 45.248-12.512 12.576-32.704 12.608-45.248 0.128l-265.344-263.936-263.040 263.84c-12.448 12.48-32.704 12.544-45.248 0.064-12.512-12.48-12.544-32.736-0.064-45.28l262.976-263.776-265.152-263.744c-12.544-12.48-12.608-32.704-0.128-45.248 6.24-6.272 14.464-9.44 22.688-9.44 8.16 0 16.32 3.104 22.56 9.312l265.216 263.808 265.44-266.24c6.24-6.272 14.432-9.408 22.656-9.408 8.192 0 16.352 3.136 22.592 9.344 12.512 12.48 12.544 32.704 0.064 45.248l-265.376 266.176z" />
|
||||
<glyph unicode="" glyph-name="favorfill" d="M957.216 491.68c-3.808 11.36-13.632 19.68-25.504 21.504l-270.336 41.728-120.8 258.624c-5.248 11.232-16.544 18.432-28.928 18.464 0 0-0.032 0-0.064 0-12.384 0-23.648-7.136-28.928-18.336l-121.856-258.016-270.72-40.8c-11.872-1.792-21.728-10.048-25.568-21.408s-0.992-23.936 7.36-32.512l196.448-202.080-46.88-284.8c-1.984-12.096 3.104-24.256 13.12-31.328 9.984-7.072 23.168-7.808 33.888-1.92l241.824 133.024 241.312-133.856c4.832-2.624 10.176-3.968 15.52-3.968 0.256 0 0.48 0 0.64 0 17.696 0 32 14.304 32 32 0 3.968-0.704 7.776-2.016 11.296l-44.896 278.688 196.928 201.248c8.32 8.544 11.232 21.088 7.456 32.448z" />
|
||||
<glyph unicode="" glyph-name="favor" d="M767.104-63.936c-5.344 0-10.688 1.344-15.52 4.032l-241.312 133.856-241.824-133.024c-10.72-5.92-23.904-5.152-33.888 1.92-10.016 7.072-15.104 19.264-13.12 31.328l46.88 284.736-196.448 202.080c-8.256 8.512-11.168 20.928-7.456 32.192 3.68 11.296 13.312 19.616 25.024 21.632l155.072 26.592c17.632 2.944 33.984-8.736 36.96-26.144s-8.704-33.952-26.144-36.96l-95.168-16.32 165.344-170.080c7.072-7.296 10.272-17.504 8.64-27.488l-38.816-235.68 199.616 109.824c9.632 5.312 21.344 5.312 30.944-0.064l199.168-110.464-38.016 235.776c-1.632 10.016 1.632 20.224 8.704 27.456l164.672 168.256-225.664 34.816c-10.56 1.632-19.584 8.416-24.128 18.080l-99.2 212.384-100.064-211.84c-7.552-16-26.624-22.816-42.624-15.264-15.968 7.552-22.816 26.624-15.264 42.624l129.152 273.44c5.312 11.2 16.576 18.336 28.928 18.336 0 0 0.032 0 0.064 0 12.416-0.032 23.68-7.232 28.928-18.464l120.8-258.624 270.336-41.728c11.872-1.824 21.696-10.144 25.504-21.504 3.776-11.36 0.864-23.936-7.488-32.48l-196.928-201.216 45.92-284.864c1.952-12.096-3.2-24.256-13.216-31.296-5.472-3.936-11.904-5.856-18.368-5.856z" />
|
||||
<glyph unicode="" glyph-name="fuxuankuangxuanzhong" d="M734.155 767.755h-444.348c-89.223 0-161.563-72.339-161.563-161.58v-444.349c0-89.231 72.34-161.58 161.563-161.58h444.348c89.252 0 161.601 72.349 161.601 161.58v444.349c-0.001 89.242-72.35 161.58-161.601 161.58zM425.844 225.948l-1.055 1.055-1.054-1.055-139.548 139.539 37.003 37.011 103.602-103.601 260.606 260.587 36.983-37.003-296.537-296.534z" />
|
||||
<glyph unicode="" glyph-name="fenguangbaobiao" d="M892-16h-760c-11.046 0-20 8.954-20 20s8.954 20 20 20v0h760c11.046 0 20-8.954 20-20s-8.954-20-20-20v0zM232 344h-40c-22.091 0-40-17.909-40-40v0-200c0-22.091 17.909-40 40-40v0h40c22.091 0 40 17.909 40 40v0 200c0 22.091-17.909 40-40 40v0zM192 104v200h40v-200zM432 584h-40c-22.091 0-40-17.909-40-40v0-440c0-22.091 17.909-40 40-40h40c22.091 0 40 17.909 40 40v0 440c0 22.091-17.909 40-40 40v0zM392 104v440h40v-440zM632 504h-40c-22.091 0-40-17.909-40-40v0-360c0-22.091 17.909-40 40-40h40c22.091 0 40 17.909 40 40v0 360c0 22.091-17.909 40-40 40v0zM592 104v360h40v-360zM832 784h-40c-22.091 0-40-17.909-40-40v0-640c0-22.091 17.909-40 40-40h40c22.091 0 40 17.909 40 40v0 640c0 22.091-17.909 40-40 40v0zM792 104v640h40v-640z" />
|
||||
<glyph unicode="" glyph-name="jian" d="M887.157 25.931h-736.333v737.887h736.333v-737.887zM189.66 64.767h658.661v660.215h-658.661v-660.215zM741.91 376.233h-446.616c-10.874 0-19.418 8.544-19.418 19.418s8.544 19.418 19.418 19.418h446.616c10.874 0 19.418-8.544 19.418-19.418s-8.544-19.418-19.418-19.418z" />
|
||||
<glyph unicode="" glyph-name="jia" d="M887.157 25.931h-736.333v737.887h736.333v-737.887zM189.66 64.767h658.661v660.215h-658.661v-660.215zM741.91 376.233h-446.616c-10.874 0-19.418 8.544-19.418 19.418s8.544 19.418 19.418 19.418h446.616c10.874 0 19.418-8.544 19.418-19.418s-8.544-19.418-19.418-19.418zM518.991 161.081c-10.874 0-19.418 8.544-19.418 19.418v429.528c0 10.874 8.544 19.418 19.418 19.418s19.418-8.544 19.418-19.418v-429.528c0-10.097-8.544-19.418-19.418-19.418z" />
|
||||
<glyph unicode="" glyph-name="fenzhijigou" d="M822.689 422.836v19.418h-291.271v58.254h-38.836v-58.254h-291.271v-97.090h38.836v58.254h252.435v-58.254h38.836v58.254h252.435v-58.254h38.836v77.672zM356.655 733.525h310.689c21.449 0 38.836-17.388 38.836-38.836v0-155.345c0-21.449-17.388-38.836-38.836-38.836h-310.689c-21.449 0-38.836 17.388-38.836 38.836v0 155.345c0 21.449 17.388 38.836 38.836 38.836v0zM162.475 345.164h116.508c21.449 0 38.836-17.388 38.836-38.836v-233.017c0-21.449-17.388-38.836-38.836-38.836v0h-116.508c-21.449 0-38.836 17.388-38.836 38.836v0 233.017c0 21.449 17.388 38.836 38.836 38.836v0zM181.893 306.328c-10.724 0-19.418-8.694-19.418-19.418v0-194.181c0-10.724 8.694-19.418 19.418-19.418v0h77.672c10.724 0 19.418 8.694 19.418 19.418v194.181c0 10.724-8.694 19.418-19.418 19.418v0h-77.672zM453.746 345.164h116.508c21.449 0 38.836-17.388 38.836-38.836v-233.017c0-21.449-17.388-38.836-38.836-38.836v0h-116.508c-21.449 0-38.836 17.388-38.836 38.836v0 233.017c0 21.449 17.388 38.836 38.836 38.836v0zM473.164 306.328c-10.724 0-19.418-8.694-19.418-19.418v0-194.181c0-10.724 8.694-19.418 19.418-19.418v0h77.672c10.724 0 19.418 8.694 19.418 19.418v194.181c0 10.724-8.694 19.418-19.418 19.418v0h-77.672zM745.017 345.164h116.508c21.449 0 38.836-17.388 38.836-38.836v-233.017c0-21.449-17.388-38.836-38.836-38.836v0h-116.508c-21.449 0-38.836 17.388-38.836 38.836v0 233.017c0 21.449 17.388 38.836 38.836 38.836v0zM764.435 306.328c-10.724 0-19.418-8.694-19.418-19.418v0-194.181c0-10.724 8.694-19.418 19.418-19.418v0h77.672c10.724 0 19.418 8.694 19.418 19.418v194.181c0 10.724-8.694 19.418-19.418 19.418v0h-77.672z" />
|
||||
<glyph unicode="" glyph-name="roundcheckfill" d="M512 830.016c-245.92 0-446.016-200.096-446.016-446.016 0-245.952 200.064-446.016 446.016-446.016s446.016 200.064 446.016 446.016c0 245.92-200.064 446.016-446.016 446.016zM727.232 457.568l-256.224-259.008c-0.064-0.064-0.192-0.096-0.256-0.192-0.096-0.064-0.096-0.192-0.192-0.256-2.048-1.984-4.576-3.2-6.944-4.544-1.184-0.672-2.144-1.696-3.392-2.176-3.84-1.536-7.904-2.336-11.968-2.336-4.096 0-8.224 0.8-12.096 2.4-1.28 0.544-2.304 1.632-3.52 2.304-2.368 1.344-4.832 2.528-6.88 4.544-0.064 0.064-0.096 0.192-0.16 0.256-0.064 0.096-0.192 0.096-0.256 0.192l-126.016 129.504c-12.32 12.672-12.032 32.928 0.64 45.248 12.672 12.288 32.896 12.064 45.248-0.64l103.264-106.112 233.28 235.84c12.416 12.576 32.704 12.704 45.248 0.256 12.512-12.448 12.64-32.704 0.224-45.28z" />
|
||||
<glyph unicode="" glyph-name="roundcheck" d="M512-64c-247.040 0-448 200.96-448 448s200.96 448 448 448 448-200.96 448-448-200.96-448-448-448zM512 767.712c-211.584 0-383.712-172.128-383.712-383.712 0-211.552 172.128-383.712 383.712-383.712 211.552 0 383.712 172.16 383.712 383.712 0 211.584-172.16 383.712-383.712 383.712zM726.976 502.816c-12.544 12.448-32.832 12.32-45.248-0.256l-233.28-235.84-103.264 106.112c-12.352 12.704-32.608 12.928-45.248 0.64-12.672-12.32-12.96-32.608-0.64-45.248l126.016-129.504c0.064-0.096 0.192-0.096 0.256-0.192 0.064-0.064 0.096-0.192 0.16-0.256 2.016-1.984 4.512-3.2 6.88-4.544 1.248-0.672 2.24-1.792 3.52-2.304 3.872-1.6 8-2.4 12.096-2.4 4.064 0 8.128 0.8 11.968 2.336 1.248 0.512 2.208 1.536 3.392 2.176 2.4 1.344 4.896 2.528 6.944 4.544 0.064 0.064 0.096 0.192 0.192 0.256 0.064 0.096 0.16 0.128 0.256 0.192l256.224 259.008c12.448 12.608 12.32 32.864-0.224 45.28z" />
|
||||
<glyph unicode="" glyph-name="roundclosefill" d="M512 832c-247.008 0-448-200.96-448-448s200.96-448 448-448c247.008 0 448 200.96 448 448s-200.96 448-448 448zM694.752 246.016c12.48-12.544 12.448-32.768-0.064-45.248-6.24-6.208-14.4-9.344-22.592-9.344-8.224 0-16.416 3.136-22.656 9.408l-137.6 138.016-138.048-136.576c-6.24-6.144-14.368-9.248-22.496-9.248-8.256 0-16.48 3.168-22.752 9.504-12.416 12.576-12.32 32.8 0.256 45.248l137.888 136.384-137.376 137.824c-12.48 12.512-12.448 32.768 0.064 45.248 12.512 12.512 32.736 12.448 45.248-0.064l137.568-137.984 138.048 136.576c12.544 12.448 32.832 12.32 45.248-0.256 12.448-12.576 12.32-32.832-0.256-45.248l-137.888-136.384 137.408-137.856z" />
|
||||
<glyph unicode="" glyph-name="roundclose" d="M512-64c-247.040 0-448 200.96-448 448s200.96 448 448 448 448-200.96 448-448-200.96-448-448-448zM512 767.712c-211.584 0-383.712-172.128-383.712-383.712 0-211.552 172.128-383.712 383.712-383.712 211.552 0 383.712 172.16 383.712 383.712 0 211.584-172.16 383.712-383.712 383.712zM557.056 382.624l138.368 136.864c12.576 12.416 12.672 32.672 0.256 45.248s-32.704 12.672-45.248 0.256l-138.56-137.024-136.448 136.864c-12.512 12.512-32.736 12.576-45.248 0.064-12.512-12.48-12.544-32.736-0.064-45.248l136.256-136.672-137.376-135.904c-12.576-12.448-12.672-32.672-0.256-45.248 6.272-6.336 14.496-9.504 22.752-9.504 8.128 0 16.256 3.104 22.496 9.248l137.568 136.064 138.688-139.136c6.24-6.272 14.432-9.408 22.656-9.408 8.192 0 16.352 3.136 22.592 9.344 12.512 12.48 12.544 32.704 0.064 45.248l-138.496 138.944z" />
|
||||
<glyph unicode="" glyph-name="roundrightfill" d="M512 832c-247.040 0-448-200.96-448-448s200.96-448 448-448 448 200.96 448 448-200.96 448-448 448zM661.76 360.032l-160.256-158.496c-6.24-6.144-14.368-9.248-22.496-9.248-8.256 0-16.512 3.168-22.752 9.504-12.416 12.576-12.32 32.8 0.256 45.248l137.408 135.904-136.288 136.672c-12.48 12.512-12.448 32.768 0.064 45.248 12.512 12.512 32.768 12.448 45.248-0.064l158.912-159.36c0.032-0.032 0.032-0.064 0.064-0.096s0.064-0.032 0.096-0.064c2.944-2.976 5.056-6.432 6.592-10.048 0.064-0.128 0.224-0.256 0.256-0.384 4.736-11.616 2.368-25.44-7.104-34.816z" />
|
||||
<glyph unicode="" glyph-name="roundright" d="M512-64c-247.040 0-448 200.96-448 448s200.96 448 448 448 448-200.96 448-448-200.96-448-448-448zM512 768c-211.744 0-384-172.256-384-384s172.256-384 384-384c211.744 0 384 172.256 384 384s-172.256 384-384 384zM668.832 394.848c-0.032 0.128-0.192 0.256-0.256 0.384-1.536 3.616-3.648 7.072-6.592 10.048-0.032 0.032-0.064 0.032-0.096 0.064s-0.032 0.064-0.064 0.096l-158.912 159.36c-12.48 12.512-32.736 12.576-45.248 0.064-12.512-12.48-12.544-32.736-0.064-45.248l136.288-136.672-137.408-135.904c-12.576-12.448-12.672-32.672-0.256-45.248 6.24-6.336 14.496-9.504 22.752-9.504 8.128 0 16.256 3.104 22.496 9.248l160.256 158.496c9.504 9.376 11.872 23.2 7.104 34.816z" />
|
||||
<glyph unicode="" glyph-name="like" d="M512-32c-28.928 0-57.92 12.672-86.624 41.376l-319.104 322.624c-38.208 47.648-74.272 92.672-74.272 180 0 141.152 114.848 256 256 256 53.088 0 104-16.096 147.296-46.592 14.432-10.176 17.92-30.144 7.712-44.608-10.176-14.432-30.080-17.92-44.608-7.712-32.384 22.848-70.592 34.912-110.4 34.912-105.888 0-192-86.112-192-192 0-61.408 20.288-90.112 59.168-138.688l315.584-318.816c15.968-15.968 28.864-22.304 41.248-22.496 12.704-0.192 24.928 6.176 41.376 22.624l316.672 319.904c26.016 28.192 57.952 75.776 57.952 137.472 0 105.888-86.112 192-192 192-48.064 0-94.080-17.856-129.536-50.272l-134.080-134.112c-12.512-12.512-32.736-12.512-45.248 0s-12.512 32.736 0 45.248l135.104 135.136c48.32 44.192 109.664 68 173.76 68 141.152 0 256-114.848 256-256 0-82.368-41.152-144.288-75.68-181.696l-317.568-320.8c-28.8-28.832-57.792-41.504-86.752-41.504z" />
|
||||
<glyph unicode="" glyph-name="samefill" d="M352 544h128v-128h-128v128zM918.624 22.624l-145.664 145.664c56.672 66.944 91.040 153.344 91.040 247.712 0 211.744-172.256 384-384 384s-384-172.256-384-384c0-211.744 172.256-384 384-384 94.368 0 180.768 34.368 247.712 91.040l145.664-145.664c6.24-6.24 14.432-9.376 22.624-9.376s16.384 3.136 22.624 9.376c12.512 12.512 12.512 32.736 0 45.248zM288 384v192c0 17.664 14.336 32 32 32h192c17.664 0 32-14.336 32-32v-192c0-17.664-14.336-32-32-32h-192c-17.664 0-32 14.336-32 32zM640 288c0-17.696-14.304-32-32-32h-160c-17.664 0-32 14.304-32 32s14.336 32 32 32h128v128c0 17.664 14.304 32 32 32s32-14.336 32-32v-160z" />
|
||||
<glyph unicode="" glyph-name="same" d="M512 352h-192c-17.664 0-32 14.336-32 32v192c0 17.664 14.336 32 32 32h192c17.664 0 32-14.336 32-32v-192c0-17.664-14.336-32-32-32zM352 416h128v128h-128v-128zM608 256h-160c-17.664 0-32 14.304-32 32s14.336 32 32 32h128v128c0 17.664 14.304 32 32 32s32-14.336 32-32v-160c0-17.696-14.304-32-32-32zM896-32c-8.192 0-16.384 3.136-22.624 9.376l-167.104 167.104c-12.512 12.512-12.512 32.736 0 45.248 60.448 60.448 93.728 140.832 93.728 226.272 0 176.448-143.552 320-320 320s-320-143.552-320-320c0-176.448 143.552-320 320-320 39.328 0 77.76 7.072 114.176 20.96 16.448 6.24 35.008-1.984 41.312-18.496 6.272-16.512-1.984-35.008-18.496-41.312-43.712-16.672-89.792-25.152-136.992-25.152-211.744 0-384 172.256-384 384s172.256 384 384 384c211.744 0 384-172.256 384-384 0-91.808-32-178.72-90.784-247.968l145.408-145.408c12.512-12.512 12.512-32.736 0-45.248-6.24-6.24-14.432-9.376-22.624-9.376z" />
|
||||
<glyph unicode="" glyph-name="evaluate" d="M405.536-36.128c-8.8 0-17.568 3.584-23.904 10.688-83.232 93.216-217.856 94.112-220.64 94.112-0.096 0-0.096 0-0.192 0-17.568 0-31.904 14.176-32.032 31.744-0.128 17.664 14.016 32.064 31.648 32.256 6.656 0.352 165.664 0.192 268.96-115.488 11.776-13.184 10.624-33.408-2.56-45.184-6.080-5.44-13.696-8.128-21.28-8.128zM620.128-36.064c-7.776 0-15.584 2.816-21.76 8.544-12.96 12-13.76 32.256-1.728 45.216 106.976 115.52 262.752 115.392 268.896 115.136 17.696-0.192 31.872-14.656 31.68-32.32-0.192-17.568-14.464-31.68-32-31.68-0.096 0-0.16 0-0.256 0v0c-2.656 0-134.56-0.864-221.376-94.624-6.272-6.848-14.88-10.272-23.456-10.272zM563.712 126.688h-101.408c-3.232 0-6.368 0.48-9.344 1.408-108.256 13.888-200.256 76.704-259.552 177.44-68.832 116.992-84.608 268.576-39.2 377.216 4.896 11.68 16.224 19.392 28.896 19.648l9.632 0.096c60.96 0 117.888-11.52 169.696-34.304 37.44 68.448 80.192 120.384 127.328 154.688 2.496 2.176 5.344 4 8.512 5.344v0c9.888 4.288 21.376 3.36 30.432-2.528 1.568-1.024 3.040-2.176 4.384-3.456 47.264-34.688 88.832-85.856 126.464-155.744 52.832 23.872 111.072 35.968 173.632 35.968l9.792-0.096c12.672-0.256 24-7.968 28.896-19.648 45.408-108.672 29.664-260.256-39.232-377.248-59.296-100.672-151.264-163.52-259.488-177.44-3.040-0.832-6.176-1.344-9.44-1.344zM468 190.688h90.016c0.672 0.128 1.376 0.224 2.080 0.32 115.712 12.864 182.080 87.072 217.376 147.008 54.048 91.872 70.432 211.936 42.528 300.32-58.24-1.888-111.616-16.16-158.816-42.528-7.712-4.288-16.832-5.184-25.184-2.624-8.384 2.624-15.328 8.608-19.2 16.512-32.448 66.368-67.232 115.2-105.824 148.48-38.624-33.216-74.176-82.4-105.92-146.592-3.872-7.808-10.72-13.696-19.040-16.32-8.32-2.656-17.28-1.76-24.96 2.4-46.208 25.12-98.336 38.784-155.008 40.64-27.904-88.384-11.52-208.448 42.528-300.288 35.296-59.936 101.632-134.112 217.312-147.008 0.704-0.096 1.408-0.192 2.112-0.32zM512.768-64c-17.664 0-32 14.304-32 32v190.688c0 17.696 14.336 32 32 32s32-14.304 32-32v-190.688c-0.032-17.696-14.336-32-32-32z" />
|
||||
<glyph unicode="" glyph-name="circle1" d="M511.998 847.999c-256.259 0-463.998-207.739-463.998-464 0-256.258 207.739-463.998 463.998-463.998 256.263 0 464.002 207.741 464.002 463.998 0 256.261-207.739 464-464.002 464zM512.002-16.001c-220.915 0-400.002 179.088-400.002 400 0 220.917 179.086 400 400.002 400 220.912 0 399.998-179.083 399.998-400 0-220.912-179.086-400-399.998-400z" />
|
||||
<glyph unicode="" glyph-name="radio" d="M320.5 383.5c0-106.039 85.961-192 192-192s192 85.961 192 192v0c0 106.039-85.961 192-192 192s-192-85.961-192-192v0zM511.998 847.999c-256.259 0-463.998-207.739-463.998-464 0-256.258 207.739-463.998 463.998-463.998 256.263 0 464.002 207.741 464.002 463.998 0 256.261-207.739 464-464.002 464zM512.002-16.001c-220.915 0-400.002 179.088-400.002 400 0 220.917 179.086 400 400.002 400 220.912 0 399.998-179.083 399.998-400 0-220.912-179.086-400-399.998-400z" />
|
||||
<glyph unicode="" glyph-name="caidan_xunzhang" d="M649.791 471.365l70.787 105.298c2.628 3.877 4.197 8.656 4.203 13.803v139.135c0 27.283-22.199 49.47-49.47 49.47h-330.637c-27.272 0-49.47-22.187-49.47-49.47v-139.134c0.005-5.026 1.5-9.701 4.068-13.609l-0.058 0.094 69.518-106.517c-72.239-46.568-120.17-127.733-120.17-219.891 0-144.158 117.272-261.432 261.431-261.432s261.432 117.272 261.432 261.431c0 92.777-48.581 174.409-121.634 220.822zM509.992 511.976c-0.018 0-0.040 0-0.062 0-19.184 0-37.885-2.066-55.893-5.987l1.727 0.315v223.298h108.457v-223.298c-16.281 3.606-34.982 5.672-54.164 5.672-0.022 0-0.045 0-0.067 0h0.003zM675.311 598.004l-61.62-91.659v223.257h61.62v-131.598zM344.674 729.602h61.62v-226.209l-61.62 94.431v131.779zM509.992 38.582c-116.887 0-211.962 95.087-211.962 211.961s95.074 211.962 211.962 211.962 211.962-95.087 211.962-211.962-95.075-211.962-211.961-211.962zM509.993 423.338c-95.268 0-172.782-77.513-172.782-172.794s77.513-172.795 172.782-172.795c95.292 0 172.805 77.514 172.805 172.795s-77.513 172.794-172.805 172.794zM509.993 127.219c-67.997 0-123.312 55.328-123.312 123.325s55.315 123.323 123.312 123.323 123.337-55.327 123.337-123.324-55.339-123.325-123.337-123.325z" />
|
||||
<glyph unicode="" glyph-name="pulldown" d="M512-64c-247.040 0-448 200.96-448 448s200.96 448 448 448 448-200.96 448-448-200.96-448-448-448zM512 768c-211.744 0-384-172.256-384-384s172.256-384 384-384c211.744 0 384 172.256 384 384s-172.256 384-384 384zM694.56 373.856c-12.544 12.608-33.376 12.64-45.952 0.064l-104.608-103.904v306.656c0 17.76-14.208 32.16-32 32.16-17.76 0-32-14.4-32-32.16v-308.32l-105.216 106.688c-12.48 12.608-32.704 12.736-45.312 0.256-12.64-12.512-12.672-32.896-0.192-45.504l159.36-161.056c6.272-6.336 14.592-9.568 22.88-9.568 8.16 0 16.384 3.168 22.624 9.312 0.032 0.064 0.032 0.064 0.064 0.128 0.032 0 0.064 0 0.096 0.064l160.192 159.68c12.576 12.544 12.608 32.928 0.064 45.504z" />
|
||||
<glyph unicode="" glyph-name="pullup" d="M512-64c-247.040 0-448 200.96-448 448s200.96 448 448 448 448-200.96 448-448-200.96-448-448-448zM512 768c-211.744 0-384-172.256-384-384s172.256-384 384-384c211.744 0 384 172.256 384 384s-172.256 384-384 384zM694.464 437.632l-158.496 160.256c-9.344 9.472-23.168 11.84-34.784 7.136-0.736-0.288-1.312-0.992-2.016-1.344-2.976-1.472-5.952-3.072-8.448-5.536-0.032-0.032-0.032-0.064-0.064-0.096s-0.064-0.032-0.096-0.064l-159.36-158.912c-12.512-12.48-12.544-32.736-0.064-45.248 6.24-6.272 14.464-9.408 22.656-9.408 8.16 0 16.352 3.104 22.592 9.344l103.616 103.296v-305.056c0-17.696 14.336-32 32-32s32 14.304 32 32v306.752l104.96-106.112c6.24-6.336 14.496-9.504 22.752-9.504 8.128 0 16.256 3.072 22.496 9.248 12.576 12.416 12.704 32.672 0.256 45.248z" />
|
||||
<glyph unicode="" glyph-name="refresh" d="M939.456 639.776c-16.672 5.984-34.976-2.72-40.896-19.36l-24.768-69.344c-28.992 65.312-74.784 122.72-133.088 165.92-185.376 137.28-449.408 99.776-588.384-83.648-67.264-88.768-95.616-198.176-79.84-308.032 15.84-110.304 74.208-207.776 164.352-274.496 75.424-55.808 163.808-82.752 251.456-82.752 128.032 0 254.56 57.44 336.992 166.272 36.48 48.128 61.472 102.080 74.208 160.416 3.776 17.248-7.136 34.304-24.416 38.080-17.216 3.712-34.304-7.104-38.080-24.416-10.784-49.184-31.872-94.752-62.72-135.456-117.888-155.52-341.92-187.232-499.392-70.72-76.288 56.48-125.664 138.912-139.072 232.16-13.344 92.8 10.656 185.248 67.488 260.288 117.856 155.584 341.792 187.424 499.328 70.848 57.024-42.24 99.84-100.608 122.976-166.624l-109.984 42.944c-16.416 6.368-35.008-1.696-41.44-18.176s1.728-35.008 18.176-41.44l161.856-63.2c3.808-1.472 7.744-2.208 11.616-2.208 0.544 0 1.024 0.192 1.568 0.224 1.216-0.128 2.432-0.64 3.648-0.64 13.12 0 25.472 8.16 30.112 21.248l57.632 161.184c5.984 16.672-2.688 35.008-19.328 40.928z" />
|
||||
<glyph unicode="" glyph-name="qrcode1" d="M419.2 736v-256h-256v256h256M419.2 800h-256c-35.2 0-64-28.8-64-64v-256c0-35.2 28.8-64 64-64h256c35.2 0 64 28.8 64 64v256c0 35.2-28.8 64-64 64zM899.2 736v-256h-256v256h256M899.2 800h-256c-35.2 0-64-28.8-64-64v-256c0-35.2 28.8-64 64-64h256c35.2 0 64 28.8 64 64v256c0 35.2-28.8 64-64 64zM419.2 288v-256h-256v256h256M419.2 352h-256c-35.2 0-64-28.8-64-64v-256c0-35.2 28.8-64 64-64h256c35.2 0 64 28.8 64 64v256c0 35.2-28.8 64-64 64zM611.2 0c-19.2 0-32 12.8-32 32v256c0 19.2 12.8 32 32 32s32-12.8 32-32v-256c0-16-16-32-32-32zM768 0c-19.2 0-32 12.8-32 32v256c0 19.2 12.8 32 32 32s32-12.8 32-32v-256c0-16-16-32-32-32zM931.2 0c-19.2 0-32 12.8-32 32v256c0 19.2 12.8 32 32 32s32-12.8 32-32v-256c0-16-16-32-32-32z" />
|
||||
<glyph unicode="" glyph-name="profile1" d="M768 512c0 160-128 288-288 288s-288-128-288-288c0-108.8 57.6-201.6 147.2-249.6-121.6-48-214.4-153.6-240-288-3.2-16 6.4-35.2 25.6-38.4h3.2c16 0 28.8 9.6 32 25.6 28.8 150.4 160 259.2 313.6 262.4h6.4c160 0 288 128 288 288zM256 512c0 124.8 99.2 224 224 224s224-99.2 224-224c0-121.6-99.2-220.8-220.8-224h-9.6c-121.6 3.2-217.6 102.4-217.6 224zM896 192h-256c-19.2 0-32-12.8-32-32v-192c0-19.2 12.8-32 32-32h256c19.2 0 32 12.8 32 32v192c0 16-12.8 32-32 32zM864 0h-192v128h192v-128zM736 32h32c19.2 0 32 12.8 32 32s-12.8 32-32 32h-32c-19.2 0-32-12.8-32-32s16-32 32-32z" />
|
||||
<glyph unicode="" glyph-name="home1" d="M96 416c-9.6 0-19.2 3.2-25.6 12.8-12.8 12.8-9.6 35.2 3.2 44.8l377.6 310.4c35.2 25.6 86.4 25.6 118.4 0l377.6-307.2c12.8-9.6 16-32 3.2-44.8s-32-16-44.8-3.2l-374.4 300.8c-9.6 6.4-28.8 6.4-38.4 0l-377.6-307.2c-6.4-6.4-12.8-6.4-19.2-6.4zM816-32h-208c-19.2 0-32 12.8-32 32v150.4c0 22.4-38.4 44.8-67.2 44.8s-64-19.2-64-44.8v-150.4c0-19.2-12.8-32-32-32h-201.6c-48 0-83.2 35.2-83.2 80v304c0 19.2 12.8 32 32 32s32-12.8 32-32v-304c0-9.6 6.4-16 19.2-16h172.8v118.4c0 64 67.2 108.8 128 108.8s131.2-44.8 131.2-108.8v-118.4h176c9.6 0 16 0 16 19.2v300.8c0 19.2 12.8 32 32 32s32-12.8 32-32v-304c-3.2-48-35.2-80-83.2-80z" />
|
||||
<glyph unicode="" glyph-name="homefill" d="M947.2 473.6l-374.4 307.2c-32 25.6-86.4 25.6-118.4 0l-377.6-310.4c-12.8-6.4-16-22.4-9.6-35.2 3.2-12.8 16-19.2 28.8-19.2h32v-364.8c0-48 35.2-83.2 83.2-83.2h204.8c19.2 0 32 12.8 32 32v147.2c0 22.4 35.2 44.8 64 44.8s67.2-22.4 67.2-44.8v-147.2c0-19.2 12.8-32 32-32h208c48 0 80 32 80 83.2v364.8h32c12.8 0 25.6 9.6 28.8 22.4s0 25.6-12.8 35.2z" />
|
||||
<glyph unicode="" glyph-name="roundaddfill" d="M828.704 699.424c-84.608 84.192-197.056 130.56-316.704 130.56s-232.128-46.368-316.736-130.56c-84.64-84.224-131.264-196.256-131.264-315.424 0-119.2 46.624-231.2 131.232-315.424 84.608-84.192 197.088-130.56 316.736-130.56s232.128 46.368 316.704 130.56c84.672 84.256 131.296 196.288 131.264 315.456 0.032 119.168-46.56 231.168-131.232 315.392zM736 352h-192v-192c0-17.696-14.336-32-32-32s-32 14.304-32 32v192h-192c-17.664 0-32 14.336-32 32s14.336 32 32 32h192v192c0 17.664 14.336 32 32 32s32-14.336 32-32v-192h192c17.696 0 32-14.336 32-32s-14.304-32-32-32z" />
|
||||
<glyph unicode="" glyph-name="roundadd" d="M512-62.016c-119.648 0-232.128 46.368-316.736 130.56-84.64 84.256-131.264 196.256-131.264 315.456 0 119.168 46.624 231.2 131.232 315.424 84.608 84.192 197.088 130.56 316.736 130.56s232.128-46.368 316.704-130.56c84.672-84.224 131.264-196.256 131.264-315.392 0.032-119.2-46.592-231.232-131.264-315.456-84.544-84.192-197.024-130.592-316.672-130.592zM512 766.016c-102.624 0-199.072-39.744-271.584-111.936-72.48-72.128-112.416-168.064-112.416-270.080s39.904-197.952 112.384-270.048c72.512-72.192 168.96-111.936 271.584-111.936 102.592 0 199.072 39.744 271.584 111.936 72.48 72.16 112.416 168.064 112.384 270.080 0 102.016-39.904 197.92-112.384 270.016-72.48 72.192-168.96 111.968-271.552 111.968zM736 416h-192v192c0 17.664-14.336 32-32 32s-32-14.336-32-32v-192h-192c-17.664 0-32-14.336-32-32s14.336-32 32-32h192v-192c0-17.696 14.336-32 32-32s32 14.304 32 32v192h192c17.696 0 32 14.336 32 32s-14.304 32-32 32z" />
|
||||
<glyph unicode="" glyph-name="fuxuankuang" d="M768 768h-512c-70.4 0-128-57.6-128-128v-512c0-70.4 57.6-128 128-128h512c70.4 0 128 57.6 128 128v512c0 70.4-57.6 128-128 128zM832 128c0-35.2-28.8-64-64-64h-512c-35.2 0-64 28.8-64 64v512c0 35.2 28.8 64 64 64h512c35.2 0 64-28.8 64-64v-512z" />
|
||||
<glyph unicode="" glyph-name="wefill" d="M768 163.2c-6.4 0-12.8 3.2-19.2 6.4-12.8 9.6-16 32-6.4 44.8 38.4 48 57.6 105.6 57.6 166.4 0 64-25.6 128-70.4 176-12.8 12.8-9.6 32 3.2 44.8s32 9.6 44.8-3.2c54.4-60.8 86.4-140.8 86.4-220.8 0-73.6-25.6-147.2-73.6-204.8-3.2-6.4-12.8-9.6-22.4-9.6zM275.2 163.2c-9.6 0-16 3.2-22.4 9.6-57.6 57.6-92.8 134.4-92.8 214.4s32 156.8 92.8 214.4c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8c-44.8-48-73.6-108.8-73.6-169.6s25.6-121.6 73.6-169.6c12.8-12.8 12.8-32 0-44.8-6.4-6.4-12.8-9.6-22.4-9.6zM224 0c-6.4 0-16 3.2-22.4 6.4l-48 48c-76.8 92.8-121.6 208-121.6 329.6s44.8 240 124.8 329.6c16 16 28.8 32 44.8 44.8 16 9.6 35.2 9.6 48-3.2s9.6-32-3.2-44.8c-16-12.8-28.8-25.6-41.6-41.6-70.4-76.8-108.8-179.2-108.8-284.8s38.4-204.8 105.6-284.8c12.8-16 25.6-28.8 41.6-41.6 12.8-12.8 16-32 3.2-44.8-3.2-6.4-12.8-12.8-22.4-12.8zM800 0c-9.6 0-16 3.2-22.4 9.6-12.8 12.8-12.8 32 0 44.8 28.8 28.8 54.4 54.4 64 67.2 57.6 76.8 86.4 166.4 86.4 262.4 0 102.4-35.2 201.6-99.2 278.4-16 19.2-32 35.2-51.2 51.2-12.8 12.8-16 32-3.2 44.8s32 16 44.8 3.2c22.4-19.2 41.6-38.4 57.6-57.6 73.6-89.6 115.2-201.6 115.2-320 0-108.8-35.2-211.2-99.2-297.6-16-22.4-51.2-57.6-70.4-76.8-6.4-6.4-12.8-9.6-22.4-9.6zM672 489.6c-19.2 16-44.8 25.6-70.4 22.4s-48-16-64-35.2l-25.6-32-25.6 32c-32 41.6-92.8 48-134.4 12.8-19.2-16-32-41.6-32-67.2-3.2-25.6 6.4-51.2 22.4-73.6l96-118.4c19.2-22.4 44.8-35.2 70.4-35.2h3.2c28.8-3.2 57.6 12.8 76.8 35.2l96 118.4c32 41.6 25.6 105.6-12.8 140.8z" />
|
||||
<glyph unicode="" glyph-name="sort" d="M384 576h512c17.696 0 32 14.336 32 32s-14.304 32-32 32h-512c-17.664 0-32-14.336-32-32s14.336-32 32-32zM896 416h-512c-17.664 0-32-14.336-32-32s14.336-32 32-32h512c17.696 0 32 14.336 32 32s-14.304 32-32 32zM896 192h-512c-17.664 0-32-14.304-32-32s14.336-32 32-32h512c17.696 0 32 14.304 32 32s-14.304 32-32 32zM128 608c0 35.346 28.654 64 64 64s64-28.654 64-64v0c0-35.346-28.654-64-64-64s-64 28.654-64 64v0zM128 384c0 35.346 28.654 64 64 64s64-28.654 64-64v0c0-35.346-28.654-64-64-64s-64 28.654-64 64v0zM128 160c0 35.346 28.654 64 64 64s64-28.654 64-64v0c0-35.346-28.654-64-64-64s-64 28.654-64 64v0z" />
|
||||
<glyph unicode="" glyph-name="repair" d="M816.672-41.344c-8.192 0-16.384 3.136-22.624 9.376l-213.952 213.952c-12.512 12.512-12.512 32.736 0 45.248s32.736 12.512 45.248 0l191.328-191.328 33.408 33.376-190.848 190.848c-12.512 12.512-12.512 32.736 0 45.248s32.736 12.512 45.248 0l213.472-213.472c6.016-6.016 9.376-14.112 9.376-22.624s-3.36-16.64-9.376-22.624l-78.656-78.624c-6.272-6.24-14.464-9.376-22.624-9.376zM590.752 768c0 0.032 0 0.064 0 0.064 1.472 4.16 2.048 8.352 1.792 12.512 0 0 0 0 0 0s-0.032 0.064-0.032 0.096c-0.256 4.128-1.312 8.096-3.104 11.776-0.352 0.704-0.896 1.248-1.28 1.92-1.632 2.848-3.456 5.472-5.952 7.712-0.928 0.864-2.080 1.376-3.136 2.112-1.92 1.376-3.616 3.008-5.888 3.968-0.608 0.256-1.248 0.384-1.888 0.608-0.032 0-0.064 0.032-0.096 0.032-114.144 46.624-243.808 20.704-331.072-66.592-0.768-0.736-1.056-1.792-1.76-2.624-0.864-0.704-1.888-0.992-2.688-1.792l-161.984-161.344c-6.016-6.016-9.408-14.144-9.408-22.656s3.36-16.64 9.376-22.656l98.304-98.304c6.016-6.016 14.144-9.376 22.624-9.376s16.64 3.36 22.624 9.376l56.032 56.032 68.192-68.224c6.24-6.24 14.432-9.376 22.624-9.376s16.384 3.136 22.624 9.376c12.512 12.48 12.512 32.736 0 45.248l-90.816 90.848c-12.512 12.512-32.736 12.512-45.248 0l-56.032-56.032-52.992 53.024 139.264 138.72c0.832 0.8 1.12 1.888 1.824 2.752 0.864 0.704 1.92 0.992 2.72 1.824 40 39.936 91.296 63.072 144.864 68.768-2.208-1.664-4.384-3.392-6.56-5.12-8.96-6.784-17.632-14.016-25.664-22.048-0.544-0.544-0.736-1.248-1.216-1.824-19.232-19.36-35.936-41.024-49.568-64.512-2.464-4.224-4.768-8.448-7.008-12.736l0.416-0.224c-12.288-24.64-12.288-53.664 0.48-78.144 1.536-2.944 3.52-5.504 5.76-7.744 0.768-0.96 1.088-2.112 1.984-2.976l70.432-70.464c6.24-6.24 14.432-9.376 22.624-9.376s16.384 3.136 22.624 9.376c12.512 12.48 12.512 32.736 0 45.248l-67.072 67.072c-2.624 6.112-2.688 13.024 0.448 18.976 0.16 0.288 0.128 0.608 0.256 0.896 1.44 2.656 2.848 5.344 4.384 7.968 11.008 18.944 24.48 36.448 40.064 52.032 4.096 4.096 8.608 7.648 12.96 11.456 30.144 25.28 67.232 40.864 106.816 43.136 0.576 0.032 1.056 0.352 1.632 0.416 3.616 0.384 7.104 1.184 10.368 2.72 0.512 0.256 0.896 0.64 1.376 0.896 3.168 1.696 6.048 3.776 8.512 6.496 0.256 0.288 0.384 0.64 0.608 0.928 2.080 2.464 4.128 4.928 5.44 8.064 0.288 0.576 0.192 1.152 0.416 1.696zM289.536-64.032c-28.384 0-56.928 6.368-82.624 18.432-9.408 4.448-16.096 13.184-17.888 23.456-1.792 10.24 1.504 20.736 8.896 28.128l88.064 88.096-33.056 33.024-87.52-87.488c-7.424-7.424-18.048-10.848-28.384-8.832-10.336 1.888-19.104 8.704-23.392 18.304-32.736 72.64-17.088 159.072 38.944 215.104 50.048 50.080 126.048 68.384 193.952 47.040l238.688 238.72c-21.28 67.712-3.648 143.264 47.040 193.952 36.128 36.16 84.256 56.064 135.456 56.064 27.264 0 54.816-5.92 79.648-17.12 9.568-4.32 16.448-13.056 18.304-23.392 1.92-10.336-1.408-20.96-8.832-28.384l-88.8-88.8 33.024-33.056 89.376 89.344c7.392 7.392 17.92 10.72 28.128 8.896 10.272-1.792 19.040-8.48 23.456-17.888 34.496-73.376 19.424-160.96-37.536-217.92-36.096-36.096-84.128-56-135.296-56-20.704 0-41.536 3.392-61.216 9.952l-237.12-237.12c22.688-68.48 5.44-145.024-46.048-196.544-36.064-36.096-84.128-55.968-135.264-55.968zM282.592 0.16c36.352-2.112 71.36 11.392 96.992 37.024 37.952 37.952 47.936 96.384 24.864 145.408-5.76 12.224-3.232 26.72 6.336 36.256l266.816 266.848c9.536 9.536 24.032 12.032 36.256 6.336 47.936-22.56 108-12.544 145.408 24.864 25.952 25.92 38.784 61.408 36.992 96.96l-72.576-72.544c-6.016-6.016-14.112-9.376-22.624-9.376v0c-8.512 0-16.64 3.36-22.624 9.376l-78.272 78.272c-12.512 12.512-12.512 32.736 0 45.248l71.040 71.040c-35.072 0.896-68.8-12.384-93.696-37.28-37.92-37.92-48.064-94.272-25.856-143.552 5.44-12.128 2.848-26.368-6.56-35.776l-267.936-267.968c-9.376-9.376-23.648-11.936-35.776-6.56-47.68 21.504-106.624 11.104-143.584-25.856-25.504-25.536-38.464-59.392-37.408-93.856l69.92 69.92c12.512 12.512 32.736 12.512 45.248 0l78.304-78.272c6.016-6.016 9.376-14.112 9.376-22.624 0-8.48-3.36-16.64-9.376-22.624l-71.264-71.264z" />
|
||||
<glyph unicode="" glyph-name="shujudaping" d="M120.406 675.469v-523.031h776.719v523.031h-776.719zM865.344 184.125h-713.25v459.656h713.25v-459.656zM706.813 516.937c-17.531 0-31.688-14.156-31.688-31.688 0-3.844 0.656-7.5 1.875-10.875l-121.313-94.313c-5.813 6.188-14.063 10.125-23.25 10.125-8.719 0-16.688-3.563-22.406-9.281l-59.625 59.625c1.781 3.938 2.813 8.438 2.813 13.031 0 17.531-14.156 31.688-31.688 31.688s-31.688-14.156-31.688-31.688c0-4.031 0.75-7.875 2.156-11.438l-74.25-61.875c-5.813 6.094-13.969 9.938-22.969 9.938-17.531 0-31.688-14.156-31.688-31.688s14.156-31.688 31.688-31.688c17.531 0 31.688 14.156 31.688 31.688 0 4.031-0.75 7.875-2.156 11.438l74.25 61.875c5.813-6.094 13.969-9.938 22.969-9.938 8.719 0 16.688 3.563 22.406 9.281l59.625-59.625c-1.781-3.938-2.813-8.438-2.813-13.031 0-17.531 14.156-31.688 31.688-31.688s31.688 14.156 31.688 31.688c0 3.844-0.656 7.5-1.875 10.875l121.406 94.313c5.813-6.188 14.063-10.125 23.25-10.125 17.531 0 31.688 14.156 31.688 31.688s-14.25 31.688-31.781 31.688zM294.688 342.656c-8.719 0-15.844 7.125-15.844 15.844s7.125 15.844 15.844 15.844c8.719 0 15.844-7.125 15.844-15.844s-7.031-15.844-15.844-15.844zM421.531 437.719c-8.719 0-15.844 7.125-15.844 15.844s7.125 15.844 15.844 15.844 15.844-7.125 15.844-15.844-7.125-15.844-15.844-15.844zM532.531 342.656c-8.719 0-15.844 7.125-15.844 15.844s7.125 15.844 15.844 15.844 15.844-7.125 15.844-15.844-7.125-15.844-15.844-15.844zM706.813 469.406c-8.719 0-15.844 7.125-15.844 15.844s7.125 15.844 15.844 15.844c8.719 0 15.844-7.125 15.844-15.844s-7.031-15.844-15.844-15.844zM593.938 136.594l33.656-95.063h-253.594l33.656 95.063h-33.469l-47.719-126.844h348.75l-47.719 126.844h-33.563zM849.5 627.937h-681.563v-15.844h681.563v15.844z" />
|
||||
<glyph unicode="" glyph-name="xiangxia1" d="M163.397 606.831c-40.578 0-66.525-54.185-35.441-85.258l349.262-349.278c20.032-20.032 49.824-20.032 69.854 0l349.274 349.278c30.305 30.294 6.678 85.258-34.929 85.258h-698.021zM959.524 37.208" />
|
||||
<glyph unicode="" glyph-name="xiangyou" d="M289.169 35.397c0-40.578 54.185-66.525 85.258-35.441l349.278 349.262c20.032 20.032 20.032 49.824 0 69.854l-349.278 349.274c-30.294 30.305-85.258 6.678-85.258-34.929v-698.021zM858.792 831.524" />
|
||||
<glyph unicode="" glyph-name="dian" d="M352 384c0-88.366 71.634-160 160-160s160 71.634 160 160v0c0 88.366-71.634 160-160 160s-160-71.634-160-160v0z" />
|
||||
<glyph unicode="" glyph-name="search_list_light" d="M953.6 100.267l-145.067 192c53.333 44.8 89.6 113.067 89.6 187.733-2.133 136.533-110.933 245.333-247.467 245.333-134.4 0-245.333-108.8-245.333-245.333s110.933-245.333 245.333-245.333c44.8 0 85.333 12.8 121.6 32v-2.133l145.067-192c4.267-6.4 10.667-8.533 17.067-8.533 4.267 0 8.533 2.133 12.8 4.267 10.667 8.533 12.8 23.467 6.4 32zM448 480c0 110.933 91.733 202.667 202.667 202.667s202.667-91.733 202.667-202.667-91.733-202.667-202.667-202.667-202.667 91.733-202.667 202.667zM128 618.667h192c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333h-192c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333zM128 405.333c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h128c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333h-128zM467.2 194.133h-341.333c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h341.333c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333z" />
|
||||
<glyph unicode="" glyph-name="round_list_light" d="M512 832c-247.467 0-448-200.533-448-448s200.533-448 448-448 448 200.533 448 448-200.533 448-448 448zM512-21.333c-224 0-405.333 181.333-405.333 405.333s181.333 405.333 405.333 405.333 405.333-181.333 405.333-405.333-181.333-405.333-405.333-405.333zM746.667 554.667h-298.667c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h298.667c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333zM277.333 533.333c0-23.564 19.103-42.667 42.667-42.667s42.667 19.103 42.667 42.667v0c0 23.564-19.103 42.667-42.667 42.667s-42.667-19.103-42.667-42.667v0zM746.667 405.333h-298.667c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h298.667c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333zM277.333 384c0-23.564 19.103-42.667 42.667-42.667s42.667 19.103 42.667 42.667v0c0 23.564-19.103 42.667-42.667 42.667s-42.667-19.103-42.667-42.667v0zM746.667 256h-298.667c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h298.667c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333zM277.333 234.667c0-23.564 19.103-42.667 42.667-42.667s42.667 19.103 42.667 42.667v0c0 23.564-19.103 42.667-42.667 42.667s-42.667-19.103-42.667-42.667v0z" />
|
||||
<glyph unicode="" glyph-name="star-fill" d="M752-43.2c-9.6 0-20.8 3.2-30.4 8l-208 104-209.6-104c-20.8-11.2-48-9.6-67.2 4.8s-30.4 40-25.6 64l43.2 224-164.8 153.6c-17.6 17.6-24 44.8-17.6 67.2 8 24 27.2 41.6 52.8 44.8l228.8 41.6 102.4 208c11.2 22.4 33.6 36.8 57.6 36.8s48-14.4 57.6-36.8l102.4-208 228.8-40c24-3.2 44.8-20.8 51.2-44.8 8-24 1.6-49.6-16-67.2l-164.8-155.2 41.6-224c4.8-25.6-6.4-49.6-25.6-64-9.6-8-22.4-12.8-36.8-12.8z" />
|
||||
<glyph unicode="" glyph-name="rate" d="M959.008 489.984l-308 47.008-139.008 295.008-139.008-295.008-308-47.008 223.008-228-52.992-324 276.992 152.992 276.992-152.992-52.992 324zM512 156l-208-116.992 40 235.008-179.008 182.016 242.016 32 104.992 224 104-224 240.992-34.016-176.992-180.992 36.992-235.008z" />
|
||||
<glyph unicode="" glyph-name="move-up" d="M704 384v-384h64v384h160l-192 192-192-192zM64 704h96v-64h-96v64zM192 704h96v-64h-96v64zM320 704h64v-96h-64v96zM64 480h64v-96h-64v96zM160 448h96v-64h-96v64zM288 448h96v-64h-96v64zM64 608h64v-96h-64v96zM320 576h64v-96h-64v96zM320 192v-192h-192v192h192zM384 256h-320v-320h320v320z" />
|
||||
<glyph unicode="" glyph-name="move-down" d="M768 192v384h-64v-384h-160l192-192 192 192zM320 640v-192h-192v192h192zM384 704h-320v-320h320v320zM64 256h96v-64h-96v64zM192 256h96v-64h-96v64zM320 256h64v-96h-64v96zM64 32h64v-96h-64v96zM160 0h96v-64h-96v64zM288 0h96v-64h-96v64zM64 160h64v-96h-64v96zM320 128h64v-96h-64v96z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 60 KiB |
BIN
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/dtreefont.ttf
Normal file
BIN
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/dtreefont.ttf
Normal file
Binary file not shown.
BIN
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/dtreefont.woff
Normal file
BIN
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/dtreefont.woff
Normal file
Binary file not shown.
283
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/icons.json
Normal file
283
WaterCloud.Web/wwwroot/js/lay-module/dtree/font/icons.json
Normal file
@@ -0,0 +1,283 @@
|
||||
{
|
||||
"data": [{
|
||||
"cls": "dtree-icon-xiangxia1",
|
||||
"uncode": "e771"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-xiangyou",
|
||||
"uncode": "e78f"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-jian",
|
||||
"uncode": "e656"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-jia",
|
||||
"uncode": "e657"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-weibiaoti5",
|
||||
"uncode": "e618"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-wenjianjiazhankai",
|
||||
"uncode": "e60e"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-dian",
|
||||
"uncode": "e7a5"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-yonghu",
|
||||
"uncode": "e603"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-fenzhijigou",
|
||||
"uncode": "e658"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-fenguangbaobiao",
|
||||
"uncode": "e655"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-xinxipilu",
|
||||
"uncode": "e620"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-shuye1",
|
||||
"uncode": "e61e"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-caidan_xunzhang",
|
||||
"uncode": "e68e"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-normal-file",
|
||||
"uncode": "e60c"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-roundclose",
|
||||
"uncode": "e65c"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-bianji",
|
||||
"uncode": "e602"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-roundadd",
|
||||
"uncode": "e6d9"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-fuxuankuangxuanzhong",
|
||||
"uncode": "e652"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-fuxuankuang",
|
||||
"uncode": "e6f2"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-fuxuankuang-banxuan",
|
||||
"uncode": "e607"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-search_list_light",
|
||||
"uncode": "e807"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-move-up",
|
||||
"uncode": "ea47"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-move-down",
|
||||
"uncode": "ea48"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-delete1",
|
||||
"uncode": "e640"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-refresh",
|
||||
"uncode": "e6a4"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-roundcheckfill",
|
||||
"uncode": "e659"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-roundclosefill",
|
||||
"uncode": "e65b"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-roundcheck",
|
||||
"uncode": "e65a"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-pulldown",
|
||||
"uncode": "e6a0"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-pullup",
|
||||
"uncode": "e6a1"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-set-sm",
|
||||
"uncode": "e621"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-rate",
|
||||
"uncode": "e833"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-jian1",
|
||||
"uncode": "e600"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-jia1",
|
||||
"uncode": "e601"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-shijian",
|
||||
"uncode": "e606"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-check",
|
||||
"uncode": "e645"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-close",
|
||||
"uncode": "e646"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-favorfill",
|
||||
"uncode": "e64b"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-favor",
|
||||
"uncode": "e64c"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-roundrightfill",
|
||||
"uncode": "e65d"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-roundright",
|
||||
"uncode": "e65e"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-samefill",
|
||||
"uncode": "e671"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-same",
|
||||
"uncode": "e672"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-qrcode1",
|
||||
"uncode": "e6b0"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-profile1",
|
||||
"uncode": "e6b7"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-home1",
|
||||
"uncode": "e6b8"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-homefill",
|
||||
"uncode": "e6bb"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-roundaddfill",
|
||||
"uncode": "e6d8"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-wefill",
|
||||
"uncode": "e6f5"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-sort",
|
||||
"uncode": "e701"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-round_list_light",
|
||||
"uncode": "e82b"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-search2",
|
||||
"uncode": "e615"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-close1",
|
||||
"uncode": "1006"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-close-fill",
|
||||
"uncode": "1007"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-chart-screen",
|
||||
"uncode": "e62a"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-star",
|
||||
"uncode": "e608"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-ok-circle",
|
||||
"uncode": "1005"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-add-circle",
|
||||
"uncode": "e61f"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-about",
|
||||
"uncode": "e623"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-circle1",
|
||||
"uncode": "e687"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-radio",
|
||||
"uncode": "e688"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-star-fill",
|
||||
"uncode": "e832"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-shujudaping",
|
||||
"uncode": "e742"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-share3",
|
||||
"uncode": "e641"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-youjian",
|
||||
"uncode": "e642"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-repair",
|
||||
"uncode": "e738"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-evaluate",
|
||||
"uncode": "e674"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-like",
|
||||
"uncode": "e66c"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-layim-theme",
|
||||
"uncode": "e61b"
|
||||
},
|
||||
{
|
||||
"cls": "dtree-icon-xiangmuxiaoxi",
|
||||
"uncode": "e60f"
|
||||
}
|
||||
]
|
||||
}
|
||||
332
WaterCloud.Web/wwwroot/js/lay-module/dtree/开发者日志.txt
Normal file
332
WaterCloud.Web/wwwroot/js/lay-module/dtree/开发者日志.txt
Normal file
@@ -0,0 +1,332 @@
|
||||
大改》 修复 》 优化 》 新增 》 更新 》 移除
|
||||
基础属性 》 checkbar属性 》 menubar属性 》 toolbar属性 》 iframe属性 》 基础方法 》 内置方法
|
||||
|
||||
------------------------v2.5.8(2020/?/?)【优化】:------------------------
|
||||
【修复】toolbar模块修复:默认编辑页面中,提交失败的问题。
|
||||
【修复】menubar模块修复:点击收缩节点按钮导致树数据节点错乱,重复加载节点的问题。
|
||||
【修复】基础数据模块修复:当复选框字段存在且传递数据为null的时候,解析失败的问题。
|
||||
【优化】异步模块优化:success回调函数现在可以存在返回值,返回的值为你重新设置的树的数据。
|
||||
【优化】toolbar模块优化:当toolbarShow设置为[]时,点击右键会出现一个白色的小框的问题。
|
||||
【优化】toolbar模块优化:点击pullup按钮导致树数据节点错乱,重复加载节点的问题。
|
||||
|
||||
|
||||
|
||||
------------------------v2.5.7(2020/01/19)【优化】:------------------------
|
||||
【修复】select模块修复:当设置默认值时,存在点击select面板后,默认值消失的问题。
|
||||
【修复】select模块修复:带复选框的下拉树设置默认值无效的问题。
|
||||
【修复】内置属性修复:修复response设置了checked和type映射却无效的问题
|
||||
【新增】内置函数新增:fuzzySearch,模糊查询,搜索节点,保留父节点。
|
||||
【优化】内置函数优化:setDisabledNodes,现支持传入单个数据、带分隔符的字符串、数组、二维数组。
|
||||
【新增】内置函数新增:setDisabledNode,设置单个节点的禁用
|
||||
【优化】内置函数优化:cancelDisabledNodes,现支持传入单个数据、带分隔符的字符串、数组、二维数组。
|
||||
【新增】内置函数新增:cancelDisabledNode,设置单个节点的取消禁用
|
||||
【优化】内置函数优化:getDisabledNodesParam,现支持传入单个数据、带分隔符的字符串、数组、二维数组。
|
||||
【优化】内置函数优化:setHideNodes,现支持传入单个数据、带分隔符的字符串、数组、二维数组。
|
||||
【新增】内置函数新增:setHideNode,设置单个节点的隐藏
|
||||
【优化】内置函数优化:cancelHideNodes,现支持传入单个数据、带分隔符的字符串、数组、二维数组。
|
||||
【新增】内置函数新增:cancelHideNode,设置单个节点的取消隐藏
|
||||
【优化】内置函数优化:getHideNodesParam,现支持传入单个数据、带分隔符的字符串、数组、二维数组。
|
||||
【优化】内置函数优化:chooseDataInit,现支持传入单个数据、带分隔符的字符串、数组、二维数组(多级复选框)。
|
||||
【新增】基础方法新增:getCheckbarJsonArrParam,获取基于返回参数的树的复选框参数,选中数据横向存储
|
||||
【新增】基础方法新增:beforeSend,异步加载发送ajax请求之前的回调
|
||||
【新增】基础方法新增:serialize,序列化json对象
|
||||
【优化】基础方法优化:success方法,新增一个入参,表示是否第一次渲染数据,并支持在增量加载时,加载子节点时也可以回调该方法。
|
||||
【优化】基础方法优化:done方法,新增一个入参,表示是否第一次渲染数据,并支持在增量加载时,在加载子节点时也可以回调该方法。
|
||||
【优化】内置方法优化:dataInit方法,仅支持一个节点改变背景色的优化。
|
||||
【优化】内置方法优化:init方法,入参新增一个异步加载完成后的回调函数,内部使用。
|
||||
【优化】内置方法优化:getChild方法,入参新增一个异步加载完成后的回调函数,内部使用。
|
||||
【优化】异步加载优化:使用data加载,也会出现load效果。
|
||||
【优化】toolbat模块优化:当设置dataFormat时,默认的增删改数据中会出现dataFormat配置的元素,优化之后仅获取文字。
|
||||
【优化】select模块优化:自适应当前组件的位置,向上或向下展开树。
|
||||
【新增】基础属性新增:asyncLoad,异步加载初始加载层级树组
|
||||
【新增】基础属性新增:selectCardHeight,树面板的高度
|
||||
【新增】内置方法新增:loadTreeInit,初始化加载树
|
||||
【新增】内置方法新增:loadChildTreeInit,初始化加载子节点
|
||||
【新增】内置方法新增:dataLoadTree,用data加载树
|
||||
【新增】内置方法新增:asyncLoadTree,异步加载树
|
||||
|
||||
|
||||
------------------------v2.5.6(2019/10/24)【新增】:------------------------
|
||||
【修复】标签属性修复:ul标签上data-value属性设置无效的问题
|
||||
【优化】数据格式:获取格式中的basicData和recordData将提前转化为JSON格式,不在需要手动转换。
|
||||
【优化】基础方法优化:render,支持加载下拉树
|
||||
【优化】基础方法优化:reload,支持重载下拉树
|
||||
【新增】基础属性新增:bak,内置属性,备份Html。
|
||||
【新增】事件监听:changeSelect,下拉树面板开闭状态改变后,触发事件。
|
||||
【新增】内置方法新增:rollbackHtml,基于备份的Html数据回滚
|
||||
【新增】内置方法新增:setDisabledAllNodes,设置全部节点为disabled
|
||||
【新增】内置方法新增:reloadSelectSetting,重新设置下拉树的基本参数
|
||||
【新增】内置方法新增:reloadSelectDom,重新渲染下拉树的Dom结构
|
||||
【新增】内置方法新增:selectCheckboxVal,设置复选框模式中的下拉树的值
|
||||
【新增】内置方法新增:getCheckbarJsonArrParam,获取基于返回参数的树的复选框参数数组
|
||||
【新增】内置方法新增:checkAllNode,复选框全选
|
||||
【新增】内置方法新增:cancelCheckedNode,取消全部复选框选中
|
||||
【新增】内置方法新增:invertCheckedNode,反选复选框
|
||||
【新增】内置方法新增:removeCheckedNode,删除选中节点
|
||||
|
||||
------------------------v2.5.5(2019/10/12)【新增】:------------------------
|
||||
【修复】内置方法修复:partialRefreshEdit,支持修改parentId后及时返显到下挂节点
|
||||
【优化】单页模式中树的缓存问题
|
||||
【优化】基础属性优化,开启line时,toolbar的fixed显示不正常
|
||||
【优化】基础属性优化,开启line时,div选中 悬停背景对齐
|
||||
【优化】基础方法优化:success方法的放置位置,可以将不同的数据格式在success方法内做转换,或添加根节点。
|
||||
【优化】iframe模块优化:将原来用iframe包住的属性提出,撤销iframe这一层。
|
||||
【优化】内置属性优化:scroll属性更名为scroll。
|
||||
【优化】内置方法优化:当异步加载出现异常时,以文字形式而非弹框形式提示。
|
||||
【新增】标签属性新增:ul标签上新增data-value属性,用于指定下拉树的初始展示值
|
||||
【新增】基础属性新增:width,设置树的宽度
|
||||
【新增】基础属性新增:select,设置树模式为下拉树
|
||||
【新增】基础属性新增:selectTips,设置下拉树时的输入框提示文字
|
||||
【新增】基础属性新增:selectInputName,设置下拉树内部表单标签的name
|
||||
【新增】基础属性新增:selectInitVal,设置下拉树的初始展示值
|
||||
【新增】基础属性新增:withCredentials,用于开启生成跨域的XHR对象,设置后可指定同源session,默认false。
|
||||
【新增】基础方法新增:set,可以增加同一次引用中,dtree的公共属性指定,所有基础属性都可以指定。
|
||||
【新增】基础方法新增:renderSelect,初始化下拉树
|
||||
【新增】基础方法新增:selectVal,设置下拉树的初始展示值
|
||||
【新增】内置方法新增:selectVal,设置下拉树的初始展示值
|
||||
【新增】内置方法新增:selectSetting,设置下拉树的初始元素
|
||||
【新增】内置方法新增:renderSelectDom,渲染下拉树的Dom结构
|
||||
【新增】内置方法新增:clickNodeCheckbar,点击节点选中复选框
|
||||
【更新】内置方法更新:getNoneDom方法,添加errText子方法,显示错误信息。
|
||||
|
||||
------------------------v2.5.4(2019/6/14)【修复】:------------------------
|
||||
【修复】内置方法中,使用data方法获取值不到的问题。
|
||||
【优化】基础属性优化:ficon,可以设置Array型数据,与icon的配置方式相同
|
||||
【优化】基础属性优化:skin,其中设置layui看起来更像layui的风格,新增laySimple风格,遵从简约版layui树形菜单。
|
||||
【优化】内置方法优化:涉及样式的一系列内置方法优化
|
||||
【新增】基础属性新增:height,调整高度,与table用法一致
|
||||
【新增】基础属性新增:response中新增ficonClass,可以指定一级图标样式。
|
||||
【新增】内置方法新增:cancelNavThis,取消选中div。
|
||||
【更新】内置方法更新:parseData:增加对ficonClass属性的解析
|
||||
【更新】内置方法更新:changeCheck,可以通过传递参数的方式传递复选框dom。
|
||||
【移除】基础属性移除:dot,移除一级图标小圆点的单独设置,改为在ficon中配置,与icon的配置方式相同
|
||||
【移除】基础属性移除:firstIconArray,与nodeIconArray合并。
|
||||
|
||||
------------------------v2.5.0(2019/6/01)【适配】:------------------------
|
||||
【适配】对layui2.5适配
|
||||
【修复】基础属性修复,error方法,现在可以正确的获取参数列表中的参数,如无定义则默认打印textStatus。
|
||||
【修复】基础属性修复,complete方法,现在可以正确的获取参数列表中的参数
|
||||
【优化】一系列内置方法优化
|
||||
【新增】基础属性新增:line,用于指定树线
|
||||
【新增】内置方法新增:showLine:用于显示树线
|
||||
【新增】内置方法新增:showLineLi:作用在单个LI显示树线
|
||||
|
||||
------------------------v2.5.0(2019/5/20)【大版本】:------------------------
|
||||
【大改】数据格式:reponse中isLast属性更换为last属性。
|
||||
【大改】数据格式:reponse中isChecked属性更换为checked属性。
|
||||
【大改】数据格式:defaultRequest中isLeaf属性更换为leaf属性。
|
||||
【大改】数据格式:defaultRequest中isChecked属性更换为checked属性。
|
||||
【大改】内置属性:record开启后,原来记录节点的全部数据(排除children和basicData)改为只记录用户自定义的数据(同样排除children和basicData)
|
||||
【修复】toolbar模块修复:自定义的toolbar的回调函数的第二个$div参数修复,现在可以取到值
|
||||
【修复】toolbar模块修复:内置函数:changeTreeNodeEdit中的title未定义的问题。
|
||||
【修复】menubar模块修复:将dtree放在form中,menubar的默认按钮单击之后会提交表单的问题。
|
||||
【修复】iframe模块修复:配置了iframeDefaultRequest时,只会显示iframeDefaultRequest中的参数的问题。
|
||||
【优化】toolbar模块优化:内置的三个按钮中的label均加上title提示
|
||||
【优化】基础方法优化:render方法和reload方法中,如果树在当前页面中被加载过一次了,再次加载会从缓存中取出树,并将树上次点击的节点作为参数记录下载,现在优化为还是从缓存中取,但是会重置上次记录的参数。
|
||||
【优化】内置函数优化:getLiItemDom 当parentId为0时组件自动判定为false从而使用内置parentId的问题。
|
||||
【新增】基础属性新增:iconfont属性,用于定义使用图标数组或string
|
||||
【新增】基础属性新增:iconfontStyle属性,用于自定义树的每个关键部位使用的图标
|
||||
【新增】基础属性新增:accordion属性,用于开启手风琴模式
|
||||
【新增】基础属性新增:contentType属性,用于可以显示配置发送信息至服务器时内容编码类型
|
||||
【新增】基础属性新增:response属性中新增disabled,标识节点禁用。
|
||||
【新增】基础属性新增:response属性中新增isHide,标识节点隐藏。
|
||||
【新增】基础属性新增:formatter属性,用于对树展示节点的文字信息格式化处理。
|
||||
【新增】基础属性新增:errDataShow属性,标识是否在递归数据出现错误后,显示错误信息。
|
||||
【新增】基础属性新增:none,用于定于树初始化未加载节点时的提示文字。
|
||||
【新增】基础属性新增:error:用于异步加载中出现异常时的用户自定义函数。
|
||||
【新增】基础属性新增:errDataShow属性,标识是否在递归数据出现错误后,显示错误信息。
|
||||
【新增】基础属性新增:drawable属性,用于开启拖拽。
|
||||
【新增】基础方法新增:getParam: 获取指定节点选中值
|
||||
【新增】基础方法新增:getAllParentParam: 获取指定节点的全部上级节点
|
||||
【新增】基础方法新增:initNoAllCheck: 复选框半选状态初始化设置
|
||||
【新增】基础方法新增:initAllCheck: 复选框选中状态初始化设置
|
||||
【新增】基础方法新增:click:模拟单击事件
|
||||
【新增】checkbar模块新增:checkbarData新增属性:"halfChoose",用于记录选中和半选中的数据
|
||||
【新增】menubar模块新增:menubar内置新增三个默认方法:checkAll:全选,unCheckAll:全不选,invertAll:反选
|
||||
【新增】toolbar模块新增:toolbar内置新增两个默认方法:pulldown:展开当前节点下的全部节点,pullup:收缩当前节点下的全部节点
|
||||
【新增】toolbar模块新增:toolbar新增属性:toolbarWay,工具栏显示方式,contextmenu:右键,follow:跟随节点,fixed:固定在节点右侧
|
||||
【新增】toolbar模块新增:toolbarBtn中新增一系列的属性(id、placeholder、verify、defElem、readonly、disabled、filter)
|
||||
【新增】toolbar模块新增:toolbarBtn中,optionsData支持使用function回调
|
||||
【新增】内置属性新增:errNode属性,记录在渲染节点时有问题的数据。
|
||||
【新增】内置属性新增:usefontStyle属性,用于最终指定树的每个关键部位使用的图标
|
||||
【新增】内置方法新增:replaceDom:替换节点的dom值,或指定值。
|
||||
【新增】内置方法新增:partialRefreshAdd:局部刷新树--当前节点新增子节点时
|
||||
【新增】内置方法新增:partialRefreshEdit:局部刷新树--当前节点选中时
|
||||
【新增】内置方法新增:partialRefreshDel:局部刷新树--当前节点选中被删除时
|
||||
【新增】内置方法新增:ensureTheme:确认最终主题。
|
||||
【新增】内置方法新增:useDefaultOrUserDefineFnodeStyle:赋值一级图标
|
||||
【新增】内置方法新增:useDefaultOrUserDefineSnodeStyle:赋值二级图标
|
||||
【新增】内置方法新增:useDefaultOrUserDefineCheckboxStyle:赋值复选框图标
|
||||
【新增】内置方法新增:useDefaultOrUserDefineMenubarStyle:赋值菜单栏图标
|
||||
【新增】内置方法新增:useDefaultOrUserDefineMenubarExtStyle:赋值扩展菜单栏图标
|
||||
【新增】内置方法新增:useDefaultOrUserDefineToolbarStyle:赋值扩展菜单栏图标
|
||||
【新增】内置方法新增:useDefaultOrUserDefineToolbarExtStyle:赋值扩展工具栏图标
|
||||
【新增】内置方法新增:operateIcon: 设置图标的展开关闭,以及展开时/关闭时是最后一级图标的处理
|
||||
【新增】内置方法新增:msgErrNode: 判断在数据加载时是否存在错误数据,并是否打印错误数据
|
||||
【新增】内置方法新增:getParam: 获取指定节点选中值
|
||||
【新增】内置方法新增:getAllParentParam: 获取指定节点的全部上级节点
|
||||
【新增】内置方法新增:getNodeDom: 根据具体的id获取基于当前id的div以及对应的其他dom元素
|
||||
【新增】内置方法新增:getNode: 获取指定节点Div
|
||||
【新增】内置方法新增:accordionUL: 开启手风琴模式时对其他节点的处理
|
||||
【新增】内置方法新增:setDisabledNodes: 设置节点为disabled
|
||||
【新增】内置方法新增:cancelDisabledNodes:将节点的disabled取消
|
||||
【新增】内置方法新增:getDisabledNodesParam: 获取指定disabled节点的值
|
||||
【新增】内置方法新增:getAllDisabledNodesParam: 获取全部disabled节点的值
|
||||
【新增】内置方法新增:setHideNodes: 设置节点为hide
|
||||
【新增】内置方法新增:cancelHideNodes: 将节点的hide取消
|
||||
【新增】内置方法新增:getHideNodesParam: 获取指定hide节点的值
|
||||
【新增】内置方法新增:getAllHideNodesParam: 获取全部hide节点的值
|
||||
【新增】内置方法新增:toolbarHide:隐藏toolbar
|
||||
【新增】内置方法新增:toolbarMethod:toolbar内置方法
|
||||
【新增】内置方法新增:toolbarListener:toolbar内置监听
|
||||
【新增】内置方法新增:getNowNodeOrNull:获取当前选中div,没有选中则为null
|
||||
【新增】内置方法新增:navThis:选中div
|
||||
【新增】内置方法新增:getNoneDom:当无节点数据时显示dom信息
|
||||
【新增】内置方法新增:dynamicToolbarDom:在节点后动态绑定fixed和follow条件的工具栏
|
||||
【更新】内置方法更新:setToolbarDom,设置工具栏按钮,现在区别开来哪种toolbar的创建方式
|
||||
【更新】内置方法更新:changeTreeNodeAdd新增一个回传参数:refresh,用于新增完成后,局部刷新
|
||||
【更新】内置方法更新:parseData新增一个回传参数:fmtTitle,用于获取formatter标记过的内容,原来的title函数只获取原始title信息
|
||||
|
||||
|
||||
|
||||
------------------------v2.4.5_finally(2018/12/22)【修复】:------------------------
|
||||
1.【修复】单页应用中,未开启toolbar导致body上的所有事件失效。
|
||||
2.【优化】更新dist文件夹中的dtree压缩
|
||||
3.【优化】toolbar模块优化:新增节点时,当开启了record参数时不会将参数新增到节点上的问题。
|
||||
|
||||
|
||||
------------------------v2.4.5_finally(2018/12/21)【优化】:------------------------
|
||||
1.【优化】menubar模块优化:点击收缩时,当前页的所有树都收缩的问题。
|
||||
2.【优化】menubar模块优化:点击删除复选框时,展开和收缩节点会报错,现在改为删除的节点如果有子集的话,子集会一并删除,但是回调函数中只会提供你勾中的数据。
|
||||
3.【优化】基础方法优化:dataInit方法回显数据时,当前选中的数据无法被获取到的问题。
|
||||
4.【优化】基础方法优化:parseData方法的basicData()方法,basicData如果未指定,前端的该项属性无数据,而不是""
|
||||
5.【优化】异步属性优化:使用data加载时,可以允许指定的data为[]。
|
||||
6.【优化】异步属性优化:使用data加载时,现在也有success和done的回调
|
||||
7.【新增】checkbar模块新增:checkbarType新增属性:"only",用于模拟单选,只能同时选择一个复选框。
|
||||
8.【新增】异步回调方法新增:新增success回调,用于数据加载完毕后的回调,在done之前执行
|
||||
9.【新增】异步属性新增:filterRequest属性,用于过滤树自动发起的请求中你不需要的参数。
|
||||
10.【新增】基础属性新增:record属性,开启数据记录模式,用于记录用户提供的JSON数据串中,指定当前节点的JSON数据(排除basicData字段和children字段)
|
||||
11.【新增】基础属性新增:load属性,是否开启加载遮罩。
|
||||
12.【新增】内置函数新增:getFilterRequestParam,获取filterParam过滤后的requestParam
|
||||
|
||||
------------------------v2.4.5_finally_beta(2018/12/07)【大改】:------------------------
|
||||
0.【新增】提供的内容中新增dist/dtree.js压缩js文件。
|
||||
1.【大改】css:css样式均加上dtree前缀。
|
||||
2.【大改】图标:iconfont更改为dtreefont。
|
||||
3.【大改】事件监听:图标点击事件返回的参数改为一个JSON对象,具体查看基础文档的事件监听。
|
||||
4.【大改】事件监听:节点点击事件返回的参数改为一个JSON对象,具体查看基础文档的事件监听。
|
||||
5.【大改】事件监听:节点双击事件返回的参数改为一个JSON对象,具体查看基础文档的事件监听。
|
||||
6.【大改】事件监听:复选框点击事件返回的参数改为一个JSON对象,具体查看基础文档的事件监听。
|
||||
7.【大改】事件监听:iframe加载完毕事件返回的参数改为一个JSON对象,具体查看基础文档的事件监听。
|
||||
8.【新增】基础方法新增:getChildParam,获取全部下级节点
|
||||
9.【新增】menubar模块新增:menubarTips属性,用于指定menubar的依附方式。
|
||||
10.【新增】toolbar模块新增:toolbarFun新增loadToolbarBefore函数,用于呈现右键菜单之前调用的函数。
|
||||
11.【新增】内置函数新增:initTreePlus 用于初始化菜单栏和工具栏的div。
|
||||
12.【新增】内置函数新增:openTreePlus 用于开启工具栏和菜单栏。
|
||||
13.【新增】内置函数新增:getMenubarDom 用于获取菜单栏。
|
||||
14.【新增】内置函数新增:getExtMenubarDom 用于获取扩展菜单栏。
|
||||
15.【新增】内置函数新增:getMenubarToolDom 用于获取依附在工具栏的菜单栏。
|
||||
16.【新增】内置函数新增:getExtMenubarToolDom 用于获取依附在工具栏的扩展菜单栏。
|
||||
17.【新增】内置函数新增:menubarMethod 用于menubar内置调用方法。
|
||||
17.【新增】内置函数新增:menubarListener 用于menubar内置监听。
|
||||
18.【新增】内置函数新增:setToolbarDom 用于设置工具栏按钮。
|
||||
19.【新增】内置函数新增:unbindBrowserEvent 用于解绑浏览器事件。
|
||||
19.【新增】内置属性新增:response属性中新增spread。
|
||||
20.【优化】优化了图标显示。
|
||||
21.【优化】toolbar模块:单页应用中,右键菜单的显示位置问题。
|
||||
22.【优化】menubar模块:在开启了toolbar模块时按钮点击失效的问题。
|
||||
23.【优化】iframe模块:iframeuUrl指定了"?"时,实际发送的url会出现两个"?"的问题。
|
||||
23.【优化】数据格式:默认数据格式中非必须指定isLast属性,移除level属性的作用。
|
||||
24.【修复】数据格式:在开启了list风格参数时,修复必须指定isLast返回的问题和设置initLevel无效的问题。
|
||||
25.【修复】toolbar模块:新增节点返回json格式后显示数据未定义的问题。
|
||||
26.【移除】内置函数移除:refreshTree,现放置在menubarMethod方法中。
|
||||
27.【移除】内置函数移除:openAllNode,现放置在menubarMethod方法中。
|
||||
28.【移除】内置函数移除:closeAllNode,现放置在menubarMethod方法中。
|
||||
28.【移除】内置函数移除:loadChildTree。
|
||||
29.【移除】内置函数移除:openMenubar。
|
||||
30.【移除】内置函数移除:openToolbar。
|
||||
31.【移除】内置属性移除:level。
|
||||
32.【移除】内置属性移除:response属性中移除level。
|
||||
|
||||
|
||||
------------------------v2.4.5(2018/11/30)【修复】:------------------------
|
||||
1.【修复】基础方法修复:dataInit方法的返回数据异常。
|
||||
2.【修复】基础方法修复:render函数自动识别是否重载树,代码再次修复(针对单页应用)。
|
||||
3.【新增】内置函数新增:refreshTree,用于刷新树。
|
||||
4.【新增】内置函数新增:parseData 用于解析数据。
|
||||
5.【优化】checkbar模块:checkArr属性支持传递字符串。
|
||||
6.【修复】toolbar模块:拼接新增节点内容的代码异常 。
|
||||
|
||||
------------------------v2.4.5(2018/11/25)【修复】:------------------------
|
||||
1.【修复】render函数自动识别是否重载树,代码修复。
|
||||
2.【修复】内部代码bug。
|
||||
3.【优化】修改了右键菜单弹出的动画效果。
|
||||
|
||||
------------------------v2.4.5(2018/11/25)【新增】:------------------------
|
||||
1.【优化】优化了图标显示。
|
||||
2.【新增】内置图标新增。
|
||||
3.【新增】ficon属性:用于用户自定义一级图标
|
||||
4.【新增】firstIconArray属性:用于用户自定义扩展一级图标
|
||||
5.【新增】异步加载模块添加headers属性。
|
||||
6.【新增】toolbar模块:新增属性toolbarExt,用于自定义扩展工具栏右键菜单按钮
|
||||
7.【新增】checkbar模块:新增checkbarFun中的回调方法:chooseBefore,用于复选框点击前回调
|
||||
8.【新增】内置函数新增:changeCheck,用于改变复选框状态。
|
||||
9.【优化】render函数自动识别是否重载树。
|
||||
10.【优化】内部代码优化。
|
||||
11.【更新】更新了帮助文档
|
||||
|
||||
------------------------v2.4.5(2018/11/23)【修复】:------------------------
|
||||
1.【修复】toolbar模块点击删除按钮时,控制台报错。
|
||||
2.【修复】配置了dot:false时,toolbar模块新增节点后一级图标不显示的问题。
|
||||
3.【修复】内置函数优化:initNoAllCheck,修复了显示bug
|
||||
4.【新增】内置函数新增:initAllCheck,复选框选中状态初始化设置
|
||||
5.【新增】内置函数新增:checkStatus,设置复选框选中/未选中/半选
|
||||
6.【优化】toolbar模块:点击删除时,当删除了某个节点下的最后一个子节点,那该节点也会改变样式变成叶子节点。
|
||||
7.【优化】toolbar模块:addTreeNode方法优化,ajax请求不限于同步,方法无需返回
|
||||
8.【新增】内置函数新增:changeTreeNodeAdd,新增节点后改变节点内容
|
||||
9.【优化】toolbar模块:editTreeNode方法优化,ajax请求不限于同步,方法无需返回
|
||||
10.【新增】内置函数新增:changeTreeNodeEdit,编辑节点后改变节点内容
|
||||
11.【优化】toolbar模块:delTreeNode方法优化,ajax请求不限于同步,方法无需返回
|
||||
12.【新增】内置函数新增:changeTreeNodeDel,删除节点后改变节点内容
|
||||
13.【优化】toolbar模块:editTreeLoad方法优化,ajax请求不限于同步,方法无需返回
|
||||
14.【新增】内置函数新增:changeTreeNodeDone,编辑页打开后显示编辑页内容
|
||||
15.【更新】更新了帮助文档
|
||||
|
||||
------------------------v2.4.5(2018/11/22)【修复】:------------------------
|
||||
1.【修复】树重载时,使用data属性会造成数据重复加载问题。
|
||||
2.【修复】输出参数的字段,spared修改为spread(之前单词拼错了。。。。)。
|
||||
3.【新增】toolbar模块中新增属性:toolbarStyle,用于自定义toolbar的显示文字,弹框大小。
|
||||
4.【移除】基础属性中移除了addIndex属性。
|
||||
5.【新增】skin属性:用于用户自定义主题。
|
||||
6.【更新】更新了帮助文档
|
||||
|
||||
------------------------v2.4.5(2018/11/21)【修复】:------------------------
|
||||
1.【修复】使用dataFormat属性时,直接使用data属性配置节点内容失效的问题。
|
||||
2.【修复】parentId为null导致节点数据加载失效的问题。
|
||||
3.【优化】反选节点时将选中哪一级的节点展开,单选和多选均生效。
|
||||
4.【新增】dot属性,用于用户自定义一级图标中的小圆点是否显示。
|
||||
5.【更新】更新了帮助文档
|
||||
|
||||
------------------------v2.4.5(2018/11/21)【新增】:------------------------
|
||||
1.【新增】toolbar取消按钮的显示,开始绑定右键点击事件。
|
||||
2.【新增】toolbar模块新增一个属性:scroll 用于绑定树的上级div容器,让树可以显示滚动条的div容器,右键菜单绑定必填项。
|
||||
3.【新增】toolbar模块新增编辑页数据回显功能。
|
||||
4.【新增】树加载完毕后的回调函数
|
||||
5.【新增】dataStyle属性,用于用户配置layui通用的json数据风格
|
||||
6.【新增】dataFormat属性,用于用户自定义data中的数据格式(即支持传入一个大的list)
|
||||
7.【更新】更新了帮助文档
|
||||
|
||||
------------------------v2.4.5(2018/11/09)【优化】:------------------------
|
||||
1.【优化】更新了图标库,精简了图标(60个)
|
||||
|
||||
------------------------v2.4.5(2018/11/09)【初始】:------------------------
|
||||
1.【初始】基本树形展示,无限级,支持自定义修改树的展示图标
|
||||
2.【初始】支持异步/同步数据加载,支持静态数据加载,支持数据缓存
|
||||
3.【初始】支持自定义返回json格式,支持自定义异步/同步加载参数
|
||||
4.【初始】支持复选框,1-N级,支持复选框的四种选中形式,支持记录复选框选中/更改数据的回调
|
||||
5.【初始】支持工具栏,即可直接修改当前树节点,新增/ 编辑/删除等
|
||||
6.【初始】支持菜单栏,即可直接对树进行全部节点展开/收缩、删除全部选中节点、刷新树、搜索树等
|
||||
7.【初始】支持加载iframe,即点击树节点时,可以带上一个访问iframe的url,这个设计在左树右内容风格的页面极为有用
|
||||
8.【初始】支持数据回调,单击节点回调、双击节点回调、复选框选中回调、iframe加载完毕回调等
|
||||
9.【初始】支持数据获取,即获取当前选中节点数据,当前选中复选框节点数据等
|
||||
10.【初始】支持数据反显,即加载树之后将需要反显的节点高亮显示或选中
|
||||
78200
WaterCloud.Web/wwwroot/js/lay-module/echarts/echarts.js
Normal file
78200
WaterCloud.Web/wwwroot/js/lay-module/echarts/echarts.js
Normal file
File diff suppressed because it is too large
Load Diff
206
WaterCloud.Web/wwwroot/js/lay-module/flow/WaterFlow.css
Normal file
206
WaterCloud.Web/wwwroot/js/lay-module/flow/WaterFlow.css
Normal file
@@ -0,0 +1,206 @@
|
||||
v\:group,v\:rect,v\:imagedata,v\:oval,v\:line,v\:polyline,v\:stroke,v\:textbox { display:inline-block;background:transparent }
|
||||
::-ms-clear,::-ms-reveal{display:none;}
|
||||
/*总体样式*/
|
||||
.WaterFlow {
|
||||
background: #1e9fff0f;
|
||||
border: #ddd 1px solid;
|
||||
position: relative;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
border-radius: 4px;
|
||||
color: #333
|
||||
}
|
||||
.WaterFlow,.WaterFlow *{
|
||||
-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box; font-size:16px;line-height:1.42857143;
|
||||
font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, Hiragino Sans GB, WenQuanYi Micro Hei, Arial, sans-serif;
|
||||
}
|
||||
.WaterFlow:before,.WaterFlow:after,.WaterFlow *:before,.WaterFlow *:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
|
||||
.WaterFlow i{
|
||||
display:block;width:18px;height:18px;overflow:hidden;font-size:18px;color:black;text-align:center;margin:0 auto;
|
||||
filter:Alpha(Opacity=70);-moz-opacity:0.7;opacity: 0.7;text-shadow:0.5px 0 #fff,0 0.5px #fff;line-height:1;
|
||||
}
|
||||
.WaterFlow a.a_disabled,.WaterFlow a.a_disabled:hover {border:0 !important;padding:4px 6px;background: transparent !important; cursor: not-allowed !important;}
|
||||
.WaterFlow a.a_disabled i:before{color:#ccc !important;}
|
||||
/*绘图区的样式*/
|
||||
.WaterFlow_work{position:absolute;top:3px;right:3px;bottom:3px;left:3px;overflow:auto;background-color:#fff;}
|
||||
.WaterFlow_work .WaterFlow_work_inner{
|
||||
/*background: -webkit-linear-gradient(top, transparent 11px, #e3e3e3 12px),-webkit-linear-gradient(left, transparent 11px, #e3e3e3 12px);*/
|
||||
/*background: -moz-linear-gradient(top, transparent 11px, #e3e3e3 12px),-moz-linear-gradient(left, transparent 11px, #e3e3e3 12px);*/
|
||||
/*background: -o-linear-gradient(top, transparent 11px, #e3e3e3 12px),-o-linear-gradient(left, transparent 11px, #e3e3e3 12px);*/
|
||||
/*background: -ms-linear-gradient(top, transparent 11px, #e3e3e3 12px),-ms-linear-gradient(left, transparent 11px, #e3e3e3 12px);*/
|
||||
/*background: linear-gradient(top, transparent 11px, #e3e3e3 12px),linear-gradient(left, transparent 11px, #e3e3e3 12px);*/
|
||||
/*-webkit-background-size: 12px 12px; -moz-background-size: 12px 12px; background-size: 12px 12px;*/
|
||||
position:relative;overflow:hidden; background-image:url(data:image/gif;base64,R0lGODlhDAAMAJEAAOrq6v////Hx8QAAACH5BAAHAP8ALAAAAAAMAAwAAAIWjI8hycvonomSPtvkwYlDPQniSApAAQA7);
|
||||
}
|
||||
/*与矢量线有关的样式*/
|
||||
.WaterFlow_work text{color:#fff;font-size:16px;line-height:1.42857143;
|
||||
font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, Hiragino Sans GB, WenQuanYi Micro Hei, Arial, sans-serif;}
|
||||
|
||||
/*顶部栏的样式*/
|
||||
.WaterFlow_head{clear:both;height:28px;border-bottom:#00B4E1 2px solid;margin-left:-1px}
|
||||
.WaterFlow_head label{
|
||||
font-weight:bold;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:27px;padding:3px;width:176px;
|
||||
background:#00B4E1;float:left;color:#fff;border-radius:3px 0 0 0;overflow:hidden;margin:-1px 4px 0 0;text-align:center;
|
||||
}
|
||||
.WaterFlow_head_btn{display:block;border:0;height:26px;width:30px;cursor:default;padding:4px 6px;margin:0 2px;float:left;outline:none;blr:expression(this.onFocus=this.blur());text-decoration:none;cursor:pointer}
|
||||
.WaterFlow_head_btn i{display:inline-block;overflow:hidden;width:18px;height:18px;border:0;font-size:16px;line-height:18px;}
|
||||
.WaterFlow_head_btn:hover{background:#fff;padding:4px 5px;border-left:#ddd 1px solid;border-right:#ddd 1px solid}
|
||||
|
||||
/*左侧绘图工具栏的样式*/
|
||||
.WaterFlow_tool{float:left;clear:left;border-right:#ddd 1px solid;margin-left:-1px;}
|
||||
.WaterFlow_tool_div{width:34px;padding:4px 0;overflow:hidden;margin-right:-1px;}
|
||||
.WaterFlow_tool span{height:0;overflow:hidden;border-top:#ddd 1px solid;border-bottom:#fff 1px solid;margin:0 2px;clear:both;display:block;}
|
||||
.WaterFlow_tool_btn{display:block;border:0;height:34px;width:34px;cursor:default;padding:8px;outline:none;blr:expression(this.onFocus=this.blur());color:#777;text-decoration:none;cursor:pointer}
|
||||
.WaterFlow_tool_btn i{display:block;overflow:hidden;width:18px;height:18px;border:0}
|
||||
.WaterFlow_tool_btn:hover{border:#ddd 1px solid;background:#fff;padding:7px}
|
||||
.WaterFlow_tool_btndown{
|
||||
cursor:default;outline:none;blr:expression(this.onFocus=this.blur());height:34px;width:36px;margin:0 -1px;
|
||||
padding:8px 9px;background:#00B4E1;/*#FFBF00*/display:block;text-decoration:none;filter:Alpha(Opacity=70);-moz-opacity:0.7;opacity: 0.7;
|
||||
}
|
||||
.WaterFlow_tool_btndown i{display:block;overflow:hidden;width:18px;height:18px;color:#000;filter:Alpha(Opacity=37);-moz-opacity:0.37;opacity: 0.37;position:relative}
|
||||
|
||||
/*工作区扩展边栏样式*/
|
||||
.WaterFlow_extend_right{position:absolute;z-index:10002;top:0;right:0;height:100%;width:14px;cursor:e-resize;filter:Alpha(Opacity=20);-moz-opacity:0.2;opacity: 0.2}
|
||||
.WaterFlow_extend_bottom{position:absolute;z-index:10002;bottom:0;left:0;width:100%;height:14px;cursor:s-resize;filter:Alpha(Opacity=20);-moz-opacity:0.2;opacity: 0.2}
|
||||
.WaterFlow_extend_right:hover{background-color:#999;border:#fff 1px solid}
|
||||
.WaterFlow_extend_bottom:hover{background-color:#999;border:#fff 1px solid}
|
||||
|
||||
/*区域分组(泳道)的样式*/
|
||||
.WaterFlow_work_group{cursor:default;position:absolute;overflow:hidden;top:0;left:0}
|
||||
.WaterFlow_area{cursor:default;position:absolute;overflow:hidden;}
|
||||
.WaterFlow_area .lock{cursor:default;}
|
||||
.WaterFlow_area .bg{cursor:move;filter:Alpha(Opacity=30);-moz-opacity:0.3;opacity: 0.3;}
|
||||
.WaterFlow_area.lock .bg{cursor:default;}
|
||||
.WaterFlow_area label{cursor:text;top:0;left:23px;position:absolute;display:block;}
|
||||
.WaterFlow_area.lock label{cursor:default;}
|
||||
.WaterFlow_area i{top:2px;left:2px;width:18px;height:20px;position:absolute;cursor:pointer;}
|
||||
.WaterFlow_area i:before{content:"\e6bd"}
|
||||
.WaterFlow_area.area_red .bg{border:1px solid red;background-color:#FF7865}
|
||||
.WaterFlow_area.area_red label,.WaterFlow_area.area_red i{color:red;}
|
||||
.WaterFlow_area.area_yellow .bg{border:1px solid #CD925A;background-color:#FFD564}
|
||||
.WaterFlow_area.area_yellow label,.WaterFlow_area.area_yellow i{color:#FFBA1D;}
|
||||
.WaterFlow_area.area_blue .bg{border:1px solid #347BB1;background-color:#549CDE}
|
||||
.WaterFlow_area.area_blue label,.WaterFlow_area.area_blue i{color:#347BB1;}
|
||||
.WaterFlow_area.area_green .bg{border:1px solid green;background-color:#84CA04}
|
||||
.WaterFlow_area.area_green label,.WaterFlow_area.area_green i{color:green;}
|
||||
|
||||
/*画连线区域所需要的样式*/
|
||||
.WaterFlow_work svg{display:block;position:absolute;top:0;left:0}
|
||||
.WaterFlow_work v\:group{position:relative;display:block}
|
||||
.WaterFlow_work v\:group v\:line{overflow:visible}
|
||||
.WaterFlow_work v\:group v\:polyline{overflow:visible}
|
||||
.WaterFlow_work v\:group div{cursor:text;position:absolute;overflow:visible;display:inline;float:left;white-space: nowrap}
|
||||
.WaterFlow_work .draw{color:#ff8800}
|
||||
|
||||
/*各种节点样式*/
|
||||
.WaterFlow_item{
|
||||
position:absolute;background:#A1DCEB;padding:1px;
|
||||
border-radius:1px;background-color:#C1DCFC;box-shadow:1px 1px 2px rgba(99,99,99,2);
|
||||
}
|
||||
.WaterFlow table{padding:1px 2px;border-radius:2px}
|
||||
.WaterFlow td,.WaterFlow td div{ vertical-align:middle;text-align:center;padding:0;cursor:default;word-wrap:break-word;word-break:break-all}
|
||||
.WaterFlow .ico {
|
||||
width: 18px;
|
||||
cursor: move;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.WaterFlow .ico i{filter:Alpha(Opacity=30);-moz-opacity:0.3;opacity:0.3;color:#000;margin:0 auto;}
|
||||
|
||||
.WaterFlow .item_round{border-radius:10px; overflow:visible}
|
||||
.WaterFlow .item_round table{border:0;padding:3px;width:26px;height:26px}
|
||||
.WaterFlow .item_round .span{
|
||||
display:block;text-align:center; position:absolute;top:100%;left:-100%;width:300%;overflow:visible;
|
||||
padding:0;cursor:default;word-wrap: break-word;word-break:break-all
|
||||
}
|
||||
.WaterFlow .item_mix{background:#B6F700;color:#fff}
|
||||
.WaterFlow .item_focus{border:#3892D3 1px solid !important;padding:0;z-index:5}
|
||||
.WaterFlow .item_focus table{margin:0 !important;}
|
||||
.WaterFlow .item_focus.item_round .span{
|
||||
display:block;text-align:center; position:absolute;margin-top:1px;overflow:visible;
|
||||
padding:0;cursor:default;word-wrap: break-word;word-break:break-all;
|
||||
}
|
||||
.WaterFlow .item_mark{border:#ff8800 2px solid;padding:0}
|
||||
.WaterFlow .item_mark table{margin:-1px}
|
||||
.WaterFlow .item_mark td{cursor:crosshair}
|
||||
.WaterFlow .item_mark.item_round .span{padding-top:2px}
|
||||
|
||||
/*编辑时一些工具的页面特效*/
|
||||
.WaterFlow textarea{position:absolute;border:#3892D3 1px solid;display:none;overflow-y:visible;width:100px;z-index:10001}
|
||||
.WaterFlow div .rs_right{overflow:hidden;position:absolute;right:-1px;top:-1px;height:100%;width:6px;cursor:w-resize}
|
||||
.WaterFlow div .rs_bottom{overflow:hidden;position:absolute;left:-1px;bottom:-1px;width:100%;height:6px;cursor:n-resize}
|
||||
.WaterFlow div .rs_rb{
|
||||
position:absolute;right:-1px;bottom:0;width:10px;height:9px;filter:Alpha(Opacity=70);-moz-opacity:0.7;opacity:0.7;
|
||||
font-family:"iconflow" !important;font-size:12px;color:#475669;line-height:1;overflow:hidden;cursor:pointer;cursor:nw-resize;
|
||||
}
|
||||
.WaterFlow div .rs_rb:before{content:"\e6b7";}
|
||||
.WaterFlow div .rs_close{
|
||||
position:absolute;right:-1px;top:1px;width:10px;height:9px;filter:Alpha(Opacity=70);-moz-opacity:0.7;opacity:0.7;
|
||||
font-family:"iconflow" !important;font-size:12px;color:#475669;line-height:1;overflow:hidden;cursor:pointer;
|
||||
}
|
||||
.WaterFlow div .rs_close:before{content:"\e674";}
|
||||
.WaterFlow .rs_ghost{
|
||||
position:absolute;display:none;overflow:hidden;border:#8492A6 1px dashed; background:#E5E9F2;
|
||||
filter:Alpha(Opacity=50);-moz-opacity:0.5;opacity: 0.5;z-index:10
|
||||
}
|
||||
.WaterFlow .WaterFlow_line_oper{
|
||||
width:82px;height:20px;background:#E5E9F2;border:#8492A6 1px solid;position:absolute;
|
||||
filter:Alpha(Opacity=50);-moz-opacity:0.5;opacity: 0.5;z-index:10000;
|
||||
}
|
||||
.WaterFlow .WaterFlow_line_mp{
|
||||
width:9px;height:9px;filter:Alpha(Opacity=40);-moz-opacity:0.4;opacity:0.4;overflow:hidden;
|
||||
position:absolute;z-index:9999;background:#333;cursor:crosshair
|
||||
}
|
||||
.WaterFlow_linemove{background-color:transparent;filter:Alpha(Opacity=50);-moz-opacity:0.5;opacity:0.5;overflow:hidden;position:absolute;z-index:9999;}
|
||||
.WaterFlow_line_oper i{display:inline-block;margin-left:2px;cursor:pointer;position:relative;}
|
||||
.WaterFlow .b_l1:before{content:"\e60d";color:#1F2D3D}
|
||||
.WaterFlow .b_l2:before{content:"\e60e";color:#1F2D3D}
|
||||
.WaterFlow .b_l3:before{content:"\e601";color:#1F2D3D}
|
||||
.WaterFlow .b_x:before{content:"\e61a";color:red}
|
||||
|
||||
|
||||
/*以下为图标样式(固定大小18px*18px,矢量字体大小16px),用户可自定义扩展自己的新矢量图标字体,写法参照以下的内容*/
|
||||
@font-face {font-family: "iconflow";
|
||||
src: url('fonts/iconflow.eot?t=1494321407539'); /* IE9*/
|
||||
src: url('fonts/iconflow.eot?t=1494321407539#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('fonts/iconflow.woff?t=1494321407539') format('woff'), /* chrome, firefox */
|
||||
url('fonts/iconflow.ttf?t=1494321407539') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
||||
url('fonts/iconflow.svg?t=1494321407539#iconflow') format('svg'); /* iOS 4.1- */
|
||||
}
|
||||
.WaterFlow_area i,.WaterFlow .WaterFlow_line_oper i,.WaterFlow_tool i,.WaterFlow_head i,.WaterFlow_item .ico i{
|
||||
font-family:"iconflow" !important;
|
||||
font-size:18px;line-height:20px;
|
||||
font-style:normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
/*自带的一些节点矢量图标样式*/
|
||||
.WaterFlow .ico_cursor:before{ content:"\e602"; }
|
||||
.WaterFlow .ico_start:before{ content:"\e700"; }
|
||||
.WaterFlow .ico_end:before{ content:"\e609"; }
|
||||
.WaterFlow .ico_fork:before{ content:"\e60c"; }
|
||||
.WaterFlow .ico_join:before{ content:"\e606"; }
|
||||
.WaterFlow .ico_direct:before{ content:"\e605"; }
|
||||
.WaterFlow .ico_dashed:before{ content:"\e675"; }
|
||||
.WaterFlow .ico_group:before{ content:"\e663"; }
|
||||
.WaterFlow .ico_complex:before{ content:"\e872"; }
|
||||
/*.WaterFlow .ico_complex{background:url(assets/img/waterflow_icon.png) no-repeat -116px -20px;opacity:1 !important;filter:Alpha(Opacity=70) !important;}*/
|
||||
.WaterFlow .ico_node:before{ content:"\e678"; }
|
||||
.WaterFlow .ico_task:before{ content:"\e6af"; }
|
||||
/*.WaterFlow .ico_task{background:url(assets/img/waterflow_icon.png) no-repeat 2px -45px;opacity:1 !important;filter:Alpha(Opacity=70) !important;}*/
|
||||
.WaterFlow .ico_chat:before{ content:"\e61b"; }
|
||||
.WaterFlow .ico_state:before{ content:"\e633"; }
|
||||
.WaterFlow .ico_plug:before{ content:"\e66c"; }
|
||||
.WaterFlow .ico_menu:before{ content:"\e649"; }
|
||||
.WaterFlow .ico_sound:before{ content:"\e62b"; }
|
||||
|
||||
/*以下是内部用头部工具栏按钮专用的样式*/
|
||||
.WaterFlow .ico_open:before{ content:"\e7a0";color:#FFD300 }
|
||||
.WaterFlow .ico_new:before{ content:"\e659"; }
|
||||
.WaterFlow .ico_reload:before{ content:"\e607";color:#669900 }
|
||||
.WaterFlow .ico_save:before{ content:"\e63d";color:#0099cc }
|
||||
.WaterFlow .ico_undo:before{ content:"\e673";color:#ff8800 }
|
||||
.WaterFlow .ico_redo:before{ content:"\e672";color:#ff8800 }
|
||||
.WaterFlow .ico_print:before{ content:"\e671"; }
|
||||
395
WaterCloud.Web/wwwroot/js/lay-module/flow/flowlayout.js
Normal file
395
WaterCloud.Web/wwwroot/js/lay-module/flow/flowlayout.js
Normal file
@@ -0,0 +1,395 @@
|
||||
layui.define(["jquery", "layer"],
|
||||
function (exports) {
|
||||
var $ = layui.jquery;
|
||||
var layer = layui.layer;
|
||||
//初始化设计流程器
|
||||
$.fn.flowdesign = function (options) {
|
||||
var $frmpreview = $(this);
|
||||
if (!$frmpreview.attr('id')) {
|
||||
return false;
|
||||
}
|
||||
$frmpreview.html("");
|
||||
|
||||
var defaultcnf = {
|
||||
width: 500,
|
||||
height: 400,
|
||||
haveHead: false,
|
||||
haveTool: true,
|
||||
headLabel: true,
|
||||
toolBtns: ["start round mix", "end round", "node", "fork", "join"],
|
||||
haveGroup: true,
|
||||
useOperStack: true,
|
||||
needNoTag: true,
|
||||
useName: "处理人",
|
||||
tagName: { "1": "通过", "2": "不通过", "3": "驳回/撤回" },
|
||||
tagClass: { "1": "#5cb85c", "2": "#d9534f", "3": "#f0ad4e" },
|
||||
resultName: "结果",
|
||||
timeName: "处理时间",
|
||||
remarkName: "备注",
|
||||
};
|
||||
if (options != undefined) {
|
||||
$.extend(defaultcnf, options);
|
||||
}
|
||||
|
||||
var flowPanel = $.createWaterFlow($(this), defaultcnf);
|
||||
flowPanel.setNodeRemarks({
|
||||
cursor: "选择指针",
|
||||
direct: "转换连线",
|
||||
dashed: "关联虚线",
|
||||
start: "开始节点",
|
||||
end: "结束节点",
|
||||
task: "任务节点",
|
||||
node: "任务节点",
|
||||
chat: "决策节点",
|
||||
state: "状态节点",
|
||||
plug: "附加插件",
|
||||
fork: "会签开始节点",
|
||||
join: "会签结束节点",
|
||||
complex: "复合节点",
|
||||
group: "组织划分框编辑开"
|
||||
});
|
||||
if (options != undefined
|
||||
&& options.flowcontent != undefined
|
||||
&& options.flowcontent != null) { //加载内容
|
||||
flowPanel.loadData(options.flowcontent);
|
||||
}
|
||||
|
||||
//导出数据扩展方法
|
||||
//所有节点必须有进出线段
|
||||
//必须有开始结束节点(且只能为一个)
|
||||
//分流合流节点必须成对出现
|
||||
//分流合流节点必须一一对应且中间必须有且只能有一个普通节点
|
||||
//分流节点与合流节点之前的审核节点必须有且只能有一条出去和进来节点
|
||||
flowPanel.exportDataEx = function () {
|
||||
var data = flowPanel.exportData();
|
||||
var fromlines = {},
|
||||
tolines = {},
|
||||
nodes = {},
|
||||
fnodes = [], //会签分流节点
|
||||
hnodes = [], //会签合流节点
|
||||
startroundFlag = 0, //开始节点标识
|
||||
endroundFlag = 0; //结束节点标识
|
||||
for (var i in data.lines) {
|
||||
if (fromlines[data.lines[i].from] == undefined) {
|
||||
fromlines[data.lines[i].from] = [];
|
||||
}
|
||||
fromlines[data.lines[i].from].push(data.lines[i].to);
|
||||
|
||||
if (tolines[data.lines[i].to] == undefined) {
|
||||
tolines[data.lines[i].to] = [];
|
||||
}
|
||||
tolines[data.lines[i].to].push(data.lines[i].from);
|
||||
}
|
||||
for (var j in data.nodes) {
|
||||
var _node = data.nodes[j];
|
||||
var _flag = false;
|
||||
switch (_node.type) {
|
||||
case "start round mix":
|
||||
startroundFlag++;
|
||||
if (fromlines[_node.id] == undefined) {
|
||||
layer.msg("开始节点无法流转到下一个节点");
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case "end round":
|
||||
endroundFlag++;
|
||||
if (tolines[_node.id] == undefined) {
|
||||
layer.msg("无法流转到结束节点");
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case "node":
|
||||
if (_node.setInfo == null) {
|
||||
layer.msg("请设置任务节点【"+_node.name+"】操作人员");
|
||||
return -1;
|
||||
}
|
||||
_flag = true;
|
||||
break;
|
||||
case "fork":
|
||||
_flag = true;
|
||||
fnodes.push(_node.id);
|
||||
break;
|
||||
case "join":
|
||||
hnodes.push(_node.id);
|
||||
_flag = true;
|
||||
break;
|
||||
default:
|
||||
layer.msg("节点数据异常!");
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
nodes[_node.id] = _node;
|
||||
}
|
||||
if (startroundFlag == 0) {
|
||||
layer.msg("必须有开始节点");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (endroundFlag == 0) {
|
||||
layer.msg("必须有结束节点");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fnodes.length != hnodes.length) {
|
||||
layer.msg("会签开始的节点数量必须等于会签结束的节点数量");
|
||||
return -1;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
flowPanel.SetNodeEx = function (id, data) {
|
||||
flowPanel.setName(id, data.NodeName, "node", data);
|
||||
}
|
||||
flowPanel.SetLineEx = function (id, data) {
|
||||
flowPanel.setName(id, data.LineName, "line", data);
|
||||
}
|
||||
flowPanel.SetAreaEx = function (id, data) {
|
||||
flowPanel.setName(id, data.AreaName, "area", data);
|
||||
flowPanel.setAreaColor(id, data.AreaColor);
|
||||
}
|
||||
flowPanel.onItemDbClick = function (id, type) {
|
||||
var obj = flowPanel.getItemInfo(id, type);
|
||||
switch (type) {
|
||||
case "node":
|
||||
if ('OpenNode' in options) {
|
||||
options.OpenNode(obj);
|
||||
}
|
||||
break;
|
||||
case "line":
|
||||
if ('OpenLine' in options) {
|
||||
options.OpenLine(obj);
|
||||
}
|
||||
break;
|
||||
case "area":
|
||||
if ('OpenArea' in options) {
|
||||
options.OpenArea(obj);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
flowPanel.onItemRightClick = function (id, type) {
|
||||
var obj = flowPanel.getItemInfo(id, type);
|
||||
switch (type) {
|
||||
case "node":
|
||||
if ('OpenNode' in options) {
|
||||
options.OpenNode(obj);
|
||||
}
|
||||
break;
|
||||
case "line":
|
||||
if ('OpenLine' in options) {
|
||||
options.OpenLine(obj);
|
||||
}
|
||||
break;
|
||||
case "area":
|
||||
if ('OpenArea' in options) {
|
||||
options.OpenArea(obj);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (defaultcnf.isprocessing) //如果是显示进程状态
|
||||
{
|
||||
var tipHtml =
|
||||
'<div style="position:absolute;left:10px;margin-top: 10px;padding:10px;border-radius:5px;background:rgba(0,0,0,0.05);z-index:0;display:inline-block;">';
|
||||
if (defaultcnf.needNoTag==true) {
|
||||
tipHtml +=
|
||||
'<div style="display: inline-block;"><i style="padding-right:5px;color:#5bc0de;" class="layui-icon"></i><span>正在处理</span></div>';
|
||||
}
|
||||
if (!!defaultcnf.tagClass && Object.keys(defaultcnf.tagClass).length > 0) {
|
||||
for (var p in defaultcnf.tagClass) {//遍历json对象的每个key/value对,p为key
|
||||
tipHtml +=
|
||||
'<div style="display: inline-block;;margin-left: 10px;"><i style="padding-right:5px;color:' + defaultcnf.tagClass[p] + ';" class="layui-icon"></i><span>' + defaultcnf.tagName[p] + '</span></div>';
|
||||
}
|
||||
}
|
||||
if (defaultcnf.needNoTag == true) {
|
||||
tipHtml +=
|
||||
'<div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#999;" class="layui-icon"></i><span>未处理</span></div></div>';
|
||||
}
|
||||
$('.WaterFlow_work .WaterFlow_work_inner').css('background-image', 'none');
|
||||
$('td').css('color', '#fff');
|
||||
$frmpreview.css('background', '#fff');
|
||||
$('.ico').remove();
|
||||
$('.WaterFlow_item').css('border', '0px');
|
||||
$frmpreview.append(tipHtml);
|
||||
$.each(options.nodeData,
|
||||
function (i, item) {
|
||||
$("#" + item.id).css("background", "#999");
|
||||
if (item.type == "start round mix") {
|
||||
$("#" + item.id).css("background", "#5cb85c");
|
||||
} else {
|
||||
if (item.id == options.activityId) {
|
||||
$("#" + item.id).css("background", "#5bc0de");
|
||||
}
|
||||
if (item.setInfo != undefined && item.setInfo.Taged != undefined) {
|
||||
if (!!defaultcnf.tagName[item.setInfo.Taged]) {
|
||||
$("#" + item.id).css("background", defaultcnf.tagClass[item.setInfo.Taged]);
|
||||
} else {
|
||||
$("#" + item.id).css("background", "#999");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.setInfo != undefined && item.setInfo.Taged != undefined) {
|
||||
var tips = '<div style="text-align:left">';
|
||||
tips += "<p>" + defaultcnf.useName+":" + item.setInfo.UserName + "</p>";
|
||||
tips += "<p>" + defaultcnf.resultName + ":" + defaultcnf.tagName[item.setInfo.Taged] + "</p>";
|
||||
tips += "<p>" + defaultcnf.timeName +":" + item.setInfo.TagedTime + "</p>";
|
||||
tips += "<pre>" + defaultcnf.remarkName +":" + item.setInfo.Description + "</pre></div>";
|
||||
|
||||
$('#' + item.id).hover(function () {
|
||||
layer.tips(tips, '#' + item.id);
|
||||
});
|
||||
} else {
|
||||
$('#' + item.id).hover(function () {
|
||||
layer.tips('暂无处理信息', '#' + item.id);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (options.preview == 1) {
|
||||
preview();
|
||||
}
|
||||
|
||||
//预览
|
||||
function preview() {
|
||||
var _frmitems = {};
|
||||
for (var i in options.frmData) {
|
||||
var _frmitem = options.frmData[i];
|
||||
_frmitems[_frmitem.control_field] = _frmitem.control_label;
|
||||
}
|
||||
var DataBaseLinkData = {};
|
||||
|
||||
|
||||
var _NodeRejectType = { "0": "前一步", "1": "第一步", "2": "某一步", "3": "用户指定", "4": "不处理" };
|
||||
var _NodeIsOver = { "0": "不允许", "1": "允许" };
|
||||
var _NodeDesignate = {
|
||||
"NodeDesignateType1": "所有成员",
|
||||
"NodeDesignateType2": "指定成员",
|
||||
"NodeDesignateType3": "发起者领导",
|
||||
"NodeDesignateType4": "前一步骤领导",
|
||||
"NodeDesignateType5": "发起者部门领导",
|
||||
"NodeDesignateType6": "发起者公司领导"
|
||||
};
|
||||
var _NodeConfluenceType = { "all": "所有步骤通过", "one": "一个步骤通过即可", "2": "按百分比计算" };
|
||||
if (options.flowcontent == undefined) return;
|
||||
$.each(options.flowcontent.nodes,
|
||||
function (i, item) {
|
||||
if (item.setInfo != undefined) {
|
||||
var _popoverhtml = "";
|
||||
_popoverhtml +=
|
||||
'<div class="flow-portal-panel-title"><i class="fa fa-navicon"></i> 基本信息</div>';
|
||||
_popoverhtml += '<ul>';
|
||||
_popoverhtml += '<li>节点标识:' + item.setInfo.NodeCode + '</li>';
|
||||
_popoverhtml += '<li>驳回类型:' + _NodeRejectType[item.setInfo.NodeRejectType] + '</li>';
|
||||
_popoverhtml += '<li>终止流程:' + _NodeIsOver[item.setInfo.NodeIsOver] + '</li>';
|
||||
if (item.setInfo.Description != "") {
|
||||
_popoverhtml += '<li>备注:' + item.setInfo.Description + '</li>';
|
||||
}
|
||||
if (item.setInfo.NodeConfluenceType != "") {
|
||||
_popoverhtml += '<li>会签策略:' +
|
||||
_NodeConfluenceType[item.setInfo.NodeConfluenceType] +
|
||||
'</li>';
|
||||
if (item.setInfo.NodeConfluenceType == 2) {
|
||||
_popoverhtml += '<li>会签比例:' + item.setInfo.NodeConfluenceRate + '</li>';
|
||||
}
|
||||
}
|
||||
if (item.setInfo.NodeDataBase != "") {
|
||||
_popoverhtml += '<li>绑定数据库:' + DataBaseLinkData[item.setInfo.NodeDataBase] + '</li>';
|
||||
}
|
||||
if (item.setInfo.NodeTable != "") {
|
||||
_popoverhtml += '<li>绑定表名:' + item.setInfo.NodeTable + '</li>';
|
||||
}
|
||||
if (item.setInfo.NodePram != "") {
|
||||
_popoverhtml += '<li>绑定字段:' + item.setInfo.NodePram + '</li>';
|
||||
}
|
||||
_popoverhtml += '</ul>';
|
||||
|
||||
_popoverhtml +=
|
||||
'<div class="flow-portal-panel-title"><i class="fa fa-navicon"></i> 审核者</div>';
|
||||
_popoverhtml += '<ul>';
|
||||
_popoverhtml += '<li>类型:' + _NodeDesignate[item.setInfo.NodeDesignate] + '</li>';
|
||||
if (item.setInfo.NodeDesignateData != undefined) {
|
||||
var _rowstr = "";
|
||||
for (var i in item.setInfo.NodeDesignateData.roles) {
|
||||
var _postitem = item.setInfo.NodeDesignateData.roles[i];
|
||||
var _one = top.clientroleData[_postitem];
|
||||
_rowstr += ' <span class="label label-success">' +
|
||||
(_one == undefined ? _postitem : _one.FullName) +
|
||||
'</span>';
|
||||
if (i == item.setInfo.NodeDesignateData.roles.length - 1) {
|
||||
_popoverhtml += '<li>角色:' + _rowstr + '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
_rowstr = "";
|
||||
for (var i in item.setInfo.NodeDesignateData.users) {
|
||||
var _postitem = item.setInfo.NodeDesignateData.users[i];
|
||||
var _one = clientuserData[_postitem];
|
||||
_rowstr += ' <span class="label label-danger">' +
|
||||
(_one == undefined ? _postitem : _one.RealName) +
|
||||
'</span>';
|
||||
if (i == item.setInfo.NodeDesignateData.users.length - 1) {
|
||||
_popoverhtml += '<li>用户:' + _rowstr + '</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
_popoverhtml += '</ul>';
|
||||
|
||||
var _row = "";
|
||||
for (var i in item.setInfo.frmPermissionInfo) {
|
||||
var _item = item.setInfo.frmPermissionInfo[i];
|
||||
var _downtext = "";
|
||||
if (_item.down) {
|
||||
_downtext = ' | 可下载';
|
||||
} else if (_item.down != undefined) {
|
||||
_downtext = ' | 不可下载';
|
||||
}
|
||||
_row += '<li>' +
|
||||
_frmitems[_item.fieldid] +
|
||||
': ' +
|
||||
(_item.look ? '可查看' : '不可查看') +
|
||||
_downtext +
|
||||
'</li>';
|
||||
if (i == item.setInfo.frmPermissionInfo.length - 1) {
|
||||
_popoverhtml +=
|
||||
'<div class="flow-portal-panel-title"><i class="fa fa-navicon"></i> 权限分配</div>';
|
||||
_popoverhtml += '<ul>';
|
||||
_popoverhtml += _row;
|
||||
_popoverhtml += '</ul>';
|
||||
}
|
||||
}
|
||||
|
||||
if (item.setInfo.NodeDataBaseToSQL != "" || item.setInfo.NodeSQL != "") {
|
||||
_popoverhtml +=
|
||||
'<div class="flow-portal-panel-title"><i class="fa fa-navicon"></i> 执行SQL</div>';
|
||||
_popoverhtml += '<ul>';
|
||||
_popoverhtml += '<li>数据库:' + DataBaseLinkData[item.setInfo.NodeDataBaseToSQL] + '</li>';
|
||||
_popoverhtml += '<li>SQL语句:' + item.setInfo.NodeSQL + '</li>';
|
||||
_popoverhtml += '</ul>';
|
||||
}
|
||||
|
||||
$('#' + item.id).attr('title', item.name);
|
||||
$('#' + item.id).attr('data-toggle', 'popover');
|
||||
$('#' + item.id).attr('data-placement', 'bottom');
|
||||
$('#' + item.id).attr('data-content', _popoverhtml);
|
||||
} else {
|
||||
$('#' + item.id).attr('title', item.name);
|
||||
$('#' + item.id).attr('data-toggle', 'popover');
|
||||
$('#' + item.id).attr('data-placement', 'bottom');
|
||||
$('#' + item.id).attr('data-content', "该节点未被设置");
|
||||
}
|
||||
});
|
||||
//$('.WaterFlow_item').popover({ html: true });
|
||||
}
|
||||
|
||||
return flowPanel;
|
||||
}
|
||||
|
||||
exports('flowlayout');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
370
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/demo.css
Normal file
370
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/demo.css
Normal file
@@ -0,0 +1,370 @@
|
||||
*{margin: 0;padding: 0;list-style: none;}
|
||||
/*
|
||||
KISSY CSS Reset
|
||||
理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。
|
||||
2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。
|
||||
3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。
|
||||
特色:1. 适应中文;2. 基于最新主流浏览器。
|
||||
维护:玉伯<lifesinger@gmail.com>, 正淳<ragecarrier@gmail.com>
|
||||
*/
|
||||
|
||||
/** 清除内外边距 **/
|
||||
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
|
||||
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
|
||||
pre, /* text formatting elements 文本格式元素 */
|
||||
form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */
|
||||
th, td /* table elements 表格元素 */ {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/** 设置默认字体 **/
|
||||
body,
|
||||
button, input, select, textarea /* for ie */ {
|
||||
font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 { font-size: 100%; }
|
||||
address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */
|
||||
code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */
|
||||
small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
|
||||
|
||||
/** 重置列表元素 **/
|
||||
ul, ol { list-style: none; }
|
||||
|
||||
/** 重置文本格式元素 **/
|
||||
a { text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
|
||||
|
||||
/** 重置表单元素 **/
|
||||
legend { color: #000; } /* for ie6 */
|
||||
fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */
|
||||
button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */
|
||||
/* 注:optgroup 无法扶正 */
|
||||
|
||||
/** 重置表格元素 **/
|
||||
table { border-collapse: collapse; border-spacing: 0; }
|
||||
|
||||
/* 清除浮动 */
|
||||
.ks-clear:after, .clear:after {
|
||||
content: '\20';
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
.ks-clear, .clear {
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.main {
|
||||
padding: 30px 100px;
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;}
|
||||
|
||||
.helps{margin-top:40px;}
|
||||
.helps pre{
|
||||
padding:20px;
|
||||
margin:10px 0;
|
||||
border:solid 1px #e7e1cd;
|
||||
background-color: #fffdef;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.icon_lists{
|
||||
width: 100% !important;
|
||||
|
||||
}
|
||||
|
||||
.icon_lists li{
|
||||
float:left;
|
||||
width: 100px;
|
||||
height:180px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
}
|
||||
.icon_lists .icon{
|
||||
font-size: 42px;
|
||||
line-height: 100px;
|
||||
margin: 10px 0;
|
||||
color:#333;
|
||||
-webkit-transition: font-size 0.25s ease-out 0s;
|
||||
-moz-transition: font-size 0.25s ease-out 0s;
|
||||
transition: font-size 0.25s ease-out 0s;
|
||||
|
||||
}
|
||||
.icon_lists .icon:hover{
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.markdown {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.markdown img {
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
color: #404040;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4,
|
||||
.markdown h5,
|
||||
.markdown h6 {
|
||||
color: #404040;
|
||||
margin: 1.6em 0 0.6em 0;
|
||||
font-weight: 500;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.markdown h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.markdown h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.markdown h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background: #e9e9e9;
|
||||
margin: 16px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown p,
|
||||
.markdown pre {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown > p,
|
||||
.markdown > blockquote,
|
||||
.markdown > .highlight,
|
||||
.markdown > ol,
|
||||
.markdown > ul {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.markdown ul > li {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
.markdown > ul li,
|
||||
.markdown blockquote ul > li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown > ul li p,
|
||||
.markdown > ol li p {
|
||||
margin: 0.6em 0;
|
||||
}
|
||||
|
||||
.markdown ol > li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.markdown > ol li,
|
||||
.markdown blockquote ol > li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown code {
|
||||
margin: 0 3px;
|
||||
padding: 0 5px;
|
||||
background: #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown pre {
|
||||
border-radius: 6px;
|
||||
background: #f7f7f7;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.markdown pre code {
|
||||
border: none;
|
||||
background: #f7f7f7;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown strong,
|
||||
.markdown b {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown > table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 95%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown > table th {
|
||||
white-space: nowrap;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
|
||||
}
|
||||
|
||||
.markdown > table th,
|
||||
.markdown > table td {
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.markdown > table th {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.markdown blockquote {
|
||||
font-size: 90%;
|
||||
color: #999;
|
||||
border-left: 4px solid #e9e9e9;
|
||||
padding-left: 0.8em;
|
||||
margin: 1em 0;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.markdown blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown .anchor {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.markdown .waiting {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.markdown h1:hover .anchor,
|
||||
.markdown h2:hover .anchor,
|
||||
.markdown h3:hover .anchor,
|
||||
.markdown h4:hover .anchor,
|
||||
.markdown h5:hover .anchor,
|
||||
.markdown h6:hover .anchor {
|
||||
opacity: 1;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.markdown > br,
|
||||
.markdown > p > br {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
pre{
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>IconFont</title>
|
||||
<link rel="stylesheet" href="demo.css">
|
||||
<link rel="stylesheet" href="iconfont.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="main markdown">
|
||||
<h1>IconFont 图标</h1>
|
||||
<ul class="icon_lists clear">
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-zhizhen1"></i>
|
||||
<div class="name">指针</div>
|
||||
<div class="fontclass">.i-zhizhen1</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-msnui-close-fat"></i>
|
||||
<div class="name">关闭</div>
|
||||
<div class="fontclass">.i-msnui-close-fat</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-close"></i>
|
||||
<div class="name">close</div>
|
||||
<div class="fontclass">.i-close</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-wenjiantianjia"></i>
|
||||
<div class="name">文件添加</div>
|
||||
<div class="fontclass">.i-wenjiantianjia</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-tag"></i>
|
||||
<div class="name">tag</div>
|
||||
<div class="fontclass">.i-tag</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-conowredo"></i>
|
||||
<div class="name">conow-redo</div>
|
||||
<div class="fontclass">.i-conowredo</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-conowrevoke"></i>
|
||||
<div class="name">conow-revoke</div>
|
||||
<div class="fontclass">.i-conowrevoke</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-baocun"></i>
|
||||
<div class="name">保存</div>
|
||||
<div class="fontclass">.i-baocun</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-refresh"></i>
|
||||
<div class="name">Refresh</div>
|
||||
<div class="fontclass">.i-refresh</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-youxiashixin"></i>
|
||||
<div class="name">右下-实心</div>
|
||||
<div class="fontclass">.i-youxiashixin</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-paizhaoanniu"></i>
|
||||
<div class="name">拍照按钮</div>
|
||||
<div class="fontclass">.i-paizhaoanniu</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-huizhang"></i>
|
||||
<div class="name">徽章</div>
|
||||
<div class="fontclass">.i-huizhang</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-hrgongzuotai"></i>
|
||||
<div class="name">hr工作台</div>
|
||||
<div class="fontclass">.i-hrgongzuotai</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-tingzhi-copy"></i>
|
||||
<div class="name">停止</div>
|
||||
<div class="fontclass">.i-tingzhi-copy</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-wenjianjia"></i>
|
||||
<div class="name">文件夹</div>
|
||||
<div class="fontclass">.i-wenjianjia</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-webtubiaoku08"></i>
|
||||
<div class="name">声音</div>
|
||||
<div class="fontclass">.i-webtubiaoku08</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-database"></i>
|
||||
<div class="name">数据库</div>
|
||||
<div class="fontclass">.i-database</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-chajian1"></i>
|
||||
<div class="name">插件 (1)</div>
|
||||
<div class="fontclass">.i-chajian1</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-caidan"></i>
|
||||
<div class="name">菜单</div>
|
||||
<div class="fontclass">.i-caidan</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-wangluo"></i>
|
||||
<div class="name">网络</div>
|
||||
<div class="fontclass">.i-wangluo</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-dayin"></i>
|
||||
<div class="name">打印</div>
|
||||
<div class="fontclass">.i-dayin</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-user"></i>
|
||||
<div class="name">用户</div>
|
||||
<div class="fontclass">.i-user</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-kaishi"></i>
|
||||
<div class="name">开始</div>
|
||||
<div class="fontclass">.i-kaishi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-hebing"></i>
|
||||
<div class="name">合并</div>
|
||||
<div class="fontclass">.i-hebing</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-liaotian"></i>
|
||||
<div class="name">聊天</div>
|
||||
<div class="fontclass">.i-liaotian</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-dingshi"></i>
|
||||
<div class="name">定时</div>
|
||||
<div class="fontclass">.i-dingshi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-xiejiantou"></i>
|
||||
<div class="name">斜箭头</div>
|
||||
<div class="fontclass">.i-xiejiantou</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-peizhi"></i>
|
||||
<div class="name">配置</div>
|
||||
<div class="fontclass">.i-peizhi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-xiangmuzuhe"></i>
|
||||
<div class="name">项目组合</div>
|
||||
<div class="fontclass">.i-xiangmuzuhe</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-xitongcanshupeizhi"></i>
|
||||
<div class="name">系统参数配置</div>
|
||||
<div class="fontclass">.i-xitongcanshupeizhi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-qukuai"></i>
|
||||
<div class="name">区块</div>
|
||||
<div class="fontclass">.i-qukuai</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-fenzhi"></i>
|
||||
<div class="name">分支</div>
|
||||
<div class="fontclass">.i-fenzhi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-icon-test"></i>
|
||||
<div class="name">01</div>
|
||||
<div class="fontclass">.i-icon-test</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-icon-test1"></i>
|
||||
<div class="name">02</div>
|
||||
<div class="fontclass">.i-icon-test1</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-xiaoxuxian"></i>
|
||||
<div class="name">小虚线</div>
|
||||
<div class="fontclass">.i-xiaoxuxian</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconflow i-jianchagongjuzhixian"></i>
|
||||
<div class="name">检查工具 直线</div>
|
||||
<div class="fontclass">.i-jianchagongjuzhixian</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2 id="font-class-">font-class引用</h2>
|
||||
<hr>
|
||||
|
||||
<p>font-class是unicode使用方式的一种变种,主要是解决unicode书写不直观,语意不明确的问题。</p>
|
||||
<p>与unicode使用方式相比,具有如下特点:</p>
|
||||
<ul>
|
||||
<li>兼容性良好,支持ie8+,及所有现代浏览器。</li>
|
||||
<li>相比于unicode语意明确,书写更直观。可以很容易分辨这个icon是什么。</li>
|
||||
<li>因为使用class来定义图标,所以当要替换图标时,只需要修改class里面的unicode引用。</li>
|
||||
<li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li>
|
||||
</ul>
|
||||
<p>使用步骤如下:</p>
|
||||
<h3 id="-fontclass-">第一步:引入项目下面生成的fontclass代码:</h3>
|
||||
|
||||
|
||||
<pre><code class="lang-js hljs javascript"><span class="hljs-comment"><link rel="stylesheet" type="text/css" href="./iconfont.css"></span></code></pre>
|
||||
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
|
||||
<pre><code class="lang-css hljs"><<span class="hljs-selector-tag">i</span> <span class="hljs-selector-tag">class</span>="<span class="hljs-selector-tag">iconflow</span> <span class="hljs-selector-tag">i-xxx</span>"></<span class="hljs-selector-tag">i</span>></code></pre>
|
||||
<blockquote>
|
||||
<p>"iconflow"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
351
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/demo_symbol.html
Normal file
351
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/demo_symbol.html
Normal file
@@ -0,0 +1,351 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>IconFont</title>
|
||||
<link rel="stylesheet" href="demo.css">
|
||||
<script src="iconfont.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em; height: 1em;
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main markdown">
|
||||
<h1>IconFont 图标</h1>
|
||||
<ul class="icon_lists clear">
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-zhizhen1"></use>
|
||||
</svg>
|
||||
<div class="name">指针</div>
|
||||
<div class="fontclass">#i-zhizhen1</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-msnui-close-fat"></use>
|
||||
</svg>
|
||||
<div class="name">关闭</div>
|
||||
<div class="fontclass">#i-msnui-close-fat</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-close"></use>
|
||||
</svg>
|
||||
<div class="name">close</div>
|
||||
<div class="fontclass">#i-close</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-wenjiantianjia"></use>
|
||||
</svg>
|
||||
<div class="name">文件添加</div>
|
||||
<div class="fontclass">#i-wenjiantianjia</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-tag"></use>
|
||||
</svg>
|
||||
<div class="name">tag</div>
|
||||
<div class="fontclass">#i-tag</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-conowredo"></use>
|
||||
</svg>
|
||||
<div class="name">conow-redo</div>
|
||||
<div class="fontclass">#i-conowredo</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-conowrevoke"></use>
|
||||
</svg>
|
||||
<div class="name">conow-revoke</div>
|
||||
<div class="fontclass">#i-conowrevoke</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-baocun"></use>
|
||||
</svg>
|
||||
<div class="name">保存</div>
|
||||
<div class="fontclass">#i-baocun</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-refresh"></use>
|
||||
</svg>
|
||||
<div class="name">Refresh</div>
|
||||
<div class="fontclass">#i-refresh</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-youxiashixin"></use>
|
||||
</svg>
|
||||
<div class="name">右下-实心</div>
|
||||
<div class="fontclass">#i-youxiashixin</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-paizhaoanniu"></use>
|
||||
</svg>
|
||||
<div class="name">拍照按钮</div>
|
||||
<div class="fontclass">#i-paizhaoanniu</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-huizhang"></use>
|
||||
</svg>
|
||||
<div class="name">徽章</div>
|
||||
<div class="fontclass">#i-huizhang</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-hrgongzuotai"></use>
|
||||
</svg>
|
||||
<div class="name">hr工作台</div>
|
||||
<div class="fontclass">#i-hrgongzuotai</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-tingzhi-copy"></use>
|
||||
</svg>
|
||||
<div class="name">停止</div>
|
||||
<div class="fontclass">#i-tingzhi-copy</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-wenjianjia"></use>
|
||||
</svg>
|
||||
<div class="name">文件夹</div>
|
||||
<div class="fontclass">#i-wenjianjia</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-webtubiaoku08"></use>
|
||||
</svg>
|
||||
<div class="name">声音</div>
|
||||
<div class="fontclass">#i-webtubiaoku08</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-database"></use>
|
||||
</svg>
|
||||
<div class="name">数据库</div>
|
||||
<div class="fontclass">#i-database</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-chajian1"></use>
|
||||
</svg>
|
||||
<div class="name">插件 (1)</div>
|
||||
<div class="fontclass">#i-chajian1</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-caidan"></use>
|
||||
</svg>
|
||||
<div class="name">菜单</div>
|
||||
<div class="fontclass">#i-caidan</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-wangluo"></use>
|
||||
</svg>
|
||||
<div class="name">网络</div>
|
||||
<div class="fontclass">#i-wangluo</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-dayin"></use>
|
||||
</svg>
|
||||
<div class="name">打印</div>
|
||||
<div class="fontclass">#i-dayin</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-user"></use>
|
||||
</svg>
|
||||
<div class="name">用户</div>
|
||||
<div class="fontclass">#i-user</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-kaishi"></use>
|
||||
</svg>
|
||||
<div class="name">开始</div>
|
||||
<div class="fontclass">#i-kaishi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-hebing"></use>
|
||||
</svg>
|
||||
<div class="name">合并</div>
|
||||
<div class="fontclass">#i-hebing</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-liaotian"></use>
|
||||
</svg>
|
||||
<div class="name">聊天</div>
|
||||
<div class="fontclass">#i-liaotian</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-dingshi"></use>
|
||||
</svg>
|
||||
<div class="name">定时</div>
|
||||
<div class="fontclass">#i-dingshi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-xiejiantou"></use>
|
||||
</svg>
|
||||
<div class="name">斜箭头</div>
|
||||
<div class="fontclass">#i-xiejiantou</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-peizhi"></use>
|
||||
</svg>
|
||||
<div class="name">配置</div>
|
||||
<div class="fontclass">#i-peizhi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-xiangmuzuhe"></use>
|
||||
</svg>
|
||||
<div class="name">项目组合</div>
|
||||
<div class="fontclass">#i-xiangmuzuhe</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-xitongcanshupeizhi"></use>
|
||||
</svg>
|
||||
<div class="name">系统参数配置</div>
|
||||
<div class="fontclass">#i-xitongcanshupeizhi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-qukuai"></use>
|
||||
</svg>
|
||||
<div class="name">区块</div>
|
||||
<div class="fontclass">#i-qukuai</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-fenzhi"></use>
|
||||
</svg>
|
||||
<div class="name">分支</div>
|
||||
<div class="fontclass">#i-fenzhi</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-icon-test"></use>
|
||||
</svg>
|
||||
<div class="name">01</div>
|
||||
<div class="fontclass">#i-icon-test</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-icon-test1"></use>
|
||||
</svg>
|
||||
<div class="name">02</div>
|
||||
<div class="fontclass">#i-icon-test1</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-xiaoxuxian"></use>
|
||||
</svg>
|
||||
<div class="name">小虚线</div>
|
||||
<div class="fontclass">#i-xiaoxuxian</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#i-jianchagongjuzhixian"></use>
|
||||
</svg>
|
||||
<div class="name">检查工具 直线</div>
|
||||
<div class="fontclass">#i-jianchagongjuzhixian</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2 id="symbol-">symbol引用</h2>
|
||||
<hr>
|
||||
|
||||
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
|
||||
这种用法其实是做了一个svg的集合,与另外两种相比具有如下特点:</p>
|
||||
<ul>
|
||||
<li>支持多色图标了,不再受单色限制。</li>
|
||||
<li>通过一些技巧,支持像字体那样,通过<code>font-size</code>,<code>color</code>来调整样式。</li>
|
||||
<li>兼容性较差,支持 ie9+,及现代浏览器。</li>
|
||||
<li>浏览器渲染svg的性能一般,还不如png。</li>
|
||||
</ul>
|
||||
<p>使用步骤如下:</p>
|
||||
<h3 id="-symbol-">第一步:引入项目下面生成的symbol代码:</h3>
|
||||
<pre><code class="lang-js hljs javascript"><span class="hljs-comment"><script src="./iconfont.js"></script></span></code></pre>
|
||||
<h3 id="-css-">第二步:加入通用css代码(引入一次就行):</h3>
|
||||
<pre><code class="lang-js hljs javascript"><style type=<span class="hljs-string">"text/css"</span>>
|
||||
.icon {
|
||||
width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
|
||||
vertical-align: <span class="hljs-number">-0.15</span>em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
<<span class="hljs-regexp">/style></span></code></pre>
|
||||
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
|
||||
<pre><code class="lang-js hljs javascript"><svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>><span class="xml"><span class="hljs-tag">
|
||||
<<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#i-xxx"</span>></span><span class="hljs-tag"></<span class="hljs-name">use</span>></span>
|
||||
</span><<span class="hljs-regexp">/svg>
|
||||
</span></code></pre>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,294 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>IconFont</title>
|
||||
<link rel="stylesheet" href="demo.css">
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
@font-face {font-family: "iconfont";
|
||||
src: url('iconflow.eot'); /* IE9*/
|
||||
src: url('iconflow.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('iconflow.woff') format('woff'), /* chrome, firefox */
|
||||
url('iconflow.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
||||
url('iconflow.svg#iconfont') format('svg'); /* iOS 4.1- */
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family:"iconfont" !important;
|
||||
font-size:16px;
|
||||
font-style:normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main markdown">
|
||||
<h1>IconFont 图标</h1>
|
||||
<ul class="icon_lists clear">
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">指针</div>
|
||||
<div class="code">&#xe602;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">关闭</div>
|
||||
<div class="code">&#xe674;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">close</div>
|
||||
<div class="code">&#xe61a;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">文件添加</div>
|
||||
<div class="code">&#xe659;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">tag</div>
|
||||
<div class="code">&#xe6f9;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">conow-redo</div>
|
||||
<div class="code">&#xe672;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">conow-revoke</div>
|
||||
<div class="code">&#xe673;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">保存</div>
|
||||
<div class="code">&#xe63d;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">Refresh</div>
|
||||
<div class="code">&#xe607;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">右下-实心</div>
|
||||
<div class="code">&#xe6b7;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">拍照按钮</div>
|
||||
<div class="code">&#xe6bd;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">徽章</div>
|
||||
<div class="code">&#xe611;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">hr工作台</div>
|
||||
<div class="code">&#xe600;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">停止</div>
|
||||
<div class="code">&#xe609;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">文件夹</div>
|
||||
<div class="code">&#xe7a0;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">声音</div>
|
||||
<div class="code">&#xe643;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">数据库</div>
|
||||
<div class="code">&#xe742;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">插件 (1)</div>
|
||||
<div class="code">&#xe66c;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">菜单</div>
|
||||
<div class="code">&#xe649;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">网络</div>
|
||||
<div class="code">&#xe62b;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">打印</div>
|
||||
<div class="code">&#xe671;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">用户</div>
|
||||
<div class="code">&#xe6af;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">开始</div>
|
||||
<div class="code">&#xe700;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">合并</div>
|
||||
<div class="code">&#xe606;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">聊天</div>
|
||||
<div class="code">&#xe61b;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">定时</div>
|
||||
<div class="code">&#xe633;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">斜箭头</div>
|
||||
<div class="code">&#xe605;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">配置</div>
|
||||
<div class="code">&#xe678;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">项目组合</div>
|
||||
<div class="code">&#xe872;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">系统参数配置</div>
|
||||
<div class="code">&#xe68f;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">区块</div>
|
||||
<div class="code">&#xe663;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">分支</div>
|
||||
<div class="code">&#xe60c;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">01</div>
|
||||
<div class="code">&#xe60d;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">02</div>
|
||||
<div class="code">&#xe60e;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">小虚线</div>
|
||||
<div class="code">&#xe675;</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="icon iconfont"></i>
|
||||
<div class="name">检查工具 直线</div>
|
||||
<div class="code">&#xe624;</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<h2 id="unicode-">unicode引用</h2>
|
||||
<hr>
|
||||
|
||||
<p>unicode是字体在网页端最原始的应用方式,特点是:</p>
|
||||
<ul>
|
||||
<li>兼容性最好,支持ie6+,及所有现代浏览器。</li>
|
||||
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
|
||||
<li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>注意:新版iconfont支持多色图标,这些多色图标在unicode模式下将不能使用,如果有需求建议使用symbol的引用方式</p>
|
||||
</blockquote>
|
||||
<p>unicode使用步骤如下:</p>
|
||||
<h3 id="-font-face">第一步:拷贝项目下面生成的font-face</h3>
|
||||
<pre><code class="lang-js hljs javascript">@font-face {
|
||||
font-family: <span class="hljs-string">'iconfont'</span>;
|
||||
src: url(<span class="hljs-string">'iconfont.eot'</span>);
|
||||
src: url(<span class="hljs-string">'iconfont.eot?#iefix'</span>) format(<span class="hljs-string">'embedded-opentype'</span>),
|
||||
url(<span class="hljs-string">'iconfont.woff'</span>) format(<span class="hljs-string">'woff'</span>),
|
||||
url(<span class="hljs-string">'iconfont.ttf'</span>) format(<span class="hljs-string">'truetype'</span>),
|
||||
url(<span class="hljs-string">'iconfont.svg#iconfont'</span>) format(<span class="hljs-string">'svg'</span>);
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-iconfont-">第二步:定义使用iconfont的样式</h3>
|
||||
<pre><code class="lang-js hljs javascript">.iconfont{
|
||||
font-family:<span class="hljs-string">"iconfont"</span> !important;
|
||||
font-size:<span class="hljs-number">16</span>px;font-style:normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: <span class="hljs-number">0.2</span>px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
|
||||
<pre><code class="lang-js hljs javascript"><i <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"iconfont"</span>>&#x33;<span class="xml"><span class="hljs-tag"></<span class="hljs-name">i</span>></span></span></code></pre>
|
||||
|
||||
<blockquote>
|
||||
<p>"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconflow.eot
Normal file
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconflow.eot
Normal file
Binary file not shown.
141
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconflow.svg
Normal file
141
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconflow.svg
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<!--
|
||||
2013-9-30: Created.
|
||||
-->
|
||||
<svg>
|
||||
<metadata>
|
||||
Created by iconfont
|
||||
</metadata>
|
||||
<defs>
|
||||
|
||||
<font id="iconflow" horiz-adv-x="1024" >
|
||||
<font-face
|
||||
font-family="iconflow"
|
||||
font-weight="500"
|
||||
font-stretch="normal"
|
||||
units-per-em="1024"
|
||||
ascent="896"
|
||||
descent="-128"
|
||||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
|
||||
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
|
||||
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
|
||||
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
|
||||
|
||||
|
||||
|
||||
<glyph glyph-name="chexiao" unicode="" d="M894.976 321.53599999999994q0-78.848-29.696-148.48t-81.408-123.392-121.856-88.064-151.04-41.472q-5.12-1.024-9.216-1.536t-9.216-0.512l-177.152 0q-17.408 0-34.304 6.144t-30.208 16.896-22.016 25.088-8.704 29.696 8.192 29.696 21.504 24.576 29.696 16.384 33.792 6.144l158.72-1.024q54.272 0 102.4 19.968t83.968 53.76 56.32 79.36 20.48 97.792q0 49.152-18.432 92.16t-50.688 76.8-75.264 54.784-93.184 26.112q-2.048 0-2.56-0.512t-2.56-0.512l-162.816 0 0-80.896q0-17.408-13.824-25.6t-44.544 10.24q-8.192 5.12-26.112 17.92t-41.984 30.208-50.688 36.864l-51.2 38.912q-15.36 12.288-26.624 22.016t-11.264 24.064q0 12.288 12.8 25.6t29.184 26.624q18.432 15.36 44.032 35.84t50.688 39.936 45.056 35.328 28.16 22.016q24.576 17.408 39.936 7.168t16.384-30.72l0-81.92 162.816 0q5.12 0 10.752-1.024t10.752-2.048q79.872-8.192 149.504-41.984t121.344-87.552 80.896-123.392 29.184-147.456z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zhongzuo" unicode="" d="M108.544 323.58399999999995q0 77.824 29.184 147.456t80.896 123.392 121.344 87.552 149.504 41.984q10.24 3.072 21.504 3.072l162.816 0 0 81.92q1.024 20.48 16.384 30.72t39.936-7.168q7.168-5.12 27.648-20.992t45.568-35.84 50.688-40.448 44.032-35.84q16.384-13.312 28.672-26.624t12.288-25.6q0-14.336-10.752-24.064t-26.112-22.016l-51.2-38.912q-26.624-19.456-50.688-36.864t-42.496-30.208-26.624-16.896q-15.36-9.216-26.112-11.776t-17.408 0.512-10.24 10.24-3.584 15.36l0 81.92-162.816 0-5.12 0q-50.176-5.12-93.184-26.112t-75.264-54.784-50.688-76.8-18.432-92.16q0-52.224 20.48-97.792t56.32-79.36 83.968-53.76 102.4-19.968l158.72 1.024q16.384 0 33.28-6.144t29.696-16.384 20.992-24.064 8.192-30.208q0-15.36-8.192-29.696t-22.016-24.576-30.72-16.384-33.28-6.144l-177.152 0-9.216 0q-4.096 0-9.216 1.024-80.896 7.168-151.04 41.472t-121.856 88.064-81.408 123.392-29.696 148.48z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zhizhen1" unicode="" d="M868.992 276q-46.016 0.992-96-3.008-43.008-3.008-97.504-10.016t-111.488-22.016l147.008-243.008q10.016-19.008 11.488-39.008t-4.512-38.496-18.496-34.016-31.488-25.504q-18.016-10.016-38.016-11.488t-38.496 4.512-34.016 18.496-25.504 31.488l-123.008 272.992q-50.016-28.992-90.496-62.016t-69.504-62.016q-34.016-32.992-60-67.008l-2.016 816z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="msnui-close-fat" unicode="" d="M675.019 702.566l-485.38-485.38-111.358 111.376 485.38 485.38 111.376-111.358zM562.743 813.027c30.754 30.754 80.612 30.754 111.358 0s30.754-80.612 0-111.358M190.555 218.097c-30.754-30.734-80.62-30.734-111.376 0-30.734 30.754-30.734 80.612 0 111.358M562.394 218.44l-485.38 485.38 111.376 111.358 485.38-485.38-111.376-111.358zM672.838 330.731c30.754-30.754 30.754-80.612 0-111.358-30.754-30.734-80.612-30.734-111.376 0M77.91 702.918c-30.754 30.754-30.754 80.62-0.001 111.358 30.754 30.754 80.612 30.754 111.358 0z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="close" unicode="" d="M908.188-12.344c-31.149-31.15-82.136-31.15-113.203 0l-283.156 283.188-283.118-283.188c-31.15-31.15-82.061-31.15-113.211 0s-31.15 82.136 0 113.287l283.138 283.104-283.14 283.17c-31.226 30.991-31.226 81.977 0 113.127 31.15 31.15 82.061 31.15 113.211 0l283.118-283.121 283.157 283.121c31.067 31.15 82.054 31.15 113.203 0 31.067-31.15 31.067-82.136-0.083-113.127l-283.102-283.17 283.101-283.104c31.15-31.151 31.235-82.136 0.083-113.287z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenjiantianjia" unicode="" d="M143.104 51.136l0 515.2 181.248 0L324.352 739.264l353.28 0c12.096 0 21.888-10.688 21.888-23.744L699.52 442.88l99.648 0L799.168 802.176C799.104 818.688 785.728 832 769.344 832L286.72 832l-243.2-228.416 0-637.696C43.52-50.624 56.832-64 73.28-64l535.616 0 0 91.264L165.056 27.264C152.96 27.264 143.104 38.016 143.104 51.136zM980.48 238.848 826.752 238.848 826.752 384 670.656 384 670.656 238.848 517.056 238.848 517.056 86.528 670.656 86.528 670.656-64 826.752-64 826.752 86.528 980.48 86.528Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="tag" unicode="" d="M256.064 556q0 30.272-21.44 51.712t-51.712 21.44-51.712-21.44-21.44-51.712 21.44-51.712 51.712-21.44 51.712 21.44 21.44 51.712zM865.792 226.848q0-30.272-21.12-51.456l-280.576-281.152q-22.272-21.12-52.032-21.12-30.272 0-51.456 21.12l-408.576 409.152q-21.696 21.12-36.864 57.728t-15.168 66.88l0 237.696q0 29.696 21.696 51.456t51.456 21.696l237.696 0q30.272 0 66.88-15.168t58.304-36.864l408.576-408q21.12-22.272 21.12-52.032z" horiz-adv-x="1025" />
|
||||
|
||||
|
||||
<glyph glyph-name="baocun" unicode="" d="M797.492708 831.355701l-42.913369 0 0-378.827955L308.210106 452.527746l0 378.827955L66.711889 831.355701 66.711889-61.346951l892.740514 0L959.452403 653.379217 797.492708 831.355701 797.492708 831.355701zM856.440262 6.178979 204.056977 6.178979 204.056977 385.001817l652.382261 0L856.439238 6.178979 856.440262 6.178979zM856.440262 6.178979M250.978636 339.227284l551.669488 0 0-70.961168L250.978636 268.266116 250.978636 339.227284 250.978636 339.227284zM250.978636 339.227284M250.978636 225.921705l551.669488 0 0-72.104201L250.978636 153.817504 250.978636 225.921705 250.978636 225.921705zM250.978636 225.921705M250.978636 114.903216l551.669488 0 0-70.952982L250.978636 43.950234 250.978636 114.903216 250.978636 114.903216zM250.978636 114.903216M580.608076 830.209598l103.007025 0 0-303.285444L580.608076 526.924153 580.608076 830.209598 580.608076 830.209598zM580.608076 830.209598" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="refresh" unicode="" d="M1011.53128473 469.77621528l-69.21093749-0.00656251c-30.0215625 219.39-218.175 388.408125-445.815 388.408125-86.893125 0-168.016875-24.645-236.80593751-67.2975-14.025-7.61625001-23.5471875-22.479375-23.54718749-39.5578125 0-24.8446875 20.1375-44.98125001 44.98124999-44.98124999 9.781875 0 18.8334375 3.133125 26.2153125 8.44312499 54.950625 33.9571875 119.7028125 53.57625001 189.0478125 53.57625001 177.931875 0 325.7015625-129.015 354.9271875-298.59375001l-77.2378125-0.0065625c-9.2934375 0-16.8309375-7.5375-16.83093749-16.8375 0-3.3065625 0.96-6.39 2.61187499-8.99156249l118.4775-205.16625001c2.9446875-4.9115625 8.3165625-8.2003125 14.4515625-8.2059375 6.016875 0.0065625 11.29125001 3.1621875 14.27156251 7.910625l0.06656249-0.00656249 118.4296875 205.17937499c1.7690625 2.6625 2.80124999 5.859375 2.80125001 9.30562501 0.00374999 9.2925-7.53375001 16.83-16.8346875 16.83v0zM1011.53128473 469.77621528zM746.18256295 125.20078124999998c-11.1796875 0-21.3336914-4.35673828-28.88085938-11.44335938-0.04482422 0.04482422-0.07382811 0.07822266-0.07382812 0.07822266-56.43896484-42.39140625-126.58535156-67.51582031-202.6116211-67.51582031-186.49335938 0-337.67314453 151.17978516-337.67314453 337.67753908 0 2.92060547 0.05185547 5.82802734 0.12480469 8.73105467l73.06171874-0.00615235c8.71787109 0 15.78427734 7.04882813 15.78427735 15.76142579 0 3.22382813-0.96767578 6.2279297-2.62441406 8.72314453l-111.02783205 192.35478515-0.06240233-0.00615234c-2.79492188 4.45166015-7.73964844 7.41621094-13.38134764 7.41621094-5.75332031-0.00615234-10.79384766-3.08320311-13.54833986-7.69482422l-0.01142578 0.00615234-111.06650391-192.3477539c-1.54511719-2.43896484-2.44511719-5.3296875-2.44511718-8.43134766 0-8.71787109 7.06640625-15.76669922 15.7790039-15.76669922l65.42226563-0.00615234c-0.05712891-2.90214845-0.10107421-5.81044922-0.10107422-8.73105469 0-233.00332031 188.87431641-421.87851564 421.87148438-421.87851562 96.04160155 0 184.57470702 32.11171875 255.48574218 86.15917968 1.09160156 0.75673828 2.14892578 1.56708983 3.16318361 2.41962891 0.29443359 0.23291017 0.59414063 0.45351563 0.89384763 0.68466798 0.00615234 0.01142578 0 0.03339844-0.01757812 0.08085936 8.6783203 7.72822266 14.14423828 18.97822265 14.14423829 31.51669922 0.00615234 23.31386719-18.89033204 42.21386719-42.20419922 42.21386719v0zM746.18256295 125.20078124999998z" horiz-adv-x="1231" />
|
||||
|
||||
|
||||
<glyph glyph-name="youxiashixin" unicode="" d="M97.419 191.661c98.598 0 420.117-0.058 552.16-0.058 51.299 0 55.136 28.019 55.136 56.482 0 125.133-0.074 424.154-0.074 553.608 0 36.054-34.471 33.304-49.16 20.734-104.078-104.078-476.528-472.53-578.403-574.406-22.861-25.312-12.333-56.36 20.341-56.36z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="paizhaoanniu" unicode="" d="M512 888.123077C234.023385 888.123077 7.876923 661.976615 7.876923 384s226.146462-504.123077 504.123077-504.123077 504.123077 226.146462 504.123077 504.123077S789.976615 888.123077 512 888.123077zM512-41.353846c-234.543262 0-425.353846 190.810585-425.353846 425.353846s190.810585 425.353846 425.353846 425.353846 425.353846-190.810585 425.353846-425.353846S746.543262-41.353846 512-41.353846zM512 777.846154c-217.513354 0-393.846154-176.3328-393.846154-393.846154 0-217.513354 176.3328-393.846154 393.846154-393.846154 217.513354 0 393.846154 176.3328 393.846154 393.846154C905.846154 601.513354 729.513354 777.846154 512 777.846154z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="huizhang" unicode="" d="M622.473 863.584h-399.141c-21.020 0-38.329-17.235-38.329-38.48v-152.979c0-21.207 13.995-48.558 31.248-60.996l172.837-124.543c6.294-4.533 12.177-6.444 17.085-6.070 2.21-0.374 4.496-0.599 6.819-0.599h191.61c3.072 0 6.070 0.374 8.937 1.049 5.377-1.461 12.195 0.299 19.615 5.619l172.837 124.543c17.253 12.439 31.248 39.79 31.248 60.996v152.979c0 21.245-17.311 38.48-38.33 38.48h-176.435zM568.67 796.366c0 15.924 12.777 28.85 28.774 28.85 15.886 0 28.774-12.777 28.774-28.85v-249.197c0-15.962-12.777-28.887-28.774-28.887-15.886 0-28.774 12.814-28.774 28.887v249.197zM396.019 796.366c0 15.924 12.777 28.85 28.774 28.85 15.886 0 28.774-12.777 28.774-28.85v-249.197c0-15.962-12.777-28.887-28.774-28.887-15.887 0-28.774 12.814-28.774 28.887v249.197zM511.119-95.584c148.334 0 268.567 120.231 268.567 268.566 0 148.333-120.233 268.565-268.567 268.565-148.334 0-268.566-120.234-268.566-268.565 0-148.335 120.234-268.566 268.566-268.566z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="hrgongzuotai" unicode="" d="M938.749 896 86.244 896C39.16 896 0.993 857.824 0.993 810.74l0-682.002c0-47.084 38.167-85.26 85.251-85.26L341.99 43.478l0-85.243-85.251 0 0-85.251 511.508 0 0 85.251-85.251 0 0 85.243 255.754 0c47.093 0 85.251 38.176 85.251 85.26L1024.001 810.74C1024 857.824 985.841 896 938.749 896zM597.752 725.489l255.745 0 0-255.745-85.251 0 0 85.251-85.251 0 0-85.251-85.243 0L597.752 725.489zM171.487 725.489l85.251 0 0-85.243 85.251 0 0 85.243 85.251 0 0-255.745L341.99 469.744l0 85.251-85.251 0 0-85.251-85.251 0L171.488 725.489zM938.749 213.99 86.244 213.99l0 85.251 852.505 0L938.749 213.99z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="tingzhi-copy" unicode="" d="M932 71.040c0-59.1-48-107.040-107.16-107.040h-625.68c-59.16 0-107.16 47.94-107.16 107.040v625.92c0 59.1 48 107.040 107.16 107.040h625.68c59.16 0 107.16-47.94 107.16-107.040v-625.92z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenjianjia" unicode="" d="M861.040535-7.894551c0-30.909987-25.074072-55.877635-55.924707-55.877635l-698.703239 0 97.848539 461.131449c0 30.879288 24.919553 55.906288 55.770188 55.906288L902.95925 453.26555c30.855752 0 55.828516-25.027 55.828516-55.906288L861.040535-7.894551 861.040535-7.894551 861.040535-7.894551zM218.161718 495.207801l628.870778 0L847.032496 550.098969c0 30.879288-25.076118 55.906288-55.877635 55.906288L455.787744 606.005256l0 50.658773c0 30.827099-25.027 55.877635-55.877635 55.877635L120.367415 712.541665c-30.855752 0-55.877635-25.050536-55.877635-55.877635l0-664.558581 97.747231 447.175599C162.237011 470.162382 187.311083 495.207801 218.161718 495.207801L218.161718 495.207801 218.161718 495.207801zM218.161718 495.207801" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="webtubiaoku08" unicode="" d="M588.053 859.785c-15.787 7.36-34.346 4.907-47.68-6.187l-257.386-214.239-205.333 0.853c-11.786 0-23.147-4.693-31.52-13.013-8.426-8.374-13.226-19.733-13.226-31.68l-0.907-422.826c0-11.947 4.693-23.36 13.013-31.787 8.374-8.426 19.787-13.174 31.733-13.174h207.573l256.106-213.386c8.16-6.773 18.454-10.346 28.693-10.346 6.4 0 12.907 1.44 18.934 4.267 15.787 7.307 25.76 23.093 25.76 40.48v870.505c0 17.387-10.027 33.12-25.76 40.533v0 0 0zM761.546 635.999c-22.027 10.453-48.266 0.907-59.040-21.013-10.72-22.027-1.44-48.693 20.426-59.733 2.827-1.493 69.92-36.32 69.92-135.573 0-105.973-62.72-205.92-64.8-207.093-22.133-11.093-31.093-38.027-20.053-60.053 7.894-15.787 23.68-24.8 40.16-24.8 6.667 0 13.547 1.493 19.894 4.693 4.693 2.4 114.293 123.947 114.293 287.253 0.053 157.653-115.893 213.973-120.8 216.32v0 0 0zM900.852 767.412c-20.64 13.28-48 7.253-61.493-13.387-13.44-20.587-7.52-48.32 13.013-61.867 4.8-3.2 119.467-81.28 119.467-275.733 0-194.88-110.027-337.973-114.347-340.959-20.64-13.76-26.134-41.44-12.427-62.080 8.64-12.907 22.826-19.894 37.28-19.894 8.48 0 17.173 2.453 24.8 7.52 6.293 4.213 154.239 170.453 154.239 415.413 0 245.439-153.92 346.826-160.533 350.986v0 0 0z" horiz-adv-x="1099" />
|
||||
|
||||
|
||||
<glyph glyph-name="database" unicode="" d="M512 457.142857q135.428571 0 253.142857 24.571429t185.714286 72.571429l0-97.142857q0-39.428571-58.857143-73.142857t-160-53.428571-220-19.714286-220 19.714286-160 53.428571-58.857143 73.142857l0 97.142857q68-48 185.714286-72.571429t253.142857-24.571429zm0-438.857143q135.428571 0 253.142857 24.571429t185.714286 72.571429l0-97.142857q0-39.428571-58.857143-73.142857t-160-53.428571-220-19.714286-220 19.714286-160 53.428571-58.857143 73.142857l0 97.142857q68-48 185.714286-72.571429t253.142857-24.571429zm0 219.428571q135.428571 0 253.142857 24.571429t185.714286 72.571429l0-97.142857q0-39.428571-58.857143-73.142857t-160-53.428571-220-19.714286-220 19.714286-160 53.428571-58.857143 73.142857l0 97.142857q68-48 185.714286-72.571429t253.142857-24.571429zm0 658.285714q118.857143 0 220-19.714286t160-53.428571 58.857143-73.142857l0-73.142857q0-39.428571-58.857143-73.142857t-160-53.428571-220-19.714286-220 19.714286-160 53.428571-58.857143 73.142857l0 73.142857q0 39.428571 58.857143 73.142857t160 53.428571 220 19.714286z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="chajian1" unicode="" d="M748.703 647.68c0 0-187.109-9.005-253.513-11.988-41.041-1.874-63.363 32.95-27.159 68.941 27.821 27.585 37.951 35.374 33.201 86.885-5.446 58.987-64.849 78.16-113.605 77.612-50.999-0.603-106.825-27.415-123.267-76.050-10.814-31.894-10.499-64.048 17.472-84.527 15.261-11.19 49.038-27.694 11.15-57.887-20.446-16.308-226.318 3.037-226.318 3.037s-9.070-175.646-2.615-225.681c3.69-28.751 39.511-42.205 62.983-11.107 36.206 47.923 136.307 16.655 141.372-77.426 5.325-98.703-100.665-113.915-123.29-75.415-21.118 35.98-81.445 44.93-84.060-0.958-4.047-71.451 29.62-298.799 29.62-298.799s135.318-31.766 196.307-21.997c28.332 4.588 41.338 53.169 15.077 75.984-24.156 20.962-29.221 133.023 96.846 120.151 98.637-10.073 82.162-95.579 57.063-111.199-24.143-14.973-22.994-61.635 27.182-74.895 68.656-18.193 276.918 26.67 276.918 26.67s-27.517 167.74-18.308 222.096c9.838 58.199 77.021 23.083 85.414 11.967 54.331-71.924 167.001-32.608 167.001 88.124 0 175.828-160.895 145.936-176.036 103.699-16.735-46.511-72.117-34.589-78.135-6.011-14.145 66.754 8.7 248.777 8.7 248.777z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="caidan" unicode="" d="M511.674077-24.975579M307.012837 623.118006C307.012837 604.279962 291.741016 589.00814 272.902972 589.00814L136.461463 589.00814C117.623419 589.00814 102.351598 604.279962 102.351598 623.118006L102.351598 759.559515C102.351598 778.397558 117.623419 793.66938 136.461463 793.66938l136.440485 0C291.741016 793.66938 307.012837 778.397558 307.012837 759.559515L307.012837 623.118006zM614.004697 623.118006C614.004697 604.279962 598.732875 589.00814 579.894831 589.00814L443.453323 589.00814C424.615279 589.00814 409.343457 604.279962 409.343457 623.118006L409.343457 759.559515C409.343457 778.397558 424.615279 793.66938 443.453323 793.66938l136.440485 0C598.732875 793.66938 614.004697 778.397558 614.004697 759.559515L614.004697 623.118006zM920.996556 623.118006C920.996556 604.279962 905.724735 589.00814 886.886691 589.00814L750.445182 589.00814C731.607138 589.00814 716.335317 604.279962 716.335317 623.118006L716.335317 759.559515C716.335317 778.397558 731.607138 793.66938 750.445182 793.66938l136.440485 0C905.724735 793.66938 920.996556 778.397558 920.996556 759.559515L920.996556 623.118006zM307.012837 316.126146C307.012837 297.288103 291.741016 282.016281 272.902972 282.016281L136.461463 282.016281C117.623419 282.016281 102.351598 297.288103 102.351598 316.126146L102.351598 452.567655c0 18.839067 15.271822 34.109866 34.109866 34.109866l136.440485 0C291.741016 486.677521 307.012837 471.405699 307.012837 452.567655L307.012837 316.126146zM614.004697 316.126146C614.004697 297.288103 598.732875 282.016281 579.894831 282.016281L443.453323 282.016281C424.615279 282.016281 409.343457 297.288103 409.343457 316.126146L409.343457 452.567655c0 18.839067 15.271822 34.109866 34.109866 34.109866l136.440485 0C598.732875 486.677521 614.004697 471.405699 614.004697 452.567655L614.004697 316.126146zM920.996556 316.126146C920.996556 297.288103 905.724735 282.016281 886.886691 282.016281L750.445182 282.016281C731.607138 282.016281 716.335317 297.288103 716.335317 316.126146L716.335317 452.567655c0 18.839067 15.271822 34.109866 34.109866 34.109866l136.440485 0C905.724735 486.677521 920.996556 471.405699 920.996556 452.567655L920.996556 316.126146zM307.012837 9.134287C307.012837-9.703757 291.741016-24.975579 272.902972-24.975579L136.461463-24.975579C117.623419-24.975579 102.351598-9.703757 102.351598 9.134287L102.351598 145.575796C102.351598 164.413839 117.623419 179.685661 136.461463 179.685661l136.440485 0C291.741016 179.685661 307.012837 164.413839 307.012837 145.575796L307.012837 9.134287zM614.004697 9.134287C614.004697-9.703757 598.732875-24.975579 579.894831-24.975579L443.453323-24.975579C424.615279-24.975579 409.343457-9.703757 409.343457 9.134287L409.343457 145.575796C409.343457 164.413839 424.615279 179.685661 443.453323 179.685661l136.440485 0C598.732875 179.685661 614.004697 164.413839 614.004697 145.575796L614.004697 9.134287zM920.996556 9.134287C920.996556-9.703757 905.724735-24.975579 886.886691-24.975579L750.445182-24.975579C731.607138-24.975579 716.335317-9.703757 716.335317 9.134287L716.335317 145.575796C716.335317 164.413839 731.607138 179.685661 750.445182 179.685661l136.440485 0C905.724735 179.685661 920.996556 164.413839 920.996556 145.575796L920.996556 9.134287z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wangluo" unicode="" d="M928 128L928 443.84 544 443.84 544 640 640 640 640 896 384 896 384 640 480 640 480 443.84 96 443.84 96 128 0 128 0-128 256-128 256 128 160 128 160 379.84 480 379.84 480 128 384 128 384-128 640-128 640 128 544 128 544 379.84 864 379.84 864 128 768 128 768-128 1024-128 1024 128Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dayin" unicode="" d="M318.7-60h381.9c35.1 0 62.4 29.5 62.4 64.7V195H256v-190.3c0-35.2 27.6-64.7 62.7-64.7zM700.6 831H318.7c-35.1 0-62.7-27.4-62.7-62.6V579h507V768.4c0 35.2-27.3 62.6-62.4 62.6zM827 579v-65H192v65h-64.2C92.6 579 65 549 65 513.8v-445.5c0-35.2 27.6-64.3 62.8-64.3H192V259h635v-255h64.5c35.1 0 64.5 29.1 64.5 64.3V513.8c0 35.2-29.3 65.2-64.5 65.2H827z m0-194H637v65h190v-65z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiantiao-xiexian" unicode="" d="M886.1866666666666 805.44l45.12-54.72L133.54666666666665-38.39999999999998l-54.72 54.72L876.5866666666667 805.44h9.6z" horiz-adv-x="1025" />
|
||||
|
||||
|
||||
<glyph glyph-name="user" unicode="" d="M740.112 204.723c111.219-27.527 193.536-127.832 193.536-247.396v-29.725h-843.294v29.725c0 115.027 76.39 212.391 181.2 243.816 75.268 18.198 132.474 80.244 140.317 145.251-39.568 27.295-70.108 68.248-80.588 114.030l-36.077 157.614c-27.552 120.369 50.113 217.727 173.406 217.727h83.541c123.548 0 202.801-97.819 177.586-218.485l-32.631-156.155c-10.057-48.125-42.184-90.93-83.908-118.271 6.014-61.882 57.113-117.829 126.914-138.131z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="kaishi" unicode="" d="M892.981938 439.753222c46.461212-32.522848 46.461212-78.98406 0-111.506909l-669.041452-441.381513c-46.461212-32.522848-83.630181-9.292242-83.630181 46.461212v901.347511c0 55.753454 37.16897 78.98406 83.630181 46.461212l669.041452-441.381513z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="hebing" unicode="" d="M51.2 768h204.8c10.24-15.36 153.6-256 153.6-256l-51.2-102.4-153.6 256H51.2c-25.6 0-51.2 25.6-51.2 51.2s25.6 51.2 51.2 51.2zM1013.76 384L819.2 256c-15.36-15.36-35.84-15.36-51.2 0v102.4h-204.8l-204.8-358.4H51.2c-25.6 0-51.2 25.6-51.2 51.2s25.6 51.2 51.2 51.2h256l204.8 358.4h256v102.4c15.36 15.36 35.84 15.36 51.2 0l194.56-133.12c15.36-15.36 15.36-35.84 0-46.08z" horiz-adv-x="1025" />
|
||||
|
||||
|
||||
<glyph glyph-name="liaotian" unicode="" d="M360.25265131 388.98089003a55.19988984 55.19988984 0 0 0-54.35989102-55.91988808 55.19988984 55.19988984 0 0 0-54.35989101 55.91988808 55.19988984 55.19988984 0 0 0 54.35989101 55.97988839c29.99993994 0 54.35989102-25.07995019 54.35989102-55.97988839z m413.39917354 0a55.19988984 55.19988984 0 0 0-54.35989102-55.91988808 55.19988984 55.19988984 0 0 0-54.3598919 55.91988808 55.19988984 55.19988984 0 0 0 54.3598919 55.97988839c30.05994023 0 54.35989102-25.07995019 54.35989102-55.97988839z m-207.23958545 0a55.19988984 55.19988984 0 0 0-54.3598919-55.91988808 55.19988984 55.19988984 0 0 0-54.35989101 55.91988808 55.19988984 55.19988984 0 0 0 54.35989101 55.97988839c29.99993994 0 54.35989102-25.07995019 54.3598919-55.97988839zM499.33237328-65.9982c265.07946973 0 479.99903994 201.47959687 479.99903994 449.9991C979.33141323 632.52040313 764.41184301 834 499.33237328 834S19.33333334 632.52040313 19.33333334 384.0009c0-93.17981338 30.23993935-179.75964023 81.95983594-251.57949697L57.01325805-16.19829961000005c-8.51998271-28.43994287 8.21998388-46.31990713 37.19992587-39.95992002l184.43963057 40.37991944A503.87899219 503.87899219 0 0 1 499.33237328-65.9982z" horiz-adv-x="1092" />
|
||||
|
||||
|
||||
<glyph glyph-name="dingshi" unicode="" d="M511.94368 777.31328c-239.01184 0-434.51904-195.61984-434.51904-434.52416 0-238.8992 195.5072-434.72896 434.51904-434.72896 239.01696 0 434.62656 195.61472 434.62656 434.63168 0 239.0016-195.6096 434.62144-434.62656 434.62144z m182.57408-617.20576L468.4288 299.06944V559.89248h65.20832v-225.98144l195.5072-117.36576-34.62656-56.43776z m199.00928 494.02368l-154.84416 154.74176 51.07712 51.06688 154.73152-154.73664-50.96448-51.072zM77.42976 705.2032L232.16128 859.93984l51.072-51.06688L128.49664 654.1312l-51.06688 51.072z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiejiantou" unicode="" d="M845.871 776.903l53.338000000000015-53.385999999999996-780.1-787.387-53.338000000000015 53.385999999999996zM958.23 502.855l-329.015 329.01499999999993 329.015 5.684341886080802e-14z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="peizhi" unicode="" d="M1021.376 241.856c1.472-8.768 1.152-19.264-1.152-31.616-2.112-12.352-5.76-24.96-10.88-37.632-5.12-12.736-11.264-24.192-18.496-34.368-7.232-10.24-15.36-17.472-24-21.824-8.768-4.416-16.384-6.592-22.976-6.592-6.528 0-13.76 1.408-21.76 4.352-7.232 2.176-16.384 4.16-27.264 6.016-11.008 1.792-22.016 2.112-33.344 1.088-11.264-1.088-22.528-3.456-33.728-7.04s-20.992-9.856-28.864-18.56c-17.472-18.176-27.776-38.912-30.656-62.208s0.384-45.44 9.856-66.56c7.232-14.592 6.144-29.056-3.264-43.648-4.352-5.824-11.392-11.84-20.736-17.984-9.472-6.208-19.904-11.84-31.104-16.96s-23.104-9.088-35.52-12.032c-12.352-2.816-23.232-4.288-32.768-4.288-6.528 0-12.608 2.56-18.496 7.616-5.76 5.12-9.728 10.624-12.032 16.384h-1.088c-8 22.592-21.632 41.984-40.896 58.368s-41.6 24.576-67.136 24.576c-24.704 0-47.104-8.192-67.072-24.576-20.032-16.384-34.048-35.456-42.048-57.28-3.648-8.768-9.088-15.104-16.384-19.136-7.168-3.968-15.168-5.952-23.936-5.952-10.176 0-21.632 1.792-34.368 5.504-12.736 3.648-25.472 8.192-38.208 13.632s-24.192 11.84-34.368 19.136c-10.176 7.232-17.792 14.528-22.912 21.76-3.648 5.12-5.632 11.136-6.016 17.984-0.384 6.912 2.368 16.576 8.192 28.928 8 16.768 11.072 35.84 9.28 57.344-1.792 21.44-11.072 41.28-27.84 59.456-10.176 10.944-22.528 17.984-37.056 21.248-14.592 3.328-28.352 4.544-41.472 3.84-15.296-0.704-30.912-3.648-46.912-8.768-10.176-2.88-20.352-2.112-30.592 2.24-8 2.88-15.424 9.6-22.4 20.096-6.912 10.56-13.056 22.272-18.56 34.944A217.687 217.687 0 0 0 9.856 208.64c-2.88 13.44-3.648 24.512-2.176 33.28 2.176 16 9.408 26.176 21.824 30.528 21.824 8.768 41.408 23.104 58.88 43.136s26.176 42.368 26.176 67.136c0 25.408-8.704 47.616-26.176 66.56s-37.12 32.704-58.88 41.472c-6.4 2.048-11.84 7.296-16.192 15.68s-6.592 16.96-6.592 25.6c0 9.472 1.472 20.032 4.352 31.68s6.72 22.912 11.456 33.856c4.736 10.88 10.24 20.864 16.384 30.016 6.208 9.024 12.928 15.808 20.16 20.16 5.824 3.648 11.52 5.056 16.96 4.352 5.44-0.704 11.456-2.176 17.984-4.352 21.824-8.768 44.544-11.456 68.224-8.192 23.616 3.264 44.544 13.632 62.72 31.04 8.704 8.768 15.04 19.52 19.072 32.192 3.968 12.8 6.592 25.344 7.616 37.696 1.152 12.352 1.152 23.616 0 33.792-1.024 10.24-1.984 17.472-2.688 21.824-1.472 4.352-2.752 9.472-3.84 15.296s-0.512 10.944 1.6 15.296c4.352 10.176 12.16 19.072 23.488 26.688 11.264 7.616 23.424 14.016 36.544 19.136 13.12 5.056 25.856 8.832 38.208 11.456 12.352 2.56 22.208 3.84 29.44 3.84 9.408 0 16.896-3.072 22.4-9.28 5.44-6.208 9.216-12.608 11.392-19.136 8-19.648 21.12-36.864 39.296-51.84 18.176-14.912 39.68-22.4 64.384-22.4 25.472 0 48 7.104 67.648 21.312 19.648 14.208 33.472 32.192 41.472 54.016 2.88 5.824 7.488 11.84 13.632 17.984 6.144 6.208 12.48 9.28 19.136 9.28 10.112 0 21.248-1.408 33.28-4.352 12.032-2.88 23.872-6.912 35.392-12.032a133.501 133.501 0 0 0 32.256-19.648c9.856-8 17.6-16.704 23.488-26.176 3.648-5.824 4.736-12.16 3.264-19.072s-2.88-11.84-4.352-14.72c-9.472-21.12-12.352-43.264-8.768-66.56 3.648-23.232 14.272-43.648 31.616-61.12 17.472-17.472 38.976-27.072 64.384-28.928 25.472-1.792 49.152 2.368 70.976 12.544 5.76 3.648 12.864 5.12 21.248 4.352s15.36-4.032 21.248-9.792c10.88-10.176 20.48-25.664 28.864-46.4s14.016-41.664 16.896-62.72c1.472-12.352-0.512-22.016-5.888-28.928-5.504-6.848-11.136-11.456-17.024-13.632-22.528-8-41.728-22.016-57.728-41.984s-24-42.752-24-68.16c0-24.768 6.72-46.4 20.096-64.96 13.504-18.496 31.104-31.808 52.864-39.808 5.12-2.88 9.472-5.824 13.12-8.704 8-6.528 13.504-14.912 16.384-25.088zM514.048 143.68c32.704 0 63.68 6.208 92.672 18.56 29.12 12.352 54.4 29.44 75.904 51.264 21.504 21.888 38.4 47.104 50.752 75.84 12.352 28.736 18.496 59.52 18.496 92.16 0 32.768-6.144 63.488-18.496 92.16-12.352 28.736-29.248 53.888-50.752 75.328s-46.72 38.4-75.904 50.752c-28.992 12.352-60.032 18.56-92.672 18.56-32.704 0-63.488-6.208-92.224-18.56-28.672-12.352-53.824-29.312-75.2-50.752-21.44-21.44-38.4-46.592-50.752-75.328-12.352-28.672-18.56-59.456-18.56-92.16 0-32.704 6.208-63.424 18.56-92.16 12.352-28.672 29.312-53.952 50.752-75.84 21.44-21.824 46.592-38.848 75.264-51.264 28.736-12.352 59.456-18.56 92.16-18.56z m0 0" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiangmuzuhe" unicode="" d="M265.7 463.004l224.396-109.612v257.39l-224.396 107.047v-254.828zM532.366 608.22v-255.153l221.458 107.047v256.086l-221.458-107.934zM512.838 852.002l-218.476-104.112 218.57-104.111 215.54 104.111-215.634 104.112zM0.108 25.072l224.349-109.612v257.39l-224.349 107.047v-254.828zM266.727 170.288v-255.153l221.458 107.047v256.085l-221.458-107.98zM247.246 414.072l-218.57-104.113 218.57-104.111 215.587 104.111-215.586 104.112zM535.814 25.073l224.348-109.612v257.389l-224.348 107.047v-254.828zM802.479 170.289v-255.153l221.411 107.047v256.084l-221.411-107.98zM782.905 414.072l-218.476-104.112 218.523-104.111 215.587 104.111-215.586 104.112z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xitongcanshupeizhi" unicode="" d="M1185.44635 271.562123c-6.20083 10.753338-17.739083 16.483219-29.355828 15.776795H955.466199c-6.043847 0-11.616745-1.648322-16.48322-4.552508-5.337423-2.668712-9.968423-6.907254-13.186575-12.480151l-100.626128-174.251173c-4.631-8.006135-5.337423-17.111151-2.825694-25.274269 0.706424-2.433237 1.726813-4.866474 3.061169-7.142729l97.094009-168.207326c3.767593-13.343558 16.01227-23.154998 30.533201-23.154998h200.859798c12.323169-1.648322 24.960303 4.160051 31.632083 15.619813l99.527246 172.288885c2.354746 4.003067 3.689101 8.398593 4.081559 12.715626 2.197763 7.927643 1.334356 16.718694-3.061169 24.410862l-100.626128 174.251173z m-57.926741-317.18423H982.624264l-72.133706 124.958499L982.38879 203.74545h144.973836l72.133706-124.801515-71.976723-124.566042zM923.991099 503.34758c4.317034-12.40166 16.090761-21.349693 29.983761-21.349694h202.50812c1.098881 0 2.197763 0.078492 3.296643 0.156983 10.439372 0.470949 20.486287 6.122339 26.059185 15.855287l98.899314 171.50397c2.197763 3.767593 3.453627 7.77066 4.003068 11.773728 2.668712 8.24161 1.962288 17.503609-2.668712 25.588235L1185.995791 880.185364c-6.357813 10.988813-18.288524 16.718694-30.140744 15.698304H956.800554c-6.20083 0-11.930711-1.805305-16.797185-4.866474-5.494406-2.668712-10.282389-6.985745-13.500541-12.637135L826.504632 705.070784c-2.668712-4.631-4.003067-9.575965-4.238542-14.599422-0.470949-6.122339 0.863407-12.40166 4.160051-18.131541l97.564958-168.992241z m59.88903 310.590942h145.758751L1201.615603 689.607955l-72.369181-124.880007H983.644654L911.589439 689.058514l72.29069 124.880008zM843.92975 316.380781V447.304635c-21.663659-0.156983-43.641285 5.258932-63.735114 16.875676-60.595453 35.007218-81.160231 112.792313-45.917539 173.780224L620.935343 703.343971c-10.753338-18.916456-26.451642-35.321184-46.623962-46.937929C513.794419 621.477316 436.244798 642.513043 401.002106 703.343971l-113.420245-65.461927c10.910321-18.680982 17.268134-40.423132 17.189642-63.656622 0-69.778961-56.82786-126.449838-126.999278-126.685313v-130.923854c21.585168 0.078492 43.40581-5.337423 63.421148-16.875677 60.359978-34.850235 81.003248-112.242873 46.231505-173.152291l113.341753-65.461927c10.674847 18.680982 26.294659 34.850235 46.231505 46.309996 60.43847 34.928726 137.831108 14.049982 173.152292-46.623962L733.570673 126.274321c-10.83183 18.60249-17.03266 40.266149-17.032659 63.342656 0.078492 69.935944 57.063335 126.606821 127.391736 126.763804z m-197.877121-12.715627C603.039277 229.176703 507.750572 203.74545 433.183629 246.837294c-74.566943 43.013353-100.155179 138.302057-57.220318 212.712018 42.934861 74.40996 138.223566 99.841213 212.790509 56.82786 74.645435-43.091844 100.23367-138.302057 57.298809-212.712018z" horiz-adv-x="1723" />
|
||||
|
||||
|
||||
<glyph glyph-name="qukuai" unicode="" d="M128.456 766.443h767.088v-156.183h-767.088v156.183zM128.456 510.454h171.367v-508.897h-171.367v508.897zM382.952 510.454h512.591v-508.897h-512.591v508.897z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="fenzhi" unicode="" d="M551.79122223 644.016h234.756v-100.845c14.208-14.21 33.157-14.21 47.367 0l179.995 118.419c14.21 9.473 14.21 28.42 0 42.63l-179.995 123.155c-14.21 14.21-33.159 14.21-47.367 0v-88.623h-282.124l-189.467-331.57h-189.469v-0.324h-48.088c-23.683 0-47.367-23.684-47.367-47.368s23.684-47.367 47.367-47.367h284.204l-0.162 0.324h0.883l189.468 331.569zM833.91222223 216.78300000000002c-14.21 14.21-33.159 14.21-47.367 0v-93.804h-140.022l-142.103 236.835-47.367-94.734s132.628-222.626 142.102-236.835h187.388v-95.664c14.208-14.21 33.157-14.21 47.367 0l179.995 118.419c14.21 9.472 14.21 28.42 0 42.63l-179.994 123.154z" horiz-adv-x="1820" />
|
||||
|
||||
|
||||
<glyph glyph-name="icon-test" unicode="" d="M544.992-2.734v278.084h73.056v212.098h-73.056v351.139h-490.181v-68.342h421.837v-282.796h-68.342v-212.098h68.342v-346.425h490.181v68.342z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="icon-test1" unicode="" d="M618.048 394.237v68.342h-209.739v-68.342h-282.796v421.837h-70.7v-490.181h353.495v-73.056h209.739v73.056h280.439v-421.837h68.342v490.181z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiaoxuxian" unicode="" d="M949.4280555521055 821.4280555521059c17.25595095038475-17.25595095038474 17.256927352294475-45.23279486943493 1.4717196240837192e-14-62.4897222217294l-54.67850694401322-54.67850694401324c-17.25595095038474-17.25595095038475-45.229865663705795-17.25985655802361-62.4897222217294-1.4717196240837192e-14-17.25595095038475 17.25595095038474-17.256927352294475 45.23279486943493-1.4717196240837192e-14 62.4897222217294L886.9383333303762 821.4280555521061c17.25595095038474 17.25595095038475 45.229865663705795 17.25985655802361 62.4897222217294 1.4717196240837192e-14z m-378.84394096923455-378.84394096923455c17.25595095038475-17.25595095038474 17.256927352294475-45.23279486943493 1.4717196240837192e-14-62.4897222217294l-54.67850694401322-54.67850694401324c-17.25595095038474-17.25595095038475-45.229865663705795-17.25985655802361-62.4897222217294-1.4717196240837192e-14-17.25595095038475 17.25595095038474-17.256927352294475 45.23279486943493-1.4717196240837192e-14 62.4897222217294l54.67850694401322 54.67850694401324c17.25595095038474 17.25595095038475 45.229865663705795 17.25985655802361 62.4897222217294 1.4717196240837192e-14z m189.42197048461728 189.42197048461728c17.25595095038475-17.25595095038474 17.256927352294475-45.23279486943493 1.4717196240837192e-14-62.4897222217294l-54.67850694401322-54.67850694401324c-17.25595095038474-17.25595095038475-45.229865663705795-17.25985655802361-62.4897222217294-1.4717196240837192e-14-17.25595095038475 17.25595095038474-17.256927352294475 45.23279486943493-1.4717196240837192e-14 62.4897222217294l54.67850694401322 54.67850694401324c17.25595095038474 17.25595095038475 45.229865663705795 17.25985655802361 62.4897222217294 1.4717196240837192e-14z m-568.2659114538517-568.2659114538519c17.25595095038475-17.25595095038474 17.256927352294475-45.23279486943493 1.4717196240837192e-14-62.4897222217294l-54.67850694401322-54.67850694401324c-17.25595095038474-17.25595095038475-45.229865663705795-17.25985655802361-62.4897222217294-1.4717196240837192e-14-17.25595095038475 17.25595095038474-17.256927352294475 45.23279486943493-1.4717196240837192e-14 62.4897222217294l54.67850694401322 54.67850694401324c17.25595095038474 17.25595095038475 45.229865663705795 17.25985655802361 62.4897222217294 1.4717196240837192e-14z m189.42197048461728 189.42197048461728c17.25595095038475-17.25595095038474 17.256927352294475-45.23279486943493 1.4717196240837192e-14-62.4897222217294l-54.67850694401322-54.67850694401324c-17.25595095038474-17.25595095038475-45.229865663705795-17.25985655802361-62.4897222217294-1.4717196240837192e-14-17.25595095038475 17.25595095038474-17.256927352294475 45.23279486943493-1.4717196240837192e-14 62.4897222217294l54.67850694401322 54.67850694401324c17.25595095038474 17.25595095038475 45.229865663705795 17.25985655802361 62.4897222217294 1.4717196240837192e-14z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
||||
|
||||
</font>
|
||||
</defs></svg>
|
||||
|
After Width: | Height: | Size: 35 KiB |
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconflow.ttf
Normal file
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconflow.ttf
Normal file
Binary file not shown.
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconflow.woff
Normal file
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconflow.woff
Normal file
Binary file not shown.
89
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconfont.css
Normal file
89
WaterCloud.Web/wwwroot/js/lay-module/flow/fonts/iconfont.css
Normal file
@@ -0,0 +1,89 @@
|
||||
|
||||
@font-face {font-family: "iconflow";
|
||||
src: url('iconflow.eot?t=1501167404138'); /* IE9*/
|
||||
src: url('iconflow.eot?t=1501167404138#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('iconflow.woff?t=1501167404138') format('woff'), /* chrome, firefox */
|
||||
url('iconflow.ttf?t=1501167404138') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
||||
url('iconflow.svg?t=1501167404138#iconflow') format('svg'); /* iOS 4.1- */
|
||||
}
|
||||
|
||||
.iconflow {
|
||||
font-family:"iconflow" !important;
|
||||
font-size:16px;
|
||||
font-style:normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.i-zhizhen1:before { content: "\e602"; }
|
||||
|
||||
.i-msnui-close-fat:before { content: "\e674"; }
|
||||
|
||||
.i-close:before { content: "\e61a"; }
|
||||
|
||||
.i-wenjiantianjia:before { content: "\e659"; }
|
||||
|
||||
.i-tag:before { content: "\e6f9"; }
|
||||
|
||||
.i-conowredo:before { content: "\e672"; }
|
||||
|
||||
.i-conowrevoke:before { content: "\e673"; }
|
||||
|
||||
.i-baocun:before { content: "\e63d"; }
|
||||
|
||||
.i-refresh:before { content: "\e607"; }
|
||||
|
||||
.i-youxiashixin:before { content: "\e6b7"; }
|
||||
|
||||
.i-paizhaoanniu:before { content: "\e6bd"; }
|
||||
|
||||
.i-huizhang:before { content: "\e611"; }
|
||||
|
||||
.i-hrgongzuotai:before { content: "\e600"; }
|
||||
|
||||
.i-tingzhi-copy:before { content: "\e609"; }
|
||||
|
||||
.i-wenjianjia:before { content: "\e7a0"; }
|
||||
|
||||
.i-webtubiaoku08:before { content: "\e643"; }
|
||||
|
||||
.i-database:before { content: "\e742"; }
|
||||
|
||||
.i-chajian1:before { content: "\e66c"; }
|
||||
|
||||
.i-caidan:before { content: "\e649"; }
|
||||
|
||||
.i-wangluo:before { content: "\e62b"; }
|
||||
|
||||
.i-dayin:before { content: "\e671"; }
|
||||
|
||||
.i-user:before { content: "\e6af"; }
|
||||
|
||||
.i-kaishi:before { content: "\e700"; }
|
||||
|
||||
.i-hebing:before { content: "\e606"; }
|
||||
|
||||
.i-liaotian:before { content: "\e61b"; }
|
||||
|
||||
.i-dingshi:before { content: "\e633"; }
|
||||
|
||||
.i-xiejiantou:before { content: "\e605"; }
|
||||
|
||||
.i-peizhi:before { content: "\e678"; }
|
||||
|
||||
.i-xiangmuzuhe:before { content: "\e872"; }
|
||||
|
||||
.i-xitongcanshupeizhi:before { content: "\e68f"; }
|
||||
|
||||
.i-qukuai:before { content: "\e663"; }
|
||||
|
||||
.i-fenzhi:before { content: "\e60c"; }
|
||||
|
||||
.i-icon-test:before { content: "\e60d"; }
|
||||
|
||||
.i-icon-test1:before { content: "\e60e"; }
|
||||
|
||||
.i-xiaoxuxian:before { content: "\e675"; }
|
||||
|
||||
.i-jianchagongjuzhixian:before { content: "\e624"; }
|
||||
|
||||
File diff suppressed because one or more lines are too long
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/img/wallbg.png
Normal file
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/img/wallbg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/img/waterflow_icon.png
Normal file
BIN
WaterCloud.Web/wwwroot/js/lay-module/flow/img/waterflow_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
427
WaterCloud.Web/wwwroot/js/lay-module/flow/waterflow.export.js
Normal file
427
WaterCloud.Web/wwwroot/js/lay-module/flow/waterflow.export.js
Normal file
@@ -0,0 +1,427 @@
|
||||
/*
|
||||
* 导出流程图文件并下载的扩展包方法
|
||||
*/
|
||||
;(function ( global, factory ) {
|
||||
'use strict';
|
||||
if ( typeof define !== 'undefined' && define.amd ) { // export as AMD...
|
||||
define( ['jquery','WaterFlow'], factory );
|
||||
}
|
||||
else if ( typeof module !== 'undefined' && module.exports ) { // ...or as browserify
|
||||
factory( require('jquery'), require('WaterFlow') );
|
||||
}else
|
||||
factory( global.$, global.WaterFlow );
|
||||
|
||||
}( typeof window !== 'undefined' ? window : this, function ( $,WaterFlow ) {
|
||||
if(WaterFlow.prototype.exportDiagram && typeof WaterFlow.prototype.exportDiagram==='function'){
|
||||
return;//防止多次载入
|
||||
}
|
||||
var Cmder = {
|
||||
//构建背景
|
||||
initBg : function(width,height,bgColor){
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
var ctx = canvas.getContext('2d');
|
||||
if(bgColor) ctx.fillStyle = bgColor;
|
||||
ctx.fillRect(0,0,canvas.width,canvas.height);
|
||||
ctx.save();
|
||||
return canvas;
|
||||
},
|
||||
_toNum: function(str){
|
||||
return str!==null&&str!==''? parseInt(str.split('px')[0],10):undefined;
|
||||
},
|
||||
_analyseLabel: function(labelDom){
|
||||
var tagName = labelDom[0].tagName;
|
||||
var offsetLeft = labelDom[0].offsetLeft;
|
||||
var offsetTop = labelDom[0].offsetTop;
|
||||
if(tagName==='TD'){
|
||||
offsetLeft += labelDom.children("div")[0].offsetLeft;
|
||||
offsetTop += labelDom.children("div")[0].offsetTop;
|
||||
}
|
||||
|
||||
var lineHeight = this._toNum(labelDom.css("line-height"));
|
||||
var fontSize = labelDom.css('font-size');
|
||||
return {
|
||||
font: fontSize+' '+labelDom.css('font-family'),
|
||||
fontSize: this._toNum(fontSize.split("px")[0]),
|
||||
text: labelDom.text(),//文字内容
|
||||
color: labelDom.css('color'),//文字颜色
|
||||
width: labelDom[0].offsetWidth,//文字容器宽度
|
||||
height: labelDom[0].offsetHeight,//文字容器高度
|
||||
lineHeight:lineHeight,
|
||||
offsetLeft:offsetLeft,
|
||||
offsetTop:offsetTop,
|
||||
lineNum: Math.ceil(labelDom[0].offsetHeight/lineHeight)//文字要分几行?
|
||||
};
|
||||
},
|
||||
_analyseIcon: function(iconDom){
|
||||
var bgImg = iconDom.css("background-image");
|
||||
var property={
|
||||
// top: this._toNum(iconDom[0].style.top),//
|
||||
// left: this._toNum(iconDom[0].style.left),//
|
||||
offsetLeft:iconDom[0].offsetLeft,
|
||||
offsetTop:iconDom[0].offsetTop,
|
||||
width: iconDom.width(),
|
||||
height: iconDom.height()
|
||||
};
|
||||
|
||||
if(bgImg && bgImg!=='none'){//CSS SPITE背景图式
|
||||
bgImg = bgImg.replace(/"/g,"").split("url(")[1];
|
||||
property.backgroundImage=bgImg.substr(0,bgImg.length-1);//图标背景图
|
||||
bgImg = iconDom.css("background-position").split(" ");
|
||||
property.pX = parseFloat(bgImg[0].split("px")[0])*-1;//图标背景定位X
|
||||
property.pY = parseFloat(bgImg[1].split("px")[0])*-1;//图标背景定位Y
|
||||
}else{//矢量图标字体式
|
||||
$.extend(property,{
|
||||
font: iconDom.css('font-size')+' '+iconDom.css('font-family').split(' ')[0],//图标矢量字体库
|
||||
lineHeight : this._toNum(iconDom.css('line-height')),//图标矢量字体行高
|
||||
color: iconDom.css('color'),//图标矢量字体颜色
|
||||
opacity: parseFloat(iconDom.css("opacity")),//图标矢量透明度
|
||||
content:window.getComputedStyle(iconDom[0],'::before').getPropertyValue('content')
|
||||
});
|
||||
}
|
||||
|
||||
return property;
|
||||
},
|
||||
_analyseArea : function(areaDom){
|
||||
var bg=areaDom.children(".bg");
|
||||
return {
|
||||
top: this._toNum(areaDom[0].style.top),
|
||||
left: this._toNum(areaDom[0].style.left),
|
||||
width: areaDom.outerWidth(),
|
||||
height: areaDom.outerHeight(),
|
||||
borderColor: bg.css('border-top-color'),//区域边框颜色
|
||||
bgColor: bg.css('background-color'),//区域块背景色
|
||||
opacity: parseFloat(bg.css("opacity")),//区域块透明度
|
||||
icon: this._analyseIcon(areaDom.children('i')),
|
||||
label: this._analyseLabel(areaDom.children("label"))
|
||||
};
|
||||
},
|
||||
_analyseNode : function(nodeDom){
|
||||
var property={
|
||||
top: this._toNum(nodeDom[0].style.top),//
|
||||
left: this._toNum(nodeDom[0].style.left),//
|
||||
width: nodeDom.outerWidth(),//
|
||||
height: nodeDom.outerHeight(),//
|
||||
borderColor: nodeDom.css('border-top-color'),//节点边框颜色
|
||||
borderWidth: this._toNum(nodeDom.css('border-top-width')),//节点边框宽度
|
||||
bgColor: nodeDom.css('background-color'),//节点背景色
|
||||
borderRadius: this._toNum(nodeDom.css("border-top-left-radius")),//节点圆角半径
|
||||
boxShadow: nodeDom.css("box-shadow"),//节点阴影
|
||||
icon: this._analyseIcon(nodeDom.find('i'))
|
||||
};
|
||||
if(nodeDom.hasClass("item_round")){
|
||||
property.label = this._analyseLabel(nodeDom.children(".span"));
|
||||
}else{
|
||||
property.label = this._analyseLabel(nodeDom.children("table").find("td:eq(1)"));
|
||||
}
|
||||
return property;
|
||||
},
|
||||
_fillIcon:function(canvas, bgLeft,bgTop,icon, bgImage){
|
||||
var ctx = canvas.getContext('2d');
|
||||
if(icon.backgroundImage===undefined){//矢量字体图标
|
||||
if(icon.content.indexOf('"')===0){
|
||||
icon.content = icon.content.split('"')[1];
|
||||
}
|
||||
icon.color = icon.color.replace('rgb', 'rgba').replace(')', ', ' + icon.opacity + ')');
|
||||
ctx.fillStyle = icon.color;
|
||||
ctx.font = icon.font;
|
||||
ctx.textAlign='center';
|
||||
ctx.textBaseline='middle';
|
||||
// 绘制内容
|
||||
ctx.fillText(icon.content, bgLeft+icon.offsetLeft+4+icon.width/2, bgTop+icon.offsetTop+4+icon.height/2);
|
||||
return null;
|
||||
}else{//css spite背景定位图标
|
||||
var tmpX=0,tmpY=0;
|
||||
if(icon.pX<0){
|
||||
tmpX-=icon.pX; icon.pX=0;
|
||||
}
|
||||
if(icon.pY<0){
|
||||
tmpY-=icon.pY; icon.pY=0;
|
||||
}
|
||||
//console.log(icon.pX+','+icon.pY);
|
||||
ctx.drawImage(bgImage, icon.pX, icon.pY, icon.width, icon.height,
|
||||
bgLeft+icon.offsetLeft+4+tmpX, bgTop+icon.offsetTop+4+tmpY, icon.width, icon.height );
|
||||
}
|
||||
},
|
||||
_fillLabel: function(canvas, bgLeft, bgTop, label) {
|
||||
var ctx = canvas.getContext('2d');
|
||||
ctx.fillStyle = label.color;
|
||||
ctx.textAlign='center';
|
||||
ctx.font = label.font;
|
||||
ctx.textBaseline='top';
|
||||
|
||||
var str=label.text;
|
||||
var lineWidth = 0;//某一行字的实际宽度
|
||||
var lastSubStrIndex= 0; //每次开始截取的字符串的索引
|
||||
var hack = (window.ActiveXObject || "ActiveXObject" in window)? 1:0;
|
||||
var x = bgLeft+label.offsetLeft+label.width/2+hack/2;//文字(可能有多行)的x坐标
|
||||
var y = bgTop+label.offsetTop+hack;//某一行文字(可能有多行)的y坐标
|
||||
if(navigator.userAgent.indexOf('Firefox')>=0){
|
||||
y += (label.lineHeight-label.fontSize);
|
||||
}
|
||||
for(var i=0;i<str.length;i++){
|
||||
lineWidth += ctx.measureText(str[i]).width;
|
||||
if(i!==str.length-1){
|
||||
if( lineWidth >= label.width ){
|
||||
ctx.fillText(str.substring(lastSubStrIndex,i),x,y);//绘制截取部分
|
||||
y+=label.lineHeight;
|
||||
lineWidth=0;
|
||||
lastSubStrIndex=i;
|
||||
}
|
||||
}else{//绘制剩余部分
|
||||
ctx.fillText(str.substring(lastSubStrIndex,i+1),x,y);
|
||||
}
|
||||
}
|
||||
},
|
||||
//根据区域组信息在背景上画一堆区域组泳道(传参areas为要绘制的区域组详细json信息)
|
||||
renderAreas:function(canvas,areas, iconBgImage){
|
||||
var ctx = canvas.getContext('2d');
|
||||
for(var key in areas) {
|
||||
var area = areas[key];
|
||||
//填充半透明矩形
|
||||
area.bgColor = area.bgColor.replace('rgb', 'rgba').replace(')', ', ' + area.opacity + ')');
|
||||
area.borderColor = area.borderColor.replace('rgb', 'rgba').replace(')', ', ' + area.opacity + ')');
|
||||
ctx.fillStyle = area.bgColor;
|
||||
ctx.strokeStyle = area.borderColor;
|
||||
ctx.rect(area.left, area.top, area.width, area.height);
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
this._fillIcon(canvas, area.left-3, area.top-3, area.icon, iconBgImage);
|
||||
this._fillLabel(canvas, area.left, area.top, area.label);
|
||||
}
|
||||
},
|
||||
|
||||
//根据节点信息在背景上画一组节点(传参nodes为要绘制的节点详细json信息)
|
||||
renderNodes:function(canvas,nodes,iconBgImage){
|
||||
var ctx = canvas.getContext('2d');
|
||||
var imgLoadFuncs=[];
|
||||
for(var key in nodes){
|
||||
var node = nodes[key];
|
||||
//渲染阴影
|
||||
var sd = node.boxShadow.split(") ");
|
||||
if(sd.length===1){
|
||||
var tmp = node.boxShadow.split("rgba");
|
||||
sd[0]='rgba'+tmp[1];
|
||||
sd[1]=tmp[0];
|
||||
}
|
||||
ctx.shadowColor = sd[0];
|
||||
sd=sd[1].split(" ");
|
||||
ctx.shadowOffsetX=this._toNum(sd[0])+(node.borderWidth>1? 1:0);
|
||||
ctx.shadowOffsetY=this._toNum(sd[1])+(node.borderWidth>1? 1:0);
|
||||
ctx.shadowBlur=this._toNum(sd[2]);
|
||||
//填充圆角矩形
|
||||
ctx.fillStyle=node.bgColor;
|
||||
ctx.roundRect( node.left+node.borderWidth/2, node.top+node.borderWidth/2,
|
||||
node.width-node.borderWidth, node.height-node.borderWidth, node.borderRadius).fill();
|
||||
//加边框
|
||||
ctx.shadowBlur=0;
|
||||
ctx.shadowColor='';
|
||||
ctx.shadowOffsetX=0;
|
||||
ctx.shadowOffsetY=0;
|
||||
ctx.strokeStyle = node.borderColor;
|
||||
ctx.lineWidth = (node.borderWidth===0? 0.01:node.borderWidth);
|
||||
ctx.stroke();
|
||||
this._fillIcon(canvas, node.left, node.top+(node.borderRadius>6? 1:0), node.icon, iconBgImage);
|
||||
this._fillLabel(canvas, node.left, node.top, node.label);
|
||||
}
|
||||
return imgLoadFuncs;
|
||||
},
|
||||
|
||||
_analyseLine:function(lineDom){ //only for IE
|
||||
var fontFamily = $(".WaterFlow").css("font-family");
|
||||
//基本样式
|
||||
var path = lineDom.childNodes[1];
|
||||
var property={
|
||||
color: path.getAttribute("stroke"),//箭头则用fill
|
||||
lineWidth: path.getAttribute("stroke-width"),//线条宽度箭头的strokeWidth为0
|
||||
lineCap: 'round'
|
||||
};
|
||||
var style = path.style.strokeDasharray;
|
||||
property.lineDash=(style && style!=null);
|
||||
//文字
|
||||
var text=lineDom.childNodes[2];
|
||||
var fontColor = text.getAttribute("fill");
|
||||
if(!fontColor||fontColor===null||fontColor===''){
|
||||
fontColor='#777';
|
||||
}
|
||||
property.label={
|
||||
text: text.textContent,
|
||||
font: text.style.fontSize+' '+fontFamily,
|
||||
color: fontColor,
|
||||
left:text.getAttribute("x"),
|
||||
top:text.getAttribute("y")
|
||||
};
|
||||
|
||||
//获取连线从首至尾各个点的坐标值
|
||||
var d = path.getAttribute("d");
|
||||
var tmp = d.substring(2,d.length).split("L");
|
||||
var points=[];//连线中各点集合
|
||||
for(var i=0;i<tmp.length;++i){
|
||||
tmp[i] = tmp[i].replace(/^\s+|\s+$/gm,'');//去掉首尾空格
|
||||
var xy=tmp[i].split(" ");
|
||||
points.push({ x: parseFloat(xy[0]), y:parseFloat(xy[1]) });
|
||||
}
|
||||
property.points=points;
|
||||
|
||||
//箭头默认参数:两边到线垂直距离为3,从线至箭头顶端为6,如果为mark ,则:具体值*(2.4/1.4)=x*1.71
|
||||
//画箭头攻略:1、先在原点附近画好一个正的;2、旋转到与连线最后一段的斜率;3、移动到连线最后一点;4、渲染出来
|
||||
|
||||
//计算连线最后一段与X轴的角度
|
||||
var len=points.length;
|
||||
var x = points[len-1].x-points[len-2].x, y = points[len-1].y-points[len-2].y;
|
||||
property.angle=Math.atan2(y,x);
|
||||
|
||||
return property;
|
||||
},
|
||||
renderLines:function(canvas, lines){
|
||||
var ctx = canvas.getContext('2d');
|
||||
for(var key in lines){
|
||||
var line = lines[key];
|
||||
ctx.save();
|
||||
ctx.setLineDash(line.lineDash?[4,6]:[]);
|
||||
ctx.strokeStyle = line.color;
|
||||
ctx.lineWidth = line.lineWidth;
|
||||
ctx.lineCap = line.lineCap;
|
||||
var p = line.points;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(p[0].x,p[0].y);
|
||||
for(var i=1;i<p.length;++i){
|
||||
ctx.lineTo(p[i].x,p[i].y);
|
||||
if(i!==p.length-1){
|
||||
ctx.moveTo(p[i].x,p[i].y);
|
||||
}
|
||||
}
|
||||
ctx.closePath();
|
||||
ctx.stroke();
|
||||
ctx.save();
|
||||
|
||||
//箭头的渲染
|
||||
//画箭头攻略:1、先在原点附近画好一个正的;2、旋转到与连线最后一段的斜率;3、移动到连线最后一点;4、渲染出来
|
||||
ctx.translate( p[p.length-1].x, p[p.length-1].y );
|
||||
ctx.rotate(line.angle);
|
||||
ctx.fillStyle = line.color;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(1*line.lineWidth,0);
|
||||
ctx.lineTo(-6*line.lineWidth,-3*line.lineWidth);
|
||||
ctx.lineTo(-6*line.lineWidth,3*line.lineWidth);
|
||||
ctx.lineTo(1*line.lineWidth,0);
|
||||
ctx.closePath();
|
||||
ctx.fill();
|
||||
ctx.restore();
|
||||
|
||||
//文字渲染
|
||||
var ctx2 = canvas.getContext('2d');
|
||||
var label = line.label;
|
||||
ctx2.fillStyle = label.color;
|
||||
ctx2.textAlign='center';
|
||||
ctx2.font = label.font;
|
||||
ctx2.fillText(label.text,label.left,label.top);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
//扩展canvas画圆角矩形的方法
|
||||
CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) {
|
||||
if (w < 2 * r) {r = w / 2;}
|
||||
if (h < 2 * r){ r = h / 2;}
|
||||
this.beginPath();
|
||||
this.moveTo(x+r, y);
|
||||
this.arcTo(x+w, y, x+w, y+h, r);
|
||||
this.arcTo(x+w, y+h, x, y+h, r);
|
||||
this.arcTo(x, y+h, x, y, r);
|
||||
this.arcTo(x, y, x+w, y, r);
|
||||
this.closePath();
|
||||
return this;
|
||||
};
|
||||
|
||||
//扩展定义导出流程图文件功能的方法
|
||||
WaterFlow.prototype.exportDiagram=function(fileName) {
|
||||
var areaEl={};
|
||||
var iconImage = undefined;
|
||||
var bgUrl = null;
|
||||
for(var k1 in this.$areaDom){
|
||||
areaEl[k1]=Cmder._analyseArea(this.$areaDom[k1]);
|
||||
if(areaEl[k1].icon.backgroundImage && bgUrl===null){
|
||||
bgUrl=areaEl[k1].icon.backgroundImage;
|
||||
}
|
||||
}
|
||||
//console.log(areaEl);
|
||||
var nodeEl={};
|
||||
for(var k2 in this.$nodeDom){
|
||||
nodeEl[k2]=Cmder._analyseNode(this.$nodeDom[k2]);
|
||||
if(nodeEl[k2].icon.backgroundImage && bgUrl===null){
|
||||
bgUrl=nodeEl[k2].icon.backgroundImage;
|
||||
}
|
||||
}
|
||||
//console.log(nodeEl);
|
||||
|
||||
var max = this._suitSize();
|
||||
var width = (max.width+100)*this.$scale;
|
||||
var height = (max.height+100)*this.$scale;
|
||||
var canvas = Cmder.initBg(width,height,'#ffffff');//canvas背景元素
|
||||
var Goo=this;
|
||||
|
||||
if(bgUrl!==null){
|
||||
iconImage = new Image();
|
||||
iconImage.setAttribute('crossOrigin', 'anonymous');
|
||||
iconImage.src = bgUrl;
|
||||
}
|
||||
|
||||
var tempFunc=function(){
|
||||
Cmder.renderAreas(canvas,areaEl,iconImage);
|
||||
Cmder.renderNodes(canvas,nodeEl,iconImage);
|
||||
|
||||
//处理连线
|
||||
var ctx = canvas.getContext('2d');//取得画布的2d绘图上下文
|
||||
ctx.restore();
|
||||
if(window.ActiveXObject || "ActiveXObject" in window || navigator.userAgent.indexOf("Edge")>-1){//当为IE11及以下版本浏览器时,使用Canvg第三方工具
|
||||
var lineEl={};
|
||||
for(var key in Goo.$lineDom){
|
||||
lineEl[key]=Cmder._analyseLine(Goo.$lineDom[key]);
|
||||
}
|
||||
//console.log(lineEl);
|
||||
Cmder.renderLines(canvas,lineEl);
|
||||
try{
|
||||
var blob = canvas.msToBlob();
|
||||
navigator.msSaveBlob(blob, fileName+".png");
|
||||
}
|
||||
catch(e){
|
||||
//生成一个下载链接并点击
|
||||
var base64 = canvas.toDataURL('image/png'); //将画布内的信息导出为png图片数据
|
||||
$('body').append('<img src="'+base64+'" id="aaaa" name="fileName">');
|
||||
var oPop=window.open("",'_blank');
|
||||
for (; oPop.document.readyState !== "complete";) {
|
||||
if (oPop.document.readyState === "complete") break;
|
||||
}
|
||||
oPop.document.write('<html><head><title>'+fileName+'.png</title></head><body><img src="'+base64+'" border="1" title="'+fileName+'.png"></body></html>');
|
||||
}
|
||||
}else{
|
||||
var strSvg = '<svg xmlns="http://www.w3.org/2000/svg" width="'+width+'" height="'+height+'">'
|
||||
+'<defs><style type="text/css">text{font-size:14px;line-height:1.42857143;'
|
||||
+'font-family:"Microsoft Yahei", "Helvetica Neue", Helvetica, Hiragino Sans GB, WenQuanYi Micro Hei, Arial, sans-serif;'
|
||||
+'}</style></defs>' + $("#draw_"+Goo.$id).html() +'</svg>'; //COPY连线内容
|
||||
var image = new Image();
|
||||
image.src='data:image/svg+xml,'+ encodeURIComponent(strSvg);
|
||||
image.onload=function(){
|
||||
ctx.drawImage(image, 0, 0);
|
||||
var a = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
|
||||
a.href = canvas.toDataURL('image/png'); //将画布内的信息导出为png图片数据
|
||||
a.download = fileName+".png"; //设定下载名称
|
||||
document.body.appendChild(a);
|
||||
a.click(); //点击触发下载
|
||||
document.body.removeChild(a);
|
||||
};
|
||||
}
|
||||
};
|
||||
// 如果图片已经存在于浏览器缓存,直接调用回调函数
|
||||
if(!iconImage || iconImage.complete|| (!!window.ActiveXObject||"ActiveXObject" in window) ) {
|
||||
tempFunc();
|
||||
return;// 直接返回,不用再处理onload事件
|
||||
}
|
||||
iconImage.onload=function(){
|
||||
tempFunc();
|
||||
};
|
||||
|
||||
}
|
||||
}));
|
||||
2538
WaterCloud.Web/wwwroot/js/lay-module/flow/waterflow.js
Normal file
2538
WaterCloud.Web/wwwroot/js/lay-module/flow/waterflow.js
Normal file
File diff suppressed because it is too large
Load Diff
207
WaterCloud.Web/wwwroot/js/lay-module/flow/waterflow.print.js
Normal file
207
WaterCloud.Web/wwwroot/js/lay-module/flow/waterflow.print.js
Normal file
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
* 打印预览或另存为PDF功能,需要依赖:
|
||||
* ../plugin/printThis.js
|
||||
*/
|
||||
;(function ( global, factory ) {
|
||||
'use strict';
|
||||
if ( typeof define !== 'undefined' && define.amd ) { // export as AMD...
|
||||
define( ['jquery','WaterFlow'], factory );
|
||||
}
|
||||
else if ( typeof module !== 'undefined' && module.exports ) { // ...or as browserify
|
||||
factory( require('jquery'), require('WaterFlow') );
|
||||
}else
|
||||
factory( global.$, global.WaterFlow );
|
||||
|
||||
}( typeof window !== 'undefined' ? window : this, function ( $,WaterFlow ) {
|
||||
if(WaterFlow.prototype.print && typeof WaterFlow.prototype.print==='function'){
|
||||
return;//防止多次载入
|
||||
}
|
||||
/*
|
||||
* printThis v1.12.2
|
||||
* @desc Printing plug-in for jQuery
|
||||
* @author Jason Day
|
||||
* 精简版 only for WaterFlow
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
function appendContent($el, content) {
|
||||
if (!content) return;
|
||||
|
||||
// Simple test for a jQuery element
|
||||
$el.append(content.jquery ? content.clone() : content);
|
||||
}
|
||||
|
||||
function appendBody($body, $element, opt) {
|
||||
// Clone for safety and convenience
|
||||
// Calls clone(withDataAndEvents = true) to copy form values.
|
||||
var $content = $element.clone();
|
||||
|
||||
if (opt.printContainer) {
|
||||
// grab $.selector as container
|
||||
$content.appendTo($body);
|
||||
} else {
|
||||
// otherwise just print interior elements of container
|
||||
$content.each(function() {
|
||||
$(this).children().appendTo($body)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var opt;
|
||||
$.fn.printThis = function(options) {
|
||||
opt = $.extend({}, $.fn.printThis.defaults, options);
|
||||
var $element = this instanceof jQuery ? this : $(this);
|
||||
|
||||
var strFrameName = "printThis-" + (new Date()).getTime();
|
||||
|
||||
if (window.location.hostname !== document.domain && navigator.userAgent.match(/msie/i)) {
|
||||
// Ugly IE hacks due to IE not inheriting document.domain from parent
|
||||
// checks if document.domain is set by comparing the host name against document.domain
|
||||
var iframeSrc = 'javascript:document.write("<head><script>document.domain="' + document.domain + '";</script></head><body></body>")';
|
||||
var printI = document.createElement('iframe');
|
||||
printI.name = "printIframe";
|
||||
printI.id = strFrameName;
|
||||
printI.className = "MSIE";
|
||||
document.body.appendChild(printI);
|
||||
printI.src = iframeSrc;
|
||||
|
||||
} else {
|
||||
// other browsers inherit document.domain, and IE works if document.domain is not explicitly set
|
||||
var $frame = $("<iframe id='" + strFrameName + "' name='printIframe' />");
|
||||
$frame.appendTo("body");
|
||||
}
|
||||
|
||||
var $iframe = $("#" + strFrameName);
|
||||
|
||||
// show frame if in debug mode
|
||||
if (!opt.debug) $iframe.css({
|
||||
position: "absolute",
|
||||
width: "0px",
|
||||
height: "0px",
|
||||
left: "-600px",
|
||||
top: "-600px"
|
||||
});
|
||||
|
||||
// $iframe.ready() and $iframe.load were inconsistent between browsers
|
||||
setTimeout(function() {
|
||||
|
||||
// Add doctype to fix the style difference between printing and render
|
||||
function setDocType($iframe, doctype){
|
||||
var win, doc;
|
||||
win = $iframe.get(0);
|
||||
win = win.contentWindow || win.contentDocument || win;
|
||||
doc = win.document || win.contentDocument || win;
|
||||
doc.open();
|
||||
doc.write(doctype);
|
||||
doc.close();
|
||||
}
|
||||
|
||||
if (opt.doctypeString){
|
||||
setDocType($iframe, opt.doctypeString);
|
||||
}
|
||||
|
||||
var $doc = $iframe.contents(),
|
||||
$head = $doc.find("head"),
|
||||
$body = $doc.find("body"),
|
||||
$base = $('base'),
|
||||
baseURL;
|
||||
$body.css({height:'auto',margin:'0',padding:'0',background:'#fff'});
|
||||
// add base tag to ensure elements use the parent domain
|
||||
if (opt.base === true && $base.length > 0) {
|
||||
// take the base tag from the original page
|
||||
baseURL = $base.attr('href');
|
||||
} else if (typeof opt.base === 'string') {
|
||||
// An exact base string is provided
|
||||
baseURL = opt.base;
|
||||
} else {
|
||||
// Use the page URL as the base
|
||||
baseURL = document.location.protocol + '//' + document.location.host;
|
||||
}
|
||||
|
||||
$head.append('<base href="' + baseURL + '">');
|
||||
|
||||
$("link[rel=stylesheet]").each(function() {
|
||||
var href = $(this).attr("href");
|
||||
if (href) {
|
||||
var media = $(this).attr("media") || "all";
|
||||
$head.append("<link type='text/css' rel='stylesheet' href='" + href + "' media='" + media + "'>");
|
||||
}
|
||||
});
|
||||
|
||||
// add title of the page
|
||||
if (opt.pageTitle) $head.append("<title>" + opt.pageTitle + "</title>");
|
||||
|
||||
// print header
|
||||
appendContent($body, opt.header);
|
||||
|
||||
appendBody($body, $element, opt);
|
||||
|
||||
// print "footer"
|
||||
appendContent($body, opt.footer);
|
||||
|
||||
setTimeout(function() {
|
||||
if ($iframe.hasClass("MSIE")) {
|
||||
// check if the iframe was created with the ugly hack
|
||||
// and perform another ugly hack out of neccessity
|
||||
window.frames["printIframe"].focus();
|
||||
$head.append("<script> window.print(); </s" + "cript>");
|
||||
} else {
|
||||
// proper method
|
||||
if (document.queryCommandSupported("print")) {
|
||||
$iframe[0].contentWindow.document.execCommand("print", false, null);
|
||||
} else {
|
||||
$iframe[0].contentWindow.focus();
|
||||
$iframe[0].contentWindow.print();
|
||||
}
|
||||
}
|
||||
|
||||
// remove iframe after print
|
||||
if (!opt.debug) {
|
||||
setTimeout(function() {
|
||||
$iframe.remove();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
}, opt.printDelay);
|
||||
|
||||
}, 333);
|
||||
|
||||
};
|
||||
|
||||
// defaults
|
||||
$.fn.printThis.defaults = {
|
||||
debug: false, // show the iframe for debugging
|
||||
printContainer: true, // print outer container/$.selector
|
||||
pageTitle: "", // add title to print page
|
||||
printDelay: 333, // variable print delay
|
||||
header: null, // prefix to html
|
||||
footer: null, // postfix to html
|
||||
base: false, // preserve the BASE tag, or accept a string for the URL
|
||||
doctypeString: '<!DOCTYPE html>' // html doctype
|
||||
};
|
||||
})($);
|
||||
////////////////printThis.js END!
|
||||
|
||||
//扩展定义打印预览或另存为PDF功能的方法
|
||||
WaterFlow.prototype.print=function(scale){
|
||||
var max=this._suitSize();
|
||||
if(!scale) scale=1.0;
|
||||
max.width+=100;max.height+=100;
|
||||
var printDiv=this.$workArea.clone();
|
||||
printDiv.css({
|
||||
width:max.width+"px",height:max.height+"px"
|
||||
});
|
||||
printDiv.children(".WaterFlow_work_group").css({width:max.width+"px",height:max.height+"px"});
|
||||
printDiv.children("svg").css({width:max.width+"px",height:max.height+"px"});
|
||||
printDiv.children(".WaterFlow_work_vml").css({width:max.width+"px",height:max.height+"px"});
|
||||
printDiv=printDiv.wrap('<div class="WaterFlow WaterFlow_work" style="width:'
|
||||
+max.width+'px;height:'+max.height+'px; overflow:hidden"></div>').parent();
|
||||
if(WaterFlow.color.font){
|
||||
printDiv.css("color",WaterFlow.color.font);
|
||||
}
|
||||
printDiv.css({"transform-origin": "top left", transform:"scale("+scale+")"}).printThis({
|
||||
base:document.URL, pageTitle:this.$title
|
||||
});
|
||||
};
|
||||
return WaterFlow;
|
||||
}));
|
||||
@@ -0,0 +1,383 @@
|
||||
.layui-layout-admin .layui-logo {
|
||||
color : #fff;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.layui-side-right {
|
||||
position : fixed;
|
||||
right : 0;
|
||||
top : 0;
|
||||
bottom : 0;
|
||||
z-index : 999;
|
||||
width : 350px;
|
||||
overflow-x: hidden
|
||||
}
|
||||
|
||||
.layui-layout-admin .layui-side {
|
||||
top : 60px;
|
||||
width : 260px;
|
||||
overflow-x: hidden
|
||||
}
|
||||
|
||||
.layui-layout-admin .layui-side-right {
|
||||
top : 60px;
|
||||
width : 350px;
|
||||
overflow-x: hidden
|
||||
}
|
||||
|
||||
.layui-body {
|
||||
position : absolute;
|
||||
left : 260px;
|
||||
right : 350px;
|
||||
top : 0;
|
||||
bottom : 0;
|
||||
z-index : 998;
|
||||
width : auto;
|
||||
overflow-y : auto;
|
||||
box-sizing : border-box;
|
||||
min-width : 250px;
|
||||
border-left : 1px solid #e6e6e6;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
.layui-layout-admin .layui-body {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
/* components-list*/
|
||||
|
||||
.components-list {
|
||||
padding : 4px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing : border-box;
|
||||
height : 100%
|
||||
}
|
||||
|
||||
.components-list .components-item {
|
||||
display : inline-block;
|
||||
width : 49%;
|
||||
margin : 0.5%;
|
||||
margin-top : 5px;
|
||||
-webkit-transition: -webkit-transform 0ms !important;
|
||||
transition : -webkit-transform 0ms !important;
|
||||
transition : transform 0ms !important;
|
||||
transition : transform 0ms, -webkit-transform 0ms !important
|
||||
}
|
||||
|
||||
.components-draggable {
|
||||
padding-bottom: 20px
|
||||
}
|
||||
|
||||
.components-title {
|
||||
font-size: 14px;
|
||||
color : #222;
|
||||
margin : 6px 2px
|
||||
}
|
||||
|
||||
.components-title .svg-icon {
|
||||
color : #666;
|
||||
font-size: 18px
|
||||
}
|
||||
|
||||
.components-body {
|
||||
padding : 8px 10px;
|
||||
background : #f6f7ff;
|
||||
font-size : 12px;
|
||||
cursor : move;
|
||||
border : 1px dashed #f6f7ff;
|
||||
border-radius: 3px
|
||||
}
|
||||
|
||||
.components-body .svg-icon {
|
||||
color : #777;
|
||||
font-size: 15px
|
||||
}
|
||||
|
||||
.components-body:hover {
|
||||
border: 1px dashed #787be8;
|
||||
color : #787be8
|
||||
}
|
||||
|
||||
.components-body:hover .svg-icon {
|
||||
color: #787be8
|
||||
}
|
||||
|
||||
.ghost {
|
||||
|
||||
border : 1px dashed #e06c1d;
|
||||
outline-width: 0;
|
||||
height : 39px;
|
||||
box-sizing : border-box;
|
||||
font-size : 0;
|
||||
content : '';
|
||||
overflow : hidden;
|
||||
padding : 0;
|
||||
}
|
||||
.ghost div {
|
||||
background-color:#fff;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.layui-body .active {
|
||||
outline : 2px solid #409EFF;
|
||||
border : 1px solid #409EFF;
|
||||
outline-offset: 0;
|
||||
}
|
||||
|
||||
#formDesignerForm .layui-form-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#formDesignerForm .grid {
|
||||
padding: 5px 5px;
|
||||
}
|
||||
|
||||
#formDesignerForm .layui-form-item:hover {
|
||||
border : 1px solid #409EFF;
|
||||
background-color: #e9f4fd !important;
|
||||
}
|
||||
|
||||
.widget-view-drag {
|
||||
position : absolute;
|
||||
left : -2px;
|
||||
top : -2px;
|
||||
bottom : -18px;
|
||||
height : 28px;
|
||||
line-height: 28px;
|
||||
background : #409EFF;
|
||||
z-index : 9;
|
||||
}
|
||||
|
||||
.widget-view-drag i {
|
||||
font-size: 14px;
|
||||
color : #fff;
|
||||
margin : 0 5px;
|
||||
cursor : move;
|
||||
}
|
||||
|
||||
.select-option-drag {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.select-option-delete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.widget-view-action {
|
||||
position : absolute;
|
||||
right : 0;
|
||||
bottom : 0;
|
||||
height : 28px;
|
||||
line-height: 28px;
|
||||
background : #409EFF;
|
||||
z-index : 9;
|
||||
}
|
||||
|
||||
.widget-view-action i {
|
||||
font-size: 14px;
|
||||
color : #fff;
|
||||
margin : 0 5px;
|
||||
cursor : pointer;
|
||||
|
||||
}
|
||||
|
||||
#formDesignerForm {
|
||||
background: #fff;
|
||||
border : 1px dashed #999;
|
||||
min-height: 94%;
|
||||
margin : 10px;
|
||||
padding : 10px 10px;
|
||||
}
|
||||
|
||||
#formDesignerForm .widget-col-list {
|
||||
min-height: 50px;
|
||||
border : 1px dashed #ccc;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#formDesignerForm .widget-slider {
|
||||
margin: 18px 10px;
|
||||
width : 90%;
|
||||
position: absolute!important;
|
||||
}
|
||||
|
||||
.layui-empty {
|
||||
margin : 10px 60px;
|
||||
color : #9e9e9e;
|
||||
font-size : 16px;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
#columnProperty .layui-form-item.option {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
#columnProperty .layui-form-item.option .layui-inline {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
/* 图片上传 */
|
||||
.uploader-list {
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
.uploader-list .info {
|
||||
position : relative;
|
||||
margin-top : -25px;
|
||||
background-color: black;
|
||||
color : white;
|
||||
filter : alpha(Opacity=80);
|
||||
-moz-opacity : 0.5;
|
||||
opacity : 0.5;
|
||||
width : 100px;
|
||||
height : 25px;
|
||||
text-align : center;
|
||||
display : none;
|
||||
}
|
||||
|
||||
.uploader-list .handle {
|
||||
position : relative;
|
||||
background-color: black;
|
||||
color : white;
|
||||
filter : alpha(Opacity=80);
|
||||
-moz-opacity : 0.5;
|
||||
opacity : 0.5;
|
||||
width : 100px;
|
||||
text-align : right;
|
||||
height : 18px;
|
||||
margin-bottom : -18px;
|
||||
display : none;
|
||||
}
|
||||
|
||||
.uploader-list .handle i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.uploader-list .handle i:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.uploader-list .file-iteme {
|
||||
margin : 12px 0 0 15px;
|
||||
padding: 1px;
|
||||
float : left;
|
||||
}
|
||||
|
||||
|
||||
/*自定义layer颜色*/
|
||||
body .cool-black .layui-layer-title {
|
||||
color : #fff;
|
||||
height : 50px;
|
||||
line-height : 50px;
|
||||
background-color: #191a23;
|
||||
border : none;
|
||||
}
|
||||
|
||||
body .cool-black .layui-layer-setwin a {
|
||||
color : #fff;
|
||||
font-size : 16px;
|
||||
font-style : normal;
|
||||
font-family : layui-icon !important;
|
||||
-webkit-font-smoothing : antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body .cool-black .layui-layer-btn a {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.htmlcodeview,
|
||||
.importjsoncodeview {
|
||||
position: relative;
|
||||
display : none;
|
||||
}
|
||||
|
||||
.htmlcodeview textarea,
|
||||
.getFormData textarea,
|
||||
.importjsoncodeview textarea {
|
||||
display : block;
|
||||
width : 760px;
|
||||
height : 560px;
|
||||
border : 10px solid #F8F8F8;
|
||||
border-top-width: 0;
|
||||
padding : 10px;
|
||||
line-height : 20px;
|
||||
overflow : auto;
|
||||
background-color: #3F3F3F;
|
||||
color : #eee;
|
||||
font-size : 12px;
|
||||
font-family : Courier New;
|
||||
}
|
||||
|
||||
.htmlcodeview a,
|
||||
.importjsoncodeview a {
|
||||
position: absolute;
|
||||
right : 20px;
|
||||
bottom : 20px;
|
||||
}
|
||||
|
||||
.aboutusview .about {
|
||||
display : block;
|
||||
width : 760px;
|
||||
height : 554px;
|
||||
padding : 20px 20px;
|
||||
overflow : hidden;
|
||||
background-color: #191a23;
|
||||
color : #ccc;
|
||||
}
|
||||
.aboutusview .about p{
|
||||
line-height: 30px;
|
||||
|
||||
}
|
||||
|
||||
.aboutusview .about .yellow{
|
||||
color:#e6ec8d;
|
||||
}
|
||||
|
||||
.layui-disabled {
|
||||
background-color: #f5f7fa;
|
||||
border-color: #dfe4ed;
|
||||
color: #c0c4cc;
|
||||
}
|
||||
|
||||
.custom-lg{
|
||||
margin: -3px 0px 0px 10px;
|
||||
}
|
||||
.custom-zc{
|
||||
margin: 0px 0px 0px 10px;
|
||||
}
|
||||
.custom-sm{
|
||||
margin: 5px 0px 0px 10px;
|
||||
}
|
||||
.custom-xs{
|
||||
margin: 10px 0px 0px 10px;
|
||||
}
|
||||
|
||||
.iceEditor-disabled {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(245,247,250,0.79) !important;
|
||||
border-color: #dfe4ed !important;
|
||||
color: #c0c4cc !important;
|
||||
z-index: 1 !important;
|
||||
display: block;
|
||||
}
|
||||
.layui-form-label {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.layui-form-item .layui-form-required:after {
|
||||
content: '*';
|
||||
color: red;
|
||||
position: absolute;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
line-height: 1.8em;
|
||||
top: 6px;
|
||||
right: 5px;
|
||||
}
|
||||
4235
WaterCloud.Web/wwwroot/js/lay-module/formDesigner/formDesigner.js
Normal file
4235
WaterCloud.Web/wwwroot/js/lay-module/formDesigner/formDesigner.js
Normal file
File diff suppressed because it is too large
Load Diff
482
WaterCloud.Web/wwwroot/js/lay-module/formDesigner/formField.js
Normal file
482
WaterCloud.Web/wwwroot/js/lay-module/formDesigner/formField.js
Normal file
@@ -0,0 +1,482 @@
|
||||
layui.define(['layer'], function (exports) {
|
||||
var field = {
|
||||
input: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "单行文本",
|
||||
tag: "input",
|
||||
tagIcon: 'input',
|
||||
placeholder: "请输入",
|
||||
defaultValue: null,
|
||||
labelWidth: 110,
|
||||
width:"100%",
|
||||
clearable: true,
|
||||
maxlength: null,
|
||||
showWordLimit: false,
|
||||
readonly: false,
|
||||
disabled: false,
|
||||
required: true,
|
||||
expression:"",
|
||||
document: ''
|
||||
},
|
||||
password: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "密码框",
|
||||
tag: "password",
|
||||
tagIcon: 'password',
|
||||
placeholder: "请输入",
|
||||
defaultValue: null,
|
||||
labelWidth: 110,
|
||||
width:"100%",
|
||||
clearable: true,
|
||||
maxlength: null,
|
||||
showWordLimit: false,
|
||||
readonly: false,
|
||||
disabled: false,
|
||||
required: true,
|
||||
document: ''
|
||||
},
|
||||
select: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "下拉框",
|
||||
tag: "select",
|
||||
tagIcon: 'select',
|
||||
labelWidth: 110,
|
||||
width:"100%",
|
||||
disabled: false,
|
||||
required: true,
|
||||
document: '',
|
||||
datasourceType: 'local',
|
||||
remoteUrl: 'http://',
|
||||
remoteMethod: 'post',
|
||||
remoteOptionText:'options.data.dictName',//映射到text
|
||||
remoteOptionValue:'options.data.dictId',//映射到value text和value可以是一样的
|
||||
remoteDefaultValue:'12',//表示对应的remoteOptionValue的值
|
||||
options: [
|
||||
{
|
||||
text: 'option1',
|
||||
value: 'value1',
|
||||
checked: true,
|
||||
},
|
||||
{
|
||||
text: 'option2',
|
||||
value: 'value2',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
text: 'option3',
|
||||
value: 'value3',
|
||||
checked: false,
|
||||
},
|
||||
]
|
||||
},
|
||||
radio: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "单选组",
|
||||
tag: "radio",
|
||||
tagIcon: 'radio',
|
||||
labelWidth: 110,
|
||||
disabled: false,
|
||||
document: '',
|
||||
datasourceType: 'local',
|
||||
remoteUrl: 'http://',
|
||||
remoteMethod: 'post',
|
||||
remoteOptionText:'options.data.dictName',//映射到text
|
||||
remoteOptionValue:'options.data.dictId',//映射到value text和value可以是一样的
|
||||
options: [
|
||||
{
|
||||
text: 'option1',
|
||||
value: 'value1',
|
||||
checked: true,
|
||||
},
|
||||
{
|
||||
text: 'option2',
|
||||
value: 'value2',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
text: 'option3',
|
||||
value: 'value3',
|
||||
checked: false,
|
||||
},
|
||||
]
|
||||
},
|
||||
checkbox: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "复选组",
|
||||
tag: "checkbox",
|
||||
tagIcon: 'checkbox',
|
||||
labelWidth: 110,
|
||||
disabled: false,
|
||||
required: true,
|
||||
document: '',
|
||||
datasourceType: 'local',
|
||||
remoteUrl: 'http://',
|
||||
remoteMethod: 'post',
|
||||
remoteOptionText:'options.data.dictName',//映射到text
|
||||
remoteOptionValue:'options.data.dictId',//映射到value text和value可以是一样的
|
||||
options: [
|
||||
{
|
||||
text: 'option1',
|
||||
value: 'value1',
|
||||
checked: true,
|
||||
},
|
||||
{
|
||||
text: 'option2',
|
||||
value: 'value2',
|
||||
checked: true,
|
||||
},
|
||||
{
|
||||
text: 'option3',
|
||||
value: 'value3',
|
||||
checked: false,
|
||||
},
|
||||
]
|
||||
},
|
||||
switch: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "开关",
|
||||
tag: "switch",
|
||||
tagIcon: 'switch',
|
||||
labelWidth: 110,
|
||||
width:"100%",
|
||||
switchValue: false,
|
||||
showWordLimit: false,
|
||||
disabled: false,
|
||||
document: '',
|
||||
},
|
||||
slider: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "滑块",
|
||||
tag: "slider",
|
||||
tagIcon: 'slider',
|
||||
labelWidth: 110,
|
||||
width:"100%",
|
||||
defaultValue: 10,
|
||||
maxValue: 100,
|
||||
minValue: 1,
|
||||
stepValue: 2,
|
||||
isInput:true,
|
||||
disabled: false,
|
||||
document: '',
|
||||
},
|
||||
numberInput: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "排序文本框",
|
||||
tag: "numberInput",
|
||||
tagIcon: 'numberInput',
|
||||
labelWidth: 110,
|
||||
width:"100%",
|
||||
defaultValue: 0,
|
||||
maxValue: 100,
|
||||
minValue: 0,
|
||||
stepValue: 1,
|
||||
disabled: false,
|
||||
document: '',
|
||||
},
|
||||
labelGeneration: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "标签组件",
|
||||
tag: "labelGeneration",
|
||||
tagIcon: 'labelGeneration',
|
||||
labelWidth: 110,
|
||||
width:"100%",
|
||||
isEnter: false,
|
||||
disabled: false,
|
||||
document: '',
|
||||
},
|
||||
bottom: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "按钮组件",
|
||||
tag: "bottom",
|
||||
tagIcon: 'bottom',
|
||||
labelWidth: 110,
|
||||
buttonIcon:"",
|
||||
buttonVlaue:"按钮",
|
||||
buttonType:"",
|
||||
buttonSize:"",
|
||||
isLabel:true,
|
||||
disabled: false,
|
||||
document: '',
|
||||
},
|
||||
sign: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "签名组件",
|
||||
tag: "sign",
|
||||
tagIcon: 'sign',
|
||||
labelWidth: 110,
|
||||
buttonVlaue:"手写签名",
|
||||
buttonIcon:"",
|
||||
data:"",
|
||||
disabled: false,
|
||||
document: '',
|
||||
},
|
||||
iconPicker: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "图标选择器",
|
||||
tag: "iconPicker",
|
||||
tagIcon: 'iconPicker',
|
||||
labelWidth: 110,
|
||||
defaultValue: '',
|
||||
iconPickerSearch: true,
|
||||
iconPickerPage: true,
|
||||
iconPickerLimit: 12,
|
||||
iconPickerCellWidth: '43px',
|
||||
disabled: false,
|
||||
document: '',
|
||||
},
|
||||
cron: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "Cron表达式",
|
||||
tag: "cron",
|
||||
tagIcon: 'cron',
|
||||
placeholder: "请输入cron表达式,如:0 0 12 * * ?",
|
||||
labelWidth: 110,
|
||||
width:"100%",
|
||||
defaultValue: '* * * * * ?',
|
||||
cronUrl: '',
|
||||
disabled: false,
|
||||
required: true,
|
||||
document: '',
|
||||
},
|
||||
date: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "日期",
|
||||
tag: "date",
|
||||
tagIcon: 'date',
|
||||
labelWidth: 110,
|
||||
width:"100%",
|
||||
clearable: true,
|
||||
maxlength: null,
|
||||
dateDefaultValue: '2021-05-25',
|
||||
datetype: "date",//year month date time datetime
|
||||
range: false,
|
||||
dateformat: "yyyy-MM-dd",
|
||||
isInitValue: false,
|
||||
dataMaxValue: "2088-12-31",
|
||||
dataMinValue: "1900-01-01",
|
||||
trigger: null,//自定义弹出控件的事件
|
||||
position: "absolute",//fixed,static,abolute
|
||||
theme: "default",
|
||||
mark: null,//每年的日期 {'0-9-18': '国耻'} 0 即代表每一年
|
||||
showBottom: true,
|
||||
zindex:66666666,
|
||||
disabled: false,
|
||||
required: true,
|
||||
document: '',
|
||||
},
|
||||
dateRange: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "日期范围",
|
||||
tag: "dateRange",
|
||||
tagIcon: 'dateRange',
|
||||
labelWidth: 110,
|
||||
//width:"100%",
|
||||
dateRangeDefaultValue: "2021-06-19 - 2021-07-17",
|
||||
clearable: true,
|
||||
maxlength: null,
|
||||
datetype: "date",//year month date time datetime
|
||||
dateformat: "yyyy-MM-dd",
|
||||
isInitValue: true,
|
||||
dataMaxValue: "2088-12-31",
|
||||
dataMinValue: "1900-01-01",
|
||||
trigger: null,//自定义弹出控件的事件
|
||||
position: "absolute",//fixed,static,abolute
|
||||
theme: "default",
|
||||
mark: null,//每年的日期 {'0-9-18': '国耻'} 0 即代表每一年
|
||||
showBottom: true,
|
||||
zindex:66666666,
|
||||
disabled: false,
|
||||
required: true,
|
||||
document: '',
|
||||
},
|
||||
rate: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "评分",
|
||||
tag: "rate",
|
||||
tagIcon: 'rate',
|
||||
labelWidth: 110,
|
||||
defaultValue: 0,
|
||||
rateLength: 5,//星星长度
|
||||
half: false,
|
||||
text: false,
|
||||
theme: "default",
|
||||
showBottom: true,
|
||||
readonly: false,
|
||||
document: '',
|
||||
},
|
||||
carousel: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "轮播图",
|
||||
tag: "carousel",
|
||||
tagIcon: 'carousel',
|
||||
width: "100%",
|
||||
height: "500px",
|
||||
full: false,//是否全屏
|
||||
anim: "default", //轮播切换动画方式,
|
||||
interval: 3000,//切换时间 毫秒
|
||||
startIndex: 0,//初始索引
|
||||
arrow: "hover",//切换箭头默认显示状态
|
||||
autoplay: true,//是否自动切换
|
||||
document: '',
|
||||
datasourceType: 'local',
|
||||
remoteUrl: 'http://',
|
||||
remoteMethod: 'post',
|
||||
remoteOptionText:'options.data.dictName',//映射到text
|
||||
remoteOptionValue:'options.data.dictId',//映射到value text和value可以是一样的
|
||||
options: [
|
||||
{
|
||||
text: 'banner1',
|
||||
value: '../images/bg.jpg',
|
||||
checked: true,
|
||||
},
|
||||
{
|
||||
text: 'banner2',
|
||||
value: '../images/bgs.jpg',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
text: 'banner3',
|
||||
value: '../images/moon.jpg',
|
||||
checked: false,
|
||||
},
|
||||
]
|
||||
},
|
||||
colorpicker: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "颜色选择器",
|
||||
tag: "colorpicker",
|
||||
tagIcon: 'colorpicker',
|
||||
labelWidth: 110,
|
||||
defaultValue: 'rgba(0, 0, 0, 1)',
|
||||
colorformat: "#fff",
|
||||
alpha: false,
|
||||
colors: [],
|
||||
size: "",
|
||||
showBottom: true,
|
||||
disabled: false,
|
||||
document: '',
|
||||
},
|
||||
image: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "上传图片",
|
||||
tag: "image",
|
||||
tagIcon: 'image',
|
||||
placeholder: "请输入",
|
||||
defaultValue: null,
|
||||
labelWidth: null,
|
||||
disabled: false,
|
||||
required: true,
|
||||
document: '',
|
||||
uploadUrl: '',
|
||||
urlPrefix: '',
|
||||
uploadData:''
|
||||
},
|
||||
file: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "上传文件",
|
||||
tag: "file",
|
||||
tagIcon: 'file',
|
||||
placeholder: "请输入",
|
||||
defaultValue: null,
|
||||
labelWidth: null,
|
||||
disabled: false,
|
||||
required: true,
|
||||
document: '',
|
||||
uploadUrl: '',
|
||||
urlPrefix: '',
|
||||
uploadData: ''
|
||||
},
|
||||
textarea: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "多行文本",
|
||||
tag: "textarea",
|
||||
tagIcon: 'textarea',
|
||||
placeholder: "请输入",
|
||||
defaultValue: null,
|
||||
width:"100%",
|
||||
readonly: false,
|
||||
disabled: false,//这里就是readonly的医生
|
||||
required: true,
|
||||
document: ''
|
||||
},
|
||||
editor: {
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
label: "编辑器",
|
||||
tag: "editor",
|
||||
tagIcon: 'editor',
|
||||
width:"100%",
|
||||
clearable: true,
|
||||
maxlength: null,
|
||||
showWordLimit: false,
|
||||
height: "200px",
|
||||
uploadUrl: '/upload/',
|
||||
disabled: false,
|
||||
required: false,
|
||||
document: '',
|
||||
uploadUrl: '',
|
||||
urlPrefix: ''
|
||||
},
|
||||
grid:{
|
||||
id:'-1',
|
||||
index:'-1',
|
||||
tag: 'grid',
|
||||
span: 2,
|
||||
columns: [
|
||||
{
|
||||
span: 12,
|
||||
list: [],
|
||||
},
|
||||
{
|
||||
span: 12,
|
||||
list: [],
|
||||
}
|
||||
]
|
||||
}
|
||||
,c1:{
|
||||
name:"输入型组件(基于layui)",
|
||||
list:['input','password','textarea']
|
||||
}
|
||||
,c2:{
|
||||
name:"选择型组件(基于layui)",
|
||||
list:['select','radio','checkbox','switch','slider','date','rate','carousel','colorpicker','image','file','dateRange']
|
||||
}
|
||||
,c3:{
|
||||
name:"布局型组件(基于layui)",
|
||||
list:['grid','bottom']
|
||||
},
|
||||
c4:{
|
||||
name:"扩展组件(基于layui)",
|
||||
list:['numberInput','iconPicker','cron','labelGeneration','sign']
|
||||
}
|
||||
,
|
||||
c5:{
|
||||
name:"扩展组件(外部)",
|
||||
list:['editor']
|
||||
}
|
||||
|
||||
};
|
||||
exports('formField', field);
|
||||
|
||||
});
|
||||
@@ -0,0 +1,88 @@
|
||||
#formPreviewForm .widget-slider {
|
||||
margin: 18px 10px;
|
||||
width : 90%;
|
||||
position: absolute!important;
|
||||
}
|
||||
.custom-lg{
|
||||
margin: -3px 0px 0px 10px;
|
||||
}
|
||||
.custom-zc{
|
||||
margin: 0px 0px 0px 10px;
|
||||
}
|
||||
.custom-sm{
|
||||
margin: 5px 0px 0px 10px;
|
||||
}
|
||||
.custom-xs{
|
||||
margin: 10px 0px 0px 10px;
|
||||
}
|
||||
.my-disabled{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgba(191,191,191,.79);
|
||||
}
|
||||
.iceEditor-disabled {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(245,247,250,0.79) !important;
|
||||
border-color: #dfe4ed !important;
|
||||
color: #c0c4cc !important;
|
||||
z-index: 1 !important;
|
||||
display: block;
|
||||
}
|
||||
/* 图片上传 */
|
||||
.uploader-list {
|
||||
margin-left: -15px;
|
||||
}
|
||||
.uploader-list .info {
|
||||
position: relative;
|
||||
margin-top: -25px;
|
||||
background-color: black;
|
||||
color: white;
|
||||
filter: alpha(Opacity=80);
|
||||
-moz-opacity: 0.5;
|
||||
opacity: 0.5;
|
||||
width: 100px;
|
||||
height: 25px;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
.uploader-list .handle {
|
||||
position: relative;
|
||||
background-color: black;
|
||||
color: white;
|
||||
filter: alpha(Opacity=80);
|
||||
-moz-opacity: 0.5;
|
||||
opacity: 0.5;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
height: 18px;
|
||||
margin-bottom: -18px;
|
||||
display: none;
|
||||
}
|
||||
.uploader-list .handle i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.uploader-list .handle i:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.uploader-list .file-iteme {
|
||||
margin: 12px 0 0 15px;
|
||||
padding: 1px;
|
||||
float: left;
|
||||
}
|
||||
.layui-form-item .layui-form-required:after {
|
||||
content: '*';
|
||||
color: red;
|
||||
position: absolute;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
line-height: 1.8em;
|
||||
top: 6px;
|
||||
right: 5px;
|
||||
}
|
||||
1795
WaterCloud.Web/wwwroot/js/lay-module/formDesigner/formPreview.js
Normal file
1795
WaterCloud.Web/wwwroot/js/lay-module/formDesigner/formPreview.js
Normal file
File diff suppressed because it is too large
Load Diff
409
WaterCloud.Web/wwwroot/js/lay-module/htmlformat.js
Normal file
409
WaterCloud.Web/wwwroot/js/lay-module/htmlformat.js
Normal file
@@ -0,0 +1,409 @@
|
||||
function style_html(html_source, indent_size, indent_character, max_char) {
|
||||
//Wrapper function to invoke all the necessary constructors and deal with the output.
|
||||
|
||||
var Parser, multi_parser;
|
||||
|
||||
function Parser() {
|
||||
|
||||
this.pos = 0; //Parser position
|
||||
this.token = '';
|
||||
this.current_mode = 'CONTENT'; //reflects the current Parser mode: TAG/CONTENT
|
||||
this.tags = { //An object to hold tags, their position, and their parent-tags, initiated with default values
|
||||
parent: 'parent1',
|
||||
parentcount: 1,
|
||||
parent1: ''
|
||||
};
|
||||
this.tag_type = '';
|
||||
this.token_text = this.last_token = this.last_text = this.token_type = '';
|
||||
|
||||
|
||||
this.Utils = { //Uilities made available to the various functions
|
||||
whitespace: "\n\r\t ".split(''),
|
||||
single_token: 'br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed'.split(','), //all the single tags for HTML
|
||||
extra_liners: 'head,body,/html'.split(','), //for tags that need a line of whitespace before them
|
||||
in_array: function (what, arr) {
|
||||
for (var i=0; i<arr.length; i++) {
|
||||
if (what === arr[i]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
this.get_content = function () { //function to capture regular content between tags
|
||||
|
||||
var char = '';
|
||||
var content = [];
|
||||
var space = false; //if a space is needed
|
||||
while (this.input.charAt(this.pos) !== '<') {
|
||||
if (this.pos >= this.input.length) {
|
||||
return content.length?content.join(''):['', 'TK_EOF'];
|
||||
}
|
||||
|
||||
char = this.input.charAt(this.pos);
|
||||
this.pos++;
|
||||
this.line_char_count++;
|
||||
|
||||
|
||||
if (this.Utils.in_array(char, this.Utils.whitespace)) {
|
||||
if (content.length) {
|
||||
space = true;
|
||||
}
|
||||
this.line_char_count--;
|
||||
continue; //don't want to insert unnecessary space
|
||||
}
|
||||
else if (space) {
|
||||
if (this.line_char_count >= this.max_char) { //insert a line when the max_char is reached
|
||||
content.push('\n');
|
||||
for (var i=0; i<this.indent_level; i++) {
|
||||
content.push(this.indent_string);
|
||||
}
|
||||
this.line_char_count = 0;
|
||||
}
|
||||
else{
|
||||
content.push(' ');
|
||||
this.line_char_count++;
|
||||
}
|
||||
space = false;
|
||||
}
|
||||
content.push(char); //letter at-a-time (or string) inserted to an array
|
||||
}
|
||||
return content.length?content.join(''):'';
|
||||
}
|
||||
|
||||
this.get_script = function () { //get the full content of a script to pass to js_beautify
|
||||
|
||||
var char = '';
|
||||
var content = [];
|
||||
var reg_match = new RegExp('\<\/script' + '\>', 'igm');
|
||||
reg_match.lastIndex = this.pos;
|
||||
var reg_array = reg_match.exec(this.input);
|
||||
var end_script = reg_array?reg_array.index:this.input.length; //absolute end of script
|
||||
while(this.pos < end_script) { //get everything in between the script tags
|
||||
if (this.pos >= this.input.length) {
|
||||
return content.length?content.join(''):['', 'TK_EOF'];
|
||||
}
|
||||
|
||||
char = this.input.charAt(this.pos);
|
||||
this.pos++;
|
||||
|
||||
|
||||
content.push(char);
|
||||
}
|
||||
return content.length?content.join(''):''; //we might not have any content at all
|
||||
}
|
||||
|
||||
this.record_tag = function (tag){ //function to record a tag and its parent in this.tags Object
|
||||
if (this.tags[tag + 'count']) { //check for the existence of this tag type
|
||||
this.tags[tag + 'count']++;
|
||||
this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level
|
||||
}
|
||||
else { //otherwise initialize this tag type
|
||||
this.tags[tag + 'count'] = 1;
|
||||
this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level
|
||||
}
|
||||
this.tags[tag + this.tags[tag + 'count'] + 'parent'] = this.tags.parent; //set the parent (i.e. in the case of a div this.tags.div1parent)
|
||||
this.tags.parent = tag + this.tags[tag + 'count']; //and make this the current parent (i.e. in the case of a div 'div1')
|
||||
}
|
||||
|
||||
this.retrieve_tag = function (tag) { //function to retrieve the opening tag to the corresponding closer
|
||||
if (this.tags[tag + 'count']) { //if the openener is not in the Object we ignore it
|
||||
var temp_parent = this.tags.parent; //check to see if it's a closable tag.
|
||||
while (temp_parent) { //till we reach '' (the initial value);
|
||||
if (tag + this.tags[tag + 'count'] === temp_parent) { //if this is it use it
|
||||
break;
|
||||
}
|
||||
temp_parent = this.tags[temp_parent + 'parent']; //otherwise keep on climbing up the DOM Tree
|
||||
}
|
||||
if (temp_parent) { //if we caught something
|
||||
this.indent_level = this.tags[tag + this.tags[tag + 'count']]; //set the indent_level accordingly
|
||||
this.tags.parent = this.tags[temp_parent + 'parent']; //and set the current parent
|
||||
}
|
||||
delete this.tags[tag + this.tags[tag + 'count'] + 'parent']; //delete the closed tags parent reference...
|
||||
delete this.tags[tag + this.tags[tag + 'count']]; //...and the tag itself
|
||||
if (this.tags[tag + 'count'] == 1) {
|
||||
delete this.tags[tag + 'count'];
|
||||
}
|
||||
else {
|
||||
this.tags[tag + 'count']--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.get_tag = function () { //function to get a full tag and parse its type
|
||||
var char = '';
|
||||
var content = [];
|
||||
var space = false;
|
||||
|
||||
do {
|
||||
if (this.pos >= this.input.length) {
|
||||
return content.length?content.join(''):['', 'TK_EOF'];
|
||||
}
|
||||
|
||||
char = this.input.charAt(this.pos);
|
||||
this.pos++;
|
||||
this.line_char_count++;
|
||||
|
||||
if (this.Utils.in_array(char, this.Utils.whitespace)) { //don't want to insert unnecessary space
|
||||
space = true;
|
||||
this.line_char_count--;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (char === "'" || char === '"') {
|
||||
if (!content[1] || content[1] !== '!') { //if we're in a comment strings don't get treated specially
|
||||
char += this.get_unformatted(char);
|
||||
space = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (char === '=') { //no space before =
|
||||
space = false;
|
||||
}
|
||||
|
||||
if (content.length && content[content.length-1] !== '=' && char !== '>'
|
||||
&& space) { //no space after = or before >
|
||||
if (this.line_char_count >= this.max_char) {
|
||||
this.print_newline(false, content);
|
||||
this.line_char_count = 0;
|
||||
}
|
||||
else {
|
||||
content.push(' ');
|
||||
this.line_char_count++;
|
||||
}
|
||||
space = false;
|
||||
}
|
||||
content.push(char); //inserts character at-a-time (or string)
|
||||
} while (char !== '>');
|
||||
|
||||
var tag_complete = content.join('');
|
||||
var tag_index;
|
||||
if (tag_complete.indexOf(' ') != -1) { //if there's whitespace, thats where the tag name ends
|
||||
tag_index = tag_complete.indexOf(' ');
|
||||
}
|
||||
else { //otherwise go with the tag ending
|
||||
tag_index = tag_complete.indexOf('>');
|
||||
}
|
||||
var tag_check = tag_complete.substring(1, tag_index).toLowerCase();
|
||||
if (tag_complete.charAt(tag_complete.length-2) === '/' ||
|
||||
this.Utils.in_array(tag_check, this.Utils.single_token)) { //if this tag name is a single tag type (either in the list or has a closing /)
|
||||
this.tag_type = 'SINGLE';
|
||||
}
|
||||
else if (tag_check === 'script') { //for later script handling
|
||||
this.record_tag(tag_check);
|
||||
this.tag_type = 'SCRIPT';
|
||||
}
|
||||
else if (tag_check === 'style') { //for future style handling (for now it justs uses get_content)
|
||||
this.record_tag(tag_check);
|
||||
this.tag_type = 'STYLE';
|
||||
}
|
||||
else if (tag_check.charAt(0) === '!') { //peek for <!-- comment
|
||||
if (tag_check.indexOf('[if') != -1) { //peek for <!--[if conditional comment
|
||||
if (tag_complete.indexOf('!IE') != -1) { //this type needs a closing --> so...
|
||||
var comment = this.get_unformatted('-->', tag_complete); //...delegate to get_unformatted
|
||||
content.push(comment);
|
||||
}
|
||||
this.tag_type = 'START';
|
||||
}
|
||||
else if (tag_check.indexOf('[endif') != -1) {//peek for <!--[endif end conditional comment
|
||||
this.tag_type = 'END';
|
||||
this.unindent();
|
||||
}
|
||||
else if (tag_check.indexOf('[cdata[') != -1) { //if it's a <[cdata[ comment...
|
||||
var comment = this.get_unformatted(']]>', tag_complete); //...delegate to get_unformatted function
|
||||
content.push(comment);
|
||||
this.tag_type = 'SINGLE'; //<![CDATA[ comments are treated like single tags
|
||||
}
|
||||
else {
|
||||
var comment = this.get_unformatted('-->', tag_complete);
|
||||
content.push(comment);
|
||||
this.tag_type = 'SINGLE';
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (tag_check.charAt(0) === '/') { //this tag is a double tag so check for tag-ending
|
||||
this.retrieve_tag(tag_check.substring(1)); //remove it and all ancestors
|
||||
this.tag_type = 'END';
|
||||
}
|
||||
else { //otherwise it's a start-tag
|
||||
this.record_tag(tag_check); //push it on the tag stack
|
||||
this.tag_type = 'START';
|
||||
}
|
||||
if (this.Utils.in_array(tag_check, this.Utils.extra_liners)) { //check if this double needs an extra line
|
||||
this.print_newline(true, this.output);
|
||||
}
|
||||
}
|
||||
return content.join(''); //returns fully formatted tag
|
||||
}
|
||||
|
||||
this.get_unformatted = function (delimiter, orig_tag) { //function to return unformatted content in its entirety
|
||||
|
||||
if (orig_tag && orig_tag.indexOf(delimiter) != -1) {
|
||||
return '';
|
||||
}
|
||||
var char = '';
|
||||
var content = '';
|
||||
var space = true;
|
||||
do {
|
||||
|
||||
|
||||
char = this.input.charAt(this.pos);
|
||||
this.pos++
|
||||
|
||||
if (this.Utils.in_array(char, this.Utils.whitespace)) {
|
||||
if (!space) {
|
||||
this.line_char_count--;
|
||||
continue;
|
||||
}
|
||||
if (char === '\n' || char === '\r') {
|
||||
content += '\n';
|
||||
for (var i=0; i<this.indent_level; i++) {
|
||||
content += this.indent_string;
|
||||
}
|
||||
space = false; //...and make sure other indentation is erased
|
||||
this.line_char_count = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
content += char;
|
||||
this.line_char_count++;
|
||||
space = true;
|
||||
|
||||
|
||||
} while (content.indexOf(delimiter) == -1);
|
||||
return content;
|
||||
}
|
||||
|
||||
this.get_token = function () { //initial handler for token-retrieval
|
||||
var token;
|
||||
|
||||
if (this.last_token === 'TK_TAG_SCRIPT') { //check if we need to format javascript
|
||||
var temp_token = this.get_script();
|
||||
if (typeof temp_token !== 'string') {
|
||||
return temp_token;
|
||||
}
|
||||
token = js_beautify(temp_token, this.indent_size, this.indent_character, this.indent_level); //call the JS Beautifier
|
||||
return [token, 'TK_CONTENT'];
|
||||
}
|
||||
if (this.current_mode === 'CONTENT') {
|
||||
token = this.get_content();
|
||||
if (typeof token !== 'string') {
|
||||
return token;
|
||||
}
|
||||
else {
|
||||
return [token, 'TK_CONTENT'];
|
||||
}
|
||||
}
|
||||
|
||||
if(this.current_mode === 'TAG') {
|
||||
token = this.get_tag();
|
||||
if (typeof token !== 'string') {
|
||||
return token;
|
||||
}
|
||||
else {
|
||||
var tag_name_type = 'TK_TAG_' + this.tag_type;
|
||||
return [token, tag_name_type];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.printer = function (js_source, indent_character, indent_size, max_char) { //handles input/output and some other printing functions
|
||||
|
||||
this.input = js_source || ''; //gets the input for the Parser
|
||||
this.output = [];
|
||||
this.indent_character = indent_character || ' ';
|
||||
this.indent_string = '';
|
||||
this.indent_size = indent_size || 2;
|
||||
this.indent_level = 0;
|
||||
this.max_char = max_char || 70; //maximum amount of characters per line
|
||||
this.line_char_count = 0; //count to see if max_char was exceeded
|
||||
|
||||
for (var i=0; i<this.indent_size; i++) {
|
||||
this.indent_string += this.indent_character;
|
||||
}
|
||||
|
||||
this.print_newline = function (ignore, arr) {
|
||||
this.line_char_count = 0;
|
||||
if (!arr || !arr.length) {
|
||||
return;
|
||||
}
|
||||
if (!ignore) { //we might want the extra line
|
||||
while (this.Utils.in_array(arr[arr.length-1], this.Utils.whitespace)) {
|
||||
arr.pop();
|
||||
}
|
||||
}
|
||||
arr.push('\n');
|
||||
for (var i=0; i<this.indent_level; i++) {
|
||||
arr.push(this.indent_string);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.print_token = function (text) {
|
||||
this.output.push(text);
|
||||
}
|
||||
|
||||
this.indent = function () {
|
||||
this.indent_level++;
|
||||
}
|
||||
|
||||
this.unindent = function () {
|
||||
if (this.indent_level > 0) {
|
||||
this.indent_level--;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/*_____________________--------------------_____________________*/
|
||||
|
||||
|
||||
|
||||
multi_parser = new Parser(); //wrapping functions Parser
|
||||
multi_parser.printer(html_source, indent_character, indent_size); //initialize starting values
|
||||
|
||||
|
||||
|
||||
while (true) {
|
||||
var t = multi_parser.get_token();
|
||||
multi_parser.token_text = t[0];
|
||||
multi_parser.token_type = t[1];
|
||||
|
||||
if (multi_parser.token_type === 'TK_EOF') {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
switch (multi_parser.token_type) {
|
||||
case 'TK_TAG_START': case 'TK_TAG_SCRIPT': case 'TK_TAG_STYLE':
|
||||
multi_parser.print_newline(false, multi_parser.output);
|
||||
multi_parser.print_token(multi_parser.token_text);
|
||||
multi_parser.indent();
|
||||
multi_parser.current_mode = 'CONTENT';
|
||||
break;
|
||||
case 'TK_TAG_END':
|
||||
multi_parser.print_newline(true, multi_parser.output);
|
||||
multi_parser.print_token(multi_parser.token_text);
|
||||
multi_parser.current_mode = 'CONTENT';
|
||||
break;
|
||||
case 'TK_TAG_SINGLE':
|
||||
multi_parser.print_newline(false, multi_parser.output);
|
||||
multi_parser.print_token(multi_parser.token_text);
|
||||
multi_parser.current_mode = 'CONTENT';
|
||||
break;
|
||||
case 'TK_CONTENT':
|
||||
if (multi_parser.token_text !== '') {
|
||||
multi_parser.print_newline(false, multi_parser.output);
|
||||
multi_parser.print_token(multi_parser.token_text);
|
||||
}
|
||||
multi_parser.current_mode = 'TAG';
|
||||
break;
|
||||
}
|
||||
multi_parser.last_token = multi_parser.token_type;
|
||||
multi_parser.last_text = multi_parser.token_text;
|
||||
}
|
||||
return multi_parser.output.join('');
|
||||
}
|
||||
|
||||
1868
WaterCloud.Web/wwwroot/js/lay-module/iceEditor/iceEditor.js
Normal file
1868
WaterCloud.Web/wwwroot/js/lay-module/iceEditor/iceEditor.js
Normal file
File diff suppressed because one or more lines are too long
327
WaterCloud.Web/wwwroot/js/lay-module/iconPicker/iconPicker.js
Normal file
327
WaterCloud.Web/wwwroot/js/lay-module/iconPicker/iconPicker.js
Normal file
@@ -0,0 +1,327 @@
|
||||
|
||||
layui.define(['laypage', 'form'], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var IconPicker =function () {
|
||||
this.v = '0.1.beta';
|
||||
}, _MOD = 'iconPicker',
|
||||
_this = this,
|
||||
$ = layui.jquery,
|
||||
laypage = layui.laypage,
|
||||
form = layui.form,
|
||||
BODY = 'body',
|
||||
TIPS = '请选择图标';
|
||||
|
||||
/**
|
||||
* 渲染组件
|
||||
*/
|
||||
IconPicker.prototype.render = function(options){
|
||||
var opts = options,
|
||||
// DOM选择器
|
||||
elem = opts.elem,
|
||||
// 数据类型:fontClass/unicode
|
||||
type = opts.type == null ? 'fontClass' : opts.type,
|
||||
// 是否分页:true/false
|
||||
page = opts.page,
|
||||
// 每页显示数量
|
||||
limit = limit == null ? 12 : opts.limit,
|
||||
// 是否开启搜索:true/false
|
||||
search = opts.search == null ? true : opts.search,
|
||||
// 点击回调
|
||||
click = opts.click,
|
||||
// json数据
|
||||
data = {},
|
||||
// 唯一标识
|
||||
tmp = new Date().getTime(),
|
||||
// 是否使用的class数据
|
||||
isFontClass = opts.type === 'fontClass',
|
||||
TITLE = 'layui-select-title',
|
||||
TITLE_ID = 'layui-select-title-' + tmp,
|
||||
ICON_BODY = 'layui-iconpicker-' + tmp,
|
||||
PICKER_BODY = 'layui-iconpicker-body-' + tmp,
|
||||
PAGE_ID = 'layui-iconpicker-page-' + tmp,
|
||||
LIST_BOX = 'layui-iconpicker-list-box',
|
||||
selected = 'layui-form-selected',
|
||||
unselect = 'layui-unselect';
|
||||
|
||||
var a = {
|
||||
init: function () {
|
||||
data = common.getData[type]();
|
||||
|
||||
a.hideElem().createSelect().createBody().toggleSelect();
|
||||
common.loadCss();
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 隐藏elem
|
||||
*/
|
||||
hideElem: function () {
|
||||
$(elem).hide();
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 绘制select下拉选择框
|
||||
*/
|
||||
createSelect: function () {
|
||||
var selectHtml = '<div class="layui-iconpicker layui-unselect layui-form-select" id="'+ ICON_BODY +'">' +
|
||||
'<div class="'+ TITLE +'" id="'+ TITLE_ID +'">' +
|
||||
'<div class="layui-iconpicker-item">'+
|
||||
'<span class="layui-iconpicker-icon layui-unselect">' +
|
||||
'<i class="layui-icon"></i>' +
|
||||
'</span>'+
|
||||
'<i class="layui-edge"></i>' +
|
||||
'</div>'+
|
||||
'</div>' +
|
||||
'<div class="layui-anim layui-anim-upbit" style="">' +
|
||||
'123' +
|
||||
'</div>';
|
||||
$(elem).after(selectHtml);
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 展开/折叠下拉框
|
||||
*/
|
||||
toggleSelect: function () {
|
||||
var item = '#' + TITLE_ID + ' .layui-iconpicker-item,#' + TITLE_ID + ' .layui-iconpicker-item .layui-edge';
|
||||
a.event('click', item, function (e) {
|
||||
console.log('xxxx');
|
||||
var $icon = $('#' + ICON_BODY);
|
||||
if ($icon.hasClass(selected)) {
|
||||
$icon.removeClass(selected).addClass(unselect);
|
||||
} else {
|
||||
$icon.addClass(selected).removeClass(unselect);
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 绘制主体部分
|
||||
*/
|
||||
createBody: function () {
|
||||
// 获取数据
|
||||
var searchHtml = '';
|
||||
|
||||
if (search) {
|
||||
searchHtml = '<div class="layui-iconpicker-search">' +
|
||||
'<input class="layui-input">' +
|
||||
'<i class="layui-icon"></i>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
// 组合dom
|
||||
var bodyHtml = '<div class="layui-iconpicker-body" id="'+ PICKER_BODY +'">' +
|
||||
searchHtml +
|
||||
'<div class="'+ LIST_BOX +'"></div> '+
|
||||
'</div>';
|
||||
$('#' + ICON_BODY).find('.layui-anim').eq(0).html(bodyHtml);
|
||||
a.search().createList().check().page();
|
||||
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 绘制图标列表
|
||||
* @param text 模糊查询关键字
|
||||
* @returns {string}
|
||||
*/
|
||||
createList: function (text) {
|
||||
var d = data,
|
||||
l = d.length,
|
||||
pageHtml = '',
|
||||
listHtml = $('<div class="layui-iconpicker-list">')//'<div class="layui-iconpicker-list">';
|
||||
|
||||
// 计算分页数据
|
||||
var _limit = limit, // 每页显示数量
|
||||
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1), // 总计多少页
|
||||
_id = PAGE_ID;
|
||||
|
||||
// 图标列表
|
||||
var icons = [];
|
||||
|
||||
for (var i = 0; i < l; i++) {
|
||||
var obj = d[i];
|
||||
|
||||
// 判断是否模糊查询
|
||||
if (text && obj.indexOf(text) === -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 每个图标dom
|
||||
var icon = '<div class="layui-iconpicker-icon-item" title="'+ obj +'">';
|
||||
if (isFontClass){
|
||||
icon += '<i class="layui-icon '+ obj +'"></i>';
|
||||
} else {
|
||||
icon += '<i class="layui-icon">'+ obj.replace('amp;', '') +'</i>';
|
||||
}
|
||||
icon += '</div>';
|
||||
|
||||
icons.push(icon);
|
||||
}
|
||||
|
||||
// 查询出图标后再分页
|
||||
l = icons.length;
|
||||
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1);
|
||||
for (var i = 0; i < _pages; i++) {
|
||||
// 按limit分块
|
||||
var lm = $('<div class="layui-iconpicker-icon-limit" id="layui-iconpicker-icon-limit-'+ (i+1) +'">');
|
||||
|
||||
for (var j = i * _limit; j < (i+1) * _limit && j < l; j++) {
|
||||
lm.append(icons[j]);
|
||||
}
|
||||
|
||||
listHtml.append(lm);
|
||||
}
|
||||
|
||||
// 无数据
|
||||
if (l === 0) {
|
||||
listHtml.append('<p class="layui-iconpicker-tips">无数据</p>');
|
||||
}
|
||||
|
||||
// 判断是否分页
|
||||
if (page){
|
||||
$('#' + PICKER_BODY).addClass('layui-iconpicker-body-page');
|
||||
pageHtml = '<div class="layui-iconpicker-page" id="'+ PAGE_ID +'">' +
|
||||
'<div class="layui-iconpicker-page-count">' +
|
||||
'<span id="'+ PAGE_ID +'-current">1</span>/' +
|
||||
'<span id="'+ PAGE_ID +'-pages">'+ _pages +'</span>' +
|
||||
' (<span id="'+ PAGE_ID +'-length">'+ l +'</span>)' +
|
||||
'</div>' +
|
||||
'<div class="layui-iconpicker-page-operate">' +
|
||||
'<i class="layui-icon" id="'+ PAGE_ID +'-prev" data-index="0" prev></i> ' +
|
||||
'<i class="layui-icon" id="'+ PAGE_ID +'-next" data-index="2" next></i> ' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
|
||||
$('#' + ICON_BODY).find('.layui-anim').find('.' + LIST_BOX).html('').append(listHtml).append(pageHtml);
|
||||
return a;
|
||||
},
|
||||
// 分页
|
||||
page: function () {
|
||||
var icon = '#' + PAGE_ID + ' .layui-iconpicker-page-operate .layui-icon';
|
||||
|
||||
$(icon).unbind('click');
|
||||
a.event('click', icon, function (e) {
|
||||
var elem = e.currentTarget,
|
||||
total = parseInt($('#' +PAGE_ID + '-pages').html()),
|
||||
isPrev = $(elem).attr('prev') !== undefined,
|
||||
// 按钮上标的页码
|
||||
index = parseInt($(elem).attr('data-index')),
|
||||
$cur = $('#' +PAGE_ID + '-current'),
|
||||
// 点击时正在显示的页码
|
||||
current = parseInt($cur.html());
|
||||
|
||||
// 分页数据
|
||||
if (isPrev && current > 1) {
|
||||
current=current-1;
|
||||
$(icon + '[prev]').attr('data-index', current);
|
||||
} else if (!isPrev && current < total){
|
||||
current=current+1;
|
||||
$(icon + '[next]').attr('data-index', current);
|
||||
}
|
||||
$cur.html(current);
|
||||
|
||||
// 图标数据
|
||||
$('.layui-iconpicker-icon-limit').hide();
|
||||
$('#layui-iconpicker-icon-limit-' + current).show();
|
||||
e.stopPropagation();
|
||||
});
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
search: function () {
|
||||
var item = '#' + PICKER_BODY + ' .layui-iconpicker-search .layui-input';
|
||||
a.event('input propertychange', item, function (e) {
|
||||
var elem = e.target,
|
||||
t = $(elem).val();
|
||||
a.createList(t);
|
||||
});
|
||||
a.event('click', item, function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 点击选中图标
|
||||
*/
|
||||
check: function () {
|
||||
var item = '#' + PICKER_BODY + ' .layui-iconpicker-icon-item';
|
||||
a.event('click', item, function (e) {
|
||||
var el = $(e.currentTarget).find('.layui-icon'),
|
||||
icon = '';
|
||||
if (isFontClass) {
|
||||
var clsArr = el.attr('class').split(/[\s\n]/),
|
||||
cls = clsArr[1],
|
||||
icon = cls;
|
||||
$('#' + TITLE_ID).find('.layui-iconpicker-item .layui-icon').html('').attr('class', clsArr.join(' '));
|
||||
} else {
|
||||
var cls = el.html(),
|
||||
icon = cls;
|
||||
$('#' + TITLE_ID).find('.layui-iconpicker-item .layui-icon').html(icon);
|
||||
}
|
||||
|
||||
$('#' + ICON_BODY).removeClass(selected).addClass(unselect);
|
||||
$(elem).attr('value', icon);
|
||||
// 回调
|
||||
if (click) {
|
||||
click({
|
||||
icon: icon
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
return a;
|
||||
},
|
||||
event: function (evt, el, fn) {
|
||||
$(BODY).on(evt, el, fn);
|
||||
}
|
||||
};
|
||||
|
||||
var common = {
|
||||
/**
|
||||
* 加载样式表
|
||||
*/
|
||||
loadCss: function () {
|
||||
var css = '.layui-iconpicker {max-width: 280px;}.layui-iconpicker .layui-anim{display:none;position:absolute;left:0;top:42px;padding:5px 0;z-index:899;min-width:100%;border:1px solid #d2d2d2;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12);box-sizing:border-box;}.layui-iconpicker-item{border:1px solid #e6e6e6;width:90px;height:38px;border-radius:4px;cursor:pointer;position:relative;}.layui-iconpicker-icon{border-right:1px solid #e6e6e6;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;width:60px;height:100%;float:left;text-align:center;background:#fff;transition:all .3s;}.layui-iconpicker-icon i{line-height:38px;font-size:18px;}.layui-iconpicker-item > .layui-edge{left:70px;}.layui-iconpicker-item:hover{border-color:#D2D2D2!important;}.layui-iconpicker-item:hover .layui-iconpicker-icon{border-color:#D2D2D2!important;}.layui-iconpicker.layui-form-selected .layui-anim{display:block;}.layui-iconpicker-body{padding:6px;}.layui-iconpicker .layui-iconpicker-list{background-color:#fff;border:1px solid #ccc;border-radius:4px;}.layui-iconpicker .layui-iconpicker-icon-item{display:inline-block;width:21.1%;line-height:36px;text-align:center;cursor:pointer;vertical-align:top;height:36px;margin:4px;border:1px solid #ddd;border-radius:2px;transition:300ms;}.layui-iconpicker .layui-iconpicker-icon-item i.layui-icon{font-size:17px;}.layui-iconpicker .layui-iconpicker-icon-item:hover{background-color:#eee;border-color:#ccc;-webkit-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;-moz-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;box-shadow:0 0 2px #aaa,0 0 2px #fff inset;text-shadow:0 0 1px #fff;}.layui-iconpicker-search{position:relative;margin:0 0 6px 0;border:1px solid #e6e6e6;border-radius:2px;transition:300ms;}.layui-iconpicker-search:hover{border-color:#D2D2D2!important;}.layui-iconpicker-search .layui-input{cursor:text;display:inline-block;width:86%;border:none;padding-right:0;margin-top:1px;}.layui-iconpicker-search .layui-icon{position:absolute;top:11px;right:4%;}.layui-iconpicker-tips{text-align:center;padding:8px 0;cursor:not-allowed;}.layui-iconpicker-page{margin-top:6px;margin-bottom:-6px;font-size:12px;padding:0 2px;}.layui-iconpicker-page-count{display:inline-block;}.layui-iconpicker-page-operate{display:inline-block;float:right;cursor:default;}.layui-iconpicker-page-operate .layui-icon{font-size:12px;cursor:pointer;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit{display:none;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit:first-child{display:block;}';
|
||||
$('head').append('<style rel="stylesheet">'+css+'</style>');
|
||||
},
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
getData: {
|
||||
fontClass: function () {
|
||||
var arr = ["layui-icon-rate-half","layui-icon-rate","layui-icon-rate-solid","layui-icon-cellphone","layui-icon-vercode","layui-icon-login-wechat","layui-icon-login-qq","layui-icon-login-weibo","layui-icon-password","layui-icon-username","layui-icon-refresh-3","layui-icon-auz","layui-icon-spread-left","layui-icon-shrink-right","layui-icon-snowflake","layui-icon-tips","layui-icon-note","layui-icon-home","layui-icon-senior","layui-icon-refresh","layui-icon-refresh-1","layui-icon-flag","layui-icon-theme","layui-icon-notice","layui-icon-website","layui-icon-console","layui-icon-face-surprised","layui-icon-set","layui-icon-template-1","layui-icon-app","layui-icon-template","layui-icon-praise","layui-icon-tread","layui-icon-male","layui-icon-female","layui-icon-camera","layui-icon-camera-fill","layui-icon-more","layui-icon-more-vertical","layui-icon-rmb","layui-icon-dollar","layui-icon-diamond","layui-icon-fire","layui-icon-return","layui-icon-location","layui-icon-read","layui-icon-survey","layui-icon-face-smile","layui-icon-face-cry","layui-icon-cart-simple","layui-icon-cart","layui-icon-next","layui-icon-prev","layui-icon-upload-drag","layui-icon-upload","layui-icon-download-circle","layui-icon-component","layui-icon-file-b","layui-icon-user","layui-icon-find-fill","layui-icon-loading","layui-icon-loading-1","layui-icon-add-1","layui-icon-play","layui-icon-pause","layui-icon-headset","layui-icon-video","layui-icon-voice","layui-icon-speaker","layui-icon-fonts-del","layui-icon-fonts-code","layui-icon-fonts-html","layui-icon-fonts-strong","layui-icon-unlink","layui-icon-picture","layui-icon-link","layui-icon-face-smile-b","layui-icon-align-left","layui-icon-align-right","layui-icon-align-center","layui-icon-fonts-u","layui-icon-fonts-i","layui-icon-tabs","layui-icon-radio","layui-icon-circle","layui-icon-edit","layui-icon-share","layui-icon-delete","layui-icon-form","layui-icon-cellphone-fine","layui-icon-dialogue","layui-icon-fonts-clear","layui-icon-layer","layui-icon-date","layui-icon-water","layui-icon-code-circle","layui-icon-carousel","layui-icon-prev-circle","layui-icon-layouts","layui-icon-util","layui-icon-templeate-1","layui-icon-upload-circle","layui-icon-tree","layui-icon-table","layui-icon-chart","layui-icon-chart-screen","layui-icon-engine","layui-icon-triangle-d","layui-icon-triangle-r","layui-icon-file","layui-icon-set-sm","layui-icon-add-circle","layui-icon-404","layui-icon-about","layui-icon-up","layui-icon-down","layui-icon-left","layui-icon-right","layui-icon-circle-dot","layui-icon-search","layui-icon-set-fill","layui-icon-group","layui-icon-friends","layui-icon-reply-fill","layui-icon-menu-fill","layui-icon-log","layui-icon-picture-fine","layui-icon-face-smile-fine","layui-icon-list","layui-icon-release","layui-icon-ok","layui-icon-help","layui-icon-chat","layui-icon-top","layui-icon-star","layui-icon-star-fill","layui-icon-close-fill","layui-icon-close","layui-icon-ok-circle","layui-icon-add-circle-fine"];
|
||||
return arr;
|
||||
},
|
||||
unicode: function () {
|
||||
return ["&#xe6c9;","&#xe67b;","&#xe67a;","&#xe678;","&#xe679;","&#xe677;","&#xe676;","&#xe675;","&#xe673;","&#xe66f;","&#xe9aa;","&#xe672;","&#xe66b;","&#xe668;","&#xe6b1;","&#xe702;","&#xe66e;","&#xe68e;","&#xe674;","&#xe669;","&#xe666;","&#xe66c;","&#xe66a;","&#xe667;","&#xe7ae;","&#xe665;","&#xe664;","&#xe716;","&#xe656;","&#xe653;","&#xe663;","&#xe6c6;","&#xe6c5;","&#xe662;","&#xe661;","&#xe660;","&#xe65d;","&#xe65f;","&#xe671;","&#xe65e;","&#xe659;","&#xe735;","&#xe756;","&#xe65c;","&#xe715;","&#xe705;","&#xe6b2;","&#xe6af;","&#xe69c;","&#xe698;","&#xe657;","&#xe65b;","&#xe65a;","&#xe681;","&#xe67c;","&#xe601;","&#xe857;","&#xe655;","&#xe770;","&#xe670;","&#xe63d;","&#xe63e;","&#xe654;","&#xe652;","&#xe651;","&#xe6fc;","&#xe6ed;","&#xe688;","&#xe645;","&#xe64f;","&#xe64e;","&#xe64b;","&#xe62b;","&#xe64d;","&#xe64a;","&#xe64c;","&#xe650;","&#xe649;","&#xe648;","&#xe647;","&#xe646;","&#xe644;","&#xe62a;","&#xe643;","&#xe63f;","&#xe642;","&#xe641;","&#xe640;","&#xe63c;","&#xe63b;","&#xe63a;","&#xe639;","&#xe638;","&#xe637;","&#xe636;","&#xe635;","&#xe634;","&#xe633;","&#xe632;","&#xe631;","&#xe630;","&#xe62f;","&#xe62e;","&#xe62d;","&#xe62c;","&#xe629;","&#xe628;","&#xe625;","&#xe623;","&#xe621;","&#xe620;","&#xe61f;","&#xe61c;","&#xe60b;","&#xe619;","&#xe61a;","&#xe603;","&#xe602;","&#xe617;","&#xe615;","&#xe614;","&#xe613;","&#xe612;","&#xe611;","&#xe60f;","&#xe60e;","&#xe60d;","&#xe60c;","&#xe60a;","&#xe609;","&#xe605;","&#xe607;","&#xe606;","&#xe604;","&#xe600;","&#xe658;","&#x1007;","&#x1006;","&#x1005;","&#xe608;"];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
a.init();
|
||||
return new IconPicker();
|
||||
};
|
||||
|
||||
/**
|
||||
* 选中图标
|
||||
* @param filter lay-filter
|
||||
* @param iconName 图标名称,自动识别fontClass/unicode
|
||||
*/
|
||||
IconPicker.prototype.checkIcon = function (filter, iconName){
|
||||
var p = $('*[lay-filter='+ filter +']').next().find('.layui-iconpicker-item .layui-icon'),
|
||||
c = iconName;
|
||||
|
||||
if (c.indexOf('#xe') > 0){
|
||||
p.html(c);
|
||||
} else {
|
||||
p.html('').attr('class', 'layui-icon ' + c);
|
||||
}
|
||||
};
|
||||
|
||||
var iconPicker = new IconPicker();
|
||||
exports(_MOD, iconPicker);
|
||||
});
|
||||
393
WaterCloud.Web/wwwroot/js/lay-module/iconPicker/iconPickerFa.js
Normal file
393
WaterCloud.Web/wwwroot/js/lay-module/iconPicker/iconPickerFa.js
Normal file
@@ -0,0 +1,393 @@
|
||||
/**
|
||||
* fa图标选择器 根据开源项目https://gitee.com/wujiawei0926/iconpicker修改而来
|
||||
* @author wujiawei0926@yeah.net chung@99php.cn
|
||||
* @version 1.1
|
||||
*/
|
||||
|
||||
layui.define(['laypage', 'form'], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var IconPicker = function () {
|
||||
this.v = '1.1';
|
||||
}, _MOD = 'iconPickerFa',
|
||||
_this = this,
|
||||
$ = layui.jquery,
|
||||
laypage = layui.laypage,
|
||||
form = layui.form,
|
||||
BODY = 'body',
|
||||
TIPS = '请选择图标';
|
||||
|
||||
/**
|
||||
* 渲染组件
|
||||
*/
|
||||
IconPicker.prototype.render = function (options) {
|
||||
var opts = options,
|
||||
// DOM选择器
|
||||
elem = opts.elem,
|
||||
// 数据类型:fontClass/unicode
|
||||
url = opts.url,
|
||||
// 是否分页:true/false
|
||||
page = opts.page == null ? true : opts.page,
|
||||
// 每页显示数量
|
||||
limit = opts.limit == null ? 12 : opts.limit,
|
||||
// 是否开启搜索:true/false
|
||||
search = opts.search == null ? true : opts.search,
|
||||
// 每个图标格子的宽度:'43px'或'20%'
|
||||
cellWidth = opts.cellWidth,
|
||||
// 点击回调
|
||||
click = opts.click,
|
||||
// 渲染成功后的回调
|
||||
success = opts.success,
|
||||
// json数据
|
||||
data = {},
|
||||
// 唯一标识
|
||||
tmp = new Date().getTime(),
|
||||
// 初始化时input的值
|
||||
ORIGINAL_ELEM_VALUE = $(elem).val(),
|
||||
TITLE = 'layui-select-title',
|
||||
TITLE_ID = 'layui-select-title-' + tmp,
|
||||
ICON_BODY = 'layui-iconpicker-' + tmp,
|
||||
PICKER_BODY = 'layui-iconpicker-body-' + tmp,
|
||||
PAGE_ID = 'layui-iconpicker-page-' + tmp,
|
||||
LIST_BOX = 'layui-iconpicker-list-box',
|
||||
selected = 'layui-form-selected',
|
||||
unselect = 'layui-unselect';
|
||||
|
||||
var a = {
|
||||
init: function () {
|
||||
data = common.getData(url);
|
||||
|
||||
a.hideElem().createSelect().createBody().toggleSelect();
|
||||
a.preventEvent().inputListen();
|
||||
common.loadCss();
|
||||
|
||||
if (success) {
|
||||
success(this.successHandle());
|
||||
}
|
||||
|
||||
return a;
|
||||
},
|
||||
successHandle: function () {
|
||||
var d = {
|
||||
options: opts,
|
||||
data: data,
|
||||
id: tmp,
|
||||
elem: $('#' + ICON_BODY)
|
||||
};
|
||||
return d;
|
||||
},
|
||||
/**
|
||||
* 隐藏elem
|
||||
*/
|
||||
hideElem: function () {
|
||||
$(elem).hide();
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 绘制select下拉选择框
|
||||
*/
|
||||
createSelect: function () {
|
||||
var oriIcon = '<i class="fa">';
|
||||
|
||||
// 默认图标
|
||||
if (ORIGINAL_ELEM_VALUE != '') {
|
||||
oriIcon = '<i class="fa ' + ORIGINAL_ELEM_VALUE + '">';
|
||||
}
|
||||
oriIcon += '</i>';
|
||||
var selectHtml = '<div class="layui-iconpicker layui-unselect layui-form-select" id="' + ICON_BODY + '">' +
|
||||
'<div class="' + TITLE + '" id="' + TITLE_ID + '">' +
|
||||
'<div class="layui-iconpicker-item">' +
|
||||
'<span class="layui-iconpicker-icon layui-unselect">' +
|
||||
oriIcon +
|
||||
'</span>' +
|
||||
'<i class="layui-edge"></i>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<div class="layui-anim layui-anim-upbit" style="">' +
|
||||
'123' +
|
||||
'</div>';
|
||||
$(elem).after(selectHtml);
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 展开/折叠下拉框
|
||||
*/
|
||||
toggleSelect: function () {
|
||||
var item = '#' + TITLE_ID + ' .layui-iconpicker-item,#' + TITLE_ID + ' .layui-iconpicker-item .layui-edge';
|
||||
a.event('click', item, function (e) {
|
||||
var $icon = $('#' + ICON_BODY);
|
||||
if ($icon.hasClass(selected)) {
|
||||
$icon.removeClass(selected).addClass(unselect);
|
||||
} else {
|
||||
// 隐藏其他picker
|
||||
$('.layui-form-select').removeClass(selected);
|
||||
// 显示当前picker
|
||||
$icon.addClass(selected).removeClass(unselect);
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 绘制主体部分
|
||||
*/
|
||||
createBody: function () {
|
||||
// 获取数据
|
||||
var searchHtml = '';
|
||||
|
||||
if (search) {
|
||||
searchHtml = '<div class="layui-iconpicker-search">' +
|
||||
'<input class="layui-input">' +
|
||||
'<i class="layui-icon"></i>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
// 组合dom
|
||||
var bodyHtml = '<div class="layui-iconpicker-body" id="' + PICKER_BODY + '">' +
|
||||
searchHtml +
|
||||
'<div class="' + LIST_BOX + '"></div> ' +
|
||||
'</div>';
|
||||
$('#' + ICON_BODY).find('.layui-anim').eq(0).html(bodyHtml);
|
||||
a.search().createList().check().page();
|
||||
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 绘制图标列表
|
||||
* @param text 模糊查询关键字
|
||||
* @returns {string}
|
||||
*/
|
||||
createList: function (text) {
|
||||
var d = data,
|
||||
l = d.length,
|
||||
pageHtml = '',
|
||||
listHtml = $('<div class="layui-iconpicker-list">')//'<div class="layui-iconpicker-list">';
|
||||
|
||||
// 计算分页数据
|
||||
var _limit = limit, // 每页显示数量
|
||||
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1), // 总计多少页
|
||||
_id = PAGE_ID;
|
||||
|
||||
// 图标列表
|
||||
var icons = [];
|
||||
|
||||
for (var i = 0; i < l; i++) {
|
||||
var obj = d[i];
|
||||
|
||||
// 判断是否模糊查询
|
||||
if (text && obj.indexOf(text) === -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 是否自定义格子宽度
|
||||
var style = '';
|
||||
if (cellWidth !== null) {
|
||||
style += ' style="width:' + cellWidth + '"';
|
||||
}
|
||||
|
||||
// 每个图标dom
|
||||
var icon = '<div class="layui-iconpicker-icon-item" title="' + obj + '" ' + style + '>';
|
||||
|
||||
icon += '<i class="fa ' + obj + '"></i>';
|
||||
|
||||
icon += '</div>';
|
||||
|
||||
icons.push(icon);
|
||||
}
|
||||
|
||||
// 查询出图标后再分页
|
||||
l = icons.length;
|
||||
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1);
|
||||
for (var i = 0; i < _pages; i++) {
|
||||
// 按limit分块
|
||||
var lm = $('<div class="layui-iconpicker-icon-limit" id="layui-iconpicker-icon-limit-' + tmp + (i + 1) + '">');
|
||||
|
||||
for (var j = i * _limit; j < (i + 1) * _limit && j < l; j++) {
|
||||
lm.append(icons[j]);
|
||||
}
|
||||
|
||||
listHtml.append(lm);
|
||||
}
|
||||
|
||||
// 无数据
|
||||
if (l === 0) {
|
||||
listHtml.append('<p class="layui-iconpicker-tips">无数据</p>');
|
||||
}
|
||||
|
||||
// 判断是否分页
|
||||
if (page) {
|
||||
$('#' + PICKER_BODY).addClass('layui-iconpicker-body-page');
|
||||
pageHtml = '<div class="layui-iconpicker-page" id="' + PAGE_ID + '">' +
|
||||
'<div class="layui-iconpicker-page-count">' +
|
||||
'<span id="' + PAGE_ID + '-current">1</span>/' +
|
||||
'<span id="' + PAGE_ID + '-pages">' + _pages + '</span>' +
|
||||
' (<span id="' + PAGE_ID + '-length">' + l + '</span>)' +
|
||||
'</div>' +
|
||||
'<div class="layui-iconpicker-page-operate">' +
|
||||
'<i class="layui-icon" id="' + PAGE_ID + '-prev" data-index="0" prev></i> ' +
|
||||
'<i class="layui-icon" id="' + PAGE_ID + '-next" data-index="2" next></i> ' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
|
||||
$('#' + ICON_BODY).find('.layui-anim').find('.' + LIST_BOX).html('').append(listHtml).append(pageHtml);
|
||||
return a;
|
||||
},
|
||||
// 阻止Layui的一些默认事件
|
||||
preventEvent: function () {
|
||||
var item = '#' + ICON_BODY + ' .layui-anim';
|
||||
a.event('click', item, function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
return a;
|
||||
},
|
||||
// 分页
|
||||
page: function () {
|
||||
var icon = '#' + PAGE_ID + ' .layui-iconpicker-page-operate .layui-icon';
|
||||
|
||||
$(icon).unbind('click');
|
||||
a.event('click', icon, function (e) {
|
||||
var elem = e.currentTarget,
|
||||
total = parseInt($('#' + PAGE_ID + '-pages').html()),
|
||||
isPrev = $(elem).attr('prev') !== undefined,
|
||||
// 按钮上标的页码
|
||||
index = parseInt($(elem).attr('data-index')),
|
||||
$cur = $('#' + PAGE_ID + '-current'),
|
||||
// 点击时正在显示的页码
|
||||
current = parseInt($cur.html());
|
||||
|
||||
// 分页数据
|
||||
if (isPrev && current > 1) {
|
||||
current = current - 1;
|
||||
$(icon + '[prev]').attr('data-index', current);
|
||||
} else if (!isPrev && current < total) {
|
||||
current = current + 1;
|
||||
$(icon + '[next]').attr('data-index', current);
|
||||
}
|
||||
$cur.html(current);
|
||||
|
||||
// 图标数据
|
||||
$('#' + ICON_BODY + ' .layui-iconpicker-icon-limit').hide();
|
||||
$('#layui-iconpicker-icon-limit-' + tmp + current).show();
|
||||
e.stopPropagation();
|
||||
});
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
search: function () {
|
||||
var item = '#' + PICKER_BODY + ' .layui-iconpicker-search .layui-input';
|
||||
a.event('input propertychange', item, function (e) {
|
||||
var elem = e.target,
|
||||
t = $(elem).val();
|
||||
a.createList(t);
|
||||
});
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 点击选中图标
|
||||
*/
|
||||
check: function () {
|
||||
var item = '#' + PICKER_BODY + ' .layui-iconpicker-icon-item';
|
||||
a.event('click', item, function (e) {
|
||||
var el = $(e.currentTarget).find('.fa'),
|
||||
icon = '';
|
||||
|
||||
var clsArr = el.attr('class').split(/[\s\n]/),
|
||||
cls = clsArr[1],
|
||||
icon = cls;
|
||||
$('#' + TITLE_ID).find('.layui-iconpicker-item .fa').html('').attr('class', clsArr.join(' '));
|
||||
|
||||
|
||||
$('#' + ICON_BODY).removeClass(selected).addClass(unselect);
|
||||
$(elem).val(icon).attr('value', icon);
|
||||
// 回调
|
||||
if (click) {
|
||||
click({
|
||||
icon: icon
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
return a;
|
||||
},
|
||||
// 监听原始input数值改变
|
||||
inputListen: function () {
|
||||
var el = $(elem);
|
||||
a.event('change', elem, function () {
|
||||
var value = el.val();
|
||||
})
|
||||
// el.change(function(){
|
||||
|
||||
// });
|
||||
return a;
|
||||
},
|
||||
event: function (evt, el, fn) {
|
||||
$(BODY).on(evt, el, fn);
|
||||
}
|
||||
};
|
||||
|
||||
var common = {
|
||||
/**
|
||||
* 加载样式表
|
||||
*/
|
||||
loadCss: function () {
|
||||
var css = '.layui-iconpicker {max-width: 280px;}.layui-iconpicker .layui-anim{display:none;position:absolute;left:0;top:42px;padding:5px 0;z-index:899;min-width:100%;border:1px solid #d2d2d2;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12);box-sizing:border-box;}.layui-iconpicker-item{border:1px solid #e6e6e6;width:90px;height:38px;border-radius:4px;cursor:pointer;position:relative;}.layui-iconpicker-icon{border-right:1px solid #e6e6e6;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;width:60px;height:100%;float:left;text-align:center;background:#fff;transition:all .3s;}.layui-iconpicker-icon i{line-height:38px;font-size:18px;}.layui-iconpicker-item > .layui-edge{left:70px;}.layui-iconpicker-item:hover{border-color:#D2D2D2!important;}.layui-iconpicker-item:hover .layui-iconpicker-icon{border-color:#D2D2D2!important;}.layui-iconpicker.layui-form-selected .layui-anim{display:block;}.layui-iconpicker-body{padding:6px;}.layui-iconpicker .layui-iconpicker-list{background-color:#fff;border:1px solid #ccc;border-radius:4px;}.layui-iconpicker .layui-iconpicker-icon-item{display:inline-block;width:21.1%;line-height:36px;text-align:center;cursor:pointer;vertical-align:top;height:36px;margin:4px;border:1px solid #ddd;border-radius:2px;transition:300ms;}.layui-iconpicker .layui-iconpicker-icon-item i.layui-icon{font-size:17px;}.layui-iconpicker .layui-iconpicker-icon-item:hover{background-color:#eee;border-color:#ccc;-webkit-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;-moz-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;box-shadow:0 0 2px #aaa,0 0 2px #fff inset;text-shadow:0 0 1px #fff;}.layui-iconpicker-search{position:relative;margin:0 0 6px 0;border:1px solid #e6e6e6;border-radius:2px;transition:300ms;}.layui-iconpicker-search:hover{border-color:#D2D2D2!important;}.layui-iconpicker-search .layui-input{cursor:text;display:inline-block;width:86%;border:none;padding-right:0;margin-top:1px;}.layui-iconpicker-search .layui-icon{position:absolute;top:11px;right:4%;}.layui-iconpicker-tips{text-align:center;padding:8px 0;cursor:not-allowed;}.layui-iconpicker-page{margin-top:6px;margin-bottom:-6px;font-size:12px;padding:0 2px;}.layui-iconpicker-page-count{display:inline-block;}.layui-iconpicker-page-operate{display:inline-block;float:right;cursor:default;}.layui-iconpicker-page-operate .layui-icon{font-size:12px;cursor:pointer;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit{display:none;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit:first-child{display:block;}';
|
||||
var $style = $('head').find('style[iconpicker]');
|
||||
if ($style.length === 0) {
|
||||
$('head').append('<style rel="stylesheet" iconpicker>' + css + '</style>');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
getData: function (url) {
|
||||
var iconlist = [];
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'get',
|
||||
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
async: false,
|
||||
success: function (ret) {
|
||||
var exp = /fa-var-(.*):/ig;
|
||||
var result;
|
||||
while ((result = exp.exec(ret)) != null) {
|
||||
iconlist.push('fa-' + result[1]);
|
||||
}
|
||||
},
|
||||
error: function (xhr, textstatus, thrown) {
|
||||
layer.msg('fa图标接口有误');
|
||||
}
|
||||
});
|
||||
return iconlist;
|
||||
}
|
||||
};
|
||||
|
||||
a.init();
|
||||
return new IconPicker();
|
||||
};
|
||||
|
||||
/**
|
||||
* 选中图标
|
||||
* @param filter lay-filter
|
||||
* @param iconName 图标名称,自动识别fontClass/unicode
|
||||
*/
|
||||
IconPicker.prototype.checkIcon = function (filter, iconName) {
|
||||
var el = $('*[lay-filter=' + filter + ']'),
|
||||
p = el.next().find('.layui-iconpicker-item .fa'),
|
||||
c = iconName;
|
||||
|
||||
if (c.indexOf('#xe') > 0) {
|
||||
p.html(c);
|
||||
} else {
|
||||
p.html('').attr('class', 'fa ' + c);
|
||||
}
|
||||
el.attr('value', c).val(c);
|
||||
};
|
||||
|
||||
var iconPicker = new IconPicker();
|
||||
exports(_MOD, iconPicker);
|
||||
});
|
||||
568
WaterCloud.Web/wwwroot/js/lay-module/jsformat.js
Normal file
568
WaterCloud.Web/wwwroot/js/lay-module/jsformat.js
Normal file
@@ -0,0 +1,568 @@
|
||||
|
||||
|
||||
function js_beautify(js_source_text, indent_size, indent_character, indent_level)
|
||||
{
|
||||
|
||||
var input, output, token_text, last_type, last_text, last_word, current_mode, modes, indent_string;
|
||||
var whitespace, wordchar, punct, parser_pos, line_starters, in_case;
|
||||
var prefix, token_type, do_block_just_closed, var_line, var_line_tainted;
|
||||
|
||||
|
||||
|
||||
function trim_output()
|
||||
{
|
||||
while (output.length && (output[output.length - 1] === ' ' || output[output.length - 1] === indent_string)) {
|
||||
output.pop();
|
||||
}
|
||||
}
|
||||
|
||||
function print_newline(ignore_repeated)
|
||||
{
|
||||
ignore_repeated = typeof ignore_repeated === 'undefined' ? true: ignore_repeated;
|
||||
|
||||
trim_output();
|
||||
|
||||
if (!output.length) {
|
||||
return; // no newline on start of file
|
||||
}
|
||||
|
||||
if (output[output.length - 1] !== "\n" || !ignore_repeated) {
|
||||
output.push("\n");
|
||||
}
|
||||
for (var i = 0; i < indent_level; i++) {
|
||||
output.push(indent_string);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function print_space()
|
||||
{
|
||||
var last_output = output.length ? output[output.length - 1] : ' ';
|
||||
if (last_output !== ' ' && last_output !== '\n' && last_output !== indent_string) { // prevent occassional duplicate space
|
||||
output.push(' ');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function print_token()
|
||||
{
|
||||
output.push(token_text);
|
||||
}
|
||||
|
||||
function indent()
|
||||
{
|
||||
indent_level++;
|
||||
}
|
||||
|
||||
|
||||
function unindent()
|
||||
{
|
||||
if (indent_level) {
|
||||
indent_level--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function remove_indent()
|
||||
{
|
||||
if (output.length && output[output.length - 1] === indent_string) {
|
||||
output.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function set_mode(mode)
|
||||
{
|
||||
modes.push(current_mode);
|
||||
current_mode = mode;
|
||||
}
|
||||
|
||||
|
||||
function restore_mode()
|
||||
{
|
||||
do_block_just_closed = current_mode === 'DO_BLOCK';
|
||||
current_mode = modes.pop();
|
||||
}
|
||||
|
||||
|
||||
function in_array(what, arr)
|
||||
{
|
||||
for (var i = 0; i < arr.length; i++)
|
||||
{
|
||||
if (arr[i] === what) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function get_next_token()
|
||||
{
|
||||
var n_newlines = 0;
|
||||
var c = '';
|
||||
|
||||
do {
|
||||
if (parser_pos >= input.length) {
|
||||
return ['', 'TK_EOF'];
|
||||
}
|
||||
c = input.charAt(parser_pos);
|
||||
|
||||
parser_pos += 1;
|
||||
if (c === "\n") {
|
||||
n_newlines += 1;
|
||||
}
|
||||
}
|
||||
while (in_array(c, whitespace));
|
||||
|
||||
if (n_newlines > 1) {
|
||||
for (var i = 0; i < 2; i++) {
|
||||
print_newline(i === 0);
|
||||
}
|
||||
}
|
||||
var wanted_newline = (n_newlines === 1);
|
||||
|
||||
|
||||
if (in_array(c, wordchar)) {
|
||||
if (parser_pos < input.length) {
|
||||
while (in_array(input.charAt(parser_pos), wordchar)) {
|
||||
c += input.charAt(parser_pos);
|
||||
parser_pos += 1;
|
||||
if (parser_pos === input.length) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// small and surprisingly unugly hack for 1E-10 representation
|
||||
if (parser_pos !== input.length && c.match(/^[0-9]+[Ee]$/) && input.charAt(parser_pos) === '-') {
|
||||
parser_pos += 1;
|
||||
|
||||
var t = get_next_token(parser_pos);
|
||||
c += '-' + t[0];
|
||||
return [c, 'TK_WORD'];
|
||||
}
|
||||
|
||||
if (c === 'in') { // hack for 'in' operator
|
||||
return [c, 'TK_OPERATOR'];
|
||||
}
|
||||
return [c, 'TK_WORD'];
|
||||
}
|
||||
|
||||
if (c === '(' || c === '[') {
|
||||
return [c, 'TK_START_EXPR'];
|
||||
}
|
||||
|
||||
if (c === ')' || c === ']') {
|
||||
return [c, 'TK_END_EXPR'];
|
||||
}
|
||||
|
||||
if (c === '{') {
|
||||
return [c, 'TK_START_BLOCK'];
|
||||
}
|
||||
|
||||
if (c === '}') {
|
||||
return [c, 'TK_END_BLOCK'];
|
||||
}
|
||||
|
||||
if (c === ';') {
|
||||
return [c, 'TK_END_COMMAND'];
|
||||
}
|
||||
|
||||
if (c === '/') {
|
||||
var comment = '';
|
||||
// peek for comment /* ... */
|
||||
if (input.charAt(parser_pos) === '*') {
|
||||
parser_pos += 1;
|
||||
if (parser_pos < input.length) {
|
||||
while (! (input.charAt(parser_pos) === '*' && input.charAt(parser_pos + 1) && input.charAt(parser_pos + 1) === '/') && parser_pos < input.length) {
|
||||
comment += input.charAt(parser_pos);
|
||||
parser_pos += 1;
|
||||
if (parser_pos >= input.length) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
parser_pos += 2;
|
||||
return ['/*' + comment + '*/', 'TK_BLOCK_COMMENT'];
|
||||
}
|
||||
// peek for comment // ...
|
||||
if (input.charAt(parser_pos) === '/') {
|
||||
comment = c;
|
||||
while (input.charAt(parser_pos) !== "\x0d" && input.charAt(parser_pos) !== "\x0a") {
|
||||
comment += input.charAt(parser_pos);
|
||||
parser_pos += 1;
|
||||
if (parser_pos >= input.length) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
parser_pos += 1;
|
||||
if (wanted_newline) {
|
||||
print_newline();
|
||||
}
|
||||
return [comment, 'TK_COMMENT'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (c === "'" || // string
|
||||
c === '"' || // string
|
||||
(c === '/' &&
|
||||
((last_type === 'TK_WORD' && last_text === 'return') || (last_type === 'TK_START_EXPR' || last_type === 'TK_END_BLOCK' || last_type === 'TK_OPERATOR' || last_type === 'TK_EOF' || last_type === 'TK_END_COMMAND')))) { // regexp
|
||||
var sep = c;
|
||||
var esc = false;
|
||||
c = '';
|
||||
|
||||
if (parser_pos < input.length) {
|
||||
|
||||
while (esc || input.charAt(parser_pos) !== sep) {
|
||||
c += input.charAt(parser_pos);
|
||||
if (!esc) {
|
||||
esc = input.charAt(parser_pos) === '\\';
|
||||
} else {
|
||||
esc = false;
|
||||
}
|
||||
parser_pos += 1;
|
||||
if (parser_pos >= input.length) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
parser_pos += 1;
|
||||
if (last_type === 'TK_END_COMMAND') {
|
||||
print_newline();
|
||||
}
|
||||
return [sep + c + sep, 'TK_STRING'];
|
||||
}
|
||||
|
||||
if (in_array(c, punct)) {
|
||||
while (parser_pos < input.length && in_array(c + input.charAt(parser_pos), punct)) {
|
||||
c += input.charAt(parser_pos);
|
||||
parser_pos += 1;
|
||||
if (parser_pos >= input.length) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [c, 'TK_OPERATOR'];
|
||||
}
|
||||
|
||||
return [c, 'TK_UNKNOWN'];
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------
|
||||
|
||||
indent_character = indent_character || ' ';
|
||||
indent_size = indent_size || 4;
|
||||
|
||||
indent_string = '';
|
||||
while (indent_size--) {
|
||||
indent_string += indent_character;
|
||||
}
|
||||
|
||||
input = js_source_text;
|
||||
|
||||
last_word = ''; // last 'TK_WORD' passed
|
||||
last_type = 'TK_START_EXPR'; // last token type
|
||||
last_text = ''; // last token text
|
||||
output = [];
|
||||
|
||||
do_block_just_closed = false;
|
||||
var_line = false;
|
||||
var_line_tainted = false;
|
||||
|
||||
whitespace = "\n\r\t ".split('');
|
||||
wordchar = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$'.split('');
|
||||
punct = '+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! !! , : ? ^ ^= |='.split(' ');
|
||||
|
||||
// words which should always start on new line.
|
||||
line_starters = 'continue,try,throw,return,var,if,switch,case,default,for,while,break,function'.split(',');
|
||||
|
||||
// states showing if we are currently in expression (i.e. "if" case) - 'EXPRESSION', or in usual block (like, procedure), 'BLOCK'.
|
||||
// some formatting depends on that.
|
||||
current_mode = 'BLOCK';
|
||||
modes = [current_mode];
|
||||
|
||||
indent_level = indent_level || 0;
|
||||
parser_pos = 0; // parser position
|
||||
in_case = false; // flag for parser that case/default has been processed, and next colon needs special attention
|
||||
while (true) {
|
||||
var t = get_next_token(parser_pos);
|
||||
token_text = t[0];
|
||||
token_type = t[1];
|
||||
if (token_type === 'TK_EOF') {
|
||||
break;
|
||||
}
|
||||
|
||||
switch (token_type) {
|
||||
|
||||
case 'TK_START_EXPR':
|
||||
var_line = false;
|
||||
set_mode('EXPRESSION');
|
||||
if (last_type === 'TK_END_EXPR' || last_type === 'TK_START_EXPR') {
|
||||
// do nothing on (( and )( and ][ and ]( ..
|
||||
} else if (last_type !== 'TK_WORD' && last_type !== 'TK_OPERATOR') {
|
||||
print_space();
|
||||
} else if (in_array(last_word, line_starters) && last_word !== 'function') {
|
||||
print_space();
|
||||
}
|
||||
print_token();
|
||||
break;
|
||||
|
||||
case 'TK_END_EXPR':
|
||||
print_token();
|
||||
restore_mode();
|
||||
break;
|
||||
|
||||
case 'TK_START_BLOCK':
|
||||
|
||||
if (last_word === 'do') {
|
||||
set_mode('DO_BLOCK');
|
||||
} else {
|
||||
set_mode('BLOCK');
|
||||
}
|
||||
if (last_type !== 'TK_OPERATOR' && last_type !== 'TK_START_EXPR') {
|
||||
if (last_type === 'TK_START_BLOCK') {
|
||||
print_newline();
|
||||
} else {
|
||||
print_space();
|
||||
}
|
||||
}
|
||||
print_token();
|
||||
indent();
|
||||
break;
|
||||
|
||||
case 'TK_END_BLOCK':
|
||||
if (last_type === 'TK_START_BLOCK') {
|
||||
// nothing
|
||||
trim_output();
|
||||
unindent();
|
||||
} else {
|
||||
unindent();
|
||||
print_newline();
|
||||
}
|
||||
print_token();
|
||||
restore_mode();
|
||||
break;
|
||||
|
||||
case 'TK_WORD':
|
||||
|
||||
if (do_block_just_closed) {
|
||||
print_space();
|
||||
print_token();
|
||||
print_space();
|
||||
break;
|
||||
}
|
||||
|
||||
if (token_text === 'case' || token_text === 'default') {
|
||||
if (last_text === ':') {
|
||||
// switch cases following one another
|
||||
remove_indent();
|
||||
} else {
|
||||
// case statement starts in the same line where switch
|
||||
unindent();
|
||||
print_newline();
|
||||
indent();
|
||||
}
|
||||
print_token();
|
||||
in_case = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
prefix = 'NONE';
|
||||
if (last_type === 'TK_END_BLOCK') {
|
||||
if (!in_array(token_text.toLowerCase(), ['else', 'catch', 'finally'])) {
|
||||
prefix = 'NEWLINE';
|
||||
} else {
|
||||
prefix = 'SPACE';
|
||||
print_space();
|
||||
}
|
||||
} else if (last_type === 'TK_END_COMMAND' && (current_mode === 'BLOCK' || current_mode === 'DO_BLOCK')) {
|
||||
prefix = 'NEWLINE';
|
||||
} else if (last_type === 'TK_END_COMMAND' && current_mode === 'EXPRESSION') {
|
||||
prefix = 'SPACE';
|
||||
} else if (last_type === 'TK_WORD') {
|
||||
prefix = 'SPACE';
|
||||
} else if (last_type === 'TK_START_BLOCK') {
|
||||
prefix = 'NEWLINE';
|
||||
} else if (last_type === 'TK_END_EXPR') {
|
||||
print_space();
|
||||
prefix = 'NEWLINE';
|
||||
}
|
||||
|
||||
if (last_type !== 'TK_END_BLOCK' && in_array(token_text.toLowerCase(), ['else', 'catch', 'finally'])) {
|
||||
print_newline();
|
||||
} else if (in_array(token_text, line_starters) || prefix === 'NEWLINE') {
|
||||
if (last_text === 'else') {
|
||||
// no need to force newline on else break
|
||||
print_space();
|
||||
} else if ((last_type === 'TK_START_EXPR' || last_text === '=') && token_text === 'function') {
|
||||
// no need to force newline on 'function': (function
|
||||
// DONOTHING
|
||||
} else if (last_type === 'TK_WORD' && (last_text === 'return' || last_text === 'throw')) {
|
||||
// no newline between 'return nnn'
|
||||
print_space();
|
||||
} else if (last_type !== 'TK_END_EXPR') {
|
||||
if ((last_type !== 'TK_START_EXPR' || token_text !== 'var') && last_text !== ':') {
|
||||
// no need to force newline on 'var': for (var x = 0...)
|
||||
if (token_text === 'if' && last_type === 'TK_WORD' && last_word === 'else') {
|
||||
// no newline for } else if {
|
||||
print_space();
|
||||
} else {
|
||||
print_newline();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (in_array(token_text, line_starters) && last_text !== ')') {
|
||||
print_newline();
|
||||
}
|
||||
}
|
||||
} else if (prefix === 'SPACE') {
|
||||
print_space();
|
||||
}
|
||||
print_token();
|
||||
last_word = token_text;
|
||||
|
||||
if (token_text === 'var') {
|
||||
var_line = true;
|
||||
var_line_tainted = false;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'TK_END_COMMAND':
|
||||
|
||||
print_token();
|
||||
var_line = false;
|
||||
break;
|
||||
|
||||
case 'TK_STRING':
|
||||
|
||||
if (last_type === 'TK_START_BLOCK' || last_type === 'TK_END_BLOCK') {
|
||||
print_newline();
|
||||
} else if (last_type === 'TK_WORD') {
|
||||
print_space();
|
||||
}
|
||||
print_token();
|
||||
break;
|
||||
|
||||
case 'TK_OPERATOR':
|
||||
|
||||
var start_delim = true;
|
||||
var end_delim = true;
|
||||
if (var_line && token_text !== ',') {
|
||||
var_line_tainted = true;
|
||||
if (token_text === ':') {
|
||||
var_line = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (token_text === ':' && in_case) {
|
||||
print_token(); // colon really asks for separate treatment
|
||||
print_newline();
|
||||
break;
|
||||
}
|
||||
|
||||
in_case = false;
|
||||
|
||||
if (token_text === ',') {
|
||||
if (var_line) {
|
||||
if (var_line_tainted) {
|
||||
print_token();
|
||||
print_newline();
|
||||
var_line_tainted = false;
|
||||
} else {
|
||||
print_token();
|
||||
print_space();
|
||||
}
|
||||
} else if (last_type === 'TK_END_BLOCK') {
|
||||
print_token();
|
||||
print_newline();
|
||||
} else {
|
||||
if (current_mode === 'BLOCK') {
|
||||
print_token();
|
||||
print_newline();
|
||||
} else {
|
||||
// EXPR od DO_BLOCK
|
||||
print_token();
|
||||
print_space();
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else if (token_text === '--' || token_text === '++') { // unary operators special case
|
||||
if (last_text === ';') {
|
||||
// space for (;; ++i)
|
||||
start_delim = true;
|
||||
end_delim = false;
|
||||
} else {
|
||||
start_delim = false;
|
||||
end_delim = false;
|
||||
}
|
||||
} else if (token_text === '!' && last_type === 'TK_START_EXPR') {
|
||||
// special case handling: if (!a)
|
||||
start_delim = false;
|
||||
end_delim = false;
|
||||
} else if (last_type === 'TK_OPERATOR') {
|
||||
start_delim = false;
|
||||
end_delim = false;
|
||||
} else if (last_type === 'TK_END_EXPR') {
|
||||
start_delim = true;
|
||||
end_delim = true;
|
||||
} else if (token_text === '.') {
|
||||
// decimal digits or object.property
|
||||
start_delim = false;
|
||||
end_delim = false;
|
||||
|
||||
} else if (token_text === ':') {
|
||||
// zz: xx
|
||||
// can't differentiate ternary op, so for now it's a ? b: c; without space before colon
|
||||
if (last_text.match(/^\d+$/)) {
|
||||
// a little help for ternary a ? 1 : 0;
|
||||
start_delim = true;
|
||||
} else {
|
||||
start_delim = false;
|
||||
}
|
||||
}
|
||||
if (start_delim) {
|
||||
print_space();
|
||||
}
|
||||
|
||||
print_token();
|
||||
|
||||
if (end_delim) {
|
||||
print_space();
|
||||
}
|
||||
break;
|
||||
|
||||
case 'TK_BLOCK_COMMENT':
|
||||
|
||||
print_newline();
|
||||
print_token();
|
||||
print_newline();
|
||||
break;
|
||||
|
||||
case 'TK_COMMENT':
|
||||
|
||||
// print_newline();
|
||||
print_space();
|
||||
print_token();
|
||||
print_newline();
|
||||
break;
|
||||
|
||||
case 'TK_UNKNOWN':
|
||||
print_token();
|
||||
break;
|
||||
}
|
||||
|
||||
last_type = token_type;
|
||||
last_text = token_text;
|
||||
}
|
||||
|
||||
return output.join('');
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
.none-transition{
|
||||
transition: none;
|
||||
-webkit-transition: none;
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
layui.define(['form'], function (exports) {
|
||||
|
||||
var form = layui.form,
|
||||
$ = layui.jquery,
|
||||
layer = layui.layer,
|
||||
index = 0,
|
||||
oldId,
|
||||
MOD_NAME = 'labelGeneration',
|
||||
formField = {
|
||||
label: {
|
||||
id: '-1',
|
||||
tag: "label",
|
||||
},
|
||||
},
|
||||
labelGeneration = {
|
||||
set: function (options) {
|
||||
var that = this;
|
||||
that.config = $.extend({}
|
||||
, that.config
|
||||
, options);
|
||||
return that;
|
||||
}
|
||||
//事件监听
|
||||
, on: function (events
|
||||
, callback) {
|
||||
return layui.onevent.call(this
|
||||
, MOD_NAME
|
||||
, events
|
||||
, callback);
|
||||
}
|
||||
},
|
||||
Class = function (options) {
|
||||
var that = this;
|
||||
that.config = $.extend({}
|
||||
, that.config
|
||||
, labelGeneration.config
|
||||
, options);
|
||||
that.render();
|
||||
},
|
||||
thisIns = function () {
|
||||
var that = this
|
||||
, options = that.config;
|
||||
return {
|
||||
reload: function (options) {
|
||||
that.reload.call(that
|
||||
, options);
|
||||
}, getOptions: function () {
|
||||
return options || null;
|
||||
}, getData: function () {
|
||||
return options.data || null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Class.prototype.config = {
|
||||
version: "1.0.0"
|
||||
, Author: "谁家没一个小强"
|
||||
, generateId: 0
|
||||
, data: []
|
||||
, isEnter: false
|
||||
};
|
||||
|
||||
/* 自动生成ID 当前页面自动排序*/
|
||||
Class.prototype.autoId = function (tag) {
|
||||
var that = this,
|
||||
options = that.config;
|
||||
options.generateId = options.generateId + 1;
|
||||
return tag + '_' + options.generateId;
|
||||
}
|
||||
|
||||
Class.prototype.components = {
|
||||
label: {
|
||||
render: function (json,options) {
|
||||
var _html = '<blockquote class="layui-elem-quote">';
|
||||
_html += '<div class="layui-form layui-form-pane layui-form-item">';
|
||||
_html += '<label class="layui-form-label">输入标签</label>';
|
||||
_html += '<div class="layui-input-inline">';
|
||||
if (options.isEnter) {
|
||||
_html += '<input type="text" id="{0}" placeholder="按回车生成标签" autocomplete="off" class="layui-input">'
|
||||
.format(json.id);
|
||||
} else {
|
||||
_html += '<input type="text" id="{0}" placeholder="通过按钮生成标签" autocomplete="off" class="layui-input">'
|
||||
.format(json.id);
|
||||
}
|
||||
_html += '</div>';
|
||||
if (!options.isEnter) {
|
||||
_html += '<button type="button" id="{0}-button" class="layui-btn layui-btn-normal">确定</button>'.format(json.id);
|
||||
}
|
||||
_html += '<label class="layui-form-label">颜色选择</label>';
|
||||
_html += '<div class="layui-input-inline">';
|
||||
_html += '<select lay-filter="{0}-switchTest">'.format(json.id);
|
||||
_html += '<option value="" selected>墨绿色</option>';
|
||||
_html += '<option value="layui-btn-primary">原始色</option>';
|
||||
_html += '<option value="layui-btn-normal">天蓝色</option>';
|
||||
_html += '<option value="layui-btn-warm">暖黄色</option>';
|
||||
_html += '<option value="layui-btn-danger">红色</option>';
|
||||
_html += '</select>';
|
||||
_html += '</div>';
|
||||
_html += '</div>';
|
||||
_html += '<div id="{0}-content" class="layui-btn-container"></div>'.format(json.id);
|
||||
_html += '</blockquote>';
|
||||
return _html;
|
||||
},
|
||||
update: function (json) {
|
||||
|
||||
},
|
||||
/* 获取对象 */
|
||||
jsonData: function (id, that) {
|
||||
//分配一个新的ID
|
||||
var _json = JSON.parse(JSON.stringify(formField.label));
|
||||
_json.id = id == undefined ? that.autoId(_json.tag) : id;
|
||||
that.checkId(_json,that);
|
||||
return _json;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* 判定id是否重复*/
|
||||
Class.prototype.checkId = function (json,that) {
|
||||
if ($("#" + json.id + "-content").length != 0) {
|
||||
json.id = that.autoId(json.tag);
|
||||
that.checkId(json);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Class.prototype.bindGridSortEvent = function (json) {
|
||||
var that = this
|
||||
, options = that.config;
|
||||
var formItemSort = Sortable.create(document.getElementById(json.id + "-content"), {
|
||||
group: {
|
||||
name: 'group' + json.id
|
||||
},
|
||||
animation: 1000,
|
||||
onEnd: function (evt) {
|
||||
var _values = $("#" + json.id + "-content").find("div");
|
||||
var ops = [];
|
||||
for (var i = 0; i < _values.length; i++) {
|
||||
ops.push({"ngColor": $(_values[i]).attr("ng-color"), "value": $(_values[i]).text()});
|
||||
}
|
||||
options.data = ops;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* 绑定事件*/
|
||||
Class.prototype.deleteValue = function (value, ngValue) {
|
||||
var that = this
|
||||
, options = that.config;
|
||||
for (var i = 0; i < options.data.length; i++) {
|
||||
if (options.data[i].value === value && options.data[i].ngColor === ngValue) {
|
||||
options.data.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 绑定事件*/
|
||||
Class.prototype.bindPropertyEvent = function (_json) {
|
||||
var that = this
|
||||
, options = that.config;
|
||||
var colorClass = "";
|
||||
if (options.isEnter) {
|
||||
$("#" + _json.id).keypress(function (event) {
|
||||
if (event.which === 13) {
|
||||
var _value = $(this).val();
|
||||
if (_value === "") {
|
||||
layer.msg('标签值不能为空');
|
||||
return;
|
||||
}
|
||||
index = index + 1;
|
||||
var _html = '<div class="layui-btn {0} none-transition" id="{2}" ng-index="{3}" ng-color="{0}">{1}<i class="layui-icon layui-icon-close"></i></div>'
|
||||
.format(colorClass, _value, _json.id + index, index);
|
||||
$("#" + _json.id + "-content").append(_html);
|
||||
options.data.push({"ngColor": colorClass, "value": _value});
|
||||
$("#" + _json.id + index + " .layui-icon-close").click(function () {
|
||||
that.deleteValue($(this).parent().text(), $(this).parent().attr("ng-color"));
|
||||
$(this).parent().remove();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$("#" + _json.id + "-button").click(function (event) {
|
||||
var _value = $("#" + _json.id).val();
|
||||
if (_value === "") {
|
||||
layer.msg('标签值不能为空');
|
||||
return;
|
||||
}
|
||||
index = index + 1;
|
||||
var _html = '<div class="layui-btn {0} none-transition" id="{2}" ng-index="{3}" ng-color="{0}">{1}<i class="layui-icon layui-icon-close"></i></div>'
|
||||
.format(colorClass, _value, _json.id + index, index);
|
||||
$("#" + _json.id + "-content").append(_html);
|
||||
options.data.push({"ngColor": colorClass, "value": _value});
|
||||
$("#" + _json.id + index + " .layui-icon-close").click(function () {
|
||||
that.deleteValue($(this).parent().text(), $(this).parent().attr("ng-color"));
|
||||
$(this).parent().remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
form.on('select(' + _json.id + '-switchTest)', function (data) {
|
||||
colorClass = data.value;
|
||||
});
|
||||
for (var i = 0; i < options.data.length; i++) {
|
||||
index = index + 1;
|
||||
var _html = '<div class="layui-btn {0} none-transition" id="{2}" ng-index="{3}" ng-color="{0}">{1}<i class="layui-icon layui-icon-close"></i></div>'
|
||||
.format(options.data[i].ngColor, options.data[i].value, _json.id + index, index);
|
||||
$("#" + _json.id + "-content").append(_html);
|
||||
$("#" + _json.id + index + " .layui-icon-close").click(function () {
|
||||
that.deleteValue($(this).parent().text(), $(this).parent().attr("ng-color"));
|
||||
$(this).parent().remove();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* 渲染组件 */
|
||||
Class.prototype.renderComponents = function () {
|
||||
var that = this
|
||||
, options = that.config;
|
||||
var elem = $(options.elem);
|
||||
elem.empty();
|
||||
var jsonData = that.components['label'].jsonData(undefined, that);
|
||||
elem.append(that.components['label'].render(jsonData,options));
|
||||
that.bindPropertyEvent(jsonData);
|
||||
that.bindGridSortEvent(jsonData);
|
||||
form.render();
|
||||
}
|
||||
|
||||
Class.prototype.reload = function (options) {
|
||||
var that = this;
|
||||
options = options || {};//如果是空的话,就赋值 {}
|
||||
that.config = $.extend({}
|
||||
, that.config
|
||||
, labelGeneration.config
|
||||
, options);
|
||||
that.render(options);
|
||||
}
|
||||
|
||||
//核心入口 初始化一个 regionSelect 类
|
||||
labelGeneration.render = function (options) {
|
||||
var ins = new Class(options);
|
||||
return thisIns.call(ins);
|
||||
}
|
||||
/**
|
||||
* 渲染组件
|
||||
*/
|
||||
Class.prototype.render = function (options) {
|
||||
var that = this
|
||||
, options = that.config;
|
||||
that.renderComponents();
|
||||
}
|
||||
|
||||
String.prototype.format = function (args) {
|
||||
var result = this;
|
||||
if (arguments.length > 0) {
|
||||
if (arguments.length == 1 && typeof (args) == "object") {
|
||||
for (var key in args) {
|
||||
if (args[key] != undefined) {
|
||||
var reg = new RegExp("({" + key + "})"
|
||||
, "g");
|
||||
result = result.replace(reg
|
||||
, args[key]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
if (arguments[i] != undefined) {
|
||||
var reg = new RegExp("({[" + i + "]})"
|
||||
, "g");
|
||||
result = result.replace(reg
|
||||
, arguments[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
exports(MOD_NAME, labelGeneration);
|
||||
});
|
||||
4040
WaterCloud.Web/wwwroot/js/lay-module/layarea/layarea.js
Normal file
4040
WaterCloud.Web/wwwroot/js/lay-module/layarea/layarea.js
Normal file
File diff suppressed because it is too large
Load Diff
395
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniAdmin.js
Normal file
395
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniAdmin.js
Normal file
@@ -0,0 +1,395 @@
|
||||
/**
|
||||
* date:2020/02/27
|
||||
* author:Mr.Chung
|
||||
* version:2.0
|
||||
* description:layuimini 主体框架扩展
|
||||
*/
|
||||
layui.define(["jquery", "miniMenu", "element", "miniTab", "miniTheme"], function (exports) {
|
||||
var $ = layui.$,
|
||||
layer = layui.layer,
|
||||
miniMenu = layui.miniMenu,
|
||||
miniTheme = layui.miniTheme,
|
||||
element = layui.element,
|
||||
miniTab = layui.miniTab;
|
||||
|
||||
if (!/http(s*):\/\//.test(location.href)) {
|
||||
var tips = "请先将项目部署至web容器(Apache/Tomcat/Nginx/IIS/等),否则部分数据将无法显示";
|
||||
return layer.alert(tips);
|
||||
}
|
||||
|
||||
var miniAdmin = {
|
||||
|
||||
/**
|
||||
* 后台框架初始化
|
||||
* @param options.iniUrl 后台初始化接口地址
|
||||
* @param options.clearUrl 后台清理缓存接口
|
||||
* @param options.urlHashLocation URL地址hash定位
|
||||
* @param options.bgColorDefault 默认皮肤
|
||||
* @param options.multiModule 是否开启多模块
|
||||
* @param options.menuChildOpen 是否展开子菜单
|
||||
* @param options.loadingTime 初始化加载时间
|
||||
* @param options.pageAnim iframe窗口动画
|
||||
* @param options.maxTabNum 最大的tab打开数量
|
||||
* @param options.menuOpen 是否缩放
|
||||
*/
|
||||
render: function (options) {
|
||||
options.iniUrl = options.iniUrl || null;
|
||||
options.clearUrl = options.clearUrl || null;
|
||||
options.urlHashLocation = options.urlHashLocation || false;
|
||||
options.bgColorDefault = options.bgColorDefault || 0;
|
||||
options.multiModule = options.multiModule || false;
|
||||
options.menuChildOpen = options.menuChildOpen || false;
|
||||
options.menuOpen = options.menuOpen || false;
|
||||
options.loadingTime = options.loadingTime || 1;
|
||||
options.pageAnim = options.pageAnim || false;
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
$.getJSON(options.iniUrl, function (data) {
|
||||
if (data == null) {
|
||||
miniAdmin.error('暂无菜单信息')
|
||||
} else {
|
||||
miniAdmin.renderLogo(data.logoInfo);
|
||||
miniAdmin.renderClear(options.clearUrl);
|
||||
miniAdmin.renderHome(data.homeInfo);
|
||||
miniAdmin.renderAnim(options.pageAnim);
|
||||
miniAdmin.listen();
|
||||
miniMenu.render({
|
||||
menuList: data.menuInfo,
|
||||
multiModule: options.multiModule,
|
||||
menuChildOpen: options.menuChildOpen,
|
||||
menuOpen: options.menuOpen
|
||||
});
|
||||
miniTab.render({
|
||||
filter: 'layuiminiTab',
|
||||
urlHashLocation: options.urlHashLocation,
|
||||
multiModule: options.multiModule,
|
||||
menuChildOpen: options.menuChildOpen,
|
||||
maxTabNum: options.maxTabNum,
|
||||
menuList: data.menuInfo,
|
||||
homeInfo: data.homeInfo,
|
||||
listenSwichCallback: function () {
|
||||
miniAdmin.renderDevice();
|
||||
}
|
||||
});
|
||||
miniTheme.render({
|
||||
bgColorDefault: options.bgColorDefault,
|
||||
listen: true,
|
||||
});
|
||||
miniAdmin.deleteLoader(options.loadingTime);
|
||||
}
|
||||
}).fail(function () {
|
||||
miniAdmin.error('菜单接口有误');
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化logo
|
||||
* @param data
|
||||
*/
|
||||
renderLogo: function (data) {
|
||||
var html = '<a href="' + data.href + '"><img src="' + data.image + '" alt="logo"><h1>' + data.title + '</h1></a>';
|
||||
$('.layuimini-logo').html(html);
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化首页
|
||||
* @param data
|
||||
*/
|
||||
renderHome: function (data) {
|
||||
sessionStorage.setItem('layuiminiHomeHref', data.href);
|
||||
$('#layuiminiHomeTabId').html('<span class="layuimini-tab-active"></span><span class="disable-close">' + data.title + '</span><i class="layui-icon layui-unselect layui-tab-close">ဆ</i>');
|
||||
$('#layuiminiHomeTabId').attr('lay-id', data.href);
|
||||
$('#layuiminiHomeTabIframe').html('<iframe width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" src="' + data.href + '"></iframe>');
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化缓存地址
|
||||
* @param clearUrl
|
||||
*/
|
||||
renderClear: function (clearUrl) {
|
||||
$('.layuimini-clear').attr('data-href', clearUrl);
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化iframe窗口动画
|
||||
* @param anim
|
||||
*/
|
||||
renderAnim: function (anim) {
|
||||
if (anim) {
|
||||
$('#layuimini-bg-color').after('<style id="layuimini-page-anim">' +
|
||||
'.layui-tab-item.layui-show {animation:moveTop 1s;-webkit-animation:moveTop 1s;animation-fill-mode:both;-webkit-animation-fill-mode:both;position:relative;height:100%;-webkit-overflow-scrolling:touch;}\n' +
|
||||
'@keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' +
|
||||
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' +
|
||||
'}\n' +
|
||||
'@-o-keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' +
|
||||
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' +
|
||||
'}\n' +
|
||||
'@-moz-keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' +
|
||||
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' +
|
||||
'}\n' +
|
||||
'@-webkit-keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' +
|
||||
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' +
|
||||
'}' +
|
||||
'</style>');
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 进入全屏
|
||||
*/
|
||||
fullScreen: function () {
|
||||
var el = document.documentElement;
|
||||
var rfs = el.requestFullScreen || el.webkitRequestFullScreen;
|
||||
if (typeof rfs != "undefined" && rfs) {
|
||||
rfs.call(el);
|
||||
} else if (typeof window.ActiveXObject != "undefined") {
|
||||
var wscript = new ActiveXObject("WScript.Shell");
|
||||
if (wscript != null) {
|
||||
wscript.SendKeys("{F11}");
|
||||
}
|
||||
} else if (el.msRequestFullscreen) {
|
||||
el.msRequestFullscreen();
|
||||
} else if (el.oRequestFullscreen) {
|
||||
el.oRequestFullscreen();
|
||||
} else if (el.webkitRequestFullscreen) {
|
||||
el.webkitRequestFullscreen();
|
||||
} else if (el.mozRequestFullScreen) {
|
||||
el.mozRequestFullScreen();
|
||||
} else {
|
||||
miniAdmin.error('浏览器不支持全屏调用!');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 退出全屏
|
||||
*/
|
||||
exitFullScreen: function () {
|
||||
var el = document;
|
||||
var cfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.exitFullScreen;
|
||||
if (typeof cfs != "undefined" && cfs) {
|
||||
cfs.call(el);
|
||||
} else if (typeof window.ActiveXObject != "undefined") {
|
||||
var wscript = new ActiveXObject("WScript.Shell");
|
||||
if (wscript != null) {
|
||||
wscript.SendKeys("{F11}");
|
||||
}
|
||||
} else if (el.msExitFullscreen) {
|
||||
el.msExitFullscreen();
|
||||
} else if (el.oRequestFullscreen) {
|
||||
el.oCancelFullScreen();
|
||||
} else if (el.mozCancelFullScreen) {
|
||||
el.mozCancelFullScreen();
|
||||
} else if (el.webkitCancelFullScreen) {
|
||||
el.webkitCancelFullScreen();
|
||||
} else {
|
||||
miniAdmin.error('浏览器不支持全屏调用!');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化设备端
|
||||
*/
|
||||
renderDevice: function () {
|
||||
if (miniAdmin.checkMobile()) {
|
||||
$('.layuimini-tool i').attr('data-side-fold', 1);
|
||||
$('.layuimini-tool i').attr('class', 'fa fa-outdent');
|
||||
$('.layui-layout-body').removeClass('layuimini-mini');
|
||||
$('.layui-layout-body').addClass('layuimini-all');
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 初始化加载时间
|
||||
* @param loadingTime
|
||||
*/
|
||||
deleteLoader: function (loadingTime) {
|
||||
setTimeout(function () {
|
||||
$('.layuimini-loader').fadeOut();
|
||||
}, loadingTime * 1000)
|
||||
},
|
||||
|
||||
/**
|
||||
* 成功
|
||||
* @param title
|
||||
* @returns {*}
|
||||
*/
|
||||
success: function (title) {
|
||||
return layer.msg(title, { icon: 1, shade: this.shade, scrollbar: false, time: 2000, shadeClose: true });
|
||||
},
|
||||
|
||||
/**
|
||||
* 失败
|
||||
* @param title
|
||||
* @returns {*}
|
||||
*/
|
||||
error: function (title) {
|
||||
return layer.msg(title, { icon: 2, shade: this.shade, scrollbar: false, time: 3000, shadeClose: true });
|
||||
},
|
||||
|
||||
/**
|
||||
* 判断是否为手机
|
||||
* @returns {boolean}
|
||||
*/
|
||||
checkMobile: function () {
|
||||
var ua = navigator.userAgent.toLocaleLowerCase();
|
||||
var pf = navigator.platform.toLocaleLowerCase();
|
||||
var isAndroid = (/android/i).test(ua) || ((/iPhone|iPod|iPad/i).test(ua) && (/linux/i).test(pf))
|
||||
|| (/ucweb.*linux/i.test(ua));
|
||||
var isIOS = (/iPhone|iPod|iPad/i).test(ua) && !isAndroid;
|
||||
var isWinPhone = (/Windows Phone|ZuneWP7/i).test(ua);
|
||||
var clientWidth = document.documentElement.clientWidth;
|
||||
if (!isAndroid && !isIOS && !isWinPhone && clientWidth > 1024) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听
|
||||
*/
|
||||
listen: function () {
|
||||
|
||||
/**
|
||||
* 清理
|
||||
*/
|
||||
$('body').on('click', '[data-clear]', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
sessionStorage.clear();
|
||||
|
||||
// 判断是否清理服务端
|
||||
var clearUrl = $(this).attr('data-href');
|
||||
if (clearUrl != undefined && clearUrl != '' && clearUrl != null) {
|
||||
$.getJSON(clearUrl, function (data, status) {
|
||||
layer.close(loading);
|
||||
if (data.code != 1) {
|
||||
return miniAdmin.error(data.msg);
|
||||
} else {
|
||||
miniAdmin.success(data.msg);
|
||||
var setTime1 = setTimeout(function () {
|
||||
clearTimeout(setTime1);
|
||||
window.location.href = document.location.origin + '/Login/Index';
|
||||
}, 300);
|
||||
|
||||
return false;
|
||||
}
|
||||
}).fail(function () {
|
||||
layer.close(loading);
|
||||
return miniAdmin.error('清理缓存接口有误');
|
||||
});
|
||||
} else {
|
||||
layer.close(loading);
|
||||
return miniAdmin.success(data.msg);
|
||||
}
|
||||
});
|
||||
/**
|
||||
* 主页
|
||||
*/
|
||||
$('body').on('click', '[data-tohome]', function () {
|
||||
miniTab.openNewTabByIframe({
|
||||
title: "主页",
|
||||
href: sessionStorage.getItem('layuiminiHomeHref')
|
||||
});
|
||||
});
|
||||
/**
|
||||
* 消息
|
||||
*/
|
||||
$('body').on('click', '[data-notice]', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var clientHeight = (document.documentElement.clientHeight) - 60;
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
shade: 0.2,
|
||||
anim: 2,
|
||||
shadeClose: true,
|
||||
id: 'layuiMessage',
|
||||
area: ['250px', clientHeight + 'px'],//带私信宽度340px
|
||||
offset: 'rb',
|
||||
content: '/Home/Message',
|
||||
success: function (index, layero) {
|
||||
$(layero).addClass("scroll-wrapper");//苹果 iframe 滚动条失效解决方式
|
||||
},
|
||||
end: function () {
|
||||
$('.layui-icon-notice').empty();
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
/**
|
||||
* 刷新
|
||||
*/
|
||||
$('body').on('click', '[data-refresh]', function () {
|
||||
$(".layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload();
|
||||
miniAdmin.success('刷新成功');
|
||||
});
|
||||
|
||||
/**
|
||||
* 监听提示信息
|
||||
*/
|
||||
$("body").on("mouseenter", ".layui-nav-tree .menu-li", function () {
|
||||
if (miniAdmin.checkMobile()) {
|
||||
return false;
|
||||
}
|
||||
var classInfo = $(this).attr('class'),
|
||||
tips = $(this).prop("innerHTML"),
|
||||
isShow = $('.layuimini-tool i').attr('data-side-fold');
|
||||
if (isShow == 0 && tips) {
|
||||
tips = "<ul class='layuimini-menu-left-zoom layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>" + tips + "</li></ul>";
|
||||
window.openTips = layer.tips(tips, $(this), {
|
||||
tips: [2, '#2f4056'],
|
||||
time: 300000,
|
||||
skin: "popup-tips",
|
||||
success: function (el) {
|
||||
var left = $(el).position().left - 10;
|
||||
$(el).css({ left: left });
|
||||
element.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("mouseleave", ".popup-tips", function () {
|
||||
if (miniAdmin.checkMobile()) {
|
||||
return false;
|
||||
}
|
||||
var isShow = $('.layuimini-tool i').attr('data-side-fold');
|
||||
if (isShow == 0) {
|
||||
try {
|
||||
layer.close(window.openTips);
|
||||
} catch (e) {
|
||||
console.log(e.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 全屏
|
||||
*/
|
||||
$('body').on('click', '[data-check-screen]', function () {
|
||||
var check = $(this).attr('data-check-screen');
|
||||
if (check == 'full') {
|
||||
miniAdmin.fullScreen();
|
||||
$(this).attr('data-check-screen', 'exit');
|
||||
$(this).html('<i class="fa fa-compress"></i>');
|
||||
} else {
|
||||
miniAdmin.exitFullScreen();
|
||||
$(this).attr('data-check-screen', 'full');
|
||||
$(this).html('<i class="fa fa-arrows-alt"></i>');
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 点击遮罩层
|
||||
*/
|
||||
$('body').on('click', '.layuimini-make', function () {
|
||||
miniAdmin.renderDevice();
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
exports("miniAdmin", miniAdmin);
|
||||
});
|
||||
263
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniMenu.js
Normal file
263
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniMenu.js
Normal file
@@ -0,0 +1,263 @@
|
||||
/**
|
||||
* date:2020/02/27
|
||||
* author:Mr.Chung
|
||||
* version:2.0
|
||||
* description:layuimini 菜单框架扩展
|
||||
*/
|
||||
layui.define(["element", "laytpl", "jquery"], function (exports) {
|
||||
var element = layui.element,
|
||||
$ = layui.$,
|
||||
laytpl = layui.laytpl,
|
||||
layer = layui.layer;
|
||||
|
||||
var miniMenu = {
|
||||
|
||||
/**
|
||||
* 菜单初始化
|
||||
* @param options.menuList 菜单数据信息
|
||||
* @param options.multiModule 是否开启多模块
|
||||
* @param options.menuChildOpen 是否展开子菜单
|
||||
* @param options.menuOpen 是否缩放
|
||||
*/
|
||||
render: function (options) {
|
||||
options.menuList = options.menuList || [];
|
||||
options.multiModule = options.multiModule || false;
|
||||
options.menuChildOpen = options.menuChildOpen || false;
|
||||
options.menuOpen = options.menuOpen || false;
|
||||
if (options.multiModule) {
|
||||
miniMenu.renderMultiModule(options.menuList, options.menuChildOpen);
|
||||
} else {
|
||||
miniMenu.renderSingleModule(options.menuList, options.menuChildOpen);
|
||||
}
|
||||
miniMenu.listen();
|
||||
if (options.menuOpen) {
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 0);
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-indent');
|
||||
$('.layuimini-tool [data-side-fold]').attr('title', '展开');
|
||||
$('.layui-layout-body').removeClass('layuimini-all');
|
||||
$('.layui-layout-body').addClass('layuimini-mini');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 单模块
|
||||
* @param menuList 菜单数据
|
||||
* @param menuChildOpen 是否默认展开
|
||||
*/
|
||||
renderSingleModule: function (menuList, menuChildOpen) {
|
||||
menuList = menuList || [];
|
||||
var leftMenuHtml = '',
|
||||
childOpenClass = '',
|
||||
leftMenuCheckDefault = 'layui-this';
|
||||
var me = this;
|
||||
if (menuChildOpen) childOpenClass = ' layui-nav-itemed';
|
||||
leftMenuHtml = this.renderLeftMenu(menuList, { childOpenClass: childOpenClass });
|
||||
$('.layui-layout-body').addClass('layuimini-single-module'); //单模块标识
|
||||
$('.layuimini-header-menu').remove();
|
||||
$('.layuimini-menu-left').html(leftMenuHtml);
|
||||
|
||||
element.init();
|
||||
},
|
||||
|
||||
/**
|
||||
* 渲染一级菜单
|
||||
*/
|
||||
compileMenu: function (menu, isSub) {
|
||||
var menuHtml = '<li {{#if( d.menu){ }} data-menu="{{=d.menu}}" {{#}}} class="layui-nav-item menu-li {{d.childOpenClass}} {{d.className}}" {{#if( d.id){ }} id="{{=d.id}}" {{#}}}> <a {{#if( d.href){ }} layuimini-href="{{=d.href}}" {{#}}} {{#if( d.target){ }} target="{{=d.target}}" {{#}}} href="javascript:;" style="padding: 0 10px;">{{#if( d.icon){ }} <i class="{{=d.icon}}"></i> {{#}}} <span class="layui-left-nav">{{d.title}}</span></a> {{# if(d.children){}} {{- d.children}} {{#}}} </li>';
|
||||
if (isSub) {
|
||||
menuHtml = '<dd class="menu-dd {{d.childOpenClass}} {{ d.className }}"> <a href="javascript:;" {{#if( d.menu){ }} data-menu="{{=d.menu}}" {{#}}} {{#if( d.id){ }} id="{{=d.id}}" {{#}}} {{#if(( !d.child || !d.child.length ) && d.href){ }} layuimini-href="{{=d.href}}" {{#}}} {{#if( d.target){ }} target="{{=d.target}}" {{#}}}> {{#if( d.icon){ }} <i class="{{=d.icon}}"></i> {{#}}} <span class="layui-left-nav"> {{d.title}}</span></a> {{# if(d.children){}} {{- d.children}} {{#}}}</dd>'
|
||||
}
|
||||
return laytpl(menuHtml).render(menu);
|
||||
},
|
||||
compileMenuContainer: function (menu, isSub) {
|
||||
var wrapperHtml = '<ul class="layui-nav layui-nav-tree layui-left-nav-tree {{d.className}}" lay-shrink="all" id="{{=d.id}}">{{- d.children}}</ul>';
|
||||
if (isSub) {
|
||||
wrapperHtml = '<dl class="layui-nav-child ">{{- d.children}}</dl>';
|
||||
}
|
||||
if (!menu.children) {
|
||||
return "";
|
||||
}
|
||||
return laytpl(wrapperHtml).render(menu);
|
||||
},
|
||||
|
||||
each: function (list, callback) {
|
||||
var _list = [];
|
||||
for (var i = 0, length = list.length; i < length; i++) {
|
||||
_list[i] = callback(i, list[i]);
|
||||
}
|
||||
return _list;
|
||||
},
|
||||
renderChildrenMenu: function (menuList, options) {
|
||||
var me = this;
|
||||
menuList = menuList || [];
|
||||
var html = this.each(menuList, function (idx, menu) {
|
||||
if (menu.child && menu.child.length) {
|
||||
menu.children = me.renderChildrenMenu(menu.child, { childOpenClass: options.childOpenClass || '' });
|
||||
}
|
||||
menu.className = "";
|
||||
menu.childOpenClass = options.childOpenClass || ''
|
||||
return me.compileMenu(menu, true)
|
||||
}).join("");
|
||||
return me.compileMenuContainer({ children: html }, true)
|
||||
},
|
||||
renderLeftMenu: function (leftMenus, options) {
|
||||
options = options || {};
|
||||
var me = this;
|
||||
var leftMenusHtml = me.each(leftMenus || [], function (idx, leftMenu) { // 左侧菜单遍历
|
||||
var children = me.renderChildrenMenu(leftMenu.child, { childOpenClass: options.childOpenClass });
|
||||
var leftMenuHtml = me.compileMenu({
|
||||
href: leftMenu.href,
|
||||
target: leftMenu.target,
|
||||
childOpenClass: options.childOpenClass,
|
||||
icon: leftMenu.icon,
|
||||
title: leftMenu.title,
|
||||
children: children,
|
||||
className: '',
|
||||
});
|
||||
return leftMenuHtml;
|
||||
}).join("");
|
||||
|
||||
leftMenusHtml = me.compileMenuContainer({ id: options.parentMenuId, className: options.leftMenuCheckDefault, children: leftMenusHtml });
|
||||
return leftMenusHtml;
|
||||
},
|
||||
/**
|
||||
* 多模块
|
||||
* @param menuList 菜单数据
|
||||
* @param menuChildOpen 是否默认展开
|
||||
*/
|
||||
renderMultiModule: function (menuList, menuChildOpen) {
|
||||
menuList = menuList || [];
|
||||
var me = this;
|
||||
var headerMenuHtml = '',
|
||||
headerMobileMenuHtml = '',
|
||||
leftMenuHtml = '',
|
||||
leftMenuCheckDefault = 'layui-this',
|
||||
childOpenClass = '',
|
||||
headerMenuCheckDefault = 'layui-this';
|
||||
|
||||
if (menuChildOpen) childOpenClass = ' layui-nav-itemed';
|
||||
var headerMenuHtml = this.each(menuList, function (index, val) { //顶部菜单渲染
|
||||
var menu = 'multi_module_' + index;
|
||||
var id = menu + "HeaderId";
|
||||
var topMenuItemHtml = "";
|
||||
topMenuItemHtml = me.compileMenu({
|
||||
className: headerMenuCheckDefault,
|
||||
menu: menu,
|
||||
id: id,
|
||||
title: val.title,
|
||||
href: "",
|
||||
target: "",
|
||||
children: ""
|
||||
});
|
||||
leftMenuHtml += me.renderLeftMenu(val.child, {
|
||||
parentMenuId: menu,
|
||||
childOpenClass: childOpenClass,
|
||||
leftMenuCheckDefault: leftMenuCheckDefault
|
||||
});
|
||||
headerMobileMenuHtml += me.compileMenu({ id: id, menu: menu, id: id, icon: val.icon, title: val.title, }, true);
|
||||
headerMenuCheckDefault = "";
|
||||
leftMenuCheckDefault = "layui-hide";
|
||||
return topMenuItemHtml;
|
||||
}).join("");
|
||||
$('.layui-layout-body').addClass('layuimini-multi-module'); //多模块标识
|
||||
$('.layuimini-menu-header-pc').html(headerMenuHtml); //电脑
|
||||
$('.layuimini-menu-left').html(leftMenuHtml);
|
||||
$('.layuimini-menu-header-mobile').html(headerMobileMenuHtml); //手机
|
||||
element.init();
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听
|
||||
*/
|
||||
listen: function () {
|
||||
|
||||
/**
|
||||
* 菜单模块切换
|
||||
*/
|
||||
$('body').on('click', '[data-menu]', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var menuId = $(this).attr('data-menu');
|
||||
// header
|
||||
$(".layuimini-header-menu .layui-nav-item.layui-this").removeClass('layui-this');
|
||||
$(this).addClass('layui-this');
|
||||
// left
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree.layui-this").addClass('layui-hide');
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree.layui-this.layui-hide").removeClass('layui-this');
|
||||
$("#" + menuId).removeClass('layui-hide');
|
||||
$("#" + menuId).addClass('layui-this');
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 菜单缩放
|
||||
*/
|
||||
$('body').on('click', '.layuimini-site-mobile', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var isShow = $('.layuimini-tool [data-side-fold]').attr('data-side-fold');
|
||||
if (isShow == 1) { // 缩放
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 0);
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-indent');
|
||||
$('.layuimini-tool [data-side-fold]').attr('title', '展开');
|
||||
$('.layui-layout-body').removeClass('layuimini-all');
|
||||
$('.layui-layout-body').addClass('layuimini-mini');
|
||||
} else { // 正常
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 1);
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-outdent');
|
||||
$('.layuimini-tool [data-side-fold]').attr('title', '缩放');
|
||||
$('.layui-layout-body').removeClass('layuimini-mini');
|
||||
$('.layui-layout-body').addClass('layuimini-all');
|
||||
layer.close(window.openTips);
|
||||
}
|
||||
element.init();
|
||||
layer.close(loading);
|
||||
});
|
||||
/**
|
||||
* 菜单缩放
|
||||
*/
|
||||
$('body').on('click', '[data-side-fold]', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var isShow = $('.layuimini-tool [data-side-fold]').attr('data-side-fold');
|
||||
if (isShow == 1) { // 缩放
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 0);
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-indent');
|
||||
$('.layuimini-tool [data-side-fold]').attr('title', '展开');
|
||||
$('.layui-layout-body').removeClass('layuimini-all');
|
||||
$('.layui-layout-body').addClass('layuimini-mini');
|
||||
// $(".menu-li").each(function (idx,el) {
|
||||
// $(el).addClass("hidden-sub-menu");
|
||||
// });
|
||||
|
||||
} else { // 正常
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 1);
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-outdent');
|
||||
$('.layuimini-tool [data-side-fold]').attr('title', '缩放');
|
||||
$('.layui-layout-body').removeClass('layuimini-mini');
|
||||
$('.layui-layout-body').addClass('layuimini-all');
|
||||
// $(".menu-li").each(function (idx,el) {
|
||||
// $(el).removeClass("hidden-sub-menu");
|
||||
// });
|
||||
layer.close(window.openTips);
|
||||
}
|
||||
element.init();
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 手机端点开模块
|
||||
*/
|
||||
$('body').on('click', '.layuimini-header-menu.layuimini-mobile-show dd', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var check = $('.layuimini-tool [data-side-fold]').attr('data-side-fold');
|
||||
if (check === "1") {
|
||||
$('.layuimini-site-mobile').trigger("click");
|
||||
element.init();
|
||||
}
|
||||
layer.close(loading);
|
||||
});
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
||||
exports("miniMenu", miniMenu);
|
||||
});
|
||||
647
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniTab.js
Normal file
647
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniTab.js
Normal file
@@ -0,0 +1,647 @@
|
||||
/**
|
||||
* date:2020/02/27
|
||||
* author:Mr.Chung
|
||||
* version:2.0
|
||||
* description:layuimini tab框架扩展
|
||||
*/
|
||||
layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
var element = layui.element,
|
||||
layer = layui.layer,
|
||||
$ = layui.$;
|
||||
|
||||
|
||||
var miniTab = {
|
||||
|
||||
/**
|
||||
* 初始化tab
|
||||
* @param options
|
||||
*/
|
||||
render: function (options) {
|
||||
options.filter = options.filter || null;
|
||||
options.multiModule = options.multiModule || false;
|
||||
options.urlHashLocation = options.urlHashLocation || false;
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
options.menuList = options.menuList || []; // todo 后期菜单想改为不操作dom, 而是直接操作初始化传过来的数据
|
||||
options.homeInfo = options.homeInfo || {};
|
||||
options.listenSwichCallback = options.listenSwichCallback || function () {
|
||||
};
|
||||
miniTab.listen(options);
|
||||
miniTab.listenRoll();
|
||||
miniTab.listenSwitch(options);
|
||||
miniTab.listenHash(options);
|
||||
},
|
||||
|
||||
/**
|
||||
* 新建tab窗口
|
||||
* @param options.tabId
|
||||
* @param options.href
|
||||
* @param options.title
|
||||
* @param options.isIframe
|
||||
* @param options.maxTabNum
|
||||
*/
|
||||
create: function (options) {
|
||||
options.tabId = options.tabId || null;
|
||||
options.href = options.href || null;
|
||||
options.title = options.title || null;
|
||||
options.isIframe = options.isIframe || false;
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
if (top.$(".layuimini-tab .layui-tab-title li").length >= options.maxTabNum) {
|
||||
layer.msg('Tab窗口已达到限定数量,请先关闭部分Tab');
|
||||
return false;
|
||||
}
|
||||
if (top.$(".layuimini-tab").length == 0) {
|
||||
window.open(options.href, "_blank");
|
||||
}
|
||||
else {
|
||||
var ele = element;
|
||||
if (options.isIframe) ele = parent.layui.element;
|
||||
ele.tabAdd('layuiminiTab', {
|
||||
title: '<span class="layuimini-tab-active"></span><span>' + options.title + '</span><i class="layui-icon layui-unselect layui-tab-close">ဆ</i>' //用于演示
|
||||
, content: '<iframe width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" src="' + options.href + '"></iframe>'
|
||||
, id: options.tabId
|
||||
});
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'add');
|
||||
}
|
||||
var name = 'layuiminimenu_list'+"=";
|
||||
var datajson = {};
|
||||
var ca = document.cookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i].trim();
|
||||
if (c.indexOf(name) == 0) datajson =JSON.parse(unescape(c.substring(name.length, c.length)));
|
||||
}
|
||||
if (!datajson[options.tabId]) {
|
||||
datajson[options.tabId] = options.title.trim();
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (1 * 24 * 60 * 60 * 1000));
|
||||
var expires = "expires=" + d.toGMTString();
|
||||
document.cookie = 'layuiminimenu_list' + "=" + escape(JSON.stringify(datajson)) + ";" + "path=/;" + expires;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 切换选项卡
|
||||
* @param tabId
|
||||
*/
|
||||
change: function (tabId) {
|
||||
element.tabChange('layuiminiTab', tabId);
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除tab窗口
|
||||
* @param tabId
|
||||
* @param isParent
|
||||
*/
|
||||
delete: function (tabId, isParent) {
|
||||
// todo 未知BUG,不知道是不是layui问题,必须先删除元素
|
||||
$(".layuimini-tab .layui-tab-title .layui-unselect.layui-tab-bar").remove();
|
||||
|
||||
if (isParent === true) {
|
||||
parent.layui.element.tabDelete('layuiminiTab', tabId);
|
||||
} else {
|
||||
element.tabDelete('layuiminiTab', tabId);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 在iframe层打开新tab方法
|
||||
*/
|
||||
openNewTabByIframe: function (options) {
|
||||
options.href = options.href || null;
|
||||
options.title = options.title || null;
|
||||
var loading = parent.layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
if (options.href === null || options.href === undefined) options.href = new Date().getTime();
|
||||
var checkTab = miniTab.check(options.href.split("?")[0], true);
|
||||
if (!checkTab) {
|
||||
miniTab.create({
|
||||
tabId: options.href.split("?")[0],
|
||||
href: options.href,
|
||||
title: options.title,
|
||||
isIframe: true,
|
||||
});
|
||||
}
|
||||
parent.layui.element.tabChange('layuiminiTab', options.href.split("?")[0]);
|
||||
parent.layer.close(loading);
|
||||
},
|
||||
|
||||
/**
|
||||
* 在iframe层关闭当前tab方法
|
||||
*/
|
||||
deleteCurrentByIframe: function () {
|
||||
var ele = $(".layuimini-tab .layui-tab-title li.layui-this", parent.document);
|
||||
if (ele.length > 0) {
|
||||
var layId = $(ele[0]).attr('lay-id');
|
||||
miniTab.delete(layId, true);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 判断tab窗口
|
||||
*/
|
||||
check: function (tabId, isIframe) {
|
||||
// 判断选项卡上是否有
|
||||
var checkTab = false;
|
||||
if (isIframe === undefined || isIframe === false) {
|
||||
$(".layui-tab-title li").each(function () {
|
||||
var checkTabId = $(this).attr('lay-id');
|
||||
if (checkTabId != null && checkTabId === tabId) {
|
||||
checkTab = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
parent.layui.$(".layui-tab-title li").each(function () {
|
||||
var checkTabId = $(this).attr('lay-id');
|
||||
if (checkTabId != null && checkTabId === tabId) {
|
||||
checkTab = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return checkTab;
|
||||
},
|
||||
|
||||
/**
|
||||
* 开启tab右键菜单
|
||||
* @param tabId
|
||||
* @param left
|
||||
*/
|
||||
openTabRignMenu: function (tabId, left) {
|
||||
miniTab.closeTabRignMenu();
|
||||
var menuHtml = '<div class="layui-unselect layui-form-select layui-form-selected layuimini-tab-mousedown layui-show" data-tab-id="' + tabId + '" style="left: ' + left + 'px!important">\n' +
|
||||
'<dl>\n' +
|
||||
'<dd><a href="javascript:;" data-refresh="刷新"><i class="fa fa-refresh"></i>刷新当前</a></dd>\n' +
|
||||
'<dd><a href="javascript:;" layuimini-tab-menu-close="current"><i class="fa fa-times"></i>关闭当前</a></dd>\n' +
|
||||
'<dd><a href="javascript:;" layuimini-tab-menu-close="other"><i class="fa fa-ban"></i>关闭其他</a></dd>\n' +
|
||||
'<dd><a href="javascript:;" layuimini-tab-menu-close="all"><i class="fa fa-times-circle"></i>关闭全部</a></dd>\n' +
|
||||
'</dl>\n' +
|
||||
'</div>';
|
||||
var makeHtml = '<div class="layuimini-tab-make"></div>';
|
||||
$('.layuimini-tab .layui-tab-title').after(menuHtml);
|
||||
$('.layuimini-tab .layui-tab-content').after(makeHtml);
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭tab右键菜单
|
||||
*/
|
||||
closeTabRignMenu: function () {
|
||||
$('.layuimini-tab-mousedown').remove();
|
||||
$('.layuimini-tab-make').remove();
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询菜单信息
|
||||
* @param href
|
||||
* @param menuList
|
||||
*/
|
||||
searchMenu: function (href, menuList) {
|
||||
var menu;
|
||||
for (key in menuList) {
|
||||
var item = menuList[key];
|
||||
if (item.href === href) {
|
||||
menu = item;
|
||||
break;
|
||||
}
|
||||
if (item.child) {
|
||||
newMenu = miniTab.searchMenu(href, item.child);
|
||||
if (newMenu) {
|
||||
menu = newMenu;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听
|
||||
* @param options
|
||||
*/
|
||||
listen: function (options) {
|
||||
options = options || {};
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
|
||||
/**
|
||||
* 打开新窗口
|
||||
*/
|
||||
$('body').on('click', '[layuimini-href]', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var tabId = $(this).attr('layuimini-href'),
|
||||
href = $(this).attr('layuimini-href'),
|
||||
title = $(this).text(),
|
||||
target = $(this).attr('target');
|
||||
|
||||
var el = $("[layuimini-href='" + href + "']", ".layuimini-menu-left");
|
||||
layer.close(window.openTips);
|
||||
if (el.length) {
|
||||
$(el).closest(".layui-nav-tree").find(".layui-this").removeClass("layui-this");
|
||||
$(el).parent().addClass("layui-this");
|
||||
}
|
||||
|
||||
if (target === '_blank') {
|
||||
layer.close(loading);
|
||||
window.open(href, "_blank");
|
||||
return false;
|
||||
}
|
||||
if (target === '_open') {
|
||||
layer.close(loading);
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: title,
|
||||
isOutAnim: true,//关闭动画
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
fix: false,
|
||||
area: ['500px', '500px'],
|
||||
content: href,
|
||||
success: function (layero) {
|
||||
$(layero).addClass("scroll-wrapper");//苹果 iframe 滚动条失效解决方式
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (tabId === null || tabId === undefined) tabId = new Date().getTime();
|
||||
var checkTab = miniTab.check(tabId);
|
||||
if (!checkTab) {
|
||||
miniTab.create({
|
||||
tabId: tabId,
|
||||
href: href,
|
||||
title: title,
|
||||
isIframe: false,
|
||||
maxTabNum: options.maxTabNum,
|
||||
});
|
||||
}
|
||||
element.tabChange('layuiminiTab', tabId);
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 在iframe子菜单上打开新窗口
|
||||
*/
|
||||
$('body').on('click', '[layuimini-content-href]', function () {
|
||||
var loading = parent.layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var tabId = $(this).attr('layuimini-content-href'),
|
||||
href = $(this).attr('layuimini-content-href'),
|
||||
title = $(this).attr('data-title'),
|
||||
target = $(this).attr('target');
|
||||
if (target === '_blank') {
|
||||
parent.layer.close(loading);
|
||||
window.open(href, "_blank");
|
||||
return false;
|
||||
}
|
||||
if (tabId === null || tabId === undefined) tabId = new Date().getTime();
|
||||
var checkTab = miniTab.check(tabId, true);
|
||||
if (!checkTab) {
|
||||
miniTab.create({
|
||||
tabId: tabId,
|
||||
href: href,
|
||||
title: title,
|
||||
isIframe: true,
|
||||
maxTabNum: options.maxTabNum,
|
||||
});
|
||||
}
|
||||
parent.layui.element.tabChange('layuiminiTab', tabId);
|
||||
parent.layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 关闭选项卡
|
||||
**/
|
||||
$('body').on('click', '.layuimini-tab .layui-tab-title .layui-tab-close', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var $parent = $(this).parent();
|
||||
var tabId = $parent.attr('lay-id');
|
||||
if (tabId !== undefined || tabId !== null) {
|
||||
miniTab.delete(tabId);
|
||||
}
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 选项卡操作
|
||||
*/
|
||||
$('body').on('click', '[layuimini-tab-close]', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var closeType = $(this).attr('layuimini-tab-close');
|
||||
top.$(".layuimini-tab .layui-tab-title li").each(function () {
|
||||
var tabId = $(this).attr('lay-id');
|
||||
var id = $(this).attr('id');
|
||||
var isCurrent = $(this).hasClass('layui-this');
|
||||
if (id !== 'layuiminiHomeTabId') {
|
||||
if (closeType === 'all') {
|
||||
miniTab.delete(tabId);
|
||||
} else {
|
||||
if (closeType === 'current' && isCurrent) {
|
||||
miniTab.delete(tabId);
|
||||
} else if (closeType === 'other' && !isCurrent) {
|
||||
miniTab.delete(tabId);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 禁用网页右键
|
||||
*/
|
||||
$(".layuimini-tab .layui-tab-title").unbind("mousedown").bind("contextmenu", function (e) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* 注册鼠标右键
|
||||
*/
|
||||
$('body').on('mousedown', '.layuimini-tab .layui-tab-title li', function (e) {
|
||||
var left = $(this).offset().left - $('.layuimini-tab ').offset().left + ($(this).width() / 2),
|
||||
tabId = $(this).attr('lay-id');
|
||||
if (e.which === 3) {
|
||||
miniTab.openTabRignMenu(tabId, left);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 关闭tab右键菜单
|
||||
*/
|
||||
$('body').on('click', '.layui-body,.layui-header,.layuimini-menu-left,.layuimini-tab-make', function () {
|
||||
miniTab.closeTabRignMenu();
|
||||
});
|
||||
|
||||
/**
|
||||
* tab右键选项卡操作
|
||||
*/
|
||||
$('body').on('click', '[layuimini-tab-menu-close]', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var closeType = $(this).attr('layuimini-tab-menu-close'),
|
||||
currentTabId = $('.layuimini-tab-mousedown').attr('data-tab-id');
|
||||
$(".layuimini-tab .layui-tab-title li").each(function () {
|
||||
var tabId = $(this).attr('lay-id');
|
||||
var id = $(this).attr('id');
|
||||
if (id !== 'layuiminiHomeTabId') {
|
||||
if (closeType === 'all') {
|
||||
miniTab.delete(tabId);
|
||||
} else {
|
||||
if (closeType === 'current' && currentTabId === tabId) {
|
||||
miniTab.delete(tabId);
|
||||
} else if (closeType === 'other' && currentTabId !== tabId) {
|
||||
miniTab.delete(tabId);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
miniTab.closeTabRignMenu();
|
||||
layer.close(loading);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听tab切换
|
||||
* @param options
|
||||
*/
|
||||
listenSwitch: function (options) {
|
||||
options.filter = options.filter || null;
|
||||
options.multiModule = options.multiModule || false;
|
||||
options.urlHashLocation = options.urlHashLocation || false;
|
||||
options.listenSwichCallback = options.listenSwichCallback || function () {
|
||||
|
||||
};
|
||||
element.on('tab(' + options.filter + ')', function (data) {
|
||||
var tabId = $(this).attr('lay-id');
|
||||
if (options.urlHashLocation) {
|
||||
location.hash = '/' + tabId;
|
||||
}
|
||||
if (tabId != options.homeInfo.href) {
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (1 * 24 * 60 * 60 * 1000));
|
||||
var expires = "expires=" + d.toGMTString();
|
||||
document.cookie = 'wc_returnurl' + "=" + tabId + ";" + "path=/;" + expires;
|
||||
}
|
||||
if (typeof options.listenSwichCallback === 'function') {
|
||||
options.listenSwichCallback();
|
||||
}
|
||||
// 判断是否为新增窗口
|
||||
if ($('.layuimini-menu-left').attr('layuimini-tab-tag') === 'add') {
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no')
|
||||
} else {
|
||||
$("[layuimini-href]").parent().removeClass('layui-this');
|
||||
if (options.multiModule) {
|
||||
miniTab.listenSwitchMultiModule(tabId);
|
||||
} else {
|
||||
miniTab.listenSwitchSingleModule(tabId);
|
||||
}
|
||||
//切换tab刷新table表单的样式
|
||||
// 获取到对应的iframe中table对象集合
|
||||
var frames = window.frames[data.index];
|
||||
if (frames) {
|
||||
var tableDoms = frames.document.getElementsByTagName('table');
|
||||
for (var i = 0; i < tableDoms.length; i++) {
|
||||
var tableDom = tableDoms[i];
|
||||
// 判断是否存在对应对象以及是否存在table的id属性
|
||||
if (tableDom !== undefined && tableDom.id !== undefined && tableDom.id !== '') {
|
||||
// 存在则获取iframe元素的Window对象
|
||||
var iframe = $('iframe[src^="' + tabId + '"]')[0].contentWindow;
|
||||
// 调用resize
|
||||
iframe.layui.table.resize(tableDom.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
miniTab.rollPosition();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听hash变化
|
||||
* @param options
|
||||
* @returns {boolean}
|
||||
*/
|
||||
listenHash: function (options) {
|
||||
options.urlHashLocation = options.urlHashLocation || false;
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
options.homeInfo = options.homeInfo || {};
|
||||
options.menuList = options.menuList || [];
|
||||
if (!options.urlHashLocation) return false;
|
||||
var tabId = location.hash.replace(/^#\//, '');
|
||||
if (tabId === null || tabId === undefined || tabId === '') return false;
|
||||
|
||||
// 判断是否为首页
|
||||
if (tabId === options.homeInfo.href) return false;
|
||||
|
||||
// 判断是否为右侧菜单
|
||||
var menu = miniTab.searchMenu(tabId, options.menuList);
|
||||
if (menu !== undefined) {
|
||||
miniTab.create({
|
||||
tabId: tabId,
|
||||
href: tabId,
|
||||
title: menu.title,
|
||||
isIframe: false,
|
||||
maxTabNum: options.maxTabNum,
|
||||
});
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no');
|
||||
element.tabChange('layuiminiTab', tabId);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 判断是否为快捷菜单
|
||||
var isSearchMenu = false;
|
||||
$("[layuimini-content-href]").each(function () {
|
||||
if ($(this).attr("layuimini-content-href") === tabId) {
|
||||
var title = $(this).attr("data-title");
|
||||
miniTab.create({
|
||||
tabId: tabId,
|
||||
href: tabId,
|
||||
title: title,
|
||||
isIframe: false,
|
||||
maxTabNum: options.maxTabNum,
|
||||
});
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no');
|
||||
element.tabChange('layuiminiTab', tabId);
|
||||
isSearchMenu = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (isSearchMenu) return false;
|
||||
|
||||
// 既不是右侧菜单、快捷菜单,就直接打开
|
||||
var name = 'layuiminimenu_list'+ "=";
|
||||
var title = tabId;
|
||||
var datajson = {};
|
||||
var ca = document.cookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i].trim();
|
||||
if (c.indexOf(name) == 0) datajson =JSON.parse(unescape(c.substring(name.length, c.length)));
|
||||
}
|
||||
if (!!datajson[tabId]) {
|
||||
var title = datajson[tabId];
|
||||
}
|
||||
miniTab.create({
|
||||
tabId: tabId,
|
||||
href: tabId,
|
||||
title: title,
|
||||
isIframe: false,
|
||||
maxTabNum: options.maxTabNum,
|
||||
});
|
||||
element.tabChange('layuiminiTab', tabId);
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听滚动
|
||||
*/
|
||||
listenRoll: function () {
|
||||
$(".layuimini-tab-roll-left").click(function () {
|
||||
miniTab.rollClick("left");
|
||||
});
|
||||
$(".layuimini-tab-roll-right").click(function () {
|
||||
miniTab.rollClick("right");
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 单模块切换
|
||||
* @param tabId
|
||||
*/
|
||||
listenSwitchSingleModule: function (tabId) {
|
||||
$("[layuimini-href]").each(function () {
|
||||
if ($(this).attr("layuimini-href") === tabId) {
|
||||
// 自动展开菜单栏
|
||||
var addMenuClass = function ($element, type) {
|
||||
if (type === 1) {
|
||||
$element.addClass('layui-this');
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-this')) {
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item');
|
||||
} else {
|
||||
addMenuClass($element.parent().parent(), 2);
|
||||
}
|
||||
} else {
|
||||
$element.addClass('layui-nav-itemed');
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-nav-itemed')) {
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item');
|
||||
} else {
|
||||
addMenuClass($element.parent().parent(), 2);
|
||||
}
|
||||
}
|
||||
};
|
||||
addMenuClass($(this).parent(), 1);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 多模块切换
|
||||
* @param tabId
|
||||
*/
|
||||
listenSwitchMultiModule: function (tabId) {
|
||||
$("[layuimini-href]").each(function () {
|
||||
if ($(this).attr("layuimini-href") === tabId) {
|
||||
|
||||
// 自动展开菜单栏
|
||||
var addMenuClass = function ($element, type) {
|
||||
if (type === 1) {
|
||||
$element.addClass('layui-this');
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-this')) {
|
||||
var moduleId = $element.parent().attr('id');
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item');
|
||||
$("#" + moduleId + "HeaderId").addClass("layui-this");
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide');
|
||||
$("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this');
|
||||
} else {
|
||||
addMenuClass($element.parent().parent(), 2);
|
||||
}
|
||||
} else {
|
||||
$element.addClass('layui-nav-itemed');
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-nav-itemed')) {
|
||||
var moduleId = $element.parent().attr('id');
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item');
|
||||
$("#" + moduleId + "HeaderId").addClass("layui-this");
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide');
|
||||
$("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this');
|
||||
} else {
|
||||
addMenuClass($element.parent().parent(), 2);
|
||||
}
|
||||
}
|
||||
};
|
||||
addMenuClass($(this).parent(), 1);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 自动定位
|
||||
*/
|
||||
rollPosition: function () {
|
||||
var $tabTitle = $('.layuimini-tab .layui-tab-title');
|
||||
var autoLeft = 0;
|
||||
$tabTitle.children("li").each(function () {
|
||||
if ($(this).hasClass('layui-this')) {
|
||||
return false;
|
||||
} else {
|
||||
autoLeft += $(this).outerWidth();
|
||||
}
|
||||
});
|
||||
$tabTitle.animate({
|
||||
scrollLeft: autoLeft - $tabTitle.width() / 3
|
||||
}, 200);
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击滚动
|
||||
* @param direction
|
||||
*/
|
||||
rollClick: function (direction) {
|
||||
var $tabTitle = $('.layuimini-tab .layui-tab-title');
|
||||
var left = $tabTitle.scrollLeft();
|
||||
if ('left' === direction) {
|
||||
$tabTitle.animate({
|
||||
scrollLeft: left - 450
|
||||
}, 200);
|
||||
} else {
|
||||
$tabTitle.animate({
|
||||
scrollLeft: left + 450
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
exports("miniTab", miniTab);
|
||||
});
|
||||
474
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniTheme.js
Normal file
474
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniTheme.js
Normal file
@@ -0,0 +1,474 @@
|
||||
/**
|
||||
* date:2020/02/28
|
||||
* author:Mr.Chung
|
||||
* version:2.0
|
||||
* description:layuimini tab框架扩展
|
||||
*/
|
||||
layui.define(["jquery", "layer"], function (exports) {
|
||||
var $ = layui.$,
|
||||
layer = layui.layer;
|
||||
|
||||
var miniTheme = {
|
||||
|
||||
/**
|
||||
* 主题配置项
|
||||
* @param bgcolorId
|
||||
* @returns {{headerLogo, menuLeftHover, headerRight, menuLeft, headerRightThis, menuLeftThis}|*|*[]}
|
||||
*/
|
||||
config: function (bgcolorId) {
|
||||
var bgColorConfig = [
|
||||
{
|
||||
headerRightBg: '#2D8CF0', //头部右侧背景色
|
||||
headerRightBgThis: '#0069b7', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#0069b7', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#0069b7', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#28333E', //左侧菜单背景,
|
||||
leftMenuBgThis: '#2D8CF0', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#2d8cf0', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#ffffff', //头部右侧背景色
|
||||
headerRightBgThis: '#e4e4e4', //头部右侧选中背景色,
|
||||
headerRightColor: 'rgba(107, 107, 107, 0.7)', //头部右侧字体颜色,
|
||||
headerRightChildColor: 'rgba(107, 107, 107, 0.7)', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#565656', //头部右侧鼠标选中,
|
||||
headerRightNavMore: 'rgba(160, 160, 160, 0.7)', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#1E9FFF', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#565656', //头部缩放按钮样式,
|
||||
headerLogoBg: '#192027', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#28333E', //左侧菜单背景,
|
||||
leftMenuBgThis: '#1E9FFF', //左侧菜单选中背景,
|
||||
leftMenuChildBg: '#0c0f13', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#1e9fff', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#23262e', //头部右侧背景色
|
||||
headerRightBgThis: '#0c0c0c', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#23262e', //左侧菜单背景,
|
||||
leftMenuBgThis: '#737373', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#23262e', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#ffa4d1', //头部右侧背景色
|
||||
headerRightBgThis: '#bf7b9d', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#ffa4d1', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#e694bd', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
||||
leftMenuBgThis: '#737373', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#ffa4d1', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#1aa094', //头部右侧背景色
|
||||
headerRightBgThis: '#197971', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#23262e', //左侧菜单背景,
|
||||
leftMenuBgThis: '#1aa094', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#1aa094', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#1e9fff', //头部右侧背景色
|
||||
headerRightBgThis: '#0069b7', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#1e9fff', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
||||
leftMenuBgThis: '#1e9fff', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#1e9fff', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#ffb800', //头部右侧背景色
|
||||
headerRightBgThis: '#d09600', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#d09600', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#243346', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#2f4056', //左侧菜单背景,
|
||||
leftMenuBgThis: '#8593a7', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#ffb800', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#e82121', //头部右侧背景色
|
||||
headerRightBgThis: '#ae1919', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#ae1919', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
||||
leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#e82121', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#963885', //头部右侧背景色
|
||||
headerRightBgThis: '#772c6a', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#772c6a', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#243346', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#2f4056', //左侧菜单背景,
|
||||
leftMenuBgThis: '#586473', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#963885', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#ffb800', //头部右侧背景色
|
||||
headerRightBgThis: '#d09600', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#d09600', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#d09600', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#2f4056', //左侧菜单背景,
|
||||
leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#ffb800', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#e82121', //头部右侧背景色
|
||||
headerRightBgThis: '#ae1919', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#ae1919', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#d91f1f', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
||||
leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#e82121', //tab选项卡选中颜色,
|
||||
},
|
||||
{
|
||||
headerRightBg: '#963885', //头部右侧背景色
|
||||
headerRightBgThis: '#772c6a', //头部右侧选中背景色,
|
||||
headerRightColor: '#fafafa', //头部右侧字体颜色,
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
headerRightNavMore: '#fafafa', //头部右侧更多下拉颜色,
|
||||
headerRightNavMoreBg: '#772c6a', //头部右侧更多下拉列表选中背景色,
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
headerLogoBg: '#772c6a', //logo背景颜色,
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
leftMenuNavMore: '#ffffff', //左侧菜单更多下拉样式,
|
||||
leftMenuBg: '#2f4056', //左侧菜单背景,
|
||||
leftMenuBgThis: '#626f7f', //左侧菜单选中背景,
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
leftMenuColor: '#ffffff', //左侧菜单字体颜色,
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
tabActiveColor: '#963885', //tab选项卡选中颜色,
|
||||
}
|
||||
];
|
||||
if (bgcolorId === undefined) {
|
||||
return bgColorConfig;
|
||||
} else {
|
||||
return bgColorConfig[bgcolorId];
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
* @param options
|
||||
*/
|
||||
render: function (options) {
|
||||
options.bgColorDefault = options.bgColorDefault || false;
|
||||
options.listen = options.listen || false;
|
||||
var bgcolorId = sessionStorage.getItem('layuiminiBgcolorId');
|
||||
if (bgcolorId === null || bgcolorId === undefined || bgcolorId === '') {
|
||||
bgcolorId = options.bgColorDefault;
|
||||
}
|
||||
miniTheme.buildThemeCss(bgcolorId);
|
||||
if (options.listen) miniTheme.listen(options);
|
||||
},
|
||||
|
||||
/**
|
||||
* 构建主题样式
|
||||
* @param bgcolorId
|
||||
* @returns {boolean}
|
||||
*/
|
||||
buildThemeCss: function (bgcolorId) {
|
||||
if (!bgcolorId) {
|
||||
return false;
|
||||
}
|
||||
var bgcolorData = miniTheme.config(bgcolorId);
|
||||
var styleHtml = '/*头部右侧背景色 headerRightBg */\n' +
|
||||
'.layui-layout-admin .layui-header {\n' +
|
||||
' background-color: ' + bgcolorData.headerRightBg + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*头部右侧选中背景色 headerRightBgThis */\n' +
|
||||
'.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {\n' +
|
||||
' background-color: ' + bgcolorData.headerRightBgThis + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*头部右侧字体颜色 headerRightColor */\n' +
|
||||
'.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {\n' +
|
||||
' color: ' + bgcolorData.headerRightColor + ';\n' +
|
||||
'}\n' +
|
||||
'/**头部右侧下拉字体颜色 headerRightChildColor */\n' +
|
||||
'.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {\n' +
|
||||
' color: ' + bgcolorData.headerRightChildColor + '!important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*头部右侧鼠标选中 headerRightColorThis */\n' +
|
||||
'.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {\n' +
|
||||
' color: ' + bgcolorData.headerRightColorThis + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*头部右侧更多下拉颜色 headerRightNavMore */\n' +
|
||||
'.layui-header .layui-nav .layui-nav-more {\n' +
|
||||
' border-top-color: ' + bgcolorData.headerRightNavMore + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*头部右侧更多下拉颜色 headerRightNavMore */\n' +
|
||||
'.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more {\n' +
|
||||
' border-color: transparent transparent ' + bgcolorData.headerRightNavMore + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */\n' +
|
||||
'.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {\n' +
|
||||
' background-color: ' + bgcolorData.headerRightNavMoreBg + ' !important;\n' +
|
||||
' color:' + bgcolorData.headerRightNavMoreColor + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*头部缩放按钮样式 headerRightToolColor */\n' +
|
||||
'.layui-layout-admin .layui-header .layuimini-tool i {\n' +
|
||||
' color: ' + bgcolorData.headerRightToolColor + ';\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*logo背景颜色 headerLogoBg */\n' +
|
||||
'.layui-layout-admin .layuimini-logo {\n' +
|
||||
' background-color: ' + bgcolorData.headerLogoBg + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*logo字体颜色 headerLogoColor */\n' +
|
||||
'.layui-layout-admin .layuimini-logo h1 {\n' +
|
||||
' color: ' + bgcolorData.headerLogoColor + ';\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*左侧菜单更多下拉样式 leftMenuNavMore */\n' +
|
||||
'.layuimini-menu-left .layui-nav .layui-nav-more,.layuimini-menu-left-zoom.layui-nav .layui-nav-more {\n' +
|
||||
' border-top-color: ' + bgcolorData.leftMenuNavMore + ';\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*左侧菜单更多下拉样式 leftMenuNavMore */\n' +
|
||||
'.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more {\n' +
|
||||
' border-color: transparent transparent ' + bgcolorData.leftMenuNavMore + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*左侧菜单背景 leftMenuBg */\n' +
|
||||
'.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul {\n' +
|
||||
' background-color: ' + bgcolorData.leftMenuBg + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*左侧菜单选中背景 leftMenuBgThis */\n' +
|
||||
'.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {\n' +
|
||||
' background-color: ' + bgcolorData.leftMenuBgThis + ' !important\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*左侧菜单子菜单背景 leftMenuChildBg */\n' +
|
||||
'.layuimini-menu-left .layui-nav-itemed > .layui-nav-child{\n' +
|
||||
' background-color: ' + bgcolorData.leftMenuChildBg + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*左侧菜单字体颜色 leftMenuColor */\n' +
|
||||
'.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a {\n' +
|
||||
' color: ' + bgcolorData.leftMenuColor + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/*左侧菜单选中字体颜色 leftMenuColorThis */\n' +
|
||||
'.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a {\n' +
|
||||
' color:' + bgcolorData.leftMenuColorThis + ' !important;\n' +
|
||||
'}\n' +
|
||||
'\n' +
|
||||
'/**tab选项卡选中颜色 tabActiveColor */\n' +
|
||||
'.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {\n' +
|
||||
' background-color: ' + bgcolorData.tabActiveColor + ';\n' +
|
||||
'}\n';
|
||||
$('#layuimini-bg-color').html(styleHtml);
|
||||
},
|
||||
|
||||
/**
|
||||
* 构建主题选择html
|
||||
* @param options
|
||||
* @returns {string}
|
||||
*/
|
||||
buildBgColorHtml: function (options) {
|
||||
options.bgColorDefault = options.bgColorDefault || 0;
|
||||
var bgcolorId = parseInt(sessionStorage.getItem('layuiminiBgcolorId'));
|
||||
if (isNaN(bgcolorId)) bgcolorId = options.bgColorDefault;
|
||||
var bgColorConfig = miniTheme.config();
|
||||
var html = '';
|
||||
$.each(bgColorConfig, function (key, val) {
|
||||
if (key === bgcolorId) {
|
||||
html += '<li class="layui-this" data-select-bgcolor="' + key + '">\n';
|
||||
} else {
|
||||
html += '<li data-select-bgcolor="' + key + '">\n';
|
||||
}
|
||||
html += '<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">\n' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: ' + val.headerLogoBg + ';"></span><span style="display:block; width: 80%; float: left; height: 12px; background: ' + val.headerRightBg + ';"></span></div>\n' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: ' + val.leftMenuBg + ';"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #ffffff;"></span></div>\n' +
|
||||
'</a>\n' +
|
||||
'</li>';
|
||||
});
|
||||
return html;
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听
|
||||
* @param options
|
||||
*/
|
||||
listen: function (options) {
|
||||
$('body').on('click', '[data-bgcolor]', function () {
|
||||
var loading = layer.load(0, { shade: false, time: 2 * 1000 });
|
||||
var clientHeight = (document.documentElement.clientHeight) - 60;
|
||||
var bgColorHtml = miniTheme.buildBgColorHtml(options);
|
||||
var html = '<div class="layuimini-color">\n' +
|
||||
'<div class="color-title">\n' +
|
||||
'<span>配色方案</span>\n' +
|
||||
'</div>\n' +
|
||||
'<div class="color-content">\n' +
|
||||
'<ul>\n' + bgColorHtml + '</ul>\n' +
|
||||
'</div>\n' +
|
||||
'<div class="more-menu-list">\n' +
|
||||
'<a class="more-menu-item" href="https://gitee.com/qian_wei_hong/WaterCloud/wikis/pages" target="_blank"><i class="layui-icon layui-icon-read" style="font-size: 19px;"></i> 开发文档</a>\n' +
|
||||
'<a class="more-menu-item" href="https://gitee.com/qian_wei_hong/WaterCloud" target="_blank"><i class="layui-icon layui-icon-tabs" style="font-size: 16px;"></i> 开源地址</a>\n' +
|
||||
'<a class="more-menu-item" href="http://www.watercloud.vip/" target="_blank"><i class="layui-icon layui-icon-theme"></i> 演示地址</a>\n' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
shade: 0.2,
|
||||
anim: 2,
|
||||
shadeClose: true,
|
||||
id: 'layuiminiBgColor',
|
||||
area: ['340px', clientHeight + 'px'],
|
||||
offset: 'rb',
|
||||
content: html,
|
||||
success: function (index, layero) {
|
||||
},
|
||||
end: function () {
|
||||
$('.layuimini-select-bgcolor').removeClass('layui-this');
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
$('body').on('click', '[data-select-bgcolor]', function () {
|
||||
var bgcolorId = $(this).attr('data-select-bgcolor');
|
||||
$('.layuimini-color .color-content ul .layui-this').attr('class', '');
|
||||
$(this).attr('class', 'layui-this');
|
||||
localStorage.setItem('watercloudBgcolorId', bgcolorId);
|
||||
miniTheme.render({
|
||||
bgColorDefault: bgcolorId,
|
||||
listen: false,
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
exports("miniTheme", miniTheme);
|
||||
|
||||
})
|
||||
;
|
||||
40
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniTongji.js
Normal file
40
WaterCloud.Web/wwwroot/js/lay-module/layuimini/miniTongji.js
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* date:2020/03/01
|
||||
* author:Mr.Chung
|
||||
* version:2.0
|
||||
* description:layuimini 统计框架扩展
|
||||
*/
|
||||
layui.define(["jquery"], function (exports) {
|
||||
var $ = layui.$;
|
||||
|
||||
var miniTongji = {
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
* @param options
|
||||
*/
|
||||
render: function (options) {
|
||||
options.specific = options.specific || false;
|
||||
options.domains = options.domains || [];
|
||||
var domain = window.location.hostname;
|
||||
if (options.specific === false || (options.specific === true && options.domains.indexOf(domain) >=0)) {
|
||||
miniTongji.listen();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听统计代码
|
||||
*/
|
||||
listen: function () {
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?d97abf6d61c21d773f97835defbdef4e";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
}
|
||||
};
|
||||
|
||||
exports("miniTongji", miniTongji);
|
||||
});
|
||||
102
WaterCloud.Web/wwwroot/js/lay-module/loading/wcLoading.css
Normal file
102
WaterCloud.Web/wwwroot/js/lay-module/loading/wcLoading.css
Normal file
@@ -0,0 +1,102 @@
|
||||
.wc-loading {
|
||||
position:absolute;
|
||||
display:block;
|
||||
width:100%;
|
||||
height:100%;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
z-index:19891017;
|
||||
background-color:#fff
|
||||
}
|
||||
.wc-loading.close {
|
||||
animation: close 1s;
|
||||
-webkit-animation: close 1s;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
.ball-loader{
|
||||
position:absolute;
|
||||
left:50%;
|
||||
top:50%;
|
||||
transform:translate(-50%, -50%);
|
||||
-ms-transform:translate(-50%, -50%);
|
||||
-webkit-transform:translate(-50%, -50%)
|
||||
}
|
||||
.ball-loader>span, .signal-loader>span {
|
||||
background-color: #4aca85;
|
||||
display:inline-block
|
||||
}
|
||||
.wc-loading.orange_theme .ball-loader>span, .signal-loader>span{
|
||||
background-color: #FF4806;
|
||||
}
|
||||
.wc-loading.blue_theme .ball-loader>span, .signal-loader>span{
|
||||
background-color: #2D8CF0;
|
||||
}
|
||||
.ball-loader>span:nth-child(1), .ball-loader.sm>span:nth-child(1), .signal-loader>span:nth-child(1), .signal-loader.sm>span:nth-child(1) {
|
||||
-webkit-animation-delay:0s;
|
||||
animation-delay:0s
|
||||
}
|
||||
.ball-loader>span:nth-child(2), .ball-loader.sm>span:nth-child(2), .signal-loader>span:nth-child(2), .signal-loader.sm>span:nth-child(2) {
|
||||
-webkit-animation-delay:.1s;
|
||||
animation-delay:.1s
|
||||
}
|
||||
.ball-loader>span:nth-child(3), .ball-loader.sm>span:nth-child(3), .signal-loader>span:nth-child(3), .signal-loader.sm>span:nth-child(3) {
|
||||
-webkit-animation-delay:.15s;
|
||||
animation-delay:.15s
|
||||
}
|
||||
.ball-loader>span:nth-child(4), .ball-loader.sm>span:nth-child(4), .signal-loader>span:nth-child(4), .signal-loader.sm>span:nth-child(4) {
|
||||
-webkit-animation-delay:.2s;
|
||||
animation-delay:.2s
|
||||
}
|
||||
.ball-loader>span {
|
||||
width:20px;
|
||||
height:20px;
|
||||
margin:0 3px;
|
||||
border-radius:50%;
|
||||
transform:scale(0);
|
||||
-ms-transform:scale(0);
|
||||
-webkit-transform:scale(0);
|
||||
animation:ball-load 1s ease-in-out infinite;
|
||||
-webkit-animation:1s ball-load ease-in-out infinite
|
||||
}
|
||||
@-webkit-keyframes ball-load {
|
||||
0% {
|
||||
transform:scale(0);
|
||||
-webkit-transform:scale(0)
|
||||
}
|
||||
50% {
|
||||
transform:scale(1);
|
||||
-webkit-transform:scale(1)
|
||||
}
|
||||
100% {
|
||||
transform:scale(0);
|
||||
-webkit-transform:scale(0)
|
||||
}
|
||||
}
|
||||
@keyframes ball-load {
|
||||
0% {
|
||||
transform:scale(0);
|
||||
-webkit-transform:scale(0)
|
||||
}
|
||||
50% {
|
||||
transform:scale(1);
|
||||
-webkit-transform:scale(1)
|
||||
}
|
||||
100% {
|
||||
transform:scale(0);
|
||||
-webkit-transform:scale(0)
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes close {
|
||||
0% {
|
||||
opacity: 1;
|
||||
/*display: block;*/
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
/*display: none;*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
64
WaterCloud.Web/wwwroot/js/lay-module/loading/wcLoading.js
Normal file
64
WaterCloud.Web/wwwroot/js/lay-module/loading/wcLoading.js
Normal file
@@ -0,0 +1,64 @@
|
||||
var wc_load_options = {
|
||||
time: 0,//初始时间设0
|
||||
content: "waterlcloud..."
|
||||
};
|
||||
|
||||
!function (content, options) {
|
||||
var load_config = parseInt(sessionStorage.getItem('layuiminiBgcolorId')) || 0;
|
||||
|
||||
|
||||
function templateFun(options) {
|
||||
//默认蓝色
|
||||
if (!load_config || load_config == 0 || load_config == 1 || load_config == 5) {
|
||||
return "<div class='wc-loading blue_theme'>" +
|
||||
"<div class='ball-loader'>" +
|
||||
"<span></span><span></span><span></span><span></span>" +
|
||||
"</div>" +
|
||||
"</div>";
|
||||
}
|
||||
//绿色
|
||||
else if (load_config == 2 || load_config == 3 || load_config == 4) {
|
||||
return "<div class='wc-loading'>" +
|
||||
"<div class='ball-loader'>" +
|
||||
"<span></span><span></span><span></span><span></span>" +
|
||||
"</div>" +
|
||||
"</div>";
|
||||
}
|
||||
//橙色
|
||||
else {
|
||||
return "<div class='wc-loading orange_theme'>" +
|
||||
"<div class='ball-loader'>" +
|
||||
"<span></span><span></span><span></span><span></span>" +
|
||||
"</div>" +
|
||||
"</div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function headerInit(content, options) {
|
||||
options = options || {};
|
||||
if (typeof content == "string") {
|
||||
options["content"] = content || wc_load_options.content;
|
||||
} else if (typeof content == "object") {
|
||||
options = content;
|
||||
}
|
||||
options.time = options.time || wc_load_options.time;
|
||||
options.content = options.content || wc_load_options.content;
|
||||
return options;
|
||||
}
|
||||
|
||||
wc_load_options = headerInit(content, options);
|
||||
var template = templateFun(wc_load_options);
|
||||
document.writeln(template);
|
||||
}();
|
||||
|
||||
var wcLoading = {
|
||||
close: function (time, dom) {
|
||||
time = time || wc_load_options.time;
|
||||
dom = dom || document.getElementsByClassName("wc-loading")[0];
|
||||
dom.classList.add("close");
|
||||
dom.parentNode.removeChild(dom);/**删除当前节点*/
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
228
WaterCloud.Web/wwwroot/js/lay-module/notice/notice.css
Normal file
228
WaterCloud.Web/wwwroot/js/lay-module/notice/notice.css
Normal file
@@ -0,0 +1,228 @@
|
||||
.toast-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.toast-message {
|
||||
-ms-word-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.toast-message a,
|
||||
.toast-message label {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.toast-message a:hover {
|
||||
color: #CCCCCC;
|
||||
text-decoration: none;
|
||||
}
|
||||
.toast-close-button {
|
||||
position: relative;
|
||||
right: -0.3em;
|
||||
top: -0.3em;
|
||||
float: right;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
-webkit-text-shadow: 0 1px 0 #ffffff;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
opacity: 0.8;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
||||
filter: alpha(opacity=80);
|
||||
line-height: 1;
|
||||
}
|
||||
.toast-close-button:hover,
|
||||
.toast-close-button:focus {
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
opacity: 0.4;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
|
||||
filter: alpha(opacity=40);
|
||||
}
|
||||
.rtl .toast-close-button {
|
||||
left: -0.3em;
|
||||
float: left;
|
||||
right: 0.3em;
|
||||
}
|
||||
/*Additional properties for button version
|
||||
iOS requires the button element instead of an anchor tag.
|
||||
If you want the anchor version, it requires `href="#"`.*/
|
||||
button.toast-close-button {
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
.toast-top-center {
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.toast-bottom-center {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.toast-top-full-width {
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.toast-bottom-full-width {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.toast-top-left {
|
||||
top: 12px;
|
||||
left: 12px;
|
||||
}
|
||||
.toast-top-right {
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
}
|
||||
.toast-bottom-right {
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
}
|
||||
.toast-bottom-left {
|
||||
bottom: 12px;
|
||||
left: 12px;
|
||||
}
|
||||
#toast-container {
|
||||
position: fixed;
|
||||
z-index: 999999;
|
||||
pointer-events: none;
|
||||
/*overrides*/
|
||||
}
|
||||
#toast-container * {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#toast-container > div {
|
||||
position: relative;
|
||||
pointer-events: auto;
|
||||
overflow: hidden;
|
||||
margin: 0 0 6px;
|
||||
padding: 15px 15px 15px 50px;
|
||||
width: 300px;
|
||||
-moz-border-radius: 3px 3px 3px 3px;
|
||||
-webkit-border-radius: 3px 3px 3px 3px;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
background-position: 15px center;
|
||||
background-repeat: no-repeat;
|
||||
-moz-box-shadow: 0 0 12px #999999;
|
||||
-webkit-box-shadow: 0 0 12px #999999;
|
||||
box-shadow: 0 0 12px #999999;
|
||||
color: #FFFFFF;
|
||||
opacity: 0.8;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
||||
filter: alpha(opacity=80);
|
||||
}
|
||||
#toast-container > div.rtl {
|
||||
direction: rtl;
|
||||
padding: 15px 50px 15px 15px;
|
||||
background-position: right 15px center;
|
||||
}
|
||||
#toast-container > div:hover {
|
||||
-moz-box-shadow: 0 0 12px #000000;
|
||||
-webkit-box-shadow: 0 0 12px #000000;
|
||||
box-shadow: 0 0 12px #000000;
|
||||
opacity: 1;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
||||
filter: alpha(opacity=100);
|
||||
cursor: pointer;
|
||||
}
|
||||
#toast-container > .toast-info {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
|
||||
}
|
||||
#toast-container > .toast-error {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
|
||||
}
|
||||
#toast-container > .toast-success {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
|
||||
}
|
||||
#toast-container > .toast-warning {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
|
||||
}
|
||||
#toast-container.toast-top-center > div,
|
||||
#toast-container.toast-bottom-center > div {
|
||||
width: 300px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
#toast-container.toast-top-full-width > div,
|
||||
#toast-container.toast-bottom-full-width > div {
|
||||
width: 96%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.toast {
|
||||
background-color: #030303;
|
||||
}
|
||||
.toast-success {
|
||||
background-color: #51A351;
|
||||
}
|
||||
.toast-error {
|
||||
background-color: #BD362F;
|
||||
}
|
||||
.toast-info {
|
||||
background-color: #2F96B4;
|
||||
}
|
||||
.toast-warning {
|
||||
background-color: #F89406;
|
||||
}
|
||||
.toast-progress {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 4px;
|
||||
background-color: #000000;
|
||||
opacity: 0.4;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
|
||||
filter: alpha(opacity=40);
|
||||
}
|
||||
/*Responsive Design*/
|
||||
@media all and (max-width: 240px) {
|
||||
#toast-container > div {
|
||||
padding: 8px 8px 8px 50px;
|
||||
width: 11em;
|
||||
}
|
||||
#toast-container > div.rtl {
|
||||
padding: 8px 50px 8px 8px;
|
||||
}
|
||||
#toast-container .toast-close-button {
|
||||
right: -0.2em;
|
||||
top: -0.2em;
|
||||
}
|
||||
#toast-container .rtl .toast-close-button {
|
||||
left: -0.2em;
|
||||
right: 0.2em;
|
||||
}
|
||||
}
|
||||
@media all and (min-width: 241px) and (max-width: 480px) {
|
||||
#toast-container > div {
|
||||
padding: 8px 8px 8px 50px;
|
||||
width: 18em;
|
||||
}
|
||||
#toast-container > div.rtl {
|
||||
padding: 8px 50px 8px 8px;
|
||||
}
|
||||
#toast-container .toast-close-button {
|
||||
right: -0.2em;
|
||||
top: -0.2em;
|
||||
}
|
||||
#toast-container .rtl .toast-close-button {
|
||||
left: -0.2em;
|
||||
right: 0.2em;
|
||||
}
|
||||
}
|
||||
@media all and (min-width: 481px) and (max-width: 768px) {
|
||||
#toast-container > div {
|
||||
padding: 15px 15px 15px 50px;
|
||||
width: 25em;
|
||||
}
|
||||
#toast-container > div.rtl {
|
||||
padding: 15px 50px 15px 15px;
|
||||
}
|
||||
}
|
||||
486
WaterCloud.Web/wwwroot/js/lay-module/notice/notice.js
Normal file
486
WaterCloud.Web/wwwroot/js/lay-module/notice/notice.js
Normal file
File diff suppressed because one or more lines are too long
204
WaterCloud.Web/wwwroot/js/lay-module/numberInput/numberInput.js
Normal file
204
WaterCloud.Web/wwwroot/js/lay-module/numberInput/numberInput.js
Normal file
@@ -0,0 +1,204 @@
|
||||
layui.define(['jquery','util','layer'],function (exports) {
|
||||
var $ = layui.$,
|
||||
util = layui.util,
|
||||
layer = layui.layer,
|
||||
input_elem = 'input[number-input]',
|
||||
baseClassName = 'layui-input-number',
|
||||
numberInputBtn = [
|
||||
'<div class="layui-number-input-btn">',
|
||||
'<i class="layui-icon layui-icon-up" lay-click="numberUp"></i>',
|
||||
'<i class="layui-icon layui-icon-down" lay-click="numberDown"></i>',
|
||||
'</div>',
|
||||
].join(''),
|
||||
style = [
|
||||
'<style type="text/css">',
|
||||
'.layui-number-input-container{position:relative;width:100%}',
|
||||
'.'+baseClassName+'::-webkit-outer-spin-button,.'+baseClassName+'::-webkit-inner-spin-button{-webkit-appearance: none;}',
|
||||
'.'+baseClassName+'{-moz-appearance: textfield;padding-right:22px}',
|
||||
'.layui-number-input-btn{position:absolute;top:0;right:0;width:20px;height:100%;}',
|
||||
'.layui-number-input-btn i{position:absolute;width:20px;height:50%;bottom:0;font-size:12px;text-align:center;line-height:16px;cursor: pointer;}',
|
||||
'.layui-number-input-btn i:first-child{top:0}',
|
||||
'.layui-number-input-btn i:hover{background:#eee;}',
|
||||
'</style>'
|
||||
].join('');
|
||||
$('head link:last')[0] && $('head link:last').after(style) || $('head').append(style);
|
||||
|
||||
var numberInput = {
|
||||
options:{
|
||||
elem:input_elem
|
||||
},
|
||||
render:function (option) {
|
||||
var _this = this;
|
||||
_this.options = $.extend(_this.options, option);
|
||||
$(_this.options.elem).not('[lay-ignore]').addClass(baseClassName).wrap('<div class="layui-number-input-container"></div>');
|
||||
$(_this.options.elem).not('[lay-ignore]').after(numberInputBtn);
|
||||
_this.listen();
|
||||
},
|
||||
listen:function () {
|
||||
var _this = this;
|
||||
$(_this.options.elem).bind('input propertychange',function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(value.replace(/[^\-?\d.]/g,''));
|
||||
});
|
||||
|
||||
$(_this.options.elem).keydown(function (event) {
|
||||
var e = event||window.event;
|
||||
var k = e.keyCode || e.which;
|
||||
switch (k) {
|
||||
case 38:
|
||||
// 按下向上箭头
|
||||
$(this).siblings('.layui-number-input-btn').children('[lay-click="numberUp"]').trigger('click').css('background','#eee');
|
||||
break;
|
||||
case 40:
|
||||
// 按下向上箭头
|
||||
$(this).siblings('.layui-number-input-btn').children('[lay-click="numberDown"]').trigger('click').css('background','#eee');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$(_this.options.elem).keyup(function () {
|
||||
var e = event||window.event;
|
||||
var k = e.keyCode || e.which;
|
||||
switch (k) {
|
||||
case 38:
|
||||
// 按下向上箭头
|
||||
$(this).siblings('.layui-number-input-btn').children('[lay-click="numberUp"]').css('background','');
|
||||
break;
|
||||
case 40:
|
||||
// 按下向上箭头
|
||||
$(this).siblings('.layui-number-input-btn').children('[lay-click="numberDown"]').css('background','');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
var timeOut;
|
||||
//长按
|
||||
$('[lay-click="numberUp"],[lay-click="numberDown"]').mousedown(function () {
|
||||
var $this = $(this);
|
||||
timeOut = setInterval(function () {
|
||||
$this.trigger('click');
|
||||
},200)
|
||||
});
|
||||
$('[lay-click="numberUp"],[lay-click="numberDown"]').mouseup(function () {
|
||||
clearInterval(timeOut);
|
||||
});
|
||||
$('[lay-click="numberUp"],[lay-click="numberDown"]').mouseout(function () {
|
||||
clearInterval(timeOut);
|
||||
});
|
||||
util.event('lay-click',{
|
||||
numberUp:function (othis) {
|
||||
var thisInput = othis.parent().parent().children('.'+baseClassName);
|
||||
var thisInputValue = Number(thisInput.val()||0);
|
||||
var step = thisInput.attr('step')||1;
|
||||
var maxValue = Number(thisInput.attr('max'));
|
||||
if (maxValue!=undefined){
|
||||
if (thisInputValue>=maxValue){
|
||||
layer.tips('最大值'+maxValue,thisInput,{tips:1});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
thisInputValue=_this.add(thisInputValue,parseFloat(step));
|
||||
thisInput.val('').focus().val(thisInputValue);
|
||||
},
|
||||
numberDown:function(othis){
|
||||
var thisInput = othis.parent().parent().children('.'+baseClassName);
|
||||
var thisInputValue = thisInput.val()||0;
|
||||
var step = thisInput.attr('step')||1;
|
||||
var minValue = thisInput.attr('min');
|
||||
if (minValue!=undefined){
|
||||
if (thisInputValue<=minValue){
|
||||
layer.tips('最小值'+minValue,thisInput,{tips:1});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
thisInputValue = _this.subtraction(thisInputValue,step);
|
||||
thisInput.val('').focus().val(thisInputValue);
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 加法
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
* @returns {number}
|
||||
*/
|
||||
add:function (arg1, arg2) {
|
||||
var r1,r2,m;
|
||||
try{r1=arg1.toString().split(".")[1].length}catch(e){r1=0}
|
||||
try{r2=arg2.toString().split(".")[1].length}catch(e){r2=0}
|
||||
m=Math.pow(10,Math.max(r1,r2))
|
||||
return (this.multiplication(arg1,m)+this.multiplication(arg2,m))/m
|
||||
},
|
||||
/**
|
||||
* 减法
|
||||
* @param arg1 被减数
|
||||
* @param arg2 减数
|
||||
* @returns {string}
|
||||
*/
|
||||
subtraction:function (arg1, arg2) {
|
||||
var r1, r2, m, n;
|
||||
try {
|
||||
r1 = arg1.toString().split(".")[1].length;
|
||||
}
|
||||
catch (e) {
|
||||
r1 = 0;
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split(".")[1].length;
|
||||
}
|
||||
catch (e) {
|
||||
r2 = 0;
|
||||
}
|
||||
m = Math.pow(10, Math.max(r1, r2));
|
||||
//last modify by deeka
|
||||
//动态控制精度长度
|
||||
n = (r1 >= r2) ? r1 : r2;
|
||||
return ((arg1 * m - arg2 * m) / m).toFixed(n);
|
||||
},
|
||||
/**
|
||||
* 乘法
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
* @returns {number}
|
||||
*/
|
||||
multiplication:function (arg1,arg2) {
|
||||
var m=0,s1=arg1.toString(),s2=arg2.toString();
|
||||
try{m+=s1.split(".")[1].length}catch(e){}
|
||||
try{m+=s2.split(".")[1].length}catch(e){}
|
||||
return Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)
|
||||
},
|
||||
/**
|
||||
* 除法
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
* @returns {*|number}
|
||||
*/
|
||||
division:function (arg1,arg2) {
|
||||
var t1 = 0, t2 = 0, r1, r2;
|
||||
try {
|
||||
t1 = arg1.toString().split(".")[1].length
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
t2 = arg2.toString().split(".")[1].length
|
||||
} catch (e) {
|
||||
}
|
||||
with (Math) {
|
||||
r1 = Number(arg1.toString().replace(".", ""))
|
||||
r2 = Number(arg2.toString().replace(".", ""))
|
||||
return this.multiplication((r1 / r2), pow(10, t2 - t1));
|
||||
}
|
||||
}
|
||||
};
|
||||
//外部接口
|
||||
var exportApi = {
|
||||
render:function(option){
|
||||
numberInput.render(option)
|
||||
},
|
||||
};
|
||||
exports('numberInput',exportApi);
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
.layui-layer-content div.layui-form-select>div.layui-select-title+ dl,
|
||||
.select_option_to_layer div.layui-form-select>div.layui-select-title+ dl
|
||||
{
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.layui-layer.layui-option-layer {
|
||||
mso-border-shadow: no;
|
||||
box-shadow: none;
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
/*!
|
||||
|
||||
@Title: optimizeSelectOption
|
||||
@Description:优化select在layer和表格中显示的问题
|
||||
@Site:
|
||||
@Author: 岁月小偷
|
||||
@License:MIT
|
||||
|
||||
*/
|
||||
;!function (factory) {
|
||||
'use strict';
|
||||
var modelName = 'optimizeSelectOption';
|
||||
if (!window.top.layui) {
|
||||
// 顶层引入layui是使用该组件的最低要求
|
||||
console.warn('使用插件:' + modelName + '页面顶层窗口必须引入layui');
|
||||
layui.define(['form'], function (exports) {
|
||||
exports(modelName, {msg: '使用插件:' + modelName + '页面顶层窗口必须引入layui'});
|
||||
});
|
||||
} else {
|
||||
// 利用的是顶层的top去弹出,所以用top的layui去use layer确保顶层
|
||||
window.top.layui.use('layer', function () {
|
||||
layui.define(['form'], function (exports) { //layui加载
|
||||
exports(modelName, factory(modelName));
|
||||
});
|
||||
});
|
||||
}
|
||||
}(function (modelName) {
|
||||
var version = '0.2.0';
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
var filePath = layui.cache.modules.optimizeSelectOption
|
||||
.substr(0, layui.cache.modules.optimizeSelectOption.lastIndexOf('/'));
|
||||
// 引入tablePlug.css
|
||||
layui.link(filePath + '/optimizeSelectOption.css?v' + version);
|
||||
|
||||
var selectors = [
|
||||
'.layui-table-view', // layui的表格中
|
||||
'.layui-layer-content', // 用type:1 弹出的layer中
|
||||
'.select_option_to_layer' // 任意其他的位置
|
||||
];
|
||||
// 记录弹窗的index的变量
|
||||
window.top.layer._indexTemp = window.top.layer._indexTemp || {};
|
||||
|
||||
if (!form.render.plugFlag) {
|
||||
// 只要未改造过的才需要改造一下
|
||||
// 保留一下原始的form.render
|
||||
var formRender = form.render;
|
||||
form.render = function (type, filter, jqObj) {
|
||||
var that = this;
|
||||
var retObj;
|
||||
// if (jqObj && jqObj.length) {
|
||||
if (jqObj) {
|
||||
layui.each(jqObj, function (index, elem) {
|
||||
elem = $(elem);
|
||||
var elemP = elem.parent();
|
||||
var formFlag = elemP.hasClass('layui-form');
|
||||
var filterTemp = elemP.attr('lay-filter');
|
||||
// mark一下当前的
|
||||
formFlag ? '' : elemP.addClass('layui-form');
|
||||
filterTemp ? '' : elemP.attr('lay-filter', 'tablePlug_form_filter_temp_' + new Date().getTime() + '_' + Math.floor(Math.random() * 100000));
|
||||
// 将焦点集中到要渲染的这个的容器上
|
||||
retObj = formRender.call(that, type, elemP.attr('lay-filter'));
|
||||
// 恢复现场
|
||||
formFlag ? '' : elemP.removeClass('layui-form');
|
||||
filterTemp ? '' : elemP.attr('lay-filter', null);
|
||||
});
|
||||
} else {
|
||||
retObj = formRender.call(that, type, filter);
|
||||
}
|
||||
return retObj;
|
||||
};
|
||||
form.render.plugFlag = true;
|
||||
}
|
||||
|
||||
// 关闭弹出的选项
|
||||
var close = function () {
|
||||
if (!!window.top&&'layer' in window.top) {
|
||||
window.top.layer.close(window.top.layer._indexTemp[modelName]);
|
||||
}
|
||||
};
|
||||
|
||||
// 获得某个节点的位置 offsetTop: 是否获得相对top window的位移
|
||||
function getPosition(elem, _window, offsetTop) {
|
||||
_window = _window || window;
|
||||
elem = elem.length ? elem.get(0) : elem;
|
||||
var offsetTemp = {};
|
||||
if (offsetTop && _window.top !== _window.self) {
|
||||
var frameElem = _window.frames.frameElement;
|
||||
offsetTemp = getPosition(frameElem, _window.parent, offsetTop);
|
||||
}
|
||||
var offset = elem.getBoundingClientRect();
|
||||
|
||||
return {
|
||||
top: offset.top + (offsetTemp.top||0),
|
||||
left: offset.left + (offsetTemp.left||0)
|
||||
};
|
||||
}
|
||||
|
||||
var config = {};
|
||||
|
||||
// 针对某个组件的效果优化注册方法
|
||||
var render = function (name, options) {
|
||||
var that = this;
|
||||
if (config.name) {
|
||||
console.warn('针对', name, '的显示优化已经存在,请不要重复渲染!');
|
||||
return that;
|
||||
}
|
||||
|
||||
// 优化select的选项在某些场景下的显示问题
|
||||
$(document).on('click'
|
||||
, selectors.map(function (value) {
|
||||
// return value + ' .layui-select-title,' + value + ' .xm-select-title';
|
||||
return value + ' ' + options.triggerElem;
|
||||
}).join(',')
|
||||
, function (event) {
|
||||
layui.stope(event);
|
||||
close();
|
||||
var triggerElem = $(this);
|
||||
var titleElem = triggerElem;
|
||||
var dlElem = typeof options.dlElem === 'function' ? options.dlElem(triggerElem) : titleElem.next();
|
||||
// var selectElem = titleElem.parent().prev();
|
||||
var selectElem = titleElem.parent().prev();
|
||||
var selectupFlag = titleElem.parent().hasClass('layui-form-selectup');
|
||||
|
||||
function getDlPosition() {
|
||||
var titleElemPosition = getPosition(titleElem, window, true);
|
||||
var topTemp = titleElemPosition.top;
|
||||
var leftTemp = titleElemPosition.left;
|
||||
if (selectupFlag) {
|
||||
topTemp = topTemp - dlElem.outerHeight() + titleElem.outerHeight() - parseFloat(dlElem.css('bottom'));
|
||||
} else {
|
||||
topTemp += parseFloat(dlElem.css('top'));
|
||||
}
|
||||
if (topTemp + dlElem.outerHeight() > window.top.innerHeight && !selectupFlag) {
|
||||
// 出现原始的form表单判断向下弹出,但是最终弹出超出窗口下边界的情形的处理
|
||||
selectupFlag = true;
|
||||
topTemp -= (dlElem.outerHeight() + (2 * parseFloat(dlElem.css('top')) - titleElem.outerHeight()));
|
||||
}
|
||||
return {
|
||||
top: topTemp,
|
||||
left: leftTemp
|
||||
};
|
||||
}
|
||||
|
||||
var dlPosition = getDlPosition();
|
||||
|
||||
titleElem.css({backgroundColor: 'transparent'});
|
||||
window.top.layer._indexTemp[modelName] = window.top.layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
shade: 0,
|
||||
anim: -1,
|
||||
fixed: titleElem.closest('.layui-layer-content').length || window.top !== window.self,
|
||||
isOutAnim: false,
|
||||
// offset: [topTemp + 'px', leftTemp + 'px'],
|
||||
offset: [dlPosition.top + 'px', dlPosition.left + 'px'],
|
||||
// area: [dlElem.outerWidth() + 'px', dlElem.outerHeight() + 'px'],
|
||||
area: dlElem.outerWidth() + 'px',
|
||||
content: '<div class="layui-unselect layui-form-select layui-form-selected"></div>',
|
||||
skin: 'layui-option-layer',
|
||||
success: function (layero, index) {
|
||||
dlElem.css({
|
||||
top: 0,
|
||||
position: 'relative'
|
||||
}).appendTo(layero.find('.layui-layer-content').css({overflow: 'hidden'}).find('.layui-form-selected'));
|
||||
layero.width(titleElem.width());
|
||||
// 原本的做法在ie下获得的是auto其他的浏览器却是确定的值,目前简单处理,先自行计算出来,后面再调优
|
||||
var bottom_computed = window.top.innerHeight - layero.outerHeight() - parseFloat(layero.css('top'));
|
||||
selectupFlag && (layero.css({top: 'auto', bottom: bottom_computed + 'px'}));
|
||||
// 调用各自的success回调
|
||||
typeof options.success === 'function' && options.success.call(this, index, layero);
|
||||
// 通用的事件处理
|
||||
layero.on('mousedown', function (event) {
|
||||
layui.stope(event);
|
||||
});
|
||||
setTimeout(function () {
|
||||
// 延迟500毫秒添加事件处理,应对ie浏览器下某一些特定场景下点击select出来option的时候回有一个容器滚动导致直接关闭选项的问题
|
||||
// 不包含selectors的选择器的节点
|
||||
titleElem.parentsUntil(selectors.join(',')).one('scroll', function (event) {
|
||||
// 用window.top.layer去弹出的选项在其title所在的容器滚动的时候都关闭
|
||||
close();
|
||||
});
|
||||
// 单独给选择器的节点加上
|
||||
titleElem.parents(selectors.join(',')).one('scroll', function (event) {
|
||||
// 用window.top.layer去弹出的选项在其title所在的容器滚动的时候都关闭
|
||||
close();
|
||||
});
|
||||
|
||||
var windowTemp = window;
|
||||
do {
|
||||
var $Temp = windowTemp.$ || windowTemp.layui.$;
|
||||
if ($Temp) {
|
||||
// 点击document的时候触发
|
||||
$Temp(windowTemp.document).one('click', function (event) {
|
||||
close();
|
||||
});
|
||||
|
||||
$Temp(windowTemp.document).one('mousedown', function (event) {
|
||||
close();
|
||||
});
|
||||
|
||||
// 窗口resize的时候关掉表格中的下拉
|
||||
$Temp(windowTemp).one('resize', function (event) {
|
||||
close();
|
||||
});
|
||||
|
||||
// 监听滚动在必要的时候关掉select的选项弹出(主要是在多级的父子页面的时候)
|
||||
$Temp(windowTemp.document).one('scroll', function () {
|
||||
if (top !== self &&!!parent&& 'parent' in parent&& parent.parent) {
|
||||
// 多级嵌套的窗口就直接关掉了
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
} while (windowTemp.self !== windowTemp.top ? windowTemp = windowTemp.parent : false);
|
||||
}, 500);
|
||||
},
|
||||
end: function () {
|
||||
typeof options.end === 'function' && options.end.call(this, selectElem);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 内置初始化layui的select的效果,目前还不够晚上不提供给外部注册一些其他有类似问题的组件的处理
|
||||
render('layuiSelect', {
|
||||
triggerElem: 'div:not(.layui-select-disabled)>.layui-select-title', // 触发的选择器
|
||||
success: function (index, layero) {
|
||||
// layui 的select是单选点击一个的时候就关闭layer
|
||||
layero.find('dl dd').click(function () {
|
||||
close();
|
||||
});
|
||||
},
|
||||
end: function (selectElem) {
|
||||
form.render('select', null, selectElem);
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
version: version,
|
||||
getPosition: getPosition,
|
||||
close: close
|
||||
// render: render // 不完善,暂不对外提供
|
||||
};
|
||||
});
|
||||
2
WaterCloud.Web/wwwroot/js/lay-module/optimizeSelectOption/optimizeSelectOption.min.js
vendored
Normal file
2
WaterCloud.Web/wwwroot/js/lay-module/optimizeSelectOption/optimizeSelectOption.min.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** layui-v2.5.4 MIT License By https://www.layui.com */
|
||||
;!function(e){"use strict";var t="optimizeSelectOption";window.top.layui?window.top.layui.use("layer",function(){layui.define(["form"],function(n){n(t,e(t))})}):(console.warn("使用插件:"+t+"页面顶层窗口必须引入layui"),layui.define(["form"],function(e){e(t,{msg:"使用插件:"+t+"页面顶层窗口必须引入layui"})}))}(function(e){function t(e,n,o){n=n||window,e=e.length?e.get(0):e;var i={};if(o&&n.top!==n.self){var l=n.frames.frameElement;i=t(l,n.parent,o)}var a=e.getBoundingClientRect();return{top:a.top+(i.top||0),left:a.left+(i.left||0)}}var n="0.2.0",o=layui.$,i=layui.form,l=(layui.layer,layui.cache.modules.optimizeSelectOption.substr(0,layui.cache.modules.optimizeSelectOption.lastIndexOf("/")));layui.link(l+"/optimizeSelectOption.css?v"+n);var a=[".layui-table-view",".layui-layer-content",".select_option_to_layer"];if(window.top.layer._indexTemp=window.top.layer._indexTemp||{},!i.render.plugFlag){var r=i.render;i.render=function(e,t,n){var i,l=this;return n?layui.each(n,function(t,n){n=o(n);var a=n.parent(),s=a.hasClass("layui-form"),u=a.attr("lay-filter");s?"":a.addClass("layui-form"),u?"":a.attr("lay-filter","tablePlug_form_filter_temp_"+(new Date).getTime()+"_"+Math.floor(1e5*Math.random())),i=r.call(l,e,a.attr("lay-filter")),s?"":a.removeClass("layui-form"),u?"":a.attr("lay-filter",null)}):i=r.call(l,e,t),i},i.render.plugFlag=!0}var s=function(){window.top.layer.close(window.top.layer._indexTemp[e])},u={},c=function(n,i){var l=this;return u.name?(console.warn("针对",n,"的显示优化已经存在,请不要重复渲染!"),l):void o(document).on("click",a.map(function(e){return e+" "+i.triggerElem}).join(","),function(n){function l(){var e=t(u,window,!0),n=e.top,o=e.left;return p?n=n-c.outerHeight()+u.outerHeight()-parseFloat(c.css("bottom")):n+=parseFloat(c.css("top")),n+c.outerHeight()>window.top.innerHeight&&!p&&(p=!0,n-=c.outerHeight()+(2*parseFloat(c.css("top"))-u.outerHeight())),{top:n,left:o}}layui.stope(n),s();var r=o(this),u=r,c="function"==typeof i.dlElem?i.dlElem(r):u.next(),f=u.parent().prev(),p=u.parent().hasClass("layui-form-selectup"),d=l();u.css({backgroundColor:"transparent"}),window.top.layer._indexTemp[e]=window.top.layer.open({type:1,title:!1,closeBtn:0,shade:0,anim:-1,fixed:u.closest(".layui-layer-content").length||window.top!==window.self,isOutAnim:!1,offset:[d.top+"px",d.left+"px"],area:c.outerWidth()+"px",content:'<div class="layui-unselect layui-form-select layui-form-selected"></div>',skin:"layui-option-layer",success:function(e,t){c.css({top:0,position:"relative"}).appendTo(e.find(".layui-layer-content").css({overflow:"hidden"}).find(".layui-form-selected")),e.width(u.width());var n=window.top.innerHeight-e.outerHeight()-parseFloat(e.css("top"));p&&e.css({top:"auto",bottom:n+"px"}),"function"==typeof i.success&&i.success.call(this,t,e),e.on("mousedown",function(e){layui.stope(e)}),setTimeout(function(){u.parentsUntil(a.join(",")).one("scroll",function(e){s()}),u.parents(a.join(",")).one("scroll",function(e){s()});var e=window;do{var t=e.$||e.layui.$;t&&(t(e.document).one("click",function(e){s()}),t(e.document).one("mousedown",function(e){s()}),t(e).one("resize",function(e){s()}),t(e.document).one("scroll",function(){top!==self&&parent.parent&&s()}))}while(e.self!==e.top&&(e=e.parent))},500)},end:function(){"function"==typeof i.end&&i.end.call(this,f)}})})};return c("layuiSelect",{triggerElem:"div:not(.layui-select-disabled)>.layui-select-title",success:function(e,t){t.find("dl dd").click(function(){s()})},end:function(e){i.render("select",null,e)}}),{version:n,getPosition:t,close:s}});
|
||||
32630
WaterCloud.Web/wwwroot/js/lay-module/soulTable/excel.js
Normal file
32630
WaterCloud.Web/wwwroot/js/lay-module/soulTable/excel.js
Normal file
File diff suppressed because it is too large
Load Diff
1571
WaterCloud.Web/wwwroot/js/lay-module/soulTable/soulTable.js
Normal file
1571
WaterCloud.Web/wwwroot/js/lay-module/soulTable/soulTable.js
Normal file
File diff suppressed because it is too large
Load Diff
1549
WaterCloud.Web/wwwroot/js/lay-module/soulTable/soulTable.slim.js
Normal file
1549
WaterCloud.Web/wwwroot/js/lay-module/soulTable/soulTable.slim.js
Normal file
File diff suppressed because it is too large
Load Diff
769
WaterCloud.Web/wwwroot/js/lay-module/soulTable/tableChild.js
Normal file
769
WaterCloud.Web/wwwroot/js/lay-module/soulTable/tableChild.js
Normal file
@@ -0,0 +1,769 @@
|
||||
/**
|
||||
*
|
||||
* @name: 子表格扩展
|
||||
* @author: yelog
|
||||
* @link: https://github.com/yelog/layui-soul-table
|
||||
* @license: MIT
|
||||
* @version: v1.9.0
|
||||
*/
|
||||
layui.define(['table', 'element', 'form', 'laytpl'], function (exports) {
|
||||
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
laytpl = layui.laytpl,
|
||||
tableChildren = {},
|
||||
HIDE = 'layui-hide',
|
||||
ELEM_HOVER = 'soul-table-hover';
|
||||
|
||||
// 封装方法
|
||||
var mod = {
|
||||
/**
|
||||
* 渲染入口
|
||||
* @param myTable
|
||||
*/
|
||||
render: function (myTable) {
|
||||
var _this = this,
|
||||
$table = $(myTable.elem),
|
||||
$tableBox = $table.next().children('.layui-table-box'),
|
||||
tableId = myTable.id,
|
||||
$tableHead = $tableBox.children('.layui-table-header').children('table'),
|
||||
$fixedBody = $tableBox.children('.layui-table-fixed').children('.layui-table-body').children('table'),
|
||||
$noFixedBody = $tableBox.children('.layui-table-body').children('table'),
|
||||
$tableBody = $.merge($tableBox.children('.layui-table-body').children('table'), $fixedBody),
|
||||
columns = _this.getCompleteCols(myTable.cols),
|
||||
childIndex = [],
|
||||
soulSort = typeof myTable.soulSort === 'undefined' || myTable.soulSort,
|
||||
i;
|
||||
|
||||
// 修复hover样式
|
||||
_this.fixHoverStyle(myTable)
|
||||
// 获取子表配置信息
|
||||
for (i = 0; i < columns.length; i++) {
|
||||
if (columns[i].children && columns[i].children.length > 0) {
|
||||
childIndex.push(i);
|
||||
}
|
||||
}
|
||||
if (typeof $table.attr('lay-filter') === 'undefined') {
|
||||
$table.attr('lay-filter', tableId);
|
||||
}
|
||||
// 绑定一下主表事件
|
||||
if ($table.parents('.childTr').length === 0) {
|
||||
// 行单击事件
|
||||
if (typeof myTable.rowEvent === 'function') {
|
||||
table.on('row(' + $table.attr('lay-filter') + ')', function (obj) {
|
||||
myTable.rowEvent(_this.commonMember.call(this, _this, myTable, obj));
|
||||
})
|
||||
}
|
||||
// 行双击事件
|
||||
if (typeof myTable.rowDoubleEvent === 'function') {
|
||||
table.on('rowDouble(' + $table.attr('lay-filter') + ')', function (obj) {
|
||||
myTable.rowDoubleEvent(_this.commonMember.call(this, _this, myTable, obj));
|
||||
})
|
||||
}
|
||||
// 绑定 checkbox 事件
|
||||
if (typeof myTable.checkboxEvent === 'function') {
|
||||
table.on('checkbox(' + $table.attr('lay-filter') + ')', function (obj) {
|
||||
myTable.checkboxEvent(_this.commonMember.call(this, _this, myTable, obj));
|
||||
})
|
||||
}
|
||||
// 绑定 edit 事件
|
||||
if (typeof myTable.editEvent === 'function') {
|
||||
table.on('edit(' + $table.attr('lay-filter') + ')', function (obj) {
|
||||
myTable.editEvent(_this.commonMember.call(this, _this, myTable, obj));
|
||||
})
|
||||
}
|
||||
// 绑定 tool 事件
|
||||
if (typeof myTable.toolEvent === 'function') {
|
||||
table.on('tool(' + $table.attr('lay-filter') + ')', function (obj) {
|
||||
myTable.toolEvent(_this.commonMember.call(this, _this, myTable, obj));
|
||||
})
|
||||
}
|
||||
// 绑定 toolbar 事件
|
||||
if (typeof myTable.toolbarEvent === 'function') {
|
||||
table.on('toolbar(' + $table.attr('lay-filter') + ')', function (obj) {
|
||||
myTable.toolbarEvent(_this.commonMember.call(this, _this, myTable, obj));
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (childIndex.length > 0) {
|
||||
for (i = 0; i < childIndex.length; i++) {
|
||||
(function f() {
|
||||
var child = columns[childIndex[i]]
|
||||
, curIndex = childIndex[i]
|
||||
, icon = child.icon || ['layui-icon layui-icon-right', 'layui-icon layui-icon-down'];
|
||||
|
||||
if (soulSort && !(myTable.url && myTable.page)) {
|
||||
// 前台排序
|
||||
table.on('sort(' + $table.attr('lay-filter') + ')', function () {
|
||||
_this.render(myTable)
|
||||
});
|
||||
}
|
||||
|
||||
if (child.isChild && typeof child.isChild === 'function') {
|
||||
$tableBody.find('tr').find('td[data-key$="' + child.key + '"]>div').each(function () {
|
||||
if (child.isChild(layui.table.cache[tableId][$(this).parents('tr:eq(0)').data('index')])) {
|
||||
if (child.field) {
|
||||
$(this).prepend('<i style="cursor: pointer" class="childTable ' + icon[0] + '"></i>');
|
||||
} else {
|
||||
$(this).html('<i style="cursor: pointer" class="childTable ' + icon[0] + '"></i>');
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (child.field) {
|
||||
$tableBody.find('tr').find('td[data-key$="' + child.key + '"]>div').prepend('<i style="cursor: pointer" class="childTable ' + icon[0] + '"></i>');
|
||||
} else {
|
||||
$tableBody.find('tr').find('td[data-key$="' + child.key + '"]>div').html('<i style="cursor: pointer" class="childTable ' + icon[0] + '"></i>');
|
||||
}
|
||||
}
|
||||
|
||||
$tableBody.children('tbody').children('tr').each(function () {
|
||||
$(this).children('td:eq(' + curIndex + ')').find('.childTable').on('click', function (e) {
|
||||
layui.stope(e)
|
||||
var rowIndex = $(this).parents('tr:eq(0)').data('index'),
|
||||
tableId = myTable.id,
|
||||
key = $(this).parents('td:eq(0)').data('key'),
|
||||
$this = $noFixedBody.children('tbody').children('tr[data-index=' + rowIndex + ']').children('td[data-key="' + key + '"]').find('.childTable:eq(0)'),
|
||||
$fixedThis = $fixedBody.find('tr[data-index=' + rowIndex + ']').children('td[data-key="' + key + '"]').find('.childTable:eq(0)'),
|
||||
data = table.cache[tableId][rowIndex],
|
||||
children = child.children,
|
||||
isTpl = false,
|
||||
tplContent = '',
|
||||
tr = $tableBody.children('tbody').children('tr[data-index="' + rowIndex + '"]'),
|
||||
obj = {
|
||||
data: data,
|
||||
tr: tr,
|
||||
del: function () {
|
||||
table.cache[tableId][rowIndex] = [];
|
||||
_this.destroyChildren(rowIndex, myTable, icon)
|
||||
tr.remove();
|
||||
table.resize(tableId);
|
||||
},
|
||||
update: function (fields) {
|
||||
fields = fields || {};
|
||||
layui.each(fields, function (key, value) {
|
||||
if (key in data) {
|
||||
var templet, td = tr.children('td[data-field="' + key + '"]');
|
||||
data[key] = value;
|
||||
table.eachCols(tableId, function (i, item2) {
|
||||
if (item2.field == key && item2.templet) {
|
||||
templet = item2.templet;
|
||||
}
|
||||
});
|
||||
td.children('.layui-table-cell').html(function () {
|
||||
return templet ? function () {
|
||||
return typeof templet === 'function'
|
||||
? templet(data)
|
||||
: laytpl($(templet).html() || value).render(data)
|
||||
}() : value;
|
||||
}());
|
||||
td.data('content', value);
|
||||
}
|
||||
});
|
||||
},
|
||||
close: function () {
|
||||
_this.destroyChildren(rowIndex, myTable, icon)
|
||||
table.resize(tableId);
|
||||
}
|
||||
|
||||
};
|
||||
if ($this.hasClass(icon[1])) {
|
||||
if (typeof child.childClose === 'function') {
|
||||
if (child.childClose(obj) === false) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 展开事件
|
||||
if (typeof child.childOpen === 'function') {
|
||||
if (child.childOpen(obj) === false) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof children === 'function') {
|
||||
children = children(data)
|
||||
}
|
||||
// 如果是 templet 自定义内容
|
||||
if (typeof children === 'string') {
|
||||
isTpl = true
|
||||
tplContent = _this.parseTempData(child, child.field ? data[child.field] : null, data)
|
||||
}
|
||||
if (child.show === 2) { // 弹窗模式
|
||||
|
||||
child.layerOption ? (typeof child.layerOption.title === 'function' ? (child.layerOption.title = child.layerOption.title(data)) : null) : null;
|
||||
layer.open($.extend({
|
||||
type: 1,
|
||||
title: '子表',
|
||||
maxmin: true,
|
||||
content: _this.getTables(this, data, child, myTable, children, isTpl, tplContent),
|
||||
area: '1000px',
|
||||
offset: '100px',
|
||||
cancel: function () {
|
||||
if (typeof child.childClose === 'function') {
|
||||
if (child.childClose(obj) === false) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}, child.layerOption || {}));
|
||||
|
||||
if (!isTpl) {
|
||||
_this.renderTable(this, data, child, myTable, children, icon);
|
||||
}
|
||||
|
||||
} else { // 展开模式
|
||||
|
||||
// 开启手风琴模式
|
||||
if (!$this.hasClass(icon[1]) && child.collapse) {
|
||||
$tableBody.children('tbody').children('tr').children('td').find('.childTable').each(function () {
|
||||
if ($(this).hasClass(icon[1])) {
|
||||
_this.destroyChildren($(this).parents('tr:eq(0)').data('index'), myTable, icon)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 多个入口时,关闭其他入口
|
||||
if (!$this.hasClass(icon[1])) {
|
||||
$this.parents('tr:eq(0)').children('td').find('.childTable').each(function () {
|
||||
if ($(this).hasClass(icon[1])) {
|
||||
$(this).removeClass(icon[1]).addClass(icon[0])
|
||||
_this.destroyChildren($(this).parents('tr:eq(0)').data('index'), myTable, icon)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if ($this.hasClass(icon[1])) {
|
||||
$this.removeClass(icon[1]).addClass(icon[0])
|
||||
$fixedThis.removeClass(icon[1]).addClass(icon[0])
|
||||
} else {
|
||||
$this.removeClass(icon[0]).addClass(icon[1])
|
||||
$fixedThis.removeClass(icon[0]).addClass(icon[1])
|
||||
}
|
||||
var rowspanIndex = $this.parents('td:eq(0)').attr("rowspan");
|
||||
|
||||
if ($this.hasClass(icon[1])) {
|
||||
var newTr = [];
|
||||
newTr.push('<tr data-tpl="' + isTpl + '" class="noHover childTr"><td colspan="' + $tableHead.find('th:visible').length + '" style="cursor: inherit; padding: 0;">');
|
||||
newTr.push(_this.getTables(this, data, child, myTable, children, isTpl, tplContent));
|
||||
newTr.push('</td></tr>');
|
||||
|
||||
if (rowspanIndex) {
|
||||
var index = parseInt($this.parents('tr:eq(0)').data("index")) + parseInt(rowspanIndex) - 1;
|
||||
$this.parents('table:eq(0)').children().children("[data-index='" + index + "']").after(newTr.join(''));
|
||||
} else {
|
||||
$this.parents('tr:eq(0)').after(newTr.join(''));
|
||||
}
|
||||
layui.element.init('tab')
|
||||
if (!isTpl) {
|
||||
_this.renderTable(this, data, child, myTable, children, icon);
|
||||
// 阻止事件冒泡
|
||||
$this.parents('tr:eq(0)').next().children('td').children('.layui-tab').children('.layui-tab-content').on('click', function (e) {
|
||||
// 不阻止 tab 切换点击事件
|
||||
if (!$(e.target.parentElement).hasClass('layui-tab-title')) {
|
||||
e.stopPropagation()
|
||||
}
|
||||
}).off('dblclick').on('dblclick', function (e) {
|
||||
e.stopPropagation()
|
||||
}).on('mouseenter', 'td', function (e) {
|
||||
e.stopPropagation()
|
||||
}).on('change', function (e) {
|
||||
layui.stope(e)
|
||||
})
|
||||
}
|
||||
if ($fixedBody.length > 0) {
|
||||
var $tr = $this.parents('tr:eq(0)').next(),
|
||||
height = $tr.children('td').height(),
|
||||
$patchDiv = '<div class="soul-table-child-patch" style="height: ' + height + 'px"></div>';
|
||||
$tr.children('td').children('.soul-table-child-wrapper').css({
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
width: '100%',
|
||||
background: 'white',
|
||||
'z-index': 200
|
||||
})
|
||||
$tr.children('td').append($patchDiv);
|
||||
$fixedBody.find('tr[data-index="' + rowIndex + '"]').each(function () {
|
||||
$(this).after('<tr><td style="padding: 0;" colspan="' + $(this).children('[data-key]').length + '">' + $patchDiv + '</td></tr>')
|
||||
})
|
||||
table.resize(tableId)
|
||||
}
|
||||
if (child.show === 3) {
|
||||
$this.parents('tr:eq(0)').next().find('.layui-table-view').css({margin: 0, 'border-width': 0});
|
||||
$this.parents('tr:eq(0)').next().find('.layui-table-header').css('display', 'none');
|
||||
}
|
||||
|
||||
} else {
|
||||
_this.destroyChildren(rowIndex, myTable, icon);
|
||||
table.resize(tableId)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
if (child.spread && child.show !== 2) {
|
||||
$tableBody.children('tbody').children('tr').children('td').find('.childTable').trigger('click');
|
||||
}
|
||||
})()
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生成子表内容
|
||||
* @param _this
|
||||
* @param data
|
||||
* @param child
|
||||
* @param myTable
|
||||
* @param children 子表配置
|
||||
* @param isTpl 是否是自定义模版
|
||||
* @param tplContent 自定义模版内容
|
||||
* @returns {string}
|
||||
*/
|
||||
getTables: function (_this, data, child, myTable, children, isTpl, tplContent) {
|
||||
var tables = [],
|
||||
$table = $(myTable.elem),
|
||||
$tableBox = $table.next().children('.layui-table-box'),
|
||||
tableId = myTable.id,
|
||||
rowTableId = tableId + $(_this).parents('tr:eq(0)').data('index'),
|
||||
$tableHead = $tableBox.children('.layui-table-header').children('table'),
|
||||
$tableMain = $table.next().children('.layui-table-box').children('.layui-table-body'),
|
||||
$tableBody = $tableMain.children('table'),
|
||||
scrollWidth = 0,
|
||||
i;
|
||||
if (isTpl) {
|
||||
tables.push('<div class="soul-table-child-wrapper" style="margin: 0;border: 0;box-shadow: none;');
|
||||
} else {
|
||||
tables.push('<div class="layui-tab layui-tab-card soul-table-child-wrapper" lay-filter="table-child-tab-' + rowTableId + '" style="margin: 0;border: 0;box-shadow: none;');
|
||||
}
|
||||
if (child.show === 2) {
|
||||
tables.push('max-width: ' + ($tableBody.width() - 2) + 'px">')
|
||||
} else if (child.show === 3) {
|
||||
//不限制宽度
|
||||
tables.push('">')
|
||||
} else {
|
||||
if (child.childWidth === 'full') {
|
||||
//不限制宽度
|
||||
tables.push('">')
|
||||
} else {
|
||||
// 如果有滚动条
|
||||
if ($tableMain.prop('scrollHeight') + (children.length > 0 ? children[0].height : 0) > $tableMain.height()) {
|
||||
scrollWidth = this.getScrollWidth();
|
||||
}
|
||||
var maxWidth = $tableMain.width() - 1 - scrollWidth;
|
||||
tables.push('max-width: ' + (maxWidth > $tableHead.width() ? $tableHead.width() : maxWidth) + 'px">')
|
||||
}
|
||||
}
|
||||
if (isTpl) {
|
||||
tables.push(tplContent)
|
||||
} else {
|
||||
if (child.show !== 3 && (typeof child.childTitle === 'undefined' || child.childTitle)) {
|
||||
tables.push('<ul class="layui-tab-title">')
|
||||
for (i = 0; i < children.length; i++) {
|
||||
tables.push('<li class="' + (i === 0 ? 'layui-this' : '') + '">' + (typeof children[i].title === 'function' ? children[i].title(data) : children[i].title) + '</li>');
|
||||
}
|
||||
tables.push('</ul>')
|
||||
}
|
||||
if (child.show === 3) {
|
||||
tables.push('<div class="layui-tab-content" style="padding: 0">');
|
||||
} else {
|
||||
tables.push('<div class="layui-tab-content" style="padding: 0 10px">');
|
||||
}
|
||||
for (i = 0; i < children.length; i++) {
|
||||
var childTableId = rowTableId + i;
|
||||
tables.push('<div class="layui-tab-item layui-show"><form action="" class="layui-form" ><table id="' + childTableId + '" lay-filter="' + childTableId + '"></table></form></div>');
|
||||
}
|
||||
tables.push('</div>');
|
||||
}
|
||||
tables.push('</div>');
|
||||
return tables.join('')
|
||||
},
|
||||
/**
|
||||
* 渲染子表
|
||||
* @param _this
|
||||
* @param data 父表当前行数据
|
||||
* @param child 子表列
|
||||
* @param myTable 父表配置
|
||||
* @param children 子表配置
|
||||
* @param icon 自定义图标
|
||||
*/
|
||||
renderTable: function (_this, data, child, myTable, children, icon) {
|
||||
var tables = []
|
||||
, _that = this
|
||||
, tableId = myTable.id
|
||||
, rowTableId = tableId + $(_this).parents('tr:eq(0)').data('index');
|
||||
|
||||
if (child.lazy) {
|
||||
tables.push(renderChildTable(_that, _this, data, child, myTable, 0, children, icon));
|
||||
} else {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
tables.push(renderChildTable(_that, _this, data, child, myTable, i, children, icon));
|
||||
}
|
||||
}
|
||||
tableChildren[rowTableId] = tables;
|
||||
|
||||
|
||||
layui.element.on('tab(table-child-tab-' + rowTableId + ')', function (tabData) {
|
||||
if (child.lazy) {
|
||||
var isRender = false; // 是否已经渲染
|
||||
for (i = 0; i < tableChildren[rowTableId].length; i++) {
|
||||
if (tableChildren[rowTableId][i].config.id === (rowTableId + tabData.index)) {
|
||||
isRender = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isRender) {
|
||||
tableChildren[rowTableId].push(renderChildTable(_that, _this, data, child, myTable, tabData.index, children))
|
||||
}
|
||||
}
|
||||
|
||||
var rowIndex = $(_this).parents('tr:eq(0)').data('index'),
|
||||
height = $(tabData.elem).height();
|
||||
|
||||
$(_this).parents('.layui-table-box:eq(0)').children('.layui-table-body').children('table').children('tbody').children('tr[data-index=' + rowIndex + ']').next().children().children('.soul-table-child-patch').css('height', height)
|
||||
$(_this).parents('.layui-table-box:eq(0)').children('.layui-table-fixed').children('.layui-table-body').children('table').children('tbody').children('tr[data-index=' + rowIndex + ']').next().children().children('.soul-table-child-patch').css('height', height)
|
||||
table.resize(tableId)
|
||||
|
||||
});
|
||||
|
||||
|
||||
function renderChildTable(_that, _this, data, child, myTable, i, children, icon) {
|
||||
var param = _that.deepClone(children[i]), thisTableChild,
|
||||
tableId = myTable.id,
|
||||
rowIndex = $(_this).parents('tr:eq(0)').data('index'),
|
||||
childTableId = tableId + rowIndex + i,
|
||||
$table = $(myTable.elem),
|
||||
$tableBox = $table.next().children('.layui-table-box'),
|
||||
$tableBody = $.merge($tableBox.children('.layui-table-body').children('table'), $tableBox.children('.layui-table-fixed').children('.layui-table-body').children('table')),
|
||||
tr = $tableBody.children('tbody').children('tr[data-index="' + rowIndex + '"]'),
|
||||
row = table.cache[tableId][rowIndex],
|
||||
// 父表当前行对象
|
||||
pobj = {
|
||||
data: row,
|
||||
tr: tr,
|
||||
del: function () {
|
||||
table.cache[tableId][rowIndex] = [];
|
||||
_that.destroyChildren(rowIndex, myTable, icon)
|
||||
tr.remove();
|
||||
table.resize(tableId);
|
||||
},
|
||||
update: function (fields) {
|
||||
fields = fields || {};
|
||||
layui.each(fields, function (key, value) {
|
||||
if (key in row) {
|
||||
var templet, td = tr.children('td[data-field="' + key + '"]');
|
||||
row[key] = value;
|
||||
table.eachCols(tableId, function (i, item2) {
|
||||
if (item2.field == key && item2.templet) {
|
||||
templet = item2.templet;
|
||||
}
|
||||
});
|
||||
td.children('.layui-table-cell').html(function () {
|
||||
return templet ? function () {
|
||||
return typeof templet === 'function'
|
||||
? templet(row)
|
||||
: laytpl($(templet).html() || value).render(row)
|
||||
}() : value;
|
||||
}());
|
||||
td.data('content', value);
|
||||
}
|
||||
});
|
||||
},
|
||||
close: function () {
|
||||
_that.destroyChildren(rowIndex, myTable, icon)
|
||||
table.resize(tableId);
|
||||
}
|
||||
|
||||
};
|
||||
param.id = childTableId;
|
||||
param.elem = '#' + childTableId;
|
||||
typeof param.where === 'function' && (param.where = param.where(data));
|
||||
typeof param.data === 'function' && (param.data = param.data(data));
|
||||
typeof param.url === 'function' && (param.url = param.url(data));
|
||||
thisTableChild = table.render(param);
|
||||
if (!child.lazy && i !== 0) {
|
||||
$('#' + childTableId).parents('.layui-tab-item:eq(0)').removeClass('layui-show'); //解决隐藏时计算表格高度有问题
|
||||
}
|
||||
// 绑定 checkbox 事件
|
||||
if (typeof param.checkboxEvent === 'function') {
|
||||
table.on('checkbox(' + childTableId + ')', function (obj) {
|
||||
param.checkboxEvent(_that.commonMember.call(this, _that, param, obj), pobj)
|
||||
})
|
||||
}
|
||||
// 绑定 edit 事件
|
||||
if (typeof param.editEvent === 'function') {
|
||||
table.on('edit(' + childTableId + ')', function (obj) {
|
||||
param.editEvent(_that.commonMember.call(this, _that, param, obj), pobj)
|
||||
})
|
||||
}
|
||||
// 绑定 tool 事件
|
||||
if (typeof param.toolEvent === 'function') {
|
||||
table.on('tool(' + childTableId + ')', function (obj) {
|
||||
param.toolEvent(_that.commonMember.call(this, _that, param, obj), pobj)
|
||||
})
|
||||
}
|
||||
// 绑定 toolbar 事件
|
||||
if (typeof param.toolbarEvent === 'function') {
|
||||
table.on('toolbar(' + childTableId + ')', function (obj) {
|
||||
param.toolbarEvent(_that.commonMember.call(this, _that, param, obj), pobj)
|
||||
})
|
||||
}
|
||||
// 绑定单击行事件
|
||||
if (typeof param.rowEvent === 'function') {
|
||||
table.on('row(' + childTableId + ')', function (obj) {
|
||||
param.rowEvent(_that.commonMember.call(this, _that, param, obj), pobj)
|
||||
})
|
||||
}
|
||||
// 绑定双击行事件
|
||||
if (typeof param.rowDoubleEvent === 'function') {
|
||||
table.on('rowDouble(' + childTableId + ')', function (obj) {
|
||||
param.rowDoubleEvent(_that.commonMember.call(this, _that, param, obj), pobj)
|
||||
})
|
||||
}
|
||||
return thisTableChild;
|
||||
}
|
||||
},
|
||||
destroyChildren: function (rowIndex, myTable, icon) {
|
||||
var tableId = myTable.id,
|
||||
$table = $(myTable.elem),
|
||||
$tableBox = $table.next().children('.layui-table-box'),
|
||||
$fixedBody = $tableBox.children('.layui-table-fixed').children('.layui-table-body').children('table'),
|
||||
$tableBody = $.merge($tableBox.children('.layui-table-body').children('table'), $fixedBody),
|
||||
$tr = $tableBody.children('tbody').children('tr[data-index="' + rowIndex + '"]'),
|
||||
isTpl = $tr.next().data('tpl');
|
||||
|
||||
$tr.find('.childTable').removeClass(icon[1]).addClass(icon[0]);
|
||||
|
||||
// 暂时不处理 rowspan 情况
|
||||
// var rowspanIndex = $this.parents('td:eq(0)').attr("rowspan");
|
||||
// if(rowspanIndex){
|
||||
// var index=$this.parents('tr:eq(0)').index()+parseInt(rowspanIndex);
|
||||
// $this.parents('table:eq(0)').children().children('tr:eq('+index+')').remove()
|
||||
// }else{
|
||||
// $this.parents('tr:eq(0)').next().remove();
|
||||
// }
|
||||
$tr.next().remove()
|
||||
if (isTpl === 'false') {
|
||||
var tables = tableChildren[tableId + rowIndex];
|
||||
if (layui.tableFilter) { //如果使用了筛选功能,同时清理筛选渲染的数据
|
||||
layui.tableFilter.destroy(tables);
|
||||
}
|
||||
if (layui.soulTable) { // 清除记忆
|
||||
for (var i = 0; i < tableChildren[tableId + rowIndex].length; i++) {
|
||||
layui.soulTable.clearOriginCols(tableChildren[tableId + rowIndex][i].config.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
delete tableChildren[tableId + rowIndex]
|
||||
|
||||
},
|
||||
cloneJSON: function (obj) {
|
||||
var JSON_SERIALIZE_FIX = {
|
||||
PREFIX: "[[JSON_FUN_PREFIX_",
|
||||
SUFFIX: "_JSON_FUN_SUFFIX]]"
|
||||
};
|
||||
var sobj = JSON.stringify(obj, function (key, value) {
|
||||
if (typeof value === 'function') {
|
||||
return JSON_SERIALIZE_FIX.PREFIX + value.toString() + JSON_SERIALIZE_FIX.SUFFIX;
|
||||
}
|
||||
return value;
|
||||
});
|
||||
return JSON.parse(sobj, function (key, value) {
|
||||
if (typeof value === 'string' &&
|
||||
value.indexOf(JSON_SERIALIZE_FIX.SUFFIX) > 0 && value.indexOf(JSON_SERIALIZE_FIX.PREFIX) === 0) {
|
||||
return eval("(" + value.replace(JSON_SERIALIZE_FIX.PREFIX, "").replace(JSON_SERIALIZE_FIX.SUFFIX, "") + ")");
|
||||
}
|
||||
return value;
|
||||
}) || {};
|
||||
},
|
||||
fixHoverStyle: function (myTable) {
|
||||
var $table = $(myTable.elem)
|
||||
, $tableBody = $table.next().children('.layui-table-box').children('.layui-table-body').children('table')
|
||||
,
|
||||
$tableFixed = $table.next().children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('table')
|
||||
, style = $table.next().find('style')[0],
|
||||
sheet = style.sheet || style.styleSheet || {};
|
||||
// 屏蔽掉layui原生 hover 样式
|
||||
this.addCSSRule(sheet, '.layui-table-hover', 'background-color: inherit');
|
||||
this.addCSSRule(sheet, '.layui-table-hover.soul-table-hover', 'background-color: #F2F2F2');
|
||||
$.merge($tableFixed.children('tbody').children('tr'), $tableBody.children('tbody').children('tr'))
|
||||
.on('mouseenter', function () {
|
||||
var othis = $(this)
|
||||
, index = $(this).data('index');
|
||||
if (othis.data('off')) return;
|
||||
$tableFixed.children('tbody').children('tr[data-index=' + index + ']').addClass(ELEM_HOVER);
|
||||
$tableBody.children('tbody').children('tr[data-index=' + index + ']').addClass(ELEM_HOVER);
|
||||
}).on('mouseleave', function () {
|
||||
var othis = $(this)
|
||||
, index = $(this).data('index');
|
||||
if (othis.data('off')) return;
|
||||
$tableFixed.children('tbody').children('tr[data-index=' + index + ']').removeClass(ELEM_HOVER);
|
||||
$tableBody.children('tbody').children('tr[data-index=' + index + ']').removeClass(ELEM_HOVER);
|
||||
})
|
||||
},
|
||||
addCSSRule: function (sheet, selector, rules, index) {
|
||||
if ('insertRule' in sheet) {
|
||||
sheet.insertRule(selector + '{' + rules + '}', index)
|
||||
} else if ('addRule' in sheet) {
|
||||
sheet.addRule(selector, rules, index)
|
||||
}
|
||||
},
|
||||
// 深度克隆-不丢失方法
|
||||
deepClone: function (obj) {
|
||||
var newObj = Array.isArray(obj) ? [] : {}
|
||||
if (obj && typeof obj === "object") {
|
||||
for (var key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
newObj[key] = (obj && typeof obj[key] === 'object') ? this.deepClone(obj[key]) : obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return newObj
|
||||
},
|
||||
getCompleteCols: function (origin) {
|
||||
var cols = this.deepClone(origin);
|
||||
var i, j, k, cloneCol;
|
||||
for (i = 0; i < cols.length; i++) {
|
||||
for (j = 0; j < cols[i].length; j++) {
|
||||
if (!cols[i][j].exportHandled) {
|
||||
if (cols[i][j].rowspan > 1) {
|
||||
cloneCol = this.deepClone(cols[i][j])
|
||||
cloneCol.exportHandled = true;
|
||||
k = i + 1;
|
||||
while (k < cols.length) {
|
||||
cols[k].splice(j, 0, cloneCol)
|
||||
k++
|
||||
}
|
||||
}
|
||||
if (cols[i][j].colspan > 1) {
|
||||
cloneCol = this.deepClone(cols[i][j])
|
||||
cloneCol.exportHandled = true;
|
||||
for (k = 1; k < cols[i][j].colspan; k++) {
|
||||
cols[i].splice(j, 0, cloneCol)
|
||||
}
|
||||
j = j + parseInt(cols[i][j].colspan) - 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return cols[cols.length - 1];
|
||||
},
|
||||
getScrollWidth: function (elem) {
|
||||
var width = 0;
|
||||
if (elem) {
|
||||
width = elem.offsetWidth - elem.clientWidth;
|
||||
} else {
|
||||
elem = document.createElement('div');
|
||||
elem.style.width = '100px';
|
||||
elem.style.height = '100px';
|
||||
elem.style.overflowY = 'scroll';
|
||||
|
||||
document.body.appendChild(elem);
|
||||
width = elem.offsetWidth - elem.clientWidth;
|
||||
document.body.removeChild(elem);
|
||||
}
|
||||
return width;
|
||||
},
|
||||
//解析自定义模板数据
|
||||
parseTempData: function (item3, content, tplData, text) { //表头数据、原始内容、表体数据、是否只返回文本
|
||||
var str = item3.children ? function () {
|
||||
return typeof item3.children === 'function'
|
||||
? item3.children(tplData)
|
||||
: laytpl($(item3.children).html() || String(content)).render(tplData)
|
||||
}() : content;
|
||||
return text ? $('<div>' + str + '</div>').text() : str;
|
||||
},
|
||||
commonMember: function (_this, myTable, sets) {
|
||||
var othis = $(this)
|
||||
, tableId = myTable.id
|
||||
, $table = $(myTable.elem)
|
||||
, $tableBox = $table.next().children('.layui-table-box')
|
||||
, $fixedBody = $tableBox.children('.layui-table-fixed').children('.layui-table-body').children('table')
|
||||
, $tableBody = $.merge($tableBox.children('.layui-table-body').children('table'), $fixedBody)
|
||||
, index = othis[0].tagName === 'TR' ? $(this).data('index') : othis.parents('tr:eq(0)').data('index')
|
||||
, tr = $tableBody.children('tbody').children('tr[data-index="' + index + '"]')
|
||||
, data = table.cache[tableId] || [];
|
||||
|
||||
|
||||
data = data[index] || {};
|
||||
|
||||
return $.extend(sets, {
|
||||
tr: tr //行元素
|
||||
, oldValue: othis.prev() ? othis.prev().text() : null
|
||||
, del: function () { //删除行数据
|
||||
table.cache[tableId][index] = [];
|
||||
tr.remove();
|
||||
_this.scrollPatch(myTable);
|
||||
}
|
||||
, update: function (fields) { //修改行数据
|
||||
fields = fields || {};
|
||||
layui.each(fields, function (key, value) {
|
||||
if (key in data) {
|
||||
var templet, td = tr.children('td[data-field="' + key + '"]');
|
||||
data[key] = value;
|
||||
table.eachCols(tableId, function (i, item2) {
|
||||
if (item2.field == key && item2.templet) {
|
||||
templet = item2.templet;
|
||||
}
|
||||
});
|
||||
td.children('.layui-table-cell').html(_this.parseTempData({
|
||||
templet: templet
|
||||
}, value, data));
|
||||
td.data('content', value);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
scrollPatch: function (myTable) {
|
||||
var $table = $(myTable.elem),
|
||||
layHeader = $table.next().children('.layui-table-box').children('.layui-table-header'),
|
||||
layTotal = $table.next().children('.layui-table-total'),
|
||||
layMain = $table.next().children('.layui-table-box').children('.layui-table-main'),
|
||||
layFixed = $table.next().children('.layui-table-box').children('.layui-table-fixed'),
|
||||
layFixRight = $table.next().children('.layui-table-box').children('.layui-table-fixed-r'),
|
||||
layMainTable = layMain.children('table'),
|
||||
scollWidth = layMain.width() - layMain.prop('clientWidth'),
|
||||
scollHeight = layMain.height() - layMain.prop('clientHeight'),
|
||||
outWidth = layMainTable.outerWidth() - layMain.width() //表格内容器的超出宽度
|
||||
|
||||
//添加补丁
|
||||
, addPatch = function (elem) {
|
||||
if (scollWidth && scollHeight) {
|
||||
elem = elem.eq(0);
|
||||
if (!elem.find('.layui-table-patch')[0]) {
|
||||
var patchElem = $('<th class="layui-table-patch"><div class="layui-table-cell"></div></th>'); //补丁元素
|
||||
patchElem.find('div').css({
|
||||
width: scollWidth
|
||||
});
|
||||
elem.find('tr').append(patchElem);
|
||||
}
|
||||
} else {
|
||||
elem.find('.layui-table-patch').remove();
|
||||
}
|
||||
}
|
||||
|
||||
addPatch(layHeader);
|
||||
addPatch(layTotal);
|
||||
|
||||
//固定列区域高度
|
||||
var mainHeight = layMain.height()
|
||||
, fixHeight = mainHeight - scollHeight;
|
||||
layFixed.find('.layui-table-body').css('height', layMainTable.height() >= fixHeight ? fixHeight : 'auto');
|
||||
|
||||
//表格宽度小于容器宽度时,隐藏固定列
|
||||
layFixRight[outWidth > 0 ? 'removeClass' : 'addClass'](HIDE);
|
||||
|
||||
//操作栏
|
||||
layFixRight.css('right', scollWidth - 1);
|
||||
}
|
||||
};
|
||||
|
||||
// 输出
|
||||
exports('tableChild', mod);
|
||||
});
|
||||
|
||||
3224
WaterCloud.Web/wwwroot/js/lay-module/soulTable/tableFilter.js
Normal file
3224
WaterCloud.Web/wwwroot/js/lay-module/soulTable/tableFilter.js
Normal file
File diff suppressed because it is too large
Load Diff
103
WaterCloud.Web/wwwroot/js/lay-module/soulTable/tableMerge.js
Normal file
103
WaterCloud.Web/wwwroot/js/lay-module/soulTable/tableMerge.js
Normal file
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
*
|
||||
* @name: 子表格扩展
|
||||
* @author: yelog
|
||||
* @link: https://github.com/yelog/layui-soul-table
|
||||
* @license: MIT
|
||||
* @version: v1.9.0
|
||||
*/
|
||||
layui.define(['table'], function (exports) {
|
||||
|
||||
var $ = layui.jquery;
|
||||
|
||||
// 封装方法
|
||||
var mod = {
|
||||
/**
|
||||
* 渲染入口
|
||||
* @param myTable
|
||||
*/
|
||||
render: function (myTable) {
|
||||
var tableBox = $(myTable.elem).next().children('.layui-table-box'),
|
||||
$main = $(tableBox.children('.layui-table-body').children('table').children('tbody').children('tr').toArray().reverse()),
|
||||
$fixLeft = $(tableBox.children('.layui-table-fixed-l').children('.layui-table-body').children('table').children('tbody').children('tr').toArray().reverse()),
|
||||
$fixRight = $(tableBox.children('.layui-table-fixed-r').children('.layui-table-body').children('table').children('tbody').children('tr').toArray().reverse()),
|
||||
mergeRecord = {};
|
||||
|
||||
layui.each(myTable.cols, function (i1, item1) {
|
||||
layui.each(item1, function (i2, item2) {
|
||||
if (item2.merge && item2.field) {
|
||||
var mergeField = [item2.field];
|
||||
if (item2.merge !== true) {
|
||||
if (typeof item2.merge === 'string') {
|
||||
mergeField = [item2.merge]
|
||||
} else {
|
||||
mergeField = item2.merge
|
||||
}
|
||||
}
|
||||
mergeRecord[myTable.index + '-' + i1 + '-' + i2] = {mergeField: mergeField, rowspan: 1}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$main.each(function (i) {
|
||||
|
||||
for (var item in mergeRecord) {
|
||||
if (i === $main.length - 1 || isMaster(i, item)) {
|
||||
var tdHeight = $(this).children('[data-key="' + item + '"]').outerHeight(), patchHeight = 0; // 获取td高度
|
||||
if ($main.eq(i).data('index') === 0) {
|
||||
patchHeight = 1
|
||||
}
|
||||
$(this).children('[data-key="' + item + '"]').attr('rowspan', mergeRecord[item].rowspan).css({
|
||||
'position': 'static',
|
||||
'height': tdHeight * mergeRecord[item].rowspan + patchHeight
|
||||
}).children().css({
|
||||
height: 'auto',
|
||||
'white-space': 'normal',
|
||||
'max-height': tdHeight * mergeRecord[item].rowspan + patchHeight - 10
|
||||
});
|
||||
$fixLeft.eq(i).children('[data-key="' + item + '"]').attr('rowspan', mergeRecord[item].rowspan).css({
|
||||
'position': 'static',
|
||||
'height': tdHeight * mergeRecord[item].rowspan + patchHeight
|
||||
}).children().css({
|
||||
height: 'auto',
|
||||
'white-space': 'normal',
|
||||
'max-height': tdHeight * mergeRecord[item].rowspan + patchHeight - 10
|
||||
});
|
||||
$fixRight.eq(i).children('[data-key="' + item + '"]').attr('rowspan', mergeRecord[item].rowspan).css({
|
||||
'position': 'static',
|
||||
'height': tdHeight * mergeRecord[item].rowspan + patchHeight
|
||||
}).children().css({
|
||||
height: 'auto',
|
||||
'white-space': 'normal',
|
||||
'max-height': tdHeight * mergeRecord[item].rowspan + patchHeight - 10
|
||||
});
|
||||
mergeRecord[item].rowspan = 1;
|
||||
} else {
|
||||
$(this).children('[data-key="' + item + '"]').remove();
|
||||
$fixLeft.eq(i).children('[data-key="' + item + '"]').remove();
|
||||
$fixRight.eq(i).children('[data-key="' + item + '"]').remove();
|
||||
mergeRecord[item].rowspan += 1;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function isMaster(index, item) {
|
||||
var mergeField = mergeRecord[item].mergeField;
|
||||
var dataLength = layui.table.cache[myTable.id].length;
|
||||
for (var i = 0; i < mergeField.length; i++) {
|
||||
|
||||
if (layui.table.cache[myTable.id][dataLength - 2 - index][mergeField[i]]
|
||||
!== layui.table.cache[myTable.id][dataLength - 1 - index][mergeField[i]]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// 输出
|
||||
exports('tableMerge', mod);
|
||||
});
|
||||
|
||||
79
WaterCloud.Web/wwwroot/js/lay-module/step-lay/step.css
Normal file
79
WaterCloud.Web/wwwroot/js/lay-module/step-lay/step.css
Normal file
@@ -0,0 +1,79 @@
|
||||
.lay-step {
|
||||
font-size: 0;
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
max-width: 100%;
|
||||
padding-left: 30%;
|
||||
}
|
||||
|
||||
.step-item {
|
||||
display: inline-block;
|
||||
line-height: 26px;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.step-item-tail {
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 13px;
|
||||
}
|
||||
|
||||
.step-item-tail i {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
vertical-align: top;
|
||||
background: #c2c2c2;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.step-item-tail .step-item-tail-done {
|
||||
background: #009688;
|
||||
}
|
||||
|
||||
.step-item-head {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
color: #009688;
|
||||
border: 1px solid #009688;
|
||||
border-radius: 50%;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.step-item-head.step-item-head-active {
|
||||
background: #009688;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.step-item-main {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin-left: -50%;
|
||||
margin-right: 50%;
|
||||
padding-left: 26px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.step-item-main-title {
|
||||
font-weight: bolder;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.step-item-main-desc {
|
||||
color: #aaaaaa;
|
||||
}
|
||||
|
||||
.lay-step + [carousel-item]:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.lay-step + [carousel-item] > * {
|
||||
background-color: transparent;
|
||||
}
|
||||
101
WaterCloud.Web/wwwroot/js/lay-module/step-lay/step.js
Normal file
101
WaterCloud.Web/wwwroot/js/lay-module/step-lay/step.js
Normal file
@@ -0,0 +1,101 @@
|
||||
layui.define(['layer', 'carousel'], function (exports) {
|
||||
var $ = layui.jquery;
|
||||
var layer = layui.layer;
|
||||
var carousel = layui.carousel;
|
||||
|
||||
// 添加步骤条dom节点
|
||||
var renderDom = function (elem, stepItems, postion) {
|
||||
var stepDiv = '<div class="lay-step">';
|
||||
for (var i = 0; i < stepItems.length; i++) {
|
||||
stepDiv += '<div class="step-item">';
|
||||
// 线
|
||||
if (i < (stepItems.length - 1)) {
|
||||
if (i < postion) {
|
||||
stepDiv += '<div class="step-item-tail"><i class="step-item-tail-done"></i></div>';
|
||||
} else {
|
||||
stepDiv += '<div class="step-item-tail"><i class=""></i></div>';
|
||||
}
|
||||
}
|
||||
|
||||
// 数字
|
||||
var number = stepItems[i].number;
|
||||
if (!number) {
|
||||
number = i + 1;
|
||||
}
|
||||
if (i == postion) {
|
||||
stepDiv += '<div class="step-item-head step-item-head-active"><i class="layui-icon">' + number + '</i></div>';
|
||||
} else if (i < postion) {
|
||||
stepDiv += '<div class="step-item-head"><i class="layui-icon layui-icon-ok"></i></div>';
|
||||
} else {
|
||||
stepDiv += '<div class="step-item-head "><i class="layui-icon">' + number + '</i></div>';
|
||||
}
|
||||
|
||||
// 标题和描述
|
||||
var title = stepItems[i].title;
|
||||
var desc = stepItems[i].desc;
|
||||
if (title || desc) {
|
||||
stepDiv += '<div class="step-item-main">';
|
||||
if (title) {
|
||||
stepDiv += '<div class="step-item-main-title">' + title + '</div>';
|
||||
}
|
||||
if (desc) {
|
||||
stepDiv += '<div class="step-item-main-desc">' + desc + '</div>';
|
||||
}
|
||||
stepDiv += '</div>';
|
||||
}
|
||||
stepDiv += '</div>';
|
||||
}
|
||||
stepDiv += '</div>';
|
||||
|
||||
$(elem).prepend(stepDiv);
|
||||
|
||||
// 计算每一个条目的宽度
|
||||
var bfb = 100 / stepItems.length;
|
||||
$('.step-item').css('width', bfb + '%');
|
||||
};
|
||||
|
||||
var step = {
|
||||
// 渲染步骤条
|
||||
render: function (param) {
|
||||
param.indicator = 'none'; // 不显示指示器
|
||||
param.arrow = 'always'; // 始终显示箭头
|
||||
param.autoplay = false; // 关闭自动播放
|
||||
if (!param.stepWidth) {
|
||||
param.stepWidth = '400px';
|
||||
}
|
||||
|
||||
// 渲染轮播图
|
||||
carousel.render(param);
|
||||
|
||||
// 渲染步骤条
|
||||
var stepItems = param.stepItems;
|
||||
renderDom(param.elem, stepItems, 0);
|
||||
$('.lay-step').css('width', param.stepWidth);
|
||||
|
||||
//监听轮播切换事件
|
||||
carousel.on('change(' + param.filter + ')', function (obj) {
|
||||
$(param.elem).find('.lay-step').remove();
|
||||
renderDom(param.elem, stepItems, obj.index);
|
||||
$('.lay-step').css('width', param.stepWidth);
|
||||
});
|
||||
|
||||
// 隐藏左右箭头按钮
|
||||
$(param.elem).find('.layui-carousel-arrow').css('display', 'none');
|
||||
|
||||
// 去掉轮播图的背景颜色
|
||||
$(param.elem).css('background-color', 'transparent');
|
||||
},
|
||||
// 下一步
|
||||
next: function (elem) {
|
||||
$(elem).find('.layui-carousel-arrow[lay-type=add]').trigger('click');
|
||||
},
|
||||
// 上一步
|
||||
pre: function (elem) {
|
||||
$(elem).find('.layui-carousel-arrow[lay-type=sub]').trigger('click');
|
||||
}
|
||||
};
|
||||
|
||||
layui.link(layui.cache.base + 'step-lay/step.css');
|
||||
|
||||
exports('step', step);
|
||||
});
|
||||
472
WaterCloud.Web/wwwroot/js/lay-module/tableSelect/tableEdit.js
Normal file
472
WaterCloud.Web/wwwroot/js/lay-module/tableSelect/tableEdit.js
Normal file
@@ -0,0 +1,472 @@
|
||||
layui.define(["laydate","laytpl","table","layer"],function(exports) {
|
||||
"use strict";
|
||||
var moduleName = 'tableEdit',_layui = layui,laytpl = _layui.laytpl
|
||||
, $ = _layui.$,
|
||||
laydate = _layui.laydate,
|
||||
table = _layui.table,
|
||||
layer = _layui.layer
|
||||
,selectTpl = [ //单选下拉框模板
|
||||
'<div class="layui-tableEdit-div" style="{{d.style}}">'
|
||||
,'<ul class="layui-tableEdit-ul">'
|
||||
,'{{# d.data = typeof(d.data) === "function"? d.data(d):d.data; if(d.data){ }}'
|
||||
,'{{# d.data.forEach(function(item){ }}'
|
||||
,'{{# var selectedClass = d.callbackFn(item) }}'
|
||||
,'<li class="{{ selectedClass }}" data-name="{{ item.name }}" data-value="{{ item.value }}">'
|
||||
,'<div class="layui-unselect layui-form-checkbox" lay-skin="primary"><div>{{ item.name }}</div></div>'
|
||||
,'</li>'
|
||||
,'{{# }); }}'
|
||||
,'{{# } else { }}'
|
||||
,'<li>无数据</li>'
|
||||
,'{{# } }}'
|
||||
,'</ul>'
|
||||
, '</div>'
|
||||
].join('')
|
||||
,selectMoreTpl = [ //多选下拉框模板
|
||||
'<div class="layui-tableEdit-div" style="{{d.style}}">'
|
||||
,'<div class="layui-tableEdit-tpl">'
|
||||
,'<ul>'
|
||||
,'{{# if(d.data){ }}'
|
||||
,'{{# d.data.forEach(function(item){ }}'
|
||||
,'{{# var selectedClass = d.callbackFn(item) }}'
|
||||
,'<li class="{{ selectedClass }}" data-name="{{ item.name }}" data-value="{{ item.value }}">'
|
||||
,'<div class="layui-unselect layui-form-checkbox" lay-skin="primary"><div>{{ item.name }}</div><i class="layui-icon layui-icon-ok"></i></div>'
|
||||
,'</li>'
|
||||
,'{{# }); }}'
|
||||
,'{{# } else { }}'
|
||||
,'<li>无数据</li>'
|
||||
,'{{# } }}'
|
||||
,'</ul>'
|
||||
,'</div>'
|
||||
,'<div style="line-height: 36px;">'
|
||||
,'<div style="float: left">'
|
||||
,'<button type="button" event-type="close" class="layui-btn layui-btn-sm layui-btn-primary">关闭</button>'
|
||||
,'</div>'
|
||||
,'<div style="text-align: right">'
|
||||
,'<button event-type="confirm" type="button" class="layui-btn layui-btn-sm layui-btn-primary">确定</button>'
|
||||
,'</div>'
|
||||
,'</div>'
|
||||
,'</div>'
|
||||
].join('');
|
||||
//组件用到的css样式
|
||||
var thisCss = [];
|
||||
thisCss.push('.layui-tableEdit-div{position:absolute;background-color:#fff;font-size:14px;border:1px solid #d2d2d2;z-index:19910908445;max-height: 252px;}');
|
||||
thisCss.push('.layui-tableEdit-tpl{max-height:216px;overflow-y:auto;}');
|
||||
thisCss.push('.layui-tableEdit-div li{line-height:36px;padding-left:5px;}');
|
||||
thisCss.push('.layui-tableEdit-div li:hover{background-color:#f2f2f2;}');
|
||||
thisCss.push('.layui-tableEdit-selected{background-color:#5FB878;}');
|
||||
thisCss.push('.layui-tableEdit-checked i{background-color:#60b979!important;}');
|
||||
thisCss.push('.layui-tableEdit-ul div{padding-left:0px!important;}');
|
||||
thisCss.push('.layui-tableEdit-input{text-align:center;position:absolute;left:0;bottom:0;width:100%;height:38px;z-index: 19910908;}');
|
||||
thisCss.push('.layui-tableEdit-add{position: absolute;right: 3px;top: 21px;margin-top: -15px;z-index: 199109084;}')
|
||||
thisCss.push('.layui-tableEdit-sub{position: absolute;left: 3px;top: 21px;margin-top: -15px;z-index: 199109084;}')
|
||||
var thisStyle = document.createElement('style');
|
||||
thisStyle.innerHTML = thisCss.join('\n'),document.getElementsByTagName('head')[0].appendChild(thisStyle);
|
||||
|
||||
var configs = {
|
||||
callbacks:{}
|
||||
,
|
||||
verify: {
|
||||
required: [
|
||||
/[\S]+/
|
||||
,'必填项不能为空'
|
||||
]
|
||||
,phone: [
|
||||
/^1[34578]\d{9}$/
|
||||
,'请输入正确的手机号'
|
||||
]
|
||||
,email: [
|
||||
/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/
|
||||
,'邮箱格式不正确'
|
||||
]
|
||||
,url: [
|
||||
/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/
|
||||
,'链接格式不正确'
|
||||
]
|
||||
,number:[
|
||||
/(^[-+]?\d+$)|(^[-+]?\d+\.\d+$)/
|
||||
,'只能填写数字'
|
||||
]
|
||||
,date: [
|
||||
/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/
|
||||
,'日期格式不正确'
|
||||
]
|
||||
,identity: [
|
||||
/(^\d{15}$)|(^\d{17}(x|X|\d)$)/
|
||||
,'请输入正确的身份证号'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
var Class = function () { //单列模式 也就是只能new一个对象。
|
||||
var instance;
|
||||
Class = function Class() {
|
||||
return instance;
|
||||
};
|
||||
Class.prototype = this; //保留原型属性
|
||||
instance = new Class();
|
||||
instance.constructor = Class; //重置构造函数指针
|
||||
return instance
|
||||
}; //构造器
|
||||
var singleInstance = new Class();
|
||||
var inFunc = function () {singleInstance.leaveStat = false;},outFunc = function () {singleInstance.leaveStat = true;};
|
||||
document.onclick = function () {if(singleInstance.leaveStat)singleInstance.deleteAll();};
|
||||
|
||||
//日期选择框
|
||||
Class.prototype.date = function (options) {
|
||||
var othis = this;
|
||||
othis.callback = options.callback,othis.element = options.element,othis.dateType = options.dateType;
|
||||
othis.dateType = othis.isEmpty(othis.dateType) ? "datetime":othis.dateType;
|
||||
var that = options.element;
|
||||
if ($(that).find('input').length>0)return;
|
||||
othis.deleteAll(),othis.leaveStat = false;
|
||||
var input = $('<input class="layui-input layui-tableEdit-input" type="text">');
|
||||
(39 - that.offsetHeight > 3) && input.css('height','30px');
|
||||
(that.offsetHeight - 39 > 3) && input.css('height','50px');
|
||||
$(that).append(input),input.focus();
|
||||
//日期时间选择器 (show: true 表示直接显示)
|
||||
laydate.render({
|
||||
elem: input[0], value: options.element.innerText,type: othis.dateType,show: true,done:function (value, date) {
|
||||
othis.deleteAll();
|
||||
if(othis.callback)othis.callback.call(that,value);
|
||||
}});
|
||||
$('div.layui-laydate').hover(inFunc,outFunc),$(that).hover(inFunc,outFunc);
|
||||
_layui.stope();
|
||||
};
|
||||
|
||||
//输入框
|
||||
Class.prototype.input = function (options) {
|
||||
var othis = this;
|
||||
othis.callback = options.callback,othis.element = options.element;
|
||||
othis.oldValue = options.oldValue;
|
||||
othis.oldValue = othis.oldValue ? othis.oldValue : '';
|
||||
var that = options.element;
|
||||
if ($(that).find('input').length>0)return;
|
||||
othis.deleteAll(),othis.leaveStat = false;
|
||||
var input = $('<input class="layui-input layui-tableEdit-input" style="z-index: 99999999999" type="text">');
|
||||
(39 - that.offsetHeight > 3) && input.css('height','30px');
|
||||
(that.offsetHeight - 39 > 3) && input.css('height','50px');
|
||||
input.val(othis.oldValue);
|
||||
$(that).append(input),input.focus();
|
||||
input.click(function (e) {
|
||||
_layui.stope(e);
|
||||
});
|
||||
input.bind('change', function(e){othis.callback.call(othis.element,this.value)});
|
||||
$(that).hover(inFunc,outFunc);
|
||||
_layui.stope();
|
||||
};
|
||||
|
||||
//带加号和减号的输入框(只支持输入数字)
|
||||
Class.prototype.signedInput = function (options) {
|
||||
var othis = this;
|
||||
othis.callback = options.callback,othis.element = options.element;
|
||||
othis.oldValue = options.oldValue;
|
||||
othis.oldValue = othis.oldValue ? othis.oldValue : '';
|
||||
var that = options.element;
|
||||
if ($(that).find('input').length>0)return;
|
||||
othis.deleteAll(),othis.leaveStat = false;
|
||||
var thisWidth = that.offsetWidth-49;
|
||||
var input = $('<input class="layui-input layui-tableEdit-input" style="left: 24px;width: '+thisWidth+'px" type="text">');//
|
||||
var leftBtn = $('<button type="button" class="layui-btn layui-btn-sm layui-tableEdit-sub"><i class="layui-icon layui-icon-subtraction" style="margin-top:-14px!important;position: absolute;left:-1px!important;padding: 0px;"></i></button>');
|
||||
var rightBtn = $('<button type="button" class="layui-btn layui-btn-sm layui-tableEdit-add"><i class="layui-icon layui-icon-addition" style="margin-top:-14px!important;position: absolute;right:-1px!important;padding: 0px;"></i></button>');
|
||||
if(39 - that.offsetHeight > 3){
|
||||
input.css('height','30px');leftBtn.css('top','16px');rightBtn.css('top','16px');
|
||||
}
|
||||
if(that.offsetHeight - 39 > 3){
|
||||
input.css('height','50px');leftBtn.css('top','25px');rightBtn.css('top','25px');
|
||||
}
|
||||
input.val(othis.oldValue);
|
||||
$(that).append(leftBtn);leftBtn.find('i').html('');
|
||||
$(that).append(input),input.focus();$(that).append(rightBtn);rightBtn.find('i').html('');
|
||||
input.click(function (e) {
|
||||
_layui.stope(e);
|
||||
});
|
||||
input.bind('change', function(e){othis.callback.call(othis.element,this.value)});
|
||||
$(that).hover(inFunc,outFunc);
|
||||
_layui.stope();
|
||||
$(that).find('button.layui-tableEdit-sub,button.layui-tableEdit-add').bind('click',function () {
|
||||
var input = $(that).find('input.layui-tableEdit-input');
|
||||
var val = input.val();
|
||||
if(!val || val.length<=0)val=0;
|
||||
val = parseInt(val);
|
||||
if($(this).hasClass('layui-tableEdit-add')){
|
||||
++val;input.val(val);
|
||||
othis.callback.call(othis.element,val)
|
||||
}else{
|
||||
--val;input.val(val);
|
||||
othis.callback.call(othis.element,val)
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
//判断是否为空函数
|
||||
Class.prototype.isEmpty = function(dataStr){return typeof dataStr === 'undefined' || dataStr === null || dataStr.length <= 0;};
|
||||
|
||||
//生成下拉框函数入口
|
||||
Class.prototype.register = function(options){
|
||||
var othis = this;
|
||||
othis.enabled = options.enabled,othis.callback = options.callback;
|
||||
othis.data = options.data,othis.element = options.element;
|
||||
othis.selectedData = options.selectedData;
|
||||
var that = othis.element;
|
||||
if($(that).find('input.layui-tableEdit-input')[0]) return;
|
||||
othis.deleteAll(),othis.leaveStat = false;
|
||||
var input = $('<input class="layui-input layui-tableEdit-input" placeholder="请选择">')
|
||||
,tableEdit = $('<div class="layui-tableEdit"></div>')
|
||||
,tableBody = $(that).parents('div.layui-table-body')
|
||||
,tablePage = $(that).parents('div.layui-table-box').eq(0).next();
|
||||
(39 - that.offsetHeight > 3) && input.css('height','30px');
|
||||
(that.offsetHeight - 39 > 3) && input.css('height','50px');
|
||||
tableEdit.append(input),$(that).append(tableEdit),input.focus();
|
||||
var thisY = input[0].getBoundingClientRect().top //输入框y坐标
|
||||
,thisHeight = ((39 - that.offsetHeight > 3) ? 30 : input[0].offsetHeight) //输入框高度
|
||||
,thisHeight = ((that.offsetHeight - 39 > 3) ? 50 :thisHeight)
|
||||
,thisWidth = input[0].offsetWidth //输入框宽度
|
||||
,elemY = that.getBoundingClientRect().top //输入框y坐标
|
||||
,tableBodyY = tableBody[0].getBoundingClientRect().top
|
||||
,pageY = tablePage[0].getBoundingClientRect().top
|
||||
,tableBodyHeight = tableBody.height() //表格高度
|
||||
,isType = thisY-tableBodyY > 0.8*tableBodyHeight
|
||||
,type = isType ? 'top: auto;bottom: '+(thisHeight+2)+'px;' : 'bottom: auto;top: '+(thisHeight+2)+'px;';
|
||||
if(elemY<tableBodyY)tableBody[0].scrollTop = that.offsetTop; //调整滚动条位置
|
||||
var style = type+'width: '+thisWidth+'px;left: 0px;'+(othis.enabled ? '':'overflow-y: auto;');
|
||||
var getClassFn = function(item){
|
||||
if(othis.isEmpty(othis.selectedData) || othis.isEmpty(item.name))return "";
|
||||
var selectedClass;
|
||||
if(typeof othis.selectedData === 'string' || Object.prototype.toString.call(othis.selectedData) === '[object Number]'){
|
||||
selectedClass = (item.name+"" === othis.selectedData+"") || (item.value+"" === othis.selectedData+"") ? "layui-tableEdit-selected"+(othis.enabled ? " layui-tableEdit-checked":'') : "";
|
||||
}
|
||||
if(typeof othis.selectedData === 'object'){
|
||||
selectedClass = (item.name+"" === othis.selectedData.name+"") ? "layui-tableEdit-selected"+(othis.enabled ? " layui-tableEdit-checked":'') : "";
|
||||
}
|
||||
if(Array.isArray(othis.selectedData)){
|
||||
for(var i=0;i<othis.selectedData.length;i++){
|
||||
selectedClass = (item.name+"" === othis.selectedData[i].name+"") ? "layui-tableEdit-selected layui-tableEdit-checked" : "";
|
||||
if(!othis.isEmpty(selectedClass)) break;
|
||||
}
|
||||
}
|
||||
return selectedClass;
|
||||
};
|
||||
tableEdit.append(laytpl(othis.enabled ? selectMoreTpl : selectTpl).render({data: othis.data,style: style,callbackFn:getClassFn}));
|
||||
var $tableEdit = $('div.layui-tableEdit-div')[0];
|
||||
(thisY+$tableEdit.offsetHeight+thisHeight > pageY) && !isType && (tableBody[0].scrollTop = that.offsetTop);//调整滚动条位置
|
||||
othis.events();
|
||||
};
|
||||
|
||||
//删除所有下拉框和时间选择框
|
||||
Class.prototype.deleteAll = function(){
|
||||
$('div.layui-tableEdit-div,div.layui-tableEdit,div.layui-laydate,input.layui-tableEdit-input,button.layui-tableEdit-sub,button.layui-tableEdit-add').remove();
|
||||
delete this.leaveStat;//清除(离开状态属性)
|
||||
};
|
||||
|
||||
//注册事件
|
||||
Class.prototype.events = function(){
|
||||
var othis = this;
|
||||
var searchFunc = function(val){ //关键字搜索
|
||||
$('div.layui-tableEdit-div li').each(function () {
|
||||
othis.isEmpty(val) || $(this).data('value').toString().indexOf(val) > -1 ? $(this).show() : $(this).hide();
|
||||
});
|
||||
},liClickFunc = function(){ //给li元素注册点击事件
|
||||
var liArr = $('div.layui-tableEdit-div li');
|
||||
liArr.unbind('click'),liArr.bind('click',function (e) {
|
||||
_layui.stope(e);
|
||||
if(othis.enabled){//多选
|
||||
$(this).hasClass("layui-tableEdit-checked") ? ($(this).removeClass("layui-tableEdit-checked"),
|
||||
$(this).removeClass("layui-tableEdit-selected"))
|
||||
: $(this).addClass("layui-tableEdit-checked")
|
||||
}else {//单选
|
||||
othis.deleteAll();
|
||||
if(othis.callback)othis.callback.call(othis.element,{name:$(this).data("name"),value:$(this).data("value")});
|
||||
}
|
||||
});
|
||||
},btnClickFunc = function (){ //给button按钮注册点击事件
|
||||
$("div.layui-tableEdit-div button").bind('click',function () {
|
||||
var eventType = $(this).attr("event-type"), btn = this,dataList = new Array();
|
||||
if(eventType === 'close') singleInstance.deleteAll(); //“关闭”按钮
|
||||
if(eventType === 'confirm') { //“确定”按钮
|
||||
$('div.layui-tableEdit-div li').each(function (e) {
|
||||
if(!$(this).hasClass("layui-tableEdit-checked"))return;
|
||||
dataList.push({name:$(this).data("name"),value:$(this).data("value")});
|
||||
});
|
||||
othis.deleteAll();
|
||||
if(othis.callback)othis.callback.call(othis.element,dataList);
|
||||
}
|
||||
});
|
||||
};
|
||||
//事件注册
|
||||
$(othis.element).find('input.layui-tableEdit-input').bind('input propertychange', function(){searchFunc(this.value)});
|
||||
othis.enabled ? (liClickFunc(),btnClickFunc()) : liClickFunc();
|
||||
$(othis.element).hover(inFunc,outFunc);
|
||||
};
|
||||
|
||||
var AopEvent = function(cols){this.config = {colsConfig:{}};this.parseCols(cols)};//aop构造器
|
||||
/**
|
||||
* 解析出tableEdit组件所需要的配置信息
|
||||
* @param cols
|
||||
*/
|
||||
AopEvent.prototype.parseCols = function(cols){
|
||||
var that = this;
|
||||
cols.forEach(function (ite) {
|
||||
ite.forEach(function (item) {
|
||||
if(!item.config)return;
|
||||
that.config.colsConfig[item.field] = item.config;
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* aop代理event
|
||||
* @param event 事件名称
|
||||
* @param callback 回调函数
|
||||
*/
|
||||
AopEvent.prototype.on = function(event,callback){
|
||||
var othis = this;othis.config.event = event,othis.config.callback = callback;
|
||||
table.on(othis.config.event,function (obj) {
|
||||
var zthis = this,field = $(zthis).data('field'),config = othis.config.colsConfig[field];
|
||||
if(!config){
|
||||
othis.config.callback.call(zthis,obj);return;
|
||||
}
|
||||
obj.field = field;
|
||||
var callbackFn = function (res) {
|
||||
if(config.verify && !othis.verify(res,config.verify,this))return; //验证为空
|
||||
obj.value = Array.isArray(res) ? (res.length>0 ? res : [{name:'',value:''}]) : res;
|
||||
othis.config.callback.call(zthis,obj);
|
||||
if(!singleInstance.isEmpty(config.cascadeSelectField)){
|
||||
var csElement = $(this.parentNode).find("td[data-field='"+config.cascadeSelectField+"']");
|
||||
$(csElement).attr("cascadeSelect-data",JSON.stringify({data:res,field:field}));
|
||||
}
|
||||
};
|
||||
var csd = $(this).attr("cascadeSelect-data");//联动数据
|
||||
if(singleInstance.isEmpty(csd)){ //非联动事件
|
||||
if(config.type === 'select'){
|
||||
singleInstance.register({data:config.data,element:zthis,enabled:config.enabled,selectedData:obj.data[field],callback:callbackFn});
|
||||
}else if(config.type === 'date'){
|
||||
singleInstance.date({dateType:config.dateType,element:zthis,callback:callbackFn});
|
||||
}else if(config.type === 'input'){
|
||||
singleInstance.input({element:zthis,oldValue:obj.data[field],callback:callbackFn});
|
||||
}else if(config.type === 'signedInput'){
|
||||
singleInstance.signedInput({element:zthis,oldValue:obj.data[field],callback:callbackFn});
|
||||
}else othis.config.callback.call(zthis,obj);
|
||||
} else {//联动事件
|
||||
if(config.type === 'date') return;
|
||||
//获取当前单元格的table表格的lay-filter属性值
|
||||
var filter = $(zthis).parents('div.layui-table-view').eq(0).prev().attr('lay-filter')
|
||||
,rs = active.callbackFn.call(zthis,'clickBefore('+filter+')',JSON.parse(csd));
|
||||
//异步操作,由使用者调用。
|
||||
//判断条件为rs为空时。
|
||||
if(singleInstance.isEmpty(rs)){
|
||||
active.on("async("+filter+")",function (result) {
|
||||
singleInstance.register({data:result.data,element:zthis,enabled:result.enabled,selectedData:obj.data[field],callback:callbackFn});
|
||||
})
|
||||
}else {
|
||||
singleInstance.register({data:rs.data,element:zthis,enabled:rs.enabled,selectedData:obj.data[field],callback:callbackFn});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 验证数据是否符合要求
|
||||
* @param data 被验证数据
|
||||
* @param verify 正则参数
|
||||
* @param td 当前单元格
|
||||
* @returns {boolean} true验证通过 false验证未通过
|
||||
*/
|
||||
AopEvent.prototype.verify = function (data,verify,td) {
|
||||
var verifyObj = configs.verify[verify.type];
|
||||
var verifyMsg = verify.msg;
|
||||
verifyMsg = verifyMsg ? verifyMsg : (verifyObj ? verifyObj[1] : '必填项不能为空');
|
||||
if(singleInstance.isEmpty(data)){
|
||||
layer.tips(verifyMsg, td,{tipsMore:true});
|
||||
return false;
|
||||
}
|
||||
if (Array.isArray(data)) {
|
||||
if (data.length <= 0) {
|
||||
layer.tips(verifyMsg, td, { tipsMore: true });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ((typeof data === 'object' && singleInstance.isEmpty(data.name))
|
||||
|| data.name === 'undefined'){
|
||||
layer.tips(verifyMsg, td,{tipsMore:true});
|
||||
return false;
|
||||
}
|
||||
if(!verifyObj && !verify.regx){
|
||||
return true;
|
||||
}
|
||||
if(verify.regx){ //自定义正则判断
|
||||
if(typeof verify.regx === "function"){//为函数时
|
||||
if(verify.regx(data))return true;
|
||||
layer.tips(verifyMsg, td,{tipsMore:true});
|
||||
return false;
|
||||
}
|
||||
if(typeof verify.regx === "string"){ //为字符串正则时
|
||||
var regx = new RegExp(verify.regx);
|
||||
if(regx.test(data))return true;
|
||||
layer.tips(verifyMsg, td,{tipsMore:true});
|
||||
return false;
|
||||
}
|
||||
if(verify.regx.test(data))return true; //为正则时
|
||||
layer.tips(verifyMsg, td,{tipsMore:true});
|
||||
return false;
|
||||
}
|
||||
if(!verifyObj[0].test(data)){
|
||||
layer.tips(verifyMsg, td,{tipsMore:true});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 提交数据的验证
|
||||
* @param options {elem:'#test',data:[],verifyKey:'id'}
|
||||
* elem: 表格id,带井号 data: 验证数据,数组类型。
|
||||
* verifyKey: data中的元素的唯一值字段,且必须在表格中有此字段的单元格。
|
||||
* @returns {*}
|
||||
*/
|
||||
AopEvent.prototype.submitValidate = function (options) {
|
||||
var that = this,failedTds = [];
|
||||
if(!options || singleInstance.isEmpty(options.verifyKey)
|
||||
|| singleInstance.isEmpty(options.data)
|
||||
|| singleInstance.isEmpty(options.elem))return failedTds;
|
||||
var body = $(options.elem).next().find('div.layui-table-box div.layui-table-body tr');
|
||||
options.data.forEach(function (item) {
|
||||
for(var field in item){
|
||||
var config = that.config.colsConfig[field];
|
||||
if(!config || !config.verify)continue;
|
||||
var verify = config.verify;
|
||||
var tds = body.find('td[data-field="'+options.verifyKey+'"]');
|
||||
var thisTd;
|
||||
tds.each(function () {
|
||||
var text = $(this).find('div.layui-table-cell').text();
|
||||
if(text+'' === item[options.verifyKey]+''){
|
||||
thisTd = $(this);
|
||||
}
|
||||
});
|
||||
if(!thisTd)continue;
|
||||
var td = thisTd.parent().children('td[data-field="'+field+'"]');
|
||||
if(!that.verify(item[field],verify,td))failedTds.push(td[0]);
|
||||
}
|
||||
});
|
||||
return failedTds;
|
||||
};
|
||||
|
||||
var active = {
|
||||
aopObj:function(cols){return new AopEvent(cols);},
|
||||
on:function (event,callback) {
|
||||
var filter = event.match(/\((.*)\)$/),eventName = (filter ? (event.replace(filter[0],'')+'_'+ filter[1]) : event);
|
||||
configs.callbacks[moduleName+'_'+eventName]=callback;
|
||||
},
|
||||
callbackFn:function (event,params) {
|
||||
var filter = event.match(/\((.*)\)$/),eventName = (filter ? (event.replace(filter[0],'')+'_'+ filter[1]) : event);
|
||||
var key = moduleName+'_'+eventName,func = configs.callbacks[key];
|
||||
if(!func) return;
|
||||
return func.call(this,params);
|
||||
}
|
||||
};
|
||||
|
||||
active.on("tableEdit(getEntity)",function () {
|
||||
return singleInstance;
|
||||
});
|
||||
|
||||
exports(moduleName, active);
|
||||
});
|
||||
265
WaterCloud.Web/wwwroot/js/lay-module/tableSelect/tableSelect.js
Normal file
265
WaterCloud.Web/wwwroot/js/lay-module/tableSelect/tableSelect.js
Normal file
@@ -0,0 +1,265 @@
|
||||
layui.define(['table', 'jquery', 'form'], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var MOD_NAME = 'tableSelect',
|
||||
$ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form;
|
||||
var tableSelect = function () {
|
||||
this.v = '1.1.0';
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化表格选择器
|
||||
*/
|
||||
tableSelect.prototype.render = function (opt) {
|
||||
var elem = $(opt.elem);
|
||||
var tableDone = opt.table.done || function () { };
|
||||
|
||||
//默认设置
|
||||
opt.searchKey = opt.searchKey || 'keyword';
|
||||
opt.searchPlaceholder = opt.searchPlaceholder || '关键词搜索';
|
||||
opt.checkedKey = opt.checkedKey;
|
||||
opt.table.page = opt.table.page || false;
|
||||
opt.table.height = opt.table.height || 315;
|
||||
|
||||
elem.off('click').on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
|
||||
if ($('div.tableSelect').length >= 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var t = elem.offset().top + elem.outerHeight() + "px";
|
||||
var l = elem.offset().left + "px";
|
||||
var tableName = "tableSelect_table_" + new Date().getTime();
|
||||
var tableBox = '<div class="tableSelect layui-anim layui-anim-upbit" style="left:' + l + ';top:' + t + ';border: 1px solid #d2d2d2;background-color: #fff;box-shadow: 0 2px 4px rgba(0,0,0,.12);padding:10px 10px 0 10px;position: absolute;z-index:66666666;margin: 5px 0;border-radius: 2px;min-width:530px;">';
|
||||
tableBox += '<div class="tableSelectBar">';
|
||||
tableBox += '<form class="layui-form" action="" style="display:inline-block;">';
|
||||
tableBox += '<input style="display:inline-block;width:190px;height:30px;vertical-align:middle;margin-right:-1px;border: 1px solid #C9C9C9;" type="text" name="' + opt.searchKey + '" placeholder="' + opt.searchPlaceholder + '" autocomplete="off" class="layui-input"><button class="layui-btn layui-btn-sm layui-btn-primary tableSelect_btn_search" lay-submit lay-filter="tableSelect_btn_search"><i class="layui-icon layui-icon-search"></i></button>';
|
||||
tableBox += '</form>';
|
||||
tableBox += '<button style="float:right;" class="layui-btn layui-btn-sm tableSelect_btn_select">选择<span></span></button>';
|
||||
tableBox += '<button style="float:right;margin-right: 6px;" class="layui-btn layui-btn-primary layui-btn-sm tableSelect_btn_clear">清空<span></span></button>';
|
||||
tableBox += '</div>';
|
||||
tableBox += '<table id="' + tableName + '" lay-filter="' + tableName + '"></table>';
|
||||
tableBox += '</div>';
|
||||
tableBox = $(tableBox);
|
||||
$('body').append(tableBox);
|
||||
|
||||
//数据缓存
|
||||
var checkedData = [], firstLoad = true;;
|
||||
|
||||
//渲染TABLE
|
||||
opt.table.elem = "#" + tableName;
|
||||
opt.table.id = tableName;
|
||||
opt.table.done = function (res, curr, count) {
|
||||
defaultChecked(res, curr, count);
|
||||
setChecked(res, curr, count);
|
||||
tableDone(res, curr, count);
|
||||
};
|
||||
var tableSelect_table = table.render(opt.table);
|
||||
|
||||
//分页选中保存数组
|
||||
table.on('radio(' + tableName + ')', function (obj) {
|
||||
if (opt.checkedKey) {
|
||||
checkedData = table.checkStatus(tableName).data
|
||||
}
|
||||
updateButton(table.checkStatus(tableName).data.length)
|
||||
})
|
||||
table.on('checkbox(' + tableName + ')', function (obj) {
|
||||
if (opt.checkedKey) {
|
||||
if (obj.checked) {
|
||||
for (var i = 0; i < table.checkStatus(tableName).data.length; i++) {
|
||||
checkedData.push(table.checkStatus(tableName).data[i])
|
||||
}
|
||||
} else {
|
||||
if (obj.type == 'all') {
|
||||
for (var j = 0; j < table.cache[tableName].length; j++) {
|
||||
for (var i = 0; i < checkedData.length; i++) {
|
||||
if (checkedData[i][opt.checkedKey] == table.cache[tableName][j][opt.checkedKey]) {
|
||||
checkedData.splice(i, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//因为LAYUI问题,操作到变化全选状态时获取到的obj为空,这里用函数获取未选中的项。
|
||||
function nu() {
|
||||
var noCheckedKey = '';
|
||||
for (var i = 0; i < table.cache[tableName].length; i++) {
|
||||
if (!table.cache[tableName][i].LAY_CHECKED) {
|
||||
noCheckedKey = table.cache[tableName][i][opt.checkedKey];
|
||||
}
|
||||
}
|
||||
return noCheckedKey
|
||||
}
|
||||
var noCheckedKey = obj.data[opt.checkedKey] || nu();
|
||||
for (var i = 0; i < checkedData.length; i++) {
|
||||
if (checkedData[i][opt.checkedKey] == noCheckedKey) {
|
||||
checkedData.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
checkedData = uniqueObjArray(checkedData, opt.checkedKey);
|
||||
updateButton(checkedData.length)
|
||||
} else {
|
||||
updateButton(table.checkStatus(tableName).data.length)
|
||||
}
|
||||
});
|
||||
|
||||
//渲染表格后选中
|
||||
function setChecked(res, curr, count) {
|
||||
for (var i = 0; i < res.data.length; i++) {
|
||||
for (var j = 0; j < checkedData.length; j++) {
|
||||
if (res.data[i][opt.checkedKey] == checkedData[j][opt.checkedKey]) {
|
||||
res.data[i].LAY_CHECKED = true;
|
||||
var index = res.data[i]['LAY_INDEX'];
|
||||
var checkbox = $('#' + tableName + '').next().find('tr[data-index=' + index + '] input[type="checkbox"]');
|
||||
checkbox.prop('checked', true).next().addClass('layui-form-checked');
|
||||
var radio = $('#' + tableName + '').next().find('tr[data-index=' + index + '] input[type="radio"]');
|
||||
radio.prop('checked', true).next().addClass('layui-form-radioed').find("i").html('');
|
||||
}
|
||||
}
|
||||
}
|
||||
var checkStatus = table.checkStatus(tableName);
|
||||
if (checkStatus.isAll) {
|
||||
$('#' + tableName + '').next().find('.layui-table-header th[data-field="0"] input[type="checkbox"]').prop('checked', true);
|
||||
$('#' + tableName + '').next().find('.layui-table-header th[data-field="0"] input[type="checkbox"]').next().addClass('layui-form-checked');
|
||||
}
|
||||
updateButton(checkedData.length)
|
||||
}
|
||||
|
||||
//写入默认选中值(puash checkedData)
|
||||
function defaultChecked(res, curr, count) {
|
||||
if (firstLoad) {
|
||||
if (opt.checkedKey && elem.attr('ts-selected')) {
|
||||
var selected = elem.attr('ts-selected').split(",");
|
||||
for (var i = 0; i < res.data.length; i++) {
|
||||
for (var j = 0; j < selected.length; j++) {
|
||||
if (res.data[i][opt.checkedKey] == selected[j]) {
|
||||
checkedData.push(res.data[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
checkedData = uniqueObjArray(checkedData, opt.checkedKey);
|
||||
}
|
||||
firstLoad = false;
|
||||
}
|
||||
}
|
||||
|
||||
//更新选中数量
|
||||
function updateButton(n) {
|
||||
tableBox.find('.tableSelect_btn_select span').html(n == 0 ? '' : '(' + n + ')')
|
||||
}
|
||||
|
||||
//数组去重
|
||||
function uniqueObjArray(arr, type) {
|
||||
var newArr = [];
|
||||
var tArr = [];
|
||||
if (arr.length == 0) {
|
||||
return arr;
|
||||
} else {
|
||||
if (type) {
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (!tArr[arr[i][type]]) {
|
||||
newArr.push(arr[i]);
|
||||
tArr[arr[i][type]] = true;
|
||||
}
|
||||
}
|
||||
return newArr;
|
||||
} else {
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (!tArr[arr[i]]) {
|
||||
newArr.push(arr[i]);
|
||||
tArr[arr[i]] = true;
|
||||
}
|
||||
}
|
||||
return newArr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//FIX位置
|
||||
var overHeight = (elem.offset().top + elem.outerHeight() + tableBox.outerHeight() - $(window).scrollTop()) > $(window).height();
|
||||
var overWidth = (elem.offset().left + tableBox.outerWidth()) > $(window).width();
|
||||
overHeight && tableBox.css({ 'top': 'auto', 'bottom': '0px' });
|
||||
overWidth && tableBox.css({ 'left': 'auto', 'right': '5px' })
|
||||
|
||||
//关键词搜索
|
||||
form.on('submit(tableSelect_btn_search)', function (data) {
|
||||
checkedData = [];
|
||||
updateButton(0);
|
||||
tableSelect_table.reload({
|
||||
where: data.field,
|
||||
page: false
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//双击行选中
|
||||
table.on('rowDouble(' + tableName + ')', function (obj) {
|
||||
var checkStatus = { data: [obj.data] };
|
||||
selectDone(checkStatus);
|
||||
})
|
||||
|
||||
//按钮选中
|
||||
tableBox.find('.tableSelect_btn_select').on('click', function () {
|
||||
var checkStatus = table.checkStatus(tableName);
|
||||
if (checkedData.length > 1) {
|
||||
checkStatus.data = checkedData;
|
||||
}
|
||||
selectDone(checkStatus);
|
||||
})
|
||||
// 清空
|
||||
tableBox.find('.tableSelect_btn_clear').on('click', function () {
|
||||
checkedData = [];
|
||||
updateButton(0);
|
||||
tableSelect_table.reload();
|
||||
});
|
||||
|
||||
//写值回调和关闭
|
||||
function selectDone(checkStatus) {
|
||||
if (opt.checkedKey) {
|
||||
var selected = [];
|
||||
for (var i = 0; i < checkStatus.data.length; i++) {
|
||||
selected.push(checkStatus.data[i][opt.checkedKey])
|
||||
}
|
||||
elem.attr("ts-selected", selected.join(","));
|
||||
}
|
||||
opt.done(elem, checkStatus);
|
||||
tableBox.remove();
|
||||
delete table.cache[tableName];
|
||||
checkedData = [];
|
||||
}
|
||||
|
||||
//点击其他区域关闭
|
||||
$(document).mouseup(function (e) {
|
||||
var userSet_con = $('' + opt.elem + ',.tableSelect');
|
||||
if (!userSet_con.is(e.target) && userSet_con.has(e.target).length === 0) {
|
||||
tableBox.remove();
|
||||
delete table.cache[tableName];
|
||||
checkedData = [];
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏选择器
|
||||
*/
|
||||
tableSelect.prototype.hide = function (opt) {
|
||||
$('.tableSelect').remove();
|
||||
}
|
||||
|
||||
//自动完成渲染
|
||||
var tableSelect = new tableSelect();
|
||||
|
||||
//FIX 滚动时错位
|
||||
if (window.top == window.self) {
|
||||
$(window).scroll(function () {
|
||||
tableSelect.hide();
|
||||
});
|
||||
}
|
||||
|
||||
exports(MOD_NAME, tableSelect);
|
||||
})
|
||||
52
WaterCloud.Web/wwwroot/js/lay-module/tabletree/tabletree.css
Normal file
52
WaterCloud.Web/wwwroot/js/lay-module/tabletree/tabletree.css
Normal file
@@ -0,0 +1,52 @@
|
||||
.treeTable-empty {
|
||||
width: 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.treeTable-icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.treeTable-icon .layui-icon-triangle-d:before {
|
||||
content: "\e623";
|
||||
}
|
||||
|
||||
.treeTable-icon.open .layui-icon-triangle-d:before {
|
||||
content: "\e625";
|
||||
background-color: transparent;
|
||||
}
|
||||
/** 扩展图标 */
|
||||
.treeTable .tree-icon-folder:after, .treeTable .tree-icon-file:after {
|
||||
content: "";
|
||||
padding: 2px 10px;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAE6UlEQVR4Xu2ZPYhcVRiGny9hC0FsTEBCGkFTWIQE/IlpgmKpWAiLyR0XLbYTxEKxkCAEhRCxEOwsjJnJioKIYClWKgqiskIIaCoLYyASVJT87JGspN37LrOXvec777Tzzrnvz7Nn2dnAr6YbiKbTOzwGoHEIDIABaLyBxuP7BjAAjTfQeHzfAAag8QYaj+8bwAA03kDj8X0DGIDGG2g8/lw3QFlhD9fZN7oOF7gYT3NudL5GaGjTAJQP2c1VXgIOExyGkf4/oXCe4I3oeH+EvY/G0qYAKFOWCV4Hdo8mQb+RL7jBE7HE3/3S9hQyAGXGCeDVSiv6lqscief4t1L/g9mWAChTHiD4ZrTXvVbPu9GxrEnbUWkAzPgeOJCglsXo+ChBji2L0AtAmfEgrP/0Z3hdZoF7Y5HLGcJsRQYFgLeAF7fiYSM540x0LI3Ey7bb6AdgytcEh7bd6VYa2MGhOJrmVpurmX4AZlwCds31lPF9+AI32O8/DYUvccqUKwR3jG/DuR29Gd36F1pNv/pvgKwAFK5RuC+e4eeWCWgXgJurFz6LCY8bgA0aSPwr4P/UhVNc43ir3xK2fQPcAr/wO/AewU/Ar6xRqroVdvAnC6zGIlc369sAbLax8er/ofAJOzkVR9e/uZVeBkCqqTrRyeh4RXFtAJSWatQUno0Jp/usG4C+hup9/yJ72BuPcH2jCAag3oEV50vRccYAKFXl1LwdHS8YgJzj9qcqfBoTnjQA/VVlVXwXHfcbgKzz9uf6IToOGoD+orIqDEDWZcVcBkAsKqvMAGRdVsxlAMSissoMQNZlxVwGQCwqq8wAZF1WzGUAxKKyygxA1mXFXAZALCqrzABkXVbMZQDEorLKDEDWZcVcBkAsKqvMAGRdVsxlAMSissoMQNZlxVwGQCwqq8wAZF1WzGUAxKKyygxA1mXFXAZALCqrzABkXVbMZQDEorLKDEDWZcVcBkAsKqvMAGRdVsxlAMSissoMQNZlxVwGQCwqq8wAZF1WzGUAxKKyygxA1mXFXAZALCqrzABkXVbMZQDEorLKDEDWZcVcBkAsKqvMAGRdVsxlAMSissoMQNZlxVwGQCwqq8wAZF1WzGUAxKKyygxA1mXFXAZALCqrzABkXVbMZQDEorLKDEDWZcVcBkAsKqvMAGRdVsxlAMSissoMQNZlxVwGQCwqq8wAZF1WzGUAxKKyygxA1mXFXAZALCqrzABkXVbMZQDEorLKDEDWZcVcBkAsKqvMAGRdVsxlAMSissoMQNZlxVwGQCwqq8wAZF1WzLUFAMy4BOwSH2jZmBoorMaE/RtZij6/ZcoFgrv7dH5/lA38Eh33zAfAjM+BR0cZz6Y2bqDwY0w4MB8AU04SvOyuq2zg4+h4aj4AzvIwha+qjN+66cLzMeGduQC4+eEy4zywr/U+K8t/hQX2xiJ/zQ/ACgdZ40vgtspKaNducCyOsdJXQO9fAbcOKGc5whofENzVd6jf3/YGTkTHccWFDMD6r4LT3MlOloHHCB4CblceYs3gDfxB4TeCcxReiwmr6hM3BYB6qHX1NGAA6tlqEKcGYJBa6znUANSz1SBODcAgtdZzqAGoZ6tBnBqAQWqt51ADUM9Wgzg1AIPUWs+hBqCerQZxagAGqbWeQw1APVsN4tQADFJrPYcagHq2GsTpf+KxwJB5Cd5mAAAAAElFTkSuQmCC");
|
||||
}
|
||||
.treeTable-icon.open .tree-icon-folder:after {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKwElEQVR4Xu2df9AVVRnHP899gUxmYKhsCpJREEeMakSoiGGCbIxSizIJ7i5OksZkMIxQjlOQyOCQ5o/8RWmkMdz7wjDC5I+hcFSKxEENh4YsEwPJAbVQ8AeQL733NPcKyn3v7r17d8/uvfvus//ec57n+3yf7z179uw5zwp6ZZoByXT0GjwqgIyLQAWgAsg4AxkPX0cAFUDGGch4+DoCqAAyzkDGw9cRQAWQcQYyHr6OACqA5hkw63kfr3IyOQZTIte8BUs9OnibEi/isEcEY8lqpswEHgHMGgbSxTyEyRjGIC1MfM8UGQ4CfyLHWp7jbllEKVNZjBBsIAGYAi7CrcCgCL6S6voM4IrDtqQcptlPQwGYAksRrkpVkIZD5JgmeR5IFe4WgK0rAFPkamBRC3BFd2k4AkwSl83RjfVeC74CMCuZSI6NqQ7d8G9KDJOLK3MEvTwY8BdAga0Io3sBa0vEYWEviCOWEDwFYDoZh+HxWDwmb/R18gzSx0Rv4r0FUORa4EfJ5yomj8IEyfNYTNZTbdZbAAU2IJyb6siOB2+4Qlx+3mvisRiInwC2I4yy6Ke1pgw/E5crWwuiPb373QL+BZzcnpBDobpLHGaF6tnLO6kAenmCG4WXFQH8WhwubURGFn/PhgAMD4nLl7KY4EYxZ0MAcBhhqOTZ14iQrP2eFQGU8/ogeb6qC0LVEs+SAMqRL+ctLpdZlRdFeoH32UBTpLc9Br6XbMMuhLUIm+jmzbZSQUdlV9M++rBTpnI4CWxZGwGS4NSWj2eBh4CbxGG3LaM97agA4mLWnt23gZ+yg8VxbHVTAdhLVNyWHqabKbb3NqgA4k6bTfuG+3GYYvNJRgVgM0FJ2DL8QFxutOVKBWCLyaTsGN6gH0NlKq/bcKkCsMFi0jYMs8XlDhtuVQA2WEzahuH34vJlG25VADZYTN7GPnE4yYZbFYANFlth4y362VjSVgG0Ink2fAon2Xi7qQKwkYxW2OglAtiP4QlgN8LLreAxtT4HcL1cwKGo+FsxAnQDv6HEbTKDv0QNQPtHYyBpAZSPm7mSp/ymS682YCA5ARiWMYS5Mon/tUHcCuEoA0kJ4AZx+KGy3n4MJCGA9eJwXqPQzSJyjGAMJU5s1FZ/r8NAH7roYIdM5T9BeIpXAIaXOMKZcgkH/MCYIp8GvgN8A/hQENDaJhADrwG/oy9X1BNDvAIQZkqee+okfwGGa9qq4FQgblPVaC85xsp09nqhjlMAO9nBCK9tTGYjfdhLJ3BRqqhMK1jDdoYw2msCHqcAypsZ53txZoqVo9pz08pnKnEbLhKXe3tij1MAk8VhQ0+HZjWj6GZ7KklMM2jD3eJW5lpVV5wC+IA47K8RQJEVwMVp5jKV2H3OR8YjAMPL4vLRmuSvoYMjvAoMTCWJ6Qa9Vhy+mdQIsEEcJtcIYCWjybE13TymFL2wVPK1dZ/iGgE8S7KYTi7F8KuUUphu2AlPAsu1eose9/9lwPfSzWRq0Q8Xh53J3AI6+IRM4681AiiwBeEzqaUwrcANh8Slvxf8OG4BXezg/T0XgCpr/afxX4S+aeUxtbgNfxCXSUkJYJs4nKXP/20ll5vFYV4yAjCsEJdve9z/y8/+5TUAvZJmwDBDXArJCADmicPNHgLQ5d+kE3/Mn+Hj4vK3ZARg+KK4POIxAdyEMKFVHGTWb/m7Cc9zgl9tgTgmgd5LwAUOIrrZI3EhGraIyzg/v7YFsFcchnhMAE+nm38kHrw6BMMycfl+MgLwObRoikwDVmk+WsCAcJnkWZ6MAOA6cWo/MGUKXI/optAWpB9KnC0zeDoZAQh5ydf+002BhxHOaQkBWXZqKHGQE+odIrU7BxBGSZ7yd/uqLlOsbArVV8DJi9FzUe54GDYF4L0EvIpTKLEr+djVIz67gOIRgOFpcTnb499f3u69VtPREgbmiMPt9TzbHAHuEYeZHgtASxB+3JLws+40x3iZXv/rb/YE4PNhJlNgPWKnnk3W89l0/APo3+gIuT0BwBfEqf3SqCnwCsKHmwavHaIy8Kw4jGxkxKYAapaAzSoGU2JPIxD6ewwMGDrFxWlk2Y4ADHvE5WMe9//zEf2Cd6MkxPJ7wIqidgQAnieATYGfIFwTS4BqtD4DwjmS59FGNNkRgM+WY1Pkt8DXGoHQ32NgoItB9U5lH/NoRwAwXRxWe6wB9N4vj8SQM4smXxCHU4PYsyOADs6Uafz9eIdmDQM54l8XIAg4bROagXXicGGQ3jYE4L0EXOBcpPZwaBBQ2iYiA4YF4la+AN/wsiGAP4vDWI8ngKsQljZEoA3iYOA8cVgfxHB0Afi8cDBF1mgBiCApiKGN8BHJ80oQy9EFAHPF4VaPCeDzwPAgILSNRQYML4nL4KAWowtAmCh5/lg1AXyAE3mDg0FBaDurDASqynbMY3QBQO0S8Eomkqt9L2A1TDXmx8AScVgYlJ6oAnhRHIZ6TADnI9wQFIS2s8rAheKwLqjFqAJ4UBwu8BBAESEfFIS2s8hAjlNlOi8EtRhNAIZrxWWBxwSwvCh0RlAQ2s4SA4YD4jKoGWvRBCB8S/KVx713L6MTwGb4t932UXGa230dTQAlzpAZ1Sd+TIHxCI/ZjkztBWKg6aLcUQTgtwQ8B6ldFwgEXxtFY8DnXEY9o+EFYHhK3Eqh56rLFCu1gWvqA0SLTHsHYkAY2ezHOMILAJaLw2UeAih/BuaTgQBrI3sM1KkDFM8IADV7zs2d9KV/pQ5Qzl5kaikQA4bHxWV8oLbHNYoyAnxeHDZVPQEUGIvwZLMgtL0VBm4XhznNWgovAI8956aTWRh+2SwIbW+BgQbfZvDzEFYAu8XhFI/7/53Ady2EoyaaZ+AscdjWbLdwAjDcL27tZk9T5ClgTLMgtH1EBhrUAYpjEljzxkkLQUZMYrTuW8UJ98cLOwLUfH3CrORT5JofgqLFrb2PMuD5SB6EnXACgNPFYUfVE0Anl5TPowdxqm2sM3C5OPwijNXmBeCz4GCK3AbMDgNC+0RkwDBOXLaEseIngOeAEZ4GDU+Iy2drngAKbEb4XBgQ2icCAwHqADU/CSzwJFK71fuoobvEYVbV8P9OJfA3tRBkhESG7/qMOIwK2917BCiwDuHrPiPAbHG5o0oAqxlJt3ct2rDAtF9ABnyKcwfsjd8tYDH4bCwUJki++n2/KVbOoXtWow4KRNuFZsDzXGZQa34jgP+xLq8l4CI3gnc9+qBAtF0IBgwH6MdgmcrhEL0rXbwFUP68WxevIQyoMmzYJS7DPCaAGxEmhgWh/UIyIMyXPDeF7O0vgPIvpsB1CFf2MH6fOEzxEIBWAo+ShXB915PnfBFMuO7v9PIcASoCWMEH6VNZ7Hlvl6lhsbhc3WMCOJxuysfA9EqKAUO5+P7MeiVgg0LxFUBFBEW+AtwH9DlqsObQgSlWvgBetTM4qHNt1zQD+zEs7PkU1rSV4zrUFcDRW0G50NMtwDBKjJAZ1f92U2ApUlshPAoo7fsuA12YCt+bgXvpxyMylW6b/DQUwDFnZiWn4fLPqPccm+DVVnQGAgsguiu10I4MqADaMSsJYlIBJEh2O7pSAbRjVhLEpAJIkOx2dKUCaMesJIhJBZAg2e3oSgXQjllJEJMKIEGy29GVCqAds5IgJhVAgmS3oysVQDtmJUFM/wdaDlOuM5Eu/AAAAABJRU5ErkJggg==");
|
||||
}
|
||||
.treeTable .tree-icon-file:after {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAJNUlEQVR4Xu2dXYxdVRXHf2tghhYaoba1Qk1owIwmfVBaTKRgQqMPlGjig2nDnDsF0whSnwqJ4SNoU2OLUSNPVDSx2t47hEkxaQMBI1hB/EiE6osYqjGUYPGjCihN6Uy525wzt7UdZu7ZZ87a5949Z52XeVl77bX//9/d52vvM4IdtVZAaj16GzwGQM0hMAAMgJorUPPh2wxgANRcgZoP32YAA6DmCtR8+DYDGADVKuB2s4BB1gMbEYZxLEFYDlxQbSU97+0Ejn8hHMPxR4R9LOZxuZGTVVZW2QzgxlnGBNuBUYSLqhxkNH05jgN7GeIrsoF/VlF3cADcQc7nKHfiuM+M97Q0BUH4GpfxbVnHKc9WcwoLCoBrsRjHYwhr51Rd3Rs5foXwaUl4PZQUwQBwLa4AngZWhiq+JnlfBj4pCX8JMd4gALgxluJ4Hrg8RNE1zHkE4WoZ4Zj22NUBcOMsZILnEFZrF1vrfI5DDHGdbOCEpg76ADTZiXCXZpGWq6OAsFNGuEdTD1UA3B7exwDpdLUgt0jHqwjjwH6EF0NMb7k19DAgO03CKtp8pvNM5AO55TjeZoCVMsLfc2M9A3QBaPEQcGtO328hbOYw+2Qbbc8653WY28YAw3yONrsRLswZ7Pck4TYtQdQAcOMMMckbwMIuxaVPua6VhBe0BjCf8rgWa4Bf5jwVPcEgl8gGJjTGrgfAGDfgeCKnqC2SsEuj8Pmaw7W4HXiw6/iE9TLCkxoa6AHQyopOi5/5cLzCCq4M/WRLQ5Re5ug8Of1z11tox3el0UXrAgPQA6DJQYTru/R9ryTsKFBbbUNdK7vS/3qXH9PPpcE6DYH0AGjxEjA8a1Ft1sgohzSKnu853MNcRburVocl4UMaOugB0MxeYMx+BTt14fKmRtHzPYcb5+LOBfVsp9Pj0mCRhg56ALRw3QqSxPYgFDHMVaSnAVDElQpjDYAKxe7HrgyAfnSlwpoMgArF7seuDIB+dKXCmgyACsXux64MgH50pcKaDIAKxe7HrgyAfnSlwpoMgBnEduO8n0m+j+MahCUV+pHf1dQun18zyBdkA3/Lb9A9wgCYpk9nj8EfEC4tK27Q9o7XGOIjZXf2GADTAWjyQ4Sbg5qnl3yvJGwqk84AePcMkO6VSxdSxnAck4RlZQo1AN4NwF+By8qIWmHbo5Kwokx/BkDcp4A9kpQ7XRkA0wGY2nPw+yguAoVVZTd0GgAz3Qbu5VIGsr0H1wLvLTPFBmj772xJd5vbZJTXyuY3AMoqGHl7AyByA8uWbwCUVTDy9gZA5AaWLd8AKKtg5O0NgMgNLFu+AVBWwcjbGwCRG1i2fAOgrIKRtzcAIjewbPkGQFkFI29vAERuYNnyDYCZXgbZmsAzqmjtto5md7CtCTz3F1E/AGxN4DkE1A+AVvb9fFsT2MGgjgDYmsCz5oD6ARDXKcDWBE6/iC9LbOc7xLYmsK6ngHTcztYE1vc2sOyDldja24Og2BxTrtcAUBY0tnQGQGyOKddrACgLGls6AyA2x5TrNQCUBY0tnQEQm2PK9RoAyoLGls4AiM0x5XoNAGVBY0tnAMTmmHK9BsAMgqp+J1D5u37K/mMATFM02JpApe/6GQCB/8eNC7sgpPR3/QyA0ACEXRNY+rt+BkB4AEKuCSz9XT8DIDQAYU8BpdfwGQChAQj1ncD0IlDhu34GQGAAUoGV1wSqftfPAKgAAG2RQ+Rzu1nAIOuBjQjDOJYgLAcu0Oyv7Crr07VEszdQU7wQudw4y5hgOzCKcFGIPs7OaQCEVtgzvzvI+RzlThz3VWF8p6wJSXRmFJsBPI2eKazzdPIxhLUl0syl6RFJWDmXhtPbGABzVNG1uAJ4GnSMKFSG4zfS4JpCbWYJNgDmoKIbYymO54HL59C8fBPHj6TBLeUTgQFQUEU3zkImeA5hdcGmeuHCRhlhXCOhAVBQRddkJ8JdBZtphr/DIEtkA29qJDUACqjY2aF8BGFBbjPHq0j2K92P8KKMcKxbGzfGKhy/ABbn5N4vCZ/N7d8zwADwFCoNc63sv5XcmtPkLYTNHGafbKPtk76A+dDmwzLKSz55fWIMAB+VUvPHGWKSN4CFXZqcTP+djSS84JmWQuY7xqRB4pvbJ84A8FEpBWCMG3A8kRO+RRJ2eaZMZ5SPAj/zmPbTlEd5h6tkE//wze8TZwD4qDQ1/T8I3D5ruOMVVnClrOOUT8rMfMczCO/JjXdM4vi4jHIoN7ZggAHgKZhrchDh+i7h90rCDp90hcwHB9wiCXt8cheNMQA8FXOt7MJreNbwNmt8fqEFzU/t3ywNfuBZZuEwA8BTMtfkOMKFs4YPcknevblr8jHgKa9pf6qjQtcUnkM5J8wA8FSt7Dr9zHzJLvgWeXYZ3Py0DgPA040yABQ237FVGjzgWVqpME0A/tuVbsfF0uA/partYeO5AtDP5uvOAE3+hPDBWT0aYLXcxO966GGprucCQL+brw3AswifmFVlxz3SYGcpF3rYuCgA7mHW0uYn3ud8x93S4P6qh6h3CmiyC+GLXQAo9KCkaiHy+isCQMf8p3IeG/+/yx6ZrzsDtLgReLyrkI4vSSN7ohbd4QvAHMzfLg2+2itB9GaA9GXJBK93vVeGk7RZ6/PApFeCzNavDwCuxaeAAwV++fdLg7t7OVY1ANJBeL8udXyehEdFssecURx5AAB3AN8EzvMakOMBabDVKzZgkC4AYyynzcveCybgEYQDPgsmAmrgldoDAK88WVCfmK96DXB69K7JNxC+7K9GzSL7yPwwAKSLJid5Fri6Ztb6DHeXJGzxCawqRvUUcGYWmFo2/duerJmvSrni/fSd+UFmgDMQTG2c+Clkf+t+fEeS7CKx744gM8BZEKQrXNPbouv6buTVFHQSx83S4JFquiveS1AAsgvehxhkEXdUvHmyuBL6LZ5hgK39/v4jOABnZoN0+/QkO3DcVOEuWn1bu2V0vA38mPP4Vr8bf3oYlQFwFgjpXcJ6HBshe3u4NMQHFII7ny7UlOy/maYbPtI3oY9yigOyiePB+1bsoHIAFGu3VAoKGAAKIsacwgCI2T2F2g0ABRFjTmEAxOyeQu0GgIKIMacwAGJ2T6F2A0BBxJhTGAAxu6dQuwGgIGLMKf4HAR/hrhUhGSQAAAAASUVORK5CYII=");
|
||||
}
|
||||
.treeTable .tree-table-arrow {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 16px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.treeTable .tree-table-arrow:before {
|
||||
content: "\e602";
|
||||
}
|
||||
.treeTable .open .tree-table-arrow:before {
|
||||
content: "\e61a";
|
||||
}
|
||||
|
||||
224
WaterCloud.Web/wwwroot/js/lay-module/tabletree/tabletree.js
Normal file
224
WaterCloud.Web/wwwroot/js/lay-module/tabletree/tabletree.js
Normal file
@@ -0,0 +1,224 @@
|
||||
layui.define(['layer', 'table','soulTable'], function (exports) {
|
||||
var $ = layui.jquery;
|
||||
var layer = layui.layer;
|
||||
var soulTable = layui.soulTable;
|
||||
var table = layui.table;
|
||||
var _instances = {}; // 记录所有实例
|
||||
var tabletree = {
|
||||
// 渲染树形表格
|
||||
render: function (param) {
|
||||
var id = param.elem.substring(1);
|
||||
var isclick = true;
|
||||
if (!!_instances[id]) {
|
||||
isclick = false;
|
||||
}
|
||||
else {
|
||||
_instances[id] = param;
|
||||
}
|
||||
// 检查参数
|
||||
if (!tabletree.checkParam(param)) {
|
||||
return;
|
||||
}
|
||||
// 获取数据
|
||||
if (param.data) {
|
||||
tabletree.init(param, param.data);
|
||||
} else {
|
||||
$.getJSON(param.url, param.where, function (res) {
|
||||
tabletree.init(param, res.data);
|
||||
});
|
||||
}
|
||||
if (isclick) {
|
||||
// 给图标列绑定事件
|
||||
$('body').on('click', '.treeTable .treeTable-icon', function () {
|
||||
var treeLinkage = $(this).parents('.treeTable').attr('treeLinkage');
|
||||
if ('true' == treeLinkage) {
|
||||
tabletree.toggleRows($(this), true, id);
|
||||
} else {
|
||||
tabletree.toggleRows($(this), false, id);
|
||||
}
|
||||
|
||||
$('div[lay-id=' + id + ']').find('.layui-table-main tbody tr').each(function () {
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
// 渲染表格
|
||||
init: function (param, data) {
|
||||
var mData = [];
|
||||
var doneCallback = param.done;
|
||||
var tNodes = data;
|
||||
// 补上id和pid字段
|
||||
for (var i = 0; i < tNodes.length; i++) {
|
||||
var tt = tNodes[i];
|
||||
if (!tt.id) {
|
||||
if (!param.treeIdName) {
|
||||
layer.msg('参数treeIdName不能为空', {icon: 5});
|
||||
return;
|
||||
}
|
||||
tt.id = tt[param.treeIdName];
|
||||
}
|
||||
if (!tt.pid) {
|
||||
if (!param.treePidName) {
|
||||
layer.msg('参数treePidName不能为空', {icon: 5});
|
||||
return;
|
||||
}
|
||||
tt.pid = tt[param.treePidName];
|
||||
}
|
||||
}
|
||||
|
||||
// 对数据进行排序
|
||||
var sort = function (s_pid, data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (data[i].pid == s_pid) {
|
||||
var len = mData.length;
|
||||
if (len > 0 && mData[len - 1].id == s_pid) {
|
||||
mData[len - 1].isParent = true;
|
||||
}
|
||||
mData.push(data[i]);
|
||||
sort(data[i].id, data);
|
||||
}
|
||||
}
|
||||
};
|
||||
sort(param.treeSpid, tNodes);
|
||||
|
||||
// 重写参数
|
||||
param.url = undefined;
|
||||
param.data = mData;
|
||||
param.cols[0][param.treeColIndex].templet = function (d) {
|
||||
var mId = d.id;
|
||||
var mPid = d.pid;
|
||||
var isDir = d.isParent;
|
||||
var emptyNum = tabletree.getEmptyNum(mPid, mData);
|
||||
var iconHtml = '';
|
||||
for (var i = 0; i < emptyNum; i++) {
|
||||
iconHtml += '<span class="treeTable-empty"></span>';
|
||||
}
|
||||
if (isDir) {
|
||||
iconHtml += '<i class="layui-icon tree-table-arrow"></i><i class="layui-icon tree-icon-folder"></i>';
|
||||
} else {
|
||||
iconHtml += '<i class="layui-icon tree-icon-file"></i>';
|
||||
}
|
||||
iconHtml += ' ';
|
||||
var ttype = isDir ? 'dir' : 'file';
|
||||
var vg = '<span class="treeTable-icon open" lay-tid="' + mId + '" lay-tpid="' + mPid + '" lay-ttype="' + ttype + '">';
|
||||
return vg + iconHtml + d[param.cols[0][param.treeColIndex].field] + '</span>'
|
||||
};
|
||||
|
||||
param.done = function (res, curr, count) {
|
||||
$(param.elem).next().addClass('treeTable');
|
||||
$(param.elem).next().attr('treeLinkage', param.treeLinkage);
|
||||
// 绑定事件换成对body绑定
|
||||
/*$('.tabletree .treeTable-icon').click(function () {
|
||||
tabletree.toggleRows($(this), param.treeLinkage);
|
||||
});*/
|
||||
if (param.treeDefaultClose) {
|
||||
tabletree.foldAll(param.elem);
|
||||
}
|
||||
if (doneCallback) {
|
||||
doneCallback(res, curr, count);
|
||||
}
|
||||
if (!!param.filter) {
|
||||
soulTable.render(this);
|
||||
}
|
||||
table.resize();
|
||||
};
|
||||
|
||||
// 渲染表格
|
||||
table.render(param);
|
||||
},
|
||||
// 计算缩进的数量
|
||||
getEmptyNum: function (pid, data) {
|
||||
var num = 0;
|
||||
if (!pid) {
|
||||
return num;
|
||||
}
|
||||
var tPid;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (pid == data[i].id) {
|
||||
num += 1;
|
||||
tPid = data[i].pid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return num + tabletree.getEmptyNum(tPid, data);
|
||||
},
|
||||
// 展开/折叠行
|
||||
toggleRows: function ($dom, linkage,id) {
|
||||
var type = $dom.attr('lay-ttype');
|
||||
if ('file' == type) {
|
||||
return;
|
||||
}
|
||||
var mId = $dom.attr('lay-tid');
|
||||
var isOpen = $dom.hasClass('open');
|
||||
if (isOpen) {
|
||||
$dom.removeClass('open');
|
||||
} else {
|
||||
$dom.addClass('open');
|
||||
}
|
||||
$dom.closest('tbody').find('tr').each(function () {
|
||||
var $ti = $(this).find('.treeTable-icon');
|
||||
var pid = $ti.attr('lay-tpid');
|
||||
var ttype = $ti.attr('lay-ttype');
|
||||
var tOpen = $ti.hasClass('open');
|
||||
if (mId == pid) {
|
||||
if (isOpen) {
|
||||
$(this).hide();
|
||||
var index = $(this).attr('data-index');
|
||||
$('div[lay-table-id=' + id + ']').find('.layui-table-fixed tbody tr[data-index= ' + index + ']').hide();
|
||||
if ('dir' == ttype && tOpen == isOpen) {
|
||||
$ti.trigger('click');
|
||||
}
|
||||
} else {
|
||||
$(this).show();
|
||||
var index = $(this).attr('data-index');
|
||||
$('div[lay-table-id=' + id + ']').find('.layui-table-fixed tbody tr[data-index= ' + index + ']').show();
|
||||
if (linkage && 'dir' == ttype && tOpen == isOpen) {
|
||||
$ti.trigger('click');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 检查参数
|
||||
checkParam: function (param) {
|
||||
if (!param.treeSpid && param.treeSpid != 0) {
|
||||
layer.msg('参数treeSpid不能为空', {icon: 5});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!param.treeColIndex && param.treeColIndex != 0) {
|
||||
layer.msg('参数treeColIndex不能为空', {icon: 5});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
// 展开所有
|
||||
expandAll: function (dom) {
|
||||
$(dom).next('.treeTable').find('.layui-table-body tbody tr').each(function () {
|
||||
var $ti = $(this).find('.treeTable-icon');
|
||||
var ttype = $ti.attr('lay-ttype');
|
||||
var tOpen = $ti.hasClass('open');
|
||||
if ('dir' == ttype && !tOpen) {
|
||||
$ti.trigger('click');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 折叠所有
|
||||
foldAll: function (dom) {
|
||||
$(dom).next('.treeTable').find('.layui-table-body tbody tr').each(function () {
|
||||
var $ti = $(this).find('.treeTable-icon');
|
||||
var ttype = $ti.attr('lay-ttype');
|
||||
var tOpen = $ti.hasClass('open');
|
||||
if ('dir' == ttype && tOpen) {
|
||||
$ti.trigger('click');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
layui.link(layui.cache.base + 'tabletree/tabletree.css');
|
||||
|
||||
exports('tabletree', tabletree);
|
||||
});
|
||||
2280
WaterCloud.Web/wwwroot/js/lay-module/treetable-lay/treeTable.js
Normal file
2280
WaterCloud.Web/wwwroot/js/lay-module/treetable-lay/treeTable.js
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
411
WaterCloud.Web/wwwroot/js/lay-module/wangEditor/wangEditor.css
Normal file
411
WaterCloud.Web/wwwroot/js/lay-module/wangEditor/wangEditor.css
Normal file
File diff suppressed because one or more lines are too long
10410
WaterCloud.Web/wwwroot/js/lay-module/wangEditor/wangEditor.js
Normal file
10410
WaterCloud.Web/wwwroot/js/lay-module/wangEditor/wangEditor.js
Normal file
File diff suppressed because one or more lines are too long
1
WaterCloud.Web/wwwroot/js/lay-module/wangEditor/wangEditor.min.css
vendored
Normal file
1
WaterCloud.Web/wwwroot/js/lay-module/wangEditor/wangEditor.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4
WaterCloud.Web/wwwroot/js/lay-module/wangEditor/wangEditor.min.js
vendored
Normal file
4
WaterCloud.Web/wwwroot/js/lay-module/wangEditor/wangEditor.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1065
WaterCloud.Web/wwwroot/js/lay-module/waterCloud/common.js
Normal file
1065
WaterCloud.Web/wwwroot/js/lay-module/waterCloud/common.js
Normal file
File diff suppressed because it is too large
Load Diff
423
WaterCloud.Web/wwwroot/js/lay-module/waterCloud/commonTable.js
Normal file
423
WaterCloud.Web/wwwroot/js/lay-module/waterCloud/commonTable.js
Normal file
@@ -0,0 +1,423 @@
|
||||
/**
|
||||
* date:2020/09/29
|
||||
* author:Mr.Q
|
||||
* version:1.6
|
||||
* description:watercloud 主体框架扩展
|
||||
*/
|
||||
layui.define(["jquery", "layer", 'table', 'soulTable', 'common', 'tabletree'], function (exports) {
|
||||
var $ = layui.jquery,
|
||||
layer = layui.layer,
|
||||
soulTable = layui.soulTable,
|
||||
tabletree = layui.tabletree,
|
||||
common = layui.common,
|
||||
table = layui.table;
|
||||
|
||||
var obj = {
|
||||
//table渲染封装里面有字段权限
|
||||
rendertable: function (options) {
|
||||
var serchHeight = parseInt(60 + ($(".table-search-fieldset").height() || 0));
|
||||
var defaults = {
|
||||
elem: '#currentTableId',//主键
|
||||
toolbar: '#toolbarDemo',//工具栏
|
||||
defaultToolbar: ['filter', 'exports', 'print'],//默认工具栏
|
||||
search: true,//搜索按钮
|
||||
method: 'get',//请求方法
|
||||
cellMinWidth: 100,//最小宽度
|
||||
limit: 10,//每页数据 默认
|
||||
limits: [10, 20, 30, 40, 50],
|
||||
id:'currentTableId',
|
||||
height: 'full-' + serchHeight,
|
||||
loading: false,
|
||||
autoSort: false,
|
||||
page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
|
||||
layout: ['skip', 'prev', 'page', 'next', 'limit', 'count'] //自定义分页布局
|
||||
,curr: 1 //设定初始在第 1 页
|
||||
, groups: 3 //只显示 1 个连续页码
|
||||
, first: false //不显示首页
|
||||
, last: false //不显示尾页
|
||||
},
|
||||
authorizeFields: true, // 字段权限开关
|
||||
autoColumnWidth: true,
|
||||
overflow: { // 默认所有表格都超出
|
||||
type: 'tips'
|
||||
, hoverTime: 300 // 悬停时间,单位ms, 悬停 hoverTime 后才会显示,默认为 0
|
||||
, color: 'black' // 字体颜色
|
||||
, bgColor: 'white' // 背景色
|
||||
, header: true, // 表头支持 overflow
|
||||
total: true // 合计行支持 overflow
|
||||
},
|
||||
contextmenu: {
|
||||
header: [
|
||||
{
|
||||
name: '复制',
|
||||
icon: 'layui-icon layui-icon-template',
|
||||
click: function (obj) {
|
||||
soulTable.copy(obj.text)
|
||||
layer.msg('复制成功!')
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '导出excel',
|
||||
icon: 'layui-icon layui-icon-download-circle',
|
||||
click: function () {
|
||||
soulTable.export(this.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '重载表格',
|
||||
icon: 'layui-icon layui-icon-refresh-1',
|
||||
click: function () {
|
||||
table.reload(this.id)
|
||||
}
|
||||
}
|
||||
],
|
||||
// 表格内容右键菜单配置
|
||||
body: [
|
||||
{
|
||||
name: '复制',
|
||||
icon: 'layui-icon layui-icon-template',
|
||||
click: function (obj) {
|
||||
soulTable.copy(obj.text)
|
||||
layer.msg('复制成功!')
|
||||
}
|
||||
}
|
||||
],
|
||||
// 合计栏右键菜单配置
|
||||
total: [{
|
||||
name: '复制',
|
||||
icon: 'layui-icon layui-icon-template',
|
||||
click: function (obj) {
|
||||
soulTable.copy(obj.text)
|
||||
layer.msg('复制成功!')
|
||||
}
|
||||
}]
|
||||
},
|
||||
excel: {
|
||||
filename: '表格信息' + new Date().formatDate() + '.xlsx',
|
||||
},
|
||||
request: {
|
||||
pageName: 'page' //页码的参数名称,默认:page
|
||||
, limitName: 'rows' //每页数据量的参数名,默认:limit
|
||||
},
|
||||
parseData: function (res) { //res 即为原始返回的数据
|
||||
return {
|
||||
"code": res.state, //解析接口状态
|
||||
"msg": res.message, //解析提示文本
|
||||
"count": res.count, //解析数据长度
|
||||
"data": res.data //解析数据列表
|
||||
};
|
||||
}
|
||||
};
|
||||
var doneCallback = options.done;
|
||||
var options = $.extend(defaults, options);
|
||||
if (document.body.clientWidth < 500 && !!options.defaultToolbar) {
|
||||
for (var i = 0; i < options.defaultToolbar.length; i++) {
|
||||
if (options.defaultToolbar[i] == "print") {
|
||||
options.defaultToolbar.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (options.search) {
|
||||
options.defaultToolbar = !options.defaultToolbar ? [] : options.defaultToolbar;
|
||||
options.defaultToolbar.push({
|
||||
title: '搜索',
|
||||
layEvent: 'TABLE_SEARCH',
|
||||
icon: 'layui-icon-search'
|
||||
});
|
||||
}
|
||||
//ie缓存问题
|
||||
options.url = common.urlAddTime(options.url);
|
||||
//字段权限
|
||||
if (options.authorizeFields) {
|
||||
options.cols = common.tableAuthorizeFields(options.cols);
|
||||
}
|
||||
options.done = function (res, curr, count) {
|
||||
//关闭加载
|
||||
//layer.closeAll('loading');
|
||||
//固定列引发的问题
|
||||
//table.resize(options.id);
|
||||
//obj.tableResize(options.id);
|
||||
if (doneCallback) {
|
||||
doneCallback(res, curr, count);
|
||||
}
|
||||
soulTable.render(this);
|
||||
table.resize();
|
||||
};
|
||||
return table.render(options);
|
||||
},
|
||||
//table刷新
|
||||
reloadtable: function (options) {
|
||||
layer.load(0, { shade: false });
|
||||
var defaults = {
|
||||
elem: 'currentTableId',//主键
|
||||
page: true,//分页参数
|
||||
curr: 1,//当前页
|
||||
where: {}
|
||||
};
|
||||
var options = $.extend(defaults, options);
|
||||
options.where.time = new Date().Format("yyyy-MM-dd hh:mm:ss");
|
||||
if (options.page) {
|
||||
if (options.page == true) {
|
||||
table.reload(options.elem, {
|
||||
page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
|
||||
layout: ['skip', 'prev', 'page', 'next', 'limit', 'count'] //自定义分页布局
|
||||
, groups: 3 //只显示 1 个连续页码
|
||||
, first: false //不显示首页
|
||||
, last: false, //不显示尾页
|
||||
curr: options.curr
|
||||
}
|
||||
, where: options.where
|
||||
}, 'data');
|
||||
}
|
||||
else {
|
||||
table.reload(options.elem, {
|
||||
page: options.page
|
||||
, where: options.where
|
||||
}, 'data');
|
||||
}
|
||||
}
|
||||
else {
|
||||
//执行搜索重载
|
||||
table.reload(options.elem, {
|
||||
where: options.where
|
||||
}, 'data');
|
||||
}
|
||||
//关闭加载
|
||||
layer.closeAll('loading');
|
||||
},
|
||||
//tabletree渲染封装里面有字段权限
|
||||
rendertreetable: function (options) {
|
||||
//样式不协调,先不加
|
||||
var serchHeight = parseInt(60 + ($(".table-search-fieldset").height() || 0));
|
||||
var defaults = {
|
||||
elem: '#currentTableId',//主键
|
||||
toolbar: '#toolbarDemo',//工具栏
|
||||
defaultToolbar: ['filter', 'exports', 'print'],//默认工具栏
|
||||
search: true,//搜索按钮
|
||||
loading: false,
|
||||
treeIdName: 'F_Id', // id字段名称
|
||||
treePidName: 'F_ParentId', // pid字段名称
|
||||
filter:true,
|
||||
treeColIndex: 1,
|
||||
treeSpid: 0,
|
||||
limit: 99999,//每页数据 默认
|
||||
page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
|
||||
layout: ['count'] //自定义分页布局
|
||||
, first: false //不显示首页
|
||||
, last: false //不显示尾页
|
||||
},
|
||||
height: 'full-' + serchHeight,
|
||||
method: 'get',//请求方法
|
||||
cellMinWidth: 60,//最小宽度
|
||||
authorizeFields: true, // 字段权限开关
|
||||
overflow: { // 默认所有表格都超出
|
||||
type: 'tips'
|
||||
, hoverTime: 300 // 悬停时间,单位ms, 悬停 hoverTime 后才会显示,默认为 0
|
||||
, color: 'black' // 字体颜色
|
||||
, bgColor: 'white' // 背景色
|
||||
, header: true, // 表头支持 overflow
|
||||
total: true // 合计行支持 overflow
|
||||
},
|
||||
contextmenu: {
|
||||
header: [
|
||||
{
|
||||
name: '复制',
|
||||
icon: 'layui-icon layui-icon-template',
|
||||
click: function (obj) {
|
||||
soulTable.copy(obj.text)
|
||||
layer.msg('复制成功!')
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '导出excel',
|
||||
icon: 'layui-icon layui-icon-download-circle',
|
||||
click: function () {
|
||||
soulTable.export(this.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '重载表格',
|
||||
icon: 'layui-icon layui-icon-refresh-1',
|
||||
click: function () {
|
||||
table.reload(this.id)
|
||||
}
|
||||
}
|
||||
],
|
||||
// 表格内容右键菜单配置
|
||||
body: [
|
||||
{
|
||||
name: '复制',
|
||||
icon: 'layui-icon layui-icon-template',
|
||||
click: function (obj) {
|
||||
soulTable.copy(obj.text)
|
||||
layer.msg('复制成功!')
|
||||
}
|
||||
}
|
||||
],
|
||||
// 合计栏右键菜单配置
|
||||
total: [{
|
||||
name: '复制',
|
||||
icon: 'layui-icon layui-icon-template',
|
||||
click: function (obj) {
|
||||
soulTable.copy(obj.text)
|
||||
layer.msg('复制成功!')
|
||||
}
|
||||
}]
|
||||
},
|
||||
excel: {
|
||||
filename: '表格信息' + new Date().formatDate() + '.xlsx',
|
||||
},
|
||||
parseData: function (res) { //res 即为原始返回的数据
|
||||
return {
|
||||
"code": res.state, //解析接口状态
|
||||
"msg": res.message, //解析提示文本
|
||||
"count": res.count, //解析数据长度
|
||||
"data": res.data //解析数据列表
|
||||
};
|
||||
}
|
||||
};
|
||||
var doneCallback = options.done;
|
||||
var options = $.extend(defaults, options);
|
||||
if (document.body.clientWidth < 500 && !!options.defaultToolbar) {
|
||||
for (var i = 0; i < options.defaultToolbar.length; i++) {
|
||||
if (options.defaultToolbar[i] == "print") {
|
||||
options.defaultToolbar.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
//搜索框按钮
|
||||
if (options.search) {
|
||||
options.defaultToolbar = !options.defaultToolbar ? [] : options.defaultToolbar;
|
||||
options.defaultToolbar.push({
|
||||
title: '搜索',
|
||||
layEvent: 'TABLE_SEARCH',
|
||||
icon: 'layui-icon-search'
|
||||
});
|
||||
}
|
||||
//ie缓存问题
|
||||
options.url = common.urlAddTime(options.url);
|
||||
//字段权限
|
||||
if (options.authorizeFields) {
|
||||
options.cols = common.tableAuthorizeFields(options.cols);
|
||||
}
|
||||
options.done = function (res, curr, count) {
|
||||
//关闭加载
|
||||
//layer.closeAll('loading');
|
||||
if (doneCallback) {
|
||||
doneCallback(res, curr, count);
|
||||
}
|
||||
table.resize();
|
||||
};
|
||||
tabletree.render(options);
|
||||
return options;
|
||||
},
|
||||
//table行点击事件及按钮显示控制
|
||||
tableRowClick: function (type, tableFilter, tableId, oneList, moreList, clickfunction) {
|
||||
var oneList = !!oneList ? oneList : [];
|
||||
var moreList = !!moreList ? moreList : [];
|
||||
//type是checkbox或者radio
|
||||
$(document).on("click", ".layui-table-body table.layui-table tbody tr", function () {
|
||||
var obj = event ? event.target : event.srcElement;
|
||||
// 获取事件名称
|
||||
var tag = obj.tagName;
|
||||
var index = $(this).attr('data-index');
|
||||
var tableBox = $(this).parents('.layui-table-box');
|
||||
//存在固定列
|
||||
if (tableBox.find(".layui-table-fixed.layui-table-fixed-l").length > 0) {
|
||||
tableDiv = tableBox.find(".layui-table-fixed.layui-table-fixed-l");
|
||||
} else {
|
||||
tableDiv = tableBox.find(".layui-table-body.layui-table-main");
|
||||
}
|
||||
var checkCell = tableDiv.find("tr[data-index=" + index + "]").find("td div.laytable-cell-" + type + " div.layui-form-" + type + " I");
|
||||
if (checkCell.length > 0) {
|
||||
//div和td生效
|
||||
if (tag == 'DIV' || tag == "TD") {
|
||||
checkCell.click();
|
||||
}
|
||||
}
|
||||
});
|
||||
//对td的单击事件进行拦截停止,防止事件冒泡再次触发上述的单击事件(Table的单击行事件不会拦截,依然有效)
|
||||
$(document).on("click", "td div.laytable-cell-" + type + " div.layui-form-" + type + "", function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
table.on('row(' + tableFilter+')', function (obj) {
|
||||
obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
|
||||
if (clickfunction) {
|
||||
clickfunction(obj);
|
||||
}
|
||||
})
|
||||
//多选框监听
|
||||
table.on(type+'(' + tableFilter + ')', function (obj) {
|
||||
//控制按钮
|
||||
var data = table.checkStatus(tableId).data;
|
||||
var buttonHumanized = sessionStorage.getItem('watercloudButtonHumanized');
|
||||
if (!buttonHumanized) {
|
||||
if (obj.type == "all") {
|
||||
if (obj.checked && table.cache[tableId].length != 0) {
|
||||
if (table.cache[tableId].length > 1) {
|
||||
for (var i = 0; i < oneList.length; i++) {
|
||||
$('[name="' + oneList[i] + '"]').addClass("layui-hide");
|
||||
}
|
||||
for (var i = 0; i < moreList.length; i++) {
|
||||
$('[name="' + moreList[i] + '"]').removeClass("layui-hide");
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < oneList.length; i++) {
|
||||
$('[name="' + oneList[i] + '"]').removeClass("layui-hide");
|
||||
}
|
||||
for (var i = 0; i < moreList.length; i++) {
|
||||
$('[name="' + moreList[i] + '"]').removeClass("layui-hide");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < oneList.length; i++) {
|
||||
$('[name="' + oneList[i] + '"]').addClass("layui-hide");
|
||||
}
|
||||
for (var i = 0; i < moreList.length; i++) {
|
||||
$('[name="' + moreList[i] + '"]').addClass("layui-hide");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (data.length > 1) {
|
||||
for (var i = 0; i < oneList.length; i++) {
|
||||
$('[name="' + oneList[i] + '"]').addClass("layui-hide");
|
||||
}
|
||||
for (var i = 0; i < moreList.length; i++) {
|
||||
$('[name="' + moreList[i] + '"]').removeClass("layui-hide");
|
||||
}
|
||||
}
|
||||
else if (data.length == 1) {
|
||||
for (var i = 0; i < oneList.length; i++) {
|
||||
$('[name="' + oneList[i] + '"]').removeClass("layui-hide");
|
||||
}
|
||||
for (var i = 0; i < moreList.length; i++) {
|
||||
$('[name="' + moreList[i] + '"]').removeClass("layui-hide");
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < oneList.length; i++) {
|
||||
$('[name="' + oneList[i] + '"]').addClass("layui-hide");
|
||||
}
|
||||
for (var i = 0; i < moreList.length; i++) {
|
||||
$('[name="' + moreList[i] + '"]').addClass("layui-hide");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < oneList.length; i++) {
|
||||
$('[name="' + oneList[i] + '"]').removeClass("layui-hide");
|
||||
}
|
||||
for (var i = 0; i < moreList.length; i++) {
|
||||
$('[name="' + moreList[i] + '"]').removeClass("layui-hide");
|
||||
}
|
||||
}
|
||||
table.resize();
|
||||
});
|
||||
},
|
||||
}
|
||||
exports("commonTable", obj);
|
||||
});
|
||||
1989
WaterCloud.Web/wwwroot/js/lay-module/xm-select/xm-select.js
Normal file
1989
WaterCloud.Web/wwwroot/js/lay-module/xm-select/xm-select.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user