Commit c229837b by cwq0219

Merge branch 'master' of http://192.168.3.233:8090/h5/account

2 parents d7eb4234 d68ac1c8
......@@ -89,8 +89,7 @@ header {
main {
flex: 1;
/* min-height: calc(100% - 60px - 30px); */
min-height: calc(100% - 60px);
min-height: calc(100% - 60px - 30px);
overflow: auto;
background-color: #f8f8f8;
}
......@@ -118,4 +117,7 @@ footer {
.op1 {
opacity: 1;
}
.footer-close {
text-align: center;
}
\ No newline at end of file
......@@ -49,8 +49,6 @@
$('#logout').click(function () {
var sessionId = layui.store.get('token')
request({ sessionId: sessionId, method: 'org.ore.api.example.logout' }, function (result) {
layui.store.remove('external')
layui.store.remove('token')
goLogin()
})
})
......
......@@ -44,6 +44,9 @@
<h3 class="content-title">可见下级商户</h3>
<ul id="tree" class="ztree wrapper-tree"></ul>
</div>
<div class="footer-close">
<button type="button" class="layui-btn layui-btn-normal" id="return">关闭</button>
</div>
</main>
</div>
<script src="https://www.layuicdn.com/layui/layui.js"></script>
......@@ -59,6 +62,11 @@
var basicArr = ['staffName', 'staffPhone', 'roleName', 'roleIds']
var employeeData = {}
getById()
$('#return').on('click', function() {
window.history.back()
})
// 查询员工详情
function getById() {
var params = { id: id, method: 'cn.com.glsx.merchants.staff.staffSearchRequest' }
......@@ -78,17 +86,12 @@
var treeParams = { id: merchantId, method: 'cn.com.glsx.merchants.merchant.findMerchantTree' }
var merchants = {}
request(treeParams, function(res) {
console.log(res)
if (res.code == '0') {
var arr = employeeData.visibleInferiorMer.split(',')
$.each(arr, function (index, item) {
arr[index] = +item
})
console.log(arr)
merchants = tree.create('tree', res.data, {checkedList: arr, chkDisabled: true})
// var id = 32
// var node = merchants.getNodeByParam("id",id)
// merchants.checkNode(node, true, true)
}
})
}
......
......@@ -318,7 +318,7 @@
var merchants = {}
request(treeParams, function (res) {
if (res.code == '0') {
merchants = tree.create('merchantTree', res.data)
merchants = tree.create('merchantTree', res.data, null, false)
merchants.expandAll(true)
}
})
......
......@@ -9,6 +9,15 @@
<meta name="keywords" itemprop="keywords" content="广联,帐户管理,员工管理" />
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<title>角色管理</title>
<style>
.show {
display: inline-block;
}
.hide {
display: none;
}
</style>
</head>
<body>
......
......@@ -41,6 +41,9 @@
<ul class="layui-tab-title"></ul>
<div class="layui-tab-content"></div>
</div>
<div class="footer-close">
<button type="button" class="layui-btn layui-btn-normal" id="return">关闭</button>
</div>
</div>
</main>
</div>
......@@ -66,6 +69,10 @@
// 查询角色详情
// getById()
findMenuFunTreeByMerId()
$('#return').on('click', function() {
window.history.back()
})
// form.on('select(accountSelect)', function(data){
// console.log(data.elem); //得到select原始DOM对象
// console.log(data.value); //得到被选中的值
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-07-15 15:46:53
* @LastEditors: limin
* @LastEditTime: 2021-08-09 11:20:52
* @LastEditTime: 2021-08-09 14:07:12
* @FilePath: \account\js\load.js
*/
;(function load() {
......@@ -20,9 +20,6 @@ function go(module, page, params) {
var href = '/html/' + module + '/' + page + '.html'
window.location.href = _p ? href + '?' + _p : href
}
function goLogin() {
window.location.href = '/login.html'
}
function loadLayConfig() {
layui.config({
......@@ -55,7 +52,7 @@ function append() {
var header = document.createElement('header')
var footer = document.createElement('footer')
$(header).load('/html/components/header.html')
// $(footer).load('/html/components/footer.html')
$(footer).load('/html/components/footer.html')
$('main').before(header).after(footer)
}
......@@ -85,6 +82,14 @@ function loadConfig() {
})
})
}
function goLogin() {
layui.use(['store'], function () {
layui.store.remove('external')
layui.store.remove('token')
layui.store.remove('user')
window.location.href = '/login.html'
})
}
function genurl(param, key, encode) {
// if (!param || layui.$.isEmptyObject(param)) return ''
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-07-19 10:15:48
* @LastEditors: limin
* @LastEditTime: 2021-08-09 10:52:59
* @LastEditTime: 2021-08-09 14:09:12
* @FilePath: \account\js\request.js
*/
layui.define(['sha1', 'md5', 'helper'], function (exports) {
......@@ -74,6 +74,9 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) {
success && success(result)
} else {
msg(result.message)
if(result.errId=='21'){ //TGT失效
goLogin && goLogin()
}
}
}
if (config.async === false) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!