Commit 9fc2ce3c by 胡悦

修改样式

1 parent 9a6d32ac
......@@ -24,7 +24,7 @@
.add .layui-input-block,
.detail .layui-input-inline {
width: 320px;
width: 360px;
}
.add .layui-form-label,
.detail .layui-form-label {
......
......@@ -137,6 +137,17 @@ footer {
color: #37383A;
}
.clearfix {
zoom: 1;
}
.clearfix::after {
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.pr-parent-ul {
display: flex;
}
......@@ -182,7 +193,7 @@ footer {
}
.layui-tab-content {
/* margin-top: 20px; */
background-color: #fff;
/* background-color: #fff; */
}
.layui-tab-content .layui-form-pane .layui-form-label {
background-color: #fff;
......@@ -200,4 +211,23 @@ footer {
}
.m-t-md {
margin-top: 20px;
}
\ No newline at end of file
}
.layui-tab-content {
position: relative;
}
.layui-no-data {
width: 100%;
height: 200px;
}
.layui-no-data .no-data {
position: absolute;
top: 50%;
width: 100%;
text-align: center;
font-size: 14px;
line-height: 22px;
transform: translateY(-50%);
}
.layui-no-data .no-data div {
margin-top: 12px;
}
\ No newline at end of file
......@@ -156,7 +156,7 @@
<label class="layui-form-label required">可见商户:</label>
<div class="layui-input-block">
<input class="layui-input" placeholder="可见商户" id="searchMerchant" />
<ul id="visibleInferiorMerTree" class="ztree wrapper-tree"></ul>
<ul id="visibleInferiorMerTree" style="height: 200px; overflow-y: auto;" class="ztree wrapper-tree"></ul>
</div>
</div>
<div class="layui-form-item">
......@@ -239,7 +239,7 @@
// merchantAccountLevel: 1,
// merchantId: 81
// }
if (accountInfo.merchantAccountLevel && !id) {
if (accountInfo && !id) {
$('#btnGroup').addClass('show')
}
// 判断是从商户过来还是员工
......@@ -479,7 +479,7 @@
$('.img-add').removeClass('show')
$('.img-add').addClass('hide')
}
var visibleInferiorMerArr = data.visibleInferiorMer.split(',')
var visibleInferiorMerArr = data.visibleInferiorMer ? data.visibleInferiorMer.split(',') : []
$.each(visibleInferiorMerArr, function (index, item) {
visibleInferiorMerArr[index] = +item
})
......
......@@ -57,6 +57,32 @@
width: 100%;
height: 1px;
}
.layui-tab-content {
position: relative;
}
.layui-no-data {
width: 100%;
height: 500px;
}
.layui-no-data .no-data {
position: absolute;
top: 50%;
height: 50%;
width: 100%;
text-align: center;
font-size: 14px;
line-height: 22px;
}
.layui-no-data .no-data div {
margin-top: 12px;
}
.show {
display: inline-block;
}
.hide {
display: none;
}
</style>
<body>
<div id="app">
......
......@@ -107,7 +107,7 @@
{ field: 'createdAccount', title: '创建者', align: 'center' },
{ field: 'merchantName', title: '商户名(商户号)', align: 'center', width: 160 },
{ field: 'updatedTime', title: '更新时间', align: 'center', width: 112 },
{ fixed: 'right', title: '操作', width: 220, align: 'left', toolbar: '#employeeBar' },
{ title: '操作', width: 220, align: 'left', toolbar: '#employeeBar' },
{ field: 'statusName', title: '启用开关', width: 85, templet: '#switchTpl', unresize: true }
]
var colums = [
......@@ -122,7 +122,7 @@
{ field: 'entmicroName', title: '所属企微', align: 'center', width: 125 },
{ field: 'statusName', title: '状态', align: 'center' },
{ field: 'updatedTime', title: '更新时间', align: 'center', width: 112 },
{ fixed: 'right', title: '操作', width: 220, align: 'left', toolbar: '#employeeBar' },
{ title: '操作', width: 220, align: 'left', toolbar: '#employeeBar' },
{ field: 'statusName', title: '启用开关', width: 85, templet: '#switchTpl', unresize: true }
]
//创建table实例
......
......@@ -9,16 +9,7 @@
<meta name="keywords" itemprop="keywords" content="广联,帐户管理,员工管理" />
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<style>
.clearfix {
zoom: 1;
}
.clearfix::after {
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.edit-box {
/* width: 1046px; */
padding: 20px 20px;
......
......@@ -248,17 +248,20 @@
{
field: 'merchantNo',
title: '商户号',
align: 'center'
align: 'center',
width: 100
},
{
field: 'merchantName',
title: '商户名称',
align: 'center'
align: 'center',
width: 100
},
{
field: 'merchantModelName',
title: '模式',
align: 'center'
align: 'center',
width: 100
},
{
field: 'accountTypeNames',
......@@ -276,12 +279,14 @@
{
field: 'accountLevelName',
title: '账户等级',
align: 'center'
align: 'center',
width: 100
},
{
field: 'parentMerchant',
title: '上级商户',
align: 'center'
align: 'center',
width: 120
},
{
field: 'statusName',
......@@ -303,7 +308,7 @@
field: 'entmicroName',
title: '关联的企业微信',
align: 'center',
width: 120
width: 130
// }, {
// field: 'merchantAddress',
// title: '商户地址',
......@@ -320,7 +325,7 @@
align: 'left',
title: '操作',
toolbar: '#merchantBtns',
width: 150,
width: 220,
fixed: 'right'
// },
// {
......@@ -403,7 +408,7 @@
align: 'left',
title: '操作',
toolbar: '#merchantBtns',
width: 220,
width: 150,
fixed: 'right'
}
]
......
......@@ -50,6 +50,13 @@
background-color: #fff;
height: 100%;
}
.show {
display: inline-block;
}
.hide {
display: none;
}
</style>
<body>
<div id="app">
......
......@@ -7,6 +7,7 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
var templateData = {}
var treeData = {}
var selectEl = {}
var $ = layui.$
// 树相关的方法
var treeTab = {
/**
......@@ -34,7 +35,17 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
// 选项卡标题的lay-id属性值
id: id
})
var getTpl = '<div class="layui-tab layui-tab-card" lay-filter="treeTab{{d.id}}"><ul class="layui-tab-title"></ul> <div class="layui-tab-content"></div></div>'
var getTpl = `<div class="layui-tab layui-tab-card" lay-filter="treeTab{{d.id}}">
<ul class="layui-tab-title"></ul>
<div class="layui-tab-content">
<div class="layui-no-data show" id="nodata${id}">
<div class="no-data">
<img src="../../css/img/no-data.png" />
<div>暂无数据</div>
</div>
</div>
</div>
</div>`
view = document.getElementById('role' + id)
templateData.id = id // 渲染模版的数据
laytpl(getTpl).render(templateData, function (html) {
......@@ -121,8 +132,10 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
treeListData = i.merchantProTreeResponses
}
})
console.log('treeListData', treeListData)
var treedom = 'tree_' + productId
treeData[id][item.value].treeObj = tree.create(treedom, treeListData, {chkDisabled: true})
treeData[id][item.value].treeObj = tree.create(treedom, treeListData, { chkDisabled: true })
},
treeTabDetail: function (item, id, productTreeList) {
var productId = 'tab_' + id + '_' + item.value
......@@ -147,6 +160,14 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
enable: false
}
})
console.log(productTreeList)
if (productTreeList && productTreeList.length != 0) {
$(`#nodata${id}`).removeClass('show')
$(`#nodata${id}`).addClass('hide')
} else {
$(`#nodata${id}`).removeClass('hide')
$(`#nodata${id}`).addClass('show')
}
}
}
exports('treeTab', treeTab)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!