Commit e92ba9e8 by yangbenyong

Merge branch 'master' of http://39.106.223.11/462269006/cyyy

parents 14749488 b12d0b14
......@@ -295,7 +295,7 @@ public class BudgetDeclaratioController{
@PostMapping(MODEL + "/tjlist.json")
@Function("budgetDeclaratio.query")
@ResponseBody
public JsonResult<PageQuery> tjlist(BudgetDeclaratioQuery condtion)
public JsonResult<PageQuery> tjlist(BudgetDeclaratioTJQuery condtion)
{
/* if (condtion.getType()==null||!condtion.getType().equals("xg")) {
CoreUser user = paltformService.getCurrentUser();
......@@ -312,6 +312,11 @@ public class BudgetDeclaratioController{
}else {
condtion.setTypeState("'-1','0','1','3'");
}*/
CoreUser user = paltformService.getCurrentUser();
CoreRole role = paltformService.getRoleOfUser(user.getId());
if (role.getId().intValue()!=204) {
condtion.setOrgId(user.getOrgId().toString());
}
PageQuery page = condtion.getPageQuery();
budgetDeclaratioService.queryByCondition(page);
return JsonResult.success(page);
......
......@@ -16,15 +16,30 @@ public class BudgetDeclaratioTJQuery extends PageParam {
private String number;
// @Query(name = "申报人员", display = true)
private String user;
// @Query(name = "年度", display = true)
private String tjtype;
private String year;
private String examine;
private String typeState;
private String orgId;
@Query(name = "进度", display = true,dict="schedule",type=Query.TYPE_DICT)
private String state;
@Query(name = "统计类型", display = true,dict="dtype",type=Query.TYPE_DICT)
private String dtype;
public String getState() {
public String getDtype() {
return dtype;
}
public void setDtype(String dtype) {
this.dtype = dtype;
}
public String getTjtype() {
return tjtype;
}
public void setTjtype(String tjtype) {
this.tjtype = tjtype;
}
public String getState() {
return state;
}
public void setState(String state) {
......
......@@ -3,6 +3,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var laydate = layui.laydate;
var table = layui.table;
var budgetDeclaratioTable = null;
var dtypeText = '';
var view ={
init:function(){
this.initTable();
......@@ -12,76 +13,104 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
Lib.doSearchForm($("#searchForm"),budgetDeclaratioTable)
}
},
initTable:function(){
budgetDeclaratioTable = table.render({
elem : '#budgetDeclaratioTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url : Common.ctxPath + '/dubget/budgetDeclaratio/tjlist.json' // 数据接口
,page : Lib.tablePage // 开启分页
,limit : 10,
cols : [ [ // 表头
colsName:function(){
if(dtypeText == 3){
return [ [ // 表头
{
type : 'checkbox',
fixed:'left',
},
{
field : 'deptName',
title : '科室名称',
},
{
field : 'number',
title : '预算编号',
},
{
field : 'implementMatter',
title : '执行事项',
},
{
field : 'execute',
title : '执行金额',
},
{
field : 'chargeOff',
title : '核销金额',
},
{
field : 'stateText',
title : '状态',
},
{
title: '操作',
//rowspan: 2,
align: 'center',
fixed: 'right',
minWidth: '160',
templet: function (d) {
var edit =null;
if (d.state=='2'&&d.type=="1") {
edit='<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="dit" title="核销">核销</button>'
+'<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="view" title="查看">查看</button>';
}
else {
edit='<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="view" title="查看">查看</button>';
}
return edit;
}
}
] ]
}else{
return [ [ // 表头
{
type : 'checkbox',
fixed:'left',
},
{
field : 'deptName',
title : '科室名称',
title : '科室名称',
},
{
field : 'number',
title : '预算编号',
title : '预算编号',
},
{
field : 'name',
title : '名称',
title : '名称',
},
{
field : 'typename',
title : '预算类型',
title : '预算类型',
},
{
field : 'budget',
title : '预算金额',
title : '预算金额',
},
{
field : 'estimate',
title : '联系人',
title : '联系人',
},
{
field : 'quantity',
title : '联系人电话',
title : '联系人电话',
},
{
field : 'user',
title : '申报人员',
title : '申报人员',
},
{
field : 'stateText',
title : '状态',
title : '状态',
},
{
field : 'year',
title : '年度',
title : '年度',
},
{
field : '',
title : '操作记录',
templet:function(d){
......@@ -100,33 +129,39 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
if (d.state=='-1'||d.state=='0') {
edit= '<button class="layui-btn layui-btn-sm layui-btn-warm" lay-event="view" title="查看">查看</button>'
;
}/*else if (d.state=='0') {
edit= '<button class="layui-btn layui-btn-sm layui-btn" lay-event="edit" title="提交">提交</button>';
}else if (d.state=='1') {
edit= '<button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="delete" title="取回">取回</button>';
}*/
}
else {
edit= '<button class="layui-btn layui-btn-sm layui-btn-warm" lay-event="view" title="查看">查看</button>';
}
//var ret;
// ret = edit;
return edit;
}
}
] ],done: function (res, curr, count) {// 表格渲染完成之后的回调
var that = this.elem.next();
res.data.forEach(function (item, index) {
if (item.type === "") {
var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']");
tr.css("background-color", "red");
tr.css("color", "white");
}
});
}
] ]
}
},
initTable:function(){
var _this = this;
budgetDeclaratioTable = table.render({
elem : '#budgetDeclaratioTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url : Common.ctxPath + '/dubget/budgetDeclaratio/tjlist.json' // 数据接口
,page : Lib.tablePage // 开启分页
,limit : 10,
toolbar: "#btns",
cols : _this.colsName(),
done: function (res, curr, count) { // 表格渲染完成之后的回调
var that = this.elem.next();
res.data.forEach(function (item, index) {
if (item.type === "") {
var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']");
tr.css("background-color", "red");
tr.css("color", "white");
}
});
// viewTable.initEvent(budgetDeclaratioTable.config,res)
}
});
......@@ -227,6 +262,12 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
Common.openDlg(url, "预算申报管理>上传");
}
};
form.on('select(dtype)',function(d){
dtypeText = d.value;
view.initTable();
view.initSearchForm();
//$(d.othis[0]).find('.layui-select-title input').val()
})
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/** layui-v2.4.5 MIT License By https://www.layui.com */
blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}@-webkit-keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-left{-webkit-animation-name:layui-m-anim-left;animation-name:layui-m-anim-left}@-webkit-keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-right{-webkit-animation-name:layui-m-anim-right;animation-name:layui-m-anim-right}@-webkit-keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.layui-m-anim-lout{-webkit-animation-name:layui-m-anim-lout;animation-name:layui-m-anim-lout}@-webkit-keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.layui-m-anim-rout{-webkit-animation-name:layui-m-anim-rout;animation-name:layui-m-anim-rout}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px}
\ No newline at end of file
/** layui-v2.4.5 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
\ No newline at end of file
/** 图标字体 **/
@font-face {font-family: 'laydate-icon';
src: url('./font/iconfont.eot');
src: url('./font/iconfont.eot#iefix') format('embedded-opentype'),
url('./font/iconfont.svg#iconfont') format('svg'),
url('./font/iconfont.woff') format('woff'),
url('./font/iconfont.ttf') format('truetype');
}
.laydate-icon{
font-family:"laydate-icon" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
\ No newline at end of file
/** layui-v2.4.5 MIT License By https://www.layui.com */
.laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-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}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/**
@Name:checkOrg 树组件
@Author:wyh
@License:MIT
*/
layui.define('jquery', function(exports){
"use strict";
var $ = layui.$
,hint = layui.hint();
var enterSkin = '', CheckOrg = function(options){
this.options = options;
};
//初始化
CheckOrg.prototype.init = function(options){
var that = this;
var isAll = "";
var isChild = "";
if(that.options.isAll){
isAll = "y";
}
if(that.options.iscity){
isAll = "c";
}
if(that.options.isChild){
isChild = "y";
}
$.post(Common.ctxPath + "/core/user/xtorg.json?isChild="+isChild+"&orgId="+that.options.orgId+"&isAll="+isAll, {}, function(data) {
var zNodes = data;
console.log(zNodes)
var zTreeObj = null;
var index = layer.open({
type : 0,
area : [ '500px', '400px' ],
offset : 't',
anim : 5,
title : '选择组织机构',
content : "<ul id='_treeDemo' class='ztree'></ul>",
btn: ['确定','重置'],
success: function(layero, index){
zTreeObj = that.setting(zNodes);
that.spread(zTreeObj);
},
yes : function(index, layero) {
if(that.options.ascertain){
that.ascertain(zTreeObj);
}
layer.close(index);
},
btn2: function(index, layero){
if(that.options.inputId){
that.options.inputId.val('');
}
if(that.options.inputName){
that.options.inputName.val('');
}
zTreeObj.cancelSelectedNode();
}
});
});
};
//多选级联
CheckOrg.prototype.setting = function(zNodes){
var that = this, options = that.options;
var zTreeObj = null;
var setting = {};
if(that.options.multipleChoice){
setting = {
view: {
dblClickExpand: false,
showLine: false
},
data: {
simpleData: {
enable: true
}
},
check: {
enable: true,
chkboxType: {"Y": "", "N": ""}
},
callback: {
onClick: function (e, treeId, treeNode, clickFlag) {
that.click(zTreeObj,treeNode);
}
}
};
if(that.options.isRecursive){
setting = {
view: {
dblClickExpand: false,
showLine: false
},
data: {
simpleData: {
enable: true
}
},
check: {
enable: true,
chkboxType: {"Y": "ps", "N": ""}
},
callback: {
onClick: function (e, treeId, treeNode, clickFlag) {
that.click(zTreeObj,treeNode);
}
}
};
}
}else{
setting = {
view: {
dblClickExpand: false,
showLine: false
},
data: {
simpleData: {
enable: true
}
},
check: {
enable: true,
chkStyle: "radio",
radioType: "all"
},
callback: {
onClick: function (e, treeId, treeNode, clickFlag) {
that.click(zTreeObj,treeNode);
}
}
};
}
zTreeObj = $.fn.zTree.init($("#_treeDemo"), setting, zNodes.data);
return zTreeObj;
};
//点击节点回调
CheckOrg.prototype.click = function(zTreeObj,treeNode){
var that = this, options = that.options;
var nodes = zTreeObj.getCheckedNodes();console.log(that,nodes)
zTreeObj.checkNode(treeNode, !treeNode.checked, true);
var nodes = zTreeObj.getCheckedNodes();
if(that.options.click){
that.options.click(nodes);
}
};
//确定回调
CheckOrg.prototype.ascertain = function(zTreeObj){
var that = this, options = that.options;
var nodes = zTreeObj.getCheckedNodes();
var ids = "";
var names = "";console.log(that,nodes)
if(that.options.multipleChoice){
for(var i = 0;i<nodes.length;i++){
ids = ids + nodes[i].id+";";
names = names + nodes[i].name+";";
}
}else{
if (nodes.length == 1) {
var org = nodes[0];
ids = org.id;
names = org.name;
}
}
if(that.options.inputId){
that.options.inputId.val(ids);
}
if(that.options.inputName){
that.options.inputName.val(names);
}
if(that.options.ascertain){
that.options.ascertain(nodes);
}
};
//伸展节点spk-plm-core
CheckOrg.prototype.spread = function(zTreeObj){
var that = this, options = that.options;
if(that.options.inputId){
if(that.options.inputId.val()){
if(that.options.multipleChoice){
var arr = that.options.inputId.val().split(",");
console.log(arr);
for(var i = 0;i<arr.length;i++){
if(""==arr[i]){
continue;
}
var node = zTreeObj.getNodeByParam("id",arr[i]);
zTreeObj.selectNode(node,true);
zTreeObj.checkNode(node,true);
zTreeObj.expandNode(node, true, false);
}
}else{
var node = zTreeObj.getNodeByParam("id",that.options.inputId.val());
zTreeObj.selectNode(node,true);
zTreeObj.checkNode(node,true);
zTreeObj.expandNode(node, true, false);
}
}
}
}
//暴露接口
exports('XtcheckOrg', function(options){
var XtcheckOrg = new CheckOrg(options = options || {});
XtcheckOrg.init(options);
});
});
\ No newline at end of file
/** layui-v2.2.5 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['<button class="layui-icon '+u+'" lay-type="sub">'+("updown"===n.anim?"&#xe619;":"&#xe603;")+"</button>",'<button class="layui-icon '+u+'" lay-type="add">'+("updown"===n.anim?"&#xe61a;":"&#xe602;")+"</button>"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['<div class="'+c+'"><ul>',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("<li"+(n.index===e?' class="layui-this"':"")+"></li>")}),i.join("")}(),"</ul></div>"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a<n.index&&e.slide("sub",n.index-a)})},m.prototype.slide=function(e,i){var n=this,l=n.elemItem,u=n.config,c=u.index,m=u.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),l.eq(u.index).addClass(d),setTimeout(function(){l.eq(c).addClass(r),l.eq(u.index).addClass(r)},50)):(n.addIndex(i),l.eq(u.index).addClass(s),setTimeout(function(){l.eq(c).addClass(o),l.eq(u.index).addClass(o)},50)),setTimeout(function(){l.removeClass(a+" "+d+" "+s+" "+o+" "+r),l.eq(u.index).addClass(a),n.haveSlide=!1},300),n.elemInd.find("li").eq(u.index).addClass(a).siblings().removeClass(a),n.haveSlide=!0,layui.event.call(this,t,"change("+m+")",{index:u.index,prevIndex:c,item:l.eq(u.index)}))},m.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){clearInterval(e.timer)}).on("mouseleave",function(){e.autoplay()}),i.elem.data("haveEvents",!0))},n.render=function(e){var i=new m(e);return i},e(t,n)});
\ No newline at end of file
/**
@Name:checkOrg 树组件
@Author:wyh
@License:MIT
*/
layui.define('jquery', function(exports){
"use strict";
var $ = layui.$
,hint = layui.hint();
var enterSkin = '', CheckOrg = function(options){
this.options = options;
};
//初始化
CheckOrg.prototype.init = function(options){
var that = this;
var isAll = "";
var isChild = "";
if(that.options.isAll){
isAll = "y";
}
if(that.options.iscity){
isAll = "c";
}
if(that.options.isChild){
isChild = "y";
}
$.post(Common.ctxPath + "/core/user/org.json?isChild="+isChild+"&orgId="+that.options.orgId+"&isAll="+isAll, {}, function(data) {
var zNodes = data;
console.log(zNodes)
var zTreeObj = null;
var index = layer.open({
type : 0,
area : [ '500px', '400px' ],
offset : 't',
anim : 5,
title : '选择组织机构',
content : "<ul id='_treeDemo' class='ztree'></ul>",
btn: ['确定','重置'],
success: function(layero, index){
zTreeObj = that.setting(zNodes);
that.spread(zTreeObj);
},
yes : function(index, layero) {
if(that.options.ascertain){
that.ascertain(zTreeObj);
}
layer.close(index);
},
btn2: function(index, layero){
if(that.options.inputId){
that.options.inputId.val('');
}
if(that.options.inputName){
that.options.inputName.val('');
}
zTreeObj.cancelSelectedNode();
}
});
});
};
//多选级联
CheckOrg.prototype.setting = function(zNodes){
var that = this, options = that.options;
var zTreeObj = null;
var setting = {};
if(that.options.multipleChoice){
setting = {
view: {
dblClickExpand: false,
showLine: false
},
data: {
simpleData: {
enable: true
}
},
check: {
enable: true,
chkboxType: {"Y": "", "N": ""}
},
callback: {
onClick: function (e, treeId, treeNode, clickFlag) {
that.click(zTreeObj,treeNode);
}
}
};
if(that.options.isRecursive){
setting = {
view: {
dblClickExpand: false,
showLine: false
},
data: {
simpleData: {
enable: true
}
},
check: {
enable: true,
chkboxType: {"Y": "ps", "N": ""}
},
callback: {
onClick: function (e, treeId, treeNode, clickFlag) {
that.click(zTreeObj,treeNode);
}
}
};
}
}else{
setting = {
view: {
dblClickExpand: false,
showLine: false
},
data: {
simpleData: {
enable: true
}
},
check: {
enable: true,
chkStyle: "radio",
radioType: "all"
},
callback: {
onClick: function (e, treeId, treeNode, clickFlag) {
that.click(zTreeObj,treeNode);
}
}
};
}
zTreeObj = $.fn.zTree.init($("#_treeDemo"), setting, zNodes.data);
return zTreeObj;
};
//点击节点回调
CheckOrg.prototype.click = function(zTreeObj,treeNode){
var that = this, options = that.options;
var nodes = zTreeObj.getCheckedNodes();console.log(that,nodes)
zTreeObj.checkNode(treeNode, !treeNode.checked, true);
var nodes = zTreeObj.getCheckedNodes();
if(that.options.click){
that.options.click(nodes);
}
};
//确定回调
CheckOrg.prototype.ascertain = function(zTreeObj){
var that = this, options = that.options;
var nodes = zTreeObj.getCheckedNodes();
var ids = "";
var names = "";console.log(that,nodes)
if(that.options.multipleChoice){
for(var i = 0;i<nodes.length;i++){
ids = ids + nodes[i].id+";";
names = names + nodes[i].name+";";
}
}else{
if (nodes.length == 1) {
var org = nodes[0];
ids = org.id;
names = org.name;
}
}
if(that.options.inputId){
that.options.inputId.val(ids);
}
if(that.options.inputName){
that.options.inputName.val(names);
}
if(that.options.ascertain){
that.options.ascertain(nodes);
}
};
//伸展节点spk-plm-core
CheckOrg.prototype.spread = function(zTreeObj){
var that = this, options = that.options;
if(that.options.inputId){
if(that.options.inputId.val()){
if(that.options.multipleChoice){
var arr = that.options.inputId.val().split(",");
console.log(arr);
for(var i = 0;i<arr.length;i++){
if(""==arr[i]){
continue;
}
var node = zTreeObj.getNodeByParam("id",arr[i]);
zTreeObj.selectNode(node,true);
zTreeObj.checkNode(node,true);
zTreeObj.expandNode(node, true, false);
}
}else{
var node = zTreeObj.getNodeByParam("id",that.options.inputId.val());
zTreeObj.selectNode(node,true);
zTreeObj.checkNode(node,true);
zTreeObj.expandNode(node, true, false);
}
}
}
}
//暴露接口
exports('checkOrg', function(options){
var checkOrg = new CheckOrg(options = options || {});
checkOrg.init(options);
});
});
\ No newline at end of file
/**
@Name:checkOrg 树组件
@Author:wyh
@License:MIT
*/
layui.define('jquery', function(exports){
"use strict";
var $ = layui.$
,hint = layui.hint();
var enterSkin = '', CheckUser = function(options){
this.options = options;
};
//初始化
CheckUser.prototype.init = function(options){
var that = this;
var isRecursive = "";
var multipleChoice = "";
var isAll = "";
if(that.options.isRecursive){
isRecursive = "y";
}
if(that.options.multipleChoice){
multipleChoice = "y";
}
if(that.options.isAll){
isAll = "y";
}
var index=layer.open({
type: 2,
shade: false,
btn: ['确定', '取消'],
area: ['1000px', '500px'],
maxmin: true,
content: Common.ctxPath + '/admin/user/userList.do?isRecursive='+isRecursive+'&multipleChoice='+multipleChoice+'&isAll='+isAll,
zIndex: layer.zIndex, //重点1
success: function(layero){
layer.setTop(layero); //重点2
},
yes: function(index, layero){
var res = window["layui-layer-iframe" + index].callbackdata();
var flag = false;
if(that.options.ascertain){
flag = that.ascertain(res);
}
if(flag){
layer.close(index);
}
},
cancel: function(index){
if(that.options.close){
that.options.close();
}
},
btn2: function(index, layero){
if(that.options.close){
that.options.close();
}
}
});
layer.full(index);
};
//点击节点回调
CheckUser.prototype.click = function(zTreeObj,treeNode){
var that = this, options = that.options;
var nodes = zTreeObj.getCheckedNodes();
zTreeObj.checkNode(treeNode, !treeNode.checked, true);
var nodes = zTreeObj.getCheckedNodes();
if(that.options.click){
that.options.click(nodes);
}
};
//确定回调
CheckUser.prototype.ascertain = function(data){
var that = this, options = that.options;
var ids = "";
var names = "";
var codes="";
if(null == data || "" == data || "undefined" == data){
Common.info("请选中记录");
return false;
}
if(that.options.multipleChoice){
for(var i = 0;i<data.length;i++){
ids = ids + data[i].id+";";
names = names + data[i].name+";";
}
}else{
if(data.length>1){
Common.info("请选中一条记录");
return false;
}else{
ids = data[0].id;
names = data[0].name;
}
}
if(that.options.inputId){
that.options.inputId.val(ids);
}
if(that.options.inputName){
that.options.inputName.val(names);
}
if(that.options.ascertain){
that.options.ascertain(data);
}
return true;
};
//暴露接口
exports('checkUser', function(options){
var checkUser = new CheckUser(options = options || {});
checkUser.init(options);
});
});
\ No newline at end of file
/** layui-v2.2.5 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")),c.html('<ol class="layui-code-ol"><li>'+o.replace(/[\r\t\n]+/g,"</li><li>")+"</li></ol>"),c.find(">.layui-code-h3")[0]||c.prepend('<h3 class="layui-code-h3">'+(c.attr("lay-title")||e.title||"code")+(e.about?'<a href="'+l+'" target="_blank">layui.code</a>':"")+"</h3>");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss");
\ No newline at end of file
/** layui-v2.4.5 MIT License By https://www.layui.com */
;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='<li lay-id="'+(i.id||"")+'"'+(i.attr?' lay-attr="'+i.attr+'"':"")+">"+(i.title||"unnaming")+"</li>";return s[0]?s.before(r):n.append(r),o.append('<div class="layui-tab-item">'+(i.content||"")+"</div>"),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('<span class="layui-unselect layui-tab-bar" '+r+"><i "+r+' class="layui-icon">&#xe61a;</i></span>');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('<i class="layui-icon layui-unselect '+l+'">&#x1006;</i>');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html("&#xe602;"),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"&#xe61a;":"&#xe602;"),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a('<span class="'+c+'"></span>'),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append('<span class="'+y+'"></span>'),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after("<span "+i+">"+e+"</span>")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html('<span class="'+t+'-text">'+l+"</span>")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append('<i class="layui-icon layui-colla-icon">'+(l?"&#xe602;":"&#xe61a;")+"</i>"),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment